diff --git a/.clang-format b/.clang-format index 91d2e95fca..08711a1a1b 100644 --- a/.clang-format +++ b/.clang-format @@ -60,7 +60,7 @@ SpaceBeforeInheritanceColon: false SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 0 +SpacesBeforeTrailingComments: 2 SpacesInAngles: false SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 34a664804a..e39ef15b92 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -73,3 +73,28 @@ ec899d75c6abf45d7ee4dd91ea0f8141a9818446 233a337ca5d693e4773fecf1de14325752afd658 9271b6d433578f65df9b469131ece4e4bdbb19aa 2637527e3a4e132506e8c074b752721d66ae146a +7681c62468d7b6f4d8af6758324b9ec983340b97 # Test: apply clang format +4919fa18ff7f9a4cdfdd7896d768c2342e5f9f37 # Surface: apply clang format +791fe029341aa1dda42376620d52c67ecaca7eea # Sketcher: Reformat to current clang-format standard +0a8292a850b98d2e66e08e235dfb81b6e7285df1 # Web: apply clang format +1a960286a4a549a6454155481ce51cad88a51745 # Tests: Reformat to current clang-format standard +c1825036a6dfd44576da6157bde9fa2fab724d55 # Tools: Reformat to current clang-format standard +17bf44ec9a5fd7a8f1c7bf0d3c24d63b6c808dbd # Start: apply clang format +89579cff6e8834e296d5efe6292f019fadedce53 # Addon Manager: Reformat with new Black line length +c989a8506ecc26e3172c0d18ce4d0f710b5c7d92 # RE: apply clang format +c6bc17ffc13aee4d38d2938800ef5002fc874fc3 # RE: apply clang format +6fb2bcafe85eb6bb0c625f37f233b0b09e093963 # MeshPart: apply clang format +c2bda2f75684ed8bb64813d4a92a5a595181f556 # MeshPart: apply clang format +ea116dc0332ccfc5797f248b04492a16f421b787 # Inspection: apply clang format +8d24f0c021a04f19f5463a52e3be1af60fb892f1 # Points: apply clang-formatting +e3de4f217c4f028523adcb5cb566f4d6a7957abe # minor reformat: break lines, one per item +d57d14321b408beef7b115331e2cfa7215f59b8a # Web: Final application of pre-commit +efd11e590d28d72e350b72f02f3f599ef4f704f4 # Test: Final application of pre-commit +217674de04533afb81da0968483dd5a6c4d88667 # Surface: Final application of pre-commit +70e046bbd5a7214b5d5ae8f12da5aed502dc89ab # Start: Final application of pre-commit +db24eeec535f1f43fb3d5b63d24c5171af637880 # RE: Final application of pre-commit +714cb0a309e243cfb035b046dd8cc543ac514cd2 # Points: Final application of pre-commit +7593f0c112198a0cf033a0bcf8d55db4e0a0e3f5 # MeshPart: Final application of pre-commit +b8f8b232cb0882d171cb299e6f6279a516cdd6eb # Inspection: Final application of pre-commit +c5c2ea3498f402c0c89916c46ddb071e22756622 # Assembly: Final application of pre-commit +592c992b863549fde52741fd8830418168387695 # Assembly: Apply pre-commit to Assembly files diff --git a/.github/ISSUE_TEMPLATE/PROBLEM_REPORT.yml b/.github/ISSUE_TEMPLATE/PROBLEM_REPORT.yml index d6baa51307..74c7175746 100644 --- a/.github/ISSUE_TEMPLATE/PROBLEM_REPORT.yml +++ b/.github/ISSUE_TEMPLATE/PROBLEM_REPORT.yml @@ -1,5 +1,5 @@ name: Report a Problem -description: File an problem report +description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report. title: "[Problem] " labels: ["needs triage"] body: @@ -11,6 +11,14 @@ body: options: - label: I have searched the existing issues required: true + - type: textarea + id: description + attributes: + label: Problem description + description: Describe the problem and how it impacts user experience, workflow, maintainability or speed of the code. If the problem appears to be a bug with the current functionality, provide as test case or recipe that reproduces the error. + placeholder: Description of the problem + validations: + required: true - type: textarea id: full_version attributes: @@ -41,14 +49,6 @@ body: - Spreadsheet - Techdraw - Other (specify in description) - - type: textarea - id: description - attributes: - label: Problem description - description: Describe the problem and how it impacts user experience, workflow, maintainability or speed of the code. If the problem appears to be a bug with the current functionality, provide as test case or recipe that reproduces the error. - placeholder: Description of the problem - validations: - required: true - type: textarea id: anything_else attributes: diff --git a/.github/labels.yml b/.github/labels.yml index b5143e1d52..e3f1298dea 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -16,6 +16,9 @@ Addon Manager: WB Arch: - 'src/Mod/Arch/**/*' +WB Assembly: +- 'src/Mod/Assembly/**/*' + WB Draft: - 'src/Mod/Draft/**/*' diff --git a/.github/workflows/actions/windows/getLibpack/action.yml b/.github/workflows/actions/windows/getLibpack/action.yml index 6f2fec56ee..d30e6ba570 100644 --- a/.github/workflows/actions/windows/getLibpack/action.yml +++ b/.github/workflows/actions/windows/getLibpack/action.yml @@ -41,11 +41,11 @@ inputs: libpackdownloadurl: description: "URL where to download libpack" required: false - default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/2.8.2/LibPack-OCC76-V2-8.7z + default: https://github.com/FreeCAD/FreeCAD-LibPack/releases/download/2.10/LibPack-0.21-V2.10.7z libpackname: description: "Libpack name (once downloaded)" required: false - default: LibPack-OCC76-V2 + default: LibPack-0.21-V2.10 runs: using: "composite" diff --git a/.github/workflows/sub_lint.yml b/.github/workflows/sub_lint.yml index 2b85758667..c2c44918df 100644 --- a/.github/workflows/sub_lint.yml +++ b/.github/workflows/sub_lint.yml @@ -129,7 +129,7 @@ on: type: string required: false spellingIgnore: - default: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/ + default: ./.git,*.po,*.ts,*.svg,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL*,./src/WindowsInstaller,./src/Doc/FreeCAD.uml,./build/ type: string required: false codespellFailSilent: @@ -446,6 +446,7 @@ jobs: libvtk7-dev \ libx11-dev \ libxerces-c-dev \ + libyaml-cpp-dev \ libzipios++-dev \ netgen \ netgen-headers \ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d11c3c211..bf5b10a608 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,15 +4,37 @@ # See https://pre-commit.com/hooks.html for more hooks files: | (?x)^( - src/Mod/AddonManager| src/Tools| tests/src| - src/Mod/Sketcher + src/Mod/AddonManager| + src/Mod/Assembly| + src/Mod/Cloud| + src/Mod/Drawing| + src/Mod/Import| + src/Mod/Inspection| + src/Mod/JtReader| + src/Mod/MeshPart| + src/Mod/Plot| + src/Mod/Points| + src/Mod/ReverseEngineering| + src/Mod/Robot| + src/Mod/Show| + src/Mod/Sketcher| + src/Mod/Spreadsheet| + src/Mod/Start| + src/Mod/Surface| + src/Mod/Test| + src/Mod/Tux| + src/Mod/Web ) exclude: | (?x)^( .*vcproj.*| - .*vcxproj.* + .*vcxproj.*| + src/Mod/Import/App/SCL| + src/Mod/Import/App/SCL_output| + src/Mod/Robot/App/kdl_cp| + src/Mod/Robot/Lib ) repos: - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake b/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake index 88081f2467..15ea3f6680 100644 --- a/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake +++ b/cMake/FreeCAD_Helpers/InitializeFreeCADBuildOptions.cmake @@ -118,6 +118,7 @@ macro(InitializeFreeCADBuildOptions) option(BUILD_PART "Build the FreeCAD part module" ON) option(BUILD_PART_DESIGN "Build the FreeCAD part design module" ON) option(BUILD_PATH "Build the FreeCAD path module" ON) + option(BUILD_ASSEMBLY "Build the FreeCAD Assembly module" ON) option(BUILD_PLOT "Build the FreeCAD plot module" ON) option(BUILD_POINTS "Build the FreeCAD points module" ON) option(BUILD_REVERSEENGINEERING "Build the FreeCAD reverse engineering module" ON) diff --git a/package/fedora/freecad.spec b/package/fedora/freecad.spec index 35ac2c00c1..e999244685 100644 --- a/package/fedora/freecad.spec +++ b/package/fedora/freecad.spec @@ -7,7 +7,7 @@ # Maintainers: keep this list of plugins up to date # List plugins in %%{_libdir}/%{name}/lib, less '.so' and 'Gui.so', here -%global plugins Fem FreeCAD PathApp Import Inspection Mesh MeshPart Part Points ReverseEngineering Robot Sketcher Start Web PartDesignGui _PartDesign Path PathGui Spreadsheet SpreadsheetGui area DraftUtils DraftUtils flatmesh libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libSMDS libSMESH libSMESHDS libStdMeshers Measure TechDraw TechDrawGui libarea-native Surface SurfaceGui PathSimulator +%global plugins Fem FreeCAD PathApp Import Inspection Mesh MeshPart Part Points ReverseEngineering Robot Sketcher Start Web PartDesignGui _PartDesign Path PathGui Spreadsheet SpreadsheetGui area DraftUtils DraftUtils libDriver libDriverDAT libDriverSTL libDriverUNV libE57Format libMEFISTO2 libSMDS libSMESH libSMESHDS libStdMeshers Measure TechDraw TechDrawGui libarea-native Surface SurfaceGui AssemblyGui flatmesh QtUnitGui PathSimulator # Some configuration options for other environments @@ -33,7 +33,7 @@ Name: %{name} Epoch: 1 -Version: 0.21 +Version: 0.22 Release: pre_{{{git_commit_no}}}%{?dist} Summary: A general purpose 3D CAD modeler Group: Applications/Engineering @@ -76,7 +76,6 @@ BuildRequires: qt5-qttools-static BuildRequires: qt5-qtxmlpatterns-devel BuildRequires: fmt-devel -BuildRequires: qqc2-desktop-style BuildRequires: xerces-c @@ -181,6 +180,9 @@ rm -rf src/zipios++ # src/Base/Reader.cpp src/Base/Writer.h %endif +# Fix encodings +dos2unix -k src/Mod/Test/unittestgui.py + # Removed bundled libraries @@ -233,6 +235,7 @@ LDFLAGS='-Wl,--as-needed -Wl,--no-undefined'; export LDFLAGS -DPACKAGE_WCREF="%{release} (Git)" \ -DPACKAGE_WCURL="git://github.com/%{github_name}/FreeCAD.git master" \ -DENABLE_DEVELOPER_TESTS=FALSE \ + -DBUILD_GUI=TRUE \ ../ make fc_version @@ -258,6 +261,7 @@ mv %{buildroot}%{_libdir}/%{name}/share/metainfo/* %{buildroot}%{_metainfodir}/ mkdir %{buildroot}%{_datadir}/applications/ mv %{buildroot}%{_libdir}/%{name}/share/applications/* %{buildroot}%{_datadir}/applications/ + mkdir -p %{buildroot}%{_datadir}/thumbnailers/ mv %{buildroot}%{_libdir}/%{name}/share/thumbnailers/* %{buildroot}%{_datadir}/thumbnailers/ @@ -317,7 +321,7 @@ done desktop-file-validate \ %{buildroot}%{_datadir}/applications/org.freecad.FreeCAD.desktop %{?fedora:appstream-util validate-relax --nonet \ - %{buildroot}%{_metainfodir}/*.appdata.xml} + %{buildroot}%{_metainfodir}/*.metainfo.xml} %post diff --git a/requirements.txt b/requirements.txt index 18de7f4f02..42bf9c4acd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ cog==0.6.1 ConfigParser==5.3.0 defusedxml==0.7.1 ifcopenshell==0.7.0.230318 -ladybug==0.0.2 +ladybug-core==0.42.2 matplotlib==3.6.3 numpy==1.24.2 opencamlib==2023.1.11 diff --git a/src/3rdParty/boost.CMakeLists.txt b/src/3rdParty/boost.CMakeLists.txt deleted file mode 100644 index bfdfe32490..0000000000 --- a/src/3rdParty/boost.CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -add_definitions(-DBOOST_ALL_NO_LIB -D_SCL_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_DEPRECATE) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -aux_source_directory(libs/program_options/src BOOST_PROGRAM_OPTIONS_SRCS) -add_library(boost_program_options ${BOOST_PROGRAM_OPTIONS_SRCS}) - -aux_source_directory(libs/regex/src BOOST_REGEX_SRCS) -add_library(boost_regex ${BOOST_REGEX_SRCS}) - -aux_source_directory(libs/signals/src BOOST_SIGNALS_SRCS) -add_library(boost_signals ${BOOST_SIGNALS_SRCS}) - -aux_source_directory(libs/system/src BOOST_SYSTEM_SRCS) -add_library(boost_system ${BOOST_SYSTEM_SRCS}) - -if(BUILD_SHARED_LIBS) - install(TARGETS boost_program_options boost_signals DESTINATION lib) -endif(BUILD_SHARED_LIBS) diff --git a/src/App/DocumentPyImp.cpp b/src/App/DocumentPyImp.cpp index 3f07e7455e..9baa2402cb 100644 --- a/src/App/DocumentPyImp.cpp +++ b/src/App/DocumentPyImp.cpp @@ -66,7 +66,7 @@ PyObject* DocumentPy::addProperty(PyObject *args, PyObject *kwd) // enum support auto* propEnum = dynamic_cast(prop); if (propEnum) { - if (PySequence_Check(enumVals)) { + if (enumVals && PySequence_Check(enumVals)) { std::vector enumValsAsVector; for (Py_ssize_t i = 0; i < PySequence_Length(enumVals); ++i) { enumValsAsVector.emplace_back(PyUnicode_AsUTF8(PySequence_GetItem(enumVals,i))); diff --git a/src/App/MappedName.cpp b/src/App/MappedName.cpp index 17256b32e4..88d326bfa8 100644 --- a/src/App/MappedName.cpp +++ b/src/App/MappedName.cpp @@ -173,7 +173,7 @@ int MappedName::findTagInElementName(long* tagOut, int* lenOut, std::string* pos // next pos // // There maybe other operation codes after this embedded tagOut - // postfixOut, search for the seperator. + // postfixOut, search for the separator. // int end {0}; if (pos == next) { diff --git a/src/App/PropertyExpressionEngine.cpp b/src/App/PropertyExpressionEngine.cpp index 4c3dcc8554..2b46934d44 100644 --- a/src/App/PropertyExpressionEngine.cpp +++ b/src/App/PropertyExpressionEngine.cpp @@ -751,7 +751,7 @@ void PropertyExpressionEngine::getPathsToDocumentObject(DocumentObject* obj, bool PropertyExpressionEngine::depsAreTouched() const { for(auto &v : _Deps) { - // v.second inidcates if it is a hidden reference + // v.second indicates if it is a hidden reference if(!v.second && v.first->isTouched()) return true; } diff --git a/src/App/PropertyGeo.h b/src/App/PropertyGeo.h index 717d22c9e0..c29be90761 100644 --- a/src/App/PropertyGeo.h +++ b/src/App/PropertyGeo.h @@ -249,7 +249,7 @@ class AppExport PropertyMatrix: public Property public: /** * A constructor. - * Intitialises to an identity matrix + * Initialises to an identity matrix */ PropertyMatrix(); diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index b8fcefb5a1..7d39ef055c 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -166,7 +166,7 @@ public: * These all function as per documentation in Enumeration */ //@{ - /** setting the enumaration string list + /** setting the enumeration string list * The list is a NULL terminated array of pointers to a const char* string * \code * const char enums[] = {"Black","White","Other",NULL} @@ -174,7 +174,7 @@ public: */ void setEnums(const char** plEnums); - /** setting the enumaration string as vector of strings + /** setting the enumeration string as vector of strings * This makes the enumeration custom. */ void setEnums(const std::vector &Enums); diff --git a/src/App/Resources/translations/App_ro.ts b/src/App/Resources/translations/App_ro.ts index bd8558806f..0a9da8cb99 100644 --- a/src/App/Resources/translations/App_ro.ts +++ b/src/App/Resources/translations/App_ro.ts @@ -7,7 +7,7 @@ Stores the last user choice of whether to apply CopyOnChange setup to all links that reference the same configurable object - Stochează ultima alegere a utilizatorului de a aplica CopyOnChange setup la toate link-urile + Stochează ultima alegere a utilizatorului de a aplica' copierea la modificare înființat la toate link-urile care fac referire la același obiect configurabil diff --git a/src/Base/Builder3D.cpp b/src/Base/Builder3D.cpp index 391cc2ceb3..e2ab5b4673 100644 --- a/src/Base/Builder3D.cpp +++ b/src/Base/Builder3D.cpp @@ -955,7 +955,8 @@ void InventorBuilder::endSeparator() * A more elaborate description of the constructor. */ Builder3D::Builder3D() - : InventorBuilder(result) + : result{} + , builder{result} { } @@ -1008,6 +1009,21 @@ void Builder3D::saveToFile(const char* FileName) file << result.str(); } +void Builder3D::addNode(const NodeItem& item) +{ + builder.addNode(item); +} + +void Builder3D::beginSeparator() +{ + builder.beginSeparator(); +} + +void Builder3D::endSeparator() +{ + builder.endSeparator(); +} + // ----------------------------------------------------------------------------- template diff --git a/src/Base/Builder3D.h b/src/Base/Builder3D.h index bad25860c0..6ba785d179 100644 --- a/src/Base/Builder3D.h +++ b/src/Base/Builder3D.h @@ -608,7 +608,6 @@ public: * \brief Closes the last added separator node. */ void endSeparator(); - /** @name Appearance handling */ private: void increaseIndent(); @@ -648,11 +647,11 @@ private: * \endcode * \see Base::ConsoleSingleton */ -class BaseExport Builder3D : public InventorBuilder +class BaseExport Builder3D { public: Builder3D(); - ~Builder3D() override; + ~Builder3D(); /// clear the string buffer void clear(); @@ -665,9 +664,24 @@ public: void saveToFile(const char* FileName); //@} + /*! + * \brief addNode + * Writes the content of the added node to the output stream. + */ + void addNode(const NodeItem&); + /*! + * \brief Sets a separator node. + */ + void beginSeparator(); + /*! + * \brief Closes the last added separator node. + */ + void endSeparator(); + private: /// the result string std::stringstream result; + InventorBuilder builder; }; /** diff --git a/src/Base/Persistence.cpp b/src/Base/Persistence.cpp index 7811416208..4e066b5f37 100644 --- a/src/Base/Persistence.cpp +++ b/src/Base/Persistence.cpp @@ -131,7 +131,7 @@ void Persistence::dumpToStream(std::ostream& stream, int compression) writer.putNextEntry("Persistence.xml"); writer.setMode("BinaryBrep"); - //save the content (we need to encapsulte it with xml tags to be able to read single element xmls like happen for properties) + //save the content (we need to encapsulate it with xml tags to be able to read single element xmls like happen for properties) writer.Stream() << "" << std::endl; Save(writer); writer.Stream() << ""; diff --git a/src/Base/PersistencePyImp.cpp b/src/Base/PersistencePyImp.cpp index 25972775e5..ff87a264ed 100644 --- a/src/Base/PersistencePyImp.cpp +++ b/src/Base/PersistencePyImp.cpp @@ -62,7 +62,7 @@ PyObject* PersistencePy::dumpContent(PyObject *args, PyObject *kwds) int compression = 3; static const std::array kwds_def {"Compression", nullptr}; PyErr_Clear(); - if (!Wrapped_ParseTupleAndKeywords(args, kwds, "|i", kwds_def, &compression)) { + if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "|i", kwds_def, &compression)) { return nullptr; } diff --git a/src/Base/Resources/translations/Base_el.ts b/src/Base/Resources/translations/Base_el.ts index 76a65872ee..48d650d5fc 100644 --- a/src/Base/Resources/translations/Base_el.ts +++ b/src/Base/Resources/translations/Base_el.ts @@ -6,52 +6,52 @@ Standard (mm, kg, s, degree) - Standard (mm, kg, s, degree) + Στάνταρ (mm, kg, s, μοίρες) MKS (m, kg, s, degree) - MKS (m, kg, s, degree) + MKS (m, kg, s, μοίρες) US customary (in, lb) - US customary (in, lb) + Μονάδες ΗΠΑ (ίντσες/λίβρες) Imperial decimal (in, lb) - Imperial decimal (in, lb) + Αγγλοσαξονικό Συστήματος Μονάδων (ίντσες/λίβρες) Building Euro (cm, m², m³) - Building Euro (cm, m², m³) + Μονάδες Μέτρησης Ευρώπης (εκατοστά cm,/τετραγωνικά μέτρα cm²/κυβικά μέτρα m³) Building US (ft-in, sqft, cft) - Building US (ft-in, sqft, cft) + Μονάδες Μέτρησης ΗΠΑ (πόδια-ίντσες/τετραγωνικά πόδια/κυβικά πόδια) Metric small parts & CNC(mm, mm/min) - Metric small parts & CNC(mm, mm/min) + Μετρικά μικρά μέρη & CNC(mm, mm/min) Imperial for Civil Eng (ft, ft/sec) - Imperial for Civil Eng (ft, ft/sec) + Αγγλοσαξονικό σύστημά (Πόδια ft, ft/sec) FEM (mm, N, s) - FEM (mm, N, s) + FEM (mm, N, sec) Unknown schema - Unknown schema + Άγνωστο σχήμα diff --git a/src/Base/Resources/translations/Base_id.ts b/src/Base/Resources/translations/Base_id.ts index 9cfbb7dfc3..05e5f04d89 100644 --- a/src/Base/Resources/translations/Base_id.ts +++ b/src/Base/Resources/translations/Base_id.ts @@ -51,7 +51,7 @@ Unknown schema - Unknown schema + Skema tak-dikenal diff --git a/src/Base/Resources/translations/Base_ja.ts b/src/Base/Resources/translations/Base_ja.ts index 6c03c53809..408cece200 100644 --- a/src/Base/Resources/translations/Base_ja.ts +++ b/src/Base/Resources/translations/Base_ja.ts @@ -6,12 +6,12 @@ Standard (mm, kg, s, degree) - Standard (mm, kg, s, degree) + 標準 (mm, kg, s, degree) MKS (m, kg, s, degree) - MKS (m, kg, s, degree) + MKS (m, kg, s, degree) diff --git a/src/FCConfig.h b/src/FCConfig.h index 9ddce84b52..a075b010ea 100644 --- a/src/FCConfig.h +++ b/src/FCConfig.h @@ -51,16 +51,7 @@ # if HAVE_CONFIG_H # include # endif // HAVE_CONFIG_H -//# define HAVE_INT8_T -//# define HAVE_UINT8_T -//# define HAVE_INT16_T -//# define HAVE_UINT16_T -//# define HAVE_INT32_T -//# define HAVE_UINT32_T -//# define HAVE_INT64_T -//# define HAVE_UINT64_T -//# define HAVE_INTPTR_T -//# define HAVE_UINTPTR_T + # endif #elif defined(__MWERKS__) && defined(__INTEL__) # ifndef FC_OS_WIN32 @@ -93,26 +84,7 @@ # define HAVE_INTPTR_T # define HAVE_UINTPTR_T #endif -//#elif defined(sun) || defined(__sun) || defined(__sun__) -//# if defined(__SVR4) -//# define _FC_OS_SOLARIS -//# else -//# define _FC_OS_SUN_ -//# endif -//#elif defined(hpux) || defined(__hpux) || defined(__hpux__) -//# define FC_OS_HPUX_ -//#elif defined(__FreeBSD__) -//# define FC_OS_FREEBSD -//#elif defined(__NetBSD__) -//# define FC_OS_NETBSD -//#elif defined(__OpenBSD__) -//# define FC_OS_OPENBSD -//#elif defined(sgi) || defined(__sgi) -//# define FC_OS_IRIX -//#elif defined(_AIX) -//# define FC_OS_AIX -//#elif defined(__GNU__) -//# define FC_OS_GNU + #else # error "FreeCAD is not ported to this OS yet. For help see www.freecad.org" #endif @@ -203,7 +175,6 @@ typedef unsigned __int64 uint64_t; #ifdef FC_OS_LINUX # define LIN # define LININTEL -//# define NO_CXX_EXCEPTION #endif #define CSFDB @@ -263,14 +234,6 @@ typedef unsigned __int64 uint64_t; # endif #endif -//************************************************************************** -// SoQt -#if defined (FC_OS_WIN32) || defined(FC_OS_CYGWIN) -# ifndef SOQT_DLL -# define SOQT_DLL -# endif -#endif - //************************************************************************** // Quarter #if defined (FC_OS_WIN32) || defined(FC_OS_CYGWIN) @@ -281,15 +244,13 @@ typedef unsigned __int64 uint64_t; # endif #endif -// stops inclusion of the QT 3 header through the SoQT header... -//#define __Qt3All__ - //************************************************************************** // Boost #ifndef BOOST_SIGNALS_NO_DEPRECATION_WARNING #define BOOST_SIGNALS_NO_DEPRECATION_WARNING #endif + //************************************************************************** // Exception handling @@ -314,15 +275,12 @@ typedef unsigned __int64 uint64_t; // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER # pragma warning( disable : 4251 ) -//# pragma warning( disable : 4503 ) -//# pragma warning( disable : 4786 ) // specifier longer then 255 chars -//# pragma warning( disable : 4290 ) // not implemented throw specification # pragma warning( disable : 4996 ) // suppress deprecated warning for e.g. open() #if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) # pragma warning( disable : 4244 ) # pragma warning( disable : 4267 ) #endif -//# define _PreComp_ // use precompiled header + #endif #endif //FC_CONFIG_H diff --git a/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp b/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp index 2ef1c983ff..f6bd8a955f 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp @@ -33,23 +33,22 @@ #include #include -#if QT_VERSION >= 0x050000 - #include "GuiRawInputEventFilter.h" - #undef Bool - #undef CursorShape - #undef Expose - #undef KeyPress - #undef KeyRelease - #undef FocusIn - #undef FocusOut - #undef FontChange - #undef None - #undef Status - #undef Unsorted - #undef False - #undef True - #undef Complex -#endif // #if QT_VERSION >= 0x050000 +#include "GuiRawInputEventFilter.h" +#undef Bool +#undef CursorShape +#undef Expose +#undef KeyPress +#undef KeyRelease +#undef FocusIn +#undef FocusOut +#undef FontChange +#undef None +#undef Status +#undef Unsorted +#undef False +#undef True +#undef Complex + Gui::GuiNativeEvent::GuiNativeEvent(Gui::GUIApplicationNativeEventAware *app) : GuiAbstractNativeEvent(app) @@ -66,26 +65,19 @@ Gui::GuiNativeEvent::~GuiNativeEvent() void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) { -#if QT_VERSION >= 0x050200 if (!QX11Info::isPlatformX11()) { Base::Console().Log("Application is not running on X11\n"); return; } -#endif if (spnav_x11_open(QX11Info::display(), window->winId()) == -1) { Base::Console().Log("Couldn't connect to spacenav daemon on X11. Please ignore if you don't have a spacemouse.\n"); } else { Base::Console().Log("Connected to spacenav daemon on X11\n"); mainApp->setSpaceballPresent(true); - -#if QT_VERSION >= 0x050000 mainApp->installNativeEventFilter(new Gui::RawInputEventFilter(&xcbEventFilter)); -#endif // #if QT_VERSION >= 0x050000 } } -#if QT_VERSION >= 0x050000 - bool Gui::GuiNativeEvent::xcbEventFilter(void *xcb_void, long* result) { Q_UNUSED(result); @@ -151,117 +143,4 @@ bool Gui::GuiNativeEvent::xcbEventFilter(void *xcb_void, long* result) } // end switch (navEvent.type) { } -#else // if QT_VERSION >= 0x050000 - -bool Gui::GuiNativeEvent::x11EventFilter(XEvent *event) -{ - /* - First we check if we have a motion flush event: - - If there are unprocessed motion events we are in a flooding situation. - In that case we wait with generating a Spaceball event. - - A motion event counter of 0 indicates that FreeCAD is ready to process - the event. A Spaceball event, using the saved motion data, is posted. - */ - static Display* display = QX11Info::display(); - static Atom motion_flush_event = XInternAtom(display, "FCMotionFlushEvent", false); - static int nMotionEvents = 0; - - if (event->type == ClientMessage) - { - Atom message_type = event->xclient.message_type; - - if (message_type == motion_flush_event) - { - nMotionEvents--; - if (nMotionEvents == 0) - { - mainApp->postMotionEvent(motionDataArray); - } - - return true; - } // XEvent: motion_flush_event - } // XEvent: ClientMessage - - /* - From here on we deal with spacenav events only: - - motion: The event data is saved and a self addressed flush event - is sent through the window system (XEvent). - In the case of an event flooding, the motion data is added up. - - button: A Spaceball event is posted (QInputEvent). - */ - spnav_event navEvent; - if (!spnav_x11_event(event, &navEvent)) - return false; - - if (navEvent.type == SPNAV_EVENT_MOTION) - { - /* - If the motion data of the preceding event has not been processed - through posting an Spaceball event (flooding situation), - the motion data provided by the incoming event is added to the saved data. - */ - int dx, dy, dz, drx, dry, drz; - - if (nMotionEvents == 0) - { - dx = 0; - dy = 0; - dz = 0; - drx = 0; - dry = 0; - drz = 0; - } - else - { - dx = motionDataArray[0]; - dy = motionDataArray[1]; - dz = motionDataArray[2]; - drx = motionDataArray[3]; - dry = motionDataArray[4]; - drz = motionDataArray[5]; - } - - motionDataArray[0] = -navEvent.motion.x; - motionDataArray[1] = -navEvent.motion.z; - motionDataArray[2] = -navEvent.motion.y; - motionDataArray[3] = -navEvent.motion.rx; - motionDataArray[4] = -navEvent.motion.rz; - motionDataArray[5] = -navEvent.motion.ry; - - motionDataArray[0] += dx; - motionDataArray[1] += dy; - motionDataArray[2] += dz; - motionDataArray[3] += drx; - motionDataArray[4] += dry; - motionDataArray[5] += drz; - - /* - Send a self addressed flush event through the window system. This will - trigger a Spaceball event if FreeCAD is ready to do so. - */ - nMotionEvents++; - XClientMessageEvent flushEvent; - - flushEvent.display = display; - flushEvent.window = event->xclient.window; - flushEvent.type = ClientMessage; - flushEvent.format = 8; - flushEvent.message_type = motion_flush_event; - - XSendEvent (display, flushEvent.window, False, 0, (XEvent*)&flushEvent); // siehe spnavd, False, 0 - - return true; - } - - if (navEvent.type == SPNAV_EVENT_BUTTON) - { - mainApp->postButtonEvent(navEvent.button.bnum, navEvent.button.press); - return true; - } - - Base::Console().Log("Unknown spaceball event\n"); - return true; -} -#endif // if/else QT_VERSION >= 0x050000 - #include "3Dconnexion/moc_GuiNativeEventLinuxX11.cpp" diff --git a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp index 2fcf5df8a6..9029309eda 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp @@ -45,9 +45,7 @@ http://www.3dconnexion.com/forum/viewtopic.php?f=19&t=4968&sid=72c018bdcf0e6edc9 #include #include #include "GuiApplicationNativeEventAware.h" -#if QT_VERSION >= 0x050000 - #include "GuiRawInputEventFilter.h" -#endif // #if QT_VERSION >= 0x050000 +#include "GuiRawInputEventFilter.h" Gui::GuiNativeEvent* Gui::GuiNativeEvent::gMouseInput = 0; @@ -277,12 +275,8 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow *mainWindow) if (InitializeRawInput((HWND)mainWindow->winId())) { gMouseInput = this; -#if QT_VERSION >= 0x050000 qApp->installNativeEventFilter( new Gui::RawInputEventFilter(Gui::GuiNativeEvent::RawInputEventFilter)); -#else - qApp->setEventFilter(Gui::GuiNativeEvent::RawInputEventFilter); -#endif Base::Console().Log("3Dconnexion device initialized.\n"); } else { diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index f2fcd796f9..97d6d96e4e 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1760,6 +1760,7 @@ void setCategoryFilterRules() stream << "qt.qpa.xcb.warning=false\n"; stream << "qt.qpa.mime.warning=false\n"; stream << "qt.svg.warning=false\n"; + stream << "qt.xkb.compose.warning=false\n"; stream.flush(); QLoggingCategory::setFilterRules(filter); } diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index bd08153797..2d42991bda 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -666,6 +666,7 @@ SET(Editor_CPP_SRCS PythonConsole.cpp PythonConsolePy.cpp PythonDebugger.cpp + PythonTracing.cpp PythonEditor.cpp SyntaxHighlighter.cpp TextEdit.cpp @@ -677,6 +678,7 @@ SET(Editor_HPP_SRCS PythonConsole.h PythonConsolePy.h PythonDebugger.h + PythonTracing.h PythonEditor.h SyntaxHighlighter.h TextEdit.h diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 52076fa768..53fb0e33ec 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -1006,6 +1006,36 @@ GroupCommand::GroupCommand(const char *name) :Command(name) {} +bool GroupCommand::isCheckable() const +{ + return checkable; +} + +void GroupCommand::setCheckable(bool on) +{ + checkable = on; +} + +bool GroupCommand::isExclusive() const +{ + return exclusive; +} + +void GroupCommand::setExclusive(bool on) +{ + exclusive = on; +} + +bool GroupCommand::hasDropDownMenu() const +{ + return dropDownMenu; +} + +void GroupCommand::setDropDownMenu(bool on) +{ + dropDownMenu = on; +} + int GroupCommand::addCommand(Command *cmd, bool reg) { cmds.emplace_back(cmd,cmds.size()); if(cmd && reg) @@ -1030,9 +1060,9 @@ Command *GroupCommand::getCommand(int idx) const Action * GroupCommand::createAction() { auto* pcAction = new ActionGroup(this, getMainWindow()); pcAction->setMenuRole(QAction::NoRole); - pcAction->setDropDownMenu(true); - pcAction->setExclusive(false); - pcAction->setCheckable(true); + pcAction->setDropDownMenu(hasDropDownMenu()); + pcAction->setExclusive(isExclusive()); + pcAction->setCheckable(isCheckable()); pcAction->setWhatsThis(QString::fromLatin1(sWhatsThis)); for(auto &v : cmds) { diff --git a/src/Gui/Command.h b/src/Gui/Command.h index f2439d4b80..4a5679a44b 100644 --- a/src/Gui/Command.h +++ b/src/Gui/Command.h @@ -652,6 +652,12 @@ public: Command *getCommand(int idx) const; protected: + bool isCheckable() const; + void setCheckable(bool); + bool isExclusive() const; + void setExclusive(bool); + bool hasDropDownMenu() const; + void setDropDownMenu(bool); void activated(int iMsg) override; Gui::Action * createAction() override; void languageChange() override; @@ -659,6 +665,9 @@ protected: void setup(Action *); protected: + bool checkable = true; + bool exclusive = false; + bool dropDownMenu = true; std::vector > cmds; }; diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index d0eb36a282..feea11b077 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -592,6 +592,47 @@ bool StdCmdDependencyGraph::isActive() return (getActiveGuiDocument() ? true : false); } +//=========================================================================== +// Std_ExportDependencyGraph +//=========================================================================== + +DEF_STD_CMD_A(StdCmdExportDependencyGraph) + +StdCmdExportDependencyGraph::StdCmdExportDependencyGraph() + : Command("Std_ExportDependencyGraph") +{ + sGroup = "Tools"; + sMenuText = QT_TR_NOOP("Export dependency graph..."); + sToolTipText = QT_TR_NOOP("Export the dependency graph to a file"); + sStatusTip = QT_TR_NOOP("Export the dependency graph to a file"); + sWhatsThis = "Std_ExportDependencyGraph"; + eType = 0; + //sPixmap = "Std_ExportDependencyGraph"; +} + +void StdCmdExportDependencyGraph::activated(int iMsg) +{ + Q_UNUSED(iMsg); + App::Document* doc = App::GetApplication().getActiveDocument(); + QString format = QString::fromLatin1("%1 (*.gv)").arg(Gui::GraphvizView::tr("Graphviz format")); + QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), Gui::GraphvizView::tr("Export graph"), QString(), format); + if (!fn.isEmpty()) { + QFile file(fn); + if (file.open(QFile::WriteOnly)) { + std::stringstream str; + doc->exportGraphviz(str); + QByteArray buffer = QByteArray::fromStdString(str.str()); + file.write(buffer); + file.close(); + } + } +} + +bool StdCmdExportDependencyGraph::isActive() +{ + return (getActiveGuiDocument() ? true : false); +} + //=========================================================================== // Std_New //=========================================================================== @@ -1901,6 +1942,7 @@ void CreateDocCommands() rcCmdMgr.addCommand(new StdCmdExport()); rcCmdMgr.addCommand(new StdCmdMergeProjects()); rcCmdMgr.addCommand(new StdCmdDependencyGraph()); + rcCmdMgr.addCommand(new StdCmdExportDependencyGraph()); rcCmdMgr.addCommand(new StdCmdSave()); rcCmdMgr.addCommand(new StdCmdSaveAs()); diff --git a/src/Gui/DlgLocationAngle.ui b/src/Gui/DlgLocationAngle.ui index 0b83bf9942..d63b17bd18 100644 --- a/src/Gui/DlgLocationAngle.ui +++ b/src/Gui/DlgLocationAngle.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/src/Gui/DlgMacroExecuteImp.cpp b/src/Gui/DlgMacroExecuteImp.cpp index 640addab09..3c4abe69c5 100644 --- a/src/Gui/DlgMacroExecuteImp.cpp +++ b/src/Gui/DlgMacroExecuteImp.cpp @@ -44,6 +44,7 @@ #include "Macro.h" #include "MainWindow.h" #include "PythonEditor.h" +#include "WaitCursor.h" using namespace Gui; @@ -80,6 +81,7 @@ DlgMacroExecuteImp::DlgMacroExecuteImp( QWidget* parent, Qt::WindowFlags fl ) , WindowParameter( "Macro" ) , ui(new Ui_DlgMacroExecute) { + watcher = std::make_unique(this); ui->setupUi(this); setupConnections(); @@ -300,6 +302,9 @@ void DlgMacroExecuteImp::accept() QFileInfo fi(dir, item->text(0)); try { + WaitCursor wc; + PythonTracingLocker tracelock(watcher->getTrace()); + getMainWindow()->appendRecentMacro(fi.filePath()); Application::Instance->macroManager()->run(Gui::MacroManager::File, fi.filePath().toUtf8()); // after macro run recalculate the document diff --git a/src/Gui/DlgMacroExecuteImp.h b/src/Gui/DlgMacroExecuteImp.h index e6dbb800fe..88fe36ceb7 100644 --- a/src/Gui/DlgMacroExecuteImp.h +++ b/src/Gui/DlgMacroExecuteImp.h @@ -26,6 +26,7 @@ #include #include +#include "PythonTracing.h" #include "Window.h" class QTreeWidgetItem; @@ -71,6 +72,7 @@ protected: QString macroPath; private: + std::unique_ptr watcher; std::unique_ptr ui; }; diff --git a/src/Gui/EditorView.cpp b/src/Gui/EditorView.cpp index 3fc09cf801..cf031d0f61 100644 --- a/src/Gui/EditorView.cpp +++ b/src/Gui/EditorView.cpp @@ -50,6 +50,8 @@ #include "Macro.h" #include "MainWindow.h" #include "PythonEditor.h" +#include "PythonTracing.h" +#include "WaitCursor.h" #include #include @@ -596,9 +598,13 @@ PythonEditorView::PythonEditorView(PythonEditor* editor, QWidget* parent) { connect(this, &PythonEditorView::changeFileName, editor, &PythonEditor::setFileName); + watcher = new PythonTracingWatcher(this); } -PythonEditorView::~PythonEditorView() = default; +PythonEditorView::~PythonEditorView() +{ + delete watcher; +} /** * Runs the action specified by \a pMsg. @@ -644,6 +650,8 @@ void PythonEditorView::executeScript() if (EditorView::onHasMsg("Save")) EditorView::onMsg("Save", nullptr); try { + WaitCursor wc; + PythonTracingLocker tracelock(watcher->getTrace()); Application::Instance->macroManager()->run(Gui::MacroManager::File,fileName().toUtf8()); } catch (const Base::SystemExitException&) { diff --git a/src/Gui/EditorView.h b/src/Gui/EditorView.h index 3a09321fb0..8546a94397 100644 --- a/src/Gui/EditorView.h +++ b/src/Gui/EditorView.h @@ -41,6 +41,7 @@ namespace Gui { class EditorViewP; class TextEdit; +class PythonTracingWatcher; /** * A special view class which sends the messages from the application to @@ -140,6 +141,7 @@ public Q_SLOTS: private: PythonEditor* _pye; + PythonTracingWatcher* watcher; }; class SearchBar : public QWidget diff --git a/src/Gui/GraphvizView.cpp b/src/Gui/GraphvizView.cpp index 2144365455..5d31e4df32 100644 --- a/src/Gui/GraphvizView.cpp +++ b/src/Gui/GraphvizView.cpp @@ -441,35 +441,45 @@ QByteArray GraphvizView::exportGraph(const QString& format) return dotProc.readAll(); } -bool GraphvizView::onMsg(const char* pMsg,const char**) +bool GraphvizView::onMsg(const char* pMsg, const char**) { if (strcmp("Save",pMsg) == 0 || strcmp("SaveAs",pMsg) == 0) { QList< QPair > formatMap; + formatMap << qMakePair(QString::fromLatin1("%1 (*.gv)").arg(tr("Graphviz format")), QString::fromLatin1("gv")); formatMap << qMakePair(QString::fromLatin1("%1 (*.png)").arg(tr("PNG format")), QString::fromLatin1("png")); formatMap << qMakePair(QString::fromLatin1("%1 (*.bmp)").arg(tr("Bitmap format")), QString::fromLatin1("bmp")); formatMap << qMakePair(QString::fromLatin1("%1 (*.gif)").arg(tr("GIF format")), QString::fromLatin1("gif")); formatMap << qMakePair(QString::fromLatin1("%1 (*.jpg)").arg(tr("JPG format")), QString::fromLatin1("jpg")); formatMap << qMakePair(QString::fromLatin1("%1 (*.svg)").arg(tr("SVG format")), QString::fromLatin1("svg")); formatMap << qMakePair(QString::fromLatin1("%1 (*.pdf)").arg(tr("PDF format")), QString::fromLatin1("pdf")); - //formatMap << qMakePair(tr("VRML format (*.vrml)"), QString::fromLatin1("vrml")); QStringList filter; - for (const auto & it : formatMap) + for (const auto & it : qAsConst(formatMap)) { filter << it.first; + } QString selectedFilter; QString fn = Gui::FileDialog::getSaveFileName(this, tr("Export graph"), QString(), filter.join(QLatin1String(";;")), &selectedFilter); if (!fn.isEmpty()) { QString format; - for (const auto & it : formatMap) { + for (const auto & it : qAsConst(formatMap)) { if (selectedFilter == it.first) { format = it.second; break; } } - QByteArray buffer = exportGraph(format); - if (buffer.isEmpty()) + QByteArray buffer; + if (format == QLatin1String("gv")) { + std::stringstream str; + doc.exportGraphviz(str); + buffer = QByteArray::fromStdString(str.str()); + } + else { + buffer = exportGraph(format); + } + if (buffer.isEmpty()) { return true; + } QFile file(fn); if (file.open(QFile::WriteOnly)) { file.write(buffer); diff --git a/src/Gui/Language/FreeCAD.ts b/src/Gui/Language/FreeCAD.ts index 92786d21bd..2662dae4d2 100644 --- a/src/Gui/Language/FreeCAD.ts +++ b/src/Gui/Language/FreeCAD.ts @@ -3,11 +3,6 @@ Angle - - - Form - - A: @@ -6044,12 +6039,12 @@ Do you want to save your changes? - + Macro file doesn't exist - + No such macro file: '%1' @@ -6108,7 +6103,7 @@ Do you want to save your changes? - Please do not use in a production environment. + Please do not use it in a production environment. @@ -8341,12 +8336,12 @@ Please open a browser window and type in: http://localhost:%1. - + Out of memory - + Not enough memory available to display the data. diff --git a/src/Gui/Language/FreeCAD_be.ts b/src/Gui/Language/FreeCAD_be.ts index c04a921598..42b4d79a65 100644 --- a/src/Gui/Language/FreeCAD_be.ts +++ b/src/Gui/Language/FreeCAD_be.ts @@ -3,11 +3,6 @@ Angle - - - Form - Форма - A: @@ -876,7 +871,7 @@ while doing a left or right click and move the mouse up or down Adjust to view direction - Рэгуляваць напрамак прагляду + Рэгуляваць напрамак выгляду @@ -2788,7 +2783,7 @@ lower right corner within opened files Size of main coordinate system representation in the corner -- in % of height/width of viewport - Памер прадстаўлення асноўнай сістэмы каардынат у куце - у % ад вышыні/шырыні вобласці прагляду + Памер прадстаўлення асноўнай сістэмы каардынат у куце - у % ад вышыні/шырыні вобласці выгляду @@ -2953,7 +2948,7 @@ but slower response to any scene changes. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Памер вяршынь у варштаце Эскізу, Тэхнічным чарцяжы і іншых варштатах @@ -3489,8 +3484,8 @@ A partially loaded document cannot be edited. Double click the document icon in the tree view to fully reload it. Дазваляе ўключыць частковую загрузку знешніх звязаных дакументаў. Тады пры аўтаматычным адкрыцці звязанага дакумента разам з асноўным дакументам будуць загружаныя толькі аб'екты, на якія зададзены спасылкі і іх залежнасці. -Часткова загружаны дакумент не можа быць зменены. Падвоеная пстрычка -па гузіку дакумента ў праглядзе дрэва, цалкам перазагрузіць яго. +Часткова загружаны дакумент не можа быць зменены. +<Падвоеная пстрычка> па гузіку дакумента ў праглядзе дрэва, цалкам перазагрузіць яго. @@ -4048,7 +4043,7 @@ You can also use the form: John Doe <john@doe.com> List the mouse button configs for each chosen navigation setting. Select a set and then press the button to view said configurations. Спіс налад кнопак мышы для кожнай абранай налады навігацыі. -Абярыце набор, потым націсніце кнопку, каб праглядзець названыя наладкі. +Абярыце набор, потым націсніце кнопку, каб паглядзець названыя наладкі. @@ -5474,7 +5469,7 @@ originally selected prior to opening this dialog Combo View - Камбінаваны Прагляд + Камбінаваны прагляд @@ -5600,7 +5595,7 @@ originally selected prior to opening this dialog Selection View - Прагляд абранага + Выгляд абранага @@ -6105,12 +6100,12 @@ Do you want to save your changes? Макрас - + Macro file doesn't exist Файл макраса не існуе - + No such macro file: '%1' Файл макраса адсутнічае: '%1' @@ -6169,8 +6164,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Калі ласка, не ўжывайце ў вытворчым асяроддзі. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6877,7 +6872,7 @@ Do you want to specify another directory? Position - Становішча + Position @@ -7736,7 +7731,7 @@ Do you want to specify another directory? Combo View - Камбінаваны Прагляд + Камбінаваны прагляд @@ -7827,12 +7822,14 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Ваша сістэма працуе пад кіраваннем OpenGL%1.%2. +Для FreeCAD патрабуецца OpenGL версіі 2.0 ці вышэй. +Калі ласка, абновіце ваш графічны драйвер і/ці відэакарту па неабходнасці. Invalid OpenGL Version - Invalid OpenGL Version + Хібная версія OpenGL @@ -8426,12 +8423,12 @@ Please open a browser window and type in: http://localhost:%1. Налады... - + Out of memory Не хапае памяці - + Not enough memory available to display the data. Недастаткова памяці для адлюстравання дадзеных. @@ -11942,7 +11939,7 @@ after FreeCAD launches Sort alphabetically - Sort alphabetically + Парадкаваць па алфавіце @@ -12216,7 +12213,7 @@ after FreeCAD launches Preview: - Папярэдні прагляд: + Папярэдні выгляд: @@ -12550,12 +12547,12 @@ display the splash screen Combo View - Камбінаваны Прагляд + Камбінаваны прагляд TreeView and PropertyView - Прагляд Дрэва і Уласцівасцяў + Прагляд дрэва і ўласцівасцяў @@ -12797,29 +12794,29 @@ from Python console to Report view panel Accent color 1 - Accent color 1 + Асноўны колер 1 Accent color 2 - Accent color 2 + Асноўны колер 2 Accent color 3 - Accent color 3 + Асноўны колер 3 Style sheet (advanced): - Style sheet (advanced): + Стыль інтэрфейсу (пашыраны): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Прымяніць табліцы стыляў Qt уручную з файла .qss . Гэта састарэлы спосаб, які ўжываўся для налады інтэрфейсу. +Цяпер вы можаце ўжываць іх для поўнай налады інтэрфейсу. @@ -12839,13 +12836,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Фільтр выбару Change the Selection filter - Change the Selection filter + Змяніць фільтр выбару @@ -12853,13 +12850,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Выбар вяршыні Select a Vertex/Vertices - Select a Vertex/Vertices + Абраць вяршыню/вяршыні @@ -12867,13 +12864,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Выбар рабра Select Edge(s) - Select Edge(s) + Абраць рэбры @@ -12881,13 +12878,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Выбар грані Select Face(s) - Select Face(s) + Абраць грані @@ -12897,7 +12894,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Усе фільтры выбару ачышчаныя diff --git a/src/Gui/Language/FreeCAD_ca.ts b/src/Gui/Language/FreeCAD_ca.ts index 0854ca90bf..68bb398cc2 100644 --- a/src/Gui/Language/FreeCAD_ca.ts +++ b/src/Gui/Language/FreeCAD_ca.ts @@ -3,11 +3,6 @@ Angle - - - Form - Forma - A: @@ -6104,12 +6099,12 @@ Do you want to save your changes? Macros - + Macro file doesn't exist El fitxer de macro no existeix. - + No such macro file: '%1' No existeix aquest fitxer de macro: '%1' @@ -6168,8 +6163,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8412,12 +8407,12 @@ Please open a browser window and type in: http://localhost:%1. Opcions... - + Out of memory No hi ha prou memòria. - + Not enough memory available to display the data. No hi ha prou memòria disponible per a mostrar les dades. diff --git a/src/Gui/Language/FreeCAD_cs.ts b/src/Gui/Language/FreeCAD_cs.ts index dbfbc633dd..73811b979d 100644 --- a/src/Gui/Language/FreeCAD_cs.ts +++ b/src/Gui/Language/FreeCAD_cs.ts @@ -3,11 +3,6 @@ Angle - - - Form - Návrh - A: @@ -2959,7 +2954,7 @@ ale pomalejší odezvu na jakékoli změny scény. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Velikost vrcholů v Náčrtu, TechDraw a dalších pracovních prostředích @@ -6108,12 +6103,12 @@ Chcete uložit provedené změny? Makra - + Macro file doesn't exist Soubor makra neexistuje - + No such macro file: '%1' Není soubor makra: '%1' @@ -6172,8 +6167,8 @@ Chcete uložit provedené změny? - Please do not use in a production environment. - Nepoužívejte prosím ve výrobním prostředí. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6878,7 +6873,7 @@ Do you want to specify another directory? Position - Pozice + Position @@ -7827,12 +7822,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Tento systém běží na OpenGL %1.%2. FreeCAD vyžaduje OpenGL 2.0 nebo vyšší. Aktualizujte prosím své grafické ovladače a/nebo kartu podle potřeby. Invalid OpenGL Version - Invalid OpenGL Version + Neplatná verze OpenGL @@ -8425,12 +8420,12 @@ Prosím, otevřete okno prohlížeče a zadejte: http://localhost:%1.Možnosti... - + Out of memory Nedostatek paměti - + Not enough memory available to display the data. Není dostatek paměti pro zobrazení dat. @@ -11945,7 +11940,7 @@ po spuštění FreeCADu Sort alphabetically - Sort alphabetically + Seřadit abecedně @@ -12802,29 +12797,29 @@ z Python konzole do panelu Report Accent color 1 - Accent color 1 + Doplňková barva 1 Accent color 2 - Accent color 2 + Doplňková barva 2 Accent color 3 - Accent color 3 + Doplňková barva 3 Style sheet (advanced): - Style sheet (advanced): + Stylový list (pokročilý): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Použít ruční .qss Qt stylové listy. Toto je původní způsob, který byl použit k přizpůsobení rozhraní. +Nyní můžete použít Motiv k úplnému přizpůsobení rozhraní. @@ -12844,13 +12839,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Filtr výběru Change the Selection filter - Change the Selection filter + Změnit filtr výběru @@ -12858,13 +12853,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Výběr vrcholu Select a Vertex/Vertices - Select a Vertex/Vertices + Vybrat vrchol(y) @@ -12872,13 +12867,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Výběr hrany Select Edge(s) - Select Edge(s) + Vybrat hranu/hrany @@ -12886,13 +12881,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Výběr plochy Select Face(s) - Select Face(s) + Vybrat plochu/plochy @@ -12902,7 +12897,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Všechny filtry výběru vymazány diff --git a/src/Gui/Language/FreeCAD_de.ts b/src/Gui/Language/FreeCAD_de.ts index d4f93e7ec8..1d1b94b65b 100644 --- a/src/Gui/Language/FreeCAD_de.ts +++ b/src/Gui/Language/FreeCAD_de.ts @@ -3,11 +3,6 @@ Angle - - - Form - Form - A: @@ -1580,7 +1575,7 @@ same time. The one with the highest priority will be triggered. No Spaceball Present - Kein Spaceball vorhanden + Kein Spaceball gefunden @@ -2079,7 +2074,7 @@ Perhaps a file permission error? Stop - Stop + Beenden @@ -2255,7 +2250,7 @@ Wählen Sie bitte ein anderes Verzeichnis aus. &Close - &Schließen + S&chließen @@ -2640,7 +2635,7 @@ Wählen Sie bitte ein anderes Verzeichnis aus. Link - Verknüpfung + Link @@ -5262,7 +5257,7 @@ The 'Status' column shows whether the document could be recovered. Password: - Passwort: + Kennwort: @@ -5436,7 +5431,7 @@ The 'Status' column shows whether the document could be recovered. All - Alle + Alles @@ -6105,12 +6100,12 @@ Sollen die Änderungen gespeichert werden? Makros - + Macro file doesn't exist Makro-Datei existiert nicht - + No such macro file: '%1' Keine solche Makrodatei: "%1" @@ -6169,8 +6164,8 @@ Sollen die Änderungen gespeichert werden? - Please do not use in a production environment. - Bitte nicht in einer Produktionsumgebung verwenden. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6307,7 +6302,7 @@ How do you want to proceed? &Cancel - &Abbrechen + A&bbrechen @@ -6707,7 +6702,7 @@ Wollen Sie sie beenden, ohne Ihre Daten zu speichern? none - keins + kein @@ -6908,7 +6903,7 @@ Möchten Sie ein anderes Verzeichnis angeben? TextLabel - Textlabel + TextLabel @@ -7847,7 +7842,7 @@ Möchten Sie ein anderes Verzeichnis angeben? Error - Fehler + Fehlermeldungen @@ -8153,7 +8148,7 @@ Wollen Sie fortfahren? Type - Typ + Art @@ -8365,7 +8360,7 @@ Wählen Sie 'Abbrechen' um abzubrechen Clear - Leeren + Löschen @@ -8425,12 +8420,12 @@ Bitte starten Sie einen Browser und geben darin ein: http://localhost:%1.Einstellungen... - + Out of memory Nicht genügend Speicher - + Not enough memory available to display the data. Nicht genügend Speicher verfügbar, um die Daten darstellen zu können. @@ -11941,7 +11936,7 @@ after FreeCAD launches Sort alphabetically - Sort alphabetically + Alphabetisch sortieren @@ -12488,7 +12483,7 @@ display the splash screen Type - Art + Typ @@ -12796,22 +12791,22 @@ Python-Konsole in das Ausgabefenster umgeleitet Accent color 1 - Accent color 1 + Akzentfarbe 1 Accent color 2 - Accent color 2 + Akzentfarbe 2 Accent color 3 - Accent color 3 + Akzentfarbe 3 Style sheet (advanced): - Style sheet (advanced): + Formatvorlage (erweitert): @@ -12838,13 +12833,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Auswahlfilter Change the Selection filter - Change the Selection filter + Auswahlfilter ändern @@ -12852,7 +12847,7 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Knotenauswahl @@ -12866,13 +12861,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Kantenauswahl Select Edge(s) - Select Edge(s) + Kante(n) auswählen @@ -12880,13 +12875,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Flächenauswahl Select Face(s) - Select Face(s) + Fläche(n) auswählen @@ -12896,7 +12891,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Alle Auswahlfilter gelöscht diff --git a/src/Gui/Language/FreeCAD_el.ts b/src/Gui/Language/FreeCAD_el.ts index 6a3ee7e920..880d2ae174 100644 --- a/src/Gui/Language/FreeCAD_el.ts +++ b/src/Gui/Language/FreeCAD_el.ts @@ -3,11 +3,6 @@ Angle - - - Form - Μορφή - A: @@ -6113,12 +6108,12 @@ Do you want to save your changes? Μακροεντολές - + Macro file doesn't exist Το αρχείο μακροεντολής δεν υπάρχει - + No such macro file: '%1' Δεν υπάρχει τέτοιο αρχείο μακροεντολής: '%1' @@ -6177,8 +6172,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -7370,7 +7365,7 @@ Do you want to specify another directory? Show an extra tree view column for item description. The item's description can be set by pressing F2 (or your OS's edit button) or by editing the 'label2' property. - Show an extra tree view column for item description. The item's description can be set by pressing F2 (or your OS's edit button) or by editing the 'label2' property. + Εμφάνιση μιας επιπλέον στήλης προβολής δέντρου για την περιγραφή αντικειμένου. Η περιγραφή του στοιχείου μπορεί να οριστεί πατώντας το F2 (ή το κουμπί επεξεργασίας του OS) ή επεξεργάζοντας την ιδιότητα 'label2'. @@ -7390,12 +7385,12 @@ Do you want to specify another directory? Show items hidden in tree view - Show items hidden in tree view + Εμφάνιση κρυφών αντικειμένων στην προβολή δέντρου Show items that are marked as 'hidden' in the tree view - Show items that are marked as 'hidden' in the tree view + Εμφάνιση αντικειμένων που έχουν επισημανθεί ως 'κρυμμένα' στην προβολή δέντρου @@ -8433,12 +8428,12 @@ Please open a browser window and type in: http://localhost:%1. Επιλογές... - + Out of memory Μνήμη πλήρης - + Not enough memory available to display the data. Δεν υπάρχει αρκετή μνήμη διαθέσιμη για την προβολή των δεδομένων. diff --git a/src/Gui/Language/FreeCAD_es-AR.ts b/src/Gui/Language/FreeCAD_es-AR.ts index 2187033d06..2ff17dcc6b 100644 --- a/src/Gui/Language/FreeCAD_es-AR.ts +++ b/src/Gui/Language/FreeCAD_es-AR.ts @@ -3,11 +3,6 @@ Angle - - - Form - Forma - A: @@ -1172,7 +1167,7 @@ Si no está marcado, entonces la propiedad debe tener un nombre único y se acce Add - Añadir + Agregar @@ -6108,12 +6103,12 @@ Desea guardar los cambios? Macros - + Macro file doesn't exist No existe el archivo de la macro - + No such macro file: '%1' No hay tal archivo macro: '%1' @@ -6172,8 +6167,8 @@ Desea guardar los cambios? - Please do not use in a production environment. - Por favor, no utilizar en un entorno de producción. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6740,7 +6735,7 @@ Do you want to exit without saving your data? Press SHIFT and middle mouse button - Pulse SHIFT y el botón central del ratón + Presione Shift y el botón central del ratón @@ -6957,12 +6952,12 @@ Do you want to specify another directory? Document window: - Ventana del documento: + Ventana de documento: Plot mode: - Modo de ploteo: + Modo Matplot: @@ -6972,7 +6967,7 @@ Do you want to specify another directory? Line width: - Ancho de línea: + Espesor de Línea: @@ -7058,7 +7053,7 @@ Do you want to specify another directory? Press middle mouse button - Pulse el botón central del ratón + Presione el botón central del mouse @@ -7826,12 +7821,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Este sistema está ejecutando OpenGL %1.%2. FreeCAD requiere OpenGL 2.0 o superior. Por favor actualice su controlador gráfico y/o tarjeta de ser necesario. Invalid OpenGL Version - Invalid OpenGL Version + Versión OpenGL inválida @@ -8423,12 +8418,12 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. Opciones... - + Out of memory Memoria insuficiente - + Not enough memory available to display the data. Insuficiente memoria disponible para mostrar los datos. @@ -11941,7 +11936,7 @@ after FreeCAD launches Sort alphabetically - Sort alphabetically + Ordenar alfabéticamente @@ -12794,22 +12789,22 @@ from Python console to Report view panel Accent color 1 - Accent color 1 + Color de acento 1 Accent color 2 - Accent color 2 + Color de acento 2 Accent color 3 - Accent color 3 + Color de acento 3 Style sheet (advanced): - Style sheet (advanced): + Hoja de estilo (avanzado): @@ -12836,13 +12831,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Filtro de selección Change the Selection filter - Change the Selection filter + Cambiar el filtro de selección @@ -12850,13 +12845,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Selección de vértices Select a Vertex/Vertices - Select a Vertex/Vertices + Seleccione un vértice/vértices @@ -12864,13 +12859,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Selección de arista Select Edge(s) - Select Edge(s) + Seleccione arista(s) @@ -12878,13 +12873,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Selección de caras Select Face(s) - Select Face(s) + Seleccione cara(s) @@ -12894,7 +12889,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Todos los filtros de selección eliminados diff --git a/src/Gui/Language/FreeCAD_es-ES.ts b/src/Gui/Language/FreeCAD_es-ES.ts index 716ab15734..53a0b5a89a 100644 --- a/src/Gui/Language/FreeCAD_es-ES.ts +++ b/src/Gui/Language/FreeCAD_es-ES.ts @@ -3,11 +3,6 @@ Angle - - - Form - Formulario - A: @@ -6111,12 +6106,12 @@ Desea guardar los cambios? Macros - + Macro file doesn't exist No existe el archivo de la macro - + No such macro file: '%1' No hay tal archivo macro: '%1' @@ -6175,8 +6170,8 @@ Desea guardar los cambios? - Please do not use in a production environment. - Por favor, no utilizar en un entorno de producción. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -7829,12 +7824,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Este sistema está ejecutando OpenGL %1.%2. FreeCAD requiere OpenGL 2.0 o superior. Por favor actualice su controlador gráfico y/o tarjeta de ser necesario. Invalid OpenGL Version - Invalid OpenGL Version + Versión OpenGL inválida @@ -8426,12 +8421,12 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. Opciones... - + Out of memory Memoria insuficiente - + Not enough memory available to display the data. Insuficiente memoria disponible para mostrar los datos. @@ -11945,7 +11940,7 @@ después de que FreeCAD inicie Sort alphabetically - Sort alphabetically + Ordenar alfabéticamente @@ -12797,22 +12792,22 @@ from Python console to Report view panel Accent color 1 - Accent color 1 + Color de acento 1 Accent color 2 - Accent color 2 + Color de acento 2 Accent color 3 - Accent color 3 + Color de acento 3 Style sheet (advanced): - Style sheet (advanced): + Hoja de estilo (avanzado): @@ -12839,13 +12834,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Filtro de selección Change the Selection filter - Change the Selection filter + Cambiar el filtro de selección @@ -12853,13 +12848,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Selección de vértices Select a Vertex/Vertices - Select a Vertex/Vertices + Seleccione un vértice/vértices @@ -12867,13 +12862,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Selección de arista Select Edge(s) - Select Edge(s) + Seleccione arista(s) @@ -12881,13 +12876,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Selección de caras Select Face(s) - Select Face(s) + Seleccione cara(s) @@ -12897,7 +12892,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Todos los filtros de selección eliminados diff --git a/src/Gui/Language/FreeCAD_eu.ts b/src/Gui/Language/FreeCAD_eu.ts index d93a35b3c7..4602f0812b 100644 --- a/src/Gui/Language/FreeCAD_eu.ts +++ b/src/Gui/Language/FreeCAD_eu.ts @@ -3,11 +3,6 @@ Angle - - - Form - Inprimakia - A: @@ -2961,7 +2956,7 @@ azkarrena eskaintzen du, baina erantzun motelagoa eszena-aldaketetan. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Erpinen tamaina Sketcher, TechDraw eta beste lan-mahaietan @@ -4222,7 +4217,7 @@ Ezarpen honek ez du desgaitzen sagu bidezko inklinazioa. Enable rotation center indication - Enable rotation center indication + Gaitu biraketa-zentroaren adierazlea @@ -5233,7 +5228,7 @@ The 'Status' column shows whether the document could be recovered. Please select 1, 2, or 3 points before clicking this button. A point may be on a vertex, face, or edge. If on a face or edge the point used will be the point at the mouse position along face or edge. If 1 point is selected it will be used as the center of rotation. If 2 points are selected the midpoint between them will be the center of rotation and a new custom axis will be created, if needed. If 3 points are selected the first point becomes the center of rotation and lies on the vector that is normal to the plane defined by the 3 points. Some distance and angle information is provided in the report view, which can be useful when aligning objects. For your convenience when Shift + click is used the appropriate distance or angle is copied to the clipboard. - Hautatu 1, 2 edo 3 puntu botoi hau sakatu baino lehen. Puntuak erpin batean, aurpegi batean edo ertz batean egon daitezke. Aurpegi edo ertz batean badago, erabiliko den puntua saguak aurpegian edo ertzean duen kokapenaren puntua izango da. Puntu bat hautatzen bada, biraketa-zentro gisa erabiliko da. Bi puntu hautatzen badira, bien arteko erdiko puntua izango da biraketa-zentroa eta ardatz pertsonalizatu berria sortuko da, beharrezkoa bada. Hiru puntu hautatzen badira, lehen puntua biraketa-zentroa izango da eta hiru puntuek definitutako planoarekiko normala den bektorean egongo da. Txosten-bistak distantziari eta angeluari buruzko informazioa ematen du. Informazio hori erabilgarria izan daiteke objektuak lerrokatzean. Shift + klik erabiltzen denean, distantzia edo angelu egokia arbelera kopiatuko da. + Hautatu 1, 2 edo 3 puntu botoi hau sakatu baino lehen. Puntuak erpin batean, aurpegi batean edo ertz batean egon daitezke. Aurpegi edo ertz batean badago, erabiliko den puntua saguak aurpegian edo ertzean duen posizioaren puntua izango da. Puntu bat hautatzen bada, biraketa-zentro gisa erabiliko da. Bi puntu hautatzen badira, bien arteko erdiko puntua izango da biraketa-zentroa eta ardatz pertsonalizatu berria sortuko da, beharrezkoa bada. Hiru puntu hautatzen badira, lehen puntua biraketa-zentroa izango da eta hiru puntuek definitutako planoarekiko normala den bektorean egongo da. Txosten-bistak distantziari eta angeluari buruzko informazioa ematen du. Informazio hori erabilgarria izan daiteke objektuak lerrokatzean. Shift + klik erabiltzen denean, distantzia edo angelu egokia arbelera kopiatuko da. @@ -6117,12 +6112,12 @@ Aldaketak gorde nahi dituzu? Makroak - + Macro file doesn't exist Makro-fitxategia ez da existitzen - + No such macro file: '%1' Ez dago makro fitxategi hori: '%1' @@ -6181,8 +6176,8 @@ Aldaketak gorde nahi dituzu? - Please do not use in a production environment. - Ez erabili hau ekoizpen-ingurune batean. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6752,7 +6747,7 @@ Datuak gorde gabe irten nahi duzu? Press SHIFT and middle mouse button - Sakatu Shift eta saguaren erdiko botoia + Sakatu SHIFT eta xaguaren erdiko botoia @@ -7838,12 +7833,12 @@ Beste direktorio bat aukeratu nahi al duzu? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Sistema honek OpenGL %1.%2 bertsioa du. FreeCADek OpenGL 2.0 edo berriagoa behar du. Eguneratu zure txartel grafikoa edo bere kontrolagailua. Invalid OpenGL Version - Invalid OpenGL Version + OpenGL bertsio baliogabea @@ -8437,12 +8432,12 @@ Mesedez, ireki nabigatzaile-leiho bat eta idatzi: http://localhost:%1.Aukerak... - + Out of memory Memoria gutxiegi - + Not enough memory available to display the data. Ez dago nahiko memoriarik datuak bistaratzeko. @@ -10256,7 +10251,7 @@ egindako aldaketak galdu egingo direla. Add or remove a breakpoint at this position - Gehitu edo kendu eten-puntu bat kokaleku honetan + Gehitu edo kendu eten-puntu bat posizio honetan @@ -11735,7 +11730,7 @@ FreeCAD abiarazi ondoren Workbench selector position : - Lan-mahaien hautatzailearen kokalekua : + Lan-mahaien hautatzailearen posizioa : @@ -11955,7 +11950,7 @@ FreeCAD abiarazi ondoren Sort alphabetically - Sort alphabetically + Ordenatu alfabetikoki @@ -12807,41 +12802,41 @@ txosten-bistaren panelera birzuzenduko da This page let you customize your current theme. The offered settings are optional for theme developers so they may or may not have an effect in your current theme. - This page let you customize your current theme. The offered settings are optional for theme developers so they may or may not have an effect in your current theme. + Orri honetan uneko gaia pertsonalizatu daiteke. Eskainitako ezarpenak aukerakoak dira gai-garatzaileentzat eta, beraz, uneko gaian eragina izan dezakete edo ez. Accent color 1 - Accent color 1 + 1. nabarmentze-kolorea Accent color 2 - Accent color 2 + 2. nabarmentze-kolorea Accent color 3 - Accent color 3 + 3. nabarmentze-kolorea Style sheet (advanced): - Style sheet (advanced): + Estilo-orria (aurreratua): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Aplikatu .qss Qt estilo-orriak eskuz. Interfazea pertsonalizatzeko modu zaharra da hori. +Orain gaiak erabili daitezke interfazea osorik pertsonalizatzeko. This color might be used by your theme to let you customize it. - This color might be used by your theme to let you customize it. + Zure gaiak kolore hau erabili dezake pertsonalizaziorako. @@ -12854,13 +12849,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Hautapen-iragazkia Change the Selection filter - Change the Selection filter + Aldatu hautapen-iragazkia @@ -12868,13 +12863,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Erpin-hautapena Select a Vertex/Vertices - Select a Vertex/Vertices + Hautatu erpina/erpinak @@ -12882,13 +12877,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Ertz-hautapena Select Edge(s) - Select Edge(s) + Hautatu ertza(k) @@ -12896,13 +12891,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Aurpegi-hautapena Select Face(s) - Select Face(s) + Hautatu aurpegia(k) @@ -12912,7 +12907,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Hautapen-iragazki guztiak garbitu dira diff --git a/src/Gui/Language/FreeCAD_fi.ts b/src/Gui/Language/FreeCAD_fi.ts index c7f7cfe696..052048ea9f 100644 --- a/src/Gui/Language/FreeCAD_fi.ts +++ b/src/Gui/Language/FreeCAD_fi.ts @@ -3,11 +3,6 @@ Angle - - - Form - Lomake - A: @@ -6115,12 +6110,12 @@ Do you want to save your changes? Makrot - + Macro file doesn't exist Makrotiedostoa ei ole olemassa - + No such macro file: '%1' Ei sellaista makrotiedostoa: '%1' @@ -6179,8 +6174,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8431,12 +8426,12 @@ Please open a browser window and type in: http://localhost:%1. Asetukset... - + Out of memory Muisti loppui - + Not enough memory available to display the data. Muisti ei riitä tietojen näyttämiseen. diff --git a/src/Gui/Language/FreeCAD_fr.ts b/src/Gui/Language/FreeCAD_fr.ts index 24c62b7fe5..f8338aef71 100644 --- a/src/Gui/Language/FreeCAD_fr.ts +++ b/src/Gui/Language/FreeCAD_fr.ts @@ -3,11 +3,6 @@ Angle - - - Form - Forme - A: @@ -418,7 +413,7 @@ Default - Défaut + Par défaut @@ -1579,7 +1574,7 @@ same time. The one with the highest priority will be triggered. No Spaceball Present - Aucune Spaceball présente + Aucun Spaceball trouvé @@ -2952,7 +2947,7 @@ Il y a 3 options disponibles pour y parvenir : Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Taille des sommets dans Sketcher, Techdraw et d'autres ateliers @@ -3710,7 +3705,7 @@ Vous pouvez également utiliser la forme : John Doe <john@doe.com> Alt+S - Alt+S + Alt+M @@ -4020,7 +4015,7 @@ Vous pouvez également utiliser la forme : John Doe <john@doe.com> Default - Par défaut + Défaut @@ -4236,7 +4231,7 @@ L’inclinaison à la souris n’est pas désactivée par ce réglage. Front - Devant + Face @@ -6105,12 +6100,12 @@ Voulez enregistrer les modifications ? Macros - + Macro file doesn't exist Le fichier du macro n'existe pas - + No such macro file: '%1' Fichier du macro inexistant : "%1" @@ -6169,8 +6164,8 @@ Voulez enregistrer les modifications ? - Please do not use in a production environment. - Il est préférable de ne pas l'utiliser en production. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6704,7 +6699,7 @@ Voulez vous quitter sans sauvegarder vos données? none - rien + aucun @@ -6903,7 +6898,7 @@ Do you want to specify another directory? TextLabel - Étiquette de texte + TextLabel @@ -6952,17 +6947,17 @@ Do you want to specify another directory? Document window: - Fenêtre du document : + Fenêtre de document: Plot mode: - Mode de tracé : + Mode de tracé : Point size: - Taille du point : + Taille de point : @@ -6972,7 +6967,7 @@ Do you want to specify another directory? Transparency: - Transparence : + Transparence : @@ -7053,7 +7048,7 @@ Do you want to specify another directory? Press middle mouse button - Appuyer sur la roulette de la souris + Appuyez sur la roulette de la souris @@ -7063,7 +7058,7 @@ Do you want to specify another directory? Scroll middle mouse button - Faites rouler la roulette de la souris + Faites défiler le bouton milieu de la souris @@ -7414,17 +7409,17 @@ Do you want to specify another directory? Rename object - Renommer l’objet + Renommer un objet Finish editing - Finir la modification + Terminer l'édition Finish editing object - Finir la modification de l'objet + Terminer l'édition de l'objet @@ -7750,7 +7745,7 @@ Do you want to specify another directory? Display properties - Afficher les propriétés + Propriétés d'affichage @@ -7771,7 +7766,7 @@ Do you want to specify another directory? Display - Afficher + Affichage @@ -7821,12 +7816,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Ce système utilise OpenGL %1.%2. FreeCAD nécessite OpenGL 2.0 ou supérieur. Veuillez mettre à jour votre pilote graphique et/ou votre carte si nécessaire. Invalid OpenGL Version - Invalid OpenGL Version + Version d'OpenGL non valide @@ -8418,12 +8413,12 @@ Veuillez ouvrir une fenêtre de navigateur et saisir : http://localhost:%1.Options... - + Out of memory Mémoire insuffisante - + Not enough memory available to display the data. Mémoire insuffisante pour afficher les données. @@ -9618,7 +9613,7 @@ apportée à la copie en cours sera perdue. Measure distance - Mesurer la distance + Mesurer une distance @@ -10583,7 +10578,7 @@ apportée à la copie en cours sera perdue. Front - Devant + Face @@ -11250,7 +11245,7 @@ Are you sure you want to continue? As is - Comme actuellement + Par défaut @@ -11940,7 +11935,7 @@ après le lancement de FreeCAD Sort alphabetically - Sort alphabetically + Trier par ordre alphabétique @@ -12797,29 +12792,29 @@ de la console Python vers la Vue rapport Accent color 1 - Accent color 1 + Couleur d'accentuation 1 Accent color 2 - Accent color 2 + Couleur d'accentuation 2 Accent color 3 - Accent color 3 + Couleur d'accentuation 3 Style sheet (advanced): - Style sheet (advanced): + Feuille de style (avancée) : Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Applique manuellement les feuilles de style Qt .qss. C'était l'ancienne manière de personnaliser l'interface. +Vous pouvez désormais utiliser Theme pour une personnalisation complète de l'interface. @@ -12839,13 +12834,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Filtre de sélection Change the Selection filter - Change the Selection filter + Changer le filtre de sélection @@ -12853,13 +12848,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Sélection d'un sommet Select a Vertex/Vertices - Select a Vertex/Vertices + Sélectionner un ou des sommet(s) @@ -12867,13 +12862,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Sélection d'une arête Select Edge(s) - Select Edge(s) + Sélectionner un ou des arête(s) @@ -12881,13 +12876,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Sélection d'une face Select Face(s) - Select Face(s) + Sélectionner une ou des face(s) @@ -12897,7 +12892,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Tous les filtres de sélection ont été effacés diff --git a/src/Gui/Language/FreeCAD_gl.ts b/src/Gui/Language/FreeCAD_gl.ts index 7e6728f718..8b39a010a7 100644 --- a/src/Gui/Language/FreeCAD_gl.ts +++ b/src/Gui/Language/FreeCAD_gl.ts @@ -3,11 +3,6 @@ Angle - - - Form - Formulario - A: @@ -6117,12 +6112,12 @@ Quere gardar os cambios? Macros - + Macro file doesn't exist Non existe o ficheiro da macro - + No such macro file: '%1' Non hai o ficheiro de macro: '%1' @@ -6181,8 +6176,8 @@ Quere gardar os cambios? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8436,12 +8431,12 @@ Por favor, abra un buscador e escriba: http://localhost:%1. Opcións... - + Out of memory Sen memoria - + Not enough memory available to display the data. Non hai memoria dispoñíbel para visualizar os datos. diff --git a/src/Gui/Language/FreeCAD_hr.ts b/src/Gui/Language/FreeCAD_hr.ts index ad59f020aa..31cf8e1ab9 100644 --- a/src/Gui/Language/FreeCAD_hr.ts +++ b/src/Gui/Language/FreeCAD_hr.ts @@ -3,11 +3,6 @@ Angle - - - Form - Obrazac - A: @@ -6147,12 +6142,12 @@ Do you want to save your changes? Makronaredbe - + Macro file doesn't exist Makro datoteke ne postoji - + No such macro file: '%1' Nema takve makronaredbe datoteke: '%1 ' @@ -6213,8 +6208,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8479,12 +8474,12 @@ Please open a browser window and type in: http://localhost:%1. Opcije ... - + Out of memory Bez memorije - + Not enough memory available to display the data. Nema dovoljno dostupne memorije za prikaz podataka. diff --git a/src/Gui/Language/FreeCAD_hu.ts b/src/Gui/Language/FreeCAD_hu.ts index 55eee51bef..9c6e1cd949 100644 --- a/src/Gui/Language/FreeCAD_hu.ts +++ b/src/Gui/Language/FreeCAD_hu.ts @@ -3,11 +3,6 @@ Angle - - - Form - Űrlap - A: @@ -733,7 +728,7 @@ while doing a left or right click and move the mouse up or down License - Licensz + Licenc @@ -2254,7 +2249,7 @@ Kérem válasszon másik könyvtárat. &Close - $Bezárás + Bezárás @@ -6110,12 +6105,12 @@ El akarja menteni a változásokat? Makrók - + Macro file doesn't exist Makró fájl nem létezik - + No such macro file: '%1' Nincs ilyen makró fájl: '%1' @@ -6174,8 +6169,8 @@ El akarja menteni a változásokat? - Please do not use in a production environment. - Kérjük, ne használja éles környezetben. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8429,12 +8424,12 @@ Nyisson meg egy böngészőt, és írja be: http://localhost:%1. Beállítások... - + Out of memory Kevés a memória - + Not enough memory available to display the data. Nincs elég memória az adatok megjelenítéséhez. diff --git a/src/Gui/Language/FreeCAD_id.ts b/src/Gui/Language/FreeCAD_id.ts index b201ece2e4..22bda1ce24 100644 --- a/src/Gui/Language/FreeCAD_id.ts +++ b/src/Gui/Language/FreeCAD_id.ts @@ -3,11 +3,6 @@ Angle - - - Form - Bentuk - A: @@ -6107,12 +6102,12 @@ Do you want to save your changes? Makro - + Macro file doesn't exist File makro tidak ada - + No such macro file: '%1' Tidak ada file makro seperti itu: ' % 1 ' @@ -6171,8 +6166,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8414,12 +8409,12 @@ Please open a browser window and type in: http://localhost:%1. Pilihan... - + Out of memory Kehabisan memori - + Not enough memory available to display the data. Memori tidak cukup tersedia untuk menampilkan data. diff --git a/src/Gui/Language/FreeCAD_it.ts b/src/Gui/Language/FreeCAD_it.ts index 70de7bc63a..1aecec580e 100644 --- a/src/Gui/Language/FreeCAD_it.ts +++ b/src/Gui/Language/FreeCAD_it.ts @@ -3,11 +3,6 @@ Angle - - - Form - Modulo - A: @@ -5463,7 +5458,7 @@ originariamente selezionati prima di aprire questa finestra Dialog - Dialogo + Finestra di dialogo @@ -6111,12 +6106,12 @@ Si desidera salvare le modifiche? Macro - + Macro file doesn't exist Il file di macro non esiste - + No such macro file: '%1' Nessun file macro: '%1' @@ -6175,8 +6170,8 @@ Si desidera salvare le modifiche? - Please do not use in a production environment. - Non utilizzare in un ambiente di produzione. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6913,7 +6908,7 @@ Vuoi specificare un'altra cartella? TextLabel - Etichetta di testo + Etichetta Testo @@ -6962,7 +6957,7 @@ Vuoi specificare un'altra cartella? Document window: - Finestra documento: + Finestra del documento: @@ -8430,12 +8425,12 @@ Aprire una finestra browser e scrivere http://localhost:%1. Opzioni... - + Out of memory Memoria insufficiente - + Not enough memory available to display the data. Memoria disponibile insufficiente per visualizzare i dati. diff --git a/src/Gui/Language/FreeCAD_ja.ts b/src/Gui/Language/FreeCAD_ja.ts index 676a42f283..bee959d532 100644 --- a/src/Gui/Language/FreeCAD_ja.ts +++ b/src/Gui/Language/FreeCAD_ja.ts @@ -3,11 +3,6 @@ Angle - - - Form - フォーム - A: @@ -6086,12 +6081,12 @@ Do you want to save your changes? マクロ - + Macro file doesn't exist マクロファイルが存在しません - + No such macro file: '%1' 以下のマクロファイルは存在しません: '%1' @@ -6150,8 +6145,8 @@ Do you want to save your changes? - Please do not use in a production environment. - 本番環境では使用しないでください。 + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6854,7 +6849,7 @@ Do you want to specify another directory? Position - 位置 + Position @@ -8400,12 +8395,12 @@ Please open a browser window and type in: http://localhost:%1. オプション... - + Out of memory メモリ不足 - + Not enough memory available to display the data. データを表示するのに十分なメモリがありません。 @@ -11914,7 +11909,7 @@ after FreeCAD launches Sort alphabetically - Sort alphabetically + アルファベット順にソート @@ -12761,17 +12756,17 @@ from Python console to Report view panel Accent color 1 - Accent color 1 + アクセントカラー 1 Accent color 2 - Accent color 2 + アクセントカラー 2 Accent color 3 - Accent color 3 + アクセントカラー 3 diff --git a/src/Gui/Language/FreeCAD_ka.ts b/src/Gui/Language/FreeCAD_ka.ts index 2d1baab27c..9df51042ca 100644 --- a/src/Gui/Language/FreeCAD_ka.ts +++ b/src/Gui/Language/FreeCAD_ka.ts @@ -3,11 +3,6 @@ Angle - - - Form - ფორმა - A: @@ -1469,7 +1464,7 @@ same time. The one with the highest priority will be triggered. Move down - ქვემოთ ჩამოწევა + დაწევა @@ -2082,7 +2077,7 @@ Perhaps a file permission error? Stop - შეჩერება + გაჩერება @@ -2258,7 +2253,7 @@ Specify another directory, please. &Close - დაკე&ტვა + დახურვა (&c) @@ -2643,7 +2638,7 @@ Specify another directory, please. Link - ბმული + ბმა @@ -2957,7 +2952,7 @@ but slower response to any scene changes. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + წვეროების ზომა ესკიზის, ტექნიკური ნახაზებისა და სხვა სამუშაო მაგიდებზე @@ -4625,7 +4620,7 @@ The preference system is the one set in the general preferences. Placement - მდებარეობა + განლაგება @@ -5088,7 +5083,7 @@ The 'Status' column shows whether the document could be recovered. Placement - განლაგება + მდებარეობა @@ -5206,12 +5201,12 @@ The 'Status' column shows whether the document could be recovered. Reset - საწყისი მნიშვნელობები + საწყის მნიშვნელობებზე დაბრუნება OK - დიახ + &დიახ @@ -6109,12 +6104,12 @@ Do you want to save your changes? მაკროები - + Macro file doesn't exist მაკროს ფაილი არ არსებობს - + No such macro file: '%1' მაკროს ფაილი %1 არ არსებობს @@ -6173,8 +6168,8 @@ Do you want to save your changes? - Please do not use in a production environment. - არ გამოიყენოთ საწარმოო გარემოში. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6711,7 +6706,7 @@ Do you want to exit without saving your data? none - არა + არცერთი @@ -6744,7 +6739,7 @@ Do you want to exit without saving your data? Press SHIFT and middle mouse button - დააწექით SHIFT + შუა თაგუნას ღილაკს + დააჭირეთ SHIFT-ს და თაგუნის შუა ღილაკს @@ -6881,7 +6876,7 @@ Do you want to specify another directory? Position - მდებარეობა + Position @@ -6912,7 +6907,7 @@ Do you want to specify another directory? TextLabel - ტექსტური ჭდე + ტექსტური წარწერა @@ -6927,7 +6922,7 @@ Do you want to specify another directory? Remove - წაშლა + მოცილება @@ -6966,7 +6961,7 @@ Do you want to specify another directory? Plot mode: - ნახაზის რეჟიმი: + გრაფიკის რეჟიმი: @@ -7062,7 +7057,7 @@ Do you want to specify another directory? Press middle mouse button - დააწექით შუა თაგუნას ღილაკს + დააჭირეთ თაგუნის შუა ღილაკს @@ -7072,7 +7067,7 @@ Do you want to specify another directory? Scroll middle mouse button - დაატრიალეთ შუა თაგუნას ღილაკი + დაატრიალეთ თაგუნის ბორბალი @@ -7080,7 +7075,7 @@ Do you want to specify another directory? Press left mouse button - დააწექით მარცხენა თაგუნას ღილაკს + დააჭირეთ თაგუნის მარცხენა ღილაკს @@ -7418,7 +7413,7 @@ Do you want to specify another directory? Rename - გადარქმევა + სახელის გადარქმევა @@ -7759,7 +7754,7 @@ Do you want to specify another directory? Display properties - თვისებების ჩვენება + ეკრანის პარამეტრები @@ -7780,7 +7775,7 @@ Do you want to specify another directory? Display - ჩვენება + ეკრანი @@ -7830,12 +7825,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + თქვენს სისტემაზე გაშვებული OpenGL-ის ვერსიაა %1.%2. FreeCAD-ს სამუშაოდ OpenGL 2.0 ან უფრო მაღალი სჭირდება. განაახლეთ საჭიროებისამებრ თქვენი ვიდეობარათის დრაივერი ან/და თვითონ ბარათი. Invalid OpenGL Version - Invalid OpenGL Version + არასწორი OpenGL-ის ვერსია @@ -8429,12 +8424,12 @@ Please open a browser window and type in: http://localhost:%1. პარამეტრები... - + Out of memory მეხსიერება აღარ არის - + Not enough memory available to display the data. არ არის საკმარისი მეხსიერება მონაცემთა საჩვენებლად. @@ -11161,7 +11156,7 @@ the current copy will be lost. Fullscreen - მთელ ეკრანზე + მთლიან ეკრანზე ჩვენების რეჟიმი @@ -11519,7 +11514,7 @@ Do you still want to proceed? View - ნახვა + ხედი @@ -11948,7 +11943,7 @@ FreeCAD-ის გაშვების შემდეგ Sort alphabetically - Sort alphabetically + ანბანით დალაგება @@ -12799,29 +12794,29 @@ from Python console to Report view panel Accent color 1 - Accent color 1 + ფერის აქცენტი 1 Accent color 2 - Accent color 2 + ფერის აქცენტი 2 Accent color 3 - Accent color 3 + ფერის აქცენტი 3 Style sheet (advanced): - Style sheet (advanced): + სტილების ცხრილი (დამატებით): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + შეგიძლიათ Qt-ის სტილის ცხრილის .qss ფაილები ხელით გადაატაროთ. ეს ინტერფეისის მორგების მოძველებული მეთოდია. +ახლა ინტერფეისის სრულად მოსარგებად თემა შეგიძლიათ, გამოიყენოთ. @@ -12841,13 +12836,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + მონიშნულის ფილტრი Change the Selection filter - Change the Selection filter + მონიშნულის ფილტრის შეცვლა @@ -12855,13 +12850,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + წვეროს არჩევანი Select a Vertex/Vertices - Select a Vertex/Vertices + აირჩიეთ წვერო/წვეროები @@ -12869,13 +12864,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + წიბოს არჩევანი Select Edge(s) - Select Edge(s) + აირჩიეთ წიბო(ებ)-ი @@ -12883,13 +12878,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + ზედაპირის არჩევანი Select Face(s) - Select Face(s) + აირჩიეთ ზედაპირ(ებ)-ი @@ -12899,7 +12894,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + ყველა მონიშნულის ფილტრი გასუფთავდა diff --git a/src/Gui/Language/FreeCAD_ko.ts b/src/Gui/Language/FreeCAD_ko.ts index fe15d5d711..22b0f06c41 100644 --- a/src/Gui/Language/FreeCAD_ko.ts +++ b/src/Gui/Language/FreeCAD_ko.ts @@ -3,11 +3,6 @@ Angle - - - Form - 양식 - A: @@ -6111,12 +6106,12 @@ Do you want to save your changes? 매크로 - + Macro file doesn't exist 매크로 파일이 없습니다. - + No such macro file: '%1' 해당 매크로 파일이 없습니다: '%1' @@ -6175,8 +6170,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8428,12 +8423,12 @@ Please open a browser window and type in: http://localhost:%1. 옵션... - + Out of memory 메모리 부족 - + Not enough memory available to display the data. 데이터를 화면표시하는 데 사용할 수 있는 메모리가 충분하지 않습니다. diff --git a/src/Gui/Language/FreeCAD_nl.ts b/src/Gui/Language/FreeCAD_nl.ts index c1779e2e06..a8c6956ac5 100644 --- a/src/Gui/Language/FreeCAD_nl.ts +++ b/src/Gui/Language/FreeCAD_nl.ts @@ -3,11 +3,6 @@ Angle - - - Form - Vorm - A: @@ -1457,7 +1452,7 @@ same time. The one with the highest priority will be triggered. Move up - Verplaats naar boven + Naar boven verplaatsen @@ -1467,7 +1462,7 @@ same time. The one with the highest priority will be triggered. Move down - Verplaats naar beneden + Naar beneden verplaatsen @@ -2254,7 +2249,7 @@ Kies een andere map, alstublieft. &Close - &Sluiten + & Sluiten @@ -2952,7 +2947,7 @@ Er zijn 3 opties beschikbaar om dit te bereiken: Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Grootte van de hoekpunten in de werkbanken Sketcher en TechDraw en in andere werkbanken @@ -5193,7 +5188,7 @@ The 'Status' column shows whether the document could be recovered. Reset - Herstellen + Herstel @@ -5328,7 +5323,7 @@ The 'Status' column shows whether the document could be recovered. Global - Globaal + Overal @@ -6094,12 +6089,12 @@ Wilt u uw wijzigingen opslaan? Macro's - + Macro file doesn't exist Macro-bestand bestaat niet - + No such macro file: '%1' Geen dergelijke macro-bestand: '%1' @@ -6158,8 +6153,8 @@ Wilt u uw wijzigingen opslaan? - Please do not use in a production environment. - Alsjeblieft niet gebruiken in een productieomgeving. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6957,7 +6952,7 @@ Wilt u een andere map opgeven? Line width: - Lijnbreedte: + Lijndikte: @@ -7043,7 +7038,7 @@ Wilt u een andere map opgeven? Press middle mouse button - Druk op middelste muisknop + Druk op de middelste muisknop @@ -7409,7 +7404,7 @@ Wilt u een andere map opgeven? Finish editing - Voltooi het bewerken + Bewerken gereed @@ -7740,7 +7735,7 @@ Wilt u een andere map opgeven? Display properties - Eigenschappen weergeven + Weergave eigenschappen @@ -7811,12 +7806,12 @@ Wilt u een andere map opgeven? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Dit systeem draait OpenGL %1.%2. FreeCAD vereist OpenGL 2.0 of hoger. Upgrade uw grafische stuurprogramma en/of grafische kaart indien nodig. Invalid OpenGL Version - Invalid OpenGL Version + Verkeerde OpenGL versie @@ -8408,12 +8403,12 @@ Open een browservenster en typ: http://localhost:%1. Opties... - + Out of memory Onvoldoende geheugen - + Not enough memory available to display the data. Niet genoeg geheugen beschikbaar om de gegevens weer te geven. @@ -10331,7 +10326,7 @@ de huidige kopie verloren gaat. Transform - Transformeer + Transformeren @@ -11137,7 +11132,7 @@ de huidige kopie verloren gaat. Fullscreen - Volledig scherm + Schermvullend @@ -11923,7 +11918,7 @@ nadat FreeCAD opgestart is Sort alphabetically - Sort alphabetically + Alfabetisch sorteren @@ -12777,29 +12772,29 @@ van de Python-console naar het rapportweergavepaneel Accent color 1 - Accent color 1 + Accentkleur 1 Accent color 2 - Accent color 2 + Accentkleur 2 Accent color 3 - Accent color 3 + Accentkleur 3 Style sheet (advanced): - Style sheet (advanced): + Stijlblad (geavanceerd): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Pas handmatig .qss Qt stijlblad toe. Dit is de oude manier die werd gebruikt om de interface aan te passen. +Je kunt nu Thema gebruiken om de interface volledig aan te passen. @@ -12819,13 +12814,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Selectie filter Change the Selection filter - Change the Selection filter + Het selectie filter wijzigen @@ -12833,13 +12828,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Hoekpunt selectie Select a Vertex/Vertices - Select a Vertex/Vertices + Selecteer een hoekpunt/hoekpunten @@ -12847,13 +12842,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Rand selectie Select Edge(s) - Select Edge(s) + Selecteer rand(en) @@ -12861,13 +12856,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Vlak selectie Select Face(s) - Select Face(s) + Selecteer vlak(ken) @@ -12877,7 +12872,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Alle selectie filters uit diff --git a/src/Gui/Language/FreeCAD_pl.ts b/src/Gui/Language/FreeCAD_pl.ts index b734c48c17..fd42ad490a 100644 --- a/src/Gui/Language/FreeCAD_pl.ts +++ b/src/Gui/Language/FreeCAD_pl.ts @@ -3,11 +3,6 @@ Angle - - - Form - Formularz - A: @@ -418,7 +413,7 @@ Default - Domyślny + Domyślnie @@ -1459,7 +1454,7 @@ wyzwolone zostanie to, które ma najwyższy priorytet. Move up - Przesuń w górę + Przenieś wyżej @@ -1469,7 +1464,7 @@ wyzwolone zostanie to, które ma najwyższy priorytet. Move down - Przesuń w dół + Przenieś w dół @@ -2962,7 +2957,7 @@ ale wolniej reaguje na każdą zmianę ujęcia. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Rozmiar wierzchołków w Szkicowniku, Rysunku Technicznym i innych środowiskach pracy @@ -3242,7 +3237,7 @@ będą wyświetlane na szaro Alt+R - Alt + R + Alt+R @@ -3718,7 +3713,7 @@ Możesz również skorzystać z formatki: John Doe <john@doe.com> Alt+S - Alt + S + Alt+S @@ -4028,7 +4023,7 @@ Możesz również skorzystać z formatki: John Doe <john@doe.com> Default - Domyślnie + Domyślny @@ -5210,7 +5205,7 @@ Kolumna "Aktualny status" pokazuje, czy dokument może być odzyskany. Reset - Resetuj + Reset @@ -5345,7 +5340,7 @@ Kolumna "Aktualny status" pokazuje, czy dokument może być odzyskany. Global - Globalnie + Globalne @@ -6112,12 +6107,12 @@ Do you want to save your changes? Makrodefinicje - + Macro file doesn't exist Plik makrodefinicji nie istnieje - + No such macro file: '%1' Nie ma takiego pliku makroinstrukcji: '%1' @@ -6176,8 +6171,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Proszę nie używać w środowisku produkcyjnym. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6910,7 +6905,7 @@ Do you want to specify another directory? TextLabel - Etykieta + Etykieta tekstu @@ -7060,7 +7055,7 @@ Do you want to specify another directory? Press middle mouse button - Naciśnij środkowy przycisk myszki + Wciśnij środkowy przycisk myszki @@ -7078,7 +7073,7 @@ Do you want to specify another directory? Press left mouse button - Naciśnij lewy przycisk myszki + Wciśnij lewy przycisk myszki @@ -7421,17 +7416,17 @@ Do you want to specify another directory? Rename object - Zmień nazwę obiektu + Zmiana nazwy obiektu Finish editing - Zakończ modyfikację + Zakończ edycję Finish editing object - Zakończ modyfikację obiektu + Zakończ edycję obiektu @@ -7829,12 +7824,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + W tym systemie działa OpenGL w wersji %1.%2. FreeCAD wymaga OpenGL 2.0 lub nowszego. W razie potrzeby zaktualizuj sterownik i/lub kartę graficzną. Invalid OpenGL Version - Invalid OpenGL Version + Nieprawidłowa wersja OpenGL @@ -8426,12 +8421,12 @@ Proszę otworzyć okno przeglądarki i wpisać: http://localhost:%1.Opcje ... - + Out of memory Przekroczono limit pamięci - + Not enough memory available to display the data. Za mało dostępnej pamięci, aby wyświetlić dane. @@ -11442,7 +11437,7 @@ Czy nadal chcesz kontynuować? Structure - Struktura + Konstrukcja @@ -11512,7 +11507,7 @@ Czy nadal chcesz kontynuować? Macro - Makrodefinicja + Makrodefinicje @@ -11946,7 +11941,7 @@ po uruchomieniu FreeCAD Sort alphabetically - Sort alphabetically + Sortuj alfabetycznie @@ -12803,29 +12798,29 @@ z konsoli Python do panelu Widoku Raportu Accent color 1 - Accent color 1 + Kolor akcentu 1 Accent color 2 - Accent color 2 + Kolor akcentu 2 Accent color 3 - Accent color 3 + Kolor akcentu 3 Style sheet (advanced): - Style sheet (advanced): + Arkusz stylów (opcje zaawansowane): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Zastosuj samodzielnie arkusze stylów .qss Qt. Jest to starszy sposób, który był używany do dostosowywania interfejsu. +Teraz można użyć motywu, aby uzyskać pełną personalizację interfejsu. @@ -12845,13 +12840,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Filtr wyboru Change the Selection filter - Change the Selection filter + Zmień filtr wyboru @@ -12859,13 +12854,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Wybór wierzchołka Select a Vertex/Vertices - Select a Vertex/Vertices + Wybierz jeden lub kilka wierzchołków @@ -12873,13 +12868,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Wybór krawędzi Select Edge(s) - Select Edge(s) + Wybierz jedną lub kilka krawędzi @@ -12887,13 +12882,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Wybór płaszczyzny Select Face(s) - Select Face(s) + Wybierz płaszczyznę(y) @@ -12903,7 +12898,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Wszystkie filtry zostały wyczyszczone diff --git a/src/Gui/Language/FreeCAD_pt-BR.ts b/src/Gui/Language/FreeCAD_pt-BR.ts index 0605e34b52..5378f46b36 100644 --- a/src/Gui/Language/FreeCAD_pt-BR.ts +++ b/src/Gui/Language/FreeCAD_pt-BR.ts @@ -3,11 +3,6 @@ Angle - - - Form - Formulário - A: @@ -2456,17 +2451,17 @@ Por favor especifique outro diretório. You must restart FreeCAD for changes to take effect. - You must restart FreeCAD for changes to take effect. + Você deve reiniciar o FreeCAD para que as alterações tenham efeito. Restart now - Restart now + Reiniciar agora Restart later - Restart later + Reiniciar mais tarde @@ -2960,7 +2955,7 @@ mas mais lenta para qualquer mudança de cena. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Tamanho dos vértices no esboço, TechDraw e outras bancadas @@ -3120,7 +3115,7 @@ tamanho da caixa delimitadora do objeto 3D que está sendo exibido. Never - Never + Nunca @@ -6107,12 +6102,12 @@ Deseja salvar as alterações? Macros - + Macro file doesn't exist Arquivo de macro não existe - + No such macro file: '%1' Não existe tal arquivo de macro: '%1' @@ -6171,8 +6166,8 @@ Deseja salvar as alterações? - Please do not use in a production environment. - Por favor, não use em ambiente de produção. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -7785,7 +7780,7 @@ Do you want to specify another directory? Python - Python + Python @@ -7828,7 +7823,7 @@ Do you want to specify another directory? Invalid OpenGL Version - Invalid OpenGL Version + Versão OpenGL inválida @@ -8417,12 +8412,12 @@ Please open a browser window and type in: http://localhost:%1. Opções... - + Out of memory Memória insuficiente - + Not enough memory available to display the data. Não há memória suficiente para exibir os dados. @@ -11936,7 +11931,7 @@ after FreeCAD launches Sort alphabetically - Sort alphabetically + Ordenar alfabeticamente @@ -12790,22 +12785,22 @@ do console Python para o painel de Relatórios Accent color 1 - Accent color 1 + Cor de realce 1 Accent color 2 - Accent color 2 + Cor de realce 2 Accent color 3 - Accent color 3 + Cor de destaque Style sheet (advanced): - Style sheet (advanced): + Folha de estilo (avançada): @@ -12832,13 +12827,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Selecionar filtro Change the Selection filter - Change the Selection filter + Alterar o filtro de seleção @@ -12846,7 +12841,7 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Seleção de vértices diff --git a/src/Gui/Language/FreeCAD_pt-PT.ts b/src/Gui/Language/FreeCAD_pt-PT.ts index ad07209faa..eb0ca0e027 100644 --- a/src/Gui/Language/FreeCAD_pt-PT.ts +++ b/src/Gui/Language/FreeCAD_pt-PT.ts @@ -3,11 +3,6 @@ Angle - - - Form - De - A: @@ -6111,12 +6106,12 @@ Deseja guardar as suas alterações? Macros - + Macro file doesn't exist Ficheiro de macro não existe - + No such macro file: '%1' Não existe tal ficheiro de macro: '%1' @@ -6175,8 +6170,8 @@ Deseja guardar as suas alterações? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8426,12 +8421,12 @@ Por favor, abra um navegador e digite: http://localhost:%1. Opções ... - + Out of memory Sem Memória - + Not enough memory available to display the data. Não há memória disponível para visualizar os dados. diff --git a/src/Gui/Language/FreeCAD_ro.ts b/src/Gui/Language/FreeCAD_ro.ts index 312fb2726d..b3c4d0b7eb 100644 --- a/src/Gui/Language/FreeCAD_ro.ts +++ b/src/Gui/Language/FreeCAD_ro.ts @@ -3,11 +3,6 @@ Angle - - - Form - Formular - A: @@ -6110,12 +6105,12 @@ Doriți să salvați modificările? Macro-uri - + Macro file doesn't exist Fișierul macro nu există - + No such macro file: '%1' Fișier macro inexistent: «%1 » @@ -6174,8 +6169,8 @@ Doriți să salvați modificările? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8425,12 +8420,12 @@ Please open a browser window and type in: http://localhost:%1. Opţiuni... - + Out of memory Memorie insuficientă - + Not enough memory available to display the data. Insuficientă memorie disponibilă pentru a afişa datele. diff --git a/src/Gui/Language/FreeCAD_ru.ts b/src/Gui/Language/FreeCAD_ru.ts index 7e350423fd..7715ac9d60 100644 --- a/src/Gui/Language/FreeCAD_ru.ts +++ b/src/Gui/Language/FreeCAD_ru.ts @@ -3,11 +3,6 @@ Angle - - - Form - Форма - A: @@ -1467,7 +1462,7 @@ same time. The one with the highest priority will be triggered. Move down - Переместить вниз + Переместить вниз @@ -2255,7 +2250,7 @@ Specify another directory, please. &Close - &Закрыть + Закрыть @@ -2640,7 +2635,7 @@ Specify another directory, please. Link - Ссылка + Зависимость @@ -2956,7 +2951,7 @@ but slower response to any scene changes. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Размеры вершин в Sketcher, TechDraw и других верстаках @@ -6105,12 +6100,12 @@ Do you want to save your changes? Макрос - + Macro file doesn't exist Файл макроса не существует - + No such macro file: '%1' Нет такого файла макроса: «%1» @@ -6169,8 +6164,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Пожалуйста, не используйте в производственной среде. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6307,7 +6302,7 @@ How do you want to proceed? &Cancel - О&тмена + Отмена @@ -6705,7 +6700,7 @@ Do you want to exit without saving your data? none - отсутствует + Отсутствует @@ -6959,7 +6954,7 @@ Do you want to specify another directory? Plot mode: - Рисовать графики: + Режим графика: @@ -7753,7 +7748,7 @@ Do you want to specify another directory? Display properties - Свойства экрана + Внешний вид @@ -7774,7 +7769,7 @@ Do you want to specify another directory? Display - Экран + Отображение @@ -7824,12 +7819,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + В вашей системе используется OpenGL %1.%2. FreeCAD требует OpenGL 2.0 или выше. Пожалуйста, обновите ваш графический драйвер и/или карту при необходимости. Invalid OpenGL Version - Invalid OpenGL Version + Недопустимая версия OpenGL @@ -7845,7 +7840,7 @@ Do you want to specify another directory? Error - Ошибка + Ошибки @@ -8419,12 +8414,12 @@ Please open a browser window and type in: http://localhost:%1. Параметры... - + Out of memory Недостаточно памяти - + Not enough memory available to display the data. Недостаточно памяти для отображения данных. @@ -9680,7 +9675,7 @@ the current copy will be lost. Help - Справка + Помощь @@ -10346,7 +10341,7 @@ the current copy will be lost. Transform - Преобразовать + Переместить @@ -11152,7 +11147,7 @@ the current copy will be lost. Fullscreen - Полный экран + На весь экран @@ -11490,12 +11485,12 @@ Do you still want to proceed? &Help - &Справка + Справка Help - Помощь + Справка @@ -11505,7 +11500,7 @@ Do you still want to proceed? Macro - Макрокоманда + Макрос @@ -11938,7 +11933,7 @@ after FreeCAD launches Sort alphabetically - Sort alphabetically + Упорядочить по алфавиту @@ -12793,29 +12788,29 @@ from Python console to Report view panel Accent color 1 - Accent color 1 + Цвет акцента 1 Accent color 2 - Accent color 2 + Цвет акцента 2 Accent color 3 - Accent color 3 + Цвет акцента 3 Style sheet (advanced): - Style sheet (advanced): + Таблица стилей (расширенная): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Примените вручную таблицы стилей .qss Qt. Это устаревший способ, который использовался для настройки интерфейса. +Теперь вы можете использовать Theme, чтобы получить полную настройку интерфейса. @@ -12835,13 +12830,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Фильтр выделения Change the Selection filter - Change the Selection filter + Изменить фильтр выбора @@ -12849,13 +12844,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Выбор вершин Select a Vertex/Vertices - Select a Vertex/Vertices + Выбрать вершину/вершины @@ -12863,13 +12858,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Выбор ребер Select Edge(s) - Select Edge(s) + Выбрать ребро/ребра @@ -12877,13 +12872,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Выбор граней Select Face(s) - Select Face(s) + Выбрать грань/грани @@ -12893,7 +12888,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Все фильтры выбора очищены diff --git a/src/Gui/Language/FreeCAD_sl.ts b/src/Gui/Language/FreeCAD_sl.ts index b56d5d46f8..a32e0cc61c 100644 --- a/src/Gui/Language/FreeCAD_sl.ts +++ b/src/Gui/Language/FreeCAD_sl.ts @@ -3,11 +3,6 @@ Angle - - - Form - Oblika - A: @@ -418,7 +413,7 @@ Default - Privzeti + Privzeto @@ -4032,7 +4027,7 @@ Lahko uporabite tudi obliko: Neznanec <ne@znanec.com> Default - Privzeto + Privzeti @@ -5217,7 +5212,7 @@ The 'Status' column shows whether the document could be recovered. OK - V redu + Potrdi @@ -5347,7 +5342,7 @@ The 'Status' column shows whether the document could be recovered. Global - Obče + Splošno @@ -5467,7 +5462,7 @@ izbrani pred odprtjem tega pogovrnega okna Dialog - Pogovorno okno + Pog. okno @@ -6115,12 +6110,12 @@ Ali želite shraniti spremembe? Makri - + Macro file doesn't exist Datoteka makra ne obstaja - + No such macro file: '%1' Ni datoteke makra: '%1' @@ -6179,8 +6174,8 @@ Ali želite shraniti spremembe? - Please do not use in a production environment. - Ne uporabljajte v proizvodnih okoljih. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6717,7 +6712,7 @@ Ali želite končati ne da bi shranili podatke? none - brez + nobeden @@ -6750,7 +6745,7 @@ Ali želite končati ne da bi shranili podatke? Press SHIFT and middle mouse button - Pritisnite PREMAKNI in srednjo miškino tipko + Pritisnite Shift in srednjo miškino tipko @@ -6887,7 +6882,7 @@ Ali želite navesti drugo mapo? Position - Položaj + Position @@ -6977,7 +6972,7 @@ Ali želite navesti drugo mapo? Point size: - Velikost pike: + Velikost točke: @@ -8435,12 +8430,12 @@ Odprite brskalnik in vtipkajte: http://localhost:%1. Možnosti ... - + Out of memory Zmanjkalo je pomnilnika - + Not enough memory available to display the data. Ni dovolj pomnilnika za prikaz podatkov. @@ -11168,7 +11163,7 @@ bodo izgubljene. Fullscreen - Celozaslonsko + Celozaslonski način @@ -12499,7 +12494,7 @@ bo pozdravno okno prikazano Name - Naziv + Ime diff --git a/src/Gui/Language/FreeCAD_sr-CS.ts b/src/Gui/Language/FreeCAD_sr-CS.ts index ba6c578188..b392627080 100644 --- a/src/Gui/Language/FreeCAD_sr-CS.ts +++ b/src/Gui/Language/FreeCAD_sr-CS.ts @@ -3,11 +3,6 @@ Angle - - - Form - Obrazac - A: @@ -2962,7 +2957,7 @@ but slower response to any scene changes. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Veličina tačaka u Sketcher, Techdraw i ostalim radnim okruženjima @@ -6115,12 +6110,12 @@ Da li želiš da sačuvaš promene? Makro-i - + Macro file doesn't exist Makro datoteka ne postoji - + No such macro file: '%1' Nema takve macro datoteke: '%1' @@ -6179,8 +6174,8 @@ Da li želiš da sačuvaš promene? - Please do not use in a production environment. - Nemojte koristiti za profesionalnu upotrebu. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6887,7 +6882,7 @@ Do you want to specify another directory? Position - Položaj + Position @@ -7836,12 +7831,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Ovaj sistem koristi OpenGL %1.%2. FreeCAD zahteva OpenGL 2.0 ili noviji. Nadogradite svoj grafički drajver i/ili karticu po potrebi. Invalid OpenGL Version - Invalid OpenGL Version + Pogrešna OpenGL verzija @@ -8435,12 +8430,12 @@ Otvori pregledač i ukucaj: http://localhost:%1. Opcije... - + Out of memory Nema dovoljno memorije - + Not enough memory available to display the data. Nema dovoljno memorije za prikazivanje podataka. @@ -11955,7 +11950,7 @@ nakon pokretanja FreeCAD-a Sort alphabetically - Sort alphabetically + Sortiraj po abecedi @@ -12808,29 +12803,29 @@ sa Python konzole na tablu za prikaz izveštaja Accent color 1 - Accent color 1 + Naglašena boja 1 Accent color 2 - Accent color 2 + Naglašena boja 2 Accent color 3 - Accent color 3 + Naglašena boja 3 Style sheet (advanced): - Style sheet (advanced): + Stilski list (napredno): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Ručno primenite .qss Qt stilove. Ovo je stari način koji je korišćen za prilagođavanje interfejsa. +Sada možete da koristite i Temu za potpuno prilagođavanje interfejsa. @@ -12850,13 +12845,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Filter izbora Change the Selection filter - Change the Selection filter + Promeni filter izbora @@ -12864,13 +12859,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Izbor temena Select a Vertex/Vertices - Select a Vertex/Vertices + Izaberi teme/temena @@ -12878,13 +12873,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Izbor ivice Select Edge(s) - Select Edge(s) + Izaberi ivicu(ce) @@ -12892,13 +12887,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Izbor stranice Select Face(s) - Select Face(s) + Izaberi stranicu(ce) @@ -12908,7 +12903,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Svi filteri izbora su obrisani diff --git a/src/Gui/Language/FreeCAD_sr.ts b/src/Gui/Language/FreeCAD_sr.ts index dc5cad663f..7a54147c02 100644 --- a/src/Gui/Language/FreeCAD_sr.ts +++ b/src/Gui/Language/FreeCAD_sr.ts @@ -3,11 +3,6 @@ Angle - - - Form - Образац - A: @@ -2962,7 +2957,7 @@ but slower response to any scene changes. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Величина темена у Sketcher, TechDraw и осталим радним окружењима @@ -6115,12 +6110,12 @@ Do you want to save your changes? Макро-и - + Macro file doesn't exist Maкro датотека не постоји - + No such macro file: '%1' Нема такве maкro датотеке: '%1' @@ -6179,8 +6174,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Немојте користити за професионалну употребу. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6887,7 +6882,7 @@ Do you want to specify another directory? Position - Положај + Position @@ -7836,12 +7831,12 @@ Do you want to specify another directory? This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. + Овај систем користи OpenGL %1.%2. FreeCAD захтева OpenGL 2.0 или новији. Надоградите свој графички драјвер и/или картицу по потреби. Invalid OpenGL Version - Invalid OpenGL Version + Погрешна OpenGL верзија @@ -8435,12 +8430,12 @@ Please open a browser window and type in: http://localhost:%1. Опције... - + Out of memory Нема довољно меморије - + Not enough memory available to display the data. Нема довољно меморије за приказивање података. @@ -11955,7 +11950,7 @@ after FreeCAD launches Sort alphabetically - Sort alphabetically + Сортирај по абецеди @@ -12808,29 +12803,29 @@ from Python console to Report view panel Accent color 1 - Accent color 1 + Наглашена боја 1 Accent color 2 - Accent color 2 + Наглашена боја 2 Accent color 3 - Accent color 3 + Наглашена боја 3 Style sheet (advanced): - Style sheet (advanced): + Стилски лист (Напредно): Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Ручно примените .qss Qt стилске листове. Ово је стари начин који је коришћен за прилагођавање интерфејса. +Сада можете да користите и Тему за потпуно прилагођавање интерфејса. @@ -12850,13 +12845,13 @@ You can now use Theme to get a full customization of the interface. Selection filter - Selection filter + Филтер избора Change the Selection filter - Change the Selection filter + Промени филтер избора @@ -12864,13 +12859,13 @@ You can now use Theme to get a full customization of the interface. Vertex Selection - Vertex Selection + Избор темена Select a Vertex/Vertices - Select a Vertex/Vertices + Изабери теме/темена @@ -12878,13 +12873,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Edge Selection + Избор ивице Select Edge(s) - Select Edge(s) + Изабери ивицу(це) @@ -12892,13 +12887,13 @@ You can now use Theme to get a full customization of the interface. Face Selection - Face Selection + Избор странице Select Face(s) - Select Face(s) + Изабери страницу(це) @@ -12908,7 +12903,7 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - All selection filters cleared + Сви филтери избора су обрисани diff --git a/src/Gui/Language/FreeCAD_sv-SE.ts b/src/Gui/Language/FreeCAD_sv-SE.ts index 5bc5bff5d8..1fc437703e 100644 --- a/src/Gui/Language/FreeCAD_sv-SE.ts +++ b/src/Gui/Language/FreeCAD_sv-SE.ts @@ -3,11 +3,6 @@ Angle - - - Form - Form - A: @@ -6113,12 +6108,12 @@ Vill du spara ändringarna? Makron - + Macro file doesn't exist Makrofil existerar inte - + No such macro file: '%1' Ingen sådan macrofil: '%1' @@ -6177,8 +6172,8 @@ Vill du spara ändringarna? - Please do not use in a production environment. - Använd inte i en produktionsmiljö. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8433,12 +8428,12 @@ Please open a browser window and type in: http://localhost:%1. Alternativ... - + Out of memory Slut på minne - + Not enough memory available to display the data. Det finns inte tillräckligt med minne för att visa datan. diff --git a/src/Gui/Language/FreeCAD_tr.ts b/src/Gui/Language/FreeCAD_tr.ts index 1c5cbda67f..0e38a48984 100644 --- a/src/Gui/Language/FreeCAD_tr.ts +++ b/src/Gui/Language/FreeCAD_tr.ts @@ -3,11 +3,6 @@ Angle - - - Form - Şekil: - A: @@ -6115,12 +6110,12 @@ Do you want to save your changes? Makrolar - + Macro file doesn't exist Makro dosyası yok - + No such macro file: '%1' Böyle bir makro dosya: '%1' @@ -6179,8 +6174,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -6886,7 +6881,7 @@ Başka bir dizin belirlemek ister misiniz? Position - Konum + Position @@ -8429,12 +8424,12 @@ Please open a browser window and type in: http://localhost:%1. Seçenekler... - + Out of memory Yetersiz bellek - + Not enough memory available to display the data. Verileri görüntülemek için yetersiz bellek. diff --git a/src/Gui/Language/FreeCAD_uk.ts b/src/Gui/Language/FreeCAD_uk.ts index 69e5539402..88bd2e139d 100644 --- a/src/Gui/Language/FreeCAD_uk.ts +++ b/src/Gui/Language/FreeCAD_uk.ts @@ -3,11 +3,6 @@ Angle - - - Form - Форма - A: @@ -6111,12 +6106,12 @@ Do you want to save your changes? Макроси - + Macro file doesn't exist Файл макросу не існує - + No such macro file: '%1' Немає такого макросу: '%1' @@ -6175,8 +6170,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8428,12 +8423,12 @@ Please open a browser window and type in: http://localhost:%1. Параметри... - + Out of memory Не вистачає памʼяті - + Not enough memory available to display the data. Недостатньо памʼяті для показу даних. diff --git a/src/Gui/Language/FreeCAD_val-ES.ts b/src/Gui/Language/FreeCAD_val-ES.ts index 88000797fa..5e8e22004b 100644 --- a/src/Gui/Language/FreeCAD_val-ES.ts +++ b/src/Gui/Language/FreeCAD_val-ES.ts @@ -3,11 +3,6 @@ Angle - - - Form - Forma - A: @@ -6106,12 +6101,12 @@ Do you want to save your changes? Macros - + Macro file doesn't exist El fitxer de macro no existeix. - + No such macro file: '%1' No existeix aquest fitxer de macro: '%1' @@ -6170,8 +6165,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8413,12 +8408,12 @@ Please open a browser window and type in: http://localhost:%1. Opcions... - + Out of memory No hi ha prou memòria. - + Not enough memory available to display the data. No hi ha prou memòria disponible per a mostrar les dades. diff --git a/src/Gui/Language/FreeCAD_zh-CN.ts b/src/Gui/Language/FreeCAD_zh-CN.ts index d9020755f3..e83f71684b 100644 --- a/src/Gui/Language/FreeCAD_zh-CN.ts +++ b/src/Gui/Language/FreeCAD_zh-CN.ts @@ -3,11 +3,6 @@ Angle - - - Form - 窗体 - A: @@ -6096,12 +6091,12 @@ Do you want to save your changes? - + Macro file doesn't exist 宏文件不存在 - + No such macro file: '%1' 没有这样的宏文件: '%1' @@ -6160,8 +6155,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8408,12 +8403,12 @@ Please open a browser window and type in: http://localhost:%1. 选项... - + Out of memory 内存不足 - + Not enough memory available to display the data. 没有足够的可用内存来显示数据. diff --git a/src/Gui/Language/FreeCAD_zh-TW.ts b/src/Gui/Language/FreeCAD_zh-TW.ts index f86cca0243..816affbc4c 100644 --- a/src/Gui/Language/FreeCAD_zh-TW.ts +++ b/src/Gui/Language/FreeCAD_zh-TW.ts @@ -3,11 +3,6 @@ Angle - - - Form - 格式 - A: @@ -6107,12 +6102,12 @@ Do you want to save your changes? 巨集 - + Macro file doesn't exist 無此巨集 - + No such macro file: '%1' 無 '%1'之巨集 @@ -6171,8 +6166,8 @@ Do you want to save your changes? - Please do not use in a production environment. - Please do not use in a production environment. + Please do not use it in a production environment. + Please do not use it in a production environment. @@ -8411,12 +8406,12 @@ Please open a browser window and type in: http://localhost:%1. 選項 ... - + Out of memory 記憶體不足 - + Not enough memory available to display the data. 沒有足夠的記憶體可用來顯示資料。 diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index b7f5c640cc..fc4d9346d8 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -1714,7 +1714,7 @@ void MainWindow::renderDevBuildWarning( // Construct the lines of text and figure out how much space they need const auto devWarningLine1 = tr("WARNING: This is a development version."); - const auto devWarningLine2 = tr("Please do not use in a production environment."); + const auto devWarningLine2 = tr("Please do not use it in a production environment."); QFontMetrics fontMetrics(painter.font()); // Try to use the existing font int padding = QtTools::horizontalAdvance(fontMetrics, QLatin1String("M")); // Arbitrary int line1Width = QtTools::horizontalAdvance(fontMetrics, devWarningLine1); @@ -1734,7 +1734,7 @@ void MainWindow::renderDevBuildWarning( lineHeight = painter.fontMetrics().lineSpacing(); boxWidth = maxSize.width(); } - constexpr float lineExpansionFactor(2.3); + constexpr float lineExpansionFactor(2.3F); int boxHeight = static_cast(lineHeight*lineExpansionFactor); // Draw the background rectangle and the text diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp index 27cb09f61f..a9ac7fed92 100644 --- a/src/Gui/NaviCube.cpp +++ b/src/Gui/NaviCube.cpp @@ -32,6 +32,7 @@ # else # include # endif +# include # include # include # include @@ -170,8 +171,8 @@ public: double m_BorderWidth = 1.1; bool m_RotateToNearest = true; int m_NaviStepByTurn = 8; - float m_FontZoom = 0.3; - float m_Chamfer = 0.12; + float m_FontZoom = 0.3F; + float m_Chamfer = 0.12F; std::string m_TextFont; int m_FontWeight = 0; int m_FontStretch = 0; @@ -463,9 +464,9 @@ void NaviCubeImplementation::addButtonFace(PickId pickId, const SbVec3f& directi { if (m_Faces[pickId].vertexArray.size()) m_Faces[pickId].vertexArray.clear(); - float scale = 0.005; - float offx = 0.5; - float offy = 0.5; + float scale = 0.005F; + float offx = 0.5F; + float offy = 0.5F; vector pointData; switch (pickId) { @@ -474,19 +475,19 @@ void NaviCubeImplementation::addButtonFace(PickId pickId, const SbVec3f& directi case PickId::ArrowRight: case PickId::ArrowLeft: { pointData = { - 66.6, -66.6,//outer curve - 58.3, -74.0, - 49.2 ,-80.3, - 39.4 ,-85.5, - 29. , -89.5, - 25.3, -78.1,//inner curve - 34.3, -74.3, - 42.8, -69.9, - 50.8, -64.4, - 58.1, -58.1, - 53.8, -53.8,//arrowhead - 74.7, -46.8, - 70.7, -70.4 + 66.6F, -66.6F,//outer curve + 58.3F, -74.0F, + 49.2F ,-80.3F, + 39.4F ,-85.5F, + 29.0F, -89.5F, + 25.3F, -78.1F,//inner curve + 34.3F, -74.3F, + 42.8F, -69.9F, + 50.8F, -64.4F, + 58.1F, -58.1F, + 53.8F, -53.8F,//arrowhead + 74.7F, -46.8F, + 70.7F, -70.4F }; break; } @@ -502,8 +503,8 @@ void NaviCubeImplementation::addButtonFace(PickId pickId, const SbVec3f& directi break; } case PickId::ViewMenu: { - offx = 0.84; - offy = 0.84; + offx = 0.84F; + offy = 0.84F; pointData = { 0., 0.,//top rhombus 15., -6., @@ -627,7 +628,11 @@ void NaviCubeImplementation::setSize(int size) m_Prepared = false; } -void NaviCubeImplementation::prepare() { +void NaviCubeImplementation::prepare() +{ + static const float pi = boost::math::constants::pi(); + static const float pi1_2 = boost::math::constants::half_pi(); + createCubeFaceTextures(); Vector3f x(1, 0, 0); @@ -643,28 +648,28 @@ void NaviCubeImplementation::prepare() { addCubeFace( x,-z, ShapeId::Main, PickId::Bottom); // create corner faces - addCubeFace(-x-y, x-y+z, ShapeId::Corner, PickId::FrontTopRight, M_PI); - addCubeFace(-x+y,-x-y+z, ShapeId::Corner, PickId::FrontTopLeft, M_PI); + addCubeFace(-x-y, x-y+z, ShapeId::Corner, PickId::FrontTopRight, pi); + addCubeFace(-x+y,-x-y+z, ShapeId::Corner, PickId::FrontTopLeft, pi); addCubeFace(x+y, x-y-z, ShapeId::Corner, PickId::FrontBottomRight); addCubeFace(x-y,-x-y-z, ShapeId::Corner, PickId::FrontBottomLeft); - addCubeFace(x-y, x+y+z, ShapeId::Corner, PickId::RearTopRight, M_PI); - addCubeFace(x+y,-x+y+z, ShapeId::Corner, PickId::RearTopLeft, M_PI); + addCubeFace(x-y, x+y+z, ShapeId::Corner, PickId::RearTopRight, pi); + addCubeFace(x+y,-x+y+z, ShapeId::Corner, PickId::RearTopLeft, pi); addCubeFace(-x+y, x+y-z, ShapeId::Corner, PickId::RearBottomRight); addCubeFace(-x-y,-x+y-z, ShapeId::Corner, PickId::RearBottomLeft); // create edge faces addCubeFace(x, z-y, ShapeId::Edge, PickId::FrontTop); addCubeFace(x,-z-y, ShapeId::Edge, PickId::FrontBottom); - addCubeFace(x, y-z, ShapeId::Edge, PickId::RearBottom, M_PI); - addCubeFace(x, y+z, ShapeId::Edge, PickId::RearTop, M_PI); - addCubeFace(z, x+y, ShapeId::Edge, PickId::RearRight, M_PI_2); - addCubeFace(z, x-y, ShapeId::Edge, PickId::FrontRight, M_PI_2); - addCubeFace(z,-x-y, ShapeId::Edge, PickId::FrontLeft, M_PI_2); - addCubeFace(z, y-x, ShapeId::Edge, PickId::RearLeft, M_PI_2); - addCubeFace(y, z-x, ShapeId::Edge, PickId::TopLeft, M_PI); + addCubeFace(x, y-z, ShapeId::Edge, PickId::RearBottom, pi); + addCubeFace(x, y+z, ShapeId::Edge, PickId::RearTop, pi); + addCubeFace(z, x+y, ShapeId::Edge, PickId::RearRight, pi1_2); + addCubeFace(z, x-y, ShapeId::Edge, PickId::FrontRight, pi1_2); + addCubeFace(z,-x-y, ShapeId::Edge, PickId::FrontLeft, pi1_2); + addCubeFace(z, y-x, ShapeId::Edge, PickId::RearLeft, pi1_2); + addCubeFace(y, z-x, ShapeId::Edge, PickId::TopLeft, pi); addCubeFace(y, x+z, ShapeId::Edge, PickId::TopRight); addCubeFace(y, x-z, ShapeId::Edge, PickId::BottomRight); - addCubeFace(y,-z-x, ShapeId::Edge, PickId::BottomLeft, M_PI); + addCubeFace(y,-z-x, ShapeId::Edge, PickId::BottomLeft, pi); // create the flat buttons addButtonFace(PickId::ArrowNorth, SbVec3f(-1, 0, 0)); @@ -785,7 +790,7 @@ void NaviCubeImplementation::drawNaviCube(bool pickMode) SbMatrix mx; mx = cam->orientation.getValue(); mx = mx.inverse(); - mx[3][2] = -5.1; + mx[3][2] = -5.1F; glLoadMatrixf((float*)mx); glEnableClientState(GL_VERTEX_ARRAY); @@ -974,7 +979,10 @@ SbRotation NaviCubeImplementation::getNearestOrientation(PickId pickId) { return intermediateOrientation * rotation; } -bool NaviCubeImplementation::mouseReleased(short x, short y) { +bool NaviCubeImplementation::mouseReleased(short x, short y) +{ + static const float pi = boost::math::constants::pi(); + setHilite(PickId::None); m_MouseDown = false; @@ -1007,7 +1015,7 @@ bool NaviCubeImplementation::mouseReleased(short x, short y) { // Handle the flat buttons SbRotation rotation = m_Faces[pickId].rotation; if (pickId == PickId::DotBackside) { - rotation.scaleAngle(M_PI); + rotation.scaleAngle(pi); } else { rotation.scaleAngle(rotStepAngle); diff --git a/src/Gui/OpenCascadeNavigationStyle.cpp b/src/Gui/OpenCascadeNavigationStyle.cpp index 8c98567d73..63838e6645 100644 --- a/src/Gui/OpenCascadeNavigationStyle.cpp +++ b/src/Gui/OpenCascadeNavigationStyle.cpp @@ -251,6 +251,9 @@ SbBool OpenCascadeNavigationStyle::processSoEvent(const SoEvent * const ev) newmode = NavigationStyle::PANNING; break; case CTRLDOWN|BUTTON2DOWN: + if (newmode != NavigationStyle::DRAGGING) { + saveCursorPosition(ev); + } newmode = NavigationStyle::DRAGGING; break; case BUTTON2DOWN: diff --git a/src/Gui/PreCompiled.h b/src/Gui/PreCompiled.h index 2c06bba847..b50b25f462 100644 --- a/src/Gui/PreCompiled.h +++ b/src/Gui/PreCompiled.h @@ -89,6 +89,7 @@ #include #include #include +#include #include #include diff --git a/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp b/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp index 6e59fad4ca..0734266741 100644 --- a/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp +++ b/src/Gui/PreferencePages/DlgSettingsPythonConsole.cpp @@ -44,6 +44,7 @@ void DlgSettingsPythonConsole::saveSettings() ui->PythonWordWrap->onSave(); ui->PythonBlockCursor->onSave(); ui->PythonSaveHistory->onSave(); + ui->ProfilerInterval->onSave(); } void DlgSettingsPythonConsole::loadSettings() @@ -51,14 +52,15 @@ void DlgSettingsPythonConsole::loadSettings() ui->PythonWordWrap->onRestore(); ui->PythonBlockCursor->onRestore(); ui->PythonSaveHistory->onRestore(); + ui->ProfilerInterval->onRestore(); } -void DlgSettingsPythonConsole::changeEvent(QEvent *e) +void DlgSettingsPythonConsole::changeEvent(QEvent* event) { - if (e->type() == QEvent::LanguageChange) { + if (event->type() == QEvent::LanguageChange) { ui->retranslateUi(this); } - QWidget::changeEvent(e); + QWidget::changeEvent(event); } #include "moc_DlgSettingsPythonConsole.cpp" diff --git a/src/Gui/PreferencePages/DlgSettingsPythonConsole.ui b/src/Gui/PreferencePages/DlgSettingsPythonConsole.ui index e72f80f3cf..b7f2ac20b6 100644 --- a/src/Gui/PreferencePages/DlgSettingsPythonConsole.ui +++ b/src/Gui/PreferencePages/DlgSettingsPythonConsole.ui @@ -78,6 +78,35 @@ horizontal space in Python console + + + + Python profiler interval (milliseconds): + + + + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + + + 0 + + + 5000 + + + 200 + + + ProfilerInterval + + + PythonConsole + + + @@ -102,6 +131,11 @@ horizontal space in Python console QCheckBox
Gui/PrefWidgets.h
+ + Gui::PrefSpinBox + QSpinBox +
Gui/PrefWidgets.h
+
diff --git a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp index 35cfc1c1cd..a45429e7e2 100644 --- a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp +++ b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp @@ -433,7 +433,7 @@ QStringList DlgSettingsWorkbenchesImp::getDisabledWorkbenches() ParameterGrp::handle hGrp; hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Workbenches"); - disabled_wbs = QString::fromStdString(hGrp->GetASCII("Disabled", "NoneWorkbench,TestWorkbench")); + disabled_wbs = QString::fromStdString(hGrp->GetASCII("Disabled", "NoneWorkbench,TestWorkbench,AssemblyWorkbench")); #if QT_VERSION >= QT_VERSION_CHECK(5,15,0) unfiltered_disabled_wbs_list = disabled_wbs.split(QLatin1String(","), Qt::SkipEmptyParts); #else diff --git a/src/Gui/PythonConsole.cpp b/src/Gui/PythonConsole.cpp index 588940fd67..718e79cf73 100644 --- a/src/Gui/PythonConsole.cpp +++ b/src/Gui/PythonConsole.cpp @@ -32,6 +32,7 @@ # include # include # include +# include # include #endif @@ -40,6 +41,7 @@ #include "PythonConsole.h" #include "PythonConsolePy.h" +#include "PythonTracing.h" #include "Application.h" #include "CallTips.h" #include "FileDialog.h" @@ -77,9 +79,8 @@ inline bool cursorBeyond( const QTextCursor &cursor, const QTextCursor &limit, i if (cursor.hasSelection()) { return (cursor.selectionStart() >= pos && cursor.selectionEnd() >= pos); } - else { - return cursor.position() >= (pos + shift); - } + + return cursor.position() >= (pos + shift); } struct PythonConsoleP @@ -87,9 +88,9 @@ struct PythonConsoleP enum Output {Error = 20, Message = 21}; enum CopyType {Normal, History, Command}; CopyType type; - PyObject *_stdoutPy, *_stderrPy, *_stdinPy, *_stdin; - InteractiveInterpreter* interpreter; - CallTipsList* callTipsList; + PyObject *_stdoutPy=nullptr, *_stderrPy=nullptr, *_stdinPy=nullptr, *_stdin=nullptr; + InteractiveInterpreter* interpreter=nullptr; + CallTipsList* callTipsList=nullptr; ConsoleHistory history; QString output, error, info, historyFile; QStringList statements; @@ -99,12 +100,6 @@ struct PythonConsoleP PythonConsoleP() { type = Normal; - _stdoutPy = nullptr; - _stderrPy = nullptr; - _stdinPy = nullptr; - _stdin = nullptr; - interpreter = nullptr; - callTipsList = nullptr; interactive = false; historyFile = QString::fromUtf8((App::Application::getUserAppDataDir() + "PythonHistory.log").c_str()); colormap[QLatin1String("Text")] = qApp->palette().windowText().color(); @@ -123,12 +118,15 @@ struct PythonConsoleP colormap[QLatin1String("Python error")] = Qt::red; } }; + struct InteractiveInterpreterP { - PyObject* interpreter; - PyObject* sysmodule; + PyObject* interpreter{nullptr}; + PyObject* sysmodule{nullptr}; QStringList buffer; + PythonTracing trace; }; + } // namespace Gui InteractiveInterpreter::InteractiveInterpreter() @@ -302,6 +300,16 @@ bool InteractiveInterpreter::runSource(const char* source) const return false; } +bool InteractiveInterpreter::isOccupied() const +{ + return d->trace.isActive(); +} + +bool InteractiveInterpreter::interrupt() const +{ + return d->trace.interrupt(); +} + /* Execute a code object. * * When an exception occurs, a traceback is displayed. @@ -309,6 +317,13 @@ bool InteractiveInterpreter::runSource(const char* source) const */ void InteractiveInterpreter::runCode(PyCodeObject* code) const { + if (isOccupied()) { + return; + } + + d->trace.fetchFromSettings(); + PythonTracingLocker tracelock(d->trace); + Base::PyGILStateLocker lock; PyObject *module, *dict, *presult; /* "exec code in d, d" */ module = PyImport_AddModule("__main__"); /* get module, init python */ @@ -485,6 +500,10 @@ PythonConsole::PythonConsole(QWidget *parent) d->output = d->info; printPrompt(PythonConsole::Complete); loadHistory(); + + flusher = new QTimer(this); + connect(flusher, &QTimer::timeout, this, &PythonConsole::flushOutput); + flusher->start(100); } /** Destroys the object and frees any allocated resources */ @@ -565,6 +584,12 @@ void PythonConsole::keyPressEvent(QKeyEvent * e) QTextCursor cursor = this->textCursor(); QTextCursor inputLineBegin = this->inputBegin(); + if (e->key() == Qt::Key_C && e->modifiers() == Qt::ControlModifier) { + if (d->interpreter->interrupt()) { + return; + } + } + if (!cursorBeyond( cursor, inputLineBegin )) { /** @@ -740,6 +765,15 @@ void PythonConsole::onFlush() printPrompt(PythonConsole::Flush); } +void PythonConsole::flushOutput() +{ + if (d->interpreter->isOccupied()) { + if (d->output.length() > 0 || d->error.length() > 0) { + printPrompt(PythonConsole::Complete); + } + } +} + /** Prints the ps1 prompt (>>> ) for complete and ps2 prompt (... ) for * incomplete commands to the console window. */ @@ -830,6 +864,11 @@ void PythonConsole::runSource(const QString& line) return; } + if (d->interpreter->isOccupied()) { + insertPythonError(QString::fromLatin1("Previous command still running!")); + return; + } + bool incomplete = false; Base::PyGILStateLocker lock; PyObject* default_stdout = PySys_GetObject("stdout"); diff --git a/src/Gui/PythonConsole.h b/src/Gui/PythonConsole.h index 1db269840e..1375334cd5 100644 --- a/src/Gui/PythonConsole.h +++ b/src/Gui/PythonConsole.h @@ -24,6 +24,7 @@ #define GUI_PYTHONCONSOLE_H #include +#include #include "PythonEditor.h" @@ -42,6 +43,9 @@ public: InteractiveInterpreter(); ~InteractiveInterpreter(); + bool isOccupied() const; + bool interrupt() const; + bool push(const char*); int compileCommand(const char*) const; bool hasPendingInput( ) const; @@ -151,6 +155,7 @@ private: void appendOutput(const QString&, int); void loadHistory() const; void saveHistory() const; + void flushOutput(); Q_SIGNALS: void pendingSource( ); @@ -158,13 +163,13 @@ Q_SIGNALS: private: struct PythonConsoleP* d; + PythonConsoleHighlighter* pythonSyntax{nullptr}; + QString *_sourceDrain{nullptr}; + QString _historyFile; + QTimer *flusher{nullptr}; + friend class PythonStdout; friend class PythonStderr; - -private: - PythonConsoleHighlighter* pythonSyntax; - QString *_sourceDrain; - QString _historyFile; }; /** diff --git a/src/Gui/PythonTracing.cpp b/src/Gui/PythonTracing.cpp new file mode 100644 index 0000000000..e6063cdacf --- /dev/null +++ b/src/Gui/PythonTracing.cpp @@ -0,0 +1,198 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2023 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + +#include "PreCompiled.h" +#ifndef _PreComp_ +#include +#include +#include +#include +#endif + +#include "PythonTracing.h" +#include +#include + +using namespace Gui; + +struct PythonTracing::Private +{ + bool active{false}; + int timeout{200}; //NOLINT + + // NOLINTBEGIN + static int profilerInterval; + static bool profilerDisabled; + // NOLINTEND +}; + +// NOLINTBEGIN +int PythonTracing::Private::profilerInterval = 200; +bool PythonTracing::Private::profilerDisabled = false; +// NOLINTEND + +PythonTracing::PythonTracing() + : d{std::make_unique()} +{ +} + +PythonTracing::~PythonTracing() = default; + +bool PythonTracing::isActive() const +{ + return d->active; +} + +void PythonTracing::activate() +{ + d->active = true; + setPythonTraceEnabled(true); +} + +void PythonTracing::deactivate() +{ + d->active = false; + setPythonTraceEnabled(false); +} + +void PythonTracing::fetchFromSettings() +{ + const long defaultTimeout = 200; + + auto parameterGroup = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/PythonConsole"); + int interval = static_cast(parameterGroup->GetInt("ProfilerInterval", defaultTimeout)); + setTimeout(interval); +} + +bool PythonTracing::interrupt() const +{ + if (isActive()) { + PyErr_SetInterrupt(); + return true; + } + + return false; +} + +void PythonTracing::setTimeout(int ms) +{ + d->timeout = ms; +} + +int PythonTracing::timeout() const +{ + return d->timeout; +} + +void PythonTracing::setPythonTraceEnabled(bool enabled) const +{ + Py_tracefunc trace = nullptr; + if (enabled && timeout() > 0) { + Private::profilerInterval = timeout(); + trace = &tracer_callback; + } + else { + Private::profilerDisabled = true; + } + + Base::PyGILStateLocker lock; + PyEval_SetTrace(trace, nullptr); +} + +/* + * This callback ensures that Qt runs its event loop (i.e. updates the GUI, processes keyboard and + * mouse events, etc.) at least every 200 ms, even when there is long-running Python code on the + * main thread. It is registered as the global trace function of the Python environment. + */ +int PythonTracing::tracer_callback(PyObject *obj, PyFrameObject *frame, int what, PyObject *arg) +{ + Q_UNUSED(obj) + Q_UNUSED(frame) + Q_UNUSED(what) + Q_UNUSED(arg) + + static QTime lastCalledTime = QTime::currentTime(); + QTime currTime = QTime::currentTime(); + + // if previous code object was executed + if (Private::profilerDisabled) { + Private::profilerDisabled = false; + lastCalledTime = currTime; + } + + int ms = lastCalledTime.msecsTo(currTime); + + if (ms >= Private::profilerInterval) { + lastCalledTime = currTime; + QGuiApplication::processEvents(); + } + + return 0; +} + +// ------------------------------------------------------------------------------------------------ + +PythonTracingLocker::PythonTracingLocker(PythonTracing& trace) + : trace{trace} +{ + trace.activate(); +} + +PythonTracingLocker::~PythonTracingLocker() +{ + trace.deactivate(); +} + +// ------------------------------------------------------------------------------------------------ + +PythonTracingWatcher::PythonTracingWatcher(QObject* parent) + : QObject(parent) +{ + qApp->installEventFilter(this); +} + +PythonTracingWatcher::~PythonTracingWatcher() +{ + qApp->removeEventFilter(this); +} + +bool PythonTracingWatcher::eventFilter(QObject* object, QEvent* event) +{ + if (event && event->type() == QEvent::ShortcutOverride) { + auto kevent = static_cast(event); + if (kevent->key() == Qt::Key_C && kevent->modifiers() == Qt::ControlModifier) { + if (trace.interrupt()) { + return true; + } + } + } + + return QObject::eventFilter(object, event); +} + +PythonTracing& PythonTracingWatcher::getTrace() +{ + trace.fetchFromSettings(); + return trace; +} diff --git a/src/Gui/PythonTracing.h b/src/Gui/PythonTracing.h new file mode 100644 index 0000000000..0939d2affd --- /dev/null +++ b/src/Gui/PythonTracing.h @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2023 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + +#ifndef GUI_PYTHONTRACING_H +#define GUI_PYTHONTRACING_H + +#include +#include +#include +#include +#include + + +namespace Gui { + +class GuiExport PythonTracing +{ +public: + PythonTracing(); + ~PythonTracing(); + + PythonTracing(const PythonTracing&) = delete; + PythonTracing(PythonTracing&&) = delete; + PythonTracing& operator = (const PythonTracing&) = delete; + PythonTracing& operator = (PythonTracing&&) = delete; + + /*! + * \brief isActive + * Returns true if the tracing is active, false otherwise. + * \return + */ + bool isActive() const; + /*! + * \brief activate + * Activates the Python tracing. + */ + void activate(); + /*! + * \brief deactivate + * Deactivates the Python tracing. + */ + void deactivate(); + /*! + * \brief fetchFromSettings + * Fetch parameters from user settings. + */ + void fetchFromSettings(); + /*! + * \brief interrupt + * If the tracing is enabled it interrupts the Python interpreter. + * True is returned if the tracing is active, false otherwise. + */ + bool interrupt() const; + /*! + * \brief setTimeout + * Sets the interval after which the Qt event loop will be processed. + */ + void setTimeout(int ms); + /*! + * \brief timeout + * \return the timeout of processing the event loop. + */ + int timeout() const; + +private: + void setPythonTraceEnabled(bool enabled) const; + static int tracer_callback(PyObject *obj, PyFrameObject *frame, int what, PyObject *arg); + +private: + struct Private; + std::unique_ptr d; +}; + +class GuiExport PythonTracingLocker +{ +public: + /*! + * \brief PythonTracingLocker + * Activates the passed tracing object. + * \param trace + */ + explicit PythonTracingLocker(PythonTracing& trace); + /*! + * Deactivates the tracing object. + */ + ~PythonTracingLocker(); + + PythonTracingLocker(const PythonTracingLocker&) = delete; + PythonTracingLocker(PythonTracingLocker&&) = delete; + PythonTracingLocker& operator = (const PythonTracingLocker&) = delete; + PythonTracingLocker& operator = (PythonTracingLocker&&) = delete; + +private: + PythonTracing& trace; +}; + +class GuiExport PythonTracingWatcher : public QObject +{ + // NOLINTNEXTLINE + Q_OBJECT + +public: + PythonTracingWatcher(QObject* parent = nullptr); + ~PythonTracingWatcher() override; + /*! + * \brief eventFilter + * Checks for Ctrl+C keyboard events and if pressed interrupts the Python interpreter. + * \param object + * \param event + * \return + */ + bool eventFilter(QObject* object, QEvent* event) override; + + /*! + * \brief getTrace + * Returns the Python tracing object. It's up to the calling instance to activate and decativate it. + * \return PythonTracing + */ + PythonTracing& getTrace(); + + PythonTracingWatcher(const PythonTracingWatcher&) = delete; + PythonTracingWatcher(PythonTracingWatcher&&) = delete; + PythonTracingWatcher& operator = (const PythonTracingWatcher&) = delete; + PythonTracingWatcher& operator = (PythonTracingWatcher&&) = delete; + +private: + PythonTracing trace; +}; + +} // namespace Gui + +#endif // GUI_PYTHONTRACING_H diff --git a/src/Gui/Quarter/Quarter.cpp b/src/Gui/Quarter/Quarter.cpp index 78d10672d1..dee5d1c6e0 100644 --- a/src/Gui/Quarter/Quarter.cpp +++ b/src/Gui/Quarter/Quarter.cpp @@ -121,7 +121,7 @@ \subpage examples */ -// The subsequent doxygen referenced page/subpages do not exis in the copy of Quarter used within FreeCad. +// The subsequent doxygen referenced page/subpages do not exist in the copy of Quarter used within FreeCad. // To preserve the history and their origin the doxygen commands have been disabled but left in the file. // /*! // \page examples More Examples diff --git a/src/Gui/Selection.h b/src/Gui/Selection.h index 32d4dac94b..736ff69149 100644 --- a/src/Gui/Selection.h +++ b/src/Gui/Selection.h @@ -531,10 +531,16 @@ public: */ //@{ /// Return the current selection stack size - int selStackBackSize() const {return _SelStackBack.size();} + std::size_t selStackBackSize() const + { + return _SelStackBack.size(); + } /// Return the current forward selection stack size - int selStackForwardSize() const {return _SelStackForward.size();} + std::size_t selStackForwardSize() const + { + return _SelStackForward.size(); + } /** Obtain selected objects from stack * diff --git a/src/Gui/SelectionFilterPy.cpp b/src/Gui/SelectionFilterPy.cpp index d5d8d630b5..d07ff8ccfc 100644 --- a/src/Gui/SelectionFilterPy.cpp +++ b/src/Gui/SelectionFilterPy.cpp @@ -20,6 +20,7 @@ * * ***************************************************************************/ +#include "PreCompiled.h" #include #include "SelectionFilterPy.h" diff --git a/src/Gui/SoDatumLabel.cpp b/src/Gui/SoDatumLabel.cpp index 86388aaf87..336b377ec7 100644 --- a/src/Gui/SoDatumLabel.cpp +++ b/src/Gui/SoDatumLabel.cpp @@ -140,7 +140,298 @@ void SoDatumLabel::drawImage() Gui::BitmapFactory().convert(image, this->image); } -void SoDatumLabel::computeBBox(SoAction * /*action*/, SbBox3f &box, SbVec3f ¢er) +namespace { +// Helper class to determine the bounding box of a datum label +class DatumLabelBox +{ +public: + DatumLabelBox(float scale, SoDatumLabel* label) + : scale{scale} + , label{label} + { + + } + void computeBBox(SbBox3f& box, SbVec3f& center) const + { + std::vector corners; + if (label->datumtype.getValue() == SoDatumLabel::DISTANCE || + label->datumtype.getValue() == SoDatumLabel::DISTANCEX || + label->datumtype.getValue() == SoDatumLabel::DISTANCEY ) { + corners = computeDistanceBBox(); + } + else if (label->datumtype.getValue() == SoDatumLabel::RADIUS || + label->datumtype.getValue() == SoDatumLabel::DIAMETER) { + corners = computeRadiusDiameterBBox(); + } + else if (label->datumtype.getValue() == SoDatumLabel::ANGLE) { + corners = computeAngleBBox(); + } + else if (label->datumtype.getValue() == SoDatumLabel::SYMMETRIC) { + corners = computeSymmetricBBox(); + } + + getBBox(corners, box, center); + } + +private: + void getBBox(const std::vector& corners, SbBox3f& box, SbVec3f& center) const + { + if (corners.size() > 1) { + float minX = FLT_MAX; + float minY = FLT_MAX; + float maxX = -FLT_MAX; + float maxY = -FLT_MAX; + for (SbVec3f it : corners) { + minX = (it[0] < minX) ? it[0] : minX; + minY = (it[1] < minY) ? it[1] : minY; + maxX = (it[0] > maxX) ? it[0] : maxX; + maxY = (it[1] > maxY) ? it[1] : maxY; + } + + // Store the bounding box + box.setBounds(SbVec3f(minX, minY, 0.0F), SbVec3f (maxX, maxY, 0.0F)); + center = box.getCenter(); + } + } + std::vector computeDistanceBBox() const + { + SbVec2s imgsize; + int nc; + int srcw = 1; + int srch = 1; + + const unsigned char * dataptr = label->image.getValue(imgsize, nc); + if (dataptr) { + srcw = imgsize[0]; + srch = imgsize[1]; + } + + float aspectRatio = (float) srcw / (float) srch; + float imgHeight = scale * (float) (srch); + float imgWidth = aspectRatio * imgHeight; + + // Get the points stored in the pnt field + const SbVec3f *points = label->pnts.getValues(0); + if (label->pnts.getNum() < 2) { + return {}; + } + + SbVec3f textOffset; + + float length = label->param1.getValue(); + float length2 = label->param2.getValue(); + + SbVec3f p1 = points[0]; + SbVec3f p2 = points[1]; + + SbVec3f dir; + SbVec3f normal; + if (label->datumtype.getValue() == SoDatumLabel::DISTANCE) { + dir = (p2-p1); + } + else if (label->datumtype.getValue() == SoDatumLabel::DISTANCEX) { + dir = SbVec3f( (p2[0] - p1[0] >= FLT_EPSILON) ? 1 : -1, 0, 0); + } + else if (label->datumtype.getValue() == SoDatumLabel::DISTANCEY) { + dir = SbVec3f(0, (p2[1] - p1[1] >= FLT_EPSILON) ? 1 : -1, 0); + } + + dir.normalize(); + normal = SbVec3f (-dir[1], dir[0], 0); + + // when the datum line is not parallel to p1-p2 the projection of + // p1-p2 on normal is not zero, p2 is considered as reference and p1 + // is replaced by its projection p1_ + float normproj12 = (p2 - p1).dot(normal); + SbVec3f p1_ = p1 + normproj12 * normal; + + SbVec3f midpos = (p1_ + p2)/2; + + float offset1 = ((length + normproj12 < 0.0F) ? -1.0F : 1.0F) * float(srch); + float offset2 = ((length < 0.0F) ? -1.0F : 1.0F) * float(srch); + + textOffset = midpos + normal * length + dir * length2; + float margin = imgHeight / 4.0F; + + SbVec3f perp1 = p1_ + normal * (length + offset1 * scale); + SbVec3f perp2 = p2 + normal * (length + offset2 * scale); + + // Finds the mins and maxes + std::vector corners; + corners.push_back(p1); + corners.push_back(p2); + corners.push_back(perp1); + corners.push_back(perp2); + + // Make sure that the label is inside the bounding box + corners.push_back(textOffset + dir * (imgWidth / 2.0F + margin) + normal * (srch + margin)); + corners.push_back(textOffset - dir * (imgWidth / 2.0F + margin) + normal * (srch + margin)); + corners.push_back(textOffset + dir * (imgWidth / 2.0F + margin) - normal * margin); + corners.push_back(textOffset - dir * (imgWidth / 2.0F + margin) - normal * margin); + + return corners; + } + + std::vector computeRadiusDiameterBBox() const + { + SbVec2s imgsize; + int nc; + int srcw = 1; + int srch = 1; + + const unsigned char * dataptr = label->image.getValue(imgsize, nc); + if (dataptr) { + srcw = imgsize[0]; + srch = imgsize[1]; + } + + float aspectRatio = (float) srcw / (float) srch; + float imgHeight = scale * (float) (srch); + float imgWidth = aspectRatio * imgHeight; + + // Get the points stored in the pnt field + const SbVec3f *points = label->pnts.getValues(0); + if (label->pnts.getNum() < 2) { + return {}; + } + + // Get the Points + SbVec3f p1 = points[0]; + SbVec3f p2 = points[1]; + + SbVec3f dir = p2 - p1; + dir.normalize(); + SbVec3f normal (-dir[1], dir[0], 0); + + float length = label->param1.getValue(); + SbVec3f pos = p2 + length*dir; + + float margin = imgHeight / 4.0F; + + SbVec3f p3 = pos + dir * (imgWidth / 2.0F + margin); + if ((p3-p1).length() > (p2-p1).length()) { + p2 = p3; + } + + // Calculate the points + SbVec3f pnt1 = pos - dir * (margin + imgWidth / 2.0F); + SbVec3f pnt2 = pos + dir * (margin + imgWidth / 2.0F); + + // Finds the mins and maxes + std::vector corners; + corners.push_back(p1); + corners.push_back(p2); + corners.push_back(pnt1); + corners.push_back(pnt2); + + return corners; + } + + std::vector computeAngleBBox() const + { + SbVec2s imgsize; + int nc; + int srcw = 1; + int srch = 1; + + const unsigned char * dataptr = label->image.getValue(imgsize, nc); + if (dataptr) { + srcw = imgsize[0]; + srch = imgsize[1]; + } + + float aspectRatio = (float) srcw / (float) srch; + float imgHeight = scale * (float) (srch); + float imgWidth = aspectRatio * imgHeight; + + // Get the points stored in the pnt field + const SbVec3f *points = label->pnts.getValues(0); + if (label->pnts.getNum() < 1) { + return {}; + } + + // Only the angle intersection point is needed + SbVec3f p0 = points[0]; + + // Load the Parameters + float length = label->param1.getValue(); + float startangle = label->param2.getValue(); + float range = label->param3.getValue(); + float endangle = startangle + range; + + + float len2 = 2.0F * length; + + // Useful Information + // v0 - vector for text position + // p0 - vector for angle intersect + SbVec3f v0(cos(startangle+range/2), sin(startangle+range/2), 0); + + SbVec3f textOffset = p0 + v0 * len2; + + float margin = imgHeight / 4.0F; + + // Direction vectors for start and end lines + SbVec3f v1(cos(startangle), sin(startangle), 0); + SbVec3f v2(cos(endangle), sin(endangle), 0); + + SbVec3f pnt1 = p0+(len2-margin)*v1; + SbVec3f pnt2 = p0+(len2+margin)*v1; + SbVec3f pnt3 = p0+(len2-margin)*v2; + SbVec3f pnt4 = p0+(len2+margin)*v2; + + // Finds the mins and maxes + // We may need to include the text position too + + SbVec3f img1 = SbVec3f(-imgWidth / 2.0F, -imgHeight / 2, 0.0F); + SbVec3f img2 = SbVec3f(-imgWidth / 2.0F, imgHeight / 2, 0.0F); + SbVec3f img3 = SbVec3f( imgWidth / 2.0F, -imgHeight / 2, 0.0F); + SbVec3f img4 = SbVec3f( imgWidth / 2.0F, imgHeight / 2, 0.0F); + + img1 += textOffset; + img2 += textOffset; + img3 += textOffset; + img4 += textOffset; + + std::vector corners; + corners.push_back(pnt1); + corners.push_back(pnt2); + corners.push_back(pnt3); + corners.push_back(pnt4); + corners.push_back(img1); + corners.push_back(img2); + corners.push_back(img3); + corners.push_back(img4); + + return corners; + } + + std::vector computeSymmetricBBox() const + { + // Get the points stored in the pnt field + const SbVec3f *points = label->pnts.getValues(0); + if (label->pnts.getNum() < 2) { + return {}; + } + + SbVec3f p1 = points[0]; + SbVec3f p2 = points[1]; + + // Finds the mins and maxes + std::vector corners; + corners.push_back(p1); + corners.push_back(p2); + + return corners; + } + +private: + float scale; + SoDatumLabel* label; +}; +} + +void SoDatumLabel::computeBBox(SoAction * action, SbBox3f &box, SbVec3f ¢er) { if (!this->bbox.isEmpty()) { // Set the bounding box using stored parameters @@ -148,6 +439,13 @@ void SoDatumLabel::computeBBox(SoAction * /*action*/, SbBox3f &box, SbVec3f &cen SbVec3f bbcenter = this->bbox.getCenter(); center.setValue(bbcenter[0], bbcenter[1], bbcenter[2]); } + else { + SoState *state = action->getState(); + float scale = getScaleFactor(state); + + DatumLabelBox datumBox(scale, this); + datumBox.computeBBox(box, center); + } } void SoDatumLabel::generateDistancePrimitives(SoAction * action, const SbVec3f& p1, const SbVec3f& p2) diff --git a/src/Gui/SoFCBackgroundGradient.cpp b/src/Gui/SoFCBackgroundGradient.cpp index 653b8bbc24..37eb809127 100644 --- a/src/Gui/SoFCBackgroundGradient.cpp +++ b/src/Gui/SoFCBackgroundGradient.cpp @@ -24,6 +24,7 @@ #ifndef _PreComp_ #include +#include #ifdef FC_OS_WIN32 #define _USE_MATH_DEFINES #endif @@ -38,14 +39,18 @@ #include "SoFCBackgroundGradient.h" static const std::array big_circle = []{ + static const float pi2 = boost::math::constants::two_pi(); std::array result; int c = 0; - for (GLfloat i = 0; i < 2*M_PI; i += 2*M_PI / 32, c++){ - result[c][0] = M_SQRT2*cosf(i); result[c][1] = M_SQRT2*sinf(i); } + for (GLfloat i = 0; i < pi2; i += pi2 / 32, c++) { + result[c][0] = M_SQRT2*cosf(i); result[c][1] = M_SQRT2*sinf(i); + } return result; }(); static const std::array small_oval = []{ + static const float pi2 = boost::math::constants::two_pi(); std::array result; int c = 0; - for (GLfloat i = 0; i < 2*M_PI; i += 2*M_PI / 32, c++){ - result[c][0] = 0.3*M_SQRT2*cosf(i); result[c][1] = M_SQRT1_2*sinf(i); } + for (GLfloat i = 0; i < pi2; i += pi2 / 32, c++) { + result[c][0] = 0.3*M_SQRT2*cosf(i); result[c][1] = M_SQRT1_2*sinf(i); + } return result; }(); using namespace Gui; diff --git a/src/Gui/TaskCSysDragger.cpp b/src/Gui/TaskCSysDragger.cpp index 2b2a952555..2e7f578c22 100644 --- a/src/Gui/TaskCSysDragger.cpp +++ b/src/Gui/TaskCSysDragger.cpp @@ -67,6 +67,16 @@ TaskCSysDragger::~TaskCSysDragger() Gui::Application::Instance->commandManager().getCommandByName("Std_PerspectiveCamera")->setEnabled(true); } +void TaskCSysDragger::dragStartCallback(void *, SoDragger *) +{ + // This is called when a manipulator is about to manipulating + if(firstDrag) + { + Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Transform")); + firstDrag=false; + } +} + void TaskCSysDragger::setupGui() { auto incrementsBox = new Gui::TaskView::TaskBox( @@ -117,6 +127,7 @@ void TaskCSysDragger::onRIncrementSlot(double freshValue) void TaskCSysDragger::open() { + dragger->addStartCallback(dragStartCallback, this); //we can't have user switching camera types while dragger is shown. Gui::Application::Instance->commandManager().getCommandByName("Std_OrthographicCamera")->setEnabled(false); Gui::Application::Instance->commandManager().getCommandByName("Std_PerspectiveCamera")->setEnabled(false); @@ -141,6 +152,7 @@ bool TaskCSysDragger::accept() if (dObject) { Gui::Document* document = Gui::Application::Instance->getDocument(dObject->getDocument()); assert(document); + firstDrag = true; document->commitCommand(); document->resetEdit(); document->getDocument()->recompute(); @@ -148,4 +160,18 @@ bool TaskCSysDragger::accept() return Gui::TaskView::TaskDialog::accept(); } +bool TaskCSysDragger::reject() +{ + App::DocumentObject* dObject = vpObject.getObject(); + if (dObject) { + Gui::Document* document = Gui::Application::Instance->getDocument(dObject->getDocument()); + assert(document); + firstDrag = true; + document->abortCommand(); + document->resetEdit(); + document->getDocument()->recompute(); + } + return Gui::TaskView::TaskDialog::reject(); +} + #include "moc_TaskCSysDragger.cpp" diff --git a/src/Gui/TaskCSysDragger.h b/src/Gui/TaskCSysDragger.h index b9d13b5901..ba223e5d2c 100644 --- a/src/Gui/TaskCSysDragger.h +++ b/src/Gui/TaskCSysDragger.h @@ -20,12 +20,14 @@ * * ***************************************************************************/ + #ifndef TASKCSYSDRAGGER_H #define TASKCSYSDRAGGER_H #include "TaskView/TaskDialog.h" #include +class SoDragger; namespace Gui { @@ -40,13 +42,16 @@ namespace Gui TaskCSysDragger(ViewProviderDocumentObject *vpObjectIn, SoFCCSysDragger *draggerIn); ~TaskCSysDragger() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok;} + { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel;} void open() override; bool accept() override; + bool reject() override; private Q_SLOTS: void onTIncrementSlot(double freshValue); void onRIncrementSlot(double freshValue); private: + static inline bool firstDrag = true; + static void dragStartCallback(void * data, SoDragger * d); void setupGui(); App::DocumentObjectT vpObject; SoFCCSysDragger *dragger; diff --git a/src/Gui/TaskView/TaskSelectLinkProperty.cpp b/src/Gui/TaskView/TaskSelectLinkProperty.cpp index 22094e2c8a..1bb20c6fcf 100644 --- a/src/Gui/TaskView/TaskSelectLinkProperty.cpp +++ b/src/Gui/TaskView/TaskSelectLinkProperty.cpp @@ -153,7 +153,7 @@ void TaskSelectLinkProperty::activate() bool TaskSelectLinkProperty::accept() { - // set the proptery with the selection + // set the property with the selection sendSelection2Property(); // clear selection and remove gate (return to normal operation) diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 3b998ab449..54736ed640 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -1298,6 +1298,10 @@ bool View3DInventorViewer::hasAxisCross() void View3DInventorViewer::showRotationCenter(bool show) { SoNode* scene = getSceneGraph(); + if (!scene) { + return; + } + auto sep = static_cast(scene); bool showEnabled = App::GetApplication() @@ -1329,7 +1333,7 @@ void View3DInventorViewer::showRotationCenter(bool show) auto material = new SoMaterial(); material->emissiveColor = SbColor(1, 0, 0); - material->transparency = 0.8; + material->transparency = 0.8F; auto translation = new SoTranslation(); translation->translation.setValue(center); diff --git a/src/Gui/ViewProviderDragger.cpp b/src/Gui/ViewProviderDragger.cpp index ef612751b3..a26179e874 100644 --- a/src/Gui/ViewProviderDragger.cpp +++ b/src/Gui/ViewProviderDragger.cpp @@ -146,7 +146,6 @@ bool ViewProviderDragger::setEdit(int ModNum) pcTransform->translation.connectFrom(&csysDragger->translation); pcTransform->rotation.connectFrom(&csysDragger->rotation); - csysDragger->addStartCallback(dragStartCallback, this); csysDragger->addFinishCallback(dragFinishCallback, this); // dragger node is added to viewer's editing root in setEditViewer @@ -212,12 +211,6 @@ void ViewProviderDragger::unsetEditViewer(Gui::View3DInventorViewer* viewer) } } -void ViewProviderDragger::dragStartCallback(void *, SoDragger *) -{ - // This is called when a manipulator is about to manipulating - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Transform")); -} - void ViewProviderDragger::dragFinishCallback(void *data, SoDragger *d) { // This is called when a manipulator has done manipulating @@ -226,7 +219,7 @@ void ViewProviderDragger::dragFinishCallback(void *data, SoDragger *d) auto dragger = static_cast(d); updatePlacementFromDragger(sudoThis, dragger); - Gui::Application::Instance->activeDocument()->commitCommand(); + //Gui::Application::Instance->activeDocument()->commitCommand(); } void ViewProviderDragger::updatePlacementFromDragger(ViewProviderDragger* sudoThis, SoFCCSysDragger* draggerIn) diff --git a/src/Gui/ViewProviderDragger.h b/src/Gui/ViewProviderDragger.h index e0c7f221de..40502f016a 100644 --- a/src/Gui/ViewProviderDragger.h +++ b/src/Gui/ViewProviderDragger.h @@ -72,9 +72,7 @@ protected: SoFCCSysDragger *csysDragger = nullptr; private: - static void dragStartCallback(void * data, SoDragger * d); static void dragFinishCallback(void * data, SoDragger * d); - static void updatePlacementFromDragger(ViewProviderDragger *sudoThis, SoFCCSysDragger *draggerIn); bool checkLink(); diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 6bb50af393..8667a628bd 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -1564,7 +1564,7 @@ void ExpLineEdit::setExpression(std::shared_ptr expr) try { ExpressionBinding::setExpression(expr); } - catch (const Base::Exception & e) { + catch (const Base::Exception&) { setReadOnly(true); QPalette p(palette()); p.setColor(QPalette::Active, QPalette::Text, Qt::red); @@ -1631,7 +1631,7 @@ void ExpLineEdit::resizeEvent(QResizeEvent * event) iconLabel->setExpressionText(QString()); } } - catch (const Base::Exception & e) { + catch (const Base::Exception&) { setReadOnly(true); QPalette p(palette()); p.setColor(QPalette::Active, QPalette::Text, Qt::red); diff --git a/src/Gui/Workbench.cpp b/src/Gui/Workbench.cpp index eb2a7d5236..eac08c3872 100644 --- a/src/Gui/Workbench.cpp +++ b/src/Gui/Workbench.cpp @@ -702,6 +702,7 @@ MenuItem* StdWorkbench::setupMenuBar() const << "Std_ViewLoadImage" << "Std_SceneInspector" << "Std_DependencyGraph" + << "Std_ExportDependencyGraph" << "Std_ProjectUtil" << "Separator" << "Std_MeasureDistance" diff --git a/src/Mod/AddonManager/Addon.py b/src/Mod/AddonManager/Addon.py index 2356845eb3..e67614de85 100644 --- a/src/Mod/AddonManager/Addon.py +++ b/src/Mod/AddonManager/Addon.py @@ -610,7 +610,7 @@ class Addon: wbName = self.get_workbench_name() # Add the wb to the list of disabled if it was not already - disabled_wbs = pref.GetString("Disabled", "NoneWorkbench,TestWorkbench") + disabled_wbs = pref.GetString("Disabled", "NoneWorkbench,TestWorkbench,AssemblyWorkbench") # print(f"start disabling {disabled_wbs}") disabled_wbs_list = disabled_wbs.split(",") if not (wbName in disabled_wbs_list): @@ -641,7 +641,7 @@ class Addon: def remove_from_disabled_wbs(self, wbName: str): pref = fci.ParamGet("User parameter:BaseApp/Preferences/Workbenches") - disabled_wbs = pref.GetString("Disabled", "NoneWorkbench,TestWorkbench") + disabled_wbs = pref.GetString("Disabled", "NoneWorkbench,TestWorkbench,AssemblyWorkbench") # print(f"start enabling : {disabled_wbs}") disabled_wbs_list = disabled_wbs.split(",") disabled_wbs = "" diff --git a/src/Mod/AddonManager/AddonManager.py b/src/Mod/AddonManager/AddonManager.py index cb8bb63d8a..dc66b8b7be 100644 --- a/src/Mod/AddonManager/AddonManager.py +++ b/src/Mod/AddonManager/AddonManager.py @@ -27,11 +27,9 @@ import os import functools import tempfile -import hashlib import threading import json -import re # Needed for py 3.6 and earlier, can remove later, search for "re." -from datetime import date, timedelta +from datetime import date from typing import Dict from PySide import QtGui, QtCore, QtWidgets @@ -59,6 +57,7 @@ from Addon import Addon from manage_python_dependencies import ( PythonPackageManager, ) +from addonmanager_cache import local_cache_needs_update from addonmanager_devmode import DeveloperMode from addonmanager_firstrun import FirstRunDialog from addonmanager_connection_checker import ConnectionCheckerGUI @@ -179,7 +178,7 @@ class CommandAddonManager: self.packages_with_updates = set() self.startup_sequence = [] self.cleanup_workers() - self.determine_cache_update_status() + self.update_cache = local_cache_needs_update() # restore window geometry from stored state pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons") @@ -295,79 +294,6 @@ class CommandAddonManager: + "\n" ) - def determine_cache_update_status(self) -> None: - """Determine whether we need to update the cache, based on user preference, and previous - cache update status. Sets self.update_cache to either True or False.""" - - # Figure out our cache update frequency: there is a combo box in the preferences dialog - # with three options: never, daily, and weekly. Check that first, but allow it to be - # overridden by a more specific DaysBetweenUpdates selection, if the user has provided it. - # For that parameter we use: - # -1: Only manual updates (default) - # 0: Update every launch - # >0: Update every n days - pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons") - self.update_cache = False - update_frequency = pref.GetInt("UpdateFrequencyComboEntry", 0) - if update_frequency == 0: - days_between_updates = -1 - elif update_frequency == 1: - days_between_updates = 1 - elif update_frequency == 2: - days_between_updates = 7 - days_between_updates = pref.GetInt("DaysBetweenUpdates", days_between_updates) - last_cache_update_string = pref.GetString("LastCacheUpdate", "never") - cache_path = FreeCAD.getUserCachePath() - am_path = os.path.join(cache_path, "AddonManager") - if last_cache_update_string == "never": - self.update_cache = True - elif days_between_updates > 0: - if hasattr(date, "fromisoformat"): - last_cache_update = date.fromisoformat(last_cache_update_string) - else: - # Python 3.6 and earlier don't have date.fromisoformat - date_re = re.compile("([0-9]{4})-?(1[0-2]|0[1-9])-?(3[01]|0[1-9]|[12][0-9])") - matches = date_re.match(last_cache_update_string) - last_cache_update = date( - int(matches.group(1)), int(matches.group(2)), int(matches.group(3)) - ) - delta_update = timedelta(days=days_between_updates) - if date.today() >= last_cache_update + delta_update: - self.update_cache = True - elif days_between_updates == 0: - self.update_cache = True - elif not os.path.isdir(am_path): - self.update_cache = True - stopfile = utils.get_cache_file_name("CACHE_UPDATE_INTERRUPTED") - if os.path.exists(stopfile): - self.update_cache = True - os.remove(stopfile) - FreeCAD.Console.PrintMessage( - translate( - "AddonsInstaller", - "Previous cache process was interrupted, restarting...\n", - ) - ) - - # See if the user has changed the custom repos list since our last re-cache: - stored_hash = pref.GetString("CustomRepoHash", "") - custom_repos = pref.GetString("CustomRepositories", "") - if custom_repos: - hasher = hashlib.sha1() - hasher.update(custom_repos.encode("utf-8")) - new_hash = hasher.hexdigest() - else: - new_hash = "" - if new_hash != stored_hash: - stored_hash = pref.SetString("CustomRepoHash", new_hash) - self.update_cache = True - FreeCAD.Console.PrintMessage( - translate( - "AddonsInstaller", - "Custom repo list changed, forcing recache...\n", - ) - ) - def reject(self) -> None: """called when the window has been closed""" diff --git a/src/Mod/AddonManager/AddonManagerOptions.py b/src/Mod/AddonManager/AddonManagerOptions.py index 909a46dc1c..4b1d7e2300 100644 --- a/src/Mod/AddonManager/AddonManagerOptions.py +++ b/src/Mod/AddonManager/AddonManagerOptions.py @@ -63,9 +63,7 @@ class AddonManagerOptions: QIcon.fromTheme("remove", QIcon(":/icons/list-remove.svg")) ) - self.form.customRepositoriesTableView.horizontalHeader().setStretchLastSection( - False - ) + self.form.customRepositoriesTableView.horizontalHeader().setStretchLastSection(False) self.form.customRepositoriesTableView.horizontalHeader().setSectionResizeMode( 0, QHeaderView.Stretch ) @@ -73,15 +71,9 @@ class AddonManagerOptions: 1, QHeaderView.ResizeToContents ) - self.form.addCustomRepositoryButton.clicked.connect( - self._add_custom_repo_clicked - ) - self.form.removeCustomRepositoryButton.clicked.connect( - self._remove_custom_repo_clicked - ) - self.form.customRepositoriesTableView.doubleClicked.connect( - self._row_double_clicked - ) + self.form.addCustomRepositoryButton.clicked.connect(self._add_custom_repo_clicked) + self.form.removeCustomRepositoryButton.clicked.connect(self._remove_custom_repo_clicked) + self.form.customRepositoriesTableView.doubleClicked.connect(self._row_double_clicked) def saveSettings(self): """Required function: called by the preferences dialog when Apply or Save is clicked, @@ -99,9 +91,7 @@ class AddonManagerOptions: if pref_path and pref_entry: pref_path = pref_path.data() pref_entry = pref_entry.data() - pref_access_string = ( - f"User parameter:BaseApp/Preferences/{str(pref_path,'utf-8')}" - ) + pref_access_string = f"User parameter:BaseApp/Preferences/{str(pref_path,'utf-8')}" pref = FreeCAD.ParamGet(pref_access_string) if isinstance(widget, QCheckBox): checked = widget.isChecked() @@ -143,9 +133,7 @@ class AddonManagerOptions: if pref_path and pref_entry: pref_path = pref_path.data() pref_entry = pref_entry.data() - pref_access_string = ( - f"User parameter:BaseApp/Preferences/{str(pref_path,'utf-8')}" - ) + pref_access_string = f"User parameter:BaseApp/Preferences/{str(pref_path,'utf-8')}" pref = FreeCAD.ParamGet(pref_access_string) if isinstance(widget, QCheckBox): widget.setChecked(pref.GetBool(str(pref_entry, "utf-8"))) @@ -313,9 +301,7 @@ class CustomRepositoryDialog: def __init__(self): self.dialog = FreeCADGui.PySideUic.loadUi( - os.path.join( - os.path.dirname(__file__), "AddonManagerOptions_AddCustomRepository.ui" - ) + os.path.join(os.path.dirname(__file__), "AddonManagerOptions_AddCustomRepository.ui") ) def exec(self): diff --git a/src/Mod/AddonManager/AddonManagerTest/app/mocks.py b/src/Mod/AddonManager/AddonManagerTest/app/mocks.py index 470a2393b4..3e94f7e161 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/mocks.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/mocks.py @@ -35,7 +35,7 @@ class GitFailed(RuntimeError): class MockConsole: - """Mock for the FreeCAD.Console -- does NOT print anything out, just logs it.""" + """Spy for the FreeCAD.Console -- does NOT print anything out, just logs it.""" def __init__(self): self.log = [] @@ -148,9 +148,7 @@ class MockMacro: with open(os.path.join(location, self.icon), "wb") as f: f.write(b"Fake icon data - nothing to see here\n") if self.xpm: - with open( - os.path.join(location, "MockMacro_icon.xpm"), "w", encoding="utf-8" - ) as f: + with open(os.path.join(location, "MockMacro_icon.xpm"), "w", encoding="utf-8") as f: f.write(self.xpm) for name in self.other_files: if "/" in name: @@ -233,12 +231,8 @@ class MockGitManager: self.current_branch_response = "main" self.get_remote_response = "No remote set" self.get_branches_response = ["main"] - self.get_last_committers_response = { - "John Doe": {"email": "jdoe@freecad.org", "count": 1} - } - self.get_last_authors_response = { - "Jane Doe": {"email": "jdoe@freecad.org", "count": 1} - } + self.get_last_committers_response = {"John Doe": {"email": "jdoe@freecad.org", "count": 1}} + self.get_last_authors_response = {"Jane Doe": {"email": "jdoe@freecad.org", "count": 1}} self.should_fail = False self.fail_once = False # Switch back to success after the simulated failure @@ -252,9 +246,7 @@ class MockGitManager: self.called_methods.append("clone") self._check_for_failure() - def async_clone( - self, _remote, _local_path, _progress_monitor, _args: List[str] = None - ): + def async_clone(self, _remote, _local_path, _progress_monitor, _args: List[str] = None): self.called_methods.append("async_clone") self._check_for_failure() @@ -409,3 +401,63 @@ class MockThread: ): return True return False + + +class MockPref: + def __init__(self): + self.prefs = {} + self.pref_set_counter = {} + self.pref_get_counter = {} + + def set_prefs(self, pref_dict: dict) -> None: + self.prefs = pref_dict + + def GetInt(self, key: str, default: int) -> int: + return self.Get(key, default) + + def GetString(self, key: str, default: str) -> str: + return self.Get(key, default) + + def GetBool(self, key: str, default: bool) -> bool: + return self.Get(key, default) + + def Get(self, key: str, default): + if key not in self.pref_set_counter: + self.pref_get_counter[key] = 1 + else: + self.pref_get_counter[key] += 1 + if key in self.prefs: + return self.prefs[key] + raise ValueError(f"Expected key not in mock preferences: {key}") + + def SetInt(self, key: str, value: int) -> None: + return self.Set(key, value) + + def SetString(self, key: str, value: str) -> None: + return self.Set(key, value) + + def SetBool(self, key: str, value: bool) -> None: + return self.Set(key, value) + + def Set(self, key: str, value): + if key not in self.pref_set_counter: + self.pref_set_counter[key] = 1 + else: + self.pref_set_counter[key] += 1 + self.prefs[key] = value + + +class MockExists: + def __init__(self, files: List[str] = None): + """Returns True for all files in files, and False for all others""" + self.files = files + self.files_checked = [] + + def exists(self, check_file: str): + self.files_checked.append(check_file) + if not self.files: + return False + for file in self.files: + if check_file.endswith(file): + return True + return False diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_addon.py b/src/Mod/AddonManager/AddonManagerTest/app/test_addon.py index 9f30521637..5f7c06c621 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_addon.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_addon.py @@ -89,9 +89,7 @@ class TestAddon(unittest.TestCase): Addon.Status.NOT_INSTALLED, "master", ) - addon_with_workbench.load_metadata_file( - os.path.join(self.test_dir, "workbench_only.xml") - ) + addon_with_workbench.load_metadata_file(os.path.join(self.test_dir, "workbench_only.xml")) self.assertTrue(addon_with_workbench.contains_workbench()) self.assertFalse(addon_with_workbench.contains_macro()) self.assertFalse(addon_with_workbench.contains_preference_pack()) @@ -103,9 +101,7 @@ class TestAddon(unittest.TestCase): Addon.Status.NOT_INSTALLED, "master", ) - addon_with_macro.load_metadata_file( - os.path.join(self.test_dir, "macro_only.xml") - ) + addon_with_macro.load_metadata_file(os.path.join(self.test_dir, "macro_only.xml")) self.assertFalse(addon_with_macro.contains_workbench()) self.assertTrue(addon_with_macro.contains_macro()) self.assertFalse(addon_with_macro.contains_preference_pack()) @@ -117,9 +113,7 @@ class TestAddon(unittest.TestCase): Addon.Status.NOT_INSTALLED, "master", ) - addon_with_prefpack.load_metadata_file( - os.path.join(self.test_dir, "prefpack_only.xml") - ) + addon_with_prefpack.load_metadata_file(os.path.join(self.test_dir, "prefpack_only.xml")) self.assertFalse(addon_with_prefpack.contains_workbench()) self.assertFalse(addon_with_prefpack.contains_macro()) self.assertTrue(addon_with_prefpack.contains_preference_pack()) @@ -131,9 +125,7 @@ class TestAddon(unittest.TestCase): Addon.Status.NOT_INSTALLED, "master", ) - addon_with_all.load_metadata_file( - os.path.join(self.test_dir, "combination.xml") - ) + addon_with_all.load_metadata_file(os.path.join(self.test_dir, "combination.xml")) self.assertTrue(addon_with_all.contains_workbench()) self.assertTrue(addon_with_all.contains_macro()) self.assertTrue(addon_with_all.contains_preference_pack()) @@ -263,9 +255,7 @@ class TestAddon(unittest.TestCase): Addon.Status.NOT_INSTALLED, "master", ) - addon.load_metadata_file( - os.path.join(self.test_dir, "depends_on_all_workbenches.xml") - ) + addon.load_metadata_file(os.path.join(self.test_dir, "depends_on_all_workbenches.xml")) deps = Addon.Dependencies() addon.walk_dependency_tree({}, deps) self.assertEqual(len(deps.internal_workbenches), len(INTERNAL_WORKBENCHES)) @@ -277,9 +267,7 @@ class TestAddon(unittest.TestCase): Addon.Status.NOT_INSTALLED, "master", ) - addon.load_metadata_file( - os.path.join(self.test_dir, "test_version_detection.xml") - ) + addon.load_metadata_file(os.path.join(self.test_dir, "test_version_detection.xml")) self.assertEqual( len(addon.tags), diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_cache.py b/src/Mod/AddonManager/AddonManagerTest/app/test_cache.py new file mode 100644 index 0000000000..098f1b3a01 --- /dev/null +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_cache.py @@ -0,0 +1,126 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# *************************************************************************** +# * * +# * Copyright (c) 2022-2023 FreeCAD Project Association * +# * * +# * This file is part of FreeCAD. * +# * * +# * FreeCAD is free software: you can redistribute it and/or modify it * +# * under the terms of the GNU Lesser General Public License as * +# * published by the Free Software Foundation, either version 2.1 of the * +# * License, or (at your option) any later version. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, but * +# * WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# * Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Lesser General Public * +# * License along with FreeCAD. If not, see * +# * . * +# * * +# *************************************************************************** +import datetime +import sys +import unittest +from datetime import date +from unittest import TestCase +from unittest.mock import MagicMock, patch + +sys.path.append("../..") + +import addonmanager_cache as cache +from AddonManagerTest.app.mocks import MockPref, MockExists + + +class TestCache(TestCase): + @patch("addonmanager_freecad_interface.getUserCachePath") + @patch("addonmanager_freecad_interface.ParamGet") + @patch("os.remove", MagicMock()) + @patch("os.makedirs", MagicMock()) + def test_local_cache_needs_update(self, param_mock: MagicMock, cache_mock: MagicMock): + cache_mock.return_value = "" + param_mock.return_value = MockPref() + default_prefs = { + "UpdateFrequencyComboEntry": 0, + "LastCacheUpdate": "2000-01-01", + "CustomRepoHash": "", + "CustomRepositories": "", + } + today = date.today().isoformat() + yesterday = (date.today() - datetime.timedelta(1)).isoformat() + + # Organize these as subtests because of all the patching that has to be done: once we are in this function, + # the patch is complete, and we can just modify the return values of the fakes one by one + tests = ( + { + "case": "No existing cache", + "files_that_exist": [], + "prefs_to_set": {}, + "expect": True, + }, + { + "case": "Last cache update was interrupted", + "files_that_exist": ["CACHE_UPDATE_INTERRUPTED"], + "prefs_to_set": {}, + "expect": True, + }, + { + "case": "Cache exists and updating is blocked", + "files_that_exist": ["AddonManager"], + "prefs_to_set": {}, + "expect": False, + }, + { + "case": "Daily updates set and last update was long ago", + "files_that_exist": ["AddonManager"], + "prefs_to_set": {"UpdateFrequencyComboEntry": 1}, + "expect": True, + }, + { + "case": "Daily updates set and last update was today", + "files_that_exist": ["AddonManager"], + "prefs_to_set": {"UpdateFrequencyComboEntry": 1, "LastCacheUpdate": today}, + "expect": False, + }, + { + "case": "Daily updates set and last update was yesterday", + "files_that_exist": ["AddonManager"], + "prefs_to_set": {"UpdateFrequencyComboEntry": 1, "LastCacheUpdate": yesterday}, + "expect": True, + }, + { + "case": "Weekly updates set and last update was long ago", + "files_that_exist": ["AddonManager"], + "prefs_to_set": {"UpdateFrequencyComboEntry": 1}, + "expect": True, + }, + { + "case": "Weekly updates set and last update was yesterday", + "files_that_exist": ["AddonManager"], + "prefs_to_set": {"UpdateFrequencyComboEntry": 2, "LastCacheUpdate": yesterday}, + "expect": False, + }, + { + "case": "Custom repo list changed", + "files_that_exist": ["AddonManager"], + "prefs_to_set": {"CustomRepositories": "NewRepo"}, + "expect": True, + }, + ) + for test_case in tests: + with self.subTest(test_case["case"]): + case_prefs = default_prefs + for pref, setting in test_case["prefs_to_set"].items(): + case_prefs[pref] = setting + param_mock.return_value.set_prefs(case_prefs) + exists_mock = MockExists(test_case["files_that_exist"]) + with patch("os.path.exists", exists_mock.exists): + if test_case["expect"]: + self.assertTrue(cache.local_cache_needs_update()) + else: + self.assertFalse(cache.local_cache_needs_update()) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_dependency_installer.py b/src/Mod/AddonManager/AddonManagerTest/app/test_dependency_installer.py index 098409acbb..e0ba09cad1 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_dependency_installer.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_dependency_installer.py @@ -74,19 +74,11 @@ class TestDependencyInstaller(unittest.TestCase): def setUp(self): self.subprocess_mock = SubprocessMock() - self.test_object = DependencyInstaller( - [], ["required_py_package"], ["optional_py_package"] - ) - self.test_object._subprocess_wrapper = ( - self.subprocess_mock.subprocess_interceptor - ) + self.test_object = DependencyInstaller([], ["required_py_package"], ["optional_py_package"]) + self.test_object._subprocess_wrapper = self.subprocess_mock.subprocess_interceptor self.signals_caught = [] - self.test_object.failure.connect( - functools.partial(self.catch_signal, "failure") - ) - self.test_object.finished.connect( - functools.partial(self.catch_signal, "finished") - ) + self.test_object.failure.connect(functools.partial(self.catch_signal, "failure")) + self.test_object.finished.connect(functools.partial(self.catch_signal, "finished")) self.test_object.no_pip.connect(functools.partial(self.catch_signal, "no_pip")) self.test_object.no_python_exe.connect( functools.partial(self.catch_signal, "no_python_exe") diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_freecad_interface.py b/src/Mod/AddonManager/AddonManagerTest/app/test_freecad_interface.py index 123bb3c80d..07da9f5301 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_freecad_interface.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_freecad_interface.py @@ -64,9 +64,7 @@ class TestConsole(unittest.TestCase): """Test that if the FreeCAD import fails, the logger is set up correctly, and implements PrintLog""" sys.modules["FreeCAD"] = None - with patch( - "addonmanager_freecad_interface.logging", new=MagicMock() - ) as mock_logging: + with patch("addonmanager_freecad_interface.logging", new=MagicMock()) as mock_logging: import addonmanager_freecad_interface as fc fc.Console.PrintLog("Test output") @@ -76,9 +74,7 @@ class TestConsole(unittest.TestCase): def test_message_no_freecad(self): """Test that if the FreeCAD import fails the logger implements PrintMessage""" sys.modules["FreeCAD"] = None - with patch( - "addonmanager_freecad_interface.logging", new=MagicMock() - ) as mock_logging: + with patch("addonmanager_freecad_interface.logging", new=MagicMock()) as mock_logging: import addonmanager_freecad_interface as fc fc.Console.PrintMessage("Test output") @@ -87,9 +83,7 @@ class TestConsole(unittest.TestCase): def test_warning_no_freecad(self): """Test that if the FreeCAD import fails the logger implements PrintWarning""" sys.modules["FreeCAD"] = None - with patch( - "addonmanager_freecad_interface.logging", new=MagicMock() - ) as mock_logging: + with patch("addonmanager_freecad_interface.logging", new=MagicMock()) as mock_logging: import addonmanager_freecad_interface as fc fc.Console.PrintWarning("Test output") @@ -98,9 +92,7 @@ class TestConsole(unittest.TestCase): def test_error_no_freecad(self): """Test that if the FreeCAD import fails the logger implements PrintError""" sys.modules["FreeCAD"] = None - with patch( - "addonmanager_freecad_interface.logging", new=MagicMock() - ) as mock_logging: + with patch("addonmanager_freecad_interface.logging", new=MagicMock()) as mock_logging: import addonmanager_freecad_interface as fc fc.Console.PrintError("Test output") diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_git.py b/src/Mod/AddonManager/AddonManagerTest/app/test_git.py index 5117747cdf..c7625ea447 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_git.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_git.py @@ -78,9 +78,7 @@ class TestGit(unittest.TestCase): checkout_dir = self._clone_test_repo() self.assertTrue(os.path.exists(checkout_dir)) self.assertTrue(os.path.exists(os.path.join(checkout_dir, ".git"))) - self.assertEqual( - os.getcwd(), self.cwd, "We should be left in the same CWD we started" - ) + self.assertEqual(os.getcwd(), self.cwd, "We should be left in the same CWD we started") def test_checkout(self): """Test git checkout""" @@ -91,9 +89,7 @@ class TestGit(unittest.TestCase): expected_status = "## HEAD (no branch)" self.assertEqual(status, expected_status) - self.assertEqual( - os.getcwd(), self.cwd, "We should be left in the same CWD we started" - ) + self.assertEqual(os.getcwd(), self.cwd, "We should be left in the same CWD we started") def test_update(self): """Test using git to update the local repo""" @@ -103,9 +99,7 @@ class TestGit(unittest.TestCase): self.assertTrue(self.git.update_available(checkout_dir)) self.git.update(checkout_dir) self.assertFalse(self.git.update_available(checkout_dir)) - self.assertEqual( - os.getcwd(), self.cwd, "We should be left in the same CWD we started" - ) + self.assertEqual(os.getcwd(), self.cwd, "We should be left in the same CWD we started") def test_tag_and_branch(self): """Test checking the currently checked-out tag""" @@ -129,9 +123,7 @@ class TestGit(unittest.TestCase): self.assertEqual(found_branch, expected_branch) self.assertFalse(self.git.update_available(checkout_dir)) - self.assertEqual( - os.getcwd(), self.cwd, "We should be left in the same CWD we started" - ) + self.assertEqual(os.getcwd(), self.cwd, "We should be left in the same CWD we started") def test_get_remote(self): """Test getting the remote location""" @@ -139,9 +131,7 @@ class TestGit(unittest.TestCase): expected_remote = self.test_repo_remote returned_remote = self.git.get_remote(checkout_dir) self.assertEqual(expected_remote, returned_remote) - self.assertEqual( - os.getcwd(), self.cwd, "We should be left in the same CWD we started" - ) + self.assertEqual(os.getcwd(), self.cwd, "We should be left in the same CWD we started") def test_repair(self): """Test the repair feature (and some exception throwing)""" @@ -158,9 +148,7 @@ class TestGit(unittest.TestCase): self.git.repair(remote, checkout_dir) status = self.git.status(checkout_dir) self.assertEqual(status, "## main...origin/main\n") - self.assertEqual( - os.getcwd(), self.cwd, "We should be left in the same CWD we started" - ) + self.assertEqual(os.getcwd(), self.cwd, "We should be left in the same CWD we started") def _rmdir(self, path): try: diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_installer.py b/src/Mod/AddonManager/AddonManagerTest/app/test_installer.py index 1c13c13f8e..0229f05186 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_installer.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_installer.py @@ -116,9 +116,7 @@ class TestAddonInstaller(unittest.TestCase): os.path.join(self.test_data_dir, "good_package.xml"), os.path.join(addon_dir, "package.xml"), ) - good_metadata = MetadataReader.from_file( - os.path.join(addon_dir, "package.xml") - ) + good_metadata = MetadataReader.from_file(os.path.join(addon_dir, "package.xml")) installer._update_metadata() self.assertEqual(self.real_addon.installed_version, good_metadata.version) @@ -133,34 +131,24 @@ class TestAddonInstaller(unittest.TestCase): installer.installation_path = temp_dir installer._finalize_zip_installation(test_simple_repo) expected_location = os.path.join(temp_dir, non_gh_mock.name, "README") - self.assertTrue( - os.path.isfile(expected_location), "Non-GitHub zip extraction failed" - ) + self.assertTrue(os.path.isfile(expected_location), "Non-GitHub zip extraction failed") def test_finalize_zip_installation_github(self): with tempfile.TemporaryDirectory() as temp_dir: - test_github_style_repo = os.path.join( - self.test_data_dir, "test_github_style_repo.zip" - ) + test_github_style_repo = os.path.join(self.test_data_dir, "test_github_style_repo.zip") self.mock_addon.url = test_github_style_repo self.mock_addon.branch = "master" installer = AddonInstaller(self.mock_addon, []) installer.installation_path = temp_dir installer._finalize_zip_installation(test_github_style_repo) expected_location = os.path.join(temp_dir, self.mock_addon.name, "README") - self.assertTrue( - os.path.isfile(expected_location), "GitHub zip extraction failed" - ) + self.assertTrue(os.path.isfile(expected_location), "GitHub zip extraction failed") def test_code_in_branch_subdirectory_true(self): """When there is a subdirectory with the branch name in it, find it""" installer = AddonInstaller(self.mock_addon, []) with tempfile.TemporaryDirectory() as temp_dir: - os.mkdir( - os.path.join( - temp_dir, f"{self.mock_addon.name}-{self.mock_addon.branch}" - ) - ) + os.mkdir(os.path.join(temp_dir, f"{self.mock_addon.name}-{self.mock_addon.branch}")) result = installer._code_in_branch_subdirectory(temp_dir) self.assertTrue(result, "Failed to find ZIP subdirectory") @@ -176,30 +164,20 @@ class TestAddonInstaller(unittest.TestCase): """When there are multiple subdirectories, never find a branch subdirectory""" installer = AddonInstaller(self.mock_addon, []) with tempfile.TemporaryDirectory() as temp_dir: - os.mkdir( - os.path.join( - temp_dir, f"{self.mock_addon.name}-{self.mock_addon.branch}" - ) - ) + os.mkdir(os.path.join(temp_dir, f"{self.mock_addon.name}-{self.mock_addon.branch}")) os.mkdir(os.path.join(temp_dir, "AnotherSubdir")) result = installer._code_in_branch_subdirectory(temp_dir) - self.assertFalse( - result, "Found ZIP subdirectory when there were multiple subdirs" - ) + self.assertFalse(result, "Found ZIP subdirectory when there were multiple subdirs") def test_move_code_out_of_subdirectory(self): """All files are moved out and the subdirectory is deleted""" installer = AddonInstaller(self.mock_addon, []) with tempfile.TemporaryDirectory() as temp_dir: - subdir = os.path.join( - temp_dir, f"{self.mock_addon.name}-{self.mock_addon.branch}" - ) + subdir = os.path.join(temp_dir, f"{self.mock_addon.name}-{self.mock_addon.branch}") os.mkdir(subdir) with open(os.path.join(subdir, "README.txt"), "w", encoding="utf-8") as f: f.write("# Test file for unit testing") - with open( - os.path.join(subdir, "AnotherFile.txt"), "w", encoding="utf-8" - ) as f: + with open(os.path.join(subdir, "AnotherFile.txt"), "w", encoding="utf-8") as f: f.write("# Test file for unit testing") installer._move_code_out_of_subdirectory(temp_dir) self.assertTrue(os.path.isfile(os.path.join(temp_dir, "README.txt"))) @@ -260,23 +238,15 @@ class TestAddonInstaller(unittest.TestCase): with tempfile.TemporaryDirectory() as temp_dir: installer = AddonInstaller(self.mock_addon, []) - method = installer._determine_install_method( - temp_dir, InstallationMethod.COPY - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.COPY) self.assertEqual(method, InstallationMethod.COPY) git_manager = initialize_git() if git_manager: - method = installer._determine_install_method( - temp_dir, InstallationMethod.GIT - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.GIT) self.assertEqual(method, InstallationMethod.GIT) - method = installer._determine_install_method( - temp_dir, InstallationMethod.ZIP - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.ZIP) self.assertIsNone(method) - method = installer._determine_install_method( - temp_dir, InstallationMethod.ANY - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.ANY) self.assertEqual(method, InstallationMethod.COPY) def test_determine_install_method_file_url(self): @@ -285,23 +255,15 @@ class TestAddonInstaller(unittest.TestCase): with tempfile.TemporaryDirectory() as temp_dir: installer = AddonInstaller(self.mock_addon, []) temp_dir = "file://" + temp_dir.replace(os.path.sep, "/") - method = installer._determine_install_method( - temp_dir, InstallationMethod.COPY - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.COPY) self.assertEqual(method, InstallationMethod.COPY) git_manager = initialize_git() if git_manager: - method = installer._determine_install_method( - temp_dir, InstallationMethod.GIT - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.GIT) self.assertEqual(method, InstallationMethod.GIT) - method = installer._determine_install_method( - temp_dir, InstallationMethod.ZIP - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.ZIP) self.assertIsNone(method) - method = installer._determine_install_method( - temp_dir, InstallationMethod.ANY - ) + method = installer._determine_install_method(temp_dir, InstallationMethod.ANY) self.assertEqual(method, InstallationMethod.COPY) def test_determine_install_method_local_zip(self): @@ -310,21 +272,13 @@ class TestAddonInstaller(unittest.TestCase): with tempfile.TemporaryDirectory() as temp_dir: installer = AddonInstaller(self.mock_addon, []) temp_file = os.path.join(temp_dir, "dummy.zip") - method = installer._determine_install_method( - temp_file, InstallationMethod.COPY - ) + method = installer._determine_install_method(temp_file, InstallationMethod.COPY) self.assertEqual(method, InstallationMethod.ZIP) - method = installer._determine_install_method( - temp_file, InstallationMethod.GIT - ) + method = installer._determine_install_method(temp_file, InstallationMethod.GIT) self.assertIsNone(method) - method = installer._determine_install_method( - temp_file, InstallationMethod.ZIP - ) + method = installer._determine_install_method(temp_file, InstallationMethod.ZIP) self.assertEqual(method, InstallationMethod.ZIP) - method = installer._determine_install_method( - temp_file, InstallationMethod.ANY - ) + method = installer._determine_install_method(temp_file, InstallationMethod.ANY) self.assertEqual(method, InstallationMethod.ZIP) def test_determine_install_method_remote_zip(self): @@ -351,12 +305,8 @@ class TestAddonInstaller(unittest.TestCase): for site in ["github.org", "gitlab.org", "framagit.org", "salsa.debian.org"]: with self.subTest(site=site): - temp_file = ( - f"https://{site}/dummy/dummy" # Doesn't have to actually exist! - ) - method = installer._determine_install_method( - temp_file, InstallationMethod.COPY - ) + temp_file = f"https://{site}/dummy/dummy" # Doesn't have to actually exist! + method = installer._determine_install_method(temp_file, InstallationMethod.COPY) self.assertIsNone(method, f"Allowed copying from {site} URL") def test_determine_install_method_https_known_sites_git(self): @@ -367,12 +317,8 @@ class TestAddonInstaller(unittest.TestCase): for site in ["github.org", "gitlab.org", "framagit.org", "salsa.debian.org"]: with self.subTest(site=site): - temp_file = ( - f"https://{site}/dummy/dummy" # Doesn't have to actually exist! - ) - method = installer._determine_install_method( - temp_file, InstallationMethod.GIT - ) + temp_file = f"https://{site}/dummy/dummy" # Doesn't have to actually exist! + method = installer._determine_install_method(temp_file, InstallationMethod.GIT) self.assertEqual( method, InstallationMethod.GIT, @@ -387,12 +333,8 @@ class TestAddonInstaller(unittest.TestCase): for site in ["github.org", "gitlab.org", "framagit.org", "salsa.debian.org"]: with self.subTest(site=site): - temp_file = ( - f"https://{site}/dummy/dummy" # Doesn't have to actually exist! - ) - method = installer._determine_install_method( - temp_file, InstallationMethod.ZIP - ) + temp_file = f"https://{site}/dummy/dummy" # Doesn't have to actually exist! + method = installer._determine_install_method(temp_file, InstallationMethod.ZIP) self.assertEqual( method, InstallationMethod.ZIP, @@ -407,12 +349,8 @@ class TestAddonInstaller(unittest.TestCase): for site in ["github.org", "gitlab.org", "framagit.org", "salsa.debian.org"]: with self.subTest(site=site): - temp_file = ( - f"https://{site}/dummy/dummy" # Doesn't have to actually exist! - ) - method = installer._determine_install_method( - temp_file, InstallationMethod.ANY - ) + temp_file = f"https://{site}/dummy/dummy" # Doesn't have to actually exist! + method = installer._determine_install_method(temp_file, InstallationMethod.ANY) self.assertEqual( method, InstallationMethod.GIT, @@ -427,12 +365,8 @@ class TestAddonInstaller(unittest.TestCase): for site in ["github.org", "gitlab.org", "framagit.org", "salsa.debian.org"]: with self.subTest(site=site): - temp_file = ( - f"https://{site}/dummy/dummy" # Doesn't have to actually exist! - ) - method = installer._determine_install_method( - temp_file, InstallationMethod.ANY - ) + temp_file = f"https://{site}/dummy/dummy" # Doesn't have to actually exist! + method = installer._determine_install_method(temp_file, InstallationMethod.ANY) self.assertEqual( method, InstallationMethod.ZIP, @@ -442,9 +376,7 @@ class TestAddonInstaller(unittest.TestCase): def test_fcmacro_copying(self): with tempfile.TemporaryDirectory() as temp_dir: mock_addon = MockAddon() - mock_addon.url = os.path.join( - self.test_data_dir, "test_addon_with_fcmacro.zip" - ) + mock_addon.url = os.path.join(self.test_data_dir, "test_addon_with_fcmacro.zip") installer = AddonInstaller(mock_addon, []) installer.installation_path = temp_dir installer.macro_installation_path = os.path.join(temp_dir, "Macros") @@ -475,6 +407,4 @@ class TestMacroInstaller(unittest.TestCase): installer.installation_path = temp_dir installation_succeeded = installer.run() self.assertTrue(installation_succeeded) - self.assertTrue( - os.path.exists(os.path.join(temp_dir, self.mock.macro.filename)) - ) + self.assertTrue(os.path.exists(os.path.join(temp_dir, self.mock.macro.filename))) diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_macro_parser.py b/src/Mod/AddonManager/AddonManagerTest/app/test_macro_parser.py index 1307a3b556..5e89bc0945 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_macro_parser.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_macro_parser.py @@ -100,9 +100,7 @@ class TestMacroParser(unittest.TestCase): catcher = CallCatcher() self.test_object._process_key = catcher.catch_call self.test_object._process_line(read_in_line, content_lines) - self.assertTrue( - catcher.called, "_process_key was not called for a known key" - ) + self.assertTrue(catcher.called, "_process_key was not called for a known key") def test_process_line_unknown_lines(self): """Lines starting with non-keys are not processed""" @@ -123,9 +121,7 @@ class TestMacroParser(unittest.TestCase): catcher = CallCatcher() self.test_object._process_key = catcher.catch_call self.test_object._process_line(read_in_line, content_lines) - self.assertFalse( - catcher.called, "_process_key was called for an unknown key" - ) + self.assertFalse(catcher.called, "_process_key was called for an unknown key") def test_process_key_standard(self): """Normal expected data is processed""" diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_uninstaller.py b/src/Mod/AddonManager/AddonManagerTest/app/test_uninstaller.py index 57b5f95de3..8c82c28421 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_uninstaller.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_uninstaller.py @@ -51,15 +51,9 @@ class TestAddonUninstaller(unittest.TestCase): self.signals_caught = [] self.test_object = AddonUninstaller(self.mock_addon) - self.test_object.finished.connect( - functools.partial(self.catch_signal, "finished") - ) - self.test_object.success.connect( - functools.partial(self.catch_signal, "success") - ) - self.test_object.failure.connect( - functools.partial(self.catch_signal, "failure") - ) + self.test_object.finished.connect(functools.partial(self.catch_signal, "finished")) + self.test_object.success.connect(functools.partial(self.catch_signal, "success")) + self.test_object.failure.connect(functools.partial(self.catch_signal, "failure")) def tearDown(self): """Finalize the test.""" @@ -149,9 +143,7 @@ class TestAddonUninstaller(unittest.TestCase): self.assertNotIn("failure", self.signals_caught) self.assertIn("success", self.signals_caught) self.assertIn("finished", self.signals_caught) - self.assertFalse( - os.path.exists(os.path.join(macro_directory, "FakeMacro.FCMacro")) - ) + self.assertFalse(os.path.exists(os.path.join(macro_directory, "FakeMacro.FCMacro"))) self.assertTrue(os.path.exists(macro_directory)) def test_uninstall_calls_script(self): @@ -218,9 +210,7 @@ class TestAddonUninstaller(unittest.TestCase): os.path.join(toplevel_path, "AM_INSTALLATION_DIGEST.txt"), ) self.test_object.remove_extra_files(toplevel_path) # Shouldn't throw - self.assertFalse( - os.path.exists(os.path.join(macro_directory, "FakeMacro.FCMacro")) - ) + self.assertFalse(os.path.exists(os.path.join(macro_directory, "FakeMacro.FCMacro"))) def test_remove_extra_files_normal_case(self): """Test that a digest that is a "normal" case removes the requested files""" @@ -244,35 +234,21 @@ class TestAddonUninstaller(unittest.TestCase): ) # Make sure the setup worked as expected, otherwise the test is meaningless - self.assertTrue( - os.path.exists(os.path.join(macro_directory, "FakeMacro1.FCMacro")) - ) - self.assertTrue( - os.path.exists(os.path.join(macro_directory, "FakeMacro2.FCMacro")) - ) - self.assertTrue( - os.path.exists(os.path.join(macro_directory, "FakeMacro3.FCMacro")) - ) + self.assertTrue(os.path.exists(os.path.join(macro_directory, "FakeMacro1.FCMacro"))) + self.assertTrue(os.path.exists(os.path.join(macro_directory, "FakeMacro2.FCMacro"))) + self.assertTrue(os.path.exists(os.path.join(macro_directory, "FakeMacro3.FCMacro"))) self.test_object.remove_extra_files(toplevel_path) # Shouldn't throw - self.assertFalse( - os.path.exists(os.path.join(macro_directory, "FakeMacro1.FCMacro")) - ) - self.assertFalse( - os.path.exists(os.path.join(macro_directory, "FakeMacro2.FCMacro")) - ) - self.assertFalse( - os.path.exists(os.path.join(macro_directory, "FakeMacro3.FCMacro")) - ) + self.assertFalse(os.path.exists(os.path.join(macro_directory, "FakeMacro1.FCMacro"))) + self.assertFalse(os.path.exists(os.path.join(macro_directory, "FakeMacro2.FCMacro"))) + self.assertFalse(os.path.exists(os.path.join(macro_directory, "FakeMacro3.FCMacro"))) def test_runs_uninstaller_script_successful(self): """Tests that the uninstall.py script is called""" with tempfile.TemporaryDirectory() as temp_dir: toplevel_path = self.setup_dummy_installation(temp_dir) - with open( - os.path.join(toplevel_path, "uninstall.py"), "w", encoding="utf-8" - ) as f: + with open(os.path.join(toplevel_path, "uninstall.py"), "w", encoding="utf-8") as f: double_escaped = temp_dir.replace("\\", "\\\\") f.write( f"""# Mock uninstaller script @@ -282,28 +258,20 @@ with open(os.path.join(path,"RAN_UNINSTALLER.txt"),"w",encoding="utf-8") as f: f.write("File created by uninstall.py from unit tests") """ ) - self.test_object.run_uninstall_script( - toplevel_path - ) # The exception does not leak out - self.assertTrue( - os.path.exists(os.path.join(temp_dir, "RAN_UNINSTALLER.txt")) - ) + self.test_object.run_uninstall_script(toplevel_path) # The exception does not leak out + self.assertTrue(os.path.exists(os.path.join(temp_dir, "RAN_UNINSTALLER.txt"))) def test_runs_uninstaller_script_failure(self): """Tests that exceptions in the uninstall.py script do not leak out""" with tempfile.TemporaryDirectory() as temp_dir: toplevel_path = self.setup_dummy_installation(temp_dir) - with open( - os.path.join(toplevel_path, "uninstall.py"), "w", encoding="utf-8" - ) as f: + with open(os.path.join(toplevel_path, "uninstall.py"), "w", encoding="utf-8") as f: f.write( f"""# Mock uninstaller script raise RuntimeError("Fake exception for unit testing") """ ) - self.test_object.run_uninstall_script( - toplevel_path - ) # The exception does not leak out + self.test_object.run_uninstall_script(toplevel_path) # The exception does not leak out class TestMacroUninstaller(unittest.TestCase): @@ -317,15 +285,9 @@ class TestMacroUninstaller(unittest.TestCase): self.test_object = MacroUninstaller(self.mock_addon) self.signals_caught = [] - self.test_object.finished.connect( - functools.partial(self.catch_signal, "finished") - ) - self.test_object.success.connect( - functools.partial(self.catch_signal, "success") - ) - self.test_object.failure.connect( - functools.partial(self.catch_signal, "failure") - ) + self.test_object.finished.connect(functools.partial(self.catch_signal, "finished")) + self.test_object.success.connect(functools.partial(self.catch_signal, "success")) + self.test_object.failure.connect(functools.partial(self.catch_signal, "failure")) def tearDown(self): pass @@ -339,13 +301,9 @@ class TestMacroUninstaller(unittest.TestCase): self.test_object.installation_location = temp_dir self.mock_addon.macro.install(temp_dir) # Make sure the setup worked, otherwise the test is meaningless - self.assertTrue( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) + self.assertTrue(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) self.test_object.run() - self.assertFalse( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) + self.assertFalse(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) self.assertNotIn("failure", self.signals_caught) self.assertIn("success", self.signals_caught) self.assertIn("finished", self.signals_caught) @@ -356,19 +314,11 @@ class TestMacroUninstaller(unittest.TestCase): self.mock_addon.macro.icon = "mock_icon_test.svg" self.mock_addon.macro.install(temp_dir) # Make sure the setup worked, otherwise the test is meaningless - self.assertTrue( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) - self.assertTrue( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.icon)) - ) + self.assertTrue(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) + self.assertTrue(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.icon))) self.test_object.run() - self.assertFalse( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) - self.assertFalse( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.icon)) - ) + self.assertFalse(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) + self.assertFalse(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.icon))) self.assertNotIn("failure", self.signals_caught) self.assertIn("success", self.signals_caught) self.assertIn("finished", self.signals_caught) @@ -379,19 +329,11 @@ class TestMacroUninstaller(unittest.TestCase): self.mock_addon.macro.xpm = "/*Fake XPM data*/" self.mock_addon.macro.install(temp_dir) # Make sure the setup worked, otherwise the test is meaningless - self.assertTrue( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) - self.assertTrue( - os.path.exists(os.path.join(temp_dir, "MockMacro_icon.xpm")) - ) + self.assertTrue(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) + self.assertTrue(os.path.exists(os.path.join(temp_dir, "MockMacro_icon.xpm"))) self.test_object.run() - self.assertFalse( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) - self.assertFalse( - os.path.exists(os.path.join(temp_dir, "MockMacro_icon.xpm")) - ) + self.assertFalse(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) + self.assertFalse(os.path.exists(os.path.join(temp_dir, "MockMacro_icon.xpm"))) self.assertNotIn("failure", self.signals_caught) self.assertIn("success", self.signals_caught) self.assertIn("finished", self.signals_caught) @@ -430,13 +372,9 @@ class TestMacroUninstaller(unittest.TestCase): self.test_object.installation_location = temp_dir # Don't run the installer: - self.assertFalse( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) + self.assertFalse(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) self.test_object.run() # Should not raise an exception - self.assertFalse( - os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename)) - ) + self.assertFalse(os.path.exists(os.path.join(temp_dir, self.mock_addon.macro.filename))) self.assertNotIn("failure", self.signals_caught) self.assertIn("success", self.signals_caught) self.assertIn("finished", self.signals_caught) @@ -489,9 +427,7 @@ class TestMacroUninstaller(unittest.TestCase): full_path = os.path.join(temp_dir, directory) os.mkdir(full_path) full_paths.add(full_path) - with open( - os.path.join(full_path, "test.txt"), "w", encoding="utf-8" - ) as f: + with open(os.path.join(full_path, "test.txt"), "w", encoding="utf-8") as f: f.write("Unit test dummy data\n") for directory in full_paths: diff --git a/src/Mod/AddonManager/AddonManagerTest/app/test_utilities.py b/src/Mod/AddonManager/AddonManagerTest/app/test_utilities.py index 2c2eba8921..1e7a4fd504 100644 --- a/src/Mod/AddonManager/AddonManagerTest/app/test_utilities.py +++ b/src/Mod/AddonManager/AddonManagerTest/app/test_utilities.py @@ -53,9 +53,7 @@ class TestUtilities(unittest.TestCase): ] for url in recognized_urls: repo = Addon("Test Repo", url, Addon.Status.NOT_INSTALLED, "branch") - self.assertTrue( - recognized_git_location(repo), f"{url} was unexpectedly not recognized" - ) + self.assertTrue(recognized_git_location(repo), f"{url} was unexpectedly not recognized") unrecognized_urls = [ "https://google.com", @@ -65,9 +63,7 @@ class TestUtilities(unittest.TestCase): ] for url in unrecognized_urls: repo = Addon("Test Repo", url, Addon.Status.NOT_INSTALLED, "branch") - self.assertFalse( - recognized_git_location(repo), f"{url} was unexpectedly recognized" - ) + self.assertFalse(recognized_git_location(repo), f"{url} was unexpectedly recognized") def test_get_readme_url(self): github_urls = [ diff --git a/src/Mod/AddonManager/AddonManagerTest/data/DoNothing.FCMacro b/src/Mod/AddonManager/AddonManagerTest/data/DoNothing.FCMacro index 4ccec1e450..b20265d396 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/DoNothing.FCMacro +++ b/src/Mod/AddonManager/AddonManagerTest/data/DoNothing.FCMacro @@ -27,4 +27,4 @@ static char * blarg_xpm[] = { ".............**." };""" -print("Well, not quite *nothing*... it does print this line out.") \ No newline at end of file +print("Well, not quite *nothing*... it does print this line out.") diff --git a/src/Mod/AddonManager/AddonManagerTest/data/addon_update_stats.json b/src/Mod/AddonManager/AddonManagerTest/data/addon_update_stats.json index 837e9f0d59..f9f5206b30 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/addon_update_stats.json +++ b/src/Mod/AddonManager/AddonManagerTest/data/addon_update_stats.json @@ -1 +1,156 @@ -{"3DfindIT": {"refs/remotes/origin/HEAD": ["2022-09-08T13:58:17+02:00", "dc99f8f1bdb17c1e55c00ac0dffa3ec15caf5b9d"], "refs/remotes/origin/master": ["2022-09-08T13:58:17+02:00", "dc99f8f1bdb17c1e55c00ac0dffa3ec15caf5b9d"], "refs/tags/v1.0": ["2020-11-09T10:11:44+01:00", "e97b6caf5eaed0b709dfeabecedac14c9bc2cc2b"], "refs/tags/v1.1": ["2021-06-21T13:33:58+02:00", "b9ab38ae93fcb8c1f69516ea563494bca63ebf49"], "refs/tags/v1.2": ["2021-08-31T07:42:11+02:00", "d8553961a43dd450681f6df6e8ce5bce72da1b0a"]}, "3D_Printing_Tools": {"refs/remotes/origin/HEAD": ["2019-06-30T23:01:34+01:00", "e7ea9cd05dc11d5503115522b87cac7704eafc0e"], "refs/remotes/origin/master": ["2019-06-30T23:01:34+01:00", "e7ea9cd05dc11d5503115522b87cac7704eafc0e"]}, "A2plus": {"refs/remotes/origin/HEAD": ["2022-10-02T22:20:41+02:00", "3392d72ded45918ea28cd46ed4de778571488639"], "refs/remotes/origin/devel": ["2022-01-27T19:10:27+01:00", "dcc6193f36d4c7c8c43c4f3384e2bc03d27debd3"], "refs/remotes/origin/master": ["2022-10-02T22:20:41+02:00", "3392d72ded45918ea28cd46ed4de778571488639"], "refs/tags/V0.1.4.1": ["2018-10-28T16:38:46+01:00", "6f6ff0a892efca602ec916faac11b041be792fe2"], "refs/tags/V0.1.5": ["2018-11-01T19:03:15+01:00", "db6cdde71d4a2e9a53f2b14694e2ba2b42ac58c0"], "refs/tags/V0.1.6": ["2018-11-11T16:04:51+01:00", "46d4039c1fd08b3e5604d4fad3e955bca5855338"], "refs/tags/V0.4.6": ["2019-03-19T15:19:32+01:00", "42d5ed3846f24c7a7f0f6db655513e9038c3f651"]},"AirPlaneDesign": {"refs/remotes/origin/HEAD": ["2022-07-03T19:21:44+02:00", "34a5c5a827a378d4b6c9c16c54a1f2238b8e3b6b"], "refs/remotes/origin/dev-v0.4": ["2021-01-23T16:15:58+01:00", "f21bb8fca55b7d34fe920f0b823a7722ff977e43"], "refs/remotes/origin/dev-v03bis": ["2021-08-03T18:28:22+02:00", "5e2b4ebafaaed6ca87b99f480ae2fecd3722a83b"], "refs/remotes/origin/master": ["2022-07-03T19:21:44+02:00", "34a5c5a827a378d4b6c9c16c54a1f2238b8e3b6b"], "refs/remotes/origin/refactoring": ["2021-10-18T18:41:10+02:00", "2f22aa7faa049b0e8ec7dd43a39554b597c7e772"], "refs/tags/V0.1": ["2018-08-18T20:27:30+02:00", "c5bf85c552b31c0abdca7cadf428099c0b38e97e"], "refs/tags/V0.2": ["2019-07-30T08:36:55+02:00", "39a7c90ac53148c3317d50e07584c96f54db549e"], "refs/tags/V0.3": ["2019-10-25T08:44:43+02:00", "8e11fb6a5c33479570e0f572e6319f220e3cf6fd"]}, "Curves": {"refs/remotes/origin/HEAD": ["2022-10-06T19:18:14+02:00", "b43970d71ccfed6a85d6e547993863520db9920c"], "refs/remotes/origin/blendcurve": ["2020-02-26T18:55:13+01:00", "41dff49edfadc7b3085d4afff3c32b598fcd3ed0"], "refs/remotes/origin/blending": ["2022-06-24T17:52:22+02:00", "687b38faad85187e486fe68ccf072adb7d06be11"], "refs/remotes/origin/decimate_edges": ["2021-05-18T18:40:44+02:00", "b299597f3817cfb29fd45a8c5710706ae01261fe"], "refs/remotes/origin/facemap": ["2021-12-21T19:06:20+01:00", "7f315ab0e72d61fb6d04a2da631c66f8f3a30c82"], "refs/remotes/origin/flatten": ["2022-05-09T15:18:05+02:00", "436b135ff1c2d93686911c2e81ef4fa379e5b001"], "refs/remotes/origin/master": ["2022-10-06T19:18:14+02:00", "b43970d71ccfed6a85d6e547993863520db9920c"], "refs/remotes/origin/reflect2": ["2021-04-10T13:42:07+02:00", "6245d86e18f0e5c0a1e724ac614a369da18590e3"], "refs/remotes/origin/rotsweep": ["2022-10-05T17:50:39+02:00", "99b5e2619481257636d864921d22f60ca0af24d8"], "refs/remotes/origin/seamcheck": ["2022-03-18T17:53:05+01:00", "2703f93074a94ecdf09c4bb445bef347c206f00f"], "refs/remotes/origin/solid": ["2021-03-01T22:16:08+01:00", "4f4cc7ec6672b48660601b566777366fd0685a5d"], "refs/tags/v0.1": ["2019-02-17T08:57:09+01:00", "74ea77f091cf3a62e1dee3b64b49e9ab9fcdb560"], "refs/tags/v0.2": ["2020-06-16T15:02:23+02:00", "521037588be1aa28320ce6c9b9f77b40f4c8aeb6"], "refs/tags/v0.3": ["2021-01-08T19:06:59+01:00", "a1fa4857b1de95da1062acc63919acdee59f045c"]}} \ No newline at end of file +{ + "3DfindIT": { + "refs/remotes/origin/HEAD": [ + "2022-09-08T13:58:17+02:00", + "dc99f8f1bdb17c1e55c00ac0dffa3ec15caf5b9d" + ], + "refs/remotes/origin/master": [ + "2022-09-08T13:58:17+02:00", + "dc99f8f1bdb17c1e55c00ac0dffa3ec15caf5b9d" + ], + "refs/tags/v1.0": [ + "2020-11-09T10:11:44+01:00", + "e97b6caf5eaed0b709dfeabecedac14c9bc2cc2b" + ], + "refs/tags/v1.1": [ + "2021-06-21T13:33:58+02:00", + "b9ab38ae93fcb8c1f69516ea563494bca63ebf49" + ], + "refs/tags/v1.2": [ + "2021-08-31T07:42:11+02:00", + "d8553961a43dd450681f6df6e8ce5bce72da1b0a" + ] + }, + "3D_Printing_Tools": { + "refs/remotes/origin/HEAD": [ + "2019-06-30T23:01:34+01:00", + "e7ea9cd05dc11d5503115522b87cac7704eafc0e" + ], + "refs/remotes/origin/master": [ + "2019-06-30T23:01:34+01:00", + "e7ea9cd05dc11d5503115522b87cac7704eafc0e" + ] + }, + "A2plus": { + "refs/remotes/origin/HEAD": [ + "2022-10-02T22:20:41+02:00", + "3392d72ded45918ea28cd46ed4de778571488639" + ], + "refs/remotes/origin/devel": [ + "2022-01-27T19:10:27+01:00", + "dcc6193f36d4c7c8c43c4f3384e2bc03d27debd3" + ], + "refs/remotes/origin/master": [ + "2022-10-02T22:20:41+02:00", + "3392d72ded45918ea28cd46ed4de778571488639" + ], + "refs/tags/V0.1.4.1": [ + "2018-10-28T16:38:46+01:00", + "6f6ff0a892efca602ec916faac11b041be792fe2" + ], + "refs/tags/V0.1.5": [ + "2018-11-01T19:03:15+01:00", + "db6cdde71d4a2e9a53f2b14694e2ba2b42ac58c0" + ], + "refs/tags/V0.1.6": [ + "2018-11-11T16:04:51+01:00", + "46d4039c1fd08b3e5604d4fad3e955bca5855338" + ], + "refs/tags/V0.4.6": [ + "2019-03-19T15:19:32+01:00", + "42d5ed3846f24c7a7f0f6db655513e9038c3f651" + ] + }, + "AirPlaneDesign": { + "refs/remotes/origin/HEAD": [ + "2022-07-03T19:21:44+02:00", + "34a5c5a827a378d4b6c9c16c54a1f2238b8e3b6b" + ], + "refs/remotes/origin/dev-v0.4": [ + "2021-01-23T16:15:58+01:00", + "f21bb8fca55b7d34fe920f0b823a7722ff977e43" + ], + "refs/remotes/origin/dev-v03bis": [ + "2021-08-03T18:28:22+02:00", + "5e2b4ebafaaed6ca87b99f480ae2fecd3722a83b" + ], + "refs/remotes/origin/master": [ + "2022-07-03T19:21:44+02:00", + "34a5c5a827a378d4b6c9c16c54a1f2238b8e3b6b" + ], + "refs/remotes/origin/refactoring": [ + "2021-10-18T18:41:10+02:00", + "2f22aa7faa049b0e8ec7dd43a39554b597c7e772" + ], + "refs/tags/V0.1": [ + "2018-08-18T20:27:30+02:00", + "c5bf85c552b31c0abdca7cadf428099c0b38e97e" + ], + "refs/tags/V0.2": [ + "2019-07-30T08:36:55+02:00", + "39a7c90ac53148c3317d50e07584c96f54db549e" + ], + "refs/tags/V0.3": [ + "2019-10-25T08:44:43+02:00", + "8e11fb6a5c33479570e0f572e6319f220e3cf6fd" + ] + }, + "Curves": { + "refs/remotes/origin/HEAD": [ + "2022-10-06T19:18:14+02:00", + "b43970d71ccfed6a85d6e547993863520db9920c" + ], + "refs/remotes/origin/blendcurve": [ + "2020-02-26T18:55:13+01:00", + "41dff49edfadc7b3085d4afff3c32b598fcd3ed0" + ], + "refs/remotes/origin/blending": [ + "2022-06-24T17:52:22+02:00", + "687b38faad85187e486fe68ccf072adb7d06be11" + ], + "refs/remotes/origin/decimate_edges": [ + "2021-05-18T18:40:44+02:00", + "b299597f3817cfb29fd45a8c5710706ae01261fe" + ], + "refs/remotes/origin/facemap": [ + "2021-12-21T19:06:20+01:00", + "7f315ab0e72d61fb6d04a2da631c66f8f3a30c82" + ], + "refs/remotes/origin/flatten": [ + "2022-05-09T15:18:05+02:00", + "436b135ff1c2d93686911c2e81ef4fa379e5b001" + ], + "refs/remotes/origin/master": [ + "2022-10-06T19:18:14+02:00", + "b43970d71ccfed6a85d6e547993863520db9920c" + ], + "refs/remotes/origin/reflect2": [ + "2021-04-10T13:42:07+02:00", + "6245d86e18f0e5c0a1e724ac614a369da18590e3" + ], + "refs/remotes/origin/rotsweep": [ + "2022-10-05T17:50:39+02:00", + "99b5e2619481257636d864921d22f60ca0af24d8" + ], + "refs/remotes/origin/seamcheck": [ + "2022-03-18T17:53:05+01:00", + "2703f93074a94ecdf09c4bb445bef347c206f00f" + ], + "refs/remotes/origin/solid": [ + "2021-03-01T22:16:08+01:00", + "4f4cc7ec6672b48660601b566777366fd0685a5d" + ], + "refs/tags/v0.1": [ + "2019-02-17T08:57:09+01:00", + "74ea77f091cf3a62e1dee3b64b49e9ab9fcdb560" + ], + "refs/tags/v0.2": [ + "2020-06-16T15:02:23+02:00", + "521037588be1aa28320ce6c9b9f77b40f4c8aeb6" + ], + "refs/tags/v0.3": [ + "2021-01-08T19:06:59+01:00", + "a1fa4857b1de95da1062acc63919acdee59f045c" + ] + } +} diff --git a/src/Mod/AddonManager/AddonManagerTest/data/bad_macro_metadata.FCStd b/src/Mod/AddonManager/AddonManagerTest/data/bad_macro_metadata.FCStd index 12b1562194..f3932bbfe3 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/bad_macro_metadata.FCStd +++ b/src/Mod/AddonManager/AddonManagerTest/data/bad_macro_metadata.FCStd @@ -34,4 +34,4 @@ __Help__ = "" __Status__ = "" __Requires__ = "" __Communication__ = "" -__Files__ = "" \ No newline at end of file +__Files__ = "" diff --git a/src/Mod/AddonManager/AddonManagerTest/data/combination.xml b/src/Mod/AddonManager/AddonManagerTest/data/combination.xml index 8b214a0f17..3b75db30b7 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/combination.xml +++ b/src/Mod/AddonManager/AddonManagerTest/data/combination.xml @@ -25,4 +25,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/AddonManagerTest/data/git_submodules.txt b/src/Mod/AddonManager/AddonManagerTest/data/git_submodules.txt index 3e99986017..2a447c61b6 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/git_submodules.txt +++ b/src/Mod/AddonManager/AddonManagerTest/data/git_submodules.txt @@ -20,4 +20,4 @@ url = https://github.com/tomate44/CurvesWB.git [submodule "Defeaturing"] path = Defeaturing - url = https://github.com/easyw/Defeaturing_WB.git \ No newline at end of file + url = https://github.com/easyw/Defeaturing_WB.git diff --git a/src/Mod/AddonManager/AddonManagerTest/data/good_macro_metadata.FCStd b/src/Mod/AddonManager/AddonManagerTest/data/good_macro_metadata.FCStd index aa2955c197..2968bb5917 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/good_macro_metadata.FCStd +++ b/src/Mod/AddonManager/AddonManagerTest/data/good_macro_metadata.FCStd @@ -34,4 +34,4 @@ __Help__ = "" __Status__ = "" __Requires__ = "" __Communication__ = "" -__Files__ = "" \ No newline at end of file +__Files__ = "" diff --git a/src/Mod/AddonManager/AddonManagerTest/data/good_package.xml b/src/Mod/AddonManager/AddonManagerTest/data/good_package.xml index 1fede2a1c4..e484aa2ced 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/good_package.xml +++ b/src/Mod/AddonManager/AddonManagerTest/data/good_package.xml @@ -22,4 +22,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/AddonManagerTest/data/macro_only.xml b/src/Mod/AddonManager/AddonManagerTest/data/macro_only.xml index f28e004041..c8e47fa224 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/macro_only.xml +++ b/src/Mod/AddonManager/AddonManagerTest/data/macro_only.xml @@ -19,4 +19,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/AddonManagerTest/data/macro_template.FCStd b/src/Mod/AddonManager/AddonManagerTest/data/macro_template.FCStd index 74778e67a4..9cc885bd8d 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/macro_template.FCStd +++ b/src/Mod/AddonManager/AddonManagerTest/data/macro_template.FCStd @@ -34,4 +34,4 @@ __Help__ = "HELP" __Status__ = "STATUS" __Requires__ = "REQUIRES" __Communication__ = "COMMUNICATION" -__Files__ = "FILES" \ No newline at end of file +__Files__ = "FILES" diff --git a/src/Mod/AddonManager/AddonManagerTest/data/missing_macro_metadata.FCStd b/src/Mod/AddonManager/AddonManagerTest/data/missing_macro_metadata.FCStd index e6a77399bb..1dc58af652 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/missing_macro_metadata.FCStd +++ b/src/Mod/AddonManager/AddonManagerTest/data/missing_macro_metadata.FCStd @@ -22,4 +22,4 @@ # * * # *************************************************************************** -# This file contains no metadata \ No newline at end of file +# This file contains no metadata diff --git a/src/Mod/AddonManager/AddonManagerTest/data/prefpack_only.xml b/src/Mod/AddonManager/AddonManagerTest/data/prefpack_only.xml index 22731a7792..5affea4837 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/prefpack_only.xml +++ b/src/Mod/AddonManager/AddonManagerTest/data/prefpack_only.xml @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/AddonManagerTest/data/test_version_detection.xml b/src/Mod/AddonManager/AddonManagerTest/data/test_version_detection.xml index 66f90d9295..dfd578e0b2 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/test_version_detection.xml +++ b/src/Mod/AddonManager/AddonManagerTest/data/test_version_detection.xml @@ -30,4 +30,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/AddonManagerTest/data/workbench_only.xml b/src/Mod/AddonManager/AddonManagerTest/data/workbench_only.xml index 38cde82623..26ac759665 100644 --- a/src/Mod/AddonManager/AddonManagerTest/data/workbench_only.xml +++ b/src/Mod/AddonManager/AddonManagerTest/data/workbench_only.xml @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/AddonManagerTest/gui/test_installer_gui.py b/src/Mod/AddonManager/AddonManagerTest/gui/test_installer_gui.py index 56b766b5d8..6523f2ccdc 100644 --- a/src/Mod/AddonManager/AddonManagerTest/gui/test_installer_gui.py +++ b/src/Mod/AddonManager/AddonManagerTest/gui/test_installer_gui.py @@ -55,12 +55,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.Ok, ) self.installer_gui._installation_succeeded() - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_failure_dialog(self): # Pop the modal dialog and verify that it opens, and responds to a Cancel click @@ -71,12 +67,8 @@ class TestInstallerGui(unittest.TestCase): self.installer_gui._installation_failed( self.addon_to_install, "Test of installation failure" ) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_no_python_dialog(self): # Pop the modal dialog and verify that it opens, and responds to a No click @@ -85,12 +77,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.No, ) self.installer_gui._report_no_python_exe() - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_no_pip_dialog(self): # Pop the modal dialog and verify that it opens, and responds to a No click @@ -99,12 +87,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.No, ) self.installer_gui._report_no_pip("pip not actually run, this was a test") - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_dependency_failure_dialog(self): # Pop the modal dialog and verify that it opens, and responds to a No click @@ -115,12 +99,8 @@ class TestInstallerGui(unittest.TestCase): self.installer_gui._report_dependency_failure( "Unit test", "Nothing really failed, this is a test of the dialog box" ) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_install(self): # Run the installation code and make sure it puts the directory in place @@ -130,9 +110,7 @@ class TestInstallerGui(unittest.TestCase): self.installer_gui.installer.success.disconnect( self.installer_gui._installation_succeeded ) - self.installer_gui.installer.failure.disconnect( - self.installer_gui._installation_failed - ) + self.installer_gui.installer.failure.disconnect(self.installer_gui._installation_failed) while not self.installer_gui.worker_thread.isFinished(): QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents, 100) self.assertTrue( @@ -147,12 +125,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.Cancel, ) self.installer_gui._handle_disallowed_python(disallowed_packages) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_handle_disallowed_python_long_list(self): """A separate test for when there are MANY packages, which takes a separate code path.""" @@ -164,12 +138,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.Cancel, ) self.installer_gui._handle_disallowed_python(disallowed_packages) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_report_missing_workbenches_single(self): """Test only missing one workbench""" @@ -179,12 +149,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.Cancel, ) self.installer_gui._report_missing_workbenches(wbs) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_report_missing_workbenches_multiple(self): """Test only missing one workbench""" @@ -194,12 +160,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.Cancel, ) self.installer_gui._report_missing_workbenches(wbs) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_resolve_dependencies_then_install(self): class MissingDependenciesMock: @@ -214,12 +176,8 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.Cancel, ) self.installer_gui._resolve_dependencies_then_install(missing) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_check_python_version_bad(self): class MissingDependenciesMock: @@ -232,15 +190,9 @@ class TestInstallerGui(unittest.TestCase): QtWidgets.QDialogButtonBox.Cancel, ) stop_installing = self.installer_gui._check_python_version(missing) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) - self.assertTrue( - stop_installing, "Failed to halt installation on bad Python version" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") + self.assertTrue(stop_installing, "Failed to halt installation on bad Python version") def test_check_python_version_good(self): class MissingDependenciesMock: @@ -249,9 +201,7 @@ class TestInstallerGui(unittest.TestCase): missing = MissingDependenciesMock() stop_installing = self.installer_gui._check_python_version(missing) - self.assertFalse( - stop_installing, "Failed to continue installation on good Python version" - ) + self.assertFalse(stop_installing, "Failed to continue installation on good Python version") def test_clean_up_optional(self): class MissingDependenciesMock: @@ -270,9 +220,7 @@ class TestInstallerGui(unittest.TestCase): self.assertTrue("allowed_packages_2" in missing.python_optional) self.assertFalse("disallowed_package" in missing.python_optional) - def intercept_run_dependency_installer( - self, addons, python_requires, python_optional - ): + def intercept_run_dependency_installer(self, addons, python_requires, python_optional): self.assertEqual(python_requires, ["py_req_1", "py_req_2"]) self.assertEqual(python_optional, ["py_opt_1", "py_opt_2"]) self.assertEqual(addons[0].name, "addon_1") @@ -294,9 +242,7 @@ class TestInstallerGui(unittest.TestCase): def __init__(self, items): self.list = [] for item in items: - self.list.append( - DialogMock.ListWidgetMock.ListWidgetItemMock(item) - ) + self.list.append(DialogMock.ListWidgetMock.ListWidgetItemMock(item)) def count(self): return len(self.list) @@ -305,15 +251,9 @@ class TestInstallerGui(unittest.TestCase): return self.list[i] def __init__(self): - self.listWidgetAddons = DialogMock.ListWidgetMock( - ["addon_1", "addon_2"] - ) - self.listWidgetPythonRequired = DialogMock.ListWidgetMock( - ["py_req_1", "py_req_2"] - ) - self.listWidgetPythonOptional = DialogMock.ListWidgetMock( - ["py_opt_1", "py_opt_2"] - ) + self.listWidgetAddons = DialogMock.ListWidgetMock(["addon_1", "addon_2"]) + self.listWidgetPythonRequired = DialogMock.ListWidgetMock(["py_req_1", "py_req_2"]) + self.listWidgetPythonOptional = DialogMock.ListWidgetMock(["py_opt_1", "py_opt_2"]) class AddonMock: def __init__(self, name): @@ -321,9 +261,7 @@ class TestInstallerGui(unittest.TestCase): self.installer_gui.dependency_dialog = DialogMock() self.installer_gui.addons = [AddonMock("addon_1"), AddonMock("addon_2")] - self.installer_gui._run_dependency_installer = ( - self.intercept_run_dependency_installer - ) + self.installer_gui._run_dependency_installer = self.intercept_run_dependency_installer self.installer_gui._dependency_dialog_yes_clicked() @@ -481,9 +419,7 @@ class TestMacroInstallerGui(unittest.TestCase): self.assertEqual(name, "UnitTestCustomToolbar") self.assertIn("alwaysAskForToolbar", self.installer.addon_params.params) self.assertFalse(self.installer.addon_params.get("alwaysAskForToolbar", True)) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_ask_for_toolbar_with_dialog_selection(self): @@ -530,9 +466,7 @@ class TestMacroInstallerGui(unittest.TestCase): def test_macro_button_exists_true(self): # Test 2: Macro is in the list of buttons ut_tb_1 = self.installer.toolbar_params.GetGroup("UnitTestCommand") - ut_tb_1.set( - "UnitTestCommand", "FreeCAD" - ) # This is what the real thing looks like... + ut_tb_1.set("UnitTestCommand", "FreeCAD") # This is what the real thing looks like... self.installer._find_custom_command = lambda _: "UnitTestCommand" self.assertTrue(self.installer._macro_button_exists()) diff --git a/src/Mod/AddonManager/AddonManagerTest/gui/test_uninstaller_gui.py b/src/Mod/AddonManager/AddonManagerTest/gui/test_uninstaller_gui.py index a665a8e6b9..538c8daac9 100644 --- a/src/Mod/AddonManager/AddonManagerTest/gui/test_uninstaller_gui.py +++ b/src/Mod/AddonManager/AddonManagerTest/gui/test_uninstaller_gui.py @@ -62,12 +62,8 @@ class TestUninstallerGUI(unittest.TestCase): QtWidgets.QDialogButtonBox.Yes, ) answer = self.uninstaller_gui._confirm_uninstallation() - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") self.assertTrue(answer, "Expected a 'Yes' click to return True, but got False") def test_confirmation_dialog_cancel(self): @@ -76,15 +72,9 @@ class TestUninstallerGUI(unittest.TestCase): QtWidgets.QDialogButtonBox.Cancel, ) answer = self.uninstaller_gui._confirm_uninstallation() - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) - self.assertFalse( - answer, "Expected a 'Cancel' click to return False, but got True" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") + self.assertFalse(answer, "Expected a 'Cancel' click to return False, but got True") def test_progress_dialog(self): dialog_watcher = DialogWatcher( @@ -95,12 +85,8 @@ class TestUninstallerGUI(unittest.TestCase): # That call isn't modal, so spin our own event loop: while self.uninstaller_gui.progress_dialog.isVisible(): QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents, 100) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_timer_launches_progress_dialog(self): worker = FakeWorker() @@ -108,22 +94,14 @@ class TestUninstallerGUI(unittest.TestCase): translate("AddonsInstaller", "Removing Addon"), QtWidgets.QDialogButtonBox.Cancel, ) - QtCore.QTimer.singleShot( - 1000, worker.stop - ) # If the test fails, this kills the "worker" + QtCore.QTimer.singleShot(1000, worker.stop) # If the test fails, this kills the "worker" self.uninstaller_gui._confirm_uninstallation = lambda: True self.uninstaller_gui._run_uninstaller = worker.work self.uninstaller_gui._finalize = lambda: None - self.uninstaller_gui.dialog_timer.setInterval( - 1 - ) # To speed up the test, only wait 1ms + self.uninstaller_gui.dialog_timer.setInterval(1) # To speed up the test, only wait 1ms self.uninstaller_gui.run() # Blocks once it hits the fake worker - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") worker.stop() def test_success_dialog(self): @@ -132,12 +110,8 @@ class TestUninstallerGUI(unittest.TestCase): QtWidgets.QDialogButtonBox.Ok, ) self.uninstaller_gui._succeeded(self.addon_to_remove) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_failure_dialog(self): dialog_watcher = DialogWatcher( @@ -147,17 +121,11 @@ class TestUninstallerGUI(unittest.TestCase): self.uninstaller_gui._failed( self.addon_to_remove, "Some failure message\nAnother failure message" ) - self.assertTrue( - dialog_watcher.dialog_found, "Failed to find the expected dialog box" - ) - self.assertTrue( - dialog_watcher.button_found, "Failed to find the expected button" - ) + self.assertTrue(dialog_watcher.dialog_found, "Failed to find the expected dialog box") + self.assertTrue(dialog_watcher.button_found, "Failed to find the expected button") def test_finalize(self): - self.uninstaller_gui.finished.connect( - functools.partial(self.catch_signal, "finished") - ) + self.uninstaller_gui.finished.connect(functools.partial(self.catch_signal, "finished")) self.uninstaller_gui.worker_thread = MockThread() self.uninstaller_gui._finalize() self.assertIn("finished", self.signals_caught) diff --git a/src/Mod/AddonManager/AddonManagerTest/gui/test_update_all_gui.py b/src/Mod/AddonManager/AddonManagerTest/gui/test_update_all_gui.py index 6740495fbe..c45d382d20 100644 --- a/src/Mod/AddonManager/AddonManagerTest/gui/test_update_all_gui.py +++ b/src/Mod/AddonManager/AddonManagerTest/gui/test_update_all_gui.py @@ -43,9 +43,7 @@ class MockUpdater(QtCore.QObject): self.addons = addons self.has_run = False self.emit_success = True - self.work_function = ( - None # Set to some kind of callable to make this function take time - ) + self.work_function = None # Set to some kind of callable to make this function take time def run(self): self.has_run = True @@ -136,9 +134,7 @@ class TestUpdateAllGui(unittest.TestCase): self.test_object.run() cancel_timer = QtCore.QTimer() cancel_timer.timeout.connect( - self.test_object.dialog.buttonBox.button( - QtWidgets.QDialogButtonBox.Cancel - ).click + self.test_object.dialog.buttonBox.button(QtWidgets.QDialogButtonBox.Cancel).click ) cancel_timer.start(90) while self.test_object.is_running(): diff --git a/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_startup.py b/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_startup.py index 1a3a2c0a25..c3dda4b72a 100644 --- a/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_startup.py +++ b/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_startup.py @@ -45,9 +45,7 @@ class TestWorkersStartup(unittest.TestCase): MODULE = "test_workers_startup" # file name without extension - @unittest.skipUnless( - run_slow_tests, "This integration test is slow and uses the network" - ) + @unittest.skipUnless(run_slow_tests, "This integration test is slow and uses the network") def setUp(self): """Set up the test""" self.test_dir = os.path.join( @@ -56,12 +54,8 @@ class TestWorkersStartup(unittest.TestCase): self.saved_mod_directory = Addon.mod_directory self.saved_cache_directory = Addon.cache_directory - Addon.mod_directory = os.path.join( - tempfile.gettempdir(), "FreeCADTesting", "Mod" - ) - Addon.cache_directory = os.path.join( - tempfile.gettempdir(), "FreeCADTesting", "Cache" - ) + Addon.mod_directory = os.path.join(tempfile.gettempdir(), "FreeCADTesting", "Mod") + Addon.cache_directory = os.path.join(tempfile.gettempdir(), "FreeCADTesting", "Cache") os.makedirs(Addon.mod_directory, mode=0o777, exist_ok=True) os.makedirs(Addon.cache_directory, mode=0o777, exist_ok=True) @@ -82,9 +76,7 @@ class TestWorkersStartup(unittest.TestCase): self.package_cache = {} self.macro_cache = [] - self.package_cache_filename = os.path.join( - Addon.cache_directory, "packages.json" - ) + self.package_cache_filename = os.path.join(Addon.cache_directory, "packages.json") self.macro_cache_filename = os.path.join(Addon.cache_directory, "macros.json") # Store the user's preference for whether git is enabled or disabled @@ -135,9 +127,7 @@ class TestWorkersStartup(unittest.TestCase): # Now try loading the same data from the cache we just created worker = LoadPackagesFromCacheWorker(self.package_cache_filename) - worker.override_metadata_cache_path( - os.path.join(Addon.cache_directory, "PackageMetadata") - ) + worker.override_metadata_cache_path(os.path.join(Addon.cache_directory, "PackageMetadata")) worker.addon_repo.connect(self._addon_added) worker.start() diff --git a/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_utility.py b/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_utility.py index 7f0478ff5a..cea77491aa 100644 --- a/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_utility.py +++ b/src/Mod/AddonManager/AddonManagerTest/gui/test_workers_utility.py @@ -69,9 +69,7 @@ class TestWorkersUtility(unittest.TestCase): while worker.isRunning(): QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents, 50) QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents) - self.assertIsNone( - self.last_result, "Requesting interruption of thread failed to interrupt" - ) + self.assertIsNone(self.last_result, "Requesting interruption of thread failed to interrupt") def connection_succeeded(self): self.last_result = "SUCCESS" diff --git a/src/Mod/AddonManager/AddonManagerTest/test_information.md b/src/Mod/AddonManager/AddonManagerTest/test_information.md index 5baf0049cf..5df8cbc554 100644 --- a/src/Mod/AddonManager/AddonManagerTest/test_information.md +++ b/src/Mod/AddonManager/AddonManagerTest/test_information.md @@ -1,3 +1,3 @@ ## Unit tests for the Addon Manager -Data files are located in the `data/` subdirectory. \ No newline at end of file +Data files are located in the `data/` subdirectory. diff --git a/src/Mod/AddonManager/CMakeLists.txt b/src/Mod/AddonManager/CMakeLists.txt index 7cad775fa4..dc9e527c49 100644 --- a/src/Mod/AddonManager/CMakeLists.txt +++ b/src/Mod/AddonManager/CMakeLists.txt @@ -7,6 +7,7 @@ SET(AddonManager_SRCS Addon.py AddonManager.py AddonManager.ui + addonmanager_cache.py addonmanager_connection_checker.py addonmanager_dependency_installer.py addonmanager_devmode.py @@ -85,6 +86,7 @@ SET(AddonManagerTestsApp_SRCS AddonManagerTest/app/__init__.py AddonManagerTest/app/mocks.py AddonManagerTest/app/test_addon.py + AddonManagerTest/app/test_cache.py AddonManagerTest/app/test_dependency_installer.py AddonManagerTest/app/test_freecad_interface.py AddonManagerTest/app/test_git.py diff --git a/src/Mod/AddonManager/NetworkManager.py b/src/Mod/AddonManager/NetworkManager.py index 7848e952d6..c869f73d64 100644 --- a/src/Mod/AddonManager/NetworkManager.py +++ b/src/Mod/AddonManager/NetworkManager.py @@ -105,9 +105,7 @@ if HAVE_QTNETWORK: class QueueItem: """A container for information about an item in the network queue.""" - def __init__( - self, index: int, request: QtNetwork.QNetworkRequest, track_progress: bool - ): + def __init__(self, index: int, request: QtNetwork.QNetworkRequest, track_progress: bool): self.index = index self.request = request self.original_url = request.url() @@ -126,9 +124,7 @@ if HAVE_QTNETWORK: # Connect to progress_made and progress_complete for large amounts of data, which get buffered into a temp file # That temp file should be deleted when your code is done with it - progress_made = QtCore.Signal( - int, int, int - ) # Index, bytes read, total bytes (may be None) + progress_made = QtCore.Signal(int, int, int) # Index, bytes read, total bytes (may be None) progress_complete = QtCore.Signal( int, int, os.PathLike @@ -153,18 +149,14 @@ if HAVE_QTNETWORK: # Make sure we exit nicely on quit if QtCore.QCoreApplication.instance() is not None: - QtCore.QCoreApplication.instance().aboutToQuit.connect( - self.__aboutToQuit - ) + QtCore.QCoreApplication.instance().aboutToQuit.connect(self.__aboutToQuit) # Create the QNAM on this thread: self.QNAM = QtNetwork.QNetworkAccessManager() self.QNAM.proxyAuthenticationRequired.connect(self.__authenticate_proxy) self.QNAM.authenticationRequired.connect(self.__authenticate_resource) - qnam_cache = QtCore.QStandardPaths.writableLocation( - QtCore.QStandardPaths.CacheLocation - ) + qnam_cache = QtCore.QStandardPaths.writableLocation(QtCore.QStandardPaths.CacheLocation) os.makedirs(qnam_cache, exist_ok=True) self.diskCache = QtNetwork.QNetworkDiskCache() self.diskCache.setCacheDirectory(qnam_cache) @@ -206,9 +198,7 @@ if HAVE_QTNETWORK: ) proxy = QtNetwork.QNetworkProxyFactory.systemProxyForQuery(query) if proxy and proxy[0]: - self.QNAM.setProxy( - proxy[0] - ) # This may still be QNetworkProxy.NoProxy + self.QNAM.setProxy(proxy[0]) # This may still be QNetworkProxy.NoProxy elif userProxyCheck: host, _, port_string = proxy_string.rpartition(":") try: @@ -223,9 +213,7 @@ if HAVE_QTNETWORK: ) port = 0 # For now assume an HttpProxy, but eventually this should be a parameter - proxy = QtNetwork.QNetworkProxy( - QtNetwork.QNetworkProxy.HttpProxy, host, port - ) + proxy = QtNetwork.QNetworkProxy(QtNetwork.QNetworkProxy.HttpProxy, host, port) self.QNAM.setProxy(proxy) def _setup_proxy_freecad(self): @@ -314,9 +302,7 @@ if HAVE_QTNETWORK: except queue.Empty: pass - def __launch_request( - self, index: int, request: QtNetwork.QNetworkRequest - ) -> None: + def __launch_request(self, index: int, request: QtNetwork.QNetworkRequest) -> None: """Given a network request, ask the QNetworkAccessManager to begin processing it.""" reply = self.QNAM.get(request) self.replies[index] = reply @@ -338,9 +324,7 @@ if HAVE_QTNETWORK: current_index = next(self.counting_iterator) # A thread-safe counter # Use a queue because we can only put things on the QNAM from the main event loop thread self.queue.put( - QueueItem( - current_index, self.__create_get_request(url), track_progress=False - ) + QueueItem(current_index, self.__create_get_request(url), track_progress=False) ) self.__request_queued.emit() return current_index @@ -356,9 +340,7 @@ if HAVE_QTNETWORK: current_index = next(self.counting_iterator) # A thread-safe counter # Use a queue because we can only put things on the QNAM from the main event loop thread self.queue.put( - QueueItem( - current_index, self.__create_get_request(url), track_progress=True - ) + QueueItem(current_index, self.__create_get_request(url), track_progress=True) ) self.__request_queued.emit() return current_index @@ -371,9 +353,7 @@ if HAVE_QTNETWORK: self.synchronous_complete[current_index] = False self.queue.put( - QueueItem( - current_index, self.__create_get_request(url), track_progress=False - ) + QueueItem(current_index, self.__create_get_request(url), track_progress=False) ) self.__request_queued.emit() while True: @@ -415,9 +395,7 @@ if HAVE_QTNETWORK: QtNetwork.QNetworkRequest.RedirectPolicyAttribute, QtNetwork.QNetworkRequest.UserVerifiedRedirectPolicy, ) - request.setAttribute( - QtNetwork.QNetworkRequest.CacheSaveControlAttribute, True - ) + request.setAttribute(QtNetwork.QNetworkRequest.CacheSaveControlAttribute, True) request.setAttribute( QtNetwork.QNetworkRequest.CacheLoadControlAttribute, QtNetwork.QNetworkRequest.PreferNetwork, @@ -457,9 +435,7 @@ if HAVE_QTNETWORK: ) proxy_authentication.setWindowFlag(QtCore.Qt.WindowStaysOnTopHint, True) # Show the right labels, etc. - proxy_authentication.labelProxyAddress.setText( - f"{reply.hostName()}:{reply.port()}" - ) + proxy_authentication.labelProxyAddress.setText(f"{reply.hostName()}:{reply.port()}") if authenticator.realm(): proxy_authentication.labelProxyRealm.setText(authenticator.realm()) else: @@ -468,9 +444,7 @@ if HAVE_QTNETWORK: result = proxy_authentication.exec() if result == QtWidgets.QDialogButtonBox.Ok: authenticator.setUser(proxy_authentication.lineEditUsername.text()) - authenticator.setPassword( - proxy_authentication.lineEditPassword.text() - ) + authenticator.setPassword(proxy_authentication.lineEditPassword.text()) else: username = input("Proxy username: ") import getpass @@ -502,8 +476,7 @@ if HAVE_QTNETWORK: """Called when an SSL error occurs: prints the error information.""" if HAVE_FREECAD: FreeCAD.Console.PrintWarning( - translate("AddonsInstaller", "Error with encrypted connection") - + "\n:" + translate("AddonsInstaller", "Error with encrypted connection") + "\n:" ) FreeCAD.Console.PrintWarning(reply) for error in errors: @@ -549,9 +522,7 @@ if HAVE_QTNETWORK: f.write(buffer.data()) except OSError as e: if HAVE_FREECAD: - FreeCAD.Console.PrintError( - f"Network Manager internal error: {str(e)}" - ) + FreeCAD.Console.PrintError(f"Network Manager internal error: {str(e)}") else: print(f"Network Manager internal error: {str(e)}") @@ -560,15 +531,10 @@ if HAVE_QTNETWORK: any notifications have been called.""" reply = self.sender() if not reply: - print( - "Network Manager Error: __reply_finished not called by a Qt signal" - ) + print("Network Manager Error: __reply_finished not called by a Qt signal") return - if ( - reply.error() - == QtNetwork.QNetworkReply.NetworkError.OperationCanceledError - ): + if reply.error() == QtNetwork.QNetworkReply.NetworkError.OperationCanceledError: # Silently do nothing return @@ -581,9 +547,7 @@ if HAVE_QTNETWORK: print(f"Lost net request for {reply.url()}") return - response_code = reply.attribute( - QtNetwork.QNetworkRequest.HttpStatusCodeAttribute - ) + response_code = reply.attribute(QtNetwork.QNetworkRequest.HttpStatusCodeAttribute) self.queue.task_done() if reply.error() == QtNetwork.QNetworkReply.NetworkError.NoError: if index in self.monitored_connections: @@ -611,9 +575,7 @@ else: # HAVE_QTNETWORK is false: completed = QtCore.Signal( int, int, bytes ) # Emitted as soon as the request is made, with a connection failed error - progress_made = QtCore.Signal( - int, int, int - ) # Never emitted, no progress is made here + progress_made = QtCore.Signal(int, int, int) # Never emitted, no progress is made here progress_complete = QtCore.Signal( int, int, os.PathLike ) # Emitted as soon as the request is made, with a connection failed error @@ -675,9 +637,7 @@ if __name__ == "__main__": """Attached to the completion signal, prints diagnostic information about the network access""" global count if code == 200: - print( - f"For request {index+1}, response was {data.size()} bytes.", flush=True - ) + print(f"For request {index+1}, response was {data.size()} bytes.", flush=True) else: print( f"For request {index+1}, request failed with HTTP result code {code}", diff --git a/src/Mod/AddonManager/Resources/icons/BCFPlugin_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/BCFPlugin_workbench_icon.svg index 804c7fa1df..ccf9f03b06 100644 --- a/src/Mod/AddonManager/Resources/icons/BCFPlugin_workbench_icon.svg +++ b/src/Mod/AddonManager/Resources/icons/BCFPlugin_workbench_icon.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/Resources/icons/Geomatics_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/Geomatics_workbench_icon.svg index 3cecf6615d..e39563c820 100644 --- a/src/Mod/AddonManager/Resources/icons/Geomatics_workbench_icon.svg +++ b/src/Mod/AddonManager/Resources/icons/Geomatics_workbench_icon.svg @@ -1 +1 @@ -Layer 1 \ No newline at end of file +Layer 1 diff --git a/src/Mod/AddonManager/Resources/icons/TaackPLM_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/TaackPLM_workbench_icon.svg index 110009594d..39e96c180d 100644 --- a/src/Mod/AddonManager/Resources/icons/TaackPLM_workbench_icon.svg +++ b/src/Mod/AddonManager/Resources/icons/TaackPLM_workbench_icon.svg @@ -4,7 +4,7 @@ .st0{fill:none;} - + @@ -12,15 +12,15 @@ - + - + - + - - + + diff --git a/src/Mod/AddonManager/Resources/icons/dodo_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/dodo_workbench_icon.svg index 0d2cd46e84..fff4d48dce 100644 --- a/src/Mod/AddonManager/Resources/icons/dodo_workbench_icon.svg +++ b/src/Mod/AddonManager/Resources/icons/dodo_workbench_icon.svg @@ -209,4 +209,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/Resources/icons/fasteners_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/fasteners_workbench_icon.svg index 3a91a7b287..9a0e574186 100644 --- a/src/Mod/AddonManager/Resources/icons/fasteners_workbench_icon.svg +++ b/src/Mod/AddonManager/Resources/icons/fasteners_workbench_icon.svg @@ -1062,4 +1062,4 @@ id="path7525" d="M 10.394317,26.928236 C 6.0245941,22.283194 6.0765809,17.114547 10.538806,12.562787 16.543902,6.4372003 29.103274,3.5349553 40.872882,5.5531278 c 1.244209,0.2133484 3.085054,0.6218847 4.090769,0.9078584 l 1.828571,0.5199524 -1.260833,0.1285101 c -5.827548,0.5939709 -13.018922,3.5878883 -19.489477,8.1138723 -4.131135,2.88962 -8.415065,6.667234 -12.013782,10.593878 -1.20896,1.319123 -2.248653,2.398408 -2.310428,2.398408 -0.06178,0 -0.657299,-0.579317 -1.323385,-1.287371 z" style="opacity:1;fill:url(#linearGradient7541);fill-opacity:1;stroke:#000000;stroke-width:0.75590551;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - inkscape:connector-curvature="0" /> \ No newline at end of file + inkscape:connector-curvature="0" /> diff --git a/src/Mod/AddonManager/Resources/icons/flamingo_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/flamingo_workbench_icon.svg index 7ade88f6c5..a709f5b55f 100644 --- a/src/Mod/AddonManager/Resources/icons/flamingo_workbench_icon.svg +++ b/src/Mod/AddonManager/Resources/icons/flamingo_workbench_icon.svg @@ -142,4 +142,4 @@ - \ No newline at end of file + diff --git a/src/Mod/AddonManager/Resources/icons/sheetmetal_workbench_icon.svg b/src/Mod/AddonManager/Resources/icons/sheetmetal_workbench_icon.svg index 0de9d9d024..653cddf314 100644 --- a/src/Mod/AddonManager/Resources/icons/sheetmetal_workbench_icon.svg +++ b/src/Mod/AddonManager/Resources/icons/sheetmetal_workbench_icon.svg @@ -748,4 +748,4 @@ id="path7555" d="M 1.1006857,295.7803 15.528592,281.35239 v 7.21396 l -7.2139532,7.21395 z" style="fill:url(#linearGradient4474);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - inkscape:connector-curvature="0" /> \ No newline at end of file + inkscape:connector-curvature="0" /> diff --git a/src/Mod/AddonManager/Resources/licenses/BSD-2-Clause.txt b/src/Mod/AddonManager/Resources/licenses/BSD-2-Clause.txt index 702c09ea1c..b6e0e031a3 100644 --- a/src/Mod/AddonManager/Resources/licenses/BSD-2-Clause.txt +++ b/src/Mod/AddonManager/Resources/licenses/BSD-2-Clause.txt @@ -1,20 +1,20 @@ Copyright <%%YEAR%%> <%%COPYRIGHT HOLDER%%> -Redistribution and use in source and binary forms, with or without modification, are permitted +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of -conditions and the following disclaimer in the documentation and/or other materials provided with +2. Redistributions in binary form must reproduce the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/Mod/AddonManager/Resources/licenses/BSD-3-Clause.txt b/src/Mod/AddonManager/Resources/licenses/BSD-3-Clause.txt index 7ae7687aaf..fe112b08ea 100644 --- a/src/Mod/AddonManager/Resources/licenses/BSD-3-Clause.txt +++ b/src/Mod/AddonManager/Resources/licenses/BSD-3-Clause.txt @@ -1,23 +1,23 @@ Copyright <%%YEAR%%> <%%COPYRIGHT HOLDER%%> -Redistribution and use in source and binary forms, with or without modification, are permitted +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this list of -conditions and the following disclaimer in the documentation and/or other materials provided with +2. Redistributions in binary form must reproduce the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the names of its contributors may be used to +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/Mod/AddonManager/Resources/licenses/CC0v1.txt b/src/Mod/AddonManager/Resources/licenses/CC0v1.txt index cb097a491b..ae39b2e3cd 100644 --- a/src/Mod/AddonManager/Resources/licenses/CC0v1.txt +++ b/src/Mod/AddonManager/Resources/licenses/CC0v1.txt @@ -1,97 +1,97 @@ CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF -THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS +THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. Statement of Purpose -The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and -Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") +The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and +Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of -contributing to a commons of creative, cultural and scientific works ("Commons") that the public -can reliably and without fear of later claims of infringement build upon, modify, incorporate in -other works, reuse and redistribute as freely as possible in any form whatsoever and for any -purposes, including without limitation commercial purposes. These owners may contribute to the -Commons to promote the ideal of a free culture and the further production of creative, cultural -and scientific works, or to gain reputation or greater distribution for their Work in part through +contributing to a commons of creative, cultural and scientific works ("Commons") that the public +can reliably and without fear of later claims of infringement build upon, modify, incorporate in +other works, reuse and redistribute as freely as possible in any form whatsoever and for any +purposes, including without limitation commercial purposes. These owners may contribute to the +Commons to promote the ideal of a free culture and the further production of creative, cultural +and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. -For these and/or other purposes and motivations, and without any expectation of additional -consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the -extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects +For these and/or other purposes and motivations, and without any expectation of additional +consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the +extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or -her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on +her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. -1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and -related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights +1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and +related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; moral rights retained by the original author(s) and/or performer(s); publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; -rights protecting against unfair competition in regards to a Work, subject to the limitations in +rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; rights protecting the extraction, dissemination, use and reuse of data in a Work; -database rights (such as those arising under Directive 96/9/EC of the European Parliament and of -the Council of 11 March 1996 on the legal protection of databases, and under any national +database rights (such as those arising under Directive 96/9/EC of the European Parliament and of +the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and -other similar, equivalent or corresponding rights throughout the world based on applicable +other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. -2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, -Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, -and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as future claims and causes -of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided -by applicable law or treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the -Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's -heirs and successors, fully intending that such Waiver shall not be subject to revocation, -rescission, cancellation, termination, or any other legal or equitable action to disrupt the -quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of +2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, +Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, +and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as future claims and causes +of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided +by applicable law or treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the +Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's +heirs and successors, fully intending that such Waiver shall not be subject to revocation, +rescission, cancellation, termination, or any other legal or equitable action to disrupt the +quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. -3. Public License Fallback. Should any part of the Waiver for any reason be judged legally -invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum +3. Public License Fallback. Should any part of the Waiver for any reason be judged legally +invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, -non-transferable, non sublicensable, non exclusive, irrevocable and unconditional license to -exercise Affirmer's Copyright and Related Rights in the Work -(i) in all territories worldwide, -(ii) for the maximum duration provided by applicable law or treaty (including future time -extensions), -(iii) in any current or future medium and for any number of copies, and -(iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional +extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, +non-transferable, non sublicensable, non exclusive, irrevocable and unconditional license to +exercise Affirmer's Copyright and Related Rights in the Work +(i) in all territories worldwide, +(ii) for the maximum duration provided by applicable law or treaty (including future time +extensions), +(iii) in any current or future medium and for any number of copies, and +(iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by -Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or -ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate -the remainder of the License, and in such case Affirmer hereby affirms that he or she will not -(i) exercise any of his or her remaining Copyright and Related Rights in the Work or -(ii) assert any associated claims and causes of action with respect to the Work, in either case +Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or +ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate +the remainder of the License, and in such case Affirmer hereby affirms that he or she will not +(i) exercise any of his or her remaining Copyright and Related Rights in the Work or +(ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. -No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or +No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. -Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning -the Work, express, implied, statutory or otherwise, including without limitation warranties of -title, merchantability, fitness for a particular purpose, non infringement, or the absence of -latent or other defects, accuracy, or the present or absence of errors, whether or not +Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning +the Work, express, implied, statutory or otherwise, including without limitation warranties of +title, merchantability, fitness for a particular purpose, non infringement, or the absence of +latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work -or any use thereof, including without limitation any person's Copyright and Related Rights in the -Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions +or any use thereof, including without limitation any person's Copyright and Related Rights in the +Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. -Affirmer understands and acknowledges that Creative Commons is not a party to this document and has +Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. diff --git a/src/Mod/AddonManager/Resources/licenses/LGPLv2.1.txt b/src/Mod/AddonManager/Resources/licenses/LGPLv2.1.txt index 745d96744f..e5ab03e123 100644 --- a/src/Mod/AddonManager/Resources/licenses/LGPLv2.1.txt +++ b/src/Mod/AddonManager/Resources/licenses/LGPLv2.1.txt @@ -55,7 +55,7 @@ modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a @@ -111,7 +111,7 @@ modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -158,7 +158,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -216,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. @@ -267,7 +267,7 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work @@ -329,7 +329,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -370,7 +370,7 @@ subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -422,7 +422,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager.ts b/src/Mod/AddonManager/Resources/translations/AddonManager.ts index 8044667d0b..b6ca06386b 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager.ts @@ -21,11 +21,6 @@
CompactView - - - Form - - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies @@ -417,11 +412,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - - @@ -471,11 +461,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - - Licenses @@ -1113,9 +1098,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar @@ -1134,7 +1119,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? @@ -1162,136 +1147,136 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... - + Loading addon information - + Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... - + Addon manager - + You must restart FreeCAD for changes to take effect. - + Restart now - + Restart later - - + + Refresh local cache - + Updating cache... - + Could not find addon '{}' to select - - + + Checking for updates... - + Apply {} update(s) - + No updates available - - - + + + Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. - - + + - + Maintainer - - - - + + + + Author - + New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... - - + + Update - + Updating... @@ -1301,63 +1286,63 @@ installed addons will be checked for available updates - + Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server - + Error with encrypted connection - + - + Confirm remove - + Are you sure you want to uninstall {}? - - - + + + Removing Addon - + Removing {} - - + + Uninstall complete - - + + Uninstall failed @@ -1367,183 +1352,183 @@ installed addons will be checked for available updates - + Version {version} installed on {date} - + Version {version} installed - + Installed on {date} - - - - + + + + Installed - + On branch {}, update available to version - + Update available to version - + An update is available - + Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} - + Updated, please restart FreeCAD to use - + Update check in progress - + Automatic update checks disabled - + Installation location - + WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro - + Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. - + Success - + Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported - + Install - + Uninstall - + Check for Update - + Run Macro - + Change Branch - + Enable - + Disable - + Return to package list - + The page is taking a long time to load... showing the data we have so far... @@ -1558,17 +1543,17 @@ installed addons will be checked for available updates - + Connection failed - + Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1579,12 +1564,12 @@ installed addons will be checked for available updates - + Select the corresponding license file in your Addon - + Location for new license file @@ -1599,75 +1584,75 @@ installed addons will be checked for available updates - + Unrecognized content kind '{}' - + Unable to locate icon at {} - + Select an icon file for this content item - - - + + + {} is not a subdirectory of {} - + Select the subdirectory for this content item - + Automatic - + Workbench - + Addon - + Python - + Yes - + Internal Workbench - + External Addon - + Python Package - - + + Other... @@ -1684,10 +1669,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement @@ -1708,7 +1693,7 @@ installed addons will be checked for available updates - + Incompatible Python version @@ -1730,7 +1715,7 @@ installed addons will be checked for available updates - + Cannot execute Python @@ -1746,7 +1731,7 @@ installed addons will be checked for available updates - + Cannot execute pip @@ -1763,7 +1748,7 @@ installed addons will be checked for available updates - + Package installation failed @@ -1799,7 +1784,7 @@ installed addons will be checked for available updates - + Installation Failed @@ -1810,19 +1795,19 @@ installed addons will be checked for available updates - + Create new toolbar - + A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' @@ -1833,304 +1818,304 @@ installed addons will be checked for available updates - + XML failure while reading metadata from file {} - + Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name - + Class - + Description - + Subdirectory - + Files - + Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate - + Scanning Addon for Python version compatibility - + Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} - + Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi - - + + Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate - + Select an icon file for this package - + Filter is valid - + Filter regular expression is invalid - + Click for details about package {} - + Click for details about workbench {} - + Click for details about macro {} - + Maintainers: - + Tags - + updated - - + + Up-to-date - - - + + + Update available - - + + Pending restart - - + + DISABLED - + Installed version - + Unknown version - + Installed on - + Available version - + Show Addons containing: - + All - + Workbenches - + Macros - + Preference Packs - + Status: - + Any - + Not installed - + Filter - + OK - + DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology - + Tag git terminology - + Kind Table header for git ref type (e.g. either Tag or Branch) - + Local name Table header for git ref name - + Tracking Table header for git remote tracking branch name name - + Local updated Table header for git update time of local branch - + Remote updated Table header for git update time of remote branch @@ -2141,77 +2126,77 @@ installed addons will be checked for available updates - + Installation of optional package failed - + Installing required dependency {} - + Installation of Addon {} failed - + Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} - + Downloaded icon for {} - + Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) @@ -2252,17 +2237,17 @@ installed addons will be checked for available updates - + Removed extra installed file {} - + Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: @@ -2272,130 +2257,130 @@ installed addons will be checked for available updates - + WARNING: Duplicate addon {} ignored - + Workbenches list was updated. - + Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... - + Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} - + git status failed for {} - + Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' - + Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} - + Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! - + Retrieving macro description... - + Retrieving info from git - + Retrieving info from wiki - + Repository URL Preferences header for custom repositories - + Branch name Preferences header for custom repositories @@ -2411,7 +2396,7 @@ installed addons will be checked for available updates - + Failed to clone {} into {} using git @@ -2431,12 +2416,12 @@ installed addons will be checked for available updates - + Update was cancelled - + some addons may have been updated @@ -2444,12 +2429,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager - + Manage external workbenches, macros, and preference packs @@ -2457,12 +2442,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} - + Failed to remove some files @@ -2470,7 +2455,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons @@ -2486,7 +2471,7 @@ installed addons will be checked for available updates QObject - + Addon Manager diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_be.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_be.qm index 8e21886dde..a7dcd27a76 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_be.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_be.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_be.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_be.ts index a15294bdc3..5b1780acb0 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_be.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_be.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Форма - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Дазволіць залежнасці @@ -296,7 +291,7 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore View and update Python package dependencies - Праглядзець і абнавіць залежнасці пакета Python + Паглядзець і абнавіць залежнасці пакета Python @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Форма - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Форма - Licenses @@ -1120,9 +1105,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Абраць Панэль інструментаў @@ -1141,7 +1126,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Дадаць кнопку? @@ -1169,139 +1154,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Запуск... - + Loading addon information Загрузка звестак аб дадатку - + Worker process {} is taking a long time to stop... Працоўнаму працэсу {} патрабуецца шмат часу, каб спыніцца... - + Previous cache process was interrupted, restarting... Папярэдні працэс кэшу быў перапынены, перазапуск... - + Custom repo list changed, forcing recache... Карыстальніцкі спіс сховішча зменены, паўторнае абнаўленне кэшу... - + Addon manager Кіраванне дадаткамі - + You must restart FreeCAD for changes to take effect. Вы павінны перазапусціць FreeCAD, каб змены былі ўжытыя. - + Restart now Перазапусціць зараз - + Restart later Перазапусціць пазней - - + + Refresh local cache Абнавіць лакальны кэш - + Updating cache... Абнаўленне кэшу... - + Could not find addon '{}' to select Не атрымалася знайсці дадатак '{}' для выбару - - + + Checking for updates... Праверыць наяўнасць абнаўленняў... - + Apply {} update(s) Прымяніць {} абнаўленне(і) - + No updates available Даступныя абнаўленні адсутнічаюць - - - + + + Cannot launch a new installer until the previous one has finished. Не атрымалася запусціць новы ўстаноўшчык, каб скончыць працу папярэдняга. - + Execution of macro failed. See console for failure details. Не атрымалася выканаць макрас. Падрабязныя звесткі аб збоі глядзіце ў кансолі. - - + + - + Maintainer Суправаджальнік - - - - + + + + Author Аўтар - + New Python Version Detected Выяўлена новая версія Python - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Падобна на тое, што гэта першы раз, калі гэтая версія Python ужываецца з Кіраваннем дадаткамі. Ці жадаеце вы ўсталяваць для яго тыя ж аўтаматычна ўсталяваныя залежнасці? - + Processing, please wait... Апрацоўка, калі ласка, пачакайце... - - + + Update Абнавіць - + Updating... Абнаўленне... @@ -1311,63 +1296,63 @@ installed addons will be checked for available updates Не атрымалася імпартаваць QtNetwork - падобна на тое, што ён не ўсталяваны ў вашай сістэме. Ваш пастаўшчык можа мець пакет для гэтай залежнасці (часта названы як "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Не атрымалася пераўтварыць паказаны порт проксі '{}' у нумар порта - + Parameter error: mutually exclusive proxy options set. Resetting to default. Памылка налады: усталяваны ўзаемавыключальныя налады проксі. Скінуць да першапачатковага значэння. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Памылка налады: паказаны карыстальніцкі проксі, але проксі не прадстаўлены. Скінуць да першапачатковага значэння. - + Addon Manager: Unexpected {} response from server Кіраванне дадаткамі: Нечаканы адказ {} ад сервера - + Error with encrypted connection Памылка з зашыфраваным злучэннем - + - + Confirm remove Пацвердзіць выдаленне - + Are you sure you want to uninstall {}? Вы ўпэўненыя, што жадаеце выдаліць {}? - - - + + + Removing Addon Выдаленне Дадатку - + Removing {} Выдаленне {} - - + + Uninstall complete Выдаленне завершана - - + + Uninstall failed Не атрымалася выдаліць @@ -1377,183 +1362,183 @@ installed addons will be checked for available updates Папярэджанне Кіравання дадаткамі: не атрымалася імпартаваць QtWebEngineWidgets - дадзеныя README будуць адлюстроўвацца толькі ў тэкставым фармаце - + Version {version} installed on {date} Версія {version} усталяваная {date} - + Version {version} installed Версія {version} усталяваная - + Installed on {date} Дата ўсталявання {date} - - - - + + + + Installed Усталявана - + On branch {}, update available to version У галіне {}, даступна абнаўленне да версіі - + Update available to version Абнаўленне даступна да версіі - + An update is available Даступна абнаўленне - + Git tag '{}' checked out, no updates possible Метка Git'{}' праверана, абнаўленняў няма - + This is the latest version available for branch {} Гэта апошняя даступная версія для галіны {} - + Updated, please restart FreeCAD to use Абноўлена, калі ласка перазапусціце FreeCAD, каб ужыць - + Update check in progress Выконваецца праверка абнаўленняў - + Automatic update checks disabled Аўтаматычная праверка абнаўленняў адключана - + Installation location Месцазнаходжанне ўстаноўкі - + WARNING: This addon is obsolete УВАГА: Гэты дадатак састарэлы - + WARNING: This addon is Python 2 Only УВАГА: Гэты дадатак толькі для Python 2 - + WARNING: This addon requires FreeCAD УВАГА: Гэты дадатак патрабуе FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. УВАГА: Гэты дадатак у бягучы час усталяваны, але адключаны. Націснуць кнопку 'Уключыць', каб зноў уключыць яго. - - + + No URL or wiki page provided by this macro Гэты макрас не дае URL-адрас ці вікі-старонкі - + Could not load README data from URL {} Не атрымалася загрузіць дадзеныя README з URL-адрасам {} - + This Addon will be enabled next time you restart FreeCAD. Гэты Дадатак будзе ўключаны пры наступным перазапуску FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Гэты Дадатак будзе адключаны пры наступным перазапуску FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. Прывязкі Python да QtWebEngine не ўсталяваныя - ужытае замяняе адлюстраванне README. - + Success Паспяхова завершана - + Branch change succeeded, please restart to use the new version. Змена галіны прайшло паспяхова, калі ласка, перазапусціце, каб ужыць новую версію. - + Changed to git ref '{}' -- please restart to use Addon. Зменены на git ref '{}' -- калі ласка, перазапусціце, каб ужыць Дадатак. - + Page JavaScript reported Заяўленая старонка JavaScript - + Install Усталяваць - + Uninstall Выдаліць - + Check for Update Праверыць наяўнасць абнаўлення - + Run Macro Выканаць макрас - + Change Branch Змяніць галіну - + Enable Уключыць - + Disable Адключыць - + Return to package list Вярнуцца да спісу пакетаў - + The page is taking a long time to load... showing the data we have so far... Загрузка старонкі займае шмат часу... паказваюцца дадзеныя, якія ёсць на дадзены момант... @@ -1568,19 +1553,20 @@ installed addons will be checked for available updates Праверка злучэння з GitHub... - + Connection failed Не атрымалася злучыцца - + Missing dependency Залежнасці адсутнічаюць - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. - Не атрымалася імпартаваць QtNetwork -- падрабязнасці глядзіце ў Праглядзе справаздачы. Кіраванне дадаткамі недаступнае. + Не атрымалася імпартаваць QtNetwork -- падрабязнасці глядзіце ў Праглядзе справаздачы. +Кіраванне дадаткамі недаступнае. @@ -1589,12 +1575,12 @@ installed addons will be checked for available updates Іншы... - + Select the corresponding license file in your Addon Абярыце адпаведны файл ліцэнзіі ў вашым Дадатку - + Location for new license file Месцазнаходжанне новага файла ліцэнзіі @@ -1609,75 +1595,75 @@ installed addons will be checked for available updates Не атрымалася ўсталяваць макрас {} - + Unrecognized content kind '{}' Непрызнаны тып зместу '{}' - + Unable to locate icon at {} Немагчыма знайсці гузік у {} - + Select an icon file for this content item Абраць файл гузіку для гэтага элемента зместу - - - + + + {} is not a subdirectory of {} {} не з'яўляецца ўкладзеным каталогам {} - + Select the subdirectory for this content item Абраць укладзены каталог для гэтага элемента зместу - + Automatic Аўтаматычна - + Workbench Варштат - + Addon Дадатак - + Python Python - + Yes Так - + Internal Workbench Унутраны варштат - + External Addon Вонкавы Дадатак - + Python Package Пакет Python - - + + Other... Іншы... @@ -1694,10 +1680,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Адсутнічаюць патрабаванні @@ -1718,7 +1704,7 @@ installed addons will be checked for available updates - + Incompatible Python version Несумяшчальная версія Python @@ -1740,7 +1726,7 @@ installed addons will be checked for available updates - + Cannot execute Python Не атрымалася выканаць Python @@ -1756,7 +1742,7 @@ installed addons will be checked for available updates - + Cannot execute pip Не атрымалася выканаць праграму pip @@ -1775,7 +1761,7 @@ installed addons will be checked for available updates - + Package installation failed Не атрымалася ўсталяваць пакет @@ -1811,7 +1797,7 @@ installed addons will be checked for available updates - + Installation Failed Усталяваць не атрымалася @@ -1822,19 +1808,19 @@ installed addons will be checked for available updates - + Create new toolbar Стварыць новую панэль інструментаў - + A macro installed with the FreeCAD Addon Manager Макрасы, які ўсталяваныя з дапамогай Кіравання дадаткамі FreeCAD - + Run Indicates a macro that can be 'run' Выканаць @@ -1845,304 +1831,304 @@ installed addons will be checked for available updates Немагчыма прачытаць дадзеныя з GitHub: праверце сваё інтэрнэт-злучэнне і налады проксі, і паўтарыце спробу. - + XML failure while reading metadata from file {} Не атрымалася прачытаць метададзеныя з файла XML {} - + Invalid metadata in file {} Хібныя метададзеныя ў файле {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. УВАГА: шлях, які паказаны ў метададзеных package.xml, не адпавядае бягучай праверанай галіны. - + Name Назва - + Class Клас - + Description Апісанне - + Subdirectory Укладзены каталог - + Files Файлы - + Select the folder containing your Addon Абраць каталог, які змяшчае ваш Дадатак - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Vermin адсутнічае, скасаванне аперацыі. - + Scanning Addon for Python version compatibility Сканаванне Дадатку на сумяшчальнасць з версіяй Python - + Minimum Python Version Detected Выяўлена найменшая версія Python - + Vermin auto-detected a required version of Python 3.{} Vermin аўтаматычна выявіў патрэбную версію Python 3.{} - + Install Vermin? Усталяваць Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Для аўтаматычнага вызначэння патрэбнай версіі Python для дадатку патрабуецца Vermin (https://pypi.org/project/vermin/). ОК, каб усталяваць? - + Attempting to install Vermin from PyPi Спроба ўсталяваць Vermin з PyPi - - + + Installation failed Усталяваць не атрымалася - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Не атрымалася ўсталяваць Vermin -- праверце Прагляд справаздачы, каб атрымаць падрабязную інфармацыю. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Не атрымалася імпартаваць vermin пасля ўстаноўкі -- не атрымалася прасканаваць Дадатак. - + Select an icon file for this package Абраць файл гузіку для гэтага пакету - + Filter is valid Фільтр дапушчальны - + Filter regular expression is invalid Хібны рэгулярны выраз фільтра - + Click for details about package {} Націсніце, каб атрымаць падрабязную інфармацыю аб пакеце {} - + Click for details about workbench {} Націсніце, каб атрымаць падрабязную інфармацыю аб варштаце {} - + Click for details about macro {} Націсніце, каб атрымаць падрабязную інфармацыю аб макрасе {} - + Maintainers: Суправаджальнікі: - + Tags Меткі - + updated абноўлена - - + + Up-to-date Актуальная - - - + + + Update available Даступна абнаўленне - - + + Pending restart У чаканні перазапуску - - + + DISABLED ВЫКЛЮЧАНЫ - + Installed version Усталяваная версія - + Unknown version Невядомая версія - + Installed on Усталяваны на - + Available version Даступная версія - + Show Addons containing: Паказаць дадаткі, якія змяшчаюць: - + All Усе - + Workbenches Варштаты - + Macros Макрас - + Preference Packs Пакеты перавагі - + Status: Стан: - + Any Любы - + Not installed Не ўсталяваны - + Filter Фільтр - + OK OK - + DANGER: Developer feature НЕБЯСПЕКА: функцыя распрацоўкі - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? НЕБЯСПЕКА: Пераключэнне галін прызначана для распрацоўкі і бэта-тэстараў, і можа прывесці да пашкоджання дакументаў, якія не сумяшчальныя з зваротнай сувяззю, нестабільнасці, збояў і/ці заўчаснай цеплавой смерці сусвету. Вы жадаеце працягнуць? - + There are local changes Ёсць лакальныя змены - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? УВАГА: у сховішчы ёсць незафіксаваныя лакальныя змены. Вы ўпэўненыя, што жадаеце змяніць галіну (і прынесці змены з сабою)? - + + - Branch git terminology Галіна - + Tag git terminology Метка - + Kind Table header for git ref type (e.g. either Tag or Branch) Тып - + Local name Table header for git ref name Лакальная назва - + Tracking Table header for git remote tracking branch name name Адсочванне - + Local updated Table header for git update time of local branch Лакальнае абнаўленне - + Remote updated Table header for git update time of remote branch Падаленае абнаўленне @@ -2153,77 +2139,77 @@ installed addons will be checked for available updates Не атрымалася ўсталяваць пакет Python {} - + Installation of optional package failed Не атрымалася ўсталяваць неабавязковы пакет - + Installing required dependency {} Ўстаноўка неабходнай залежнасці {} - + Installation of Addon {} failed Не атрымалася ўсталяваць дадатак {} - + Downloaded package.xml for {} Спампаваць package.xml для {} - + Failed to decode {} file for Addon '{}' Не атрымалася дэкадаваць файл {} для дадатку '{}' - + Any dependency information in this file will be ignored Любая інфармацыя пра залежнасці ў файле будзе прапушчаная - + Downloaded metadata.txt for {} Спампаваць metadata.txt для {} - + Downloaded requirements.txt for {} Спампаваць requirements.txt для {} - + Downloaded icon for {} Спампаваць гузік для {} - + Unable to open macro wiki page at {} Немагчыма адчыніць вікі-старонку макрасу ў {} - + Unable to fetch the code of this macro. Немагчыма выняць код макраса. - + Unable to retrieve a description from the wiki for macro {} Немагчыма атрымаць апісанне з вікі-старонкі для макраса {} - + Unable to open macro code URL {} Немагчыма адчыніць URL-адрас {} коду макраса - + Unable to fetch macro-specified file {} from {} Немагчыма выняць паказаны файл макраса {} з {} - + Could not locate macro-specified file {} (expected at {}) Не атрымалася знайсці паказаны файл макраса {} (чакаецца ў {}) @@ -2264,17 +2250,17 @@ installed addons will be checked for available updates Не атрымалася выканаць сцэнар uninstall.py дадатку. Прыступаем да выдалення... - + Removed extra installed file {} Выдалены дадаткова ўсталяваны файл {} - + Error while trying to remove extra installed file {} Памылка пры спробе выдаліць дадаткова ўсталяваны файл {} - + Error while trying to remove macro file {}: Памылка пры спробе выдаліць файл макраса {}: @@ -2284,132 +2270,132 @@ installed addons will be checked for available updates Не атрымалася падлучыцца да GitHub. Калі ласка, праверце вашае падключэнне і налады проксі. - + WARNING: Duplicate addon {} ignored УВАГА: Паўторны дадатак {} прапушчаны - + Workbenches list was updated. Спіс варштатаў быў абноўлены. - + Git is disabled, skipping git macros Git адключаны, прапушчаны макрасы git - + Attempting to change non-git Macro setup to use git Спроба змяніць наладу макраса, які адрозніваецца ад git, на ўжыванне git - + An error occurred updating macros from GitHub, trying clean checkout... Адбылася памылка пры абнаўленні макрасаў з GitHub, спроба зрабіць clean checkout... - + Attempting to do a clean checkout... Спроба выканаць clean checkout... - + Clean checkout succeeded Паспяховы clean checkout - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Не атрымалася абнавіць макрасы з GitHub -- паспрабуйце ачысціць кэш Кіравання дадаткамі. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Памылка злучэння з Wiki, FreeCAD ў бягучы час не можа атрымаць спіс макрасаў Wiki - + Unable to fetch git updates for workbench {} Немагчыма атрымаць абнаўленні git для варштату {} - + git status failed for {} Памылка git status для {} - + Failed to read metadata from {name} Не атрымалася прачытаць метададзеныя з {name} - + Failed to fetch code for macro '{name}' Не атрымалася выняць код для макраса '{name}' - + Caching macro code... Кэшаванне коду макраса... - + Addon Manager: a worker process failed to complete while fetching {name} Кіраванне дадаткамі: працоўнаму працэсу не атрымалася выняць {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Для {num_macros} макрасаў скончыўся час чакання {num_failed} падчас апрацоўкі - + Addon Manager: a worker process failed to halt ({name}) Кіраванне дадаткамі: не атрымалася спыніць працоўны працэс ({name}) - + Getting metadata from macro {} Атрыманне метададзеных з макраса {} - + Timeout while fetching metadata for macro {} Выйшаў час чакання пры выманні метададзеных з макрасу {} - + Failed to kill process for macro {}! Не атрымалася завяршыць працэс для макраса {}! - + Retrieving macro description... Атрыманне апісання макрасу... - + Retrieving info from git Атрыманне інфармацыі з git - + Retrieving info from wiki Атрыманне інфармацыі з вікі - + Repository URL Preferences header for custom repositories URL-адрас сховішча - + Branch name Preferences header for custom repositories Назва галіны @@ -2425,7 +2411,7 @@ installed addons will be checked for available updates Рэзервовае капіраванне зыходнага каталога і паўторнае кланаванне - + Failed to clone {} into {} using git Не атрымалася кланаваць {} у {} з дапамогай git @@ -2445,12 +2431,12 @@ installed addons will be checked for available updates Не атрымалася - + Update was cancelled Абнаўленне было скасавана - + some addons may have been updated магчыма, некаторыя дадаткі былі абноўленыя @@ -2458,12 +2444,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Кіраванне дадаткамі - + Manage external workbenches, macros, and preference packs Кіраваць вонкавымі варштатамі, макрасамі і пакетамі пераваг @@ -2471,12 +2457,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Скончана выдаленне {} - + Failed to remove some files Не атрымалася выдаліць некаторыя файлы @@ -2484,7 +2470,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Скончана абнаўленне наступных дадаткаў @@ -2500,7 +2486,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Кіраванне дадаткамі diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ca.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_ca.qm index 667632d7d8..1faf1f869d 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_ca.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_ca.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ca.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_ca.ts index fa8ad4bbad..13bf8075b7 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_ca.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_ca.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Forma - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resol les dependències @@ -419,11 +414,6 @@ Voleu que el gestor de complements les instal·li automàticament? Trieu "I ExpandedView - - - Form - Forma - @@ -473,11 +463,6 @@ Voleu que el gestor de complements les instal·li automàticament? Trieu "I Form - - - Form - Forma - Licenses @@ -1115,9 +1100,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1136,7 +1121,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1164,139 +1149,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Reinicia ara - + Restart later Reinicia més tard - - + + Refresh local cache Refresh local cache - + Updating cache... S'està actualitzant la memòria cau... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... S'estan comprovant les actualitzacions... - + Apply {} update(s) Apply {} update(s) - + No updates available No hi ha actualizacions disponibles - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Maintainer - - - - + + + + Author Autor - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Actualitza - + Updating... S'està actualitzant... @@ -1306,63 +1291,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1372,183 +1357,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Instal·la - + Uninstall Desinstal·la - + Check for Update Check for Update - + Run Macro Run Macro - + Change Branch Canvia la branca - + Enable Habilita - + Disable Desactiva - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1563,17 +1548,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1584,12 +1569,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1604,75 +1589,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automàtica - + Workbench Banc de treball - + Addon Complement - + Python Python - + Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1689,10 +1674,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1713,7 +1698,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1735,7 +1720,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1751,7 +1736,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1768,7 +1753,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1804,7 +1789,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1815,19 +1800,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' executa @@ -1838,304 +1823,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nom - + Class Classe - + Description Descripció - + Subdirectory Subdirectory - + Files Fitxers - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Etiquetes - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Tot - + Workbenches Bancs de treball - + Macros Macros - + Preference Packs Preference Packs - + Status: Estat: - + Any Qualsevol - + Not installed Not installed - + Filter Filtre - + OK D'acord - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Branca - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Tipus - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Seguiment - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2146,77 +2131,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2257,17 +2242,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2277,132 +2262,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories URL del repositori - + Branch name Preferences header for custom repositories Branch name @@ -2418,7 +2403,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2438,12 +2423,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2451,12 +2436,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2464,12 +2449,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2477,7 +2462,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2493,7 +2478,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Gestor de complements diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_cs.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_cs.qm index 417c9bd849..4c124fd86a 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_cs.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_cs.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_cs.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_cs.ts index cc8facc973..109e755d6b 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_cs.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_cs.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Návrh - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Vyřešit závislosti @@ -419,11 +414,6 @@ Přejete si, aby je správce doplňků automaticky nainstaloval? Vyberte "I ExpandedView - - - Form - Návrh - @@ -473,11 +463,6 @@ Přejete si, aby je správce doplňků automaticky nainstaloval? Vyberte "I Form - - - Form - Návrh - Licenses @@ -1117,9 +1102,9 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace select_toolbar_dialog - - - + + + Select Toolbar Vybrat nástrojovou lištu @@ -1138,7 +1123,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace toolbar_button - + Add button? Přidat tlačítko? @@ -1166,139 +1151,139 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace AddonsInstaller - + Starting up... Zahájení... - + Loading addon information Načítání informací o doplňku - + Worker process {} is taking a long time to stop... Pracovní proces {} trvá dlouho, než se zastaví... - + Previous cache process was interrupted, restarting... Předchozí proces mezipaměti byl přerušen, restartuji... - + Custom repo list changed, forcing recache... Seznam vlastních repozitářů byl změněn, vynucování recache... - + Addon manager Správce rozšíření - + You must restart FreeCAD for changes to take effect. Aby se změny projevily, musíte FreeCAD restartovat. - + Restart now Restartovat nyní - + Restart later Restartovat později - - + + Refresh local cache Aktualizovat lokální mezipaměť - + Updating cache... Aktualizuji mezipaměť... - + Could not find addon '{}' to select Nelze najít doplněk '{}' pro výběr - - + + Checking for updates... Hledání aktualizací... - + Apply {} update(s) Aplikovat {} aktualizace (s) - + No updates available Nejsou k dispozici žádné aktualizace - - - + + + Cannot launch a new installer until the previous one has finished. Nelze spustit nový instalační program, dokud nebude ukončena předchozí instalace. - + Execution of macro failed. See console for failure details. Provedení makra selhalo. Podrobnosti o selhání viz konzola. - - + + - + Maintainer Správce - - - - + + + + Author Autor - + New Python Version Detected Byla zjištěna nová verze Pythonu - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Zdá se, že tato verze Pythonu byla poprvé použita spolu se Správcem doplňků. Přejete si nainstalovat stejné automaticky nainstalované závislosti? - + Processing, please wait... Zpracovávání, čekejte prosím... - - + + Update Aktualizovat - + Updating... Probíhá aktualizace... @@ -1308,63 +1293,63 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Nepodařilo se importovat QtNetwork -- zdá se, že není nainstalován ve vašem systému. Váš poskytovatel může mít balíček pro tuto závislost (často nazývaný "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Nepodařilo se převést zadaný port proxy '{}' na číslo portu - + Parameter error: mutually exclusive proxy options set. Resetting to default. Chyba parametru: oboustranně exkluzivní nastavení proxy možností. Resetování na výchozí. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Chyba parametru: indikován uživatelský proxy server, ale není k dispozici. Resetování na výchozí. - + Addon Manager: Unexpected {} response from server Správce doplňků: Neočekávaná {} odpověď od serveru - + Error with encrypted connection Chyba šifrovaného připojení - + - + Confirm remove Potvrdit odstranění - + Are you sure you want to uninstall {}? Opravdu chcete odinstalovat {}? - - - + + + Removing Addon Odstraňování doplňku - + Removing {} Odstranění {} - - + + Uninstall complete Odinstalace dokončena - - + + Uninstall failed Odinstalace se nezdařila @@ -1374,183 +1359,183 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Upozornění Správce doplňků: Nelze importovat QtWebEngineWidgets -- data README se zobrazí pouze jako textová - + Version {version} installed on {date} Verze {version} nainstalována v {date} - + Version {version} installed Verze {version} nainstalována - + Installed on {date} Nainstalováno na {date} - - - - + + + + Installed Nainstalováno - + On branch {}, update available to version Na větev {}, je k dispozici aktualizace - + Update available to version Aktualizace je dostupná na verzi - + An update is available K dispozici je aktualizace - + Git tag '{}' checked out, no updates possible Git značka '{}' prošla kontrolou, žádná aktualizace není možná - + This is the latest version available for branch {} Toto je nejnovější verze dostupná pro větev {} - + Updated, please restart FreeCAD to use Aktualizováno, prosím restartujte FreeCAD pro použití - + Update check in progress Probíhá kontrola aktualizací - + Automatic update checks disabled Automatická kontrola aktualizací zakázána - + Installation location Umístění instalace - + WARNING: This addon is obsolete VAROVÁNÍ: Tento doplněk je zastaralý - + WARNING: This addon is Python 2 Only VAROVÁNÍ: Tento doplněk je pouze Python 2 - + WARNING: This addon requires FreeCAD VAROVÁNÍ: Tento doplněk vyžaduje FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. VAROVÁNÍ: Tento doplněk je v současné době nainstalován, ale je zakázán. Použijte tlačítko 'povolit' pro opětovné povolení. - - + + No URL or wiki page provided by this macro Žádné URL nebo wiki stránky poskytnuté tímto makrem - + Could not load README data from URL {} Nelze načíst data README z URL {} - + This Addon will be enabled next time you restart FreeCAD. Tento doplněk bude povolen při příštím restartu FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Tento doplněk bude zakázán při příštím restartu FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine bindings Python není nainstalován -- používá záložní README displej. - + Success Úspěšně - + Branch change succeeded, please restart to use the new version. Změna větve se podařila, prosím restartujte pro použití nové verze. - + Changed to git ref '{}' -- please restart to use Addon. Změněno na git ref '{}' -- restartujte prosím pro použití Addon. - + Page JavaScript reported Stránka JavaScript nahlášena - + Install Instalovat - + Uninstall Odinstalovat - + Check for Update Zkontrolovat aktualizace - + Run Macro Spustit makro - + Change Branch Změnit větev - + Enable Povolit - + Disable Vypnout - + Return to package list Zpět na seznam balíčků - + The page is taking a long time to load... showing the data we have so far... Stránka trvá dlouho... načtení dat, která máme doposud... @@ -1565,17 +1550,17 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Kontrola připojení k GitHubu... - + Connection failed Připojení se nezdařilo - + Missing dependency Chybějící závislost - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Nepodařilo se importovat QtNetwork -- podrobnosti viz Zobrazení reportu. Správce doplňků není k dispozici. @@ -1586,12 +1571,12 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Ostatní... - + Select the corresponding license file in your Addon Vyberte odpovídající licenční soubor ve vašem doplňku - + Location for new license file Umístění nového licenčního souboru @@ -1606,75 +1591,75 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Nepodařilo se nainstalovat macro {} - + Unrecognized content kind '{}' Nerozpoznaný typ obsahu '{}' - + Unable to locate icon at {} Ikonu na {} nelze najít - + Select an icon file for this content item Vyberte soubor ikony pro tuto položku obsahu - - - + + + {} is not a subdirectory of {} {} není podadresář {} - + Select the subdirectory for this content item Vyberte podadresář pro tuto položku obsahu - + Automatic Automaticky - + Workbench Pracovní prostředí - + Addon Doplňek - + Python Python - + Yes Ano - + Internal Workbench Interní pracovní stůl - + External Addon Externí doplněk - + Python Package Python Package - - + + Other... Ostatní... @@ -1691,10 +1676,10 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace - - - - + + + + Missing Requirement Chybějící požadavek @@ -1715,7 +1700,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace - + Incompatible Python version Nekompatibilní verze Pythonu @@ -1737,7 +1722,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace - + Cannot execute Python Python nelze spustit @@ -1753,7 +1738,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace - + Cannot execute pip Nelze spustit pip @@ -1770,7 +1755,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace - + Package installation failed Instalace balíčku se nezdařila @@ -1806,7 +1791,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace - + Installation Failed Instalace se nezdařila @@ -1817,19 +1802,19 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace - + Create new toolbar Vytvořit nový panel nástrojů - + A macro installed with the FreeCAD Addon Manager Makro nainstalované ve správci doplňků FreeCAD - + Run Indicates a macro that can be 'run' Spustit @@ -1840,304 +1825,304 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Nelze číst data z GitHubu: zkontrolujte připojení k Internetu a nastavení proxy a zkuste to znovu. - + XML failure while reading metadata from file {} XML selhal při čtení metadat ze souboru {} - + Invalid metadata in file {} Neplatná metadata v souboru {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. VAROVÁNÍ: Cesta zadaná v souboru package.xml metadata neodpovídají aktuálně kontrolované větvi. - + Name Jméno - + Class Třída - + Description Popis - + Subdirectory Podadresář - + Files Soubory - + Select the folder containing your Addon Vyberte složku obsahující doplněk - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Žádné Vermin, zrušení operace. - + Scanning Addon for Python version compatibility Skenování doplňku pro kompatibilitu verze Pythonu - + Minimum Python Version Detected Zjištěna minimální verze Pythonu - + Vermin auto-detected a required version of Python 3.{} Vermin automaticky detekoval požadovanou verzi Pythonu 3.{} - + Install Vermin? Instalovat Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Automatická detekce požadované verze Pythonu pro tento doplněk vyžaduje Vermin (https://pypi.org/project/vermin/). Je instalace v pořádku? - + Attempting to install Vermin from PyPi Pokus o instalaci Vermin z PyPi - - + + Installation failed Instalace se nezdařila - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Nepodařilo se nainstalovat Vermin -- Zkontrolujte Report View pro podrobnosti. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Nepodařilo se importovat vermin po instalaci -- Nelze skenovat Addon. - + Select an icon file for this package Vyberte soubor ikony pro tento balíček - + Filter is valid Filtr je platný - + Filter regular expression is invalid Regulární výraz filtru je neplatný - + Click for details about package {} Klikněte pro podrobnosti o balíčku {} - + Click for details about workbench {} Klikněte pro podrobnosti o pracovním prostředí {} - + Click for details about macro {} Klikněte pro podrobnosti o makro {} - + Maintainers: Správci: - + Tags Štítky - + updated aktualizováno - - + + Up-to-date Aktualizováno - - - + + + Update available K dispozici je aktualizace - - + + Pending restart Čekající restart - - + + DISABLED VYPNOUT - + Installed version Nainstalovaná verze - + Unknown version Neznámá verze - + Installed on Nainstalováno - + Available version Dostupná verze - + Show Addons containing: Zobrazit doplňky obsahující: - + All Vše - + Workbenches Pracovní prostředí - + Macros Makra - + Preference Packs Předvolby balíčků - + Status: Stav: - + Any Jakýkoli - + Not installed Není nainstalováno - + Filter Filtr - + OK OK - + DANGER: Developer feature DANGER: Funkce vývojáře - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Přepínací větve jsou určeny pro vývojáře a beta testery a mohou mít za následek rozbití, dokumenty, které nejsou zpětně slučitelné, nestabilita, havárie a/nebo předčasná tepelná smrt vesmíru. Jste si jisti, že chcete pokračovat? - + There are local changes Existují lokální změny - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? VAROVÁNÍ: Tento repozitář má neprovedené místní změny. Jste si jisti, že chcete změnit větve (přináší změny s vámi)? - + + - Branch git terminology Větev - + Tag git terminology Štítek - + Kind Table header for git ref type (e.g. either Tag or Branch) Druh - + Local name Table header for git ref name Místní jméno - + Tracking Table header for git remote tracking branch name name Sledování - + Local updated Table header for git update time of local branch Místno aktualizováno - + Remote updated Table header for git update time of remote branch Vzdálené aktualizace @@ -2148,77 +2133,77 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Instalace Pythonu {} selhala - + Installation of optional package failed Instalace volitelného balíčku selhala - + Installing required dependency {} Instalace požadované závislosti {} - + Installation of Addon {} failed Instalace doplňku {} selhala - + Downloaded package.xml for {} Stažený package.xml pro {} - + Failed to decode {} file for Addon '{}' Nepodařilo se dekódovat {} soubor pro Addon '{}' - + Any dependency information in this file will be ignored Informace o závislosti v tomto souboru budou ignorovány - + Downloaded metadata.txt for {} Stažená metadata.txt pro {} - + Downloaded requirements.txt for {} Stažené požadavkys.txt pro {} - + Downloaded icon for {} Stažená ikona pro {} - + Unable to open macro wiki page at {} Nelze otevřít makro wiki stránku na {} - + Unable to fetch the code of this macro. Nelze načíst kód tohoto makra. - + Unable to retrieve a description from the wiki for macro {} Nelze načíst popis z wiki pro makro {} - + Unable to open macro code URL {} Nelze otevřít makro kód URL {} - + Unable to fetch macro-specified file {} from {} Nelze načíst makrostanovený soubor {} od {} - + Could not locate macro-specified file {} (expected at {}) Nelze najít makrospecifikovaný soubor {} (očekáváno v {}) @@ -2259,17 +2244,17 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Provedení uninstall.py skriptu addon's selhalo. Pokračujte s odinstalování... - + Removed extra installed file {} Odstraněný extra nainstalovaný soubor {} - + Error while trying to remove extra installed file {} Chyba při pokusu o odstranění extra nainstalovaného souboru {} - + Error while trying to remove macro file {}: Chyba při pokusu o odstranění makro souboru {}: @@ -2279,132 +2264,132 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Nepodařilo se připojit k GitHubu. Zkontrolujte nastavení připojení a proxy serveru. - + WARNING: Duplicate addon {} ignored VAROVÁNÍ: Duplikovat doplněk {} ignorován - + Workbenches list was updated. Seznam pracovních lavic byl aktualizován. - + Git is disabled, skipping git macros Git je zakázán, přeskakuji git makra - + Attempting to change non-git Macro setup to use git Pokouším se změnit nastavení negit makra pro použití gitu - + An error occurred updating macros from GitHub, trying clean checkout... Došlo k chybě při aktualizaci maker z GitHubu, pokusu o vyčištění pokladny... - + Attempting to do a clean checkout... Pokus o vyčištění pokladny... - + Clean checkout succeeded Vymazání platby bylo úspěšné - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Aktualizace maker z GitHub se nezdařila – zkuste vymazat mezipaměť Správce doplňků's. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Chyba při připojování k Wiki, FreeCAD momentálně nemůže načíst Wiki makro seznam - + Unable to fetch git updates for workbench {} Nelze načíst git aktualizace pro pracovní prostředí {} - + git status failed for {} git status selhal pro {} - + Failed to read metadata from {name} Nepodařilo se přečíst metadata z {name} - + Failed to fetch code for macro '{name}' Nepodařilo se načíst kód pro makro '{name}' - + Caching macro code... Ukládání makro kódu... - + Addon Manager: a worker process failed to complete while fetching {name} Správce doplňků: při načítání {name} se nepodařilo dokončit proces pracovníka - + Out of {num_macros} macros, {num_failed} timed out while processing Z {num_macros} maker vypršel časový limit {num_failed} při zpracování - + Addon Manager: a worker process failed to halt ({name}) Správce doplňků: proces pracovníka se nepodařilo zastavit ({name}) - + Getting metadata from macro {} Získávání metadat z makra {} - + Timeout while fetching metadata for macro {} Časový limit při načítání metadat pro makro {} - + Failed to kill process for macro {}! Nepodařilo se ukončit proces pro makro {}! - + Retrieving macro description... Načítání popisu makro... - + Retrieving info from git Načítání informací z gitu - + Retrieving info from wiki Načítání informací z wiki - + Repository URL Preferences header for custom repositories URL adresa repozitáře - + Branch name Preferences header for custom repositories Název pobočky @@ -2420,7 +2405,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Zálohování původního adresáře a opětovné klonování - + Failed to clone {} into {} using git Nepodařilo se naklonovat {} na {} pomocí git @@ -2440,12 +2425,12 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Selhalo - + Update was cancelled Aktualizace byla zrušena - + some addons may have been updated některé doplňky mohly být aktualizovány @@ -2453,12 +2438,12 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Std_AddonMgr - + &Addon manager &Správce doplňků - + Manage external workbenches, macros, and preference packs Správa externích pracovních kritérií, maker a balíčků preferencí @@ -2466,12 +2451,12 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace AddonInstaller - + Finished removing {} Dokončeno odstranění {} - + Failed to remove some files Nepodařilo se odstranit některé soubory @@ -2479,7 +2464,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace Addons installer - + Finished updating the following addons Aktualizace následujících doplňků dokončena @@ -2495,7 +2480,7 @@ nainstalované doplňky budou zkontrolovány pro dostupné aktualizace QObject - + Addon Manager Správce rozšíření diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_de.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_de.qm index 0556e3319d..fb6795c879 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_de.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_de.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_de.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_de.ts index 1fb5fdf322..1969ff3f48 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_de.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_de.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Form - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Abhängigkeiten auflösen @@ -419,11 +414,6 @@ Soll der Addon-Manager sie automatisch installieren? "Ignorieren" wäh ExpandedView - - - Form - Form - @@ -473,11 +463,6 @@ Soll der Addon-Manager sie automatisch installieren? "Ignorieren" wäh Form - - - Form - Form - Licenses @@ -1115,9 +1100,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Werkzeugleiste auswählen @@ -1136,7 +1121,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Schaltfläche hinzufügen? @@ -1164,139 +1149,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Wird gestartet... - + Loading addon information Lädt Addon-Informationen - + Worker process {} is taking a long time to stop... Arbeitsprozess {} braucht lange, um beendet zu werden... - + Previous cache process was interrupted, restarting... Vorheriger Cache-Prozess wurde unterbrochen, wird neu gestartet... - + Custom repo list changed, forcing recache... Benutzerdefinierte Repo-Liste geändert, erzwinge den Recache... - + Addon manager Addon-Manager - + You must restart FreeCAD for changes to take effect. FreeCAD muss neu gestartet werden, damit die Änderungen wirksam werden. - + Restart now Jetzt neu starten - + Restart later Später neu starten - - + + Refresh local cache Lokalen Cache aktualisieren - + Updating cache... Cache wird aktualisiert... - + Could not find addon '{}' to select Add-on '{}' zur Auswahl nicht gefunden - - + + Checking for updates... Sucht nach Updates... - + Apply {} update(s) {} Update(s) anwenden - + No updates available Keine Aktualisierungen verfügbar - - - + + + Cannot launch a new installer until the previous one has finished. Ein neuer Installer kann erst nach Beendigung des Vorherigen gestartet werden. - + Execution of macro failed. See console for failure details. Ausführen des Makros schlug fehl. Siehe Konsole für Fehlerdetails. - - + + - + Maintainer Betreuer - - - - + + + + Author Autor - + New Python Version Detected Neue Python-Version erkannt - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Dies scheint das erste Mal zu sein, dass diese Version von Python mit dem Add-on Manager verwendet wurde. Möchten Sie die gleichen automatisch installierten Abhängigkeiten für die neue Version installieren? - + Processing, please wait... In Bearbeitung, bitte warten... - - + + Update Aktualisierung - + Updating... Wird aktualisiert... @@ -1306,63 +1291,63 @@ installed addons will be checked for available updates QtNetwork konnte nicht importiert werden - es scheint nicht auf diesem System installiert zu sein. Dein Anbieter könnte ein Paket für diese Abhängigkeit haben (oft "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Konnte den angegebenen Proxy-Port '{}' nicht in eine Portnummer umwandeln - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameterfehler: sich gegenseitig ausschließende Proxy-Optionen eingestellt. Wird auf Standard zurückgesetzt. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameterfehler: Benutzerdefinierter Proxy ausgewählt, aber kein Proxy angegeben. Wird auf Standard zurückgesetzt. - + Addon Manager: Unexpected {} response from server Addon-Manager: Unerwartete {} Antwort vom Server - + Error with encrypted connection Fehler mit verschlüsselter Verbindung - + - + Confirm remove Entfernen bestätigen - + Are you sure you want to uninstall {}? Sind Sie sicher, dass Sie {} deinstallieren möchten? - - - + + + Removing Addon Addon wird entfernt - + Removing {} {} wird entfernt - - + + Uninstall complete Deinstallation abgeschlossen - - + + Uninstall failed Deinstallation fehlgeschlagen @@ -1372,183 +1357,183 @@ installed addons will be checked for available updates Add-on Manager Warnung: QtWebEngineWidgets konnte nicht importiert werden -- LIESMICH Daten werden als reiner Text angezeigt - + Version {version} installed on {date} Version {version} installiert am {date} - + Version {version} installed Version {version} installiert - + Installed on {date} Installiert am {date} - - - - + + + + Installed Installiert - + On branch {}, update available to version Auf Zweig {}, Aktualisierung verfügbar auf Version - + Update available to version Update verfügbar auf Version - + An update is available Ein Update ist verfügbar - + Git tag '{}' checked out, no updates possible Git Tag '{}' ausgecheckt, keine Aktualisierungen möglich - + This is the latest version available for branch {} Dies ist die neueste verfügbare Version für den Zweig {} - + Updated, please restart FreeCAD to use Aktualisiert, bitte FreeCAD zur Nutzung neu starten - + Update check in progress Prüfung der Aktualisierung läuft - + Automatic update checks disabled Automatische Überprüfung der Aktualisierungen deaktiviert - + Installation location Speicherort für die Installation - + WARNING: This addon is obsolete WARNUNG: Dieses Addon ist veraltet - + WARNING: This addon is Python 2 Only WARNUNG: Dieses Addon ist nur für Python 2 - + WARNING: This addon requires FreeCAD WARNUNG: Dieses Addon benötigt FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNUNG: Dieses Add-on ist derzeit installiert, aber deaktiviert. Verwenden Sie die Schaltfläche 'aktivieren', um es wieder zu aktivieren. - - + + No URL or wiki page provided by this macro Keine URL oder Wiki-Seite von diesem Makro bereitgestellt - + Could not load README data from URL {} Laden der README-Datei von URL {} ist fehlgeschlagen - + This Addon will be enabled next time you restart FreeCAD. Dieses Addon wird beim nächsten Neustart von FreeCAD aktiviert. - + This Addon will be disabled next time you restart FreeCAD. Dieses Addon wird beim nächsten Neustart von FreeCAD deaktiviert. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python Bindings nicht installiert -- verwendet Fallback LIESMICH Anzeige. - + Success Erfolgreich - + Branch change succeeded, please restart to use the new version. Branch wechsel erfolgreich, bitte starten Sie neu, um die neue Version zu verwenden. - + Changed to git ref '{}' -- please restart to use Addon. Wechsel zu git ref '{}' -- bitte neu starten, um das Add-on zu nutzen. - + Page JavaScript reported JavaScript-Seite gemeldet - + Install Installieren - + Uninstall Deinstallieren - + Check for Update Auf Aktualisierungen prüfen - + Run Macro Makro ausführen - + Change Branch Git-Branch wechseln - + Enable Aktivieren - + Disable Deaktivieren - + Return to package list Zurück zur Paketliste - + The page is taking a long time to load... showing the data we have so far... Die Seite braucht lange, um zu laden... Es werden die Daten angezeigt, die bisher geladen wurden... @@ -1563,17 +1548,17 @@ installed addons will be checked for available updates Verbindung zu GitHub wird überprüft... - + Connection failed Verbindung fehlgeschlagen - + Missing dependency Fehlende Abhängigkeit - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. QtNetwork konnte nicht importiert werden - Einzelheiten finden sich im Ausgabefenster. Der Addon-Manager ist nicht verfügbar. @@ -1584,12 +1569,12 @@ installed addons will be checked for available updates Andere... - + Select the corresponding license file in your Addon Die entsprechende Lizenzdatei in Ihrem Addon auswählen - + Location for new license file Speicherort für neue Lizenzdatei @@ -1604,75 +1589,75 @@ installed addons will be checked for available updates Installieren des Makros {} fehlgeschlagen - + Unrecognized content kind '{}' Unbekannter Inhaltstyp '{}' - + Unable to locate icon at {} Symbol kann nicht gefunden werden bei {} - + Select an icon file for this content item Wählen Sie eine Symboldatei für dieses Inhaltselement - - - + + + {} is not a subdirectory of {} {} ist kein Unterverzeichnis von {} - + Select the subdirectory for this content item Wählen Sie das Unterverzeichnis für dieses Inhaltselement - + Automatic Automatisch - + Workbench Arbeitsbereich - + Addon Addon (Programmerweiterung) - + Python Python - + Yes Ja - + Internal Workbench Interner Arbeitsbereich - + External Addon Externer Arbeitsbereich - + Python Package Python-Paket - - + + Other... Andere... @@ -1689,10 +1674,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Fehlende Voraussetzung @@ -1713,7 +1698,7 @@ installed addons will be checked for available updates - + Incompatible Python version Inkompatible Python-Version @@ -1735,7 +1720,7 @@ installed addons will be checked for available updates - + Cannot execute Python Python kann nicht ausgeführt werden @@ -1751,7 +1736,7 @@ installed addons will be checked for available updates - + Cannot execute pip Pip kann nicht ausgeführt werden @@ -1768,7 +1753,7 @@ installed addons will be checked for available updates - + Package installation failed Paketinstallation fehlgeschlagen @@ -1804,7 +1789,7 @@ installed addons will be checked for available updates - + Installation Failed Installation fehlgeschlagen @@ -1815,19 +1800,19 @@ installed addons will be checked for available updates - + Create new toolbar Neue Symbolleiste erstellen - + A macro installed with the FreeCAD Addon Manager Ein Makro, das mit dem FreeCAD Addon Manager installiert wurde - + Run Indicates a macro that can be 'run' Ausführen @@ -1838,304 +1823,304 @@ installed addons will be checked for available updates Daten von GitHub konnten nicht gelesen werden: Überprüfe deine Internetverbindung und die Proxy-Einstellungen und versuche es erneut. - + XML failure while reading metadata from file {} XML-Fehler beim Lesen von Metadaten aus der Datei {} - + Invalid metadata in file {} Ungültige Metadaten in Datei {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNUNG: Der in der package.xml Metadaten angegebene Pfad stimmt nicht mit der aktuell ausgecheckten Version überein. - + Name Name - + Class Klasse - + Description Beschreibung - + Subdirectory Unterverzeichnis - + Files Dateien - + Select the folder containing your Addon Wählen Sie den Ordner, der Ihre Erweiterung enthält - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Kein Vermin, Abbruch der Operation. - + Scanning Addon for Python version compatibility Scannen der Python-Versionenkompatibilität-Erweiterung - + Minimum Python Version Detected Ermittelte minimale Python-Version - + Vermin auto-detected a required version of Python 3.{} Vermin hat automatisch eine erforderliche Version von Python 3.{} erkannt - + Install Vermin? Vermin installieren? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Die automatische Erkennung der erforderlichen Python-Version für dieses Add-on erfordert Vermin (https://pypi.org/project/vermin/). Soll dies Installiert werden? - + Attempting to install Vermin from PyPi Installationsversuch Vermin von PyPi - - + + Installation failed Installation fehlgeschlagen - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Vermin konnte nicht installiert werden -- Einzelheiten finden sich im Ausgabefenster. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Fehler beim Importieren von Vermin nach der Installation -- Addon kann nicht gescannt werden. - + Select an icon file for this package Eine Symboldatei für dieses Paket auswählen - + Filter is valid Filter ist gültig - + Filter regular expression is invalid Der Filter regulärer Ausdruck ist ungültig - + Click for details about package {} Klicken für Details zum Paket {} - + Click for details about workbench {} Klicken für Details zum Arbeitsbereich {} - + Click for details about macro {} Klicken für Details zum Makro {} - + Maintainers: Betreuer: - + Tags Schlagwörter - + updated aktualisiert - - + + Up-to-date Auf dem neuesten Stand - - - + + + Update available Aktualisierung verfügbar - - + + Pending restart Ausstehender Neustart - - + + DISABLED DEAKTIVIERT - + Installed version Installierte Version - + Unknown version Unbekannte Version - + Installed on Installiert am - + Available version Verfügbare Version - + Show Addons containing: Addons anzeigen, die Folgendes enthalten: - + All Alle - + Workbenches Arbeitsbereiche - + Macros Makros - + Preference Packs Voreinstellungspaket - + Status: Status: - + Any Alle - + Not installed Nicht installiert - + Filter Filter - + OK OK - + DANGER: Developer feature VORSICHT: Entwicklerfunktion - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? VORSICHT: Das Wechseln von Zweigen ist für Entwickler und Beta-Tester gedacht und kann zu Störungen, nicht rückwärtskompatiblen Dokumenten, Instabilität, Abstürze und/oder den vorzeitigen Untergang des Universums erzeugen. Sind Sie sicher, dass Sie fortfahren möchten? - + There are local changes Es gibt lokale Änderungen - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNUNG: Dieses Repo hat nicht gespeicherte lokale Änderungen. Sind Sie sicher, dass Sie die Zweige ändern möchten (die Änderungen werden mitgenommen)? - + + - Branch git terminology Zweig - + Tag git terminology Schlagwort - + Kind Table header for git ref type (e.g. either Tag or Branch) Typ - + Local name Table header for git ref name Lokaler Name - + Tracking Table header for git remote tracking branch name name Laufweite - + Local updated Table header for git update time of local branch Lokale Version aktualisiert - + Remote updated Table header for git update time of remote branch Remote Version aktualisiert @@ -2146,77 +2131,77 @@ installed addons will be checked for available updates Installation des Python-Pakets {} fehlgeschlagen - + Installation of optional package failed Installation des optionalen Pakets fehlgeschlagen - + Installing required dependency {} Installieren der benötigten Abhängigkeit {} - + Installation of Addon {} failed Installation des Addons {} fehlgeschlagen - + Downloaded package.xml for {} package.xml für {} heruntergeladen - + Failed to decode {} file for Addon '{}' Datei {} für Add-on '{}' konnte nicht dekodiert werden - + Any dependency information in this file will be ignored Alle Abhängigkeitsinformationen in dieser Datei werden ignoriert - + Downloaded metadata.txt for {} metadata.txt für {} heruntergeladen - + Downloaded requirements.txt for {} requirements.txt für {} heruntergeladen - + Downloaded icon for {} Symbol für {} heruntergeladen - + Unable to open macro wiki page at {} Makro-Wiki-Seite unter {} kann nicht geöffnet werden - + Unable to fetch the code of this macro. Der Code dieses Makros konnte nicht abgerufen werden. - + Unable to retrieve a description from the wiki for macro {} Konnte keine Beschreibung aus dem Wiki für Makro {} holen - + Unable to open macro code URL {} Makro-Code kann nicht geöffnet werden URL {} - + Unable to fetch macro-specified file {} from {} Makrospezifizierte Datei {} von {} konnte nicht abgerufen werden - + Could not locate macro-specified file {} (expected at {}) Datei {} konnte nicht gefunden werden (erwartet um {}) @@ -2257,17 +2242,17 @@ installed addons will be checked for available updates Ausführung des Addon's Uninstall.py Skripts fehlgeschlagen. Fortfahren mit der Deinstallation... - + Removed extra installed file {} Zusätzlich installierte Datei {} entfernt - + Error while trying to remove extra installed file {} Fehler beim Versuch, die zusätzlich installierte Datei {} zu entfernen - + Error while trying to remove macro file {}: Fehler beim Entfernen der Makrodatei {}: @@ -2277,132 +2262,132 @@ installed addons will be checked for available updates Verbindung zu GitHub fehlgeschlagen. Überprüfen Sie Ihre Verbindungs- und Proxy-Einstellungen. - + WARNING: Duplicate addon {} ignored WARNUNG: Duplizieren des Addons {} wird ignoriert - + Workbenches list was updated. Die Liste der Arbeitsbereiche wurde aktualisiert. - + Git is disabled, skipping git macros Git ist deaktiviert, Git-Makros werden übersprungen - + Attempting to change non-git Macro setup to use git Änderungsversuch des Nicht-Git-Makro-Einstellung, um git zu verwenden - + An error occurred updating macros from GitHub, trying clean checkout... Fehler beim Aktualisieren von Makros von GitHub, sauberer Checkout-Versuch wird ausgeführt... - + Attempting to do a clean checkout... Sauberer Checkout-Versuch... - + Clean checkout succeeded Sauberer Checkout war erfolgreich - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Aktualisierung der GitHub Makros fehlgeschlagen -- Versuchen Sie, den Cache des Erweiterungsmanagers zu löschen. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Fehler beim Verbinden mit dem Wiki, FreeCAD kann die Wiki-Makroliste zu diesem Zeitpunkt nicht abrufen - + Unable to fetch git updates for workbench {} Git-Updates für den Arbeitsbereich {} können nicht abgerufen werden - + git status failed for {} git Status fehlgeschlagen für {} - + Failed to read metadata from {name} Fehler beim Lesen der Metadaten von {name} - + Failed to fetch code for macro '{name}' Fehler beim Abrufen des Codes für Makro '{name}' - + Caching macro code... Makro-Code wird zwischengespeichert... - + Addon Manager: a worker process failed to complete while fetching {name} Erweiterungsmanager: Ein Arbeitsprozess konnte während des Abrufs von {name} nicht abgeschlossen werden - + Out of {num_macros} macros, {num_failed} timed out while processing Von {num_macros} Makros wurden {num_failed} während der Verarbeitung nicht rechtzeitig beendet - + Addon Manager: a worker process failed to halt ({name}) Erweiterungsmanager: Ein Arbeitsprozess ({name}) konnte nicht angehalten werden - + Getting metadata from macro {} Herauslesen von Metadaten aus Makro {} - + Timeout while fetching metadata for macro {} Timeout beim Abrufen von Metadaten für Makro {} - + Failed to kill process for macro {}! Fehler beim Beenden des Prozesses für Makro {}! - + Retrieving macro description... Makro-Beschreibung wird abgerufen... - + Retrieving info from git Informationen werden von Git abgerufen - + Retrieving info from wiki Informationen werden aus den Wiki abgerufen - + Repository URL Preferences header for custom repositories URL des Projektarchivs - + Branch name Preferences header for custom repositories Zweigname @@ -2418,7 +2403,7 @@ installed addons will be checked for available updates Sichern des ursprünglichen Ordners und erneutes Klonen - + Failed to clone {} into {} using git Fehler beim Klonen von {} in {} bei der Verwendung von git @@ -2438,12 +2423,12 @@ installed addons will be checked for available updates Fehlgeschlagen - + Update was cancelled Aktualisierung wurde abgebrochen - + some addons may have been updated Einige Addons wurden möglicherweise aktualisiert @@ -2451,12 +2436,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon-Manager - + Manage external workbenches, macros, and preference packs Verwaltet externe Arbeitsbereiche, Makros und Voreinstellungspakete @@ -2464,12 +2449,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Entfernen von {} abgeschlossen - + Failed to remove some files Einige Dateien konnten nicht entfernt werden @@ -2477,7 +2462,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Aktualisierung der folgenden Addons fertiggestellt @@ -2493,7 +2478,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Addon-Manager diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_el.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_el.qm index a64f353342..2df577c15a 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_el.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_el.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_el.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_el.ts index a68f707015..7c8e049eaf 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_el.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_el.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Μορφή - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Επίλυση Εξαρτήσεων @@ -420,11 +415,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Μορφή - @@ -474,11 +464,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Μορφή - Licenses @@ -943,7 +928,7 @@ installed addons will be checked for available updates Any fields left blank are inherited from the top-level Addon metadata, so technically they are all optional. For Addons with multiple content items, each item should provide a unique Display Name and Description. - Any fields left blank are inherited from the top-level Addon metadata, so technically they are all optional. For Addons with multiple content items, each item should provide a unique Display Name and Description. + Τυχόν πεδία που παραμένουν κενά κληρονομούνται από τα ανώτερα μεταδεδομένα του Addon, οπότε τεχνικά είναι όλα προαιρετικά. Για τα Πρόσθετα με πολλαπλά στοιχεία περιεχομένου, κάθε στοιχείο θα πρέπει να παρέχει ένα μοναδικό Εμφανιζόμενο Όνομα και Περιγραφή. @@ -1118,9 +1103,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1139,7 +1124,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1167,139 +1152,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Ανανέωση τοπικής προσωρινής μνήμης - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Συντηρητής - - - - + + + + Author Συγγραφέας - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Ενημέρωση - + Updating... Updating... @@ -1309,63 +1294,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1375,183 +1360,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Εγκατάσταση - + Uninstall Απεγκατάσταση - + Check for Update Check for Update - + Run Macro Run Macro - + Change Branch Αλλαγή Κλάδου - + Enable Ενεργοποίηση - + Disable Απενεργοποίηση - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1566,17 +1551,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1587,12 +1572,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1607,75 +1592,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Αυτόματη - + Workbench Πάγκος εργασίας - + Addon Addon - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1692,10 +1677,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1716,7 +1701,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1738,7 +1723,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1754,7 +1739,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1771,7 +1756,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1807,7 +1792,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1818,19 +1803,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Εκτέλεση @@ -1841,304 +1826,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Όνομα - + Class Κλάση - + Description Περιγραφή - + Subdirectory Subdirectory - + Files Files - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Ετικέτες - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Όλα - + Workbenches Πάγκοι Εργασίας - + Macros Μακροεντολές - + Preference Packs Preference Packs - + Status: Status: - + Any Οποιαδήποτε - + Not installed Not installed - + Filter Φίλτρο - + OK ΟΚ - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Κλάδος - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Απόσταση Γραμμάτων - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2149,77 +2134,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2260,17 +2245,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2280,132 +2265,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories URL Χώρου Αποθήκευσης - + Branch name Preferences header for custom repositories Branch name @@ -2421,7 +2406,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2441,12 +2426,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2454,12 +2439,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2467,12 +2452,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2480,7 +2465,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2496,7 +2481,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Διαχειριστής Πρόσθετων diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.qm index 06b41e3c68..eb875c1da6 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.ts index 05820d8460..e6fb089f04 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_es-AR.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Forma - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolver dependencias @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Forma - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Forma - Licenses @@ -1117,9 +1102,9 @@ los complementos instalados serán revisados por actualizaciones disponibles select_toolbar_dialog - - - + + + Select Toolbar Seleccionar barra de herramientas @@ -1138,7 +1123,7 @@ los complementos instalados serán revisados por actualizaciones disponibles toolbar_button - + Add button? ¿Añadir botón? @@ -1166,137 +1151,137 @@ los complementos instalados serán revisados por actualizaciones disponibles AddonsInstaller - + Starting up... Iniciando... - + Loading addon information Cargando información del complemento - + Worker process {} is taking a long time to stop... Proceso en ejecución {} está tomando mucho tiempo en culminar. - + Previous cache process was interrupted, restarting... El proceso en memoria anterior fue interrumpido, reiniciando... - + Custom repo list changed, forcing recache... Se cambió la lista personalizada de repositorios, forzando carga en memoria... - + Addon manager Administrador de complementos - + You must restart FreeCAD for changes to take effect. Debe reiniciar FreeCAD para que los cambios surtan efecto. - + Restart now Reiniciar ahora - + Restart later Reiniciar más adelante - - + + Refresh local cache Actualizar caché local - + Updating cache... Actualizando la información en memoria - + Could not find addon '{}' to select No se pudo encontrar el complemento '{}' para seleccionar - - + + Checking for updates... Buscando actualizaciones... - + Apply {} update(s) Aplicar {} actualización(es) - + No updates available No hay actualizaciones disponibles - - - + + + Cannot launch a new installer until the previous one has finished. No se puede iniciar un nuevo instalador hasta que el anterior haya terminado. - + Execution of macro failed. See console for failure details. Falló la ejecución de la macro. Vea la consola para detalles del fallo. - - + + - + Maintainer Mantenedor - - - - + + + + Author Autor - + New Python Version Detected Nueva versión de Python detectada - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Esta parece ser la primera vez que esta versión de Python se usa con el Administrador de Complementos. ¿Quiere instalar las mismas dependencias autoinstaladas? - + Processing, please wait... Procesando, por favor, espere... - - + + Update Actualizar - + Updating... Actualizando... @@ -1306,63 +1291,63 @@ los complementos instalados serán revisados por actualizaciones disponibles No se pudo importar QtNetwork -- parece que no está instalado en su sistema. Su proveedor puede tener un paquete para esta dependencia (a menudo llamado "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Error al convertir el puerto proxy especificado '{}' a un número de puerto - + Parameter error: mutually exclusive proxy options set. Resetting to default. Error de parámetro: conjunto de opciones de proxy mutuamente exclusivas. Reiniciando a valores predeterminados. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Error de parámetro: se indicado proxy de usuario pero no se proporcionó proxy. Reiniciando al valor predeterminado. - + Addon Manager: Unexpected {} response from server Administrador de complementos: Respuesta {} inesperada del servidor - + Error with encrypted connection Error con conexión cifrada - + - + Confirm remove Confirmar eliminación - + Are you sure you want to uninstall {}? ¿Está seguro que desea desinstalar {}? - - - + + + Removing Addon Eliminando complemento - + Removing {} Eliminando {} - - + + Uninstall complete Desinstalación completa - - + + Uninstall failed Desinstalación fallida @@ -1372,183 +1357,183 @@ los complementos instalados serán revisados por actualizaciones disponibles Advertencia de Administrador de complementos: No se pudo importar QtWebEngineWidgets -- los datos del README se mostrarán como sólo texto - + Version {version} installed on {date} Versión {version} instalada el {date} - + Version {version} installed Versión {version} instalada - + Installed on {date} Instalado el {date} - - - - + + + + Installed Instalado - + On branch {}, update available to version En la rama {}, actualización disponible a la versión - + Update available to version Actualización disponible a la versión - + An update is available Una actualización está disponible - + Git tag '{}' checked out, no updates possible Etiqueta Git '{}' marcada, no es posible actualizar - + This is the latest version available for branch {} Esta es la última versión disponible para la rama {} - + Updated, please restart FreeCAD to use Actualizado, reinicie FreeCAD para usar - + Update check in progress Comprobación de actualizaciones en progreso - + Automatic update checks disabled Comprobación de actualizaciones automáticas deshabilitada - + Installation location Ubicación de instalación - + WARNING: This addon is obsolete ATENCIÓN: Este complemento está obsoleto - + WARNING: This addon is Python 2 Only ATENCIÓN: Este complemento es sólo Python 2 - + WARNING: This addon requires FreeCAD ADVERTENCIA: Este complemento requiere FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. ADVERTENCIA: Este complemento está actualmente instalado, pero desactivado. Utilice el botón 'habilitar' para reactivarlo. - - + + No URL or wiki page provided by this macro No hay URL o página wiki proporcionada por esta macro - + Could not load README data from URL {} No se pudo cargar datos README desde la URL {} - + This Addon will be enabled next time you restart FreeCAD. Este complemento se habilitará la próxima vez que reinicie FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Este complemento se desactivará la próxima vez que reinicie FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. No se han instalado enlaces Python QtWebEngine -- usando la pantalla README de respaldo. - + Success Éxito - + Branch change succeeded, please restart to use the new version. Cambio de rama exitoso, por favor reinicie para usar la nueva versión. - + Changed to git ref '{}' -- please restart to use Addon. Cambiado a git ref '{}' -- por favor reinicie para usar Complemento. - + Page JavaScript reported Página JavaScript reportada - + Install Instalar - + Uninstall Desinstalar - + Check for Update Buscar actualizaciones - + Run Macro Ejecutar Macro - + Change Branch Cambiar Rama - + Enable Habilitar - + Disable Desactivar - + Return to package list Volver a la lista de paquetes - + The page is taking a long time to load... showing the data we have so far... La página está tardando mucho en cargar... mostrando los datos que tenemos hasta ahora... @@ -1563,17 +1548,17 @@ los complementos instalados serán revisados por actualizaciones disponibles Comprobando conexión a GitHub... - + Connection failed Conexión fallida - + Missing dependency Falta dependencia - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. No se pudo importar QtNetwork -- vea la vista de informes para más detalles. Administrador de complementos no disponible. @@ -1584,12 +1569,12 @@ los complementos instalados serán revisados por actualizaciones disponibles Otros... - + Select the corresponding license file in your Addon Seleccione el archivo de licencia correspondiente en su complemento - + Location for new license file Ubicación del nuevo archivo de licencia @@ -1604,75 +1589,75 @@ los complementos instalados serán revisados por actualizaciones disponibles Error al instalar macro {} - + Unrecognized content kind '{}' Tipo de contenido no reconocido '{}' - + Unable to locate icon at {} No se puede localizar el icono en {} - + Select an icon file for this content item Seleccione un archivo de icono para este elemento de contenido - - - + + + {} is not a subdirectory of {} {} no es un subdirectorio de {} - + Select the subdirectory for this content item Seleccione el subdirectorio para este artículo de contenido - + Automatic Automático - + Workbench Banco de trabajo - + Addon Complemento - + Python Python - + Yes Si - + Internal Workbench Entorno de trabajo - + External Addon Complemento externo - + Python Package Paquete de Python - - + + Other... Otros... @@ -1689,10 +1674,10 @@ los complementos instalados serán revisados por actualizaciones disponibles - - - - + + + + Missing Requirement Requisitos faltantes @@ -1713,7 +1698,7 @@ los complementos instalados serán revisados por actualizaciones disponibles - + Incompatible Python version Versión de Python incompatible @@ -1735,7 +1720,7 @@ los complementos instalados serán revisados por actualizaciones disponibles - + Cannot execute Python No se puede ejecutar Python @@ -1751,7 +1736,7 @@ los complementos instalados serán revisados por actualizaciones disponibles - + Cannot execute pip No se puede ejecutar pip @@ -1768,7 +1753,7 @@ los complementos instalados serán revisados por actualizaciones disponibles - + Package installation failed Error al instalar el paquete @@ -1804,7 +1789,7 @@ los complementos instalados serán revisados por actualizaciones disponibles - + Installation Failed Instalación fallida @@ -1815,19 +1800,19 @@ los complementos instalados serán revisados por actualizaciones disponibles - + Create new toolbar Crear nueva barra de herramientas - + A macro installed with the FreeCAD Addon Manager Una macro instalada con el Administrador de Complementos de FreeCAD - + Run Indicates a macro that can be 'run' Ejecutar @@ -1838,304 +1823,304 @@ los complementos instalados serán revisados por actualizaciones disponibles No se han podido leer los datos de GitHub: comprueba tu conexión a Internet y la configuración del proxy e intente de nuevo. - + XML failure while reading metadata from file {} Fallo en archivo XML mientras se leían los metadatos del archivo {} - + Invalid metadata in file {} Metadatos no válidos en el archivo {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. PRECAUCIÓN: La ruta especificada en los metadatos de package.xml no coincide con la rama que se ha realizado actualmente. - + Name Nombre - + Class Clase - + Description Descripción - + Subdirectory Subdirectorio - + Files Archivos - + Select the folder containing your Addon Seleccione la carpeta que contiene su complemento - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Sin Vermin, cancelando operación. - + Scanning Addon for Python version compatibility Examinando el complemento para compatibilidad con la versión de Python - + Minimum Python Version Detected Versión mínima de Python detectada - + Vermin auto-detected a required version of Python 3.{} Vermin ha detectado una versión requerida de Python 3.{} - + Install Vermin? ¿Instalar Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Para detectar automáticamente la versión requerida de Python para este complemento requiere Vermin (https://pypi.org/project/vermin/). ¿Acepta la instalación? - + Attempting to install Vermin from PyPi Intentando instalar Vermin desde PyPi - - + + Installation failed Instalación fallida - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Error al instalar Vermin -- compruebe la vista del informe para más detalles. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Error al importar Vermin después de la instalación -- no se puede escanear el complemento. - + Select an icon file for this package Seleccione un ícono para este paquete - + Filter is valid El filtro es válido - + Filter regular expression is invalid La expresión regular del filtro no es válida - + Click for details about package {} Haga clic para obtener detalles sobre el paquete {} - + Click for details about workbench {} Haga clic para obtener detalles sobre el entorno de trabajo {} - + Click for details about macro {} Haga clic para obtener detalles sobre la macro {} - + Maintainers: Mantenedores: - + Tags Etiquetas - + updated actualizado - - + + Up-to-date Al día - - - + + + Update available Actualización disponible - - + + Pending restart Reinicio pendiente - - + + DISABLED DESHABILITADO - + Installed version Versión instalada - + Unknown version Versión desconocida - + Installed on Instalado el - + Available version Versión disponible - + Show Addons containing: Mostrar complementos que contienen: - + All Todos - + Workbenches Bancos de trabajo - + Macros Macros - + Preference Packs Paquetes de preferencias - + Status: Estado: - + Any Cualquiera - + Not installed No instalado - + Filter Filtro - + OK Aceptar - + DANGER: Developer feature PELIGRO: Función de desarrollador - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? PELIGRO: Cambiar las ramas está destinado para desarrolladores y beta testers y puede resultar en rupturas, documentos no compatibles hacia atrás, inestabilidad, cierres abruptos y/o la prematura muerte térmica del universo. ¿Está seguro de que desea continuar? - + There are local changes Hay cambios locales - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? ADVERTENCIA: Este repositorio tiene cambios locales no confirmados. ¿Está seguro que desea cambiar de rama (trayendo los cambios contigo)? - + + - Branch git terminology Rama - + Tag git terminology Etiqueta - + Kind Table header for git ref type (e.g. either Tag or Branch) Tipo - + Local name Table header for git ref name Nombre local - + Tracking Table header for git remote tracking branch name name Seguimiento - + Local updated Table header for git update time of local branch Local actualizado - + Remote updated Table header for git update time of remote branch Remoto actualizado @@ -2146,77 +2131,77 @@ los complementos instalados serán revisados por actualizaciones disponibles La instalación del paquete de Python {} falló - + Installation of optional package failed La instalación del paquete opcional falló - + Installing required dependency {} Instalando dependencia requerida {} - + Installation of Addon {} failed La instalación del complemento {} falló - + Downloaded package.xml for {} Se descargó package.xml para {} - + Failed to decode {} file for Addon '{}' Error al decodificar archivo {} para el complemento '{}' - + Any dependency information in this file will be ignored Cualquier información de dependencia en este archivo será ignorada - + Downloaded metadata.txt for {} Se descargó metadata.txt para {} - + Downloaded requirements.txt for {} Se descargó requirements.txt para {} - + Downloaded icon for {} Se descargó icono para {} - + Unable to open macro wiki page at {} No se puede abrir la página de la wiki de la macro en {} - + Unable to fetch the code of this macro. No se puede obtener el código de esta macro. - + Unable to retrieve a description from the wiki for macro {} No se puede recuperar una descripción de la wiki para la macro {} - + Unable to open macro code URL {} No se puede abrir la URL del código de la macro {} - + Unable to fetch macro-specified file {} from {} No se puede obtener el archivo especificado macro {} de {} - + Could not locate macro-specified file {} (expected at {}) No se pudo encontrar el archivo especificado macro {} (se esperaba en {}) @@ -2257,17 +2242,17 @@ los complementos instalados serán revisados por actualizaciones disponibles Falló la ejecución del script uninstall.py del complemento. Procediendo con la desinstalación... - + Removed extra installed file {} Archivo extra instalado {} eliminado - + Error while trying to remove extra installed file {} Error al intentar eliminar el archivo extra instalado {} - + Error while trying to remove macro file {}: Error al intentar eliminar el archivo macro {}: @@ -2277,132 +2262,132 @@ los complementos instalados serán revisados por actualizaciones disponibles Error al conectar a GitHub. Compruebe su conexión y configuración de proxy. - + WARNING: Duplicate addon {} ignored ADVERTENCIA: Duplicar complemento {} ignorado - + Workbenches list was updated. Lista de bancos de trabajo actualizada. - + Git is disabled, skipping git macros Git está deshabilitado, omitiendo macros git - + Attempting to change non-git Macro setup to use git Intentando cambiar la configuración de macro no git para usar git - + An error occurred updating macros from GitHub, trying clean checkout... Se ha producido un error al actualizar macros desde GitHub, intentando limpiar el checkout... - + Attempting to do a clean checkout... Intentando hacer una comprobación limpia... - + Clean checkout succeeded Comprobación limpia exitosa - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Error al actualizar macros de GitHub -- intente limpiar la caché del administrador de complementos. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error al conectar a la Wiki, FreeCAD no puede recuperar la lista de macros de la Wiki en este momento - + Unable to fetch git updates for workbench {} No se pueden obtener actualizaciones de git para el entorno de trabajo {} - + git status failed for {} git status falló para {} - + Failed to read metadata from {name} Error al leer los metadatos de {name} - + Failed to fetch code for macro '{name}' Error al obtener el código para el macro '{name}' - + Caching macro code... Código macro en caché... - + Addon Manager: a worker process failed to complete while fetching {name} Administrador de complementos: no se pudo completar un proceso al obtener {name} - + Out of {num_macros} macros, {num_failed} timed out while processing De {num_macros} macros, a {num_failed} se les agotó el tiempo durante el procesamiento - + Addon Manager: a worker process failed to halt ({name}) Administrador de complementos: un proceso de trabajo falló al detenerse ({name}) - + Getting metadata from macro {} Obteniendo metadatos de la macro {} - + Timeout while fetching metadata for macro {} Tiempo de espera agotado al buscar metadatos para la macro {} - + Failed to kill process for macro {}! ¡Error al matar el proceso para macro {}! - + Retrieving macro description... Recuperando descripción de macro... - + Retrieving info from git Recuperando información de git - + Retrieving info from wiki Recuperando información de la wiki - + Repository URL Preferences header for custom repositories URL del repositorio - + Branch name Preferences header for custom repositories Nombre de rama @@ -2418,7 +2403,7 @@ los complementos instalados serán revisados por actualizaciones disponibles Copia de seguridad del directorio original y re-clonando - + Failed to clone {} into {} using git Error al clonar {} en {} usando git @@ -2438,12 +2423,12 @@ los complementos instalados serán revisados por actualizaciones disponibles Falló - + Update was cancelled Actualización cancelada - + some addons may have been updated algunos complementos pueden haber sido actualizados @@ -2451,12 +2436,12 @@ los complementos instalados serán revisados por actualizaciones disponibles Std_AddonMgr - + &Addon manager &Administrador de complementos - + Manage external workbenches, macros, and preference packs Administrar entornos de trabajo externos, macros y paquetes de preferencias @@ -2464,12 +2449,12 @@ los complementos instalados serán revisados por actualizaciones disponibles AddonInstaller - + Finished removing {} Se terminó de eliminar %s - + Failed to remove some files Error al eliminar algunos archivos @@ -2477,7 +2462,7 @@ los complementos instalados serán revisados por actualizaciones disponibles Addons installer - + Finished updating the following addons Finalizó la actualización de los siguientes complementos @@ -2493,7 +2478,7 @@ los complementos instalados serán revisados por actualizaciones disponibles QObject - + Addon Manager Administrador de Complementos diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.qm index efb09c0aef..85e6e07226 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.ts index b719ae3b94..677e351be6 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_es-ES.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Formulario - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolver dependencias @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Formulario - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Formulario - Licenses @@ -1116,9 +1101,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Seleccionar barra de herramientas @@ -1137,7 +1122,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? ¿Añadir botón? @@ -1165,137 +1150,137 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Iniciando... - + Loading addon information Cargando información del complemento - + Worker process {} is taking a long time to stop... Proceso en ejecución {} está tomando mucho tiempo en culminar. - + Previous cache process was interrupted, restarting... El proceso en memoria anterior fue interrumpido, reiniciando... - + Custom repo list changed, forcing recache... Se cambió la lista personalizada de repositorios, forzando carga en memoria... - + Addon manager Administrador de complementos - + You must restart FreeCAD for changes to take effect. Debe reiniciar FreeCAD para que los cambios surtan efecto. - + Restart now Reiniciar ahora - + Restart later Reiniciar más adelante - - + + Refresh local cache Actualizar caché local - + Updating cache... Actualizando la información en memoria - + Could not find addon '{}' to select No se pudo encontrar el complemento '{}' para seleccionar - - + + Checking for updates... Buscando actualizaciones... - + Apply {} update(s) Aplicar {} actualización(es) - + No updates available No hay actualizaciones disponibles - - - + + + Cannot launch a new installer until the previous one has finished. No se puede iniciar un nuevo instalador hasta que el anterior haya terminado. - + Execution of macro failed. See console for failure details. Falló la ejecución de la macro. Vea la consola para detalles del fallo. - - + + - + Maintainer Mantenedor - - - - + + + + Author Autor - + New Python Version Detected Nueva versión de Python detectada - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Esta parece ser la primera vez que esta versión de Python se usa con el Administrador de Complementos. ¿Quiere instalar las mismas dependencias autoinstaladas? - + Processing, please wait... Procesando, por favor, espere... - - + + Update Actualizar - + Updating... Actualizando... @@ -1305,63 +1290,63 @@ installed addons will be checked for available updates No se pudo importar QtNetwork -- parece que no está instalado en su sistema. Su proveedor puede tener un paquete para esta dependencia (a menudo llamado "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Error al convertir el puerto proxy especificado '{}' a un número de puerto - + Parameter error: mutually exclusive proxy options set. Resetting to default. Error de parámetro: conjunto de opciones de proxy mutuamente exclusivas. Reiniciando a valores predeterminados. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Error de parámetro: se indicado proxy de usuario pero no se proporcionó proxy. Reiniciando al valor predeterminado. - + Addon Manager: Unexpected {} response from server Administrador de complementos: Respuesta {} inesperada del servidor - + Error with encrypted connection Error con conexión cifrada - + - + Confirm remove Confirmar eliminación - + Are you sure you want to uninstall {}? ¿Está seguro que desea desinstalar {}? - - - + + + Removing Addon Eliminando complemento - + Removing {} Eliminando {} - - + + Uninstall complete Desinstalación completa - - + + Uninstall failed Desinstalación fallida @@ -1371,183 +1356,183 @@ installed addons will be checked for available updates Advertencia de Administrador de complementos: No se pudo importar QtWebEngineWidgets -- los datos del README se mostrarán como sólo texto - + Version {version} installed on {date} Versión {version} instalada el {date} - + Version {version} installed Versión {version} instalada - + Installed on {date} Instalado el {date} - - - - + + + + Installed Instalado - + On branch {}, update available to version En la rama {}, actualización disponible a la versión - + Update available to version Actualización disponible a la versión - + An update is available Una actualización está disponible - + Git tag '{}' checked out, no updates possible Etiqueta Git '{}' marcada, no es posible actualizar - + This is the latest version available for branch {} Esta es la última versión disponible para la rama {} - + Updated, please restart FreeCAD to use Actualizado, reinicie FreeCAD para usar - + Update check in progress Comprobación de actualizaciones en progreso - + Automatic update checks disabled Comprobación de actualizaciones automáticas deshabilitada - + Installation location Ubicación de instalación - + WARNING: This addon is obsolete ATENCIÓN: Este complemento está obsoleto - + WARNING: This addon is Python 2 Only ATENCIÓN: Este complemento es sólo Python 2 - + WARNING: This addon requires FreeCAD ADVERTENCIA: Este complemento requiere FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. ADVERTENCIA: Este complemento está actualmente instalado, pero desactivado. Utilice el botón 'habilitar' para reactivarlo. - - + + No URL or wiki page provided by this macro No hay URL o página wiki proporcionada por esta macro - + Could not load README data from URL {} No se pudo cargar datos README desde la URL {} - + This Addon will be enabled next time you restart FreeCAD. Este complemento se habilitará la próxima vez que reinicie FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Este complemento se desactivará la próxima vez que reinicie FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. No se han instalado enlaces Python QtWebEngine -- usando la pantalla README de respaldo. - + Success Éxito - + Branch change succeeded, please restart to use the new version. Cambio de rama exitoso, por favor reinicie para usar la nueva versión. - + Changed to git ref '{}' -- please restart to use Addon. Cambiado a git ref '{}' -- por favor reinicie para usar Complemento. - + Page JavaScript reported Página JavaScript reportada - + Install Instalar - + Uninstall Desinstalar - + Check for Update Buscar actualizaciones - + Run Macro Ejecutar Macro - + Change Branch Cambiar Rama - + Enable Habilitar - + Disable Deshabilitar - + Return to package list Volver a la lista de paquetes - + The page is taking a long time to load... showing the data we have so far... La página está tardando mucho en cargar... mostrando los datos que tenemos hasta ahora... @@ -1562,17 +1547,17 @@ installed addons will be checked for available updates Comprobando conexión a GitHub... - + Connection failed Conexión fallida - + Missing dependency Falta dependencia - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. No se pudo importar QtNetwork -- vea la Vista del Reporte para más detalles. El Administrador de complementos no está disponible. @@ -1583,12 +1568,12 @@ installed addons will be checked for available updates Otros... - + Select the corresponding license file in your Addon Seleccione el archivo de licencia correspondiente en su complemento - + Location for new license file Ubicación del nuevo archivo de licencia @@ -1603,75 +1588,75 @@ installed addons will be checked for available updates Error al instalar macro {} - + Unrecognized content kind '{}' Tipo de contenido no reconocido '{}' - + Unable to locate icon at {} No se puede localizar el icono en {} - + Select an icon file for this content item Seleccione un archivo de icono para este elemento de contenido - - - + + + {} is not a subdirectory of {} {} no es un subdirectorio de {} - + Select the subdirectory for this content item Seleccione el subdirectorio para este artículo de contenido - + Automatic Automatico - + Workbench Escenario - + Addon Complemento - + Python Python - + Yes Si - + Internal Workbench Entorno de trabajo - + External Addon Complemento externo - + Python Package Paquete de Python - - + + Other... Otros... @@ -1688,10 +1673,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Requisitos faltantes @@ -1712,7 +1697,7 @@ installed addons will be checked for available updates - + Incompatible Python version Versión de Python incompatible @@ -1734,7 +1719,7 @@ installed addons will be checked for available updates - + Cannot execute Python No se puede ejecutar Python @@ -1750,7 +1735,7 @@ installed addons will be checked for available updates - + Cannot execute pip No se puede ejecutar pip @@ -1767,7 +1752,7 @@ installed addons will be checked for available updates - + Package installation failed Error al instalar el paquete @@ -1803,7 +1788,7 @@ installed addons will be checked for available updates - + Installation Failed Instalación fallida @@ -1814,19 +1799,19 @@ installed addons will be checked for available updates - + Create new toolbar Crear nueva barra de herramientas - + A macro installed with the FreeCAD Addon Manager Una macro instalada con el gestor de complementos de FreeCAD - + Run Indicates a macro that can be 'run' ejecutar @@ -1837,304 +1822,304 @@ installed addons will be checked for available updates No se han podido leer los datos de GitHub: comprueba tu conexión a Internet y la configuración del proxy e intente de nuevo. - + XML failure while reading metadata from file {} Fallo en archivo XML mientras se leían los metadatos del archivo {} - + Invalid metadata in file {} Metadatos no válidos en el archivo {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. PRECAUCIÓN: La ruta especificada en los metadatos de package.xml no coincide con la rama que se ha realizado actualmente. - + Name Nombre - + Class Clase - + Description Descripción - + Subdirectory Subdirectorio - + Files Archivos - + Select the folder containing your Addon Seleccione la carpeta que contiene su complemento - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Sin Vermin, cancelando operación. - + Scanning Addon for Python version compatibility Examinando el complemento para compatibilidad con la versión de Python - + Minimum Python Version Detected Versión mínima de Python detectada - + Vermin auto-detected a required version of Python 3.{} Vermin ha detectado una versión requerida de Python 3.{} - + Install Vermin? ¿Instalar Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Para detectar automáticamente la versión requerida de Python para este complemento requiere Vermin (https://pypi.org/project/vermin/). ¿Acepta la instalación? - + Attempting to install Vermin from PyPi Intentando instalar Vermin desde PyPi - - + + Installation failed Instalación fallida - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Error al instalar Vermin -- compruebe la vista del informe para más detalles. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Error al importar Vermin después de la instalación -- no se puede escanear el complemento. - + Select an icon file for this package Seleccione un ícono para este paquete - + Filter is valid El filtro es válido - + Filter regular expression is invalid La expresión regular del filtro no es válida - + Click for details about package {} Haga clic para obtener detalles sobre el paquete {} - + Click for details about workbench {} Haga clic para obtener detalles sobre el entorno de trabajo {} - + Click for details about macro {} Haga clic para obtener detalles sobre la macro {} - + Maintainers: Mantenedores: - + Tags Etiquetas - + updated actualizado - - + + Up-to-date Al día - - - + + + Update available Actualización disponible - - + + Pending restart Reinicio pendiente - - + + DISABLED DESHABILITADO - + Installed version Versión instalada - + Unknown version Versión desconocida - + Installed on Instalado el - + Available version Versión disponible - + Show Addons containing: Mostrar complementos que contienen: - + All Todo - + Workbenches Escenarios - + Macros Macros - + Preference Packs Paquetes de preferencias - + Status: Estado: - + Any Cualquiera - + Not installed No instalado - + Filter Filtro - + OK Aceptar - + DANGER: Developer feature PELIGRO: Función de desarrollador - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? PELIGRO: Cambiar las ramas está destinado para desarrolladores y beta testers y puede resultar en rupturas, documentos no compatibles hacia atrás, inestabilidad, cierres abruptos y/o la prematura muerte térmica del universo. ¿Está seguro de que desea continuar? - + There are local changes Hay cambios locales - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? ADVERTENCIA: Este repositorio tiene cambios locales no confirmados. ¿Está seguro que desea cambiar de rama (trayendo los cambios contigo)? - + + - Branch git terminology Rama - + Tag git terminology Etiqueta - + Kind Table header for git ref type (e.g. either Tag or Branch) Tipo - + Local name Table header for git ref name Nombre local - + Tracking Table header for git remote tracking branch name name Seguimiento - + Local updated Table header for git update time of local branch Local actualizado - + Remote updated Table header for git update time of remote branch Remoto actualizado @@ -2145,77 +2130,77 @@ installed addons will be checked for available updates La instalación del paquete de Python {} falló - + Installation of optional package failed La instalación del paquete opcional falló - + Installing required dependency {} Instalando dependencia requerida {} - + Installation of Addon {} failed La instalación del complemento {} falló - + Downloaded package.xml for {} Se descargó package.xml para {} - + Failed to decode {} file for Addon '{}' Error al decodificar archivo {} para el complemento '{}' - + Any dependency information in this file will be ignored Cualquier información de dependencia en este archivo será ignorada - + Downloaded metadata.txt for {} Se descargó metadata.txt para {} - + Downloaded requirements.txt for {} Se descargó requirements.txt para {} - + Downloaded icon for {} Se descargó icono para {} - + Unable to open macro wiki page at {} No se puede abrir la página de la wiki de la macro en {} - + Unable to fetch the code of this macro. No se puede obtener el código de esta macro. - + Unable to retrieve a description from the wiki for macro {} No se puede recuperar una descripción de la wiki para la macro {} - + Unable to open macro code URL {} No se puede abrir la URL del código de la macro {} - + Unable to fetch macro-specified file {} from {} No se puede obtener el archivo especificado macro {} de {} - + Could not locate macro-specified file {} (expected at {}) No se pudo encontrar el archivo especifico para la macro {} (se esperaba en {}) @@ -2256,17 +2241,17 @@ installed addons will be checked for available updates Falló la ejecución del script uninstall.py del complemento. Procediendo con la desinstalación... - + Removed extra installed file {} Archivo extra instalado {} eliminado - + Error while trying to remove extra installed file {} Error al intentar eliminar el archivo extra instalado {} - + Error while trying to remove macro file {}: Error al intentar eliminar el archivo macro {}: @@ -2276,132 +2261,132 @@ installed addons will be checked for available updates Error al conectar a GitHub. Compruebe su conexión y configuración de proxy. - + WARNING: Duplicate addon {} ignored ADVERTENCIA: Duplicar complemento {} ignorado - + Workbenches list was updated. Lista de bancos de trabajo actualizada. - + Git is disabled, skipping git macros Git está deshabilitado, omitiendo macros git - + Attempting to change non-git Macro setup to use git Intentando cambiar la configuración de macro no git para usar git - + An error occurred updating macros from GitHub, trying clean checkout... Se ha producido un error al actualizar macros desde GitHub, intentando limpiar el checkout... - + Attempting to do a clean checkout... Intentando hacer una comprobación limpia... - + Clean checkout succeeded Comprobación limpia exitosa - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Error al actualizar macros de GitHub -- intente limpiar la caché del administrador de complementos. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error al conectar a la Wiki, FreeCAD no puede recuperar la lista de macros de la Wiki en este momento - + Unable to fetch git updates for workbench {} No se pueden obtener actualizaciones de git para el entorno de trabajo {} - + git status failed for {} git status falló para {} - + Failed to read metadata from {name} Error al leer los metadatos de {name} - + Failed to fetch code for macro '{name}' Error al obtener el código para el macro '{name}' - + Caching macro code... Código macro en caché... - + Addon Manager: a worker process failed to complete while fetching {name} Administrador de complementos: no se pudo completar un proceso al obtener {name} - + Out of {num_macros} macros, {num_failed} timed out while processing De {num_macros} macros, a {num_failed} se les agotó el tiempo durante el procesamiento - + Addon Manager: a worker process failed to halt ({name}) Administrador de complementos: un proceso de trabajo falló al detenerse ({name}) - + Getting metadata from macro {} Obteniendo metadatos de la macro {} - + Timeout while fetching metadata for macro {} Tiempo de espera agotado al buscar metadatos para la macro {} - + Failed to kill process for macro {}! ¡Error al matar el proceso para macro {}! - + Retrieving macro description... Recuperando descripción de macro... - + Retrieving info from git Recuperando información de git - + Retrieving info from wiki Recuperando información de la wiki - + Repository URL Preferences header for custom repositories URL del repositorio - + Branch name Preferences header for custom repositories Nombre de rama @@ -2417,7 +2402,7 @@ installed addons will be checked for available updates Copia de seguridad del directorio original y re-clonando - + Failed to clone {} into {} using git Error al clonar {} en {} usando git @@ -2437,12 +2422,12 @@ installed addons will be checked for available updates Falló - + Update was cancelled La actualización fue cancelada - + some addons may have been updated algunos complementos podrían haber sido actualizados @@ -2450,12 +2435,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Administrador de complementos - + Manage external workbenches, macros, and preference packs Administrar entornos de trabajo externos, macros y paquetes de preferencias @@ -2463,12 +2448,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Se terminó de eliminar %s - + Failed to remove some files Error al eliminar algunos archivos @@ -2476,7 +2461,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finalizó la actualización de los siguientes complementos @@ -2492,7 +2477,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Gestor de complementos diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_eu.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_eu.qm index 156e25fda4..291df24ce8 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_eu.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_eu.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_eu.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_eu.ts index 8fa049f45e..cf516615e8 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_eu.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_eu.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Inprimakia - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Ebatzi mendekotasunak @@ -419,11 +414,6 @@ Gehigarrien kudeatzaileak automatikoki instalatu ditzan nahi al duzu? Aukeratu & ExpandedView - - - Form - Inprimakia - @@ -473,11 +463,6 @@ Gehigarrien kudeatzaileak automatikoki instalatu ditzan nahi al duzu? Aukeratu & Form - - - Form - Inprimakia - Licenses @@ -1117,9 +1102,9 @@ denean gehigarrien eguneraketarik dagoen begiratuko da select_toolbar_dialog - - - + + + Select Toolbar Hautatu tresna-barra @@ -1138,7 +1123,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da toolbar_button - + Add button? Gehitu botoia? @@ -1166,139 +1151,139 @@ denean gehigarrien eguneraketarik dagoen begiratuko da AddonsInstaller - + Starting up... Abiarazten... - + Loading addon information Gehigarriaren informazioa kargatzen - + Worker process {} is taking a long time to stop... {} langile-prozesuari kostatzen ari zaio gelditzea... - + Previous cache process was interrupted, restarting... Aurreko cache-prozesua eten egin da, berrabiarazten... - + Custom repo list changed, forcing recache... Biltegi-zerrenda pertsonalizatua aldatu da, berriro cachea sortzen... - + Addon manager Gehigarrien kudeatzailea - + You must restart FreeCAD for changes to take effect. FreeCAD berrabiarazi behar da aldaketak indarrean sartu daitezen. - + Restart now Berrabiarazi orain - + Restart later Berrabiarazi geroago - - + + Refresh local cache Freskatu cache lokala - + Updating cache... Cachea eguneratzen... - + Could not find addon '{}' to select Ez da aurkitu '{}' gehigarria hautatzeko - - + + Checking for updates... Eguneraketak bilatzen... - + Apply {} update(s) Aplikatu {} eguneraketa - + No updates available Ez dago eguneraketarik eskuragarri - - - + + + Cannot launch a new installer until the previous one has finished. Ezin da instalatzaile berria abiarazi aurrekoa amaitu baino lehen. - + Execution of macro failed. See console for failure details. Makroaren exekuzioak huts egin du. Begiratu kontsola xehetasun gehiagorako. - - + + - + Maintainer Mantentzailea - - - - + + + + Author Egilea - + New Python Version Detected Pythonen bertsio berria detektatu da - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Badirudi lehen aldia dela Python bertsio hau gehigarrien kudeatzailearekin erabiltzen dela. Autoinstalatutako mendekotasun berak instalatu nahi al dituzu harentzat? - + Processing, please wait... Prozesatzen, itxaron... - - + + Update Eguneratu - + Updating... Eguneratzen... @@ -1308,63 +1293,63 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Ezin da QtNetwork inportatu -- ez dirudi zure sisteman instalatuta dagoenik. Agian zure hornitzaileak pakete bat dauka mendekotasun horretarako (sarritan "python3-pyside2.qtnetwork" deitzen da) - + Failed to convert the specified proxy port '{}' to a port number Zehaztutako '{}' proxy-ataka ezin izan da ataka-zenbaki bihurtu - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parametro-errorea: elkar ukatzen duten proxy-aukerak ezarri dira. Balio lehenetsiak ezarriko dira. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parametro-errorea: erabiltzaile-proxya adierazi da, baina ez da proxyrik eman. Balio lehenetsiak ezarriko dira. - + Addon Manager: Unexpected {} response from server Gehigarrien kudeatzailea: espero ez zen {} erantzuna zerbitzaritik - + Error with encrypted connection Errorea zifratutako konexioan - + - + Confirm remove Baieztatu kentzea - + Are you sure you want to uninstall {}? Ziur al zaude {} desinstalatu nahi duzula? - - - + + + Removing Addon Gehigarria kentzen - + Removing {} {} kentzen - - + + Uninstall complete Desinstalazioa osatu da - - + + Uninstall failed Desinstalazioak huts egin du @@ -1374,183 +1359,183 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Gehigarrien kudeatzailearen abisua: Ezin izan da QtWebEngineWidgets inportatu -- README datuak testu soil gisa bistaratuko dira - + Version {version} installed on {date} {version} bertsioa instalatu da {date} egunean - + Version {version} installed {version} bertsioa instalatu da - + Installed on {date} Instalazio-data: {date} - - - - + + + + Installed Instalatuta - + On branch {}, update available to version {} adarrean, eguneratu bertsio erabilgarria - + Update available to version Eskuragarri honako bertsioaren eguneraketa: - + An update is available Eguneraketa bat eskuragarri dago - + Git tag '{}' checked out, no updates possible '{}' git etiketa egiaztatu da, ezin da eguneratu - + This is the latest version available for branch {} Hau da eskuragarri dagoen azken bertsioa {} adarrerako - + Updated, please restart FreeCAD to use Eguneratuta, berrabiarazi FreeCAD bertsio berria erabiltzeko - + Update check in progress Eguneratzearen egiaztatzea abian - + Automatic update checks disabled Eguneratze automatikoen egiaztatzeak desgaituta - + Installation location Instalazioaren kokapena - + WARNING: This addon is obsolete ABISUA: Gehigarri hau zaharkituta dago - + WARNING: This addon is Python 2 Only ABISUA: Gehigarri hau Python 2 bertsiokoa da - + WARNING: This addon requires FreeCAD ABISUA: Gehigarri honek honakoa behar du: FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. ABISUA: Gehigarri hau instalatuta dago, baina desgaituta dago. Erabili 'gaitu' botoia berriro gaitzeko. - - + + No URL or wiki page provided by this macro Makro honek ez du URLrik edo wiki-orririk - + Could not load README data from URL {} Ezin dira README datuak irakurri {} URLtik - + This Addon will be enabled next time you restart FreeCAD. Gehigarri hau FreeCAD berrabiarazten den hurrengoan gaituko da. - + This Addon will be disabled next time you restart FreeCAD. Gehigarri hau FreeCAD berrabiarazten den hurrengoan desgaituko da. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python loturak ez daude instalatuta -- ordezko README bistaratzea erabiliko da. - + Success Eginda - + Branch change succeeded, please restart to use the new version. Adar-aldaketa ongi gauzatu da, berrabiarazi bertsio berria erabiltzeko. - + Changed to git ref '{}' -- please restart to use Addon. '{}' git ref-ra aldatu da -- mesedez berrabiarazi gehigarria erabiltzeko. - + Page JavaScript reported JavaScript orriaren berri eman da - + Install Instalatu - + Uninstall Desinstalatu - + Check for Update Begiratu eguneraketarik dagoen - + Run Macro Exekutatu makroa - + Change Branch Aldatu adarra - + Enable Gaitu - + Disable Desgaitu - + Return to package list Itzuli pakete-zerrendara - + The page is taking a long time to load... showing the data we have so far... Orri honek denbora gehiago behar du kargatzeko... orain arte eskuratu diren datuak erakutsiko dira... @@ -1565,17 +1550,17 @@ denean gehigarrien eguneraketarik dagoen begiratuko da GitHub-erako konexioa egiaztatzen... - + Connection failed Konexioak huts egin du - + Missing dependency Mendekotasuna falta da - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Ezin izan da QtNetwork inportatu -- ikusi txosten-ikuspegia xehetasunetarako. Gehigarrien kudeatzailea ez dago erabilgarri. @@ -1586,12 +1571,12 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Beste bat... - + Select the corresponding license file in your Addon Hautatu zure gehigarriari dagokion lizentzia-fitxategia - + Location for new license file Lizentzia-fitxategi berriaren kokapena @@ -1606,75 +1591,75 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Ezin izan da {} makroa instalatu - + Unrecognized content kind '{}' Eduki mota ezezaguna: '{}' - + Unable to locate icon at {} Ezin da ikonoa hemen aurkitu: {} - + Select an icon file for this content item Hautatu ikono-fitxategi bat eduki-elementu honetarako - - - + + + {} is not a subdirectory of {} {} ez da {} direktorioaren azpidirektorio bat - + Select the subdirectory for this content item Hautatu eduki-elementu honetarako azpidirektorioa - + Automatic Automatikoa - + Workbench Lan-mahaia - + Addon Gehigarria - + Python Python - + Yes Bai - + Internal Workbench Barneko lan-mahaia - + External Addon Kanpoko gehigarria - + Python Package Python paketea - - + + Other... Beste bat... @@ -1691,10 +1676,10 @@ denean gehigarrien eguneraketarik dagoen begiratuko da - - - - + + + + Missing Requirement Falta den eskakizuna @@ -1715,7 +1700,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da - + Incompatible Python version Python-en bertsio bateraezina @@ -1737,7 +1722,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da - + Cannot execute Python Ezin da Python exekutatu @@ -1753,7 +1738,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da - + Cannot execute pip Ezin da pip exekutatu @@ -1770,7 +1755,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da - + Package installation failed Paketearen instalazioak huts egin du @@ -1806,7 +1791,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da - + Installation Failed Instalazioak huts egin du @@ -1817,19 +1802,19 @@ denean gehigarrien eguneraketarik dagoen begiratuko da - + Create new toolbar Sortu tresna-barra berria - + A macro installed with the FreeCAD Addon Manager FreeCADen gehigarri-kudeatzailearekin instalatutako makroa - + Run Indicates a macro that can be 'run' distantzia @@ -1840,304 +1825,304 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Ezin dira datuak GitHub-etik irakurri: egiaztatu zure interneteko konexioa eta proxy-ezarpenak eta saiatu berriro. - + XML failure while reading metadata from file {} XML hutsegitea {} fitxategiko metadatuak irakurtzean - + Invalid metadata in file {} Metadatu baliogabeak {} fitxategian - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. ABISUA: pacakge.xml metadatuetan zehaztutako bide-izena ez dator bat deskargatutako uneko adarrarekin. - + Name Izena - + Class Klasea - + Description Deskribapena - + Subdirectory Azpidirektorioa - + Files Fitxategiak - + Select the folder containing your Addon Hautatu zure gehigarria duen karpeta - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Ez dago Vermin, eragiketa bertan behera uzten. - + Scanning Addon for Python version compatibility Gehigarria eskaneatzen Python bertsioa bateragarria den jakiteko - + Minimum Python Version Detected Pythonen gutxieneko bertsioa detektatu da - + Vermin auto-detected a required version of Python 3.{} Vermin-ek detektatu du beharrezko Python bertsioa 3.{} dela - + Install Vermin? Vermin instalatu? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Gehigarri honek behar duen Python bertsioa automatikoki detektatzeko, Vermin (https://pypi.org/project/vermin/) instalatu behar da. Instalatu? - + Attempting to install Vermin from PyPi Vermin Pypi bidez instalatzeko saiakera - - + + Installation failed Instalazioak huts egin du - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Huts egin du Vermin instalatzeak -- begiratu txosten-bista xehetasun gehiagorako. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Huts egin du vermin inportatzeak hura instalatu ondoren -- ezin da gehigarria eskaneatu. - + Select an icon file for this package Hautatu ikono-fitxategi bat pakete honetarako - + Filter is valid Iragazkia baliozkoa da - + Filter regular expression is invalid Iragazkiaren adierazpen erregularra baliogabea da - + Click for details about package {} Egin klik {} paketearen xehetasunak eskuratzeko - + Click for details about workbench {} Egin klik {} lan-mahaiaren xehetasunak eskuratzeko - + Click for details about macro {} Egin klik {} makroaren xehetasunak eskuratzeko - + Maintainers: Mantentzaileak: - + Tags Etiketak - + updated eguneratuta - - + + Up-to-date Eguneratuta - - - + + + Update available Eguneraketa eskuragarri - - + + Pending restart Berrabioaren zain - - + + DISABLED DESGAITUTA - + Installed version Instalatutako bertsioa - + Unknown version Bertsio ezezaguna - + Installed on Hemen instalatua: - + Available version Bertsio eskuragarria - + Show Addons containing: Erakutsi honakoa duten gehigarriak: - + All Dena - + Workbenches Lan-mahaiak - + Macros Makroak - + Preference Packs Hobespen-paketeak - + Status: Egoera: - + Any Edozein - + Not installed Instalatu gabea - + Filter Iragazkia - + OK Ados - + DANGER: Developer feature ARRISKUA: Garatzaile-eginbidea - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? ARRISKUA: Adarrez aldatzea garatzaileentzako eta beta bertsioen probatzaileentzako dago pentsatuta. Dokumentu ez bateragarriak, desegonkortasuna, kraskadurak eta unibertsoaren heriotz goiztiarra eragin ditzake. Jarraitu nahi al duzu? - + There are local changes Aldaketa lokalak daude - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? AVBISUA: Biltegi honek egikaritu gabeko aldaketa lokalak ditu. Ziur zaude adarrez aldatu nahi duzula (aldaketak zurekin ekartzeko)? - + + - Branch git terminology Adarra - + Tag git terminology Etiketa - + Kind Table header for git ref type (e.g. either Tag or Branch) Mota - + Local name Table header for git ref name Izen lokala - + Tracking Table header for git remote tracking branch name name Jarraipena - + Local updated Table header for git update time of local branch Lokalean eguneratua - + Remote updated Table header for git update time of remote branch Urrunean eguneratua @@ -2148,77 +2133,77 @@ denean gehigarrien eguneraketarik dagoen begiratuko da {} Python paketearen instalazioak huts egin du - + Installation of optional package failed Aukerako paketearen instalazioak huts egin du - + Installing required dependency {} Beharrezkoa den {} mendekotasuna instalatzen - + Installation of Addon {} failed {} gehigarriaren instalazioak huts egin du - + Downloaded package.xml for {} {} gehigarriaren package.xml fitxategia deskargatu da - + Failed to decode {} file for Addon '{}' Huts egin du '{}' gehigarrirako {} fitxategia deskodetzeak - + Any dependency information in this file will be ignored Fitxategi honek duen mendekotasun-informazioari ez ikusiarena egingo zaio - + Downloaded metadata.txt for {} {} gehigarriaren metadata.txt deskargatu da - + Downloaded requirements.txt for {} {} gehigarriaren requirements.txt deskargatu da - + Downloaded icon for {} {}-rako ikonoa deskargatu da - + Unable to open macro wiki page at {} Ezin da ireki makroaren {} wiki-orria - + Unable to fetch the code of this macro. Ezin izan da makro honen kodea eskuratu. - + Unable to retrieve a description from the wiki for macro {} Ezin izan da {} makroaren deskribapen bat eskuratu wikitik - + Unable to open macro code URL {} Ezin da ireki makro-kodearen URLa {} - + Unable to fetch macro-specified file {} from {} Ezin da makro bidez zehaztutako {} fitxategia atzitu {} gunetik - + Could not locate macro-specified file {} (expected at {}) Ezin da makroak zehaztutako {} fitxategia aurkitu ({} kokalekuan espero zen) @@ -2259,17 +2244,17 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Huts egin du gehigarriaren 'uninstall.py' script-aren exekuzioak. Desinstalatzen jarraitzen... - + Removed extra installed file {} Instalatutako {} fitxategi gehigarria kendu da - + Error while trying to remove extra installed file {} Errorea instalatutako {} fitxategi gehigarria kentzean - + Error while trying to remove macro file {}: Errorea instalatutako {} makro fitxategia kentzean: @@ -2279,131 +2264,131 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Huts egin du GitHub gunearekin konektatzeak. Egiaztatu konexioa eta proxy-ezarpenak. - + WARNING: Duplicate addon {} ignored ABISUA: Bikoiztutako {} gehigarriari ez ikusiarena egin zaio - + Workbenches list was updated. Lan-mahaien zerrenda eguneratu da. - + Git is disabled, skipping git macros Git desgaituta dago, git makroak salatzen - + Attempting to change non-git Macro setup to use git Git ez diren makroen konfigurazioa aldatzen git erabili dezaten - + An error occurred updating macros from GitHub, trying clean checkout... Errorea gertatu da makroak GitHub gunetik eguneratzean, deskarga garbia saiatzen... - + Attempting to do a clean checkout... Deskarga garbia saiatzen... - + Clean checkout succeeded Deskarga garbia ongi gauzatu da - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Huts egin du GitHub guneko makroak egunerateak -- saiatu gehigarrien kudeatzailearen cachea garbitzen. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Errorea wikiarekin konektatzean, FreeCADek ezin du wikiko makro-zerrenda eskuratu momentu honetan - + Unable to fetch git updates for workbench {} Ezin izan dira {} lan-mahairako git eguneraketak atzitu - + git status failed for {} git status eragiketak huts egin du {} kasuan - + Failed to read metadata from {name} Huts egin du {name}(e)ko metadatuen irakurketak - + Failed to fetch code for macro '{name}' Huts egin du '{name}' makroaren kodea eskuratzeak - + Caching macro code... Makro-kodea cachean gordetzen... - + Addon Manager: a worker process failed to complete while fetching {name} Gehigarrien kudeatzailea: langile-prozesu bat osatzeak huts egin du {name} atzitzean - + Out of {num_macros} macros, {num_failed} timed out while processing {num_macros} makrotatik, {num_failed} denboraz iraungi dira prozesatzean - + Addon Manager: a worker process failed to halt ({name}) Gehigarrien kudeatzailea: langile-prozesu bat gelditzeak huts egin du ({name}) - + Getting metadata from macro {} Metadatuak eskuratzen {} makrotik - + Timeout while fetching metadata for macro {} Denbora iraungi da {} makroaren metadatuak atzitzean - + Failed to kill process for macro {}! Huts egin du {} makroaren prozesua hiltzeak. - + Retrieving macro description... Makroen deskribapena atzitzen... - + Retrieving info from git Informazioa atzitzen git biltegitik - + Retrieving info from wiki Informazioa atzitzen wikitik - + Repository URL Preferences header for custom repositories Biltegiaren URLa - + Branch name Preferences header for custom repositories Adarraren izena @@ -2419,7 +2404,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Jatorrizko direktorioaren babeskopia egiten eta berriro klonatzen - + Failed to clone {} into {} using git Huts egin du git bidez {} klonatzeak {} sortzeko @@ -2439,12 +2424,12 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Huts egin du - + Update was cancelled Eguneraketa bertan behera geratu da - + some addons may have been updated zenbait gehigarri eguneratu ahal izan dira @@ -2452,12 +2437,12 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Std_AddonMgr - + &Addon manager &Gehigarrien kudeatzailea - + Manage external workbenches, macros, and preference packs Kudeatu kanpoko lan-mahaiak, makroak eta hobespen-paketeak @@ -2465,12 +2450,12 @@ denean gehigarrien eguneraketarik dagoen begiratuko da AddonInstaller - + Finished removing {} {} kentzea amaitu da - + Failed to remove some files Huts egin du zenbait fitxategi kentzeak @@ -2478,7 +2463,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da Addons installer - + Finished updating the following addons Honako gehigarrien eguneraketa amaitu da: @@ -2494,7 +2479,7 @@ denean gehigarrien eguneraketarik dagoen begiratuko da QObject - + Addon Manager Gehigarrien kudeatzailea diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_fi.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_fi.qm index bed308f5d4..a2d0ebbd72 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_fi.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_fi.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_fi.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_fi.ts index fe9201a188..25e6a73d53 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_fi.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_fi.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Lomake - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Ratkaise riippuvuudet @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Lomake - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Lomake - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Lisätäänkö painike? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Refresh local cache - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Ylläpitäjä - - - - + + + + Author Kehittäjä - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Päivitä - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Asenna - + Uninstall Poista asennus - + Check for Update Check for Update - + Run Macro Suorita makro - + Change Branch Vaihda haaraa - + Enable Käytä - + Disable Ota pois käytöstä - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automaattinen - + Workbench Työpöytä - + Addon Lisäosa - + Python Python - + Yes Kyllä - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Suorita @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nimi - + Class Luokka - + Description Kuvaus - + Subdirectory Subdirectory - + Files Tiedostot - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Tags - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Asennettu versio - + Unknown version Unknown version - + Installed on Installed on - + Available version Saatavilla oleva versio - + Show Addons containing: Show Addons containing: - + All Kaikki - + Workbenches Työpöydät - + Macros Makrot - + Preference Packs Preference Packs - + Status: Status: - + Any Mikä tahansa - + Not installed Not installed - + Filter Suodatin - + OK OK - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Haara - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Seuranta - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Tietovaraston URL-osoite - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Lisäosien hallinta diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm index c8a5610e23..b0f03ffd83 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts index 8cd0c87916..dd44861e5c 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Forme - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Résoudre les Dépendances @@ -419,11 +414,6 @@ Voulez-vous que le gestionnaire des extensions les installe automatiquement ? Ch ExpandedView - - - Form - Forme - @@ -473,11 +463,6 @@ Voulez-vous que le gestionnaire des extensions les installe automatiquement ? Ch Form - - - Form - Forme - Licenses @@ -1117,9 +1102,9 @@ les mises à jour disponibles seront vérifiées pour les extensions installées select_toolbar_dialog - - - + + + Select Toolbar Sélectionnez la barre d'outils @@ -1138,7 +1123,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées toolbar_button - + Add button? Ajouter un bouton ? @@ -1166,139 +1151,139 @@ les mises à jour disponibles seront vérifiées pour les extensions installées AddonsInstaller - + Starting up... Démarrage en cours... - + Loading addon information Chargement des informations de l'extension - + Worker process {} is taking a long time to stop... Le processus de traitement {} prend beaucoup de temps pour s’arrêter... - + Previous cache process was interrupted, restarting... Le processus du précédent cache a été interrompu, redémarrage... - + Custom repo list changed, forcing recache... La liste des dépôts personnalisés a changé, ce qui force à relancer le cache... - + Addon manager Gestionnaire des extensions - + You must restart FreeCAD for changes to take effect. Vous devez redémarrer FreeCAD pour que les modifications soient prises en compte. - + Restart now Redémarrer maintenant - + Restart later Redémarrer plus tard - - + + Refresh local cache Rafraîchir le cache local - + Updating cache... Mise à jour du cache... - + Could not find addon '{}' to select Impossible de trouver l'extension '{}' à sélectionner - - + + Checking for updates... Recherche de mises à jour... - + Apply {} update(s) Appliquer {} mise(s) à jour - + No updates available Aucune mise à jour disponible - - - + + + Cannot launch a new installer until the previous one has finished. Impossible de lancer un nouveau programme d'installation tant que le précédent n'est pas terminé. - + Execution of macro failed. See console for failure details. L'exécution de la macro a échoué. Voir la console pour les détails de l'échec. - - + + - + Maintainer Mainteneur - - - - + + + + Author Auteur - + New Python Version Detected Nouvelle version de Python détectée - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Cela semble être la première fois que cette version de Python est utilisée avec le gestionnaire des extensions. Voulez-vous installer les mêmes dépendances auto-installées pour cela ? - + Processing, please wait... En cours de traitement, veuillez patienter... - - + + Update Mettre à jour - + Updating... Mise à jour en cours... @@ -1308,63 +1293,63 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Impossible d'importer QtNetwork -- il ne semble pas être installé sur votre système. Votre fournisseur peut avoir un paquet pour cette dépendance (souvent appelé par exemple "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Échec de la conversion du port du proxy spécifié '{}' en un numéro de port - + Parameter error: mutually exclusive proxy options set. Resetting to default. Erreur de paramètre : des options de proxy mutuellement exclusives ont été définies. Réinitialisation à la valeur par défaut. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Erreur de paramètre : le proxy de l'utilisateur est indiqué, mais aucun proxy n'est fourni. Réinitialisation à la valeur par défaut. - + Addon Manager: Unexpected {} response from server Gestionnaire des extensions : réponse inattendue {} du serveur - + Error with encrypted connection Erreur avec la connexion chiffrée - + - + Confirm remove Confirmer la suppression - + Are you sure you want to uninstall {}? Êtes-vous sûr de vouloir désinstaller {} ? - - - + + + Removing Addon Suppression de l'extension - + Removing {} Suppression de {} - - + + Uninstall complete Désinstallation terminée - - + + Uninstall failed Échec de la désinstallation @@ -1374,183 +1359,183 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Avertissement du gestionnaire d'extensions : impossible d'importer QtWebEngineWidgets -- Les données README s'afficheront uniquement en texte - + Version {version} installed on {date} Version {version} installée le {date} - + Version {version} installed Version installée {version} - + Installed on {date} Installé le {date} - - - - + + + + Installed Installé - + On branch {}, update available to version Sur la branche {}, mise à jour disponible vers la version - + Update available to version Mise à jour disponible vers la version - + An update is available Une mise à jour est disponible - + Git tag '{}' checked out, no updates possible La balise Git '{}' a été retirée, aucune mise à jour possible - + This is the latest version available for branch {} Ceci est la dernière version disponible pour la branche {} - + Updated, please restart FreeCAD to use Mis à jour, veuillez redémarrer FreeCAD pour l’utiliser - + Update check in progress Recherche de mise à jour en cours - + Automatic update checks disabled Vérification automatique des mises à jour désactivée - + Installation location Emplacement de l’installation - + WARNING: This addon is obsolete AVERTISSEMENT : cette extension est obsolète - + WARNING: This addon is Python 2 Only AVERTISSEMENT : cette extension ne fonctionne qu'avec Python 2 - + WARNING: This addon requires FreeCAD AVERTISSEMENT : cette extension nécessite FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. AVERTISSEMENT : cette extension est actuellement installée, mais désactivée. Utilisez le bouton 'activer' pour la réactiver. - - + + No URL or wiki page provided by this macro Aucune URL ou page wiki fournie par cette macro - + Could not load README data from URL {} Impossible de charger les données README depuis l'URL {} - + This Addon will be enabled next time you restart FreeCAD. Cette extension sera activée la prochaine fois que vous redémarrerez FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Cette extension sera désactivée la prochaine fois que vous redémarrerez FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. Les bindings Python de QtWebEngine ne sont pas installés -- utilisation de l'affichage README de remplacement. - + Success Opération réussie - + Branch change succeeded, please restart to use the new version. Le changement de branche a réussi, veuillez redémarrer pour utiliser la nouvelle version. - + Changed to git ref '{}' -- please restart to use Addon. Changé pour la référence git '{}' -- veuillez redémarrer pour utiliser l'extension. - + Page JavaScript reported Page JavaScript signalée - + Install Installer - + Uninstall Désinstaller - + Check for Update Vérifier les mises à jour - + Run Macro Lancer la macro - + Change Branch Changer de branche - + Enable Activer - + Disable Désactiver - + Return to package list Retourner à la liste des paquets - + The page is taking a long time to load... showing the data we have so far... La page prend beaucoup de temps à charger... et montre les données que nous avons jusqu'à présent... @@ -1565,17 +1550,17 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Vérification de la connexion à GitHub... - + Connection failed La connexion a échoué - + Missing dependency Dépendances manquantes - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Impossible d'importer QtNetwork -- voir la Vue rapport pour plus de détails. Le gestionnaire des extensions n'est pas disponible. @@ -1586,12 +1571,12 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Autre... - + Select the corresponding license file in your Addon Sélectionner le fichier de licence correspondant dans votre extension - + Location for new license file Emplacement du nouveau fichier de licence @@ -1606,75 +1591,75 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Impossible d'installer la macro {} - + Unrecognized content kind '{}' Type de contenu non reconnu '{}' - + Unable to locate icon at {} Impossible de localiser l'icône à {} - + Select an icon file for this content item Sélectionner un fichier d'icône pour cet élément de contenu. - - - + + + {} is not a subdirectory of {} {} n'est pas un sous-répertoire de {} - + Select the subdirectory for this content item Sélectionner le sous-répertoire pour cet élément de contenu. - + Automatic Automatique - + Workbench Atelier - + Addon Extension - + Python Python - + Yes Oui - + Internal Workbench Atelier interne - + External Addon Extension externe - + Python Package Paquet Python - - + + Other... Autre... @@ -1691,10 +1676,10 @@ les mises à jour disponibles seront vérifiées pour les extensions installées - - - - + + + + Missing Requirement Condition manquante @@ -1715,7 +1700,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées - + Incompatible Python version Version de Python incompatible @@ -1737,7 +1722,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées - + Cannot execute Python Impossible d'exécuter Python @@ -1753,7 +1738,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées - + Cannot execute pip Impossible d'exécuter la commande pip @@ -1770,7 +1755,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées - + Package installation failed L'installation du paquet a échoué @@ -1806,7 +1791,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées - + Installation Failed L'installation a échoué @@ -1817,19 +1802,19 @@ les mises à jour disponibles seront vérifiées pour les extensions installées - + Create new toolbar Créer une nouvelle barre d'outils - + A macro installed with the FreeCAD Addon Manager Une macro installée avec le gestionnaire des extensions de FreeCAD - + Run Indicates a macro that can be 'run' Exécuter @@ -1840,304 +1825,304 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Impossible de lire les données depuis GitHub : vérifiez votre connexion internet et vos paramètres de proxy et réessayez. - + XML failure while reading metadata from file {} Erreur XML lors de la lecture des métadonnées depuis le fichier {} - + Invalid metadata in file {} Métadonnées non valides dans le fichier {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. AVERTISSEMENT : le chemin spécifié dans les métadonnées du package.xml ne correspond pas à la branche actuellement extraite. - + Name Nom - + Class Classe - + Description Description - + Subdirectory Sous-répertoire - + Files Fichiers - + Select the folder containing your Addon Sélectionner le dossier contenant votre extension - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Absence du logiciel Vermin, annulation de l’opération. - + Scanning Addon for Python version compatibility Vérification de la compatibilité de l'extension avec la version de Python - + Minimum Python Version Detected Version minimale de Python détectée - + Vermin auto-detected a required version of Python 3.{} Vermin a détecté le besoin d'une version Python 3.{} - + Install Vermin? Installer Vermin ? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? La détection automatique de la version requise de Python pour cet extension nécessite Vermin (https://pypi.org/project/vermin/). D'accord pour l'installer ? - + Attempting to install Vermin from PyPi Tentative d'installation de Vermin à partir de PyPi - - + + Installation failed L'installation a échoué - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate L'installation de Vermin a échoué - consultez la vue rapport pour plus de détails. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Échec de l'importation de Vermin après l'installation - Impossible de faire une analyse l'extension. - + Select an icon file for this package Sélectionner un fichier d'icône pour ce paquet - + Filter is valid Le filtre est valide - + Filter regular expression is invalid L'expression régulière du filtre n'est pas valide - + Click for details about package {} Cliquer pour plus de détails sur le paquet {} - + Click for details about workbench {} Cliquer pour plus de détails sur l'atelier {} - + Click for details about macro {} Cliquer pour plus de détails sur la macro {} - + Maintainers: Mainteneurs : - + Tags Mots-clés - + updated mis à jour - - + + Up-to-date À jour - - - + + + Update available Mise à jour disponible - - + + Pending restart En attente de redémarrage - - + + DISABLED DÉSACTIVÉ - + Installed version Version installée - + Unknown version Version inconnue - + Installed on Installé le - + Available version Version disponible - + Show Addons containing: Afficher les extensions contenant : - + All Tout - + Workbenches Ateliers - + Macros Macros - + Preference Packs Kits de préférences - + Status: État : - + Any N’importe le quel - + Not installed Non installé - + Filter Filtre - + OK OK - + DANGER: Developer feature DANGER : fonction de développeur - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER : le passage d'une branche à l'autre est destiné aux développeurs et aux bêta-testeurs. Il peut entraîner la rupture de documents non rétrocompatibles, une instabilité, des pannes et/ou la mort thermique prématurée de l'univers. Êtes-vous sûr de vouloir continuer ? - + There are local changes Il y a des changements locaux - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? AVERTISSEMENT : ce dépôt contient des modifications locales non validées. Êtes-vous sûr de vouloir changer de branche (en apportant les modifications avec vous) ? - + + - Branch git terminology Branche - + Tag git terminology Mot-clé - + Kind Table header for git ref type (e.g. either Tag or Branch) Type - + Local name Table header for git ref name Nom local - + Tracking Table header for git remote tracking branch name name Suivi - + Local updated Table header for git update time of local branch Mise à jour locale - + Remote updated Table header for git update time of remote branch Mis à jour à distance @@ -2148,77 +2133,77 @@ les mises à jour disponibles seront vérifiées pour les extensions installées L'installation du paquet Python {} a échoué - + Installation of optional package failed L'installation du paquet facultatif a échoué - + Installing required dependency {} Installation de la dépendance requise {} - + Installation of Addon {} failed L'installation de l'extension {} a échoué - + Downloaded package.xml for {} Fichier package.xml téléchargé pour {} - + Failed to decode {} file for Addon '{}' Échec du décodage du fichier {} pour l'extension '{}' - + Any dependency information in this file will be ignored Toutes les informations de dépendance dans ce fichier seront ignorées - + Downloaded metadata.txt for {} Fichier metadata.txt téléchargé pour {} - + Downloaded requirements.txt for {} Fichier requirements.txt téléchargé pour {} - + Downloaded icon for {} Icône téléchargée pour {} - + Unable to open macro wiki page at {} Impossible d'ouvrir la page wiki de la macro {} - + Unable to fetch the code of this macro. Impossible de récupérer le code de cette macro. - + Unable to retrieve a description from the wiki for macro {} Impossible de récupérer une description du wiki pour la macro {} - + Unable to open macro code URL {} Impossible d'ouvrir l'URL du code de la macro {} - + Unable to fetch macro-specified file {} from {} Impossible de récupérer le fichier {} spécifié par la macro à partir de {} - + Could not locate macro-specified file {} (expected at {}) Impossible de localiser le fichier {} spécifié par la macro (attendu à {}) @@ -2259,17 +2244,17 @@ les mises à jour disponibles seront vérifiées pour les extensions installées L'exécution du script uninstall.py de l'extension a échoué. La désinstallation se fait quand même... - + Removed extra installed file {} Suppression du fichier installé en extra {} - + Error while trying to remove extra installed file {} Erreur lors de la suppression du fichier installé en extra {} - + Error while trying to remove macro file {}: Erreur lors de la suppression du fichier macro {} : @@ -2279,132 +2264,132 @@ les mises à jour disponibles seront vérifiées pour les extensions installées La connexion à GitHub a échoué. Vérifiez vos paramètres de connexion et de proxy. - + WARNING: Duplicate addon {} ignored ATTENTION : extension dupliquée {} ignorée - + Workbenches list was updated. La liste des ateliers a été mise à jour. - + Git is disabled, skipping git macros Git est désactivé, les macros git sont ignorées - + Attempting to change non-git Macro setup to use git Tentative de changement de la configuration de macro non-git pour utiliser git - + An error occurred updating macros from GitHub, trying clean checkout... Une erreur est survenue lors de la mise à jour des macros depuis GitHub, en essayant une extraction fraîche... - + Attempting to do a clean checkout... Tentative de faire une extraction fraîche... - + Clean checkout succeeded Extraction fraîche réussie - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Échec de la mise à jour des macros depuis GitHub -- essayez de vider le cache du gestionnaire des extensions. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Erreur de connexion au Wiki, FreeCAD ne peut pas récupérer la liste des macros du Wiki pour le moment - + Unable to fetch git updates for workbench {} Ne parvient pas à récupérer les mises à jour git pour l'atelier {} - + git status failed for {} le statut de git a échoué pour {} - + Failed to read metadata from {name} Échec de la lecture des métadonnées de {name} - + Failed to fetch code for macro '{name}' Échec de la récupération du code de la macro '{name}' - + Caching macro code... Mise en cache du code de la macro... - + Addon Manager: a worker process failed to complete while fetching {name} Gestionnaire des extensions : un processus n'a pas abouti lors de la récupération de {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Sur {num_macros} macros, {num_failed} sont tombées en panne pendant le traitement - + Addon Manager: a worker process failed to halt ({name}) Gestionnaire des extensions : un processus n'a pas pu être arrêté ({name}) - + Getting metadata from macro {} Récupération des métadonnées de la macro {} - + Timeout while fetching metadata for macro {} Dépassement du délai lors de la récupération des métadonnées pour la macro {} - + Failed to kill process for macro {}! Échec de l'arrêt de la macro {} ! - + Retrieving macro description... Récupération de la description de la macro... - + Retrieving info from git Récupération des informations depuis git - + Retrieving info from wiki Récupération des informations depuis le wiki - + Repository URL Preferences header for custom repositories URL du dépôt - + Branch name Preferences header for custom repositories Nom de la branche @@ -2420,7 +2405,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Sauvegarde du répertoire original et re-clonage - + Failed to clone {} into {} using git Échec du clonage de {} en {} avec git @@ -2440,12 +2425,12 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Échec - + Update was cancelled Mise à jour annulée - + some addons may have been updated certaines extensions ont peut-être été mises à jour @@ -2453,12 +2438,12 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Std_AddonMgr - + &Addon manager &Gestionnaire des extensions - + Manage external workbenches, macros, and preference packs Gérer les ateliers externes, les macros et les kits de préférences @@ -2466,12 +2451,12 @@ les mises à jour disponibles seront vérifiées pour les extensions installées AddonInstaller - + Finished removing {} Suppression terminée {} - + Failed to remove some files Échec de la suppression de certains fichiers @@ -2479,7 +2464,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Addons installer - + Finished updating the following addons Mise à jour terminée des extensions suivantes @@ -2495,7 +2480,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées QObject - + Addon Manager Gestionnaire des extensions diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_gl.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_gl.qm index 99db957f5c..7287712111 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_gl.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_gl.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_gl.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_gl.ts index 69abeedf8d..dd03bf48fc 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_gl.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_gl.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Formulario - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolve Dependencies @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Formulario - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Formulario - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Actualiza a caché local - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Mantedor - - - - + + + + Author Autor - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Actualizar - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Instalado - + Uninstall Desinstalar - + Check for Update Check for Update - + Run Macro Executar macro - + Change Branch Cambiar Rama - + Enable Habilitar - + Disable Inhabilitar - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automática - + Workbench Banco de traballo - + Addon Complementos - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Executar @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nome - + Class Clase - + Description Descrición - + Subdirectory Subdirectory - + Files Ficheiros - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Etiquetas - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Todo - + Workbenches Bancos de traballo - + Macros Macros - + Preference Packs Preference Packs - + Status: Estado: - + Any Calquera - + Not installed Not installed - + Filter Filtro - + OK Aceptar - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Branch - + Tag git terminology Etiqueta - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Seguimento - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Repository URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Xestor de complementos diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_hr.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_hr.qm index a41c3158fe..2c8ebae231 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_hr.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_hr.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_hr.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_hr.ts index 1ecbf90551..7d824122c5 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_hr.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_hr.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Obrazac - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Razriješi zavisnosti @@ -421,11 +416,6 @@ Da li želite da Upravitelj dodacima ih instalira automatski? Odaberi "Igno ExpandedView - - - Form - Obrazac - @@ -475,11 +465,6 @@ Da li želite da Upravitelj dodacima ih instalira automatski? Odaberi "Igno Form - - - Form - Obrazac - Licenses @@ -1121,9 +1106,9 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja select_toolbar_dialog - - - + + + Select Toolbar Odaberi Alatnu traku @@ -1142,7 +1127,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja toolbar_button - + Add button? Dodaj tipku? @@ -1170,139 +1155,139 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja AddonsInstaller - + Starting up... Pokreče se... - + Loading addon information Učitavanje informacija o dodatku - + Worker process {} is taking a long time to stop... Radni proces {} se dugo zaustavlja... - + Previous cache process was interrupted, restarting... Prethodni proces međuspremanja je prekinut, ponovo se pokreće... - + Custom repo list changed, forcing recache... Korisnička lista spremišta je promjenjena, prisilno ponovno međuspremanje... - + Addon manager Upravitelj dodataka - + You must restart FreeCAD for changes to take effect. Za primjenu promjene, ponovo pokreni FreeCAD. - + Restart now Ponovno pokreni sada - + Restart later Ponovno pokreni kasnije - - + + Refresh local cache Osvježite lokalnu predmemoriju - + Updating cache... Ažuriram međuspremnik… - + Could not find addon '{}' to select Nije moguće pronaći Dodatak '{}' da bi se izabrao - - + + Checking for updates... Provjeri ima li ažuriranja... - + Apply {} update(s) Primjeni {} ažuriranje(a) - + No updates available Nema dostupnih ažuriranja - - - + + + Cannot launch a new installer until the previous one has finished. Ne može se pokrenuti novi program za instaliranje dok se prethodni ne završi. - + Execution of macro failed. See console for failure details. Izvršavanje makro naredbe nije uspjelo. Pogledaj konzolu za detalje o greškama. - - + + - + Maintainer Održavatelj - - - - + + + + Author Autor - + New Python Version Detected Otkrivena nova verzija Pythona - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Čini se da je ovo prvi put da je ova verzija Python-a korištena sa Upraviteljem dodataka. Da li želiš da za njega instaliraš iste automatski instalirane zavisnosti? - + Processing, please wait... U obradi, sačekaj... - - + + Update Ažuriraj - + Updating... Ažuriranje... @@ -1312,63 +1297,63 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Nije moguće uvesti QtNetwork -- izgleda da nije instaliran na tvom operativnom sustavu. Tvoj davatelj usluga možda ima paket za ovu zavisnost (često se na primjer naziva, "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Konvertiranje navedenog proksi porta '{}' nije uspjelo - + Parameter error: mutually exclusive proxy options set. Resetting to default. Greška u parametru: postavljene su međusobno isključive proksi opcije. Vraćanje na zadane vrijednosti. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Greška u parametru: korisnički proksi je označen, ali nije moguće. Vraćanje na zadane vrijednosti. - + Addon Manager: Unexpected {} response from server Upravitelj dodataka: Neočekivani {} odgovor s poslužitelja - + Error with encrypted connection Pogreška s šifriranom vezom - + - + Confirm remove Potvrdi uklanjanje - + Are you sure you want to uninstall {}? Da li ste sigurni da želite deinstalirati {}? - - - + + + Removing Addon Uklanjanje dodatka - + Removing {} Uklanjanje {} - - + + Uninstall complete Deinstaliranje završeno - - + + Uninstall failed Deinstaliranje nije uspjelo @@ -1378,183 +1363,183 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Upozorenje Upravitelja dodataka: Nije moguće uvesti QtWebEngineWidgets -- README podaci će se prikazati samo kao tekst - + Version {version} installed on {date} Dana {date} instalirana je verzija {version} - + Version {version} installed Instalirana {version} verzija - + Installed on {date} Instalirano {date} - - - - + + + + Installed Instalirano - + On branch {}, update available to version Na grani {}, dostupno ažuriranje na verziju - + Update available to version Dostupno ažuriranje za verziju - + An update is available Ažuriranje je dostupno - + Git tag '{}' checked out, no updates possible Oznaka Git-a '{}' provjerena, ažuriranja nisu moguća - + This is the latest version available for branch {} Ovo je najnovija verzija dostupna za granu {} - + Updated, please restart FreeCAD to use Ažurirano, ponovno pokrenite FreeCAD za korištenje - + Update check in progress Provjera ažuriranja u tijeku - + Automatic update checks disabled Provjera automatskog ažuriranja isključena - + Installation location Mjesto instaliranja - + WARNING: This addon is obsolete UPOZORENJE: Ovaj dodatak je zastario - + WARNING: This addon is Python 2 Only UPOZORENJE: Ovaj dodatak je samo za Python 2 - + WARNING: This addon requires FreeCAD UPOZORENJE: Ovaj dodatak treba FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. UPOZORENJE: Ovaj dodatak je trenutno instaliran, ali je onemogućen. Koristi 'omogući' gumb da bi ponovo omogućio. - - + + No URL or wiki page provided by this macro Ova makro naredba nema URL ili wiki stranicu - + Could not load README data from URL {} Nije moguće učitati README podatke sa URL-a {} - + This Addon will be enabled next time you restart FreeCAD. Ovaj Dodatak će biti omogućen sljedeći put kada ponovo pokreneš FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Ovaj Dodatak će biti onemogućen sljedeći put kada ponovo pokreneš FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python veze nisu instalirane -- koristi se prikaz zaobilaznog README-a. - + Success Uspješno obavljeno - + Branch change succeeded, please restart to use the new version. Promjena grane je uspela, ponovo pokreni da bi koristio novu verziju. - + Changed to git ref '{}' -- please restart to use Addon. Promjenjeno u git ref '{}' -- ponovo pokreni da bi koristio Dodatak. - + Page JavaScript reported Prijavljen JavaScript na stranici - + Install Instaliraj - + Uninstall Deinstaliraj - + Check for Update Provjeri ažuriranja - + Run Macro Izvedi makronaredbu - + Change Branch Promijeni granu - + Enable Omogući - + Disable Onemogući - + Return to package list Povratak na popis paketa - + The page is taking a long time to load... showing the data we have so far... Stranica se dugo učitava... prikazuje podatke koje imamo do sada... @@ -1569,17 +1554,17 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Provjera veze s GitHubom... - + Connection failed Povezivanje nije uspjelo - + Missing dependency Nedostaje zavisnost - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Nije moguće uvesti QtNetwork – pogledaj pregled izvješća za detalje. Upravitelj dodataka nije dostupan. @@ -1590,12 +1575,12 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Drugo... - + Select the corresponding license file in your Addon Izaberi odgovarajuću datoteku licence u svom Dodatku - + Location for new license file Lokacija za novu licencnu datoteku @@ -1610,75 +1595,75 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Nije moguće instalirati makro naredbu {} - + Unrecognized content kind '{}' Nepoznata vrsta sadržaja '{}' - + Unable to locate icon at {} Nije moguće pronaći ikonu u {} - + Select an icon file for this content item Izaberi datoteku ikone za ovu stavku sadržaja - - - + + + {} is not a subdirectory of {} {} nije poddirektorij {} - + Select the subdirectory for this content item Izaberi poddirektorij za ovu stavku sadržaja - + Automatic Automatsko - + Workbench Workbench - + Addon Dodatak - + Python Python - + Yes Da - + Internal Workbench Unutarnji Radni stol - + External Addon Vanjski dodatak - + Python Package Python paket - - + + Other... Drugo... @@ -1695,10 +1680,10 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja - - - - + + + + Missing Requirement Nedostaje uvjet @@ -1719,7 +1704,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja - + Incompatible Python version Nekompatibilna Python verzija @@ -1741,7 +1726,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja - + Cannot execute Python Nije moguće pokrenuti Python @@ -1757,7 +1742,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja - + Cannot execute pip Nije moguće pokrenuti pip @@ -1774,7 +1759,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja - + Package installation failed Instalacija paketa nije uspjela @@ -1810,7 +1795,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja - + Installation Failed Instalacija nije uspjela @@ -1821,19 +1806,19 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja - + Create new toolbar Napravi novu Alatnu traku - + A macro installed with the FreeCAD Addon Manager Makro naredba instalirana sa FreeCAD Upraviteljem dodataka - + Run Indicates a macro that can be 'run' pokreni @@ -1844,306 +1829,306 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Nije moguće pročitati podatke sa GitHub-a: provjeri internet vezu i podešavanja proksija i pokušaj ponovo. - + XML failure while reading metadata from file {} XML greška pri čitanju metapodataka iz datoteke {} - + Invalid metadata in file {} Nevažeća stavka metapodataka u datoteci {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. UPOZORENJE: Putanja navedena u metapodacima package.xml ne odgovara trenutnoј checked-out grani. - + Name Ime - + Class Klasa - + Description Opis - + Subdirectory Poddirektorij - + Files Datoteke - + Select the folder containing your Addon Izaberi mapu u kojoj se nalazi tvoj Dodatak - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Nema Vermin-a, operacija se otkazuje. - + Scanning Addon for Python version compatibility Skeniranje Dodatka za Python radi utvrđivanja kompatibilnosti - + Minimum Python Version Detected Otkrivena je minimalna verzija Python-a - + Vermin auto-detected a required version of Python 3.{} Vermin je automatski otkrio potrebnu verziju Python-a 3.{} - + Install Vermin? Instaliraj Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Za automatsko otkrivanje potrebne verzije Python-a za ovaj dodatak potreban je Vermin (https://pipi.org/project/vermin/). Pritisnite OK ako želite instalirati? - + Attempting to install Vermin from PyPi Pokušaj instaliranja Vermin-a sa PyPi - - + + Installation failed Instalacija neuspješna - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Instalacija Vermin-a nije uspjela – provjeri pregled izvješća za detalje. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Uvoz Vermin-a nakon instalacije nije uspio - ne može da se skenira Dodatak. - + Select an icon file for this package Izaberi datoteku ikone za ovaj paket - + Filter is valid Filter je valjan - + Filter regular expression is invalid Regularni izraz filtra nije važeći - + Click for details about package {} Kliknite za detalje o paketu {} - + Click for details about workbench {} Kliknite za detalje o Radnom stolu {} - + Click for details about macro {} Kliknite za detalje o makro naredbama {} - + Maintainers: Održavatelji: - + Tags Oznake - + updated ažurirano - - + + Up-to-date Aktualno - - - + + + Update available Dostupno ažuriranje - - + + Pending restart Na čekanju ponovnog pokretanja - - + + DISABLED ONEMOGUĆENO - + Installed version Instalirana verzija - + Unknown version Nepoznata verzija - + Installed on Instalirano na - + Available version Dostupna verzija - + Show Addons containing: Prikaži dodatke koji sadrže: - + All Sve - + Workbenches Radne površine - + Macros Makronaredbe - + Preference Packs Preference Packs - + Status: Stanje: - + Any Bilo koji - + Not installed Nije instalirano - + Filter Filter - + OK U redu - + DANGER: Developer feature OPASNOST: Funkcija za programere - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? OPASNOST: Prebacivanje grana je namjenjeno programerima i beta testerima i može da dovede do oštećenih dokumenata koji nisu kompatibilni unazad, nestabilnosti, kvarova i/ili preranog toplotnog kolapsa univerzuma. Da li si siguran da želiš da nastaviš? - + There are local changes Postoje lokalne promjene - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? UPOZORENjE: Ovo spremište ima nepovezane lokalne promjene. Da li si siguran da želiš da promjeniš grane (donoseći promjene sa sobom)? - + + - Branch git terminology Grana - + Tag git terminology Opis - + Kind Table header for git ref type (e.g. either Tag or Branch) Vrsta - + Local name Table header for git ref name Lokalno ime - + Tracking Table header for git remote tracking branch name name Praćenje - + Local updated Table header for git update time of local branch Lokalno ažurirano - + Remote updated Table header for git update time of remote branch Daljinski ažurirano @@ -2154,77 +2139,77 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Instalacija Python paketa {} nije uspjelo - + Installation of optional package failed Instalacija opcionalnih paketa {} nije uspjelo - + Installing required dependency {} Instaliranje potrebne zavisnosti {} - + Installation of Addon {} failed Instalacija Dodatka {} nije uspjela. - + Downloaded package.xml for {} Preuzet package.xml za {} - + Failed to decode {} file for Addon '{}' Dekodiranje {} datoteke za Dodatak '{}' nije uspjelo - + Any dependency information in this file will be ignored Sve informacije o zavisnosti u ovoj datoteci će biti ignorirane - + Downloaded metadata.txt for {} Preuzet metadata.txt za {} - + Downloaded requirements.txt for {} Preuzet requirements.txt za {} - + Downloaded icon for {} Preuzeta ikona za {} - + Unable to open macro wiki page at {} Nije moguće otvoriti makro wiki stranicu na {} - + Unable to fetch the code of this macro. Nije moguće preuzeti kod ove makro naredbe. - + Unable to retrieve a description from the wiki for macro {} Nije moguće preuzeti opis sa wiki-ja za makro naredbu {} - + Unable to open macro code URL {} Nije moguće otvoriti makro kod URL {} - + Unable to fetch macro-specified file {} from {} Nije moguće preuzeti datoteku {} navedene makro naredbe iz {} - + Could not locate macro-specified file {} (expected at {}) Nije moguće locirati datoteku navedenu u makro naredbi {} (trebala je biti u {}) @@ -2265,17 +2250,17 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Izvršavanje uninstall.py skripte Dodatka nije usjpelo. Nastavlja se sa deinstaliranjem... - + Removed extra installed file {} Uklonjena je dodatno instalirana datoteka {} - + Error while trying to remove extra installed file {} Greška pri pokušaju uklanjanja dodatno instalirane datoteke {} - + Error while trying to remove macro file {}: Greška pri pokušaju uklanjanja datoteke makro naredbe {}: @@ -2285,130 +2270,130 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Povezivanje sa GitHub-om nije uspjelo. Provjeri podešavanja veze i proksija. - + WARNING: Duplicate addon {} ignored UPOZORENJE: Duplikat dodatka {} je ignoriran - + Workbenches list was updated. Popis radnih stolova je ažuriran. - + Git is disabled, skipping git macros Git je onemogućen, preskaču se git makro naredbe - + Attempting to change non-git Macro setup to use git Pokušaj promjene postavki ne git makro naredbi da koriste git - + An error occurred updating macros from GitHub, trying clean checkout... Došlo je do greške pri ažuriranju makro naredbi a sa GitHub-a, pokušavam čistu provjeru... - + Attempting to do a clean checkout... Pokušavam napraviti čistu provjeru... - + Clean checkout succeeded Čista provjera je uspjela - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Nije uspjelo ažurirati makro naredbe s GitHuba. Pokušajte izbrisati predmemoriju Upravitelja dodataka. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Čini se da je problem povezivanje s Wiki-em, FreeCAD trenutačno ne može dohvatiti popis makronaredbi Wiki-a - + Unable to fetch git updates for workbench {} Nije moguće dohvatiti git ažuriranja za radni stol {} - + git status failed for {} git stanje nije uspjelo za {} - + Failed to read metadata from {name} Nije uspjelo čitanje metapodataka iz {name} - + Failed to fetch code for macro '{name}' Nije uspjelo preuzimanje koda za makro naredbu '{name}' - + Caching macro code... Osvježavanje koda makronaredbe... - + Addon Manager: a worker process failed to complete while fetching {name} Upravitelj dodataka: radni proces nije uspio da se završi prilikom preuzimanja {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Za {num_macros} makro naredbu je prekoračen je vremenski limit, {num_failed} tokom obrade - + Addon Manager: a worker process failed to halt ({name}) Upravitelj dodataka: radni proces nije uspio da se zaustavi {name}) - + Getting metadata from macro {} Preuzimanje metapodataka iz makro naredbe {} - + Timeout while fetching metadata for macro {} Isteklo je vrijeme za preuzimanje metapodataka za makro naredbu {} - + Failed to kill process for macro {}! Zaustavljanje procesa za makro naredbu {} nije uspjelo - + Retrieving macro description... Dohvaćanje opisa makro naredbe... - + Retrieving info from git Dohvaćanje informacije od git - + Retrieving info from wiki Dohvaćanje informacije od wiki-a - + Repository URL Preferences header for custom repositories URL repozitorija - + Branch name Preferences header for custom repositories Naziv grane @@ -2424,7 +2409,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Pravljenje rezervne kopije originalnog direktorija i ponovno kloniranje - + Failed to clone {} into {} using git Kloniranje pomoću git-a {} u {} nije uspjelo @@ -2444,12 +2429,12 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Neuspješno - + Update was cancelled Ažuriranje je obustavljeno - + some addons may have been updated neki dodaci su možda ažurirani @@ -2457,12 +2442,12 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Std_AddonMgr - + &Addon manager Upr&avitelj dodataka - + Manage external workbenches, macros, and preference packs Upravljajte vanjskim radnim stolovima, makronaredbama i paketima postavki @@ -2470,12 +2455,12 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja AddonInstaller - + Finished removing {} Završeno premještanje {} - + Failed to remove some files Nije uspjelo uklanjanje nekih datoteka @@ -2483,7 +2468,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja Addons installer - + Finished updating the following addons Završeno je ažuriranje sljedećih dodataka @@ -2499,7 +2484,7 @@ instalirani dodaci će se provjeriti na dostupna ažuriranja QObject - + Addon Manager Upravitelj dodataka diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_hu.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_hu.qm index 6a2d6c602c..9a59bcbb72 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_hu.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_hu.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_hu.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_hu.ts index 81e1fc3882..bac5993b02 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_hu.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_hu.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Űrlap - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Függőségek feloldása @@ -419,11 +414,6 @@ A bővítmény kezelő automatikusan telepítse őket? Válassza a "Elvet&q ExpandedView - - - Form - Űrlap - @@ -473,11 +463,6 @@ A bővítmény kezelő automatikusan telepítse őket? Válassza a "Elvet&q Form - - - Form - Űrlap - Licenses @@ -1117,9 +1102,9 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre select_toolbar_dialog - - - + + + Select Toolbar Eszköztár kiválasztása @@ -1138,7 +1123,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre toolbar_button - + Add button? Gomb hozzáadása? @@ -1166,139 +1151,139 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre AddonsInstaller - + Starting up... Elkezd... - + Loading addon information Bővítményadatok betöltése - + Worker process {} is taking a long time to stop... Hosszú időbe telik egy futó {} folyamat leállítása... - + Previous cache process was interrupted, restarting... Az előző gyorsítótár-folyamat megszakadt, újraindul... - + Custom repo list changed, forcing recache... Megváltoztatta a felhasználói tárolók listáját, kényszerítve az újbóli gyorsítótárazást... - + Addon manager Bővítmény kezelő - + You must restart FreeCAD for changes to take effect. A módosítások érvénybe léptetéséhez újra kell indítania a FreeCAD-et. - + Restart now Újraindítás most - + Restart later Újraindítás később - - + + Refresh local cache Gyorsítótár frissítése - + Updating cache... Gyorsítótár frissítése... - + Could not find addon '{}' to select Nem található a kijelölni kívánt '{}' bővítmény - - + + Checking for updates... Frissítés keresése... - + Apply {} update(s) {} frissítés(ek) alkalmazása - + No updates available Nincs elérhető frissítés - - - + + + Cannot launch a new installer until the previous one has finished. Az új telepítő csak az előző telepítő befejezése után indítható el. - + Execution of macro failed. See console for failure details. A makró végrehajtása sikertelen. A hiba részleteit lásd a konzolon. - - + + - + Maintainer Közreműködő - - - - + + + + Author Létrehozó - + New Python Version Detected Új Python verziót érzékelt - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Úgy tűnik, hogy ez az első alkalom, hogy a Python ezen verzióját a Bővítmény kezelővel együtt használják. Szeretné telepíteni ugyanazokat az automatikusan telepített függőségeket hozzá? - + Processing, please wait... Feldolgozás folyamatban, kérjük várjon... - - + + Update Frissítés - + Updating... Frissítés... @@ -1308,63 +1293,63 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Nem lehet importálni a QtNetwork-et - nincs telepítve a rendszerre. Előfordulhat, hogy a szolgáltatónak van egy csomagja ehhez a függőséghez (gyakran így nevezik "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Nem sikerült a megadott '{}' proxy portot a port számra átalakítani - + Parameter error: mutually exclusive proxy options set. Resetting to default. Paraméter hiba: kölcsönösen kizáró proxy beállítások. Alapértelmezettre visszaállítás. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Paraméterhiba: felhasználói proxy van megadva, de nincs megadva proxy. Alapértelmezettre visszaállítás. - + Addon Manager: Unexpected {} response from server Bővítmény kezelő: Váratlan {} válasz a szervertől - + Error with encrypted connection Hiba a titkosított kapcsolat során - + - + Confirm remove Eltávolítás megerősítése - + Are you sure you want to uninstall {}? Biztosan szeretné a(z) {} eltávolítani? - - - + + + Removing Addon Bővítmény eltávolítás - + Removing {} Eltávolítás {} - - + + Uninstall complete Eltávolítás befejeződött - - + + Uninstall failed Sikertelen eltávolítás @@ -1374,183 +1359,183 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Bővítmény kezelő figyelmeztetés: A README adatok csak szöveges formában jelennek meg - + Version {version} installed on {date} {version} telepítve ekkor {date} - + Version {version} installed {version} verzió telepítve - + Installed on {date} Telepítés ideje {date} - - - - + + + + Installed Telepítve - + On branch {}, update available to version A {} változaton elérhető frissítés a következő verzióra - + Update available to version Rendelkezésre áll verzió frissítés - + An update is available Egy frissítés elérhető - + Git tag '{}' checked out, no updates possible Git mező '{}' ellenőrizve, frissítés nem lehetséges - + This is the latest version available for branch {} Ez a legfrissebb elérhető verzió erre a változatra: {} - + Updated, please restart FreeCAD to use Frissítve, indítsa újra a FreeCAD-et - + Update check in progress Frissítések ellenőrzése folyamatban - + Automatic update checks disabled Automatikus frissítés ellenőrzés letiltva - + Installation location Telepítés helye - + WARNING: This addon is obsolete FIGYELMEZTETÉS: Ez a bővítmény elavult - + WARNING: This addon is Python 2 Only FIGYELMEZTETÉS: Ez a bővítmény csak Python 2 - + WARNING: This addon requires FreeCAD FIGYELEM: Ehhez a bővítményhez FreeCAD szükséges - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. FIGYELMEZTETÉS: Ez a bővítmény jelenleg telepített, de le van tiltva. Használja az 'engedélyezés' gombot a visszakapcsolásához. - - + + No URL or wiki page provided by this macro Ez a makró nem ad meg URL-címet vagy wikilapot - + Could not load README data from URL {} Nem lehetett betölteni a README-adatokat a(z) {} URL-címről - + This Addon will be enabled next time you restart FreeCAD. Ez a bővítmény a FreeCAD következő újraindításakor lesz engedélyezve. - + This Addon will be disabled next time you restart FreeCAD. Ez a bővítmény a FreeCAD következő újraindításakor lesz kiiktatva. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python kötések nem telepítettek -- a tartalék README megjelenítést használja. - + Success Sikerült - + Branch change succeeded, please restart to use the new version. A változatváltás sikeres volt, indítsa újra az új verzió használatához. - + Changed to git ref '{}' -- please restart to use Addon. Módosított git hivatkozás '{}' -- indítsa újra a bővítmény használatához. - + Page JavaScript reported JavaScript jelentés lap - + Install Teleptés - + Uninstall Eltávolítás - + Check for Update Frissítések keresése - + Run Macro Makró futtatás - + Change Branch Változat módosítása - + Enable Bekapcsolás - + Disable Letilt - + Return to package list Vissza a csomag listához - + The page is taking a long time to load... showing the data we have so far... Az oldal betöltése sokáig tart... az eddig rendelkezésre álló adatok bemutatása... @@ -1565,17 +1550,17 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre A GitHubhoz való kapcsolat ellenőrzése... - + Connection failed Csatlakozás sikertelen - + Missing dependency Hiányzó függőség - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. QtNetwork importálhatatlan - lásd a Jelentésnézetet a részletekért. A bővítmény kezelő nem érhető el. @@ -1586,12 +1571,12 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Egyéb... - + Select the corresponding license file in your Addon Válassza ki a megfelelő licencfájlt a bővítményben - + Location for new license file Új licencfájl helye @@ -1606,75 +1591,75 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre {} makró telepítése sikertelen - + Unrecognized content kind '{}' Nem ismert tartalomfajta '{}' - + Unable to locate icon at {} Nem sikerült megtalálni az ikont a {} - + Select an icon file for this content item Válasszon ki egy ikonfájlt ehhez a tartalmi elemhez - - - + + + {} is not a subdirectory of {} {} nem alkönyvtára ennek: {} - + Select the subdirectory for this content item Válassza ki a tartalmi elem alkönyvtárát - + Automatic Automatikus - + Workbench Munkafelület - + Addon Bővítmény - + Python Python - + Yes Igen - + Internal Workbench Belső munkafelület - + External Addon Külső bővítmény - + Python Package Python csomag - - + + Other... Egyéb... @@ -1691,10 +1676,10 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre - - - - + + + + Missing Requirement Hiányzó követelmény @@ -1715,7 +1700,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre - + Incompatible Python version Nem kompatibilis Python verzió @@ -1737,7 +1722,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre - + Cannot execute Python Python nem hajtható végre @@ -1753,7 +1738,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre - + Cannot execute pip Pip nem hajtható végre @@ -1770,7 +1755,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre - + Package installation failed Oldal telepítése sikertelen @@ -1806,7 +1791,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre - + Installation Failed Telepítés sikertelen @@ -1817,19 +1802,19 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre - + Create new toolbar Új eszköztár létrehozása - + A macro installed with the FreeCAD Addon Manager A FreeCAD bővítmény kezelővel telepített makró - + Run Indicates a macro that can be 'run' Futtat @@ -1840,304 +1825,304 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Nem sikerült adatokat olvasni a GitHubról: ellenőrizze az internetkapcsolat és a proxy beállításait, és próbálja meg újra. - + XML failure while reading metadata from file {} XML hiba a metaadatok olvasása közben a {} fájlból - + Invalid metadata in file {} Érvénytelen metaadat a {} fájlban - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. FIGYELMEZTETÉS: A package.xml metaadatokban megadott elérési út nem egyezik a jelenleg ellenőrzött változattal. - + Name Név - + Class Tűrési osztály - + Description Leírás - + Subdirectory Alkönyvtár - + Files Fájlok - + Select the folder containing your Addon Válassza ki a bővítményt tartalmazó mappát - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Nincs Vermin, megszakítva a műveletet. - + Scanning Addon for Python version compatibility A bővítmény Python-környezet verzió kompatibilitásának vizsgálata - + Minimum Python Version Detected Minimális Python verziót érzékelt - + Vermin auto-detected a required version of Python 3.{} A Vermin automatikusan észlelte a Python 3.{} szükséges verzióját - + Install Vermin? Telepítse a Vermint? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? A Python-környezet szükséges verziójának automatikus felismeréséhez a Vermin kiegészítőre van szükség (https://pypi.org/project/vermin/). "OK" a telepítéshez? - + Attempting to install Vermin from PyPi A Vermin telepítésének kísérlete a PyPi-ból - - + + Installation failed Sikertelen telepítés - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate A Vermin telepítése sikertelen -- a részletekért nézze meg a Jelentés nézetet. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate A telepítés után nem sikerült importálni a Vermint -- nem tudja ellenőrizni a bővítményt. - + Select an icon file for this package Válasszon ki egy ikonfájlt ehhez a csomaghoz - + Filter is valid A szűrő érvényes - + Filter regular expression is invalid A szűrő alapértelmezett kifejezése érvénytelen - + Click for details about package {} Kattintson a csomag részleteiért {} - + Click for details about workbench {} Kattintson a munkafelület részleteiért {} - + Click for details about macro {} Kattintson a makró részleteiért {} - + Maintainers: Közreműködők: - + Tags Címkék - + updated frissítve - - + + Up-to-date Naprakész - - - + + + Update available Frissítés elérhető - - + + Pending restart Újraindításra vár - - + + DISABLED LETILTVA - + Installed version Telepített verzió - + Unknown version Ismeretlen verzió - + Installed on Telepítve ekkor - + Available version Elérhető verzió - + Show Addons containing: A következőt tartalmazó bővítmények megjelenítése: - + All Minden - + Workbenches Munkafelületek - + Macros Makrók - + Preference Packs Előnyben részesített csomagok - + Status: Állapot: - + Any Bármelyik - + Not installed Nincs telepítve - + Filter Szűrő - + OK OK - + DANGER: Developer feature VESZÉLY: Fejlesztői funkció - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? VESZÉLY: A változatok váltása fejlesztőknek és béta tesztelőknek szól, és törött, nem visszafelé kompatibilis dokumentumokat, instabilitást, összeomlást és/vagy az univerzum idő előtti hőhalálát eredményezheti. Biztos vagy benne, hogy folytatni akarod? - + There are local changes Helyi módosítások vannak - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? FIGYELMEZTETÉS: Ez a repo nem commitolt helyi változásokat tartalmaz. Biztos vagy benne, hogy változatot akarsz váltani (magaddal hozva a változásokat)? - + + - Branch git terminology Változat - + Tag git terminology Mező - + Kind Table header for git ref type (e.g. either Tag or Branch) Típus - + Local name Table header for git ref name Helyi név - + Tracking Table header for git remote tracking branch name name Léptetés - + Local updated Table header for git update time of local branch Helyi verzió frissítve - + Remote updated Table header for git update time of remote branch Távoli verzió frissítve @@ -2148,77 +2133,77 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre A {} Python csomag telepítése sikertelen - + Installation of optional package failed A {} választható csomag telepítése sikertelen - + Installing required dependency {} {} szükséges függőség telepítése - + Installation of Addon {} failed A {} bővítmény telepítése sikertelen - + Downloaded package.xml for {} Letöltött package.xml a(z) {} számára - + Failed to decode {} file for Addon '{}' Nem sikerült dekódolni a {} fájlt a '{}' hozzáadásához - + Any dependency information in this file will be ignored Az ebben a fájlban lévő függőségi információkat figyelmen kívül hagyjuk - + Downloaded metadata.txt for {} Letöltött metadata.txt a(z) {} részére - + Downloaded requirements.txt for {} Letöltött requirements.txt a(z) {} részére - + Downloaded icon for {} Letöltött ikon ehhez: {} - + Unable to open macro wiki page at {} A {} makro wiki oldalt nem lehet megnyitni - + Unable to fetch the code of this macro. Nem sikerült beolvasni a makró kódját. - + Unable to retrieve a description from the wiki for macro {} Nem olvasható be a {} makró wiki leírása - + Unable to open macro code URL {} A {} makrókód URL nem nyitható meg - + Unable to fetch macro-specified file {} from {} Nem sikerült lekérni a makró által megadott {} fájlt innen: {} - + Could not locate macro-specified file {} (expected at {}) Nem találta a makró által megadott {} fájlt (a {}-nál kellett volna lennie) @@ -2259,17 +2244,17 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Bővítmény' uninstall.py forgatókönyvének végrehajtása sikertelen volt. Folytatja az eltávolítást... - + Removed extra installed file {} {} extra telepített fájl eltávolítása - + Error while trying to remove extra installed file {} Hiba a(z) {} extra telepített fájl eltávolítása közben - + Error while trying to remove macro file {}: Hiba a {} makrófájl eltávolítása közben: @@ -2279,132 +2264,132 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Nem sikerült csatlakozni a GitHubhoz. Ellenőrizze a kapcsolat és a proxy beállításait. - + WARNING: Duplicate addon {} ignored FIGYELMEZTETÉS: A {} bővítmény duplikátuma elhagyva - + Workbenches list was updated. A munkafelületek listája frissítve. - + Git is disabled, skipping git macros Git le van tiltva, kihagyja a git makrókat - + Attempting to change non-git Macro setup to use git Kísérlet a nem-git makró beállítások megváltoztatására a git használatára - + An error occurred updating macros from GitHub, trying clean checkout... Hiba történt a makrók frissítésében a GitHubról, próbálom tisztán ellenőrizni a... - + Attempting to do a clean checkout... Megpróbálok egy tiszta kijelentkezést végezni... - + Clean checkout succeeded A tiszta kilépés sikerült - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Nem sikerült frissíteni a makrókat a GitHubról -- próbálja meg törölni a bővítmény kezelő's cache-t. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Hiba a Wikihez csatlakozásban, a FreeCAD jelenleg nem tudja lekérdezni a Wiki makrólistáját - + Unable to fetch git updates for workbench {} Nem lehet letölteni a git-frissítéseket a(z) {} munkafelületekhez - + git status failed for {} git állapot nem sikerült ehhez: {} - + Failed to read metadata from {name} Nem sikerült beolvasni a metaadatokat innen {name} - + Failed to fetch code for macro '{name}' Nem sikerült kódot lekérni a '{name}' makróhoz - + Caching macro code... Makro kód ellenörzése... - + Addon Manager: a worker process failed to complete while fetching {name} Bővítmény kezelő: a {name} letöltése során nem sikerült befejezni a feldolgozást - + Out of {num_macros} macros, {num_failed} timed out while processing A {num_macros} makrók közül {num_failed} a feldolgozás során letelt az idő - + Addon Manager: a worker process failed to halt ({name}) Bővítmény kezelő: egy munkafolyamat nem állt le ({name}) - + Getting metadata from macro {} Metaadatok kinyerése ebből a makróból: {} - + Timeout while fetching metadata for macro {} Időkiesés a makró metaadatainak lekérése közben innen: {} - + Failed to kill process for macro {}! Nem sikerült leállítani a {} makró folyamatát! - + Retrieving macro description... Makró leírásának lekérése... - + Retrieving info from git Információ beolvasása git-ből - + Retrieving info from wiki Információ beolvasása wiki-ből - + Repository URL Preferences header for custom repositories Adattároló URL - + Branch name Preferences header for custom repositories Változat neve @@ -2420,7 +2405,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Az eredeti könyvtár biztonsági mentése és újraklónozása - + Failed to clone {} into {} using git Nem sikerült klónozni a {}-t a {}-be a git használatával @@ -2440,12 +2425,12 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Sikertelen - + Update was cancelled Frissítés megszakításra került - + some addons may have been updated egyes bővítmények frissülhettek @@ -2453,12 +2438,12 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Std_AddonMgr - + &Addon manager &Bővítmény kezelő - + Manage external workbenches, macros, and preference packs Külső munkafelületek, makrók és beállításcsomagok kezelése @@ -2466,12 +2451,12 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre AddonInstaller - + Finished removing {} {} fájl eltávolítása befejeződött - + Failed to remove some files Néhány fájl eltávolítása sikertelen @@ -2479,7 +2464,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre Addons installer - + Finished updating the following addons A következő bővítmények frissítése befejeződött @@ -2495,7 +2480,7 @@ telepített bővítményeket a rendszer ellenőrzi az elérhető frissítésekre QObject - + Addon Manager Bővítmény kezelő diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_id.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_id.qm index b320d46f40..e07c2eecfe 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_id.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_id.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_id.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_id.ts index c7685a20f2..1657567abe 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_id.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_id.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Bentuk - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolve Dependencies @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Bentuk - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Bentuk - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Refresh local cache - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Maintainer - - - - + + + + Author Penulis - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Memperbarui - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Install - + Uninstall Uninstall - + Check for Update Check for Update - + Run Macro Run Macro - + Change Branch Change Branch - + Enable Memungkinkan - + Disable Nonaktifkan - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Otomatis - + Workbench Meja kerja - + Addon Addon - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' menjalankan @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nama - + Class Kelas - + Description Description - + Subdirectory Subdirectory - + Files Berkas - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Tags - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Semua - + Workbenches Workbenches - + Macros Makro - + Preference Packs Preference Packs - + Status: Status: - + Any Apa saja - + Not installed Not installed - + Filter Menyaring - + OK Baik - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Branch - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Pelacakan - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Repository URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Addon Manager diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_it.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_it.qm index 82a27701ec..5f60ef05a6 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_it.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_it.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_it.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_it.ts index 242b5b114a..9a90359b38 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_it.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_it.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Modulo - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Risolvi Dipendenze @@ -419,11 +414,6 @@ Vuoi che Addon Manager li installi automaticamente? Scegli "Ignora" pe ExpandedView - - - Form - Modulo - @@ -473,11 +463,6 @@ Vuoi che Addon Manager li installi automaticamente? Scegli "Ignora" pe Form - - - Form - Modulo - Licenses @@ -1117,9 +1102,9 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili select_toolbar_dialog - - - + + + Select Toolbar Seleziona Barra Strumenti @@ -1138,7 +1123,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili toolbar_button - + Add button? Aggiungere pulsante? @@ -1166,139 +1151,139 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili AddonsInstaller - + Starting up... Avvio in corso... - + Loading addon information Caricamento informazioni addon - + Worker process {} is taking a long time to stop... Il processo in corso {} sta impiegando molto tempo per fermarsi... - + Previous cache process was interrupted, restarting... Il processo di cache precedente è stato interrotto, riavvio... - + Custom repo list changed, forcing recache... L'elenco dei repository personalizzati è stato modificato, si forza la recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. È necessario riavviare FreeCAD perché le modifiche abbiano effetto. - + Restart now Riavvia ora - + Restart later Riavvia dopo - - + + Refresh local cache Aggiorna cache locale - + Updating cache... Aggiornamento cache... - + Could not find addon '{}' to select Impossibile trovare l'addon '{}' da selezionare - - + + Checking for updates... Controllo aggiornamenti... - + Apply {} update(s) Applica {} aggiornamento(i) - + No updates available Nessun aggiornamento disponibile - - - + + + Cannot launch a new installer until the previous one has finished. Impossibile avviare una nuova installazione fino al termine della precedente. - + Execution of macro failed. See console for failure details. Esecuzione della macro non riuscita. Consultare la console per i dettagli dell'errore. - - + + - + Maintainer Manutentore - - - - + + + + Author Autore - + New Python Version Detected Rilevata Nuova Versione Python - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Sembra che sia la prima volta che questa versione di Python è stata usata con Addon Manager. Vuoi installare le dipendenze che erano state installate automaticamente? - + Processing, please wait... Elaborazione in corso, attendere prego... - - + + Update Aggiorna - + Updating... In aggiornamento... @@ -1308,63 +1293,63 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Impossibile importare QtNetwork -- non sembra essere installato sul sistema. Il tuo provider può avere un pacchetto per questa dipendenza (spesso chiamata "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Impossibile convertire la porta proxy specificata '{}' in un numero di porta - + Parameter error: mutually exclusive proxy options set. Resetting to default. Errore nel parametro: le opzioni proxy impostate sono reciprocamente esclusive. Ripristinato valore predefinito. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Errore di parametro: proxy utente indicato, ma nessun proxy fornito. Ripristino a default. - + Addon Manager: Unexpected {} response from server Addon Manager: Risposta {} inattesa dal server - + Error with encrypted connection Errore con connessione cifrata - + - + Confirm remove Conferma rimozione - + Are you sure you want to uninstall {}? Sei sicuro di voler disinstallare {}? - - - + + + Removing Addon Rimozione Addon - + Removing {} Rimozione {} - - + + Uninstall complete Disinstallazione completata - - + + Uninstall failed Disinstallazione fallita @@ -1374,183 +1359,183 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Avviso Addon Manager: impossibile importare QtWebEngineWidgets -- i dati README verranno visualizzati come solo testo - + Version {version} installed on {date} Versione {version} installata in {date} - + Version {version} installed Versione {version} installata - + Installed on {date} Installato il {date} - - - - + + + + Installed Installato - + On branch {}, update available to version Sul ramo {}, aggiornamento disponibile alla versione - + Update available to version Aggiornamento disponibile alla versione - + An update is available Un aggiornamento è disponibile - + Git tag '{}' checked out, no updates possible Git tag '{}' check out, nessun aggiornamento possibile - + This is the latest version available for branch {} Questa è l'ultima versione disponibile per il ramo {} - + Updated, please restart FreeCAD to use Aggiornato, riavviare FreeCAD per usare - + Update check in progress Controllo aggiornamento in corso - + Automatic update checks disabled Controllo automatico degli aggiornamenti disabilitato - + Installation location Percorso di installazione - + WARNING: This addon is obsolete ATTENZIONE: Questo addon è obsoleto - + WARNING: This addon is Python 2 Only ATTENZIONE: Questo addon funziona solo con Python 2 - + WARNING: This addon requires FreeCAD ATTENZIONE: Questo addon richiede FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. ATTENZIONE: Questo addon è attualmente installato, ma disabilitato. Usa il pulsante 'abilita' per riabilitare. - - + + No URL or wiki page provided by this macro Nessuna pagina URL o wiki fornita da questa macro - + Could not load README data from URL {} Impossibile caricare i dati README dall'URL {} - + This Addon will be enabled next time you restart FreeCAD. Questa estensione sarà abilitata al prossimo riavvio di FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Questa estensione sarà disabilitata al prossimo riavvio di FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. Binding Python per QtWebEngine non installati -- viene visualizzato il README con il visualizzatore di riserva. - + Success Operazione riuscita - + Branch change succeeded, please restart to use the new version. Cambio branch effettuato, riavvia l'applicazione per utilizzare la nuova versione. - + Changed to git ref '{}' -- please restart to use Addon. Cambiato in git ref '{}' -- si prega di riavviare per utilizzare Addon. - + Page JavaScript reported JavaScript della pagina segnalato - + Install Installa - + Uninstall Disinstalla - + Check for Update Controlla aggiornamenti - + Run Macro Esegui macro - + Change Branch Cambia Ramo - + Enable Abilita - + Disable Disabilita - + Return to package list Ritorna alla lista dei pacchetti - + The page is taking a long time to load... showing the data we have so far... La pagina sta impiegando molto tempo per caricare... si visualizzano i dati che abbiamo finora... @@ -1565,17 +1550,17 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Controllo della connessione a GitHub... - + Connection failed Connessione fallita - + Missing dependency Dipendenza mancante - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Impossibile importare QtNetwork -- vedere Report View per i dettagli. Addon Manager non disponibile. @@ -1586,12 +1571,12 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Altro... - + Select the corresponding license file in your Addon Seleziona il file di licenza corrispondente nel tuo Addon - + Location for new license file Posizione per il nuovo file di licenza @@ -1606,75 +1591,75 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Impossibile installare la macro {} - + Unrecognized content kind '{}' Tipo di contenuto non riconosciuto '{}' - + Unable to locate icon at {} Impossibile individuare l'icona a {} - + Select an icon file for this content item Seleziona un file icona per questo elemento di contenuto - - - + + + {} is not a subdirectory of {} {} non è una sottodirectory di {} - + Select the subdirectory for this content item Seleziona la sottocartella per questo elemento di contenuto - + Automatic Automatica - + Workbench Ambiente - + Addon Componente aggiuntivo - + Python Python - + Yes - + Internal Workbench Ambiente Interno - + External Addon Addon Esterno - + Python Package Python Package - - + + Other... Altro... @@ -1691,10 +1676,10 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili - - - - + + + + Missing Requirement Requisito Mancante @@ -1715,7 +1700,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili - + Incompatible Python version Versione Python incompatibile @@ -1737,7 +1722,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili - + Cannot execute Python Impossibile eseguire Python @@ -1753,7 +1738,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili - + Cannot execute pip Impossibile eseguire pip @@ -1770,7 +1755,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili - + Package installation failed Installazione del pacchetto fallita @@ -1806,7 +1791,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili - + Installation Failed Installazione Fallita @@ -1817,19 +1802,19 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili - + Create new toolbar Crea nuova barra degli strumenti - + A macro installed with the FreeCAD Addon Manager Una macro installata con FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' esegui @@ -1840,304 +1825,304 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Impossibile leggere i dati da GitHub: controllare la connessione internet e le impostazioni proxy e riprovare. - + XML failure while reading metadata from file {} Errore XML durante la lettura dei metadati dal file {} - + Invalid metadata in file {} Metadati non validi nel file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. ATTENZIONE: il percorso specificato nei metadati package.xml non corrisponde al ramo attualmente selezionato. - + Name Nome - + Class Classe - + Description Descrizione - + Subdirectory Sottocartella - + Files File - + Select the folder containing your Addon Seleziona la cartella contenente il tuo Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Vermin assente, annullamento operazione. - + Scanning Addon for Python version compatibility Scansione di Addon per la compatibilità della versione Python - + Minimum Python Version Detected Rilevata Versione Minima Python - + Vermin auto-detected a required version of Python 3.{} Vermin ha auto-rilevato una versione necessaria di Python 3.{} - + Install Vermin? Installare Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Il rilevamento automatico della versione richiesta di Python per questo Addon richiede Vermin (https://pypi.org/project/vermin/). OK per installare? - + Attempting to install Vermin from PyPi Tentativo di installare Vermin da PyPi - - + + Installation failed Installazione non riuscita - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Impossibile installare Vermin -- controlla Report View per i dettagli. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Impossibile importare Vermin dopo l'installazione -- impossibile scansionare Addon. - + Select an icon file for this package Seleziona un file icona per questo pacchetto - + Filter is valid Filtro valido - + Filter regular expression is invalid L'espressione regolare del filtro non è valida - + Click for details about package {} Clicca per i dettagli sul pacchetto {} - + Click for details about workbench {} Clicca per i dettagli sull'ambiente di lavoro {} - + Click for details about macro {} Clicca per i dettagli sulla macro {} - + Maintainers: Manutentori: - + Tags Etichette - + updated aggiornato - - + + Up-to-date Aggiornato - - - + + + Update available Aggiornamento disponibile - - + + Pending restart Riavvio in sospeso - - + + DISABLED DISABILITATO - + Installed version Versione installata - + Unknown version Versione sconosciuta - + Installed on Installato il - + Available version Versione disponibile - + Show Addons containing: Mostra Addons contenente: - + All Tutti - + Workbenches Ambienti di lavoro - + Macros Macro - + Preference Packs Pacchetti Preferenze - + Status: Stato: - + Any Qualsiasi - + Not installed Non installato - + Filter Filtro - + OK OK - + DANGER: Developer feature PERICOLO: Funzione sviluppatore - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? PERICOLO: La commutazione dei rami è destinata a sviluppatori e beta tester, e può causare documenti corrotti, non compatibili all'indietro, instabilità, crash e/o morte termica prematura dell'universo. Sei sicuro di voler continuare? - + There are local changes Ci sono cambiamenti locali - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? ATTENZIONE: Questo repository ha modifiche locali non effettuate. Sei sicuro di voler cambiare i rami (apportando le modifiche con te)? - + + - Branch git terminology Ramo - + Tag git terminology Etichetta - + Kind Table header for git ref type (e.g. either Tag or Branch) Tipo - + Local name Table header for git ref name Nome locale - + Tracking Table header for git remote tracking branch name name Crenatura - + Local updated Table header for git update time of local branch Locale aggiornato - + Remote updated Table header for git update time of remote branch Aggiornato da remoto @@ -2148,77 +2133,77 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Installazione del pacchetto Python {} fallita - + Installation of optional package failed Installazione del pacchetto opzionale fallita - + Installing required dependency {} Installazione della dipendenza richiesta {} - + Installation of Addon {} failed Installazione dell'Addon {} fallita - + Downloaded package.xml for {} Scaricato package.xml per {} - + Failed to decode {} file for Addon '{}' Impossibile decodificare il file {} per Addon '{}' - + Any dependency information in this file will be ignored Qualsiasi informazione sulla dipendenza in questo file verrà ignorata - + Downloaded metadata.txt for {} Scaricato metadati.txt per {} - + Downloaded requirements.txt for {} Scaricato requirements.txt per {} - + Downloaded icon for {} Scaricata Icona per {} - + Unable to open macro wiki page at {} Impossibile aprire la pagina wiki della macro su {} - + Unable to fetch the code of this macro. Impossibile recuperare il codice di questa macro. - + Unable to retrieve a description from the wiki for macro {} Impossibile recuperare una descrizione dalla wiki per macro {} - + Unable to open macro code URL {} Impossibile aprire l'URL del codice macro {} - + Unable to fetch macro-specified file {} from {} Impossibile recuperare il file macro specificato {} da {} - + Could not locate macro-specified file {} (expected at {}) Impossibile individuare il file specificato dalla macro {} (dovrebbe trovarsi a {}) @@ -2259,17 +2244,17 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Esecuzione dello script di Addon's uninstall.py non riuscita. Si proseguire con la disinstallazione... - + Removed extra installed file {} File extra installato rimosso {} - + Error while trying to remove extra installed file {} Errore durante il tentativo di rimuovere il file extra installato {} - + Error while trying to remove macro file {}: Errore durante il tentativo di rimuovere il file macro {}: @@ -2279,132 +2264,132 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Impossibile connettersi a GitHub. Controlla le impostazioni di connessione e proxy. - + WARNING: Duplicate addon {} ignored ATTENZIONE: Addon duplicato {} ignorato - + Workbenches list was updated. Elenco degli Ambienti di lavoro aggiornato. - + Git is disabled, skipping git macros Git è disabilitato, le macro git saltate - + Attempting to change non-git Macro setup to use git Tentativo di modificare la configurazione Macro non git per usare git - + An error occurred updating macros from GitHub, trying clean checkout... Si è verificato un errore durante l'aggiornamento delle macro da GitHub, ritentando il check out... - + Attempting to do a clean checkout... Tentativo di fare un check out pulito... - + Clean checkout succeeded Checkout pulito riuscito - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Impossibile aggiornare le macro da GitHub -- prova a cancellare la cache di Addon Manager. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Errore nel connettersi al Wiki, FreeCAD non può recuperare l'elenco macro Wiki in questo momento - + Unable to fetch git updates for workbench {} Impossibile recuperare gli aggiornamenti git per l'ambiente di lavoro {} - + git status failed for {} stato git fallito per {} - + Failed to read metadata from {name} Lettura dei metadati da {name} non riuscita - + Failed to fetch code for macro '{name}' Recupero del codice per macro '{name}' non riuscito - + Caching macro code... Memorizzazione codice macro... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: un processo in corso non è riuscito a completarsi durante il recupero di {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Su {num_macros} macro, {num_failed} si sono bloccate durante l'elaborazione - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: un processo in corso impedisce di arrestare ({name}) - + Getting metadata from macro {} Ottengo i metadati dalla macro {} - + Timeout while fetching metadata for macro {} Timeout durante il recupero dei metadati per la macro {} - + Failed to kill process for macro {}! Impossibile terminare il processo per la macro {}! - + Retrieving macro description... Recupero descrizione macro... - + Retrieving info from git Recupero informazioni da git - + Retrieving info from wiki Recupero informazioni dal wiki - + Repository URL Preferences header for custom repositories URL del repository - + Branch name Preferences header for custom repositories Nome branch @@ -2420,7 +2405,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Backup della directory originale e ri-clonazione - + Failed to clone {} into {} using git Impossibile clonare {} in {} utilizzando git @@ -2440,12 +2425,12 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Fallito - + Update was cancelled Aggiornamento annullato - + some addons may have been updated alcuni addons potrebbero essere stati aggiornati @@ -2453,12 +2438,12 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Gestisci ambienti di lavoro, macro e pacchetti di preferenze esterni @@ -2466,12 +2451,12 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili AddonInstaller - + Finished removing {} Terminata la rimozione {} - + Failed to remove some files Rimozione di alcuni file non riuscita @@ -2479,7 +2464,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili Addons installer - + Finished updating the following addons Terminato l'aggiornamento dei seguenti addons @@ -2495,7 +2480,7 @@ gli addons installati verranno controllati per gli aggiornamenti disponibili QObject - + Addon Manager Addon manager diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ja.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_ja.qm index c752422a5c..3be8846da2 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_ja.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_ja.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ja.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_ja.ts index fe826fd0c4..af4995ba2d 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_ja.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_ja.ts @@ -21,11 +21,6 @@ CompactView - - - Form - フォーム - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies 依存関係を解決 @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - フォーム - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - フォーム - Licenses @@ -1115,9 +1100,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar ツールバーを選択 @@ -1136,7 +1121,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? ボタンを追加しますか? @@ -1164,139 +1149,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager アドオン・マネージャー - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now 今すぐ再起動 - + Restart later 後で再起動 - - + + Refresh local cache ローカルキャッシュを更新 - + Updating cache... キャッシュを更新しています... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... アップデートを確認中… - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer メンテナー - - - - + + + + Author 作成者 - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update 更新 - + Updating... 更新中... @@ -1306,63 +1291,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon アドオンを削除中 - + Removing {} {} を削除 - - + + Uninstall complete アンインストール完了 - - + + Uninstall failed アンインストールに失敗しました @@ -1372,183 +1357,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} {date} にバージョン {version} がインストールされました - + Version {version} installed バージョン {version} がインストールされました - + Installed on {date} {date} にインストールされました - - - - + + + + Installed インストール済み - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available 利用可能なアップデートがあります - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete 警告: このアドオンは廃止されています。 - + WARNING: This addon is Python 2 Only 警告: このアドオンは Python 2 のみです。 - + WARNING: This addon requires FreeCAD 警告: このアドオンは FreeCAD が必要です。 - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. 警告: このアドオンは現在インストールされていますが無効になっています。再度有効にするには '有効' ボタンを使用してください。 - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. このアドオンは次回 FreeCAD を再起動したときに有効になります。 - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install インストール - + Uninstall アンインストール· - + Check for Update Check for Update - + Run Macro マクロの実行 - + Change Branch ブランチの変更 - + Enable 有効 - + Disable 無効化 - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1563,17 +1548,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1584,12 +1569,12 @@ installed addons will be checked for available updates その他... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file 新しいライセンスファイルの場所 @@ -1604,75 +1589,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic 自動 - + Workbench ワークベンチ - + Addon アドオン - + Python Python - + Yes はい - + Internal Workbench 内部ワークベンチ - + External Addon 外部アドオン - + Python Package Python パッケージ - - + + Other... その他... @@ -1689,10 +1674,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1713,7 +1698,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1735,7 +1720,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1751,7 +1736,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1768,7 +1753,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1804,7 +1789,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1815,19 +1800,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' 実行 @@ -1838,304 +1823,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name 名前 - + Class クラス - + Description 説明 - + Subdirectory サブディレクトリ - + Files ファイル - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags タグ - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version インストール済のバージョン - + Unknown version Unknown version - + Installed on Installed on - + Available version 利用可能なバージョン - + Show Addons containing: Show Addons containing: - + All すべて - + Workbenches ワークベンチ - + Macros マクロ - + Preference Packs Preference Packs - + Status: ステータス: - + Any 任意 - + Not installed Not installed - + Filter フィルター - + OK OK - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology ブランチ - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) 種類 - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name トラッキング - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2146,77 +2131,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} マクロ {} の説明をウィキから取得できません。 - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2257,17 +2242,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2277,132 +2262,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... マクロの説明を取得... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories リポジトリのURL - + Branch name Preferences header for custom repositories Branch name @@ -2418,7 +2403,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2438,12 +2423,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2451,12 +2436,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2464,12 +2449,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2477,7 +2462,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2493,7 +2478,7 @@ installed addons will be checked for available updates QObject - + Addon Manager アドオン・マネージャー diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ka.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_ka.qm index 62ff6fac58..99a0b14204 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_ka.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_ka.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ka.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_ka.ts index 183858e0b8..8250b0245f 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_ka.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_ka.ts @@ -21,11 +21,6 @@ CompactView - - - Form - ფორმა - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies დამოკიდებულებების ამოხსნა @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - ფორმა - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - ფორმა - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar აირჩიეთ ხელსაწყოთა ზოლი @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? დავამატო ღილაკი? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... გაშვება... - + Loading addon information დამატების შესახებ ინფორმაციის ჩატვირთვა - + Worker process {} is taking a long time to stop... დამხმარე პროცესი {} გაჩერებას მეტისმეტად დიდხანს უნდება... - + Previous cache process was interrupted, restarting... ქეშის წინა პროცესი გაწყდა. თავიდან დაწყება... - + Custom repo list changed, forcing recache... ხელით მითითებული რეპოების სია შეიცვალა. მიმდინარეობს ლოკალური ქეშის თავიდან აგება... - + Addon manager დამატებების მმართველი - + You must restart FreeCAD for changes to take effect. ცვლილებების ძალაში შესასვლელად საჭიროა FreeCAD-ის გადატვირთვა. - + Restart now ახლავე გადატვირთვა - + Restart later მოგვიანებით გადატვირთვა - - + + Refresh local cache ლოკალური კეშის განახლება - + Updating cache... კეშის განახლება... - + Could not find addon '{}' to select ასარჩევი განახლება ნაპოვნი არაა'{}' - - + + Checking for updates... განახლების შემოწმება... - + Apply {} update(s) {} განახლების გადატარება - + No updates available განახლებები ხელმისაწვდომი არაა - - - + + + Cannot launch a new installer until the previous one has finished. ახალი დამყენებლის გაშვება მაშინ, როცა წინა ჯერ არ დასრულებულა, შეუძლებელია. - + Execution of macro failed. See console for failure details. მაკროს შესრულების შეცდომა. მეტი დეტალებისთვის იხილეთ კონსოლი. - - + + - + Maintainer წამყვანი პროგრამისტი - - - - + + + + Author ავტორი - + New Python Version Detected აღმოჩენილია Python-ის ახალი ვერსია - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? როგორც ჩანს, Python-ის ეს ვერსია დამატებების მმართველში პირველად გამოიყენება. გნებავთ იგივე ავტომატურად-დაყენებული დამოკიდებულებების დაყენება? - + Processing, please wait... მიმდინარეობს დამუშავება. გთხოვთ, მოიცადეთ... - - + + Update განახლება - + Updating... მიმდინარეობს განახლება... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates QtNetwork-ის შემოტანის შეცდომა. როგორც ჩანს, ის თქვენს სისტემაზე დაყენებული არაა. თქვენს მომწოდებელს შეიძლება მისთვის ცალკე პაკეტი ჰქონდეს (ხშირად ჰქვია "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number მითითებული პოროქსის პორტის '{}' პორტის ნომრად გარდაქმნის შეცდომა - + Parameter error: mutually exclusive proxy options set. Resetting to default. პარამეტრის შეცდომა: პროქსის ურთიერთგამომრიცხავი პარამეტრები. დაბრუნებული იქნება ნაგულისხმევი მნიშვნელობები. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. პარამეტრის შეცდომა: მომხმარებლის პროქსი ჩართულია, მაგრამ მითითებული არაა. გამოყენებული იქნება ნაგულისხმევი მნიშვნელობები. - + Addon Manager: Unexpected {} response from server დამატებების მმართველი: სერვერის მოულოდნელი პასუხი: {} - + Error with encrypted connection დაშიფრული კავშირის შეცდომა - + - + Confirm remove წაშლის დადასტურება - + Are you sure you want to uninstall {}? დარწმუნებული ბრძანდებით, რომ გნებავთ, წაშალოთ {}? - - - + + + Removing Addon დამატების წაშლა - + Removing {} {}-ის წაშლა - - + + Uninstall complete წაშლა დასრულდა - - + + Uninstall failed წაშლის შეცდომა @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates დამატებების მმართველის გაფრთხლება: QtWebEngineWidgets-ის შემოტანის სეცდომა -- README-ის მონაცემები ტექსტურად გამოჩნდება - + Version {version} installed on {date} დაყენებული ვერსია {version}. თარიღი {date} - + Version {version} installed დაყენებული ვერსია {version} - + Installed on {date} ინსტალაციის თარიღი {date} - - - - + + + + Installed დაყენებულია - + On branch {}, update available to version ხელმისაწვდომი განახლება ბრენჩზე {} - + Update available to version ხელმისაწვდომია განახლება ვერსიამდე - + An update is available განახლება ხელმისაწვდომია - + Git tag '{}' checked out, no updates possible Git ჭდით '{}' შემოწმდა. განახლებები ხელმიუწვდომელია - + This is the latest version available for branch {} ეს ბრენჩის {} უახლესი ვერსიაა - + Updated, please restart FreeCAD to use განახლდა. გამოსაყენებლად გთხოვთ გადატვირთოთ FreeCAD - + Update check in progress მიმდინარეობს განახლებების შემოწმება - + Automatic update checks disabled განახლებების ავტომატური შემოწმება გამორთულია - + Installation location დაყენების ადგილი - + WARNING: This addon is obsolete გაფრთხილება: ეს დამატება მოძველებულია - + WARNING: This addon is Python 2 Only გაფრთხილება: ეს დამატება მუშაობს მხოლოდ Python v2-ზე - + WARNING: This addon requires FreeCAD გაფრთხილება: ამ დამატებას სჭირდება FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. გაფრთხილება: ეს დამატება ამჟამად დაყენებულია, მაგრამ გამორთული. ჩასართავად გამოიყენეთ 'ჩართვის' ღილაკი. - - + + No URL or wiki page provided by this macro მაკრო არ შეიცავს ბმულს ან wiki-ის გვერდს - + Could not load README data from URL {} URL {}-დან README ფაილის ჩატვირთვის შეცდომა - + This Addon will be enabled next time you restart FreeCAD. ეს დამატება მხოლოდ FreeCAD-ის მორიგი რესტარტის შემდეგ ჩაირთვება. - + This Addon will be disabled next time you restart FreeCAD. ეს დამატება მხოლოდ FreeCAD-ის მორიგი რესტარტის შემდეგ გაითიშება. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine-ის Python-ზე მიბმები დაყენებული არაა -- გამოიყენება README-ის სარეზერვო ჩვენება. - + Success წარმატება - + Branch change succeeded, please restart to use the new version. ბრენჩი წარმატებით შეიცვალა. ახალი ვერსიის გამოსაყენებლად საჭიროა გადატვირთვა. - + Changed to git ref '{}' -- please restart to use Addon. Git ref შეიცვალა '{}' - დამატებით გამოსაყენებლად გადატვირთეთ. - + Page JavaScript reported გვერდის ჯავასკრიპტის პატაკი - + Install დაყენება - + Uninstall წაშლა - + Check for Update განახლების შემოწმება - + Run Macro მაკროს გაშვება - + Change Branch ბრენჩის შეცვლა - + Enable ჩართვა - + Disable გამორთვა - + Return to package list პაკეტების სიასთან დაბრუნება - + The page is taking a long time to load... showing the data we have so far... გვერდის ჩატვირთვას მეტისმეტად დიდი დრო სჭირდება... ნაჩვენები იქნება მონაცემები, რისი მიღებაც მოვასწარით... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates GitHub-მდე კავშირის შემოწმება... - + Connection failed დაკავშირება ვერ მოხერხდა - + Missing dependency აკლია დამოკიდებულება - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. QtNetwork-ის შემოტანის შეცდომა -- დეტალებისთვის იხილეთ ანგარიში. დამატებების მმართველი ხელმიუწვდომელია. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates სხვა... - + Select the corresponding license file in your Addon აირჩიეთ შესაბამისი ლიცენზიის ფაილი თქვენი დამატებისთვის - + Location for new license file ახალი ლიცენზიის ფაილის მდებარეობა @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates მაკრო {} დაყენების შეცდომა - + Unrecognized content kind '{}' შემცველობის უცნობი ტიპი '{}' - + Unable to locate icon at {} {}-ზე ხატულის პოვნის შეცდომა - + Select an icon file for this content item აირჩიეთ ხატულას ფაილი ამ შემცველობის ელემენტისთვის - - - + + + {} is not a subdirectory of {} {} -ი {}-ის ქვესაქაღალდეს არ წარმოადგენს - + Select the subdirectory for this content item აირჩიეთ ამ შემცველობის ელემენტის ქვესაქაღალდე - + Automatic ავტომატური - + Workbench სამუშაო მაგიდა - + Addon დამატება - + Python Python - + Yes დიახ - + Internal Workbench შიდა სამუშაო მაგიდა - + External Addon გარე დამატება - + Python Package Python-ის პაკეტი - - + + Other... სხვა... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement არასაკმარისი პირობები @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Python-ის შეუთავსებელი ვერსია @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Python-ის გაშვების შეცდომა @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Pip-ის გაშვების შეცდომა @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed პაკეტის დაყენების შეცდომა @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed დაყენების შეცდომა @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar ხელსაწყოების ახალი ზოლის შექმნა - + A macro installed with the FreeCAD Addon Manager FreeCAD-ის დამატებების მმართველით დაყენებული მაკრო - + Run Indicates a macro that can be 'run' გაშვება @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates GitHub-დან მონაცემების წაკითხვა შეუძლებელია. შეამოწმეთ ინტერნეტთან შეერთებისა და პროქსის პარამეტრებ და თავიდან სცადეთ. - + XML failure while reading metadata from file {} XML-ის შეცდომა მეტამონაცემების კითხვისას ფაილიდან {} - + Invalid metadata in file {} არასწორი მეტამონაცემები ფაილში {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. გაფრთხილება: package.xml-ის მეტამონაცემებში მითითებული ვილიკი ამჟამად გამოთხოვილი ბრენჩის ბილიკს არ ემთხვევა. - + Name სახელი - + Class კლასი - + Description აღწერა - + Subdirectory ქვესაქაღალდე - + Files ფაილები - + Select the folder containing your Addon აირჩიეთ თქვენი დამატების შემცველი საქაღალდე - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Vermin აღმოჩენილი არაა. ოპერაცია გაუქმდება. - + Scanning Addon for Python version compatibility დამატების სკანირება Python-ის ვერსიის თავსებადობაზე - + Minimum Python Version Detected აღმოჩენილია Python-ის მინიმალური ვერსია - + Vermin auto-detected a required version of Python 3.{} Vermin-მა ავტომატურად იპოვა საჭირო ვერსია Python 3.{} - + Install Vermin? დავაყენო Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Python-ის ვერსიის ამ დამატებისთვის ავტომატური ამოცნობა Vermin-ს (https://pypi.org/project/vermin/) მოითხოვს. დავაყენო? - + Attempting to install Vermin from PyPi Vermin-ის PyPi-დან დაყენების მცდელობა - - + + Installation failed დაყენების შეცდომა - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Vermn-ის დაყენების შეცდომა - მეტი დეტალებისთვის იხილეთ ანგარიშის ხედი. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate დაყენების შემდეგ Vermin-ის შემოტანის შეცდომა - დამატების სკანირება შეუძლებელია. - + Select an icon file for this package აირჩიეთ ამ პაკეტის ხატულა - + Filter is valid ფილტრი სწორია - + Filter regular expression is invalid ფილტრის რეგულარული გამოსახულება არასწორია - + Click for details about package {} პაკეტის დეტალების გასაგებად დააწკაპუნეთ {} - + Click for details about workbench {} სამუშაო მაგიდის დეტალების გასაგებად დააწკაპუნეთ {} - + Click for details about macro {} მაკროს დეტალების სანახავად დააწკაპუნეთ {} - + Maintainers: პროექტის ლიდერები: - + Tags ჭდეები - + updated განახლებულია - - + + Up-to-date განახლებულია - - - + + + Update available განახლება ხელმისაწვდომია - - + + Pending restart რესტარტის მოლოდინი - - + + DISABLED გათიშულია - + Installed version დაყენებული ვერსია - + Unknown version უცნობი ვერსია - + Installed on დაყენების დრო - + Available version ხელმისაწვდომი ვერსია - + Show Addons containing: იმ გაფ-ების ჩვენება, რომლებიც შეიცავენ: - + All ყველა - + Workbenches სამუშაო მაგიდები - + Macros მაკროები - + Preference Packs პარამეტრების პაკეტები - + Status: მდგომარეობა: - + Any ნებისმიერი - + Not installed არ არის დაყენებული - + Filter ფილტრი - + OK დიახ - + DANGER: Developer feature საშიშროება: პროგრამისტისთვის საჭირო თვისება - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? საშიშროება: ბრენჩებს შორის გადართვა განკუთვნილია პროგრამისტებისა და ბეტა ტესტერებისთვის და შეიძლება ყველაფერი გაფუჭებული, არათავსებადი დოკუმენტებით და არასტაბილურობით ან/და სამყაროს გადაცხელებით. დარწმუნებული ბრძანდებით, რომ გაგრძელება გნებავთ? - + There are local changes გაქვთ ადგილობრივი ცვლილებები - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? გაფრთხილება: ამ რეპოს დაუკომიტებელი ლოკალური ცვლილებები გააჩნია. დარწმუნებული ბრძანდებით, რომ გნებავთ შეცვალოთ ბრენჩი (და თან წაიყოლოთ თქვენი ცვლილებები)? - + + - Branch git terminology ბრენჩი - + Tag git terminology ჭდე - + Kind Table header for git ref type (e.g. either Tag or Branch) ტიპი - + Local name Table header for git ref name ლოკალური სახელი - + Tracking Table header for git remote tracking branch name name ტრეკინგი - + Local updated Table header for git update time of local branch ლოკალურები განახლებულია - + Remote updated Table header for git update time of remote branch დაშორებული შემცველობა განახლდა @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Python-ის პაკეტის {} დაყენება შეუძლებელია - + Installation of optional package failed არასავალდებულო პაკეტის დაყენების შეცდომა - + Installing required dependency {} აუცილებელი დამოკიდებულების დაყენება: {} - + Installation of Addon {} failed დამატების "{}" დაყენების შეცდომა - + Downloaded package.xml for {} {}-ის package.xml გადმოწერილია - + Failed to decode {} file for Addon '{}' {} ფაილის გაშიფვრის შეცდომა დამატებისთვის '{}' - + Any dependency information in this file will be ignored ამ ფაილში არსებული ნებისმიერი დამოკიდებულება იგნორირებული იქნება - + Downloaded metadata.txt for {} {}-ის metadata.txt გადმოწერილია - + Downloaded requirements.txt for {} {}-ის requirements.txt გადმოწერილია - + Downloaded icon for {} ხატულა გადმოწერილია {} - + Unable to open macro wiki page at {} მაკროების ვიკის გვერდის {} გახსნის შეცდომა - + Unable to fetch the code of this macro. მაკროს კოდის მოპოვება შეუძლებელია. - + Unable to retrieve a description from the wiki for macro {} ვიკიდან მაკროს {} აღწერის მიღება შეუძლებელია - + Unable to open macro code URL {} მაკროს კოდის URL-ის ({}) გახსნა შეუძლებელია - + Unable to fetch macro-specified file {} from {} შეცდომა მაკროსთვის-მითითებული ფაილის {} {}-დან გამოთხოვისას - + Could not locate macro-specified file {} (expected at {}) მაკროს მიერ მითითებული ფაილის {} პოვნა შეუძლებელია (ველოდი მისამართზე {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates დამატების uninstall.py სკრიპტის შესრულება ვერ მოხერხდა. ვუშვებ წაშლის პროცესს... - + Removed extra installed file {} დამატებითი დაყენებული ფაილი {} წაიშალა - + Error while trying to remove extra installed file {} შეცდომა დამატებითი დაყენებული ფაილის {} წაშლის მცდელობისას - + Error while trying to remove macro file {}: შეცდომა მაკროს ფაილის {} წაშლისას: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates GitHub-თან მიერთების შეცდომა. შეამოწმეთ შეერთებისა და პროქსის პარამეტრები. - + WARNING: Duplicate addon {} ignored გაფრთხილება: დუბლიკატი გაფართოება {} გამოტოვებულია - + Workbenches list was updated. სამუშაო გარემოების სია განახლდა. - + Git is disabled, skipping git macros Git-ი გათიშულია. git მაკროები გამოტოვებული იქნება - + Attempting to change non-git Macro setup to use git მცდელობა, არა-git-ის მაკროსი git-ის გამოყენებაზე გადავრთო - + An error occurred updating macros from GitHub, trying clean checkout... შეცდომა მაკროების GitHub-დან განახლებისას. ვცდი სუფთად გამოვითხოვო... - + Attempting to do a clean checkout... სუფთა გამოთხოვის მცდელობა... - + Clean checkout succeeded სუფთა გამოთხოვა წარმატებულია - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. GitHub-დან მაკროს განახლების შეცდომა -- სცადეთ დამატებების მმართველის ქეში გაწმინდოთ. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time ვიკისთან დაკავშირების შეცდომა. FreeCAD-ს ამჟამად ვკიდან მაკროების სიის მიღება არ შეუძლია - + Unable to fetch git updates for workbench {} სამუშაო მაგიდის {} განახლებების git-დან მიღება შეუძლებელია - + git status failed for {} git status-ის შეცდომა {} - + Failed to read metadata from {name} მეტამონაცემების {name}-დან კითხვის შეცდომა - + Failed to fetch code for macro '{name}' მაკროს '{name}' კოდის გამოთხოვის შეცდომა; - + Caching macro code... მაკროს კოდის კეშირება... - + Addon Manager: a worker process failed to complete while fetching {name} დამატებების მმართველი: დამხმარე პროცესის შეცდომა {name}-ის გადმოწერისას - + Out of {num_macros} macros, {num_failed} timed out while processing {num_macros} მაკროდან {num_failed}-ის დამუშავების ვადა გავიდა - + Addon Manager: a worker process failed to halt ({name}) დამატებების მმართველი: დამხმარე პროცესის შეჩერების შეცდომა ({name}) - + Getting metadata from macro {} მაკროდან {} მეტამონაცემების მიღება - + Timeout while fetching metadata for macro {} მაკროს {} მეტამონაცემების გამოთხოვნის ვადა გავიდა - + Failed to kill process for macro {}! მაკროს {} პროცესის მოკვლა შეუძლებელია! - + Retrieving macro description... მაკროს აღწერის მიღება... - + Retrieving info from git ინფორმაციის git-დან მიღება - + Retrieving info from wiki ინფორმაციის wiki-დან მიღება - + Repository URL Preferences header for custom repositories რეპოზიტორიის URL - + Branch name Preferences header for custom repositories ბრენჩის სახელი @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates საწყისი საქაღალდის მარქაფი და თავიდან კლონირება - + Failed to clone {} into {} using git {}-ის git-ით {}-ში კლონირების შეცდომა @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates შეცდომა - + Update was cancelled განახლება გაუქმდა - + some addons may have been updated ზოგიერთი განახლებ შეიძლება განახლდა @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &დამატებების მმართველი - + Manage external workbenches, macros, and preference packs მართეთ გარე სამუშაო მაგიდები, მაკროები და პარამეტრების ნაკრებები @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} {}-ის წაშლა დასრულდა - + Failed to remove some files ზოგიერთი ფაილის წაშლა შეუძლებელია @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons დასრულდა შემდეგი დამატებების განახლება @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager დამატებების მმართველი diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ko.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_ko.qm index 3e5d4b1c1b..caa1fc754c 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_ko.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_ko.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ko.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_ko.ts index 57bf8fa0e0..447d86d201 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_ko.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_ko.ts @@ -21,11 +21,6 @@ CompactView - - - Form - 양식 - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies 의존성 해결 @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - 양식 - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - 양식 - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache 로컬 캐시 비우기 - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Maintainer - - - - + + + + Author 작성자: - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update 업데이트 - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Install - + Uninstall Uninstall - + Check for Update Check for Update - + Run Macro Run Macro - + Change Branch Change Branch - + Enable 활성화 - + Disable Disable - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automatic - + Workbench 워크벤치 - + Addon Addon - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' 실행 @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name 이름 - + Class Class - + Description 설명 - + Subdirectory Subdirectory - + Files Files - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags 태그 - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All 전체 - + Workbenches 워크벤치 - + Macros 매크로 - + Preference Packs Preference Packs - + Status: 상태: - + Any Any - + Not installed Not installed - + Filter 필터 - + OK 확인 - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Branch - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name 트래킹 - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories 저장소 URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager 애드온 매니저 diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_nl.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_nl.qm index 8f67bcb3da..5d62c021b2 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_nl.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_nl.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_nl.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_nl.ts index c38dd5af9a..1f24756be2 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_nl.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_nl.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Vorm - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Afhankelijkheden oplossen @@ -419,11 +414,6 @@ Wilt u dat de Addon Manager deze automatisch installeert? Kies "Negeren&quo ExpandedView - - - Form - Vorm - @@ -473,11 +463,6 @@ Wilt u dat de Addon Manager deze automatisch installeert? Kies "Negeren&quo Form - - - Form - Vorm - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Werkbalk selecteren @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Knop toevoegen? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Opstarten... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Aangepaste repo lijst veranderd, geheugen-update forceren... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. U moet FreeCAD herstarten om de wijzigingen toe te passen. - + Restart now Nu opnieuw opstarten - + Restart later Later opnieuw opstarten - - + + Refresh local cache Lokale cache vernieuwen - + Updating cache... Bezig met updaten van cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Zoeken naar updates... - + Apply {} update(s) {} update(s) toepassen - + No updates available Geen updates beschikbaar - - - + + + Cannot launch a new installer until the previous one has finished. Kan geen nieuw installatieprogramma starten totdat de vorige klaar is. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Beheerder - - - - + + + + Author Auteur - + New Python Version Detected Nieuwe Python versie gedetecteerd - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Bezig, even geduld... - - + + Update Update - + Updating... Updaten... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Bevestig verwijdering - + Are you sure you want to uninstall {}? Weet u zeker dat u {} wilt de-installeren? - - - + + + Removing Addon Removing Addon - + Removing {} {} wordt verwijderd - - + + Uninstall complete De-installatie voltooid - - + + Uninstall failed Verwijderen mislukt @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Versie {version} geïnstalleerd op {date} - + Version {version} installed Versie {version} geïnstalleerd - + Installed on {date} Geïnstalleerd op {date} - - - - + + + + Installed Geïnstalleerd - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update beschikbaar voor versie - + An update is available Er is een update beschikbaar - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Bijgewerkt, herstart FreeCAD om te gebruiken - + Update check in progress Controle van updates bezig - + Automatic update checks disabled Automatische updatecontroles uitgeschakeld - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Geslaagd - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Installeren - + Uninstall De-installeren - + Check for Update Controleren op update - + Run Macro Run Macro - + Change Branch Change Branch - + Enable Schakel in - + Disable Uitschakelen - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Controleren op verbinding met GitHub... - + Connection failed Verbinden mislukt - + Missing dependency Ontbrekende afhankelijkheid - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Andere... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Locatie van nieuwe licentiebestand @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Kan pictogram niet vinden op {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is geen submap van {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automatisch - + Workbench Werkbank - + Addon Add-on - + Python Python - + Yes Ja - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Andere... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Ontbrekende Vereiste @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Kan Python niet uitvoeren @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Installatie pakket mislukt @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installatie mislukt @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Nieuwe werkbalk maken - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Uitvoeren @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Ongeldige metadata in het bestand {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Naam - + Class Klasse - + Description Omschrijving - + Subdirectory Submap - + Files Bestanden - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installatie mislukt - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is geldig - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Beheerders: - + Tags Labels - + updated bijgewerkt - - + + Up-to-date Up-to-date - - - + + + Update available Update beschikbaar - - + + Pending restart Wachten op herstarten - - + + DISABLED UITGESCHAKELD - + Installed version Geïnstalleerde versie - + Unknown version Onbekende versie - + Installed on Geïnstalleerd op - + Available version Beschikbare versie - + Show Addons containing: Show Addons containing: - + All Alle - + Workbenches Werkbanken - + Macros Macro's - + Preference Packs Preference Packs - + Status: Status: - + Any Elke - + Not installed Niet geïnstalleerd - + Filter Filter - + OK OK - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes Er zijn lokale wijzigingen - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Aftakking - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Soort - + Local name Table header for git ref name Lokale naam - + Tracking Table header for git remote tracking branch name name Volgen - + Local updated Table header for git update time of local branch Lokaal bijgewerkt - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Extra geïnstalleerd bestand {} verwijderd - + Error while trying to remove extra installed file {} Fout bij het verwijderen van extra geïnstalleerd bestand {} - + Error while trying to remove macro file {}: Fout bij het verwijderen van het macro bestand {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Kan geen verbinding maken met GitHub. Controleer je verbinding en proxy-instellingen. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Informatie ophalen van git - + Retrieving info from wiki Informatie ophalen van wiki - + Repository URL Preferences header for custom repositories URL van de repository - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Mislukt - + Update was cancelled Update werd geannuleerd - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Verwijderen van {} voltooid - + Failed to remove some files Kan sommige bestanden niet verwijderen @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Uitbreidingsmanager diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm index d6ae89aea5..d66198745d 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts index 97c943e389..edbf7f2c2c 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Formularz - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Rozwiąż zależności @@ -419,11 +414,6 @@ Czy chcesz, aby Menadżer dodatków zainstalował je automatycznie? Wybierz "Zig ExpandedView - - - Form - Formularz - @@ -473,11 +463,6 @@ Czy chcesz, aby Menadżer dodatków zainstalował je automatycznie? Wybierz "Zig Form - - - Form - Formularz - Licenses @@ -1117,9 +1102,9 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji select_toolbar_dialog - - - + + + Select Toolbar Wybierz pasek narzędzi @@ -1138,7 +1123,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji toolbar_button - + Add button? Dodać przycisk? @@ -1166,138 +1151,138 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji AddonsInstaller - + Starting up... Uruchamianie ... - + Loading addon information Wczytywanie informacji o dodatku - + Worker process {} is taking a long time to stop... Zatrzymanie działającego procesu {} zajmuje dużo czasu ... - + Previous cache process was interrupted, restarting... Poprzedni proces pamięci podręcznej został przerwany, ponowne uruchomienie ... - + Custom repo list changed, forcing recache... Zmieniono listę repozytoriów użytkownika, wymuszając ponowne buforowanie ... - + Addon manager Menadżera dodatków - + You must restart FreeCAD for changes to take effect. Musisz zrestartować FreeCAD, aby zmiany zaczęły obowiązywać. - + Restart now Uruchom ponownie teraz - + Restart later Uruchom ponownie później - - + + Refresh local cache Odśwież pamięć podręczną - + Updating cache... Aktualizowanie pamięci podręcznej ... - + Could not find addon '{}' to select Nie można znaleźć dodatku "{}"; do wybrania - - + + Checking for updates... Sprawdzam dostępność aktualizacji ... - + Apply {} update(s) Wykonaj {} aktualizacje - + No updates available Brak dostępnych aktualizacji - - - + + + Cannot launch a new installer until the previous one has finished. Nie można uruchomić nowego instalatora, dopóki poprzedni instalator nie zakończy pracy. - + Execution of macro failed. See console for failure details. Wykonanie makrodefinicji nie powiodło się. Szczegóły awarii znajdują się w konsoli. - - + + - + Maintainer Opiekun - - - - + + + + Author Autor - + New Python Version Detected Wykryto nową wersję środowiska Python - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Wygląda na to, że po raz pierwszy ta wersja Python została użyta z Menedżerem dodatków. Czy chciałbyś zainstalować dla niego te same automatycznie instalowane zależności? - + Processing, please wait... Przetwarzanie, proszę czekać ... - - + + Update Zaktualizuj - + Updating... Aktualizuję ... @@ -1307,63 +1292,63 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Nie można zaimportować QtNetwork -- nie jest zainstalowany w Twoim systemie. Twój dostawca może mieć pakiet dla tej zależności (często nazywany np. "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Nie udało się przekonwertować określonego portu serwera pośredniczącego "{}"; na numer portu - + Parameter error: mutually exclusive proxy options set. Resetting to default. Błąd parametru: ustawiono wzajemnie wykluczające się opcje serwera pośredniczącego. Resetowanie do wartości domyślnych. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Błąd parametru: wskazano serwer pośredniczący użytkownika, ale nie podano serwera pośredniczącego. Przywrócenie ustawień domyślnych. - + Addon Manager: Unexpected {} response from server Menedżer dodatków: Nieoczekiwana odpowiedź {} z serwera - + Error with encrypted connection Błąd z połączeniem szyfrowanym - + - + Confirm remove Potwierdź usunięcie - + Are you sure you want to uninstall {}? Czy na pewno odinstalować {}? - - - + + + Removing Addon Usuwanie dodatku - + Removing {} Usuwanie {} - - + + Uninstall complete Odinstalowanie zakończone - - + + Uninstall failed Odinstalowanie nie powiodło się @@ -1373,183 +1358,183 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Ostrzeżenie menedżera dodatków: nie można zaimportować widżetów QtWebEngine — informacje README będą wyświetlane tylko w postaci tekstu - + Version {version} installed on {date} Wersja {version} została zainstalowana: {date} - + Version {version} installed Wersja {version} zainstalowana - + Installed on {date} Data instalacji {date} - - - - + + + + Installed Zainstalowano - + On branch {}, update available to version W gałęzi {} aktualizacja dostępna do wersji - + Update available to version Aktualizacja dostępna do wersji - + An update is available Dostępna jest aktualizacja - + Git tag '{}' checked out, no updates possible Identyfikator Git "{}" sprawdzony, brak możliwości aktualizacji - + This is the latest version available for branch {} To jest najnowsza wersja dostępna dla gałęzi {} - + Updated, please restart FreeCAD to use Zaktualizowano, uruchom ponownie program FreeCAD - + Update check in progress Sprawdzanie aktualizacji w toku - + Automatic update checks disabled Automatyczne sprawdzanie aktualizacji wyłączone - + Installation location Miejsce instalacji - + WARNING: This addon is obsolete UWAGA: Ten dodatek jest przestarzały - + WARNING: This addon is Python 2 Only UWAGA: Ten dodatek jest przeznaczony tylko dla środowiska Python 2 - + WARNING: This addon requires FreeCAD OSTRZEŻENIE: Ten dodatek wymaga programu FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. OSTRZEŻENIE: Ten dodatek jest obecnie zainstalowany, ale wyłączony. Użyj przycisku "włącz", aby go ponownie włączyć. - - + + No URL or wiki page provided by this macro Brak adresu URL lub strony Wiki udostępnionej przez tę makrodefinicję - + Could not load README data from URL {} Nie można wczytać pliku danych README z adresu URL {} - + This Addon will be enabled next time you restart FreeCAD. Ten dodatek zostanie włączony przy następnym ponownym uruchomieniu programu FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Ten dodatek zostanie wyłączony przy ponownym uruchomieniu programu FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. Nie zainstalowano powiązań QtWebEngine Python — użyto awaryjnego wyświetlenia README. - + Success Zakończono pomyślnie - + Branch change succeeded, please restart to use the new version. Zmiana gałęzi powiodła się, uruchom ponownie, aby użyć nowej wersji. - + Changed to git ref '{}' -- please restart to use Addon. Zmieniono w Git Reference's "{}" - Ponowne uruchomienie jest wymagane do użycia dodatku. - + Page JavaScript reported Zgłoszona strona JavaScript - + Install Zainstaluj - + Uninstall Odinstaluj - + Check for Update Sprawdź dostępność aktualizacji - + Run Macro Uruchom makrodefinicję - + Change Branch Zmień gałąź - + Enable Włącz - + Disable Wyłącz - + Return to package list Wróć do listy pakietów - + The page is taking a long time to load... showing the data we have so far... Strona długo się ładuje ... prezentując dostępne do tej pory dane ... @@ -1564,17 +1549,17 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Sprawdzanie połączenia z GitHub ... - + Connection failed Połączenie nie powiodło się - + Missing dependency Brakująca zależność - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Nie można zaimportować QtNetwork — szczegóły możesz zobaczyć w Widoku raportu. Menedżer dodatków jest niedostępny. @@ -1585,12 +1570,12 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Inne ... - + Select the corresponding license file in your Addon Wybierz odpowiedni plik licencyjny w swoim dodatku - + Location for new license file Lokalizacja nowego pliku licencji @@ -1605,75 +1590,75 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Nie udało się zainstalować makrodefinicji {} - + Unrecognized content kind '{}' Nierozpoznany rodzaj treści "{}" - + Unable to locate icon at {} Nie można zlokalizować ikony {} - + Select an icon file for this content item Wybierz plik ikon dla tego elementu - - - + + + {} is not a subdirectory of {} {} nie jest podkatalogiem {} - + Select the subdirectory for this content item Wybierz podkatalog dla tego elementu - + Automatic Automatycznie - + Workbench Środowiska pracy - + Addon Dodatek - + Python Python - + Yes Tak - + Internal Workbench Wbudowane środowisko pracy - + External Addon Dodatek zewnętrzny - + Python Package Pakiet Python - - + + Other... Inne ... @@ -1690,10 +1675,10 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji - - - - + + + + Missing Requirement Niespełnione wymagania @@ -1714,7 +1699,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji - + Incompatible Python version Niekompatybilna wersja środowiska Python @@ -1736,7 +1721,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji - + Cannot execute Python Nie można wykonać skryptu Python @@ -1752,7 +1737,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji - + Cannot execute pip Nie można uruchomić programu @@ -1769,7 +1754,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji - + Package installation failed Instalacja pakietu nie powiodła się @@ -1805,7 +1790,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji - + Installation Failed Instalacja nie powiodła się @@ -1816,19 +1801,19 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji - + Create new toolbar Utwórz nowy pasek narzędzi - + A macro installed with the FreeCAD Addon Manager Makro zainstalowane przy pomocy Menedżera dodatków FreeCAD - + Run Indicates a macro that can be 'run' Uruchom @@ -1839,304 +1824,304 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Nie można odczytać danych z GitHub: sprawdź swoje połączenie internetowe i ustawienia serwera pośredniczącego i spróbuj ponownie. - + XML failure while reading metadata from file {} Błąd XML podczas odczytywania metadanych z pliku {} - + Invalid metadata in file {} Nieprawidłowe metadane w pliku {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. OSTRZEŻENIE: Ścieżka określona w metadanych package.xml nie pasuje do aktualnie sprawdzanej gałęzi. - + Name Nazwa - + Class Klasa - + Description Opis - + Subdirectory Katalog podrzędny - + Files Pliki - + Select the folder containing your Addon Wybierz folder zawierający dodatek - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Brak Vermin, operacja zostaje anulowania. - + Scanning Addon for Python version compatibility Skanowanie dodatku w celu kompatybilności wersji środowiska Python - + Minimum Python Version Detected Wykryto minimalną wymaganą wersję Python - + Vermin auto-detected a required version of Python 3.{} Vermin automatycznie wykrył wymaganą wersję środowiska Python 3.{} - + Install Vermin? Zainstalować Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Automatyczne wykrywanie wymaganej wersji środowiska Python dla tego dodatku wymaga dodatku Vermin (https://pypi.org/project/vermin/). "OK" aby zainstalować? - + Attempting to install Vermin from PyPi Próba zainstalowania Vermin z PyPi - - + + Installation failed Instalacja nie powiodła się - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Nie udało się zainstalować Vermin -- sprawdź widok raportu, aby uzyskać szczegóły. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Nie udało się zaimportować vermin po instalacji -- nie można sprawdzić dodatku. - + Select an icon file for this package Wybierz plik ikon dla tego pakietu - + Filter is valid Filtr jest prawidłowy - + Filter regular expression is invalid Wyrażenie regularne filtra jest nieprawidłowe - + Click for details about package {} Kliknij, aby uzyskać informacje o pakiecie {} - + Click for details about workbench {} Kliknij, aby uzyskać informacje o środowisku pracy {} - + Click for details about macro {} Kliknij, aby uzyskać informacje o makrodefinicji {} - + Maintainers: Opiekunowie: - + Tags Znaczniki - + updated zaktualizowano - - + + Up-to-date Aktualny - - - + + + Update available Dostępna aktualizacja - - + + Pending restart Oczekuje na ponowne uruchomienie - - + + DISABLED WYŁĄCZONY - + Installed version Wersja zainstalowana - + Unknown version Nieznana wersja - + Installed on Data instalacji - + Available version Wersja dostępna - + Show Addons containing: Pokaż dodatki zawierające: - + All Wszystkie - + Workbenches Środowiska pracy - + Macros Makrodefinicje - + Preference Packs Pakiety preferencji - + Status: Status: - + Any Dowolny - + Not installed Nie zainstalowano - + Filter Filtr - + OK OK - + DANGER: Developer feature OSTRZEŻENIE: Funkcja dewelopera - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Przełączanie gałęzi jest przeznaczone dla deweloperów i beta testerów i może skutkować uszkodzeniem, nieskutecznie kompatybilnymi dokumentami, niestabilność, awarie lub przedwczesna śmierć wszechświata. Czy na pewno chcesz kontynuować? - + There are local changes Występują zmiany lokalne - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? OSTRZEŻENIE: To repozytorium ma niezatwierdzone lokalne zmiany. Czy na pewno chcesz zmienić gałęzie (wprowadzając zmiany w życie)? - + + - Branch git terminology Gałąź - + Tag git terminology Znacznik - + Kind Table header for git ref type (e.g. either Tag or Branch) Rodzaj - + Local name Table header for git ref name Nazwa lokalna - + Tracking Table header for git remote tracking branch name name Śledzenie - + Local updated Table header for git update time of local branch Lokalne zaktualizowane - + Remote updated Table header for git update time of remote branch Zdalnie zaktualizowano @@ -2147,77 +2132,77 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Instalacja pakietu Python {} nie powiodła się - + Installation of optional package failed Instalacja pakietu opcjonalnego nie powiodła się. - + Installing required dependency {} Instalowanie wymaganej zależności {} - + Installation of Addon {} failed Instalacja dodatku {} nie powiodła się - + Downloaded package.xml for {} Pobrano plik package.xml dla {} - + Failed to decode {} file for Addon '{}' Nie udało się dekodować pliku {} dla dodatku "{}" - + Any dependency information in this file will be ignored Wszelkie informacje o zależności w tym pliku zostaną zignorowane - + Downloaded metadata.txt for {} Pobrano plik metadata.txt dla {} - + Downloaded requirements.txt for {} Pobrano plik requirements.txt dla {} - + Downloaded icon for {} Pobrano plik ikonki dla {} - + Unable to open macro wiki page at {} Nie można otworzyć strony Wiki makrodefinicji w {} - + Unable to fetch the code of this macro. Nie można pobrać kodu makrodefinicji. - + Unable to retrieve a description from the wiki for macro {} Nie można pobrać opisu z Wiki dla makrodefinicji {} - + Unable to open macro code URL {} Nie można otworzyć adresu URL kodu makrodefinicji {} - + Unable to fetch macro-specified file {} from {} Nie można pobrać pliku określonego przez makrodefinicję {} z {} - + Could not locate macro-specified file {} (expected at {}) Nie można zlokalizować określonego przez makrodefinicję pliku {} (oczekiwany w {}) @@ -2258,17 +2243,17 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Wykonanie skryptu dodatku uninstall.py nie powiodło się. Kontynuuję odinstalowywanie ... - + Removed extra installed file {} Usunięto dodatkowy zainstalowany plik {} - + Error while trying to remove extra installed file {} Błąd podczas próby usunięcia dodatkowego zainstalowanego pliku {} - + Error while trying to remove macro file {}: Błąd podczas próby usunięcia pliku makrodefinicji {}: @@ -2278,134 +2263,134 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Niepowodzenie nie udało się połączyć z GitHub. Sprawdź swoje połączenie i ustawienia serwera pośredniczącego. - + WARNING: Duplicate addon {} ignored OSTRZEŻENIE: Duplikat dodatku {} pominięto - + Workbenches list was updated. Lista środowisk pracy została zaktualizowana. - + Git is disabled, skipping git macros Git jest wyłączony, pominięto repozytorium Git makrodefinicji - + Attempting to change non-git Macro setup to use git Próba zmiany konfiguracji makrodefinicji niebędącej typu Git na używanie Git - + An error occurred updating macros from GitHub, trying clean checkout... Wystąpił błąd podczas aktualizacji makrodefinicji z GitHub, próba czyszczenia ... - + Attempting to do a clean checkout... Próbuje wykonać czyszczenie ... - + Clean checkout succeeded Czyszczenie zakończone pomyślnie - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Nie udało się zaktualizować makrodefinicji z repozytorium GitHub — próba oczyszczenia pamięci podręcznej Menedżera dodatków. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Błąd połączenia z Wiki, FreeCAD nie może w tej chwili pobrać listy makrodefinicji Wiki - + Unable to fetch git updates for workbench {} Nie można pobrać aktualizacji Git dla środowiska pracy {} - + git status failed for {} Git status brak powodzenia dla {} - + Failed to read metadata from {name} Niepowodzenie nie udało się odczytać metadanych z {name} - + Failed to fetch code for macro '{name}' Niepowodzenie nie udało się pobrać kodu dla makrodefinicji "{name}" - + Caching macro code... Buforowanie kodu makrodefinicji ... - + Addon Manager: a worker process failed to complete while fetching {name} Menedżer dodatków: nie udało się ukończyć procesu przetwarzania podczas pobierania {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Dla {num_macros} makrodefinicji przekroczono limit czasu {num_failed} podczas przetwarzania - + Addon Manager: a worker process failed to halt ({name}) Menadżer dodatków: nie udało się zatrzymać uruchomionego procesu ({name}) - + Getting metadata from macro {} Pobieranie metadanych z makrodefinicji {} - + Timeout while fetching metadata for macro {} Upłynął limit czasu pobierania metadanych dla makrodefinicji {} - + Failed to kill process for macro {}! Nie udało się przerwać procesu makrodefinicji {}! - + Retrieving macro description... Pobieranie opisu makrodefinicji ... - + Retrieving info from git Pobieranie informacji z Git - + Retrieving info from wiki Pobieranie informacji z Wiki - + Repository URL Preferences header for custom repositories Adres URL repozytorium - + Branch name Preferences header for custom repositories Nazwa gałęzi @@ -2421,7 +2406,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Tworzenie kopii zapasowej oryginalnego katalogu i ponowne klonowanie - + Failed to clone {} into {} using git Nie udało się sklonować {} do {} używając Git @@ -2441,12 +2426,12 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Niepowodzenie - + Update was cancelled Aktualizacja została przerwana - + some addons may have been updated niektóre dodatki mogły zostać zaktualizowane @@ -2454,12 +2439,12 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Std_AddonMgr - + &Addon manager &Menadżer dodatków - + Manage external workbenches, macros, and preference packs Zarządzanie zewnętrznymi środowiskami pracy, makroinstrukcjami i pakietami preferencji @@ -2467,12 +2452,12 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji AddonInstaller - + Finished removing {} Zakończono usuwanie {} - + Failed to remove some files Nie udało się usunąć niektórych plików @@ -2480,7 +2465,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji Addons installer - + Finished updating the following addons Zakończono aktualizację następujących dodatków @@ -2496,7 +2481,7 @@ zainstalowane dodatki zostaną sprawdzone pod kątem dostępnych aktualizacji QObject - + Addon Manager Menedżer dodatków diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.qm index e198cdf242..80fdfbfcb5 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.ts index 26a520c48d..88faede384 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-BR.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Formulário - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolver Dependências @@ -419,11 +414,6 @@ Você quer que o Addon Manager os instale automaticamente? Escolha "Ignorar ExpandedView - - - Form - Formulário - @@ -473,11 +463,6 @@ Você quer que o Addon Manager os instale automaticamente? Escolha "Ignorar Form - - - Form - Formulário - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Atualizar o cache local - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Verificando por atualizações... - + Apply {} update(s) Apply {} update(s) - + No updates available Não há atualizações disponíveis - - - + + + Cannot launch a new installer until the previous one has finished. Não é possível iniciar um novo instalador até que o anterior tenha terminado. - + Execution of macro failed. See console for failure details. Execução de macro falhou. Veja o console para detalhes de falha. - - + + - + Maintainer Mantenedor - - - - + + + + Author Autor - + New Python Version Detected Nova versão do Python detectada - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Parece ser a primeira vez que esta versão do Python é usada no Addon Manager. Você gostaria de instalar as mesmas dependências instaladas automaticamente para ele? - + Processing, please wait... Processando, aguarde... - - + + Update Atualizar - + Updating... Atualizando... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Não foi possível importar QtNetwork -- aparentemente não está instalada em seu sistema. Seu provedor pode ter um pacote para esta dependência (frequentemente chamado "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirme a remoção - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Instalar - + Uninstall Desinstalar - + Check for Update Check for Update - + Run Macro Executar macro - + Change Branch Alterar Ramo - + Enable Ativar - + Disable Desativar - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Não foi possível importar QtNetwork -- consulte Ver relatórios para detalhes. Gerenciador de Addons indisponível. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automática - + Workbench Bancada - + Addon Complemento - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' executar @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nome - + Class Classe - + Description Descrição - + Subdirectory Subdiretório - + Files Arquivos - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Falha ao instalar Vermin -- verifique Ver Relatório para mais detalhes. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Etiquetas - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Versão instalada - + Unknown version Unknown version - + Installed on Installed on - + Available version Versão disponível - + Show Addons containing: Show Addons containing: - + All Todos - + Workbenches Bancadas de trabalho - + Macros Macros - + Preference Packs Preference Packs - + Status: Status: - + Any Qualquer um - + Not installed Not installed - + Filter Filtro - + OK OK - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Ramo - + Tag git terminology Etiqueta - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Rastreamento - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories URL do repositório - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Gerenciador de Extensões diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.qm index 3f6d6a1e2e..eb39796693 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.ts index bb19fc8431..d438029541 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_pt-PT.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Formulário - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolve Dependencies @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Formulário - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Formulário - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Refresh local cache - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Maintainer - - - - + + + + Author Autor - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Atualizar - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Install - + Uninstall Uninstall - + Check for Update Check for Update - + Run Macro Run Macro - + Change Branch Change Branch - + Enable Ativar - + Disable Desativar - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automática - + Workbench Bancada de trabalho - + Addon Addon - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' correr @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nome - + Class Classe - + Description Descrição - + Subdirectory Subdirectory - + Files Ficheiros - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Tags - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Tudo - + Workbenches Bancadas de trabalho - + Macros Macros - + Preference Packs Preference Packs - + Status: Estado: - + Any Qualquer - + Not installed Not installed - + Filter Filtro - + OK OK - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Branch - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Monitorização - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Repository URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Gestor de Add-ons diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ro.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_ro.qm index 81d0e228ad..ee12226def 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_ro.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_ro.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ro.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_ro.ts index 51fa537d07..a156c384f5 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_ro.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_ro.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Formular - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolve Dependencies @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Formular - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Formular - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Refresh local cache - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Maintainer - - - - + + + + Author Autor - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Actualizare - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Install - + Uninstall Uninstall - + Check for Update Check for Update - + Run Macro Run Macro - + Change Branch Change Branch - + Enable Activeaza - + Disable Dezactivare - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automat - + Workbench Banc de lucru - + Addon Addon - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Execută @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nume - + Class Clasă - + Description Descriere - + Subdirectory Subdirectory - + Files Files - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Etichete - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Toate - + Workbenches Banc de lucru - + Macros Macro-uri - + Preference Packs Preference Packs - + Status: Stare: - + Any Oricare - + Not installed Not installed - + Filter Filtru - + OK OK - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Branch - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Urmărire - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Repository URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Manager de addon diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ru.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_ru.qm index 32a7e1e7fb..8b81ccd7c3 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_ru.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_ru.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_ru.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_ru.ts index c92c6d3066..0c8d8742ea 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_ru.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_ru.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Форма - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Разрешить зависимости @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Форма - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Форма - Licenses @@ -1115,9 +1100,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Выберите Панель инструментов @@ -1136,7 +1121,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Добавить кнопку? @@ -1164,139 +1149,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Запуск... - + Loading addon information Загрузка информации о дополнении - + Worker process {} is taking a long time to stop... Работающий процесс {} занимает много времени при остановке... - + Previous cache process was interrupted, restarting... Предыдущий процесс кэша был прерван, перезапуск... - + Custom repo list changed, forcing recache... Пользовательский список репозитория изменён, запущено обновление кэша... - + Addon manager Менеджер дополнений - + You must restart FreeCAD for changes to take effect. Вы должны перезапустить FreeCAD, чтобы изменения вступили в силу. - + Restart now Перезагрузить сейчас - + Restart later Перезагрузить позже - - + + Refresh local cache Обновить локальный кэш - + Updating cache... Обновление кэша... - + Could not find addon '{}' to select Не удалось найти аддон '{}' для выбора - - + + Checking for updates... Проверка обновлений... - + Apply {} update(s) Применить обновлений: {} - + No updates available Нет доступных обновлений - - - + + + Cannot launch a new installer until the previous one has finished. Невозможно запустить новую установку, пока не завершена предыдущая. - + Execution of macro failed. See console for failure details. Не удалось выполнить макрос. Подробности об ошибке смотрите в консоли. - - + + - + Maintainer Разработчик - - - - + + + + Author Автор - + New Python Version Detected Обнаружена новая версия Python - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Похоже, что эта версия Python впервые используется в Менеджере дополнений. Установить такие же автоматические зависимости? - + Processing, please wait... Обработка, пожалуйста подождите... - - + + Update Обновить - + Updating... Обновление... @@ -1306,63 +1291,63 @@ installed addons will be checked for available updates Не удалось импортировать QtNetwork ― видимо, он не установлен в системе. У вашего поставщика может быть пакет для этой зависимости (обычно это "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Не удалось преобразовать указанный прокси-порт '{}' в номер порта - + Parameter error: mutually exclusive proxy options set. Resetting to default. Ошибка параметров: взаимно исключающие параметры прокси. Используются параметры по умолчанию. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Ошибка параметров: указан пользовательский прокси, но прокси не предоставлен. Используются параметры по умолчанию. - + Addon Manager: Unexpected {} response from server Менеджер дополнений: Неожиданный ответ сервера {} - + Error with encrypted connection Ошибка защищенного соединения - + - + Confirm remove Подтвердите удаление - + Are you sure you want to uninstall {}? Вы уверены, что хотите удалить {}? - - - + + + Removing Addon Удаление дополнения - + Removing {} Удаление {} - - + + Uninstall complete Удаление завершено - - + + Uninstall failed Удаление не удалось @@ -1372,183 +1357,183 @@ installed addons will be checked for available updates Менеджер дополнений: Не удалось импортировать QtWebEngineWidgets -- README данные будут отображаться только в тексте - + Version {version} installed on {date} Версия {version} установлена {date} - + Version {version} installed Версия {version} установлена - + Installed on {date} Установлено {date} - - - - + + + + Installed Установлено - + On branch {}, update available to version В ветке {} доступно обновление до - + Update available to version Доступно обновление до версии - + An update is available Доступно обновление - + Git tag '{}' checked out, no updates possible Метка Git '{}' извлечена, обновления не нужны - + This is the latest version available for branch {} Это последняя версия, доступная для ветки {} - + Updated, please restart FreeCAD to use Обновлено, пожалуйста, перезапустите FreeCAD для использования - + Update check in progress Выполняется проверка обновлений - + Automatic update checks disabled Автоматическая проверка обновлений отключена - + Installation location Место установки - + WARNING: This addon is obsolete ВНИМАНИЕ: Это дополнение устарело - + WARNING: This addon is Python 2 Only ВНИМАНИЕ: Это дополнение только для Python 2 - + WARNING: This addon requires FreeCAD ВНИМАНИЕ: Для этого дополнения требуется FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. ВНИМАНИЕ: Это дополнение в настоящее время установлено, но отключено. Используйте кнопку 'включить' для повторного включения. - - + + No URL or wiki page provided by this macro Этот макрос не предоставил ссылку или страницу в вики - + Could not load README data from URL {} Не удалось загрузить данные README по ссылке {} - + This Addon will be enabled next time you restart FreeCAD. Это дополнение будет включено при перезапуске FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Это дополнение будет отключено при перезапуске FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. Привязки QtWebEngine Python не установлены — используется резервный экран README. - + Success Успешно - + Branch change succeeded, please restart to use the new version. Ветка успешно изменена, пожалуйста, перезапустите для использования новой версии. - + Changed to git ref '{}' -- please restart to use Addon. Изменено на git ref '{}' -- пожалуйста, перезапустите программу, чтобы использовать дополнение. - + Page JavaScript reported Отправлена страница JavaScript - + Install Установить - + Uninstall Удалить - + Check for Update Проверить наличие обновления - + Run Macro Выполнить макрос - + Change Branch Изменить ветку - + Enable Включить - + Disable Отключить - + Return to package list Вернуться к списку пакетов - + The page is taking a long time to load... showing the data we have so far... Загрузка страницы занимает много времени. Показываю что есть. @@ -1563,17 +1548,17 @@ installed addons will be checked for available updates Проверяем соединение к GitHub... - + Connection failed Подключиться не удалось - + Missing dependency Отсутствуют зависимости - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Не удалось импортировать QtNetwork ― смотрите Просмотр отчёта для подробностей. Менеджер дополнений недоступен. @@ -1584,12 +1569,12 @@ installed addons will be checked for available updates Другое... - + Select the corresponding license file in your Addon Выберите соответствующий файл лицензии в вашем аддоне - + Location for new license file Расположение нового файла лицензии @@ -1604,75 +1589,75 @@ installed addons will be checked for available updates Не удалось установить макрос {} - + Unrecognized content kind '{}' Нераспознанный тип контента '{}' - + Unable to locate icon at {} Не удалось найти значок в {} - + Select an icon file for this content item Выберите файл значка для этого элемента содержимого - - - + + + {} is not a subdirectory of {} {} не является подкаталогом {} - + Select the subdirectory for this content item Выберите поддиректорию для этого элемента содержимого - + Automatic Автоматически - + Workbench Верстак - + Addon Дополнение - + Python Python - + Yes Да - + Internal Workbench Внутренний верстак - + External Addon Внешнее дополнение - + Python Package Пакет Python - - + + Other... Другое... @@ -1689,10 +1674,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Отсутствуют требование @@ -1713,7 +1698,7 @@ installed addons will be checked for available updates - + Incompatible Python version Несовместимая версия Python @@ -1735,7 +1720,7 @@ installed addons will be checked for available updates - + Cannot execute Python Невозможно выполнить Python @@ -1751,7 +1736,7 @@ installed addons will be checked for available updates - + Cannot execute pip Невозможно выполнить pip @@ -1768,7 +1753,7 @@ installed addons will be checked for available updates - + Package installation failed Установка пакета не удалась @@ -1804,7 +1789,7 @@ installed addons will be checked for available updates - + Installation Failed Установка не удалась @@ -1815,19 +1800,19 @@ installed addons will be checked for available updates - + Create new toolbar Создать новую панель инструментов - + A macro installed with the FreeCAD Addon Manager Макрос, устанавливаемый вместе с Менеджером дополнений FreeCAD - + Run Indicates a macro that can be 'run' Запустить @@ -1838,304 +1823,304 @@ installed addons will be checked for available updates Не удаётся прочитать данные с GitHub: проверьте подключение к Интернету и настройки прокси и повторите попытку. - + XML failure while reading metadata from file {} Ошибка XML при чтении метаданных из файла {} - + Invalid metadata in file {} Недопустимые метаданные в файле {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. ПРЕДУПРЕЖДЕНИЕ: Указанный в метаданных package.xml путь не соответствует проверяемой ветке. - + Name Название - + Class Класс - + Description Описание - + Subdirectory Подкаталог - + Files Файлы - + Select the folder containing your Addon Выберите папку, содержащую аддон - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Отсутствует Vermin, операция отменяется. - + Scanning Addon for Python version compatibility Сканирование дополнения для совместимости с Python - + Minimum Python Version Detected Обнаружена минимальная версия Python - + Vermin auto-detected a required version of Python 3.{} Vermin автоматически обнаружил необходимую версию Python 3.{} - + Install Vermin? Установить Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Для автоматического определения требуемой версии Python требуется Vermin (https://pypi.org/project/vermin/). Установить? - + Attempting to install Vermin from PyPi Попытка установить Vermin с PyPi - - + + Installation failed Установка не удалась - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Не удалось установить Vermin ― подробности смотрите в Просмотре отчёта. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Не удалось импортировать Vermin после установки ― невозможно сканировать дополнение. - + Select an icon file for this package Выберите файл значка для этого пакета - + Filter is valid Фильтр действителен - + Filter regular expression is invalid Регулярное выражение фильтра недопустимо - + Click for details about package {} Щёлкните для подробностей о пакете {} - + Click for details about workbench {} Щёлкните для подробностей о верстаке {} - + Click for details about macro {} Щёлкните для подробностей о макросе {} - + Maintainers: Сопровождающие: - + Tags Теги - + updated обновлено - - + + Up-to-date Актуальная версия - - - + + + Update available Доступно обновление - - + + Pending restart В ожидании перезапуска - - + + DISABLED ОТКЛЮЧЕНО - + Installed version Установленная версия - + Unknown version Неизвестная версия - + Installed on Установлено - + Available version Доступная версия - + Show Addons containing: Показать дополнения, содержащие: - + All Все - + Workbenches Верстаки - + Macros Макрос - + Preference Packs Пользовательские пакеты - + Status: Состояние: - + Any Любой - + Not installed Не установлено - + Filter Фильтр - + OK OK - + DANGER: Developer feature ОПАСНО: Функция разработчика - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? ОПАСНОСТЬ: Переключение веток предназначено для разработчиков и бета-тестеров и может привести к повреждению, несовместимости с предыдущими версиями документов, нестабильности, сбоям и/или преждевременной гибели вселенной. Вы уверены, что хотите продолжить? - + There are local changes Имеются несохраненные изменения - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? ПРЕДУПРЕЖДЕНИЕ: В этом репозитории есть незафиксированные локальные изменения. Вы уверены, что хотите заменить ветки (что приведёт к изменениям у Вас)? - + + - Branch git terminology Ветка - + Tag git terminology Метка - + Kind Table header for git ref type (e.g. either Tag or Branch) Роль - + Local name Table header for git ref name Локальное имя - + Tracking Table header for git remote tracking branch name name Отслеживание - + Local updated Table header for git update time of local branch Локально обновлено - + Remote updated Table header for git update time of remote branch Обновлено удалённо @@ -2146,77 +2131,77 @@ installed addons will be checked for available updates Не удалось установить пакет {} - + Installation of optional package failed Не удалось установить необязательный пакет - + Installing required dependency {} Установка требуемой зависимости {} - + Installation of Addon {} failed Не удалось установить пакет {} - + Downloaded package.xml for {} Загружен package.xml для {} - + Failed to decode {} file for Addon '{}' Не удалось декодировать файл {} дополнения '{}' - + Any dependency information in this file will be ignored Любая информация о зависимостях в этом файле будет игнорироваться - + Downloaded metadata.txt for {} Загружен metadata.txt для {} - + Downloaded requirements.txt for {} Загружен requirements.txt для {} - + Downloaded icon for {} Загружен значок для {} - + Unable to open macro wiki page at {} Невозможно открыть страницу в вики макроса {} - + Unable to fetch the code of this macro. Не удаётся получить код макроса. - + Unable to retrieve a description from the wiki for macro {} Не удаётся загрузить описание с вики для макроса {} - + Unable to open macro code URL {} Не удаётся открыть URL кода макроса {} - + Unable to fetch macro-specified file {} from {} Не удалось загрузить файл {}, необходимый для макроса {} - + Could not locate macro-specified file {} (expected at {}) Не удалось найти макро-указанный файл {} (ожидалось в {}) @@ -2257,17 +2242,17 @@ installed addons will be checked for available updates Выполнение скрипта uninstall.py не удалось. Продолжение удаления... - + Removed extra installed file {} Удален дополнительно установленный файл {} - + Error while trying to remove extra installed file {} Ошибка при попытке удалить дополнительно установленный файл {} - + Error while trying to remove macro file {}: Ошибка при попытке удалить файл макроса {}: @@ -2277,132 +2262,132 @@ installed addons will be checked for available updates Не удалось подключиться к GitHub. Проверьте подключение и настройки прокси. - + WARNING: Duplicate addon {} ignored ВНИМАНИЕ: Повторяющийся аддон {} игнорируется - + Workbenches list was updated. Список верстаков обновлён. - + Git is disabled, skipping git macros Git отключен, пропуск git макросов - + Attempting to change non-git Macro setup to use git Попытка изменить настройки не git Макроса для использования git - + An error occurred updating macros from GitHub, trying clean checkout... Произошла ошибка при обновлении макросов с GitHub, попробуйте очистить заявку (git checkout)... - + Attempting to do a clean checkout... Попытка сделать очистку заявки (git chekout)... - + Clean checkout succeeded Очистка заявки (git checkout) прошла успешно - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Не удалось обновить макрос с GitHub ― попробуйте очистить кэш Менеджера дополнений. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Ошибка подключения к Wiki, FreeCAD не может получить список Вики по макросам в данное время - + Unable to fetch git updates for workbench {} Не удалось получить обновления git для верстака {} - + git status failed for {} сбой статуса git для {} - + Failed to read metadata from {name} Не удалось прочитать метаданные из {name} - + Failed to fetch code for macro '{name}' Не удалось получить код для макроса '{name}' - + Caching macro code... Кэширование кода макроса... - + Addon Manager: a worker process failed to complete while fetching {name} Менеджер дополнений: рабочему процессу не удалось загрузить {name} - + Out of {num_macros} macros, {num_failed} timed out while processing При обработке {num_macros} макрос(ов/а), у {num_failed} истекло время ожидания - + Addon Manager: a worker process failed to halt ({name}) Менеджер дополнений: рабочий процесс ({name}) не удалось остановить - + Getting metadata from macro {} Получение метаданных из макроса {} - + Timeout while fetching metadata for macro {} Таймаут при получении метаданных для макроса {} - + Failed to kill process for macro {}! Не удалось убить процесс для макроса {}! - + Retrieving macro description... Получение описания макроса... - + Retrieving info from git Получение информации из git - + Retrieving info from wiki Получение информации из вики - + Repository URL Preferences header for custom repositories URL репозитория - + Branch name Preferences header for custom repositories Имя ветви @@ -2418,7 +2403,7 @@ installed addons will be checked for available updates Делаю резервную копию исходного каталога и клонирую повторно - + Failed to clone {} into {} using git Не удалось скопировать {} в {} используя git @@ -2438,12 +2423,12 @@ installed addons will be checked for available updates Ошибка - + Update was cancelled Обновление было отменено - + some addons may have been updated некоторые дополнения были обновлены @@ -2451,12 +2436,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Менеджер дополнений - + Manage external workbenches, macros, and preference packs Управление внешними верстаками, макросами и наборами настроек @@ -2464,12 +2449,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Завершено удаление {} - + Failed to remove some files Не удалось удалить некоторые файлы @@ -2477,7 +2462,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Завершено обновление следующих дополнений @@ -2493,7 +2478,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Менеджер дополнений diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sl.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_sl.qm index 5b87653792..7495357aac 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_sl.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_sl.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sl.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_sl.ts index f9ab0635e3..462497ea20 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_sl.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_sl.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Oblika - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Razreši odvisnosti @@ -419,11 +414,6 @@ Ali želite, da jih upravljalinik dodatkov namesti samodejno? Izberite "Pre ExpandedView - - - Form - Oblika - @@ -473,11 +463,6 @@ Ali želite, da jih upravljalinik dodatkov namesti samodejno? Izberite "Pre Form - - - Form - Oblika - Licenses @@ -1117,9 +1102,9 @@ preveril razpoložljivost posodobitev za nameščene dodatke select_toolbar_dialog - - - + + + Select Toolbar Izberite orodno vrstico @@ -1138,7 +1123,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke toolbar_button - + Add button? Želite dodati gumb? @@ -1166,139 +1151,139 @@ preveril razpoložljivost posodobitev za nameščene dodatke AddonsInstaller - + Starting up... Pričenjanje ... - + Loading addon information Nalaganje podatkov o dodatku - + Worker process {} is taking a long time to stop... Delovni proces {} se predolgo zaustavlja ... - + Previous cache process was interrupted, restarting... Predhodno predpomnenje je bilo prekinjeno, ponovni zagon ... - + Custom repo list changed, forcing recache... Skladiščni seznam po meri se je spremenil, prisilno ponovno predpomnenje ... - + Addon manager Upravljalnik dodatkov - + You must restart FreeCAD for changes to take effect. Da bi spremembe stopile v veljavo, morate ponovno zagnati FreeCAD. - + Restart now Takojšnji pozagon - + Restart later Pozaženi pozneje - - + + Refresh local cache Osveži krajevni predpomnilnik - + Updating cache... Posodabljanje predpomnilnika ... - + Could not find addon '{}' to select Dodatka '{}' za označitev ni mogoče najti - - + + Checking for updates... Preverjanje za posodobitve … - + Apply {} update(s) Uporabi {} posodobitve - + No updates available Na voljo ni novih posodobitev - - - + + + Cannot launch a new installer until the previous one has finished. Novega namestilnika ni mogoče zagnati, dokler se prejšnji ne konča. - + Execution of macro failed. See console for failure details. Izvedba makra spodletela. Podrobnosti o napaki si poglejte na ukazni mizi. - - + + - + Maintainer Vzdrževalec - - - - + + + + Author Ustvarjalec - + New Python Version Detected Zaznana je nova Pythonova različica - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Kaže, da je tokrat ta različica Pythona prvič uporabljena z Upravljalnikom dodatkov (Addon Manager). Ali želite zanjo samodejno namestiti enako odvisnost? - + Processing, please wait... V obdelavi, prosimo, počakajte ... - - + + Update Posodobi - + Updating... Posodabljanje ... @@ -1308,63 +1293,63 @@ preveril razpoložljivost posodobitev za nameščene dodatke QtNetwork-a ni mogoče uvoziti - kaže, da ni nameščen na vašem sistemu. Morda ima vaš ponudnik paket za to odvisnost (pogosto imenovan "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Pretvarjanje izbranih vrat posredniškega strežnika '{}' v številko vrat je spodletela - + Parameter error: mutually exclusive proxy options set. Resetting to default. Napaka določilke: nastavljene medsebojno izključuječe možnosti posredniškega strežnika. Ponastavljanje na privzeto. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Napaka določilke: posredniški strežnik nakazan, vendar ni na voljo. Ponastavljanje na privzeto. - + Addon Manager: Unexpected {} response from server Upravljalnik dodatkov: Nepričakovan {} odziv strežnika - + Error with encrypted connection Napaka kodirane povezave - + - + Confirm remove Potrdi odstranitev - + Are you sure you want to uninstall {}? Ali res želite odmestiti {}? - - - + + + Removing Addon Odmeščanje dodatka - + Removing {} Odmešča se {} - - + + Uninstall complete Odmestitev zaključena - - + + Uninstall failed Odmestitev spodletela @@ -1374,183 +1359,183 @@ preveril razpoložljivost posodobitev za nameščene dodatke Opozorilo upravljalnika dodatkov: QtWebEngineWidgets ni mogoče uvoziti - README (preberi) podatki bodo prikazani le kot besedilo - + Version {version} installed on {date} Različica {version} nameščena {date} - + Version {version} installed Različica {version} nameščena - + Installed on {date} Nameščeno {date} - - - - + + + + Installed Nameščeno - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Samodejno preverjanje posodobitev onemogočeno - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Namesti - + Uninstall Odmesti - + Check for Update Check for Update - + Run Macro Zaženi makro - + Change Branch Spremeni vejo - + Enable Omogoči - + Disable Onemogoči - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ preveril razpoložljivost posodobitev za nameščene dodatke Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ preveril razpoložljivost posodobitev za nameščene dodatke Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ preveril razpoložljivost posodobitev za nameščene dodatke Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Samodejno - + Workbench Delovno okolje - + Addon Dodatek - + Python Python - + Yes Da - + Internal Workbench Notranje delovno okolje - + External Addon Zunanji dodatek - + Python Package Pythonov paket - - + + Other... Drugo ... @@ -1691,10 +1676,10 @@ preveril razpoložljivost posodobitev za nameščene dodatke - - - - + + + + Missing Requirement Neizpolnjen pogoj @@ -1715,7 +1700,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke - + Incompatible Python version Nezdružljiva različica Pythona @@ -1737,7 +1722,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke - + Cannot execute Python Pythona ni mogoče izvesti @@ -1753,7 +1738,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke - + Cannot execute pip Slike v sliki ni mogoče izvesti @@ -1770,7 +1755,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke - + Package installation failed Namestitev paketa spodletela @@ -1806,7 +1791,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke - + Installation Failed Namestitev spodletela @@ -1817,19 +1802,19 @@ preveril razpoložljivost posodobitev za nameščene dodatke - + Create new toolbar Ustvari novo orodno vrstico - + A macro installed with the FreeCAD Addon Manager Makro nameščen s FreeCAD-ovim Upravljalnikom dodatkov - + Run Indicates a macro that can be 'run' Zaženi @@ -1840,304 +1825,304 @@ preveril razpoložljivost posodobitev za nameščene dodatke Podatkov na GitHubu ni mogoče brati: preverite spletno povezavo in nastavitve posredniškega strežnika ter poskusite ponovno. - + XML failure while reading metadata from file {} XML napaka pri branju samopodatkov iz datoteke {} - + Invalid metadata in file {} Neveljavni samopodatki v datoteki {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. OPOZORILO: Pot, določena v samopodatkih package.xml, se ne sklada s trenutno prevzeto vejo. - + Name Naziv - + Class Razred - + Description Opis - + Subdirectory Podmapa - + Files Datoteke - + Select the folder containing your Addon Izberite mapo z vašim dodatkom - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Brez Vermina, prekinitev dejanja. - + Scanning Addon for Python version compatibility Pregledovanje združljivosti dodatka s Pythonovo različico - + Minimum Python Version Detected Zaznana je minimalna Pythonova različica - + Vermin auto-detected a required version of Python 3.{} Vermin je samodejno zaznal zahtevano različico Pythona 3.{} - + Install Vermin? Želite namestiti Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Samodejno zaznavanje potrebne različice Pythona javlja, da je za ta dodatek potreben Vermin (https://pypi.org/project/vermin/). Dovolite namestitev? - + Attempting to install Vermin from PyPi Poskus namestitve Vermina s PyPi - - + + Installation failed Nameščanje spodletelo - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Značke - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Nameščena različica - + Unknown version Unknown version - + Installed on Installed on - + Available version Razpoložljiva različica - + Show Addons containing: Show Addons containing: - + All Vse - + Workbenches Delovna okolja - + Macros Makri - + Preference Packs Preference Packs - + Status: Stanje: - + Any Po želji - + Not installed Not installed - + Filter Sito - + OK Potrdi - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Veja - + Tag git terminology značka, mostiček (povezovalni ostanek pri CNC izrezovanju) - + Kind Table header for git ref type (e.g. either Tag or Branch) Vrsta - + Local name Table header for git ref name Krajevno ime - + Tracking Table header for git remote tracking branch name name Sledenje - + Local updated Table header for git update time of local branch Krajevno posodobljeno - + Remote updated Table header for git update time of remote branch Daljinsko posodobljeno @@ -2148,77 +2133,77 @@ preveril razpoložljivost posodobitev za nameščene dodatke Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ preveril razpoložljivost posodobitev za nameščene dodatke Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ preveril razpoložljivost posodobitev za nameščene dodatke Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Upravljalnik dodatkov: delovni proces je med pridobivanjem {name} spodletel - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Upravljalnik dodatkov: delovni proces se ni mogel zaustaviti ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Spletni naslov skladišča - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ preveril razpoložljivost posodobitev za nameščene dodatke Failed - + Update was cancelled Posodobitev je bila preklicana - + some addons may have been updated nekateri dodatki so bili lahko posodobljeni @@ -2453,12 +2438,12 @@ preveril razpoložljivost posodobitev za nameščene dodatke Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ preveril razpoložljivost posodobitev za nameščene dodatke AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ preveril razpoložljivost posodobitev za nameščene dodatke QObject - + Addon Manager Upravljalnik dodatkov diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.qm index 5caf8b1951..21c39d5f36 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.ts index 1db4fa7e17..6a5a550459 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_sr-CS.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Obrazac - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Reši zavisnosti @@ -419,11 +414,6 @@ Da li želiš da ih Menadžer dodataka automatski instalira? Izaberi "Zanem ExpandedView - - - Form - Obrazac - @@ -473,11 +463,6 @@ Da li želiš da ih Menadžer dodataka automatski instalira? Izaberi "Zanem Form - - - Form - Obrazac - Licenses @@ -1117,9 +1102,9 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja select_toolbar_dialog - - - + + + Select Toolbar Izaberi paletu alatki @@ -1138,7 +1123,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja toolbar_button - + Add button? Dodaj dugme? @@ -1166,139 +1151,139 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja AddonsInstaller - + Starting up... Pokreće se... - + Loading addon information Učitavanje informacijа o dodacima - + Worker process {} is taking a long time to stop... Radni proces {} se dugo zaustavlja... - + Previous cache process was interrupted, restarting... Prethodni proces keširanja je prekinut, ponovo se pokreće... - + Custom repo list changed, forcing recache... Korisnička lista spremišta je promenjena, prinudno ponovno keširanje... - + Addon manager Menadžer dodataka - + You must restart FreeCAD for changes to take effect. Moraš ponovo pokrenuti FreeCAD da bi promene stupile na snagu. - + Restart now Ponovo pokreni sada - + Restart later Ponovo pokreni kasnije - - + + Refresh local cache Osveži lokalni keš - + Updating cache... Ažuriranje keša... - + Could not find addon '{}' to select Nije moguće pronaći Dodatak '{}' da bi izabrao - - + + Checking for updates... Proveravam da li postoje ažuriranja... - + Apply {} update(s) Primeni {} ažuriranje(a) - + No updates available Nema dostupnih ažuriranja - - - + + + Cannot launch a new installer until the previous one has finished. Ne može se pokrenuti novi program za instalaciju dok se prethodni ne završi. - + Execution of macro failed. See console for failure details. Izvršavanje makroa nije uspelo. Pogledaj konzolu za detalje o greškama. - - + + - + Maintainer Programer zadužen za održavanje - - - - + + + + Author Autor - + New Python Version Detected Otkrivena je nova verzija Python-a - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Čini se da je ovo prvi put da je ova verzija Python-a korišćena sa menadžerom dodataka. Da li želiš za njega da instaliraš iste automatski instalirane zavisnosti? - + Processing, please wait... Obrađuje se, sačekaj... - - + + Update Ažuriranje - + Updating... Ažuriranje... @@ -1308,63 +1293,63 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Nije moguće uvesti QtNetwork -- izgleda da nije instaliran na tvom sistemu. Tvoj provajder možda ima paket za ovu zavisnost (često se na primer naziva, "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Konvertovanje navedenog proksi porta '{}' nije uspelo - + Parameter error: mutually exclusive proxy options set. Resetting to default. Greška u parametru: postavljene su međusobno isključive proksi opcije. Vraćanje na podrazumevane vrednosti. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Greška u parametru: korisnički proksi je naznačen, ali nije obezbeđen. Vraćanje na podrazumevane vrednosti. - + Addon Manager: Unexpected {} response from server Menadžer dodataka: Neočekivani {} odgovor od servera - + Error with encrypted connection Greška šifrovane veze - + - + Confirm remove Potvrdi uklanjanje - + Are you sure you want to uninstall {}? Da li si siguran da želiš da deinstaliraš {}? - - - + + + Removing Addon Uklanjanje Dodatka - + Removing {} Уклања се {} - - + + Uninstall complete Deinstaliranje je završeno - - + + Uninstall failed Deinstaliranje nije uspelo @@ -1374,183 +1359,183 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Upozorenje menadžera dodataka: Nije moguće uvesti QtWebEngineWidgets -- README podaci će se prikazati samo kao tekst - + Version {version} installed on {date} Dana {date} instalirana je verzija {version} - + Version {version} installed Instalirana je verzija {version} - + Installed on {date} Instalirano {date} - - - - + + + + Installed Instalirano - + On branch {}, update available to version Na grani {} dostupno je ažuriranje za verziju - + Update available to version Доступно је ажурирање за верзију - + An update is available Dostupno je ažuriranje - + Git tag '{}' checked out, no updates possible Git oznaka '{}' checked out, ažuriranja nisu moguća - + This is the latest version available for branch {} Ovo je najnovija verzija dostupna za granu {} - + Updated, please restart FreeCAD to use Ažurirano, ponovo pokrenite FreeCAD da biste ga koristili - + Update check in progress U toku je provera ažuriranja - + Automatic update checks disabled Automatske provere ažuriranja su onemogućene - + Installation location Lokacija instalacije - + WARNING: This addon is obsolete UPOZORENJE: Ovaj dodatak je zastareo - + WARNING: This addon is Python 2 Only UPOZORENJE: Ovaj dodatak je samo za Python 2 - + WARNING: This addon requires FreeCAD UPOZORENJE: Ovaj dodatak zahteva FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. UPOZORENJE: Ovaj dodatak je trenutno instaliran, ali je onemogućen. Koristi 'omogući' dugme da bi ponovo omogućio. - - + + No URL or wiki page provided by this macro Ovaj makro ne daje URL ili wiki stranicu - + Could not load README data from URL {} Nije moguće učitati README podatke sa URL-a {} - + This Addon will be enabled next time you restart FreeCAD. Ovaj Dodatak će biti omogućen sledeći put kada ponovo pokreneš FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Ovaj Dodatak će biti onemogućen sledeći put kada ponovo pokreneš FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Uspešno - + Branch change succeeded, please restart to use the new version. Promena grane je uspela, ponovo pokreni da bi koristio novu verziju. - + Changed to git ref '{}' -- please restart to use Addon. Promenjeno u git ref '{}' -- ponovo pokreni da bi koristio Dodatak. - + Page JavaScript reported Prijavljen JavaScript na stranici - + Install Instaliraj - + Uninstall Deinstaliraj - + Check for Update Proveri ažuriranja - + Run Macro Pokreni makro - + Change Branch Promeni granu - + Enable Omogući - + Disable Onemogući - + Return to package list Vrati se na listu paketa - + The page is taking a long time to load... showing the data we have so far... Stranica se dugo učitava... prikazuje podatke koje imamo do sada... @@ -1565,17 +1550,17 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Proverava se veza sa GitHub-om... - + Connection failed Veza nije uspostavljena - + Missing dependency Nedostaje zavisnost - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Nije moguće uvesti QtNetwork – pogledaj Pregledač objava za detalje. Menadžer dodataka nije dostupan. @@ -1586,12 +1571,12 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Ostalo... - + Select the corresponding license file in your Addon Izaberi odgovarajuću datoteku licence u svom Dodatku - + Location for new license file Lokacija za novu licencnu datoteku @@ -1606,75 +1591,75 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Instaliranje makro-a {} nije uspelo - + Unrecognized content kind '{}' Nepoznata vrsta sadržaja '{}' - + Unable to locate icon at {} Nije moguće pronaći ikonu u {} - + Select an icon file for this content item Izaberi datoteku ikone za ovu stavku sadržaja - - - + + + {} is not a subdirectory of {} {} nije podfascikla {} - + Select the subdirectory for this content item Izaberi podfasciklu za ovu stavku sadržaja - + Automatic Automatski - + Workbench Radno okruženje - + Addon Dodatni modul - + Python Python - + Yes Da - + Internal Workbench Unutrašnje radno okruženje - + External Addon Spoljni Dodatak - + Python Package Python paket - - + + Other... Ostalo... @@ -1691,10 +1676,10 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja - - - - + + + + Missing Requirement Nedostaje Zahtev @@ -1715,7 +1700,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja - + Incompatible Python version Nekompatibilna verzija Python-a @@ -1737,7 +1722,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja - + Cannot execute Python Nije moguće izvršiti Python @@ -1753,7 +1738,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja - + Cannot execute pip Nije moguće izvršiti pip @@ -1770,7 +1755,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja - + Package installation failed Instaliranje paketa nije uspelo @@ -1806,7 +1791,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja - + Installation Failed Instalacija nije uspela @@ -1817,19 +1802,19 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja - + Create new toolbar Napravi novu paletu sa alatkama - + A macro installed with the FreeCAD Addon Manager Makro instaliran sa FreeCAD Menadžerom dodataka - + Run Indicates a macro that can be 'run' Run @@ -1840,304 +1825,304 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Nije moguće pročitati podatke sa GitHub-a: proveri internet vezu i podešavanja proksija i pokušaj ponovo. - + XML failure while reading metadata from file {} XML greška pri čitanju metapodataka iz datoteke {} - + Invalid metadata in file {} Nevažeći metapodaci u datoteci {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. UPOZORENJE: Putanja navedena u metapodacima package.xml ne odgovara trenutnoј checked-out grani. - + Name Ime - + Class Klasa - + Description Opis - + Subdirectory Podfascikla - + Files Datoteke - + Select the folder containing your Addon Izaberi fasciklu u kojoj se nalazi tvoj Dodatak - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Nema Vermin-a, operacija se otkazuje. - + Scanning Addon for Python version compatibility Skeniranje Dodatka radi utvrđivanja kompatibilne verzije Pythom-a - + Minimum Python Version Detected Otkrivena je minimalna verzija Python-a - + Vermin auto-detected a required version of Python 3.{} Vermin je automatski otkrio potrebnu verziju Python-a 3.{} - + Install Vermin? Instaliraj Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Za automatsko otkrivanje potrebne verzije Python-a za ovaj dodatak potreban je Vermin (https://pipi.org/project/vermin/). Pritisnite U redu ako želite instalirati? - + Attempting to install Vermin from PyPi Pokušaj instaliranja Vermin-a sa PyPi-ja - - + + Installation failed Instalacija nije uspela - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Instalacija Vermin-a nije uspela – proveri Pregledač objava za detalje. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Uvoz Vermin-a nakon instalacije nije uspeo - ne može da se skenira Dodatak. - + Select an icon file for this package Izaberi datoteku ikone za ovaj paket - + Filter is valid Filter je važeći - + Filter regular expression is invalid Regularni izraz filtra je nevažeći - + Click for details about package {} Klikni za detalje o paketu {} - + Click for details about workbench {} Klikni za detalje o radnom okruženju {} - + Click for details about macro {} Klikni za detalje o makro-u {} - + Maintainers: Programeri zaduženi za održavanje: - + Tags Oznake - + updated ažurirano - - + + Up-to-date Ažurirano - - - + + + Update available Dostupno jе ažuriranjе - - + + Pending restart Ponovno pokretanje na čekanju - - + + DISABLED ONEMOGUĆENO - + Installed version Instalirana verzija - + Unknown version Nepoznata verzija - + Installed on Instaliran na - + Available version Dostupna verzija - + Show Addons containing: Prikaži Dodatke koji sadrže: - + All Sva - + Workbenches Radna okruženja - + Macros Makro-i - + Preference Packs Paketi podešavanja - + Status: Status: - + Any Bilo koji - + Not installed Nije instalirano - + Filter Filter - + OK U redu - + DANGER: Developer feature OPASNOST: Funkcija za programere - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? OPASNOST: Prebacivanje grana je namenjeno programerima i beta testerima i može da dovede do oštećenih dokumenata koji nisu kompatibilni unazad, nestabilnosti, kvarova i/ili preranog toplotnog kolapsa univerzuma. Da li si siguran da želiš da nastaviš? - + There are local changes Postoje lokalne promene - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? UPOZORENjE: Ovo spremište ima nepovezane lokalne promene. Da li si siguran da želiš da promeniš grane (donoseći promene sa sobom)? - + + - Branch git terminology Grana - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Vrsta - + Local name Table header for git ref name Lokalno ime - + Tracking Table header for git remote tracking branch name name Rastojanje među slovima - + Local updated Table header for git update time of local branch Lokalno ažurirano - + Remote updated Table header for git update time of remote branch Daljinski je ažuriran @@ -2148,77 +2133,77 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Instalacija Python paketa {} nije uspela - + Installation of optional package failed Instalacija neobaveznog paketa nije uspela - + Installing required dependency {} Instaliranje neophodne zavisnosti {} - + Installation of Addon {} failed Instalacija Dodatka {} nije uspela - + Downloaded package.xml for {} Preuzet package.xml za {} - + Failed to decode {} file for Addon '{}' Dekodiranje {} datoteke za Dodatak '{}' nije uspelo - + Any dependency information in this file will be ignored Sve informacije u ovoj datoteci o zavisnosti će biti zanemarene - + Downloaded metadata.txt for {} Preuzet metadata.txt za {} - + Downloaded requirements.txt for {} Preuzet requirements.txt za {} - + Downloaded icon for {} Preuzeta ikona za {} - + Unable to open macro wiki page at {} Nije moguće otvoriti makro wiki stranicu na {} - + Unable to fetch the code of this macro. Nije moguće preuzeti kod ovog makroa. - + Unable to retrieve a description from the wiki for macro {} Nije moguće preuzeti opis sa wiki-ja za makro {} - + Unable to open macro code URL {} Nije moguće otvoriti URL adresu koda makro-a {} - + Unable to fetch macro-specified file {} from {} Nije moguće preuzeti datoteku {} navedenu makroom iz {} - + Could not locate macro-specified file {} (expected at {}) Nije moguće locirati datoteku navedenu makro-om {} (trebala je biti u {}) @@ -2259,17 +2244,17 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Izvršavanje uninstall.py skripte Dodatka nije uspelo. Nastavlja se sa deinstaliranjem... - + Removed extra installed file {} Uklonjena je dodatno instalirana datoteka {} - + Error while trying to remove extra installed file {} Greška pri pokušaju uklanjanja dodatno instalirane datoteke {} - + Error while trying to remove macro file {}: Greška pri pokušaju uklanjanja datoteke makro-a {}: @@ -2279,132 +2264,132 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Povezivanje sa GitHub-om nije uspelo. Proveri podešavanja veze i proksija. - + WARNING: Duplicate addon {} ignored UPOZORENJE: Duplikat dodatka {} je ignorisan - + Workbenches list was updated. Lista radnih okruženja je ažurirana. - + Git is disabled, skipping git macros Git je onemogućen, preskaču se git makro-i - + Attempting to change non-git Macro setup to use git Pokušaj promene podešavanja makroa bez git-a da koristi git - + An error occurred updating macros from GitHub, trying clean checkout... Došlo je do greške pri ažuriranju makro-a sa GitHub-a, pokušavam clean checkout... - + Attempting to do a clean checkout... Pokušavam da uradim clean checkout... - + Clean checkout succeeded Clean checkout je uspeo - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Ažuriranje makro-a sa GitHub-a nije uspelo -- pokušaj da obrišete keš memoriju Menadžera dodataka. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Greška pri povezivanju na Wiki, FreeCAD trenutno ne može da preuzme Wiki listu makro-a - + Unable to fetch git updates for workbench {} Nije moguće preuzeti git ažuriranja za radno okruženje {} - + git status failed for {} git preuzimanje nije uspelo za {} - + Failed to read metadata from {name} Čitanje metapodataka sa {name} nije uspelo - + Failed to fetch code for macro '{name}' Nije uspelo preuzimanje koda za makro '{name}' - + Caching macro code... Keširanje koda makro-a... - + Addon Manager: a worker process failed to complete while fetching {name} Menadžer dodataka: radni proces nije uspeo da se završi tokom preuzimanja {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Za {num_macros} makro je prekoračen je vremenski limit, {num_failed} tokom obrade - + Addon Manager: a worker process failed to halt ({name}) Menadžer dodataka: radni proces nije uspeo da se zaustavi ({name}) - + Getting metadata from macro {} Preuzimanje metapodataka iz makro-a {} - + Timeout while fetching metadata for macro {} Isteklo je vreme za preuzimanje metapodataka za makro {} - + Failed to kill process for macro {}! Ubijanje procesa za makro {} nije uspelo! - + Retrieving macro description... Preuzimanje opisa makro-a... - + Retrieving info from git Preuzimanje informacija sa git-a - + Retrieving info from wiki Preuzimanje informacija sa wiki-a - + Repository URL Preferences header for custom repositories URL adresa spremišta - + Branch name Preferences header for custom repositories Ime grane @@ -2420,7 +2405,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Pravljenje rezervne kopije originalne fascikle i ponovno kloniranje - + Failed to clone {} into {} using git Kloniranje pomoću git-a {} u {} nije uspelo @@ -2440,12 +2425,12 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Neuspešno - + Update was cancelled Ažuriranje je otkazano - + some addons may have been updated neki dodaci su možda ažurirani @@ -2453,12 +2438,12 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Std_AddonMgr - + &Addon manager &Menadžer dodataka - + Manage external workbenches, macros, and preference packs Upravljaj spoljnim radnim okruženjima, makro-ima i paketima podešavanja @@ -2466,12 +2451,12 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja AddonInstaller - + Finished removing {} Završeno uklanjanje {} - + Failed to remove some files Uklanjanje nekih datoteka nije uspelo @@ -2479,7 +2464,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja Addons installer - + Finished updating the following addons Završeno je ažuriranje sledećih dodataka @@ -2495,7 +2480,7 @@ instalirani dodaci će biti provereni da li postoje dostupna ažuriranja QObject - + Addon Manager Menadžer dodataka diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sr.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_sr.qm index 6df75311e9..760ffdb2b0 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_sr.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_sr.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sr.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_sr.ts index 7624aecf63..7ff913c0b8 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_sr.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_sr.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Образац - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Реши зависности @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Образац - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Образац - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Изабери палету алатки @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Додај дугме? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Покреће се... - + Loading addon information Учитавање информација о додацима - + Worker process {} is taking a long time to stop... Радни процес {} се дуго зауставља... - + Previous cache process was interrupted, restarting... Претходни процес кеширања је прекинут, поново се покреће... - + Custom repo list changed, forcing recache... Корисничка листа спремишта је промењена, принудно поновно кеширање... - + Addon manager Менаџер додатака - + You must restart FreeCAD for changes to take effect. Мораш поново покренути FreeCAD да би промене ступиле на снагу. - + Restart now Поново покрени сада - + Restart later Поново покрени касније - - + + Refresh local cache Освежи локални кеш - + Updating cache... Ажурирање кеша... - + Could not find addon '{}' to select Није могуће пронаћи Додатак '{}' да би изабрао - - + + Checking for updates... Проверавам да ли постоје ажурирања... - + Apply {} update(s) Примени {} ажурирање(а) - + No updates available Нема доступних ажурирања - - - + + + Cannot launch a new installer until the previous one has finished. Не може се покренути нови програм за инсталацију док се претходни не заврши. - + Execution of macro failed. See console for failure details. Извршавање макроа није успело. Погледај конзолу за детаље о грешкама. - - + + - + Maintainer Програмер задужен за одржавање - - - - + + + + Author Аутор - + New Python Version Detected Откривена је нова верзија Python-а - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? Чини се да је ово први пут да је ова верзија Python-а коришћена са Менаџером додатака. Да ли желиш за њега да инсталираш исте аутоматски инсталиране зависности? - + Processing, please wait... Обрађује се, сачекај... - - + + Update Ажурирање - + Updating... Ажурирање... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Није могуће увести QtNetwork -- изгледа да није инсталиран твом на систему. Твој провајдер можда има пакет за ову зависност (често се на пример назива, "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Конвертовање наведеног прокси порта '{}' није успело - + Parameter error: mutually exclusive proxy options set. Resetting to default. Грешка у параметру: постављене су међусобно искључиве прокси опције. Враћање на подразумеване вредности. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Грешка у параметру: кориснички прокси је назначен, али није обезбеђен. Враћање на подразумеване вредности. - + Addon Manager: Unexpected {} response from server Менаџер додатака: Неочекивани {} одговор од сервера - + Error with encrypted connection Грешка шифроване везе - + - + Confirm remove Потврди уклањање - + Are you sure you want to uninstall {}? Да ли си сигуран да желиш да деинсталираш {}? - - - + + + Removing Addon Уклањање Додатка - + Removing {} Уклања се {} - - + + Uninstall complete Деинсталирање је завршено - - + + Uninstall failed Деинсталирање није успело @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Упозорење менаџера додатака: Није могуће увести QtWebEngineWidgets -- README подаци ће се приказати само као текст - + Version {version} installed on {date} Дана {date} инсталирана је верзија {version} - + Version {version} installed Инсталирана је верзија {version} - + Installed on {date} Инсталирано {date} - - - - + + + + Installed Инсталирано - + On branch {}, update available to version На грани {} доступно је ажурирање за верзију - + Update available to version Доступно је ажурирање за верзију - + An update is available Доступно је ажурирање - + Git tag '{}' checked out, no updates possible Git ознака '{}' checked out, ажурирања нису могућа - + This is the latest version available for branch {} Ово је најновија верзија доступна за грану {} - + Updated, please restart FreeCAD to use Ажурирано, поново покрените FreeCAD да бисте га користили - + Update check in progress У току је провера ажурирања - + Automatic update checks disabled Аутоматске провере ажурирања су онемогућене - + Installation location Локација инсталације - + WARNING: This addon is obsolete УПОЗОРЕЊЕ: Овај додатак је застарео - + WARNING: This addon is Python 2 Only УПОЗОРЕЊЕ: Овај додатак је само за Python 2 - + WARNING: This addon requires FreeCAD УПОЗОРЕЊЕ: Овај додатак захтева FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. УПОЗОРЕЊЕ: Овај додатак је тренутно инсталиран, али онемогућен. Користи 'омогући' дугме да би поново омогућио. - - + + No URL or wiki page provided by this macro Овај макро не даје URL или wiki страницу - + Could not load README data from URL {} Није могуће учитати README податке са URL-а {} - + This Addon will be enabled next time you restart FreeCAD. Овај Додатак ће бити омогућен следећи пут када поново покренеш FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. Овај Додатак ће бити онемогућен следећи пут када поново покренеш FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Успешно - + Branch change succeeded, please restart to use the new version. Промена гране је успела, поново покрени да би користио нову верзију. - + Changed to git ref '{}' -- please restart to use Addon. Промењено у git ref '{}' -- поново покрени да би користио Додатак. - + Page JavaScript reported Пријављен JavaScript на страници - + Install Инсталирај - + Uninstall Деинсталирај - + Check for Update Провери ажурирања - + Run Macro Покрени макро - + Change Branch Промени грану - + Enable Омогући - + Disable Онемогући - + Return to package list Врати се на листу пакета - + The page is taking a long time to load... showing the data we have so far... Страница се дуго учитава... приказује податке које имамо до сада... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Проверава се веза са GitHub-ом... - + Connection failed Веза није успостављена - + Missing dependency Недостаје зависност - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Није могуће увести QtNetwork – погледај Прегледач објава за детаље. Менаджер додатака није доступан. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Остало... - + Select the corresponding license file in your Addon Изабери одговарајућу датотеку лиценце у свом Додатку - + Location for new license file Локација за нову лиценцну датотеку @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Инсталирање макро-а {} није успело - + Unrecognized content kind '{}' Непозната врста садржаја '{}' - + Unable to locate icon at {} Није могуће пронаћи икону у {} - + Select an icon file for this content item Изабери датотеку иконе за ову ставку садржаја - - - + + + {} is not a subdirectory of {} {} није подфасцикла {} - + Select the subdirectory for this content item Изабери подфасциклу за ову ставку садржаја - + Automatic Аутоматски - + Workbench Радно окружење - + Addon Додатни модул - + Python Python - + Yes Да - + Internal Workbench Унутрашње радно окружење - + External Addon Cпољни Додатак - + Python Package Python пакет - - + + Other... Остало... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Недостаје Захтев @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Некомпатибилна верзија Python-а @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Није могуће извршити Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Није могуће извршити pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Инсталирање пакета није успело @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Инсталација није успела @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Направи нову палету са алаткама - + A macro installed with the FreeCAD Addon Manager Макро инсталиран са FreeCAD Менаџером додатака - + Run Indicates a macro that can be 'run' Покрени @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Није могуће прочитати податке са GitHub-а: провери интернет везу и подешавања проксија и покушај поново. - + XML failure while reading metadata from file {} XML грешка при читању метаподатака из датотеке {} - + Invalid metadata in file {} Неважећи метаподаци у датотеци {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. УПОЗОРЕЊЕ: Путања наведена у метаподацима package.xml не одговара тренутној checked-out грани. - + Name Име - + Class Класа - + Description Опис - + Subdirectory Подфасцикла - + Files Датотеке - + Select the folder containing your Addon Изабери фасциклу у којој се налази твој Додатак - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate Нема Вермин-а, операција се отказује. - + Scanning Addon for Python version compatibility Скенирање Додатка ради утврђивања компатибилне верзије Python-а - + Minimum Python Version Detected Откривена је минимална верзија Python-а - + Vermin auto-detected a required version of Python 3.{} Vermin је аутоматски открио потребну верзију Python-а 3.{} - + Install Vermin? Инсталирај Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? За аутоматско откривање потребне верзије Python-а за овај додатак потребан је Vermin (https://pypi.org/project/vermin/). Притисните У реду ако желите инсталирати? - + Attempting to install Vermin from PyPi Покушај инсталирања Vermin-a са PyPi-ја - - + + Installation failed Инсталација није успела - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Инсталација Vermin-а није успела – провери Прегледач објава за детаље. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Увоз Vermin-а након инсталације није успео - не може да се скенира Додатак. - + Select an icon file for this package Изабери датотеку иконе за овај пакет - + Filter is valid Филтер је важећи - + Filter regular expression is invalid Регуларни израз филтра је неважећи - + Click for details about package {} Кликни за детаље о пакету {} - + Click for details about workbench {} Кликни за детаље о радном окружењу {} - + Click for details about macro {} Кликни за детаље о макро-у {} - + Maintainers: Програмери задужени за одржавање: - + Tags Ознаке - + updated ажурирано - - + + Up-to-date Ажурирано - - - + + + Update available Доступно је ажурирање - - + + Pending restart Поновно покретање на чекању - - + + DISABLED ОНЕМОГУЋЕНО - + Installed version Инсталирана верзија - + Unknown version Непозната верзија - + Installed on Инсталиран на - + Available version Доступна верзија - + Show Addons containing: Прикажи Додатке који садрже: - + All Сва - + Workbenches Радна окружења - + Macros Макро-и - + Preference Packs Пакети подешавања - + Status: Статус: - + Any Било који - + Not installed Није инсталирано - + Filter Филтер - + OK У реду - + DANGER: Developer feature ОПАСНОСТ: Функција за програмере - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? ОПАСНОСТ: Пребацивање грана је намењено програмерима и бета тестерима и може да доведе до оштећених докумената који нису компатибилни уназад, нестабилности, кварова и/или прераног топлотног колапса универзума. Да ли си сигуран да желиш да наставиш? - + There are local changes Постоје локалне промене - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? УПОЗОРЕЊЕ: Ово спремиште има неповезане локалне промене. Да ли си сигуран да желиш да промениш гране (доносећи промене са собом)? - + + - Branch git terminology Грана - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Врста - + Local name Table header for git ref name Локално име - + Tracking Table header for git remote tracking branch name name Растојање међу словима - + Local updated Table header for git update time of local branch Локално ажурирано - + Remote updated Table header for git update time of remote branch Даљински је ажуриран @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Инсталација Python пакета {} није успела - + Installation of optional package failed Инсталација необавезног пакета није успела - + Installing required dependency {} Инсталирање неопходне зависности {} - + Installation of Addon {} failed Инсталација Додатка {} није успела - + Downloaded package.xml for {} Преузет package.xml за {} - + Failed to decode {} file for Addon '{}' Декодирање {} датотеке за Додатак '{}' није успело - + Any dependency information in this file will be ignored Све информације у овој датотеци о зависности ће бити занемарене - + Downloaded metadata.txt for {} Преузет metadata.txt за {} - + Downloaded requirements.txt for {} Преузет requirements.txt за {} - + Downloaded icon for {} Преузета икона за {} - + Unable to open macro wiki page at {} Није могуће отворити макро wiki страницу на {} - + Unable to fetch the code of this macro. Није могуће преузети код овог макроа. - + Unable to retrieve a description from the wiki for macro {} Није могуће преузети опис са wiki-ја за макро {} - + Unable to open macro code URL {} Није могуће отворити URL адресу кода макроа {} - + Unable to fetch macro-specified file {} from {} Није могуће преузети датотеку {} наведену макроом из {} - + Could not locate macro-specified file {} (expected at {}) Није могуће лоцирати датотеку наведену макро-ом {} (требала је бити у {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Извршавање uninstall.py скрипте Додатка није успело. Наставља се са деинсталирањем... - + Removed extra installed file {} Уклоњена је додатно инсталирана датотека {} - + Error while trying to remove extra installed file {} Грешка при покушају уклањања додатно инсталиране датотеке {} - + Error while trying to remove macro file {}: Грешка при покушају уклањања датотеке макро-а {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Повезивање са GitHub-ом није успело. Провери подешавања везе и проксија. - + WARNING: Duplicate addon {} ignored УПОЗОРЕЊЕ: Дупликат додатка {} је игнорисан - + Workbenches list was updated. Листа радних окружења је ажурирана. - + Git is disabled, skipping git macros Git је онемогућен, прескачу се git макро-и - + Attempting to change non-git Macro setup to use git Покушај промене подешавања макроа без git-а да користи git - + An error occurred updating macros from GitHub, trying clean checkout... Дошло је до грешке при ажурирању макро-а са GitHub-а, покушавам clean checkout... - + Attempting to do a clean checkout... Покушавам да урадим clean checkout... - + Clean checkout succeeded Clean checkout је успео - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Ажурирање макро-а са GitHub-а није успело -- покушај да обришете кеш меморију Менаџера додатака. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Грешка при повезивању на Wiki, FreeCAD тренутно не може да преузме Wiki листу макро-а - + Unable to fetch git updates for workbench {} Није могуће преузети git ажурирања за радно окружење {} - + git status failed for {} git преузимање није успело за {} - + Failed to read metadata from {name} Читање метаподатака са {name} није успело - + Failed to fetch code for macro '{name}' Није успело преузимање кода за '{name}' - + Caching macro code... Кеширање кода макро-а... - + Addon Manager: a worker process failed to complete while fetching {name} Менаџер додатака: радни процес није успео да се заврши током преузимања {name} - + Out of {num_macros} macros, {num_failed} timed out while processing За {num_macros} макро је прекорачен је временски лимит, {num_failed} током обраде - + Addon Manager: a worker process failed to halt ({name}) Менаџер додатака: радни процес није успео да се заустави ({name}) - + Getting metadata from macro {} Преузимање метаподатака из макро-а {} - + Timeout while fetching metadata for macro {} Истекло је време за преузимање метаподатака за макро {} - + Failed to kill process for macro {}! Убијање процеса за макро {} није успело! - + Retrieving macro description... Преузимање описа макро-а... - + Retrieving info from git Преузимање информација са git-а - + Retrieving info from wiki Преузимање информација са wiki-ја - + Repository URL Preferences header for custom repositories URL адреса спремишта - + Branch name Preferences header for custom repositories Име гране @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Прављење резервне копије оригиналне фасцикле и поновно клонирање - + Failed to clone {} into {} using git Клонирање помоћу git-а {} у {} није успело @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Неуспешно - + Update was cancelled Ажурирање је отказано - + some addons may have been updated неки додаци су можда ажурирани @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Менаџер додатака - + Manage external workbenches, macros, and preference packs Управљај спољним радним окружењима, макро-има и пакетима подешавања @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Завршено уклањање {} - + Failed to remove some files Уклањање неких датотека није успело @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Завршено је ажурирање следећих додатака @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Менаџер додатака diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.qm index 94b17b9dd5..89f4159dfa 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.ts index a8c9233d41..e894aadf6a 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_sv-SE.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Form - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolve Dependencies @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Form - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Form - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Uppdatera lokal cache - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Maintainer - - - - + + + + Author Upphovsman - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Uppdatera - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Installera - + Uninstall Avinstallera - + Check for Update Check for Update - + Run Macro Kör makro - + Change Branch Change Branch - + Enable Aktivera - + Disable Avaktivera - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automatisk - + Workbench Arbetsbänk - + Addon Addon - + Python Python - + Yes Ja - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Kör @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Namn - + Class Klass - + Description Beskrivning - + Subdirectory Subdirectory - + Files Filer - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Taggar - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Alla - + Workbenches Arbetsbänkar - + Macros Makron - + Preference Packs Preference Packs - + Status: Status: - + Any Vilken som - + Not installed Not installed - + Filter Filter - + OK OK - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Gren - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Spårning - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Repository URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Tilläggshanterare diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_tr.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_tr.qm index f7332eaa8a..de1df7dacd 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_tr.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_tr.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_tr.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_tr.ts index 0234460e39..ba0ebd9186 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_tr.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_tr.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Şekil: - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Bağımlılıkları Çöz @@ -419,11 +414,6 @@ Eklenti Yöneticisinin bunları otomatik olarak kurmasını istiyor musunuz? Ekl ExpandedView - - - Form - Şekil: - @@ -473,11 +463,6 @@ Eklenti Yöneticisinin bunları otomatik olarak kurmasını istiyor musunuz? Ekl Form - - - Form - Şekil: - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Araç Çubuğunu Seç @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Tuş ekle? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Başlatılıyor... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Yerel önbelleği yenile - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Geliştirici - - - - + + + + Author Yazar - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Güncelle - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Yükle - + Uninstall Kaldır - + Check for Update Check for Update - + Run Macro Makro Çalıştır - + Change Branch Branch Değiştir - + Enable Etkinleştir - + Disable Devre dışı - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Otomatik - + Workbench Tezgah - + Addon Eklenti - + Python Python - + Yes Evet - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Çalıştırmak @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Isim - + Class Sınıf - + Description Açıklama - + Subdirectory Alt dizin - + Files Dosyalar - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Etiketler - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Kurulu sürüm - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Hepsi - + Workbenches Tezgah - + Macros Makrolar - + Preference Packs Preference Packs - + Status: Durum: - + Any Herhangi biri - + Not installed Not installed - + Filter Filtre - + OK Tamam - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Dal - + Tag git terminology Etiket - + Kind Table header for git ref type (e.g. either Tag or Branch) Tür - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name İzleme - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Depo URL' si - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Eklenti Yöneticisi diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_uk.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_uk.qm index a17245dc0a..04a65172a5 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_uk.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_uk.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_uk.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_uk.ts index 4a7eea1a17..7311af8a89 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_uk.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_uk.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Форма - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Встановлення залежностей @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Форма - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Форма - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Виберіть Панель Інструментів @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Додати кнопку? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Оновити локальний кеш - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Розробник - - - - + + + + Author Автор - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Оновити - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Встановити - + Uninstall Видалити - + Check for Update Check for Update - + Run Macro Запустити Макрос - + Change Branch Змінити гілку - + Enable Ввімкнути - + Disable Вимкнути - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Автоматичний - + Workbench Робочі середовища - + Addon Додаток - + Python Python - + Yes Так - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' Запустити @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Назва - + Class Клас - + Description Опис - + Subdirectory Підкаталог - + Files Files - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Мітки - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Встановлена версія - + Unknown version Unknown version - + Installed on Installed on - + Available version Доступна версія - + Show Addons containing: Show Addons containing: - + All Всі - + Workbenches Робочі середовища - + Macros Макроси - + Preference Packs Preference Packs - + Status: Стан: - + Any Будь-який - + Not installed Not installed - + Filter Фільтр - + OK Підтвердити - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Гілка - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Тип - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Колія - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories URL репозиторію - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Оновлення було скасовано - + some addons may have been updated деякі додатки можуть бути оновлені @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Менеджер додатків diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.qm index f9cc81b509..5be27d5222 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.ts index 56b7ab832f..f1bb9fed42 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_val-ES.ts @@ -21,11 +21,6 @@ CompactView - - - Form - Forma - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies Resolve Dependencies @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - Forma - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - Forma - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Refresh local cache - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer Maintainer - - - - + + + + Author Autor - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update Actualitza - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install Install - + Uninstall Uninstall - + Check for Update Check for Update - + Run Macro Run Macro - + Change Branch Change Branch - + Enable Habilita - + Disable Desactiva - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic Automàtica - + Workbench Banc de treball - + Addon Addon - + Python Python - + Yes Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' executa @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name Nom - + Class Classe - + Description Descripció - + Subdirectory Subdirectory - + Files Fitxers - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags Tags - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All Tot - + Workbenches Bancs de treball - + Macros Macros - + Preference Packs Preference Packs - + Status: Status: - + Any Qualsevol - + Not installed Not installed - + Filter Filtre - + OK D'acord - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology Branch - + Tag git terminology Tag - + Kind Table header for git ref type (e.g. either Tag or Branch) Kind - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name Seguiment - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Repository URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated some addons may have been updated @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager Addon Manager diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.qm index f713719c14..387309b7b8 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.ts index c23a58f5f0..a9eb711f5d 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-CN.ts @@ -21,11 +21,6 @@ CompactView - - - Form - 窗体 - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies 解析依赖 @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - 窗体 - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - 窗体 - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar 选择工具栏 @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? 添加按钮 @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache 刷新本地缓存 - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer 维护者 - - - - + + + + Author 作者 - + New Python Version Detected New Python Version Detected - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... Processing, please wait... - - + + Update 更新 - + Updating... Updating... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? Are you sure you want to uninstall {}? - - - + + + Removing Addon Removing Addon - + Removing {} Removing {} - - + + Uninstall complete Uninstall complete - - + + Uninstall failed Uninstall failed @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install 安装 - + Uninstall 卸载 - + Check for Update Check for Update - + Run Macro 运行宏 - + Change Branch 更改分支 - + Enable 启用 - + Disable 禁用 - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates Other... - + Select the corresponding license file in your Addon Select the corresponding license file in your Addon - + Location for new license file Location for new license file @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} Unable to locate icon at {} - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic 自动 - + Workbench 工作台 - + Addon 附加组件 - + Python Python - + Yes - + Internal Workbench Internal Workbench - + External Addon External Addon - + Python Package Python Package - - + + Other... Other... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version Incompatible Python version @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' 运行 @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name 名称 - + Class 种类 - + Description 描述 - + Subdirectory Subdirectory - + Files Files - + Select the folder containing your Addon Select the folder containing your Addon - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags 标签 - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All 全部 - + Workbenches 工作台 - + Macros - + Preference Packs Preference Packs - + Status: 状态: - + Any 任意 - + Not installed Not installed - + Filter 筛选器 - + OK 确定 - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology 分支 - + Tag git terminology 标记: - + Kind Table header for git ref type (e.g. either Tag or Branch) 类型 - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name 追踪 - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed Installation of Addon {} failed - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored WARNING: Duplicate addon {} ignored - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories 仓库的网址 - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled 更新已取消 - + some addons may have been updated 一些附加组件可能已更新 @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons Finished updating the following addons @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager 插件管理器 diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.qm index fe402cb190..6f594d6fbf 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.ts index b1e873b808..3af4af1cad 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_zh-TW.ts @@ -21,11 +21,6 @@ CompactView - - - Form - 格式 - @@ -88,7 +83,7 @@ DependencyResolutionDialog - + Resolve Dependencies 解決相依性 @@ -419,11 +414,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore ExpandedView - - - Form - 格式 - @@ -473,11 +463,6 @@ Do you want the Addon Manager to install them automatically? Choose "Ignore Form - - - Form - 格式 - Licenses @@ -1117,9 +1102,9 @@ installed addons will be checked for available updates select_toolbar_dialog - - - + + + Select Toolbar Select Toolbar @@ -1138,7 +1123,7 @@ installed addons will be checked for available updates toolbar_button - + Add button? Add button? @@ -1166,139 +1151,139 @@ installed addons will be checked for available updates AddonsInstaller - + Starting up... Starting up... - + Loading addon information Loading addon information - + Worker process {} is taking a long time to stop... Worker process {} is taking a long time to stop... - + Previous cache process was interrupted, restarting... Previous cache process was interrupted, restarting... - + Custom repo list changed, forcing recache... Custom repo list changed, forcing recache... - + Addon manager Addon manager - + You must restart FreeCAD for changes to take effect. You must restart FreeCAD for changes to take effect. - + Restart now Restart now - + Restart later Restart later - - + + Refresh local cache Refresh local cache - + Updating cache... Updating cache... - + Could not find addon '{}' to select Could not find addon '{}' to select - - + + Checking for updates... Checking for updates... - + Apply {} update(s) Apply {} update(s) - + No updates available No updates available - - - + + + Cannot launch a new installer until the previous one has finished. Cannot launch a new installer until the previous one has finished. - + Execution of macro failed. See console for failure details. Execution of macro failed. See console for failure details. - - + + - + Maintainer 維護者 - - - - + + + + Author 作者 - + New Python Version Detected 偵測到新的 Python 版本 - + This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it? - + Processing, please wait... 處理中,請稍候... - - + + Update 更新 - + Updating... 正在更新... @@ -1308,63 +1293,63 @@ installed addons will be checked for available updates Could not import QtNetwork -- it does not appear to be installed on your system. Your provider may have a package for this dependency (often called "python3-pyside2.qtnetwork") - + Failed to convert the specified proxy port '{}' to a port number Failed to convert the specified proxy port '{}' to a port number - + Parameter error: mutually exclusive proxy options set. Resetting to default. Parameter error: mutually exclusive proxy options set. Resetting to default. - + Parameter error: user proxy indicated, but no proxy provided. Resetting to default. Parameter error: user proxy indicated, but no proxy provided. Resetting to default. - + Addon Manager: Unexpected {} response from server Addon Manager: Unexpected {} response from server - + Error with encrypted connection Error with encrypted connection - + - + Confirm remove Confirm remove - + Are you sure you want to uninstall {}? 您確定要解除安裝 {} 嗎? - - - + + + Removing Addon 移除附加元件 - + Removing {} 正在刪除 {} - - + + Uninstall complete 解除安裝完成 - - + + Uninstall failed 解除安裝失敗 @@ -1374,183 +1359,183 @@ installed addons will be checked for available updates Addon Manager Warning: Could not import QtWebEngineWidgets -- README data will display as text-only - + Version {version} installed on {date} Version {version} installed on {date} - + Version {version} installed Version {version} installed - + Installed on {date} Installed on {date} - - - - + + + + Installed Installed - + On branch {}, update available to version On branch {}, update available to version - + Update available to version Update available to version - + An update is available An update is available - + Git tag '{}' checked out, no updates possible Git tag '{}' checked out, no updates possible - + This is the latest version available for branch {} This is the latest version available for branch {} - + Updated, please restart FreeCAD to use Updated, please restart FreeCAD to use - + Update check in progress Update check in progress - + Automatic update checks disabled Automatic update checks disabled - + Installation location Installation location - + WARNING: This addon is obsolete WARNING: This addon is obsolete - + WARNING: This addon is Python 2 Only WARNING: This addon is Python 2 Only - + WARNING: This addon requires FreeCAD WARNING: This addon requires FreeCAD - + WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. WARNING: This addon is currently installed, but disabled. Use the 'enable' button to re-enable. - - + + No URL or wiki page provided by this macro No URL or wiki page provided by this macro - + Could not load README data from URL {} Could not load README data from URL {} - + This Addon will be enabled next time you restart FreeCAD. This Addon will be enabled next time you restart FreeCAD. - + This Addon will be disabled next time you restart FreeCAD. This Addon will be disabled next time you restart FreeCAD. - + QtWebEngine Python bindings not installed -- using fallback README display. QtWebEngine Python bindings not installed -- using fallback README display. - + Success Success - + Branch change succeeded, please restart to use the new version. Branch change succeeded, please restart to use the new version. - + Changed to git ref '{}' -- please restart to use Addon. Changed to git ref '{}' -- please restart to use Addon. - + Page JavaScript reported Page JavaScript reported - + Install 安裝 - + Uninstall 解除安裝 - + Check for Update Check for Update - + Run Macro 執行巨集 - + Change Branch 變更分支 - + Enable 啟用 - + Disable 停用 - + Return to package list Return to package list - + The page is taking a long time to load... showing the data we have so far... The page is taking a long time to load... showing the data we have so far... @@ -1565,17 +1550,17 @@ installed addons will be checked for available updates Checking for connection to GitHub... - + Connection failed Connection failed - + Missing dependency Missing dependency - + Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. Could not import QtNetwork -- see Report View for details. Addon Manager unavailable. @@ -1586,12 +1571,12 @@ installed addons will be checked for available updates 其他... - + Select the corresponding license file in your Addon 選擇附加元件中相對應的授權檔案 - + Location for new license file 新授權檔案的位置 @@ -1606,75 +1591,75 @@ installed addons will be checked for available updates Failed to install macro {} - + Unrecognized content kind '{}' Unrecognized content kind '{}' - + Unable to locate icon at {} 無法在 {} 位置找到圖示 - + Select an icon file for this content item Select an icon file for this content item - - - + + + {} is not a subdirectory of {} {} is not a subdirectory of {} - + Select the subdirectory for this content item Select the subdirectory for this content item - + Automatic 自動 - + Workbench 工作台 - + Addon 附加元件 - + Python Python - + Yes Yes - + Internal Workbench 內部工作台 - + External Addon 外部附加元件 - + Python Package Python 套件 - - + + Other... 其他... @@ -1691,10 +1676,10 @@ installed addons will be checked for available updates - - - - + + + + Missing Requirement Missing Requirement @@ -1715,7 +1700,7 @@ installed addons will be checked for available updates - + Incompatible Python version 不相容的 Python 版本 @@ -1737,7 +1722,7 @@ installed addons will be checked for available updates - + Cannot execute Python Cannot execute Python @@ -1753,7 +1738,7 @@ installed addons will be checked for available updates - + Cannot execute pip Cannot execute pip @@ -1770,7 +1755,7 @@ installed addons will be checked for available updates - + Package installation failed Package installation failed @@ -1806,7 +1791,7 @@ installed addons will be checked for available updates - + Installation Failed Installation Failed @@ -1817,19 +1802,19 @@ installed addons will be checked for available updates - + Create new toolbar Create new toolbar - + A macro installed with the FreeCAD Addon Manager A macro installed with the FreeCAD Addon Manager - + Run Indicates a macro that can be 'run' 執行 @@ -1840,304 +1825,304 @@ installed addons will be checked for available updates Unable to read data from GitHub: check your internet connection and proxy settings and try again. - + XML failure while reading metadata from file {} XML failure while reading metadata from file {} - + Invalid metadata in file {} Invalid metadata in file {} - + WARNING: Path specified in package.xml metadata does not match currently checked-out branch. WARNING: Path specified in package.xml metadata does not match currently checked-out branch. - + Name 名稱 - + Class 類別 (Class) - + Description 說明 - + Subdirectory Subdirectory - + Files 檔案 - + Select the folder containing your Addon 選擇內含你的附加元件之資料夾 - + No Vermin, cancelling operation. NOTE: Vermin is a Python package and proper noun - do not translate No Vermin, cancelling operation. - + Scanning Addon for Python version compatibility Scanning Addon for Python version compatibility - + Minimum Python Version Detected Minimum Python Version Detected - + Vermin auto-detected a required version of Python 3.{} Vermin auto-detected a required version of Python 3.{} - + Install Vermin? Install Vermin? - + Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? Auto-detecting the required version of Python for this Addon requires Vermin (https://pypi.org/project/vermin/). OK to install? - + Attempting to install Vermin from PyPi Attempting to install Vermin from PyPi - - + + Installation failed Installation failed - + Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate Failed to install Vermin -- check Report View for details. - + Failed to import vermin after installation -- cannot scan Addon. 'vermin' is the name of a Python package, do not translate Failed to import vermin after installation -- cannot scan Addon. - + Select an icon file for this package Select an icon file for this package - + Filter is valid Filter is valid - + Filter regular expression is invalid Filter regular expression is invalid - + Click for details about package {} Click for details about package {} - + Click for details about workbench {} Click for details about workbench {} - + Click for details about macro {} Click for details about macro {} - + Maintainers: Maintainers: - + Tags 標籤 - + updated updated - - + + Up-to-date Up-to-date - - - + + + Update available Update available - - + + Pending restart Pending restart - - + + DISABLED DISABLED - + Installed version Installed version - + Unknown version Unknown version - + Installed on Installed on - + Available version Available version - + Show Addons containing: Show Addons containing: - + All 所有 - + Workbenches 工作臺 - + Macros 巨集 - + Preference Packs Preference Packs - + Status: 狀態: - + Any 任何 - + Not installed Not installed - + Filter 篩選器 - + OK 確定 - + DANGER: Developer feature DANGER: Developer feature - + DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? DANGER: Switching branches is intended for developers and beta testers, and may result in broken, non-backwards compatible documents, instability, crashes, and/or the premature heat death of the universe. Are you sure you want to continue? - + There are local changes There are local changes - + WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? WARNING: This repo has uncommitted local changes. Are you sure you want to change branches (bringing the changes with you)? - + + - Branch git terminology 分支 - + Tag git terminology 標籤 - + Kind Table header for git ref type (e.g. either Tag or Branch) 類別 - + Local name Table header for git ref name Local name - + Tracking Table header for git remote tracking branch name name 追蹤 - + Local updated Table header for git update time of local branch Local updated - + Remote updated Table header for git update time of remote branch Remote updated @@ -2148,77 +2133,77 @@ installed addons will be checked for available updates Installation of Python package {} failed - + Installation of optional package failed Installation of optional package failed - + Installing required dependency {} Installing required dependency {} - + Installation of Addon {} failed 安裝附加元件 {} 失敗 - + Downloaded package.xml for {} Downloaded package.xml for {} - + Failed to decode {} file for Addon '{}' Failed to decode {} file for Addon '{}' - + Any dependency information in this file will be ignored Any dependency information in this file will be ignored - + Downloaded metadata.txt for {} Downloaded metadata.txt for {} - + Downloaded requirements.txt for {} Downloaded requirements.txt for {} - + Downloaded icon for {} Downloaded icon for {} - + Unable to open macro wiki page at {} Unable to open macro wiki page at {} - + Unable to fetch the code of this macro. Unable to fetch the code of this macro. - + Unable to retrieve a description from the wiki for macro {} Unable to retrieve a description from the wiki for macro {} - + Unable to open macro code URL {} Unable to open macro code URL {} - + Unable to fetch macro-specified file {} from {} Unable to fetch macro-specified file {} from {} - + Could not locate macro-specified file {} (expected at {}) Could not locate macro-specified file {} (expected at {}) @@ -2259,17 +2244,17 @@ installed addons will be checked for available updates Execution of Addon's uninstall.py script failed. Proceeding with uninstall... - + Removed extra installed file {} Removed extra installed file {} - + Error while trying to remove extra installed file {} Error while trying to remove extra installed file {} - + Error while trying to remove macro file {}: Error while trying to remove macro file {}: @@ -2279,132 +2264,132 @@ installed addons will be checked for available updates Failed to connect to GitHub. Check your connection and proxy settings. - + WARNING: Duplicate addon {} ignored 警告:重複的附加元件 {} 被忽略 - + Workbenches list was updated. Workbenches list was updated. - + Git is disabled, skipping git macros Git is disabled, skipping git macros - + Attempting to change non-git Macro setup to use git Attempting to change non-git Macro setup to use git - + An error occurred updating macros from GitHub, trying clean checkout... An error occurred updating macros from GitHub, trying clean checkout... - + Attempting to do a clean checkout... Attempting to do a clean checkout... - + Clean checkout succeeded Clean checkout succeeded - + Failed to update macros from GitHub -- try clearing the Addon Manager's cache. Failed to update macros from GitHub -- try clearing the Addon Manager's cache. - + Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time Error connecting to the Wiki, FreeCAD cannot retrieve the Wiki macro list at this time - + Unable to fetch git updates for workbench {} Unable to fetch git updates for workbench {} - + git status failed for {} git status failed for {} - + Failed to read metadata from {name} Failed to read metadata from {name} - + Failed to fetch code for macro '{name}' Failed to fetch code for macro '{name}' - + Caching macro code... Caching macro code... - + Addon Manager: a worker process failed to complete while fetching {name} Addon Manager: a worker process failed to complete while fetching {name} - + Out of {num_macros} macros, {num_failed} timed out while processing Out of {num_macros} macros, {num_failed} timed out while processing - + Addon Manager: a worker process failed to halt ({name}) Addon Manager: a worker process failed to halt ({name}) - + Getting metadata from macro {} Getting metadata from macro {} - + Timeout while fetching metadata for macro {} Timeout while fetching metadata for macro {} - + Failed to kill process for macro {}! Failed to kill process for macro {}! - + Retrieving macro description... Retrieving macro description... - + Retrieving info from git Retrieving info from git - + Retrieving info from wiki Retrieving info from wiki - + Repository URL Preferences header for custom repositories Repository URL - + Branch name Preferences header for custom repositories Branch name @@ -2420,7 +2405,7 @@ installed addons will be checked for available updates Backing up the original directory and re-cloning - + Failed to clone {} into {} using git Failed to clone {} into {} using git @@ -2440,12 +2425,12 @@ installed addons will be checked for available updates Failed - + Update was cancelled Update was cancelled - + some addons may have been updated 某些附加元件可能已經被更新了 @@ -2453,12 +2438,12 @@ installed addons will be checked for available updates Std_AddonMgr - + &Addon manager &Addon manager - + Manage external workbenches, macros, and preference packs Manage external workbenches, macros, and preference packs @@ -2466,12 +2451,12 @@ installed addons will be checked for available updates AddonInstaller - + Finished removing {} Finished removing {} - + Failed to remove some files Failed to remove some files @@ -2479,7 +2464,7 @@ installed addons will be checked for available updates Addons installer - + Finished updating the following addons 已完成更新底下附加元件 @@ -2495,7 +2480,7 @@ installed addons will be checked for available updates QObject - + Addon Manager 附加元件管理器 diff --git a/src/Mod/AddonManager/TestAddonManagerApp.py b/src/Mod/AddonManager/TestAddonManagerApp.py index 5b3237b528..12392ea2c5 100644 --- a/src/Mod/AddonManager/TestAddonManagerApp.py +++ b/src/Mod/AddonManager/TestAddonManagerApp.py @@ -30,6 +30,9 @@ from AddonManagerTest.app.test_utilities import ( from AddonManagerTest.app.test_addon import ( TestAddon as AddonManagerTestAddon, ) +from AddonManagerTest.app.test_cache import ( + TestCache as AddonManagerTestCache, +) from AddonManagerTest.app.test_macro import ( TestMacro as AddonManagerTestMacro, ) @@ -74,6 +77,7 @@ except ImportError: loaded_gui_tests = [ AddonManagerTestUtilities, AddonManagerTestAddon, + AddonManagerTestCache, AddonManagerTestMacro, AddonManagerTestGit, AddonManagerTestAddonInstaller, diff --git a/src/Mod/AddonManager/addonmanager_cache.py b/src/Mod/AddonManager/addonmanager_cache.py new file mode 100644 index 0000000000..a72d290be0 --- /dev/null +++ b/src/Mod/AddonManager/addonmanager_cache.py @@ -0,0 +1,118 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# *************************************************************************** +# * * +# * Copyright (c) 2022-2023 FreeCAD Project Association * +# * * +# * This file is part of FreeCAD. * +# * * +# * FreeCAD is free software: you can redistribute it and/or modify it * +# * under the terms of the GNU Lesser General Public License as * +# * published by the Free Software Foundation, either version 2.1 of the * +# * License, or (at your option) any later version. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, but * +# * WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# * Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Lesser General Public * +# * License along with FreeCAD. If not, see * +# * . * +# * * +# *************************************************************************** + +from datetime import date, timedelta +import hashlib +import os + +import addonmanager_freecad_interface as fci +import addonmanager_utilities as utils + +translate = fci.translate + + +def local_cache_needs_update() -> bool: + """Determine whether we need to update the cache, based on user preference, and previous + cache update status. Returns either True or False.""" + + if not _cache_exists(): + return True + + if _last_update_was_interrupted(reset_status=True): + return True + + if _custom_repo_list_changed(): + return True + + # Figure out our cache update frequency: there is a combo box in the preferences dialog + # with three options: never, daily, and weekly. + days_between_updates = _days_between_updates() + pref = fci.ParamGet("User parameter:BaseApp/Preferences/Addons") + last_cache_update_string = pref.GetString("LastCacheUpdate", "never") + + if last_cache_update_string == "never": + return True + elif days_between_updates > 0: + last_cache_update = date.fromisoformat(last_cache_update_string) + delta_update = timedelta(days=days_between_updates) + if date.today() >= last_cache_update + delta_update: + return True + elif days_between_updates == 0: + return True + + return False + + +def _days_between_updates() -> int: + pref = fci.ParamGet("User parameter:BaseApp/Preferences/Addons") + update_frequency = pref.GetInt("UpdateFrequencyComboEntry", 0) + if update_frequency == 0: + return -1 + elif update_frequency == 1: + return 1 + elif update_frequency == 2: + return 7 + else: + return 0 + + +def _cache_exists() -> bool: + cache_path = fci.getUserCachePath() + am_path = os.path.join(cache_path, "AddonManager") + return os.path.exists(am_path) + + +def _last_update_was_interrupted(reset_status: bool) -> bool: + flag_file = utils.get_cache_file_name("CACHE_UPDATE_INTERRUPTED") + if os.path.exists(flag_file): + if reset_status: + os.remove(flag_file) + fci.Console.PrintMessage( + translate( + "AddonsInstaller", + "Previous cache process was interrupted, restarting...\n", + ) + ) + return True + + +def _custom_repo_list_changed() -> bool: + pref = fci.ParamGet("User parameter:BaseApp/Preferences/Addons") + stored_hash = pref.GetString("CustomRepoHash", "") + custom_repos = pref.GetString("CustomRepositories", "") + if custom_repos: + hasher = hashlib.sha1() + hasher.update(custom_repos.encode("utf-8")) + new_hash = hasher.hexdigest() + else: + new_hash = "" + if new_hash != stored_hash: + pref.SetString("CustomRepoHash", new_hash) + fci.Console.PrintMessage( + translate( + "AddonsInstaller", + "Custom repo list changed, forcing recache...\n", + ) + ) + return True + return False diff --git a/src/Mod/AddonManager/addonmanager_connection_checker.py b/src/Mod/AddonManager/addonmanager_connection_checker.py index ecfb05b57a..76cf14a574 100644 --- a/src/Mod/AddonManager/addonmanager_connection_checker.py +++ b/src/Mod/AddonManager/addonmanager_connection_checker.py @@ -69,9 +69,7 @@ class ConnectionCheckerGUI(QtCore.QObject): translate("AddonsInstaller", "Checking for connection to GitHub..."), QtWidgets.QMessageBox.Cancel, ) - self.connection_check_message.buttonClicked.connect( - self.cancel_network_check - ) + self.connection_check_message.buttonClicked.connect(self.cancel_network_check) self.connection_check_message.show() def cancel_network_check(self, _): diff --git a/src/Mod/AddonManager/addonmanager_dependency_installer.py b/src/Mod/AddonManager/addonmanager_dependency_installer.py index f066d527f4..ccff230cf1 100644 --- a/src/Mod/AddonManager/addonmanager_dependency_installer.py +++ b/src/Mod/AddonManager/addonmanager_dependency_installer.py @@ -151,9 +151,7 @@ class DependencyInstaller(QObject): fci.Console.PrintMessage(proc.stdout + "\n") except subprocess.CalledProcessError as e: fci.Console.PrintError( - translate( - "AddonsInstaller", "Installation of optional package failed" - ) + translate("AddonsInstaller", "Installation of optional package failed") + ":\n" + str(e) + "\n" @@ -182,23 +180,19 @@ class DependencyInstaller(QObject): if is_interruption_requested(): return fci.Console.PrintMessage( - translate( - "AddonsInstaller", "Installing required dependency {}" - ).format(addon.name) + translate("AddonsInstaller", "Installing required dependency {}").format(addon.name) + "\n" ) if addon.macro is None: installer = AddonInstaller(addon) else: installer = MacroInstaller(addon) - result = ( - installer.run() - ) # Run in this thread, which should be off the GUI thread + result = installer.run() # Run in this thread, which should be off the GUI thread if not result: self.failure.emit( - translate( - "AddonsInstaller", "Installation of Addon {} failed" - ).format(addon.name), + translate("AddonsInstaller", "Installation of Addon {} failed").format( + addon.name + ), "", ) return diff --git a/src/Mod/AddonManager/addonmanager_devmode.py b/src/Mod/AddonManager/addonmanager_devmode.py index f57cc2efb0..87aae2d00b 100644 --- a/src/Mod/AddonManager/addonmanager_devmode.py +++ b/src/Mod/AddonManager/addonmanager_devmode.py @@ -70,9 +70,7 @@ class AddonGitInterface: try: AddonGitInterface.git_manager = GitManager() except NoGitFound: - FreeCAD.Console.PrintLog( - "No git found, Addon Manager Developer Mode disabled." - ) + FreeCAD.Console.PrintLog("No git found, Addon Manager Developer Mode disabled.") return self.path = path @@ -127,12 +125,8 @@ class DeveloperMode: small_size_policy.setHorizontalStretch(1) self.people_table.widget.setSizePolicy(large_size_policy) self.licenses_table.widget.setSizePolicy(small_size_policy) - self.dialog.peopleAndLicenseshorizontalLayout.addWidget( - self.people_table.widget - ) - self.dialog.peopleAndLicenseshorizontalLayout.addWidget( - self.licenses_table.widget - ) + self.dialog.peopleAndLicenseshorizontalLayout.addWidget(self.people_table.widget) + self.dialog.peopleAndLicenseshorizontalLayout.addWidget(self.licenses_table.widget) self.pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons") self.current_mod: str = "" self.git_interface = None @@ -267,27 +261,17 @@ class DeveloperMode: if item.Name: info.append(translate("AddonsInstaller", "Name") + ": " + item.Name) if item.Classname: - info.append( - translate("AddonsInstaller", "Class") + ": " + item.Classname - ) + info.append(translate("AddonsInstaller", "Class") + ": " + item.Classname) if item.Description: info.append( - translate("AddonsInstaller", "Description") - + ": " - + item.Description + translate("AddonsInstaller", "Description") + ": " + item.Description ) if item.Subdirectory: info.append( - translate("AddonsInstaller", "Subdirectory") - + ": " - + item.Subdirectory + translate("AddonsInstaller", "Subdirectory") + ": " + item.Subdirectory ) if item.File: - info.append( - translate("AddonsInstaller", "Files") - + ": " - + ", ".join(item.File) - ) + info.append(translate("AddonsInstaller", "Files") + ": " + ", ".join(item.File)) contents_string += ", ".join(info) item = QListWidgetItem(contents_string) @@ -357,24 +341,14 @@ class DeveloperMode: def _setup_dialog_signals(self): """Set up the signal and slot connections for the main dialog.""" - self.dialog.addonPathBrowseButton.clicked.connect( - self._addon_browse_button_clicked - ) - self.dialog.pathToAddonComboBox.editTextChanged.connect( - self._addon_combo_text_changed - ) - self.dialog.detectMinPythonButton.clicked.connect( - self._detect_min_python_clicked - ) + self.dialog.addonPathBrowseButton.clicked.connect(self._addon_browse_button_clicked) + self.dialog.pathToAddonComboBox.editTextChanged.connect(self._addon_combo_text_changed) + self.dialog.detectMinPythonButton.clicked.connect(self._detect_min_python_clicked) self.dialog.iconBrowseButton.clicked.connect(self._browse_for_icon_clicked) self.dialog.addContentItemToolButton.clicked.connect(self._add_content_clicked) - self.dialog.removeContentItemToolButton.clicked.connect( - self._remove_content_clicked - ) - self.dialog.contentsListWidget.itemSelectionChanged.connect( - self._content_selection_changed - ) + self.dialog.removeContentItemToolButton.clicked.connect(self._remove_content_clicked) + self.dialog.contentsListWidget.itemSelectionChanged.connect(self._content_selection_changed) self.dialog.contentsListWidget.itemDoubleClicked.connect(self._edit_content) self.dialog.versionToTodayButton.clicked.connect(self._set_to_today_clicked) @@ -393,17 +367,13 @@ class DeveloperMode: self.metadata = FreeCAD.Metadata() self.metadata.Name = self.dialog.displayNameLineEdit.text() - self.metadata.Description = ( - self.dialog.descriptionTextEdit.document().toPlainText() - ) + self.metadata.Description = self.dialog.descriptionTextEdit.document().toPlainText() self.metadata.Version = self.dialog.versionLineEdit.text() self.metadata.Icon = self.dialog.iconPathLineEdit.text() urls = [] if self.dialog.websiteURLLineEdit.text(): - urls.append( - {"location": self.dialog.websiteURLLineEdit.text(), "type": "website"} - ) + urls.append({"location": self.dialog.websiteURLLineEdit.text(), "type": "website"}) if self.dialog.repositoryURLLineEdit.text(): urls.append( { @@ -420,9 +390,7 @@ class DeveloperMode: } ) if self.dialog.readmeURLLineEdit.text(): - urls.append( - {"location": self.dialog.readmeURLLineEdit.text(), "type": "readme"} - ) + urls.append({"location": self.dialog.readmeURLLineEdit.text(), "type": "readme"}) if self.dialog.documentationURLLineEdit.text(): urls.append( { @@ -594,9 +562,7 @@ class DeveloperMode: ) return FreeCAD.Console.PrintMessage( - translate( - "AddonsInstaller", "Scanning Addon for Python version compatibility" - ) + translate("AddonsInstaller", "Scanning Addon for Python version compatibility") + "...\n" ) # pylint: disable=import-outside-toplevel @@ -608,9 +574,7 @@ class DeveloperMode: if filename.endswith(".py"): with open(os.path.join(dir_path, filename), encoding="utf-8") as f: contents = f.read() - version_strings = vermin.version_strings( - vermin.detect(contents) - ) + version_strings = vermin.version_strings(vermin.detect(contents)) version = version_strings.split(",") if len(version) >= 2: # Only care about Py3, and only if there is a dot in the version: @@ -622,9 +586,7 @@ class DeveloperMode: FreeCAD.Console.PrintLog( f"Detected Python 3.{minor} required by {filename}\n" ) - required_minor_version = max( - required_minor_version, minor - ) + required_minor_version = max(required_minor_version, minor) self.dialog.minPythonLineEdit.setText(f"3.{required_minor_version}") QMessageBox.information( self.dialog, @@ -654,13 +616,10 @@ class DeveloperMode: if response == QMessageBox.Cancel: return False FreeCAD.Console.PrintMessage( - translate("AddonsInstaller", "Attempting to install Vermin from PyPi") - + "...\n" + translate("AddonsInstaller", "Attempting to install Vermin from PyPi") + "...\n" ) python_exe = utils.get_python_exe() - vendor_path = os.path.join( - FreeCAD.getUserAppDataDir(), "AdditionalPythonPackages" - ) + vendor_path = os.path.join(FreeCAD.getUserAppDataDir(), "AdditionalPythonPackages") if not os.path.exists(vendor_path): os.makedirs(vendor_path) diff --git a/src/Mod/AddonManager/addonmanager_devmode_add_content.py b/src/Mod/AddonManager/addonmanager_devmode_add_content.py index 2d74b7a6e5..c5994ccbab 100644 --- a/src/Mod/AddonManager/addonmanager_devmode_add_content.py +++ b/src/Mod/AddonManager/addonmanager_devmode_add_content.py @@ -80,32 +80,22 @@ class AddContent: small_size_policy.setHorizontalStretch(1) self.people_table.widget.setSizePolicy(large_size_policy) self.licenses_table.widget.setSizePolicy(small_size_policy) - self.dialog.peopleAndLicenseshorizontalLayout.addWidget( - self.people_table.widget - ) - self.dialog.peopleAndLicenseshorizontalLayout.addWidget( - self.licenses_table.widget - ) + self.dialog.peopleAndLicenseshorizontalLayout.addWidget(self.people_table.widget) + self.dialog.peopleAndLicenseshorizontalLayout.addWidget(self.licenses_table.widget) self.toplevel_metadata = toplevel_metadata self.metadata = None self.path_to_addon = path_to_addon.replace("/", os.path.sep) if self.path_to_addon[-1] != os.path.sep: - self.path_to_addon += ( - os.path.sep - ) # Make sure the path ends with a separator + self.path_to_addon += os.path.sep # Make sure the path ends with a separator self.dialog.iconLabel.hide() # Until we have an icon to display self.dialog.iconBrowseButton.clicked.connect(self._browse_for_icon_clicked) - self.dialog.subdirectoryBrowseButton.clicked.connect( - self._browse_for_subdirectory_clicked - ) + self.dialog.subdirectoryBrowseButton.clicked.connect(self._browse_for_subdirectory_clicked) self.dialog.tagsButton.clicked.connect(self._tags_clicked) self.dialog.dependenciesButton.clicked.connect(self._dependencies_clicked) - self.dialog.freecadVersionsButton.clicked.connect( - self._freecad_versions_clicked - ) + self.dialog.freecadVersionsButton.clicked.connect(self._freecad_versions_clicked) self.dialog.versionLineEdit.setValidator(VersionValidator()) self.dialog.prefPackNameLineEdit.setValidator(NameValidator()) @@ -134,9 +124,7 @@ class AddContent: if index == -1: index = 2 # Workbench FreeCAD.Console.PrintWarning( - translate("AddonsInstaller", "Unrecognized content kind '{}'").format( - content_kind - ) + translate("AddonsInstaller", "Unrecognized content kind '{}'").format(content_kind) + "\n" ) self.dialog.addonKindComboBox.setCurrentIndex(index) @@ -189,9 +177,7 @@ class AddContent: def _set_icon(self, icon_relative_path): """Load the icon and display it, and its path, in the dialog.""" - icon_path = os.path.join( - self.path_to_addon, icon_relative_path.replace("/", os.path.sep) - ) + icon_path = os.path.join(self.path_to_addon, icon_relative_path.replace("/", os.path.sep)) if os.path.isfile(icon_path): icon_data = QIcon(icon_path) if not icon_data.isNull(): @@ -199,10 +185,7 @@ class AddContent: self.dialog.iconLabel.show() else: FreeCAD.Console.PrintError( - translate("AddonsInstaller", "Unable to locate icon at {}").format( - icon_path - ) - + "\n" + translate("AddonsInstaller", "Unable to locate icon at {}").format(icon_path) + "\n" ) self.dialog.iconLineEdit.setText(icon_relative_path) @@ -234,9 +217,7 @@ class AddContent: return current_data, self.metadata # Otherwise, process the rest of the metadata (display name is already done) - self.metadata.Description = ( - self.dialog.descriptionTextEdit.document().toPlainText() - ) + self.metadata.Description = self.dialog.descriptionTextEdit.document().toPlainText() self.metadata.Version = self.dialog.versionLineEdit.text() maintainers = [] @@ -407,16 +388,10 @@ class EditDependencies: self.dialog.removeDependencyToolButton.setIcon( QIcon.fromTheme("remove", QIcon(":/icons/list-remove.svg")) ) - self.dialog.addDependencyToolButton.clicked.connect( - self._add_dependency_clicked - ) - self.dialog.removeDependencyToolButton.clicked.connect( - self._remove_dependency_clicked - ) + self.dialog.addDependencyToolButton.clicked.connect(self._add_dependency_clicked) + self.dialog.removeDependencyToolButton.clicked.connect(self._remove_dependency_clicked) self.dialog.tableWidget.itemDoubleClicked.connect(self._edit_dependency) - self.dialog.tableWidget.itemSelectionChanged.connect( - self._current_index_changed - ) + self.dialog.tableWidget.itemSelectionChanged.connect(self._current_index_changed) self.dialog.removeDependencyToolButton.setDisabled(True) self.metadata = None @@ -485,9 +460,7 @@ class EditDependencies: dep_type = self.dialog.tableWidget.item(row, 0).data(Qt.UserRole) dep_name = self.dialog.tableWidget.item(row, 1).text() dep_optional = bool(self.dialog.tableWidget.item(row, 2)) - new_dep_type, new_dep_name, new_dep_optional = dlg.exec( - dep_type, dep_name, dep_optional - ) + new_dep_type, new_dep_name, new_dep_optional = dlg.exec(dep_type, dep_name, dep_optional) if dep_type and dep_name: self.metadata.removeDepend( {"package": dep_name, "type": dep_type, "optional": dep_optional} @@ -520,16 +493,10 @@ class EditDependency: self.dialog.typeComboBox.addItem( translate("AddonsInstaller", "Internal Workbench"), "workbench" ) - self.dialog.typeComboBox.addItem( - translate("AddonsInstaller", "External Addon"), "addon" - ) - self.dialog.typeComboBox.addItem( - translate("AddonsInstaller", "Python Package"), "python" - ) + self.dialog.typeComboBox.addItem(translate("AddonsInstaller", "External Addon"), "addon") + self.dialog.typeComboBox.addItem(translate("AddonsInstaller", "Python Package"), "python") - self.dialog.typeComboBox.currentIndexChanged.connect( - self._type_selection_changed - ) + self.dialog.typeComboBox.currentIndexChanged.connect(self._type_selection_changed) self.dialog.dependencyComboBox.currentIndexChanged.connect( self._dependency_selection_changed ) @@ -539,9 +506,7 @@ class EditDependency: self.dialog.layout().setSizeConstraint(QLayout.SetFixedSize) - def exec( - self, dep_type="", dep_name="", dep_optional=False - ) -> Tuple[str, str, bool]: + def exec(self, dep_type="", dep_name="", dep_optional=False) -> Tuple[str, str, bool]: """Execute the dialog, returning a tuple of the type of dependency (workbench, addon, or python), the name of the dependency, and a boolean indicating whether this is optional. """ @@ -590,12 +555,8 @@ class EditDependency: repo_dict[repo.display_name.lower()] = (repo.display_name, repo.name) sorted_keys = sorted(repo_dict) for item in sorted_keys: - self.dialog.dependencyComboBox.addItem( - repo_dict[item][0], repo_dict[item][1] - ) - self.dialog.dependencyComboBox.addItem( - translate("AddonsInstaller", "Other..."), "other" - ) + self.dialog.dependencyComboBox.addItem(repo_dict[item][0], repo_dict[item][1]) + self.dialog.dependencyComboBox.addItem(translate("AddonsInstaller", "Other..."), "other") def _populate_allowed_python_packages(self): """Add all allowed python packages to the list""" @@ -606,9 +567,7 @@ class EditDependency: packages = sorted(AM_INSTANCE.allowed_packages) for package in packages: self.dialog.dependencyComboBox.addItem(package, package) - self.dialog.dependencyComboBox.addItem( - translate("AddonsInstaller", "Other..."), "other" - ) + self.dialog.dependencyComboBox.addItem(translate("AddonsInstaller", "Other..."), "other") def _type_selection_changed(self, _): """Callback: The type of dependency has been changed""" @@ -637,9 +596,7 @@ class EditFreeCADVersions: def __init__(self): self.dialog = FreeCADGui.PySideUic.loadUi( - os.path.join( - os.path.dirname(__file__), "developer_mode_freecad_versions.ui" - ) + os.path.join(os.path.dirname(__file__), "developer_mode_freecad_versions.ui") ) def exec(self, metadata: FreeCAD.Metadata): @@ -666,9 +623,7 @@ class EditAdvancedVersions: def __init__(self): self.dialog = FreeCADGui.PySideUic.loadUi( - os.path.join( - os.path.dirname(__file__), "developer_mode_advanced_freecad_versions.ui" - ) + os.path.join(os.path.dirname(__file__), "developer_mode_advanced_freecad_versions.ui") ) def exec(self): diff --git a/src/Mod/AddonManager/addonmanager_devmode_license_selector.py b/src/Mod/AddonManager/addonmanager_devmode_license_selector.py index 7b20a4cdc8..3aa6da6973 100644 --- a/src/Mod/AddonManager/addonmanager_devmode_license_selector.py +++ b/src/Mod/AddonManager/addonmanager_devmode_license_selector.py @@ -117,9 +117,7 @@ class LicenseSelector: ) self.pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons") for short_code, details in LicenseSelector.licenses.items(): - self.dialog.comboBox.addItem( - f"{short_code}: {details[0]}", userData=short_code - ) + self.dialog.comboBox.addItem(f"{short_code}: {details[0]}", userData=short_code) self.dialog.comboBox.addItem(self.other_label) self.dialog.otherLineEdit.hide() self.dialog.otherLabel.hide() @@ -134,9 +132,7 @@ class LicenseSelector: short_code = self.pref.GetString("devModeLastSelectedLicense", "LGPLv2.1") self.set_license(short_code) - def exec( - self, short_code: str = None, license_path: str = "" - ) -> Optional[Tuple[str, str]]: + def exec(self, short_code: str = None, license_path: str = "") -> Optional[Tuple[str, str]]: """The main method for executing this dialog, as a modal that returns a tuple of the license's "short code" and optionally the path to the license file. Returns a tuple of None,None if the user cancels the operation.""" @@ -252,10 +248,7 @@ class LicenseSelector: string_data = str(byte_data, encoding="utf-8") - if ( - "<%%YEAR%%>" in string_data - or "<%%COPYRIGHT HOLDER%%>" in string_data - ): + if "<%%YEAR%%>" in string_data or "<%%COPYRIGHT HOLDER%%>" in string_data: info_dlg = FreeCADGui.PySideUic.loadUi( os.path.join( os.path.dirname(__file__), @@ -279,6 +272,4 @@ class LicenseSelector: with open(license_path, "w", encoding="utf-8") as f: f.write(string_data) else: - FreeCAD.Console.PrintError( - f"Cannot create license file of type {short_code}\n" - ) + FreeCAD.Console.PrintError(f"Cannot create license file of type {short_code}\n") diff --git a/src/Mod/AddonManager/addonmanager_devmode_licenses_table.py b/src/Mod/AddonManager/addonmanager_devmode_licenses_table.py index a30ee37028..1d52568471 100644 --- a/src/Mod/AddonManager/addonmanager_devmode_licenses_table.py +++ b/src/Mod/AddonManager/addonmanager_devmode_licenses_table.py @@ -46,9 +46,7 @@ class LicensesTable: os.path.join(os.path.dirname(__file__), "developer_mode_licenses_table.ui") ) - self.widget.addButton.setIcon( - QIcon.fromTheme("add", QIcon(":/icons/list-add.svg")) - ) + self.widget.addButton.setIcon(QIcon.fromTheme("add", QIcon(":/icons/list-add.svg"))) self.widget.removeButton.setIcon( QIcon.fromTheme("remove", QIcon(":/icons/list-remove.svg")) ) diff --git a/src/Mod/AddonManager/addonmanager_devmode_metadata_checker.py b/src/Mod/AddonManager/addonmanager_devmode_metadata_checker.py index 62fec3dabb..6f58721687 100644 --- a/src/Mod/AddonManager/addonmanager_devmode_metadata_checker.py +++ b/src/Mod/AddonManager/addonmanager_devmode_metadata_checker.py @@ -75,9 +75,7 @@ class MetadataValidators: errors.extend(self.validate_content(addon)) if len(errors) > 0: - FreeCAD.Console.PrintError( - f"Errors found in package.xml file for '{addon.name}'\n" - ) + FreeCAD.Console.PrintError(f"Errors found in package.xml file for '{addon.name}'\n") for error in errors: FreeCAD.Console.PrintError(f" * {error}\n") @@ -111,17 +109,12 @@ class MetadataValidators: """Check for the presence of the required top-level elements""" errors = [] if not addon.metadata.name or len(addon.metadata.name) == 0: - errors.append( - "No top-level element found, or element is empty" - ) + errors.append("No top-level element found, or element is empty") if not addon.metadata.version: - errors.append( - "No top-level element found, or element is invalid" - ) + errors.append("No top-level element found, or element is invalid") if not addon.metadata.description or len(addon.metadata.description) == 0: errors.append( - "No top-level element found, or element " - "is invalid" + "No top-level element found, or element " "is invalid" ) maintainers = addon.metadata.maintainer @@ -129,9 +122,7 @@ class MetadataValidators: errors.append("No top-level found, at least one is required") for maintainer in maintainers: if len(maintainer.email) == 0: - errors.append( - f"No email address specified for maintainer '{maintainer.name}'" - ) + errors.append(f"No email address specified for maintainer '{maintainer.name}'") licenses = addon.metadata.license if len(licenses) == 0: @@ -146,9 +137,7 @@ class MetadataValidators: """Check the URLs provided by the addon""" errors = [] if len(urls) == 0: - errors.append( - "No elements found, at least a repo url must be provided" - ) + errors.append("No elements found, at least a repo url must be provided") else: found_repo = False found_readme = False @@ -156,17 +145,13 @@ class MetadataValidators: if url["type"] == "repository": found_repo = True if len(url["branch"]) == 0: - errors.append( - " element is missing the 'branch' attribute" - ) + errors.append(" element is missing the 'branch' attribute") elif url["type"] == "readme": found_readme = True location = url["location"] p = NetworkManager.AM_NETWORK_MANAGER.blocking_get(location) if not p: - errors.append( - f"Could not access specified readme at {location}" - ) + errors.append(f"Could not access specified readme at {location}") else: p = p.data().decode("utf8") if "" in p: @@ -179,9 +164,7 @@ class MetadataValidators: if not found_repo: errors.append("No repo url specified") if not found_readme: - errors.append( - "No readme url specified (not required, but highly recommended)" - ) + errors.append("No readme url specified (not required, but highly recommended)") return errors @staticmethod diff --git a/src/Mod/AddonManager/addonmanager_devmode_people_table.py b/src/Mod/AddonManager/addonmanager_devmode_people_table.py index cdd661362f..e6caca269a 100644 --- a/src/Mod/AddonManager/addonmanager_devmode_people_table.py +++ b/src/Mod/AddonManager/addonmanager_devmode_people_table.py @@ -47,9 +47,7 @@ class PeopleTable: os.path.join(os.path.dirname(__file__), "developer_mode_people_table.ui") ) - self.widget.addButton.setIcon( - QIcon.fromTheme("add", QIcon(":/icons/list-add.svg")) - ) + self.widget.addButton.setIcon(QIcon.fromTheme("add", QIcon(":/icons/list-add.svg"))) self.widget.removeButton.setIcon( QIcon.fromTheme("remove", QIcon(":/icons/list-remove.svg")) ) diff --git a/src/Mod/AddonManager/addonmanager_devmode_person_editor.py b/src/Mod/AddonManager/addonmanager_devmode_person_editor.py index 1086a7767f..4c1fbda24c 100644 --- a/src/Mod/AddonManager/addonmanager_devmode_person_editor.py +++ b/src/Mod/AddonManager/addonmanager_devmode_person_editor.py @@ -46,9 +46,7 @@ class PersonEditor: self.dialog.comboBox.addItem( translate("AddonsInstaller", "Maintainer"), userData="maintainer" ) - self.dialog.comboBox.addItem( - translate("AddonsInstaller", "Author"), userData="author" - ) + self.dialog.comboBox.addItem(translate("AddonsInstaller", "Author"), userData="author") def exec(self) -> Tuple[str, str, str]: """Run the dialog, and return a tuple of the person's record type, their name, and their @@ -63,15 +61,11 @@ class PersonEditor: ) return "", "", "" - def setup( - self, person_type: str = "maintainer", name: str = "", email: str = "" - ) -> None: + def setup(self, person_type: str = "maintainer", name: str = "", email: str = "") -> None: """Configure the dialog""" index = self.dialog.comboBox.findData(person_type) if index == -1: - FreeCAD.Console.PrintWarning( - f"Internal Error: unrecognized person type {person_type}" - ) + FreeCAD.Console.PrintWarning(f"Internal Error: unrecognized person type {person_type}") index = 0 self.dialog.comboBox.setCurrentIndex(index) self.dialog.nameLineEdit.setText(name) diff --git a/src/Mod/AddonManager/addonmanager_devmode_validators.py b/src/Mod/AddonManager/addonmanager_devmode_validators.py index baa5168944..000f2aaefc 100644 --- a/src/Mod/AddonManager/addonmanager_devmode_validators.py +++ b/src/Mod/AddonManager/addonmanager_devmode_validators.py @@ -87,9 +87,7 @@ class PythonIdentifierValidator(QValidator): return QValidator.Invalid # Includes an illegal character of some sort if keyword.iskeyword(value): - return ( - QValidator.Intermediate - ) # They can keep typing and it might become valid + return QValidator.Intermediate # They can keep typing and it might become valid return QValidator.Acceptable diff --git a/src/Mod/AddonManager/addonmanager_firstrun.py b/src/Mod/AddonManager/addonmanager_firstrun.py index 858ed90751..eeaa4bc6c6 100644 --- a/src/Mod/AddonManager/addonmanager_firstrun.py +++ b/src/Mod/AddonManager/addonmanager_firstrun.py @@ -84,9 +84,7 @@ class FirstRunDialog: if warning_dialog.exec() == QtWidgets.QDialog.Accepted: self.readWarning = True self.pref.SetBool("readWarning2022", True) - self.pref.SetBool( - "AutoCheck", warning_dialog.checkBoxAutoCheck.isChecked() - ) + self.pref.SetBool("AutoCheck", warning_dialog.checkBoxAutoCheck.isChecked()) self.pref.SetBool( "DownloadMacros", warning_dialog.checkBoxDownloadMacroMetadata.isChecked(), diff --git a/src/Mod/AddonManager/addonmanager_git.py b/src/Mod/AddonManager/addonmanager_git.py index bd89f9f292..9d44388948 100644 --- a/src/Mod/AddonManager/addonmanager_git.py +++ b/src/Mod/AddonManager/addonmanager_git.py @@ -107,9 +107,7 @@ class GitManager: + "...\n" ) remote = self.get_remote(local_path) - with open( - os.path.join(local_path, "ADDON_DISABLED"), "w", encoding="utf-8" - ) as f: + with open(os.path.join(local_path, "ADDON_DISABLED"), "w", encoding="utf-8") as f: f.write( "This is a backup of an addon that failed to update cleanly so " "was re-cloned. It was disabled by the Addon Manager's git update " @@ -185,9 +183,7 @@ class GitManager: # branch = self._synchronous_call_git(["branch", "--show-current"]).strip() # This is more universal (albeit more opaque to the reader): - branch = self._synchronous_call_git( - ["rev-parse", "--abbrev-ref", "HEAD"] - ).strip() + branch = self._synchronous_call_git(["rev-parse", "--abbrev-ref", "HEAD"]).strip() except GitFailed as e: os.chdir(old_dir) raise e @@ -213,9 +209,9 @@ class GitManager: self.clone(remote, local_path) except GitFailed as e: fci.Console.PrintError( - translate( - "AddonsInstaller", "Failed to clone {} into {} using git" - ).format(remote, local_path) + translate("AddonsInstaller", "Failed to clone {} into {} using git").format( + remote, local_path + ) ) os.chdir(original_cwd) raise e @@ -242,9 +238,7 @@ class GitManager: if len(segments) == 3: result = segments[1] break - fci.Console.PrintWarning( - "Error parsing the results from git remote -v show:\n" - ) + fci.Console.PrintWarning("Error parsing the results from git remote -v show:\n") fci.Console.PrintWarning(line + "\n") os.chdir(old_dir) return result @@ -254,9 +248,7 @@ class GitManager: old_dir = os.getcwd() os.chdir(local_path) try: - stdout = self._synchronous_call_git( - ["branch", "-a", "--format=%(refname:lstrip=2)"] - ) + stdout = self._synchronous_call_git(["branch", "-a", "--format=%(refname:lstrip=2)"]) except GitFailed as e: os.chdir(old_dir) raise e @@ -273,12 +265,8 @@ class GitManager: """ old_dir = os.getcwd() os.chdir(local_path) - authors = self._synchronous_call_git(["log", f"-{n}", "--format=%cN"]).split( - "\n" - ) - emails = self._synchronous_call_git(["log", f"-{n}", "--format=%cE"]).split( - "\n" - ) + authors = self._synchronous_call_git(["log", f"-{n}", "--format=%cN"]).split("\n") + emails = self._synchronous_call_git(["log", f"-{n}", "--format=%cE"]).split("\n") os.chdir(old_dir) result_dict = {} diff --git a/src/Mod/AddonManager/addonmanager_macro.py b/src/Mod/AddonManager/addonmanager_macro.py index d7bdbdc20d..c133a0a9b3 100644 --- a/src/Mod/AddonManager/addonmanager_macro.py +++ b/src/Mod/AddonManager/addonmanager_macro.py @@ -116,9 +116,7 @@ class Macro: return False return os.path.exists( os.path.join(fci.DataPaths().macro_dir, self.filename) - ) or os.path.exists( - os.path.join(fci.DataPaths().macro_dir, "Macro_" + self.filename) - ) + ) or os.path.exists(os.path.join(fci.DataPaths().macro_dir, "Macro_" + self.filename)) def fill_details_from_file(self, filename: str) -> None: """Opens the given Macro file and parses it for its metadata""" @@ -160,8 +158,7 @@ class Macro: code = self._read_code_from_wiki(p) if not code: self._console.PrintWarning( - translate("AddonsInstaller", "Unable to fetch the code of this macro.") - + "\n" + translate("AddonsInstaller", "Unable to fetch the code of this macro.") + "\n" ) return @@ -312,9 +309,7 @@ class Macro: f.write(self.xpm) if self.icon: if os.path.isabs(self.icon): - dst_file = os.path.normpath( - os.path.join(macro_dir, os.path.basename(self.icon)) - ) + dst_file = os.path.normpath(os.path.join(macro_dir, os.path.basename(self.icon))) try: shutil.copy(self.icon, dst_file) except OSError: @@ -340,9 +335,7 @@ class Macro: return False if os.path.isabs(other_file): src_file = other_file - dst_file = os.path.normpath( - os.path.join(macro_dir, os.path.basename(other_file)) - ) + dst_file = os.path.normpath(os.path.join(macro_dir, os.path.basename(other_file))) else: src_file = os.path.normpath(os.path.join(base_dir, other_file)) dst_file = os.path.normpath(os.path.join(macro_dir, other_file)) @@ -409,9 +402,7 @@ class Macro: icon_regex = re.compile(r'.*img.*?src="(.*?)"', re.IGNORECASE) if wiki_icon.startswith("http"): # It's a File: wiki link. We can load THAT page and get the image from it... - self._console.PrintLog( - f"Found a File: link for macro {self.name} -- {wiki_icon}\n" - ) + self._console.PrintLog(f"Found a File: link for macro {self.name} -- {wiki_icon}\n") p = Macro.blocking_get(wiki_icon) if p: p = p.decode("utf8") diff --git a/src/Mod/AddonManager/addonmanager_macro_parser.py b/src/Mod/AddonManager/addonmanager_macro_parser.py index 947fe2644f..86d829bbe7 100644 --- a/src/Mod/AddonManager/addonmanager_macro_parser.py +++ b/src/Mod/AddonManager/addonmanager_macro_parser.py @@ -68,9 +68,7 @@ class MacroParser: } self.remaining_item_map = {} self.console = None if FreeCAD is None else FreeCAD.Console - self.current_thread = ( - DummyThread() if QtCore is None else QtCore.QThread.currentThread() - ) + self.current_thread = DummyThread() if QtCore is None else QtCore.QThread.currentThread() if code: self.fill_details_from_code(code) @@ -177,9 +175,7 @@ class MacroParser: stripped_of_quotes = None if line.startswith('"""') and line.endswith('"""'): stripped_of_quotes = line[3:-3] - elif (line[0] == '"' and line[-1] == '"') or ( - line[0] == "'" and line[-1] == "'" - ): + elif (line[0] == '"' and line[-1] == '"') or (line[0] == "'" and line[-1] == "'"): stripped_of_quotes = line[1:-1] return stripped_of_quotes @@ -197,9 +193,7 @@ class MacroParser: def _cleanup_comment(self): """Remove HTML from the comment line, and truncate it at 512 characters.""" - self.parse_results["comment"] = re.sub( - "<.*?>", "", self.parse_results["comment"] - ) + self.parse_results["comment"] = re.sub("<.*?>", "", self.parse_results["comment"]) if len(self.parse_results["comment"]) > 512: self.parse_results["comment"] = self.parse_results["comment"][:511] + "…" diff --git a/src/Mod/AddonManager/addonmanager_uninstaller.py b/src/Mod/AddonManager/addonmanager_uninstaller.py index 94082753a5..b83c8085f2 100644 --- a/src/Mod/AddonManager/addonmanager_uninstaller.py +++ b/src/Mod/AddonManager/addonmanager_uninstaller.py @@ -163,17 +163,13 @@ class AddonUninstaller(QObject): lines = f.readlines() for line in lines: stripped = line.strip() - if ( - len(stripped) > 0 - and stripped[0] != "#" - and os.path.exists(stripped) - ): + if len(stripped) > 0 and stripped[0] != "#" and os.path.exists(stripped): try: os.unlink(stripped) fci.Console.PrintMessage( - translate( - "AddonsInstaller", "Removed extra installed file {}" - ).format(stripped) + translate("AddonsInstaller", "Removed extra installed file {}").format( + stripped + ) + "\n" ) except FileNotFoundError: @@ -266,9 +262,7 @@ class MacroUninstaller(QObject): if self.addon_to_remove.macro.icon: files_to_remove.append(self.addon_to_remove.macro.icon) if self.addon_to_remove.macro.xpm: - files_to_remove.append( - self.addon_to_remove.macro.name.replace(" ", "_") + "_icon.xpm" - ) + files_to_remove.append(self.addon_to_remove.macro.name.replace(" ", "_") + "_icon.xpm") for f in self.addon_to_remove.macro.other_files: files_to_remove.append(f) return files_to_remove diff --git a/src/Mod/AddonManager/addonmanager_uninstaller_gui.py b/src/Mod/AddonManager/addonmanager_uninstaller_gui.py index aea3fc6b4c..86f6b9a942 100644 --- a/src/Mod/AddonManager/addonmanager_uninstaller_gui.py +++ b/src/Mod/AddonManager/addonmanager_uninstaller_gui.py @@ -44,10 +44,7 @@ class AddonUninstallerGUI(QtCore.QObject): def __init__(self, addon_to_remove): super().__init__() self.addon_to_remove = addon_to_remove - if ( - hasattr(self.addon_to_remove, "macro") - and self.addon_to_remove.macro is not None - ): + if hasattr(self.addon_to_remove, "macro") and self.addon_to_remove.macro is not None: self.uninstaller = MacroUninstaller(self.addon_to_remove) else: self.uninstaller = AddonUninstaller(self.addon_to_remove) @@ -61,9 +58,7 @@ class AddonUninstallerGUI(QtCore.QObject): self.dialog_timer = QtCore.QTimer() self.dialog_timer.timeout.connect(self._show_progress_dialog) self.dialog_timer.setSingleShot(True) - self.dialog_timer.setInterval( - 1000 - ) # Can override from external (e.g. testing) code + self.dialog_timer.setInterval(1000) # Can override from external (e.g. testing) code def run(self): """Begin the user interaction: asynchronous, only blocks while showing the initial modal @@ -82,9 +77,9 @@ class AddonUninstallerGUI(QtCore.QObject): confirm = QtWidgets.QMessageBox.question( utils.get_main_am_window(), translate("AddonsInstaller", "Confirm remove"), - translate( - "AddonsInstaller", "Are you sure you want to uninstall {}?" - ).format(self.addon_to_remove.display_name), + translate("AddonsInstaller", "Are you sure you want to uninstall {}?").format( + self.addon_to_remove.display_name + ), QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.Cancel, ) return confirm == QtWidgets.QMessageBox.Yes @@ -93,9 +88,7 @@ class AddonUninstallerGUI(QtCore.QObject): self.progress_dialog = QtWidgets.QMessageBox( QtWidgets.QMessageBox.NoIcon, translate("AddonsInstaller", "Removing Addon"), - translate("AddonsInstaller", "Removing {}").format( - self.addon_to_remove.display_name - ) + translate("AddonsInstaller", "Removing {}").format(self.addon_to_remove.display_name) + "...", QtWidgets.QMessageBox.Cancel, parent=utils.get_main_am_window(), @@ -119,9 +112,7 @@ class AddonUninstallerGUI(QtCore.QObject): QtWidgets.QMessageBox.information( utils.get_main_am_window(), translate("AddonsInstaller", "Uninstall complete"), - translate("AddonInstaller", "Finished removing {}").format( - addon.display_name - ), + translate("AddonInstaller", "Finished removing {}").format(addon.display_name), ) self._finalize() @@ -133,9 +124,7 @@ class AddonUninstallerGUI(QtCore.QObject): QtWidgets.QMessageBox.critical( utils.get_main_am_window(), translate("AddonsInstaller", "Uninstall failed"), - translate("AddonInstaller", "Failed to remove some files") - + ":\n" - + message, + translate("AddonInstaller", "Failed to remove some files") + ":\n" + message, ) self._finalize() diff --git a/src/Mod/AddonManager/addonmanager_update_all_gui.py b/src/Mod/AddonManager/addonmanager_update_all_gui.py index 3c2b09ffc8..49f06a7159 100644 --- a/src/Mod/AddonManager/addonmanager_update_all_gui.py +++ b/src/Mod/AddonManager/addonmanager_update_all_gui.py @@ -130,9 +130,7 @@ class UpdateAllGUI(QtCore.QObject): new_row = self.dialog.tableWidget.rowCount() self.dialog.tableWidget.setColumnCount(2) self.dialog.tableWidget.setRowCount(new_row + 1) - self.dialog.tableWidget.setItem( - new_row, 0, QtWidgets.QTableWidgetItem(addon.display_name) - ) + self.dialog.tableWidget.setItem(new_row, 0, QtWidgets.QTableWidgetItem(addon.display_name)) self.dialog.tableWidget.setItem(new_row, 1, QtWidgets.QTableWidgetItem("")) self.row_map[addon.name] = new_row @@ -144,9 +142,7 @@ class UpdateAllGUI(QtCore.QObject): """Grab the next addon in the list and start its updater.""" if self.addons_with_update: addon = self.addons_with_update.pop(0) - self.in_process_row = ( - self.row_map[addon.name] if addon.name in self.row_map else None - ) + self.in_process_row = self.row_map[addon.name] if addon.name in self.row_map else None self._update_addon_status(self.in_process_row, AddonStatus.INSTALLING) self.dialog.tableWidget.scrollToItem( self.dialog.tableWidget.item(self.in_process_row, 0) diff --git a/src/Mod/AddonManager/addonmanager_workers_installation.py b/src/Mod/AddonManager/addonmanager_workers_installation.py index 86ef41a30d..e1bcf1c226 100644 --- a/src/Mod/AddonManager/addonmanager_workers_installation.py +++ b/src/Mod/AddonManager/addonmanager_workers_installation.py @@ -76,9 +76,7 @@ class UpdateMetadataCacheWorker(QtCore.QThread): NetworkManager.AM_NETWORK_MANAGER.completed.connect(self.download_completed) self.requests_completed = 0 self.total_requests = 0 - self.store = os.path.join( - FreeCAD.getUserCachePath(), "AddonManager", "PackageMetadata" - ) + self.store = os.path.join(FreeCAD.getUserCachePath(), "AddonManager", "PackageMetadata") FreeCAD.Console.PrintLog(f"Storing Addon Manager cache data in {self.store}\n") self.updated_repos = set() @@ -122,9 +120,7 @@ class UpdateMetadataCacheWorker(QtCore.QThread): while self.requests: if current_thread.isInterruptionRequested(): - NetworkManager.AM_NETWORK_MANAGER.completed.disconnect( - self.download_completed - ) + NetworkManager.AM_NETWORK_MANAGER.completed.disconnect(self.download_completed) for request in self.requests: NetworkManager.AM_NETWORK_MANAGER.abort(request) return @@ -137,9 +133,7 @@ class UpdateMetadataCacheWorker(QtCore.QThread): for repo in self.updated_repos: self.package_updated.emit(repo) - def download_completed( - self, index: int, code: int, data: QtCore.QByteArray - ) -> None: + def download_completed(self, index: int, code: int, data: QtCore.QByteArray) -> None: """Callback for handling a completed metadata file download.""" if index in self.requests: self.requests_completed += 1 @@ -151,9 +145,7 @@ class UpdateMetadataCacheWorker(QtCore.QThread): self.process_package_xml(request[0], data) elif request[1] == UpdateMetadataCacheWorker.RequestType.METADATA_TXT: self.process_metadata_txt(request[0], data) - elif ( - request[1] == UpdateMetadataCacheWorker.RequestType.REQUIREMENTS_TXT - ): + elif request[1] == UpdateMetadataCacheWorker.RequestType.REQUIREMENTS_TXT: self.process_requirements_txt(request[0], data) elif request[1] == UpdateMetadataCacheWorker.RequestType.ICON: self.process_icon(request[0], data) @@ -171,9 +163,7 @@ class UpdateMetadataCacheWorker(QtCore.QThread): repo.set_metadata(metadata) FreeCAD.Console.PrintLog(f"Downloaded package.xml for {repo.name}\n") self.status_message.emit( - translate("AddonsInstaller", "Downloaded package.xml for {}").format( - repo.name - ) + translate("AddonsInstaller", "Downloaded package.xml for {}").format(repo.name) ) # Grab a new copy of the icon as well: we couldn't enqueue this earlier because @@ -220,9 +210,7 @@ class UpdateMetadataCacheWorker(QtCore.QThread): def process_metadata_txt(self, repo: Addon, data: QtCore.QByteArray): """Process the metadata.txt metadata file""" self.status_message.emit( - translate("AddonsInstaller", "Downloaded metadata.txt for {}").format( - repo.display_name - ) + translate("AddonsInstaller", "Downloaded metadata.txt for {}").format(repo.display_name) ) f = self._decode_data(data.data(), repo.name, "metadata.txt") @@ -283,9 +271,7 @@ class UpdateMetadataCacheWorker(QtCore.QThread): def process_icon(self, repo: Addon, data: QtCore.QByteArray): """Convert icon data into a valid icon file and store it""" self.status_message.emit( - translate("AddonsInstaller", "Downloaded icon for {}").format( - repo.display_name - ) + translate("AddonsInstaller", "Downloaded icon for {}").format(repo.display_name) ) cache_file = repo.get_cached_icon_filename() with open(cache_file, "wb") as icon_file: diff --git a/src/Mod/AddonManager/addonmanager_workers_startup.py b/src/Mod/AddonManager/addonmanager_workers_startup.py index d7b7cac30b..a6a8e986b1 100644 --- a/src/Mod/AddonManager/addonmanager_workers_startup.py +++ b/src/Mod/AddonManager/addonmanager_workers_startup.py @@ -162,9 +162,7 @@ class CreateAddonListWorker(QtCore.QThread): for addon in addon_list: if " " in addon: addon_and_branch = addon.split(" ") - custom_addons.append( - {"url": addon_and_branch[0], "branch": addon_and_branch[1]} - ) + custom_addons.append({"url": addon_and_branch[0], "branch": addon_and_branch[1]}) else: custom_addons.append({"url": addon, "branch": "master"}) for addon in custom_addons: @@ -178,9 +176,9 @@ class CreateAddonListWorker(QtCore.QThread): if name in self.package_names: # We already have something with this name, skip this one FreeCAD.Console.PrintWarning( - translate( - "AddonsInstaller", "WARNING: Duplicate addon {} ignored" - ).format(name) + translate("AddonsInstaller", "WARNING: Duplicate addon {} ignored").format( + name + ) ) continue FreeCAD.Console.PrintLog( @@ -251,9 +249,7 @@ class CreateAddonListWorker(QtCore.QThread): repo.obsolete = True self.addon_repo.emit(repo) - self.status_message.emit( - translate("AddonsInstaller", "Workbenches list was updated.") - ) + self.status_message.emit(translate("AddonsInstaller", "Workbenches list was updated.")) def _retrieve_macros_from_git(self): """Retrieve macros from FreeCAD-macros.git @@ -338,8 +334,7 @@ class CreateAddonListWorker(QtCore.QThread): ) FreeCAD.Console.PrintMessage(f"{macro_cache_location}\n") FreeCAD.Console.PrintMessage( - translate("AddonsInstaller", "Attempting to do a clean checkout...") - + "\n" + translate("AddonsInstaller", "Attempting to do a clean checkout...") + "\n" ) try: os.chdir( @@ -459,13 +454,9 @@ class LoadPackagesFromCacheWorker(QtCore.QThread): try: repo.load_metadata_file(repo_metadata_cache_path) repo.installed_version = repo.metadata.version - repo.updated_timestamp = os.path.getmtime( - repo_metadata_cache_path - ) + repo.updated_timestamp = os.path.getmtime(repo_metadata_cache_path) except Exception as e: - FreeCAD.Console.PrintLog( - f"Failed loading {repo_metadata_cache_path}\n" - ) + FreeCAD.Console.PrintLog(f"Failed loading {repo_metadata_cache_path}\n") FreeCAD.Console.PrintLog(str(e) + "\n") self.addon_repo.emit(repo) @@ -612,9 +603,7 @@ class UpdateChecker: wb.set_status(Addon.Status.NO_UPDATE_AVAILABLE) except GitFailed: FreeCAD.Console.PrintWarning( - translate( - "AddonsInstaller", "git status failed for {}" - ).format(wb.name) + translate("AddonsInstaller", "git status failed for {}").format(wb.name) + "\n" ) wb.set_status(Addon.Status.CANNOT_CHECK) @@ -670,9 +659,7 @@ class UpdateChecker: # Make sure this macro has its code downloaded: try: if not macro_wrapper.macro.parsed and macro_wrapper.macro.on_git: - macro_wrapper.macro.fill_details_from_file( - macro_wrapper.macro.src_filename - ) + macro_wrapper.macro.fill_details_from_file(macro_wrapper.macro.src_filename) elif not macro_wrapper.macro.parsed and macro_wrapper.macro.on_wiki: mac = macro_wrapper.macro.name.replace(" ", "_") mac = mac.replace("&", "%26") @@ -694,9 +681,7 @@ class UpdateChecker: hasher2 = hashlib.sha1() hasher1.update(macro_wrapper.macro.code.encode("utf-8")) new_sha1 = hasher1.hexdigest() - test_file_one = os.path.join( - FreeCAD.getUserMacroDir(True), macro_wrapper.macro.filename - ) + test_file_one = os.path.join(FreeCAD.getUserMacroDir(True), macro_wrapper.macro.filename) test_file_two = os.path.join( FreeCAD.getUserMacroDir(True), "Macro_" + macro_wrapper.macro.filename ) @@ -823,9 +808,7 @@ class CacheMacroCodeWorker(QtCore.QThread): if QtCore.QThread.currentThread().isInterruptionRequested(): return - self.progress_made.emit( - len(self.repos) - self.repo_queue.qsize(), len(self.repos) - ) + self.progress_made.emit(len(self.repos) - self.repo_queue.qsize(), len(self.repos)) try: next_repo = self.repo_queue.get_nowait() @@ -886,18 +869,12 @@ class GetMacroDetailsWorker(QtCore.QThread): """Rarely called directly: create an instance and call start() on it instead to launch in a new thread""" - self.status_message.emit( - translate("AddonsInstaller", "Retrieving macro description...") - ) + self.status_message.emit(translate("AddonsInstaller", "Retrieving macro description...")) if not self.macro.parsed and self.macro.on_git: - self.status_message.emit( - translate("AddonsInstaller", "Retrieving info from git") - ) + self.status_message.emit(translate("AddonsInstaller", "Retrieving info from git")) self.macro.fill_details_from_file(self.macro.src_filename) if not self.macro.parsed and self.macro.on_wiki: - self.status_message.emit( - translate("AddonsInstaller", "Retrieving info from wiki") - ) + self.status_message.emit(translate("AddonsInstaller", "Retrieving info from wiki")) mac = self.macro.name.replace(" ", "_") mac = mac.replace("&", "%26") mac = mac.replace("+", "%2B") diff --git a/src/Mod/AddonManager/change_branch.py b/src/Mod/AddonManager/change_branch.py index c31af0915f..332795a22a 100644 --- a/src/Mod/AddonManager/change_branch.py +++ b/src/Mod/AddonManager/change_branch.py @@ -67,18 +67,10 @@ class ChangeBranchDialog(QtWidgets.QWidget): if ref == current_ref: index = self.item_filter.mapFromSource(self.item_model.index(row, 0)) selection_model.select(index, QtCore.QItemSelectionModel.ClearAndSelect) - selection_model.select( - index.siblingAtColumn(1), QtCore.QItemSelectionModel.Select - ) - selection_model.select( - index.siblingAtColumn(2), QtCore.QItemSelectionModel.Select - ) - selection_model.select( - index.siblingAtColumn(3), QtCore.QItemSelectionModel.Select - ) - selection_model.select( - index.siblingAtColumn(4), QtCore.QItemSelectionModel.Select - ) + selection_model.select(index.siblingAtColumn(1), QtCore.QItemSelectionModel.Select) + selection_model.select(index.siblingAtColumn(2), QtCore.QItemSelectionModel.Select) + selection_model.select(index.siblingAtColumn(3), QtCore.QItemSelectionModel.Select) + selection_model.select(index.siblingAtColumn(4), QtCore.QItemSelectionModel.Select) break row += 1 @@ -260,9 +252,7 @@ class ChangeBranchDialogModel(QtCore.QAbstractTableModel): "Table header for git ref type (e.g. either Tag or Branch)", ) elif section == 1: - return translate( - "AddonsInstaller", "Local name", "Table header for git ref name" - ) + return translate("AddonsInstaller", "Local name", "Table header for git ref name") elif section == 2: return translate( "AddonsInstaller", diff --git a/src/Mod/AddonManager/compact_view.py b/src/Mod/AddonManager/compact_view.py index 0548156b71..2f9d549910 100644 --- a/src/Mod/AddonManager/compact_view.py +++ b/src/Mod/AddonManager/compact_view.py @@ -74,7 +74,7 @@ class Ui_CompactView(object): # setupUi def retranslateUi(self, CompactView): -# CompactView.setWindowTitle(QCoreApplication.translate("CompactView", "Form", None)) + # CompactView.setWindowTitle(QCoreApplication.translate("CompactView", "Form", None)) self.labelIcon.setText(QCoreApplication.translate("CompactView", "Icon", None)) self.labelPackageName.setText( QCoreApplication.translate("CompactView", "Package Name", None) diff --git a/src/Mod/AddonManager/developer_mode_people_table.ui b/src/Mod/AddonManager/developer_mode_people_table.ui index 21202ad868..468ec99416 100644 --- a/src/Mod/AddonManager/developer_mode_people_table.ui +++ b/src/Mod/AddonManager/developer_mode_people_table.ui @@ -11,7 +11,7 @@ - Form + Form diff --git a/src/Mod/AddonManager/expanded_view.py b/src/Mod/AddonManager/expanded_view.py index 79648015e8..f0275c7696 100644 --- a/src/Mod/AddonManager/expanded_view.py +++ b/src/Mod/AddonManager/expanded_view.py @@ -113,7 +113,7 @@ class Ui_ExpandedView(object): # setupUi def retranslateUi(self, ExpandedView): -# ExpandedView.setWindowTitle(QCoreApplication.translate("ExpandedView", "Form", None)) + # ExpandedView.setWindowTitle(QCoreApplication.translate("ExpandedView", "Form", None)) self.labelIcon.setText(QCoreApplication.translate("ExpandedView", "Icon", None)) self.labelPackageName.setText( QCoreApplication.translate("ExpandedView", "

Package Name

", None) diff --git a/src/Mod/AddonManager/install_to_toolbar.py b/src/Mod/AddonManager/install_to_toolbar.py index cda5d07940..d0da236a6b 100644 --- a/src/Mod/AddonManager/install_to_toolbar.py +++ b/src/Mod/AddonManager/install_to_toolbar.py @@ -44,9 +44,7 @@ def ask_to_install_toolbar_button(repo: Addon) -> None: os.path.join(os.path.dirname(__file__), "add_toolbar_button_dialog.ui") ) add_toolbar_button_dialog.setWindowFlag(QtCore.Qt.WindowStaysOnTopHint, True) - add_toolbar_button_dialog.buttonYes.clicked.connect( - lambda: install_toolbar_button(repo) - ) + add_toolbar_button_dialog.buttonYes.clicked.connect(lambda: install_toolbar_button(repo)) add_toolbar_button_dialog.buttonNever.clicked.connect( lambda: pref.SetBool("dontShowAddMacroButtonDialog", True) ) @@ -58,9 +56,7 @@ def check_for_button(repo: Addon) -> bool: command = FreeCADGui.Command.findCustomCommand(repo.macro.filename) if not command: return False - custom_toolbars = FreeCAD.ParamGet( - "User parameter:BaseApp/Workbench/Global/Toolbar" - ) + custom_toolbars = FreeCAD.ParamGet("User parameter:BaseApp/Workbench/Global/Toolbar") toolbar_groups = custom_toolbars.GetGroups() for group in toolbar_groups: toolbar = custom_toolbars.GetGroup(group) @@ -88,9 +84,7 @@ def ask_for_toolbar(repo: Addon, custom_toolbars) -> object: select_toolbar_dialog.comboBox.clear() for group in custom_toolbars: - ref = FreeCAD.ParamGet( - "User parameter:BaseApp/Workbench/Global/Toolbar/" + group - ) + ref = FreeCAD.ParamGet("User parameter:BaseApp/Workbench/Global/Toolbar/" + group) name = ref.GetString("Name", "") if name: select_toolbar_dialog.comboBox.addItem(name) @@ -114,9 +108,7 @@ def ask_for_toolbar(repo: Addon, custom_toolbars) -> object: return None # If none of the above code returned... - custom_toolbar_name = pref.GetString( - "CustomToolbarName", "Auto-Created Macro Toolbar" - ) + custom_toolbar_name = pref.GetString("CustomToolbarName", "Auto-Created Macro Toolbar") toolbar = get_toolbar_with_name(custom_toolbar_name) if not toolbar: # They told us not to ask, but then the toolbar got deleted... ask anyway! @@ -131,9 +123,7 @@ def get_toolbar_with_name(name: str) -> object: top_group = FreeCAD.ParamGet("User parameter:BaseApp/Workbench/Global/Toolbar") custom_toolbars = top_group.GetGroups() for toolbar in custom_toolbars: - group = FreeCAD.ParamGet( - "User parameter:BaseApp/Workbench/Global/Toolbar/" + toolbar - ) + group = FreeCAD.ParamGet("User parameter:BaseApp/Workbench/Global/Toolbar/" + toolbar) group_name = group.GetString("Name", "") if group_name == name: return group @@ -185,9 +175,7 @@ def install_toolbar_button(repo: Addon) -> None: """If the user has requested a toolbar button be installed, this function is called to continue the process and request any additional required information.""" pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons") - custom_toolbar_name = pref.GetString( - "CustomToolbarName", "Auto-Created Macro Toolbar" - ) + custom_toolbar_name = pref.GetString("CustomToolbarName", "Auto-Created Macro Toolbar") # Default to false here: if the variable hasn't been set, we don't assume # that we have to ask, because the simplest is to just create a new toolbar @@ -226,9 +214,7 @@ def install_toolbar_button(repo: Addon) -> None: if custom_toolbar: install_macro_to_toolbar(repo, custom_toolbar) else: - FreeCAD.Console.PrintMessage( - "In the end, no custom toolbar was set, bailing out\n" - ) + FreeCAD.Console.PrintMessage("In the end, no custom toolbar was set, bailing out\n") def install_macro_to_toolbar(repo: Addon, toolbar: object) -> None: @@ -255,9 +241,7 @@ def install_macro_to_toolbar(repo: Addon, toolbar: object) -> None: pixmapText = os.path.normpath(os.path.join(macro_repo_dir, repo.macro.icon)) elif repo.macro.xpm: macro_repo_dir = FreeCAD.getUserMacroDir(True) - icon_file = os.path.normpath( - os.path.join(macro_repo_dir, repo.macro.name + "_icon.xpm") - ) + icon_file = os.path.normpath(os.path.join(macro_repo_dir, repo.macro.name + "_icon.xpm")) with open(icon_file, "w", encoding="utf-8") as f: f.write(repo.macro.xpm) pixmapText = icon_file @@ -288,9 +272,7 @@ def remove_custom_toolbar_button(repo: Addon) -> None: command = FreeCADGui.Command.findCustomCommand(repo.macro.filename) if not command: return - custom_toolbars = FreeCAD.ParamGet( - "User parameter:BaseApp/Workbench/Global/Toolbar" - ) + custom_toolbars = FreeCAD.ParamGet("User parameter:BaseApp/Workbench/Global/Toolbar") toolbar_groups = custom_toolbars.GetGroups() for group in toolbar_groups: toolbar = custom_toolbars.GetGroup(group) diff --git a/src/Mod/AddonManager/manage_python_dependencies.py b/src/Mod/AddonManager/manage_python_dependencies.py index b6541ff681..24108d571a 100644 --- a/src/Mod/AddonManager/manage_python_dependencies.py +++ b/src/Mod/AddonManager/manage_python_dependencies.py @@ -134,12 +134,8 @@ class PythonPackageManager: def process(self): """Execute this object.""" try: - self.all_packages_stdout = call_pip( - ["list", "--path", self.vendor_path] - ) - self.outdated_packages_stdout = call_pip( - ["list", "-o", "--path", self.vendor_path] - ) + self.all_packages_stdout = call_pip(["list", "--path", self.vendor_path]) + self.outdated_packages_stdout = call_pip(["list", "-o", "--path", self.vendor_path]) except PipFailed as e: FreeCAD.Console.PrintError(str(e) + "\n") self.error.emit(str(e)) @@ -197,9 +193,7 @@ class PythonPackageManager: self.dlg.tableWidget.setItem( 0, 0, - QtWidgets.QTableWidgetItem( - translate("AddonsInstaller", "Processing, please wait...") - ), + QtWidgets.QTableWidgetItem(translate("AddonsInstaller", "Processing, please wait...")), ) self.dlg.tableWidget.horizontalHeader().setSectionResizeMode( 0, QtWidgets.QHeaderView.ResizeToContents @@ -230,9 +224,7 @@ class PythonPackageManager: dependencies.append(addon["name"] + "*") else: dependencies.append(addon["name"]) - self.dlg.tableWidget.setItem( - counter, 0, QtWidgets.QTableWidgetItem(package_name) - ) + self.dlg.tableWidget.setItem(counter, 0, QtWidgets.QTableWidgetItem(package_name)) self.dlg.tableWidget.setItem( counter, 1, @@ -249,13 +241,9 @@ class PythonPackageManager: QtWidgets.QTableWidgetItem(", ".join(dependencies)), ) if len(package_details["available_version"]) > 0: - updateButtons.append( - QtWidgets.QPushButton(translate("AddonsInstaller", "Update")) - ) + updateButtons.append(QtWidgets.QPushButton(translate("AddonsInstaller", "Update"))) updateButtons[-1].setIcon(QtGui.QIcon(":/icons/button_up.svg")) - updateButtons[-1].clicked.connect( - partial(self._update_package, package_name) - ) + updateButtons[-1].clicked.connect(partial(self._update_package, package_name)) self.dlg.tableWidget.setCellWidget(counter, 4, updateButtons[-1]) update_counter += 1 else: @@ -292,9 +280,7 @@ class PythonPackageManager: dependent_addons.append({"name": addon.name, "optional": True}) return dependent_addons - def _parse_pip_list_output( - self, all_packages, outdated_packages - ) -> Dict[str, Dict[str, str]]: + def _parse_pip_list_output(self, all_packages, outdated_packages) -> Dict[str, Dict[str, str]]: """Parses the output from pip into a dictionary with update information in it. The pip output should be an array of lines of text.""" @@ -350,17 +336,13 @@ class PythonPackageManager: self.dlg.tableWidget.setItem( line, 2, - QtWidgets.QTableWidgetItem( - translate("AddonsInstaller", "Updating...") - ), + QtWidgets.QTableWidgetItem(translate("AddonsInstaller", "Updating...")), ) break QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents, 50) try: - call_pip( - ["install", "--upgrade", package_name, "--target", self.vendor_path] - ) + call_pip(["install", "--upgrade", package_name, "--target", self.vendor_path]) self._create_list_from_pip() except PipFailed as e: FreeCAD.Console.PrintError(str(e) + "\n") @@ -373,8 +355,7 @@ class PythonPackageManager: for package_name, package_details in package_list.items(): if ( len(package_details["available_version"]) > 0 - and package_details["available_version"] - != package_details["installed_version"] + and package_details["available_version"] != package_details["installed_version"] ): updates.append(package_name) @@ -389,9 +370,7 @@ class PythonPackageManager: migrated = False - old_directory = os.path.join( - FreeCAD.getUserAppDataDir(), "AdditionalPythonPackages" - ) + old_directory = os.path.join(FreeCAD.getUserAppDataDir(), "AdditionalPythonPackages") new_directory = utils.get_pip_target_directory() new_directory_name = new_directory.rsplit(os.path.sep, 1)[1] @@ -420,12 +399,8 @@ class PythonPackageManager: sys.path.append(new_directory) cls._add_current_python_version() - with open( - os.path.join(old_directory, "MIGRATION_COMPLETE"), "w", encoding="utf-8" - ) as f: - f.write( - "Files originally installed in this directory have been migrated to:\n" - ) + with open(os.path.join(old_directory, "MIGRATION_COMPLETE"), "w", encoding="utf-8") as f: + f.write("Files originally installed in this directory have been migrated to:\n") f.write(new_directory) f.write( "\nThe existence of this file prevents the Addon Manager from " diff --git a/src/Mod/AddonManager/package_details.py b/src/Mod/AddonManager/package_details.py index c9d1ae311a..36952b7bd3 100644 --- a/src/Mod/AddonManager/package_details.py +++ b/src/Mod/AddonManager/package_details.py @@ -91,9 +91,7 @@ class PackageDetails(QtWidgets.QWidget): self.ui.buttonInstall.clicked.connect(lambda: self.install.emit(self.repo)) self.ui.buttonUninstall.clicked.connect(lambda: self.uninstall.emit(self.repo)) self.ui.buttonUpdate.clicked.connect(lambda: self.update.emit(self.repo)) - self.ui.buttonCheckForUpdate.clicked.connect( - lambda: self.check_for_update.emit(self.repo) - ) + self.ui.buttonCheckForUpdate.clicked.connect(lambda: self.check_for_update.emit(self.repo)) self.ui.buttonChangeBranch.clicked.connect(self.change_branch_clicked) self.ui.buttonEnable.clicked.connect(self.enable_clicked) self.ui.buttonDisable.clicked.connect(self.disable_clicked) @@ -125,13 +123,9 @@ class PackageDetails(QtWidgets.QWidget): self.ui.webView.setHtml("Loading...") self.ui.webView.hide() self.ui.progressBar.show() - self.timeout = QtCore.QTimer.singleShot( - 6000, self.long_load_running - ) # Six seconds + self.timeout = QtCore.QTimer.singleShot(6000, self.long_load_running) # Six seconds else: - self.ui.missingWebViewLabel.setStyleSheet( - "color:" + utils.warning_color_string() - ) + self.ui.missingWebViewLabel.setStyleSheet("color:" + utils.warning_color_string()) if self.worker is not None: if not self.worker.isFinished(): @@ -157,9 +151,7 @@ class PackageDetails(QtWidgets.QWidget): self.status_create_addon_list_worker.deleteLater ) self.check_for_update.connect(self.status_create_addon_list_worker.do_work) - self.status_create_addon_list_worker.update_status.connect( - self.display_repo_status - ) + self.status_create_addon_list_worker.update_status.connect(self.display_repo_status) self.status_update_thread.start() self.check_for_update.emit(self.repo) @@ -182,9 +174,9 @@ class PackageDetails(QtWidgets.QWidget): ) if version and date: installed_version_string += ( - translate( - "AddonsInstaller", "Version {version} installed on {date}" - ).format(version=version, date=date) + translate("AddonsInstaller", "Version {version} installed on {date}").format( + version=version, date=date + ) + ". " ) elif version: @@ -196,9 +188,7 @@ class PackageDetails(QtWidgets.QWidget): translate("AddonsInstaller", "Installed on {date}") + ". " ).format(date=date) else: - installed_version_string += ( - translate("AddonsInstaller", "Installed") + ". " - ) + installed_version_string += translate("AddonsInstaller", "Installed") + ". " if status == Addon.Status.UPDATE_AVAILABLE: if repo.metadata: @@ -214,9 +204,7 @@ class PackageDetails(QtWidgets.QWidget): installed_version_string += "." elif repo.macro and repo.macro.version: installed_version_string += ( - "" - + translate("AddonsInstaller", "Update available to version") - + " " + "" + translate("AddonsInstaller", "Update available to version") + " " ) installed_version_string += repo.macro.version installed_version_string += "." @@ -258,10 +246,7 @@ class PackageDetails(QtWidgets.QWidget): ) elif status == Addon.Status.PENDING_RESTART: installed_version_string += ( - translate( - "AddonsInstaller", "Updated, please restart FreeCAD to use" - ) - + "." + translate("AddonsInstaller", "Updated, please restart FreeCAD to use") + "." ) elif status == Addon.Status.UNCHECKED: pref = fci.ParamGet("User parameter:BaseApp/Preferences/Addons") @@ -272,20 +257,15 @@ class PackageDetails(QtWidgets.QWidget): ) else: installed_version_string += ( - translate("AddonsInstaller", "Automatic update checks disabled") - + "." + translate("AddonsInstaller", "Automatic update checks disabled") + "." ) installed_version_string += "" self.ui.labelPackageDetails.setText(installed_version_string) if repo.status() == Addon.Status.UPDATE_AVAILABLE: - self.ui.labelPackageDetails.setStyleSheet( - "color:" + utils.attention_color_string() - ) + self.ui.labelPackageDetails.setStyleSheet("color:" + utils.attention_color_string()) else: - self.ui.labelPackageDetails.setStyleSheet( - "color:" + utils.bright_color_string() - ) + self.ui.labelPackageDetails.setStyleSheet("color:" + utils.bright_color_string()) self.ui.labelPackageDetails.show() if repo.macro is not None: @@ -340,13 +320,9 @@ class PackageDetails(QtWidgets.QWidget): if repo.obsolete: self.ui.labelWarningInfo.show() self.ui.labelWarningInfo.setText( - "

" - + translate("AddonsInstaller", "WARNING: This addon is obsolete") - + "

" - ) - self.ui.labelWarningInfo.setStyleSheet( - "color:" + utils.warning_color_string() + "

" + translate("AddonsInstaller", "WARNING: This addon is obsolete") + "

" ) + self.ui.labelWarningInfo.setStyleSheet("color:" + utils.warning_color_string()) elif repo.python2: self.ui.labelWarningInfo.show() self.ui.labelWarningInfo.setText( @@ -354,9 +330,7 @@ class PackageDetails(QtWidgets.QWidget): + translate("AddonsInstaller", "WARNING: This addon is Python 2 Only") + "" ) - self.ui.labelWarningInfo.setStyleSheet( - "color:" + utils.warning_color_string() - ) + self.ui.labelWarningInfo.setStyleSheet("color:" + utils.warning_color_string()) elif required_version: self.ui.labelWarningInfo.show() self.ui.labelWarningInfo.setText( @@ -365,9 +339,7 @@ class PackageDetails(QtWidgets.QWidget): + required_version + "" ) - self.ui.labelWarningInfo.setStyleSheet( - "color:" + utils.warning_color_string() - ) + self.ui.labelWarningInfo.setStyleSheet("color:" + utils.warning_color_string()) elif repo.is_disabled(): self.ui.labelWarningInfo.show() self.ui.labelWarningInfo.setText( @@ -378,9 +350,7 @@ class PackageDetails(QtWidgets.QWidget): ) + "" ) - self.ui.labelWarningInfo.setStyleSheet( - "color:" + utils.warning_color_string() - ) + self.ui.labelWarningInfo.setStyleSheet("color:" + utils.warning_color_string()) else: self.ui.labelWarningInfo.hide() @@ -396,9 +366,7 @@ class PackageDetails(QtWidgets.QWidget): # it's possible that this package actually provides versions of itself # for newer and older versions - first_supported_version = get_first_supported_freecad_version( - self.repo.metadata - ) + first_supported_version = get_first_supported_freecad_version(self.repo.metadata) if first_supported_version is not None: fc_version = Version(from_list=fci.Version()) if first_supported_version > fc_version: @@ -504,9 +472,7 @@ class PackageDetails(QtWidgets.QWidget): else: self.ui.urlBar.setText( "(" - + translate( - "AddonsInstaller", "No URL or wiki page provided by this macro" - ) + + translate("AddonsInstaller", "No URL or wiki page provided by this macro") + ")" ) else: @@ -517,9 +483,7 @@ class PackageDetails(QtWidgets.QWidget): else: self.ui.textBrowserReadMe.setHtml( "(" - + translate( - "AddonsInstaller", "No URL or wiki page provided by this macro" - ) + + translate("AddonsInstaller", "No URL or wiki page provided by this macro") + ")" ) @@ -622,9 +586,9 @@ class PackageDetails(QtWidgets.QWidget): def show_error_for(self, url: QtCore.QUrl) -> None: """Displays error information.""" - m = translate( - "AddonsInstaller", "Could not load README data from URL {}" - ).format(url.toString()) + m = translate("AddonsInstaller", "Could not load README data from URL {}").format( + url.toString() + ) html = f"

{m}

" self.ui.webView.setHtml(html) @@ -670,9 +634,7 @@ class PackageDetails(QtWidgets.QWidget): ) + "" ) - self.ui.labelWarningInfo.setStyleSheet( - "color:" + utils.attention_color_string() - ) + self.ui.labelWarningInfo.setStyleSheet("color:" + utils.attention_color_string()) def branch_changed(self, name: str) -> None: """Displays a dialog confirming the branch changed, and tries to access the @@ -695,9 +657,7 @@ class PackageDetails(QtWidgets.QWidget): self.repo.repo_type = Addon.Kind.WORKBENCH self.repo.metadata = None self.repo.installed_version = None - self.repo.updated_timestamp = ( - QtCore.QDateTime.currentDateTime().toSecsSinceEpoch() - ) + self.repo.updated_timestamp = QtCore.QDateTime.currentDateTime().toSecsSinceEpoch() self.repo.branch = name self.repo.set_status(Addon.Status.PENDING_RESTART) @@ -707,9 +667,7 @@ class PackageDetails(QtWidgets.QWidget): ).format(name) installed_version_string += "" self.ui.labelPackageDetails.setText(installed_version_string) - self.ui.labelPackageDetails.setStyleSheet( - "color:" + utils.attention_color_string() - ) + self.ui.labelPackageDetails.setStyleSheet("color:" + utils.attention_color_string()) self.update_status.emit(self.repo) @@ -738,9 +696,7 @@ if HAS_QTWEBENGINE: requested_url.host() == "wiki.freecad.org" or requested_url.host() == "wiki.freecad.org" ): - return super().acceptNavigationRequest( - requested_url, _type, isMainFrame - ) + return super().acceptNavigationRequest(requested_url, _type, isMainFrame) QtGui.QDesktopServices.openUrl(requested_url) self.stored_url = self.url() QtCore.QTimer.singleShot(0, self._reload_stored_url) @@ -838,9 +794,7 @@ class Ui_PackageDetails(object): self.verticalLayout_2.addWidget(self.labelPackageDetails) self.labelInstallationLocation = QtWidgets.QLabel(PackageDetails) - self.labelInstallationLocation.setTextInteractionFlags( - QtCore.Qt.TextSelectableByMouse - ) + self.labelInstallationLocation.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse) self.labelInstallationLocation.hide() self.verticalLayout_2.addWidget(self.labelInstallationLocation) @@ -917,9 +871,7 @@ class Ui_PackageDetails(object): QtCore.QCoreApplication.translate("AddonsInstaller", "Update", None) ) self.buttonCheckForUpdate.setText( - QtCore.QCoreApplication.translate( - "AddonsInstaller", "Check for Update", None - ) + QtCore.QCoreApplication.translate("AddonsInstaller", "Check for Update", None) ) self.buttonExecute.setText( QtCore.QCoreApplication.translate("AddonsInstaller", "Run Macro", None) @@ -934,9 +886,7 @@ class Ui_PackageDetails(object): QtCore.QCoreApplication.translate("AddonsInstaller", "Disable", None) ) self.buttonBack.setToolTip( - QtCore.QCoreApplication.translate( - "AddonsInstaller", "Return to package list", None - ) + QtCore.QCoreApplication.translate("AddonsInstaller", "Return to package list", None) ) if not HAS_QTWEBENGINE: self.missingWebViewLabel.setText( diff --git a/src/Mod/AddonManager/package_list.py b/src/Mod/AddonManager/package_list.py index 8629eaacb2..a9dd3dc598 100644 --- a/src/Mod/AddonManager/package_list.py +++ b/src/Mod/AddonManager/package_list.py @@ -116,9 +116,7 @@ class PackageList(QtWidgets.QWidget): self.item_filter.setHidePy2(pref.GetBool("HidePy2", True)) self.item_filter.setHideObsolete(pref.GetBool("HideObsolete", True)) - self.item_filter.setHideNewerFreeCADRequired( - pref.GetBool("HideNewerFreeCADRequired", True) - ) + self.item_filter.setHideNewerFreeCADRequired(pref.GetBool("HideNewerFreeCADRequired", True)) def on_listPackages_clicked(self, index: QtCore.QModelIndex): """Determine what addon was selected and emit the itemSelected signal with it as @@ -155,9 +153,7 @@ class PackageList(QtWidgets.QWidget): """filter name and description by the regex specified by text_filter""" if text_filter: - if hasattr( - self.item_filter, "setFilterRegularExpression" - ): # Added in Qt 5.12 + if hasattr(self.item_filter, "setFilterRegularExpression"): # Added in Qt 5.12 test_regex = QtCore.QRegularExpression(text_filter) else: test_regex = QtCore.QRegExp(text_filter) @@ -171,9 +167,7 @@ class PackageList(QtWidgets.QWidget): self.ui.labelFilterValidity.setToolTip( translate("AddonsInstaller", "Filter regular expression is invalid") ) - icon = QtGui.QIcon.fromTheme( - "cancel", QtGui.QIcon(":/icons/edit_Cancel.svg") - ) + icon = QtGui.QIcon.fromTheme("cancel", QtGui.QIcon(":/icons/edit_Cancel.svg")) self.ui.labelFilterValidity.setPixmap(icon.pixmap(16, 16)) self.ui.labelFilterValidity.show() else: @@ -227,17 +221,17 @@ class PackageListItemModel(QtCore.QAbstractListModel): if role == QtCore.Qt.ToolTipRole: tooltip = "" if self.repos[row].repo_type == Addon.Kind.PACKAGE: - tooltip = translate( - "AddonsInstaller", "Click for details about package {}" - ).format(self.repos[row].display_name) + tooltip = translate("AddonsInstaller", "Click for details about package {}").format( + self.repos[row].display_name + ) elif self.repos[row].repo_type == Addon.Kind.WORKBENCH: tooltip = translate( "AddonsInstaller", "Click for details about workbench {}" ).format(self.repos[row].display_name) elif self.repos[row].repo_type == Addon.Kind.MACRO: - tooltip = translate( - "AddonsInstaller", "Click for details about macro {}" - ).format(self.repos[row].display_name) + tooltip = translate("AddonsInstaller", "Click for details about macro {}").format( + self.repos[row].display_name + ) return tooltip if role == PackageListItemModel.DataAccessRole: return self.repos[row] @@ -246,9 +240,7 @@ class PackageListItemModel(QtCore.QAbstractListModel): """No header in this implementation: always returns None.""" return None - def setData( - self, index: QtCore.QModelIndex, value, role=QtCore.Qt.EditRole - ) -> None: + def setData(self, index: QtCore.QModelIndex, value, role=QtCore.Qt.EditRole) -> None: """Set the data for this row. The column of the index is ignored.""" row = index.row() @@ -290,18 +282,14 @@ class PackageListItemModel(QtCore.QAbstractListModel): """Set the status of addon with name to status.""" for row, item in enumerate(self.repos): if item.name == name: - self.setData( - self.index(row, 0), status, PackageListItemModel.StatusUpdateRole - ) + self.setData(self.index(row, 0), status, PackageListItemModel.StatusUpdateRole) return def update_item_icon(self, name: str, icon: QtGui.QIcon) -> None: """Set the icon for Addon with name to icon""" for row, item in enumerate(self.repos): if item.name == name: - self.setData( - self.index(row, 0), icon, PackageListItemModel.IconUpdateRole - ) + self.setData(self.index(row, 0), icon, PackageListItemModel.IconUpdateRole) return def reload_item(self, repo: Addon) -> None: @@ -432,9 +420,7 @@ class PackageListItemDelegate(QtWidgets.QStyledItemDelegate): if self.displayStyle == ListDisplayStyle.EXPANDED: if repo.macro.author: caption = translate("AddonsInstaller", "Author") - self.widget.ui.labelMaintainer.setText( - caption + ": " + repo.macro.author - ) + self.widget.ui.labelMaintainer.setText(caption + ": " + repo.macro.author) else: self.widget.ui.labelMaintainer.setText("") @@ -454,14 +440,8 @@ class PackageListItemDelegate(QtWidgets.QStyledItemDelegate): result = translate("AddonsInstaller", "Pending restart") if repo.is_disabled(): - style = ( - "style='color:" + utils.warning_color_string() + "; font-weight:bold;'" - ) - result += ( - f" [" - + translate("AddonsInstaller", "DISABLED") - + "]" - ) + style = "style='color:" + utils.warning_color_string() + "; font-weight:bold;'" + result += f" [" + translate("AddonsInstaller", "DISABLED") + "]" return result @@ -480,15 +460,11 @@ class PackageListItemDelegate(QtWidgets.QStyledItemDelegate): ) installed_version_string += str(repo.installed_version) else: - installed_version_string = "
" + translate( - "AddonsInstaller", "Unknown version" - ) + installed_version_string = "
" + translate("AddonsInstaller", "Unknown version") installed_date_string = "" if repo.updated_timestamp: - installed_date_string = ( - "
" + translate("AddonsInstaller", "Installed on") + ": " - ) + installed_date_string = "
" + translate("AddonsInstaller", "Installed on") + ": " installed_date_string += ( QtCore.QDateTime.fromTime_t(repo.updated_timestamp) .date() @@ -519,13 +495,9 @@ class PackageListItemDelegate(QtWidgets.QStyledItemDelegate): result = translate("AddonsInstaller", "Pending restart") if repo.is_disabled(): - style = ( - "style='color:" + utils.warning_color_string() + "; font-weight:bold;'" - ) + style = "style='color:" + utils.warning_color_string() + "; font-weight:bold;'" result += ( - f"
[" - + translate("AddonsInstaller", "DISABLED") - + "]" + f"
[" + translate("AddonsInstaller", "DISABLED") + "]" ) return result @@ -623,19 +595,11 @@ class PackageListFilter(QtCore.QSortFilterProxyModel): return False # If it's not installed, check to see if it's Py2 only - if ( - data.status() == Addon.Status.NOT_INSTALLED - and self.hide_py2 - and data.python2 - ): + if data.status() == Addon.Status.NOT_INSTALLED and self.hide_py2 and data.python2: return False # If it's not installed, check to see if it's marked obsolete - if ( - data.status() == Addon.Status.NOT_INSTALLED - and self.hide_obsolete - and data.obsolete - ): + if data.status() == Addon.Status.NOT_INSTALLED and self.hide_obsolete and data.obsolete: return False # If it's not installed, check to see if it's for a newer version of FreeCAD @@ -664,11 +628,7 @@ class PackageListFilter(QtCore.QSortFilterProxyModel): return True if re.match(desc).hasMatch(): return True - if ( - data.macro - and data.macro.comment - and re.match(data.macro.comment).hasMatch() - ): + if data.macro and data.macro.comment and re.match(data.macro.comment).hasMatch(): return True for tag in data.tags: if re.match(tag).hasMatch(): @@ -682,11 +642,7 @@ class PackageListFilter(QtCore.QSortFilterProxyModel): return True if re.indexIn(desc) != -1: return True - if ( - data.macro - and data.macro.comment - and re.indexIn(data.macro.comment) != -1 - ): + if data.macro and data.macro.comment and re.indexIn(data.macro.comment) != -1: return True for tag in data.tags: if re.indexIn(tag) != -1: @@ -712,9 +668,7 @@ class Ui_PackageList: self.buttonCompactLayout.setCheckable(True) self.buttonCompactLayout.setAutoExclusive(True) self.buttonCompactLayout.setIcon( - QtGui.QIcon.fromTheme( - "expanded_view", QtGui.QIcon(":/icons/compact_view.svg") - ) + QtGui.QIcon.fromTheme("expanded_view", QtGui.QIcon(":/icons/compact_view.svg")) ) self.horizontalLayout_6.addWidget(self.buttonCompactLayout) @@ -725,9 +679,7 @@ class Ui_PackageList: self.buttonExpandedLayout.setChecked(True) self.buttonExpandedLayout.setAutoExclusive(True) self.buttonExpandedLayout.setIcon( - QtGui.QIcon.fromTheme( - "expanded_view", QtGui.QIcon(":/icons/expanded_view.svg") - ) + QtGui.QIcon.fromTheme("expanded_view", QtGui.QIcon(":/icons/expanded_view.svg")) ) self.horizontalLayout_6.addWidget(self.buttonExpandedLayout) @@ -791,9 +743,7 @@ class Ui_PackageList: def retranslateUi(self, _): self.labelPackagesContaining.setText( - QtCore.QCoreApplication.translate( - "AddonsInstaller", "Show Addons containing:", None - ) + QtCore.QCoreApplication.translate("AddonsInstaller", "Show Addons containing:", None) ) self.comboPackageType.setItemText( 0, QtCore.QCoreApplication.translate("AddonsInstaller", "All", None) @@ -806,9 +756,7 @@ class Ui_PackageList: ) self.comboPackageType.setItemText( 3, - QtCore.QCoreApplication.translate( - "AddonsInstaller", "Preference Packs", None - ), + QtCore.QCoreApplication.translate("AddonsInstaller", "Preference Packs", None), ) self.labelStatus.setText( QtCore.QCoreApplication.translate("AddonsInstaller", "Status:", None) @@ -827,9 +775,7 @@ class Ui_PackageList: ) self.comboStatus.setItemText( StatusFilter.UPDATE_AVAILABLE, - QtCore.QCoreApplication.translate( - "AddonsInstaller", "Update available", None - ), + QtCore.QCoreApplication.translate("AddonsInstaller", "Update available", None), ) self.lineEditFilter.setPlaceholderText( QtCore.QCoreApplication.translate("AddonsInstaller", "Filter", None) diff --git a/src/Mod/Arch/Resources/translations/Arch_be.qm b/src/Mod/Arch/Resources/translations/Arch_be.qm index 1a80dece98..b1b2486c0a 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_be.qm and b/src/Mod/Arch/Resources/translations/Arch_be.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_be.ts b/src/Mod/Arch/Resources/translations/Arch_be.ts index f33ed07b84..003d2fa57b 100644 --- a/src/Mod/Arch/Resources/translations/Arch_be.ts +++ b/src/Mod/Arch/Resources/translations/Arch_be.ts @@ -638,7 +638,7 @@ IfcType:Wall - будуць улічвацца толькі аб'екты, ты Preview - Папярэдні прагляд + Папярэдні выгляд
@@ -1126,8 +1126,7 @@ instead of the FreeCAD web workbench Shows verbose debug messages during import and export of IFC files in the Report view panel - Адлюстроўвае падрабязныя паведамленні аб адладцы падчас імпартавання і экспартавання -файлаў IFC на панэлі прагляду справаздачы + Адлюстроўвае падрабязныя паведамленні аб адладцы падчас імпартавання і экспартавання файлаў IFC на панэлі прагляду справаздачы diff --git a/src/Mod/Arch/Resources/translations/Arch_de.qm b/src/Mod/Arch/Resources/translations/Arch_de.qm index d09cf70881..4ae5f6745f 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_de.qm and b/src/Mod/Arch/Resources/translations/Arch_de.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_de.ts b/src/Mod/Arch/Resources/translations/Arch_de.ts index a38b512b79..72da07b35f 100644 --- a/src/Mod/Arch/Resources/translations/Arch_de.ts +++ b/src/Mod/Arch/Resources/translations/Arch_de.ts @@ -4973,19 +4973,19 @@ Gebäudeerstellung abgebrochen. The dent length of this element - The dent length of this element + Die Zahnlänge dieses Elements The dent height of this element - The dent height of this element + Die Zahnhöhe dieses Elements The dents of this element - The dents of this element + Die Zähne dieses Elements @@ -5020,7 +5020,7 @@ Gebäudeerstellung abgebrochen. The dent width of this element - The dent width of this element + Die Zahnbreite dieses Elements @@ -5901,12 +5901,12 @@ Gebäudeerstellung abgebrochen. The length of each block - The length of each block + Die Länge der einzelnen Blöcke The height of each block - The height of each block + Die Höhe der einzelnen Blöcke @@ -5926,7 +5926,7 @@ Gebäudeerstellung abgebrochen. The number of entire blocks - The number of entire blocks + Die Anzahl der gesamten Blöcke @@ -6005,7 +6005,7 @@ Gebäudeerstellung abgebrochen. Panel tools - Panel tools + Paneel-Werkzeuge @@ -6444,7 +6444,7 @@ Gebäudeerstellung abgebrochen. Panel tools - Panel tools + Paneel-Werkzeuge diff --git a/src/Mod/Arch/Resources/translations/Arch_el.qm b/src/Mod/Arch/Resources/translations/Arch_el.qm index 4cdf3e4850..52f49e6255 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_el.qm and b/src/Mod/Arch/Resources/translations/Arch_el.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_el.ts b/src/Mod/Arch/Resources/translations/Arch_el.ts index b303a27dcd..3db7274d1c 100644 --- a/src/Mod/Arch/Resources/translations/Arch_el.ts +++ b/src/Mod/Arch/Resources/translations/Arch_el.ts @@ -2044,7 +2044,7 @@ unit to work with when opening the file. BuildingPart - BuildingPart + Μέρος Κτιρίου @@ -6005,7 +6005,7 @@ Building creation aborted. BuildingPart - BuildingPart + Μέρος Κτιρίου @@ -6727,7 +6727,7 @@ Building creation aborted. Closes holes in open shapes, turning them solids - Closes holes in open shapes, turning them solids + Κλείνει τρύπες σε ανοιχτά σχήματα, μετατρέποντάς τα σε στερεά diff --git a/src/Mod/Arch/Resources/translations/Arch_eu.qm b/src/Mod/Arch/Resources/translations/Arch_eu.qm index 91d374964f..a825bc9cad 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_eu.qm and b/src/Mod/Arch/Resources/translations/Arch_eu.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_eu.ts b/src/Mod/Arch/Resources/translations/Arch_eu.ts index e3845b8f45..524b2266f4 100644 --- a/src/Mod/Arch/Resources/translations/Arch_eu.ts +++ b/src/Mod/Arch/Resources/translations/Arch_eu.ts @@ -2576,7 +2576,7 @@ Distantzia = 0 bada, orduan distantzia kalkulatzen da altuera profil erlatiboare Invert hinge position - Alderantzikatu gontzaren kokalekua + Alderantzikatu gontzaren posizioa @@ -6020,7 +6020,7 @@ Eraikinaren sorrera utzi egin da. Writing camera position - Kamera-kokapena idazten + Kameraren posizioa idazten diff --git a/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm b/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm index 8dd821ac42..5c734f395b 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm and b/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts b/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts index 4b453c0ee9..bc1e10cb5e 100644 --- a/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts +++ b/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts @@ -2942,12 +2942,12 @@ Se a extensão = 0, ela será calculada de modo que a altura seja a mesma do per Rotation - Rotation + Rotação Panel - Panel + Painel @@ -3024,7 +3024,7 @@ Se a extensão = 0, ela será calculada de modo que a altura seja a mesma do per Connector - Connector + Conector @@ -3785,7 +3785,7 @@ Criação de edifício abortada. Create a structural system from a selected structure and axis - Create a structural system from a selected structure and axis + Criar um sistema estrutural para a estrutura e eixo selecionado @@ -3798,7 +3798,7 @@ Criação de edifício abortada. Creates a structure from scratch or from a selected object (sketch, wire, face or solid) - Creates a structure from scratch or from a selected object (sketch, wire, face or solid) + Criar uma estrutura do zero ou a partir de um objeto selecionado (esboço, linha, face ou sólido) @@ -3807,12 +3807,12 @@ Criação de edifício abortada. An optional extrusion path for this element - An optional extrusion path for this element + Um caminho de extrusão opcional para este elemento The computed length of the extrusion path - The computed length of the extrusion path + O comprimento calculado do caminho de extrusão diff --git a/src/Mod/Arch/Resources/translations/Arch_sl.qm b/src/Mod/Arch/Resources/translations/Arch_sl.qm index b81437ad2e..eaac1a7f63 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_sl.qm and b/src/Mod/Arch/Resources/translations/Arch_sl.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_sl.ts b/src/Mod/Arch/Resources/translations/Arch_sl.ts index 7bac7732c2..fc08840b81 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sl.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sl.ts @@ -3252,7 +3252,7 @@ Ustvarjanje etaže prekinjeno. Distance - Distance + Razdalja diff --git a/src/Mod/Arch/Resources/translations/Arch_sr-CS.qm b/src/Mod/Arch/Resources/translations/Arch_sr-CS.qm index d0fa45d4e5..2049535aa7 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_sr-CS.qm and b/src/Mod/Arch/Resources/translations/Arch_sr-CS.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts b/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts index ce90b7fdae..08be8e4cae 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts @@ -3253,7 +3253,7 @@ Floor creation aborted. Distance - Distance + Rastojanje diff --git a/src/Mod/Arch/Resources/translations/Arch_sr.qm b/src/Mod/Arch/Resources/translations/Arch_sr.qm index e902cc4f96..85f67e358c 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_sr.qm and b/src/Mod/Arch/Resources/translations/Arch_sr.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_sr.ts b/src/Mod/Arch/Resources/translations/Arch_sr.ts index d0d0f1ccc8..ced7f3b893 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sr.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sr.ts @@ -3253,7 +3253,7 @@ Floor creation aborted. Distance - Distance + Растојање diff --git a/src/Mod/Arch/Resources/translations/Arch_sv-SE.qm b/src/Mod/Arch/Resources/translations/Arch_sv-SE.qm index 0ff8f10d08..6bbe0e286f 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_sv-SE.qm and b/src/Mod/Arch/Resources/translations/Arch_sv-SE.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts b/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts index b2193d4d03..76f26bb9b0 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts @@ -2179,7 +2179,7 @@ Site creation aborted. Roof - Roof + Tak @@ -6160,7 +6160,7 @@ Building creation aborted. Roof - Roof + Tak diff --git a/src/Mod/Assembly/App/CMakeLists.txt b/src/Mod/Assembly/App/CMakeLists.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Mod/Assembly/Assembly/__init__.py b/src/Mod/Assembly/Assembly/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Mod/Assembly/AssemblyGlobal.h b/src/Mod/Assembly/AssemblyGlobal.h new file mode 100644 index 0000000000..34be7d45e2 --- /dev/null +++ b/src/Mod/Assembly/AssemblyGlobal.h @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/**************************************************************************** + * * + * Copyright (c) 2023 Ondsel * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + ***************************************************************************/ + +#include + +#ifndef ASSEMBLY_GLOBAL_H +#define ASSEMBLY_GLOBAL_H + + +// Assembly +#ifndef AssemblyExport +#ifdef Assembly_EXPORTS +#define AssemblyExport FREECAD_DECL_EXPORT +#else +#define AssemblyExport FREECAD_DECL_IMPORT +#endif +#endif + +// AssemblyGui +#ifndef AssemblyGuiExport +#ifdef AssemblyGui_EXPORTS +#define AssemblyGuiExport FREECAD_DECL_EXPORT +#else +#define AssemblyGuiExport FREECAD_DECL_IMPORT +#endif +#endif + +#endif // ASSEMBLY_GLOBAL_H diff --git a/src/Mod/Assembly/AssemblyImport.py b/src/Mod/Assembly/AssemblyImport.py new file mode 100644 index 0000000000..be4ffb8b46 --- /dev/null +++ b/src/Mod/Assembly/AssemblyImport.py @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + + +def open(filename): + doc = App.activeDocument() + # here you do all what is needed with filename, read, classify data, create corresponding FreeCAD objects + doc.recompute() + + +def insert(filename, docname): + print("Inserting file: " + filename + " into document: " + docname) diff --git a/src/Mod/Assembly/AssemblyTests/TestCore.py b/src/Mod/Assembly/AssemblyTests/TestCore.py new file mode 100644 index 0000000000..e2e3796733 --- /dev/null +++ b/src/Mod/Assembly/AssemblyTests/TestCore.py @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import FreeCAD +import Part +import unittest + + +class TestCore(unittest.TestCase): + @classmethod + def setUpClass(cls): + """setUpClass()... + This method is called upon instantiation of this test class. Add code and objects here + that are needed for the duration of the test() methods in this class. In other words, + set up the 'global' test environment here; use the `setUp()` method to set up a 'local' + test environment. + This method does not have access to the class `self` reference, but it + is able to call static methods within this same class. + """ + pass + + @classmethod + def tearDownClass(cls): + """tearDownClass()... + This method is called prior to destruction of this test class. Add code and objects here + that cleanup the test environment after the test() methods in this class have been executed. + This method does not have access to the class `self` reference. This method + is able to call static methods within this same class. + """ + pass + + # Close geometry document without saving + # FreeCAD.closeDocument(FreeCAD.ActiveDocument.Name) + + # Setup and tear down methods called before and after each unit test + def setUp(self): + """setUp()... + This method is called prior to each `test()` method. Add code and objects here + that are needed for multiple `test()` methods. + """ + self.doc = FreeCAD.ActiveDocument + self.con = FreeCAD.Console + + def tearDown(self): + """tearDown()... + This method is called after each test() method. Add cleanup instructions here. + Such cleanup instructions will likely undo those in the setUp() method. + """ + pass + + def test00(self): + pass + + self.assertTrue(True) diff --git a/src/Mod/Assembly/AssemblyTests/TestTEMPLATE.py b/src/Mod/Assembly/AssemblyTests/TestTEMPLATE.py new file mode 100644 index 0000000000..d69d18f9b5 --- /dev/null +++ b/src/Mod/Assembly/AssemblyTests/TestTEMPLATE.py @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import FreeCAD +import Part +import unittest + + +class TestTEMPLATE(unittest.TestCase): + @classmethod + def setUpClass(cls): + """setUpClass()... + This method is called upon instantiation of this test class. Add code and objects here + that are needed for the duration of the test() methods in this class. In other words, + set up the 'global' test environment here; use the `setUp()` method to set up a 'local' + test environment. + This method does not have access to the class `self` reference, but it + is able to call static methods within this same class. + """ + pass + + @classmethod + def tearDownClass(cls): + """tearDownClass()... + This method is called prior to destruction of this test class. Add code and objects here + that cleanup the test environment after the test() methods in this class have been executed. + This method does not have access to the class `self` reference. This method + is able to call static methods within this same class. + """ + pass + + # Close geometry document without saving + # FreeCAD.closeDocument(FreeCAD.ActiveDocument.Name) + + # Setup and tear down methods called before and after each unit test + def setUp(self): + """setUp()... + This method is called prior to each `test()` method. Add code and objects here + that are needed for multiple `test()` methods. + """ + self.doc = FreeCAD.ActiveDocument + self.con = FreeCAD.Console + + def tearDown(self): + """tearDown()... + This method is called after each test() method. Add cleanup instructions here. + Such cleanup instructions will likely undo those in the setUp() method. + """ + pass + + def test00(self): + pass + + self.assertTrue(True) diff --git a/src/Mod/Assembly/AssemblyTests/__init__.py b/src/Mod/Assembly/AssemblyTests/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/Mod/Assembly/CMakeLists.txt b/src/Mod/Assembly/CMakeLists.txt new file mode 100644 index 0000000000..26c1245418 --- /dev/null +++ b/src/Mod/Assembly/CMakeLists.txt @@ -0,0 +1,63 @@ +add_subdirectory(App) + +if(BUILD_GUI) + add_subdirectory(Gui) +endif(BUILD_GUI) + +set(Assembly_Scripts + Init.py + Commands.py + TestAssemblyWorkbench.py + Preferences.py + AssemblyImport.py +) + +if(BUILD_GUI) + list (APPEND Assembly_Scripts InitGui.py) +endif(BUILD_GUI) + +INSTALL( + FILES + ${Assembly_Scripts} + DESTINATION + Mod/Assembly +) + +SET(AssemblyScripts_SRCS + Assembly/__init__.py +) + + +SET(AssemblyTests_SRCS + AssemblyTests/__init__.py + AssemblyTests/TestCore.py +) + + +SET(all_files + ${AssemblyTests_SRCS} + ${AssemblyScripts_SRCS} +) + +ADD_CUSTOM_TARGET(AssemblyScripts ALL + SOURCES ${all_files} +) + +SET(test_files + ${Assembly_Scripts} + ${AssemblyTests_SRCS} +) + +ADD_CUSTOM_TARGET(AssemblyTests ALL + SOURCES ${test_files} +) + +fc_copy_sources(AssemblyScripts "${CMAKE_BINARY_DIR}/Mod/Assembly" ${all_files}) +fc_copy_sources(AssemblyTests "${CMAKE_BINARY_DIR}/Mod/Assembly" ${test_files}) + +INSTALL( + FILES + ${AssemblyTests_SRCS} + DESTINATION + Mod/Assembly/AssemblyTests +) diff --git a/src/Mod/Assembly/Commands.py b/src/Mod/Assembly/Commands.py new file mode 100644 index 0000000000..73e37a98dd --- /dev/null +++ b/src/Mod/Assembly/Commands.py @@ -0,0 +1,312 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import os +import FreeCAD as App + +from PySide.QtCore import QT_TRANSLATE_NOOP + +if App.GuiUp: + import FreeCADGui as Gui + from PySide import QtCore, QtGui, QtWidgets + +# translate = App.Qt.translate + +__title__ = "Assembly Commands" +__author__ = "Ondsel" +__url__ = "https://www.freecad.org" + + +def activeAssembly(): + doc = Gui.ActiveDocument + + if doc is None or doc.ActiveView is None: + return None + + active_part = doc.ActiveView.getActiveObject("part") + + if active_part is not None and active_part.Type == "Assembly": + return active_part + + return None + + +def isDocTemporary(doc): + # Guard against older versions of FreeCad which don't have the Temporary attribute + try: + docTemporary = doc.Temporary + except AttributeError: + docTemporary = False + return docTemporary + + +class CommandCreateAssembly: + def __init__(self): + pass + + def GetResources(self): + return { + "Pixmap": "Geoassembly", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateAssembly", "Create Assembly"), + "Accel": "A", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateAssembly", + "Create an assembly object in the current document.", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return App.ActiveDocument is not None + + def Activated(self): + App.setActiveTransaction("Create assembly") + assembly = App.ActiveDocument.addObject("App::Part", "Assembly") + assembly.Type = "Assembly" + Gui.ActiveDocument.ActiveView.setActiveObject("part", assembly) + App.closeActiveTransaction() + + +class CommandInsertLink: + def __init__(self): + pass + + def GetResources(self): + tooltip = "

Insert a Link into the assembly. " + tooltip += "This will create dynamic links to parts/bodies/primitives/assemblies." + tooltip += "To insert external objects, make sure that the file " + tooltip += "is open in the current session

" + tooltip += "

Press shift to add several links while clicking on the view." + + return { + "Pixmap": "Assembly_InsertLink", + "MenuText": QT_TRANSLATE_NOOP("Assembly_InsertLink", "Insert Link"), + "Accel": "I", + "ToolTip": QT_TRANSLATE_NOOP("Assembly_InsertLink", tooltip), + "CmdType": "ForEdit", + } + + def IsActive(self): + return activeAssembly() is not None + + def Activated(self): + assembly = activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyInsertLink(assembly, view) + Gui.Control.showDialog(self.panel) + + +class TaskAssemblyInsertLink(QtCore.QObject): + def __init__(self, assembly, view): + super().__init__() + + self.assembly = assembly + self.view = view + self.doc = App.ActiveDocument + + self.form = Gui.PySideUic.loadUi(":/panels/TaskAssemblyInsertLink.ui") + self.form.installEventFilter(self) + + # Actions + self.form.openFileButton.clicked.connect(self.openFiles) + self.form.partList.itemClicked.connect(self.onItemClicked) + self.form.filterPartList.textChanged.connect(self.onFilterChange) + + self.allParts = [] + self.partsDoc = [] + self.numberOfAddedParts = 0 + self.translation = 0 + self.partMoving = False + + self.buildPartList() + + App.setActiveTransaction("Insert Link") + + def accept(self): + App.closeActiveTransaction() + self.deactivated() + return True + + def reject(self): + App.closeActiveTransaction(True) + self.deactivated() + return True + + def deactivated(self): + if self.partMoving: + self.endMove() + + def buildPartList(self): + self.allParts.clear() + self.partsDoc.clear() + + docList = App.listDocuments().values() + + for doc in docList: + if isDocTemporary(doc): + continue + + for obj in doc.findObjects("App::Part"): + # we don't want to link to itself + if obj != self.assembly: + self.allParts.append(obj) + self.partsDoc.append(doc) + + for obj in doc.findObjects("PartDesign::Body"): + # but only those at top level (not nested inside other containers) + if obj.getParentGeoFeatureGroup() is None: + self.allParts.append(obj) + self.partsDoc.append(doc) + + self.form.partList.clear() + for part in self.allParts: + newItem = QtGui.QListWidgetItem() + newItem.setText(part.Document.Name + " - " + part.Name) + newItem.setIcon(part.ViewObject.Icon) + self.form.partList.addItem(newItem) + + def onFilterChange(self): + filter_str = self.form.filterPartList.text().strip().lower() + + for i in range(self.form.partList.count()): + item = self.form.partList.item(i) + item_text = item.text().lower() + + # Check if the item's text contains the filter string + is_visible = filter_str in item_text if filter_str else True + + item.setHidden(not is_visible) + + def openFiles(self): + selected_files, _ = QtGui.QFileDialog.getOpenFileNames( + None, + "Select FreeCAD documents to import parts from", + "", + "Supported Formats (*.FCStd *.fcstd);;All files (*)", + ) + + for filename in selected_files: + requested_file = os.path.split(filename)[1] + import_doc_is_open = any( + requested_file == os.path.split(doc.FileName)[1] + for doc in App.listDocuments().values() + ) + + if not import_doc_is_open: + if filename.lower().endswith(".fcstd"): + App.openDocument(filename) + App.setActiveDocument(self.doc.Name) + self.buildPartList() + + def onItemClicked(self, item): + for selected in self.form.partList.selectedIndexes(): + selectedPart = self.allParts[selected.row()] + if not selectedPart: + return + + if self.partMoving: + self.endMove() + + # check that the current document had been saved or that it's the same document as that of the selected part + if not self.doc.FileName != "" and not self.doc == selectedPart.Document: + print("The current document must be saved before inserting an external part") + return + + self.createdLink = self.assembly.newObject("App::Link", selectedPart.Name) + self.createdLink.LinkedObject = selectedPart + self.createdLink.Placement.Base = self.getTranslationVec(selectedPart) + self.createdLink.recompute() + + self.numberOfAddedParts += 1 + + # highlight the link + Gui.Selection.clearSelection() + Gui.Selection.addSelection(self.doc.Name, self.assembly.Name, self.createdLink.Name + ".") + + # Start moving the part if user brings mouse on view + self.initMove() + + def initMove(self): + self.callbackMove = self.view.addEventCallback("SoLocation2Event", self.moveMouse) + self.callbackClick = self.view.addEventCallback("SoMouseButtonEvent", self.clickMouse) + self.callbackKey = self.view.addEventCallback("SoKeyboardEvent", self.KeyboardEvent) + self.partMoving = True + + # Selection filter to avoid selecting the part while it's moving + # filter = Gui.Selection.Filter('SELECT ???') + # Gui.Selection.addSelectionGate(filter) + + def endMove(self): + self.view.removeEventCallback("SoLocation2Event", self.callbackMove) + self.view.removeEventCallback("SoMouseButtonEvent", self.callbackClick) + self.view.removeEventCallback("SoKeyboardEvent", self.callbackKey) + self.partMoving = False + self.doc.recompute() + # Gui.Selection.removeSelectionGate() + + def moveMouse(self, info): + newPos = self.view.getPoint(*info["Position"]) + self.createdLink.Placement.Base = newPos + + def clickMouse(self, info): + if info["Button"] == "BUTTON1" and info["State"] == "DOWN": + if info["ShiftDown"]: + # Create a new link and moves this one now + currentPos = self.createdLink.Placement.Base + selectedPart = self.createdLink.LinkedObject + self.createdLink = self.assembly.newObject("App::Link", selectedPart.Name) + self.createdLink.LinkedObject = selectedPart + self.createdLink.Placement.Base = currentPos + else: + self.endMove() + + # 3D view keyboard handler + def KeyboardEvent(self, info): + if info["State"] == "UP" and info["Key"] == "ESCAPE": + self.endMove() + self.doc.removeObject(self.createdLink.Name) + + # Taskbox keyboard event handler + def eventFilter(self, watched, event): + if watched == self.form and event.type() == QtCore.QEvent.KeyPress: + if event.key() == QtCore.Qt.Key_Escape and self.partMoving: + self.endMove() + self.doc.removeObject(self.createdLink.Name) + return True # Consume the event + return super().eventFilter(watched, event) + + def getTranslationVec(self, part): + bb = part.Shape.BoundBox + if bb: + self.translation += (bb.XMax + bb.YMax + bb.ZMax) * 0.15 + else: + self.translation += 10 + return App.Vector(self.translation, self.translation, self.translation) + + +if App.GuiUp: + Gui.addCommand("Assembly_CreateAssembly", CommandCreateAssembly()) + Gui.addCommand("Assembly_InsertLink", CommandInsertLink()) diff --git a/src/Mod/Assembly/Gui/CMakeLists.txt b/src/Mod/Assembly/Gui/CMakeLists.txt new file mode 100644 index 0000000000..5191a0b7ce --- /dev/null +++ b/src/Mod/Assembly/Gui/CMakeLists.txt @@ -0,0 +1,52 @@ +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +) + +set(AssemblyGui_LIBS + FreeCADGui +) + +PYSIDE_WRAP_RC(Assembly_QRC_SRCS Resources/Assembly.qrc) + +set (Assembly_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Resources/Assembly_translation.qrc) +qt_find_and_add_translation(QM_SRCS "Resources/translations/*_*.ts" + ${CMAKE_CURRENT_BINARY_DIR}/Resources/translations) +qt_create_resource_file(${Assembly_TR_QRC} ${QM_SRCS}) +qt_add_resources(AssemblyResource_SRCS Resources/Assembly.qrc ${Assembly_TR_QRC}) + +SOURCE_GROUP("Resources" FILES ${AssemblyResource_SRCS}) + + +SET(AssemblyGui_SRCS_Module + ${Assembly_QRC_SRCS} +) + +SOURCE_GROUP("Module" FILES ${AssemblyGui_SRCS_Module}) + + +SET(AssemblyGui_SRCS + ${AssemblyResource_SRCS} + ${AssemblyGui_UIC_HDRS} + ${AssemblyGui_SRCS_Module} +) + + +SET(AssemblyGuiIcon_SVG + Resources/icons/AssemblyWorkbench.svg +) + +add_library(AssemblyGui SHARED ${AssemblyGui_SRCS} ${AssemblyGuiIcon_SVG}) +target_link_libraries(AssemblyGui ${AssemblyGui_LIBS}) + +SET_BIN_DIR(AssemblyGui AssemblyGui /Mod/Assembly) +SET_PYTHON_PREFIX_SUFFIX(AssemblyGui) + +fc_copy_sources(AssemblyGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Assembly" ${AssemblyGuiIcon_SVG}) +fc_target_copy_resource(AssemblyGui + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR}/Mod/Assembly + Assembly_rc.py) + +INSTALL(TARGETS AssemblyGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) +INSTALL(FILES ${AssemblyGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Assembly/Resources/icons") diff --git a/src/Mod/Assembly/Gui/Resources/Assembly.qrc b/src/Mod/Assembly/Gui/Resources/Assembly.qrc new file mode 100644 index 0000000000..16439b1016 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/Assembly.qrc @@ -0,0 +1,16 @@ + + + icons/Assembly_InsertLink.svg + icons/preferences-assembly.svg + panels/TaskAssemblyInsertLink.ui + preferences/Assembly.ui + icons/Assembly_CreateJointBall.svg + icons/Assembly_CreateJointCylindrical.svg + icons/Assembly_CreateJointFixed.svg + icons/Assembly_CreateJointParallel.svg + icons/Assembly_CreateJointPlanar.svg + icons/Assembly_CreateJointRevolute.svg + icons/Assembly_CreateJointSlider.svg + icons/Assembly_CreateJointTangent.svg + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/AssemblyWorkbench.svg b/src/Mod/Assembly/Gui/Resources/icons/AssemblyWorkbench.svg new file mode 100644 index 0000000000..768a886fc4 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/AssemblyWorkbench.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + Path-Stock + 2015-07-04 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Path/Gui/Resources/icons/Path-Stock.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/AssemblyWorkbench_alternate.svg b/src/Mod/Assembly/Gui/Resources/icons/AssemblyWorkbench_alternate.svg new file mode 100644 index 0000000000..8b8c99fb47 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/AssemblyWorkbench_alternate.svg @@ -0,0 +1,424 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Path-Stock + 2015-07-04 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Path/Gui/Resources/icons/Path-Stock.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointBall.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointBall.svg new file mode 100644 index 0000000000..7a383d4773 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointBall.svg @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [wmayer] + + + Part_Sphere + 2011-10-10 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Sphere.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointCylindrical.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointCylindrical.svg new file mode 100644 index 0000000000..16cdeaddc3 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointCylindrical.svg @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + [wmayer] + + + Part_Cylinder + 2011-10-10 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Cylinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointFixed.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointFixed.svg new file mode 100644 index 0000000000..fd8d1c3ff5 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointFixed.svg @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + [wmayer] + + + Part_Cylinder + 2011-10-10 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Cylinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointParallel.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointParallel.svg new file mode 100644 index 0000000000..69b8572e07 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointParallel.svg @@ -0,0 +1,251 @@ + + + +image/svg+xml[wmayer]Part_Cylinder2011-10-10http://www.freecad.org/wiki/index.php?title=ArtworkFreeCADFreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Cylinder.svgFreeCAD LGPL2+https://www.gnu.org/copyleft/lesser.html[agryson] Alexander Gryson diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointPlanar.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointPlanar.svg new file mode 100644 index 0000000000..373465c72a --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointPlanar.svg @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + [wmayer] + + + Part_Cylinder + 2011-10-10 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Cylinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointRevolute.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointRevolute.svg new file mode 100644 index 0000000000..7b97448499 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointRevolute.svg @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + [wmayer] + + + Part_Cylinder + 2011-10-10 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Cylinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointSlider.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointSlider.svg new file mode 100644 index 0000000000..fa37d71c5f --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointSlider.svg @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + [wmayer] + + + Part_Cylinder + 2011-10-10 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Cylinder.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointTangent.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointTangent.svg new file mode 100644 index 0000000000..217d36827c --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_CreateJointTangent.svg @@ -0,0 +1,342 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + [wmayer] + + + Part_Sphere + 2011-10-10 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Part/Gui/Resources/icons/Part_Sphere.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/Assembly_InsertLink.svg b/src/Mod/Assembly/Gui/Resources/icons/Assembly_InsertLink.svg new file mode 100644 index 0000000000..677eda4719 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/Assembly_InsertLink.svg @@ -0,0 +1,381 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Path-Stock + 2015-07-04 + http://www.freecadweb.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Path/Gui/Resources/icons/Path-Stock.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/icons/preferences-assembly.svg b/src/Mod/Assembly/Gui/Resources/icons/preferences-assembly.svg new file mode 100644 index 0000000000..768a886fc4 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/icons/preferences-assembly.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + Path-Stock + 2015-07-04 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Path/Gui/Resources/icons/Path-Stock.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/panels/TaskAssemblyInsertLink.ui b/src/Mod/Assembly/Gui/Resources/panels/TaskAssemblyInsertLink.ui new file mode 100644 index 0000000000..76a641643a --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/panels/TaskAssemblyInsertLink.ui @@ -0,0 +1,49 @@ + + + TaskAssemblyInsertLink + + + + 0 + 0 + 376 + 387 + + + + Insert Link + + + + + + Search parts... + + + + + + + + + + + + Don't find your part? + + + + + + + Open file + + + + + + + + + + diff --git a/src/Mod/Assembly/Gui/Resources/preferences/Assembly.ui b/src/Mod/Assembly/Gui/Resources/preferences/Assembly.ui new file mode 100644 index 0000000000..83a06b97c5 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/preferences/Assembly.ui @@ -0,0 +1,34 @@ + + + AssemblyGui::DlgSettingsAssembly + + + + 0 + 0 + 487 + 691 + + + + General + + + + + + Qt::Vertical + + + + 20 + 217 + + + + + + + + + diff --git a/src/Mod/Assembly/Init.py b/src/Mod/Assembly/Init.py new file mode 100644 index 0000000000..9207b0b484 --- /dev/null +++ b/src/Mod/Assembly/Init.py @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +# Get the Parameter Group of this module +ParGrp = App.ParamGet("System parameter:Modules").GetGroup("Assembly") + +# Set the needed information +ParGrp.SetString("HelpIndex", "Assembly/Help/index.html") +ParGrp.SetString("WorkBenchName", "Assembly") +ParGrp.SetString("WorkBenchModule", "AssemblyWorkbench.py") + +FreeCAD.__unit_test__ += ["TestAssemblyWorkbench"] + +# This adds a custom import type to the FreeCAD import dialog. +# The correct format for assembly interoperability is a research topic. ASMT is a placeholder. +FreeCAD.addImportType("Assembly Format (*.asmt)", "AssemblyImport") +# FreeCAD.addExportType() diff --git a/src/Mod/Assembly/InitGui.py b/src/Mod/Assembly/InitGui.py new file mode 100644 index 0000000000..0e63a6d653 --- /dev/null +++ b/src/Mod/Assembly/InitGui.py @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import Assembly_rc + + +class AssemblyCommandGroup: + def __init__(self, cmdlist, menu, tooltip=None): + self.cmdlist = cmdlist + self.menu = menu + if tooltip is None: + self.tooltip = menu + else: + self.tooltip = tooltip + + def GetCommands(self): + return tuple(self.cmdlist) + + def GetResources(self): + return {"MenuText": self.menu, "ToolTip": self.tooltip} + + def IsActive(self): + if FreeCAD.ActiveDocument is not None: + return True + return False + + +class AssemblyWorkbench(Workbench): + "Assembly workbench" + + def __init__(self): + print("Loading Assembly workbench...") + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Assembly/Resources/icons/AssemblyWorkbench.svg" + ) + self.__class__.MenuText = "Assembly" + self.__class__.ToolTip = "Assembly workbench" + + def Initialize(self): + print("Initializing Assembly workbench...") + global AssemblyCommandGroup + + translate = FreeCAD.Qt.translate + + # load the builtin modules + from PySide import QtCore, QtGui + from PySide.QtCore import QT_TRANSLATE_NOOP + import Commands + from Preferences import PreferencesPage + + # from Preferences import preferences + + FreeCADGui.addLanguagePath(":/translations") + FreeCADGui.addIconPath(":/icons") + + FreeCADGui.addPreferencePage(PreferencesPage, QT_TRANSLATE_NOOP("QObject", "Assembly")) + + # build commands list + cmdlist = ["Assembly_CreateAssembly", "Assembly_InsertLink"] + + self.appendToolbar(QT_TRANSLATE_NOOP("Workbench", "Assembly"), cmdlist) + + self.appendMenu( + [QT_TRANSLATE_NOOP("Workbench", "&Assembly")], + cmdlist + ["Separator"], + ) + + print("Assembly workbench loaded") + + def Activated(self): + # update the translation engine + FreeCADGui.updateLocale() + + def Deactivated(self): + pass + + def ContextMenu(self, recipient): + pass + + +Gui.addWorkbench(AssemblyWorkbench()) diff --git a/src/Mod/Assembly/Preferences.py b/src/Mod/Assembly/Preferences.py new file mode 100644 index 0000000000..f5d9b5e57d --- /dev/null +++ b/src/Mod/Assembly/Preferences.py @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import FreeCAD +import FreeCADGui + + +def preferences(): + return FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Assembly") + + +class PreferencesPage: + def __init__(self, parent=None): + self.form = FreeCADGui.PySideUic.loadUi(":preferences/Assembly.ui") + + def saveSettings(self): + pass + + def loadSettings(self): + pass diff --git a/src/Mod/Assembly/TestAssemblyWorkbench.py b/src/Mod/Assembly/TestAssemblyWorkbench.py new file mode 100644 index 0000000000..331d645b1d --- /dev/null +++ b/src/Mod/Assembly/TestAssemblyWorkbench.py @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import TestApp + +from AssemblyTests.TestCore import TestCore + + +# dummy usage to get flake8 and lgtm quiet +False if TestCore.__name__ else True +False if TestApp.__name__ else True diff --git a/src/Mod/Assembly/assembly.dox b/src/Mod/Assembly/assembly.dox new file mode 100644 index 0000000000..4adb844add --- /dev/null +++ b/src/Mod/Assembly/assembly.dox @@ -0,0 +1,4 @@ +/** \defgroup ASSEMBLY Assembly + * \ingroup PYTHONWORKBENCHES + * \brief Tools to build assemblies + */ diff --git a/src/Mod/CMakeLists.txt b/src/Mod/CMakeLists.txt index c83b3f197d..4bef5ea396 100644 --- a/src/Mod/CMakeLists.txt +++ b/src/Mod/CMakeLists.txt @@ -6,6 +6,10 @@ if(BUILD_ARCH) add_subdirectory(Arch) endif(BUILD_ARCH) +if(BUILD_ASSEMBLY) + add_subdirectory(Assembly) +endif(BUILD_ASSEMBLY) + if(BUILD_CLOUD) add_subdirectory(Cloud) endif(BUILD_CLOUD) diff --git a/src/Mod/Cloud/App/AppCloud.cpp b/src/Mod/Cloud/App/AppCloud.cpp index 2ffa0f2c07..bdbc52485f 100644 --- a/src/Mod/Cloud/App/AppCloud.cpp +++ b/src/Mod/Cloud/App/AppCloud.cpp @@ -62,65 +62,74 @@ PyMOD_INIT_FUNC(Cloud) Py::Object Cloud::Module::sCloudURL(const Py::Tuple& args) { - char *URL; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&URL)) + char* URL; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &URL)) { throw Py::Exception(); + } std::string strURL = URL; PyMem_Free(URL); - if (this->URL.getStrValue() != strURL) + if (this->URL.getStrValue() != strURL) { this->URL.setValue(strURL); + } return Py::None(); } Py::Object Cloud::Module::sCloudTokenAuth(const Py::Tuple& args) { - char *TokenAuth; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8", &TokenAuth)) + char* TokenAuth; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &TokenAuth)) { throw Py::Exception(); + } std::string strTokenAuth = TokenAuth; PyMem_Free(TokenAuth); - if (this->TokenAuth.getStrValue() != strTokenAuth) + if (this->TokenAuth.getStrValue() != strTokenAuth) { this->TokenAuth.setValue(strTokenAuth); + } return Py::None(); } Py::Object Cloud::Module::sCloudTokenSecret(const Py::Tuple& args) { - char *TokenSecret; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8", &TokenSecret)) + char* TokenSecret; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &TokenSecret)) { throw Py::Exception(); + } std::string strTokenSecret = TokenSecret; PyMem_Free(TokenSecret); - if (this->TokenSecret.getStrValue() != strTokenSecret) + if (this->TokenSecret.getStrValue() != strTokenSecret) { this->TokenSecret.setValue(strTokenSecret); + } return Py::None(); } Py::Object Cloud::Module::sCloudTCPPort(const Py::Tuple& args) { - char *TCPPort; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8", &TCPPort)) + char* TCPPort; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &TCPPort)) { throw Py::Exception(); + } std::string strTCPPort = TCPPort; PyMem_Free(TCPPort); - if (this->TCPPort.getStrValue() != strTCPPort) + if (this->TCPPort.getStrValue() != strTCPPort) { this->TCPPort.setValue(strTCPPort); + } return Py::None(); } Py::Object Cloud::Module::sCloudSave(const Py::Tuple& args) { - char *pDoc; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8", &pDoc)) + char* pDoc; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &pDoc)) { throw Py::Exception(); + } std::string strpDoc = pDoc; PyMem_Free(pDoc); @@ -132,9 +141,10 @@ Py::Object Cloud::Module::sCloudSave(const Py::Tuple& args) Py::Object Cloud::Module::sCloudRestore(const Py::Tuple& args) { - char *pDoc; - if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &pDoc)) + char* pDoc; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &pDoc)) { throw Py::Exception(); + } std::string strpDoc = pDoc; PyMem_Free(pDoc); @@ -145,1025 +155,1162 @@ Py::Object Cloud::Module::sCloudRestore(const Py::Tuple& args) Py::Object Cloud::Module::sCloudProtocolVersion(const Py::Tuple& args) { - char *ProtocolVersion; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8", &ProtocolVersion)) + char* ProtocolVersion; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &ProtocolVersion)) { throw Py::Exception(); + } std::string strProtocolVersion = ProtocolVersion; PyMem_Free(ProtocolVersion); - if (this->ProtocolVersion.getStrValue() != strProtocolVersion) + if (this->ProtocolVersion.getStrValue() != strProtocolVersion) { this->ProtocolVersion.setValue(strProtocolVersion); + } return Py::None(); } Py::Object Cloud::Module::sCloudRegion(const Py::Tuple& args) { - char *Region; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8", &Region)) + char* Region; + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Region)) { throw Py::Exception(); + } std::string strRegion = Region; PyMem_Free(Region); - if (this->Region.getStrValue() != strRegion) + if (this->Region.getStrValue() != strRegion) { this->Region.setValue(strRegion); + } return Py::None(); } struct data_buffer { - const char *ptr; - size_t remaining_size; + const char* ptr; + size_t remaining_size; }; -static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *stream) +static size_t read_callback(void* ptr, size_t size, size_t nmemb, void* stream) { - struct data_buffer *local_ptr = (struct data_buffer *)stream; - size_t data_to_transfer = size * nmemb; + struct data_buffer* local_ptr = (struct data_buffer*)stream; + size_t data_to_transfer = size * nmemb; - if(local_ptr->remaining_size) { - // copy as much as possible from the source to the destination - size_t copy_this_much = local_ptr->remaining_size; - if(copy_this_much > data_to_transfer) - copy_this_much = data_to_transfer; - memcpy(ptr, local_ptr->ptr, copy_this_much); + if (local_ptr->remaining_size) { + // copy as much as possible from the source to the destination + size_t copy_this_much = local_ptr->remaining_size; + if (copy_this_much > data_to_transfer) { + copy_this_much = data_to_transfer; + } + memcpy(ptr, local_ptr->ptr, copy_this_much); - local_ptr->ptr += copy_this_much; - local_ptr->remaining_size -= copy_this_much; - return copy_this_much; - } + local_ptr->ptr += copy_this_much; + local_ptr->remaining_size -= copy_this_much; + return copy_this_much; + } - return 0; + return 0; } -void Cloud::CloudWriter::checkXML(DOMNode* node) { - if (node) { - switch (node->getNodeType()) { - case DOMNode::ELEMENT_NODE: +void Cloud::CloudWriter::checkXML(DOMNode* node) +{ + if (node) { + switch (node->getNodeType()) { + case DOMNode::ELEMENT_NODE: checkElement(static_cast(node)); break; - case DOMNode::TEXT_NODE: + case DOMNode::TEXT_NODE: checkText(static_cast(node)); break; - default: + default: break; - } - DOMNode* child = node->getFirstChild(); - while (child) { - DOMNode* next = child->getNextSibling(); - checkXML(child); - child = next; - } - } + } + DOMNode* child = node->getFirstChild(); + while (child) { + DOMNode* next = child->getNextSibling(); + checkXML(child); + child = next; + } + } } -void Cloud::CloudWriter::checkElement(DOMElement* element) { - char* name = XMLString::transcode(element->getTagName()); - if ( strcmp(name, "Code") == 0 ) - print=1; - XMLString::release(&name); - +void Cloud::CloudWriter::checkElement(DOMElement* element) +{ + char* name = XMLString::transcode(element->getTagName()); + if (strcmp(name, "Code") == 0) { + print = 1; + } + XMLString::release(&name); } -void Cloud::CloudWriter::checkText(DOMText* text) { +void Cloud::CloudWriter::checkText(DOMText* text) +{ - XMLCh* buffer = new XMLCh[XMLString::stringLen(text->getData()) + 1]; - XMLString::copyString(buffer, text->getData()); - XMLString::trim(buffer); - char* content=XMLString::transcode(buffer); - delete[] buffer; - if ( print ) - { - strcpy(errorCode,content); - } - print=0; - XMLString::release(&content); + XMLCh* buffer = new XMLCh[XMLString::stringLen(text->getData()) + 1]; + XMLString::copyString(buffer, text->getData()); + XMLString::trim(buffer); + char* content = XMLString::transcode(buffer); + delete[] buffer; + if (print) { + strcpy(errorCode, content); + } + print = 0; + XMLString::release(&content); } void Cloud::CloudWriter::createBucket() { - struct Cloud::AmzData *RequestData; - struct Cloud::AmzDatav4 *RequestDatav4; - CURL *curl; - CURLcode res; + struct Cloud::AmzData* RequestData; + struct Cloud::AmzDatav4* RequestDatav4; + CURL* curl; + CURLcode res; - struct data_buffer curl_buffer; + struct data_buffer curl_buffer; - char path[1024]; - sprintf(path, "/%s/", this->Bucket); - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); + char path[1024]; + sprintf(path, "/%s/", this->Bucket); + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); - if ( this->ProtocolVersion == "2" ) - RequestData = Cloud::ComputeDigestAmzS3v2("PUT", "application/xml", path, this->TokenSecret, nullptr, 0); - else - RequestDatav4 = Cloud::ComputeDigestAmzS3v4("PUT", strURL.c_str(), "application/xml", path, this->TokenSecret, nullptr, 0, nullptr, this->Region); + if (this->ProtocolVersion == "2") { + RequestData = Cloud::ComputeDigestAmzS3v2("PUT", + "application/xml", + path, + this->TokenSecret, + nullptr, + 0); + } + else { + RequestDatav4 = Cloud::ComputeDigestAmzS3v4("PUT", + strURL.c_str(), + "application/xml", + path, + this->TokenSecret, + nullptr, + 0, + nullptr, + this->Region); + } - // Let's build the Header and call to curl - curl_global_init(CURL_GLOBAL_ALL); - curl = curl_easy_init(); + // Let's build the Header and call to curl + curl_global_init(CURL_GLOBAL_ALL); + curl = curl_easy_init(); #ifdef ALLOW_SELF_SIGNED_CERTIFICATE - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); #endif - if ( curl ) - { - struct curl_slist *chunk = nullptr; - char URL[256]; - // Let's build our own header - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( this->ProtocolVersion == "2" ) - { - chunk = Cloud::BuildHeaderAmzS3v2( strURL.c_str(), this->TCPPort, this->TokenAuth, RequestData); - delete RequestData; - } - else - { - chunk = Cloud::BuildHeaderAmzS3v4( strURL.c_str(), this->TokenAuth, RequestDatav4); - delete RequestDatav4; - } - - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - - // Lets build the URL for our Curl call - - sprintf(URL,"%s:%s/%s/", this->URL,this->TCPPort, - this->Bucket); - curl_easy_setopt(curl, CURLOPT_URL, URL); - - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); - curl_easy_setopt(curl, CURLOPT_PUT, 1L); - // curl read a file not a memory buffer (it shall be able to do it) - curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); - - curl_buffer.ptr = nullptr; - curl_buffer.remaining_size = (size_t) 0; - - curl_easy_setopt(curl, CURLOPT_READDATA, &curl_buffer); - - curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, - (curl_off_t)0); - res = curl_easy_perform(curl); - if(res != CURLE_OK) - fprintf(stderr, "curl_easy_perform() failed: %s\n", - curl_easy_strerror(res)); - curl_easy_cleanup(curl); + if (curl) { + struct curl_slist* chunk = nullptr; + char URL[256]; + // Let's build our own header + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (this->ProtocolVersion == "2") { + chunk = Cloud::BuildHeaderAmzS3v2(strURL.c_str(), + this->TCPPort, + this->TokenAuth, + RequestData); + delete RequestData; } + else { + chunk = Cloud::BuildHeaderAmzS3v4(strURL.c_str(), this->TokenAuth, RequestDatav4); + delete RequestDatav4; + } + + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); + + // Lets build the URL for our Curl call + + sprintf(URL, "%s:%s/%s/", this->URL, this->TCPPort, this->Bucket); + curl_easy_setopt(curl, CURLOPT_URL, URL); + + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); + curl_easy_setopt(curl, CURLOPT_PUT, 1L); + // curl read a file not a memory buffer (it shall be able to do it) + curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); + + curl_buffer.ptr = nullptr; + curl_buffer.remaining_size = (size_t)0; + + curl_easy_setopt(curl, CURLOPT_READDATA, &curl_buffer); + + curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)0); + res = curl_easy_perform(curl); + if (res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); + } + curl_easy_cleanup(curl); + } } // -//#if defined(FC_OS_WIN32) +// #if defined(FC_OS_WIN32) // -//#include -//#undef timezone +// #include +// #undef timezone // // -//int gettimeofday( time_t* tp, struct timezone* tzp) { +// int gettimeofday( time_t* tp, struct timezone* tzp) { // namespace sc = std::chrono; // sc::system_clock::duration d = sc::system_clock::now().time_since_epoch(); // sc::seconds s = sc::duration_cast(d); // tp->tv_sec = s.count(); // tp->tv_usec = sc::duration_cast(d - s).count(); -// +// // return 0; //} -//#endif +// #endif -struct Cloud::AmzDatav4 *Cloud::ComputeDigestAmzS3v4(char *operation, const char *server, char *data_type, const char *target, const char *Secret, const char *ptr, long size, char *parameters, std::string Region) +struct Cloud::AmzDatav4* Cloud::ComputeDigestAmzS3v4(char* operation, + const char* server, + char* data_type, + const char* target, + const char* Secret, + const char* ptr, + long size, + char* parameters, + std::string Region) { - struct AmzDatav4 *returnData; - returnData = new Cloud::AmzDatav4; - struct tm *tm; - char *canonical_request; - char *canonicalRequestHash; - char *stringToSign; + struct AmzDatav4* returnData; + returnData = new Cloud::AmzDatav4; + struct tm* tm; + char* canonical_request; + char* canonicalRequestHash; + char* stringToSign; - strcpy(returnData->ContentType, data_type); + strcpy(returnData->ContentType, data_type); #if defined(FC_OS_WIN32) - _putenv("TZ=GMT"); - time_t rawtime; + _putenv("TZ=GMT"); + time_t rawtime; - time(&rawtime); - tm = localtime(&rawtime); + time(&rawtime); + tm = localtime(&rawtime); #else - struct timeval tv; - setenv("TZ","GMT",1); - gettimeofday(&tv, nullptr); - tm = localtime(&tv.tv_sec); + struct timeval tv; + setenv("TZ", "GMT", 1); + gettimeofday(&tv, nullptr); + tm = localtime(&tv.tv_sec); #endif - strftime(returnData->dateFormattedD,256,"%Y%m%d", tm); - strftime(returnData->dateFormattedS,256,"%Y%m%dT%H%M%SZ", tm); - returnData->MD5=nullptr; + strftime(returnData->dateFormattedD, 256, "%Y%m%d", tm); + strftime(returnData->dateFormattedS, 256, "%Y%m%dT%H%M%SZ", tm); + returnData->MD5 = nullptr; -// We must evaluate the canonical request - canonical_request=(char *) malloc(4096*(sizeof(char*))); - strcpy(canonical_request,operation); - strcat(canonical_request,"\n"); - strcat(canonical_request,target); - strcat(canonical_request,"\n"); - if ( parameters == nullptr ) - strcat(canonical_request,"\n"); - else - { - strcat(canonical_request,parameters); - strcat(canonical_request,"\n"); - } - strcat(canonical_request,"host:"); - strcat(canonical_request,server); + // We must evaluate the canonical request + canonical_request = (char*)malloc(4096 * (sizeof(char*))); + strcpy(canonical_request, operation); + strcat(canonical_request, "\n"); + strcat(canonical_request, target); + strcat(canonical_request, "\n"); + if (parameters == nullptr) { strcat(canonical_request, "\n"); - strcat(canonical_request, "x-amz-date:"); - strcat(canonical_request, returnData->dateFormattedS); - strcat(canonical_request, "\n\n"); - strcat(canonical_request, "host;x-amz-date\n"); - // We must add there the file SHA256 Hash - returnData->SHA256Sum=nullptr; - if ( strcmp(operation,"PUT") == 0 ) - { - if ( ptr != nullptr ) - { - returnData->SHA256Sum=Cloud::SHA256Sum(ptr,size); - strcat(canonical_request, returnData->SHA256Sum); - } - else - strcat(canonical_request,"UNSIGNED-PAYLOAD"); + } + else { + strcat(canonical_request, parameters); + strcat(canonical_request, "\n"); + } + strcat(canonical_request, "host:"); + strcat(canonical_request, server); + strcat(canonical_request, "\n"); + strcat(canonical_request, "x-amz-date:"); + strcat(canonical_request, returnData->dateFormattedS); + strcat(canonical_request, "\n\n"); + strcat(canonical_request, "host;x-amz-date\n"); + // We must add there the file SHA256 Hash + returnData->SHA256Sum = nullptr; + if (strcmp(operation, "PUT") == 0) { + if (ptr != nullptr) { + returnData->SHA256Sum = Cloud::SHA256Sum(ptr, size); + strcat(canonical_request, returnData->SHA256Sum); } - else - { - strcat(canonical_request,"UNSIGNED-PAYLOAD"); + else { + strcat(canonical_request, "UNSIGNED-PAYLOAD"); } - canonicalRequestHash = Cloud::SHA256Sum(canonical_request, strlen(canonical_request)); - // returnData->digest = string(digest); + } + else { + strcat(canonical_request, "UNSIGNED-PAYLOAD"); + } + canonicalRequestHash = Cloud::SHA256Sum(canonical_request, strlen(canonical_request)); + // returnData->digest = string(digest); - // We need now to sign a string which contain the digest - // The format is as follow - // ${authType} - // ${dateValueL} - // ${dateValueS}/${Region}/${service}/aws4_request - // ${canonicalRequestHash}" + // We need now to sign a string which contain the digest + // The format is as follow + // ${authType} + // ${dateValueL} + // ${dateValueS}/${Region}/${service}/aws4_request + // ${canonicalRequestHash}" - stringToSign = (char *)malloc(4096*sizeof(char)); - strcat(stringToSign, "AWS4-HMAC-SHA256"); - strcat(stringToSign,"\n"); - strcat(stringToSign,returnData->dateFormattedS); - strcat(stringToSign,"\n"); - strcat(stringToSign,returnData->dateFormattedD); - strcat(stringToSign,"/us/s3/aws4_request"); - strcat(stringToSign,"\n"); - strcat(stringToSign,canonicalRequestHash); - strcat(stringToSign,"\0"); + stringToSign = (char*)malloc(4096 * sizeof(char)); + strcat(stringToSign, "AWS4-HMAC-SHA256"); + strcat(stringToSign, "\n"); + strcat(stringToSign, returnData->dateFormattedS); + strcat(stringToSign, "\n"); + strcat(stringToSign, returnData->dateFormattedD); + strcat(stringToSign, "/us/s3/aws4_request"); + strcat(stringToSign, "\n"); + strcat(stringToSign, canonicalRequestHash); + strcat(stringToSign, "\0"); - // We must now compute the signature - // Everything starts with the secret key and an SHA256 HMAC encryption - char kSecret[256]; - unsigned char *kDate, *kRegion, *kService, *kSigned, *kSigning; + // We must now compute the signature + // Everything starts with the secret key and an SHA256 HMAC encryption + char kSecret[256]; + unsigned char *kDate, *kRegion, *kService, *kSigned, *kSigning; - strcpy(kSecret,"AWS4"); - strcat(kSecret,Secret); - unsigned int HMACLength; + strcpy(kSecret, "AWS4"); + strcat(kSecret, Secret); + unsigned int HMACLength; - std::string temporary; + std::string temporary; - kDate = HMAC(EVP_sha256(),kSecret,strlen(kSecret), - (const unsigned char *)returnData->dateFormattedD,strlen(returnData->dateFormattedD),nullptr,&HMACLength); + kDate = HMAC(EVP_sha256(), + kSecret, + strlen(kSecret), + (const unsigned char*)returnData->dateFormattedD, + strlen(returnData->dateFormattedD), + nullptr, + &HMACLength); - temporary = getHexValue(kDate,HMACLength); - temporary = getHexValue(kDate,HMACLength); + temporary = getHexValue(kDate, HMACLength); + temporary = getHexValue(kDate, HMACLength); - // We can now compute the remaining parts - kRegion = HMAC(EVP_sha256(),kDate,HMACLength, - (const unsigned char *)Region.c_str(),strlen(Region.c_str()),nullptr,&HMACLength); + // We can now compute the remaining parts + kRegion = HMAC(EVP_sha256(), + kDate, + HMACLength, + (const unsigned char*)Region.c_str(), + strlen(Region.c_str()), + nullptr, + &HMACLength); - temporary = getHexValue(kRegion,HMACLength); + temporary = getHexValue(kRegion, HMACLength); - kService = HMAC(EVP_sha256(),kRegion,HMACLength, - (const unsigned char *)"s3",strlen("s3"),nullptr,&HMACLength); + kService = HMAC(EVP_sha256(), + kRegion, + HMACLength, + (const unsigned char*)"s3", + strlen("s3"), + nullptr, + &HMACLength); - temporary = getHexValue(kService,HMACLength); + temporary = getHexValue(kService, HMACLength); - kSigning = HMAC(EVP_sha256(),kService,HMACLength, - (const unsigned char *)"aws4_request",strlen("aws4_request"),nullptr,&HMACLength); + kSigning = HMAC(EVP_sha256(), + kService, + HMACLength, + (const unsigned char*)"aws4_request", + strlen("aws4_request"), + nullptr, + &HMACLength); - temporary = getHexValue(kService,HMACLength); + temporary = getHexValue(kService, HMACLength); - kSigned = HMAC(EVP_sha256(),kSigning,HMACLength, - (const unsigned char *)stringToSign,strlen(stringToSign),nullptr,&HMACLength); + kSigned = HMAC(EVP_sha256(), + kSigning, + HMACLength, + (const unsigned char*)stringToSign, + strlen(stringToSign), + nullptr, + &HMACLength); - temporary = getHexValue(kSigned,HMACLength); + temporary = getHexValue(kSigned, HMACLength); - returnData->digest=string(temporary); - returnData->Region = Region; - free(canonical_request); - return(returnData); + returnData->digest = string(temporary); + returnData->Region = Region; + free(canonical_request); + return (returnData); } -std::string Cloud::getHexValue(unsigned char *input, unsigned int HMACLength) +std::string Cloud::getHexValue(unsigned char* input, unsigned int HMACLength) { - char *Hex; - unsigned char *ptr = input; - std::string resultReadable; - Hex = (char *)malloc(HMACLength*2*sizeof(char)+1); - for ( unsigned int i = 0 ; i < HMACLength ; i++ ) { - sprintf(Hex,"%02x", *ptr); - ptr++; - Hex[2]='\0'; - resultReadable+= Hex; - } - return resultReadable; + char* Hex; + unsigned char* ptr = input; + std::string resultReadable; + Hex = (char*)malloc(HMACLength * 2 * sizeof(char) + 1); + for (unsigned int i = 0; i < HMACLength; i++) { + sprintf(Hex, "%02x", *ptr); + ptr++; + Hex[2] = '\0'; + resultReadable += Hex; + } + return resultReadable; } -struct Cloud::AmzData *Cloud::ComputeDigestAmzS3v2(char *operation, char *data_type, const char *target, const char *Secret, const char *ptr, long size) +struct Cloud::AmzData* Cloud::ComputeDigestAmzS3v2(char* operation, + char* data_type, + const char* target, + const char* Secret, + const char* ptr, + long size) { - struct AmzData *returnData; - //struct timeval tv; - struct tm *tm; - char date_formatted[256]; - char StringToSign[1024]; - unsigned char *digest; - unsigned int HMACLength; - // Amazon S3 and Swift require the timezone to be define to GMT. - // As to simplify the conversion this is performed through the TZ - // environment variable and a call to localtime as to convert output of gettimeofday - returnData = new Cloud::AmzData; - strcpy(returnData->ContentType, data_type); + struct AmzData* returnData; + // struct timeval tv; + struct tm* tm; + char date_formatted[256]; + char StringToSign[1024]; + unsigned char* digest; + unsigned int HMACLength; + // Amazon S3 and Swift require the timezone to be define to GMT. + // As to simplify the conversion this is performed through the TZ + // environment variable and a call to localtime as to convert output of gettimeofday + returnData = new Cloud::AmzData; + strcpy(returnData->ContentType, data_type); #if defined(FC_OS_WIN32) - _putenv("TZ=GMT"); - time_t rawtime; + _putenv("TZ=GMT"); + time_t rawtime; - time(&rawtime); - tm = localtime(&rawtime); + time(&rawtime); + tm = localtime(&rawtime); #else - struct timeval tv; - setenv("TZ","GMT",1); - gettimeofday(&tv, nullptr); - tm = localtime(&tv.tv_sec); + struct timeval tv; + setenv("TZ", "GMT", 1); + gettimeofday(&tv, nullptr); + tm = localtime(&tv.tv_sec); #endif - strftime(date_formatted,256,"%a, %d %b %Y %T %z", tm); - returnData->MD5=nullptr; - if ( strcmp(operation,"PUT") == 0 ) - { - if ( ptr != nullptr ) - { - returnData->MD5=Cloud::MD5Sum(ptr,size); - sprintf(StringToSign,"%s\n%s\n%s\n%s\n%s", operation, returnData->MD5, data_type, date_formatted, target); - } - else - sprintf(StringToSign,"%s\n\n%s\n%s\n%s", operation, data_type, date_formatted, target); + strftime(date_formatted, 256, "%a, %d %b %Y %T %z", tm); + returnData->MD5 = nullptr; + if (strcmp(operation, "PUT") == 0) { + if (ptr != nullptr) { + returnData->MD5 = Cloud::MD5Sum(ptr, size); + sprintf(StringToSign, + "%s\n%s\n%s\n%s\n%s", + operation, + returnData->MD5, + data_type, + date_formatted, + target); } - else - sprintf(StringToSign,"%s\n\n%s\n%s\n%s", operation, data_type, date_formatted, target); - // We have to use HMAC encoding and SHA1 - digest=HMAC(EVP_sha1(),Secret,strlen(Secret), - (const unsigned char *)&StringToSign,strlen(StringToSign),nullptr,&HMACLength); - returnData->digest = Base::base64_encode(digest,HMACLength); - strcpy(returnData->dateFormatted,date_formatted); - return returnData; + else { + sprintf(StringToSign, "%s\n\n%s\n%s\n%s", operation, data_type, date_formatted, target); + } + } + else { + sprintf(StringToSign, "%s\n\n%s\n%s\n%s", operation, data_type, date_formatted, target); + } + // We have to use HMAC encoding and SHA1 + digest = HMAC(EVP_sha1(), + Secret, + strlen(Secret), + (const unsigned char*)&StringToSign, + strlen(StringToSign), + nullptr, + &HMACLength); + returnData->digest = Base::base64_encode(digest, HMACLength); + strcpy(returnData->dateFormatted, date_formatted); + return returnData; } -char *Cloud::SHA256Sum(const char *ptr, long size) +char* Cloud::SHA256Sum(const char* ptr, long size) { - char *output; - std::string local; - std::string resultReadable; - unsigned char result[SHA256_DIGEST_LENGTH]; - char *Hex; - output=(char *)malloc(2*SHA256_DIGEST_LENGTH*sizeof(char)+1); - Hex = (char *)malloc(2*sizeof(char)+1); - SHA256((unsigned char*) ptr, size, result); + char* output; + std::string local; + std::string resultReadable; + unsigned char result[SHA256_DIGEST_LENGTH]; + char* Hex; + output = (char*)malloc(2 * SHA256_DIGEST_LENGTH * sizeof(char) + 1); + Hex = (char*)malloc(2 * sizeof(char) + 1); + SHA256((unsigned char*)ptr, size, result); - strcpy(output,getHexValue(result, SHA256_DIGEST_LENGTH).c_str()); + strcpy(output, getHexValue(result, SHA256_DIGEST_LENGTH).c_str()); - return(output); + return (output); } -char *Cloud::MD5Sum(const char *ptr, long size) +char* Cloud::MD5Sum(const char* ptr, long size) { - char *output; - std::string local; - unsigned char result[MD5_DIGEST_LENGTH]; - output=(char *)malloc(2*MD5_DIGEST_LENGTH*sizeof(char)+1); - MD5((unsigned char*) ptr, size, result); - local= Base::base64_encode(result,MD5_DIGEST_LENGTH); - strcpy(output,local.c_str()); - return(output); + char* output; + std::string local; + unsigned char result[MD5_DIGEST_LENGTH]; + output = (char*)malloc(2 * MD5_DIGEST_LENGTH * sizeof(char) + 1); + MD5((unsigned char*)ptr, size, result); + local = Base::base64_encode(result, MD5_DIGEST_LENGTH); + strcpy(output, local.c_str()); + return (output); } -struct curl_slist *Cloud::BuildHeaderAmzS3v4(const char *URL, const char *PublicKey, struct Cloud::AmzDatav4 *Data) +struct curl_slist* +Cloud::BuildHeaderAmzS3v4(const char* URL, const char* PublicKey, struct Cloud::AmzDatav4* Data) { - char header_data[1024]; - struct curl_slist *chunk = nullptr; + char header_data[1024]; + struct curl_slist* chunk = nullptr; - // Build the Host: entry - // sprintf(header_data,"Host: %s:%s", URL, TCPPort); - sprintf(header_data,"Host: %s", URL); + // Build the Host: entry + // sprintf(header_data,"Host: %s:%s", URL, TCPPort); + sprintf(header_data, "Host: %s", URL); + chunk = curl_slist_append(chunk, header_data); + + // Build the Date entry + + sprintf(header_data, "X-Amz-Date: %s", Data->dateFormattedS); + chunk = curl_slist_append(chunk, header_data); + + // Build the Content-Type entry + + sprintf(header_data, "Content-Type:%s", Data->ContentType); + chunk = curl_slist_append(chunk, header_data); + + // If ptr is not null we must compute the MD5-Sum as to validate later the ETag + // and add the MD5-Content: entry to the header + if (Data->MD5 != nullptr) { + sprintf(header_data, "Content-MD5: %s", Data->MD5); chunk = curl_slist_append(chunk, header_data); + // We don't need it anymore we can free it + free((void*)Data->MD5); + } - // Build the Date entry - - sprintf(header_data,"X-Amz-Date: %s", Data->dateFormattedS); + if (Data->SHA256Sum != nullptr) { + sprintf(header_data, "x-amz-content-sha256: %s", Data->SHA256Sum); chunk = curl_slist_append(chunk, header_data); + // We don't need it anymore we can free it + free((void*)Data->SHA256Sum); + } + else { + chunk = curl_slist_append(chunk, "x-amz-content-sha256: UNSIGNED-PAYLOAD"); + } - // Build the Content-Type entry + // build the Auth entry + sprintf(header_data, + "Authorization: AWS4-HMAC-SHA256 Credential=%s/%s/%s/%s/aws4_request, " + "SignedHeaders=%s, Signature=%s", + PublicKey, + Data->dateFormattedD, + "us", + "s3", + "host;x-amz-date", + Data->digest.c_str()); + chunk = curl_slist_append(chunk, header_data); - sprintf(header_data,"Content-Type:%s", Data->ContentType); - chunk = curl_slist_append(chunk, header_data); - - // If ptr is not null we must compute the MD5-Sum as to validate later the ETag - // and add the MD5-Content: entry to the header - if ( Data->MD5 != nullptr ) - { - sprintf(header_data,"Content-MD5: %s", Data->MD5); - chunk = curl_slist_append(chunk, header_data); - // We don't need it anymore we can free it - free((void *)Data->MD5); - } - - if ( Data->SHA256Sum != nullptr ) - { - sprintf(header_data,"x-amz-content-sha256: %s", Data->SHA256Sum); - chunk = curl_slist_append(chunk, header_data); - // We don't need it anymore we can free it - free((void *)Data->SHA256Sum); - } - else - { - chunk = curl_slist_append(chunk, "x-amz-content-sha256: UNSIGNED-PAYLOAD"); - } - - // build the Auth entry - sprintf(header_data,"Authorization: AWS4-HMAC-SHA256 Credential=%s/%s/%s/%s/aws4_request, SignedHeaders=%s, Signature=%s", PublicKey, Data->dateFormattedD,"us","s3","host;x-amz-date", - Data->digest.c_str()); - chunk = curl_slist_append(chunk, header_data); - - return chunk; + return chunk; } -struct curl_slist *Cloud::BuildHeaderAmzS3v2(const char *URL, const char *TCPPort, const char *PublicKey, struct Cloud::AmzData *Data) +struct curl_slist* Cloud::BuildHeaderAmzS3v2(const char* URL, + const char* TCPPort, + const char* PublicKey, + struct Cloud::AmzData* Data) { - char header_data[1024]; - struct curl_slist *chunk = nullptr; + char header_data[1024]; + struct curl_slist* chunk = nullptr; - // Build the Host: entry + // Build the Host: entry - sprintf(header_data,"Host: %s:%s", URL, TCPPort); + sprintf(header_data, "Host: %s:%s", URL, TCPPort); + chunk = curl_slist_append(chunk, header_data); + // Build the Date entry + + sprintf(header_data, "Date: %s", Data->dateFormatted); + chunk = curl_slist_append(chunk, header_data); + // Build the Content-Type entry + + sprintf(header_data, "Content-Type:%s", Data->ContentType); + chunk = curl_slist_append(chunk, header_data); + + // If ptr is not null we must compute the MD5-Sum as to validate later the ETag + // and add the MD5-Content: entry to the header + if (Data->MD5 != nullptr) { + sprintf(header_data, "Content-MD5: %s", Data->MD5); chunk = curl_slist_append(chunk, header_data); - // Build the Date entry + // We don't need it anymore we can free it + free((void*)Data->MD5); + } - sprintf(header_data,"Date: %s", Data->dateFormatted); - chunk = curl_slist_append(chunk, header_data); - // Build the Content-Type entry + // build the Auth entry - sprintf(header_data,"Content-Type:%s", Data->ContentType); - chunk = curl_slist_append(chunk, header_data); + sprintf(header_data, "Authorization: AWS %s:%s", PublicKey, Data->digest.c_str()); + chunk = curl_slist_append(chunk, header_data); - // If ptr is not null we must compute the MD5-Sum as to validate later the ETag - // and add the MD5-Content: entry to the header - if ( Data->MD5 != nullptr ) - { - sprintf(header_data,"Content-MD5: %s", Data->MD5); - chunk = curl_slist_append(chunk, header_data); - // We don't need it anymore we can free it - free((void *)Data->MD5); - } - - // build the Auth entry - - sprintf(header_data,"Authorization: AWS %s:%s", PublicKey, - Data->digest.c_str()); - chunk = curl_slist_append(chunk, header_data); - - return chunk; + return chunk; } -Cloud::CloudWriter::CloudWriter(const char* URL, const char* TokenAuth, const char* TokenSecret, const char* TCPPort, const char* Bucket, std::string ProtocolVersion, std::string Region) +Cloud::CloudWriter::CloudWriter(const char* URL, + const char* TokenAuth, + const char* TokenSecret, + const char* TCPPort, + const char* Bucket, + std::string ProtocolVersion, + std::string Region) { - struct Cloud::AmzData *RequestData; - struct Cloud::AmzDatav4 *RequestDatav4; - CURL *curl; - CURLcode res; + struct Cloud::AmzData* RequestData; + struct Cloud::AmzDatav4* RequestDatav4; + CURL* curl; + CURLcode res; - std::string s; + std::string s; - this->URL=URL; - this->TokenAuth=TokenAuth; - this->TokenSecret=TokenSecret; - this->TCPPort=TCPPort; - this->Bucket=Bucket; - if ( !ProtocolVersion.empty() ) - this->ProtocolVersion=ProtocolVersion; - else - this->ProtocolVersion="2"; - this->Region=Region; - this->FileName=""; - char path[1024]; - sprintf(path,"/%s/", this->Bucket); - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( this->ProtocolVersion == "2" ) - RequestData = Cloud::ComputeDigestAmzS3v2("GET", "application/xml", path, this->TokenSecret, nullptr, 0); - else - RequestDatav4 = Cloud::ComputeDigestAmzS3v4("GET", strURL.c_str(), "application/xml", path, this->TokenSecret, nullptr, 0, nullptr, this->Region); - // Let's build the Header and call to curl - curl_global_init(CURL_GLOBAL_ALL); - curl = curl_easy_init(); + this->URL = URL; + this->TokenAuth = TokenAuth; + this->TokenSecret = TokenSecret; + this->TCPPort = TCPPort; + this->Bucket = Bucket; + if (!ProtocolVersion.empty()) { + this->ProtocolVersion = ProtocolVersion; + } + else { + this->ProtocolVersion = "2"; + } + this->Region = Region; + this->FileName = ""; + char path[1024]; + sprintf(path, "/%s/", this->Bucket); + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (this->ProtocolVersion == "2") { + RequestData = Cloud::ComputeDigestAmzS3v2("GET", + "application/xml", + path, + this->TokenSecret, + nullptr, + 0); + } + else { + RequestDatav4 = Cloud::ComputeDigestAmzS3v4("GET", + strURL.c_str(), + "application/xml", + path, + this->TokenSecret, + nullptr, + 0, + nullptr, + this->Region); + } + // Let's build the Header and call to curl + curl_global_init(CURL_GLOBAL_ALL); + curl = curl_easy_init(); #ifdef ALLOW_SELF_SIGNED_CERTIFICATE - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); #endif - if ( curl ) - { - // Let's build our own header - struct curl_slist *chunk = nullptr; - char URL[256]; - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( this->ProtocolVersion == "2") - { - chunk = Cloud::BuildHeaderAmzS3v2( strURL.c_str(), this->TCPPort, this->TokenAuth, RequestData); - delete RequestData; - } - else - { - chunk = Cloud::BuildHeaderAmzS3v4( strURL.c_str(), this->TokenAuth, RequestDatav4); - delete RequestDatav4; - } - - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - - // Lets build the URL for our Curl call - - sprintf(URL,"%s:%s/%s/", this->URL,this->TCPPort, - this->Bucket); - curl_easy_setopt(curl, CURLOPT_URL, URL); - - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWrite_CallbackFunc_StdString); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); - // curl read a file not a memory buffer (it shall be able to do it) - res = curl_easy_perform(curl); - if(res != CURLE_OK) - fprintf(stderr, "curl_easy_perform() failed: %s\n", - curl_easy_strerror(res)); - curl_easy_cleanup(curl); - createBucket(); - // Lets dump temporarily for debug purposes of s3v4 implementation - std::stringstream input(s); - - try { XMLPlatformUtils::Initialize(); } - catch (const XMLException& toCatch) { - char* message = XMLString::transcode(toCatch.getMessage()); - cout << "Error during initialization! :\n" - << message << "\n"; - XMLString::release(&message); - return ; - } - - XercesDOMParser* parser = new XercesDOMParser(); - parser->setValidationScheme(XercesDOMParser::Val_Always); - parser->setDoNamespaces(true); - - xercesc::MemBufInputSource myxml_buf((const XMLByte *const)s.c_str(), s.size(), - "myxml (in memory)"); - - parser->parse(myxml_buf); - auto* dom=parser->getDocument(); - // Is there an Error entry into the document ? - // if yes, then we must create the Bucket - checkXML(dom); - if ( strcmp(errorCode,"NoSuchBucket") == 0 ) - { - // we must create the Bucket using a PUT request - createBucket(); - } + if (curl) { + // Let's build our own header + struct curl_slist* chunk = nullptr; + char URL[256]; + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (this->ProtocolVersion == "2") { + chunk = Cloud::BuildHeaderAmzS3v2(strURL.c_str(), + this->TCPPort, + this->TokenAuth, + RequestData); + delete RequestData; + } + else { + chunk = Cloud::BuildHeaderAmzS3v4(strURL.c_str(), this->TokenAuth, RequestDatav4); + delete RequestDatav4; } + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); + + // Lets build the URL for our Curl call + + sprintf(URL, "%s:%s/%s/", this->URL, this->TCPPort, this->Bucket); + curl_easy_setopt(curl, CURLOPT_URL, URL); + + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWrite_CallbackFunc_StdString); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); + // curl read a file not a memory buffer (it shall be able to do it) + res = curl_easy_perform(curl); + if (res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); + } + curl_easy_cleanup(curl); + createBucket(); + // Lets dump temporarily for debug purposes of s3v4 implementation + std::stringstream input(s); + + try { + XMLPlatformUtils::Initialize(); + } + catch (const XMLException& toCatch) { + char* message = XMLString::transcode(toCatch.getMessage()); + cout << "Error during initialization! :\n" << message << "\n"; + XMLString::release(&message); + return; + } + + XercesDOMParser* parser = new XercesDOMParser(); + parser->setValidationScheme(XercesDOMParser::Val_Always); + parser->setDoNamespaces(true); + + xercesc::MemBufInputSource myxml_buf((const XMLByte* const)s.c_str(), + s.size(), + "myxml (in memory)"); + + parser->parse(myxml_buf); + auto* dom = parser->getDocument(); + // Is there an Error entry into the document ? + // if yes, then we must create the Bucket + checkXML(dom); + if (strcmp(errorCode, "NoSuchBucket") == 0) { + // we must create the Bucket using a PUT request + createBucket(); + } + } } Cloud::CloudWriter::~CloudWriter() -{ -} +{} -size_t Cloud::CurlWrite_CallbackFunc_StdString(void *contents, size_t size, size_t nmemb, std::string *s) +size_t +Cloud::CurlWrite_CallbackFunc_StdString(void* contents, size_t size, size_t nmemb, std::string* s) { - size_t newLength = size*nmemb; - try - { + size_t newLength = size * nmemb; + try { s->append((char*)contents, newLength); } - catch(std::bad_alloc &) - { - //handle memory problem + catch (std::bad_alloc&) { + // handle memory problem return 0; } return newLength; } -void Cloud::CloudReader::checkElement(DOMElement* element) { - char* name = XMLString::transcode(element->getTagName()); - if ( strcmp(name, "Key") == 0 ) - file=1; - if ( strcmp(name, "NextContinuationToken") == 0 ) - { - continuation=1; - } - if ( strcmp(name, "IsTruncated") == 0 ) - { - truncated=1; - } - XMLString::release(&name); - -} - -void Cloud::CloudReader::checkText(DOMText* text) { - - XMLCh* buffer = new XMLCh[XMLString::stringLen(text->getData()) + 1]; - XMLString::copyString(buffer, text->getData()); - XMLString::trim(buffer); - struct Cloud::CloudReader::FileEntry *new_entry; - char* content=XMLString::transcode(buffer); - delete[] buffer; - if ( file ) - { - new_entry=new Cloud::CloudReader::FileEntry; - strcpy(new_entry->FileName,content); - Cloud::CloudReader::FileList.push_back(new_entry); - } - file=0; - if ( continuation == 1 ) { - strcpy(Cloud::CloudReader::NextFileName, content); - continuation = 0; - } - if ( truncated == 1 ) { - if ( strncmp(content, "true", 4) != 0 ) - truncated = 0; - else - truncated = 2; - } - XMLString::release(&content); -} - -void Cloud::CloudReader::addFile(struct Cloud::CloudReader::FileEntry *new_entry) +void Cloud::CloudReader::checkElement(DOMElement* element) { - Cloud::CloudReader::FileList.push_back(new_entry); + char* name = XMLString::transcode(element->getTagName()); + if (strcmp(name, "Key") == 0) { + file = 1; + } + if (strcmp(name, "NextContinuationToken") == 0) { + continuation = 1; + } + if (strcmp(name, "IsTruncated") == 0) { + truncated = 1; + } + XMLString::release(&name); } -void Cloud::CloudReader::checkXML(DOMNode* node) { - if (node) { - switch (node->getNodeType()) { - case DOMNode::ELEMENT_NODE: +void Cloud::CloudReader::checkText(DOMText* text) +{ + + XMLCh* buffer = new XMLCh[XMLString::stringLen(text->getData()) + 1]; + XMLString::copyString(buffer, text->getData()); + XMLString::trim(buffer); + struct Cloud::CloudReader::FileEntry* new_entry; + char* content = XMLString::transcode(buffer); + delete[] buffer; + if (file) { + new_entry = new Cloud::CloudReader::FileEntry; + strcpy(new_entry->FileName, content); + Cloud::CloudReader::FileList.push_back(new_entry); + } + file = 0; + if (continuation == 1) { + strcpy(Cloud::CloudReader::NextFileName, content); + continuation = 0; + } + if (truncated == 1) { + if (strncmp(content, "true", 4) != 0) { + truncated = 0; + } + else { + truncated = 2; + } + } + XMLString::release(&content); +} + +void Cloud::CloudReader::addFile(struct Cloud::CloudReader::FileEntry* new_entry) +{ + Cloud::CloudReader::FileList.push_back(new_entry); +} + +void Cloud::CloudReader::checkXML(DOMNode* node) +{ + if (node) { + switch (node->getNodeType()) { + case DOMNode::ELEMENT_NODE: checkElement(static_cast(node)); break; - case DOMNode::TEXT_NODE: + case DOMNode::TEXT_NODE: checkText(static_cast(node)); break; - default: + default: break; - } - DOMNode* child = node->getFirstChild(); - while (child) { - DOMNode* next = child->getNextSibling(); - checkXML(child); - child = next; - } - } + } + DOMNode* child = node->getFirstChild(); + while (child) { + DOMNode* next = child->getNextSibling(); + checkXML(child); + child = next; + } + } } - Cloud::CloudReader::~CloudReader() +{} + +Cloud::CloudReader::CloudReader(const char* URL, + const char* TokenAuth, + const char* TokenSecret, + const char* TCPPort, + const char* Bucket, + std::string ProtocolVersion, + std::string Region) { -} - -Cloud::CloudReader::CloudReader(const char* URL, const char* TokenAuth, const char* TokenSecret, const char* TCPPort, const char* Bucket, std::string ProtocolVersion, std::string Region) -{ - struct Cloud::AmzData *RequestData; - struct Cloud::AmzDatav4 *RequestDatav4; - CURL *curl; - CURLcode res; - bool GetBucketContentList=true; - struct curl_slist *chunk = nullptr; - char parameters[1024]; + struct Cloud::AmzData* RequestData; + struct Cloud::AmzDatav4* RequestDatav4; + CURL* curl; + CURLcode res; + bool GetBucketContentList = true; + struct curl_slist* chunk = nullptr; + char parameters[1024]; - this->URL=URL; - this->TokenAuth=TokenAuth; - this->TokenSecret=TokenSecret; - this->TCPPort=TCPPort; - this->Bucket=Bucket; - if ( !ProtocolVersion.empty() ) - this->ProtocolVersion=ProtocolVersion; - else - this->ProtocolVersion="2"; - this->Region=Region; + this->URL = URL; + this->TokenAuth = TokenAuth; + this->TokenSecret = TokenSecret; + this->TCPPort = TCPPort; + this->Bucket = Bucket; + if (!ProtocolVersion.empty()) { + this->ProtocolVersion = ProtocolVersion; + } + else { + this->ProtocolVersion = "2"; + } + this->Region = Region; - char path[1024]; - sprintf(path,"/%s/", this->Bucket); - Cloud::CloudReader::NextFileName = ( char* ) malloc(sizeof(char)*1024); - for ( int i = 0 ; i < 1024 ; i++ ) - NextFileName[i]='\0'; + char path[1024]; + sprintf(path, "/%s/", this->Bucket); + Cloud::CloudReader::NextFileName = (char*)malloc(sizeof(char) * 1024); + for (int i = 0; i < 1024; i++) { + NextFileName[i] = '\0'; + } - // Let's build the Header and call to curl - curl_global_init(CURL_GLOBAL_ALL); - while ( GetBucketContentList ) - { - std::string s; - curl = curl_easy_init(); -#ifdef ALLOW_SELF_SIGNED_CERTIFICATE - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); -#endif - if ( curl ) - { - // Let's build our own header - char URL[256]; - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( strlen(NextFileName) == 0 ) - { - sprintf(parameters,"list-type=2"); - } - else - { - sprintf(parameters,"list-type=2&continuation-token=%s", NextFileName); - } - sprintf(URL,"%s:%s/%s/?%s", this->URL,this->TCPPort, - this->Bucket, parameters); - curl_easy_setopt(curl, CURLOPT_URL, URL); - - if ( this->ProtocolVersion == "2" ) - { - RequestData = Cloud::ComputeDigestAmzS3v2("GET", "application/xml", path, this->TokenSecret, nullptr, 0); - chunk = Cloud::BuildHeaderAmzS3v2(strURL.c_str(), this->TCPPort, this->TokenAuth, RequestData); - delete RequestData; - } - else - { - RequestDatav4 = Cloud::ComputeDigestAmzS3v4("GET", strURL.c_str(),"application/xml", path, this->TokenSecret, nullptr, 0, (char *)¶meters[0], this->Region); - chunk = Cloud::BuildHeaderAmzS3v4( strURL.c_str(), this->TokenAuth, RequestDatav4); - delete RequestDatav4; - } - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWrite_CallbackFunc_StdString); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); - // curl read a file not a memory buffer (it shall be able to do it) - - res = curl_easy_perform(curl); - - for ( int i = 0 ; i < 1024 ; i++ ) - NextFileName[i]='\0'; - if(res != CURLE_OK) - fprintf(stderr, "curl_easy_perform() failed: %s\n", - curl_easy_strerror(res)); - curl_easy_cleanup(curl); - - - std::stringstream input(s); - - try { XMLPlatformUtils::Initialize(); } - catch (const XMLException& toCatch) { - char* message = XMLString::transcode(toCatch.getMessage()); - cout << "Error during initialization! :\n" - << message << "\n"; - XMLString::release(&message); - return ; - } - - XercesDOMParser* parser = new XercesDOMParser(); - parser->setValidationScheme(XercesDOMParser::Val_Always); - parser->setDoNamespaces(true); - - xercesc::MemBufInputSource myxml_buf((const XMLByte *const)s.c_str(), s.size(), - "myxml (in memory)"); - - parser->parse(myxml_buf); - auto* dom=parser->getDocument(); - checkXML(dom); - } - if ( truncated == 0 ) - GetBucketContentList = false; - else - { - truncated = 0; - continuation = 0; - file = 0; - } - } - -} - -void Cloud::CloudReader::DownloadFile(Cloud::CloudReader::FileEntry *entry) -{ - struct Cloud::AmzData *RequestData; - struct Cloud::AmzDatav4 *RequestDatav4; - CURL *curl; - CURLcode res; - + // Let's build the Header and call to curl + curl_global_init(CURL_GLOBAL_ALL); + while (GetBucketContentList) { std::string s; - - // We must get the directory content - char path[1024]; - sprintf(path, "/%s/%s", this->Bucket, entry->FileName); - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( this->ProtocolVersion == "2" ) - RequestData = Cloud::ComputeDigestAmzS3v2("GET", "application/octet-stream", path, this->TokenSecret, nullptr, 0); - else - RequestDatav4 = Cloud::ComputeDigestAmzS3v4("GET", strURL.c_str(), "application/octet-stream", path, this->TokenSecret, nullptr, 0, nullptr, this->Region); - - // Let's build the Header and call to curl - curl_global_init(CURL_GLOBAL_ALL); curl = curl_easy_init(); #ifdef ALLOW_SELF_SIGNED_CERTIFICATE curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); #endif - if ( curl ) - { - struct curl_slist *chunk = nullptr; - char URL[256]; - // Let's build our own header - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( this->ProtocolVersion == "2" ) - { - chunk = Cloud::BuildHeaderAmzS3v2( strURL.c_str(), this->TCPPort, this->TokenAuth, RequestData); - delete RequestData; - } - else - { - chunk = Cloud::BuildHeaderAmzS3v4( strURL.c_str(), this->TokenAuth, RequestDatav4); - delete RequestDatav4; - } + if (curl) { + // Let's build our own header + char URL[256]; + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (strlen(NextFileName) == 0) { + sprintf(parameters, "list-type=2"); + } + else { + sprintf(parameters, "list-type=2&continuation-token=%s", NextFileName); + } + sprintf(URL, "%s:%s/%s/?%s", this->URL, this->TCPPort, this->Bucket, parameters); + curl_easy_setopt(curl, CURLOPT_URL, URL); - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); + if (this->ProtocolVersion == "2") { + RequestData = Cloud::ComputeDigestAmzS3v2("GET", + "application/xml", + path, + this->TokenSecret, + nullptr, + 0); + chunk = Cloud::BuildHeaderAmzS3v2(strURL.c_str(), + this->TCPPort, + this->TokenAuth, + RequestData); + delete RequestData; + } + else { + RequestDatav4 = Cloud::ComputeDigestAmzS3v4("GET", + strURL.c_str(), + "application/xml", + path, + this->TokenSecret, + nullptr, + 0, + (char*)¶meters[0], + this->Region); + chunk = Cloud::BuildHeaderAmzS3v4(strURL.c_str(), this->TokenAuth, RequestDatav4); + delete RequestDatav4; + } + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - sprintf(URL,"%s:%s/%s/%s", this->URL,this->TCPPort, - this->Bucket, entry->FileName); - curl_easy_setopt(curl, CURLOPT_URL, URL); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWrite_CallbackFunc_StdString); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); + // curl read a file not a memory buffer (it shall be able to do it) - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWrite_CallbackFunc_StdString); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); - // curl read a file not a memory buffer (it shall be able to do it) + res = curl_easy_perform(curl); - res = curl_easy_perform(curl); - if(res != CURLE_OK) - fprintf(stderr, "curl_easy_perform() failed: %s\n", - curl_easy_strerror(res)); - curl_easy_cleanup(curl); + for (int i = 0; i < 1024; i++) { + NextFileName[i] = '\0'; + } + if (res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); + } + curl_easy_cleanup(curl); - entry->FileStream << s; + + std::stringstream input(s); + + try { + XMLPlatformUtils::Initialize(); + } + catch (const XMLException& toCatch) { + char* message = XMLString::transcode(toCatch.getMessage()); + cout << "Error during initialization! :\n" << message << "\n"; + XMLString::release(&message); + return; + } + + XercesDOMParser* parser = new XercesDOMParser(); + parser->setValidationScheme(XercesDOMParser::Val_Always); + parser->setDoNamespaces(true); + + xercesc::MemBufInputSource myxml_buf((const XMLByte* const)s.c_str(), + s.size(), + "myxml (in memory)"); + + parser->parse(myxml_buf); + auto* dom = parser->getDocument(); + checkXML(dom); } + if (truncated == 0) { + GetBucketContentList = false; + } + else { + truncated = 0; + continuation = 0; + file = 0; + } + } } -struct Cloud::CloudReader::FileEntry * Cloud::CloudReader::GetEntry(std::string FileName) +void Cloud::CloudReader::DownloadFile(Cloud::CloudReader::FileEntry* entry) { - struct Cloud::CloudReader::FileEntry *current_entry=nullptr; - list::const_iterator it1; + struct Cloud::AmzData* RequestData; + struct Cloud::AmzDatav4* RequestDatav4; + CURL* curl; + CURLcode res; - for(it1 = FileList.begin(); it1 != FileList.end(); ++it1) { - if ( strcmp(FileName.c_str(), (*it1)->FileName) == 0 ) - { - current_entry = (*it1); - break; - } + std::string s; + + // We must get the directory content + char path[1024]; + sprintf(path, "/%s/%s", this->Bucket, entry->FileName); + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (this->ProtocolVersion == "2") { + RequestData = Cloud::ComputeDigestAmzS3v2("GET", + "application/octet-stream", + path, + this->TokenSecret, + nullptr, + 0); + } + else { + RequestDatav4 = Cloud::ComputeDigestAmzS3v4("GET", + strURL.c_str(), + "application/octet-stream", + path, + this->TokenSecret, + nullptr, + 0, + nullptr, + this->Region); + } + + // Let's build the Header and call to curl + curl_global_init(CURL_GLOBAL_ALL); + curl = curl_easy_init(); +#ifdef ALLOW_SELF_SIGNED_CERTIFICATE + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); +#endif + if (curl) { + struct curl_slist* chunk = nullptr; + char URL[256]; + // Let's build our own header + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (this->ProtocolVersion == "2") { + chunk = Cloud::BuildHeaderAmzS3v2(strURL.c_str(), + this->TCPPort, + this->TokenAuth, + RequestData); + delete RequestData; + } + else { + chunk = Cloud::BuildHeaderAmzS3v4(strURL.c_str(), this->TokenAuth, RequestDatav4); + delete RequestDatav4; } - if ( current_entry != nullptr ) - { - (*it1)->touch=1; - DownloadFile(*it1); - } + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - return(current_entry); + sprintf(URL, "%s:%s/%s/%s", this->URL, this->TCPPort, this->Bucket, entry->FileName); + curl_easy_setopt(curl, CURLOPT_URL, URL); + + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWrite_CallbackFunc_StdString); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); + // curl read a file not a memory buffer (it shall be able to do it) + + res = curl_easy_perform(curl); + if (res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); + } + curl_easy_cleanup(curl); + + entry->FileStream << s; + } +} + +struct Cloud::CloudReader::FileEntry* Cloud::CloudReader::GetEntry(std::string FileName) +{ + struct Cloud::CloudReader::FileEntry* current_entry = nullptr; + list::const_iterator it1; + + for (it1 = FileList.begin(); it1 != FileList.end(); ++it1) { + if (strcmp(FileName.c_str(), (*it1)->FileName) == 0) { + current_entry = (*it1); + break; + } + } + + if (current_entry != nullptr) { + (*it1)->touch = 1; + DownloadFile(*it1); + } + + return (current_entry); } int Cloud::CloudReader::isTouched(std::string FileName) { - list::const_iterator it1; - for(it1 = FileList.begin(); it1 != FileList.end(); ++it1) { - if ( strcmp(FileName.c_str(), (*it1)->FileName) == 0 ) - { - if ( (*it1)->touch ) - return(1); - else - return(0); - } + list::const_iterator it1; + for (it1 = FileList.begin(); it1 != FileList.end(); ++it1) { + if (strcmp(FileName.c_str(), (*it1)->FileName) == 0) { + if ((*it1)->touch) { + return (1); + } + else { + return (0); + } } - return(0); + } + return (0); } -void Cloud::eraseSubStr(std::string & Str, const std::string & toErase) +void Cloud::eraseSubStr(std::string& Str, const std::string& toErase) { - size_t pos = Str.find(toErase); - if (pos != std::string::npos) - { - Str.erase(pos, toErase.length()); - } + size_t pos = Str.find(toErase); + if (pos != std::string::npos) { + Str.erase(pos, toErase.length()); + } } void Cloud::CloudWriter::putNextEntry(const char* file) { - this->FileName = file; - this->FileStream.str(""); - this->FileStream << std::fixed; - this->FileStream.precision(std::numeric_limits::digits10 + 1); - this->FileStream.setf(ios::fixed,ios::floatfield); - this->FileStream.imbue(std::locale::classic()); - + this->FileName = file; + this->FileStream.str(""); + this->FileStream << std::fixed; + this->FileStream.precision(std::numeric_limits::digits10 + 1); + this->FileStream.setf(ios::fixed, ios::floatfield); + this->FileStream.imbue(std::locale::classic()); } -bool Cloud::CloudWriter::shouldWrite(const std::string& , const Base::Persistence *) const +bool Cloud::CloudWriter::shouldWrite(const std::string&, const Base::Persistence*) const { return true; } -void Cloud::CloudWriter::pushCloud(const char *FileName, const char *data, long size) +void Cloud::CloudWriter::pushCloud(const char* FileName, const char* data, long size) { - struct Cloud::AmzData *RequestData; - struct Cloud::AmzDatav4 *RequestDatav4; - CURL *curl; - CURLcode res; - struct data_buffer curl_buffer; + struct Cloud::AmzData* RequestData; + struct Cloud::AmzDatav4* RequestDatav4; + CURL* curl; + CURLcode res; + struct data_buffer curl_buffer; - char path[1024]; - sprintf(path, "/%s/%s", this->Bucket, FileName); + char path[1024]; + sprintf(path, "/%s/%s", this->Bucket, FileName); - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( this->ProtocolVersion == "2" ) - RequestData = Cloud::ComputeDigestAmzS3v2("PUT", "application/octet-stream", path, this->TokenSecret, data, size); - else - RequestDatav4 = Cloud::ComputeDigestAmzS3v4("PUT", strURL.c_str(), "application/octet-stream", path, this->TokenSecret, data, size, nullptr, this->Region); + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (this->ProtocolVersion == "2") { + RequestData = Cloud::ComputeDigestAmzS3v2("PUT", + "application/octet-stream", + path, + this->TokenSecret, + data, + size); + } + else { + RequestDatav4 = Cloud::ComputeDigestAmzS3v4("PUT", + strURL.c_str(), + "application/octet-stream", + path, + this->TokenSecret, + data, + size, + nullptr, + this->Region); + } - // Let's build the Header and call to curl - curl_global_init(CURL_GLOBAL_ALL); - curl = curl_easy_init(); + // Let's build the Header and call to curl + curl_global_init(CURL_GLOBAL_ALL); + curl = curl_easy_init(); #ifdef ALLOW_SELF_SIGNED_CERTIFICATE - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); - curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); #endif - if ( curl ) - { - struct curl_slist *chunk = nullptr; - char URL[256]; - // Let's build our own header - std::string strURL(this->URL); - eraseSubStr(strURL,"http://"); - eraseSubStr(strURL,"https://"); - if ( this->ProtocolVersion == "2" ) - { - chunk = Cloud::BuildHeaderAmzS3v2( strURL.c_str(), this->TCPPort, this->TokenAuth, RequestData); - delete RequestData; - } - else - { - chunk = Cloud::BuildHeaderAmzS3v4( strURL.c_str(), this->TokenAuth, RequestDatav4); - delete RequestDatav4; - } - - curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); - - // Lets build the URL for our Curl call - - sprintf(URL,"%s:%s/%s/%s", this->URL,this->TCPPort, - this->Bucket,FileName); - curl_easy_setopt(curl, CURLOPT_URL, URL); - - curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); - curl_easy_setopt(curl, CURLOPT_PUT, 1L); - // curl read a file not a memory buffer (it shall be able to do it) - curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); - curl_buffer.ptr = data; - curl_buffer.remaining_size = (size_t) size; - - curl_easy_setopt(curl, CURLOPT_READDATA, &curl_buffer); - - curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, - (curl_off_t)size); - - - res = curl_easy_perform(curl); - if(res != CURLE_OK) - fprintf(stderr, "curl_easy_perform() failed: %s\n", - curl_easy_strerror(res)); - curl_easy_cleanup(curl); + if (curl) { + struct curl_slist* chunk = nullptr; + char URL[256]; + // Let's build our own header + std::string strURL(this->URL); + eraseSubStr(strURL, "http://"); + eraseSubStr(strURL, "https://"); + if (this->ProtocolVersion == "2") { + chunk = Cloud::BuildHeaderAmzS3v2(strURL.c_str(), + this->TCPPort, + this->TokenAuth, + RequestData); + delete RequestData; } + else { + chunk = Cloud::BuildHeaderAmzS3v4(strURL.c_str(), this->TokenAuth, RequestDatav4); + delete RequestDatav4; + } + + curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); + + // Lets build the URL for our Curl call + + sprintf(URL, "%s:%s/%s/%s", this->URL, this->TCPPort, this->Bucket, FileName); + curl_easy_setopt(curl, CURLOPT_URL, URL); + + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); + curl_easy_setopt(curl, CURLOPT_PUT, 1L); + // curl read a file not a memory buffer (it shall be able to do it) + curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback); + curl_buffer.ptr = data; + curl_buffer.remaining_size = (size_t)size; + + curl_easy_setopt(curl, CURLOPT_READDATA, &curl_buffer); + + curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)size); + + + res = curl_easy_perform(curl); + if (res != CURLE_OK) { + fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); + } + curl_easy_cleanup(curl); + } } void Cloud::CloudWriter::writeFiles(void) @@ -1171,15 +1318,14 @@ void Cloud::CloudWriter::writeFiles(void) // use a while loop because it is possible that while // processing the files, new ones can be added - std::string tmp=""; - char *cstr; + std::string tmp = ""; + char* cstr; size_t index = 0; - if ( strlen(this->FileName.c_str()) > 1 ) - { + if (strlen(this->FileName.c_str()) > 1) { // We must push the current buffer const std::string tmp = this->FileStream.str(); const char* cstr = tmp.data(); - pushCloud((const char *)this->FileName.c_str(),cstr, tmp.size()); + pushCloud((const char*)this->FileName.c_str(), cstr, tmp.size()); } while (index < FileList.size()) { FileEntry entry = FileList.begin()[index]; @@ -1187,74 +1333,79 @@ void Cloud::CloudWriter::writeFiles(void) if (shouldWrite(entry.FileName, entry.Object)) { this->FileStream.str(""); this->FileStream.precision(std::numeric_limits::digits10 + 1); - this->FileStream.setf(ios::fixed,ios::floatfield); + this->FileStream.setf(ios::fixed, ios::floatfield); this->FileStream.imbue(std::locale::classic()); entry.Object->SaveDocFile(*this); tmp = this->FileStream.str(); - cstr = (char *)tmp.data(); - pushCloud((const char *)entry.FileName.c_str(), (const char *)cstr, tmp.size()); + cstr = (char*)tmp.data(); + pushCloud((const char*)entry.FileName.c_str(), (const char*)cstr, tmp.size()); this->FileStream.str(""); } index++; } - - } -bool Cloud::Module::cloudSave(const char *BucketName) +bool Cloud::Module::cloudSave(const char* BucketName) { - Document* doc = GetApplication().getActiveDocument(); + Document* doc = GetApplication().getActiveDocument(); - auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Document"); + auto hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Document"); - // Save the name of the tip object in order to handle in Restore() - if (doc->Tip.getValue()) { - doc->TipName.setValue(doc->Tip.getValue()->getNameInDocument()); - } + // Save the name of the tip object in order to handle in Restore() + if (doc->Tip.getValue()) { + doc->TipName.setValue(doc->Tip.getValue()->getNameInDocument()); + } - std::string LastModifiedDateString = Base::TimeInfo::currentDateTimeString(); - doc->LastModifiedDate.setValue(LastModifiedDateString.c_str()); - // set author if needed - bool saveAuthor = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Document")->GetBool("prefSetAuthorOnSave",false); - if (saveAuthor) { - std::string Author = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Document")->GetASCII("prefAuthor",""); - doc->LastModifiedBy.setValue(Author.c_str()); - } - if ( strcmp(BucketName, doc->Label.getValue()) != 0 ) - doc->Label.setValue(BucketName); + std::string LastModifiedDateString = Base::TimeInfo::currentDateTimeString(); + doc->LastModifiedDate.setValue(LastModifiedDateString.c_str()); + // set author if needed + bool saveAuthor = App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/Document") + ->GetBool("prefSetAuthorOnSave", false); + if (saveAuthor) { + std::string Author = + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/Document") + ->GetASCII("prefAuthor", ""); + doc->LastModifiedBy.setValue(Author.c_str()); + } + if (strcmp(BucketName, doc->Label.getValue()) != 0) { + doc->Label.setValue(BucketName); + } - Cloud::CloudWriter mywriter((const char*)this->URL.getStrValue().c_str(), - (const char*)this->TokenAuth.getStrValue().c_str(), - (const char*)this->TokenSecret.getStrValue().c_str(), - (const char*)this->TCPPort.getStrValue().c_str(), - BucketName, - (const char*)this->ProtocolVersion.getStrValue().c_str(), - this->Region.getStrValue()); + Cloud::CloudWriter mywriter((const char*)this->URL.getStrValue().c_str(), + (const char*)this->TokenAuth.getStrValue().c_str(), + (const char*)this->TokenSecret.getStrValue().c_str(), + (const char*)this->TCPPort.getStrValue().c_str(), + BucketName, + (const char*)this->ProtocolVersion.getStrValue().c_str(), + this->Region.getStrValue()); - mywriter.putNextEntry("Document.xml"); + mywriter.putNextEntry("Document.xml"); - if (hGrp->GetBool("SaveBinaryBrep", false)) - mywriter.setMode("BinaryBrep"); - mywriter.Stream() << "" << endl - << "" << endl; - doc->Save(mywriter); + if (hGrp->GetBool("SaveBinaryBrep", false)) { + mywriter.setMode("BinaryBrep"); + } + mywriter.Stream() << "" << endl + << "" << endl; + doc->Save(mywriter); - // Special handling for Gui document. - doc->signalSaveDocument(mywriter); + // Special handling for Gui document. + doc->signalSaveDocument(mywriter); - // write additional files - mywriter.writeFiles(); + // write additional files + mywriter.writeFiles(); - return(true); + return (true); } -void readFiles(Cloud::CloudReader reader, Base::XMLReader *xmlreader) +void readFiles(Cloud::CloudReader reader, Base::XMLReader* xmlreader) { // It's possible that not all objects inside the document could be created, e.g. if a module // is missing that would know these object types. So, there may be data files inside the Cloud @@ -1266,23 +1417,22 @@ void readFiles(Cloud::CloudReader reader, Base::XMLReader *xmlreader) // In either case it's guaranteed that the order of the files is kept. std::vector::const_iterator it = xmlreader->FileList.begin(); - while ( it != xmlreader->FileList.end()) { - if ( reader.isTouched(it->FileName.c_str()) == 0 ) - { - Base::Reader localreader(reader.GetEntry(it->FileName.c_str())->FileStream,it->FileName, xmlreader->FileVersion); - // for debugging only purpose - if ( false ) - { - std::stringstream ss; - ss << localreader.getStream().rdbuf(); - auto aString = ss.str(); - aString = ""; - } - it->Object->RestoreDocFile(localreader); - if ( localreader.getLocalReader() != nullptr ) - { - readFiles(reader, localreader.getLocalReader().get()); - } + while (it != xmlreader->FileList.end()) { + if (reader.isTouched(it->FileName.c_str()) == 0) { + Base::Reader localreader(reader.GetEntry(it->FileName.c_str())->FileStream, + it->FileName, + xmlreader->FileVersion); + // for debugging only purpose + if (false) { + std::stringstream ss; + ss << localreader.getStream().rdbuf(); + auto aString = ss.str(); + aString = ""; + } + it->Object->RestoreDocFile(localreader); + if (localreader.getLocalReader() != nullptr) { + readFiles(reader, localreader.getLocalReader().get()); + } } it++; } @@ -1290,46 +1440,44 @@ void readFiles(Cloud::CloudReader reader, Base::XMLReader *xmlreader) void Cloud::Module::LinkXSetValue(std::string filename) { - // Need to check if the document exist - // if not we have to create a new one - // and Restore the associated Document - // - std::vector Documents; - Documents = App::GetApplication().getDocuments(); - for (std::vector::iterator it = Documents.begin() ; it != Documents.end(); it++) - { - if ( (*it)->FileName.getValue() == filename ) - { - // The document exist - // we can exit - return; - } - } + // Need to check if the document exist + // if not we have to create a new one + // and Restore the associated Document + // + std::vector Documents; + Documents = App::GetApplication().getDocuments(); + for (std::vector::iterator it = Documents.begin(); it != Documents.end(); it++) { + if ((*it)->FileName.getValue() == filename) { + // The document exist + // we can exit + return; + } + } - size_t header = filename.find_first_of(":"); - string protocol=filename.substr(0,header); - string url_new=filename.substr(header+3); //url_new is the url excluding the http part - size_t part2 = url_new.find_first_of("/"); - string path =url_new.substr(part2+1); - // Starting from here the Document doesn't exist we must create it - // and make it the active Document before Restoring - App::Document* newDoc; - string newName; - Document* currentDoc = GetApplication().getActiveDocument(); - newName = GetApplication().getUniqueDocumentName("unnamed"); - newDoc = GetApplication().newDocument(newName.c_str(), (const char*)path.c_str(), true); - GetApplication().setActiveDocument(newDoc); - this->cloudRestore((const char*)path.c_str()); - GetApplication().setActiveDocument(currentDoc); + size_t header = filename.find_first_of(":"); + string protocol = filename.substr(0, header); + string url_new = filename.substr(header + 3); // url_new is the url excluding the http part + size_t part2 = url_new.find_first_of("/"); + string path = url_new.substr(part2 + 1); + // Starting from here the Document doesn't exist we must create it + // and make it the active Document before Restoring + App::Document* newDoc; + string newName; + Document* currentDoc = GetApplication().getActiveDocument(); + newName = GetApplication().getUniqueDocumentName("unnamed"); + newDoc = GetApplication().newDocument(newName.c_str(), (const char*)path.c_str(), true); + GetApplication().setActiveDocument(newDoc); + this->cloudRestore((const char*)path.c_str()); + GetApplication().setActiveDocument(currentDoc); } -bool Cloud::Module::cloudRestore (const char *BucketName) +bool Cloud::Module::cloudRestore(const char* BucketName) { Document* doc = GetApplication().getActiveDocument(); // clean up if the document is not empty // !TODO: mind exceptions while restoring! - doc->signalLinkXsetValue.connect(boost::bind(&Cloud::Module::LinkXSetValue,this,_1)); + doc->signalLinkXsetValue.connect(boost::bind(&Cloud::Module::LinkXSetValue, this, _1)); doc->clearUndos(); @@ -1338,18 +1486,20 @@ bool Cloud::Module::cloudRestore (const char *BucketName) std::stringstream oss; Cloud::CloudReader myreader((const char*)this->URL.getStrValue().c_str(), - (const char*)this->TokenAuth.getStrValue().c_str(), - (const char*)this->TokenSecret.getStrValue().c_str(), - (const char*)this->TCPPort.getStrValue().c_str(), - BucketName, (const char*)this->ProtocolVersion.getStrValue().c_str(), - this->Region.getStrValue()); + (const char*)this->TokenAuth.getStrValue().c_str(), + (const char*)this->TokenSecret.getStrValue().c_str(), + (const char*)this->TCPPort.getStrValue().c_str(), + BucketName, + (const char*)this->ProtocolVersion.getStrValue().c_str(), + this->Region.getStrValue()); // we shall pass there the initial Document.xml file Base::XMLReader reader("Document.xml", myreader.GetEntry("Document.xml")->FileStream); - if (!reader.isValid()) - throw Base::FileException("Error reading Document.xml file","Document.xml"); + if (!reader.isValid()) { + throw Base::FileException("Error reading Document.xml file", "Document.xml"); + } GetApplication().signalStartRestoreDocument(*doc); @@ -1368,9 +1518,9 @@ bool Cloud::Module::cloudRestore (const char *BucketName) // Note: This file doesn't need to be available if the document has been created // without GUI. But if available then follow after all data files of the App document. - doc->signalRestoreDocument(reader); + doc->signalRestoreDocument(reader); - readFiles(myreader,&reader); + readFiles(myreader, &reader); // reset all touched @@ -1381,9 +1531,8 @@ bool Cloud::Module::cloudRestore (const char *BucketName) doc->Label.setValue(BucketName); // The FileName shall be an URI format string uri; - uri = this->URL.getStrValue()+":"+this->TCPPort.getStrValue()+"/"+string(BucketName); + uri = this->URL.getStrValue() + ":" + this->TCPPort.getStrValue() + "/" + string(BucketName); doc->FileName.setValue(uri); - doc->signalLinkXsetValue.disconnect(boost::bind(&Cloud::Module::LinkXSetValue,this,_1)); - return(true); - + doc->signalLinkXsetValue.disconnect(boost::bind(&Cloud::Module::LinkXSetValue, this, _1)); + return (true); } diff --git a/src/Mod/Cloud/App/AppCloud.h b/src/Mod/Cloud/App/AppCloud.h index eb84340505..e9cc8712ce 100644 --- a/src/Mod/Cloud/App/AppCloud.h +++ b/src/Mod/Cloud/App/AppCloud.h @@ -27,73 +27,100 @@ #include #include +#include #include #include #include -#include #include #include #include XERCES_CPP_NAMESPACE_BEGIN - class DOMNode; - class DOMText; +class DOMNode; +class DOMText; XERCES_CPP_NAMESPACE_END -namespace Cloud { +namespace Cloud +{ -struct AmzData { - std::string digest; - char dateFormatted[256]; - char ContentType[256]; - char Host[256]; - char *MD5; +struct AmzData +{ + std::string digest; + char dateFormatted[256]; + char ContentType[256]; + char Host[256]; + char* MD5; }; -struct AmzDatav4 { - std::string digest; - char dateFormattedS[256]; - char dateFormattedD[256]; - char ContentType[256]; - char Host[256]; - std::string Region; - char *MD5; - char *SHA256Sum; +struct AmzDatav4 +{ + std::string digest; + char dateFormattedS[256]; + char dateFormattedD[256]; + char ContentType[256]; + char Host[256]; + std::string Region; + char* MD5; + char* SHA256Sum; }; -std::string getHexValue(unsigned char *input, unsigned int HMACLength); -void eraseSubStr(std::string & Str, const std::string & toErase); -size_t CurlWrite_CallbackFunc_StdString(void *contents, size_t size, size_t nmemb, std::string *s); -struct AmzData *ComputeDigestAmzS3v2(char *operation, char *data_type, const char *target, const char *Secret, const char *ptr, long size); -struct AmzDatav4 *ComputeDigestAmzS3v4(char *operation, const char *server, char *data_type, const char *target, const char *Secret, const char *ptr, long size, char *parameters, std::string Region); -struct curl_slist *BuildHeaderAmzS3v2(const char *URL, const char *TCPPort, const char *PublicKey, struct AmzData *Data); -struct curl_slist *BuildHeaderAmzS3v4(const char *URL, const char *PublicKey, struct AmzDatav4 *Data); -char *MD5Sum(const char *ptr, long size); -char *SHA256Sum(const char *ptr, long size); +std::string getHexValue(unsigned char* input, unsigned int HMACLength); +void eraseSubStr(std::string& Str, const std::string& toErase); +size_t CurlWrite_CallbackFunc_StdString(void* contents, size_t size, size_t nmemb, std::string* s); +struct AmzData* ComputeDigestAmzS3v2(char* operation, + char* data_type, + const char* target, + const char* Secret, + const char* ptr, + long size); +struct AmzDatav4* ComputeDigestAmzS3v4(char* operation, + const char* server, + char* data_type, + const char* target, + const char* Secret, + const char* ptr, + long size, + char* parameters, + std::string Region); +struct curl_slist* BuildHeaderAmzS3v2(const char* URL, + const char* TCPPort, + const char* PublicKey, + struct AmzData* Data); +struct curl_slist* +BuildHeaderAmzS3v4(const char* URL, const char* PublicKey, struct AmzDatav4* Data); +char* MD5Sum(const char* ptr, long size); +char* SHA256Sum(const char* ptr, long size); class CloudAppExport CloudReader { public: - CloudReader(const char* URL, const char* AccessKey, const char* SecretKey, const char* TCPPort, const char* Bucket,std::string ProtocolVersion, std::string Region); + CloudReader(const char* URL, + const char* AccessKey, + const char* SecretKey, + const char* TCPPort, + const char* Bucket, + std::string ProtocolVersion, + std::string Region); virtual ~CloudReader(); - int file=0; - int continuation=0; - int truncated=0; + int file = 0; + int continuation = 0; + int truncated = 0; struct FileEntry { char FileName[1024]; std::stringstream FileStream; - int touch=0; + int touch = 0; }; void checkText(XERCES_CPP_NAMESPACE_QUALIFIER DOMText* text); void checkXML(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* node); void checkElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* element); - void addFile(struct Cloud::CloudReader::FileEntry *new_entry); - struct FileEntry *GetEntry(std::string FileName); - void DownloadFile(Cloud::CloudReader::FileEntry *entry); + void addFile(struct Cloud::CloudReader::FileEntry* new_entry); + struct FileEntry* GetEntry(std::string FileName); + void DownloadFile(Cloud::CloudReader::FileEntry* entry); int isTouched(std::string FileName); + protected: std::list FileList; char* NextFileName; @@ -106,46 +133,47 @@ protected: std::string Region; }; -class Module : public Py::ExtensionModule +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Cloud") + Module() + : Py::ExtensionModule("Cloud") { - add_varargs_method("URL",&Module::sCloudURL, - "URL(string) -- Connect to a Cloud Storage service." - ); + add_varargs_method("URL", + &Module::sCloudURL, + "URL(string) -- Connect to a Cloud Storage service."); - add_varargs_method("TokenAuth",&Module::sCloudTokenAuth, - "TokenAuth(string) -- Token Authorization string." - ); + add_varargs_method("TokenAuth", + &Module::sCloudTokenAuth, + "TokenAuth(string) -- Token Authorization string."); - add_varargs_method("TokenSecret",&Module::sCloudTokenSecret, - "TokenSecret(string) -- Token Secret string." - ); - - add_varargs_method("TCPPort",&Module::sCloudTCPPort, - "TCPPort(string) -- Port number." - ); + add_varargs_method("TokenSecret", + &Module::sCloudTokenSecret, + "TokenSecret(string) -- Token Secret string."); - add_varargs_method("Save",&Module::sCloudSave, - "Save(string) -- Save the active document to the Cloud." - ); + add_varargs_method("TCPPort", &Module::sCloudTCPPort, "TCPPort(string) -- Port number."); - add_varargs_method("Restore",&Module::sCloudRestore, - "Restore(string) -- Restore to the active document from the Cloud." - ); + add_varargs_method("Save", + &Module::sCloudSave, + "Save(string) -- Save the active document to the Cloud."); - add_varargs_method("ProtocolVersion",&Module::sCloudProtocolVersion, - "ProtocolVersion(string) -- Specify Amazon s3 protocol version (2 or 4)" - ); - add_varargs_method("Region",&Module::sCloudRegion, - "Region(string) -- Specify Amazon s3 Region" - ); + add_varargs_method("Restore", + &Module::sCloudRestore, + "Restore(string) -- Restore to the active document from the Cloud."); - initialize("This module is the Cloud module."); // register with Python + add_varargs_method( + "ProtocolVersion", + &Module::sCloudProtocolVersion, + "ProtocolVersion(string) -- Specify Amazon s3 protocol version (2 or 4)"); + add_varargs_method("Region", + &Module::sCloudRegion, + "Region(string) -- Specify Amazon s3 Region"); + + initialize("This module is the Cloud module."); // register with Python } - virtual ~Module() {} + virtual ~Module() + {} App::PropertyString URL; App::PropertyString TCPPort; @@ -158,16 +186,14 @@ public: void LinkXSetValue(std::string filename); private: - Py::Object sCloudURL (const Py::Tuple& args); - Py::Object sCloudTokenAuth (const Py::Tuple& args); - Py::Object sCloudTokenSecret (const Py::Tuple& args); - Py::Object sCloudTCPPort (const Py::Tuple& args); - Py::Object sCloudSave (const Py::Tuple& args); - Py::Object sCloudRestore (const Py::Tuple& args); - Py::Object sCloudProtocolVersion (const Py::Tuple& args); - Py::Object sCloudRegion (const Py::Tuple& args); - - + Py::Object sCloudURL(const Py::Tuple& args); + Py::Object sCloudTokenAuth(const Py::Tuple& args); + Py::Object sCloudTokenSecret(const Py::Tuple& args); + Py::Object sCloudTCPPort(const Py::Tuple& args); + Py::Object sCloudSave(const Py::Tuple& args); + Py::Object sCloudRestore(const Py::Tuple& args); + Py::Object sCloudProtocolVersion(const Py::Tuple& args); + Py::Object sCloudRegion(const Py::Tuple& args); }; PyObject* initModule() @@ -178,20 +204,29 @@ PyObject* initModule() // This class is writing files to an S3 cloud storage class -class CloudAppExport CloudWriter : public Base::Writer +class CloudAppExport CloudWriter: public Base::Writer { public: - int print=0; - char errorCode[1024]=""; - CloudWriter(const char* URL, const char* TokenAuth, const char* TokenSecret, const char* TCPPort, const char* Bucket, std::string ProtocolVersion, std::string Region); + int print = 0; + char errorCode[1024] = ""; + CloudWriter(const char* URL, + const char* TokenAuth, + const char* TokenSecret, + const char* TCPPort, + const char* Bucket, + std::string ProtocolVersion, + std::string Region); virtual ~CloudWriter(); - void pushCloud(const char *FileName, const char *data, long size); + void pushCloud(const char* FileName, const char* data, long size); void putNextEntry(const char* file); void createBucket(); virtual void writeFiles(void); - virtual std::ostream &Stream(void){return FileStream;} - virtual bool shouldWrite(const std::string& name, const Base::Persistence *Object) const; + virtual std::ostream& Stream(void) + { + return FileStream; + } + virtual bool shouldWrite(const std::string& name, const Base::Persistence* Object) const; void checkText(XERCES_CPP_NAMESPACE_QUALIFIER DOMText* text); void checkXML(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode* node); void checkElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* element); @@ -209,6 +244,6 @@ protected: }; -} +} // namespace Cloud -void readFiles(Cloud::CloudReader reader, Base::XMLReader *xmlreader); +void readFiles(Cloud::CloudReader reader, Base::XMLReader* xmlreader); diff --git a/src/Mod/Cloud/App/PreCompiled.cpp b/src/Mod/Cloud/App/PreCompiled.cpp index c7feec6468..d282e9a7d7 100644 --- a/src/Mod/Cloud/App/PreCompiled.cpp +++ b/src/Mod/Cloud/App/PreCompiled.cpp @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Cloud/App/PreCompiled.h b/src/Mod/Cloud/App/PreCompiled.h index 7c2ef41351..24dc9b1c3e 100644 --- a/src/Mod/Cloud/App/PreCompiled.h +++ b/src/Mod/Cloud/App/PreCompiled.h @@ -28,16 +28,16 @@ // Exporting of App classes #ifdef FC_OS_WIN32 -# define CloudAppExport __declspec(dllexport) -#else // for Linux -# define CloudAppExport +#define CloudAppExport __declspec(dllexport) +#else // for Linux +#define CloudAppExport #endif #ifdef _PreComp_ // standard -#include #include +#include #include // STL @@ -55,7 +55,6 @@ // Xerces #include -#endif //_PreComp_ +#endif //_PreComp_ #endif - diff --git a/src/Mod/Cloud/CMakeLists.txt b/src/Mod/Cloud/CMakeLists.txt index 5038e7308b..e8d5b89bcb 100644 --- a/src/Mod/Cloud/CMakeLists.txt +++ b/src/Mod/Cloud/CMakeLists.txt @@ -10,7 +10,7 @@ if (APPLE) set (OPENSSL_LIBRARIES ${OPENSSL_LINK_LIBRARIES}) elseif(WIN32 AND LIBPACK_FOUND) SET( OPENSSL_INCLUDE_DIR ${FREECAD_LIBPACK_DIR}/include) - SET( OPENSSL_LIBRARIES + SET( OPENSSL_LIBRARIES optimized ${FREECAD_LIBPACK_DIR}/lib/openssl.lib debug ${FREECAD_LIBPACK_DIR}/lib/openssld.lib optimized ${FREECAD_LIBPACK_DIR}/lib/libssl.lib debug ${FREECAD_LIBPACK_DIR}/lib/libssld.lib optimized ${FREECAD_LIBPACK_DIR}/lib/libcrypto.lib debug ${FREECAD_LIBPACK_DIR}/lib/libcryptod.lib) @@ -20,15 +20,15 @@ elseif(WIN32 AND LIBPACK_FOUND) SET( OPENSSL_FOUND False) message( FATAL_ERROR "openssl not found!" ) endif(EXISTS ${FREECAD_LIBPACK_DIR}/lib/openssl.lib) - - if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") + + if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h") file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str REGEX "OPENSSL_VERSION_STR") string(REGEX MATCH "\".*" openssl_version_str ${openssl_version_str}) string(REPLACE "\"" "" openssl_version_str ${openssl_version_str}) set(OPENSSL_VERSION ${openssl_version_str}) - endif () + endif () else() find_package(OpenSSL REQUIRED) endif(APPLE) diff --git a/src/Mod/Cloud/Cloud.dox b/src/Mod/Cloud/Cloud.dox index b278c207c5..7d43d5bd3c 100644 --- a/src/Mod/Cloud/Cloud.dox +++ b/src/Mod/Cloud/Cloud.dox @@ -1,3 +1,2 @@ /** \defgroup TEMPLATE Cloud * \ingroup WORKBENCHES */ - diff --git a/src/Mod/Cloud/Gui/AppCloudGui.cpp b/src/Mod/Cloud/Gui/AppCloudGui.cpp index 703cf99169..5990cfccdf 100644 --- a/src/Mod/Cloud/Gui/AppCloudGui.cpp +++ b/src/Mod/Cloud/Gui/AppCloudGui.cpp @@ -34,16 +34,19 @@ void CreateCloudCommands(void); -namespace CloudGui { -class Module : public Py::ExtensionModule +namespace CloudGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("CloudGui") + Module() + : Py::ExtensionModule("CloudGui") { - initialize("This module is the CloudGui module."); // register with Python + initialize("This module is the CloudGui module."); // register with Python } - virtual ~Module() {} + virtual ~Module() + {} private: }; @@ -53,7 +56,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace CloudGui +} // namespace CloudGui /* Python entry */ diff --git a/src/Mod/Cloud/Gui/CMakeLists.txt b/src/Mod/Cloud/Gui/CMakeLists.txt index ee16f469e3..86458e169c 100644 --- a/src/Mod/Cloud/Gui/CMakeLists.txt +++ b/src/Mod/Cloud/Gui/CMakeLists.txt @@ -36,6 +36,6 @@ fc_copy_sources(CloudGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Cloud SET_BIN_DIR(CloudGui CloudGui /Mod/Cloud) SET_PYTHON_PREFIX_SUFFIX(CloudGui) - + install(TARGETS CloudGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) INSTALL(FILES ${Cloud_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Cloud/Resources/icons") diff --git a/src/Mod/Cloud/Gui/Command.cpp b/src/Mod/Cloud/Gui/Command.cpp index 0cfca14423..d1f0f045b9 100644 --- a/src/Mod/Cloud/Gui/Command.cpp +++ b/src/Mod/Cloud/Gui/Command.cpp @@ -35,16 +35,16 @@ DEF_STD_CMD(CmdCloudTest) CmdCloudTest::CmdCloudTest() - :Command("Cloud_Test") + : Command("Cloud_Test") { - sAppModule = "Cloud"; - sGroup = QT_TR_NOOP("Cloud"); - sMenuText = QT_TR_NOOP("Hello"); - sToolTipText = QT_TR_NOOP("Cloud Test function"); - sWhatsThis = "Cloud_Test"; - sStatusTip = QT_TR_NOOP("Cloud Test function"); - sPixmap = "Test1"; - sAccel = "CTRL+H"; + sAppModule = "Cloud"; + sGroup = QT_TR_NOOP("Cloud"); + sMenuText = QT_TR_NOOP("Hello"); + sToolTipText = QT_TR_NOOP("Cloud Test function"); + sWhatsThis = "Cloud_Test"; + sStatusTip = QT_TR_NOOP("Cloud Test function"); + sPixmap = "Test1"; + sAccel = "CTRL+H"; } void CmdCloudTest::activated(int) @@ -54,6 +54,6 @@ void CmdCloudTest::activated(int) void CreateCloudCommands(void) { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdCloudTest()); } diff --git a/src/Mod/Cloud/Gui/PreCompiled.cpp b/src/Mod/Cloud/Gui/PreCompiled.cpp index 33f5075503..3e276ae6b8 100644 --- a/src/Mod/Cloud/Gui/PreCompiled.cpp +++ b/src/Mod/Cloud/Gui/PreCompiled.cpp @@ -21,4 +21,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Cloud/Gui/PreCompiled.h b/src/Mod/Cloud/Gui/PreCompiled.h index 1a844c68cf..55f8d2ee92 100644 --- a/src/Mod/Cloud/Gui/PreCompiled.h +++ b/src/Mod/Cloud/Gui/PreCompiled.h @@ -28,18 +28,18 @@ // Importing of App classes #ifdef FC_OS_WIN32 -# define CloudAppExport __declspec(dllimport) -# define CloudGuiExport __declspec(dllexport) -#else // for Linux -# define CloudAppExport -# define CloudGuiExport +#define CloudAppExport __declspec(dllimport) +#define CloudGuiExport __declspec(dllexport) +#else // for Linux +#define CloudAppExport +#define CloudGuiExport #endif #ifdef _PreComp_ // standard -#include #include +#include // STL #include @@ -54,14 +54,14 @@ #include #ifdef FC_OS_WIN32 -# include +#include #endif // Qt Toolkit #ifndef __QtAll__ -# include +#include #endif #endif //_PreComp_ -#endif // GUI_PRECOMPILED_H +#endif // GUI_PRECOMPILED_H diff --git a/src/Mod/Cloud/Gui/Resources/Cloud.qrc b/src/Mod/Cloud/Gui/Resources/Cloud.qrc index 6b5b3cd487..24f2132ac7 100644 --- a/src/Mod/Cloud/Gui/Resources/Cloud.qrc +++ b/src/Mod/Cloud/Gui/Resources/Cloud.qrc @@ -1,4 +1,4 @@ - + - + diff --git a/src/Mod/Cloud/Gui/Workbench.cpp b/src/Mod/Cloud/Gui/Workbench.cpp index b9e26c6986..eb864c57fd 100644 --- a/src/Mod/Cloud/Gui/Workbench.cpp +++ b/src/Mod/Cloud/Gui/Workbench.cpp @@ -33,12 +33,10 @@ using namespace CloudGui; TYPESYSTEM_SOURCE(CloudGui::Workbench, Gui::StdWorkbench) Workbench::Workbench() -{ -} +{} Workbench::~Workbench() -{ -} +{} /* Gui::MenuItem* Workbench::setupMenuBar() const { @@ -56,7 +54,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const Gui::ToolBarItem* root = StdWorkbench::setupToolBars(); Gui::ToolBarItem* test = new Gui::ToolBarItem(root); test->setCommand( "Cloud Tools" ); - *test << "Cloud_Test"; + *test << "Cloud_Test"; return root; } */ diff --git a/src/Mod/Cloud/Gui/Workbench.h b/src/Mod/Cloud/Gui/Workbench.h index b7b7480f19..63976d8bcd 100644 --- a/src/Mod/Cloud/Gui/Workbench.h +++ b/src/Mod/Cloud/Gui/Workbench.h @@ -26,9 +26,10 @@ #include -namespace CloudGui { +namespace CloudGui +{ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER(); @@ -37,11 +38,11 @@ public: virtual ~Workbench(); protected: -// Gui::MenuItem* setupMenuBar() const; -// Gui::ToolBarItem* setupToolBars() const; + // Gui::MenuItem* setupMenuBar() const; + // Gui::ToolBarItem* setupToolBars() const; }; -} // namespace CloudGui +} // namespace CloudGui -#endif // Cloud_WORKBENCH_H +#endif // Cloud_WORKBENCH_H diff --git a/src/Mod/Cloud/InitGui.py b/src/Mod/Cloud/InitGui.py index e843904e40..fc3cb9f527 100644 --- a/src/Mod/Cloud/InitGui.py +++ b/src/Mod/Cloud/InitGui.py @@ -2,17 +2,24 @@ # (c) 2001 Juergen Riegel LGPL # (c) 2019 Jean-Marie Verdun LGPL -class CloudWorkbench ( Workbench ): - "Cloud workbench object" - def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Cloud/Resources/icons/CloudWorkbench.svg" - MenuText = "Cloud" - ToolTip = "Cloud workbench" - def Initialize(self): - # load the module - import CloudGui - def GetClassName(self): - return "CloudGui::Workbench" +class CloudWorkbench(Workbench): + "Cloud workbench object" + + def __init__(self): + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Cloud/Resources/icons/CloudWorkbench.svg" + ) + + MenuText = "Cloud" + ToolTip = "Cloud workbench" + + def Initialize(self): + # load the module + import CloudGui + + def GetClassName(self): + return "CloudGui::Workbench" + Gui.addWorkbench(CloudWorkbench()) diff --git a/src/Mod/Draft/DraftGeomUtils.py b/src/Mod/Draft/DraftGeomUtils.py index 725f8e7c11..4df2d73818 100644 --- a/src/Mod/Draft/DraftGeomUtils.py +++ b/src/Mod/Draft/DraftGeomUtils.py @@ -78,6 +78,7 @@ from draftgeoutils.geometry import (findPerpendicular, mirror, are_coplanar, is_straight_line, + mirror_matrix, uv_vectors_from_face, placement_from_face, placement_from_points) diff --git a/src/Mod/Draft/Resources/translations/Draft.ts b/src/Mod/Draft/Resources/translations/Draft.ts index 450f499c9b..e318eceda3 100644 --- a/src/Mod/Draft/Resources/translations/Draft.ts +++ b/src/Mod/Draft/Resources/translations/Draft.ts @@ -334,11 +334,6 @@ Circular array - - - (Placeholder for the icon) - - @@ -451,11 +446,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array - - - (Placeholder for the icon) - - Number of elements in the array in the specified direction, including a copy of the original object. @@ -579,11 +569,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array - - - (Placeholder for the icon) - - @@ -3144,43 +3129,43 @@ Not available if Draft preference option 'Use Part Primitives' is enab - - - - - - + + + + + + Converting: - - - + + + Conversion successful - - + + LibreDWG converter not found - - + + ODA converter not found - - + + QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3188,7 +3173,7 @@ https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3589,7 +3574,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3599,22 +3584,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle - + Pick start angle - - + + Aperture angle @@ -3634,23 +3619,23 @@ To enabled FreeCAD to download these libraries, answer Yes. - + Create Arc (Part) - + Create Arc - + Pick aperture angle - - + + Arc by 3 points @@ -4308,7 +4293,7 @@ The final angle will be the base angle plus this amount. - + Select an object to mirror @@ -4323,8 +4308,8 @@ The final angle will be the base angle plus this amount. - - + + Pick end point of mirror line @@ -6065,12 +6050,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. @@ -6079,12 +6064,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools - + Create various types of circular arcs. @@ -6684,12 +6669,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror - + Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_be.qm b/src/Mod/Draft/Resources/translations/Draft_be.qm index 51756035fd..24db5928a7 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_be.qm and b/src/Mod/Draft/Resources/translations/Draft_be.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_be.ts b/src/Mod/Draft/Resources/translations/Draft_be.ts index bc1d8f0d62..812febf1eb 100644 --- a/src/Mod/Draft/Resources/translations/Draft_be.ts +++ b/src/Mod/Draft/Resources/translations/Draft_be.ts @@ -334,11 +334,6 @@ Circular array Кругавы масіў - - - (Placeholder for the icon) - (Запаўняльнік для гузіку) - @@ -456,11 +451,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Артаганальны масіў - - - (Placeholder for the icon) - (Запаўняльнік для гузіку) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Палярная сетка - - - (Placeholder for the icon) - (Запаўняльнік для гузіку) - @@ -805,7 +790,7 @@ Or choose one of the options below Align to view - Выраўнаваць да прагляду + Выраўнаваць да выгляду @@ -3157,7 +3142,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Лакальны {} @@ -3167,7 +3152,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Глабальны {} @@ -3200,43 +3185,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledАсадка - - - - - - + + + + + + Converting: Пераўтварэнне: - - - + + + Conversion successful Пераўтварэнне прайшло паспяхова - - + + LibreDWG converter not found Сродак пераўтварэння LibreDWG не знойдзены - - + + ODA converter not found Сродак пераўтварэння ODA не знойдзены - - + + QCAD converter not found Сродак пераўтварэння QCADне знойдзены - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3246,7 +3231,7 @@ https://wiki.freecad.org/Import_Export_Preferences Каб атрымаць дадатковую інфармацыі, глядзіце: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3655,7 +3640,7 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - + @@ -3665,22 +3650,22 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - - + + Start angle Пачатковы вугал - + Pick start angle Выберыце пачатковы вугал - - + + Aperture angle Вугал апертуры @@ -3700,23 +3685,23 @@ https://github.com/yorikvanhavre/Draft-dxf-importer Стварыць акружнасць - + Create Arc (Part) Стварыць дугу (дэталь) - + Create Arc Стварыць дугу - + Pick aperture angle Выберыце апертуру вугла - - + + Arc by 3 points Дуга па трох кропках @@ -4375,7 +4360,7 @@ The final angle will be the base angle plus this amount. Стварыць прастакутнік - + Select an object to mirror Абярыце аб'ект для сіметрычнага пераўтварэння @@ -4390,8 +4375,8 @@ The final angle will be the base angle plus this amount. Сіметрычна - - + + Pick end point of mirror line Абярыце канчатковую кропку лініі сіметрыі @@ -4689,12 +4674,12 @@ The final angle will be the base angle plus this amount. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + даданы ўласцівасці 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' і 'Fuse' changed 'Tracking' property type - changed 'Tracking' property type + зменены тып уласцівасці 'Tracking' @@ -5661,7 +5646,7 @@ from menu Tools -> Addon Manager Position - Position + Становішча @@ -5691,27 +5676,27 @@ from menu Tools -> Addon Manager Label + Position - Label + Position + Метка + Становішча Label + Length - Label + Length + Метка + Даўжыня Label + Area - Label + Area + Метка + Вобласць Label + Volume - Label + Volume + Метка + Аб'ём Label + Material - Label + Material + Метка + Матэрыял @@ -6152,12 +6137,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Дуга па трох кропках - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Стварае дугу акружнасці па абраных трох кропках. @@ -6167,12 +6152,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Інструменты дугі - + Create various types of circular arcs. Стварае розныя тыпы круглых дуг. @@ -6389,7 +6374,7 @@ It creates a construction group if it doesn't exist. Once the object is created double click it in the tree view to restore the camera position and objects' visibilities. Then you can use it to save a different camera position and objects' states any time you need. Стварае аб'ект проксі з бягучай працоўнай плоскасці. -Як толькі аб'ект створаны, падвоеная пстрычка па ім у праглядзе дрэва, каб аднавіць становішча камеры і бачнасць аб'ектаў. +Як толькі аб'ект створаны, <падвоеная пстрычка> па ім у праглядзе дрэва, каб аднавіць становішча камеры і бачнасць аб'ектаў. Потым вы можаце ўжываць яго для захавання іншага становішча камеры і стану аб'ектаў у любы зручны для вас час. @@ -6813,12 +6798,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Сіметрычна - + Mirrors the selected objects along a line defined by two points. Сіметрычнае пераўтварэнне абраных аб'ектаў наўздоўж лініі, якая вызначаная двюма кропкамі. @@ -6958,7 +6943,7 @@ The initial projection direction is the negative of the current active view dire You can select individual faces to project, or the entire solid, and also include hidden lines. These projections can be used to create technical drawings with the TechDraw Workbench. Стварае дзвюхмерную праекцыю абраных аб'ектаў на плоскасці XY. -Пачатковы напрамак праекцыі з'яўляецца адмоўным у адносінах да бягучага напрамку прагляду. +Пачатковы напрамак праекцыі з'яўляецца адмоўным у адносінах да бягучага напрамку выгляду. Вы можаце выбраць асобныя грані для праецыравання, альбо ўсё суцэльнае цела цалкам, а таксама ўключыць схаваныя лініі. Праекцыі можна ўжываць для стварэння тэхнічных чарцяжоў з дапамогай варштата Тэхчнічны Чарцёж. @@ -7044,22 +7029,22 @@ It is a list of strings; each element in the list will be displayed in its own l Horizontal and vertical alignment - Horizontal and vertical alignment + Гарызантальнае і вертыкальнае выраўноўванне Height reference used for justification - Height reference used for justification + Апорная вышыня, якая ўжываецца для абгрунтавання Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Пакінуць левае поле і пачатковы інтэрвал, калі выраўноўванне пакінута Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Маштабаванне, каб пераканацца, што вышыня шапкі адпавядае яе памеру @@ -7074,7 +7059,7 @@ It is a list of strings; each element in the list will be displayed in its own l Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Злучаць грані, калі грані перакрываюцца, звычайна не патрабуецца (можа быць вельмі павольным) diff --git a/src/Mod/Draft/Resources/translations/Draft_ca.qm b/src/Mod/Draft/Resources/translations/Draft_ca.qm index a13414db6d..1b6be11d95 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ca.qm and b/src/Mod/Draft/Resources/translations/Draft_ca.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ca.ts b/src/Mod/Draft/Resources/translations/Draft_ca.ts index a407634fe5..f5d45f49cb 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ca.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ca.ts @@ -334,11 +334,6 @@ Circular array Matriu circular - - - (Placeholder for the icon) - (Espai reservat per a la icona) - @@ -456,11 +451,6 @@ Una matriu d'enllaç és més eficient quan es creen diverses còpies, però no Orthogonal array Matriu ortogonal - - - (Placeholder for the icon) - (Espai reservat per a la icona) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Una matriu d'enllaç és més eficient quan es creen diverses còpies, però no Polar array Matriu polar - - - (Placeholder for the icon) - (Espai reservat per a la icona) - @@ -3172,43 +3157,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledCalat - - - - - - + + + + + + Converting: Convertint: - - - + + + Conversion successful Conversió exitosa - - + + LibreDWG converter not found No s'ha trobat el convertidor LibreDWG - - + + ODA converter not found No s'ha trobat el convertidor ODA - - + + QCAD converter not found No s'ha trobat el convertidor QCAD - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3218,7 +3203,7 @@ Per favor, estableixi un manualment al menú Editar -> Preferències -> Im Per més informació veure: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3624,7 +3609,7 @@ Per habilitar FreeCAD a descarregar aquestes llibreries, respongui Si. - + @@ -3634,22 +3619,22 @@ Per habilitar FreeCAD a descarregar aquestes llibreries, respongui Si. - - + + Start angle Angle inicial - + Pick start angle Trieu l'angle d'inici - - + + Aperture angle Angle d'obertura @@ -3669,23 +3654,23 @@ Per habilitar FreeCAD a descarregar aquestes llibreries, respongui Si.Crear Cercle - + Create Arc (Part) Crear Arc (Part) - + Create Arc Crear Arc - + Pick aperture angle Trieu l'angle d'obertura - - + + Arc by 3 points Arc per tres punts @@ -4344,7 +4329,7 @@ L'angle final serà l'angle de base més aquesta quantitat. Crear Rectangle - + Select an object to mirror Seleccioni un objecte per reflectir @@ -4359,8 +4344,8 @@ L'angle final serà l'angle de base més aquesta quantitat. Simetria - - + + Pick end point of mirror line Escull el punt final de la línia de simetria @@ -6121,12 +6106,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc per tres punts - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6136,12 +6121,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6787,12 +6772,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Simetria - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_cs.qm b/src/Mod/Draft/Resources/translations/Draft_cs.qm index 529008c942..8737f0d362 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_cs.qm and b/src/Mod/Draft/Resources/translations/Draft_cs.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_cs.ts b/src/Mod/Draft/Resources/translations/Draft_cs.ts index a11127eebf..753962101d 100644 --- a/src/Mod/Draft/Resources/translations/Draft_cs.ts +++ b/src/Mod/Draft/Resources/translations/Draft_cs.ts @@ -334,11 +334,6 @@ Circular array Kruhové pole - - - (Placeholder for the icon) - (Zástupce ikony) - @@ -455,11 +450,6 @@ Spojené pole je efektivnější při vytváření více kopií, ale nemůže b Orthogonal array Orthogonální pole - - - (Placeholder for the icon) - (Zástupce ikony) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -592,11 +582,6 @@ Spojené pole je efektivnější při vytváření více kopií, ale nemůže b Polar array Polární pole - - - (Placeholder for the icon) - (Zástupce ikony) - @@ -3155,7 +3140,7 @@ Není k dispozici, pokud je povolena možnost předvolby návrhu „Použít zá Local {} - Local {} + Lokální {} @@ -3165,7 +3150,7 @@ Není k dispozici, pokud je povolena možnost předvolby návrhu „Použít zá Global {} - Global {} + Globální {} @@ -3198,43 +3183,43 @@ Není k dispozici, pokud je povolena možnost předvolby návrhu „Použít zá Ponor - - - - - - + + + + + + Converting: Konverze: - - - + + + Conversion successful Konverze úspěšná - - + + LibreDWG converter not found Převaděč LibreDWG nebyl nalezen - - + + ODA converter not found Převodník ODA nebyl nalezen - - + + QCAD converter not found Převaděč QCAD nebyl nalezen - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3245,7 +3230,7 @@ Další informace viz: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3655,7 +3640,7 @@ Chcete-li povolit FreeCAD stahování těchto knihoven, odpovězte Ano. - + @@ -3665,22 +3650,22 @@ Chcete-li povolit FreeCAD stahování těchto knihoven, odpovězte Ano. - - + + Start angle Počáteční úhel - + Pick start angle Vyberte počáteční úhel - - + + Aperture angle Úhel clony @@ -3700,23 +3685,23 @@ Chcete-li povolit FreeCAD stahování těchto knihoven, odpovězte Ano.Vytvořte kruh - + Create Arc (Part) Vytvořit oblouk (část) - + Create Arc Vytvořit oblouk - + Pick aperture angle Vyberte úhel clony - - + + Arc by 3 points Oblouk o 3 body @@ -4375,7 +4360,7 @@ Konečný úhel bude základní úhel plus tato hodnota. Vytvořte obdélník - + Select an object to mirror Vyberte objekt, který chcete zrcadlit @@ -4390,8 +4375,8 @@ Konečný úhel bude základní úhel plus tato hodnota. Zrcadlo - - + + Pick end point of mirror line Vyberte koncový bod přímky zrcadlení @@ -5662,7 +5647,7 @@ z nabídky Nástroje -> Správce doplňků Position - Position + Pozice @@ -5692,27 +5677,27 @@ z nabídky Nástroje -> Správce doplňků Label + Position - Label + Position + Štítek + Pozice Label + Length - Label + Length + Štítek + Délka Label + Area - Label + Area + Štítek + Oblast Label + Volume - Label + Volume + Štítek + Objem Label + Material - Label + Material + Štítek + Materiál @@ -6152,12 +6137,12 @@ CTRL pro přichycení, SHIFT pro omezení. Draft_Arc_3Points - + Arc by 3 points Oblouk o 3 body - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Vytvoří kruhový oblouk výběrem 3 bodů. @@ -6167,12 +6152,12 @@ CTRL pro přichycení, SHIFT pro omezení. Draft_ArcTools - + Arc tools Obloukové nástroje - + Create various types of circular arcs. Vytvářejte různé typy kruhových oblouků. @@ -6818,12 +6803,12 @@ pak nakreslete čáru pro určení vzdálenosti a směru natahování. Draft_Mirror - + Mirror Zrcadlo - + Mirrors the selected objects along a line defined by two points. Zrcadlí vybrané objekty podél čáry definované dvěma body. diff --git a/src/Mod/Draft/Resources/translations/Draft_de.qm b/src/Mod/Draft/Resources/translations/Draft_de.qm index a63af1e623..c38cda3f58 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_de.qm and b/src/Mod/Draft/Resources/translations/Draft_de.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_de.ts b/src/Mod/Draft/Resources/translations/Draft_de.ts index 6afe741bf4..1d8c8c7811 100644 --- a/src/Mod/Draft/Resources/translations/Draft_de.ts +++ b/src/Mod/Draft/Resources/translations/Draft_de.ts @@ -334,11 +334,6 @@ Circular array Kreisförmige Anordnung - - - (Placeholder for the icon) - (Platzhalter für das Symbol) - @@ -456,11 +451,6 @@ Eine Verknüpfungsanordnung ist effizienter, wenn mehrere Kopien erstellt werden Orthogonal array Rechtwinklige Anordnung - - - (Placeholder for the icon) - (Platzhalter für das Symbol) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Eine Verknüpfungsanordnung ist effizienter, wenn mehrere Kopien erstellt werden Polar array Polare Anordnung - - - (Placeholder for the icon) - (Platzhalter für das Symbol) - @@ -3124,7 +3109,7 @@ Nicht verfügbar, wenn die Option "Primitive Teile verwenden" aktiviert ist Offset - Versetzen + Versatz @@ -3153,7 +3138,7 @@ Nicht verfügbar, wenn die Option "Primitive Teile verwenden" aktiviert ist Local {} - Local {} + Lokales {} @@ -3163,7 +3148,7 @@ Nicht verfügbar, wenn die Option "Primitive Teile verwenden" aktiviert ist Global {} - Global {} + Globales {} @@ -3196,43 +3181,43 @@ Nicht verfügbar, wenn die Option "Primitive Teile verwenden" aktiviert istDraft - - - - - - + + + + + + Converting: Umwandlung: - - - + + + Conversion successful Umwandlung erfolgreich - - + + LibreDWG converter not found LibreDWG-Konverter nicht gefunden - - + + ODA converter not found ODA-Konverter nicht gefunden - - + + QCAD converter not found QCAD-Konverter nicht gefunden - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3243,7 +3228,7 @@ Für weitere Informationen siehe: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3651,7 +3636,7 @@ Um FreeCAD zu erlauben, diese Bibliotheken herunterzuladen, wählen Sie "Ja". - + @@ -3661,22 +3646,22 @@ Um FreeCAD zu erlauben, diese Bibliotheken herunterzuladen, wählen Sie "Ja". - - + + Start angle Startwinkel - + Pick start angle Startwinkel auswählen - - + + Aperture angle Öffnungswinkel @@ -3696,23 +3681,23 @@ Um FreeCAD zu erlauben, diese Bibliotheken herunterzuladen, wählen Sie "Ja".Kreis erstellen - + Create Arc (Part) Bogen erstellen (Part) - + Create Arc Bogen erstellen - + Pick aperture angle Öffnungswinkel wählen - - + + Arc by 3 points Bogen aus 3 Punkten @@ -4091,8 +4076,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Reverse spline - Spline umkehren - + Spline umkehren @@ -4372,7 +4356,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Rechteck erstellen - + Select an object to mirror Wählen Sie ein Objekt zum Spiegeln @@ -4387,8 +4371,8 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Spiegeln - - + + Pick end point of mirror line Endpunkt der Spiegellinie auswählen @@ -4476,7 +4460,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Polar array - Polare Anordnung + Polare Reihe @@ -5335,7 +5319,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Unable to upgrade these objects. - Diese Objekte konnten nicht aktualisiert werden + Diese Objekte konnten nicht aktualisiert werden . @@ -5798,7 +5782,7 @@ Eine 'Verknüpfungsanordnung' ist effektiver, wenn viele Kopien verarbeitet werd Label - Beschriftung + Bezeichnung @@ -6148,12 +6132,12 @@ STRG zum Fangen, SHIFT zum Festlegen. Draft_Arc_3Points - + Arc by 3 points Bogen aus 3 Punkten - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Erstellt einen Kreisbogen, durch Anwahl von 3 Punkten. @@ -6163,12 +6147,12 @@ STRG zum Fangen, SHIFT zum Festlegen. Draft_ArcTools - + Arc tools Bogenwerkzeuge - + Create various types of circular arcs. Erstellt verschiedene Arten von Kreisbögen. @@ -6748,7 +6732,7 @@ Dies ist für geschlossene Formen und Volumenkörper vorgesehen und wirkt sich n Dimension - Abmessung + Maß @@ -6810,12 +6794,12 @@ Zeichne danach eine Linie, um die Länge und Richtung der Streckung anzugeben. Draft_Mirror - + Mirror Spiegeln - + Mirrors the selected objects along a line defined by two points. Spiegelt die ausgewählten Objekte entlang einer Linie, die durch zwei Punkte definiert wird. @@ -6872,7 +6856,7 @@ Der resultierende Klon kann in jeder seiner drei Richtungen skaliert werden. Polar array - Polare Reihe + Polare Anordnung @@ -6930,7 +6914,7 @@ Beispielsweise können ausgewählte Objekte in eines zusammengefügt werden, ein Offset - Versatz + Versetzen diff --git a/src/Mod/Draft/Resources/translations/Draft_el.qm b/src/Mod/Draft/Resources/translations/Draft_el.qm index b1856a1db7..3d21433ff5 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_el.qm and b/src/Mod/Draft/Resources/translations/Draft_el.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_el.ts b/src/Mod/Draft/Resources/translations/Draft_el.ts index 85377b9f3d..05cb651089 100644 --- a/src/Mod/Draft/Resources/translations/Draft_el.ts +++ b/src/Mod/Draft/Resources/translations/Draft_el.ts @@ -6,7 +6,7 @@ Annotation Styles Editor - Επεξεργαστής κειμένου σχολιασμού + Επεξεργαστής Στυλ Σημείωσης @@ -21,7 +21,7 @@ Add new... - Προσθέστε αναφορά... + Προσθήκη νέου... @@ -334,11 +334,6 @@ Circular array Circular array - - - (Placeholder for the icon) - (Placeholder for the icon) - @@ -455,11 +450,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Orthogonal array - - - (Placeholder for the icon) - (Placeholder for the icon) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -592,11 +582,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Κυκλική διάταξη - - - (Placeholder for the icon) - (Placeholder for the icon) - @@ -2773,17 +2758,17 @@ This might fail for post DXF R12 templates. Select edge - Select edge + Επιλέξτε ακμή Add custom snap point - Add custom snap point + Προσθέστε προσαρμοσμένο σημείο προσκόλλησης Length mode - Length mode + Λειτουργία μήκους @@ -2799,12 +2784,12 @@ This might fail for post DXF R12 templates. Cycle snap object - Cycle snap object + Κυκλικό αντικείμενο προσκόλλησης Undo last segment - Undo last segment + Αναιρέστε το τελευταίο τμήμα @@ -2885,7 +2870,7 @@ This might fail for post DXF R12 templates. Enter point - Enter point + Εισάγετε σημείο @@ -3198,43 +3183,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledΒύθισμα - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3245,7 +3230,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3655,7 +3640,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3665,22 +3650,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3700,23 +3685,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4375,7 +4360,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4390,8 +4375,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -4960,7 +4945,7 @@ The final angle will be the base angle plus this amount. Rectangular array - Rectangular array + Ορθογωνική Διάταξη @@ -5355,7 +5340,7 @@ The final angle will be the base angle plus this amount. renamed 'DisplayMode' options to 'World/Screen' - renamed 'DisplayMode' options to 'World/Screen' + μετονομάστε τις επιλογές 'Λειτουργία εμφάνισης' σε 'World/Screen' @@ -5814,15 +5799,9 @@ if any. If many objects or many subelements are selected, only the first one in each case will be used to provide information to the label. - Creates a label, optionally attached to a selected object or subelement. - -First select a vertex, an edge, or a face of an object, then call this command, -and then set the position of the leader line and the textual label. -The label will be able to display information about this object, and about the selected subelement, -if any. - -If many objects or many subelements are selected, only the first one in each case -will be used to provide information to the label. + Δημιουργεί μια ετικέτα, προαιρετικά συνδεδεμένη με ένα επιλεγμένο αντικείμενο ή υποστοιχείο. +Πρώτα επιλέξτε μια κορυφή, μια άκρη ή μια όψη ενός αντικειμένου, στη συνέχεια καλέστε αυτήν την εντολή και, στη συνέχεια, ορίστε τη θέση της γραμμής οδηγού και της ετικέτας κειμένου. Η ετικέτα θα μπορεί να εμφανίζει πληροφορίες για αυτό το αντικείμενο και για το επιλεγμένο υποστοιχείο, εάν υπάρχει. +Εάν επιλεγούν πολλά αντικείμενα ή πολλά υποστοιχεία, μόνο το πρώτο σε κάθε περίπτωση θα χρησιμοποιηθεί για την παροχή πληροφοριών στην ετικέτα. @@ -6152,12 +6131,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6167,12 +6146,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6818,12 +6797,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. @@ -6981,8 +6960,8 @@ These projections can be used to create technical drawings with the TechDraw Wor Creates a shape from a text string by choosing a specific font and a placement. The closed shapes can be used for extrusions and boolean operations. - Creates a shape from a text string by choosing a specific font and a placement. -The closed shapes can be used for extrusions and boolean operations. + Δημιουργεί ένα σχήμα από μια συμβολοσειρά κειμένου επιλέγοντας μια συγκεκριμένη γραμματοσειρά και μια τοποθέτηση. +Τα κλειστά σχήματα μπορούν να χρησιμοποιηθούν για εξώθηση και δυαδικές εργασίες. @@ -7241,10 +7220,8 @@ This point can be decorated with an arrow or another symbol. as 'Text', depending on 'Label Type'. 'Target' won't be used if 'Label Type' is set to 'Custom'. - Object, and optionally subelement, whose properties will be displayed -as 'Text', depending on 'Label Type'. - -'Target' won't be used if 'Label Type' is set to 'Custom'. + Αντικείμενο και υποστοιχείο, του οποίου οι ιδιότητες θα εμφανίζονται ως "Κείμενο", ανάλογα με τον "Τύπος ετικέτας". +Ο "Στόχος" δεν θα χρησιμοποιηθεί εάν ο "Τύπος ετικέτας" έχει οριστεί σε "Προσαρμοσμένο". diff --git a/src/Mod/Draft/Resources/translations/Draft_es-AR.qm b/src/Mod/Draft/Resources/translations/Draft_es-AR.qm index dc47ab2b55..0212c1bfb4 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_es-AR.qm and b/src/Mod/Draft/Resources/translations/Draft_es-AR.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_es-AR.ts b/src/Mod/Draft/Resources/translations/Draft_es-AR.ts index bad4f09a45..effced3e5b 100644 --- a/src/Mod/Draft/Resources/translations/Draft_es-AR.ts +++ b/src/Mod/Draft/Resources/translations/Draft_es-AR.ts @@ -334,11 +334,6 @@ Circular array Matriz circular - - - (Placeholder for the icon) - (Marcador de posición para el icono) - @@ -456,11 +451,6 @@ Una matriz de enlaces es más eficiente al crear varias copias, pero no se puede Orthogonal array Matriz ortogonal - - - (Placeholder for the icon) - (Marcador de posición para el icono) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Una matriz de enlaces es más eficiente al crear varias copias, pero no se puede Polar array Matriz polar - - - (Placeholder for the icon) - (Marcador de posición para el icono) - @@ -3154,7 +3139,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Local {} @@ -3164,7 +3149,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Global {} @@ -3197,43 +3182,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledCalado - - - - - - + + + + + + Converting: Convirtiendo: - - - + + + Conversion successful Conversión completada con éxito - - + + LibreDWG converter not found Conversor LibreDWG no encontrado - - + + ODA converter not found Conversor ODA no encontrado - - + + QCAD converter not found Conversor QCAD no encontrado - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3244,7 +3229,7 @@ Para más información véase: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3652,7 +3637,7 @@ Para permitir que FreeCAD descargue estas librerías, responda Sí. - + @@ -3662,22 +3647,22 @@ Para permitir que FreeCAD descargue estas librerías, responda Sí. - - + + Start angle Ángulo Inicial - + Pick start angle Elegir ángulo de inicio - - + + Aperture angle Ángulo de apertura @@ -3697,23 +3682,23 @@ Para permitir que FreeCAD descargue estas librerías, responda Sí.Crear Círculo - + Create Arc (Part) Crear Arco (Parte) - + Create Arc Crear Arco - + Pick aperture angle Seleccione ángulo de apertura - - + + Arc by 3 points Arco por 3 puntos @@ -4371,7 +4356,7 @@ The final angle will be the base angle plus this amount. Crear Rectángulo - + Select an object to mirror Seleccione un objeto a reflejar @@ -4386,8 +4371,8 @@ The final angle will be the base angle plus this amount. Espejo - - + + Pick end point of mirror line Escoja el punto final del eje de simetría especular @@ -4685,7 +4670,7 @@ The final angle will be the base angle plus this amount. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + añadidas propiedades 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' y 'Fuse' @@ -5688,27 +5673,27 @@ por medio de la opción Herramientas ▸ Gestor de complementos Label + Position - Label + Position + Etiqueta + Posición Label + Length - Label + Length + Etiqueta + longitud Label + Area - Label + Area + Etiqueta + Área Label + Volume - Label + Volume + Etiqueta + volumen Label + Material - Label + Material + Etiqueta + Material @@ -6140,12 +6125,12 @@ CTRL para ajustar, MAYÚS para restringir. Draft_Arc_3Points - + Arc by 3 points Arco por 3 puntos - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Crea un arco circular seleccionando 3 puntos. @@ -6155,12 +6140,12 @@ CTRL para ajustar, MAYÚS para restringir. Draft_ArcTools - + Arc tools Herramientas de arco - + Create various types of circular arcs. Crea varios tipos de arcos circulares. @@ -6803,12 +6788,12 @@ luego dibuje una línea para especificar la distancia y dirección de estiramien Draft_Mirror - + Mirror Espejo - + Mirrors the selected objects along a line defined by two points. Refleja los objetos seleccionados a lo largo de una línea definida por dos puntos. @@ -7036,12 +7021,12 @@ Es un listado; donde cada elemento de la lista se mostrará en su propia línea. Horizontal and vertical alignment - Horizontal and vertical alignment + Alineación horizontal y vertical Height reference used for justification - Height reference used for justification + Referencia de altura utilizada para la justificación diff --git a/src/Mod/Draft/Resources/translations/Draft_es-ES.qm b/src/Mod/Draft/Resources/translations/Draft_es-ES.qm index b70d9c86f4..b6d72ec8e5 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_es-ES.qm and b/src/Mod/Draft/Resources/translations/Draft_es-ES.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_es-ES.ts b/src/Mod/Draft/Resources/translations/Draft_es-ES.ts index 46efa3a8ba..87f7bec89c 100644 --- a/src/Mod/Draft/Resources/translations/Draft_es-ES.ts +++ b/src/Mod/Draft/Resources/translations/Draft_es-ES.ts @@ -334,11 +334,6 @@ Circular array Matriz circular - - - (Placeholder for the icon) - (Marcador de posición para el icono) - @@ -456,11 +451,6 @@ Una matriz enlazada es más eficiente al crear múltiples copias, pero no pueden Orthogonal array Matriz ortogonal - - - (Placeholder for the icon) - (Marcador de posición para el icono) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Una matriz enlazada es más eficiente al crear múltiples copias, pero no pueden Polar array Matriz polar - - - (Placeholder for the icon) - (Marcador de posición para el icono) - @@ -3154,7 +3139,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Local {} @@ -3164,7 +3149,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Global {} @@ -3197,43 +3182,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledCalado - - - - - - + + + + + + Converting: Convirtiendo: - - - + + + Conversion successful Conversión completada con éxito - - + + LibreDWG converter not found Conversor LibreDWG no encontrado - - + + ODA converter not found Conversor ODA no encontrado - - + + QCAD converter not found Conversor QCAD no encontrado - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3244,7 +3229,7 @@ Para más información véase: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3652,7 +3637,7 @@ Para permitir que FreeCAD descargue estas librerías, responda Sí. - + @@ -3662,22 +3647,22 @@ Para permitir que FreeCAD descargue estas librerías, responda Sí. - - + + Start angle Ángulo Inicial - + Pick start angle Elegir ángulo de inicio - - + + Aperture angle Ángulo de apertura @@ -3697,23 +3682,23 @@ Para permitir que FreeCAD descargue estas librerías, responda Sí.Crear Círculo - + Create Arc (Part) Crear Arco (Parte) - + Create Arc Crear Arco - + Pick aperture angle Seleccione ángulo de apertura - - + + Arc by 3 points Arco por 3 puntos @@ -4371,7 +4356,7 @@ The final angle will be the base angle plus this amount. Crear Rectángulo - + Select an object to mirror Seleccione un objeto a reflejar @@ -4386,8 +4371,8 @@ The final angle will be the base angle plus this amount. Espejo - - + + Pick end point of mirror line Escoja el punto final del eje de simetría especular @@ -4685,7 +4670,7 @@ The final angle will be the base angle plus this amount. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + añadidas propiedades 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' y 'Fuse' @@ -5688,27 +5673,27 @@ por medio de la opción Herramientas ▸ Gestor de complementos Label + Position - Label + Position + Etiqueta + Posición Label + Length - Label + Length + Etiqueta + longitud Label + Area - Label + Area + Etiqueta + Área Label + Volume - Label + Volume + Etiqueta + volumen Label + Material - Label + Material + Etiqueta + Material @@ -6140,12 +6125,12 @@ CTRL para ajustar, MAYÚS para restringir. Draft_Arc_3Points - + Arc by 3 points Arco por 3 puntos - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Crea un arco circular seleccionando 3 puntos. @@ -6155,12 +6140,12 @@ CTRL para ajustar, MAYÚS para restringir. Draft_ArcTools - + Arc tools Herramientas de arco - + Create various types of circular arcs. Crea varios tipos de arcos circulares. @@ -6803,12 +6788,12 @@ luego dibuje una línea para especificar la distancia y dirección de estiramien Draft_Mirror - + Mirror Espejo - + Mirrors the selected objects along a line defined by two points. Refleja los objetos seleccionados a lo largo de una línea definida por dos puntos. @@ -7036,12 +7021,12 @@ Es un listado; donde cada elemento de la lista se mostrará en su propia línea. Horizontal and vertical alignment - Horizontal and vertical alignment + Alineación horizontal y vertical Height reference used for justification - Height reference used for justification + Referencia de altura utilizada para la justificación diff --git a/src/Mod/Draft/Resources/translations/Draft_eu.qm b/src/Mod/Draft/Resources/translations/Draft_eu.qm index 9a2739034c..aec536da82 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_eu.qm and b/src/Mod/Draft/Resources/translations/Draft_eu.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_eu.ts b/src/Mod/Draft/Resources/translations/Draft_eu.ts index 111d6d3c87..eaba3e1af3 100644 --- a/src/Mod/Draft/Resources/translations/Draft_eu.ts +++ b/src/Mod/Draft/Resources/translations/Draft_eu.ts @@ -334,11 +334,6 @@ Circular array Matrize zirkularra - - - (Placeholder for the icon) - (Ikonoaren lekua) - @@ -455,11 +450,6 @@ Esteka-matrizea eraginkorragoa da kopia anitz sortzean, baina ezin da fusionatu. Orthogonal array Matrize ortogonala - - - (Placeholder for the icon) - (Ikonoaren lekua) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -592,11 +582,6 @@ Esteka-matrizea eraginkorragoa da kopia anitz sortzean, baina ezin da fusionatu. Polar array Matrize polarra - - - (Placeholder for the icon) - (Ikonoaren leku-marka) - @@ -921,7 +906,7 @@ value by using the [ and ] keys while drawing Resets the working plane to its previous position - Laneko planoa aurreko posiziora berrezartzen du + Laneko planoa aurreko posizioan berrezartzen du @@ -3146,7 +3131,7 @@ Ez dago erabilgarri zirriborroen 'Erabili piezen jatorrizkoak' aukera gaituta ba Local {} - Local {} + Lokala {} @@ -3156,7 +3141,7 @@ Ez dago erabilgarri zirriborroen 'Erabili piezen jatorrizkoak' aukera gaituta ba Global {} - Global {} + Globala {} @@ -3189,43 +3174,43 @@ Ez dago erabilgarri zirriborroen 'Erabili piezen jatorrizkoak' aukera gaituta ba Zirriborroa - - - - - - + + + + + + Converting: Bihurtzen: - - - + + + Conversion successful Bihurketa ongi egin da - - + + LibreDWG converter not found Ez da aurkitu LibreDWG bihurtzailea - - + + ODA converter not found Ez da aurkitu ODA fitxategi-bihurtzailea - - + + QCAD converter not found Ez da aurkitu QCAD bihurtzailea - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3236,7 +3221,7 @@ Informazio gehiagorako, ikusi: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3646,7 +3631,7 @@ FreeCADek liburutegi horiek deskarga ditzan gaitzeko, erantzun 'Bai'. - + @@ -3656,22 +3641,22 @@ FreeCADek liburutegi horiek deskarga ditzan gaitzeko, erantzun 'Bai'. - - + + Start angle Hasierako angelua - + Pick start angle Aukeratu hasierako angelua - - + + Aperture angle Irekidura-angelua @@ -3691,23 +3676,23 @@ FreeCADek liburutegi horiek deskarga ditzan gaitzeko, erantzun 'Bai'.Sortu zirkulua - + Create Arc (Part) Sortu arkua (pieza) - + Create Arc Sortu arkua - + Pick aperture angle Aukeratu irekidura-angelua - - + + Arc by 3 points Arkua 3 punturen arabera @@ -4366,7 +4351,7 @@ Amaierako angelua oinarriko angelua gehi kantitate hau izango da. Sortu laukizuzena - + Select an object to mirror Hautatu ispilatuko den objektua @@ -4381,8 +4366,8 @@ Amaierako angelua oinarriko angelua gehi kantitate hau izango da. Ispilatu - - + + Pick end point of mirror line Aukeratu ispilatze-lerroaren amaiera-puntua @@ -4680,12 +4665,12 @@ Amaierako angelua oinarriko angelua gehi kantitate hau izango da. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' eta'Fuse' propietateak gehitu dira changed 'Tracking' property type - changed 'Tracking' property type + 'Tracking' propietate mota aldatu da @@ -5587,7 +5572,7 @@ Instalatu DXF liburutegiaren gehigarria eskuz Writing camera position - Kamera-kokapena idazten + Kameraren posizioa idazten @@ -5683,27 +5668,27 @@ Instalatu DXF liburutegiaren gehigarria eskuz Label + Position - Label + Position + Etiketa + Posizioa Label + Length - Label + Length + Etiketa + Luzera Label + Area - Label + Area + Etiketa + Area Label + Volume - Label + Volume + Etiketa + Bolumena Label + Material - Label + Material + Etiketa + Materiala @@ -5808,7 +5793,7 @@ will be used to provide information to the label. Etiketa bat sortzen du, aukeran hautatutako objektu edo azpielementu bati erantsita. Lehenengo hautatu erpin bat, ertz bat edo objektu bate aurpegi bat, eta ondoren aplikatu -komando hau, eta ezarri gida-marraren eta testu-etiketaren kokapena. +komando hau, eta ezarri gida-marraren eta testu-etiketaren posizioa. Etiketak objektu honi eta hautatutako azpielementuari buruzko informazioa bistaratzeko gai izango da. @@ -6143,12 +6128,12 @@ Ctrl atxikitzeko, Shift murrizteko. Draft_Arc_3Points - + Arc by 3 points Arkua 3 punturen arabera - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Arku zirkular bat sortzen du hiru puntu erabilita. @@ -6158,12 +6143,12 @@ Ctrl atxikitzeko, Shift murrizteko. Draft_ArcTools - + Arc tools Arku-tresnak - + Create various types of circular arcs. Arku zirkularren hainbat mota sortzen ditu. @@ -6383,7 +6368,7 @@ Eraikutzan-talde bat sortzen du, lehendik ez badago. Once the object is created double click it in the tree view to restore the camera position and objects' visibilities. Then you can use it to save a different camera position and objects' states any time you need. Proxy-objektu bat sortzen du uneko laneko planotik abiatuta. -Objektua sortu ondoren, egin klik bikoitza zuhaitz-bistan kameraren kokapena eta objektuen ikusgaitasunak leheneratzeko. +Objektua sortu ondoren, egin klik bikoitza zuhaitz-bistan kameraren posizioa eta objektuen ikusgaitasunak leheneratzeko. Ondoren, kameraren kokapen desberdina eta objektuen egoera desberdinak gorde daitezke bertan, behar direnerako. @@ -6810,12 +6795,12 @@ eta ondoren marraztu lerro bat luzatzearen distantzia eta norabidea zehazteko. Draft_Mirror - + Mirror Ispilatu - + Mirrors the selected objects along a line defined by two points. Hautatutako objektuak ispilatzen ditu bi puntuk definitutako lerro baten luzeran. @@ -7043,22 +7028,22 @@ Kateen zerrenda bat da; zerrendako elementu bakoitza bere lerroan bistaratuko da Horizontal and vertical alignment - Horizontal and vertical alignment + Lerrokatze horizontal eta bertikala Height reference used for justification - Height reference used for justification + Justifikaziorako erabitako altuera-erreferentzia Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Mantendu ezkerreko marjina eta aurreko zuriunea justifikazioa ezkerrekoa denean Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Eskalatu estalkiaren altuera bere tamainaren berdina izan dadin @@ -7073,7 +7058,7 @@ Kateen zerrenda bat da; zerrendako elementu bakoitza bere lerroan bistaratuko da Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Aurpegiak batzen ditu haiek gainjartzen badira, normalean ez da beharrezkoa (oso motela izan daiteke) @@ -7224,7 +7209,7 @@ ezarri 'Egia' fusiorako edo 'Faltsua' konposaturako The position of the tip of the leader line. This point can be decorated with an arrow or another symbol. - Gida-marraren puntaren kokapena. + Gida-marraren puntaren posizioa. Puntu hori gezi batekin edo beste ikur batekin apaindu daiteke. @@ -7251,7 +7236,7 @@ If 'Straight Direction' is set to 'Custom', the 'Points' property can be set as a list of arbitrary points. Gida-marra definitzen duten puntuen zerrenda; normalean hiru punturen zerrenda da. -Lehen puntua testuaren kokapena izango da, alegia, 'Kokapena', eta azken puntua +Lehen puntua testuaren posizioa izango da, alegia, 'Kokapena', eta azken puntua marraren punta izango da, alegia, 'Helburuko puntua'. Erdiko puntua automatikoki kalkulatuko da, hautatutako 'Norabide zuzena' eta 'Distantzia zuzena' balioa eta ikurra erabilita. @@ -7322,7 +7307,7 @@ or from the subelement 'VertexN', 'EdgeN', or 'FaceN', respectively, if it is sp Beste motetan, katea automatikoki kalkulatuko da 'Helburua' propietatean definitutako objektutik. 'Etiketa' eta 'Materiala' propietateek, horiek dituzten objektuetan funtzionatuko dute soilik, adibidez arku-objektuetan. -'Kokapena', 'Luzera' eta 'Area' propietateen kasuan, 'Helburua' propietatean adierazitako objektu +'Posizioa', 'Luzera' eta 'Area' propietateen kasuan, 'Helburua' propietatean adierazitako objektu nagusitik erauziko dira, edo 'ErpinaN', 'ErtzaN' edo 'AurpegiaN' azpielementutik, adierazita badaude. @@ -8117,8 +8102,8 @@ eta 'Azken angelua' propietateak erabiltzen baitira. Text Position. Leave '(0,0,0)' for automatic position - Testuaren kokapena. -Utzi '(0,0,0)' kokapen automatikorako + Testuaren posizioa. +Utzi '(0,0,0)' posizio automatikorako diff --git a/src/Mod/Draft/Resources/translations/Draft_fi.qm b/src/Mod/Draft/Resources/translations/Draft_fi.qm index 1ea1f927c2..4641d224ea 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_fi.qm and b/src/Mod/Draft/Resources/translations/Draft_fi.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_fi.ts b/src/Mod/Draft/Resources/translations/Draft_fi.ts index b81b3f4b2e..545e9dc557 100644 --- a/src/Mod/Draft/Resources/translations/Draft_fi.ts +++ b/src/Mod/Draft/Resources/translations/Draft_fi.ts @@ -334,11 +334,6 @@ Circular array Circular array - - - (Placeholder for the icon) - (Paikkamerkki kuvaketta varten) - @@ -456,11 +451,6 @@ Linkkimatriisi on tehokkaampi, kun luodaan useita kopioita, mutta sitä ei voi f Orthogonal array Ortogonaalinen matriisi - - - (Placeholder for the icon) - (Paikkamerkki kuvaketta varten) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Linkkimatriisi on tehokkaampi, kun luodaan useita kopioita, mutta sitä ei voi f Polar array Polar array - - - (Placeholder for the icon) - (Paikkamerkki kuvaketta varten) - @@ -3202,43 +3187,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledSyväys (vesirajasta pohjaan) - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3249,7 +3234,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3659,7 +3644,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3669,22 +3654,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3704,23 +3689,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4379,7 +4364,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4394,8 +4379,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6156,12 +6141,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6171,12 +6156,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6822,12 +6807,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_fr.qm b/src/Mod/Draft/Resources/translations/Draft_fr.qm index 73bda0cac4..d3a220498a 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_fr.qm and b/src/Mod/Draft/Resources/translations/Draft_fr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_fr.ts b/src/Mod/Draft/Resources/translations/Draft_fr.ts index e9ee577997..7d6e85d125 100644 --- a/src/Mod/Draft/Resources/translations/Draft_fr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_fr.ts @@ -334,11 +334,6 @@ Circular array Réseau circulaire - - - (Placeholder for the icon) - (Espace réservé pour l’icône) - @@ -456,11 +451,6 @@ Un réseau lié est plus efficace lors de la création de plusieurs copies, mais Orthogonal array Matrice orthogonale - - - (Placeholder for the icon) - (Espace réservé pour l’icône) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -578,7 +568,7 @@ Ceci ne fonctionne que si "Réseau lié" est désactivé. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Si coché, l'objet résultant sera un "Réseau lié" au lieu d'un réseau normal. -Un réseau lié est plus efficace lors de la création de plusieurs copies, mais il ne peut pas être fusionné. +Un réseau lié est plus efficace lors de la création de plusieurs copies mais il ne peut pas être fusionné. @@ -593,11 +583,6 @@ Un réseau lié est plus efficace lors de la création de plusieurs copies, mais Polar array Réseau polaire - - - (Placeholder for the icon) - (Espace réservé pour l’icône) - @@ -630,7 +615,7 @@ Il doit être au moins égal à 2. The coordinates of the point through which the axis of rotation passes. Change the direction of the axis itself in the property editor. - Coordonnées du point à travers lequel passe l’axe de rotation. + Coordonnées du point par lequel passe l’axe de rotation. Changer la direction de l’axe lui-même dans l’éditeur de propriété. @@ -680,12 +665,12 @@ Ceci ne fonctionne que si "Réseau lié" est désactivé. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Si coché, l'objet résultant sera un "Réseau lié" au lieu d'un réseau normal. -Un réseau lié est plus efficace lors de la création de plusieurs copies mais il ne peut pas être fusionné. +Un réseau lié est plus efficace lors de la création de plusieurs copies, mais il ne peut pas être fusionné. Link array - Réseau de liens + Réseau lié @@ -2695,7 +2680,7 @@ Ceci peut échouer avec les modèles ultérieurs à DXF R12. Relative - Relative + Relatif @@ -2725,7 +2710,7 @@ Ceci peut échouer avec les modèles ultérieurs à DXF R12. Copy - Copie + Copier @@ -2740,7 +2725,7 @@ Ceci peut échouer avec les modèles ultérieurs à DXF R12. Exit - Sortie + Quitter @@ -3157,7 +3142,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Local {} @@ -3167,7 +3152,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Global {} @@ -3200,43 +3185,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledDraft - - - - - - + + + + + + Converting: Conversion en cours : - - - + + + Conversion successful Conversion réussie - - + + LibreDWG converter not found Convertisseur LibreDWG introuvable - - + + ODA converter not found Convertisseur ODA introuvable - - + + QCAD converter not found Convertisseur QCAD introuvable - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3247,7 +3232,7 @@ Pour plus d'informations, voir : https://wiki.freecad.org/Import_Export_Preferences/fr - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3653,7 +3638,7 @@ Pour permettre à FreeCAD de télécharger ces bibliothèques, choisissez "Oui". - + @@ -3663,22 +3648,22 @@ Pour permettre à FreeCAD de télécharger ces bibliothèques, choisissez "Oui". - - + + Start angle Angle de départ - + Pick start angle Sélectionner l’angle de départ - - + + Aperture angle Angle d'ouverture @@ -3698,23 +3683,23 @@ Pour permettre à FreeCAD de télécharger ces bibliothèques, choisissez "Oui". Créer un cercle - + Create Arc (Part) Créer un arc (partie) - + Create Arc Créer un arc - + Pick aperture angle Sélectionner l’angle d’ouverture - - + + Arc by 3 points Arc par 3 points @@ -4373,7 +4358,7 @@ L'angle final sera l'angle de base plus cette quantité. Créer un rectangle - + Select an object to mirror Sélectionner un objet à symétriser @@ -4388,8 +4373,8 @@ L'angle final sera l'angle de base plus cette quantité. Symétrie - - + + Pick end point of mirror line Sélectionner le point final de la ligne de symétrie @@ -4568,7 +4553,7 @@ L'angle final sera l'angle de base plus cette quantité. Orthogonal array - Matrice orthogonale + Réseau orthogonal @@ -4687,12 +4672,12 @@ L'angle final sera l'angle de base plus cette quantité. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + a ajouté les propriétés "Justification", "JustificationReference", "KeepLeftMargin", "ScaleToSize" et "Fusion" changed 'Tracking' property type - changed 'Tracking' property type + a changé le type de la propriété "Tracking" @@ -5563,7 +5548,7 @@ Installer l’extension de la bibliothèque dxf manuellement depuis le menu Outi Copy - Copier + Copie @@ -5619,12 +5604,12 @@ Installer l’extension de la bibliothèque dxf manuellement depuis le menu Outi Draw style - Style de dessin + Style de représentation Line color - Couleur de la ligne + Couleur des lignes @@ -5689,27 +5674,27 @@ Installer l’extension de la bibliothèque dxf manuellement depuis le menu Outi Label + Position - Label + Position + Étiquette + Position Label + Length - Label + Length + Étiquette + Longueur Label + Area - Label + Area + Étiquette + Aire Label + Volume - Label + Volume + Étiquette + Volume Label + Material - Label + Material + Étiquette + Matériau @@ -6146,12 +6131,12 @@ Ctrl pour aimanter, Maj pour contraindre. Draft_Arc_3Points - + Arc by 3 points Arc par 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Crée un arc circulaire en prenant 3 points. @@ -6161,12 +6146,12 @@ Ctrl pour aimanter, Maj pour contraindre. Draft_ArcTools - + Arc tools Outils pour les arcs - + Create various types of circular arcs. Créer différents types d'arcs circulaires. @@ -6484,7 +6469,7 @@ non un sommet d'angle. Trimex - Ajuster ou prolonger + Ajuster @@ -6817,12 +6802,12 @@ puis tracer une ligne pour spécifier la distance et la direction de l'étiremen Draft_Mirror - + Mirror Symétrie - + Mirrors the selected objects along a line defined by two points. Crée une symétrie des objets sélectionnés le long d'une ligne définie par deux points. @@ -7050,22 +7035,22 @@ Il s'agit d'une liste de chaînes de caractères ; chaque élément de la liste Horizontal and vertical alignment - Horizontal and vertical alignment + Alignement horizontal et vertical Height reference used for justification - Height reference used for justification + Hauteur de référence utilisée pour justifier Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Garder la marge gauche et l'espace blanc principal lorsque la justification est à gauche Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Échelle pour s'assurer que la hauteur de la majuscule est égale à la taille @@ -7080,7 +7065,7 @@ Il s'agit d'une liste de chaînes de caractères ; chaque élément de la liste Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Fusionner les faces si les faces se chevauchent, généralement non nécessaire (peut être très lent) @@ -8042,7 +8027,7 @@ des propriétés du "premier angle" et du "dernier angle". Line color - Couleur des lignes + Couleur de ligne diff --git a/src/Mod/Draft/Resources/translations/Draft_gl.qm b/src/Mod/Draft/Resources/translations/Draft_gl.qm index 3667bb6050..7577e58a47 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_gl.qm and b/src/Mod/Draft/Resources/translations/Draft_gl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_gl.ts b/src/Mod/Draft/Resources/translations/Draft_gl.ts index 1fe6cb4a01..afcd446bd0 100644 --- a/src/Mod/Draft/Resources/translations/Draft_gl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_gl.ts @@ -334,11 +334,6 @@ Circular array Circular array - - - (Placeholder for the icon) - (Placeholder for the icon) - @@ -456,11 +451,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Orthogonal array - - - (Placeholder for the icon) - (Placeholder for the icon) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Polar array - - - (Placeholder for the icon) - (Placeholder for the icon) - @@ -3202,43 +3187,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledCalado - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3249,7 +3234,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3659,7 +3644,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3669,22 +3654,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3704,23 +3689,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4379,7 +4364,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4394,8 +4379,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6156,12 +6141,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6171,12 +6156,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6822,12 +6807,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_hr.qm b/src/Mod/Draft/Resources/translations/Draft_hr.qm index 381e8fb269..4faeac7eb2 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_hr.qm and b/src/Mod/Draft/Resources/translations/Draft_hr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_hr.ts b/src/Mod/Draft/Resources/translations/Draft_hr.ts index 4369c8e20a..f08d893b9d 100644 --- a/src/Mod/Draft/Resources/translations/Draft_hr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_hr.ts @@ -347,11 +347,6 @@ Detalji dimenzija Circular array Kružna matrica - - - (Placeholder for the icon) - (Držač mjesta za ikonu) - @@ -474,11 +469,6 @@ Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se sp Orthogonal array Ortogonalna matrica - - - (Placeholder for the icon) - (Držač mjesta za ikonu) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -585,8 +575,7 @@ Negativne vrijednosti rezultirat će kopijom proizvedenom u negativnom smjeru. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. Ako je označeno, rezultirajući objekti u matrici bit će spojeni ako se dodiruju. -Ovo djeluje samo ako je "Povezana matrica" isključen. - +Ovo djeluje samo ako je "Povezana matrica" isključen. @@ -598,8 +587,7 @@ Ovo djeluje samo ako je "Povezana matrica" isključen. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Ako je označeno, rezultirajući objekt bit će "Povezana matrica" umjesto uobičajenog polja. -Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. - +Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. @@ -614,11 +602,6 @@ Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se sp Polar array Polarna matrica - - - (Placeholder for the icon) - (Držač mjesta za ikonu) - @@ -692,7 +675,8 @@ Promijenite smjer same osi u uređivaču svojstava. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. Ako je označeno, rezultirajući objekti u matrici bit će spojeni ako se dodiruju. -Ovo djeluje samo ako je "Povezana matrica" isključen. +Ovo djeluje samo ako je "Povezana matrica" isključen. + @@ -704,7 +688,8 @@ Ovo djeluje samo ako je "Povezana matrica" isključen. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Ako je označeno, rezultirajući objekt bit će "Povezana matrica" umjesto uobičajenog polja. -Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. +Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. + @@ -3266,43 +3251,43 @@ Nije dostupno ako je omogućena opcija 'Koristi se primitivni dio' postavki Nacr Skica - - - - - - + + + + + + Converting: Pretvaranje: - - - + + + Conversion successful Pretvorba je uspješna - - + + LibreDWG converter not found LibreDWG converter nije pronađen - - + + ODA converter not found ODA konverter datoteka nije pronađen - - + + QCAD converter not found QCAD converter nije pronađen - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3314,7 +3299,7 @@ Za više informacija pogledaj: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3726,7 +3711,7 @@ Da bi odobrio FreeCAD-u preuzimanje ove biblioteke, odgovori sa Da (Yes). - + @@ -3736,22 +3721,22 @@ Da bi odobrio FreeCAD-u preuzimanje ove biblioteke, odgovori sa Da (Yes). - - + + Start angle Početni kut - + Pick start angle Odaberite početni kut - - + + Aperture angle Kut otvora @@ -3771,23 +3756,23 @@ Da bi odobrio FreeCAD-u preuzimanje ove biblioteke, odgovori sa Da (Yes).Stvori krug - + Create Arc (Part) Napravite luk (Dio) - + Create Arc Stvori Luk - + Pick aperture angle Odaberite kut otvora - - + + Arc by 3 points Luk iz 3 točke @@ -4450,7 +4435,7 @@ Konačni kut bit će osnovni kut plus ovaj iznos. Napravi Pravokutnik - + Select an object to mirror Odaberite objekt za zrcaljenje @@ -4465,8 +4450,8 @@ Konačni kut bit će osnovni kut plus ovaj iznos. Zrcaljenje - - + + Pick end point of mirror line Odaberite krajnju točku linije zrcaljenja @@ -6232,12 +6217,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Luk iz 3 točke - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Stvara kružni luk od 3 točke . @@ -6247,12 +6232,12 @@ CTRL za prikvači, SHIFT za ograničiti. Draft_ArcTools - + Arc tools Alati luka - + Create various types of circular arcs. Napravi razne vrste kružnih lukova. @@ -6904,12 +6889,12 @@ zatim nacrtajte liniju kako biste odredili udaljenost i smjer istezanja. Draft_Mirror - + Mirror Zrcaljenje - + Mirrors the selected objects along a line defined by two points. Zrcaljenje odabranih objekata duž linije definirane kroz dvije točke. diff --git a/src/Mod/Draft/Resources/translations/Draft_hu.qm b/src/Mod/Draft/Resources/translations/Draft_hu.qm index cd41d8b186..d523d64fcc 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_hu.qm and b/src/Mod/Draft/Resources/translations/Draft_hu.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_hu.ts b/src/Mod/Draft/Resources/translations/Draft_hu.ts index 5caea14577..eabd0a78a5 100644 --- a/src/Mod/Draft/Resources/translations/Draft_hu.ts +++ b/src/Mod/Draft/Resources/translations/Draft_hu.ts @@ -334,11 +334,6 @@ Circular array Körkörös elrendelés - - - (Placeholder for the icon) - (helykitöltő a szimbólumhoz) - @@ -456,11 +451,6 @@ A elrendezés csatolás hatékonyabb több példány létrehozásakor, de nem eg Orthogonal array Merőleges elrendezés - - - (Placeholder for the icon) - (helykitöltő a szimbólumhoz) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ A elrendezés csatolás hatékonyabb több példány létrehozásakor, de nem eg Polar array Poláris elrendezés - - - (Placeholder for the icon) - (helykitöltő a szimbólumhoz) - @@ -3163,7 +3148,7 @@ Nem érhető el, ha a 'Rész-primitívek használata' beállítás engedélyezve Local {} - Local {} + Helyi {} @@ -3173,7 +3158,7 @@ Nem érhető el, ha a 'Rész-primitívek használata' beállítás engedélyezve Global {} - Global {} + Globális {} @@ -3206,43 +3191,43 @@ Nem érhető el, ha a 'Rész-primitívek használata' beállítás engedélyezve Tervrajz - - - - - - + + + + + + Converting: Átalakítás: - - - + + + Conversion successful Átalakítás sikeres - - + + LibreDWG converter not found LibreDWG átalakító nem található - - + + ODA converter not found ODA átalakító nem található - - + + QCAD converter not found QCAD átalakító nem található - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3253,7 +3238,7 @@ További információkért lásd: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3663,7 +3648,7 @@ A FreeCAD letöltésének bekapcsolásához válassza az "Igen"-t. - + @@ -3673,22 +3658,22 @@ A FreeCAD letöltésének bekapcsolásához válassza az "Igen"-t. - - + + Start angle Kezdő szög - + Pick start angle Kezdő fok kiválasztása - - + + Aperture angle Nyílás szöge @@ -3708,23 +3693,23 @@ A FreeCAD letöltésének bekapcsolásához válassza az "Igen"-t. Kör rajzolása - + Create Arc (Part) Ív létrehozása (rész) - + Create Arc Ív létrehozása - + Pick aperture angle Nyílás szögének kiválasztása - - + + Arc by 3 points Körív 3 pontból @@ -4383,7 +4368,7 @@ A végső szög lesz az alapszög plusz ennek összege. Téglalap rajzolása - + Select an object to mirror Tárgy kiválasztása tükrözéshez @@ -4398,8 +4383,8 @@ A végső szög lesz az alapszög plusz ennek összege. Tükrözés - - + + Pick end point of mirror line Tükrözési egyenes végpontjának kiválasztása @@ -4697,12 +4682,12 @@ A végső szög lesz az alapszög plusz ennek összege. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + hozzáadott 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' és 'Fuse' tulajdonságok changed 'Tracking' property type - changed 'Tracking' property type + a 'Nyomonkövetés' tulajdonság típusa megváltozott @@ -5700,27 +5685,27 @@ kézzel az Eszközök -> Kiegészítő kezelő menüből Label + Position - Label + Position + Címke + Pozíció Label + Length - Label + Length + Címke + Hossz Label + Area - Label + Area + Címke + Terület Label + Volume - Label + Volume + Címke + Térfogat Label + Material - Label + Material + Címke + Anyag @@ -5809,7 +5794,7 @@ Az összekapcsolt elrendezés több példány feldolgozásakor hatékonyabb, de Label - Felirat + Címke @@ -6160,12 +6145,12 @@ CTRL az illesztéshez, SHIFT a kényszerítéshez. Draft_Arc_3Points - + Arc by 3 points Körív 3 pontból - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Körkörös ívet hoz létre 3 pont kiválasztásával. @@ -6175,12 +6160,12 @@ CTRL illesztéshez, a SHIFT a kényszerítéshez. Draft_ArcTools - + Arc tools Íveszközök - + Create various types of circular arcs. Hozzon létre különböző típusú köríveket. @@ -6825,12 +6810,12 @@ majd rajzoljon egy vonalat a nyújtás távolságának és irányának megadás Draft_Mirror - + Mirror Tükrözés - + Mirrors the selected objects along a line defined by two points. A kijelölt tárgyakat két pont által meghatározott vonal mentén tükrözi. @@ -7057,12 +7042,12 @@ Ez egy karakter lista; a lista minden eleme a saját sorában jelenik meg. Horizontal and vertical alignment - Horizontal and vertical alignment + Vízszintes és függőleges igazítás Height reference used for justification - Height reference used for justification + Az igazoláshoz használt magassági referencia diff --git a/src/Mod/Draft/Resources/translations/Draft_id.qm b/src/Mod/Draft/Resources/translations/Draft_id.qm index 0b20e60248..0050613b1a 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_id.qm and b/src/Mod/Draft/Resources/translations/Draft_id.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_id.ts b/src/Mod/Draft/Resources/translations/Draft_id.ts index 9d83dc8698..ea1afbd61a 100644 --- a/src/Mod/Draft/Resources/translations/Draft_id.ts +++ b/src/Mod/Draft/Resources/translations/Draft_id.ts @@ -334,11 +334,6 @@ Circular array Array Melingkar - - - (Placeholder for the icon) - (Placeholder untuk ikon) - @@ -455,11 +450,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Orthogonal array - - - (Placeholder for the icon) - (Placeholder untuk ikon) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -584,11 +574,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Polar array - - - (Placeholder for the icon) - (Placeholder untuk ikon) - @@ -3192,43 +3177,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledKonsep - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3239,7 +3224,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3649,7 +3634,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3659,22 +3644,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3694,23 +3679,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4369,7 +4354,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4384,8 +4369,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6146,12 +6131,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6161,12 +6146,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6812,12 +6797,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_it.qm b/src/Mod/Draft/Resources/translations/Draft_it.qm index 3b7d8305a3..6ca014918b 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_it.qm and b/src/Mod/Draft/Resources/translations/Draft_it.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_it.ts b/src/Mod/Draft/Resources/translations/Draft_it.ts index 106ecd82ef..18da73cc6e 100644 --- a/src/Mod/Draft/Resources/translations/Draft_it.ts +++ b/src/Mod/Draft/Resources/translations/Draft_it.ts @@ -334,11 +334,6 @@ Circular array Serie circolare - - - (Placeholder for the icon) - (Segnaposto per l'icona) - @@ -456,11 +451,6 @@ Una serie di link è più efficiente quando si creano più copie, ma non può es Orthogonal array Serie ortogonale - - - (Placeholder for the icon) - (Segnaposto per l'icona) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Una serie di link è più efficiente quando si creano più copie, ma non può es Polar array Serie polare - - - (Placeholder for the icon) - (Segnaposto per l'icona) - @@ -3202,43 +3187,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledDraft - - - - - - + + + + + + Converting: Conversione in corso: - - - + + + Conversion successful Conversione riuscita - - + + LibreDWG converter not found Convertitore LibreDWG non trovato - - + + ODA converter not found Convertitore ODA non trovato - - + + QCAD converter not found Convertitore QCAD non trovato - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3249,7 +3234,7 @@ Per maggiori informazioni si veda: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3654,7 +3639,7 @@ Per abilitare FreeCAD a scaricare queste librerie, rispondere Sì. - + @@ -3664,22 +3649,22 @@ Per abilitare FreeCAD a scaricare queste librerie, rispondere Sì. - - + + Start angle Angolo iniziale - + Pick start angle Selezionare l'angolo iniziale - - + + Aperture angle Angolo di apertura @@ -3699,23 +3684,23 @@ Per abilitare FreeCAD a scaricare queste librerie, rispondere Sì.Crea Cerchio - + Create Arc (Part) Crea Arco (Part) - + Create Arc Crea Arco - + Pick aperture angle Scegliere l'angolo di apertura - - + + Arc by 3 points Arco per 3 punti @@ -4374,7 +4359,7 @@ L'angolo finale sarà l'angolo base più questa quantità. Crea Rettangolo - + Select an object to mirror Selezionare un oggetto da specchiare @@ -4389,8 +4374,8 @@ L'angolo finale sarà l'angolo base più questa quantità. Specchio - - + + Pick end point of mirror line Scegliere il punto finale della linea specchio @@ -6150,12 +6135,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arco per 3 punti - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Crea un arco circolare selezionando 3 punti. @@ -6165,12 +6150,12 @@ CTRL per lo snap, SHIFT per vincolare. Draft_ArcTools - + Arc tools Strumenti Arco - + Create various types of circular arcs. Crea differenti tipologie di archi circolari. @@ -6814,12 +6799,12 @@ Selezionare un oggetto, quindi disegnare un rettangolo per scegliere i vertici c Draft_Mirror - + Mirror Specchio - + Mirrors the selected objects along a line defined by two points. Specchia gli oggetti selezionati lungo una linea definita da due punti. diff --git a/src/Mod/Draft/Resources/translations/Draft_ja.qm b/src/Mod/Draft/Resources/translations/Draft_ja.qm index 5c1f409670..da71586e39 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ja.qm and b/src/Mod/Draft/Resources/translations/Draft_ja.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ja.ts b/src/Mod/Draft/Resources/translations/Draft_ja.ts index aaba276a78..ed4d12f951 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ja.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ja.ts @@ -334,11 +334,6 @@ Circular array 円形整列 - - - (Placeholder for the icon) - (アイコンのプレースホルダ) - @@ -456,11 +451,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array 矩形整列 - - - (Placeholder for the icon) - (アイコンのプレースホルダ) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array 軸周整列 - - - (Placeholder for the icon) - (アイコンのプレースホルダ) - @@ -3189,43 +3174,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabled喫水 - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3236,7 +3221,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3646,7 +3631,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3656,22 +3641,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3691,23 +3676,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4366,7 +4351,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4381,8 +4366,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6143,12 +6128,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6158,12 +6143,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6809,12 +6794,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_ka.qm b/src/Mod/Draft/Resources/translations/Draft_ka.qm index c242fc0ad5..a1d0ca04d9 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ka.qm and b/src/Mod/Draft/Resources/translations/Draft_ka.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ka.ts b/src/Mod/Draft/Resources/translations/Draft_ka.ts index ca6fbb9486..89cfafe97d 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ka.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ka.ts @@ -334,11 +334,6 @@ Circular array წრიული მასივი - - - (Placeholder for the icon) - (ადგილი ხატულასთვის) - @@ -456,11 +451,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array ორთოგონალური მასივი - - - (Placeholder for the icon) - (ადგილი ხატულასთვის) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -565,8 +555,8 @@ Negative values will result in copies produced in the negative direction. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - თუ ჩართულია, მოხდება მასივში მიღებული ობიექტების შერწყმა, თუ ისინი ერთმანეთს ეხებიან. -მუშაობს მხოლოდ მაშინ, თუ "ბმულის მასივი" გამორთულია. + თუ ჩართულია, მიღებული ობიექტები მასივში შეერთდება, თუ ისინი ერთმანეთს ეხებიან. +ეს მხოლოდ მაშინ მუშაობს, თუ "მასივების მიბმა" გამორთულია. @@ -583,7 +573,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Link array - ბმულების მასივი + მასივების მიბმა @@ -593,11 +583,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array პოლარული მასივი - - - (Placeholder for the icon) - (ხატულის ადგილმჭერი) - @@ -667,13 +652,13 @@ Change the direction of the axis itself in the property editor. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - თუ ჩართულია, მიღებული ობიექტები მასივში შეერთდება, თუ ისინი ერთმანეთს ეხებიან. -ეს მხოლოდ მაშინ მუშაობს, თუ "მასივების მიბმა" გამორთულია. + თუ ჩართულია, მოხდება მასივში მიღებული ობიექტების შერწყმა, თუ ისინი ერთმანეთს ეხებიან. +მუშაობს მხოლოდ მაშინ, თუ "ბმულის მასივი" გამორთულია. Fuse - შერწყმა + შეერთება @@ -685,7 +670,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Link array - მასივების მიბმა + ბმულების მასივი @@ -3156,7 +3141,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + ლოკალური {} @@ -3166,7 +3151,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + გლობალური {} @@ -3199,43 +3184,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledმონახაზი - - - - - - + + + + + + Converting: გადაყვანა: - - - + + + Conversion successful გადაყვანა წარმატებულია - - + + LibreDWG converter not found LibreDWG გარდამქმნელი ვერ ვიპოვე - - + + ODA converter not found ODA გარდამქმნელი ვერ ვიპოვე - - + + QCAD converter not found QCAD გარდამქმნელი ვერ ვიპოვე - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3246,7 +3231,7 @@ https://wiki.freecad.org/Import_Export_Preferences https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3653,7 +3638,7 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - + @@ -3663,22 +3648,22 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - - + + Start angle საწყისი კუთხე - + Pick start angle აირჩიეთ საწყისი კუთხე - - + + Aperture angle დიაფრაგმის კუთხე @@ -3698,23 +3683,23 @@ https://github.com/yorikvanhavre/Draft-dxf-importer წრის შექმნა - + Create Arc (Part) რკალის შექმნა (ნაწილი) - + Create Arc რკალის შექმნა - + Pick aperture angle აირჩიეთ აპერტურის კუთხე - - + + Arc by 3 points რკალი 3 წერტილით @@ -4373,7 +4358,7 @@ The final angle will be the base angle plus this amount. ოთხკუთხედის შექმნა - + Select an object to mirror ასლის ასაღებად გთხოვთ მონიშნოთ ობიექტი @@ -4388,8 +4373,8 @@ The final angle will be the base angle plus this amount. სარკე - - + + Pick end point of mirror line აირჩიეთ ასლის ხაზის ბოლო წერტილი @@ -4687,12 +4672,12 @@ The final angle will be the base angle plus this amount. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + დაემატა თვისებები 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' changed 'Tracking' property type - changed 'Tracking' property type + თვისების ტიპი 'ტრეკინგი' შეიცვალა @@ -5660,7 +5645,7 @@ from menu Tools -> Addon Manager Position - Position + მდებარეობა @@ -5690,27 +5675,27 @@ from menu Tools -> Addon Manager Label + Position - Label + Position + ჭდე + მდებარეობა Label + Length - Label + Length + ჭდე + სიგრძე Label + Area - Label + Area + ჭდე + ფართობი Label + Volume - Label + Volume + ჭდე + მოცულობა Label + Material - Label + Material + ჭდე + მასალა @@ -6150,12 +6135,12 @@ CTRL მისაბმელად, SHIFT შესაზღუდად. Draft_Arc_3Points - + Arc by 3 points რკალი სამი წერტილით - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. ქმნის წრიულ რკალს 3 წერტილის არჩევით. @@ -6165,12 +6150,12 @@ CTRL მისაბმელად, SHIFT შესაზღუდად. Draft_ArcTools - + Arc tools რკალის ხელსაწყოები - + Create various types of circular arcs. სხვადასხვა ტიპის მრგვალი რკალების შექმნა. @@ -6815,12 +6800,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror სარკე - + Mirrors the selected objects along a line defined by two points. მონიშნული ობიექტების კოპირება ორი წერტილით განსაზღვრული ხაზის გასწვრივ. @@ -7046,22 +7031,22 @@ It is a list of strings; each element in the list will be displayed in its own l Horizontal and vertical alignment - Horizontal and vertical alignment + ჰორიზონტალური და ვერტიკალური სწორება Height reference used for justification - Height reference used for justification + გასწორებისთვის გამოყენებული სიმაღლის მიმართვა Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + მარცხენა საზღვრისა და დასაწყისში არსებული გამოტოვებების შენარჩუნება, როცა სწორება მარცხნივ ხდება Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + მასშტაბი დაფარვის სიმაღლის ზომასთან ტოლობაში დასარწმუნებლად @@ -7076,7 +7061,7 @@ It is a list of strings; each element in the list will be displayed in its own l Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + ზედაპირების შერწყმა, თუ ისინი იკვეთებიან. ჩვეულებრივ, საჭირო არაა (შეიძლება ძალიან ნელი იყოს) diff --git a/src/Mod/Draft/Resources/translations/Draft_ko.qm b/src/Mod/Draft/Resources/translations/Draft_ko.qm index fe4e313154..d7c03e40ab 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ko.qm and b/src/Mod/Draft/Resources/translations/Draft_ko.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ko.ts b/src/Mod/Draft/Resources/translations/Draft_ko.ts index f687dc424e..1a6450281d 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ko.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ko.ts @@ -334,11 +334,6 @@ Circular array 원형 배열 - - - (Placeholder for the icon) - (아이콘의 자리 표시자) - @@ -456,11 +451,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array 직교 배열 - - - (Placeholder for the icon) - (아이콘의 자리 표시자) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array 극 배열 - - - (Placeholder for the icon) - (아이콘의 자리 표시자) - @@ -3198,43 +3183,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabled흘수 - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3245,7 +3230,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3655,7 +3640,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3665,22 +3650,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3700,23 +3685,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4375,7 +4360,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4390,8 +4375,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6152,12 +6137,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6167,12 +6152,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6818,12 +6803,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_nl.qm b/src/Mod/Draft/Resources/translations/Draft_nl.qm index 82369baf59..5e804dd021 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_nl.qm and b/src/Mod/Draft/Resources/translations/Draft_nl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_nl.ts b/src/Mod/Draft/Resources/translations/Draft_nl.ts index 21d9fe5761..4282804b7e 100644 --- a/src/Mod/Draft/Resources/translations/Draft_nl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_nl.ts @@ -334,11 +334,6 @@ Circular array Cirkelvormig patroon - - - (Placeholder for the icon) - (Plaats reservering voor het pictogram) - @@ -456,11 +451,6 @@ Een linkreeks is efficiënter bij het maken van meerdere kopieën, maar kan niet Orthogonal array Orthogonale matrix - - - (Placeholder for the icon) - (Plaats reservering voor het pictogram) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Een linkreeks is efficiënter bij het maken van meerdere kopieën, maar kan niet Polar array Polair matrix - - - (Placeholder for the icon) - (Plaats reservering voor het pictogram) - @@ -3158,7 +3143,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Lokaal {} @@ -3168,7 +3153,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Globaal {} @@ -3201,43 +3186,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledSchets - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3248,7 +3233,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3656,7 +3641,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3666,22 +3651,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Starthoek - + Pick start angle Kies starthoek - - + + Aperture angle Aperture angle @@ -3701,23 +3686,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Maak Cirkel - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4376,7 +4361,7 @@ The final angle will be the base angle plus this amount. Rechthoek maken - + Select an object to mirror Selecteer een object om te spiegelen @@ -4391,8 +4376,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Kies het eindpunt van de spiegellijn @@ -4690,12 +4675,12 @@ The final angle will be the base angle plus this amount. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + de eigenschappen "Uitlijning", "UitlijningsReferentie", "HoudLinkerMarge", "SchaalNaarMaat" en "Samenvoegen" zijn toegevoegd changed 'Tracking' property type - changed 'Tracking' property type + type van eigenschap "Volgen" is gewijzigd @@ -6153,12 +6138,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6168,12 +6153,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools - Arc tools + Booggereedschappen - + Create various types of circular arcs. Create various types of circular arcs. @@ -6561,7 +6546,7 @@ CTRL to snap, SHIFT to constrain. Bézier tools - Bézier tools + Bézier-gereedschappen @@ -6819,12 +6804,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Spiegel - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. @@ -7052,17 +7037,17 @@ It is a list of strings; each element in the list will be displayed in its own l Horizontal and vertical alignment - Horizontal and vertical alignment + Horizontale en verticale uitlijning Height reference used for justification - Height reference used for justification + Hoogte-referentie gebruikt voor uitlijning Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Behoud linker marge en eerste witte ruimte bij linker uitlijning diff --git a/src/Mod/Draft/Resources/translations/Draft_pl.qm b/src/Mod/Draft/Resources/translations/Draft_pl.qm index 5e62adc60a..3d7d780771 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_pl.qm and b/src/Mod/Draft/Resources/translations/Draft_pl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_pl.ts b/src/Mod/Draft/Resources/translations/Draft_pl.ts index 73f73d808b..f16eedf9e0 100644 --- a/src/Mod/Draft/Resources/translations/Draft_pl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_pl.ts @@ -334,11 +334,6 @@ Circular array Szyk kołowy - - - (Placeholder for the icon) - (Miejsce na ikonę) - @@ -455,11 +450,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Szyk prostopadły - - - (Placeholder for the icon) - (Miejsce na ikonę) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -591,11 +581,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Szyk biegunowy - - - (Placeholder for the icon) - (Miejsce na ikonkę) - @@ -671,7 +656,7 @@ Działa to tylko wtedy, gdy opcja "Szyk łączy" jest nieaktywna. Fuse - Scal + Scalenie @@ -2443,7 +2428,7 @@ Te linie są grubsze niż normalne linie siatki. Automatic - Automatycznie + Automatyczna @@ -2713,7 +2698,7 @@ Te linie są grubsze niż normalne linie siatki. Global - Globalnie + Globalne @@ -3170,7 +3155,7 @@ Opcja jest niedostępna, jeśli opcja preferencji Rysunku Roboczego "używaj ele Local {} - Local {} + Lokalnie {} @@ -3180,7 +3165,7 @@ Opcja jest niedostępna, jeśli opcja preferencji Rysunku Roboczego "używaj ele Global {} - Global {} + Globalnie {} @@ -3213,43 +3198,43 @@ Opcja jest niedostępna, jeśli opcja preferencji Rysunku Roboczego "używaj ele Rysunek Roboczy - - - - - - + + + + + + Converting: Konwertowanie: - - - + + + Conversion successful Konwersja zakończona - - + + LibreDWG converter not found Nie znaleziono konwertera LibreDWG - - + + ODA converter not found Nie znaleziono konwertera ODA - - + + QCAD converter not found Nie znaleziono konwertera QCAD - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3260,7 +3245,7 @@ Aby uzyskać więcej informacji, zobacz stronę: https://wiki.freecad.org/Import_Export_Preferences/pl - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3669,7 +3654,7 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - + @@ -3679,22 +3664,22 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - - + + Start angle Kąt początkowy - + Pick start angle Wybierz kąt początkowy - - + + Aperture angle Kąt otwarcia @@ -3714,23 +3699,23 @@ https://github.com/yorikvanhavre/Draft-dxf-importer Utwórz okrąg - + Create Arc (Part) Utwórz łuk (środowisko pracy Część) - + Create Arc Utwórz łuk - + Pick aperture angle Wybierz kąt otwarcia - - + + Arc by 3 points Łuk przez trzy punkty @@ -4389,7 +4374,7 @@ Kąt końcowy będzie równy kątowi podstawowemu plus ta wartość.Utwórz prostokąt - + Select an object to mirror Wybierz obiekt do odbicia lustrzanego @@ -4404,8 +4389,8 @@ Kąt końcowy będzie równy kątowi podstawowemu plus ta wartość.Odbicie lustrzane - - + + Pick end point of mirror line Wybierz punkt końcowy linii odbicia @@ -4703,12 +4688,12 @@ Kąt końcowy będzie równy kątowi podstawowemu plus ta wartość. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + dodano właściwości "Justowanie", "OdniesienieJustowania", "ZachowajLewyMargines", "SkalujDoRozmiaru" i "Scal" changed 'Tracking' property type - changed 'Tracking' property type + zmieniono typ właściwości "Śledzenie" @@ -5635,7 +5620,7 @@ Proszę zainstalować dodatek bibliotek dxf ręcznie z narzędzi Menu -> Mene Draw style - Styl rysowania + Styl kreślenia @@ -5705,27 +5690,27 @@ Proszę zainstalować dodatek bibliotek dxf ręcznie z narzędzi Menu -> Mene Label + Position - Label + Position + Etykieta + pozycja Label + Length - Label + Length + Etykieta + długość Label + Area - Label + Area + Etykieta + obszar Label + Volume - Label + Volume + Etykieta + objętość Label + Material - Label + Material + Etykieta + materiał @@ -5929,7 +5914,7 @@ Jednak pojedynczy szkic z rozłączonymi elementami zostanie przekonwertowany na Snap Lock - Zablokuj przyciąganie + Przełącz przyciąganie @@ -6167,12 +6152,12 @@ CTRL, aby przyciągnąć, SHIFT, aby utworzyć wiązanie. Draft_Arc_3Points - + Arc by 3 points - Łuk przez 3 punkty + Łuk przez trzy punkty - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Tworzy łuk kołowy przez wskazanie 3 punktów. @@ -6182,12 +6167,12 @@ CTRL, aby przyciągnąć, SHIFT, aby utworzyć wiązanie. Draft_ArcTools - + Arc tools Narzędzia łuku - + Create various types of circular arcs. Twórz różne rodzaje łuków kołowych. @@ -6223,7 +6208,7 @@ CTRL, aby przyciągnąć, SHIFT, aby utworzyć wiązanie. Edit - Edytuj + Edycja @@ -6835,12 +6820,12 @@ CTRL, aby przyciągnąć. Draft_Mirror - + Mirror Odbicie lustrzane - + Mirrors the selected objects along a line defined by two points. Odbija wybrane obiekty względem linii określonej przez dwa punkty. @@ -7068,22 +7053,22 @@ Jest to lista ciągów znaków; każdy element na liście będzie wyświetlany w Horizontal and vertical alignment - Horizontal and vertical alignment + Wyrównanie poziome i pionowe Height reference used for justification - Height reference used for justification + Wysokość odniesienia używana do justowania Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Po pozostawieniu justowania zachowaj lewy margines i początkową spację Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Skaluj, aby upewnić się, że wysokość nasadki jest zgodna z rozmiarem @@ -7098,7 +7083,7 @@ Jest to lista ciągów znaków; każdy element na liście będzie wyświetlany w Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Łączenie ścian, jeśli zachodzą na siebie, zwykle nie jest wymagane (może być bardzo powolne) diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm b/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm index cda3325415..c206425f27 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm and b/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts b/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts index e940fa8d2b..81357bc913 100644 --- a/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts +++ b/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts @@ -334,11 +334,6 @@ Circular array Rede circular - - - (Placeholder for the icon) - (Espaço reservado para o ícone) - @@ -454,11 +449,6 @@ Uma rede de links é mais eficiente quando se criam várias cópias, mas não po Orthogonal array Rede ortogonal - - - (Placeholder for the icon) - (Espaço reservado para o ícone) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -590,11 +580,6 @@ Uma rede de links é mais eficiente quando se criam várias cópias, mas não po Polar array Rede polar - - - (Placeholder for the icon) - (Espaço reservado para o ícone) - @@ -3151,7 +3136,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Local {} @@ -3161,7 +3146,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Global {} @@ -3194,43 +3179,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledProjeto - - - - - - + + + + + + Converting: Convertendo: - - - + + + Conversion successful Conversão bem sucedida - - + + LibreDWG converter not found Conversor LibreDWG não encontrado - - + + ODA converter not found Conversor ODA não encontrado - - + + QCAD converter not found Conversor QCAD não encontrado - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3241,7 +3226,7 @@ Para mais informações, visite: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3649,7 +3634,7 @@ Para habilitar o FreeCAD para fazer o download destas bibliotecas, responda Sim. - + @@ -3659,22 +3644,22 @@ Para habilitar o FreeCAD para fazer o download destas bibliotecas, responda Sim. - - + + Start angle Angulo inicial - + Pick start angle Escolha o ângulo inicial - - + + Aperture angle Ângulo de abertura @@ -3694,23 +3679,23 @@ Para habilitar o FreeCAD para fazer o download destas bibliotecas, responda Sim. Criar Círculo - + Create Arc (Part) Criar Arco (Parte) - + Create Arc Criar Arco - + Pick aperture angle Escolha o ângulo de abertura - - + + Arc by 3 points Arco por 3 pontos @@ -3813,7 +3798,7 @@ Para habilitar o FreeCAD para fazer o download destas bibliotecas, responda Sim. Rotation - Rotation + Rotação @@ -4012,7 +3997,7 @@ The final angle will be the base angle plus this amount. B-Spline - B-Spline + Spline B @@ -4368,7 +4353,7 @@ The final angle will be the base angle plus this amount. Criar Retângulo - + Select an object to mirror Selecione um objeto a ser espelhado @@ -4383,8 +4368,8 @@ The final angle will be the base angle plus this amount. Espelhar - - + + Pick end point of mirror line Escolha o ponto final da linha de espelhamento @@ -4682,12 +4667,12 @@ The final angle will be the base angle plus this amount. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + adicionado 'Justificativa', 'JustificaçãoReferência', 'ManterMargemEsquerda', 'EscalarAoTamanho' e 'Fuso' propriedades changed 'Tracking' property type - changed 'Tracking' property type + alterado o tipo de propriedade 'Rastreamento' @@ -5589,7 +5574,7 @@ no menu ferramentas -> Gerenciador de Extensões Writing camera position - Writing camera position + Escrevendo posição da câmera @@ -5685,27 +5670,27 @@ no menu ferramentas -> Gerenciador de Extensões Label + Position - Label + Position + Posição + Rótulo Label + Length - Label + Length + Etiqueta + Comprimento Label + Area - Label + Area + Rótulo + área Label + Volume - Label + Volume + Rótulo + Volume Label + Material - Label + Material + Rótulo + Material @@ -6145,12 +6130,12 @@ CTRL para ajustar, SHIFT para restringir. Draft_Arc_3Points - + Arc by 3 points Arco por 3 pontos - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Cria um arco circular escolhendo 3 pontos. @@ -6160,12 +6145,12 @@ CTRL para ajustar, SHIFT para restringir. Draft_ArcTools - + Arc tools Ferramentas de arco - + Create various types of circular arcs. Cria vários tipos de arcos circulares. @@ -6808,12 +6793,12 @@ em seguida, desenhe uma linha para especificar a distância e direção do estic Draft_Mirror - + Mirror Espelhar - + Mirrors the selected objects along a line defined by two points. Espelha os objetos selecionados ao longo de uma linha definida por dois pontos. @@ -7041,22 +7026,22 @@ It is a list of strings; each element in the list will be displayed in its own l Horizontal and vertical alignment - Horizontal and vertical alignment + Alinhamento horizontal e vertical Height reference used for justification - Height reference used for justification + Referência de altura usada para justificação Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Mantenha a margem esquerda e o espaço em branco quando a justificação for deixada Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Escala para garantir que a altura máxima é igual ao tamanho @@ -7071,7 +7056,7 @@ It is a list of strings; each element in the list will be displayed in its own l Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Fundir faces se as faces se sobrepõem, geralmente não é necessário (pode ser muito lento) @@ -7659,7 +7644,7 @@ isto deixa as faces no lugar do corte The placement of this object - The placement of this object + O posicionamento deste objeto @@ -8133,7 +8118,7 @@ Escreva '$dim' para que seja substituído pelo comprimento da cota. Show the unit suffix - Show the unit suffix + Mostrar o sufixo de unidade diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm b/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm index c319289e84..d8bbf64dec 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm and b/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts b/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts index 269d22a565..014b0f9900 100644 --- a/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts +++ b/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts @@ -334,11 +334,6 @@ Circular array Lista circular - - - (Placeholder for the icon) - (Marcador de posição para o ícone) - @@ -456,11 +451,6 @@ Um "Link array" é mais eficiente ao criar várias cópias, mas não pode ser fu Orthogonal array Matriz ortogonal - - - (Placeholder for the icon) - (Marcador de posição para o ícone) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Um "Link array" é mais eficiente ao criar várias cópias, mas não pode ser fu Polar array Matriz polar - - - (Placeholder for the icon) - (Marcador de posição para o ícone) - @@ -3199,43 +3184,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledCalado do Navio - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3246,7 +3231,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3656,7 +3641,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3666,22 +3651,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Ângulo inicial - + Pick start angle Escolher ângulo inicial - - + + Aperture angle Ângulo de Abertura @@ -3701,23 +3686,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Criar círculo - + Create Arc (Part) Criar Arco (Parte) - + Create Arc Criar Arco - + Pick aperture angle Escolher ângulo de abertura - - + + Arc by 3 points Arco por 3 pontos @@ -4376,7 +4361,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4391,8 +4376,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6153,12 +6138,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arco por 3 pontos - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6168,12 +6153,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6819,12 +6804,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_ro.qm b/src/Mod/Draft/Resources/translations/Draft_ro.qm index 70f2942a82..94830acead 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ro.qm and b/src/Mod/Draft/Resources/translations/Draft_ro.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ro.ts b/src/Mod/Draft/Resources/translations/Draft_ro.ts index 8c384d1cf0..dee2446024 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ro.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ro.ts @@ -334,11 +334,6 @@ Circular array Matrice circulară - - - (Placeholder for the icon) - (Substituent pentru pictogramă) - @@ -456,11 +451,6 @@ O matrice înlănțuită este mai eficientă în crearea mai multor copii, dar a Orthogonal array Matrice ortogonală - - - (Placeholder for the icon) - (Substituent pentru pictogramă) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ O matrice înlănțuită este mai eficientă în crearea mai multor copii, dar a Polar array Matrice polară - - - (Placeholder for the icon) - (Substituent pentru pictogramă) - @@ -3202,43 +3187,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledPescaj - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3249,7 +3234,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3659,7 +3644,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3669,22 +3654,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3704,23 +3689,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4379,7 +4364,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4394,8 +4379,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6156,12 +6141,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6171,12 +6156,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6822,12 +6807,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_ru.qm b/src/Mod/Draft/Resources/translations/Draft_ru.qm index fb6ad8cbd7..bc3573f4e1 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ru.qm and b/src/Mod/Draft/Resources/translations/Draft_ru.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ru.ts b/src/Mod/Draft/Resources/translations/Draft_ru.ts index 6eab02da9e..1fc9b9dea9 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ru.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ru.ts @@ -334,11 +334,6 @@ Circular array Круговой массив - - - (Placeholder for the icon) - (Держатель места для значка) - @@ -455,11 +450,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Прямоугольный массив - - - (Placeholder for the icon) - (Держатель места для значка) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -563,8 +553,8 @@ Negative values will result in copies produced in the negative direction. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - Если отмечено, то результирующие объекты в массиве будут слиты, если касаются друг друга. -Это работает только в том случае, если "Связь массивов" отключена. + Если флажок установлен, результирующие объекты в массиве будут сливаться, если они соприкасаются друг с другом. +Это работает только в том случае, если «массив ссылок» отключен. @@ -575,13 +565,13 @@ This only works if "Link array" is off. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. - Если отмечено, результирующим объектом будет "Массив ссылок" вместо обычного массива. -Массив ссылок более эффективен при создании нескольких копий, но к нему нельзя применить операцию слияния. + Если флажок установлен, результирующий объект будет «массивом ссылок» вместо обычного массива. +Массив Link более эффективен при создании нескольких копий, но его нельзя объединить вместе. Link array - Массив из связанных объектов + Массив ссылок @@ -591,11 +581,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Массив вращения - - - (Placeholder for the icon) - (Держатель места для значка) - @@ -665,25 +650,25 @@ Change the direction of the axis itself in the property editor. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - Если флажок установлен, результирующие объекты в массиве будут сливаться, если они соприкасаются друг с другом. -Это работает только в том случае, если «массив ссылок» отключен. + Если отмечено, то результирующие объекты в массиве будут слиты, если касаются друг друга. +Это работает только в том случае, если "Связь массивов" отключена. Fuse - Слияние + Объединение If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. - Если флажок установлен, результирующий объект будет «массивом ссылок» вместо обычного массива. -Массив Link более эффективен при создании нескольких копий, но его нельзя объединить вместе. + Если отмечено, результирующим объектом будет "Массив ссылок" вместо обычного массива. +Массив ссылок более эффективен при создании нескольких копий, но к нему нельзя применить операцию слияния. Link array - Массив ссылок + Массив из связанных объектов @@ -3142,7 +3127,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Локальный {} @@ -3152,7 +3137,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Глобальный {} @@ -3185,43 +3170,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledЧерновик - - - - - - + + + + + + Converting: Конвертировать: - - - + + + Conversion successful Конвертация прошла успешно - - + + LibreDWG converter not found Не найден конвертер LibreDWG - - + + ODA converter not found Не найден конвертер ODA - - + + QCAD converter not found Не найден конвертер QCAD - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3232,7 +3217,7 @@ https://wiki.freecad.org/Import_Export_Preferences https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3639,7 +3624,7 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - + @@ -3649,22 +3634,22 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - - + + Start angle Начальный угол - + Pick start angle Выбрать начальный угол - - + + Aperture angle Угол раскрытия @@ -3684,23 +3669,23 @@ https://github.com/yorikvanhavre/Draft-dxf-importer Создать окружность - + Create Arc (Part) Создать дугу (деталь) - + Create Arc Создать дугу - + Pick aperture angle Выбрать угол раскрытия - - + + Arc by 3 points Дуга по 3 точкам @@ -4359,7 +4344,7 @@ The final angle will be the base angle plus this amount. Создать Прямоугольник - + Select an object to mirror Выберите объект для зеркалирования @@ -4374,8 +4359,8 @@ The final angle will be the base angle plus this amount. Зеркально - - + + Pick end point of mirror line Выберите конечную точку линии зеркалирования @@ -4673,12 +4658,12 @@ The final angle will be the base angle plus this amount. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + добавлены свойства «Justification», «JustificationReference», «KeepLeftMargin», «ScaleToSize» и «Fuse» changed 'Tracking' property type - changed 'Tracking' property type + изменен тип свойства «Отслеживание» @@ -5159,7 +5144,7 @@ The final angle will be the base angle plus this amount. Edit - Правка + Редактировать @@ -5548,7 +5533,7 @@ from menu Tools -> Addon Manager Copy - Скопировать + Копировать @@ -5604,7 +5589,7 @@ from menu Tools -> Addon Manager Draw style - Стиль рисования + Стиль представления @@ -5634,7 +5619,7 @@ from menu Tools -> Addon Manager Custom - Дополнительно + Пользовательский @@ -5674,27 +5659,27 @@ from menu Tools -> Addon Manager Label + Position - Label + Position + Метка + Положение Label + Length - Label + Length + Метка + Длина Label + Area - Label + Area + Метка + Площадь Label + Volume - Label + Volume + Метка + Объём Label + Material - Label + Material + Метка + Материал @@ -6133,12 +6118,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Дуга по 3 точкам - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Создаёт дугу окружности, выбрав 3 точки. @@ -6148,12 +6133,12 @@ CTRL для привязки, SHIFT для ограничения. Draft_ArcTools - + Arc tools Инструменты построения дуги - + Create various types of circular arcs. Создает различные типы круговых дуг. @@ -6796,12 +6781,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Зеркально - + Mirrors the selected objects along a line defined by two points. Отразить выбранные объекты относительно линии, заданной двумя точками. @@ -7028,22 +7013,22 @@ It is a list of strings; each element in the list will be displayed in its own l Horizontal and vertical alignment - Horizontal and vertical alignment + Горизонтальное и вертикальное выравнивание Height reference used for justification - Height reference used for justification + Эталон высоты, используемый для обоснования Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Сохраняйте левое поле и начальные пробелы, если остается выравнивание Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Масштабирование для обеспечения соответствия высоты крышки ее размеру @@ -7058,7 +7043,7 @@ It is a list of strings; each element in the list will be displayed in its own l Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Слияние граней, если они пересекаются, обычно не требуется (может быть очень медленным) diff --git a/src/Mod/Draft/Resources/translations/Draft_sl.qm b/src/Mod/Draft/Resources/translations/Draft_sl.qm index 5984c8e0f1..3e7ae641b2 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sl.qm and b/src/Mod/Draft/Resources/translations/Draft_sl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sl.ts b/src/Mod/Draft/Resources/translations/Draft_sl.ts index a4435481b6..1c2a501c6f 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sl.ts @@ -334,11 +334,6 @@ Circular array Krožna razpostavitev - - - (Placeholder for the icon) - (Prostornik ikone) - @@ -456,11 +451,6 @@ Vezana razpostavitev je učinkovitejša pri ustvarjanju večjega števila dvojni Orthogonal array Pravokotna razpostavitev - - - (Placeholder for the icon) - (Prostornik ikone) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Vezana razpostavitev je učinkovitejša pri ustvarjanju večjega števila dvojni Polar array Krožna razpostavitev - - - (Placeholder for the icon) - (Prostornik ikone) - @@ -673,7 +658,7 @@ To deluje le, če je "Vezana razpostavitev" izključena. Fuse - Združi + Zlij @@ -2705,7 +2690,7 @@ To lahko spodleti pri predlogah novejših od DXF R12. Global - Obče + Splošno @@ -3162,7 +3147,7 @@ Ta možnost ni na voljo, če je v prednastavitvah izrisovanja možnost "Uporabi Local {} - Local {} + Krajevni {} @@ -3172,7 +3157,7 @@ Ta možnost ni na voljo, če je v prednastavitvah izrisovanja možnost "Uporabi Global {} - Global {} + Obče {} @@ -3205,43 +3190,43 @@ Ta možnost ni na voljo, če je v prednastavitvah izrisovanja možnost "Uporabi Izris - - - - - - + + + + + + Converting: Pretvarjanje: - - - + + + Conversion successful Pretvaranje uspelo - - + + LibreDWG converter not found Pretvornika LibreDWG datotek ni mogoče najti - - + + ODA converter not found Pretvornika ODA datotek ni mogoče najti - - + + QCAD converter not found Pretvornika QCAD datotek ni mogoče najti - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3252,7 +3237,7 @@ Več informacij lahko najdete na: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3662,7 +3647,7 @@ Da FreeCADu omogočite prenos teh knjižnic, odgovorite z Da. - + @@ -3672,22 +3657,22 @@ Da FreeCADu omogočite prenos teh knjižnic, odgovorite z Da. - - + + Start angle Začetni kot - + Pick start angle Izberite začetni kot - - + + Aperture angle Središčni kot @@ -3707,23 +3692,23 @@ Da FreeCADu omogočite prenos teh knjižnic, odgovorite z Da. Ustvari krog - + Create Arc (Part) Ustvari lok (Del) - + Create Arc Ustvari lok - + Pick aperture angle Izberite središčni kot - - + + Arc by 3 points Lok iz 3 točk @@ -4382,7 +4367,7 @@ Končni kót bo seštevek izhodiščnega in tega kóta. Ustvari pravokotnik - + Select an object to mirror Izberite predmet za zrcaljenje @@ -4397,8 +4382,8 @@ Končni kót bo seštevek izhodiščnega in tega kóta. Zrcali - - + + Pick end point of mirror line Izberite končno točko zrcalne črte @@ -4696,12 +4681,12 @@ Končni kót bo seštevek izhodiščnega in tega kóta. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties + dodane lastnosti "Poravnava", "Sklic poravnave", "Ohrani levi rob", "Prevelikosti na mero" in "Združi" changed 'Tracking' property type - changed 'Tracking' property type + spremenjena vrsta lastnosti "Sledenje" @@ -5669,7 +5654,7 @@ z menija Orodja -> Upravljalnik vstavkov Position - Position + Položaj @@ -5699,27 +5684,27 @@ z menija Orodja -> Upravljalnik vstavkov Label + Position - Label + Position + Oznaka + Položaj Label + Length - Label + Length + Oznaka + Dolžina Label + Area - Label + Area + Oznaka + Površina Label + Volume - Label + Volume + Oznaka + Prostornina Label + Material - Label + Material + Oznaka + Snov @@ -6158,12 +6143,12 @@ CTRL za pripenjanje, PREMAKNI za omejitev. Draft_Arc_3Points - + Arc by 3 points Lok iz 3 točk - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Ustvari krožni lok z določitvijo 3 točk. @@ -6173,12 +6158,12 @@ CTRL za pripenjanje, PREMAKNI za omejitev. Draft_ArcTools - + Arc tools Ločna orodja - + Create various types of circular arcs. Ustvari različne vrste krožnih lokov. @@ -6823,12 +6808,12 @@ in potegnite črto, vzdolž katere bo potekal premik. Draft_Mirror - + Mirror Zrcali - + Mirrors the selected objects along a line defined by two points. Prezrcali izbrane predmete preko črte, določene z dvema točkama. @@ -7056,22 +7041,22 @@ To je seznam nizov, ki bodo prikazani vsak v svoji vrsti. Horizontal and vertical alignment - Horizontal and vertical alignment + Vodoravna in navpična poravnava Height reference used for justification - Height reference used for justification + Višinski sklic poravnave Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Pri levi poravnavi ohrani levi rob in začetni presledek Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Prevelikosti tako, da bo višina pokrova enaka velikosti @@ -7086,7 +7071,7 @@ To je seznam nizov, ki bodo prikazani vsak v svoji vrsti. Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Združi ploskve, če se prekrivajo, običajno pa ni potrebno (lahko zelo počasno) diff --git a/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm b/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm index 496bac0aee..5834f598a8 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm and b/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts b/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts index b858ff8447..651da15bcd 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts @@ -334,11 +334,6 @@ Circular array Kružno umnožavanje - - - (Placeholder for the icon) - (Rezervisano mesto za ikonu) - @@ -455,11 +450,6 @@ Umnožavanje veza je efikasnije kada se napravi više kopija, ali se ne može sp Orthogonal array Pravougaono umnožavanje - - - (Placeholder for the icon) - (Rezervisano mesto za ikonu) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -592,11 +582,6 @@ Umnožavanje veza je efikasnije kada se napravi više kopija, ali se ne može sp Polar array Polarno umnožavanje - - - (Placeholder for the icon) - (Rezervisano mesto za ikonu) - @@ -672,7 +657,7 @@ Ovo radi samo ako je "Umnožavanje veza" isključeno. Fuse - Spajanje + Unija @@ -3116,7 +3101,7 @@ Nije dostupno ako je omogućena Draft opcija podešavanja 'Koristi Part primitiv Label - Ime + Oznaka @@ -3137,7 +3122,7 @@ Nije dostupno ako je omogućena Draft opcija podešavanja 'Koristi Part primitiv Distance - Distance + Rastojanje @@ -3159,7 +3144,7 @@ Nije dostupno ako je omogućena Draft opcija podešavanja 'Koristi Part primitiv Local {} - Local {} + Lokalno {} @@ -3169,7 +3154,7 @@ Nije dostupno ako je omogućena Draft opcija podešavanja 'Koristi Part primitiv Global {} - Global {} + Opšto {} @@ -3202,43 +3187,43 @@ Nije dostupno ako je omogućena Draft opcija podešavanja 'Koristi Part primitiv Zakošenje - - - - - - + + + + + + Converting: Konvertovanje: - - - + + + Conversion successful Konverzija je uspela - - + + LibreDWG converter not found LibreDWG konvertor nije pronađen - - + + ODA converter not found ODA konvertor nije pronađen - - + + QCAD converter not found QCAD konvertor nije pronađen - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3249,7 +3234,7 @@ Za više informacija pogledajte: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3657,7 +3642,7 @@ Da bi omogućio FreeCAD-u da preuzme ove biblioteke, odgovori sa Da. - + @@ -3667,22 +3652,22 @@ Da bi omogućio FreeCAD-u da preuzme ove biblioteke, odgovori sa Da. - - + + Start angle Početni ugao - + Pick start angle Izaberi početni ugao - - + + Aperture angle Krajnji ugao @@ -3702,23 +3687,23 @@ Da bi omogućio FreeCAD-u da preuzme ove biblioteke, odgovori sa Da.Napravi kružnicu - + Create Arc (Part) Napravi kružni luk (Deo) - + Create Arc Napravi kružni luk - + Pick aperture angle Izaberi krajnji ugao - - + + Arc by 3 points Kružni luk pomoću 3 tačke @@ -4377,7 +4362,7 @@ Krajnji ugao će biti početni ugao plus ovaj iznos. Napravi Pravougaonik - + Select an object to mirror Izaberi objekat koji želiš da simetrično preslikaš @@ -4392,8 +4377,8 @@ Krajnji ugao će biti početni ugao plus ovaj iznos. Simetrično preslikavanje - - + + Pick end point of mirror line Izaberi krajnju tačku linije simetrije @@ -5659,12 +5644,12 @@ iz menija Alati/Menadžer dodataka Label - Ime + Oznaka Position - Position + Položaj @@ -5674,7 +5659,7 @@ iz menija Alati/Menadžer dodataka Area - Area + Oblast @@ -5684,7 +5669,7 @@ iz menija Alati/Menadžer dodataka Tag - Tag + Oznaka @@ -5694,27 +5679,27 @@ iz menija Alati/Menadžer dodataka Label + Position - Label + Position + Oznaka + Položaj Label + Length - Label + Length + Oznaka + Dužina Label + Area - Label + Area + Oznaka + Oblast Label + Volume - Label + Volume + Oznaka + Zapremina Label + Material - Label + Material + Oznaka + Materijal @@ -5803,7 +5788,7 @@ A 'Link array' is more efficient when handling many copies but the 'Fuse' option Label - Oznaka + Ime @@ -6154,12 +6139,12 @@ CTRL za hvatanje, SHIFT za ograničavanje. Draft_Arc_3Points - + Arc by 3 points Kružni luk pomoću 3 tačke - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Pravi kružni luk pomoću 3 tačke. @@ -6169,12 +6154,12 @@ CTRL za hvatanje, SHIFT za ograničavanje. Draft_ArcTools - + Arc tools Alatke za kružna lukove - + Create various types of circular arcs. Napravi različite vrste kružnih lukova. @@ -6820,12 +6805,12 @@ a zatim nacrtaj liniju da odrediš rastojanje i pravac rastezanja. Draft_Mirror - + Mirror Simetrično preslikavanje - + Mirrors the selected objects along a line defined by two points. Simetrično preslikavanje izabranih objekata pomoću linije zadate pomoću dve tačke. @@ -7053,22 +7038,22 @@ To je lista sa nizovima znakova; svaki niz znakova u listi će biti prikazan u s Horizontal and vertical alignment - Horizontal and vertical alignment + Horizontalno i vertikalno poravnanje Height reference used for justification - Height reference used for justification + Referentna visina za obostrano poravnanje Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Zadržite levu marginu i prednji beli prostor kada je levo poravnanje Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Skaliraj, da bi osigurao visinu velikog slova jednaku veličini @@ -7083,7 +7068,7 @@ To je lista sa nizovima znakova; svaki niz znakova u listi će biti prikazan u s Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Sjedini stranice ako se preklapaju, obično nije potrebno (može biti veoma sporo) diff --git a/src/Mod/Draft/Resources/translations/Draft_sr.qm b/src/Mod/Draft/Resources/translations/Draft_sr.qm index 20cb1c2f24..d3c04a2d35 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sr.qm and b/src/Mod/Draft/Resources/translations/Draft_sr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sr.ts b/src/Mod/Draft/Resources/translations/Draft_sr.ts index eeb3df0c3e..0f0b26abaf 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sr.ts @@ -334,11 +334,6 @@ Circular array Кружно умножавање - - - (Placeholder for the icon) - (Резервисано место за икону) - @@ -455,11 +450,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Правоугаоно умножавање - - - (Placeholder for the icon) - (Резервисано место за икону) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -592,11 +582,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Поларно умножавање - - - (Placeholder for the icon) - (Резервисано место за икону) - @@ -3116,7 +3101,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Label - Име + Ознака @@ -3137,7 +3122,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Distance - Distance + Растојање @@ -3159,7 +3144,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Local {} - Local {} + Локално {} @@ -3169,7 +3154,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Global {} - Global {} + Општo {} @@ -3202,43 +3187,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledЗакошење - - - - - - + + + + + + Converting: Конвертовање: - - - + + + Conversion successful Конверзија је успела - - + + LibreDWG converter not found LibreDWG конвертор датотека није пронађен - - + + ODA converter not found ODA конвертор није пронађен - - + + QCAD converter not found QCAD конвертор није пронађен - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3249,7 +3234,7 @@ https://wiki.freecad.org/Import_Export_Preferences https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3657,7 +3642,7 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - + @@ -3667,22 +3652,22 @@ https://github.com/yorikvanhavre/Draft-dxf-importer - - + + Start angle Почетни угао - + Pick start angle Изабери почетни угао - - + + Aperture angle Крајњи угао @@ -3702,23 +3687,23 @@ https://github.com/yorikvanhavre/Draft-dxf-importer Направи кружницу - + Create Arc (Part) Направи кружни лук (Део) - + Create Arc Направи кружни лук - + Pick aperture angle Изабери крајњи угао - - + + Arc by 3 points Кружни лук помоћу 3 тачке @@ -4377,7 +4362,7 @@ The final angle will be the base angle plus this amount. Направи Правоугаоник - + Select an object to mirror Изабери објекат који желиш да симетрично пресликаш @@ -4392,8 +4377,8 @@ The final angle will be the base angle plus this amount. Симетрично пресликавање - - + + Pick end point of mirror line Изабери крајњу тачку линије симетрије @@ -5177,7 +5162,7 @@ The final angle will be the base angle plus this amount. Edit - Измени + Уреди @@ -5659,12 +5644,12 @@ from menu Tools -> Addon Manager Label - Име + Ознака Position - Position + Положај @@ -5674,7 +5659,7 @@ from menu Tools -> Addon Manager Area - Area + Област @@ -5684,7 +5669,7 @@ from menu Tools -> Addon Manager Tag - Tag + Ознака @@ -5694,27 +5679,27 @@ from menu Tools -> Addon Manager Label + Position - Label + Position + Ознака + Положај Label + Length - Label + Length + Ознака + Дужина Label + Area - Label + Area + Ознака + Област Label + Volume - Label + Volume + Ознака + Запремина Label + Material - Label + Material + Ознака + Материјал @@ -5803,7 +5788,7 @@ A 'Link array' is more efficient when handling many copies but the 'Fuse' option Label - Ознака + Име @@ -6154,12 +6139,12 @@ CTRL за хватање, SHIFT за ограничавање. Draft_Arc_3Points - + Arc by 3 points Кружни лук помоћу 3 тачке - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Прави кружни лук помоћу 3 тачке. @@ -6169,12 +6154,12 @@ CTRL за хватање, SHIFT за ограничавање. Draft_ArcTools - + Arc tools Алатке за кружна лукове - + Create various types of circular arcs. Направи различите врсте кружних лукова. @@ -6820,12 +6805,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Симетрично пресликавање - + Mirrors the selected objects along a line defined by two points. Симетрично пресликавање изабраних објеката помоћу линије задате помоћу две тачке. @@ -7053,22 +7038,22 @@ It is a list of strings; each element in the list will be displayed in its own l Horizontal and vertical alignment - Horizontal and vertical alignment + Хоризонтално и вертикално поравнање Height reference used for justification - Height reference used for justification + Референтна висина за обострано поравнање Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Задржите леву маргину и предњи бели простор када је лево поравнање Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Скалирај, да би осигурао висину великог слова једнаку величини @@ -7083,7 +7068,7 @@ It is a list of strings; each element in the list will be displayed in its own l Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Сједини странице ако се преклапају, обично није потребно (може бити веома споро) diff --git a/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm b/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm index 77039e48f4..ae1e204a12 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm and b/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts b/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts index 39e406f689..d51e15bbbc 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts @@ -334,11 +334,6 @@ Circular array Cirkulär array - - - (Placeholder for the icon) - (Platshållare för ikonen) - @@ -456,11 +451,6 @@ En Länkmatris är effektivare när du skapar flera kopior, men den kan inte sl Orthogonal array Rutnätsmatris - - - (Placeholder for the icon) - (Platshållare för ikonen) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ En Länkmatris är effektivare när du skapar flera kopior, men den kan inte sl Polar array Polär matris - - - (Placeholder for the icon) - (Platshållare för ikonen) - @@ -3198,43 +3183,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledDjupgående - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3245,7 +3230,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3655,7 +3640,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3665,22 +3650,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3700,23 +3685,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4375,7 +4360,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4390,8 +4375,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -5571,7 +5556,7 @@ from menu Tools -> Addon Manager Modify subelements - Modify subelements + Modifiera underelement @@ -6152,12 +6137,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6167,12 +6152,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6818,12 +6803,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_tr.qm b/src/Mod/Draft/Resources/translations/Draft_tr.qm index 256b3d5cec..6b3b5397bf 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_tr.qm and b/src/Mod/Draft/Resources/translations/Draft_tr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_tr.ts b/src/Mod/Draft/Resources/translations/Draft_tr.ts index 9831846801..ee9a8d1ae9 100644 --- a/src/Mod/Draft/Resources/translations/Draft_tr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_tr.ts @@ -334,11 +334,6 @@ Circular array Dairesel dizi - - - (Placeholder for the icon) - (Placeholder for the icon) - @@ -456,11 +451,6 @@ Birden fazla kopyalar oluştuğu zaman bir bağlantı daha verimlidir ama o, bir Orthogonal array Dikey dizi - - - (Placeholder for the icon) - (Placeholder for the icon) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Birden fazla kopyalar oluştuğu zaman bir bağlantı daha verimlidir ama o, bir Polar array Kutupsal dizi - - - (Placeholder for the icon) - (Placeholder for the icon) - @@ -3201,43 +3186,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledTaslak - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3248,7 +3233,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3658,7 +3643,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3668,22 +3653,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3703,23 +3688,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4378,7 +4363,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4393,8 +4378,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6155,12 +6140,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6170,12 +6155,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6821,12 +6806,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_uk.qm b/src/Mod/Draft/Resources/translations/Draft_uk.qm index eabb2696b0..7f436f34d9 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_uk.qm and b/src/Mod/Draft/Resources/translations/Draft_uk.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_uk.ts b/src/Mod/Draft/Resources/translations/Draft_uk.ts index cf7a2c2751..e4f7ca35b7 100644 --- a/src/Mod/Draft/Resources/translations/Draft_uk.ts +++ b/src/Mod/Draft/Resources/translations/Draft_uk.ts @@ -334,11 +334,6 @@ Circular array Круговий масив - - - (Placeholder for the icon) - (Бланк для піктограми) - @@ -456,11 +451,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Ортогональний масив - - - (Placeholder for the icon) - (Бланк для піктограми) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Полярний масив - - - (Placeholder for the icon) - (Бланк для піктограми) - @@ -3205,43 +3190,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledКреслення - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3252,7 +3237,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3662,7 +3647,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3672,22 +3657,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3707,23 +3692,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4382,7 +4367,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4397,8 +4382,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -5863,7 +5848,7 @@ will be used to provide information to the label. Hatch - Hatch + Штрихування @@ -6159,12 +6144,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6174,12 +6159,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools - Arc tools + Інструменти дуги - + Create various types of circular arcs. Create various types of circular arcs. @@ -6567,7 +6552,7 @@ CTRL to snap, SHIFT to constrain. Bézier tools - Bézier tools + Інструменти для побудови кривої Безьє @@ -6713,7 +6698,7 @@ A 'Point link array' is more efficient when handling many copies. Toggle construction mode - Toggle construction mode + Змінити режим конструювання @@ -6825,12 +6810,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. @@ -8189,7 +8174,7 @@ past the extension lines Length of the extension lines - Length of the extension lines + Довжина виносних ліній diff --git a/src/Mod/Draft/Resources/translations/Draft_val-ES.qm b/src/Mod/Draft/Resources/translations/Draft_val-ES.qm index 184f128f47..7d6109132e 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_val-ES.qm and b/src/Mod/Draft/Resources/translations/Draft_val-ES.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_val-ES.ts b/src/Mod/Draft/Resources/translations/Draft_val-ES.ts index 0d4201c461..9b81fe1509 100644 --- a/src/Mod/Draft/Resources/translations/Draft_val-ES.ts +++ b/src/Mod/Draft/Resources/translations/Draft_val-ES.ts @@ -334,11 +334,6 @@ Circular array Matriu circular - - - (Placeholder for the icon) - (Espai reservat per a la icona) - @@ -456,11 +451,6 @@ Una matriu d'enllaç és més eficient quan es creen diverses còpies, però no Orthogonal array Matriu ortogonal - - - (Placeholder for the icon) - (Espai reservat per a la icona) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -593,11 +583,6 @@ Una matriu d'enllaç és més eficient quan es creen diverses còpies, però no Polar array Matriu polar - - - (Placeholder for the icon) - (Espai reservat per a la icona) - @@ -3176,43 +3161,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabledCalat - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3223,7 +3208,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3633,7 +3618,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3643,22 +3628,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3678,23 +3663,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4353,7 +4338,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4368,8 +4353,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6130,12 +6115,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6145,12 +6130,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6796,12 +6781,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm b/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm index bbfae969bb..315acb055b 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm and b/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts b/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts index aa183c8d32..148c768d9e 100644 --- a/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts +++ b/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts @@ -303,7 +303,7 @@ Dimension details - Dimension details + 尺寸详情 @@ -334,11 +334,6 @@ Circular array 环形阵列 - - - (Placeholder for the icon) - (图标占位符) - @@ -455,11 +450,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array 正交阵列 - - - (Placeholder for the icon) - (图标占位符) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -591,11 +581,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array 环形阵列 - - - (Placeholder for the icon) - (图标占位符) - @@ -866,7 +851,7 @@ will be moved to the center of the view The spacing between the smaller grid lines - The spacing between the smaller grid lines + 较小网格线之间的间距 @@ -3193,43 +3178,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabled拔模 - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3240,7 +3225,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3650,7 +3635,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3660,22 +3645,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3695,23 +3680,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -4370,7 +4355,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4385,8 +4370,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -6147,12 +6132,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6162,12 +6147,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6813,12 +6798,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm b/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm index 816681f083..a44b252d38 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm and b/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts b/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts index f1e495f04e..6b0c8a4304 100644 --- a/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts +++ b/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts @@ -16,7 +16,7 @@ The name of your style. Existing style names can be edited. - The name of your style. Existing style names can be edited. + 您樣式的名稱。已存在的樣式名稱可以被編輯。 @@ -82,7 +82,7 @@ Import styles from json file - Import styles from json file + 從 json 檔案中導入樣式 @@ -130,7 +130,7 @@ px - px + 像素 @@ -214,18 +214,18 @@ If it is checked it will show the unit next to the dimension value - If it is checked it will show the unit next to the dimension value + 若這被勾選,它將在尺寸值旁邊顯示單位 Show unit - Show unit + 顯示單位 Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit - Specify a valid length unit like mm, m, in, ft, to force displaying the dimension value in this unit + 指定一個有效的長度單位,如毫米(mm)、公尺(m)、英寸(in)、英尺(ft),以強制顯示該單位的尺寸值。 @@ -241,7 +241,7 @@ Decimals - Decimals + 小數位數 @@ -258,7 +258,7 @@ If it is checked it will display the dimension line - If it is checked it will display the dimension line + 若這被勾選,它將顯示尺寸線條 @@ -314,12 +314,12 @@ The length of the extension lines - The length of the extension lines + 延長線長度 Extension lines - Extension lines + 延伸線 @@ -332,12 +332,7 @@ Circular array - Circular array - - - - (Placeholder for the icon) - (Placeholder for the icon) + 環形陣列 @@ -428,8 +423,8 @@ Change the direction of the axis itself in the property editor. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - If checked, the resulting objects in the array will be fused if they touch each other. -This only works if "Link array" is off. + 若被勾選,陣列中的結果物件將在彼此接觸時融合在一起。 +此功能只有在 "鏈接陣列" 關閉時有效。 @@ -456,11 +451,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array Orthogonal array - - - (Placeholder for the icon) - (Placeholder for the icon) - Number of elements in the array in the specified direction, including a copy of the original object. @@ -565,8 +555,8 @@ Negative values will result in copies produced in the negative direction. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - If checked, the resulting objects in the array will be fused if they touch each other. -This only works if "Link array" is off. + 若被勾選,陣列中的結果物件將在彼此接觸時融合在一起。 +此功能只有在 "鏈接陣列" 關閉時有效。 @@ -593,11 +583,6 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Polar array Polar array - - - (Placeholder for the icon) - (Placeholder for the icon) - @@ -667,8 +652,8 @@ Change the direction of the axis itself in the property editor. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - If checked, the resulting objects in the array will be fused if they touch each other. -This only works if "Link array" is off. + 若被勾選,陣列中的結果物件將在彼此接觸時融合在一起。 +此功能只有在 "鏈接陣列" 關閉時有效。 @@ -941,27 +926,27 @@ value by using the [ and ] keys while drawing Style settings - Style settings + 樣式設定 Fills the values below with a stored style preset - Fills the values below with a stored style preset + 以儲存的樣式預設值填寫底下的值 Load preset - Load preset + 載入預設 Save current style as a preset... - Save current style as a preset... + 儲存目前樣式為預設... Lines and faces - Lines and faces + 線與面 @@ -971,7 +956,7 @@ value by using the [ and ] keys while drawing The color of lines - The color of lines + 線條顏色 @@ -981,7 +966,7 @@ value by using the [ and ] keys while drawing px - px + 像素 @@ -991,7 +976,7 @@ value by using the [ and ] keys while drawing The line style - The line style + 線條樣式 @@ -1046,7 +1031,7 @@ value by using the [ and ] keys while drawing Shape color - Shape color + 造型顏色 @@ -1082,7 +1067,7 @@ value by using the [ and ] keys while drawing Apply above style to all annotations (texts, dimensions and labels) - Apply above style to all annotations (texts, dimensions and labels) + 將以上樣式應用到所有註解(文字、尺寸以及標籤) @@ -1132,7 +1117,7 @@ value by using the [ and ] keys while drawing Arrow style - Arrow style + 箭頭樣式 @@ -1167,7 +1152,7 @@ value by using the [ and ] keys while drawing Ext lines - Ext lines + 延伸線條 @@ -1187,7 +1172,7 @@ value by using the [ and ] keys while drawing Show unit - Show unit + 顯示單位 @@ -1227,7 +1212,7 @@ value by using the [ and ] keys while drawing Apply above style to selected object(s) - Apply above style to selected object(s) + 將以上樣式應用到被選擇物件 @@ -1564,7 +1549,7 @@ Note that this is not fully supported, and many object will be not editable with An SVG linestyle definition - An SVG linestyle definition + SVG 線條樣式定義 @@ -1831,7 +1816,7 @@ One unit in the SVG file will translate as one millimeter. Style of SVG file to write when exporting a sketch - Style of SVG file to write when exporting a sketch + 當匯出草圖時所要寫入之SVG檔案樣式 @@ -2976,12 +2961,12 @@ Not available if Draft preference option 'Use Part Primitives' is enabled If checked, an OCC-style offset will be performed instead of the classic offset - If checked, an OCC-style offset will be performed instead of the classic offset + 如果勾選,將執行 OCC-樣式的偏移,而不是傳統的偏移。 &OCC-style offset - &OCC-style offset + &OCC-樣式偏移 @@ -3065,7 +3050,7 @@ Not available if Draft preference option 'Use Part Primitives' is enabled Change default style for new objects - Change default style for new objects + 更改給新物件的預設樣式 @@ -3200,43 +3185,43 @@ Not available if Draft preference option 'Use Part Primitives' is enabled吃水 - - - - - - + + + + + + Converting: Converting: - - - + + + Conversion successful Conversion successful - - + + LibreDWG converter not found LibreDWG converter not found - - + + ODA converter not found ODA converter not found - - + + QCAD converter not found QCAD converter not found - - + + No suitable external DWG converter has been found. Please set one manually under menu Edit -> Preferences -> Import/Export -> DWG For more information see: @@ -3247,7 +3232,7 @@ For more information see: https://wiki.freecad.org/Import_Export_Preferences - + Error during DWG conversion. Try moving the DWG file to a directory path without spaces and non-english characters, or try saving to a lower DWG version. @@ -3657,7 +3642,7 @@ To enabled FreeCAD to download these libraries, answer Yes. - + @@ -3667,22 +3652,22 @@ To enabled FreeCAD to download these libraries, answer Yes. - - + + Start angle Start angle - + Pick start angle Pick start angle - - + + Aperture angle Aperture angle @@ -3702,23 +3687,23 @@ To enabled FreeCAD to download these libraries, answer Yes. Create Circle - + Create Arc (Part) Create Arc (Part) - + Create Arc Create Arc - + Pick aperture angle Pick aperture angle - - + + Arc by 3 points Arc by 3 points @@ -3760,12 +3745,12 @@ To enabled FreeCAD to download these libraries, answer Yes. Annotation style editor - Annotation style editor + 註解樣式編輯器 Open styles file - Open styles file + 開啟樣式檔案 @@ -3776,7 +3761,7 @@ To enabled FreeCAD to download these libraries, answer Yes. Save styles file - Save styles file + 儲存樣式檔案 @@ -4043,7 +4028,7 @@ The final angle will be the base angle plus this amount. Change Style - Change Style + 變更樣式 @@ -4377,7 +4362,7 @@ The final angle will be the base angle plus this amount. Create Rectangle - + Select an object to mirror Select an object to mirror @@ -4392,8 +4377,8 @@ The final angle will be the base angle plus this amount. Mirror - - + + Pick end point of mirror line Pick end point of mirror line @@ -4641,7 +4626,7 @@ The final angle will be the base angle plus this amount. Circular array - Circular array + 環形陣列 @@ -5478,12 +5463,12 @@ from menu Tools -> Addon Manager Save style - Save style + 儲存樣式 Name of this new style: - Name of this new style: + 為此新樣式命名: @@ -5498,12 +5483,12 @@ from menu Tools -> Addon Manager Error: json module not found. Unable to load style - Error: json module not found. Unable to load style + 錯誤:找不到 json 模組。無法載入樣式 Error: json module not found. Unable to save style - Error: json module not found. Unable to save style + 錯誤:找不到 json 模組。無法儲存樣式 @@ -6154,12 +6139,12 @@ CTRL to snap, SHIFT to constrain. Draft_Arc_3Points - + Arc by 3 points Arc by 3 points - + Creates a circular arc by picking 3 points. CTRL to snap, SHIFT to constrain. Creates a circular arc by picking 3 points. @@ -6169,12 +6154,12 @@ CTRL to snap, SHIFT to constrain. Draft_ArcTools - + Arc tools Arc tools - + Create various types of circular arcs. Create various types of circular arcs. @@ -6253,7 +6238,7 @@ on supported nodes and on supported objects. Circular array - Circular array + 環形陣列 @@ -6272,12 +6257,12 @@ The array can be turned into an orthogonal or a polar array by changing its type Annotation styles... - Annotation styles... + 註解樣式... Manage or create annotation styles - Manage or create annotation styles + 管理或建立註解樣式 @@ -6444,12 +6429,12 @@ If other objects are selected they are ignored. Set style - Set style + 設定樣式 Sets default styles - Sets default styles + 設定預設樣式 @@ -6517,12 +6502,12 @@ CTRL snaps, SHIFT constrains to current segment or to normal, ALT inverts. Apply current style - Apply current style + 應用目前樣式 Applies the current style defined in the toolbar (line width and colors) to the selected objects and groups. - Applies the current style defined in the toolbar (line width and colors) to the selected objects and groups. + 將工具欄中定義的目前樣式(線寬和顏色)應用在所選的物件和群組。 @@ -6820,12 +6805,12 @@ then draw a line to specify the distance and direction of stretching. Draft_Mirror - + Mirror Mirror - + Mirrors the selected objects along a line defined by two points. Mirrors the selected objects along a line defined by two points. diff --git a/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui b/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui index 2c77215ee1..7c378421e8 100644 --- a/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui +++ b/src/Mod/Draft/Resources/ui/TaskPanel_CircularArray.ui @@ -41,7 +41,7 @@ - (Placeholder for the icon) + (Placeholder for the icon) diff --git a/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui b/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui index 4a2db228c6..ced8087ba0 100644 --- a/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui +++ b/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui @@ -6,8 +6,8 @@ 0 0 - 537 - 605 + 555 + 797 @@ -17,7 +17,16 @@ 6 - + + 9 + + + 9 + + + 9 + + 9 @@ -45,9 +54,9 @@ This is the default font name for all Draft texts and dimensions. -It can be a font name such as "Arial", a default style such as "sans", "serif" -or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style -such as "Arial:Bold" +It can be a font name such as "Arial", a default style such as "sans", "serif" +or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style +such as "Arial:Bold" @@ -504,6 +513,43 @@ such as "Arial:Bold" + + + + + + Feet separator + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Optional string to appear between the feet and inches values in dimensions + + + FeetSeparator + + + Mod/Draft + + + + + diff --git a/src/Mod/Draft/draftfunctions/svg.py b/src/Mod/Draft/draftfunctions/svg.py index 65fa40ca47..2a900f9231 100644 --- a/src/Mod/Draft/draftfunctions/svg.py +++ b/src/Mod/Draft/draftfunctions/svg.py @@ -350,10 +350,14 @@ def _svg_dimension(obj, plane, scale, linewidth, fontsize, if vobj.FlipArrows: angle = angle + math.pi - svg += get_arrow(obj, - vobj.ArrowType, - p2, arrowsize, stroke, linewidth, - angle) + if not hasattr(obj, "Diameter") \ + or obj.Diameter \ + or not prx.is_linked_to_circle(): + svg += get_arrow(obj, + vobj.ArrowType, + p2, arrowsize, stroke, linewidth, + angle) + svg += get_arrow(obj, vobj.ArrowType, p3, arrowsize, stroke, linewidth, diff --git a/src/Mod/Draft/draftgeoutils/geometry.py b/src/Mod/Draft/draftgeoutils/geometry.py index 4b5fd89d2d..f25f1eb62e 100644 --- a/src/Mod/Draft/draftgeoutils/geometry.py +++ b/src/Mod/Draft/draftgeoutils/geometry.py @@ -517,6 +517,32 @@ def mirror(point, edge): return None +def mirror_matrix(mtx, pos, nor): + """Return a mirrored copy of a matrix. + + Parameters + ---------- + mtx: Base::Matrix + Matrix. + pos: Base::Vector3 + Point on mirror plane. + nor: Base::Vector3 + Normal of mirror plane. + + Return + ------ + Base::Matrix + """ + # Code by Jolbas: + # https://forum.freecad.org/viewtopic.php?p=702793#p702793 + mtx_copy = App.Matrix(mtx) + mtx_copy.move(-pos) + mtx_copy.scale(-1) + mtx_copy = App.Rotation(nor, 180) * mtx_copy + mtx_copy.move(pos) + return mtx_copy + + def uv_vectors_from_face(face, vec_z=App.Vector(0, 0, 1), tol=-1): """Return the u and v vectors of a planar face. @@ -525,6 +551,8 @@ def uv_vectors_from_face(face, vec_z=App.Vector(0, 0, 1), tol=-1): If the u vector matches +/-vec_z, or the v vector matches -vec_z, the vectors are rotated to ensure the v vector matches +vec_z. + Parameters + ---------- face: Part.Face Face. vec_z: Base::Vector3, optional diff --git a/src/Mod/Draft/draftguitools/gui_arcs.py b/src/Mod/Draft/draftguitools/gui_arcs.py index a7d458741f..542b081367 100644 --- a/src/Mod/Draft/draftguitools/gui_arcs.py +++ b/src/Mod/Draft/draftguitools/gui_arcs.py @@ -342,13 +342,9 @@ class Arc(gui_base_original.Creator): end = math.degrees(self.firstangle + self.angle) if end < sta: sta, end = end, sta - while True: - if sta > 360: - sta = sta - 360 - elif end > 360: - end = end - 360 - else: - break + sta %= 360 + end %= 360 + try: Gui.addModule("Draft") if utils.getParam("UsePartPrimitives", False): diff --git a/src/Mod/Draft/draftguitools/gui_edit.py b/src/Mod/Draft/draftguitools/gui_edit.py index 3425a9063b..c62650eea4 100644 --- a/src/Mod/Draft/draftguitools/gui_edit.py +++ b/src/Mod/Draft/draftguitools/gui_edit.py @@ -750,7 +750,7 @@ class Edit(gui_base_original.Modifier): """ if (hasattr(obj, 'obj_gui_tools') or (hasattr(obj, 'Proxy') and hasattr(obj.Proxy, 'obj_gui_tools')) or - (utils.get_type(obj) in self.gui_tools_repository) ): + (utils.get_type(obj) in self.gui_tools_repository.keys()) ): return True else: return False diff --git a/src/Mod/Draft/draftguitools/gui_mirror.py b/src/Mod/Draft/draftguitools/gui_mirror.py index f0f7f01dec..27dd6da252 100644 --- a/src/Mod/Draft/draftguitools/gui_mirror.py +++ b/src/Mod/Draft/draftguitools/gui_mirror.py @@ -40,9 +40,10 @@ from PySide.QtCore import QT_TRANSLATE_NOOP import FreeCAD as App import FreeCADGui as Gui import Draft_rc +import DraftGeomUtils import DraftVecUtils -import WorkingPlane import draftguitools.gui_base_original as gui_base_original +import draftguitools.gui_trackers as trackers import draftguitools.gui_tool_utils as gui_tool_utils from draftutils.messages import _msg @@ -86,8 +87,7 @@ class Mirror(gui_base_original.Modifier): self.ui.pointUi(title=translate("draft", self.featureName), icon="Draft_Mirror") self.ui.xValue.setFocus() self.ui.xValue.selectAll() - # self.ghost = trackers.ghostTracker(self.sel) - # TODO: solve this (see below) + self.ghost = trackers.ghostTracker(self.sel, mirror=True) self.call = self.view.addEventCallback("SoEvent", self.action) _msg(translate("draft", "Pick start point of mirror line")) self.ui.isCopy.hide() @@ -133,29 +133,19 @@ class Mirror(gui_base_original.Modifier): if arg["Key"] == "ESCAPE": self.finish() elif arg["Type"] == "SoLocation2Event": # mouse movement detection - (self.point, - ctrlPoint, info) = gui_tool_utils.getPoint(self, arg) + self.point, ctrlPoint, info = gui_tool_utils.getPoint(self, arg) if len(self.node) > 0: last = self.node[-1] if self.ghost: - if self.point != last: - # TODO: the following doesn't work at the moment - mu = self.point.sub(last).normalize() - # This part used to test for the GUI to obtain - # the camera view but this is unnecessary - # as this command is always launched in the GUI. - _view = Gui.ActiveDocument.ActiveView - mv = _view.getViewDirection().negative() - mw = mv.cross(mu) - _plane = WorkingPlane.plane(u=mu, v=mv, w=mw, - pos=last) - tm = _plane.getPlacement().toMatrix() - m = self.ghost.getMatrix() - m = m.multiply(tm.inverse()) - m.scale(App.Vector(1, 1, -1)) - m = m.multiply(tm) - m.scale(App.Vector(-1, 1, 1)) - self.ghost.setMatrix(m) + tol = 1e-7 + if self.point.sub(last).Length > tol: + # The normal of the mirror plane must be same as in mirror.py. + nor = self.point.sub(last).cross(self.wp.axis) + if nor.Length > tol: + nor.normalize() + mtx = DraftGeomUtils.mirror_matrix(App.Matrix(), last, nor) + self.ghost.setMatrix(mtx) # Ignores the position of the matrix. + self.ghost.move(App.Vector(mtx.col(3)[:3])) if self.extendedCopy: if not gui_tool_utils.hasMod(arg, gui_tool_utils.MODALT): self.finish() diff --git a/src/Mod/Draft/draftguitools/gui_trackers.py b/src/Mod/Draft/draftguitools/gui_trackers.py index 45d6609a89..5dd232932b 100644 --- a/src/Mod/Draft/draftguitools/gui_trackers.py +++ b/src/Mod/Draft/draftguitools/gui_trackers.py @@ -530,7 +530,7 @@ class arcTracker(Tracker): """An arc tracker.""" def __init__(self, dotted=False, scolor=None, swidth=None, - start=0, end=math.pi*2, normal=None): + start=0, end=math.pi*2): self.circle = None self.startangle = math.degrees(start) self.endangle = math.degrees(end) @@ -538,10 +538,11 @@ class arcTracker(Tracker): self.trans.translation.setValue([0, 0, 0]) self.sep = coin.SoSeparator() self.autoinvert = True - if normal: - self.normal = normal - else: - self.normal = FreeCAD.DraftWorkingPlane.axis + self.normal = FreeCAD.DraftWorkingPlane.axis + ang = DraftVecUtils.angle(self.getDeviation(), + FreeCAD.DraftWorkingPlane.u, + self.normal) + self.ang_offset = math.degrees(ang) self.recompute() super().__init__(dotted, scolor, swidth, [self.trans, self.sep], name="arcTracker") @@ -578,10 +579,7 @@ class arcTracker(Tracker): """Return the angle of a given vector in radians.""" c = self.trans.translation.getValue() center = Vector(c[0], c[1], c[2]) - rad = pt.sub(center) - a = DraftVecUtils.angle(rad, self.getDeviation(), self.normal) - # print(a) - return a + return DraftVecUtils.angle(self.getDeviation(), pt.sub(center), self.normal) def getAngles(self): """Return the start and end angles in degrees.""" @@ -589,11 +587,11 @@ class arcTracker(Tracker): def setStartPoint(self, pt): """Set the start angle from a point.""" - self.setStartAngle(-self.getAngle(pt)) + self.setStartAngle(self.getAngle(pt)) def setEndPoint(self, pt): """Set the end angle from a point.""" - self.setEndAngle(-self.getAngle(pt)) + self.setEndAngle(self.getAngle(pt)) def setApertureAngle(self, ang): """Set the end angle by giving the aperture angle.""" @@ -622,12 +620,16 @@ class arcTracker(Tracker): if self.circle: self.sep.removeChild(self.circle) self.circle = None - if (self.endangle < self.startangle) or not self.autoinvert: - c = Part.makeCircle(1, Vector(0, 0, 0), - self.normal, self.endangle, self.startangle) + if self.autoinvert is False: + ang_sta = self.endangle + ang_end = self.startangle + elif self.endangle < self.startangle: + ang_sta = self.endangle + self.ang_offset + ang_end = self.startangle + self.ang_offset else: - c = Part.makeCircle(1, Vector(0, 0, 0), - self.normal, self.startangle, self.endangle) + ang_sta = self.startangle + self.ang_offset + ang_end = self.endangle + self.ang_offset + c = Part.makeCircle(1, Vector(0, 0, 0), self.normal, ang_sta, ang_end) buf = c.writeInventor(2, 0.01) try: ivin = coin.SoInput() @@ -666,7 +668,7 @@ class ghostTracker(Tracker): You can pass it an object or a list of objects, or a shape. """ - def __init__(self, sel, dotted=False, scolor=None, swidth=None): + def __init__(self, sel, dotted=False, scolor=None, swidth=None, mirror=False): self.trans = coin.SoTransform() self.trans.translation.setValue([0, 0, 0]) self.children = [self.trans] @@ -691,6 +693,8 @@ class ghostTracker(Tracker): selnode.addChild(self.marker) node.addChild(selnode) rootsep.addChild(node) + if mirror is True: + self._flip(rootsep) self.children.append(rootsep) super().__init__(dotted, scolor, swidth, children=self.children, name="ghostTracker") @@ -776,13 +780,35 @@ class ghostTracker(Tracker): return FreeCAD.Matrix() def setMatrix(self, matrix): - """Set the transformation matrix.""" + """Set the transformation matrix. + + The 4th column of the matrix (the position) is ignored. + """ m = coin.SbMatrix(matrix.A11, matrix.A12, matrix.A13, matrix.A14, matrix.A21, matrix.A22, matrix.A23, matrix.A24, matrix.A31, matrix.A32, matrix.A33, matrix.A34, matrix.A41, matrix.A42, matrix.A43, matrix.A44) self.trans.setMatrix(m) + def _flip(self, root): + """Flip the normals of the coin faces.""" + # Code by wmayer: + # https://forum.freecad.org/viewtopic.php?p=702640#p702640 + search = coin.SoSearchAction() + search.setType(coin.SoIndexedFaceSet.getClassTypeId()) + search.apply(root) + path = search.getPath() + if path: + node = path.getTail() + index = node.coordIndex.getValues() + if len(index) % 4 == 0: + for i in range(0, len(index), 4): + tmp = index[i] + index[i] = index[i+1] + index[i+1] = tmp + + node.coordIndex.setValues(index) + class editTracker(Tracker): """A node edit tracker.""" diff --git a/src/Mod/Draft/draftmake/make_circle.py b/src/Mod/Draft/draftmake/make_circle.py index 3e0a148046..0f912be8ae 100644 --- a/src/Mod/Draft/draftmake/make_circle.py +++ b/src/Mod/Draft/draftmake/make_circle.py @@ -47,6 +47,9 @@ def make_circle(radius, placement=None, face=None, startangle=None, endangle=Non Creates a circle object with given parameters. + If startangle and endangle are provided and not equal, the object will show + an arc instead of a full circle. + Parameters ---------- radius : the radius of the circle. @@ -58,14 +61,14 @@ def make_circle(radius, placement=None, face=None, startangle=None, endangle=Non If face is False, the circle is shown as a wireframe, otherwise as a face. - startangle : start angle of the arc (in degrees) + startangle : start angle of the circle (in degrees) + Recalculated if not in the -360 to 360 range. - endangle : end angle of the arc (in degrees) - if startangle and endangle are equal, a circle is created, - if they are different an arc is created + endangle : end angle of the circle (in degrees) + Recalculated if not in the -360 to 360 range. edge : edge.Curve must be a 'Part.Circle' - the circle is created from the given edge + The circle is created from the given edge. support : TODO: Describe @@ -113,9 +116,8 @@ def make_circle(radius, placement=None, face=None, startangle=None, endangle=Non else: obj.Radius = radius if (startangle is not None) and (endangle is not None): - if startangle == -0: startangle = 0 - obj.FirstAngle = startangle - obj.LastAngle = endangle + obj.FirstAngle = math.copysign(abs(startangle) % 360, startangle) + obj.LastAngle = math.copysign(abs(endangle) % 360, endangle) obj.Support = support diff --git a/src/Mod/Draft/draftmake/make_hatch.py b/src/Mod/Draft/draftmake/make_hatch.py index 594ef25a64..e88792d2ac 100644 --- a/src/Mod/Draft/draftmake/make_hatch.py +++ b/src/Mod/Draft/draftmake/make_hatch.py @@ -24,7 +24,8 @@ import FreeCAD from draftobjects.hatch import Hatch -from draftviewproviders.view_hatch import ViewProviderDraftHatch +if FreeCAD.GuiUp: + from draftviewproviders.view_hatch import ViewProviderDraftHatch def make_hatch(baseobject, filename, pattern, scale, rotation): diff --git a/src/Mod/Draft/draftobjects/shape2dview.py b/src/Mod/Draft/draftobjects/shape2dview.py index 623ae4ba91..6fafe03a59 100644 --- a/src/Mod/Draft/draftobjects/shape2dview.py +++ b/src/Mod/Draft/draftobjects/shape2dview.py @@ -250,8 +250,16 @@ class Shape2DView(DraftObject): for k, v in shtypes.items(): v1 = v.pop() if v: - v1 = v1.multiFuse(v) - v1 = v1.removeSplitter() + try: + v1 = v1.multiFuse(v) + except (RuntimeError, Part.OCCError): + # multifuse can fail + for v2 in v: + v1 = v1.fuse(v2) + try: + v1 = v1.removeSplitter() + except (RuntimeError, Part.OCCError): + pass if v1.Solids: shapes.extend(v1.Solids) else: diff --git a/src/Mod/Draft/draftviewproviders/view_dimension.py b/src/Mod/Draft/draftviewproviders/view_dimension.py index 04dad66482..e43eea499f 100644 --- a/src/Mod/Draft/draftviewproviders/view_dimension.py +++ b/src/Mod/Draft/draftviewproviders/view_dimension.py @@ -367,7 +367,7 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase): It only runs if `Start`, `End`, `Dimline`, or `Direction` changed. """ - if prop not in ("Start", "End", "Dimline", "Direction"): + if prop not in ("Start", "End", "Dimline", "Direction", "Diameter"): return if obj.Start == obj.End: @@ -378,6 +378,16 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase): vobj = obj.ViewObject + if prop == "Diameter": + if hasattr(vobj, "Override") and vobj.Override: + if obj.Diameter: + vobj.Override = vobj.Override.replace("R $dim", "Ø $dim") + else: + vobj.Override = vobj.Override.replace("Ø $dim", "R $dim") + + self.onChanged(vobj, "ArrowType") + return + # Calculate the 4 points # # | d | @@ -486,33 +496,36 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase): # Calculate the position of the arrows and extension lines v1 = norm.cross(u) _plane_rot = DraftVecUtils.getPlaneRotation(u, v1, norm) - rot1 = App.Placement(_plane_rot).Rotation.Q - self.transDimOvershoot1.rotation.setValue((rot1[0], rot1[1], - rot1[2], rot1[3])) - self.transDimOvershoot2.rotation.setValue((rot1[0], rot1[1], - rot1[2], rot1[3])) + if _plane_rot is not None: + rot1 = App.Placement(_plane_rot).Rotation.Q + self.transDimOvershoot1.rotation.setValue((rot1[0], rot1[1], + rot1[2], rot1[3])) + self.transDimOvershoot2.rotation.setValue((rot1[0], rot1[1], + rot1[2], rot1[3])) if hasattr(vobj, "FlipArrows") and vobj.FlipArrows: u = u.negative() v2 = norm.cross(u) _plane_rot = DraftVecUtils.getPlaneRotation(u, v2) - rot2 = App.Placement(_plane_rot).Rotation.Q - self.trans1.rotation.setValue((rot2[0], rot2[1], - rot2[2], rot2[3])) - self.trans2.rotation.setValue((rot2[0], rot2[1], - rot2[2], rot2[3])) + if _plane_rot is not None: + rot2 = App.Placement(_plane_rot).Rotation.Q + self.trans1.rotation.setValue((rot2[0], rot2[1], + rot2[2], rot2[3])) + self.trans2.rotation.setValue((rot2[0], rot2[1], + rot2[2], rot2[3])) if self.p1 != self.p2: u3 = self.p1 - self.p2 u3.normalize() v3 = norm.cross(u3) _plane_rot = DraftVecUtils.getPlaneRotation(u3, v3) - rot3 = App.Placement(_plane_rot).Rotation.Q - self.transExtOvershoot1.rotation.setValue((rot3[0], rot3[1], - rot3[2], rot3[3])) - self.transExtOvershoot2.rotation.setValue((rot3[0], rot3[1], - rot3[2], rot3[3])) + if _plane_rot is not None: + rot3 = App.Placement(_plane_rot).Rotation.Q + self.transExtOvershoot1.rotation.setValue((rot3[0], rot3[1], + rot3[2], rot3[3])) + self.transExtOvershoot2.rotation.setValue((rot3[0], rot3[1], + rot3[2], rot3[3])) # Offset is the distance from the dimension line to the textual # element that displays the value of the measurement @@ -572,9 +585,17 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase): # Special representation if we use 'Building US' scheme u_params = App.ParamGet("User parameter:BaseApp/Preferences/Units") if u_params.GetInt("UserSchema", 0) == 5: - s = App.Units.Quantity(length, App.Units.Length).UserString - self.string = s.replace("' ", "'- ") # feet - self.string = s.replace("+", " ") + self.string = App.Units.Quantity(length, App.Units.Length).UserString + if self.string.count('"') > 1: + # multiple inch tokens + self.string = self.string.replace('"',"",self.string.count('"')-1) + d_params = App.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") + sep = d_params.GetString("FeetSeparator"," ") + # use a custom separator + self.string = self.string.replace("' ", "'" + sep) + self.string = self.string.replace("+", " ") + self.string = self.string.replace(" ", " ") + self.string = self.string.replace(" ", " ") elif hasattr(vobj, "Decimals"): self.string = units.display_external(length, vobj.Decimals, @@ -720,14 +741,15 @@ class ViewProviderLinearDimension(ViewProviderDimensionBase): self.marks = coin.SoSeparator() self.marks.addChild(self.linecolor) - s1 = coin.SoSeparator() - if symbol == "Circle": - s1.addChild(self.coord1) - else: - s1.addChild(self.trans1) + if vobj.Object.Diameter or not self.is_linked_to_circle(): + s1 = coin.SoSeparator() + if symbol == "Circle": + s1.addChild(self.coord1) + else: + s1.addChild(self.trans1) - s1.addChild(gui_utils.dim_symbol(symbol, invert=not inv)) - self.marks.addChild(s1) + s1.addChild(gui_utils.dim_symbol(symbol, invert=not inv)) + self.marks.addChild(s1) s2 = coin.SoSeparator() if symbol == "Circle": diff --git a/src/Mod/Draft/importDXF.py b/src/Mod/Draft/importDXF.py index cf053fc4c7..3de9923162 100644 --- a/src/Mod/Draft/importDXF.py +++ b/src/Mod/Draft/importDXF.py @@ -46,9 +46,9 @@ lines, polylines, lwpolylines, circles, arcs, texts, colors,layers (from groups) """ # scaling factor between autocad font sizes and coin font sizes -# the minimum version of the dxfLibrary needed to run TEXTSCALING = 1.35 -CURRENTDXFLIB = 1.41 +# the minimum version of the dxfLibrary needed to run - OBSOLETE - not used anymore +# CURRENTDXFLIB = 1.41 import sys import os @@ -118,7 +118,8 @@ def errorDXFLib(gui): _weburl = 'https://raw.githubusercontent.com/yorikvanhavre/' _weburl += 'Draft-dxf-importer/' - baseurl = _weburl + '{0:.2f}'.format(CURRENTDXFLIB) + "/" + # baseurl = _weburl + '{0:.2f}'.format(CURRENTDXFLIB) + "/" + baseurl = _weburl + "master/" import ArchCommands from FreeCAD import Base progressbar = Base.ProgressIndicator() diff --git a/src/Mod/Draft/importSVG.py b/src/Mod/Draft/importSVG.py index f2f64d2662..382cf87d5d 100644 --- a/src/Mod/Draft/importSVG.py +++ b/src/Mod/Draft/importSVG.py @@ -955,6 +955,8 @@ class svgHandler(xml.sax.ContentHandler): sh = makewire(path) if self.fill and sh.isClosed(): sh = Part.Face(sh) + if sh.isValid() is False: + sh.fix(1e-6, 0, 1) sh = self.applyTrans(sh) obj = self.doc.addObject("Part::Feature", pathname) obj.Shape = sh @@ -1227,6 +1229,8 @@ class svgHandler(xml.sax.ContentHandler): and len(sh.Wires) == 1 \ and sh.Wires[0].isClosed(): sh = Part.Face(sh) + if sh.isValid() is False: + sh.fix(1e-6, 0, 1) sh = self.applyTrans(sh) obj = self.doc.addObject("Part::Feature", pathname) obj.Shape = sh @@ -1244,6 +1248,8 @@ class svgHandler(xml.sax.ContentHandler): # sh = Part.Wire(path) if self.fill and sh.isClosed(): sh = Part.Face(sh) + if sh.isValid() is False: + sh.fix(1e-6, 0, 1) sh = self.applyTrans(sh) obj = self.doc.addObject("Part::Feature", pathname) obj.Shape = sh diff --git a/src/Mod/Drawing/App/AppDrawing.cpp b/src/Mod/Drawing/App/AppDrawing.cpp index 23dc007792..21556f4fef 100644 --- a/src/Mod/Drawing/App/AppDrawing.cpp +++ b/src/Mod/Drawing/App/AppDrawing.cpp @@ -26,7 +26,8 @@ #include "PageGroup.h" -namespace Drawing { +namespace Drawing +{ extern PyObject* initModule(); } @@ -36,9 +37,9 @@ PyMOD_INIT_FUNC(Drawing) // load dependent module try { Base::Interpreter().loadModule("Part"); - //Base::Interpreter().loadModule("Mesh"); + // Base::Interpreter().loadModule("Mesh"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } @@ -49,7 +50,7 @@ PyMOD_INIT_FUNC(Drawing) // NOTE: To finish the initialization of our own type objects we must // call PyType_Ready, otherwise we run into a segmentation fault, later on. // This function is responsible for adding inherited slots from a type's base class. - + // clang-format off Drawing::FeaturePage ::init(); Drawing::FeatureView ::init(); Drawing::FeatureViewPart ::init(); @@ -61,6 +62,6 @@ PyMOD_INIT_FUNC(Drawing) Drawing::FeatureViewSymbol ::init(); Drawing::FeatureClip ::init(); Drawing::FeatureViewSpreadsheet ::init(); - + // clang-format on PyMOD_Return(mod); } diff --git a/src/Mod/Drawing/App/AppDrawingPy.cpp b/src/Mod/Drawing/App/AppDrawingPy.cpp index 9b4c153f72..274ffbd249 100644 --- a/src/Mod/Drawing/App/AppDrawingPy.cpp +++ b/src/Mod/Drawing/App/AppDrawingPy.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -36,85 +36,97 @@ using namespace std; -using Part::TopoShapePy; using Part::TopoShape; +using Part::TopoShapePy; -namespace Drawing { +namespace Drawing +{ - /** Copies a Python dictionary of Python strings to a C++ container. - * - * After the function call, the key-value pairs of the Python - * dictionary are copied into the target buffer as C++ pairs - * (pair). - * - * @param sourceRange is a Python dictionary (Py::Dict). Both, the - * keys and the values must be Python strings. - * - * @param targetIt refers to where the data should be inserted. Must - * be of concept output iterator. - */ - template - void copy(Py::Dict sourceRange, OutputIt targetIt) - { +/** Copies a Python dictionary of Python strings to a C++ container. + * + * After the function call, the key-value pairs of the Python + * dictionary are copied into the target buffer as C++ pairs + * (pair). + * + * @param sourceRange is a Python dictionary (Py::Dict). Both, the + * keys and the values must be Python strings. + * + * @param targetIt refers to where the data should be inserted. Must + * be of concept output iterator. + */ +template +void copy(Py::Dict sourceRange, OutputIt targetIt) +{ string key; string value; for (const auto& keyPy : sourceRange.keys()) { - key = Py::String(keyPy); - value = Py::String(sourceRange[keyPy]); - *targetIt = {key, value}; - ++targetIt; + key = Py::String(keyPy); + value = Py::String(sourceRange[keyPy]); + *targetIt = {key, value}; + ++targetIt; } - } +} -class Module : public Py::ExtensionModule +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Drawing") + Module() + : Py::ExtensionModule("Drawing") { - add_varargs_method("project",&Module::project, - "[visiblyG0,visiblyG1,hiddenG0,hiddenG1] = project(TopoShape[,App.Vector Direction, string type])\n" - " -- Project a shape and return the visible/invisible parts of it." - ); - add_varargs_method("projectEx",&Module::projectEx, - "[V,V1,VN,VO,VI,H,H1,HN,HO,HI] = projectEx(TopoShape[,App.Vector Direction, string type])\n" - " -- Project a shape and return the all parts of it." - ); - add_keyword_method("projectToSVG",&Module::projectToSVG, - "string = projectToSVG(TopoShape[, App.Vector direction, string type, float tolerance, dict vStyle, dict v0Style, dict v1Style, dict hStyle, dict h0Style, dict h1Style])\n" - " -- Project a shape and return the SVG representation as string." - ); - add_varargs_method("projectToDXF",&Module::projectToDXF, - "string = projectToDXF(TopoShape[,App.Vector Direction, string type])\n" - " -- Project a shape and return the DXF representation as string." - ); - add_varargs_method("removeSvgTags",&Module::removeSvgTags, + add_varargs_method("project", + &Module::project, + "[visiblyG0,visiblyG1,hiddenG0,hiddenG1] = " + "project(TopoShape[,App.Vector Direction, string type])\n" + " -- Project a shape and return the visible/invisible parts of it."); + add_varargs_method("projectEx", + &Module::projectEx, + "[V,V1,VN,VO,VI,H,H1,HN,HO,HI] = projectEx(TopoShape[,App.Vector " + "Direction, string type])\n" + " -- Project a shape and return the all parts of it."); + add_keyword_method( + "projectToSVG", + &Module::projectToSVG, + "string = projectToSVG(TopoShape[, App.Vector direction, string type, float tolerance, " + "dict vStyle, dict v0Style, dict v1Style, dict hStyle, dict h0Style, dict h1Style])\n" + " -- Project a shape and return the SVG representation as string."); + add_varargs_method("projectToDXF", + &Module::projectToDXF, + "string = projectToDXF(TopoShape[,App.Vector Direction, string type])\n" + " -- Project a shape and return the DXF representation as string."); + add_varargs_method( + "removeSvgTags", + &Module::removeSvgTags, "string = removeSvgTags(string) -- Removes the opening and closing svg tags\n" - "and other metatags from a svg code, making it embeddable" - ); - initialize("This module is the Drawing module."); // register with Python + "and other metatags from a svg code, making it embeddable"); + initialize("This module is the Drawing module."); // register with Python } - virtual ~Module() {} + virtual ~Module() + {} private: - virtual Py::Object invoke_method_varargs(void *method_def, const Py::Tuple &args) + virtual Py::Object invoke_method_varargs(void* method_def, const Py::Tuple& args) { try { return Py::ExtensionModule::invoke_method_varargs(method_def, args); } - catch (const Standard_Failure &e) { + catch (const Standard_Failure& e) { std::string str; Standard_CString msg = e.GetMessageString(); str += typeid(e).name(); str += " "; - if (msg) {str += msg;} - else {str += "No OCCT Exception Message";} + if (msg) { + str += msg; + } + else { + str += "No OCCT Exception Message"; + } Base::Console().Error("%s\n", str.c_str()); throw Py::Exception(Part::PartExceptionOCCError, str); } - catch (const Base::Exception &e) { + catch (const Base::Exception& e) { std::string str; str += "FreeCAD exception thrown ("; str += e.what(); @@ -122,7 +134,7 @@ private: e.ReportException(); throw Py::RuntimeError(str); } - catch (const std::exception &e) { + catch (const std::exception& e) { std::string str; str += "C++ exception thrown ("; str += e.what(); @@ -133,53 +145,63 @@ private: } Py::Object project(const Py::Tuple& args) { - PyObject *pcObjShape; - PyObject *pcObjDir=nullptr; + PyObject* pcObjShape; + PyObject* pcObjDir = nullptr; - if (!PyArg_ParseTuple(args.ptr(), "O!|O!", - &(Part::TopoShapePy::Type), &pcObjShape, - &(Base::VectorPy::Type), &pcObjDir)) + if (!PyArg_ParseTuple(args.ptr(), + "O!|O!", + &(Part::TopoShapePy::Type), + &pcObjShape, + &(Base::VectorPy::Type), + &pcObjDir)) { throw Py::Exception(); + } Part::TopoShapePy* pShape = static_cast(pcObjShape); - Base::Vector3d Vector(0,0,1); - if (pcObjDir) + Base::Vector3d Vector(0, 0, 1); + if (pcObjDir) { Vector = *static_cast(pcObjDir)->getVectorPtr(); + } - ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(),Vector); + ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(), Vector); Py::List list; - list.append(Py::Object(new Part::TopoShapePy(new Part::TopoShape(Alg.V)) , true)); + list.append(Py::Object(new Part::TopoShapePy(new Part::TopoShape(Alg.V)), true)); list.append(Py::Object(new Part::TopoShapePy(new Part::TopoShape(Alg.V1)), true)); - list.append(Py::Object(new Part::TopoShapePy(new Part::TopoShape(Alg.H)) , true)); + list.append(Py::Object(new Part::TopoShapePy(new Part::TopoShape(Alg.H)), true)); list.append(Py::Object(new Part::TopoShapePy(new Part::TopoShape(Alg.H1)), true)); return list; } Py::Object projectEx(const Py::Tuple& args) { - PyObject *pcObjShape; - PyObject *pcObjDir=nullptr; + PyObject* pcObjShape; + PyObject* pcObjDir = nullptr; - if (!PyArg_ParseTuple(args.ptr(), "O!|O!", - &(TopoShapePy::Type), &pcObjShape, - &(Base::VectorPy::Type), &pcObjDir)) + if (!PyArg_ParseTuple(args.ptr(), + "O!|O!", + &(TopoShapePy::Type), + &pcObjShape, + &(Base::VectorPy::Type), + &pcObjDir)) { throw Py::Exception(); + } TopoShapePy* pShape = static_cast(pcObjShape); - Base::Vector3d Vector(0,0,1); - if (pcObjDir) + Base::Vector3d Vector(0, 0, 1); + if (pcObjDir) { Vector = *static_cast(pcObjDir)->getVectorPtr(); + } - ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(),Vector); + ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(), Vector); Py::List list; - list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.V)) , true)); + list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.V)), true)); list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.V1)), true)); list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.VN)), true)); list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.VO)), true)); list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.VI)), true)); - list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.H)) , true)); + list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.H)), true)); list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.H1)), true)); list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.HN)), true)); list.append(Py::Object(new TopoShapePy(new TopoShape(Alg.HO)), true)); @@ -189,140 +211,165 @@ private: } Py::Object projectToSVG(const Py::Tuple& args, const Py::Dict& keys) - { - static const std::array argNames {"topoShape", - "direction", - "type", - "tolerance", - "vStyle", - "v0Style", - "v1Style", - "hStyle", - "h0Style", - "h1Style", - nullptr}; - PyObject *pcObjShape = nullptr; - PyObject *pcObjDir = nullptr; - const char *extractionTypePy = nullptr; - ProjectionAlgos::ExtractionType extractionType = ProjectionAlgos::Plain; - const float tol = 0.1f; - PyObject* vStylePy = nullptr; - ProjectionAlgos::XmlAttributes vStyle; - PyObject* v0StylePy = nullptr; - ProjectionAlgos::XmlAttributes v0Style; - PyObject* v1StylePy = nullptr; - ProjectionAlgos::XmlAttributes v1Style; - PyObject* hStylePy = nullptr; - ProjectionAlgos::XmlAttributes hStyle; - PyObject* h0StylePy = nullptr; - ProjectionAlgos::XmlAttributes h0Style; - PyObject* h1StylePy = nullptr; - ProjectionAlgos::XmlAttributes h1Style; - - // Get the arguments + { + static const std::array argNames {"topoShape", + "direction", + "type", + "tolerance", + "vStyle", + "v0Style", + "v1Style", + "hStyle", + "h0Style", + "h1Style", + nullptr}; + PyObject* pcObjShape = nullptr; + PyObject* pcObjDir = nullptr; + const char* extractionTypePy = nullptr; + ProjectionAlgos::ExtractionType extractionType = ProjectionAlgos::Plain; + const float tol = 0.1f; + PyObject* vStylePy = nullptr; + ProjectionAlgos::XmlAttributes vStyle; + PyObject* v0StylePy = nullptr; + ProjectionAlgos::XmlAttributes v0Style; + PyObject* v1StylePy = nullptr; + ProjectionAlgos::XmlAttributes v1Style; + PyObject* hStylePy = nullptr; + ProjectionAlgos::XmlAttributes hStyle; + PyObject* h0StylePy = nullptr; + ProjectionAlgos::XmlAttributes h0Style; + PyObject* h1StylePy = nullptr; + ProjectionAlgos::XmlAttributes h1Style; - if (!Base::Wrapped_ParseTupleAndKeywords( - args.ptr(), keys.ptr(), - "O!|O!sfOOOOOO", - argNames, - &(TopoShapePy::Type), &pcObjShape, - &(Base::VectorPy::Type), &pcObjDir, - &extractionTypePy, &tol, - &vStylePy, &v0StylePy, &v1StylePy, - &hStylePy, &h0StylePy, &h1StylePy)) - - throw Py::Exception(); + // Get the arguments - // Convert all arguments into the right format + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), + keys.ptr(), + "O!|O!sfOOOOOO", + argNames, + &(TopoShapePy::Type), + &pcObjShape, + &(Base::VectorPy::Type), + &pcObjDir, + &extractionTypePy, + &tol, + &vStylePy, + &v0StylePy, + &v1StylePy, + &hStylePy, + &h0StylePy, + &h1StylePy)) { - TopoShapePy* pShape = static_cast(pcObjShape); - - Base::Vector3d directionVector(0,0,1); - if (pcObjDir) - directionVector = static_cast(pcObjDir)->value(); - - if (extractionTypePy && string(extractionTypePy) == "ShowHiddenLines") - extractionType = ProjectionAlgos::WithHidden; - - if (vStylePy) - copy(Py::Dict(vStylePy), inserter(vStyle, vStyle.begin())); - if (v0StylePy) - copy(Py::Dict(v0StylePy), inserter(v0Style, v0Style.begin())); - if (v1StylePy) - copy(Py::Dict(v1StylePy), inserter(v1Style, v1Style.begin())); - if (hStylePy) - copy(Py::Dict(hStylePy), inserter(hStyle, hStyle.begin())); - if (h0StylePy) - copy(Py::Dict(h0StylePy), inserter(h0Style, h0Style.begin())); - if (h1StylePy) - copy(Py::Dict(h1StylePy), inserter(h1Style, h1Style.begin())); - - // Execute the SVG generation - - ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(), - directionVector); - Py::String result(Alg.getSVG(extractionType, tol, - vStyle, v0Style, v1Style, - hStyle, h0Style, h1Style)); - return result; + throw Py::Exception(); } + // Convert all arguments into the right format + + TopoShapePy* pShape = static_cast(pcObjShape); + + Base::Vector3d directionVector(0, 0, 1); + if (pcObjDir) { + directionVector = static_cast(pcObjDir)->value(); + } + + if (extractionTypePy && string(extractionTypePy) == "ShowHiddenLines") { + extractionType = ProjectionAlgos::WithHidden; + } + + if (vStylePy) { + copy(Py::Dict(vStylePy), inserter(vStyle, vStyle.begin())); + } + if (v0StylePy) { + copy(Py::Dict(v0StylePy), inserter(v0Style, v0Style.begin())); + } + if (v1StylePy) { + copy(Py::Dict(v1StylePy), inserter(v1Style, v1Style.begin())); + } + if (hStylePy) { + copy(Py::Dict(hStylePy), inserter(hStyle, hStyle.begin())); + } + if (h0StylePy) { + copy(Py::Dict(h0StylePy), inserter(h0Style, h0Style.begin())); + } + if (h1StylePy) { + copy(Py::Dict(h1StylePy), inserter(h1Style, h1Style.begin())); + } + + // Execute the SVG generation + + ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(), directionVector); + Py::String result( + Alg.getSVG(extractionType, tol, vStyle, v0Style, v1Style, hStyle, h0Style, h1Style)); + return result; + } + Py::Object projectToDXF(const Py::Tuple& args) { - PyObject *pcObjShape; - PyObject *pcObjDir=nullptr; - const char *type=nullptr; - float scale=1.0f; - float tol=0.1f; + PyObject* pcObjShape; + PyObject* pcObjDir = nullptr; + const char* type = nullptr; + float scale = 1.0f; + float tol = 0.1f; - if (!PyArg_ParseTuple(args.ptr(), "O!|O!sff", - &(TopoShapePy::Type), &pcObjShape, - &(Base::VectorPy::Type), &pcObjDir, &type, &scale, &tol)) + if (!PyArg_ParseTuple(args.ptr(), + "O!|O!sff", + &(TopoShapePy::Type), + &pcObjShape, + &(Base::VectorPy::Type), + &pcObjDir, + &type, + &scale, + &tol)) { throw Py::Exception(); + } TopoShapePy* pShape = static_cast(pcObjShape); - Base::Vector3d Vector(0,0,1); - if (pcObjDir) + Base::Vector3d Vector(0, 0, 1); + if (pcObjDir) { Vector = static_cast(pcObjDir)->value(); - ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(),Vector); + } + ProjectionAlgos Alg(pShape->getTopoShapePtr()->getShape(), Vector); bool hidden = false; - if (type && std::string(type) == "ShowHiddenLines") + if (type && std::string(type) == "ShowHiddenLines") { hidden = true; + } - Py::String result(Alg.getDXF(hidden?ProjectionAlgos::WithHidden:ProjectionAlgos::Plain, scale, tol)); + Py::String result( + Alg.getDXF(hidden ? ProjectionAlgos::WithHidden : ProjectionAlgos::Plain, scale, tol)); return result; } Py::Object removeSvgTags(const Py::Tuple& args) { const char* svgcode; - if (!PyArg_ParseTuple(args.ptr(), "s",&svgcode)) + if (!PyArg_ParseTuple(args.ptr(), "s", &svgcode)) { throw Py::Exception(); + } std::string svg(svgcode); std::string empty = ""; std::string endline = "--endOfLine--"; std::string linebreak = "\\n"; // removing linebreaks for regex to work - boost::regex e1 ("\\n"); + boost::regex e1("\\n"); svg = boost::regex_replace(svg, e1, endline); // removing starting xml definition - boost::regex e2 ("<\\?xml.*?\\?>"); + boost::regex e2("<\\?xml.*?\\?>"); svg = boost::regex_replace(svg, e2, empty); // removing starting svg tag - boost::regex e3 (""); + boost::regex e3(""); svg = boost::regex_replace(svg, e3, empty); // removing sodipodi tags -- DANGEROUS, some sodipodi tags are single, better leave it - //boost::regex e4 (""); - //svg = boost::regex_replace(svg, e4, empty); + // boost::regex e4 (""); + // svg = boost::regex_replace(svg, e4, empty); // removing metadata tags - boost::regex e5 (""); + boost::regex e5(""); svg = boost::regex_replace(svg, e5, empty); // removing closing svg tags - boost::regex e6 (""); + boost::regex e6(""); svg = boost::regex_replace(svg, e6, empty); // restoring linebreaks - boost::regex e7 ("--endOfLine--"); + boost::regex e7("--endOfLine--"); svg = boost::regex_replace(svg, e7, linebreak); Py::String result(svg); return result; @@ -334,4 +381,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Drawing +} // namespace Drawing diff --git a/src/Mod/Drawing/App/DrawingExport.cpp b/src/Mod/Drawing/App/DrawingExport.cpp index 3c49621981..5f5a3844f9 100644 --- a/src/Mod/Drawing/App/DrawingExport.cpp +++ b/src/Mod/Drawing/App/DrawingExport.cpp @@ -22,34 +22,34 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if OCC_VERSION_HEX < 0x070600 -# include -# endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if OCC_VERSION_HEX < 0x070600 +#include +#endif #endif #include @@ -67,17 +67,17 @@ using namespace std; TopoDS_Edge DrawingOutput::asCircle(const BRepAdaptor_Curve& c) const { - double curv=0; + double curv = 0; gp_Pnt pnt, center; try { // approximate the circle center from three positions - BRepLProp_CLProps prop(c,c.FirstParameter(),2,Precision::Confusion()); + BRepLProp_CLProps prop(c, c.FirstParameter(), 2, Precision::Confusion()); curv += prop.Curvature(); prop.CentreOfCurvature(pnt); center.ChangeCoord().Add(pnt.Coord()); - prop.SetParameter(0.5*(c.FirstParameter()+c.LastParameter())); + prop.SetParameter(0.5 * (c.FirstParameter() + c.LastParameter())); curv += prop.Curvature(); prop.CentreOfCurvature(pnt); center.ChangeCoord().Add(pnt.Coord()); @@ -106,8 +106,9 @@ TopoDS_Edge DrawingOutput::asCircle(const BRepAdaptor_Curve& c) const for (int i = nodes.Lower(); i <= nodes.Upper(); i++) { gp_Pnt p = nodes(i); double dist = p.Distance(center); - if (std::abs(dist - radius) > 0.001) + if (std::abs(dist - radius) > 0.001) { return TopoDS_Edge(); + } } gp_Circ circ; @@ -142,7 +143,7 @@ TopoDS_Edge DrawingOutput::asBSpline(const BRepAdaptor_Curve& c, int maxDegree) Standard_Integer maxSegment = 50; Handle(BRepAdaptor_HCurve) hCurve = new BRepAdaptor_HCurve(c); // approximate the curve using a tolerance - Approx_Curve3d approx(hCurve,tol3D,GeomAbs_C0,maxSegment,maxDegree); + Approx_Curve3d approx(hCurve, tol3D, GeomAbs_C0, maxSegment, maxDegree); if (approx.IsDone() && approx.HasResult()) { // have the result Handle(Geom_BSplineCurve) spline = approx.Curve(); @@ -154,15 +155,14 @@ TopoDS_Edge DrawingOutput::asBSpline(const BRepAdaptor_Curve& c, int maxDegree) } SVGOutput::SVGOutput() -{ -} +{} std::string SVGOutput::exportEdges(const TopoDS_Shape& input) { std::stringstream result; TopExp_Explorer edges(input, TopAbs_EDGE); - for (int i = 1 ; edges.More(); edges.Next(),i++) { + for (int i = 1; edges.More(); edges.Next(), i++) { const TopoDS_Edge& edge = TopoDS::Edge(edges.Current()); BRepAdaptor_Curve adapt(edge); if (adapt.GetType() == GeomAbs_Circle) { @@ -172,14 +172,14 @@ std::string SVGOutput::exportEdges(const TopoDS_Shape& input) printEllipse(adapt, i, result); } else if (adapt.GetType() == GeomAbs_BSplineCurve) { -// TopoDS_Edge circle = asCircle(adapt); -// if (circle.IsNull()) { - printBSpline(adapt, i, result); -// } -// else { -// BRepAdaptor_Curve adapt_circle(circle); -// printCircle(adapt_circle, result); -// } + // TopoDS_Edge circle = asCircle(adapt); + // if (circle.IsNull()) { + printBSpline(adapt, i, result); + // } + // else { + // BRepAdaptor_Curve adapt_circle(circle); + // printCircle(adapt_circle, result); + // } } else if (adapt.GetType() == GeomAbs_BezierCurve) { printBezier(adapt, i, result); @@ -196,81 +196,77 @@ std::string SVGOutput::exportEdges(const TopoDS_Shape& input) void SVGOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out) { gp_Circ circ = c.Circle(); - const gp_Pnt& p= circ.Location(); + const gp_Pnt& p = circ.Location(); double r = circ.Radius(); double f = c.FirstParameter(); double l = c.LastParameter(); gp_Pnt s = c.Value(f); - gp_Pnt m = c.Value((l+f)/2.0); + gp_Pnt m = c.Value((l + f) / 2.0); gp_Pnt e = c.Value(l); - gp_Vec v1(m,s); - gp_Vec v2(m,e); - gp_Vec v3(0,0,1); - double a = v3.DotCross(v1,v2); + gp_Vec v1(m, s); + gp_Vec v2(m, e); + gp_Vec v3(0, 0, 1); + double a = v3.DotCross(v1, v2); // a full circle - if (fabs(l-f) > 1.0 && s.SquareDistance(e) < 0.001) { - out << ""; + if (fabs(l - f) > 1.0 && s.SquareDistance(e) < 0.001) { + out << ""; } // arc of circle else { // See also https://developer.mozilla.org/en/SVG/Tutorial/Paths - char xar = '0'; // x-axis-rotation - char las = (l-f > D_PI) ? '1' : '0'; // large-arc-flag - char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1) - out << ""; + char xar = '0'; // x-axis-rotation + char las = (l - f > D_PI) ? '1' : '0'; // large-arc-flag + char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1) + out << ""; } } void SVGOutput::printEllipse(const BRepAdaptor_Curve& c, int id, std::ostream& out) { gp_Elips ellp = c.Ellipse(); - const gp_Pnt& p= ellp.Location(); + const gp_Pnt& p = ellp.Location(); double r1 = ellp.MajorRadius(); double r2 = ellp.MinorRadius(); double f = c.FirstParameter(); double l = c.LastParameter(); gp_Pnt s = c.Value(f); - gp_Pnt m = c.Value((l+f)/2.0); + gp_Pnt m = c.Value((l + f) / 2.0); gp_Pnt e = c.Value(l); // If the minor radius is very small compared to the major radius // the geometry actually degenerates to a line - double ratio = std::min(r1,r2)/std::max(r1,r2); + double ratio = std::min(r1, r2) / std::max(r1, r2); if (ratio < 0.001) { printGeneric(c, id, out); return; } - gp_Vec v1(m,s); - gp_Vec v2(m,e); - gp_Vec v3(0,0,1); - double a = v3.DotCross(v1,v2); - + gp_Vec v1(m, s); + gp_Vec v2(m, e); + gp_Vec v3(0, 0, 1); + double a = v3.DotCross(v1, v2); + // a full ellipse // See also https://developer.mozilla.org/en/SVG/Tutorial/Paths gp_Dir xaxis = ellp.XAxis().Direction(); - Standard_Real angle = xaxis.AngleWithRef(gp_Dir(1,0,0),gp_Dir(0,0,-1)); + Standard_Real angle = xaxis.AngleWithRef(gp_Dir(1, 0, 0), gp_Dir(0, 0, -1)); angle = Base::toDegrees(angle); - if (fabs(l-f) > 1.0 && s.SquareDistance(e) < 0.001) { - out << "" << std::endl; - out << "" << std::endl; + if (fabs(l - f) > 1.0 && s.SquareDistance(e) < 0.001) { + out << "" + << std::endl; + out << "" << std::endl; out << "" << std::endl; } // arc of ellipse else { - char las = (l-f > D_PI) ? '1' : '0'; // large-arc-flag - char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1) - out << "" << std::endl; + char las = (l - f > D_PI) ? '1' : '0'; // large-arc-flag + char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1) + out << "" << std::endl; } } @@ -301,28 +297,27 @@ void SVGOutput::printBezier(const BRepAdaptor_Curve& c, int id, std::ostream& ou gp_Pnt p1 = bezier->Pole(1); str << p1.X() << "," << p1.Y(); if (bezier->Degree() == 3) { - if (poles != 4) + if (poles != 4) { Standard_Failure::Raise("do it the generic way"); + } gp_Pnt p2 = bezier->Pole(2); gp_Pnt p3 = bezier->Pole(3); gp_Pnt p4 = bezier->Pole(4); - str << " C" - << p2.X() << "," << p2.Y() << " " - << p3.X() << "," << p3.Y() << " " + str << " C" << p2.X() << "," << p2.Y() << " " << p3.X() << "," << p3.Y() << " " << p4.X() << "," << p4.Y() << " "; } else if (bezier->Degree() == 2) { - if (poles != 3) + if (poles != 3) { Standard_Failure::Raise("do it the generic way"); + } gp_Pnt p2 = bezier->Pole(2); gp_Pnt p3 = bezier->Pole(3); - str << " Q" - << p2.X() << "," << p2.Y() << " " - << p3.X() << "," << p3.Y() << " "; + str << " Q" << p2.X() << "," << p2.Y() << " " << p3.X() << "," << p3.Y() << " "; } else if (bezier->Degree() == 1) { - if (poles != 2) + if (poles != 2) { Standard_Failure::Raise("do it the generic way"); + } gp_Pnt p2 = bezier->Pole(2); str << " L" << p2.X() << "," << p2.Y() << " "; } @@ -347,11 +342,12 @@ void SVGOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& o Standard_Integer maxDegree = 3, maxSegment = 100; Handle(BRepAdaptor_HCurve) hCurve = new BRepAdaptor_HCurve(c); // approximate the curve using a tolerance - Approx_Curve3d approx(hCurve,tol3D,GeomAbs_C0,maxSegment,maxDegree); + Approx_Curve3d approx(hCurve, tol3D, GeomAbs_C0, maxSegment, maxDegree); if (approx.IsDone() && approx.HasResult()) { // have the result spline = approx.Curve(); - } else { + } + else { printGeneric(c, id, out); return; } @@ -359,7 +355,7 @@ void SVGOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& o GeomConvert_BSplineCurveToBezierCurve crt(spline); Standard_Integer arcs = crt.NbArcs(); str << "NbPoles(); if (i == 1) { @@ -367,28 +363,27 @@ void SVGOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& o str << p1.X() << "," << p1.Y(); } if (bezier->Degree() == 3) { - if (poles != 4) + if (poles != 4) { Standard_Failure::Raise("do it the generic way"); + } gp_Pnt p2 = bezier->Pole(2); gp_Pnt p3 = bezier->Pole(3); gp_Pnt p4 = bezier->Pole(4); - str << " C" - << p2.X() << "," << p2.Y() << " " - << p3.X() << "," << p3.Y() << " " + str << " C" << p2.X() << "," << p2.Y() << " " << p3.X() << "," << p3.Y() << " " << p4.X() << "," << p4.Y() << " "; } else if (bezier->Degree() == 2) { - if (poles != 3) + if (poles != 3) { Standard_Failure::Raise("do it the generic way"); + } gp_Pnt p2 = bezier->Pole(2); gp_Pnt p3 = bezier->Pole(3); - str << " Q" - << p2.X() << "," << p2.Y() << " " - << p3.X() << "," << p3.Y() << " "; + str << " Q" << p2.X() << "," << p2.Y() << " " << p3.X() << "," << p3.Y() << " "; } else if (bezier->Degree() == 1) { - if (poles != 2) + if (poles != 2) { Standard_Failure::Raise("do it the generic way"); + } gp_Pnt p2 = bezier->Pole(2); str << " L" << p2.X() << "," << p2.Y() << " "; } @@ -412,24 +407,25 @@ void SVGOutput::printGeneric(const BRepAdaptor_Curve& bac, int id, std::ostream& if (!polygon.IsNull()) { const TColgp_Array1OfPnt& nodes = polygon->Nodes(); char c = 'M'; - out << "" << endl; - } else if (bac.GetType() == GeomAbs_Line) { - //BRep_Tool::Polygon3D assumes the edge has polygon representation - ie already been "tessellated" - //this is not true for all edges, especially "floating edges" + } + else if (bac.GetType() == GeomAbs_Line) { + // BRep_Tool::Polygon3D assumes the edge has polygon representation - ie already been + // "tessellated" this is not true for all edges, especially "floating edges" double f = bac.FirstParameter(); double l = bac.LastParameter(); gp_Pnt s = bac.Value(f); gp_Pnt e = bac.Value(l); char c = 'M'; - out << "" << endl; } } @@ -437,15 +433,14 @@ void SVGOutput::printGeneric(const BRepAdaptor_Curve& bac, int id, std::ostream& // ---------------------------------------------------------------------------- DXFOutput::DXFOutput() -{ -} +{} std::string DXFOutput::exportEdges(const TopoDS_Shape& input) { std::stringstream result; TopExp_Explorer edges(input, TopAbs_EDGE); - for (int i = 1 ; edges.More(); edges.Next(),i++) { + for (int i = 1; edges.More(); edges.Next(), i++) { const TopoDS_Edge& edge = TopoDS::Edge(edges.Current()); BRepAdaptor_Curve adapt(edge); if (adapt.GetType() == GeomAbs_Circle) { @@ -466,53 +461,52 @@ std::string DXFOutput::exportEdges(const TopoDS_Shape& input) return result.str(); } -void DXFOutput::printHeader( std::ostream& out) +void DXFOutput::printHeader(std::ostream& out) { - out << 0 << endl; - out << "SECTION" << endl; - out << 2 << endl; - out << "ENTITIES" << endl; + out << 0 << endl; + out << "SECTION" << endl; + out << 2 << endl; + out << "ENTITIES" << endl; } void DXFOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out) { gp_Circ circ = c.Circle(); - //const gp_Ax1& axis = c->Axis(); - const gp_Pnt& p= circ.Location(); + // const gp_Ax1& axis = c->Axis(); + const gp_Pnt& p = circ.Location(); double r = circ.Radius(); double f = c.FirstParameter(); double l = c.LastParameter(); gp_Pnt s = c.Value(f); - gp_Pnt m = c.Value((l+f)/2.0); + gp_Pnt m = c.Value((l + f) / 2.0); gp_Pnt e = c.Value(l); - gp_Vec v1(m,s); - gp_Vec v2(m,e); - gp_Vec v3(0,0,1); - double a = v3.DotCross(v1,v2); + gp_Vec v1(m, s); + gp_Vec v2(m, e); + gp_Vec v3(0, 0, 1); + double a = v3.DotCross(v1, v2); // a full circle if (s.SquareDistance(e) < 0.001) { - //out << ""; - out << 0 << endl; - out << "CIRCLE" << endl; - out << 8 << endl; // Group code for layer name - out << "sheet_layer" << endl; // Layer number - out << "100" << endl; + // out << ""; + out << 0 << endl; + out << "CIRCLE" << endl; + out << 8 << endl; // Group code for layer name + out << "sheet_layer" << endl; // Layer number + out << "100" << endl; out << "AcDbEntity" << endl; - out << "100" << endl; - out << "AcDbCircle" << endl; - out << 10 << endl; // Centre X - out << p.X() << endl; // X in WCS coordinates - out << 20 << endl; - out << p.Y() << endl; // Y in WCS coordinates - out << 30 << endl; - out << 0 << endl; // Z in WCS coordinates-leaving flat - out << 40 << endl; // - out << r << endl; // Radius - } - + out << "100" << endl; + out << "AcDbCircle" << endl; + out << 10 << endl; // Centre X + out << p.X() << endl; // X in WCS coordinates + out << 20 << endl; + out << p.Y() << endl; // Y in WCS coordinates + out << 30 << endl; + out << 0 << endl; // Z in WCS coordinates-leaving flat + out << 40 << endl; // + out << r << endl; // Radius + } // arc of circle @@ -525,121 +519,122 @@ void DXFOutput::printCircle(const BRepAdaptor_Curve& c, std::ostream& out) << " A" << r << " " << r << " " << xar << " " << las << " " << swp << " " << e.X() << " " << e.Y() << "\" />";*/ - double ax = s.X() - p.X(); - double ay = s.Y() - p.Y(); - double bx = e.X() - p.X(); - double by = e.Y() - p.Y(); - - double start_angle = atan2(ay, ax) * 180/D_PI; - double end_angle = atan2(by, bx) * 180/D_PI; - - - if(a > 0){ - double temp = start_angle; - start_angle = end_angle; - end_angle = temp;} - out << 0 << endl; - out << "ARC" << endl; - out << 8 << endl; // Group code for layer name - out << "sheet_layer" << endl; // Layer number - out << "100" << endl; - out << "AcDbEntity" << endl; - out << "100" << endl; - out << "AcDbCircle" << endl; - out << 10 << endl; // Centre X - out << p.X() << endl; // X in WCS coordinates - out << 20 << endl; - out << p.Y() << endl; // Y in WCS coordinates - out << 30 << endl; - out << 0 << endl; // Z in WCS coordinates - out << 40 << endl; // - out << r << endl; // Radius - out << "100" << endl; - out << "AcDbArc" << endl; - out << 50 << endl; - out << start_angle << endl; // Start angle - out << 51 << endl; - out << end_angle << endl; // End angle + double ax = s.X() - p.X(); + double ay = s.Y() - p.Y(); + double bx = e.X() - p.X(); + double by = e.Y() - p.Y(); + double start_angle = atan2(ay, ax) * 180 / D_PI; + double end_angle = atan2(by, bx) * 180 / D_PI; + if (a > 0) { + double temp = start_angle; + start_angle = end_angle; + end_angle = temp; + } + out << 0 << endl; + out << "ARC" << endl; + out << 8 << endl; // Group code for layer name + out << "sheet_layer" << endl; // Layer number + out << "100" << endl; + out << "AcDbEntity" << endl; + out << "100" << endl; + out << "AcDbCircle" << endl; + out << 10 << endl; // Centre X + out << p.X() << endl; // X in WCS coordinates + out << 20 << endl; + out << p.Y() << endl; // Y in WCS coordinates + out << 30 << endl; + out << 0 << endl; // Z in WCS coordinates + out << 40 << endl; // + out << r << endl; // Radius + out << "100" << endl; + out << "AcDbArc" << endl; + out << 50 << endl; + out << start_angle << endl; // Start angle + out << 51 << endl; + out << end_angle << endl; // End angle } } void DXFOutput::printEllipse(const BRepAdaptor_Curve& c, int /*id*/, std::ostream& out) { gp_Elips ellp = c.Ellipse(); - const gp_Pnt& p= ellp.Location(); + const gp_Pnt& p = ellp.Location(); double r1 = ellp.MajorRadius(); double r2 = ellp.MinorRadius(); - double dp = ellp.Axis().Direction().Dot(gp_Vec(0,0,1)); + double dp = ellp.Axis().Direction().Dot(gp_Vec(0, 0, 1)); // a full ellipse - /* if (s.SquareDistance(e) < 0.001) { - out << ""; + /* if (s.SquareDistance(e) < 0.001) { + out << ""; + } + // arc of ellipse + else { + // See also https://developer.mozilla.org/en/SVG/Tutorial/Paths + gp_Dir xaxis = ellp.XAxis().Direction(); + Standard_Real angle = xaxis.Angle(gp_Dir(1,0,0)); + angle = Base::toDegrees(angle); + char las = (l-f > D_PI) ? '1' : '0'; // large-arc-flag + char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1) + out << ""; + }*/ + gp_Dir xaxis = ellp.XAxis().Direction(); + double angle = xaxis.AngleWithRef(gp_Dir(1, 0, 0), gp_Dir(0, 0, -1)); + // double rotation = Base::toDegrees(angle); + + double start_angle = c.FirstParameter(); + double end_angle = c.LastParameter(); + + double major_x; + double major_y; + + major_x = r1 * cos(angle); + major_y = r1 * sin(angle); + + double ratio = r2 / r1; + + if (dp < 0) { + double temp = start_angle; + start_angle = end_angle; + end_angle = temp; } - // arc of ellipse - else { - // See also https://developer.mozilla.org/en/SVG/Tutorial/Paths - gp_Dir xaxis = ellp.XAxis().Direction(); - Standard_Real angle = xaxis.Angle(gp_Dir(1,0,0)); - angle = Base::toDegrees(angle); - char las = (l-f > D_PI) ? '1' : '0'; // large-arc-flag - char swp = (a < 0) ? '1' : '0'; // sweep-flag, i.e. clockwise (0) or counter-clockwise (1) - out << ""; - }*/ - gp_Dir xaxis = ellp.XAxis().Direction(); - double angle = xaxis.AngleWithRef(gp_Dir(1,0,0),gp_Dir(0,0,-1)); - //double rotation = Base::toDegrees(angle); - - double start_angle = c.FirstParameter(); - double end_angle = c.LastParameter(); - - double major_x;double major_y; - - major_x = r1 * cos(angle); - major_y = r1 * sin(angle); - - double ratio = r2/r1; - - if(dp < 0){ - double temp = start_angle; - start_angle = end_angle; - end_angle = temp; - } - out << 0 << endl; - out << "ELLIPSE" << endl; - out << 8 << endl; // Group code for layer name - out << "sheet_layer" << endl; // Layer number - out << "100" << endl; + out << 0 << endl; + out << "ELLIPSE" << endl; + out << 8 << endl; // Group code for layer name + out << "sheet_layer" << endl; // Layer number + out << "100" << endl; out << "AcDbEntity" << endl; - out << "100" << endl; - out << "AcDbEllipse" << endl; - out << 10 << endl; // Centre X - out << p.X() << endl; // X in WCS coordinates - out << 20 << endl; - out << p.Y() << endl; // Y in WCS coordinates - out << 30 << endl; - out << 0 << endl; // Z in WCS coordinates - out << 11 << endl; // - out << major_x << endl; // Major X - out << 21 << endl; - out << major_y << endl; // Major Y - out << 31 << endl; - out << 0 << endl; // Major Z - out << 40 << endl; // - out << ratio << endl; // Ratio - out << 41 << endl; - out << start_angle << endl; // Start angle - out << 42 << endl; - out << end_angle << endl; // End angle + out << "100" << endl; + out << "AcDbEllipse" << endl; + out << 10 << endl; // Centre X + out << p.X() << endl; // X in WCS coordinates + out << 20 << endl; + out << p.Y() << endl; // Y in WCS coordinates + out << 30 << endl; + out << 0 << endl; // Z in WCS coordinates + out << 11 << endl; // + out << major_x << endl; // Major X + out << 21 << endl; + out << major_y << endl; // Major Y + out << 31 << endl; + out << 0 << endl; // Major Z + out << 40 << endl; // + out << ratio << endl; // Ratio + out << 41 << endl; + out << start_angle << endl; // Start angle + out << 42 << endl; + out << end_angle << endl; // End angle } -void DXFOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& out) //Not even close yet- DF +void DXFOutput::printBSpline(const BRepAdaptor_Curve& c, + int id, + std::ostream& out) // Not even close yet- DF { try { std::stringstream str; @@ -648,62 +643,71 @@ void DXFOutput::printBSpline(const BRepAdaptor_Curve& c, int id, std::ostream& o Standard_Integer maxDegree = 3, maxSegment = 50; Handle(BRepAdaptor_HCurve) hCurve = new BRepAdaptor_HCurve(c); // approximate the curve using a tolerance - Approx_Curve3d approx(hCurve,tol3D,GeomAbs_C0,maxSegment,maxDegree); + Approx_Curve3d approx(hCurve, tol3D, GeomAbs_C0, maxSegment, maxDegree); if (approx.IsDone() && approx.HasResult()) { // have the result spline = approx.Curve(); - } else { + } + else { printGeneric(c, id, out); return; } - - //GeomConvert_BSplineCurveToBezierCurve crt(spline); - //GeomConvert_BSplineCurveKnotSplitting crt(spline,0); - //Standard_Integer arcs = crt.NbArcs(); - //Standard_Integer arcs = crt.NbSplits()-1; + + // GeomConvert_BSplineCurveToBezierCurve crt(spline); + // GeomConvert_BSplineCurveKnotSplitting crt(spline,0); + // Standard_Integer arcs = crt.NbArcs(); + // Standard_Integer arcs = crt.NbSplits()-1; Standard_Integer m = 0; if (spline->IsPeriodic()) { - m = spline->NbPoles() + 2*spline->Degree() - spline->Multiplicity(1) + 2; + m = spline->NbPoles() + 2 * spline->Degree() - spline->Multiplicity(1) + 2; } else { - for (int i=1; i<= spline->NbKnots(); i++) + for (int i = 1; i <= spline->NbKnots(); i++) { m += spline->Multiplicity(i); + } } - TColStd_Array1OfReal knotsequence(1,m); + TColStd_Array1OfReal knotsequence(1, m); spline->KnotSequence(knotsequence); - TColgp_Array1OfPnt poles(1,spline->NbPoles()); + TColgp_Array1OfPnt poles(1, spline->NbPoles()); spline->Poles(poles); str << 0 << endl << "SPLINE" << endl - << 8 << endl // Group code for layer name - << "sheet_layer" << endl // Layer name - << "100" << endl + << 8 << endl // Group code for layer name + << "sheet_layer" << endl // Layer name + << "100" << endl << "AcDbEntity" << endl - << "100" << endl - << "AcDbSpline" << endl + << "100" << endl + << "AcDbSpline" << endl << 70 << endl - << spline->IsRational()*4 << endl //flags - << 71 << endl << spline->Degree() << endl - << 72 << endl << knotsequence.Length() << endl - << 73 << endl << poles.Length() << endl - << 74 << endl << 0 << endl; //fitpoints + << spline->IsRational() * 4 << endl // flags + << 71 << endl + << spline->Degree() << endl + << 72 << endl + << knotsequence.Length() << endl + << 73 << endl + << poles.Length() << endl + << 74 << endl + << 0 << endl; // fitpoints - for (int i = knotsequence.Lower() ; i <= knotsequence.Upper(); i++) { + for (int i = knotsequence.Lower(); i <= knotsequence.Upper(); i++) { str << 40 << endl << knotsequence(i) << endl; } for (int i = poles.Lower(); i <= poles.Upper(); i++) { gp_Pnt pole = poles(i); - str << 10 << endl << pole.X() << endl - << 20 << endl << pole.Y() << endl - << 30 << endl << pole.Z() << endl; + str << 10 << endl + << pole.X() << endl + << 20 << endl + << pole.Y() << endl + << 30 << endl + << pole.Z() << endl; if (spline->IsRational()) { str << 41 << endl << spline->Weight(i) << endl; } } - //str << "\" />"; + // str << "\" />"; out << str.str(); } catch (Standard_Failure&) { @@ -723,24 +727,24 @@ void DXFOutput::printGeneric(const BRepAdaptor_Curve& c, int /*id*/, std::ostrea gp_Vec VE; c.D1(uEnd, PE, VE); - out << "0" << endl; - out << "LINE" << endl; - out << "8" << endl; // Group code for layer name - out << "sheet_layer" << endl; // Layer name - out << "100" << endl; + out << "0" << endl; + out << "LINE" << endl; + out << "8" << endl; // Group code for layer name + out << "sheet_layer" << endl; // Layer name + out << "100" << endl; out << "AcDbEntity" << endl; - out << "100" << endl; - out << "AcDbLine" << endl; - out << "10" << endl; // Start point of line - out << PS.X() << endl; // X in WCS coordinates - out << "20" << endl; - out << PS.Y() << endl; // Y in WCS coordinates - out << "30" << endl; - out << "0" << endl; // Z in WCS coordinates - out << "11" << endl; // End point of line - out << PE.X() << endl; // X in WCS coordinates - out << "21" << endl; - out << PE.Y() << endl; // Y in WCS coordinates - out << "31" << endl; - out << "0" << endl; // Z in WCS coordinates + out << "100" << endl; + out << "AcDbLine" << endl; + out << "10" << endl; // Start point of line + out << PS.X() << endl; // X in WCS coordinates + out << "20" << endl; + out << PS.Y() << endl; // Y in WCS coordinates + out << "30" << endl; + out << "0" << endl; // Z in WCS coordinates + out << "11" << endl; // End point of line + out << PE.X() << endl; // X in WCS coordinates + out << "21" << endl; + out << PE.Y() << endl; // Y in WCS coordinates + out << "31" << endl; + out << "0" << endl; // Z in WCS coordinates } diff --git a/src/Mod/Drawing/App/DrawingExport.h b/src/Mod/Drawing/App/DrawingExport.h index 56d0806856..53210e0e3b 100644 --- a/src/Mod/Drawing/App/DrawingExport.h +++ b/src/Mod/Drawing/App/DrawingExport.h @@ -23,9 +23,9 @@ #ifndef DRAWING_EXPORT_H #define DRAWING_EXPORT_H -#include -#include #include +#include +#include class TopoDS_Shape; @@ -43,7 +43,7 @@ public: TopoDS_Edge asBSpline(const BRepAdaptor_Curve&, int maxDegree) const; }; -class DrawingExport SVGOutput : public DrawingOutput +class DrawingExport SVGOutput: public DrawingOutput { public: SVGOutput(); @@ -58,7 +58,7 @@ private: }; /* dxf output section - Dan Falck 2011/09/25 */ -class DrawingExport DXFOutput : public DrawingOutput +class DrawingExport DXFOutput: public DrawingOutput { public: DXFOutput(); @@ -72,6 +72,6 @@ private: void printGeneric(const BRepAdaptor_Curve&, int id, std::ostream&); }; -} //namespace Drawing +} // namespace Drawing -#endif // DRAWING_EXPORT_H +#endif // DRAWING_EXPORT_H diff --git a/src/Mod/Drawing/App/FeatureClip.cpp b/src/Mod/Drawing/App/FeatureClip.cpp index f7714a6854..df4515ad58 100644 --- a/src/Mod/Drawing/App/FeatureClip.cpp +++ b/src/Mod/Drawing/App/FeatureClip.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include "FeatureClip.h" @@ -39,25 +39,50 @@ using namespace std; PROPERTY_SOURCE(Drawing::FeatureClip, App::DocumentObjectGroup) -FeatureClip::FeatureClip(void) +FeatureClip::FeatureClip(void) { - static const char *group = "Drawing view"; + static const char* group = "Drawing view"; App::PropertyType hidden = (App::PropertyType)(App::Prop_Hidden); - ADD_PROPERTY_TYPE(ViewResult ,(""),group,hidden,"Resulting SVG view of this clip"); - ADD_PROPERTY_TYPE(X ,(10),group,App::Prop_None ,"The left margin of the view area of this clip"); - ADD_PROPERTY_TYPE(Y ,(10),group,App::Prop_None ,"The top margin of the view area of this clip"); - ADD_PROPERTY_TYPE(Height ,(10),group,App::Prop_None ,"The height of the view area of this clip"); - ADD_PROPERTY_TYPE(Width ,(10),group,App::Prop_None ,"The width of the view area of this clip"); - ADD_PROPERTY_TYPE(ShowFrame ,(0),group,App::Prop_None,"Specifies if the clip frame appears on the page or not"); - // The 'Visible' property is handled by the view provider exclusively. It has the 'Output' flag set to - // avoid to call the execute() method. The view provider touches the page object, instead. - App::PropertyType propType = static_cast(App::Prop_Hidden|App::Prop_Output); - ADD_PROPERTY_TYPE(Visible, (true),group,propType,"Control whether frame is visible in page object"); + ADD_PROPERTY_TYPE(ViewResult, (""), group, hidden, "Resulting SVG view of this clip"); + ADD_PROPERTY_TYPE(X, + (10), + group, + App::Prop_None, + "The left margin of the view area of this clip"); + ADD_PROPERTY_TYPE(Y, + (10), + group, + App::Prop_None, + "The top margin of the view area of this clip"); + ADD_PROPERTY_TYPE(Height, + (10), + group, + App::Prop_None, + "The height of the view area of this clip"); + ADD_PROPERTY_TYPE(Width, + (10), + group, + App::Prop_None, + "The width of the view area of this clip"); + ADD_PROPERTY_TYPE(ShowFrame, + (0), + group, + App::Prop_None, + "Specifies if the clip frame appears on the page or not"); + // The 'Visible' property is handled by the view provider exclusively. It has the 'Output' flag + // set to avoid to call the execute() method. The view provider touches the page object, + // instead. + App::PropertyType propType = + static_cast(App::Prop_Hidden | App::Prop_Output); + ADD_PROPERTY_TYPE(Visible, + (true), + group, + propType, + "Control whether frame is visible in page object"); } FeatureClip::~FeatureClip() -{ -} +{} /// get called by the container when a Property was changed void FeatureClip::onChanged(const App::Property* prop) @@ -65,7 +90,7 @@ void FeatureClip::onChanged(const App::Property* prop) App::DocumentObjectGroup::onChanged(prop); } -App::DocumentObjectExecReturn *FeatureClip::execute(void) +App::DocumentObjectExecReturn* FeatureClip::execute(void) { ostringstream svg; @@ -79,7 +104,7 @@ App::DocumentObjectExecReturn *FeatureClip::execute(void) // show clip frame on the page if needed if (ShowFrame.getValue()) { - svg << "" << endl; // get through the children and collect all the views - const vector &Grp = Group.getValues(); - for (vector::const_iterator It= Grp.begin();It!=Grp.end();++It) { + const vector& Grp = Group.getValues(); + for (vector::const_iterator It = Grp.begin(); It != Grp.end(); ++It) { if ((*It)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId())) { - Drawing::FeatureView *View = static_cast(*It); + Drawing::FeatureView* View = static_cast(*It); svg << View->ViewResult.getValue() << endl; } } diff --git a/src/Mod/Drawing/App/FeatureClip.h b/src/Mod/Drawing/App/FeatureClip.h index 9c83d7b84f..e548a9ace1 100644 --- a/src/Mod/Drawing/App/FeatureClip.h +++ b/src/Mod/Drawing/App/FeatureClip.h @@ -53,11 +53,12 @@ public: /** @name methods override Feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawingClip"; } @@ -66,7 +67,7 @@ protected: }; -} //namespace Drawing +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/FeaturePage.cpp b/src/Mod/Drawing/App/FeaturePage.cpp index 5e801fe276..2ea63d9eaa 100644 --- a/src/Mod/Drawing/App/FeaturePage.cpp +++ b/src/Mod/Drawing/App/FeaturePage.cpp @@ -22,20 +22,20 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include -# include +#include #endif #include #include #include -#include "FeaturePage.h" #include "FeatureClip.h" +#include "FeaturePage.h" #include "FeatureView.h" @@ -48,18 +48,26 @@ using namespace std; PROPERTY_SOURCE(Drawing::FeaturePage, App::DocumentObjectGroup) -FeaturePage::FeaturePage(void) : numChildren(0) +FeaturePage::FeaturePage(void) + : numChildren(0) { - static const char *group = "Drawing view"; + static const char* group = "Drawing view"; - ADD_PROPERTY_TYPE(PageResult, (nullptr), group, App::Prop_Output, "Resulting SVG document of that page"); + ADD_PROPERTY_TYPE(PageResult, + (nullptr), + group, + App::Prop_Output, + "Resulting SVG document of that page"); ADD_PROPERTY_TYPE(Template, (""), group, App::Prop_None, "Template for the page"); - ADD_PROPERTY_TYPE(EditableTexts, (""), group, App::Prop_None, "Substitution values for the editable strings in the template"); + ADD_PROPERTY_TYPE(EditableTexts, + (""), + group, + App::Prop_None, + "Substitution values for the editable strings in the template"); } FeaturePage::~FeaturePage() -{ -} +{} void FeaturePage::onBeforeChange(const App::Property* prop) { @@ -78,19 +86,23 @@ void FeaturePage::onChanged(const App::Property* prop) // When loading a document the included file // doesn't need to exist at this point. Base::FileInfo fi(PageResult.getValue()); - if (!fi.exists()) + if (!fi.exists()) { return; + } } - } else if (prop == &EditableTexts) { + } + else if (prop == &EditableTexts) { if (!this->isRestoring()) { this->execute(); return; } - } else if (prop == &Template) { + } + else if (prop == &Template) { if (!this->isRestoring()) { EditableTexts.setValues(getEditableTextsFromTemplate()); } - } else if (prop == &Group) { + } + else if (prop == &Group) { if (Group.getSize() != numChildren) { numChildren = Group.getSize(); touch(); @@ -103,29 +115,33 @@ void FeaturePage::onChanged(const App::Property* prop) void FeaturePage::onDocumentRestored() { // Needs to be tmp. set because otherwise the custom text gets overridden (#0002064) - this->StatusBits.set(App::Restore); // the 'Restore' flag + this->StatusBits.set(App::Restore); // the 'Restore' flag Base::FileInfo templateInfo(Template.getValue()); if (!templateInfo.exists()) { Base::FileInfo fi(Template.getValue()); - if (fi.fileName().empty()) + if (fi.fileName().empty()) { fi.setFile(PageResult.getValue()); - std::string path = App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName(); + } + std::string path = + App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName(); // try to find the template in user dir/Templates first Base::FileInfo tempfi(App::Application::getUserAppDataDir() + "Templates/" + fi.fileName()); - if (tempfi.exists()) + if (tempfi.exists()) { path = tempfi.filePath(); + } Template.setValue(path); } - this->StatusBits.reset(App::Restore); // the 'Restore' flag + this->StatusBits.reset(App::Restore); // the 'Restore' flag } -App::DocumentObjectExecReturn *FeaturePage::execute(void) +App::DocumentObjectExecReturn* FeaturePage::execute(void) { std::string temp = Template.getValue(); - if (temp.empty()) + if (temp.empty()) { return App::DocumentObject::StdReturn; + } Base::FileInfo fi(temp); if (!fi.isReadable()) { @@ -133,54 +149,64 @@ App::DocumentObjectExecReturn *FeaturePage::execute(void) fi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName()); // try the redirect if (!fi.isReadable()) { - Base::Console().Log("FeaturePage::execute() not able to open %s!\n",Template.getValue()); + Base::Console().Log("FeaturePage::execute() not able to open %s!\n", + Template.getValue()); std::string error = std::string("Cannot open file ") + Template.getValue(); return new App::DocumentObjectExecReturn(error); } } - if (std::string(PageResult.getValue()).empty()) + if (std::string(PageResult.getValue()).empty()) { PageResult.setValue(fi.filePath().c_str()); + } // open Template file string line; - ifstream file (fi.filePath().c_str()); + ifstream file(fi.filePath().c_str()); // make a temp file for FileIncluded Property string tempName = PageResult.getExchangeTempFile(); ostringstream ofile; string tempendl = "--endOfLine--"; - while (getline (file,line)) - { + while (getline(file, line)) { // check if the marker in the template is found - if(line.find("") == string::npos) + if (line.find("") == string::npos) { // if not - write through ofile << line << tempendl; - else - { + } + else { // get through the children and collect all the views - const std::vector &Grp = Group.getValues(); - for (std::vector::const_iterator It= Grp.begin();It!=Grp.end();++It) { - if ( (*It)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId()) ) { - Drawing::FeatureView *View = static_cast(*It); + const std::vector& Grp = Group.getValues(); + for (std::vector::const_iterator It = Grp.begin(); + It != Grp.end(); + ++It) { + if ((*It)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId())) { + Drawing::FeatureView* View = static_cast(*It); if (View->Visible.getValue()) { ofile << View->ViewResult.getValue(); ofile << tempendl << tempendl << tempendl; } - } else if ( (*It)->getTypeId().isDerivedFrom(Drawing::FeatureClip::getClassTypeId()) ) { - Drawing::FeatureClip *Clip = static_cast(*It); + } + else if ((*It)->getTypeId().isDerivedFrom(Drawing::FeatureClip::getClassTypeId())) { + Drawing::FeatureClip* Clip = static_cast(*It); if (Clip->Visible.getValue()) { ofile << Clip->ViewResult.getValue(); ofile << tempendl << tempendl << tempendl; } - } else if ( (*It)->getTypeId().isDerivedFrom(App::DocumentObjectGroup::getClassTypeId()) ) { + } + else if ((*It)->getTypeId().isDerivedFrom( + App::DocumentObjectGroup::getClassTypeId())) { // getting children inside subgroups too - App::DocumentObjectGroup *SubGroup = static_cast(*It); - const std::vector &SubGrp = SubGroup->Group.getValues(); - for (std::vector::const_iterator Grit= SubGrp.begin();Grit!=SubGrp.end();++Grit) { - if ( (*Grit)->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId()) ) { - Drawing::FeatureView *SView = static_cast(*Grit); + App::DocumentObjectGroup* SubGroup = + static_cast(*It); + const std::vector& SubGrp = SubGroup->Group.getValues(); + for (std::vector::const_iterator Grit = SubGrp.begin(); + Grit != SubGrp.end(); + ++Grit) { + if ((*Grit)->getTypeId().isDerivedFrom( + Drawing::FeatureView::getClassTypeId())) { + Drawing::FeatureView* SView = static_cast(*Grit); if (SView->Visible.getValue()) { ofile << SView->ViewResult.getValue(); ofile << tempendl << tempendl << tempendl; @@ -198,7 +224,7 @@ App::DocumentObjectExecReturn *FeaturePage::execute(void) string outfragment(ofile.str()); const std::vector& editText = EditableTexts.getValues(); if (!editText.empty()) { - boost::regex e1 ("(.*?)"); + boost::regex e1("(.*?)"); string::const_iterator begin, end; begin = outfragment.begin(); end = outfragment.end(); @@ -210,9 +236,14 @@ App::DocumentObjectExecReturn *FeaturePage::execute(void) while (boost::regex_search(begin, end, what, e1)) { if (count < editText.size()) { // change values of editable texts - boost::regex e2 ("((.*?)()"); + boost::regex e2("((.*?)()"); std::back_insert_iterator out(newfragment); - boost::regex_replace(out, begin, what[0].second, e2, "$1>"+editText[count]+"$3"); + boost::regex_replace(out, + begin, + what[0].second, + e2, + "$1>" + editText[count] + "$3"); } count++; begin = what[0].second; @@ -224,7 +255,7 @@ App::DocumentObjectExecReturn *FeaturePage::execute(void) } // restoring linebreaks and saving the file - boost::regex e3 ("--endOfLine--"); + boost::regex e3("--endOfLine--"); string fmt = "\\n"; outfragment = boost::regex_replace(outfragment, e3, fmt); ofstream outfinal(tempName.c_str()); @@ -236,8 +267,9 @@ App::DocumentObjectExecReturn *FeaturePage::execute(void) return App::DocumentObject::StdReturn; } -std::vector FeaturePage::getEditableTextsFromTemplate(void) const { - //getting editable texts from "freecad:editable" attributes in SVG template +std::vector FeaturePage::getEditableTextsFromTemplate(void) const +{ + // getting editable texts from "freecad:editable" attributes in SVG template std::vector eds; @@ -246,20 +278,21 @@ std::vector FeaturePage::getEditableTextsFromTemplate(void) const { Base::FileInfo tfi(temp); if (!tfi.isReadable()) { // if there is a old absolute template file set use a redirect - tfi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + tfi.fileName()); + tfi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + + tfi.fileName()); // try the redirect if (!tfi.isReadable()) { return eds; } } string tline, tfrag; - ifstream tfile (tfi.filePath().c_str()); - while (getline (tfile,tline)) { + ifstream tfile(tfi.filePath().c_str()); + while (getline(tfile, tline)) { tfrag += tline; tfrag += "--endOfLine--"; } tfile.close(); - boost::regex e ("(.*?)"); + boost::regex e("(.*?)"); string::const_iterator tbegin, tend; tbegin = tfrag.begin(); tend = tfrag.end(); diff --git a/src/Mod/Drawing/App/FeaturePage.h b/src/Mod/Drawing/App/FeaturePage.h index b5c7f17b86..5ff583e7c0 100644 --- a/src/Mod/Drawing/App/FeaturePage.h +++ b/src/Mod/Drawing/App/FeaturePage.h @@ -49,11 +49,12 @@ public: /** @name methods override Feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawingPage"; } virtual std::vector getEditableTextsFromTemplate(void) const; @@ -69,7 +70,7 @@ private: }; -} //namespace Drawing +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/FeatureProjection.cpp b/src/Mod/Drawing/App/FeatureProjection.cpp index 6c5de821ef..39d7a6d3d5 100644 --- a/src/Mod/Drawing/App/FeatureProjection.cpp +++ b/src/Mod/Drawing/App/FeatureProjection.cpp @@ -22,11 +22,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include +#include +#include +#include #endif #include "FeatureProjection.h" @@ -37,38 +37,43 @@ using namespace Drawing; PROPERTY_SOURCE(Drawing::FeatureProjection, Part::Feature) -FeatureProjection::FeatureProjection() +FeatureProjection::FeatureProjection() { - static const char *group = "Projection"; - ADD_PROPERTY_TYPE(Source ,(nullptr),group,App::Prop_None,"Shape to project"); - ADD_PROPERTY_TYPE(Direction, (Base::Vector3d(0, 0, 1)), group, App::Prop_None, + static const char* group = "Projection"; + ADD_PROPERTY_TYPE(Source, (nullptr), group, App::Prop_None, "Shape to project"); + ADD_PROPERTY_TYPE(Direction, + (Base::Vector3d(0, 0, 1)), + group, + App::Prop_None, "Projection direction"); - ADD_PROPERTY_TYPE(VCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(Rg1LineVCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(RgNLineVCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(OutLineVCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(IsoLineVCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(HCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(Rg1LineHCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(RgNLineHCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(OutLineHCompound ,(true),group,App::Prop_None,"Projection parameter"); - ADD_PROPERTY_TYPE(IsoLineHCompound ,(true),group,App::Prop_None,"Projection parameter"); + ADD_PROPERTY_TYPE(VCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(Rg1LineVCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(RgNLineVCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(OutLineVCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(IsoLineVCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(HCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(Rg1LineHCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(RgNLineHCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(OutLineHCompound, (true), group, App::Prop_None, "Projection parameter"); + ADD_PROPERTY_TYPE(IsoLineHCompound, (true), group, App::Prop_None, "Projection parameter"); } FeatureProjection::~FeatureProjection() -{ -} +{} -App::DocumentObjectExecReturn *FeatureProjection::execute(void) +App::DocumentObjectExecReturn* FeatureProjection::execute(void) { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No object linked"); - if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { return new App::DocumentObjectExecReturn("Linked object is not a Part object"); + } const TopoDS_Shape& shape = static_cast(link)->Shape.getShape().getShape(); - if (shape.IsNull()) + if (shape.IsNull()) { return new App::DocumentObjectExecReturn("Linked shape object is empty"); + } try { const Base::Vector3d& dir = Direction.getValue(); @@ -77,26 +82,36 @@ App::DocumentObjectExecReturn *FeatureProjection::execute(void) TopoDS_Compound comp; BRep_Builder builder; builder.MakeCompound(comp); - if (!alg.V.IsNull() && VCompound.getValue()) + if (!alg.V.IsNull() && VCompound.getValue()) { builder.Add(comp, alg.V); - if (!alg.V1.IsNull() && Rg1LineVCompound.getValue()) + } + if (!alg.V1.IsNull() && Rg1LineVCompound.getValue()) { builder.Add(comp, alg.V1); - if (!alg.VN.IsNull() && RgNLineVCompound.getValue()) + } + if (!alg.VN.IsNull() && RgNLineVCompound.getValue()) { builder.Add(comp, alg.VN); - if (!alg.VO.IsNull() && OutLineVCompound.getValue()) + } + if (!alg.VO.IsNull() && OutLineVCompound.getValue()) { builder.Add(comp, alg.VO); - if (!alg.VI.IsNull() && IsoLineVCompound.getValue()) + } + if (!alg.VI.IsNull() && IsoLineVCompound.getValue()) { builder.Add(comp, alg.VI); - if (!alg.H.IsNull() && HCompound.getValue()) + } + if (!alg.H.IsNull() && HCompound.getValue()) { builder.Add(comp, alg.H); - if (!alg.H1.IsNull() && Rg1LineHCompound.getValue()) + } + if (!alg.H1.IsNull() && Rg1LineHCompound.getValue()) { builder.Add(comp, alg.H1); - if (!alg.HN.IsNull() && RgNLineHCompound.getValue()) + } + if (!alg.HN.IsNull() && RgNLineHCompound.getValue()) { builder.Add(comp, alg.HN); - if (!alg.HO.IsNull() && OutLineHCompound.getValue()) + } + if (!alg.HO.IsNull() && OutLineHCompound.getValue()) { builder.Add(comp, alg.HO); - if (!alg.HI.IsNull() && IsoLineHCompound.getValue()) + } + if (!alg.HI.IsNull() && IsoLineHCompound.getValue()) { builder.Add(comp, alg.HI); + } Shape.setValue(comp); return App::DocumentObject::StdReturn; diff --git a/src/Mod/Drawing/App/FeatureProjection.h b/src/Mod/Drawing/App/FeatureProjection.h index afc3645154..577d959b25 100644 --- a/src/Mod/Drawing/App/FeatureProjection.h +++ b/src/Mod/Drawing/App/FeatureProjection.h @@ -34,7 +34,7 @@ namespace Drawing /** Base class of all View Features in the drawing module */ -class DrawingExport FeatureProjection : public Part::Feature +class DrawingExport FeatureProjection: public Part::Feature { PROPERTY_HEADER(Drawing::FeatureProjection); @@ -43,28 +43,27 @@ public: FeatureProjection(); virtual ~FeatureProjection(); - App::PropertyLink Source; + App::PropertyLink Source; App::PropertyVector Direction; - App::PropertyBool VCompound; - App::PropertyBool Rg1LineVCompound; - App::PropertyBool RgNLineVCompound; - App::PropertyBool OutLineVCompound; - App::PropertyBool IsoLineVCompound; - App::PropertyBool HCompound; - App::PropertyBool Rg1LineHCompound; - App::PropertyBool RgNLineHCompound; - App::PropertyBool OutLineHCompound; - App::PropertyBool IsoLineHCompound; + App::PropertyBool VCompound; + App::PropertyBool Rg1LineVCompound; + App::PropertyBool RgNLineVCompound; + App::PropertyBool OutLineVCompound; + App::PropertyBool IsoLineVCompound; + App::PropertyBool HCompound; + App::PropertyBool Rg1LineHCompound; + App::PropertyBool RgNLineHCompound; + App::PropertyBool OutLineHCompound; + App::PropertyBool IsoLineHCompound; /** @name methods override feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} }; -} //namespace Drawing +} // namespace Drawing - -#endif // DRAWING_FEATUREPROJECTION +#endif // DRAWING_FEATUREPROJECTION diff --git a/src/Mod/Drawing/App/FeatureView.cpp b/src/Mod/Drawing/App/FeatureView.cpp index a2e691be8d..08044cb741 100644 --- a/src/Mod/Drawing/App/FeatureView.cpp +++ b/src/Mod/Drawing/App/FeatureView.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -40,21 +40,34 @@ using namespace Drawing; PROPERTY_SOURCE(Drawing::FeatureView, App::DocumentObject) -FeatureView::FeatureView(void) +FeatureView::FeatureView(void) { static const char* group = "Drawing view"; - ADD_PROPERTY_TYPE(X, (0), group, App::Prop_None, + ADD_PROPERTY_TYPE(X, + (0), + group, + App::Prop_None, "X position of the view on the drawing in modelling units (mm)"); - ADD_PROPERTY_TYPE(Y, (0), group, App::Prop_None, + ADD_PROPERTY_TYPE(Y, + (0), + group, + App::Prop_None, "Y position of the view on the drawing in modelling units (mm)"); ADD_PROPERTY_TYPE(Scale, (1.0), group, App::Prop_None, "Scale factor of the view"); - ADD_PROPERTY_TYPE(Rotation, (0), group, App::Prop_None, + ADD_PROPERTY_TYPE(Rotation, + (0), + group, + App::Prop_None, "Rotation of the view in degrees counterclockwise"); - // The 'Visible' property is handled by the view provider exclusively. It has the 'Output' flag set to - // avoid to call the execute() method. The view provider touches the page object, instead. + // The 'Visible' property is handled by the view provider exclusively. It has the 'Output' flag + // set to avoid to call the execute() method. The view provider touches the page object, + // instead. App::PropertyType propType = static_cast(App::Prop_Hidden | App::Prop_Output); - ADD_PROPERTY_TYPE(Visible, (true), group, propType, + ADD_PROPERTY_TYPE(Visible, + (true), + group, + propType, "Control whether view is visible in page object"); App::PropertyType type = (App::PropertyType)(App::Prop_Hidden); @@ -62,10 +75,9 @@ FeatureView::FeatureView(void) } FeatureView::~FeatureView() -{ -} +{} -App::DocumentObjectExecReturn *FeatureView::recompute(void) +App::DocumentObjectExecReturn* FeatureView::recompute(void) { try { return App::DocumentObject::recompute(); @@ -73,12 +85,14 @@ App::DocumentObjectExecReturn *FeatureView::recompute(void) catch (Standard_Failure& e) { App::DocumentObjectExecReturn* ret = new App::DocumentObjectExecReturn(e.GetMessageString()); - if (ret->Why.empty()) ret->Why = "Unknown OCC exception"; + if (ret->Why.empty()) { + ret->Why = "Unknown OCC exception"; + } return ret; } } -App::DocumentObjectExecReturn *FeatureView::execute(void) +App::DocumentObjectExecReturn* FeatureView::execute(void) { return App::DocumentObject::StdReturn; } @@ -86,14 +100,17 @@ App::DocumentObjectExecReturn *FeatureView::execute(void) // Python Drawing feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Drawing::FeatureViewPython, Drawing::FeatureView) -template<> const char* Drawing::FeatureViewPython::getViewProviderName(void) const { +template<> +const char* Drawing::FeatureViewPython::getViewProviderName(void) const +{ return "DrawingGui::ViewProviderDrawingViewPython"; } /// @endcond // explicit template instantiation template class DrawingExport FeaturePythonT; -} +} // namespace App diff --git a/src/Mod/Drawing/App/FeatureView.h b/src/Mod/Drawing/App/FeatureView.h index 58179e5752..581e38852b 100644 --- a/src/Mod/Drawing/App/FeatureView.h +++ b/src/Mod/Drawing/App/FeatureView.h @@ -34,7 +34,7 @@ namespace Drawing /** Base class of all View Features in the drawing module */ -class DrawingExport FeatureView : public App::DocumentObject +class DrawingExport FeatureView: public App::DocumentObject { PROPERTY_HEADER(Drawing::FeatureView); @@ -43,12 +43,13 @@ public: FeatureView(void); virtual ~FeatureView(); - App::PropertyFloat X,Y,Scale,Rotation; + App::PropertyFloat X, Y, Scale, Rotation; App::PropertyString ViewResult; App::PropertyBool Visible; /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawingView"; } @@ -56,15 +57,14 @@ protected: /** @name methods override Feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *recompute(void); - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* recompute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} }; using FeatureViewPython = App::FeaturePythonT; -} //namespace Drawing - +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/FeatureViewAnnotation.cpp b/src/Mod/Drawing/App/FeatureViewAnnotation.cpp index a0e5095465..2281c9f899 100644 --- a/src/Mod/Drawing/App/FeatureViewAnnotation.cpp +++ b/src/Mod/Drawing/App/FeatureViewAnnotation.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include "FeatureViewAnnotation.h" @@ -39,36 +39,39 @@ using namespace std; PROPERTY_SOURCE(Drawing::FeatureViewAnnotation, Drawing::FeatureView) -FeatureViewAnnotation::FeatureViewAnnotation(void) +FeatureViewAnnotation::FeatureViewAnnotation(void) { - static const char *vgroup = "Drawing view"; + static const char* vgroup = "Drawing view"; - ADD_PROPERTY_TYPE(Text ,(""),vgroup,App::Prop_None,"The text to be displayed"); - ADD_PROPERTY_TYPE(Font ,("Sans"),vgroup,App::Prop_None,"The name of the font to use"); - ADD_PROPERTY_TYPE(TextColor, (0.0f, 0.0f, 0.0f), vgroup, App::Prop_None, + ADD_PROPERTY_TYPE(Text, (""), vgroup, App::Prop_None, "The text to be displayed"); + ADD_PROPERTY_TYPE(Font, ("Sans"), vgroup, App::Prop_None, "The name of the font to use"); + ADD_PROPERTY_TYPE(TextColor, + (0.0f, 0.0f, 0.0f), + vgroup, + App::Prop_None, "The color of the text"); } FeatureViewAnnotation::~FeatureViewAnnotation() -{ -} +{} -App::DocumentObjectExecReturn *FeatureViewAnnotation::execute(void) +App::DocumentObjectExecReturn* FeatureViewAnnotation::execute(void) { - stringstream result,hr,hg,hb; + stringstream result, hr, hg, hb; const App::Color& c = TextColor.getValue(); - hr << hex << setfill('0') << setw(2) << (int)(255.0*c.r); - hg << hex << setfill('0') << setw(2) << (int)(255.0*c.g); - hb << hex << setfill('0') << setw(2) << (int)(255.0*c.b); + hr << hex << setfill('0') << setw(2) << (int)(255.0 * c.r); + hg << hex << setfill('0') << setw(2) << (int)(255.0 * c.g); + hb << hex << setfill('0') << setw(2) << (int)(255.0 * c.b); - result << "" << endl - << "" << endl; + result << "" << endl + << "" << endl; - for (vector::const_iterator it = Text.getValues().begin(); it != Text.getValues().end(); ++it) { + for (vector::const_iterator it = Text.getValues().begin(); it != Text.getValues().end(); + ++it) { result << "" << it->c_str() << "" << endl; } @@ -82,14 +85,17 @@ App::DocumentObjectExecReturn *FeatureViewAnnotation::execute(void) // Python Drawing feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Drawing::FeatureViewAnnotationPython, Drawing::FeatureViewAnnotation) -template<> const char* Drawing::FeatureViewAnnotationPython::getViewProviderName(void) const { +template<> +const char* Drawing::FeatureViewAnnotationPython::getViewProviderName(void) const +{ return "DrawingGui::ViewProviderDrawingView"; } /// @endcond // explicit template instantiation template class DrawingExport FeaturePythonT; -} +} // namespace App diff --git a/src/Mod/Drawing/App/FeatureViewAnnotation.h b/src/Mod/Drawing/App/FeatureViewAnnotation.h index f5031fdfee..fe261b7fe3 100644 --- a/src/Mod/Drawing/App/FeatureViewAnnotation.h +++ b/src/Mod/Drawing/App/FeatureViewAnnotation.h @@ -35,7 +35,7 @@ namespace Drawing /** Base class of all View Features in the drawing module */ -class DrawingExport FeatureViewAnnotation : public FeatureView +class DrawingExport FeatureViewAnnotation: public FeatureView { PROPERTY_HEADER(Drawing::FeatureView); @@ -44,18 +44,19 @@ public: FeatureViewAnnotation(void); virtual ~FeatureViewAnnotation(); - App::PropertyStringList Text; - App::PropertyString Font; - App::PropertyColor TextColor; + App::PropertyStringList Text; + App::PropertyString Font; + App::PropertyColor TextColor; /** @name methods override Feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawingView"; } }; @@ -63,7 +64,7 @@ public: using FeatureViewAnnotationPython = App::FeaturePythonT; -} //namespace Drawing +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/FeatureViewPart.cpp b/src/Mod/Drawing/App/FeatureViewPart.cpp index d7ebc33871..4bab836cdc 100644 --- a/src/Mod/Drawing/App/FeatureViewPart.cpp +++ b/src/Mod/Drawing/App/FeatureViewPart.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -44,59 +44,88 @@ App::PropertyFloatConstraint::Constraints FeatureViewPart::floatRange = {0.01, 5 PROPERTY_SOURCE(Drawing::FeatureViewPart, Drawing::FeatureView) -FeatureViewPart::FeatureViewPart(void) +FeatureViewPart::FeatureViewPart(void) { - static const char *group = "Shape view"; - static const char *vgroup = "Drawing view"; + static const char* group = "Shape view"; + static const char* vgroup = "Drawing view"; - ADD_PROPERTY_TYPE(Direction ,(0,0,1.0),group,App::Prop_None,"Projection direction"); - ADD_PROPERTY_TYPE(Source ,(nullptr),group,App::Prop_None,"Shape to view"); - ADD_PROPERTY_TYPE(ShowHiddenLines ,(false),group,App::Prop_None,"Control the appearance of the dashed hidden lines"); - ADD_PROPERTY_TYPE(ShowSmoothLines ,(false),group,App::Prop_None,"Control the appearance of the smooth lines"); - ADD_PROPERTY_TYPE(LineWidth,(0.35),vgroup,App::Prop_None,"The thickness of the viewed lines"); - ADD_PROPERTY_TYPE(HiddenWidth,(0.15),vgroup,App::Prop_None,"The thickness of the hidden lines, if enabled"); - ADD_PROPERTY_TYPE(Tolerance,(0.05),vgroup,App::Prop_None,"The tessellation tolerance"); + ADD_PROPERTY_TYPE(Direction, (0, 0, 1.0), group, App::Prop_None, "Projection direction"); + ADD_PROPERTY_TYPE(Source, (nullptr), group, App::Prop_None, "Shape to view"); + ADD_PROPERTY_TYPE(ShowHiddenLines, + (false), + group, + App::Prop_None, + "Control the appearance of the dashed hidden lines"); + ADD_PROPERTY_TYPE(ShowSmoothLines, + (false), + group, + App::Prop_None, + "Control the appearance of the smooth lines"); + ADD_PROPERTY_TYPE(LineWidth, + (0.35), + vgroup, + App::Prop_None, + "The thickness of the viewed lines"); + ADD_PROPERTY_TYPE(HiddenWidth, + (0.15), + vgroup, + App::Prop_None, + "The thickness of the hidden lines, if enabled"); + ADD_PROPERTY_TYPE(Tolerance, (0.05), vgroup, App::Prop_None, "The tessellation tolerance"); Tolerance.setConstraints(&floatRange); } FeatureViewPart::~FeatureViewPart() -{ -} +{} -App::DocumentObjectExecReturn *FeatureViewPart::execute(void) +App::DocumentObjectExecReturn* FeatureViewPart::execute(void) { std::stringstream result; std::string ViewName = Label.getValue(); App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No object linked"); - if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { return new App::DocumentObjectExecReturn("Linked object is not a Part object"); + } TopoDS_Shape shape = static_cast(link)->Shape.getShape().getShape(); - if (shape.IsNull()) + if (shape.IsNull()) { return new App::DocumentObjectExecReturn("Linked shape object is empty"); + } Base::Vector3d Dir = Direction.getValue(); bool hidden = ShowHiddenLines.getValue(); bool smooth = ShowSmoothLines.getValue(); try { - ProjectionAlgos Alg(shape,Dir); - result << "" << endl; + ProjectionAlgos Alg(shape, Dir); + result << "" << endl; ProjectionAlgos::ExtractionType type = ProjectionAlgos::Plain; - if (hidden) type = (ProjectionAlgos::ExtractionType)(type|ProjectionAlgos::WithHidden); - if (smooth) type = (ProjectionAlgos::ExtractionType)(type|ProjectionAlgos::WithSmooth); + if (hidden) { + type = (ProjectionAlgos::ExtractionType)(type | ProjectionAlgos::WithHidden); + } + if (smooth) { + type = (ProjectionAlgos::ExtractionType)(type | ProjectionAlgos::WithSmooth); + } ProjectionAlgos::XmlAttributes visible_style = { - {"stroke-width", to_string(this->LineWidth.getValue() / this->Scale.getValue())} - }; + {"stroke-width", to_string(this->LineWidth.getValue() / this->Scale.getValue())}}; ProjectionAlgos::XmlAttributes hidden_style = { - {"stroke-width", to_string(this->HiddenWidth.getValue() / this->Scale.getValue()) } - }; - result << Alg.getSVG(type, this->Tolerance.getValue(), visible_style, visible_style, visible_style, hidden_style, hidden_style, hidden_style); + {"stroke-width", to_string(this->HiddenWidth.getValue() / this->Scale.getValue())}}; + result << Alg.getSVG(type, + this->Tolerance.getValue(), + visible_style, + visible_style, + visible_style, + hidden_style, + hidden_style, + hidden_style); result << "" << endl; @@ -111,17 +140,19 @@ App::DocumentObjectExecReturn *FeatureViewPart::execute(void) } - // Python Drawing feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Drawing::FeatureViewPartPython, Drawing::FeatureViewPart) -template<> const char* Drawing::FeatureViewPartPython::getViewProviderName(void) const { +template<> +const char* Drawing::FeatureViewPartPython::getViewProviderName(void) const +{ return "DrawingGui::ViewProviderDrawingView"; } /// @endcond // explicit template instantiation template class DrawingExport FeaturePythonT; -} +} // namespace App diff --git a/src/Mod/Drawing/App/FeatureViewPart.h b/src/Mod/Drawing/App/FeatureViewPart.h index 10ecefa725..02cc4f78b5 100644 --- a/src/Mod/Drawing/App/FeatureViewPart.h +++ b/src/Mod/Drawing/App/FeatureViewPart.h @@ -35,7 +35,7 @@ namespace Drawing /** Base class of all View Features in the drawing module */ -class DrawingExport FeatureViewPart : public FeatureView +class DrawingExport FeatureViewPart: public FeatureView { PROPERTY_HEADER(Part::FeatureViewPart); @@ -44,23 +44,24 @@ public: FeatureViewPart(void); virtual ~FeatureViewPart(); - App::PropertyLink Source; + App::PropertyLink Source; App::PropertyVector Direction; - App::PropertyBool ShowHiddenLines; - App::PropertyBool ShowSmoothLines; - App::PropertyFloat LineWidth; - App::PropertyFloat HiddenWidth; - App::PropertyFloatConstraint Tolerance; + App::PropertyBool ShowHiddenLines; + App::PropertyBool ShowSmoothLines; + App::PropertyFloat LineWidth; + App::PropertyFloat HiddenWidth; + App::PropertyFloatConstraint Tolerance; /** @name methods override Feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawingView"; } @@ -71,7 +72,7 @@ private: using FeatureViewPartPython = App::FeaturePythonT; -} //namespace Drawing +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp b/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp index 86b669ee02..718d23adc1 100644 --- a/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp +++ b/src/Mod/Drawing/App/FeatureViewSpreadsheet.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -43,53 +43,67 @@ using namespace Drawing; PROPERTY_SOURCE(Drawing::FeatureViewSpreadsheet, Drawing::FeatureView) -FeatureViewSpreadsheet::FeatureViewSpreadsheet(void) +FeatureViewSpreadsheet::FeatureViewSpreadsheet(void) { - static const char *vgroup = "Drawing view"; + static const char* vgroup = "Drawing view"; - ADD_PROPERTY_TYPE(CellStart ,("A1"),vgroup,App::Prop_None,"The top left cell of the range to display"); - ADD_PROPERTY_TYPE(CellEnd ,("B2"),vgroup,App::Prop_None,"The bottom right cell of the range to display"); - ADD_PROPERTY_TYPE(Font ,("Sans"),vgroup,App::Prop_None,"The name of the font to use"); - ADD_PROPERTY_TYPE(Color,(0.0f,0.0f,0.0f),vgroup,App::Prop_None,"The default color of the text and lines"); - ADD_PROPERTY_TYPE(Source ,(nullptr),vgroup,App::Prop_None,"Spreadsheet to view"); - ADD_PROPERTY_TYPE(LineWidth,(0.35),vgroup,App::Prop_None,"The thickness of the cell lines"); - ADD_PROPERTY_TYPE(FontSize,(12.0),vgroup,App::Prop_None,"The size of the text"); + ADD_PROPERTY_TYPE(CellStart, + ("A1"), + vgroup, + App::Prop_None, + "The top left cell of the range to display"); + ADD_PROPERTY_TYPE(CellEnd, + ("B2"), + vgroup, + App::Prop_None, + "The bottom right cell of the range to display"); + ADD_PROPERTY_TYPE(Font, ("Sans"), vgroup, App::Prop_None, "The name of the font to use"); + ADD_PROPERTY_TYPE(Color, + (0.0f, 0.0f, 0.0f), + vgroup, + App::Prop_None, + "The default color of the text and lines"); + ADD_PROPERTY_TYPE(Source, (nullptr), vgroup, App::Prop_None, "Spreadsheet to view"); + ADD_PROPERTY_TYPE(LineWidth, (0.35), vgroup, App::Prop_None, "The thickness of the cell lines"); + ADD_PROPERTY_TYPE(FontSize, (12.0), vgroup, App::Prop_None, "The size of the text"); } FeatureViewSpreadsheet::~FeatureViewSpreadsheet() -{ -} +{} -App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) +App::DocumentObjectExecReturn* FeatureViewSpreadsheet::execute(void) { // quick tests App::DocumentObject* link = Source.getValue(); std::string scellstart = CellStart.getValue(); std::string scellend = CellEnd.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No spreadsheet linked"); - if (!link->getTypeId().isDerivedFrom(Spreadsheet::Sheet::getClassTypeId())) + } + if (!link->getTypeId().isDerivedFrom(Spreadsheet::Sheet::getClassTypeId())) { return new App::DocumentObjectExecReturn("The linked object is not a spreadsheet"); - if ( (scellstart.empty()) || (scellend.empty()) ) + } + if ((scellstart.empty()) || (scellend.empty())) { return new App::DocumentObjectExecReturn("Empty cell value"); - + } + // build a list of available columns: A, B, C, ... AA, AB, ... ZY, ZZ. std::string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; std::vector availcolumns; - for (int i=0; i<26; ++i) { + for (int i = 0; i < 26; ++i) { std::stringstream s; s << alphabet[i]; availcolumns.push_back(s.str()); } - for (int i=0; i<26; ++i) { - for (int j=0; i<26; ++i) { + for (int i = 0; i < 26; ++i) { + for (int j = 0; i < 26; ++i) { std::stringstream s; s << alphabet[i] << alphabet[j]; availcolumns.push_back(s.str()); } } - + // build rows range and columns range std::vector columns; std::vector rows; @@ -106,7 +120,8 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) std::string endcol = scellend.substr(0, i); bool valid = false; for (std::vector::const_iterator j = availcolumns.begin(); - j != availcolumns.end(); ++j) { + j != availcolumns.end(); + ++j) { if ((*j) == startcol) { if ((*j) != endcol) { valid = true; @@ -130,13 +145,14 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) } } } - } catch (std::exception&) { + } + catch (std::exception&) { return new App::DocumentObjectExecReturn("Invalid cell range"); } - + // create the containing group std::string ViewName = Label.getValue(); - std::stringstream result,hr,hg,hb; + std::stringstream result, hr, hg, hb; const App::Color& c = Color.getValue(); hr << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * c.r); hg << std::hex << std::setfill('0') << std::setw(2) << (int)(255.0 * c.g); @@ -152,8 +168,8 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) float cellheight = 100; float cellwidth = 100; std::string celltext; - Spreadsheet::Sheet* sheet = static_cast(link); - std::vector skiplist; + Spreadsheet::Sheet* sheet = static_cast(link); + std::vector skiplist; for (std::vector::const_iterator col = columns.begin(); col != columns.end(); ++col) { // create a group for each column @@ -170,14 +186,18 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) App::Property* prop = sheet->getPropertyByName(address.toString().c_str()); std::stringstream field; if (prop) { - if (prop->isDerivedFrom((App::PropertyQuantity::getClassTypeId()))) + if (prop->isDerivedFrom((App::PropertyQuantity::getClassTypeId()))) { field << static_cast(prop)->getValue(); - else if (prop->isDerivedFrom((App::PropertyFloat::getClassTypeId()))) + } + else if (prop->isDerivedFrom((App::PropertyFloat::getClassTypeId()))) { field << static_cast(prop)->getValue(); - else if (prop->isDerivedFrom((App::PropertyString::getClassTypeId()))) + } + else if (prop->isDerivedFrom((App::PropertyString::getClassTypeId()))) { field << static_cast(prop)->getValue(); - else + } + else { assert(0); + } celltext = field.str(); } // get colors, style, alignment and span @@ -206,24 +226,30 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) } if (cell->getStyle(st)) { for (std::set::const_iterator i = st.begin(); i != st.end(); ++i) { - if ((*i) == "bold") + if ((*i) == "bold") { textstyle = textstyle + "font-weight: bold; "; - else if ((*i) == "italic") + } + else if ((*i) == "italic") { textstyle = textstyle + "font-style: italic; "; - else if ((*i) == "underline") + } + else if ((*i) == "underline") { textstyle = textstyle + "text-decoration: underline; "; + } } } if (cell->getSpans(rowspan, colspan)) { for (int i = 0; i < colspan; ++i) { for (int j = 0; j < rowspan; ++j) { App::CellAddress nextcell(address.row() + j, address.col() + i); - if (i > 0) + if (i > 0) { cellwidth = cellwidth + sheet->getColumnWidth(nextcell.col()); - if (j > 0) + } + if (j > 0) { cellheight = cellheight + sheet->getRowHeight(nextcell.row()); - if ((i > 0) || (j > 0)) + } + if ((i > 0) || (j > 0)) { skiplist.push_back(nextcell.toString()); + } } } } @@ -235,18 +261,21 @@ App::DocumentObjectExecReturn *FeatureViewSpreadsheet::execute(void) << cellwidth << "\" height=\"" << cellheight << "\" style=\"fill:" << bcolor << ";stroke-width:" << LineWidth.getValue() / Scale.getValue() << ";stroke:#" << hr.str() << hg.str() << hb.str() << ";\" />" << std::endl; - if (alignment & Spreadsheet::Cell::ALIGNMENT_LEFT) + if (alignment & Spreadsheet::Cell::ALIGNMENT_LEFT) { result << " " << celltext << "" << std::endl; diff --git a/src/Mod/Drawing/App/FeatureViewSpreadsheet.h b/src/Mod/Drawing/App/FeatureViewSpreadsheet.h index 673f18df26..ec49e81a97 100644 --- a/src/Mod/Drawing/App/FeatureViewSpreadsheet.h +++ b/src/Mod/Drawing/App/FeatureViewSpreadsheet.h @@ -34,7 +34,7 @@ namespace Drawing /** Base class of all View Features in the drawing module */ -class DrawingExport FeatureViewSpreadsheet : public FeatureView +class DrawingExport FeatureViewSpreadsheet: public FeatureView { PROPERTY_HEADER(Drawing::FeatureView); @@ -42,27 +42,28 @@ public: /// Constructor FeatureViewSpreadsheet(void); virtual ~FeatureViewSpreadsheet(); - App::PropertyLink Source; - App::PropertyString CellStart; - App::PropertyString CellEnd; - App::PropertyString Font; - App::PropertyColor Color; - App::PropertyFloat LineWidth; - App::PropertyFloat FontSize; + App::PropertyLink Source; + App::PropertyString CellStart; + App::PropertyString CellEnd; + App::PropertyString Font; + App::PropertyColor Color; + App::PropertyFloat LineWidth; + App::PropertyFloat FontSize; /** @name methods override Feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawingView"; } }; -} //namespace Drawing +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/FeatureViewSymbol.cpp b/src/Mod/Drawing/App/FeatureViewSymbol.cpp index 65dbf603ad..9a13b7496e 100644 --- a/src/Mod/Drawing/App/FeatureViewSymbol.cpp +++ b/src/Mod/Drawing/App/FeatureViewSymbol.cpp @@ -22,11 +22,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include +#include #endif #include "FeatureViewSymbol.h" @@ -42,18 +42,20 @@ using namespace std; PROPERTY_SOURCE(Drawing::FeatureViewSymbol, Drawing::FeatureView) -FeatureViewSymbol::FeatureViewSymbol(void) +FeatureViewSymbol::FeatureViewSymbol(void) { - static const char *vgroup = "Drawing view"; - - ADD_PROPERTY_TYPE(Symbol,(""),vgroup,App::Prop_Hidden,"The SVG code defining this symbol"); - ADD_PROPERTY_TYPE(EditableTexts,(""),vgroup,App::Prop_None,"Substitution values for the editable strings in this symbol"); + static const char* vgroup = "Drawing view"; + ADD_PROPERTY_TYPE(Symbol, (""), vgroup, App::Prop_Hidden, "The SVG code defining this symbol"); + ADD_PROPERTY_TYPE(EditableTexts, + (""), + vgroup, + App::Prop_None, + "Substitution values for the editable strings in this symbol"); } FeatureViewSymbol::~FeatureViewSymbol() -{ -} +{} /// get called by the container when a Property was changed void FeatureViewSymbol::onChanged(const App::Property* prop) @@ -63,7 +65,7 @@ void FeatureViewSymbol::onChanged(const App::Property* prop) std::vector eds; std::string svg = Symbol.getValue(); if (!svg.empty()) { - boost::regex e ("(.*?)"); + boost::regex e("(.*?)"); std::string::const_iterator tbegin, tend; tbegin = svg.begin(); tend = svg.end(); @@ -79,13 +81,13 @@ void FeatureViewSymbol::onChanged(const App::Property* prop) Drawing::FeatureView::onChanged(prop); } -App::DocumentObjectExecReturn *FeatureViewSymbol::execute(void) +App::DocumentObjectExecReturn* FeatureViewSymbol::execute(void) { std::string svg = Symbol.getValue(); const std::vector& editText = EditableTexts.getValues(); - + if (!editText.empty()) { - boost::regex e1 ("(.*?)"); + boost::regex e1("(.*?)"); string::const_iterator begin, end; begin = svg.begin(); end = svg.end(); @@ -98,9 +100,14 @@ App::DocumentObjectExecReturn *FeatureViewSymbol::execute(void) if (count < editText.size()) { // change values of editable texts. Also strip the "freecad:editable" // attribute so it isn't detected by the page - boost::regex e2 ("((.*?)()"); + boost::regex e2("((.*?)()"); std::back_insert_iterator out(newsvg); - boost::regex_replace(out, begin, what[0].second, e2, "$1$3>"+editText[count]+"$5"); + boost::regex_replace(out, + begin, + what[0].second, + e2, + "$1$3>" + editText[count] + "$5"); } count++; begin = what[0].second; @@ -110,13 +117,13 @@ App::DocumentObjectExecReturn *FeatureViewSymbol::execute(void) newsvg.insert(newsvg.end(), begin, end); svg = newsvg; } - + std::stringstream result; - result << "" << endl - << svg << endl - << "" << endl; + result << "" << endl + << svg << endl + << "" << endl; // Apply the resulting fragment ViewResult.setValue(result.str().c_str()); @@ -126,14 +133,17 @@ App::DocumentObjectExecReturn *FeatureViewSymbol::execute(void) // Python Drawing feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Drawing::FeatureViewSymbolPython, Drawing::FeatureViewSymbol) -template<> const char* Drawing::FeatureViewSymbolPython::getViewProviderName(void) const { +template<> +const char* Drawing::FeatureViewSymbolPython::getViewProviderName(void) const +{ return "DrawingGui::ViewProviderDrawingView"; } /// @endcond // explicit template instantiation template class DrawingExport FeaturePythonT; -} +} // namespace App diff --git a/src/Mod/Drawing/App/FeatureViewSymbol.h b/src/Mod/Drawing/App/FeatureViewSymbol.h index 9c1552e8f4..5c447f8265 100644 --- a/src/Mod/Drawing/App/FeatureViewSymbol.h +++ b/src/Mod/Drawing/App/FeatureViewSymbol.h @@ -35,7 +35,7 @@ namespace Drawing /** Base class of all View Features in the drawing module */ -class DrawingExport FeatureViewSymbol : public FeatureView +class DrawingExport FeatureViewSymbol: public FeatureView { PROPERTY_HEADER(Drawing::FeatureView); @@ -44,17 +44,18 @@ public: FeatureViewSymbol(void); virtual ~FeatureViewSymbol(); - App::PropertyString Symbol; - App::PropertyStringList EditableTexts; + App::PropertyString Symbol; + App::PropertyStringList EditableTexts; /** @name methods override Feature */ //@{ /// recalculate the Feature - virtual App::DocumentObjectExecReturn *execute(void); + virtual App::DocumentObjectExecReturn* execute(void); //@} /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawingView"; } @@ -65,7 +66,7 @@ protected: using FeatureViewSymbolPython = App::FeaturePythonT; -} //namespace Drawing +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/PageGroup.cpp b/src/Mod/Drawing/App/PageGroup.cpp index f36a740619..7ed22957fb 100644 --- a/src/Mod/Drawing/App/PageGroup.cpp +++ b/src/Mod/Drawing/App/PageGroup.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "PageGroup.h" @@ -36,12 +36,11 @@ using namespace Drawing; PROPERTY_SOURCE(Drawing::PageGroup, App::DocumentObjectGroup) -PageGroup::PageGroup(void) +PageGroup::PageGroup(void) { - static const char *group = "Drawings"; - ADD_PROPERTY_TYPE(Pages,(nullptr),group,App::Prop_None,"List of pages"); + static const char* group = "Drawings"; + ADD_PROPERTY_TYPE(Pages, (nullptr), group, App::Prop_None, "List of pages"); } PageGroup::~PageGroup() -{ -} +{} diff --git a/src/Mod/Drawing/App/PageGroup.h b/src/Mod/Drawing/App/PageGroup.h index 3c4d9078a6..4f4561291b 100644 --- a/src/Mod/Drawing/App/PageGroup.h +++ b/src/Mod/Drawing/App/PageGroup.h @@ -33,7 +33,7 @@ namespace Drawing /** Base class of all View Features in the drawing module */ -class DrawingExport PageGroup : public App::DocumentObjectGroup +class DrawingExport PageGroup: public App::DocumentObjectGroup { PROPERTY_HEADER(Drawing::PageGroup); @@ -45,14 +45,14 @@ public: App::PropertyLinkList Pages; /// returns the type name of the ViewProvider - virtual const char* getViewProviderName(void) const { + virtual const char* getViewProviderName(void) const + { return "DrawingGui::ViewProviderDrawing"; } }; -} //namespace Drawing - +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/App/PreCompiled.cpp b/src/Mod/Drawing/App/PreCompiled.cpp index 3139e21f64..6758517493 100644 --- a/src/Mod/Drawing/App/PreCompiled.cpp +++ b/src/Mod/Drawing/App/PreCompiled.cpp @@ -20,4 +20,4 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Drawing/App/PreCompiled.h b/src/Mod/Drawing/App/PreCompiled.h index 897ad95b1a..e53710ca81 100644 --- a/src/Mod/Drawing/App/PreCompiled.h +++ b/src/Mod/Drawing/App/PreCompiled.h @@ -32,7 +32,6 @@ #include #include #include -#include #include // boost @@ -40,26 +39,20 @@ // OpenCasCade #include -#include -#include #include #include #include -#include #include -#include -#include +#include +#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include #include #include -#include #include #include #include @@ -69,9 +62,15 @@ #include #include #include +#include +#include +#include +#include +#include +#include #if OCC_VERSION_HEX < 0x070600 -# include +#include #endif -#endif // _PreComp_ +#endif // _PreComp_ #endif diff --git a/src/Mod/Drawing/App/ProjectionAlgos.cpp b/src/Mod/Drawing/App/ProjectionAlgos.cpp index 5fd5ede54e..777d19d151 100644 --- a/src/Mod/Drawing/App/ProjectionAlgos.cpp +++ b/src/Mod/Drawing/App/ProjectionAlgos.cpp @@ -22,25 +22,25 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include -#include "ProjectionAlgos.h" #include "DrawingExport.h" +#include "ProjectionAlgos.h" using namespace Drawing; @@ -51,60 +51,61 @@ using namespace std; //=========================================================================== -ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d &Dir) - : Input(Input), Direction(Dir) +ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape& Input, const Base::Vector3d& Dir) + : Input(Input) + , Direction(Dir) { execute(); } ProjectionAlgos::~ProjectionAlgos() -{ -} +{} -//added by tanderson. aka blobfish. -//projection algorithms build a 2d curve(pcurve) but no 3d curve. -//this causes problems with meshing algorithms after save and load. -static const TopoDS_Shape& build3dCurves(const TopoDS_Shape &shape) +// added by tanderson. aka blobfish. +// projection algorithms build a 2d curve(pcurve) but no 3d curve. +// this causes problems with meshing algorithms after save and load. +static const TopoDS_Shape& build3dCurves(const TopoDS_Shape& shape) { - TopExp_Explorer it; - for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next()) - BRepLib::BuildCurve3d(TopoDS::Edge(it.Current())); - return shape; + TopExp_Explorer it; + for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next()) { + BRepLib::BuildCurve3d(TopoDS::Edge(it.Current())); + } + return shape; } void ProjectionAlgos::execute(void) { - Handle( HLRBRep_Algo ) brep_hlr = new HLRBRep_Algo; + Handle(HLRBRep_Algo) brep_hlr = new HLRBRep_Algo; brep_hlr->Add(Input); - gp_Ax2 transform(gp_Pnt(0,0,0),gp_Dir(Direction.x,Direction.y,Direction.z)); - HLRAlgo_Projector projector( transform ); + gp_Ax2 transform(gp_Pnt(0, 0, 0), gp_Dir(Direction.x, Direction.y, Direction.z)); + HLRAlgo_Projector projector(transform); brep_hlr->Projector(projector); brep_hlr->Update(); brep_hlr->Hide(); // extracting the result sets: - HLRBRep_HLRToShape shapes( brep_hlr ); + HLRBRep_HLRToShape shapes(brep_hlr); - V = build3dCurves(shapes.VCompound ());// hard edge visibly - V1 = build3dCurves(shapes.Rg1LineVCompound());// Smoth edges visibly - VN = build3dCurves(shapes.RgNLineVCompound());// contour edges visibly - VO = build3dCurves(shapes.OutLineVCompound());// contours apparents visibly - VI = build3dCurves(shapes.IsoLineVCompound());// isoparamtriques visibly - H = build3dCurves(shapes.HCompound ());// hard edge invisibly - H1 = build3dCurves(shapes.Rg1LineHCompound());// Smoth edges invisibly - HN = build3dCurves(shapes.RgNLineHCompound());// contour edges invisibly - HO = build3dCurves(shapes.OutLineHCompound());// contours apparents invisibly - HI = build3dCurves(shapes.IsoLineHCompound());// isoparamtriques invisibly + V = build3dCurves(shapes.VCompound()); // hard edge visibly + V1 = build3dCurves(shapes.Rg1LineVCompound()); // Smoth edges visibly + VN = build3dCurves(shapes.RgNLineVCompound()); // contour edges visibly + VO = build3dCurves(shapes.OutLineVCompound()); // contours apparents visibly + VI = build3dCurves(shapes.IsoLineVCompound()); // isoparamtriques visibly + H = build3dCurves(shapes.HCompound()); // hard edge invisibly + H1 = build3dCurves(shapes.Rg1LineHCompound()); // Smoth edges invisibly + HN = build3dCurves(shapes.RgNLineHCompound()); // contour edges invisibly + HO = build3dCurves(shapes.OutLineHCompound()); // contours apparents invisibly + HI = build3dCurves(shapes.IsoLineHCompound()); // isoparamtriques invisibly } -string ProjectionAlgos::getSVG(ExtractionType type, - double tolerance, - XmlAttributes V_style, - XmlAttributes V0_style, - XmlAttributes V1_style, - XmlAttributes H_style, - XmlAttributes H0_style, +string ProjectionAlgos::getSVG(ExtractionType type, + double tolerance, + XmlAttributes V_style, + XmlAttributes V0_style, + XmlAttributes V1_style, + XmlAttributes H_style, + XmlAttributes H0_style, XmlAttributes H1_style) { stringstream result; @@ -118,14 +119,12 @@ string ProjectionAlgos::getSVG(ExtractionType type, H_style.insert({"stroke-dasharray", "0.2,0.1)"}); H_style.insert({"fill", "none"}); H_style.insert({"transform", "scale(1,-1)"}); - BRepMesh_IncrementalMesh(H,tolerance); - result << "" << endl - << output.exportEdges(H) - << "" << endl; + BRepMesh_IncrementalMesh(H, tolerance); + result << "" << endl << output.exportEdges(H) << "" << endl; } if (!HO.IsNull() && (type & WithHidden)) { H0_style.insert({"stroke", "rgb(0, 0, 0)"}); @@ -135,14 +134,12 @@ string ProjectionAlgos::getSVG(ExtractionType type, H0_style.insert({"stroke-dasharray", "0.02,0.1)"}); H0_style.insert({"fill", "none"}); H0_style.insert({"transform", "scale(1,-1)"}); - BRepMesh_IncrementalMesh(HO,tolerance); - result << "" << endl - << output.exportEdges(HO) - << "" << endl; + BRepMesh_IncrementalMesh(HO, tolerance); + result << "" << endl << output.exportEdges(HO) << "" << endl; } if (!VO.IsNull()) { V0_style.insert({"stroke", "rgb(0, 0, 0)"}); @@ -151,14 +148,12 @@ string ProjectionAlgos::getSVG(ExtractionType type, V0_style.insert({"stroke-linejoin", "miter"}); V0_style.insert({"fill", "none"}); V0_style.insert({"transform", "scale(1,-1)"}); - BRepMesh_IncrementalMesh(VO,tolerance); - result << "" << endl - << output.exportEdges(VO) - << "" << endl; + BRepMesh_IncrementalMesh(VO, tolerance); + result << "" << endl << output.exportEdges(VO) << "" << endl; } if (!V.IsNull()) { V_style.insert({"stroke", "rgb(0, 0, 0)"}); @@ -167,14 +162,12 @@ string ProjectionAlgos::getSVG(ExtractionType type, V_style.insert({"stroke-linejoin", "miter"}); V_style.insert({"fill", "none"}); V_style.insert({"transform", "scale(1,-1)"}); - BRepMesh_IncrementalMesh(V,tolerance); - result << "" << endl - << output.exportEdges(V) - << "" << endl; + BRepMesh_IncrementalMesh(V, tolerance); + result << "" << endl << output.exportEdges(V) << "" << endl; } if (!V1.IsNull() && (type & WithSmooth)) { V1_style.insert({"stroke", "rgb(0, 0, 0)"}); @@ -183,14 +176,12 @@ string ProjectionAlgos::getSVG(ExtractionType type, V1_style.insert({"stroke-linejoin", "miter"}); V1_style.insert({"fill", "none"}); V1_style.insert({"transform", "scale(1,-1)"}); - BRepMesh_IncrementalMesh(V1,tolerance); - result << "" << endl - << output.exportEdges(V1) - << "" << endl; + BRepMesh_IncrementalMesh(V1, tolerance); + result << "" << endl << output.exportEdges(V1) << "" << endl; } if (!H1.IsNull() && (type & WithSmooth) && (type & WithHidden)) { H1_style.insert({"stroke", "rgb(0, 0, 0)"}); @@ -200,14 +191,12 @@ string ProjectionAlgos::getSVG(ExtractionType type, H1_style.insert({"stroke-dasharray", "0.09,0.05)"}); H1_style.insert({"fill", "none"}); H1_style.insert({"transform", "scale(1,-1)"}); - BRepMesh_IncrementalMesh(H1,tolerance); - result << "" << endl - << output.exportEdges(H1) - << "" << endl; + BRepMesh_IncrementalMesh(H1, tolerance); + result << "" << endl << output.exportEdges(H1) << "" << endl; } return result.str(); } @@ -220,34 +209,34 @@ string ProjectionAlgos::getDXF(ExtractionType type, double /*scale*/, double tol DXFOutput output; if (!H.IsNull() && (type & WithHidden)) { - //float width = 0.15f/scale; - BRepMesh_IncrementalMesh(H,tolerance); - result << output.exportEdges(H); + // float width = 0.15f/scale; + BRepMesh_IncrementalMesh(H, tolerance); + result << output.exportEdges(H); } if (!HO.IsNull() && (type & WithHidden)) { - //float width = 0.15f/scale; - BRepMesh_IncrementalMesh(HO,tolerance); - result << output.exportEdges(HO); + // float width = 0.15f/scale; + BRepMesh_IncrementalMesh(HO, tolerance); + result << output.exportEdges(HO); } if (!VO.IsNull()) { - //float width = 0.35f/scale; - BRepMesh_IncrementalMesh(VO,tolerance); - result << output.exportEdges(VO); + // float width = 0.35f/scale; + BRepMesh_IncrementalMesh(VO, tolerance); + result << output.exportEdges(VO); } if (!V.IsNull()) { - //float width = 0.35f/scale; - BRepMesh_IncrementalMesh(V,tolerance); - result << output.exportEdges(V); + // float width = 0.35f/scale; + BRepMesh_IncrementalMesh(V, tolerance); + result << output.exportEdges(V); } if (!V1.IsNull() && (type & WithSmooth)) { - //float width = 0.35f/scale; - BRepMesh_IncrementalMesh(V1,tolerance); - result << output.exportEdges(V1); + // float width = 0.35f/scale; + BRepMesh_IncrementalMesh(V1, tolerance); + result << output.exportEdges(V1); } if (!H1.IsNull() && (type & WithSmooth) && (type & WithHidden)) { - //float width = 0.15f/scale; - BRepMesh_IncrementalMesh(H1,tolerance); - result << output.exportEdges(H1); + // float width = 0.15f/scale; + BRepMesh_IncrementalMesh(H1, tolerance); + result << output.exportEdges(H1); } return result.str(); diff --git a/src/Mod/Drawing/App/ProjectionAlgos.h b/src/Mod/Drawing/App/ProjectionAlgos.h index bd0a6ef106..c3e6aa2a88 100644 --- a/src/Mod/Drawing/App/ProjectionAlgos.h +++ b/src/Mod/Drawing/App/ProjectionAlgos.h @@ -23,8 +23,8 @@ #ifndef _ProjectionAlgos_h_ #define _ProjectionAlgos_h_ -#include #include +#include #include #include @@ -41,44 +41,47 @@ class DrawingExport ProjectionAlgos { public: /// Constructor - ProjectionAlgos(const TopoDS_Shape &Input,const Base::Vector3d &Dir); + ProjectionAlgos(const TopoDS_Shape& Input, const Base::Vector3d& Dir); virtual ~ProjectionAlgos(); void execute(void); - enum ExtractionType { + enum ExtractionType + { Plain = 0, WithHidden = 1, WithSmooth = 2 }; - using XmlAttributes = std::map; + using XmlAttributes = std::map; - std::string getSVG(ExtractionType type, double tolerance=0.05, - XmlAttributes V_style=XmlAttributes(), - XmlAttributes V0_style=XmlAttributes(), - XmlAttributes V1_style=XmlAttributes(), - XmlAttributes H_style=XmlAttributes(), - XmlAttributes H0_style=XmlAttributes(), - XmlAttributes H1_style=XmlAttributes()); - std::string getDXF(ExtractionType type, double scale, double tolerance);//added by Dan Falck 2011/09/25 + std::string getSVG(ExtractionType type, + double tolerance = 0.05, + XmlAttributes V_style = XmlAttributes(), + XmlAttributes V0_style = XmlAttributes(), + XmlAttributes V1_style = XmlAttributes(), + XmlAttributes H_style = XmlAttributes(), + XmlAttributes H0_style = XmlAttributes(), + XmlAttributes H1_style = XmlAttributes()); + std::string + getDXF(ExtractionType type, double scale, double tolerance); // added by Dan Falck 2011/09/25 - const TopoDS_Shape &Input; - const Base::Vector3d &Direction; + const TopoDS_Shape& Input; + const Base::Vector3d& Direction; - TopoDS_Shape V ;// hard edge visibly - TopoDS_Shape V1;// Smoth edges visibly - TopoDS_Shape VN;// contour edges visibly - TopoDS_Shape VO;// contours apparents visibly - TopoDS_Shape VI;// isoparamtriques visibly - TopoDS_Shape H ;// hard edge invisibly - TopoDS_Shape H1;// Smoth edges invisibly - TopoDS_Shape HN;// contour edges invisibly - TopoDS_Shape HO;// contours apparents invisibly - TopoDS_Shape HI;// isoparamtriques invisibly + TopoDS_Shape V; // hard edge visibly + TopoDS_Shape V1; // Smoth edges visibly + TopoDS_Shape VN; // contour edges visibly + TopoDS_Shape VO; // contours apparents visibly + TopoDS_Shape VI; // isoparamtriques visibly + TopoDS_Shape H; // hard edge invisibly + TopoDS_Shape H1; // Smoth edges invisibly + TopoDS_Shape HN; // contour edges invisibly + TopoDS_Shape HO; // contours apparents invisibly + TopoDS_Shape HI; // isoparamtriques invisibly }; -} //namespace Drawing +} // namespace Drawing #endif diff --git a/src/Mod/Drawing/CMakeLists.txt b/src/Mod/Drawing/CMakeLists.txt index b5d8d4cccc..61a537f62a 100644 --- a/src/Mod/Drawing/CMakeLists.txt +++ b/src/Mod/Drawing/CMakeLists.txt @@ -63,7 +63,7 @@ INSTALL( Templates DESTINATION ${CMAKE_INSTALL_DATADIR}/Mod/Drawing - FILES_MATCHING + FILES_MATCHING PATTERN "*.svg*" PATTERN "*.dxf*" ) diff --git a/src/Mod/Drawing/DrawingExample.py b/src/Mod/Drawing/DrawingExample.py index e04e1f4f30..c7e5229a03 100644 --- a/src/Mod/Drawing/DrawingExample.py +++ b/src/Mod/Drawing/DrawingExample.py @@ -1,62 +1,83 @@ # example how to use the scripting API of the drawing module -# +# # first of all you need the Part and the Drawing module: import FreeCAD, Part, Drawing # create a small sample part -Part.show(Part.makeBox(100,100,100).cut(Part.makeCylinder(80,100)).cut(Part.makeBox(90,40,100)).cut(Part.makeBox(20,85,100))) +Part.show( + Part.makeBox(100, 100, 100) + .cut(Part.makeCylinder(80, 100)) + .cut(Part.makeBox(90, 40, 100)) + .cut(Part.makeBox(20, 85, 100)) +) # direct projection. The G0 means hard edge, the G1 is tangend continues. Shape = App.ActiveDocument.Shape.Shape -[visiblyG0,visiblyG1,hiddenG0,hiddenG1] = Drawing.project(Shape) +[visiblyG0, visiblyG1, hiddenG0, hiddenG1] = Drawing.project(Shape) print("visible edges:", len(visiblyG0.Edges)) print("hidden edges:", len(hiddenG0.Edges)) # all was projected on the Z-plane: -print("Bnd Box shape: X=",Shape.BoundBox.XLength," Y=",Shape.BoundBox.YLength," Z=",Shape.BoundBox.ZLength) -print("Bnd Box project: X=",visiblyG0.BoundBox.XLength," Y=",visiblyG0.BoundBox.YLength," Z=",visiblyG0.BoundBox.ZLength) +print( + "Bnd Box shape: X=", + Shape.BoundBox.XLength, + " Y=", + Shape.BoundBox.YLength, + " Z=", + Shape.BoundBox.ZLength, +) +print( + "Bnd Box project: X=", + visiblyG0.BoundBox.XLength, + " Y=", + visiblyG0.BoundBox.YLength, + " Z=", + visiblyG0.BoundBox.ZLength, +) # different projection vector -[visiblyG0,visiblyG1,hiddenG0,hiddenG1] = Drawing.project(Shape,Base.Vector(1,1,1)) +[visiblyG0, visiblyG1, hiddenG0, hiddenG1] = Drawing.project(Shape, Base.Vector(1, 1, 1)) # project to SVG -resultSVG = Drawing.projectToSVG(Shape,App.Vector(1,1,1)) +resultSVG = Drawing.projectToSVG(Shape, App.Vector(1, 1, 1)) print(resultSVG) # And now the parametric way -# +# # insert a Page object and assign a template -App.activeDocument().addObject('Drawing::FeaturePage','Page') -App.activeDocument().Page.Template = App.ConfigGet('AppHomePath')+'Mod/Drawing/Templates/A3_Landscape.svg' +App.activeDocument().addObject("Drawing::FeaturePage", "Page") +App.activeDocument().Page.Template = ( + App.ConfigGet("AppHomePath") + "Mod/Drawing/Templates/A3_Landscape.svg" +) # create a view on the "Shape" object, define the position and scale and assign it to a Page -App.activeDocument().addObject('Drawing::FeatureViewPart','View') +App.activeDocument().addObject("Drawing::FeatureViewPart", "View") App.activeDocument().View.Source = App.activeDocument().Shape -App.activeDocument().View.Direction = (0.0,0.0,1.0) +App.activeDocument().View.Direction = (0.0, 0.0, 1.0) App.activeDocument().View.X = 10.0 App.activeDocument().View.Y = 10.0 App.activeDocument().Page.addObject(App.activeDocument().View) -# create a second view on the same object but the view is +# create a second view on the same object but the view is # rotatet 90 degrees. -App.activeDocument().addObject('Drawing::FeatureViewPart','ViewRot') +App.activeDocument().addObject("Drawing::FeatureViewPart", "ViewRot") App.activeDocument().ViewRot.Source = App.activeDocument().Shape -App.activeDocument().ViewRot.Direction = (0.0,0.0,1.0) +App.activeDocument().ViewRot.Direction = (0.0, 0.0, 1.0) App.activeDocument().ViewRot.X = 290.0 App.activeDocument().ViewRot.Y = 30.0 App.activeDocument().ViewRot.Scale = 1.0 App.activeDocument().ViewRot.Rotation = 90.0 -App.activeDocument().Page.addObject(App.activeDocument().ViewRot) +App.activeDocument().Page.addObject(App.activeDocument().ViewRot) # create a third view on the same object but with an isometric # view direction. Also the hidden lines are activated. -App.activeDocument().addObject('Drawing::FeatureViewPart','ViewIso') +App.activeDocument().addObject("Drawing::FeatureViewPart", "ViewIso") App.activeDocument().ViewIso.Source = App.activeDocument().Shape -App.activeDocument().ViewIso.Direction = (1.0,1.0,1.0) +App.activeDocument().ViewIso.Direction = (1.0, 1.0, 1.0) App.activeDocument().ViewIso.X = 335.0 App.activeDocument().ViewIso.Y = 140.0 App.activeDocument().ViewIso.ShowHiddenLines = True -App.activeDocument().Page.addObject(App.activeDocument().ViewIso) +App.activeDocument().Page.addObject(App.activeDocument().ViewIso) # change something and update. # The update process change the view and the page @@ -71,14 +92,14 @@ ViewSVG = App.activeDocument().View.ViewResult print(ViewSVG) # get the hole result page (its a file in the document temp dir, only read allowed) -print("Resulting SVG document: ",App.activeDocument().Page.PageResult) -file = open(App.activeDocument().Page.PageResult,"r") -print("Result page is ",len(file.readlines())," lines long") +print("Resulting SVG document: ", App.activeDocument().Page.PageResult) +file = open(App.activeDocument().Page.PageResult, "r") +print("Result page is ", len(file.readlines()), " lines long") # important, give free the file! del file # insert a view with your own content: -App.activeDocument().addObject('Drawing::FeatureView','ViewSelf') +App.activeDocument().addObject("Drawing::FeatureView", "ViewSelf") App.activeDocument().ViewSelf.ViewResult = """ fragment from a name and path data""" - - name,scale,thickness = decodeName(name,scale,thickness) + + name, scale, thickness = decodeName(name, scale, thickness) if not (name in Patterns): return None - pname = name + "_" + str(scale).replace(".","") + "_" + str(thickness).replace(".","") + pname = name + "_" + str(scale).replace(".", "") + "_" + str(thickness).replace(".", "") data = Patterns[name] - template=''' - ''' - t = template.replace("$name",pname) - t = t.replace("$scale",str(scale)) - t = t.replace("$thickness",str(thickness)) - t = t.replace("$color",color) - t = t.replace("$path",data) - t = t.replace("\n","") + """ + t = template.replace("$name", pname) + t = t.replace("$scale", str(scale)) + t = t.replace("$thickness", str(thickness)) + t = t.replace("$color", color) + t = t.replace("$path", data) + t = t.replace("\n", "") return t -def buildTextureImage(name,scale=5,thickness=1,color="#000000",size=64): - +def buildTextureImage(name, scale=5, thickness=1, color="#000000", size=64): + """buildTextureImage(name,scale,thickness,color="#000000",size=64) builds a 64x64 SVG image filled with the given texture""" - - name,scale,thickness = decodeName(name,scale,thickness) + + name, scale, thickness = decodeName(name, scale, thickness) if not (name in Patterns): return None s = str(size) - template = '''$pattern''' - pat = buildPattern(name,scale,thickness,color) - t = template.replace("\n","") - t = t.replace("$pattern",pat+"\n") - t = t.replace("$name",name+"_"+str(scale).replace(".","")+"_"+str(thickness).replace(".","")) + template = ( + '''$pattern""" + ) + pat = buildPattern(name, scale, thickness, color) + t = template.replace("\n", "") + t = t.replace("$pattern", pat + "\n") + t = t.replace( + "$name", name + "_" + str(scale).replace(".", "") + "_" + str(thickness).replace(".", "") + ) return t -def buildSwatch(name,scale=5,thickness=1,color="#000000",size=64): - +def buildSwatch(name, scale=5, thickness=1, color="#000000", size=64): + """buildSwatch(name,scale,thickness,color="#000000",size=64) builds a 64x64 SVG image filled with the given texture, a white background and a border, to serve as a sample""" - - name,scale,thickness = decodeName(name,scale,thickness) + + name, scale, thickness = decodeName(name, scale, thickness) if not (name in Patterns): return None s = str(size) - template = '''$pattern''' - pat = buildPattern(name,scale,thickness,color) - t = template.replace("\n","") - t = t.replace("$pattern",pat+"\n") - t = t.replace("$name",name+"_"+str(scale).replace(".","")+"_"+str(thickness).replace(".","")) + template = ( + '''$pattern""" + ) + pat = buildPattern(name, scale, thickness, color) + t = template.replace("\n", "") + t = t.replace("$pattern", pat + "\n") + t = t.replace( + "$name", name + "_" + str(scale).replace(".", "") + "_" + str(thickness).replace(".", "") + ) return t -def buildFileSwatch(name,scale=5,thickness=1,color="#000000",size=64,png=False): +def buildFileSwatch(name, scale=5, thickness=1, color="#000000", size=64, png=False): """buildFileSwatch(name,scale,thickness,color="#000000",size=64,png=False) builds a 64x64 SVG image filled with the given texture, a white background and a border, to serve as a sample. The image is saved as a temp file, the filepath is returned""" - s = buildSwatch(name,scale,thickness,color,size) + s = buildSwatch(name, scale, thickness, color, size) if s: import tempfile + tf = tempfile.mkstemp(suffix=".svg")[1] - f = open(tf,"wb") + f = open(tf, "wb") f.write(s) f.close() if png: # we use imagemagick's convert because Qt4 doesn't support SVG patterns... import os + if os.system("convert -version") == 0: - ptf = os.path.splitext(tf)[0]+".png" - os.system('convert "'+tf+'" "'+ptf+'"') + ptf = os.path.splitext(tf)[0] + ".png" + os.system('convert "' + tf + '" "' + ptf + '"') return ptf else: return tf return None -def saveTestImage(filename,scales=[2.5,5],thicknesses=[0.1,0.2,1]): - +def saveTestImage(filename, scales=[2.5, 5], thicknesses=[0.1, 0.2, 1]): + """saveTestImage(filename,scales=[2.5,5],thicknesses=[0.1,0.2,1]) builds a test SVG file showing all available patterns at given scales and thicknesses""" - + maxcols = 6 row = 0 col = 0 - pats = '\n' - cont = '\n' - template = '''$patterns$content''' + pats = "\n" + cont = "\n" + template = """$patterns$content""" for name in Patterns.keys(): for thickness in thicknesses: for scale in scales: - pats += buildPattern(name,scale,thickness) - pats += '\n' - subtemplate='''''' - st = subtemplate.replace("$xpos",str(64*col + 8*col + 8)) - st = st.replace("$ypos",str(64*row + 8*row + 8)) - st = st.replace("$pattern",name+"_"+str(scale)+"_"+str(thickness)) - st = st.replace("\n","") + pats += buildPattern(name, scale, thickness) + pats += "\n" + subtemplate = """""" + st = subtemplate.replace("$xpos", str(64 * col + 8 * col + 8)) + st = st.replace("$ypos", str(64 * row + 8 * row + 8)) + st = st.replace("$pattern", name + "_" + str(scale) + "_" + str(thickness)) + st = st.replace("\n", "") cont += st - cont += '\n' - if col == maxcols-1: + cont += "\n" + if col == maxcols - 1: col = 0 row += 1 else: col += 1 - t = template.replace("\n","") - t = t.replace("$patterns",pats) - t = t.replace("$content",cont) - t = t.replace("$width",str(8+maxcols*72)) - t = t.replace("$height",str(80+row*72)) - f = open(filename,"wb") + t = template.replace("\n", "") + t = t.replace("$patterns", pats) + t = t.replace("$content", cont) + t = t.replace("$width", str(8 + maxcols * 72)) + t = t.replace("$height", str(80 + row * 72)) + f = open(filename, "wb") f.write(t) f.close() - - -def decodeName(name,scale,thickness): - + + +def decodeName(name, scale, thickness): + """decodeName(name,scale,thickness) : decodes names written in the form 'name_5_1'""" - + name = name.split("_") if len(name) > 1: try: @@ -279,11 +310,11 @@ def decodeName(name,scale,thickness): thickness = float(name[2]) except Exception: pass - return name[0],scale,thickness + return name[0], scale, thickness def getPatternNames(): - + """getPatternNames : returns available pattern names""" - + return Patterns.keys() diff --git a/src/Mod/Drawing/DrawingTests.py b/src/Mod/Drawing/DrawingTests.py index 458a8bcd17..261d20e965 100644 --- a/src/Mod/Drawing/DrawingTests.py +++ b/src/Mod/Drawing/DrawingTests.py @@ -1,35 +1,38 @@ import Part, Drawing + Part.open("D:/_Projekte/FreeCAD/FreeCADData/Schenkel.stp") -App.activeDocument().addObject('Drawing::FeaturePage','Page') -App.activeDocument().Page.Template = 'D:/_Projekte/FreeCAD/FreeCAD_0.9_LibPack7/Mod/Drawing/Templates/A3_Landscape.svg' -App.activeDocument().addObject('Drawing::FeatureViewPart','View') +App.activeDocument().addObject("Drawing::FeaturePage", "Page") +App.activeDocument().Page.Template = ( + "D:/_Projekte/FreeCAD/FreeCAD_0.9_LibPack7/Mod/Drawing/Templates/A3_Landscape.svg" +) +App.activeDocument().addObject("Drawing::FeatureViewPart", "View") App.activeDocument().View.Source = App.activeDocument().Schenkel -App.activeDocument().View.Direction = (0.0,1.0,0.0) +App.activeDocument().View.Direction = (0.0, 1.0, 0.0) App.activeDocument().View.X = 30.0 App.activeDocument().View.Y = 30.0 App.activeDocument().View.Scale = 1.0 App.activeDocument().Page.addObject(App.activeDocument().View) -App.activeDocument().addObject('Drawing::FeatureViewPart','View1') +App.activeDocument().addObject("Drawing::FeatureViewPart", "View1") App.activeDocument().View1.Source = App.activeDocument().Schenkel -App.activeDocument().View1.Direction = (0.0,0.0,1.0) +App.activeDocument().View1.Direction = (0.0, 0.0, 1.0) App.activeDocument().View1.X = 70.0 App.activeDocument().View1.Y = 30.0 App.activeDocument().View1.Scale = 1.0 App.activeDocument().Page.addObject(App.activeDocument().View1) -App.activeDocument().addObject('Drawing::FeatureViewPart','View2') +App.activeDocument().addObject("Drawing::FeatureViewPart", "View2") App.activeDocument().View2.Source = App.activeDocument().Schenkel -App.activeDocument().View2.Direction = (1.0,0.0,0.0) +App.activeDocument().View2.Direction = (1.0, 0.0, 0.0) App.activeDocument().View2.X = 70.0 App.activeDocument().View2.Y = 200.0 App.activeDocument().View2.Rotation = 90.0 App.activeDocument().View2.Scale = 1.0 App.activeDocument().Page.addObject(App.activeDocument().View2) -App.activeDocument().addObject('Drawing::FeatureViewPart','View3') +App.activeDocument().addObject("Drawing::FeatureViewPart", "View3") App.activeDocument().View3.Source = App.activeDocument().Schenkel -App.activeDocument().View3.Direction = (1.0,1.0,1.0) +App.activeDocument().View3.Direction = (1.0, 1.0, 1.0) App.activeDocument().View3.X = 280.0 App.activeDocument().View3.Y = 90.0 App.activeDocument().View3.Scale = 1.0 diff --git a/src/Mod/Drawing/Gui/AppDrawingGui.cpp b/src/Mod/Drawing/Gui/AppDrawingGui.cpp index db634f5d26..ce4f17fe8f 100644 --- a/src/Mod/Drawing/Gui/AppDrawingGui.cpp +++ b/src/Mod/Drawing/Gui/AppDrawingGui.cpp @@ -27,9 +27,9 @@ #include #include -#include "Workbench.h" #include "ViewProviderPage.h" #include "ViewProviderView.h" +#include "Workbench.h" // use a different name to CreateCommand() @@ -43,7 +43,8 @@ void loadDrawingResource() Gui::Translator::instance()->refresh(); } -namespace DrawingGui { +namespace DrawingGui +{ extern PyObject* initModule(); } diff --git a/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp b/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp index e8bee5f466..894c08140c 100644 --- a/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp +++ b/src/Mod/Drawing/Gui/AppDrawingGuiPy.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include +#include #endif #include @@ -42,41 +42,42 @@ #include "DrawingView.h" -namespace DrawingGui { -class Module : public Py::ExtensionModule +namespace DrawingGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("DrawingGui") + Module() + : Py::ExtensionModule("DrawingGui") { - add_varargs_method("open",&Module::open - ); - add_varargs_method("insert",&Module::importer - ); - add_varargs_method("export",&Module::exporter - ); - initialize("This module is the DrawingGui module."); // register with Python + add_varargs_method("open", &Module::open); + add_varargs_method("insert", &Module::importer); + add_varargs_method("export", &Module::exporter); + initialize("This module is the DrawingGui module."); // register with Python } - virtual ~Module() {} + virtual ~Module() + {} private: - virtual Py::Object invoke_method_varargs(void *method_def, const Py::Tuple &args) + virtual Py::Object invoke_method_varargs(void* method_def, const Py::Tuple& args) { try { return Py::ExtensionModule::invoke_method_varargs(method_def, args); } - catch (const Base::Exception &e) { + catch (const Base::Exception& e) { throw Py::RuntimeError(e.what()); } - catch (const std::exception &e) { + catch (const std::exception& e) { throw Py::RuntimeError(e.what()); } } Py::Object open(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -90,7 +91,7 @@ private: view->setWindowIcon(Gui::BitmapFactory().pixmap("actions/drawing-landscape")); QFileInfo fi(fileName); view->setWindowTitle(fi.fileName()); - view->resize( 400, 300 ); + view->resize(400, 300); Gui::getMainWindow()->addWindow(view); } else { @@ -103,8 +104,9 @@ private: { char* Name; const char* dummy; - if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&dummy)) + if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &dummy)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -118,9 +120,10 @@ private: view->setWindowIcon(Gui::BitmapFactory().pixmap("actions/drawing-landscape")); QFileInfo fi(fileName); view->setWindowTitle(fi.fileName()); - view->resize( 400, 300 ); + view->resize(400, 300); Gui::getMainWindow()->addWindow(view); - } else { + } + else { throw Py::Exception(PyExc_IOError, "unknown filetype"); } @@ -130,8 +133,9 @@ private: { PyObject* object; char* Name; - if (!PyArg_ParseTuple(args.ptr(), "Oet",&object,"utf-8",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "Oet", &object, "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -140,7 +144,8 @@ private: for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* item = (*it).ptr(); if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) { - App::DocumentObject* obj = static_cast(item)->getDocumentObjectPtr(); + App::DocumentObject* obj = + static_cast(item)->getDocumentObjectPtr(); if (obj->getTypeId().isDerivedFrom(Drawing::FeaturePage::getClassTypeId())) { Base::FileInfo fi_out(EncodedName.c_str()); Base::ofstream str_out(fi_out, std::ios::out | std::ios::binary); @@ -150,7 +155,8 @@ private: throw Py::Exception(PyExc_IOError, str.str().c_str()); } if (fi_out.hasExtension("svg")) { - std::string fn = static_cast(obj)->PageResult.getValue(); + std::string fn = + static_cast(obj)->PageResult.getValue(); Base::FileInfo fi_in(fn); Base::ifstream str_in(fi_in, std::ios::in | std::ios::binary); if (!str_in) { @@ -165,31 +171,45 @@ private: break; } else if (fi_out.hasExtension("dxf")) { - const std::vector& views = static_cast(obj)->Group.getValues(); - for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { - if ((*it)->getTypeId().isDerivedFrom(Drawing::FeatureViewPart::getClassTypeId())) { - Drawing::FeatureViewPart* view = static_cast(*it); + const std::vector& views = + static_cast(obj)->Group.getValues(); + for (std::vector::const_iterator it = views.begin(); + it != views.end(); + ++it) { + if ((*it)->getTypeId().isDerivedFrom( + Drawing::FeatureViewPart::getClassTypeId())) { + Drawing::FeatureViewPart* view = + static_cast(*it); App::DocumentObject* link = view->Source.getValue(); if (!link) { throw Py::ValueError("No object linked"); } - if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { + if (!link->getTypeId().isDerivedFrom( + Part::Feature::getClassTypeId())) { throw Py::TypeError("Linked object is not a Part object"); } - TopoDS_Shape shape = static_cast(link)->Shape.getShape().getShape(); + TopoDS_Shape shape = + static_cast(link)->Shape.getShape().getShape(); if (!shape.IsNull()) { Base::Vector3d dir = view->Direction.getValue(); bool hidden = view->ShowHiddenLines.getValue(); bool smooth = view->ShowSmoothLines.getValue(); - Drawing::ProjectionAlgos::ExtractionType type = Drawing::ProjectionAlgos::Plain; - if (hidden) type = (Drawing::ProjectionAlgos::ExtractionType)(type|Drawing::ProjectionAlgos::WithHidden); - if (smooth) type = (Drawing::ProjectionAlgos::ExtractionType)(type|Drawing::ProjectionAlgos::WithSmooth); + Drawing::ProjectionAlgos::ExtractionType type = + Drawing::ProjectionAlgos::Plain; + if (hidden) { + type = (Drawing::ProjectionAlgos::ExtractionType)( + type | Drawing::ProjectionAlgos::WithHidden); + } + if (smooth) { + type = (Drawing::ProjectionAlgos::ExtractionType)( + type | Drawing::ProjectionAlgos::WithSmooth); + } float scale = view->Scale.getValue(); float tol = view->Tolerance.getValue(); Drawing::ProjectionAlgos project(shape, dir); str_out << project.getDXF(type, scale, tol); - break; // TODO: How to add several shapes? + break; // TODO: How to add several shapes? } } } @@ -197,11 +217,13 @@ private: break; } else { - throw Py::TypeError("Export of page object as this file format is not supported by Drawing module"); + throw Py::TypeError("Export of page object as this file format is not " + "supported by Drawing module"); } } else { - throw Py::TypeError("Export of this object type is not supported by Drawing module"); + throw Py::TypeError( + "Export of this object type is not supported by Drawing module"); } } } @@ -215,4 +237,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace DrawingGui +} // namespace DrawingGui diff --git a/src/Mod/Drawing/Gui/Command.cpp b/src/Mod/Drawing/Gui/Command.cpp index e4dec8a8bc..001fcbeb9f 100644 --- a/src/Mod/Drawing/Gui/Command.cpp +++ b/src/Mod/Drawing/Gui/Command.cpp @@ -11,15 +11,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #include @@ -52,25 +52,27 @@ using namespace std; DEF_STD_CMD(CmdDrawingOpen) CmdDrawingOpen::CmdDrawingOpen() - : Command("Drawing_Open") + : Command("Drawing_Open") { - sAppModule = "Drawing"; - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("Open SVG..."); - sToolTipText = QT_TR_NOOP("Open a scalable vector graphic"); - sWhatsThis = "Drawing_Open"; - sStatusTip = sToolTipText; - sPixmap = "actions/document-new"; + sAppModule = "Drawing"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("Open SVG..."); + sToolTipText = QT_TR_NOOP("Open a scalable vector graphic"); + sWhatsThis = "Drawing_Open"; + sStatusTip = sToolTipText; + sPixmap = "actions/document-new"; } void CmdDrawingOpen::activated(int iMsg) { Q_UNUSED(iMsg); // Reading an image - QString filename = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), QObject::tr("Choose an SVG file to open"), QString(), + QString filename = Gui::FileDialog::getOpenFileName( + Gui::getMainWindow(), + QObject::tr("Choose an SVG file to open"), + QString(), QString::fromLatin1("%1 (*.svg *.svgz)").arg(QObject::tr("Scalable Vector Graphic"))); - if (!filename.isEmpty()) - { + if (!filename.isEmpty()) { filename = Base::Tools::escapeEncodeFilename(filename); // load the file with the module Command::doCommand(Command::Gui, "import Drawing, DrawingGui"); @@ -85,14 +87,14 @@ void CmdDrawingOpen::activated(int iMsg) DEF_STD_CMD_ACL(CmdDrawingNewPage) CmdDrawingNewPage::CmdDrawingNewPage() - : Command("Drawing_NewPage") + : Command("Drawing_NewPage") { - sAppModule = "Drawing"; - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("Insert new drawing"); - sToolTipText = QT_TR_NOOP("Insert new drawing"); - sWhatsThis = "Drawing_NewPage"; - sStatusTip = sToolTipText; + sAppModule = "Drawing"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("Insert new drawing"); + sToolTipText = QT_TR_NOOP("Insert new drawing"); + sWhatsThis = "Drawing_NewPage"; + sStatusTip = sToolTipText; } void CmdDrawingNewPage::activated(int iMsg) @@ -101,26 +103,31 @@ void CmdDrawingNewPage::activated(int iMsg) QAction* a = qAsConst(pcAction)->actions()[iMsg]; std::string FeatName = getUniqueObjectName( - QCoreApplication::translate("Drawing_NewPage", "Page").toStdString().c_str()); + QCoreApplication::translate("Drawing_NewPage", "Page").toStdString().c_str()); QFileInfo tfi(a->property("Template").toString()); if (tfi.isReadable()) { QString filename = Base::Tools::escapeEncodeFilename(tfi.filePath()); openCommand("Create page"); - doCommand(Doc,"App.activeDocument().addObject('Drawing::FeaturePage','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Template = '%s'",FeatName.c_str(), (const char*)filename.toUtf8()); - doCommand(Doc,"App.activeDocument().recompute()"); - doCommand(Doc,"Gui.activeDocument().getObject('%s').show()",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject('Drawing::FeaturePage','%s')", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.Template = '%s'", + FeatName.c_str(), + (const char*)filename.toUtf8()); + doCommand(Doc, "App.activeDocument().recompute()"); + doCommand(Doc, "Gui.activeDocument().getObject('%s').show()", FeatName.c_str()); commitCommand(); } else { QMessageBox::critical(Gui::getMainWindow(), - QLatin1String("No template"), - QLatin1String("No template available for this page size")); + QLatin1String("No template"), + QLatin1String("No template available for this page size")); } } -Gui::Action * CmdDrawingNewPage::createAction(void) +Gui::Action* CmdDrawingNewPage::createAction(void) { Gui::ActionGroup* pcAction = new Gui::ActionGroup(this, Gui::getMainWindow()); pcAction->setDropDownMenu(true); @@ -135,7 +142,7 @@ Gui::Action * CmdDrawingNewPage::createAction(void) std::string path = App::Application::getResourceDir(); path += "Mod/Drawing/Templates/"; QDir dir(QString::fromUtf8(path.c_str()), QString::fromLatin1("*.svg")); - for (unsigned int i=0; i -1) { QString paper = rx.cap(1); @@ -162,11 +169,13 @@ Gui::Action * CmdDrawingNewPage::createAction(void) lastPaper = paper; lastId = id; - QFile file(QString::fromLatin1(":/icons/actions/drawing-%1-%2%3.svg").arg(orientation.toLower(), paper).arg(id)); + QFile file(QString::fromLatin1(":/icons/actions/drawing-%1-%2%3.svg") + .arg(orientation.toLower(), paper) + .arg(id)); QAction* a = pcAction->addAction(QString()); if (file.open(QFile::ReadOnly)) { QByteArray data = file.readAll(); - a->setIcon(Gui::BitmapFactory().pixmapFromSvg(data, QSize(64,64))); + a->setIcon(Gui::BitmapFactory().pixmapFromSvg(data, QSize(64, 64))); } a->setProperty("TemplatePaper", paper); @@ -204,57 +213,51 @@ void CmdDrawingNewPage::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); for (QList::iterator it = a.begin(); it != a.end(); ++it) { - if ((*it)->isSeparator()) + if ((*it)->isSeparator()) { continue; + } QString paper = (*it)->property("TemplatePaper").toString(); int id = (*it)->property("TemplateId").toInt(); QString orientation = (*it)->property("TemplateOrientation").toString(); - if (orientation.compare(QLatin1String("landscape"), Qt::CaseInsensitive) == 0) + if (orientation.compare(QLatin1String("landscape"), Qt::CaseInsensitive) == 0) { orientation = QCoreApplication::translate("Drawing_NewPage", "Landscape"); - else if (orientation.compare(QLatin1String("portrait"), Qt::CaseInsensitive) == 0) + } + else if (orientation.compare(QLatin1String("portrait"), Qt::CaseInsensitive) == 0) { orientation = QCoreApplication::translate("Drawing_NewPage", "Portrait"); + } QString info = (*it)->property("TemplateInfo").toString(); if (info.isEmpty()) { - (*it)->setText(QCoreApplication::translate( - "Drawing_NewPage", "%1%2 %3") - .arg(paper, - QString::number(id), - orientation)); - (*it)->setToolTip(QCoreApplication::translate( - "Drawing_NewPage", "Insert new %1%2 %3 drawing") - .arg(paper, - QString::number(id), - orientation)); + (*it)->setText(QCoreApplication::translate("Drawing_NewPage", "%1%2 %3") + .arg(paper, QString::number(id), orientation)); + (*it)->setToolTip( + QCoreApplication::translate("Drawing_NewPage", "Insert new %1%2 %3 drawing") + .arg(paper, QString::number(id), orientation)); } else { - (*it)->setText(QCoreApplication::translate( - "Drawing_NewPage", "%1%2 %3 (%4)") - .arg(paper, - QString::number(id), - orientation, - info)); - (*it)->setToolTip(QCoreApplication::translate( - "Drawing_NewPage", "Insert new %1%2 %3 (%4) drawing") - .arg(paper, - QString::number(id), - orientation, - info)); + (*it)->setText(QCoreApplication::translate("Drawing_NewPage", "%1%2 %3 (%4)") + .arg(paper, QString::number(id), orientation, info)); + (*it)->setToolTip( + QCoreApplication::translate("Drawing_NewPage", "Insert new %1%2 %3 (%4) drawing") + .arg(paper, QString::number(id), orientation, info)); } } } bool CmdDrawingNewPage::isActive(void) { - if (getActiveGuiDocument()) + if (getActiveGuiDocument()) { return true; - else + } + else { return false; + } } //=========================================================================== @@ -264,15 +267,15 @@ bool CmdDrawingNewPage::isActive(void) DEF_STD_CMD_A(CmdDrawingNewA3Landscape) CmdDrawingNewA3Landscape::CmdDrawingNewA3Landscape() - : Command("Drawing_NewA3Landscape") + : Command("Drawing_NewA3Landscape") { - sAppModule = "Drawing"; - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("Insert new A3 landscape drawing"); - sToolTipText = QT_TR_NOOP("Insert new A3 landscape drawing"); - sWhatsThis = "Drawing_NewA3Landscape"; - sStatusTip = sToolTipText; - sPixmap = "actions/drawing-landscape-A3"; + sAppModule = "Drawing"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("Insert new A3 landscape drawing"); + sToolTipText = QT_TR_NOOP("Insert new A3 landscape drawing"); + sWhatsThis = "Drawing_NewA3Landscape"; + sStatusTip = sToolTipText; + sPixmap = "actions/drawing-landscape-A3"; } void CmdDrawingNewA3Landscape::activated(int iMsg) @@ -281,18 +284,20 @@ void CmdDrawingNewA3Landscape::activated(int iMsg) std::string FeatName = getUniqueObjectName("Page"); openCommand("Create page"); - doCommand(Doc,"App.activeDocument().addObject('Drawing::FeaturePage','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Template = 'A3_Landscape.svg'",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().recompute()"); + doCommand(Doc, "App.activeDocument().addObject('Drawing::FeaturePage','%s')", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Template = 'A3_Landscape.svg'", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().recompute()"); commitCommand(); } bool CmdDrawingNewA3Landscape::isActive(void) { - if (getActiveGuiDocument()) + if (getActiveGuiDocument()) { return true; - else + } + else { return false; + } } @@ -303,45 +308,51 @@ bool CmdDrawingNewA3Landscape::isActive(void) DEF_STD_CMD(CmdDrawingNewView) CmdDrawingNewView::CmdDrawingNewView() - : Command("Drawing_NewView") + : Command("Drawing_NewView") { - sAppModule = "Drawing"; - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("Insert view in drawing"); - sToolTipText = QT_TR_NOOP("Insert a new View of a Part in the active drawing"); - sWhatsThis = "Drawing_NewView"; - sStatusTip = sToolTipText; - sPixmap = "actions/drawing-view"; + sAppModule = "Drawing"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("Insert view in drawing"); + sToolTipText = QT_TR_NOOP("Insert a new View of a Part in the active drawing"); + sWhatsThis = "Drawing_NewView"; + sStatusTip = sToolTipText; + sPixmap = "actions/drawing-view"; } void CmdDrawingNewView::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId()); + std::vector shapes = + getSelection().getObjectsOfType(Part::Feature::getClassTypeId()); if (shapes.empty()) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select a Part object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select a Part object.")); return; } - - std::vector pages = getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); + + std::vector pages = + getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (pages.empty()) { pages = this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); - if (pages.empty()){ - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page found"), - QObject::tr("Create a page first.")); + if (pages.empty()) { + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("No page found"), + QObject::tr("Create a page first.")); return; } } - const std::vector selectedProjections = getSelection().getObjectsOfType(Drawing::FeatureView::getClassTypeId()); + const std::vector selectedProjections = + getSelection().getObjectsOfType(Drawing::FeatureView::getClassTypeId()); float newX = 10.0; float newY = 10.0; float newScale = 1.0; float newRotation = 0.0; Base::Vector3d newDirection(0.0, 0.0, 1.0); if (!selectedProjections.empty()) { - const Drawing::FeatureView* const myView = static_cast(selectedProjections.front()); + const Drawing::FeatureView* const myView = + static_cast(selectedProjections.front()); newX = myView->X.getValue(); newY = myView->Y.getValue(); @@ -351,7 +362,8 @@ void CmdDrawingNewView::activated(int iMsg) // The "Direction" property does not belong to Drawing::FeatureView, but to one of the // many child classes that are projecting objects into the drawing. Therefore, we get the // property by name. - const App::PropertyVector* const propDirection = dynamic_cast(myView->getPropertyByName("Direction")); + const App::PropertyVector* const propDirection = + dynamic_cast(myView->getPropertyByName("Direction")); if (propDirection) { newDirection = propDirection->getValue(); } @@ -360,16 +372,30 @@ void CmdDrawingNewView::activated(int iMsg) std::string PageName = pages.front()->getNameInDocument(); openCommand("Create view"); - for (std::vector::iterator it = shapes.begin(); it != shapes.end(); ++it) { + for (std::vector::iterator it = shapes.begin(); it != shapes.end(); + ++it) { std::string FeatName = getUniqueObjectName("View"); - doCommand(Doc,"App.activeDocument().addObject('Drawing::FeatureViewPart','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Source = App.activeDocument().%s",FeatName.c_str(),(*it)->getNameInDocument()); - doCommand(Doc,"App.activeDocument().%s.Direction = (%e,%e,%e)",FeatName.c_str(), newDirection.x, newDirection.y, newDirection.z); - doCommand(Doc,"App.activeDocument().%s.X = %e",FeatName.c_str(), newX); - doCommand(Doc,"App.activeDocument().%s.Y = %e",FeatName.c_str(), newY); - doCommand(Doc,"App.activeDocument().%s.Scale = %e",FeatName.c_str(), newScale); - doCommand(Doc,"App.activeDocument().%s.Rotation = %e",FeatName.c_str(), newRotation); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject('Drawing::FeatureViewPart','%s')", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.Source = App.activeDocument().%s", + FeatName.c_str(), + (*it)->getNameInDocument()); + doCommand(Doc, + "App.activeDocument().%s.Direction = (%e,%e,%e)", + FeatName.c_str(), + newDirection.x, + newDirection.y, + newDirection.z); + doCommand(Doc, "App.activeDocument().%s.X = %e", FeatName.c_str(), newX); + doCommand(Doc, "App.activeDocument().%s.Y = %e", FeatName.c_str(), newY); + doCommand(Doc, "App.activeDocument().%s.Scale = %e", FeatName.c_str(), newScale); + doCommand(Doc, "App.activeDocument().%s.Rotation = %e", FeatName.c_str(), newRotation); + doCommand(Doc, + "App.activeDocument().%s.addObject(App.activeDocument().%s)", + PageName.c_str(), + FeatName.c_str()); } updateActive(); commitCommand(); @@ -382,33 +408,37 @@ void CmdDrawingNewView::activated(int iMsg) DEF_STD_CMD_A(CmdDrawingOrthoViews) CmdDrawingOrthoViews::CmdDrawingOrthoViews() - : Command("Drawing_OrthoViews") + : Command("Drawing_OrthoViews") { - sAppModule = "Drawing"; - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("Insert orthographic views"); - sToolTipText = QT_TR_NOOP("Insert an orthographic projection of a part in the active drawing"); - sWhatsThis = "Drawing_OrthoView"; - sStatusTip = sToolTipText; - sPixmap = "actions/drawing-orthoviews"; + sAppModule = "Drawing"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("Insert orthographic views"); + sToolTipText = QT_TR_NOOP("Insert an orthographic projection of a part in the active drawing"); + sWhatsThis = "Drawing_OrthoView"; + sStatusTip = sToolTipText; + sPixmap = "actions/drawing-orthoviews"; } void CmdDrawingOrthoViews::activated(int iMsg) { Q_UNUSED(iMsg); - const std::vector shapes = getSelection().getObjectsOfType(Part::Feature::getClassTypeId()); + const std::vector shapes = + getSelection().getObjectsOfType(Part::Feature::getClassTypeId()); if (shapes.size() != 1) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select exactly one Part object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select exactly one Part object.")); return; } // Check that a page object exists. TaskDlgOrthoViews will then check for a selected page object // and use that, otherwise it will use the first page in the document. - const std::vector pages = this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); + const std::vector pages = + this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (pages.empty()) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page found"), - QObject::tr("Create a page first.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("No page found"), + QObject::tr("Create a page first.")); return; } @@ -419,8 +449,9 @@ void CmdDrawingOrthoViews::activated(int iMsg) bool CmdDrawingOrthoViews::isActive(void) { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; + } return true; } @@ -432,15 +463,15 @@ bool CmdDrawingOrthoViews::isActive(void) DEF_STD_CMD_A(CmdDrawingOpenBrowserView) CmdDrawingOpenBrowserView::CmdDrawingOpenBrowserView() - : Command("Drawing_OpenBrowserView") + : Command("Drawing_OpenBrowserView") { // setting the - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("Open &browser view"); - sToolTipText = QT_TR_NOOP("Opens the selected page in a browser view"); - sWhatsThis = "Drawing_OpenBrowserView"; - sStatusTip = QT_TR_NOOP("Opens the selected page in a browser view"); - sPixmap = "actions/drawing-openbrowser"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("Open &browser view"); + sToolTipText = QT_TR_NOOP("Opens the selected page in a browser view"); + sWhatsThis = "Drawing_OpenBrowserView"; + sStatusTip = QT_TR_NOOP("Opens the selected page in a browser view"); + sPixmap = "actions/drawing-openbrowser"; } void CmdDrawingOpenBrowserView::activated(int iMsg) @@ -448,14 +479,15 @@ void CmdDrawingOpenBrowserView::activated(int iMsg) Q_UNUSED(iMsg); unsigned int n = getSelection().countObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (n != 1) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Page object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Page object.")); return; } std::vector Sel = getSelection().getSelection(); - doCommand(Doc,"PageName = App.activeDocument().%s.PageResult",Sel[0].FeatName); - doCommand(Doc,"import WebGui"); - doCommand(Doc,"WebGui.openBrowser(PageName)"); + doCommand(Doc, "PageName = App.activeDocument().%s.PageResult", Sel[0].FeatName); + doCommand(Doc, "import WebGui"); + doCommand(Doc, "WebGui.openBrowser(PageName)"); } bool CmdDrawingOpenBrowserView::isActive(void) @@ -470,37 +502,44 @@ bool CmdDrawingOpenBrowserView::isActive(void) DEF_STD_CMD_A(CmdDrawingAnnotation) CmdDrawingAnnotation::CmdDrawingAnnotation() - : Command("Drawing_Annotation") + : Command("Drawing_Annotation") { // setting the - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("&Annotation"); - sToolTipText = QT_TR_NOOP("Inserts an Annotation view in the active drawing"); - sWhatsThis = "Drawing_Annotation"; - sStatusTip = QT_TR_NOOP("Inserts an Annotation view in the active drawing"); - sPixmap = "actions/drawing-annotation"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("&Annotation"); + sToolTipText = QT_TR_NOOP("Inserts an Annotation view in the active drawing"); + sWhatsThis = "Drawing_Annotation"; + sStatusTip = QT_TR_NOOP("Inserts an Annotation view in the active drawing"); + sPixmap = "actions/drawing-annotation"; } void CmdDrawingAnnotation::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector pages = getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); + std::vector pages = + getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (pages.empty()) { pages = this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); - if (pages.empty()){ - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page found"), - QObject::tr("Create a page first.")); + if (pages.empty()) { + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("No page found"), + QObject::tr("Create a page first.")); return; } } std::string PageName = pages.front()->getNameInDocument(); std::string FeatName = getUniqueObjectName("Annotation"); openCommand("Create Annotation"); - doCommand(Doc,"App.activeDocument().addObject('Drawing::FeatureViewAnnotation','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.X = 10.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Y = 10.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Scale = 7.0",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject('Drawing::FeatureViewAnnotation','%s')", + FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.X = 10.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Y = 10.0", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Scale = 7.0", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.addObject(App.activeDocument().%s)", + PageName.c_str(), + FeatName.c_str()); updateActive(); commitCommand(); } @@ -518,34 +557,39 @@ bool CmdDrawingAnnotation::isActive(void) DEF_STD_CMD_A(CmdDrawingClip) CmdDrawingClip::CmdDrawingClip() - : Command("Drawing_Clip") + : Command("Drawing_Clip") { // setting the - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("&Clip"); - sToolTipText = QT_TR_NOOP("Inserts a clip group in the active drawing"); - sWhatsThis = "Drawing_Annotation"; - sStatusTip = QT_TR_NOOP("Inserts a clip group in the active drawing"); - sPixmap = "actions/drawing-clip"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("&Clip"); + sToolTipText = QT_TR_NOOP("Inserts a clip group in the active drawing"); + sWhatsThis = "Drawing_Annotation"; + sStatusTip = QT_TR_NOOP("Inserts a clip group in the active drawing"); + sPixmap = "actions/drawing-clip"; } void CmdDrawingClip::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector pages = getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); + std::vector pages = + getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (pages.empty()) { pages = this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); - if (pages.empty()){ - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page found"), - QObject::tr("Create a page first.")); + if (pages.empty()) { + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("No page found"), + QObject::tr("Create a page first.")); return; } } std::string PageName = pages.front()->getNameInDocument(); std::string FeatName = getUniqueObjectName("Clip"); openCommand("Create Clip"); - doCommand(Doc,"App.activeDocument().addObject('Drawing::FeatureClip','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject('Drawing::FeatureClip','%s')", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.addObject(App.activeDocument().%s)", + PageName.c_str(), + FeatName.c_str()); updateActive(); commitCommand(); } @@ -563,45 +607,56 @@ bool CmdDrawingClip::isActive(void) DEF_STD_CMD_A(CmdDrawingSymbol) CmdDrawingSymbol::CmdDrawingSymbol() - : Command("Drawing_Symbol") + : Command("Drawing_Symbol") { // setting the - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("&Symbol"); - sToolTipText = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing"); - sWhatsThis = "Drawing_Symbol"; - sStatusTip = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing"); - sPixmap = "actions/drawing-symbol"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("&Symbol"); + sToolTipText = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing"); + sWhatsThis = "Drawing_Symbol"; + sStatusTip = QT_TR_NOOP("Inserts a symbol from a svg file in the active drawing"); + sPixmap = "actions/drawing-symbol"; } void CmdDrawingSymbol::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector pages = getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); + std::vector pages = + getSelection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (pages.empty()) { pages = this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); - if (pages.empty()){ - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page found"), - QObject::tr("Create a page first.")); + if (pages.empty()) { + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("No page found"), + QObject::tr("Create a page first.")); return; } } // Reading an image - QString filename = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), QObject::tr("Choose an SVG file to open"), QString(), + QString filename = Gui::FileDialog::getOpenFileName( + Gui::getMainWindow(), + QObject::tr("Choose an SVG file to open"), + QString(), QString::fromLatin1("%1 (*.svg *.svgz)").arg(QObject::tr("Scalable Vector Graphic"))); - if (!filename.isEmpty()) - { + if (!filename.isEmpty()) { std::string PageName = pages.front()->getNameInDocument(); std::string FeatName = getUniqueObjectName("Symbol"); filename = Base::Tools::escapeEncodeFilename(filename); openCommand("Create Symbol"); - doCommand(Doc,"import Drawing"); - doCommand(Doc,"f = open(\"%s\",'r')",(const char*)filename.toUtf8()); - doCommand(Doc,"svg = f.read()"); - doCommand(Doc,"f.close()"); - doCommand(Doc,"App.activeDocument().addObject('Drawing::FeatureViewSymbol','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Symbol = Drawing.removeSvgTags(svg)",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str()); + doCommand(Doc, "import Drawing"); + doCommand(Doc, "f = open(\"%s\",'r')", (const char*)filename.toUtf8()); + doCommand(Doc, "svg = f.read()"); + doCommand(Doc, "f.close()"); + doCommand(Doc, + "App.activeDocument().addObject('Drawing::FeatureViewSymbol','%s')", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.Symbol = Drawing.removeSvgTags(svg)", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.addObject(App.activeDocument().%s)", + PageName.c_str(), + FeatName.c_str()); updateActive(); commitCommand(); } @@ -620,15 +675,15 @@ bool CmdDrawingSymbol::isActive(void) DEF_STD_CMD_A(CmdDrawingExportPage) CmdDrawingExportPage::CmdDrawingExportPage() - : Command("Drawing_ExportPage") + : Command("Drawing_ExportPage") { // setting the - sGroup = QT_TR_NOOP("File"); - sMenuText = QT_TR_NOOP("&Export page..."); - sToolTipText = QT_TR_NOOP("Export a page to an SVG file"); - sWhatsThis = "Drawing_ExportPage"; - sStatusTip = QT_TR_NOOP("Export a page to an SVG file"); - sPixmap = "document-save"; + sGroup = QT_TR_NOOP("File"); + sMenuText = QT_TR_NOOP("&Export page..."); + sToolTipText = QT_TR_NOOP("Export a page to an SVG file"); + sWhatsThis = "Drawing_ExportPage"; + sStatusTip = QT_TR_NOOP("Export a page to an SVG file"); + sPixmap = "document-save"; } void CmdDrawingExportPage::activated(int iMsg) @@ -636,8 +691,9 @@ void CmdDrawingExportPage::activated(int iMsg) Q_UNUSED(iMsg); unsigned int n = getSelection().countObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (n != 1) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Page object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Page object.")); return; } @@ -645,17 +701,20 @@ void CmdDrawingExportPage::activated(int iMsg) filter << QString::fromLatin1("%1 (*.svg)").arg(QObject::tr("Scalable Vector Graphic")); filter << QString::fromLatin1("%1 (*.*)").arg(QObject::tr("All Files")); - QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), QObject::tr("Export page"), QString(), filter.join(QLatin1String(";;"))); + QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), + QObject::tr("Export page"), + QString(), + filter.join(QLatin1String(";;"))); if (!fn.isEmpty()) { std::vector Sel = getSelection().getSelection(); openCommand("Drawing export page"); - doCommand(Doc,"PageFile = open(App.activeDocument().%s.PageResult,'r')",Sel[0].FeatName); + doCommand(Doc, "PageFile = open(App.activeDocument().%s.PageResult,'r')", Sel[0].FeatName); std::string fname = (const char*)fn.toUtf8(); fname = Base::Tools::escapeEncodeFilename(fname); - doCommand(Doc,"OutFile = open(\"%s\",'w')",fname.c_str()); - doCommand(Doc,"OutFile.write(PageFile.read())"); - doCommand(Doc,"del OutFile,PageFile"); + doCommand(Doc, "OutFile = open(\"%s\",'w')", fname.c_str()); + doCommand(Doc, "OutFile.write(PageFile.read())"); + doCommand(Doc, "del OutFile,PageFile"); commitCommand(); } @@ -673,14 +732,14 @@ bool CmdDrawingExportPage::isActive(void) DEF_STD_CMD_A(CmdDrawingProjectShape) CmdDrawingProjectShape::CmdDrawingProjectShape() - : Command("Drawing_ProjectShape") + : Command("Drawing_ProjectShape") { // setting the - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("Project shape..."); - sToolTipText = QT_TR_NOOP("Project shape onto a user-defined plane"); - sStatusTip = QT_TR_NOOP("Project shape onto a user-defined plane"); - sWhatsThis = "Drawing_ProjectShape"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("Project shape..."); + sToolTipText = QT_TR_NOOP("Project shape onto a user-defined plane"); + sStatusTip = QT_TR_NOOP("Project shape onto a user-defined plane"); + sWhatsThis = "Drawing_ProjectShape"; } void CmdDrawingProjectShape::activated(int iMsg) @@ -701,7 +760,6 @@ bool CmdDrawingProjectShape::isActive(void) } - //=========================================================================== // Drawing_Draft_View //=========================================================================== @@ -709,22 +767,23 @@ bool CmdDrawingProjectShape::isActive(void) DEF_STD_CMD_A(CmdDrawingDraftView) CmdDrawingDraftView::CmdDrawingDraftView() - : Command("Drawing_DraftView") + : Command("Drawing_DraftView") { // setting the - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("&Draft View"); - sToolTipText = QT_TR_NOOP("Inserts a Draft view of the selected object(s) in the active drawing"); - sWhatsThis = "Drawing_DraftView"; - sStatusTip = QT_TR_NOOP("Inserts a Draft view of the selected object(s) in the active drawing"); - sPixmap = "actions/drawing-draft-view"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("&Draft View"); + sToolTipText = + QT_TR_NOOP("Inserts a Draft view of the selected object(s) in the active drawing"); + sWhatsThis = "Drawing_DraftView"; + sStatusTip = QT_TR_NOOP("Inserts a Draft view of the selected object(s) in the active drawing"); + sPixmap = "actions/drawing-draft-view"; } void CmdDrawingDraftView::activated(int iMsg) { Q_UNUSED(iMsg); - addModule(Gui,"Draft"); - doCommand(Gui,"Gui.runCommand(\"Draft_Drawing\")"); + addModule(Gui, "Draft"); + doCommand(Gui, "Gui.runCommand(\"Draft_Drawing\")"); } bool CmdDrawingDraftView::isActive(void) @@ -740,39 +799,51 @@ bool CmdDrawingDraftView::isActive(void) DEF_STD_CMD_A(CmdDrawingSpreadsheetView) CmdDrawingSpreadsheetView::CmdDrawingSpreadsheetView() - : Command("Drawing_SpreadsheetView") + : Command("Drawing_SpreadsheetView") { // setting the - sGroup = QT_TR_NOOP("Drawing"); - sMenuText = QT_TR_NOOP("&Spreadsheet View"); - sToolTipText = QT_TR_NOOP("Inserts a view of a selected spreadsheet in the active drawing"); - sWhatsThis = "Drawing_SpreadsheetView"; - sStatusTip = QT_TR_NOOP("Inserts a view of a selected spreadsheet in the active drawing"); - sPixmap = "actions/drawing-spreadsheet"; + sGroup = QT_TR_NOOP("Drawing"); + sMenuText = QT_TR_NOOP("&Spreadsheet View"); + sToolTipText = QT_TR_NOOP("Inserts a view of a selected spreadsheet in the active drawing"); + sWhatsThis = "Drawing_SpreadsheetView"; + sStatusTip = QT_TR_NOOP("Inserts a view of a selected spreadsheet in the active drawing"); + sPixmap = "actions/drawing-spreadsheet"; } void CmdDrawingSpreadsheetView::activated(int iMsg) { Q_UNUSED(iMsg); - const std::vector spreads = getSelection().getObjectsOfType(Spreadsheet::Sheet::getClassTypeId()); + const std::vector spreads = + getSelection().getObjectsOfType(Spreadsheet::Sheet::getClassTypeId()); if (spreads.size() != 1) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select exactly one Spreadsheet object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select exactly one Spreadsheet object.")); return; } - const std::vector pages = this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); + const std::vector pages = + this->getDocument()->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (pages.empty()) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No page found"), - QObject::tr("Create a page first.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("No page found"), + QObject::tr("Create a page first.")); return; } std::string SpreadName = spreads.front()->getNameInDocument(); std::string PageName = pages.front()->getNameInDocument(); openCommand("Create spreadsheet view"); std::string FeatName = getUniqueObjectName("View"); - doCommand(Doc,"App.activeDocument().addObject('Drawing::FeatureViewSpreadsheet','%s')",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Source = App.activeDocument().%s",FeatName.c_str(),SpreadName.c_str()); - doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",PageName.c_str(),FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject('Drawing::FeatureViewSpreadsheet','%s')", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.Source = App.activeDocument().%s", + FeatName.c_str(), + SpreadName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.addObject(App.activeDocument().%s)", + PageName.c_str(), + FeatName.c_str()); updateActive(); commitCommand(); } @@ -785,7 +856,7 @@ bool CmdDrawingSpreadsheetView::isActive(void) void CreateDrawingCommands(void) { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdDrawingOpen()); rcCmdMgr.addCommand(new CmdDrawingNewPage()); diff --git a/src/Mod/Drawing/Gui/DrawingView.cpp b/src/Mod/Drawing/Gui/DrawingView.cpp index 4219870b6a..6efd6a315a 100644 --- a/src/Mod/Drawing/Gui/DrawingView.cpp +++ b/src/Mod/Drawing/Gui/DrawingView.cpp @@ -22,27 +22,27 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif @@ -59,7 +59,7 @@ using namespace DrawingGui; -SvgView::SvgView(QWidget *parent) +SvgView::SvgView(QWidget* parent) : QGraphicsView(parent) , m_renderer(Native) , m_svgItem(nullptr) @@ -83,7 +83,7 @@ SvgView::SvgView(QWidget *parent) setBackgroundBrush(tilePixmap); } -void SvgView::drawBackground(QPainter *p, const QRectF &) +void SvgView::drawBackground(QPainter* p, const QRectF&) { p->save(); p->resetTransform(); @@ -91,12 +91,13 @@ void SvgView::drawBackground(QPainter *p, const QRectF &) p->restore(); } -void SvgView::openFile(const QFile &file) +void SvgView::openFile(const QFile& file) { - if (!file.exists()) + if (!file.exists()) { return; + } - QGraphicsScene *s = scene(); + QGraphicsScene* s = scene(); bool drawBackground = (m_backgroundItem ? m_backgroundItem->isVisible() : true); bool drawOutline = (m_outlineItem ? m_outlineItem->isVisible() : false); @@ -140,7 +141,8 @@ void SvgView::setRenderer(RendererType type) #ifndef QT_NO_OPENGL setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers))); #endif - } else { + } + else { setViewport(new QWidget); } } @@ -156,21 +158,23 @@ void SvgView::setHighQualityAntialiasing(bool highQualityAntialiasing) void SvgView::setViewBackground(bool enable) { - if (!m_backgroundItem) + if (!m_backgroundItem) { return; + } m_backgroundItem->setVisible(enable); } void SvgView::setViewOutline(bool enable) { - if (!m_outlineItem) + if (!m_outlineItem) { return; + } m_outlineItem->setVisible(enable); } -void SvgView::paintEvent(QPaintEvent *event) +void SvgView::paintEvent(QPaintEvent* event) { if (m_renderer == Image) { if (m_image.size() != viewport()->size()) { @@ -183,17 +187,18 @@ void SvgView::paintEvent(QPaintEvent *event) QPainter p(viewport()); p.drawImage(0, 0, m_image); - - } else { + } + else { QGraphicsView::paintEvent(event); } } -void SvgView::wheelEvent(QWheelEvent *event) +void SvgView::wheelEvent(QWheelEvent* event) { int delta = -event->angleDelta().y(); - if (m_invertZoom) + if (m_invertZoom) { delta = -delta; + } qreal factor = std::pow(1.2, delta / 240.0); scale(factor, factor); event->accept(); @@ -204,7 +209,8 @@ void SvgView::wheelEvent(QWheelEvent *event) /* TRANSLATOR DrawingGui::DrawingView */ DrawingView::DrawingView(Gui::Document* doc, QWidget* parent) - : Gui::MDIView(doc, parent), m_view(new SvgView) + : Gui::MDIView(doc, parent) + , m_view(new SvgView) { m_backgroundAction = new QAction(tr("&Background"), this); m_backgroundAction->setEnabled(false); @@ -233,41 +239,42 @@ DrawingView::DrawingView(Gui::Document* doc, QWidget* parent) m_highQualityAntialiasingAction->setEnabled(false); m_highQualityAntialiasingAction->setCheckable(true); m_highQualityAntialiasingAction->setChecked(false); - connect(m_highQualityAntialiasingAction, SIGNAL(toggled(bool)), - m_view, SLOT(setHighQualityAntialiasing(bool))); + connect(m_highQualityAntialiasingAction, + SIGNAL(toggled(bool)), + m_view, + SLOT(setHighQualityAntialiasing(bool))); #endif - QActionGroup *rendererGroup = new QActionGroup(this); + QActionGroup* rendererGroup = new QActionGroup(this); rendererGroup->addAction(m_nativeAction); #ifndef QT_NO_OPENGL rendererGroup->addAction(m_glAction); #endif rendererGroup->addAction(m_imageAction); - connect(rendererGroup, SIGNAL(triggered(QAction *)), - this, SLOT(setRenderer(QAction *))); + connect(rendererGroup, SIGNAL(triggered(QAction*)), this, SLOT(setRenderer(QAction*))); setCentralWidget(m_view); - //setWindowTitle(tr("SVG Viewer")); + // setWindowTitle(tr("SVG Viewer")); m_orientation = QPageLayout::Landscape; m_pageSize = QPageSize::A4; - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/View"); + ParameterGrp::handle hGrp = + App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); bool on = hGrp->GetBool("InvertZoom", true); m_view->setZoomInverted(on); } DrawingView::~DrawingView() -{ -} +{} -void DrawingView::load (const QString & fileName) +void DrawingView::load(const QString& fileName) { if (!fileName.isEmpty()) { QFile file(fileName); if (!file.exists()) { - QMessageBox::critical(this, tr("Open SVG File"), - tr("Could not open file '%1'.").arg(fileName)); + QMessageBox::critical(this, + tr("Open SVG File"), + tr("Could not open file '%1'.").arg(fileName)); m_outlineAction->setEnabled(false); m_backgroundAction->setEnabled(false); @@ -278,7 +285,7 @@ void DrawingView::load (const QString & fileName) if (!fileName.startsWith(QLatin1String(":/"))) { m_currentPath = fileName; - //setWindowTitle(tr("%1 - SVG Viewer").arg(m_currentPath)); + // setWindowTitle(tr("%1 - SVG Viewer").arg(m_currentPath)); } m_outlineAction->setEnabled(true); @@ -318,7 +325,9 @@ void DrawingView::findPrinterSettings(const QString& fileName) pageSizes[QPageSize::B7] = QString::fromLatin1("B7"); pageSizes[QPageSize::B8] = QString::fromLatin1("B8"); pageSizes[QPageSize::B9] = QString::fromLatin1("B9"); - for (QMap::iterator it = pageSizes.begin(); it != pageSizes.end(); ++it) { + for (QMap::iterator it = pageSizes.begin(); + it != pageSizes.end(); + ++it) { if (fileName.startsWith(it.value(), Qt::CaseInsensitive)) { m_pageSize = it.key(); break; @@ -334,8 +343,9 @@ void DrawingView::setDocumentObject(const std::string& name) void DrawingView::closeEvent(QCloseEvent* ev) { MDIView::closeEvent(ev); - if (!ev->isAccepted()) + if (!ev->isAccepted()) { return; + } // when closing the view from GUI notify the view provider to mark it invisible if (_pcDocument && !m_objectName.empty()) { @@ -343,13 +353,14 @@ void DrawingView::closeEvent(QCloseEvent* ev) if (doc) { App::DocumentObject* obj = doc->getObject(m_objectName.c_str()); Gui::ViewProvider* vp = _pcDocument->getViewProvider(obj); - if (vp) + if (vp) { vp->hide(); + } } } } -void DrawingView::contextMenuEvent(QContextMenuEvent *event) +void DrawingView::contextMenuEvent(QContextMenuEvent* event) { QMenu menu; menu.addAction(this->m_backgroundAction); @@ -363,14 +374,15 @@ void DrawingView::contextMenuEvent(QContextMenuEvent *event) menu.exec(event->globalPos()); } -void DrawingView::setRenderer(QAction *action) +void DrawingView::setRenderer(QAction* action) { #ifndef QT_NO_OPENGL m_highQualityAntialiasingAction->setEnabled(false); #endif - if (action == m_nativeAction) + if (action == m_nativeAction) { m_view->setRenderer(SvgView::Native); + } #ifndef QT_NO_OPENGL else if (action == m_glAction) { m_highQualityAntialiasingAction->setEnabled(true); @@ -382,35 +394,35 @@ void DrawingView::setRenderer(QAction *action) } } -bool DrawingView::onMsg(const char* pMsg, const char** ) +bool DrawingView::onMsg(const char* pMsg, const char**) { - if (strcmp("ViewFit",pMsg) == 0) { + if (strcmp("ViewFit", pMsg) == 0) { viewAll(); return true; } - else if (strcmp("Save",pMsg) == 0) { - Gui::Document *doc = getGuiDocument(); + else if (strcmp("Save", pMsg) == 0) { + Gui::Document* doc = getGuiDocument(); if (doc) { doc->save(); return true; } } - else if (strcmp("SaveAs",pMsg) == 0) { - Gui::Document *doc = getGuiDocument(); + else if (strcmp("SaveAs", pMsg) == 0) { + Gui::Document* doc = getGuiDocument(); if (doc) { doc->saveAs(); return true; } } - else if(strcmp("Undo",pMsg) == 0 ) { - Gui::Document *doc = getGuiDocument(); + else if (strcmp("Undo", pMsg) == 0) { + Gui::Document* doc = getGuiDocument(); if (doc) { doc->undo(1); return true; } } - else if(strcmp("Redo",pMsg) == 0 ) { - Gui::Document *doc = getGuiDocument(); + else if (strcmp("Redo", pMsg) == 0) { + Gui::Document* doc = getGuiDocument(); if (doc) { doc->redo(1); return true; @@ -421,35 +433,41 @@ bool DrawingView::onMsg(const char* pMsg, const char** ) bool DrawingView::onHasMsg(const char* pMsg) const { - if (strcmp("ViewFit",pMsg) == 0) + if (strcmp("ViewFit", pMsg) == 0) { return true; - else if (strcmp("Save",pMsg) == 0) + } + else if (strcmp("Save", pMsg) == 0) { return getGuiDocument() != nullptr; - else if (strcmp("SaveAs",pMsg) == 0) + } + else if (strcmp("SaveAs", pMsg) == 0) { return getGuiDocument() != nullptr; - else if (strcmp("Undo",pMsg) == 0) { + } + else if (strcmp("Undo", pMsg) == 0) { App::Document* doc = getAppDocument(); return doc && doc->getAvailableUndos() > 0; } - else if (strcmp("Redo",pMsg) == 0) { + else if (strcmp("Redo", pMsg) == 0) { App::Document* doc = getAppDocument(); return doc && doc->getAvailableRedos() > 0; } - else if (strcmp("Print",pMsg) == 0) + else if (strcmp("Print", pMsg) == 0) { return true; - else if (strcmp("PrintPreview",pMsg) == 0) + } + else if (strcmp("PrintPreview", pMsg) == 0) { return true; - else if (strcmp("PrintPdf",pMsg) == 0) + } + else if (strcmp("PrintPdf", pMsg) == 0) { return true; + } return false; } -void DrawingView::onRelabel(Gui::Document *pDoc) +void DrawingView::onRelabel(Gui::Document* pDoc) { if (!bIsPassive && pDoc) { - QString cap = QString::fromLatin1("%1 : %2[*]") - .arg(QString::fromUtf8(pDoc->getDocument()->Label.getValue()), - objectName()); + QString cap = + QString::fromLatin1("%1 : %2[*]") + .arg(QString::fromUtf8(pDoc->getDocument()->Label.getValue()), objectName()); setWindowTitle(cap); } } @@ -462,12 +480,12 @@ void DrawingView::printPdf() dlg.setWindowTitle(tr("Export PDF")); dlg.setNameFilters(QStringList() << QString::fromLatin1("%1 (*.pdf)").arg(tr("PDF file"))); - QGridLayout *gridLayout; - QGridLayout *formLayout; - QGroupBox *groupBox; - QListWidget *listWidget; + QGridLayout* gridLayout; + QGridLayout* formLayout; + QGroupBox* groupBox; + QListWidget* listWidget; QListWidgetItem* item; - QWidget *form = new QWidget(&dlg); + QWidget* form = new QWidget(&dlg); form->resize(40, 300); formLayout = new QGridLayout(form); groupBox = new QGroupBox(form); @@ -489,8 +507,8 @@ void DrawingView::printPdf() item->setData(Qt::UserRole, QVariant(QPageSize::A4)); item = new QListWidgetItem(tr("A5"), listWidget); item->setData(Qt::UserRole, QVariant(QPageSize::A5)); - int index = 4; // by default A4 - for (int i=0; icount(); i++) { + int index = 4; // by default A4 + for (int i = 0; i < listWidget->count(); i++) { if (listWidget->item(i)->data(Qt::UserRole).toInt() == m_pageSize) { index = i; break; @@ -540,8 +558,7 @@ void DrawingView::printPreview() printer.setPageOrientation(m_orientation); QPrintPreviewDialog dlg(&printer, this); - connect(&dlg, SIGNAL(paintRequested (QPrinter *)), - this, SLOT(print(QPrinter *))); + connect(&dlg, SIGNAL(paintRequested(QPrinter*)), this, SLOT(print(QPrinter*))); dlg.exec(); } @@ -570,35 +587,46 @@ void DrawingView::print(QPrinter* printer) bool doPrint = paintType != QPaintEngine::Picture; if (doPrint && printer->pageLayout().orientation() != this->m_orientation) { - int ret = QMessageBox::warning(this, tr("Different orientation"), + int ret = QMessageBox::warning( + this, + tr("Different orientation"), tr("The printer uses a different orientation than the drawing.\n" "Do you want to continue?"), - QMessageBox::Yes | QMessageBox::No); - if (ret != QMessageBox::Yes) + QMessageBox::Yes | QMessageBox::No); + if (ret != QMessageBox::Yes) { return; + } } else if (doPrint && realPaperSize != this->m_pageSize) { - int ret = QMessageBox::warning(this, tr("Different paper size"), + int ret = QMessageBox::warning( + this, + tr("Different paper size"), tr("The printer uses a different paper size than the drawing.\n" "Do you want to continue?"), - QMessageBox::Yes | QMessageBox::No); - if (ret != QMessageBox::Yes) + QMessageBox::Yes | QMessageBox::No); + if (ret != QMessageBox::Yes) { return; + } } else if (doPrint && curPaperSize != this->m_pageSize) { - int ret = QMessageBox::warning(this, tr("Different paper size"), + int ret = QMessageBox::warning( + this, + tr("Different paper size"), tr("The printer uses a different paper size than the drawing.\n" "Do you want to continue?"), - QMessageBox::Yes | QMessageBox::No); - if (ret != QMessageBox::Yes) + QMessageBox::Yes | QMessageBox::No); + if (ret != QMessageBox::Yes) { return; + } } } QPainter p(printer); if (!p.isActive() && !printer->outputFileName().isEmpty()) { qApp->setOverrideCursor(Qt::ArrowCursor); - QMessageBox::critical(this, tr("Opening file failed"), + QMessageBox::critical( + this, + tr("Opening file failed"), tr("Can't open file '%1' for writing.").arg(printer->outputFileName())); qApp->restoreOverrideCursor(); return; @@ -607,8 +635,9 @@ void DrawingView::print(QPrinter* printer) #ifdef Q_OS_WIN32 // On Windows the preview looks broken when using paperRect as render area. // Although the picture is scaled when using pageRect, it looks just fine. - if (paintType == QPaintEngine::Picture) + if (paintType == QPaintEngine::Picture) { rect = printer->pageLayout().paintRectPixels(printer->resolution()); + } #endif this->m_view->scene()->render(&p, rect); p.end(); @@ -617,48 +646,45 @@ void DrawingView::print(QPrinter* printer) QPageSize::PageSizeId DrawingView::getPageSize(int w, int h) const { static const float paperSizes[][2] = { - {210, 297}, // A4 - {176, 250}, // B5 - {215.9f, 279.4f}, // Letter - {215.9f, 355.6f}, // Legal - {190.5f, 254}, // Executive - {841, 1189}, // A0 - {594, 841}, // A1 - {420, 594}, // A2 - {297, 420}, // A3 - {148, 210}, // A5 - {105, 148}, // A6 - {74, 105}, // A7 - {52, 74}, // A8 - {37, 52}, // A8 - {1000, 1414}, // B0 - {707, 1000}, // B1 - {31, 44}, // B10 - {500, 707}, // B2 - {353, 500}, // B3 - {250, 353}, // B4 - {125, 176}, // B6 - {88, 125}, // B7 - {62, 88}, // B8 - {33, 62}, // B9 - {163, 229}, // C5E - {105, 241}, // US Common - {110, 220}, // DLE - {210, 330}, // Folio - {431.8f, 279.4f}, // Ledger - {279.4f, 431.8f} // Tabloid + {210, 297}, // A4 + {176, 250}, // B5 + {215.9f, 279.4f}, // Letter + {215.9f, 355.6f}, // Legal + {190.5f, 254}, // Executive + {841, 1189}, // A0 + {594, 841}, // A1 + {420, 594}, // A2 + {297, 420}, // A3 + {148, 210}, // A5 + {105, 148}, // A6 + {74, 105}, // A7 + {52, 74}, // A8 + {37, 52}, // A8 + {1000, 1414}, // B0 + {707, 1000}, // B1 + {31, 44}, // B10 + {500, 707}, // B2 + {353, 500}, // B3 + {250, 353}, // B4 + {125, 176}, // B6 + {88, 125}, // B7 + {62, 88}, // B8 + {33, 62}, // B9 + {163, 229}, // C5E + {105, 241}, // US Common + {110, 220}, // DLE + {210, 330}, // Folio + {431.8f, 279.4f}, // Ledger + {279.4f, 431.8f} // Tabloid }; QPageSize::PageSizeId ps = QPageSize::Custom; - for (int i=0; i<30; i++) { - if (std::abs(paperSizes[i][0]-w) <= 1 && - std::abs(paperSizes[i][1]-h) <= 1) { + for (int i = 0; i < 30; i++) { + if (std::abs(paperSizes[i][0] - w) <= 1 && std::abs(paperSizes[i][1] - h) <= 1) { ps = static_cast(i); break; } - else - if (std::abs(paperSizes[i][0]-h) <= 1 && - std::abs(paperSizes[i][1]-w) <= 1) { + else if (std::abs(paperSizes[i][0] - h) <= 1 && std::abs(paperSizes[i][1] - w) <= 1) { ps = static_cast(i); break; diff --git a/src/Mod/Drawing/Gui/DrawingView.h b/src/Mod/Drawing/Gui/DrawingView.h index d7c43b07fc..eb1abe81b7 100644 --- a/src/Mod/Drawing/Gui/DrawingView.h +++ b/src/Mod/Drawing/Gui/DrawingView.h @@ -45,19 +45,25 @@ QT_END_NAMESPACE namespace DrawingGui { -class DrawingGuiExport SvgView : public QGraphicsView +class DrawingGuiExport SvgView: public QGraphicsView { Q_OBJECT public: - enum RendererType { Native, OpenGL, Image }; + enum RendererType + { + Native, + OpenGL, + Image + }; - SvgView(QWidget *parent = nullptr); + SvgView(QWidget* parent = nullptr); - void openFile(const QFile &file); + void openFile(const QFile& file); void setRenderer(RendererType type = Native); - void drawBackground(QPainter *p, const QRectF &rect); - void setZoomInverted(bool on) { + void drawBackground(QPainter* p, const QRectF& rect); + void setZoomInverted(bool on) + { m_invertZoom = on; } @@ -67,21 +73,21 @@ public Q_SLOTS: void setViewOutline(bool enable); protected: - void wheelEvent(QWheelEvent *event); - void paintEvent(QPaintEvent *event); + void wheelEvent(QWheelEvent* event); + void paintEvent(QPaintEvent* event); private: RendererType m_renderer; - QGraphicsItem *m_svgItem; - QGraphicsRectItem *m_backgroundItem; - QGraphicsRectItem *m_outlineItem; + QGraphicsItem* m_svgItem; + QGraphicsRectItem* m_backgroundItem; + QGraphicsRectItem* m_outlineItem; QImage m_image; bool m_invertZoom; }; -class DrawingGuiExport DrawingView : public Gui::MDIView +class DrawingGuiExport DrawingView: public Gui::MDIView { Q_OBJECT @@ -90,14 +96,14 @@ public: virtual ~DrawingView(); public Q_SLOTS: - void load(const QString &path = QString()); - void setRenderer(QAction *action); + void load(const QString& path = QString()); + void setRenderer(QAction* action); void viewAll(); public: - bool onMsg(const char* pMsg,const char** ppReturn); + bool onMsg(const char* pMsg, const char** ppReturn); bool onHasMsg(const char* pMsg) const; - void onRelabel(Gui::Document *pDoc); + void onRelabel(Gui::Document* pDoc); void print(); void printPdf(); void printPreview(); @@ -106,20 +112,20 @@ public: PyObject* getPyObject(); protected: - void contextMenuEvent(QContextMenuEvent *event); + void contextMenuEvent(QContextMenuEvent* event); void closeEvent(QCloseEvent*); void findPrinterSettings(const QString&); QPageSize::PageSizeId getPageSize(int w, int h) const; private: - QAction *m_nativeAction; - QAction *m_glAction; - QAction *m_imageAction; - QAction *m_highQualityAntialiasingAction; - QAction *m_backgroundAction; - QAction *m_outlineAction; + QAction* m_nativeAction; + QAction* m_glAction; + QAction* m_imageAction; + QAction* m_highQualityAntialiasingAction; + QAction* m_backgroundAction; + QAction* m_outlineAction; - SvgView *m_view; + SvgView* m_view; std::string m_objectName; QString m_currentPath; @@ -127,6 +133,6 @@ private: QPageSize::PageSizeId m_pageSize; }; -} // namespace DrawingViewGui +} // namespace DrawingGui -#endif // DRAWINGGUI_DRAWINGVIEW_H +#endif // DRAWINGGUI_DRAWINGVIEW_H diff --git a/src/Mod/Drawing/Gui/PreCompiled.cpp b/src/Mod/Drawing/Gui/PreCompiled.cpp index 3139e21f64..6758517493 100644 --- a/src/Mod/Drawing/Gui/PreCompiled.cpp +++ b/src/Mod/Drawing/Gui/PreCompiled.cpp @@ -20,4 +20,4 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Drawing/Gui/PreCompiled.h b/src/Mod/Drawing/Gui/PreCompiled.h index 855f8a5968..986834f3eb 100644 --- a/src/Mod/Drawing/Gui/PreCompiled.h +++ b/src/Mod/Drawing/Gui/PreCompiled.h @@ -26,7 +26,7 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4005) +#pragma warning(disable : 4005) #endif #ifdef _PreComp_ @@ -55,15 +55,15 @@ #include #include #include -#include #include -#include +#include #include #include +#include #include #include #include -#endif //_PreComp_ +#endif //_PreComp_ -#endif // DRAWINGGUI_PRECOMPILED_H +#endif // DRAWINGGUI_PRECOMPILED_H diff --git a/src/Mod/Drawing/Gui/Resources/Drawing.qrc b/src/Mod/Drawing/Gui/Resources/Drawing.qrc index e23bd017e3..6f9b3e8460 100644 --- a/src/Mod/Drawing/Gui/Resources/Drawing.qrc +++ b/src/Mod/Drawing/Gui/Resources/Drawing.qrc @@ -1,5 +1,5 @@ - + icons/Page.svg icons/Pages.svg icons/View.svg @@ -26,4 +26,4 @@ icons/actions/drawing-draft-view.svg icons/actions/drawing-spreadsheet.svg - + diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts index 9fbb911bfe..271c8b01bd 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts @@ -470,7 +470,7 @@ Jarraitu nahi duzu? Auto scale / position - Auto eskala / kokapena + Auto eskala / posizioa diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts index 46a5d3da56..6470ed3162 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts @@ -336,7 +336,7 @@ The printer uses a different orientation than the drawing. Do you want to continue? - A nyomtató a rajztól eltérő tájolást használ. + A nyomtató a rajztól eltérő tájolást használ. Szeretné folytatni? @@ -350,7 +350,7 @@ Szeretné folytatni? The printer uses a different paper size than the drawing. Do you want to continue? - A nyomtató a rajztól eltérő méretű papír méretet használ. + A nyomtató a rajztól eltérő méretű papír méretet használ. Szeretné folytatni? diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_no.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_no.ts index eed5767e87..14ec56b865 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_no.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_no.ts @@ -350,7 +350,7 @@ Do you want to continue? The printer uses a different paper size than the drawing. Do you want to continue? - Skriveren bruker en annen papirstørrelse enn tegningen. + Skriveren bruker en annen papirstørrelse enn tegningen. Vil du fortsette? diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts index 8018a929b6..44ce3f4215 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts @@ -336,7 +336,7 @@ The printer uses a different orientation than the drawing. Do you want to continue? - A impressora utiliza uma orientação diferente do que o desenho. + A impressora utiliza uma orientação diferente do que o desenho. Deseja continuar? diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts index dfbe12264c..90da639b7d 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts @@ -245,7 +245,7 @@ &Outline - &amp; Oivičenje + &Obris diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts index 2c44ad447f..a3b5326bf5 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts @@ -245,7 +245,7 @@ &Outline - &amp; Оивичење + &Обрис diff --git a/src/Mod/Drawing/Gui/TaskDialog.cpp b/src/Mod/Drawing/Gui/TaskDialog.cpp index 8ac2ad756d..e20caf20af 100644 --- a/src/Mod/Drawing/Gui/TaskDialog.cpp +++ b/src/Mod/Drawing/Gui/TaskDialog.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -43,26 +43,24 @@ using namespace DrawingGui; TaskProjection::TaskProjection() { - QString texts[10] = - { - tr("Visible sharp edges"), - tr("Visible smooth edges"), - tr("Visible sewn edges"), - tr("Visible outline edges"), - tr("Visible isoparameters"), - tr("Hidden sharp edges"), - tr("Hidden smooth edges"), - tr("Hidden sewn edges"), - tr("Hidden outline edges"), - tr("Hidden isoparameters") - }; + QString texts[10] = {tr("Visible sharp edges"), + tr("Visible smooth edges"), + tr("Visible sewn edges"), + tr("Visible outline edges"), + tr("Visible isoparameters"), + tr("Hidden sharp edges"), + tr("Hidden smooth edges"), + tr("Hidden sewn edges"), + tr("Hidden outline edges"), + tr("Hidden isoparameters")}; widget = new QWidget(); - QVBoxLayout *mainLayout = new QVBoxLayout; + QVBoxLayout* mainLayout = new QVBoxLayout; - for (int i=0; i<10; i++) { + for (int i = 0; i < 10; i++) { QCheckBox* cb = new QCheckBox(); - if (i < 5) + if (i < 5) { cb->setChecked(true); + } cb->setText(texts[i]); mainLayout->addWidget(cb); boxes.push_back(cb); @@ -70,8 +68,7 @@ TaskProjection::TaskProjection() widget->setLayout(mainLayout); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), tr("Project shapes"), false, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), tr("Project shapes"), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } @@ -85,54 +82,76 @@ bool TaskProjection::accept() { Gui::Document* document = Gui::Application::Instance->activeDocument(); if (!document) { - QMessageBox::warning(widget, tr("No active document"), - tr("There is currently no active document to complete the operation")); + QMessageBox::warning(widget, + tr("No active document"), + tr("There is currently no active document to complete the operation")); return true; } - std::list mdis = document->getMDIViewsOfType(Gui::View3DInventor::getClassTypeId()); + std::list mdis = + document->getMDIViewsOfType(Gui::View3DInventor::getClassTypeId()); if (mdis.empty()) { - QMessageBox::warning(widget, tr("No active view"), - tr("There is currently no active view to complete the operation")); + QMessageBox::warning(widget, + tr("No active view"), + tr("There is currently no active view to complete the operation")); return false; } - Gui::View3DInventorViewer* viewer = static_cast(mdis.front())->getViewer(); + Gui::View3DInventorViewer* viewer = + static_cast(mdis.front())->getViewer(); SbVec3f pnt, dir; viewer->getNearPlane(pnt, dir); - float x=0, y=1,z=1; - dir.getValue(x,y,z); + float x = 0, y = 1, z = 1; + dir.getValue(x, y, z); std::vector shapes = Gui::Selection().getObjectsOfType(); Gui::Command::openCommand("Project shape"); - Gui::Command::addModule(Gui::Command::Doc,"Drawing"); + Gui::Command::addModule(Gui::Command::Doc, "Drawing"); for (std::vector::iterator it = shapes.begin(); it != shapes.end(); ++it) { const char* object = (*it)->getNameInDocument(); + Gui::Command::doCommand( + Gui::Command::Doc, + "FreeCAD.ActiveDocument.addObject('Drawing::FeatureProjection','%s_proj')", + object); + Gui::Command::doCommand( + Gui::Command::Doc, + "FreeCAD.ActiveDocument.ActiveObject.Direction=FreeCAD.Vector(%f,%f,%f)", + x, + y, + z); + Gui::Command::doCommand( + Gui::Command::Doc, + "FreeCAD.ActiveDocument.ActiveObject.Source=FreeCAD.ActiveDocument.%s", + object); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.addObject('Drawing::FeatureProjection','%s_proj')", object); + "FreeCAD.ActiveDocument.ActiveObject.VCompound=%s", + (boxes[0]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.Direction=FreeCAD.Vector(%f,%f,%f)", x,y,z); + "FreeCAD.ActiveDocument.ActiveObject.Rg1LineVCompound=%s", + (boxes[1]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.Source=FreeCAD.ActiveDocument.%s", object); + "FreeCAD.ActiveDocument.ActiveObject.RgNLineVCompound=%s", + (boxes[2]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.VCompound=%s", (boxes[0]->isChecked() ? "True" : "False")); + "FreeCAD.ActiveDocument.ActiveObject.OutLineVCompound=%s", + (boxes[3]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.Rg1LineVCompound=%s", (boxes[1]->isChecked() ? "True" : "False")); + "FreeCAD.ActiveDocument.ActiveObject.IsoLineVCompound=%s", + (boxes[4]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.RgNLineVCompound=%s", (boxes[2]->isChecked() ? "True" : "False")); + "FreeCAD.ActiveDocument.ActiveObject.HCompound=%s", + (boxes[5]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.OutLineVCompound=%s", (boxes[3]->isChecked() ? "True" : "False")); + "FreeCAD.ActiveDocument.ActiveObject.Rg1LineHCompound=%s", + (boxes[6]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.IsoLineVCompound=%s", (boxes[4]->isChecked() ? "True" : "False")); + "FreeCAD.ActiveDocument.ActiveObject.RgNLineHCompound=%s", + (boxes[7]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.HCompound=%s", (boxes[5]->isChecked() ? "True" : "False")); + "FreeCAD.ActiveDocument.ActiveObject.OutLineHCompound=%s", + (boxes[8]->isChecked() ? "True" : "False")); Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.Rg1LineHCompound=%s", (boxes[6]->isChecked() ? "True" : "False")); - Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.RgNLineHCompound=%s", (boxes[7]->isChecked() ? "True" : "False")); - Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.OutLineHCompound=%s", (boxes[8]->isChecked() ? "True" : "False")); - Gui::Command::doCommand(Gui::Command::Doc, - "FreeCAD.ActiveDocument.ActiveObject.IsoLineHCompound=%s", (boxes[9]->isChecked() ? "True" : "False")); + "FreeCAD.ActiveDocument.ActiveObject.IsoLineHCompound=%s", + (boxes[9]->isChecked() ? "True" : "False")); } Gui::Command::updateActive(); Gui::Command::commitCommand(); diff --git a/src/Mod/Drawing/Gui/TaskDialog.h b/src/Mod/Drawing/Gui/TaskDialog.h index ad87e17ce2..1160d8820f 100644 --- a/src/Mod/Drawing/Gui/TaskDialog.h +++ b/src/Mod/Drawing/Gui/TaskDialog.h @@ -37,7 +37,7 @@ namespace DrawingGui /** * Embed the panel into a task dialog. */ -class TaskProjection : public Gui::TaskView::TaskDialog +class TaskProjection: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -49,9 +49,13 @@ public: bool accept(); virtual QDialogButtonBox::StandardButtons getStandardButtons() const - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } virtual bool isAllowedAlterDocument(void) const - { return true; } + { + return true; + } private: QWidget* widget; @@ -59,8 +63,7 @@ private: Gui::TaskView::TaskBox* taskbox; }; -} //namespace DrawingGui +} // namespace DrawingGui - -#endif // DRAWINGGUI_TASKDIALOG +#endif // DRAWINGGUI_TASKDIALOG diff --git a/src/Mod/Drawing/Gui/TaskOrthoViews.cpp b/src/Mod/Drawing/Gui/TaskOrthoViews.cpp index 513b11b6d1..5f72a06386 100644 --- a/src/Mod/Drawing/Gui/TaskOrthoViews.cpp +++ b/src/Mod/Drawing/Gui/TaskOrthoViews.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -42,90 +42,103 @@ using namespace DrawingGui; using namespace std; namespace bp = boost::placeholders; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("QObject", "Make axonometric..."); qApp->translate("QObject", "Edit axonometric settings..."); qApp->translate("QObject", "Make orthographic"); #endif - - -void pagesize(string & page_template, int dims[4], int block[4]) +void pagesize(string& page_template, int dims[4], int block[4]) { - dims[0] = 10; // default to A4_Landscape with 10mm margins + dims[0] = 10; // default to A4_Landscape with 10mm margins dims[1] = 10; dims[2] = 287; dims[3] = 200; - block[0] = block[1] = 0; // default to no title block + block[0] = block[1] = 0; // default to no title block block[2] = block[3] = 0; int t0, t1, t2, t3 = 0; - //code below copied from FeaturePage.cpp + // code below copied from FeaturePage.cpp Base::FileInfo fi(page_template); - if (!fi.isReadable()) - { + if (!fi.isReadable()) { fi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName()); - if (!fi.isReadable()) //if so then really shouldn't have been able to get this far, but just in case... + if (!fi.isReadable()) { // if so then really shouldn't have been able to get this far, but + // just in case... return; + } } // open Template file string line; - ifstream file (fi.filePath().c_str()); + ifstream file(fi.filePath().c_str()); - try - { - while (getline (file,line)) - { - if (line.find("" - getline (file,line); + try { + while (getline(file, line)) { + if (line.find("" + getline(file, line); - if (line.find("" + if (line.find("" + } break; } - if (line.find("metadata") != string::npos) //give up if we meet a metadata tag + if (line.find("metadata") != string::npos) { // give up if we meet a metadata tag break; + } } } - catch (Standard_Failure&) - { } - - - if (t3 != 0) - { - block[2] = t2 - t0; // block width - block[3] = t3 - t1; // block height - - if (t0 <= dims[0]) // title block on left - block[0] = -1; - else if (t2 >= dims[2]) // title block on right - block[0] = 1; - - if (t1 <= dims[1]) // title block at top - block[1] = 1; - else if (t3 >= dims[3]) // title block at bottom - block[1] = -1; + catch (Standard_Failure&) { } - dims[2] -= dims[0]; // width - dims[3] -= dims[1]; // height + + if (t3 != 0) { + block[2] = t2 - t0; // block width + block[3] = t3 - t1; // block height + + if (t0 <= dims[0]) { // title block on left + block[0] = -1; + } + else if (t2 >= dims[2]) { // title block on right + block[0] = 1; + } + + if (t1 <= dims[1]) { // title block at top + block[1] = 1; + } + else if (t3 >= dims[3]) { // title block at bottom + block[1] = -1; + } + } + + dims[2] -= dims[0]; // width + dims[3] -= dims[1]; // height } - /////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// -orthoview::orthoview(App::Document * parent, App::DocumentObject * part, App::DocumentObject * page, Base::BoundBox3d * partbox) +orthoview::orthoview(App::Document* parent, + App::DocumentObject* part, + App::DocumentObject* page, + Base::BoundBox3d* partbox) { parent_doc = parent; myname = parent_doc->getUniqueObjectName("Ortho"); @@ -136,8 +149,9 @@ orthoview::orthoview(App::Document * parent, App::DocumentObject * part, App::Do cy = partbox->GetCenter().y; cz = partbox->GetCenter().z; - this_view = static_cast (parent_doc->addObject("Drawing::FeatureViewPart", myname.c_str())); - static_cast(page)->addObject(this_view); + this_view = static_cast( + parent_doc->addObject("Drawing::FeatureViewPart", myname.c_str())); + static_cast(page)->addObject(this_view); this_view->Source.setValue(part); pageX = 0; @@ -155,8 +169,7 @@ orthoview::orthoview(App::Document * parent, App::DocumentObject * part, App::Do } orthoview::~orthoview() -{ -} +{} void orthoview::set_data(int r_x, int r_y) { @@ -164,7 +177,7 @@ void orthoview::set_data(int r_x, int r_y) rel_y = r_y; char label[15]; - sprintf(label, "Ortho_%i_%i", rel_x, rel_y); // label name for view, based on relative position + sprintf(label, "Ortho_%i_%i", rel_x, rel_y); // label name for view, based on relative position this_view->Label.setValue(label); ortho = ((rel_x * rel_y) == 0); @@ -177,8 +190,7 @@ void orthoview::deleteme() void orthoview::setPos(float px, float py) { - if (px != 0 && py !=0) - { + if (px != 0 && py != 0) { pageX = px; pageY = py; } @@ -219,8 +231,8 @@ void orthoview::smooth(bool state) void orthoview::set_projection(const gp_Ax2& cs) { - gp_Ax2 actual_cs; - gp_Dir actual_X; + gp_Ax2 actual_cs; + gp_Dir actual_X; // coord system & directions for desired projection X_dir = cs.XDirection(); @@ -244,13 +256,15 @@ void orthoview::set_projection(const gp_Ax2& cs) // angle between desired projection and actual projection float rotation = X_dir.Angle(actual_X); - if (rotation != 0 && abs(M_PI - rotation) > 0.05) - if (!Z_dir.IsEqual(actual_X.Crossed(X_dir), 0.05)) + if (rotation != 0 && abs(M_PI - rotation) > 0.05) { + if (!Z_dir.IsEqual(actual_X.Crossed(X_dir), 0.05)) { rotation = -rotation; + } + } calcCentre(); - //this_view->Direction.setValue(Z_dir.X(), Z_dir.Y(), Z_dir.Z()); + // this_view->Direction.setValue(Z_dir.X(), Z_dir.Y(), Z_dir.Z()); this_view->Direction.setValue(x, y, z); this_view->Rotation.setValue(180 * rotation / M_PI); } @@ -259,7 +273,7 @@ void orthoview::set_projection(const gp_Ax2& cs) /////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// -OrthoViews::OrthoViews(App::Document* doc, const char * pagename, const char * partname) +OrthoViews::OrthoViews(App::Document* doc, const char* pagename, const char* partname) { horiz = nullptr; vert = nullptr; @@ -274,7 +288,7 @@ OrthoViews::OrthoViews(App::Document* doc, const char * pagename, const char * p Gui::Application::Instance->showViewProvider(page); load_page(); - min_space = 15; // should be preferenced + min_space = 15; // should be preferenced min_r_x = max_r_x = 0; min_r_y = max_r_y = 0; @@ -291,16 +305,17 @@ OrthoViews::OrthoViews(App::Document* doc, const char * pagename, const char * p scale = 0; num_gaps_x = num_gaps_y = 0; - this->connectDocumentDeletedObject = doc->signalDeletedObject.connect(boost::bind - (&OrthoViews::slotDeletedObject, this, bp::_1)); - this->connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument.connect(boost::bind - (&OrthoViews::slotDeletedDocument, this, bp::_1)); + this->connectDocumentDeletedObject = + doc->signalDeletedObject.connect(boost::bind(&OrthoViews::slotDeletedObject, this, bp::_1)); + this->connectApplicationDeletedDocument = App::GetApplication().signalDeleteDocument.connect( + boost::bind(&OrthoViews::slotDeletedDocument, this, bp::_1)); } OrthoViews::~OrthoViews() { - for (int i = views.size() - 1; i >= 0; i--) + for (int i = views.size() - 1; i >= 0; i--) { delete views[i]; + } try { page->recomputeFeature(); @@ -322,7 +337,7 @@ void OrthoViews::slotDeletedObject(const App::DocumentObject& Obj) Gui::Control().closeDialog(); } else { - for (std::vector::iterator it = views.begin(); it != views.end(); ++it) { + for (std::vector::iterator it = views.begin(); it != views.end(); ++it) { if ((*it)->getViewPart() == &Obj) { views.erase(it); break; @@ -338,22 +353,19 @@ void OrthoViews::load_page() page_dims = large; // process page dims for title block data - if (block[0] != 0) - { + if (block[0] != 0) { title = true; // max vertical space avoiding title block - small_v[1] = large[1]; // y margin same as large page - small_v[3] = large[3]; // y size same as large page - small_v[2] = large[2] - block[2]; // x width same as large width - block width - if (block[0] == -1) - { - small_v[0] = large[0] + block[2]; // x margin same as large + block width + small_v[1] = large[1]; // y margin same as large page + small_v[3] = large[3]; // y size same as large page + small_v[2] = large[2] - block[2]; // x width same as large width - block width + if (block[0] == -1) { + small_v[0] = large[0] + block[2]; // x margin same as large + block width horiz = &min_r_x; } - else - { - small_v[0] = large[0]; // x margin same as large + else { + small_v[0] = large[0]; // x margin same as large horiz = &max_r_x; } @@ -361,22 +373,22 @@ void OrthoViews::load_page() small_h[0] = large[0]; small_h[2] = large[2]; small_h[3] = large[3] - block[3]; - if (block[1] == 1) - { + if (block[1] == 1) { small_h[1] = large[1] + block[3]; vert = &max_r_y; } - else - { + else { small_h[1] = large[1]; vert = &min_r_y; } } - else + else { title = false; + } } -void OrthoViews::calc_layout_size() // calculate the real world size of given view layout, assuming no space +void OrthoViews::calc_layout_size() // calculate the real world size of given view layout, assuming + // no space { // note that views in relative positions x = -4, -2, 0 , 2 etc etc // have width = orientated part width @@ -391,44 +403,65 @@ void OrthoViews::calc_layout_size() // calculate the rea layout_height += (ceil(max_r_y / 2.0) + ceil(-min_r_y / 2.0)) * depth; } -void OrthoViews::choose_page() // chooses which bit of page space to use depending upon layout & titleblock +void OrthoViews::choose_page() // chooses which bit of page space to use depending upon layout & + // titleblock { - int h = abs(*horiz); // how many views in direction of title block (horiz points to min_r_x or max_r_x) - int v = abs(*vert); - float layout_corner_width = (1 + floor(h / 2.0)) * width + ceil(h / 2.0) * depth; // from (0, 0) view inclusively, how wide and tall is the layout in the direction of the title block + int h = abs(*horiz); // how many views in direction of title block (horiz points to min_r_x or + // max_r_x) + int v = abs(*vert); + float layout_corner_width = (1 + floor(h / 2.0)) * width + + ceil(h / 2.0) * depth; // from (0, 0) view inclusively, how wide and tall is the layout + // in the direction of the title block float layout_corner_height = (1 + floor(v / 2.0)) * height + ceil(v / 2.0) * depth; - float rel_space_x = layout_corner_width / layout_width - 1.0 * block[2] / large[2]; // relative to respective sizes, how much space between (0, 0) and title block, - float rel_space_y = layout_corner_height / layout_height - 1.0 * block[3] / large[3]; // can be -ve if block extends into / beyond (0, 0) view + float rel_space_x = layout_corner_width / layout_width + - 1.0 * block[2] / large[2]; // relative to respective sizes, how much space between (0, 0) + // and title block, + float rel_space_y = layout_corner_height / layout_height + - 1.0 * block[3] / large[3]; // can be -ve if block extends into / + // beyond (0, 0) view float view_x, view_y, v_x_r, v_y_r; - bool interferes = false; + bool interferes = false; float a, b; - for (int i = min_r_x; i <= max_r_x; i++) - for (int j = min_r_y; j <= max_r_y; j++) - if (index(i, j) != -1) // is there a view in this position? + for (int i = min_r_x; i <= max_r_x; i++) { + for (int j = min_r_y; j <= max_r_y; j++) { + if (index(i, j) != -1) // is there a view in this position? { - a = i * block[0] * 0.5; // reflect i and j so as +ve is in direction of title block ## + a = i * block[0] + * 0.5; // reflect i and j so as +ve is in direction of title block ## b = j * block[1] * 0.5; - view_x = ceil(a + 0.5) * width + ceil(a) * depth; // extreme coords of view in direction of block, measured from far corner of (0, 0) view, - view_y = ceil(b + 0.5) * height + ceil(b) * depth; // can be -ve if view is on opposite side of (0, 0) from title block - v_x_r = view_x / layout_width; // make relative + view_x = ceil(a + 0.5) * width + + ceil(a) * depth; // extreme coords of view in direction of block, measured + // from far corner of (0, 0) view, + view_y = ceil(b + 0.5) * height + + ceil(b) * depth; // can be -ve if view is on opposite + // side of (0, 0) from title block + v_x_r = view_x / layout_width; // make relative v_y_r = view_y / layout_height; - if (v_x_r > rel_space_x && v_y_r > rel_space_y) // ## so that can use > in this condition regardless of position of block + if (v_x_r > rel_space_x + && v_y_r > rel_space_y) { // ## so that can use > in this condition regardless + // of position of block interferes = true; + } } + } + } - if (!interferes) + if (!interferes) { page_dims = large; - else - { - if (min(small_h[2] / layout_width, small_h[3] / layout_height) > min(small_v[2] / layout_width, small_v[3] / layout_height)) + } + else { + if (min(small_h[2] / layout_width, small_h[3] / layout_height) + > min(small_v[2] / layout_width, small_v[3] / layout_height)) { page_dims = small_h; - else + } + else { page_dims = small_v; + } } } -void OrthoViews::calc_scale() // compute scale required to meet minimum space requirements +void OrthoViews::calc_scale() // compute scale required to meet minimum space requirements { float scale_x, scale_y, working_scale; @@ -437,23 +470,28 @@ void OrthoViews::calc_scale() // compute scale req working_scale = min(scale_x, scale_y); - //which gives the largest scale for which the min_space requirements can be met, but we want a 'sensible' scale, rather than 0.28457239... - //eg if working_scale = 0.115, then we want to use 0.1, similarly 7.65 -> 5, and 76.5 -> 50 + // which gives the largest scale for which the min_space requirements can be met, but we want a + // 'sensible' scale, rather than 0.28457239... eg if working_scale = 0.115, then we want to use + // 0.1, similarly 7.65 -> 5, and 76.5 -> 50 - float exponent = floor(log10(working_scale)); //if working_scale = a * 10^b, what is b? - working_scale *= pow(10, -exponent); //now find what 'a' is. + float exponent = floor(log10(working_scale)); // if working_scale = a * 10^b, what is b? + working_scale *= pow(10, -exponent); // now find what 'a' is. - float valid_scales[2][8] = {{1, 1.25, 2, 2.5, 3.75, 5, 7.5, 10}, //equate to 1:10, 1:8, 1:5, 1:4, 3:8, 1:2, 3:4, 1:1 - {1, 1.5, 2, 3, 4, 5, 8, 10}}; //equate to 1:1, 3:2, 2:1, 3:1, 4:1, 5:1, 8:1, 10:1 + float valid_scales[2][8] = { + {1, 1.25, 2, 2.5, 3.75, 5, 7.5, 10}, // equate to 1:10, 1:8, 1:5, 1:4, 3:8, 1:2, 3:4, 1:1 + {1, 1.5, 2, 3, 4, 5, 8, 10}}; // equate to 1:1, 3:2, 2:1, 3:1, 4:1, 5:1, 8:1, 10:1 int i = 7; - while (valid_scales[(exponent>=0)][i] > working_scale) //choose closest value smaller than 'a' from list. - i -= 1; //choosing top list if exponent -ve, bottom list for +ve exponent + while (valid_scales[(exponent >= 0)][i] + > working_scale) { // choose closest value smaller than 'a' from list. + i -= 1; // choosing top list if exponent -ve, bottom list for +ve exponent + } - scale = valid_scales[(exponent>=0)][i] * pow(10, exponent); //now have the appropriate scale, reapply the *10^b + scale = valid_scales[(exponent >= 0)][i] + * pow(10, exponent); // now have the appropriate scale, reapply the *10^b } -void OrthoViews::calc_offsets() // calcs SVG coords for centre of upper left view +void OrthoViews::calc_offsets() // calcs SVG coords for centre of upper left view { // space_x is the empty clear white space between views // gap_x is the centre - centre distance between views @@ -464,42 +502,46 @@ void OrthoViews::calc_offsets() // calcs SVG coords gap_x = space_x + scale * (width + depth) * 0.5; gap_y = space_y + scale * (height + depth) * 0.5; - if (min_r_x % 2 == 0) + if (min_r_x % 2 == 0) { offset_x = page_dims[0] + space_x + 0.5 * scale * width; - else + } + else { offset_x = page_dims[0] + space_x + 0.5 * scale * depth; + } - if (max_r_y % 2 == 0) + if (max_r_y % 2 == 0) { offset_y = page_dims[1] + space_y + 0.5 * scale * height; - else + } + else { offset_y = page_dims[1] + space_y + 0.5 * scale * depth; + } } -void OrthoViews::set_views() // process all views - scale & positions +void OrthoViews::set_views() // process all views - scale & positions { float x; float y; - for (unsigned int i = 0; i < views.size(); i++) - { + for (unsigned int i = 0; i < views.size(); i++) { x = offset_x + (views[i]->rel_x - min_r_x) * gap_x; y = offset_y + (max_r_y - views[i]->rel_y) * gap_y; - if (views[i]->auto_scale) + if (views[i]->auto_scale) { views[i]->setScale(scale); + } views[i]->setPos(x, y); } } -void OrthoViews::process_views() // update scale and positions of views +void OrthoViews::process_views() // update scale and positions of views { - if (autodims) - { + if (autodims) { calc_layout_size(); - if (title) + if (title) { choose_page(); + } calc_scale(); calc_offsets(); @@ -513,8 +555,9 @@ void OrthoViews::set_hidden(bool state) { hidden = state; - for (unsigned int i = 0; i < views.size(); i++) + for (unsigned int i = 0; i < views.size(); i++) { views[i]->hidden(hidden); + } parent_doc->recompute(); } @@ -523,86 +566,91 @@ void OrthoViews::set_smooth(bool state) { smooth = state; - for (unsigned int i = 0; i < views.size(); i++) + for (unsigned int i = 0; i < views.size(); i++) { views[i]->smooth(smooth); + } parent_doc->recompute(); } -void OrthoViews::set_primary(gp_Dir facing, gp_Dir right) // set the orientation of the primary view +void OrthoViews::set_primary(gp_Dir facing, + gp_Dir right) // set the orientation of the primary view { primary.SetDirection(facing); primary.SetXDirection(right); gp_Dir up = primary.YDirection(); // compute dimensions of part when orientated according to primary view - width = abs(right.X() * bbox.LengthX() + right.Y() * bbox.LengthY() + right.Z() * bbox.LengthZ()); + width = + abs(right.X() * bbox.LengthX() + right.Y() * bbox.LengthY() + right.Z() * bbox.LengthZ()); height = abs(up.X() * bbox.LengthX() + up.Y() * bbox.LengthY() + up.Z() * bbox.LengthZ()); - depth = abs(facing.X() * bbox.LengthX() + facing.Y() * bbox.LengthY() + facing.Z() * bbox.LengthZ()); + depth = abs(facing.X() * bbox.LengthX() + facing.Y() * bbox.LengthY() + + facing.Z() * bbox.LengthZ()); - if (views.size() == 0) + if (views.size() == 0) { add_view(0, 0); - else - { + } + else { views[0]->set_projection(primary); - set_all_orientations(); // reorient all other views appropriately + set_all_orientations(); // reorient all other views appropriately process_views(); } } -void OrthoViews::set_orientation(int index) // set orientation of single view +void OrthoViews::set_orientation(int index) // set orientation of single view { - double rotation; - int n; // how many 90* rotations from primary view? - gp_Dir dir; // rotate about primary x axis (if in a relative y position) or y axis? - gp_Ax2 cs; + double rotation; + int n; // how many 90* rotations from primary view? + gp_Dir dir; // rotate about primary x axis (if in a relative y position) or y axis? + gp_Ax2 cs; - if (views[index]->ortho) - { - if (views[index]->rel_x != 0) - { + if (views[index]->ortho) { + if (views[index]->rel_x != 0) { dir = primary.YDirection(); n = views[index]->rel_x; } - else - { + else { dir = primary.XDirection(); n = -views[index]->rel_y; } - rotation = n * rotate_coeff * M_PI / 2; // rotate_coeff is -1 or 1 for 1st or 3rd angle + rotation = n * rotate_coeff * M_PI / 2; // rotate_coeff is -1 or 1 for 1st or 3rd angle cs = primary.Rotated(gp_Ax1(gp_Pnt(0, 0, 0), dir), rotation); views[index]->set_projection(cs); } } -void OrthoViews::set_all_orientations() // set orientations of all views (ie projection or primary changed) +void OrthoViews::set_all_orientations() // set orientations of all views (ie projection or primary + // changed) { - for (unsigned int i = 1; i < views.size(); i++) // start from 1 - the 0 is the primary view + for (unsigned int i = 1; i < views.size(); i++) // start from 1 - the 0 is the primary view { - if (views[i]->ortho) + if (views[i]->ortho) { set_orientation(i); - else + } + else { set_Axo(views[i]->rel_x, views[i]->rel_y); + } } } -void OrthoViews::set_projection(int proj) // 1 = 1st angle, 3 = 3rd angle +void OrthoViews::set_projection(int proj) // 1 = 1st angle, 3 = 3rd angle { - if (proj == 3) + if (proj == 3) { rotate_coeff = 1; - else if (proj == 1) + } + else if (proj == 1) { rotate_coeff = -1; + } set_all_orientations(); process_views(); } -void OrthoViews::add_view(int rel_x, int rel_y) // add a new view to the layout +void OrthoViews::add_view(int rel_x, int rel_y) // add a new view to the layout { - if (index(rel_x, rel_y) == -1) - { - orthoview * view = new orthoview(parent_doc, part, page, & bbox); + if (index(rel_x, rel_y) == -1) { + orthoview* view = new orthoview(parent_doc, part, page, &bbox); view->set_data(rel_x, rel_y); views.push_back(view); @@ -618,21 +666,22 @@ void OrthoViews::add_view(int rel_x, int rel_y) // add a new view to views[i]->hidden(hidden); views[i]->smooth(smooth); - if (views[i]->ortho) + if (views[i]->ortho) { set_orientation(i); - else + } + else { set_Axo(rel_x, rel_y); + } process_views(); } } -void OrthoViews::del_view(int rel_x, int rel_y) // remove a view from the layout +void OrthoViews::del_view(int rel_x, int rel_y) // remove a view from the layout { int num = index(rel_x, rel_y); - if (num > 0) - { + if (num > 0) { { boost::signals2::shared_connection_block blocker(connectDocumentDeletedObject); views[num]->deleteme(); @@ -643,9 +692,9 @@ void OrthoViews::del_view(int rel_x, int rel_y) // remove a view fro min_r_x = max_r_x = 0; min_r_y = max_r_y = 0; - for (unsigned int i = 1; i < views.size(); i++) // start from 1 - the 0 is the primary view + for (unsigned int i = 1; i < views.size(); i++) // start from 1 - the 0 is the primary view { - min_r_x = min(min_r_x, views[i]->rel_x); // calculate extremes from remaining views + min_r_x = min(min_r_x, views[i]->rel_x); // calculate extremes from remaining views max_r_x = max(max_r_x, views[i]->rel_x); min_r_y = min(min_r_y, views[i]->rel_y); max_r_y = max(max_r_y, views[i]->rel_y); @@ -661,7 +710,7 @@ void OrthoViews::del_view(int rel_x, int rel_y) // remove a view fro void OrthoViews::del_all() { boost::signals2::shared_connection_block blocker(connectDocumentDeletedObject); - for (int i = views.size() - 1; i >= 0; i--) // count downwards to delete from back + for (int i = views.size() - 1; i >= 0; i--) // count downwards to delete from back { views[i]->deleteme(); delete views[i]; @@ -669,36 +718,38 @@ void OrthoViews::del_all() } } -int OrthoViews::is_Ortho(int rel_x, int rel_y) // is the view at r_x, r_y an ortho or axo one? +int OrthoViews::is_Ortho(int rel_x, int rel_y) // is the view at r_x, r_y an ortho or axo one? { int result = index(rel_x, rel_y); - if (result != -1) + if (result != -1) { result = views[result]->ortho; + } return result; } -int OrthoViews::index(int rel_x, int rel_y) // index in vector of view, -1 if doesn't exist +int OrthoViews::index(int rel_x, int rel_y) // index in vector of view, -1 if doesn't exist { int index = -1; - for (unsigned int i = 0; i < views.size(); i++) - if (views[i]->rel_x == rel_x && views[i]->rel_y == rel_y) - { + for (unsigned int i = 0; i < views.size(); i++) { + if (views[i]->rel_x == rel_x && views[i]->rel_y == rel_y) { index = i; break; } + } return index; } -void OrthoViews::set_Axo_scale(int rel_x, int rel_y, float axo_scale) // set an axo scale independent of ortho ones +void OrthoViews::set_Axo_scale(int rel_x, + int rel_y, + float axo_scale) // set an axo scale independent of ortho ones { int num = index(rel_x, rel_y); - if (num != -1 && !views[num]->ortho) - { + if (num != -1 && !views[num]->ortho) { views[num]->auto_scale = false; views[num]->setScale(axo_scale); views[num]->setPos(); @@ -706,38 +757,41 @@ void OrthoViews::set_Axo_scale(int rel_x, int rel_y, float axo_scale) // s } } -void OrthoViews::set_Axo(int rel_x, int rel_y, gp_Dir up, gp_Dir right, bool away, int axo, bool tri) // set custom axonometric view +void OrthoViews::set_Axo(int rel_x, + int rel_y, + gp_Dir up, + gp_Dir right, + bool away, + int axo, + bool tri) // set custom axonometric view { - double rotations[2]; + double rotations[2]; - if (axo == 0) - { + if (axo == 0) { rotations[0] = -0.7853981633974476; rotations[1] = -0.6154797086703873; } - else if (axo == 1) - { + else if (axo == 1) { rotations[0] = -0.7853981633974476; rotations[1] = -0.2712637537260206; } - else if (tri) - { + else if (tri) { rotations[0] = -1.3088876392502007; rotations[1] = -0.6156624905260762; } - else - { + else { rotations[0] = 1.3088876392502007 - M_PI / 2; rotations[1] = -0.6156624905260762; } - if (away) - rotations[1] = - rotations[1]; + if (away) { + rotations[1] = -rotations[1]; + } - gp_Ax2 cs = gp_Ax2(gp_Pnt(0, 0, 0), right); + gp_Ax2 cs = gp_Ax2(gp_Pnt(0, 0, 0), right); cs.SetYDirection(up); cs.Rotate(gp_Ax1(gp_Pnt(0, 0, 0), up), rotations[0]); - gp_Dir dir; + gp_Dir dir; dir = cs.XDirection(); cs.Rotate(gp_Ax1(gp_Pnt(0, 0, 0), dir), rotations[1]); @@ -757,47 +811,49 @@ void OrthoViews::set_Axo(int rel_x, int rel_y, gp_Dir up, gp_Dir right, bool awa parent_doc->recompute(); } -void OrthoViews::set_Axo(int rel_x, int rel_y) // set view to default axo projection +void OrthoViews::set_Axo(int rel_x, int rel_y) // set view to default axo projection { int num = index(rel_x, rel_y); - if (num != -1) - { - gp_Dir up = primary.YDirection(); // default to view from up and right + if (num != -1) { + gp_Dir up = primary.YDirection(); // default to view from up and right gp_Dir right = primary.XDirection(); bool away = false; - if (rel_x * rel_y != 0) // but change default if it's a diagonal position + if (rel_x * rel_y != 0) // but change default if it's a diagonal position { - if (rotate_coeff == 1) // third angle + if (rotate_coeff == 1) // third angle { away = (rel_y < 0); - if (rel_x < 0) + if (rel_x < 0) { right = primary.Direction(); - else + } + else { right = primary.XDirection(); + } } - else // first angle + else // first angle { away = (rel_y > 0); - if (rel_x > 0) + if (rel_x > 0) { right = primary.Direction(); - else + } + else { right = primary.XDirection(); + } } } set_Axo(rel_x, rel_y, up, right, away); } } -void OrthoViews::set_Ortho(int rel_x, int rel_y) // return view to orthographic +void OrthoViews::set_Ortho(int rel_x, int rel_y) // return view to orthographic { int num = index(rel_x, rel_y); - if (num != -1 && rel_x * rel_y == 0) - { + if (num != -1 && rel_x * rel_y == 0) { views[num]->ortho = true; views[num]->setScale(scale); views[num]->auto_scale = true; @@ -808,12 +864,18 @@ void OrthoViews::set_Ortho(int rel_x, int rel_y) // return view to or } } -bool OrthoViews::get_Axo(int rel_x, int rel_y, int & axo, gp_Dir & up, gp_Dir & right, bool & away, bool & tri, float & axo_scale) +bool OrthoViews::get_Axo(int rel_x, + int rel_y, + int& axo, + gp_Dir& up, + gp_Dir& right, + bool& away, + bool& tri, + float& axo_scale) { int num = index(rel_x, rel_y); - if (num != -1 && !views[num]->ortho) - { + if (num != -1 && !views[num]->ortho) { axo = views[num]->axo; up = views[num]->up; right = views[num]->right; @@ -822,21 +884,22 @@ bool OrthoViews::get_Axo(int rel_x, int rel_y, int & axo, gp_Dir & up, gp_Dir & axo_scale = views[num]->getScale(); return true; } - else + else { return false; + } } void OrthoViews::auto_dims(bool setting) { autodims = setting; - if (autodims) + if (autodims) { process_views(); + } } -void OrthoViews::set_configs(float configs[5]) // for autodims off, set scale & positionings +void OrthoViews::set_configs(float configs[5]) // for autodims off, set scale & positionings { - if (!autodims) - { + if (!autodims) { scale = configs[0]; offset_x = configs[1]; offset_y = configs[2]; @@ -846,7 +909,7 @@ void OrthoViews::set_configs(float configs[5]) // for autodims off, } } -void OrthoViews::get_configs(float configs[5]) // get scale & positionings +void OrthoViews::get_configs(float configs[5]) // get scale & positionings { configs[0] = scale; configs[1] = offset_x; @@ -859,22 +922,24 @@ void OrthoViews::get_configs(float configs[5]) // get scale & posit /////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////// -TaskOrthoViews::TaskOrthoViews(QWidget *parent) - : ui(new Ui_TaskOrthoViews) +TaskOrthoViews::TaskOrthoViews(QWidget* parent) + : ui(new Ui_TaskOrthoViews) { Q_UNUSED(parent); ui->setupUi(this); - std::vector obj = Gui::Selection().getObjectsOfType(Part::Feature::getClassTypeId()); - const char * part = obj.front()->getNameInDocument(); + std::vector obj = + Gui::Selection().getObjectsOfType(Part::Feature::getClassTypeId()); + const char* part = obj.front()->getNameInDocument(); - App::Document * doc = App::GetApplication().getActiveDocument(); - std::vector pages = Gui::Selection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); + App::Document* doc = App::GetApplication().getActiveDocument(); + std::vector pages = + Gui::Selection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); if (pages.empty()) { pages = doc->getObjectsOfType(Drawing::FeaturePage::getClassTypeId()); } std::string PageName = pages.front()->getNameInDocument(); - const char * page = PageName.c_str(); + const char* page = PageName.c_str(); // ********************************************************************** @@ -884,28 +949,30 @@ TaskOrthoViews::TaskOrthoViews(QWidget *parent) // ********************************************************************** // [x+2][y+2] - c_boxes[0][2] = ui->cb02; //left most, x = -2, y = 0 + c_boxes[0][2] = ui->cb02; // left most, x = -2, y = 0 c_boxes[1][1] = ui->cb11; c_boxes[1][2] = ui->cb12; c_boxes[1][3] = ui->cb13; - c_boxes[2][0] = ui->cb20; //top most, x = 0, y = -2 + c_boxes[2][0] = ui->cb20; // top most, x = 0, y = -2 c_boxes[2][1] = ui->cb21; - c_boxes[2][2] = ui->cb22; //centre (primary view) checkbox x = y = 0. + c_boxes[2][2] = ui->cb22; // centre (primary view) checkbox x = y = 0. c_boxes[2][3] = ui->cb23; - c_boxes[2][4] = ui->cb24; //bottom most, x = 0, y = 2 + c_boxes[2][4] = ui->cb24; // bottom most, x = 0, y = 2 c_boxes[3][1] = ui->cb31; c_boxes[3][2] = ui->cb32; c_boxes[3][3] = ui->cb33; - c_boxes[4][2] = ui->cb42; //right most, x = 2, y = 0 + c_boxes[4][2] = ui->cb42; // right most, x = 2, y = 0 - for (int i=0; i < 5; i++) - { - for (int j=0; j < 5; j++) - { - if ((abs(i-2) + abs(j-2)) < 3) //if i,j combination corresponds to valid check box, then proceed with: + for (int i = 0; i < 5; i++) { + for (int j = 0; j < 5; j++) { + if ((abs(i - 2) + abs(j - 2)) + < 3) // if i,j combination corresponds to valid check box, then proceed with: { connect(c_boxes[i][j], SIGNAL(toggled(bool)), this, SLOT(cb_toggled(bool))); - connect(c_boxes[i][j], SIGNAL(customContextMenuRequested(const QPoint&)),this, SLOT(ShowContextMenu(const QPoint&))); + connect(c_boxes[i][j], + SIGNAL(customContextMenuRequested(const QPoint&)), + this, + SLOT(ShowContextMenu(const QPoint&))); } } } @@ -917,9 +984,11 @@ TaskOrthoViews::TaskOrthoViews(QWidget *parent) inputs[3] = ui->spacing_h_3; inputs[4] = ui->spacing_v_4; - for (int i=0; i < 5; i++) - { - connect(inputs[i], SIGNAL(textEdited(const QString &)), this, SLOT(data_entered(const QString &))); + for (int i = 0; i < 5; i++) { + connect(inputs[i], + SIGNAL(textEdited(const QString&)), + this, + SLOT(data_entered(const QString&))); connect(inputs[i], SIGNAL(returnPressed()), this, SLOT(text_return())); } @@ -936,10 +1005,13 @@ TaskOrthoViews::TaskOrthoViews(QWidget *parent) connect(ui->axoRight, SIGNAL(activated(int)), this, SLOT(change_axo(int))); connect(ui->vert_flip, SIGNAL(clicked()), this, SLOT(axo_button())); connect(ui->tri_flip, SIGNAL(clicked()), this, SLOT(axo_button())); - connect(ui->axoScale, SIGNAL(textEdited(const QString &)), this, SLOT(axo_scale(const QString &))); + connect(ui->axoScale, + SIGNAL(textEdited(const QString&)), + this, + SLOT(axo_scale(const QString&))); connect(ui->axoScale, SIGNAL(returnPressed()), this, SLOT(text_return())); - ui->tabWidget->setTabEnabled(1,false); + ui->tabWidget->setTabEnabled(1, false); gp_Dir facing = gp_Dir(1, 0, 0); gp_Dir right = gp_Dir(0, 1, 0); @@ -947,7 +1019,7 @@ TaskOrthoViews::TaskOrthoViews(QWidget *parent) orthos->set_primary(facing, right); txt_return = false; -} //end of constructor +} // end of constructor TaskOrthoViews::~TaskOrthoViews() { @@ -964,29 +1036,28 @@ void TaskOrthoViews::ShowContextMenu(const QPoint& pos) letter = name.toStdString()[1]; int dy = letter - '0' - 2; - if (c_boxes[dx + 2][dy + 2]->isChecked()) - { + if (c_boxes[dx + 2][dy + 2]->isChecked()) { QString str_1 = QObject::tr("Make axonometric..."); QString str_2 = QObject::tr("Edit axonometric settings..."); QString str_3 = QObject::tr("Make orthographic"); QPoint globalPos = c_boxes[dx + 2][dy + 2]->mapToGlobal(pos); QMenu myMenu; - if (orthos->is_Ortho(dx, -dy)) + if (orthos->is_Ortho(dx, -dy)) { myMenu.addAction(str_1); - else - { + } + else { myMenu.addAction(str_2); - if (dx * dy == 0) + if (dx * dy == 0) { myMenu.addAction(str_3); + } } - QAction * selectedItem = myMenu.exec(globalPos); - if (selectedItem) - { + QAction* selectedItem = myMenu.exec(globalPos); + if (selectedItem) { QString text = selectedItem->text(); - if (text == str_1) // make axo + if (text == str_1) // make axo { orthos->set_Axo(dx, -dy); axo_r_x = dx; @@ -995,7 +1066,7 @@ void TaskOrthoViews::ShowContextMenu(const QPoint& pos) ui->tabWidget->setCurrentIndex(1); setup_axo_tab(); } - else if (text == str_2) // edit axo + else if (text == str_2) // edit axo { axo_r_x = dx; axo_r_y = dy; @@ -1003,11 +1074,10 @@ void TaskOrthoViews::ShowContextMenu(const QPoint& pos) ui->tabWidget->setCurrentIndex(1); setup_axo_tab(); } - else if (text == str_3) // make ortho + else if (text == str_3) // make ortho { orthos->set_Ortho(dx, -dy); - if (dx == axo_r_x && dy == axo_r_y) - { + if (dx == axo_r_x && dy == axo_r_y) { axo_r_x = 0; axo_r_y = 0; ui->tabWidget->setTabEnabled(1, false); @@ -1017,7 +1087,7 @@ void TaskOrthoViews::ShowContextMenu(const QPoint& pos) } } -void TaskOrthoViews::changeEvent(QEvent *e) +void TaskOrthoViews::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -1033,10 +1103,9 @@ void TaskOrthoViews::cb_toggled(bool toggle) letter = name.toStdString()[1]; int dy = letter - '0' - 2; - if (toggle) - { + if (toggle) { orthos->add_view(dx, -dy); - if (dx * dy != 0) // adding an axo view + if (dx * dy != 0) // adding an axo view { axo_r_x = dx; axo_r_y = dy; @@ -1045,11 +1114,11 @@ void TaskOrthoViews::cb_toggled(bool toggle) setup_axo_tab(); } } - else // removing a view + else // removing a view { - if (!orthos->is_Ortho(dx, -dy)) // is it an axo one? + if (!orthos->is_Ortho(dx, -dy)) // is it an axo one? { - if (dx == axo_r_x && dy == axo_r_y) // is it the one currently being edited? + if (dx == axo_r_x && dy == axo_r_y) // is it the one currently being edited? { axo_r_x = 0; axo_r_y = 0; @@ -1064,7 +1133,7 @@ void TaskOrthoViews::cb_toggled(bool toggle) void TaskOrthoViews::projectionChanged(int index) { - int proj = 3 - 2 * index; // index = 0 = third angle + int proj = 3 - 2 * index; // index = 0 = third angle orthos->set_projection(proj); set_configs(); @@ -1072,22 +1141,24 @@ void TaskOrthoViews::projectionChanged(int index) void TaskOrthoViews::setPrimary(int /*dir*/) { - int p_sel = ui->view_from->currentIndex(); // index for entry selected for 'view from' - int r_sel = ui->axis_right->currentIndex(); // index for entry selected for 'rightwards axis' + int p_sel = ui->view_from->currentIndex(); // index for entry selected for 'view from' + int r_sel = ui->axis_right->currentIndex(); // index for entry selected for 'rightwards axis' - int p_vec[3] = {0, 0, 0}; // will be the vector for 'view from' - int r_vec[3] = {0, 0, 0}; // will be vector for 'rightwards axis' + int p_vec[3] = {0, 0, 0}; // will be the vector for 'view from' + int r_vec[3] = {0, 0, 0}; // will be vector for 'rightwards axis' int r[2] = {0, 1}; - int pos = 1 - 2 * int(p_sel / 3); // 1 if p_sel = 0, 1, 2 or -1 if p_sel = 3, 4, 5 - p_sel = p_sel % 3; // p_sel = 0, 1, 2 + int pos = 1 - 2 * int(p_sel / 3); // 1 if p_sel = 0, 1, 2 or -1 if p_sel = 3, 4, 5 + p_sel = p_sel % 3; // p_sel = 0, 1, 2 p_vec[p_sel] = pos; - for (int i = p_sel; i < 2; i++) // make r[2] to be, {0, 1}, {0, 2}, or {1, 2} depending upon p_sel + for (int i = p_sel; i < 2; + i++) { // make r[2] to be, {0, 1}, {0, 2}, or {1, 2} depending upon p_sel r[i] += 1; + } - pos = 1 - 2 * int(r_sel / 2); // 1 if r_sel = 0, 1 or -1 if r_sel = 3, 4 - r_sel = r_sel % 2; // r_sel = 0, 1 + pos = 1 - 2 * int(r_sel / 2); // 1 if r_sel = 0, 1 or -1 if r_sel = 3, 4 + r_sel = r_sel % 2; // r_sel = 0, 1 r_vec[r[r_sel]] = pos; gp_Dir facing = gp_Dir(p_vec[0], p_vec[1], p_vec[2]); @@ -1096,13 +1167,14 @@ void TaskOrthoViews::setPrimary(int /*dir*/) orthos->set_primary(facing, right); // update rightwards combobox in case of 'view from' change - if (sender() == ui->view_from) - { + if (sender() == ui->view_from) { disconnect(ui->axis_right, SIGNAL(currentIndexChanged(int)), this, SLOT(setPrimary(int))); QStringList items; - items << QString::fromUtf8("X +ve") << QString::fromUtf8("Y +ve") << QString::fromUtf8("Z +ve"); - items << QString::fromUtf8("X -ve") << QString::fromUtf8("Y -ve") << QString::fromUtf8("Z -ve"); + items << QString::fromUtf8("X +ve") << QString::fromUtf8("Y +ve") + << QString::fromUtf8("Z +ve"); + items << QString::fromUtf8("X -ve") << QString::fromUtf8("Y -ve") + << QString::fromUtf8("Z -ve"); items.removeAt(p_sel + 3); items.removeAt(p_sel); @@ -1129,30 +1201,31 @@ void TaskOrthoViews::smooth(int i) void TaskOrthoViews::toggle_auto(int i) { - if (i == 2) //auto scale switched on + if (i == 2) // auto scale switched on { orthos->auto_dims(true); ui->label_4->setEnabled(false); ui->label_5->setEnabled(false); ui->label_6->setEnabled(false); - for (int j = 0; j < 5; j++) - inputs[j]->setEnabled(false); //disable user input boxes + for (int j = 0; j < 5; j++) { + inputs[j]->setEnabled(false); // disable user input boxes + } } - else - { + else { orthos->auto_dims(false); ui->label_4->setEnabled(true); ui->label_5->setEnabled(true); ui->label_6->setEnabled(true); - for (int j = 0; j < 5; j++) - inputs[j]->setEnabled(true); //enable user input boxes + for (int j = 0; j < 5; j++) { + inputs[j]->setEnabled(true); // enable user input boxes + } set_configs(); } } -void TaskOrthoViews::data_entered(const QString & text) +void TaskOrthoViews::data_entered(const QString& text) { bool ok; QString name = sender()->objectName().right(1); @@ -1161,13 +1234,11 @@ void TaskOrthoViews::data_entered(const QString & text) float value = text.toFloat(&ok); - if (ok) - { + if (ok) { data[index] = value; orthos->set_configs(data); } - else - { + else { inputs[index]->setText(QString::number(data[index])); return; } @@ -1180,33 +1251,41 @@ void TaskOrthoViews::clean_up() void TaskOrthoViews::setup_axo_tab() { - int axo; - gp_Dir up, right; - bool away, tri; - float axo_scale; - int up_n, right_n; + int axo; + gp_Dir up, right; + bool away, tri; + float axo_scale; + int up_n, right_n; orthos->get_Axo(axo_r_x, -axo_r_y, axo, up, right, away, tri, axo_scale); // convert gp_Dirs into selections of comboboxes - if (up.X() != 0) + if (up.X() != 0) { up_n = (up.X() == -1) ? 3 : 0; - else if (up.Y() != 0) + } + else if (up.Y() != 0) { up_n = (up.Y() == -1) ? 4 : 1; - else + } + else { up_n = (up.Z() == -1) ? 5 : 2; + } - if (right.X() != 0) + if (right.X() != 0) { right_n = (right.X() == -1) ? 3 : 0; - else if (right.Y() != 0) + } + else if (right.Y() != 0) { right_n = (right.Y() == -1) ? 4 : 1; - else + } + else { right_n = (right.Z() == -1) ? 5 : 2; + } - if (right_n > (up_n % 3 + 3)) + if (right_n > (up_n % 3 + 3)) { right_n -= 2; - else if (right_n > up_n) + } + else if (right_n > up_n) { right_n -= 1; + } QStringList items; items << QString::fromUtf8("X +ve") << QString::fromUtf8("Y +ve") << QString::fromUtf8("Z +ve"); @@ -1227,19 +1306,20 @@ void TaskOrthoViews::setup_axo_tab() void TaskOrthoViews::change_axo(int /*p*/) { - int u_sel = ui->axoUp->currentIndex(); // index for entry selected for 'view from' - int r_sel = ui->axoRight->currentIndex(); // index for entry selected for 'rightwards axis' + int u_sel = ui->axoUp->currentIndex(); // index for entry selected for 'view from' + int r_sel = ui->axoRight->currentIndex(); // index for entry selected for 'rightwards axis' - int u_vec[3] = {0, 0, 0}; // will be the vector for 'view from' - int r_vec[3] = {0, 0, 0}; // will be vector for 'rightwards axis' + int u_vec[3] = {0, 0, 0}; // will be the vector for 'view from' + int r_vec[3] = {0, 0, 0}; // will be vector for 'rightwards axis' int r[2] = {0, 1}; - int pos = 1 - 2 * int(u_sel / 3); // 1 if p_sel = 0,1,2 or -1 if p_sel = 3,4,5 - u_sel = u_sel % 3; // p_sel = 0,1,2 + int pos = 1 - 2 * int(u_sel / 3); // 1 if p_sel = 0,1,2 or -1 if p_sel = 3,4,5 + u_sel = u_sel % 3; // p_sel = 0,1,2 u_vec[u_sel] = pos; - for (int i = u_sel; i < 2; i++) + for (int i = u_sel; i < 2; i++) { r[i] += 1; + } pos = 1 - 2 * int(r_sel / 2); r_sel = r_sel % 2; @@ -1248,12 +1328,20 @@ void TaskOrthoViews::change_axo(int /*p*/) gp_Dir up = gp_Dir(u_vec[0], u_vec[1], u_vec[2]); gp_Dir right = gp_Dir(r_vec[0], r_vec[1], r_vec[2]); - orthos->set_Axo(axo_r_x, -axo_r_y, up, right, ui->vert_flip->isChecked(), ui->axoProj->currentIndex(), ui->tri_flip->isChecked()); + orthos->set_Axo(axo_r_x, + -axo_r_y, + up, + right, + ui->vert_flip->isChecked(), + ui->axoProj->currentIndex(), + ui->tri_flip->isChecked()); - if (ui->axoProj->currentIndex() == 2) + if (ui->axoProj->currentIndex() == 2) { ui->tri_flip->setEnabled(true); - else + } + else { ui->tri_flip->setEnabled(false); + } QStringList items; @@ -1272,33 +1360,36 @@ void TaskOrthoViews::axo_button() change_axo(); } -void TaskOrthoViews::axo_scale(const QString & text) +void TaskOrthoViews::axo_scale(const QString& text) { bool ok; float value = text.toFloat(&ok); - if (ok) + if (ok) { orthos->set_Axo_scale(axo_r_x, -axo_r_y, value); + } } void TaskOrthoViews::set_configs() { orthos->get_configs(data); - for (int i = 0; i < 5; i++) + for (int i = 0; i < 5; i++) { inputs[i]->setText(QString::number(data[i])); + } } bool TaskOrthoViews::user_input() { - if (txt_return) - { - txt_return = false; // return was pressed while text box had focus - ui->label_7->setFocus(); // move focus out of text box - return true; // return that we were editing + if (txt_return) { + txt_return = false; // return was pressed while text box had focus + ui->label_7->setFocus(); // move focus out of text box + return true; // return that we were editing + } + else { + return false; // return that we weren't editing ---> treat as clicking OK... we can close + // the GUI } - else - return false; // return that we weren't editing ---> treat as clicking OK... we can close the GUI } void TaskOrthoViews::text_return() @@ -1315,33 +1406,33 @@ TaskDlgOrthoViews::TaskDlgOrthoViews() : TaskDialog() { widget = new TaskOrthoViews(); - taskbox = new Gui::TaskView::TaskBox( - Gui::BitmapFactory().pixmap("actions/drawing-orthoviews"), widget->windowTitle(), true, nullptr); + taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/drawing-orthoviews"), + widget->windowTitle(), + true, + nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } TaskDlgOrthoViews::~TaskDlgOrthoViews() -{ -} +{} //==== calls from the TaskView =============================================================== void TaskDlgOrthoViews::open() -{ -} +{} void TaskDlgOrthoViews::clicked(int) -{ -} +{} bool TaskDlgOrthoViews::accept() { bool check = widget->user_input(); App::Document* doc = App::GetApplication().getDocument(this->getDocumentName().c_str()); - if (doc) + if (doc) { doc->commitTransaction(); + } return !check; } @@ -1349,8 +1440,9 @@ bool TaskDlgOrthoViews::reject() { widget->clean_up(); App::Document* doc = App::GetApplication().getDocument(this->getDocumentName().c_str()); - if (doc) + if (doc) { doc->abortTransaction(); + } return true; } diff --git a/src/Mod/Drawing/Gui/TaskOrthoViews.h b/src/Mod/Drawing/Gui/TaskOrthoViews.h index d680770beb..9172ed6f7e 100644 --- a/src/Mod/Drawing/Gui/TaskOrthoViews.h +++ b/src/Mod/Drawing/Gui/TaskOrthoViews.h @@ -36,175 +36,199 @@ #include -namespace DrawingGui { +namespace DrawingGui +{ class Ui_TaskOrthoViews; class orthoview { public: - orthoview(App::Document * parent, App::DocumentObject * part, App::DocumentObject * page, Base::BoundBox3d * partbox); + orthoview(App::Document* parent, + App::DocumentObject* part, + App::DocumentObject* page, + Base::BoundBox3d* partbox); ~orthoview(); - void set_data(int r_x, int r_y); - void set_projection(const gp_Ax2& cs); - void setPos(float = 0, float = 0); - void setScale(float newscale); - float getScale(); - void deleteme(); - void hidden(bool); - void smooth(bool); + void set_data(int r_x, int r_y); + void set_projection(const gp_Ax2& cs); + void setPos(float = 0, float = 0); + void setScale(float newscale); + float getScale(); + void deleteme(); + void hidden(bool); + void smooth(bool); - App::DocumentObject* getViewPart() { + App::DocumentObject* getViewPart() + { return this_view; } private: - void calcCentre(); + void calcCentre(); -public: // these aren't used by orthoView, but just informational, hence public - bool ortho; // orthonometric? or axonometric - bool auto_scale; // scale for axonometric has not been manually changed? - int rel_x, rel_y; // relative position of this view - bool away, tri; // binary parameters for axonometric view - int axo; // 0 / 1 / 2 = iso / di / tri metric - gp_Dir up, right; // directions prior to rotations (ie, what was used to orientate the projection) +public: // these aren't used by orthoView, but just informational, hence public + bool ortho; // orthonometric? or axonometric + bool auto_scale; // scale for axonometric has not been manually changed? + int rel_x, rel_y; // relative position of this view + bool away, tri; // binary parameters for axonometric view + int axo; // 0 / 1 / 2 = iso / di / tri metric + gp_Dir up, + right; // directions prior to rotations (ie, what was used to orientate the projection) private: - App::Document * parent_doc; - Drawing::FeatureViewPart * this_view; + App::Document* parent_doc; + Drawing::FeatureViewPart* this_view; - std::string myname; - float x, y; // 2D projection coords of bbox centre relative to origin - float cx, cy, cz; // coords of bbox centre in 3D space - float pageX, pageY; // required coords of centre of bbox projection on page - float scale; // scale of projection - gp_Dir X_dir, Y_dir, Z_dir; // directions of projection, X_dir makes x on page, Y_dir is y on page, Z_dir is out of page + std::string myname; + float x, y; // 2D projection coords of bbox centre relative to origin + float cx, cy, cz; // coords of bbox centre in 3D space + float pageX, pageY; // required coords of centre of bbox projection on page + float scale; // scale of projection + gp_Dir X_dir, Y_dir, Z_dir; // directions of projection, X_dir makes x on page, Y_dir is y on + // page, Z_dir is out of page }; class OrthoViews { public: - OrthoViews(App::Document*, const char * pagename, const char * partname); + OrthoViews(App::Document*, const char* pagename, const char* partname); ~OrthoViews(); - void set_primary(gp_Dir facing, gp_Dir right); - void add_view(int rel_x, int rel_y); - void del_view(int rel_x, int rel_y); - void del_all(); - void set_projection(int proj); - void set_hidden(bool state); - void set_smooth(bool state); - void set_Axo(int rel_x, int rel_y, gp_Dir up, gp_Dir right, bool away = false, int axo = 0, bool tri = false); - void set_Axo(int rel_x, int rel_y); - void set_Axo_scale(int rel_x, int rel_y, float axo_scale); - void set_Ortho(int rel_x, int rel_y); - int is_Ortho(int rel_x, int rel_y); - bool get_Axo(int rel_x, int rel_y, int & axo, gp_Dir & up, gp_Dir & right, bool & away, bool & tri, float & axo_scale); - void auto_dims(bool setting); - void set_configs(float configs[5]); - void get_configs(float configs[5]); + void set_primary(gp_Dir facing, gp_Dir right); + void add_view(int rel_x, int rel_y); + void del_view(int rel_x, int rel_y); + void del_all(); + void set_projection(int proj); + void set_hidden(bool state); + void set_smooth(bool state); + void set_Axo(int rel_x, + int rel_y, + gp_Dir up, + gp_Dir right, + bool away = false, + int axo = 0, + bool tri = false); + void set_Axo(int rel_x, int rel_y); + void set_Axo_scale(int rel_x, int rel_y, float axo_scale); + void set_Ortho(int rel_x, int rel_y); + int is_Ortho(int rel_x, int rel_y); + bool get_Axo(int rel_x, + int rel_y, + int& axo, + gp_Dir& up, + gp_Dir& right, + bool& away, + bool& tri, + float& axo_scale); + void auto_dims(bool setting); + void set_configs(float configs[5]); + void get_configs(float configs[5]); private: - void set_orientation(int index); - void load_page(); // get page / titleblock dims from template - void choose_page(); // determine correct portion of page to use to avoid interference with title block - void set_all_orientations(); // update orientations of all views following change in primary view - void calc_layout_size(); // what's the real world size of chosen layout, excluding spaces - void calc_offsets(); - void set_views(); - void calc_scale(); - void process_views(); - int index(int rel_x, int rel_y); - void slotDeletedObject(const App::DocumentObject& Obj); - void slotDeletedDocument(const App::Document& Obj); + void set_orientation(int index); + void load_page(); // get page / titleblock dims from template + void choose_page(); // determine correct portion of page to use to avoid interference with + // title block + void + set_all_orientations(); // update orientations of all views following change in primary view + void calc_layout_size(); // what's the real world size of chosen layout, excluding spaces + void calc_offsets(); + void set_views(); + void calc_scale(); + void process_views(); + int index(int rel_x, int rel_y); + void slotDeletedObject(const App::DocumentObject& Obj); + void slotDeletedDocument(const App::Document& Obj); private: - std::vector views; - Base::BoundBox3d bbox; - App::Document * parent_doc; - App::DocumentObject * part; - App::DocumentObject * page; + std::vector views; + Base::BoundBox3d bbox; + App::Document* parent_doc; + App::DocumentObject* part; + App::DocumentObject* page; - int large[4]; // arrays containing page size info [margin_x, margin_y, size_x, size_y] = [x1, y1, x2-x1, y2-y1] - int small_h[4], small_v[4]; // page size avoiding title block, using maximum horizontal / vertical space - int * page_dims; // points to one of above arrays for which set of page dimensions to use - int block[4]; // title block info [corner x, corner y, width, height], eg [-1, 1, w, h] is in top left corner - bool title; - int * horiz, * vert; // points to min or max r_x / r_y depending upon which corner title block is in + int large[4]; // arrays containing page size info [margin_x, margin_y, size_x, size_y] = [x1, + // y1, x2-x1, y2-y1] + int small_h[4], + small_v[4]; // page size avoiding title block, using maximum horizontal / vertical space + int* page_dims; // points to one of above arrays for which set of page dimensions to use + int block[4]; // title block info [corner x, corner y, width, height], eg [-1, 1, w, h] is in + // top left corner + bool title; + int *horiz, + *vert; // points to min or max r_x / r_y depending upon which corner title block is in - int rotate_coeff; // 1st (= -1) or 3rd (= 1) angle - int min_r_x, max_r_x; // extreme relative positions of views - int min_r_y, max_r_y; // " " " - float width, height, depth; // of non-scaled primary view - float layout_width, layout_height; // of non-scaled layout without spaces - float gap_x, gap_y, min_space; // required spacing between views - float offset_x, offset_y; // coords of centre of upper left view - float scale; - int num_gaps_x, num_gaps_y; // how many gaps between views/edges? = num of views in given direction + 1 - gp_Ax2 primary; // coord system of primary view + int rotate_coeff; // 1st (= -1) or 3rd (= 1) angle + int min_r_x, max_r_x; // extreme relative positions of views + int min_r_y, max_r_y; // " " " + float width, height, depth; // of non-scaled primary view + float layout_width, layout_height; // of non-scaled layout without spaces + float gap_x, gap_y, min_space; // required spacing between views + float offset_x, offset_y; // coords of centre of upper left view + float scale; + int num_gaps_x, + num_gaps_y; // how many gaps between views/edges? = num of views in given direction + 1 + gp_Ax2 primary; // coord system of primary view - bool hidden, smooth; - bool autodims; + bool hidden, smooth; + bool autodims; boost::signals2::scoped_connection connectDocumentDeletedObject; boost::signals2::scoped_connection connectApplicationDeletedDocument; }; - - -class TaskOrthoViews : public QWidget//: public Gui::TaskView::TaskBox +class TaskOrthoViews: public QWidget //: public Gui::TaskView::TaskBox { Q_OBJECT public: - TaskOrthoViews(QWidget *parent = nullptr); + TaskOrthoViews(QWidget* parent = nullptr); ~TaskOrthoViews(); bool user_input(); void clean_up(); protected Q_SLOTS: - void ShowContextMenu(const QPoint & pos); + void ShowContextMenu(const QPoint& pos); void setPrimary(int dir); void cb_toggled(bool toggle); void projectionChanged(int index); void hidden(int i); void smooth(int i); void toggle_auto(int i); - void data_entered(const QString & text); + void data_entered(const QString& text); void change_axo(int p = 3); void axo_button(); - void axo_scale(const QString & text); + void axo_scale(const QString& text); void text_return(); protected: - void changeEvent(QEvent * e); + void changeEvent(QEvent* e); private: void setup_axo_tab(); void set_configs(); private: - //class Private; - Ui_TaskOrthoViews * ui; + // class Private; + Ui_TaskOrthoViews* ui; - OrthoViews * orthos; - QCheckBox * c_boxes[5][5]; // matrix of pointers to gui checkboxes - QLineEdit * inputs[5]; // pointers to manual position/scale boxes + OrthoViews* orthos; + QCheckBox* c_boxes[5][5]; // matrix of pointers to gui checkboxes + QLineEdit* inputs[5]; // pointers to manual position/scale boxes - float data[5]; // scale, x_pos, y_pos, horiz, vert - int axo_r_x, axo_r_y; // relative position of axo view currently being edited - bool txt_return; // flag to show if return was pressed while editing a text box; + float data[5]; // scale, x_pos, y_pos, horiz, vert + int axo_r_x, axo_r_y; // relative position of axo view currently being edited + bool txt_return; // flag to show if return was pressed while editing a text box; }; ////////////////////////////////////////////////////////////// - /// simulation dialog for the TaskView -class TaskDlgOrthoViews : public Gui::TaskView::TaskDialog +class TaskDlgOrthoViews: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -219,12 +243,11 @@ public: void clicked(int); private: - TaskOrthoViews * widget; + TaskOrthoViews* widget; Gui::TaskView::TaskBox* taskbox; }; -} //namespace DrawingGui +} // namespace DrawingGui -#endif // GUI_TASKVIEW_OrthoViews_H - +#endif // GUI_TASKVIEW_OrthoViews_H diff --git a/src/Mod/Drawing/Gui/ViewProviderPage.cpp b/src/Mod/Drawing/Gui/ViewProviderPage.cpp index 46d80d2b06..f8ddd3930e 100644 --- a/src/Mod/Drawing/Gui/ViewProviderPage.cpp +++ b/src/Mod/Drawing/Gui/ViewProviderPage.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -45,12 +45,12 @@ PROPERTY_SOURCE(DrawingGui::ViewProviderDrawingPage, Gui::ViewProviderDocumentOb // Construction/Destruction ViewProviderDrawingPage::ViewProviderDrawingPage() - : view(nullptr) + : view(nullptr) { sPixmap = "Page"; - ADD_PROPERTY(HintScale,(10.0)); - ADD_PROPERTY(HintOffsetX,(10.0)); - ADD_PROPERTY(HintOffsetY,(10.0)); + ADD_PROPERTY(HintScale, (10.0)); + ADD_PROPERTY(HintOffsetX, (10.0)); + ADD_PROPERTY(HintOffsetY, (10.0)); // do not show this in the property editor Visibility.setStatus(App::Property::Hidden, true); @@ -58,10 +58,9 @@ ViewProviderDrawingPage::ViewProviderDrawingPage() } ViewProviderDrawingPage::~ViewProviderDrawingPage() -{ -} +{} -void ViewProviderDrawingPage::attach(App::DocumentObject *pcFeat) +void ViewProviderDrawingPage::attach(App::DocumentObject* pcFeat) { // call parent attach method ViewProviderDocumentObject::attach(pcFeat); @@ -109,25 +108,26 @@ void ViewProviderDrawingPage::updateData(const App::Property* prop) if (std::string(getPageObject()->PageResult.getValue()) != "") { if (view) { view->load(QString::fromUtf8(getPageObject()->PageResult.getValue())); - if (view->isHidden()) + if (view->isHidden()) { QTimer::singleShot(300, view, SLOT(viewAll())); - else + } + else { view->viewAll(); + } } } } else if (pcObject && prop == &pcObject->Label) { - if (view){ + if (view) { const char* objname = pcObject->Label.getValue(); view->setObjectName(QString::fromUtf8(objname)); - Gui::Document* doc = Gui::Application::Instance->getDocument - (pcObject->getDocument()); + Gui::Document* doc = Gui::Application::Instance->getDocument(pcObject->getDocument()); view->onRelabel(doc); } } } -bool ViewProviderDrawingPage::onDelete(const std::vector & items) +bool ViewProviderDrawingPage::onDelete(const std::vector& items) { if (view) { view->parentWidget()->deleteLater(); @@ -157,9 +157,8 @@ bool ViewProviderDrawingPage::doubleClicked(void) DrawingView* ViewProviderDrawingPage::showDrawingView() { - if (!view){ - Gui::Document* doc = Gui::Application::Instance->getDocument - (this->pcObject->getDocument()); + if (!view) { + Gui::Document* doc = Gui::Application::Instance->getDocument(this->pcObject->getDocument()); view = new DrawingView(doc, Gui::getMainWindow()); view->setWindowIcon(Gui::BitmapFactory().pixmap("actions/drawing-landscape")); diff --git a/src/Mod/Drawing/Gui/ViewProviderPage.h b/src/Mod/Drawing/Gui/ViewProviderPage.h index d646d3549b..a815bdf45f 100644 --- a/src/Mod/Drawing/Gui/ViewProviderPage.h +++ b/src/Mod/Drawing/Gui/ViewProviderPage.h @@ -30,14 +30,16 @@ #include "DrawingView.h" -namespace Drawing{ - class FeaturePage; +namespace Drawing +{ +class FeaturePage; } -namespace DrawingGui { +namespace DrawingGui +{ -class DrawingGuiExport ViewProviderDrawingPage : public Gui::ViewProviderDocumentObjectGroup +class DrawingGuiExport ViewProviderDrawingPage: public Gui::ViewProviderDocumentObjectGroup { PROPERTY_HEADER(DrawingGui::ViewProviderDrawingPage); @@ -47,13 +49,16 @@ public: /// destructor virtual ~ViewProviderDrawingPage(); - App::PropertyFloat HintScale; - App::PropertyFloat HintOffsetX; - App::PropertyFloat HintOffsetY; + App::PropertyFloat HintScale; + App::PropertyFloat HintOffsetX; + App::PropertyFloat HintOffsetY; - virtual void attach(App::DocumentObject *); + virtual void attach(App::DocumentObject*); virtual void setDisplayMode(const char* ModeName); - virtual bool useNewSelectionModel(void) const {return false;} + virtual bool useNewSelectionModel(void) const + { + return false; + } /// returns a list of all possible modes virtual std::vector getDisplayModes(void) const; /// Hides the view provider @@ -65,7 +70,7 @@ public: virtual bool doubleClicked(void); void setupContextMenu(QMenu*, QObject*, const char*); virtual void updateData(const App::Property*); - virtual bool onDelete(const std::vector &); + virtual bool onDelete(const std::vector&); Drawing::FeaturePage* getPageObject() const; @@ -77,8 +82,7 @@ private: QPointer view; }; -} // namespace DrawingGui +} // namespace DrawingGui -#endif // DRAWINGGUI_VIEWPROVIDERPAGE_H - +#endif // DRAWINGGUI_VIEWPROVIDERPAGE_H diff --git a/src/Mod/Drawing/Gui/ViewProviderView.cpp b/src/Mod/Drawing/Gui/ViewProviderView.cpp index 2a20ca8c62..6df5c0c8d4 100644 --- a/src/Mod/Drawing/Gui/ViewProviderView.cpp +++ b/src/Mod/Drawing/Gui/ViewProviderView.cpp @@ -42,10 +42,9 @@ ViewProviderDrawingView::ViewProviderDrawingView() } ViewProviderDrawingView::~ViewProviderDrawingView() -{ -} +{} -void ViewProviderDrawingView::attach(App::DocumentObject *pcFeat) +void ViewProviderDrawingView::attach(App::DocumentObject* pcFeat) { // call parent attach method ViewProviderDocumentObject::attach(pcFeat); @@ -67,15 +66,17 @@ void ViewProviderDrawingView::show(void) ViewProviderDocumentObject::show(); App::DocumentObject* obj = getObject(); - if (!obj || obj->isRestoring()) + if (!obj || obj->isRestoring()) { return; + } if (obj->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId())) { // The 'Visible' property is marked as 'Output'. To update the drawing on recompute // the parent page object is touched. static_cast(obj)->Visible.setValue(true); std::vector inp = obj->getInList(); - for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) + for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) { (*it)->touch(); + } } } @@ -84,15 +85,17 @@ void ViewProviderDrawingView::hide(void) ViewProviderDocumentObject::hide(); App::DocumentObject* obj = getObject(); - if (!obj || obj->isRestoring()) + if (!obj || obj->isRestoring()) { return; + } if (obj->getTypeId().isDerivedFrom(Drawing::FeatureView::getClassTypeId())) { // The 'Visible' property is marked as 'Output'. To update the drawing on recompute // the parent page object is touched. static_cast(obj)->Visible.setValue(false); std::vector inp = obj->getInList(); - for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) + for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) { (*it)->touch(); + } } } @@ -112,19 +115,20 @@ void ViewProviderDrawingView::finishRestoring() } void ViewProviderDrawingView::updateData(const App::Property*) -{ -} +{} // Python viewprovider ----------------------------------------------------------------------- -namespace Gui { +namespace Gui +{ /// @cond DOXERR -PROPERTY_SOURCE_TEMPLATE(DrawingGui::ViewProviderDrawingViewPython, DrawingGui::ViewProviderDrawingView) +PROPERTY_SOURCE_TEMPLATE(DrawingGui::ViewProviderDrawingViewPython, + DrawingGui::ViewProviderDrawingView) /// @endcond // explicit template instantiation template class DrawingGuiExport ViewProviderPythonFeatureT; -} +} // namespace Gui // ---------------------------------------------------------------------------- @@ -140,10 +144,9 @@ ViewProviderDrawingClip::ViewProviderDrawingClip() } ViewProviderDrawingClip::~ViewProviderDrawingClip() -{ -} +{} -void ViewProviderDrawingClip::attach(App::DocumentObject *pcFeat) +void ViewProviderDrawingClip::attach(App::DocumentObject* pcFeat) { // call parent attach method ViewProviderDocumentObject::attach(pcFeat); @@ -166,15 +169,17 @@ void ViewProviderDrawingClip::show(void) ViewProviderDocumentObjectGroup::show(); App::DocumentObject* obj = getObject(); - if (!obj || obj->isRestoring()) + if (!obj || obj->isRestoring()) { return; + } if (obj->getTypeId().isDerivedFrom(Drawing::FeatureClip::getClassTypeId())) { // The 'Visible' property is marked as 'Output'. To update the drawing on recompute // the parent page object is touched. static_cast(obj)->Visible.setValue(true); std::vector inp = obj->getInList(); - for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) + for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) { (*it)->touch(); + } } } @@ -183,15 +188,17 @@ void ViewProviderDrawingClip::hide(void) ViewProviderDocumentObjectGroup::hide(); App::DocumentObject* obj = getObject(); - if (!obj || obj->isRestoring()) + if (!obj || obj->isRestoring()) { return; + } if (obj->getTypeId().isDerivedFrom(Drawing::FeatureClip::getClassTypeId())) { // The 'Visible' property is marked as 'Output'. To update the drawing on recompute // the parent page object is touched. static_cast(obj)->Visible.setValue(false); std::vector inp = obj->getInList(); - for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) + for (std::vector::iterator it = inp.begin(); it != inp.end(); ++it) { (*it)->touch(); + } } } @@ -211,5 +218,4 @@ void ViewProviderDrawingClip::finishRestoring() } void ViewProviderDrawingClip::updateData(const App::Property*) -{ -} +{} diff --git a/src/Mod/Drawing/Gui/ViewProviderView.h b/src/Mod/Drawing/Gui/ViewProviderView.h index 91295a0f6a..01f8d8e1c0 100644 --- a/src/Mod/Drawing/Gui/ViewProviderView.h +++ b/src/Mod/Drawing/Gui/ViewProviderView.h @@ -26,10 +26,11 @@ #include -namespace DrawingGui { +namespace DrawingGui +{ -class DrawingGuiExport ViewProviderDrawingView : public Gui::ViewProviderDocumentObject +class DrawingGuiExport ViewProviderDrawingView: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER(DrawingGui::ViewProviderDrawingView); @@ -40,9 +41,12 @@ public: virtual ~ViewProviderDrawingView(); - virtual void attach(App::DocumentObject *); + virtual void attach(App::DocumentObject*); virtual void setDisplayMode(const char* ModeName); - virtual bool useNewSelectionModel(void) const {return false;} + virtual bool useNewSelectionModel(void) const + { + return false; + } /// returns a list of all possible modes virtual std::vector getDisplayModes(void) const; virtual void updateData(const App::Property*); @@ -61,7 +65,7 @@ public: using ViewProviderDrawingViewPython = Gui::ViewProviderPythonFeatureT; -class DrawingGuiExport ViewProviderDrawingClip : public Gui::ViewProviderDocumentObjectGroup +class DrawingGuiExport ViewProviderDrawingClip: public Gui::ViewProviderDocumentObjectGroup { PROPERTY_HEADER(DrawingGui::ViewProviderDrawingClip); @@ -72,9 +76,12 @@ public: virtual ~ViewProviderDrawingClip(); - virtual void attach(App::DocumentObject *); + virtual void attach(App::DocumentObject*); virtual void setDisplayMode(const char* ModeName); - virtual bool useNewSelectionModel(void) const {return false;} + virtual bool useNewSelectionModel(void) const + { + return false; + } /// returns a list of all possible modes virtual std::vector getDisplayModes(void) const; virtual void updateData(const App::Property*); @@ -91,8 +98,7 @@ public: //@} }; -} // namespace DrawingGui +} // namespace DrawingGui -#endif // DRAWINGGUI_VIEWPROVIDERVIEW_H - +#endif // DRAWINGGUI_VIEWPROVIDERVIEW_H diff --git a/src/Mod/Drawing/Gui/Workbench.cpp b/src/Mod/Drawing/Gui/Workbench.cpp index 51d7f17129..9f6327609f 100644 --- a/src/Mod/Drawing/Gui/Workbench.cpp +++ b/src/Mod/Drawing/Gui/Workbench.cpp @@ -30,7 +30,7 @@ using namespace DrawingGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Drawing"); #endif @@ -38,12 +38,10 @@ using namespace DrawingGui; TYPESYSTEM_SOURCE(DrawingGui::Workbench, Gui::StdWorkbench) Workbench::Workbench() -{ -} +{} Workbench::~Workbench() -{ -} +{} Gui::MenuItem* Workbench::setupMenuBar() const { @@ -100,7 +98,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const *img << "Drawing_Open"; img = new Gui::ToolBarItem(root); img->setCommand("Drawing types"); - //*img << "Drawing_NewA3Landscape"; + //*img << "Drawing_NewA3Landscape"; *img << "Drawing_NewPage"; *img << "Drawing_OrthoViews"; *img << "Drawing_OpenBrowserView"; @@ -112,4 +110,3 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const *img << "Drawing_NewView"; return root; } - diff --git a/src/Mod/Drawing/Gui/Workbench.h b/src/Mod/Drawing/Gui/Workbench.h index 595c81ff91..d2a15371f5 100644 --- a/src/Mod/Drawing/Gui/Workbench.h +++ b/src/Mod/Drawing/Gui/Workbench.h @@ -26,12 +26,13 @@ #include -namespace DrawingGui { +namespace DrawingGui +{ /** * @author Werner Mayer */ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER(); @@ -45,7 +46,7 @@ protected: Gui::ToolBarItem* setupCommandBars() const; }; -} // namespace DrawingGui +} // namespace DrawingGui -#endif // DRAWING_WORKBENCH_H +#endif // DRAWING_WORKBENCH_H diff --git a/src/Mod/Drawing/Init.py b/src/Mod/Drawing/Init.py index 9cf4409c5e..2e33f58f43 100644 --- a/src/Mod/Drawing/Init.py +++ b/src/Mod/Drawing/Init.py @@ -1,29 +1,28 @@ # FreeCAD init script of the Image module # (c) 2001 Juergen Riegel -#*************************************************************************** -#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#* Juergen Riegel 2002 * -#***************************************************************************/ +# *************************************************************************** +# * (c) Juergen Riegel (juergen.riegel@web.de) 2002 * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# * Juergen Riegel 2002 * +# ***************************************************************************/ -FreeCAD.Console.PrintLog("Drawing became obsolete in 0.17; " - "consider using TechDraw instead.\n") +FreeCAD.Console.PrintLog("Drawing became obsolete in 0.17; " "consider using TechDraw instead.\n") diff --git a/src/Mod/Drawing/InitGui.py b/src/Mod/Drawing/InitGui.py index f94611e92c..3d23166921 100644 --- a/src/Mod/Drawing/InitGui.py +++ b/src/Mod/Drawing/InitGui.py @@ -5,52 +5,56 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -#*************************************************************************** -#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#* Juergen Riegel 2002 * -#***************************************************************************/ +# *************************************************************************** +# * (c) Juergen Riegel (juergen.riegel@web.de) 2002 +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# * Juergen Riegel 2002 * +# ***************************************************************************/ -class DrawingWorkbench (Workbench): +class DrawingWorkbench(Workbench): "Drawing workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Drawing/Resources/icons/DrawingWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Drawing/Resources/icons/DrawingWorkbench.svg" + ) self.__class__.MenuText = "Drawing" self.__class__.ToolTip = "Drawing workbench" - def Initialize(self): # load the module import DrawingGui def Activated(self): - FreeCAD.Console.PrintWarning("Drawing became obsolete in 0.17; " - "consider using TechDraw instead.\n") + FreeCAD.Console.PrintWarning( + "Drawing became obsolete in 0.17; " "consider using TechDraw instead.\n" + ) def GetClassName(self): return "DrawingGui::Workbench" - + + Gui.addWorkbench(DrawingWorkbench()) # Append the open handler -FreeCAD.addImportType("Drawing (*.svg *.svgz)","DrawingGui") -FreeCAD.addExportType("Drawing (*.svg *.svgz *.dxf)","DrawingGui") +FreeCAD.addImportType("Drawing (*.svg *.svgz)", "DrawingGui") +FreeCAD.addExportType("Drawing (*.svg *.svgz *.dxf)", "DrawingGui") diff --git a/src/Mod/Drawing/Templates/A0_Landscape_plain.svg b/src/Mod/Drawing/Templates/A0_Landscape_plain.svg index 022f35445f..8f2fffc5f5 100644 --- a/src/Mod/Drawing/Templates/A0_Landscape_plain.svg +++ b/src/Mod/Drawing/Templates/A0_Landscape_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A0_Portrait_plain.svg b/src/Mod/Drawing/Templates/A0_Portrait_plain.svg index b256527e65..d5e4c5be89 100644 --- a/src/Mod/Drawing/Templates/A0_Portrait_plain.svg +++ b/src/Mod/Drawing/Templates/A0_Portrait_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A1_Landscape_plain.svg b/src/Mod/Drawing/Templates/A1_Landscape_plain.svg index fd461505c9..35c1363e8b 100644 --- a/src/Mod/Drawing/Templates/A1_Landscape_plain.svg +++ b/src/Mod/Drawing/Templates/A1_Landscape_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A1_Portrait_plain.svg b/src/Mod/Drawing/Templates/A1_Portrait_plain.svg index 0cbd7c3810..0fcca4515e 100644 --- a/src/Mod/Drawing/Templates/A1_Portrait_plain.svg +++ b/src/Mod/Drawing/Templates/A1_Portrait_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A2_Landscape_plain.svg b/src/Mod/Drawing/Templates/A2_Landscape_plain.svg index db82db1fa8..7af8294755 100644 --- a/src/Mod/Drawing/Templates/A2_Landscape_plain.svg +++ b/src/Mod/Drawing/Templates/A2_Landscape_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A2_Portrait_plain.svg b/src/Mod/Drawing/Templates/A2_Portrait_plain.svg index 33dd4e4ad2..fcb66e461b 100644 --- a/src/Mod/Drawing/Templates/A2_Portrait_plain.svg +++ b/src/Mod/Drawing/Templates/A2_Portrait_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A3_Landscape_plain.svg b/src/Mod/Drawing/Templates/A3_Landscape_plain.svg index 608a46fd0b..7e9b2536bd 100644 --- a/src/Mod/Drawing/Templates/A3_Landscape_plain.svg +++ b/src/Mod/Drawing/Templates/A3_Landscape_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A3_Portrait_plain.svg b/src/Mod/Drawing/Templates/A3_Portrait_plain.svg index 4cee003cf6..9561eb5394 100644 --- a/src/Mod/Drawing/Templates/A3_Portrait_plain.svg +++ b/src/Mod/Drawing/Templates/A3_Portrait_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A4_Landscape_plain.svg b/src/Mod/Drawing/Templates/A4_Landscape_plain.svg index f1b4ecf651..5f34d83ea5 100644 --- a/src/Mod/Drawing/Templates/A4_Landscape_plain.svg +++ b/src/Mod/Drawing/Templates/A4_Landscape_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/Templates/A4_Portrait_plain.svg b/src/Mod/Drawing/Templates/A4_Portrait_plain.svg index aa8883c33c..8eb8fc1f1f 100644 --- a/src/Mod/Drawing/Templates/A4_Portrait_plain.svg +++ b/src/Mod/Drawing/Templates/A4_Portrait_plain.svg @@ -38,7 +38,7 @@ - diff --git a/src/Mod/Drawing/drawing.dox b/src/Mod/Drawing/drawing.dox index ba7999f256..e8a0920e43 100644 --- a/src/Mod/Drawing/drawing.dox +++ b/src/Mod/Drawing/drawing.dox @@ -2,4 +2,3 @@ * \ingroup CWORKBENCHES * \brief Manages output of 2D sheets from FreeCAD documents */ - diff --git a/src/Mod/Fem/App/FemPostFilter.cpp b/src/Mod/Fem/App/FemPostFilter.cpp index ff9fb3c9bd..aad66d32e0 100644 --- a/src/Mod/Fem/App/FemPostFilter.cpp +++ b/src/Mod/Fem/App/FemPostFilter.cpp @@ -162,7 +162,7 @@ FemPostDataAlongLineFilter::FemPostDataAlongLineFilter() m_probe->SetPassPointArrays(1); m_probe->SetPassCellArrays(1); // needs vtk > 6.1 -#if (VTK_MAJOR_VERSION > 6) || (VTK_MINOR_VERSION > 1) +#if (VTK_MAJOR_VERSION > 6) && (VTK_MINOR_VERSION > 1) m_probe->ComputeToleranceOff(); m_probe->SetTolerance(0.01); #endif @@ -311,7 +311,7 @@ FemPostDataAtPointFilter::FemPostDataAtPointFilter() m_probe->SetPassPointArrays(1); m_probe->SetPassCellArrays(1); // needs vtk > 6.1 -#if (VTK_MAJOR_VERSION > 6) || (VTK_MINOR_VERSION > 1) +#if (VTK_MAJOR_VERSION > 6) && (VTK_MINOR_VERSION > 1) m_probe->ComputeToleranceOff(); m_probe->SetTolerance(0.01); #endif diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 2b4ba0d6c2..58e28dcdfc 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -178,8 +178,8 @@ CmdFemConstraintBearing::CmdFemConstraintBearing() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint bearing"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a bearing"); + sMenuText = QT_TR_NOOP("Bearing constraint"); + sToolTipText = QT_TR_NOOP("Creates a bearing constraint"); sWhatsThis = "FEM_ConstraintBearing"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintBearing"; @@ -194,7 +194,7 @@ void CmdFemConstraintBearing::activated(int) std::string FeatName = getUniqueObjectName("ConstraintBearing"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint for bearing")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make bearing constraint")); doCommand( Doc, "App.activeDocument().addObject(\"Fem::ConstraintBearing\",\"%s\")", FeatName.c_str()); doCommand(Doc, @@ -223,8 +223,8 @@ CmdFemConstraintContact::CmdFemConstraintContact() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint contact"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for contact between faces"); + sMenuText = QT_TR_NOOP("Contact constraint"); + sToolTipText = QT_TR_NOOP("Creates a contact constraint between faces"); sWhatsThis = "FEM_ConstraintContact"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintContact"; @@ -239,7 +239,7 @@ void CmdFemConstraintContact::activated(int) std::string FeatName = getUniqueObjectName("ConstraintContact"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint contact on face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make contact constraint on a face")); doCommand( Doc, "App.activeDocument().addObject(\"Fem::ConstraintContact\",\"%s\")", FeatName.c_str()); doCommand(Doc, @@ -278,7 +278,7 @@ CmdFemConstraintDisplacement::CmdFemConstraintDisplacement() sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Constraint displacement"); sToolTipText = - QT_TR_NOOP("Creates a FEM constraint for a displacement acting on a geometric entity"); + QT_TR_NOOP("Creates a displacement boundary condition for a geometric entity"); sWhatsThis = "FEM_ConstraintDisplacement"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintDisplacement"; @@ -293,7 +293,7 @@ void CmdFemConstraintDisplacement::activated(int) std::string FeatName = getUniqueObjectName("ConstraintDisplacement"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint displacement on face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make displacement boundary condition on face")); doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintDisplacement\",\"%s\")", FeatName.c_str()); @@ -326,7 +326,7 @@ CmdFemConstraintFixed::CmdFemConstraintFixed() sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Constraint fixed"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a fixed geometric entity"); + sToolTipText = QT_TR_NOOP("Creates a fixed boundary condition for a geometric entity"); sWhatsThis = "FEM_ConstraintFixed"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintFixed"; @@ -341,7 +341,7 @@ void CmdFemConstraintFixed::activated(int) std::string FeatName = getUniqueObjectName("ConstraintFixed"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint fixed geometry")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make fixed boundary condition for geometry")); doCommand( Doc, "App.activeDocument().addObject(\"Fem::ConstraintFixed\",\"%s\")", FeatName.c_str()); doCommand( @@ -422,7 +422,7 @@ CmdFemConstraintForce::CmdFemConstraintForce() sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Constraint force"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a force acting on a geometric entity"); + sToolTipText = QT_TR_NOOP("Creates a force load applied to a geometric entity"); sWhatsThis = "FEM_ConstraintForce"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintForce"; @@ -437,7 +437,7 @@ void CmdFemConstraintForce::activated(int) std::string FeatName = getUniqueObjectName("ConstraintForce"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint force on geometry")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make force load on geometry")); doCommand( Doc, "App.activeDocument().addObject(\"Fem::ConstraintForce\",\"%s\")", FeatName.c_str()); doCommand(Doc, @@ -474,8 +474,8 @@ CmdFemConstraintGear::CmdFemConstraintGear() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint gear"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a gear"); + sMenuText = QT_TR_NOOP("Gear constraint"); + sToolTipText = QT_TR_NOOP("Creates a gear constraint"); sWhatsThis = "FEM_ConstraintGear"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintGear"; @@ -489,7 +489,7 @@ void CmdFemConstraintGear::activated(int) return; std::string FeatName = getUniqueObjectName("ConstraintGear"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint for gear")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make gear constraint")); doCommand( Doc, "App.activeDocument().addObject(\"Fem::ConstraintGear\",\"%s\")", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.Diameter = 100.0", FeatName.c_str()); @@ -519,8 +519,8 @@ CmdFemConstraintHeatflux::CmdFemConstraintHeatflux() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint heatflux"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a heatflux acting on a face"); + sMenuText = QT_TR_NOOP("Heat flux load"); + sToolTipText = QT_TR_NOOP("Creates a heat flux load acting on a face"); sWhatsThis = "FEM_ConstraintHeatflux"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintHeatflux"; @@ -535,7 +535,7 @@ void CmdFemConstraintHeatflux::activated(int) std::string FeatName = getUniqueObjectName("ConstraintHeatflux"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint heatflux on face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make heat flux load on face")); doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintHeatflux\",\"%s\")", FeatName.c_str()); @@ -573,8 +573,8 @@ CmdFemConstraintInitialTemperature::CmdFemConstraintInitialTemperature() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint initial temperature"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for initial temperature acting on a body"); + sMenuText = QT_TR_NOOP("Initial temperature"); + sToolTipText = QT_TR_NOOP("Creates an initial temperature acting on a body"); sWhatsThis = "FEM_ConstraintInitialTemperature"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintInitialTemperature"; @@ -589,7 +589,7 @@ void CmdFemConstraintInitialTemperature::activated(int) std::string FeatName = getUniqueObjectName("ConstraintInitialTemperature"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint initial temperature on body")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make initial temperature condition on body")); doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintInitialTemperature\",\"%s\")", FeatName.c_str()); @@ -621,8 +621,8 @@ CmdFemConstraintPlaneRotation::CmdFemConstraintPlaneRotation() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint plane rotation"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for plane rotation face"); + sMenuText = QT_TR_NOOP("Plane multi-point constraint"); + sToolTipText = QT_TR_NOOP("Creates a plane multi-point constraint for a face"); sWhatsThis = "FEM_ConstraintPlaneRotation"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintPlaneRotation"; @@ -637,7 +637,7 @@ void CmdFemConstraintPlaneRotation::activated(int) std::string FeatName = getUniqueObjectName("ConstraintPlaneRotation"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint Plane Rotation face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make plane multi-point constraint on face")); doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintPlaneRotation\",\"%s\")", FeatName.c_str()); @@ -670,7 +670,7 @@ CmdFemConstraintPressure::CmdFemConstraintPressure() sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Constraint pressure"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a pressure acting on a face"); + sToolTipText = QT_TR_NOOP("Creates a pressure load acting on a face"); sWhatsThis = "FEM_ConstraintPressure"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintPressure"; @@ -685,7 +685,7 @@ void CmdFemConstraintPressure::activated(int) std::string FeatName = getUniqueObjectName("ConstraintPressure"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint pressure on face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make pressure load on face")); doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintPressure\",\"%s\")", FeatName.c_str()); @@ -723,8 +723,8 @@ CmdFemConstraintSpring::CmdFemConstraintSpring() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint spring"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a spring acting on a face"); + sMenuText = QT_TR_NOOP("Spring"); + sToolTipText = QT_TR_NOOP("Creates a spring acting on a face"); sWhatsThis = "FEM_ConstraintSpring"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintSpring"; @@ -739,7 +739,7 @@ void CmdFemConstraintSpring::activated(int) std::string FeatName = getUniqueObjectName("ConstraintSpring"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint spring on face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make spring on face")); doCommand( Doc, "App.activeDocument().addObject(\"Fem::ConstraintSpring\",\"%s\")", FeatName.c_str()); doCommand(Doc, @@ -776,8 +776,8 @@ CmdFemConstraintPulley::CmdFemConstraintPulley() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint pulley"); - sToolTipText = QT_TR_NOOP("Creates a FEM constraint for a pulley"); + sMenuText = QT_TR_NOOP("Pulley constraint"); + sToolTipText = QT_TR_NOOP("Creates a pulley constraint"); sWhatsThis = "FEM_ConstraintPulley"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintPulley"; @@ -792,7 +792,7 @@ void CmdFemConstraintPulley::activated(int) std::string FeatName = getUniqueObjectName("ConstraintPulley"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint for pulley")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make pulley constraint")); doCommand( Doc, "App.activeDocument().addObject(\"Fem::ConstraintPulley\",\"%s\")", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.Diameter = 300.0", FeatName.c_str()); @@ -828,7 +828,7 @@ CmdFemConstraintTemperature::CmdFemConstraintTemperature() sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Constraint temperature"); sToolTipText = QT_TR_NOOP( - "Creates a FEM constraint for a temperature/concentrated heat flux acting on a face"); + "Creates a temperature/concentrated heat flux load acting on a face"); sWhatsThis = "FEM_ConstraintTemperature"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintTemperature"; @@ -843,7 +843,7 @@ void CmdFemConstraintTemperature::activated(int) std::string FeatName = getUniqueObjectName("ConstraintTemperature"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint temperature on face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make temperature boundary condition on face")); doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintTemperature\",\"%s\")", FeatName.c_str()); @@ -876,7 +876,7 @@ CmdFemConstraintTransform::CmdFemConstraintTransform() sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Constraint transform"); - sToolTipText = QT_TR_NOOP("Create FEM constraint for transforming a face"); + sToolTipText = QT_TR_NOOP("Create a local coordinate system on a face"); sWhatsThis = "FEM_ConstraintTransform"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintTransform"; @@ -891,7 +891,7 @@ void CmdFemConstraintTransform::activated(int) std::string FeatName = getUniqueObjectName("ConstraintTransform"); - openCommand(QT_TRANSLATE_NOOP("Command", "Make FEM constraint transform on face")); + openCommand(QT_TRANSLATE_NOOP("Command", "Make local coordinate system on face")); doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintTransform\",\"%s\")", FeatName.c_str()); @@ -1137,8 +1137,8 @@ CmdFemCompEmConstraints::CmdFemCompEmConstraints() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Electromagnetic constraints"); - sToolTipText = QT_TR_NOOP("Electromagnetic constraints"); + sMenuText = QT_TR_NOOP("Electromagnetic boundary conditions"); + sToolTipText = QT_TR_NOOP("Electromagnetic boundary conditions"); sWhatsThis = ""; sStatusTip = sToolTipText; } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqus.ui b/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqus.ui index 48dc4b0763..ad7edd3b1c 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqus.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqus.ui @@ -80,9 +80,9 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui index e4dc20eefe..ea264c56f8 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui @@ -69,7 +69,7 @@ - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. true @@ -351,11 +351,11 @@ with the last used dialog settings true - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog + Hide analysis features when open result dialog true diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem.ts b/src/Mod/Fem/Gui/Resources/translations/Fem.ts index 739d18e6a3..625154c108 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem.ts @@ -10,12 +10,12 @@ - Constraint bearing + Bearing constraint - Creates a FEM constraint for a bearing + Creates a bearing constraint @@ -28,12 +28,12 @@ - Constraint contact + Contact constraint - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces @@ -51,7 +51,7 @@ - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,7 +69,7 @@ - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,7 +105,7 @@ - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity @@ -118,12 +118,12 @@ - Constraint gear + Gear constraint - Creates a FEM constraint for a gear + Creates a gear constraint @@ -136,12 +136,12 @@ - Constraint heatflux + Heat flux load - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face @@ -154,12 +154,12 @@ - Constraint initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,12 +172,12 @@ - Constraint plane rotation + Plane multi-point constraint - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face @@ -195,7 +195,7 @@ - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face @@ -208,12 +208,12 @@ - Constraint pulley + Pulley constraint - Creates a FEM constraint for a pulley + Creates a pulley constraint @@ -226,12 +226,12 @@ - Constraint spring + Spring - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face @@ -249,7 +249,7 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,7 +267,7 @@ - Create FEM constraint for transforming a face + Create a local coordinate system on a face @@ -588,79 +588,79 @@ Command - - - Make FEM constraint for bearing - - - - - Make FEM constraint contact on face - - - - - Make FEM constraint displacement on face - - - - - Make FEM constraint fixed geometry - - Create fluid boundary condition + + + Make bearing constraint + + + + + Make contact constraint on a face + + + + + Make displacement boundary condition on face + + + + + Make fixed boundary condition for geometry + + - Make FEM constraint force on geometry + Make force load on geometry - Make FEM constraint for gear + Make gear constraint - Make FEM constraint heatflux on face + Make heat flux load on face - Make FEM constraint initial temperature on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face - Make FEM constraint pressure on face + Make pressure load on face - Make FEM constraint spring on face + Make spring on face - Make FEM constraint for pulley + Make pulley constraint - Make FEM constraint temperature on face + Make temperature boundary condition on face - Make FEM constraint transform on face + Make local coordinate system on face @@ -1201,9 +1201,9 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1303,13 +1303,13 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog + Hide analysis features when open result dialog @@ -1843,7 +1843,7 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters + Analysis feature parameters @@ -1999,7 +1999,7 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2028,7 +2028,7 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2157,7 +2157,7 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2186,7 +2186,7 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2274,7 +2274,7 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2398,7 +2398,7 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error + Analysis feature update error @@ -2429,7 +2429,17 @@ Specify another file please. - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + + + + + Only one face for local coordinate system! + + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2438,11 +2448,6 @@ Specify another file please. Selected object is not a part! - - - Only one face for transform constraint! - - Only faces can be picked @@ -2453,11 +2458,6 @@ Specify another file please. Only cylindrical faces can be picked - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - - FemGui::TaskObjectName @@ -2767,11 +2767,6 @@ Specify another file please. Form - - - Form - - Fluid Section Parameter @@ -3021,7 +3016,7 @@ Specify another file please. - Constraint Properties + Analysis feature properties @@ -3086,6 +3081,21 @@ Specify another file please. with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + + + + + Whether the boundary condition defines a farfield potential + + + + + Whether the boundary condition is for the electric force + + @@ -3172,31 +3182,16 @@ Note: has no effect if a solid was selected Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - - Potential Constant - - - Whether the constraint defines a farfield potential - - Farfield / Electric infinity - - - Whether the constraint is for the electric force - - Calculate Electric Force @@ -3535,11 +3530,6 @@ Note: for 2D only setting for x is possible, Cancel - - - Edit constraint - - @@ -3569,11 +3559,6 @@ Note: for 2D only setting for x is possible, Meshing - - - Constraint force - - @@ -3591,46 +3576,11 @@ Note: for 2D only setting for x is possible, Import-Export - - - Constraint Contact - - - - - Constraint displacement - - - - - Constraint fixed - - - - - Constraint fluid boundary - - - - - Constraint heat flux - - Constraint initial temperature - - - Constraint planerotation - - - - - Constraint pressure - - Constraint pulley @@ -3641,16 +3591,6 @@ Note: for 2D only setting for x is possible, Constraint spring - - - Constraint temperature - - - - - Constraint transform - - Edit post processing object @@ -3696,6 +3636,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? + + + Contact constraint + + + + + Displacement boundary condition + + + + + Fixed boundary condition + + + + + Fluid boundary condition + + + + + Force load + + + + + Heat flux load + + + + + Plane multi-point constraint + + + + + Pressure load + + + + + Temperature boundary condition + + + + + Local coordinate system + + + + + Edit analysis feature + + ShowDisplacement @@ -4041,7 +4036,7 @@ For possible variables, see the description box below. - Constraints + Analysis features @@ -4530,7 +4525,7 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load @@ -5173,128 +5168,126 @@ used for the Elmer solver - Electrostatic Constraints + Electrostatic boundary conditions - &Electrostatic Constraints - - - - - Fluid Constraints - - - - - &Fluid Constraints + &Electrostatic boundary conditions - - Electromagnetic Constraints + Fluid boundary conditions + &Fluid boundary conditions + + + + + Electromagnetic boundary conditions + + + + + &Electromagnetic boundary conditions + + + + + Geometrical analysis features + + + - &Electromagnetic Constraints + &Geometrical analysis features - Geometrical Constraints + Mechanical boundary conditions and loads - &Geometrical Constraints + &Mechanical boundary conditions and loads - Mechanical Constraints + Thermal boundary conditions and loads - &Mechanical Constraints + &Thermal boundary conditions and loads - Thermal Constraints + Analysis features without solver - &Thermal Constraints + &Analysis features without solver - Constraints without solver - - - - - &Constraints without solver - - - - Overwrite Constants - + &Overwrite Constants - + Mesh - + M&esh - + Solve - + &Solve - + Results - + &Results - + Filter functions - + &Filter functions - + Utilities @@ -5350,10 +5343,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes + + + Removes all clipping planes + + FEM_ConstantVacuumPermittivity @@ -5368,123 +5365,6 @@ used for the Elmer solver - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - - - - - Creates a FEM constraint body heat source - - - - - FEM_ConstraintCentrif - - - Constraint centrif - - - - - Creates a FEM constraint centrif - - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - - - - - Creates a FEM constraint electrostatic potential - - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - - - - - Creates a FEM constraint flow velocity - - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - - - - - Creates a FEM constraint initial flow velocity - - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - - - - - Creates a FEM constraint initial pressure - - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - - - - - Creates a FEM constraint sectionprint - - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - - - - - Creates a FEM constraint self weight - - - - - FEM_ConstraintTie - - - Constraint tie - - - - - Creates a FEM constraint tie - - - FEM_ElementFluid1D @@ -5620,10 +5500,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples + + + Opens the FEM examples + + FEM_MaterialEditor @@ -5699,7 +5583,7 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5725,7 +5609,7 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object @@ -5733,10 +5617,14 @@ used for the Elmer solver FEM_MeshDisplayInfo - Display FEM mesh info + + + Displays FEM mesh information + + FEM_MeshGmshFromShape @@ -5747,7 +5635,7 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5773,7 +5661,7 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6115,19 +6003,6 @@ Please select a result type first. - - FEM_ConstraintCurrentDensity - - - Constraint current density - - - - - Creates a FEM constraint current density - - - FEM_EquationMagnetodynamic2D @@ -6152,20 +6027,7 @@ Please select a result type first. - Electromagnetic constraints - - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - - - - - Creates a FEM constraint magnetization + Electromagnetic boundary conditions @@ -6266,11 +6128,6 @@ Please select a result type first. BoxWidget - - - Form - - x @@ -6309,11 +6166,6 @@ Please select a result type first. CylinderWidget - - - Form - - x @@ -6376,4 +6228,147 @@ Please select a result type first. + + FEM_ConstraintBodyHeatSource + + + Body heat source + + + + + Creates a body heat source + + + + + FEM_ConstraintCentrif + + + Centrifugal load + + + + + Creates a centrifugal load + + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + + + + + Creates a current density boundary condition + + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + + + + + Creates an electrostatic potential boundary condition + + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + + + + + Creates a flow velocity boundary condition + + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + + + + + Creates initial flow velocity condition + + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + + + + + Creates an initial pressure condition + + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + + + + + Creates a magnetization boundary condition + + + + + FEM_ConstraintSectionPrint + + + Section print feature + + + + + Creates a section print feature + + + + + FEM_ConstraintSelfWeight + + + Gravity load + + + + + Creates a gravity load + + + + + FEM_ConstraintTie + + + Tie constraint + + + + + Creates a tie constraint + + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts index 557263c5b0..9be19e927c 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts @@ -10,13 +10,13 @@ - Constraint bearing - Абмежаванне падшыпніку + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Стварае абмежаванне МКЭ для падшыпніку + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Абмежаванне кантакту + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Стварае абмежаванне МКЭ для кантактаў паміж гранямі + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Стварае абмежаванне МКЭ для зрушэння, якое дзейнічае на геаметрычную сутнасць + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Стварае абмежаванне МКЭ для фіксавання геаметрычнай сутнасці + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Стварае абмежаванне МКЭ для сілы, якая дзейнічае на геаметрычную сутнасць + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Абмежаванне зачапленне + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Стварае абмежаванне МКЭ для шасцярні + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Абмежаванне цеплавога патоку + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Стварае абмежаванне МКЭ для цеплавога патоку, які дзейнічае на грань + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Абмежаванне пачатковай тэмпературы + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Стварае абмежаванне МКЭ для пачатковай тэмпературы, якая дзейнічае на цела + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Абмежаванне вярчэння плоскасці + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Стварае абмежаванне МКЭў для плоскасці вярчэння грані + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Стварае абмежаванне МКЭ для ціску, які дзейнічае на грань + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Абмежаванне шківу + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Стварае абмежаванне МКЭ для шківу + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Абмежаванне спружыны + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Стварае абмежаванне МКЭ для спружыны, якая дзейнічае на грань + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Стварае абмежаванне МКЭ для тэмпературы/канцэнтраванага цеплавога патоку, які дзейнічае на грань + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Стварае абмежаванне МКЭ для пераўтварэння грані + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Зрабіць абмежаванне МКЭ для падшыпніку - - - - Make FEM constraint contact on face - Зрабіць абмежаванне МКЭ кантакту на грані - - - - Make FEM constraint displacement on face - Зрабіць абмежаванне МКЭ зрушэння на грані - - - - Make FEM constraint fixed geometry - Зрабіць абмежаванне МКЭ фіксаванай геаметрыі - Create fluid boundary condition Стварыць умову мяжы вадкасці + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Зрабіць абмежаванне МКЭ уздзеяння на геаметрыю + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Зрабіць абмежаванне МКЭ для шасцярні + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Зрабіць абмежаванне МКЭ цеплавога патоку на грані + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Зрабіць абмежаванне МКЭ пачатковай тэмпературы на цела + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Зрабіць абмежаванне МКЭ вярчэння плоскасці грані + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Зрабіць абмежаванне МКЭ ціску на грані + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Зрабіць абмежаванне МКЭ спружыны на грані + Make spring on face + Make spring on face - Make FEM constraint for pulley - Зрабіць абмежаванне МКЭ для шківа + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Зрабіць абмежаванне МКЭ тэмпературы на грані + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Зрабіць абмежаванне МКЭ пераўтварэння на грані + Make local coordinate system on face + Make local coordinate system on face @@ -1214,13 +1214,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Суполкі паліганальных сетак таксама экспартуюцца. -Кожнае абмежаванне і, калі існуюць розныя матэрыялы, матэрыял -складаецца з двух суполак паліганальных сетак, граняў і вузлоў, да якіх -ўжываецца абмежаванне ці матэрыял. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1319,14 +1319,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Усе абмежаванні схаваныя ў выглядзе мадэлі пры адкрыцці дыялогавага акна вынікаў + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Схаваць абмежаванне, калі адчынена дыялогавае акно вынікаў + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1879,8 +1880,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Налады абмежаванняў МКЭ + Analysis feature parameters + Analysis feature parameters @@ -2035,8 +2036,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага абмежавання! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2064,8 +2065,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага абмежавання! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2193,8 +2194,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага абмежавання! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2222,8 +2223,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага абмежавання! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2310,8 +2311,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Для абмежавання вярчэння плоскасці можа быць абраная толькі адна грань! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2434,8 +2435,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Памылка абнаўлення абмежавання + Analysis feature update error + Analysis feature update error @@ -2465,8 +2466,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Толькі адна грань для абмежавання прастакутнага пераўтварэння! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2474,11 +2485,6 @@ Specify another file please. Selected object is not a part! Абраны аб'ект не з'яўляецца дэталлю! - - - Only one face for transform constraint! - Толькі адна грань для абмежавання пераўтварэння! - Only faces can be picked @@ -2489,11 +2495,6 @@ Specify another file please. Only cylindrical faces can be picked Можна абраць толькі цыліндрычныя грані - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Можна абраць толькі пераўтваральныя грані! Спачатку дадайце абмежаванне зрушэння да паверхні, затым прымяніце абмежаванне да паверхні - FemGui::TaskObjectName @@ -2803,11 +2804,6 @@ Specify another file please. Form - - - Form - Форма - Fluid Section Parameter @@ -3057,8 +3053,8 @@ Specify another file please. - Constraint Properties - Уласцівасці абмежавання + Analysis feature properties + Analysis feature properties @@ -3122,6 +3118,21 @@ Specify another file please. with a harmonic/oscillating driving force Ўяўная частка ўжываецца толькі для ўраўненняў з гарманічнай/вагальнай рухаючай сілай + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3214,31 +3225,16 @@ Note: has no effect if a solid was selected Уяўная частка кампаненты z комплекснага патэнцыялу Заўвага: не мае аніякага эфекту, калі было абрана суцэльнае цела - - - Whether the constraint defines a constant potential - Калі абмежаванне вызначае пастаянны патэнцыял - Potential Constant Канстанта патэнцыялу - - - Whether the constraint defines a farfield potential - Калі абмежаванне вызначае патэнцыял дальняга поля патэнцыялу - Farfield / Electric infinity Дальнае поле / Электрастатычная бясконцасць - - - Whether the constraint is for the electric force - Калі абмежаванне для электрастатычнай сілы - Calculate Electric Force @@ -3585,11 +3581,6 @@ Note: for 2D only setting for x is possible, Cancel Скасаваць - - - Edit constraint - Змяніць абмежаванне - @@ -3619,11 +3610,6 @@ Note: for 2D only setting for x is possible, Meshing Пабудаваць паліганальную сетку - - - Constraint force - Абмежаванне сілы - @@ -3641,46 +3627,11 @@ Note: for 2D only setting for x is possible, Import-Export Імпарт-Экспарт - - - Constraint Contact - Абмежаванне кантакту - - - - Constraint displacement - Абмежаванне зрушэння - - - - Constraint fixed - Абмежаванне фіксавання - - - - Constraint fluid boundary - Абмежаванне мяжы вадкасць - - - - Constraint heat flux - Абмежаванне цеплавога патоку - Constraint initial temperature Абмежаванне пачатковай тэмпературы - - - Constraint planerotation - Абмежаванне вярчэння плоскасці - - - - Constraint pressure - Абмежаванне ціску - Constraint pulley @@ -3691,16 +3642,6 @@ Note: for 2D only setting for x is possible, Constraint spring Абмежаванне спружыны - - - Constraint temperature - Абмежаванне тэмпературы - - - - Constraint transform - Абмежаванне пераўтварэння - Edit post processing object @@ -3746,6 +3687,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Ці ўпэўненыя вы, што жадаеце працягнуць? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Межавая ўмова вадкасці + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4094,8 +4090,8 @@ For possible variables, see the description box below. - Constraints - Абмежаванні + Analysis features + Analysis features @@ -4264,7 +4260,7 @@ For possible variables, see the description box below. Distance - Distance + Адлегласць @@ -4583,8 +4579,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5226,128 +5222,126 @@ used for the Elmer solver - Electrostatic Constraints - Электрастатычныя абмежаванні + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Электрастатычныя абмежаванні - - - - Fluid Constraints - Гідрастатычныя абмежаванні - - - - &Fluid Constraints - &Гідрастатычныя абмежаванні + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Электрамагнітныя абмежаванні + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Электрамагнітныя абмежаванні + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Геаметрычныя абмежаванні + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - Геа&метрычныя абмежаванні + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Механічныя абмежаванні + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Механічныя абмежаванні + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Цеплавыя абмежаванні + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Цеплавыя абмежаванні + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Абмежаванні без сродку рашэння - - - - &Constraints without solver - &Абмежаванні без сродку рашэння - - - Overwrite Constants Перазапісаць канстанты - + &Overwrite Constants &Перазапісаць канстанты - + Mesh Mesh - + M&esh Паліганальная &сетка - + Solve Вырашыць - + &Solve Вы&рашыць - + Results Вынікі - + &Results &Вынікі - + Filter functions Функцыі фільтра - + &Filter functions Функцыі &фільтра - + Utilities Службовыя @@ -5403,10 +5397,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Выдаліць усе плоскасці перасеку + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5421,123 +5419,6 @@ used for the Elmer solver Стварае пастаянную дыэлектрычную пранікальнасць вакууму МКЭ для перазапісу стандартнага значэння - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Аб'ёмная крыніца цяпла цела - - - - Creates a FEM constraint body heat source - Стварае абмежаванне МКЭ для крыніцы цяпла цела - - - - FEM_ConstraintCentrif - - - Constraint centrif - Абмежаванне цэнтрабежнага тыпу - - - - Creates a FEM constraint centrif - Стварае абмежаванне МКЭ для цэнтрабежнага тыпу - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Напружанне электрастатычнага патэнцыялу - - - - Creates a FEM constraint electrostatic potential - Стварае абмежаванне МКЭ для электрастатычнага патэнцыялу - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Абмежаванне хуткасці патоку - - - - Creates a FEM constraint flow velocity - Стварае абмежаванне МКЭ для хуткасці патоку - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Абмежаванне пачатковай хуткасці патоку - - - - Creates a FEM constraint initial flow velocity - Стварае абмежаванне МКЭ для пачатковай хуткасці патоку - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Абмежаванне пачатковага ціску - - - - Creates a FEM constraint initial pressure - Стварае абмежаванне МКЭ пачатковага ціску - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Абмежаванне адлюстравання падзелу - - - - Creates a FEM constraint sectionprint - Стварае абмежаванне МКЭ для адлюстравання падзелу - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Абмежаванне ўласнай вагі - - - - Creates a FEM constraint self weight - Стварае абмежаванне МКЭ для ўласнай вагі - - - - FEM_ConstraintTie - - - Constraint tie - Абмежаванне прывязкі - - - - Creates a FEM constraint tie - Стварае абмежаванне МКЭ для прывязкі - - FEM_ElementFluid1D @@ -5673,10 +5554,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Адчыніць прыклады МКЭ + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5752,8 +5637,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Пераўтварае паверхню паліганальнай сеткі МКЭ у паліганальную сетку + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5778,18 +5663,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Ачышчае паліганальную сетку аб'екта паліганальнай сеткі МКЭ + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Адлюстраваць інфармацыю аб паліганальнай сетцы МКЭ + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5800,8 +5689,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Стварае паліганальную сетку МКЭ ад фігуры, якая створаная Gmsh + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5826,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Стварае паліганальную сетку МКЭ з суцэльнага цела ці грані фігуры з дапамогай унутранага стваральніка паліганальных сетак Netgen + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6169,19 +6058,6 @@ Please select a result type first. Без аб'екта выніку - - FEM_ConstraintCurrentDensity - - - Constraint current density - Абмежаванне шчыльнасці току - - - - Creates a FEM constraint current density - Стварае абмежаванне МКЭ для шчыльнасці току - - FEM_EquationMagnetodynamic2D @@ -6206,21 +6082,8 @@ Please select a result type first. - Electromagnetic constraints - Электрамагнітныя абмежаванні - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Абмежаванне намагнічанасці - - - - Creates a FEM constraint magnetization - Стварае абмежаванне МКЭ для намагнічанасці + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6320,11 +6183,6 @@ Please select a result type first. BoxWidget - - - Form - Форма - x @@ -6363,11 +6221,6 @@ Please select a result type first. CylinderWidget - - - Form - Форма - x @@ -6430,4 +6283,147 @@ Please select a result type first. Стварае новы фреймворк сродку рашэння МКЭ CalculiX (менш апрацоўкі памылак у выніку) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts index f49fb9389b..90dce6ba36 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constraint bearing + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Paràmetres de restricció MEF + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! L'objecte seleccionat no és una peça. - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Únicament es poden seleccionar cares cilíndriques - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Forma - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3138,6 +3133,21 @@ Specify another file please. with a harmonic/oscillating driving force La part imaginària només s'utilitza per forces motrius harmòniques/oscilants + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3230,31 +3240,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3603,11 +3598,6 @@ Note: for 2D only setting for x is possible, Cancel Cancel·la - - - Edit constraint - Edita la restricció - @@ -3637,11 +3627,6 @@ Note: for 2D only setting for x is possible, Meshing Mallat - - - Constraint force - Restricció de força - @@ -3659,46 +3644,11 @@ Note: for 2D only setting for x is possible, Import-Export Importació-exportació - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3709,16 +3659,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3764,6 +3704,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Segur que voleu continuar? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4112,8 +4107,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4607,8 +4602,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5251,128 +5246,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Restriccions electromagnètiques + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Restriccions electromagnètiques + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Resol - + &Solve &Solve - + Results Resultats - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Utilitats @@ -5428,10 +5421,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5446,123 +5443,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5699,10 +5579,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5778,8 +5662,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5804,18 +5688,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5826,8 +5714,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5852,8 +5740,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6195,19 +6083,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6233,21 +6108,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6349,11 +6211,6 @@ Please select a result type first. BoxWidget - - - Form - Forma - x @@ -6392,11 +6249,6 @@ Please select a result type first. CylinderWidget - - - Form - Forma - x @@ -6459,4 +6311,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts index 57e2e45399..0675cbef48 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts @@ -10,13 +10,13 @@ - Constraint bearing - Vazba omezení + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Vytvoří MKP vazbu pro ložisko + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Barva vazeb + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Vytvoří MKP vazbu pro kontakt mezi plochami + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Vytvoří MKP vazbu pro sílu působící na geometrickou entitu + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Vytvoří MKP vazbu pro pevnou geometrickou entitu + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Vytvoří MKP vazbu pro sílu působící na geometrickou entitu + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Vazba omezení + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Vytvoří MKP vazbu pro ozubené kolo + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Omezit tepelný tok + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Vytvoří MKP vazbu pro tlak působící na povrch + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Omezení počáteční teploty + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Vytvoří omezení FEM pro počáteční teplotu působící na těleso + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Podmínka rotace roviny + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Vytvoří vazbu FEM pro rovinnou rotační plochu + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Vytvoří omezení FEM pro tlak působící na plochu + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Omezovací kladka + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Vytvoří vazbu FEM pro řemenici + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Omezující pružina + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Vytvoří vazbu FEM pro pružinu působící na plochu + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Vytvoří omezení FEM pro teplotní/koncentrovaný tepelný tok působící na plochu + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Vytvořte vazbu FEM pro transformaci plochy + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Vytvořte vazbu MKP pro ložisko - - - - Make FEM constraint contact on face - Vytvořte kontakt vazby FEM na ploše - - - - Make FEM constraint displacement on face - Proveďte posunutí vazby FEM na ploše - - - - Make FEM constraint fixed geometry - Udělejte z vazby FEM pevnou geometrii - Create fluid boundary condition Vytvořte hraniční podmínku tekutiny + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Vytvořte omezující sílu FEM na geometrii + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Vytvořte omezení FEM pro ozubené kolo + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Proveďte omezení tepelného toku FEM na obličeji + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Vytvořte omezení počáteční teploty tělesa pomocí FEM + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Vytvořte vazbu FEM Plocha rotace + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Vytvořte tlak omezení FEM na plochu + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Udělejte na líci omezující pružinu FEM + Make spring on face + Make spring on face - Make FEM constraint for pulley - Vytvořte vazbu FEM pro řemenici + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Vytvořte omezení teploty FEM na ploše + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Proveďte transformaci vazby FEM na ploše + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ nepatřící do tváří a tváře nepatřící do svazků. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Exportují se také skupiny sítí. -Každé omezení, a pokud existují různé materiály, materiál -sestává ze dvou skupin sítí, ploch a uzlů, kde -je použito omezení nebo materiál. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ s naposledy použitým nastavením dialogu - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Všechny vazby jsou v pohledu modelu skryté -při otevření dialogu výsledků + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Skrýt omezení při otevření dialogu výsledků + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Zadejte prosím jiný soubor. FemGui::TaskFemConstraint - FEM constraint parameters - Parametry MKP vazby + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Zadejte prosím jiný soubor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Je povolen pouze jeden typ výběru (vrchol, plocha nebo hrana) na omezení! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Zadejte prosím jiný soubor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Je povolen pouze jeden typ výběru (vrchol, plocha nebo hrana) na omezení! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Zadejte prosím jiný soubor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Je povolen pouze jeden typ výběru (vrchol, plocha nebo hrana) na omezení! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Zadejte prosím jiný soubor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Je povolen pouze jeden typ výběru (vrchol, plocha nebo hrana) na omezení! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Zadejte prosím jiný soubor. - Only one face can be selected for a plane rotation constraint! - Pro omezení rotace roviny lze vybrat pouze jednu plochu! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Zadejte prosím jiný soubor. FemGui::TaskFemConstraintTransform - Constraint update error - Chyba aktualizace omezení + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Zadejte prosím jiný soubor. - Only one face for rectangular transform constraint! - Pouze jedna plocha pro obdélníkové omezení transformace! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Zadejte prosím jiný soubor. Selected object is not a part! Vybraný objekt není součást! - - - Only one face for transform constraint! - Pouze jedna plocha pro omezení transformace! - Only faces can be picked @@ -2505,11 +2510,6 @@ Zadejte prosím jiný soubor. Only cylindrical faces can be picked Mohou být vybrány pouze válcové plochy - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Lze vybrat pouze transformovatelné plochy! Nejprve použijte vazbu posunutí na povrch a poté použijte vazbu na povrch - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Zadejte prosím jiný soubor. Form - - - Form - Návrh - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Zadejte prosím jiný soubor. - Constraint Properties - Vlastnosti omezení + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginární část se používá pouze pro rovnice s harmonickou/oscilační hnací silou + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginární část potenciální z-složky Poznámka: nemá žádný účinek, pokud bylo vybráno těleso - - - Whether the constraint defines a constant potential - Zda omezení definuje konstantní potenciál - Potential Constant Potenciální konstanta - - - Whether the constraint defines a farfield potential - Zda omezení definuje potenciál vzdáleného pole - Farfield / Electric infinity Farfield / Elektrické nekonečno - - - Whether the constraint is for the electric force - Zda je omezení pro elektrickou sílu - Calculate Electric Force @@ -3604,11 +3599,6 @@ Poznámka: pro 2D je možné pouze nastavení pro x, Cancel Zrušit - - - Edit constraint - Upravit vazbu - @@ -3638,11 +3628,6 @@ Poznámka: pro 2D je možné pouze nastavení pro x, Meshing Síťování - - - Constraint force - Silová vazba - @@ -3660,46 +3645,11 @@ Poznámka: pro 2D je možné pouze nastavení pro x, Import-Export Import-Export - - - Constraint Contact - Kontakt s omezením - - - - Constraint displacement - Posunutí omezení - - - - Constraint fixed - Omezení pevná - - - - Constraint fluid boundary - Omezte hranici tekutiny - - - - Constraint heat flux - Omezte tepelný tok - Constraint initial temperature Omezení počáteční teploty - - - Constraint planerotation - Omezení rovinné rotace - - - - Constraint pressure - Omezení tlaku - Constraint pulley @@ -3710,16 +3660,6 @@ Poznámka: pro 2D je možné pouze nastavení pro x, Constraint spring Omezující pružina - - - Constraint temperature - Omezující teplota - - - - Constraint transform - Transformace omezení - Edit post processing object @@ -3765,6 +3705,61 @@ Poznámka: pro 2D je možné pouze nastavení pro x, Are you sure you want to continue? Opravdu si přejete pokračovat? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Mezní stav kapaliny + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ Možné proměnné naleznete v popisném poli níže. - Constraints - Vazby + Analysis features + Analysis features @@ -4283,7 +4278,7 @@ Možné proměnné naleznete v popisném poli níže. Distance - Distance + Vzdálenost @@ -4608,8 +4603,8 @@ jako směr je použit normální vektor plochy TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflow + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ používá se pro řešič Elmer - Electrostatic Constraints - Elektrostatická omezení + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Elektrostatická omezení - - - - Fluid Constraints - Omezení tekutin - - - - &Fluid Constraints - &Omezení tekutiny + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Elektromagnetická omezení + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Elektromagnetická omezení + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrická omezení + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrická omezení + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanická omezení + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanická omezení + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Tepelná omezení + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Tepelná omezení + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Omezení bez řešitele - - - - &Constraints without solver - &Omezení bez řešiče - - - Overwrite Constants Přepsat konstanty - + &Overwrite Constants &Přepsat konstanty - + Mesh Mesh - + M&esh Pletivo - + Solve Řešit - + &Solve &Řešit - + Results Results - + &Results &Výsledek - + Filter functions Funkce filtru - + &Filter functions &Filtrovat funkce - + Utilities Nástroje @@ -5429,10 +5422,14 @@ používá se pro řešič Elmer FEM_ClippingPlaneRemoveAll - Remove all clipping planes Odstraňte všechny ořezové roviny + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ používá se pro řešič Elmer Vytvoří konstantní permitivitu vakua FEM pro přepsání standardní hodnoty - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Omezte zdroj tělesného tepla - - - - Creates a FEM constraint body heat source - Vytvoří zdroj tepla tělesa omezení FEM - - - - FEM_ConstraintCentrif - - - Constraint centrif - Střed omezení - - - - Creates a FEM constraint centrif - Vytvoří střed vazby FEM - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Omezení elektrostatického potenciálu - - - - Creates a FEM constraint electrostatic potential - Vytváří omezení MKP elektrostatický potenciál - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Omezte rychlost proudění - - - - Creates a FEM constraint flow velocity - Vytvoří omezení rychlosti proudění FEM - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Omezte počáteční rychlost proudění - - - - Creates a FEM constraint initial flow velocity - Vytvoří omezení FEM počáteční rychlost proudění - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Omezte počáteční tlak - - - - Creates a FEM constraint initial pressure - Vytvoří počáteční tlak vazby FEM - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Omezit otisk sekce - - - - Creates a FEM constraint sectionprint - Vytvoří otisk řezu vazby FEM - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Omezte vlastní váhu - - - - Creates a FEM constraint self weight - Vytvoří vazbu MKP vlastní tíha - - - - FEM_ConstraintTie - - - Constraint tie - Omezující kravata - - - - Creates a FEM constraint tie - Vytvoří vazbu vazby FEM - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ používá se pro řešič Elmer FEM_Examples - Open FEM examples Otevřete příklady MKP + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ používá se pro řešič Elmer - Convert the surface of a FEM mesh to a mesh - Převeďte povrch sítě MKP na síť + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ používá se pro řešič Elmer - Clear the Mesh of a FEM mesh object - Vyčistěte síť od síťového objektu FEM + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Zobrazit informace o síti FEM + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ používá se pro řešič Elmer - Create a FEM mesh from a shape by Gmsh mesher - Vytvořte síť FEM z tvaru pomocí sítě Gmsh + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ používá se pro řešič Elmer - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Vytvořte síť FEM z tělesa nebo tvaru plochy pomocí vnitřní sítě Netgen + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Nejprve prosím vyberte typ výsledku. Žádný výsledný objekt - - FEM_ConstraintCurrentDensity - - - Constraint current density - Omezte hustotu proudu - - - - Creates a FEM constraint current density - Vytvoří omezení proudové hustoty FEM - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Nejprve prosím vyberte typ výsledku. - Electromagnetic constraints - Elektromagnetická omezení - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Omezující magnetizace - - - - Creates a FEM constraint magnetization - Vytvoří magnetizaci vazby MKP + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Nejprve prosím vyberte typ výsledku. BoxWidget - - - Form - Návrh - x @@ -6393,11 +6250,6 @@ Nejprve prosím vyberte typ výsledku. CylinderWidget - - - Form - Návrh - x @@ -6460,4 +6312,147 @@ Nejprve prosím vyberte typ výsledku. Vytvoří MKP řešič CalculiX nový framework (méně výsledné zpracování chyb) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts index 4167d542f5..a8090ceeea 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts @@ -10,13 +10,13 @@ - Constraint bearing - Randbedingung Wälzlager + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - FEM-Randbedingung für Wälzlager erstellen + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Randbedingung Flächenkontakt + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Erzeugt eine FEM-Randbedingung für einen Kontakt zwischen Flächen + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Erstellt eine FEM-Randbedingung für den Versatz einer geometrischen Einheit + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Erstellt eine FEM-Randbedingung für die Festsetzung einer geometrischen Einheit + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - FEM-Randbedingung für Krafteinwirkung auf eine geometrische Einheit erzeugen + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Randbedingung Zahnrad + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - FEM-Randbedingung für Zahnrad erstellen + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Randbedingung Wärmestrom + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - FEM-Randbedingung für einen Wärmestrom auf eine Fläche erzeugen + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Randbedingung Starttemperatur + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - FEM-Randbedingung für Starttemperatur eines Körpers erzeugen + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Randbedingung planare Rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Erzeugt eine FEM-Randbedingung für eine plane Rotationsfläche + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - FEM-Randbedingung für den Druck auf eine Fläche erzeugen + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Randbedingung Riemenscheibe + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - FEM-Randbedingung für Riemenscheibe erzeugen + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Randbedingung Feder + Spring + Spring - Creates a FEM constraint for a spring acting on a face - FEM-Randbedingung für eine Feder erzeugen, die auf eine Fläche einwirkt + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - FEM-Randbedingung für die Temperatur einer Fläche/konzentrierten Wärmestrom auf eine Fläche erzeugen + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - FEM-Randbedingung für die Verformung einer Fläche erzeugen + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - FEM-Randbedingung für Wälzlager erstellen - - - - Make FEM constraint contact on face - FEM-Randbedingung Kontakt auf Fläche erzeugen - - - - Make FEM constraint displacement on face - FEM-Randbedingungen für Verschiebung/Verdrehung einer Fläche erzeugen - - - - Make FEM constraint fixed geometry - FEM-Randbedingung für Fixierung einer geometrischen Einheit erzeugen - Create fluid boundary condition Fluid-Randbedingung erstellen + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - FEM-Randbedingung für Krafteinwirkung auf eine Geometrie erzeugen + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - FEM-Randbedinung für Zahnrad erstellen + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - FEM-Randbedingung für Wärmestrom auf eine Fläche erzeugen + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - FEM-Randbedingung für Starttemperatur eines Körpers erzeugen + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - FEM-Randbedingung für plane Rotationsfläche erzeugen + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - FEM-Randbedingung für Druck auf eine Fläche erzeugen + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - FEM-Randbedingung für eine Feder erstellen, die auf eine Fläche einwirkt + Make spring on face + Make spring on face - Make FEM constraint for pulley - FEM-Randbedingung für Riemenscheibe erzeugen + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - FEM-Randbedingung für die Temperatur einer Fläche erzeugen + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - FEM-Randbedingung für die Verformung einer Fläche erzeugen + Make local coordinate system on face + Make local coordinate system on face @@ -1213,12 +1213,13 @@ nur Kanten exportiert werden, die nicht zu Flächen und Flächen die nicht zu Vo Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Netz-Gruppen werden ebenfalls exportiert. -Jede Beschränkung und, wenn es verschiedene Materialien gibt, jedes Material -besteht aus zwei Netzgruppen, Flächen und Knoten, auf die die Beschränkung oder das Material angewendet wird. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1318,14 +1319,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Alle Randbedingungen/Einschränkungen sind in der Modellansicht verborgen, wenn der Ergebnisdialog geöffnet ist + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Einschränkungen beim Öffnen des Ergebnisdialogs ausblenden + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1873,8 +1875,8 @@ Bitte eine andere Datei angeben. FemGui::TaskFemConstraint - FEM constraint parameters - FEM Randbedingungen + Analysis feature parameters + Analysis feature parameters @@ -2029,8 +2031,8 @@ Bitte eine andere Datei angeben. - Only one type of selection (vertex,face or edge) per constraint allowed! - Nur eine Art von Auswahl (Knoten, Fläche oder Kante) pro Randbedingung erlaubt! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2058,8 +2060,8 @@ Bitte eine andere Datei angeben. - Only one type of selection (vertex,face or edge) per constraint allowed! - Nur ein Typ der Auswahl (Vertex, Fläche oder Kante) pro Beschränkung erlaubt! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2187,8 +2189,8 @@ Bitte eine andere Datei angeben. - Only one type of selection (vertex,face or edge) per constraint allowed! - Nur ein Typ der Auswahl (Vertex, Fläche oder Kante) pro Beschränkung erlaubt! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2216,8 +2218,8 @@ Bitte eine andere Datei angeben. - Only one type of selection (vertex,face or edge) per constraint allowed! - Nur eine Art der Auswahl (Knoten, Fläche oder Kante) pro Randbedingung erlaubt! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2304,8 +2306,8 @@ Bitte eine andere Datei angeben. - Only one face can be selected for a plane rotation constraint! - Nur eine Fläche kann für Randbedingung plane Rotation ausgewählt werden! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2428,8 +2430,8 @@ Bitte eine andere Datei angeben. FemGui::TaskFemConstraintTransform - Constraint update error - Randbedingungs-Aktualisierungsfehler + Analysis feature update error + Analysis feature update error @@ -2459,8 +2461,18 @@ Bitte eine andere Datei angeben. - Only one face for rectangular transform constraint! - Nur eine Fläche für rechteckige Transformations-Randbedingung! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2468,11 +2480,6 @@ Bitte eine andere Datei angeben. Selected object is not a part! Ausgewähltes Objekt ist kein Teil! - - - Only one face for transform constraint! - Nur eine Fläche für Transformations-Randbedingung! - Only faces can be picked @@ -2483,11 +2490,6 @@ Bitte eine andere Datei angeben. Only cylindrical faces can be picked Es können nur zylindrische Flächen ausgewählt werden - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Nur umwandelbare Flächen können ausgewählt werden! Zuerst die Verschiebung auf die Oberfläche anwenden und dann erst auf Oberfläche beschränken - FemGui::TaskObjectName @@ -2797,11 +2799,6 @@ Bitte eine andere Datei angeben. Form - - - Form - Form - Fluid Section Parameter @@ -3051,8 +3048,8 @@ Bitte eine andere Datei angeben. - Constraint Properties - Randbedingungs-Eigenschaften + Analysis feature properties + Analysis feature properties @@ -3117,6 +3114,21 @@ with a harmonic/oscillating driving force Imaginärteil wird nur für Gleichungen mit harmonischer/oszillierender Antriebskraft verwendet + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3209,31 +3221,16 @@ Note: has no effect if a solid was selected Imaginärer Anteil einer potentialen z-Komponente Hinweis: hat keinen Effekt, wenn ein Volumen ausgewählt wurde - - - Whether the constraint defines a constant potential - Ob die Einschränkung ein konstantes Potenzial definiert - Potential Constant Potenzial Konstante - - - Whether the constraint defines a farfield potential - Ob die Einschränkung ein Fernfeld-Potenzial definiert - Farfield / Electric infinity Fernfeld / Elektrische Unendlichkeit - - - Whether the constraint is for the electric force - Ob die Einschränkung für die elektrische Kraft ist - Calculate Electric Force @@ -3582,11 +3579,6 @@ Hinweis: Für 2D ist nur für x möglich, Cancel Abbrechen - - - Edit constraint - Randbedingung bearbeiten - @@ -3616,11 +3608,6 @@ Hinweis: Für 2D ist nur für x möglich, Meshing Vernetzung - - - Constraint force - Randbedingung Krafteinwirkung - @@ -3638,46 +3625,11 @@ Hinweis: Für 2D ist nur für x möglich, Import-Export Import / Export - - - Constraint Contact - Randbedingung Flächenkontakt - - - - Constraint displacement - Randbedingung Versatz - - - - Constraint fixed - Randbedingung Festsetzen - - - - Constraint fluid boundary - Randbedingung Flüssigkeitsgrenze - - - - Constraint heat flux - Randbedingung Wärmestrom - Constraint initial temperature Randbedingung Starttemperatur - - - Constraint planerotation - Randbedingung plane Rotationsfläche - - - - Constraint pressure - Randbedingung Druck - Constraint pulley @@ -3688,16 +3640,6 @@ Hinweis: Für 2D ist nur für x möglich, Constraint spring Randbedingung Feder - - - Constraint temperature - Randbedingung Temperatur - - - - Constraint transform - Randbedingung Verformung - Edit post processing object @@ -3743,6 +3685,61 @@ Hinweis: Für 2D ist nur für x möglich, Are you sure you want to continue? Sind Sie sicher, dass Sie fortfahren möchten? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid-Randbedingung + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4091,8 +4088,8 @@ Siehe das nachfolgende Beschreibungsfeld für mögliche Variablen. - Constraints - Beschränkungen + Analysis features + Analysis features @@ -4256,7 +4253,7 @@ Siehe das nachfolgende Beschreibungsfeld für mögliche Variablen. Location - Lage + Ort @@ -4579,15 +4576,15 @@ Normalenvektors der Fläche wird als Richtung verwendet Reverse direction - Umgekehrte Richtung + Richtung umkehren TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5230,128 +5227,126 @@ für den Löser Elmer verwendet werden - Electrostatic Constraints - Elektrostatische Randbedingungen + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Elektrostatische Randbedingungen - - - - Fluid Constraints - Strömungs-Randbedingungen - - - - &Fluid Constraints - &Fluid-Randbedingungen + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Elektromagnetische Randbedingungen + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Elektromagnetische Randbedingungen + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrische Randbedingungen + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrische Randbedingungen + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanische Randbedingungen + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanische Randbedingungen + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermische Randbedingungen + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermische Randbedingungen + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Randbedingungen ohne Solver - - - - &Constraints without solver - &Randbedingungen ohne Solver - - - Overwrite Constants Konstanten überschreiben - + &Overwrite Constants &Konstanten überschreiben - + Mesh Netz - + M&esh N&etz - + Solve Lösen - + &Solve &Lösen - + Results Ergebnisse - + &Results &Ergebnisse - + Filter functions Filterfunktionen - + &Filter functions &Filterfunktionen - + Utilities Dienstprogramme @@ -5407,10 +5402,14 @@ für den Löser Elmer verwendet werden FEM_ClippingPlaneRemoveAll - Remove all clipping planes Entferne alle Schnittebenen + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5425,123 +5424,6 @@ für den Löser Elmer verwendet werden Erstellt eine Vakuumpermittivität, um den Standardwert zu überschreiben - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Randbedingung Körperwärmequelle - - - - Creates a FEM constraint body heat source - Erstellt eine FEM-Randbedingung Körperwärmequelle - - - - FEM_ConstraintCentrif - - - Constraint centrif - Randbedingung Zentrifugal-Belastung - - - - Creates a FEM constraint centrif - Erstellt eine FEM-Randbedingung für Zentrifugal-Belastung - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Randbedingung elektrostatisches Potential - - - - Creates a FEM constraint electrostatic potential - Erstellt eine FEM-Randbedingung elektrostatisches Potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Randbedingung Strömungsgeschwindigkeit - - - - Creates a FEM constraint flow velocity - Erstellt eine FEM-Randbedingung für Strömungsgeschwindigkeit - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Startbedingung Strömungsgeschwindigkeit - - - - Creates a FEM constraint initial flow velocity - Erstellt eine FEM-Startbedingung für die Strömungsgeschwindigkeit - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Startbedingung Druck - - - - Creates a FEM constraint initial pressure - Erstellt eine FEM-Startbedingung für den Druck - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Randbedingung Querschnitts-Auszug - - - - Creates a FEM constraint sectionprint - Erstellt eine FEM-Randbedingung für Querschnitts-Auszug - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Randbedingung Eigengewicht - - - - Creates a FEM constraint self weight - Erzeugt eine FEM-Randbedingung Eigengewicht - - - - FEM_ConstraintTie - - - Constraint tie - Zwangsverbindung - - - - Creates a FEM constraint tie - Erstellt eine FEM-Zwangsbedingung - - FEM_ElementFluid1D @@ -5678,10 +5560,14 @@ für den Löser Elmer verwendet werden FEM_Examples - Open FEM examples FEM-Beispiele öffnen + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5757,8 +5643,8 @@ für den Löser Elmer verwendet werden - Convert the surface of a FEM mesh to a mesh - Wandlt die Oberfläche eines FEM-Netzes in ein Netz um + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5783,18 +5669,22 @@ für den Löser Elmer verwendet werden - Clear the Mesh of a FEM mesh object - Lösche das Netz eines FEM-Netz-Objekts + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Informationen zum FEM-Netz anzeigen + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5805,8 +5695,8 @@ für den Löser Elmer verwendet werden - Create a FEM mesh from a shape by Gmsh mesher - Erstelle ein FEM-Netz aus einer Gestalt mittels Gmsh Mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5831,8 +5721,8 @@ für den Löser Elmer verwendet werden - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Erstellt ein FEM-Netz aus einem Festkörper oder Flächenform mit Hilfe von Netgen internem Netzgenerator + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6174,19 +6064,6 @@ Bitte wählen Sie zuerst einen Ergebnistyp. Kein Ergebnisobjekt - - FEM_ConstraintCurrentDensity - - - Constraint current density - Randbedingung Stromdichte - - - - Creates a FEM constraint current density - Erstellt eine FEM-Randbedingung Stromdichte - - FEM_EquationMagnetodynamic2D @@ -6212,21 +6089,8 @@ Bitte wählen Sie zuerst einen Ergebnistyp. - Electromagnetic constraints - Elektromagnetische Randbedingungen - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Randbedingung Magnetisierung - - - - Creates a FEM constraint magnetization - Erstellt eine FEM-Randbedingung Magnetisierung + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6328,11 +6192,6 @@ Bitte wählen Sie zuerst einen Ergebnistyp. BoxWidget - - - Form - Form - x @@ -6371,11 +6230,6 @@ Bitte wählen Sie zuerst einen Ergebnistyp. CylinderWidget - - - Form - Form - x @@ -6394,7 +6248,7 @@ Bitte wählen Sie zuerst einen Ergebnistyp. Center - Mitte + Zentrum @@ -6438,4 +6292,147 @@ Bitte wählen Sie zuerst einen Ergebnistyp. Erstellt ein neues Framework des FEM-Lösers CalculiX (weniger Fehlerbehandlung bei Ergebnissen) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts index 5a3fd24101..aef65e215f 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts @@ -10,13 +10,13 @@ - Constraint bearing - Περιορισμός έδρασης - ρουλεμάν + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Δημιουργεί περιορισμό FEM για ένα ρουλεμάν + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Περιορισμός επαφής + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Δημιουργεί περιορισμό FEM για την επαφή μεταξύ όψεων + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Δημιουργήστε περιορισμό FEM για μια δύναμη που ασκείται σε μια γεωμετρική οντότητα + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Δημιουργεί έναν περιορισμό FEM για μια σταθερή γεωμετρική οντότητα + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Δημιουργεί έναν περιορισμό FEM για μια δύναμη που ενεργεί σε μια γεωμετρική οντότητα + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Εργαλεία περιορισμών + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Περιορισμό τροχαλίας + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Δημιουργεί έναν περιορισμό FEM για μια θερμοκρασία/συγκεντρωμένη ροή θερμότητας που ενεργεί σε μια όψη + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Δημιουργήστε περιορισμό FEM για τη μετατόπιση μιας όψης + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Πραγματοποιήστε μετατόπιση περιορισμού FEM στην όψη - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Δημιουργήστε περιορισμό FEM για ένα γρανάζι + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1216,13 +1216,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1323,15 +1323,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1891,8 +1891,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Παράμετροι περιορισμού FEM + Analysis feature parameters + Analysis feature parameters @@ -2047,8 +2047,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2076,8 +2076,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2205,8 +2205,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2234,8 +2234,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2322,8 +2322,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2446,8 +2446,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Σφάλμα ενημέρωσης περιορισμού + Analysis feature update error + Analysis feature update error @@ -2477,8 +2477,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Μόνο μία όψη για περιορισμό μετατόπισης ορθογώνιου! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2486,11 +2496,6 @@ Specify another file please. Selected object is not a part! Το επιλεγμένο αντικείμενο δεν είναι εξάρτημα! - - - Only one face for transform constraint! - Μόνο μια όψη για περιορισμό μετατόπισης! - Only faces can be picked @@ -2501,12 +2506,6 @@ Specify another file please. Only cylindrical faces can be picked Μόνο κυλινδρικές όψεις μπορούν να επιλεχθούν - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Μπορούν να επιλεγούν μόνο μετατοπίσιμες όψεις ! -Εφαρμόστε πρώτα περιορισμό μετατόπισης στην επιφάνεια και στη συνέχεια εφαρμόστε γενικό περιορισμό στην επιφάνεια - FemGui::TaskObjectName @@ -2816,11 +2815,6 @@ Specify another file please. Form - - - Form - Μορφή - Fluid Section Parameter @@ -3070,8 +3064,8 @@ Specify another file please. - Constraint Properties - Ιδιότητες Περιορισμού + Analysis feature properties + Analysis feature properties @@ -3136,6 +3130,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3228,31 +3237,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3601,11 +3595,6 @@ Note: for 2D only setting for x is possible, Cancel Ακύρωση - - - Edit constraint - Επεξεργασία περιορισμού - @@ -3635,11 +3624,6 @@ Note: for 2D only setting for x is possible, Meshing Πλεγματοποίηση - - - Constraint force - Περιορισμός δύναμης - @@ -3657,46 +3641,11 @@ Note: for 2D only setting for x is possible, Import-Export Εισαγωγή-Εξαγωγή - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Μετατόπιση περιορισμού - - - - Constraint fixed - Σταθερός περιορισμός - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3707,16 +3656,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Περιορισμό θερμοκρασίας - - - - Constraint transform - Περιορισμός μετατόπισης - Edit post processing object @@ -3762,6 +3701,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Are you sure you want to continue? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Οριακή κατάσταση ρευστού + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4110,8 +4104,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4605,8 +4599,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5249,128 +5243,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Επίλυση - + &Solve &Solve - + Results Results - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Βοηθήματα @@ -5426,10 +5418,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5444,123 +5440,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5697,10 +5576,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5776,8 +5659,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5802,18 +5685,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5824,8 +5711,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5850,8 +5737,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6193,19 +6080,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6231,21 +6105,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6347,11 +6208,6 @@ Please select a result type first. BoxWidget - - - Form - Μορφή - x @@ -6390,11 +6246,6 @@ Please select a result type first. CylinderWidget - - - Form - Μορφή - x @@ -6457,4 +6308,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts index 7729e6a1ee..26fbe7e17f 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts @@ -10,13 +10,13 @@ - Constraint bearing - Tensión de rodamiento + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Crear restricción FEM para un rodamiento + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Restricción de Contacto + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Crea una restricción MEF para el contacto entre caras + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Crea una restricción MEF para un desplazamiento actuando sobre una entidad geométrica + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Crear restricción FEM para una entidad geométrica fija + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Crea una restricción MEF para una fuerza actuando sobre una entidad geométrica + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Restricción de engranaje + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Crea una restricción MEF para un engranaje + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Restricción de flujo de calor + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Crea una restricción MEF para un flujo de calor actuando sobre una cara + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Restricción de temperatura inicial + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Crea una restricción MEF para la temperatura inicial actuando sobre un cuerpo + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Restricción de plano de rotación + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Crea una restricción MEF para la cara del plano de rotación + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Crea una restricción MEF para una presión actuando sobre una cara + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Restricción de polea + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Crea una restricción MEF para una polea + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Restricción de resorte + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Crea una restricción MEF para un resorte actuando sobre una cara + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Crea una restricción MEF para una temperatura/concentración de flujo de calor actuando sobre una cara + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Crear restricción MEF para transformar una cara + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Crear restricción MEF para rodamiento - - - - Make FEM constraint contact on face - Crear restricción de contacto MEF en la cara - - - - Make FEM constraint displacement on face - Crear restricción de desplazamiento MEF en la cara - - - - Make FEM constraint fixed geometry - Crear restricción de geometría fija MEF - Create fluid boundary condition Crear condición límite de fluido + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Crear restricción de fuerza MEF en geometría + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Crear restricción MEF para engranaje + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Crear restricción de flujo de calor MEF en la cara + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Crear restricción de temperatura inicial MEF en cuerpo + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Crear restricción MEF de Plano de Rotación en cara + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Crear restricción de presión MEF en la cara + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Crear restricción de resorte MEF en la cara + Make spring on face + Make spring on face - Make FEM constraint for pulley - Crear restricción MEF para polea + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Crear restricción de temperatura MEF en la cara + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Crear restricción de transformación MEF en la cara + Make local coordinate system on face + Make local coordinate system on face @@ -1216,13 +1216,13 @@ que no pertenecen a caras y caras que no pertenecen a volúmenes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Los grupos de Mallas también son exportadas. -Cada restricción y, si hay materiales diferentes, materiales -consisten en dos grupos de malla, caras y nodos donde la -restriccion o material es aplicado. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1323,15 +1323,15 @@ con los últimos ajustes de diálogo usados - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Todas las restricciones se ocultan en la vista del modelo -cuando se abre el diálogo de resultados + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Ocultar restricciones al abrir el diálogo de resultados + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1894,8 +1894,8 @@ Especifique otro archivo, por favor. FemGui::TaskFemConstraint - FEM constraint parameters - Parámetros de restricción MEF + Analysis feature parameters + Analysis feature parameters @@ -2050,8 +2050,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2079,8 +2079,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2208,8 +2208,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2237,8 +2237,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2325,8 +2325,8 @@ Especifique otro archivo, por favor. - Only one face can be selected for a plane rotation constraint! - ¡Solo una cara puede ser seleccionada para una restricción de plano de rotación! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2449,8 +2449,8 @@ Especifique otro archivo, por favor. FemGui::TaskFemConstraintTransform - Constraint update error - Error de actualización de restricción + Analysis feature update error + Analysis feature update error @@ -2480,8 +2480,18 @@ Especifique otro archivo, por favor. - Only one face for rectangular transform constraint! - ¡Solo una cara para restricción de transformación rectangular! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2489,11 +2499,6 @@ Especifique otro archivo, por favor. Selected object is not a part! ¡El objeto seleccionado no es una pieza! - - - Only one face for transform constraint! - ¡Solo una cara para restricción de transformación! - Only faces can be picked @@ -2504,11 +2509,6 @@ Especifique otro archivo, por favor. Only cylindrical faces can be picked Sólo se pueden elegir caras cilíndricas - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - ¡Solo se pueden seleccionar caras transformables! Aplique primero la restricción de desplazamiento a la superficie y luego aplique la restricción a la superficie - FemGui::TaskObjectName @@ -2818,11 +2818,6 @@ Especifique otro archivo, por favor. Form - - - Form - Forma - Fluid Section Parameter @@ -3072,8 +3067,8 @@ Especifique otro archivo, por favor. - Constraint Properties - Propiedades de Restricción + Analysis feature properties + Analysis feature properties @@ -3138,6 +3133,21 @@ with a harmonic/oscillating driving force La parte imaginaria solo se utiliza para las ecuaciones con una fuerza de conducción armónica/oscilante + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3230,31 +3240,16 @@ Note: has no effect if a solid was selected Parte imaginaria de la componente z del potencial Nota: no tiene efecto si un sólido fue seleccionado - - - Whether the constraint defines a constant potential - Si la restricción define un potencial constante - Potential Constant Constante de Potencial - - - Whether the constraint defines a farfield potential - Si la restricción define un potencial de campo lejano - Farfield / Electric infinity Farfield / Infinidad eléctrica - - - Whether the constraint is for the electric force - Si la restricción es para la fuerza eléctrica - Calculate Electric Force @@ -3603,11 +3598,6 @@ Nota: para 2D solo la configuración para x es posible, Cancel Cancelar - - - Edit constraint - Editar restricción - @@ -3637,11 +3627,6 @@ Nota: para 2D solo la configuración para x es posible, Meshing Mallado - - - Constraint force - Restringir fuerza - @@ -3659,46 +3644,11 @@ Nota: para 2D solo la configuración para x es posible, Import-Export Importar-Exportar - - - Constraint Contact - Restricción de Contacto - - - - Constraint displacement - Restricción de desplazamiento - - - - Constraint fixed - Restricción fija - - - - Constraint fluid boundary - Restricción de límite de fluido - - - - Constraint heat flux - Restricción de flujo de calor - Constraint initial temperature Restricción de temperatura inicial - - - Constraint planerotation - Restricción de plano de rotación - - - - Constraint pressure - Restricción de presión - Constraint pulley @@ -3709,16 +3659,6 @@ Nota: para 2D solo la configuración para x es posible, Constraint spring Restricción de resorte - - - Constraint temperature - Restricción de temperatura - - - - Constraint transform - Restricción de transformación - Edit post processing object @@ -3764,6 +3704,61 @@ Nota: para 2D solo la configuración para x es posible, Are you sure you want to continue? ¿Estás seguro/a de que quieres continuar? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Condición límite del Fluido + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4112,8 +4107,8 @@ Para posibles variables, vea el cuadro de descripción a continuación. - Constraints - Restricciones + Analysis features + Analysis features @@ -4607,8 +4602,8 @@ normal de la cara se utiliza como dirección TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5251,128 +5246,126 @@ usada por el solver Elmer - Electrostatic Constraints - Restricciones electroestáticas + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Restricciones Electroestáticas - - - - Fluid Constraints - Restricciones de Fluido - - - - &Fluid Constraints - &Restricciones de Fluido + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Restricciones electromagnéticas + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - Restricciones &electromagnéticas + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Restricciónes geométricas + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Restricciónes geométricas + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Restricciones mecánicas + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Restricciones mecánicas + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Restricciones térmicas + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Restricciones térmicas + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Restricciones sin solucionador - - - - &Constraints without solver - &Restricciones sin solucionador - - - Overwrite Constants Sobrescribir Constantes - + &Overwrite Constants &Sobrescribir Constantes - + Mesh Malla - + M&esh M&esh - + Solve Resolver - + &Solve &Resolver - + Results Resultados - + &Results &Resultados - + Filter functions Funciones de filtro - + &Filter functions &Filtrar funciones - + Utilities Utilidades @@ -5428,10 +5421,14 @@ usada por el solver Elmer FEM_ClippingPlaneRemoveAll - Remove all clipping planes Eliminar todos los planos de recorte + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5446,123 +5443,6 @@ usada por el solver Elmer Crea un permitividad de vacío constante FEM para sobrescribir el valor estándar - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Restringir fuente de calor del cuerpo - - - - Creates a FEM constraint body heat source - Crea una restricción FEM de cuerpo fuente de calor - - - - FEM_ConstraintCentrif - - - Constraint centrif - Restricción de centrifugado - - - - Creates a FEM constraint centrif - Crea una restricción FEM de centrifugado - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Restricción de potencial electrostático - - - - Creates a FEM constraint electrostatic potential - Crea una restricción FEM de potencial electroestático - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Restricción de velocidad de flujo - - - - Creates a FEM constraint flow velocity - Crea una restricción FEM de velocidad de flujo - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Restricción de velocidad inicial de flujo - - - - Creates a FEM constraint initial flow velocity - Crea una restricción FEM de velocidad inicial de flujo - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Restricción de presión inicial - - - - Creates a FEM constraint initial pressure - Crea una restricción FEM de presión inicial - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Restricción de la sección de impresión - - - - Creates a FEM constraint sectionprint - Crea una restricción FEM de sección de impresión - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Restricción de peso propio - - - - Creates a FEM constraint self weight - Crea una restricción FEM de peso propio - - - - FEM_ConstraintTie - - - Constraint tie - Restricción de unión - - - - Creates a FEM constraint tie - Crea una restricción FEM de unión - - FEM_ElementFluid1D @@ -5699,10 +5579,14 @@ elasticidad (estrés) FEM_Examples - Open FEM examples Abre ejemplos de FEM + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5778,8 +5662,8 @@ elasticidad (estrés) - Convert the surface of a FEM mesh to a mesh - Convertir la superficie de una malla FEM en una malla + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5804,18 +5688,22 @@ elasticidad (estrés) - Clear the Mesh of a FEM mesh object - Borrar la Malla de un objeto de malla FEM + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Mostrar la información de la malla FEM + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5826,8 +5714,8 @@ elasticidad (estrés) - Create a FEM mesh from a shape by Gmsh mesher - Crear una malla FEM de una forma por Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5852,8 +5740,8 @@ elasticidad (estrés) - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Crear una malla FEM desde una forma sólida o cara mediante el creador de mallas interno de Netgen + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6195,19 +6083,6 @@ Por favor, primero seleccione un tipo de resultado. Ningún objeto resultante - - FEM_ConstraintCurrentDensity - - - Constraint current density - Restringir densidad actual - - - - Creates a FEM constraint current density - Crear una restricción FEM de densidad de corriente - - FEM_EquationMagnetodynamic2D @@ -6233,21 +6108,8 @@ para fuerzas magnetodinámicas 2D - Electromagnetic constraints - Restricciones electromagnéticas - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Restricción de magnetización - - - - Creates a FEM constraint magnetization - Crea una magnetización de restricciones FEM + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6349,11 +6211,6 @@ deformación (elasticidad no lineal) BoxWidget - - - Form - Forma - x @@ -6392,11 +6249,6 @@ deformación (elasticidad no lineal) CylinderWidget - - - Form - Forma - x @@ -6459,4 +6311,147 @@ deformación (elasticidad no lineal) Crea un nuevo marco de trabajo para el solucionador de FEM CalculiX (menos manejo de errores de resultado) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts index 6e0626977a..ad0f0998a6 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts @@ -10,13 +10,13 @@ - Constraint bearing - Tensión de rodamiento + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Crear restricción FEM para un rodamiento + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Restricción de Contacto + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Crea una restricción MEF para el contacto entre caras + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Crea una restricción MEF para un desplazamiento actuando sobre una entidad geométrica + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Crear restricción FEM para una entidad geométrica fija + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Crea una restricción MEF para una fuerza actuando sobre una entidad geométrica + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Restricción de engranaje + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Crea una restricción MEF para un engranaje + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Restricción de flujo de calor + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Crea una restricción MEF para un flujo de calor actuando sobre una cara + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Restricción de temperatura inicial + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Crea una restricción MEF para la temperatura inicial actuando sobre un cuerpo + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Restricción de plano de rotación + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Crea una restricción MEF para la cara del plano de rotación + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Crea una restricción MEF para una presión actuando sobre una cara + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Restricción de polea + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Crea una restricción MEF para una polea + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Restricción de resorte + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Crea una restricción MEF para un resorte actuando sobre una cara + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Crea una restricción MEF para una temperatura/concentración de flujo de calor actuando sobre una cara + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Crear restricción MEF para transformar una cara + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Crear restricción MEF para rodamiento - - - - Make FEM constraint contact on face - Crear restricción de contacto MEF en la cara - - - - Make FEM constraint displacement on face - Crear restricción de desplazamiento MEF en la cara - - - - Make FEM constraint fixed geometry - Crear restricción de geometría fija MEF - Create fluid boundary condition Crear condición límite de fluido + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Crear restricción de fuerza MEF en geometría + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Crear restricción MEF para engranaje + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Crear restricción de flujo de calor MEF en la cara + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Crear restricción de temperatura inicial MEF en cuerpo + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Crear restricción MEF de Plano de Rotación en cara + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Crear restricción de presión MEF en la cara + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Crear restricción de resorte MEF en la cara + Make spring on face + Make spring on face - Make FEM constraint for pulley - Crear restricción MEF para polea + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Crear restricción de temperatura MEF en la cara + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Crear restricción de transformación MEF en la cara + Make local coordinate system on face + Make local coordinate system on face @@ -1216,13 +1216,13 @@ que no pertenecen a caras y caras que no pertenecen a volúmenes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Los grupos de Mallas también son exportadas. -Cada restricción y, si hay materiales diferentes, materiales -consisten en dos grupos de malla, caras y nodos donde la -restriccion o material es aplicado. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1323,15 +1323,15 @@ con los últimos ajustes de diálogo usados - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Todas las restricciones se ocultan en la vista del modelo -cuando se abre el diálogo de resultados + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Ocultar restricciones al abrir el diálogo de resultados + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1894,8 +1894,8 @@ Especifique otro archivo, por favor. FemGui::TaskFemConstraint - FEM constraint parameters - Parámetros de restricción FEM + Analysis feature parameters + Analysis feature parameters @@ -2050,8 +2050,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2079,8 +2079,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2208,8 +2208,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2237,8 +2237,8 @@ Especifique otro archivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - ¡Solo un tipo de selección (vértice, cara o arista) por restricción permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2325,8 +2325,8 @@ Especifique otro archivo, por favor. - Only one face can be selected for a plane rotation constraint! - ¡Solo una cara puede ser seleccionada para una restricción de plano de rotación! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2449,8 +2449,8 @@ Especifique otro archivo, por favor. FemGui::TaskFemConstraintTransform - Constraint update error - Error de actualización de restricción + Analysis feature update error + Analysis feature update error @@ -2480,8 +2480,18 @@ Especifique otro archivo, por favor. - Only one face for rectangular transform constraint! - ¡Solo una cara para restricción de transformación rectangular! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2489,11 +2499,6 @@ Especifique otro archivo, por favor. Selected object is not a part! ¡El objeto seleccionado no es una pieza! - - - Only one face for transform constraint! - ¡Solo una cara para restricción de transformación! - Only faces can be picked @@ -2504,11 +2509,6 @@ Especifique otro archivo, por favor. Only cylindrical faces can be picked Se pueden seleccionar únicamente caras cilíndricas - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - ¡Solo se pueden seleccionar caras transformables! Aplique primero la restricción de desplazamiento a la superficie y luego aplique la restricción a la superficie - FemGui::TaskObjectName @@ -2818,11 +2818,6 @@ Especifique otro archivo, por favor. Form - - - Form - Formulario - Fluid Section Parameter @@ -3072,8 +3067,8 @@ Especifique otro archivo, por favor. - Constraint Properties - Propiedades de Restricción + Analysis feature properties + Analysis feature properties @@ -3138,6 +3133,21 @@ with a harmonic/oscillating driving force La parte imaginaria solo se utiliza para las ecuaciones con una fuerza de conducción armónica/oscilante + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3230,31 +3240,16 @@ Note: has no effect if a solid was selected Parte imaginaria de la componente z del potencial Nota: no tiene efecto si un sólido fue seleccionado - - - Whether the constraint defines a constant potential - Si la restricción define un potencial constante - Potential Constant Constante de Potencial - - - Whether the constraint defines a farfield potential - Si la restricción define un potencial de campo lejano - Farfield / Electric infinity Farfield / Infinidad eléctrica - - - Whether the constraint is for the electric force - Si la restricción es para la fuerza eléctrica - Calculate Electric Force @@ -3603,11 +3598,6 @@ Nota: para 2D solo la configuración para x es posible, Cancel Cancelar - - - Edit constraint - Editar restricción - @@ -3637,11 +3627,6 @@ Nota: para 2D solo la configuración para x es posible, Meshing Mallado - - - Constraint force - Restringir fuerza - @@ -3659,46 +3644,11 @@ Nota: para 2D solo la configuración para x es posible, Import-Export Importar/Exportar - - - Constraint Contact - Restricción de Contacto - - - - Constraint displacement - Restricción de desplazamiento - - - - Constraint fixed - Restricción fija - - - - Constraint fluid boundary - Restricción de límite de fluido - - - - Constraint heat flux - Restricción de flujo de calor - Constraint initial temperature Restricción de temperatura inicial - - - Constraint planerotation - Restricción de plano de rotación - - - - Constraint pressure - Restricción de presión - Constraint pulley @@ -3709,16 +3659,6 @@ Nota: para 2D solo la configuración para x es posible, Constraint spring Restricción de resorte - - - Constraint temperature - Restricción de temperatura - - - - Constraint transform - Restricción de transformación - Edit post processing object @@ -3764,6 +3704,61 @@ Nota: para 2D solo la configuración para x es posible, Are you sure you want to continue? ¿Está seguro de que desea continuar? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Condición límite del Fluido + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4112,8 +4107,8 @@ Para posibles variables, vea el cuadro de descripción a continuación. - Constraints - Restricciones + Analysis features + Analysis features @@ -4607,8 +4602,8 @@ normal de la cara se utiliza como dirección TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5251,128 +5246,126 @@ usada por el solver Elmer - Electrostatic Constraints - Restricciones electroestáticas + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Restricciones Electroestáticas - - - - Fluid Constraints - Restricciones de Fluido - - - - &Fluid Constraints - &Restricciones de Fluido + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Restricciones electromagnéticas + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - Restricciones &electromagnéticas + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Restricciónes geométricas + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Restricciónes geométricas + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Restricciones mecánicas + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Restricciones mecánicas + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Restricciones térmicas + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Restricciones térmicas + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Restricciones sin solucionador - - - - &Constraints without solver - &Restricciones sin solucionador - - - Overwrite Constants Sobrescribir Constantes - + &Overwrite Constants &Sobrescribir Constantes - + Mesh Malla - + M&esh M&esh - + Solve Resolver - + &Solve &Resolver - + Results Resultados - + &Results &Resultados - + Filter functions Funciones de filtro - + &Filter functions &Filtrar funciones - + Utilities Utilidades @@ -5428,10 +5421,14 @@ usada por el solver Elmer FEM_ClippingPlaneRemoveAll - Remove all clipping planes Eliminar todos los planos de recorte + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5446,123 +5443,6 @@ usada por el solver Elmer Crea un permitividad de vacío constante FEM para sobrescribir el valor estándar - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Restringir fuente de calor del cuerpo - - - - Creates a FEM constraint body heat source - Crea una restricción FEM de cuerpo fuente de calor - - - - FEM_ConstraintCentrif - - - Constraint centrif - Restricción de centrifugado - - - - Creates a FEM constraint centrif - Crea una restricción FEM de centrifugado - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Restricción de potencial electrostático - - - - Creates a FEM constraint electrostatic potential - Crea una restricción FEM de potencial electroestático - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Restricción de velocidad de flujo - - - - Creates a FEM constraint flow velocity - Crea una restricción FEM de velocidad de flujo - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Restricción de velocidad inicial de flujo - - - - Creates a FEM constraint initial flow velocity - Crea una restricción FEM de velocidad inicial de flujo - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Restricción de presión inicial - - - - Creates a FEM constraint initial pressure - Crea una restricción FEM de presión inicial - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Restricción de la sección de impresión - - - - Creates a FEM constraint sectionprint - Crea una restricción FEM de sección de impresión - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Restricción de peso propio - - - - Creates a FEM constraint self weight - Crea una restricción FEM de peso propio - - - - FEM_ConstraintTie - - - Constraint tie - Restricción de unión - - - - Creates a FEM constraint tie - Crea una restricción FEM de unión - - FEM_ElementFluid1D @@ -5699,10 +5579,14 @@ elasticidad (estrés) FEM_Examples - Open FEM examples Abre ejemplos de FEM + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5778,8 +5662,8 @@ elasticidad (estrés) - Convert the surface of a FEM mesh to a mesh - Convertir la superficie de una malla FEM en una malla + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5804,18 +5688,22 @@ elasticidad (estrés) - Clear the Mesh of a FEM mesh object - Borrar la Malla de un objeto de malla FEM + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Mostrar la información de la malla FEM + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5826,8 +5714,8 @@ elasticidad (estrés) - Create a FEM mesh from a shape by Gmsh mesher - Crear una malla FEM de una forma por Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5852,8 +5740,8 @@ elasticidad (estrés) - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Crear una malla FEM desde una forma sólida o cara mediante el creador de mallas interno de Netgen + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6195,19 +6083,6 @@ Por favor, primero seleccione un tipo de resultado. Ningún objeto resultante - - FEM_ConstraintCurrentDensity - - - Constraint current density - Restringir densidad actual - - - - Creates a FEM constraint current density - Crear una restricción FEM de densidad de corriente - - FEM_EquationMagnetodynamic2D @@ -6233,21 +6108,8 @@ para fuerzas magnetodinámicas 2D - Electromagnetic constraints - Restricciones electromagnéticas - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Restricción de magnetización - - - - Creates a FEM constraint magnetization - Crea una magnetización de restricciones FEM + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6349,11 +6211,6 @@ deformación (elasticidad no lineal) BoxWidget - - - Form - Formulario - x @@ -6392,11 +6249,6 @@ deformación (elasticidad no lineal) CylinderWidget - - - Form - Formulario - x @@ -6459,4 +6311,147 @@ deformación (elasticidad no lineal) Crea un nuevo marco de trabajo para el solucionador de FEM CalculiX (menos manejo de errores de resultado) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts index 195ba7a87d..96d2a3ef6a 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts @@ -10,13 +10,13 @@ - Constraint bearing - Murriztu kojinetea + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - FEM murrizketa sortzen du kojinete baterako + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Murriztu kontaktua + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - FEM murrizketa bat sortzen du aurpegien arteko kontakturako + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - FEM murrizketa bat sortzen du entitate geometriko batean ari den desplazamendu baterako + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - FEM murrizketa bat sortzen du entitate geometriko finko baterako + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - FEM murrizketa bat sortzen du entitate geometriko batean ari den indar baterako + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Murriztu engranajea + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - FEM murrizketa sortzen du engranaje baterako + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Bero-fluxuaren murrizketa + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - FEM murrizketa bat sortzen du aurpegi batean eragiten duen bero-fluxurako + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Murriztu hasierako tenperatura + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - FEM murrizketa bat sortzen du gorputz bateko hasierako tenperaturarako + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Murrizketaren plano-biraketa + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - FEM murrizketa bat sortzen du plano-biraketaren aurpegirako + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - FEM murrizketa bat sortzen du aurpegi bateko presiorako + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Polea-murrizketa + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - FEM murrizketa bat sortzen du polea baterako + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Murriztu malgukia + Spring + Spring - Creates a FEM constraint for a spring acting on a face - FEM murrizketa bat sortzen du aurpegi batean eragina duen malguki baterako + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - FEM murrizketa bat sortzen du aurpegi batean eragiten duen tenperatura/bero-fluxu kontzentratu baterako + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Sortu FEM murrizketa aurpegi bat transformatzeko + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Egin FEM murrizketa kojinete baterako - - - - Make FEM constraint contact on face - Sortu FEM murrizketa-kontaktua aurpegian - - - - Make FEM constraint displacement on face - Sortu FEM murrizketa-desplazamendua aurpegian - - - - Make FEM constraint fixed geometry - Sortu FEM murrizketa finkoaren geometria - Create fluid boundary condition Sortu jariakin-mugen baldintza + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Sortu FEM murrizketa-indarra geometrian + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Egin FEM murrizketa engranaje baterako + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Sortu FEM murrizketaren bero-fluxua aurpegian + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Sortu FEM murrizketaren hasierako tenperatura gorputzean + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Sortu FEM murrizketaren plano-biraketaren aurpegia + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Sortu FEM murrizketaren presioa aurpegian + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Sortu FEM murrizketaren malgukia aurpegian + Make spring on face + Make spring on face - Make FEM constraint for pulley - Sortu FEM murrizketa polearako + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Sortu FEM murrizketaren tenperatura aurpegian + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Soetu FEM murrizketaren transformazioa aurpegian + Make local coordinate system on face + Make local coordinate system on face @@ -1218,13 +1218,13 @@ aurpegienak ez diren ertzak eta bolumenenak ez diren aurpegiak soilik. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Amaraun-taldeak ere esportatzen dira. -Murrizketa guztiak eta, material desberdinak badaude, material -guztiak ere, bi amaraun-taldez, aurpegiz eta nodoz osatuta daude, -non murrizketa edo materiala aplikatzen den. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1325,15 +1325,15 @@ azken ezarpenekin irekiko da - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Emaitzen elkarrizketa-koadroa irekitzen denean, -murrizketa guztiak ezkutatuta daude eredu-bistan + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Ezkutatu murrizketak emaitzen elkarrizketa-koadroa irekitzen denean + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1896,8 +1896,8 @@ Zehaztu beste fitxategi bat. FemGui::TaskFemConstraint - FEM constraint parameters - FEM murrizketa-parametroak + Analysis feature parameters + Analysis feature parameters @@ -2052,8 +2052,8 @@ Zehaztu beste fitxategi bat. - Only one type of selection (vertex,face or edge) per constraint allowed! - Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da murrizketako! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2081,8 +2081,8 @@ Zehaztu beste fitxategi bat. - Only one type of selection (vertex,face or edge) per constraint allowed! - Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da murrizketako! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2210,8 +2210,8 @@ Zehaztu beste fitxategi bat. - Only one type of selection (vertex,face or edge) per constraint allowed! - Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da murrizketako! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2239,8 +2239,8 @@ Zehaztu beste fitxategi bat. - Only one type of selection (vertex,face or edge) per constraint allowed! - Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da murrizketako! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2327,8 +2327,8 @@ Zehaztu beste fitxategi bat. - Only one face can be selected for a plane rotation constraint! - Aurpegi bakarra hautatu daiteke planoaren biraketa-murrizketa baterako! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2451,8 +2451,8 @@ Zehaztu beste fitxategi bat. FemGui::TaskFemConstraintTransform - Constraint update error - Errorea murrizketa eguneratzean + Analysis feature update error + Analysis feature update error @@ -2482,8 +2482,18 @@ Zehaztu beste fitxategi bat. - Only one face for rectangular transform constraint! - Aurpegi bakarra laukizuzenen transformazio-murrizketarako! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2491,11 +2501,6 @@ Zehaztu beste fitxategi bat. Selected object is not a part! Hautatutako objektua ez da pieza bat! - - - Only one face for transform constraint! - Aurpegi bakarra transformazio-murrizketarako! - Only faces can be picked @@ -2506,11 +2511,6 @@ Zehaztu beste fitxategi bat. Only cylindrical faces can be picked Aurpegi zilindrikoak soilik aukera daitezke - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Aurpegi transformagarriak soilik hautatu daitezke! Aplikatu desplazamendu-murrizketa gainazalari lehenengo, gero aplikatu murrizketa gainazalari - FemGui::TaskObjectName @@ -2820,11 +2820,6 @@ Zehaztu beste fitxategi bat. Form - - - Form - Inprimakia - Fluid Section Parameter @@ -3074,8 +3069,8 @@ Zehaztu beste fitxategi bat. - Constraint Properties - Murrizketa-propietateak + Analysis feature properties + Analysis feature properties @@ -3140,6 +3135,21 @@ with a harmonic/oscillating driving force Zati irudikaria gidatze-indar harmonikoa/oszilatzailea duten ekuazioetan soilik erabiltzen da + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3232,31 +3242,16 @@ Note: has no effect if a solid was selected Potentzialaren Z osagaiaren zati irudikaria Oharra: ez du eraginik solido bat hautatu bada - - - Whether the constraint defines a constant potential - Murrizketak potentzial konstantea definitzen duen ala ez - Potential Constant Potentzial-konstantea - - - Whether the constraint defines a farfield potential - Murrizketak eremu urruneko potentzial definitzen duen ala ez - Farfield / Electric infinity Urruneko eremua / Amaigabetasun elektrikoa - - - Whether the constraint is for the electric force - Murrizketa indar elektrikorako den ala ez - Calculate Electric Force @@ -3605,11 +3600,6 @@ Oharra: 2D kasuetan soilik, X-en ezarpena posible da, Cancel Utzi - - - Edit constraint - Editatu murrizketa - @@ -3639,11 +3629,6 @@ Oharra: 2D kasuetan soilik, X-en ezarpena posible da, Meshing Amarauna sortzea - - - Constraint force - Murrizketa-indarra - @@ -3661,46 +3646,11 @@ Oharra: 2D kasuetan soilik, X-en ezarpena posible da, Import-Export Inportatu-Esportatu - - - Constraint Contact - Murriztu kontaktua - - - - Constraint displacement - Murriztu desplazamendua - - - - Constraint fixed - Murriztu finkoa - - - - Constraint fluid boundary - Murriztu jariakin-mugak - - - - Constraint heat flux - Bero-fluxuaren murrizketa - Constraint initial temperature Murriztu hasierako tenperatura - - - Constraint planerotation - Murriztu plano-biraketa - - - - Constraint pressure - Murriztu presioa - Constraint pulley @@ -3711,16 +3661,6 @@ Oharra: 2D kasuetan soilik, X-en ezarpena posible da, Constraint spring Murriztu malgukia - - - Constraint temperature - Murriztu tenperatura - - - - Constraint transform - Murriztu transformazioa - Edit post processing object @@ -3766,6 +3706,61 @@ Oharra: 2D kasuetan soilik, X-en ezarpena posible da, Are you sure you want to continue? Ziur zaude jarraitu nahi duzula? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Jariakin-mugen baldintza + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4114,8 +4109,8 @@ Balizko aldagaietarako, ikusi beheko deskribapen-koadroa. - Constraints - Murrizketak + Analysis features + Analysis features @@ -4609,8 +4604,8 @@ norabidea erabiliko da norabide gisa TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5253,128 +5248,126 @@ Elmer ebazlean - Electrostatic Constraints - Murrizketa elektrostatikoak + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - Murrizketa &elektrostatikoak - - - - Fluid Constraints - Jariakin-murrizketak - - - - &Fluid Constraints - &Jariakin-murrizketak + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Murrizketa elektromagnetikoak + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Murrizketa elektromagnetikoak + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Murrizketa geometrikoak + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - Murrizketa ge&ometrikoak + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Murrizketa mekanikoak + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - Murrizketa &mekanikoak + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Murrizketa termalak + Analysis features without solver + Analysis features without solver - &Thermal Constraints - Murrizketa &termalak + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Ebazlerik gabeko murrizketak - - - - &Constraints without solver - &Ebazlerik gabeko murrizketak - - - Overwrite Constants Gainidatzi murrizketak - + &Overwrite Constants &Gainidatzi murrizketak - + Mesh Amarauna - + M&esh A&marauna - + Solve Ebatzi - + &Solve E&batzi - + Results Emaitzak - + &Results &Emaitzak - + Filter functions Iragazki-funtzioak - + &Filter functions &Iragazi funtzioak - + Utilities Utilitateak @@ -5430,10 +5423,14 @@ Elmer ebazlean FEM_ClippingPlaneRemoveAll - Remove all clipping planes Kendu ebaketa-plano guztiak + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5448,123 +5445,6 @@ Elmer ebazlean FEM hutsaren permitibitate-konstante bat sortzen du balio estandarra gainidazteko - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Murriztu gorputzaren bero-iturburua - - - - Creates a FEM constraint body heat source - FEM gorputz baten bero-iturburua murrizten du - - - - FEM_ConstraintCentrif - - - Constraint centrif - Murriztu zentrifugazioa - - - - Creates a FEM constraint centrif - Zentrifugazioaren FEM murrizketa bat sortzen du - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Murriztu potentzial elektrostatikoa - - - - Creates a FEM constraint electrostatic potential - FEM potentzial elektrostatikoa murrizten du - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Murriztu fluxu-abiadura - - - - Creates a FEM constraint flow velocity - Fluxu-abiaduraren FEM murrizketa bat sortzen du - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Murriztu hasierako fluxu-abiadura - - - - Creates a FEM constraint initial flow velocity - Hasierako fluxu-abiaduraren FEM murrizketa bat sortzen du - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Murriztu hasierako tenperatura - - - - Creates a FEM constraint initial pressure - Hasierako fluxu-abiaduraren FEM murrizketa bat sortzen du - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Sekzio-inprimatzearen murrizketa - - - - Creates a FEM constraint sectionprint - Sekzio-inprimatzearen FEM murrizketa bat sortzen du - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Murriztu berezko pisua - - - - Creates a FEM constraint self weight - Berezko pisuaren FEM murrizketa bat sortzen du - - - - FEM_ConstraintTie - - - Constraint tie - Murriztu lokarria - - - - Creates a FEM constraint tie - Lokarriaren FEM murrizketa bat sortzen du - - FEM_ElementFluid1D @@ -5701,10 +5581,14 @@ elastikotasunerako (estreserako) FEM_Examples - Open FEM examples Ireki FEM adibideak + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5780,8 +5664,8 @@ elastikotasunerako (estreserako) - Convert the surface of a FEM mesh to a mesh - Bihurtu amaraun FEM amaraun baten gainazala + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5806,18 +5690,22 @@ elastikotasunerako (estreserako) - Clear the Mesh of a FEM mesh object - Garbitu FEM amaraun-objektu baten amarauna + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Bistaratu FEM amaraunaren informazioa + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5828,8 +5716,8 @@ elastikotasunerako (estreserako) - Create a FEM mesh from a shape by Gmsh mesher - Sortu FEM amaraun bat forma batetik abiatuz, Gmsh amaraun-sortzailea erabiliz + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5854,8 +5742,8 @@ elastikotasunerako (estreserako) - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Sortu FEM amaraun bat solido batetik edo aurpegi-forma batetik, Netgen barneko amaraun-sortzailea erabiliz + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6197,19 +6085,6 @@ Hasteko, hautatu emaitza mota bat. Ez dago objekturik emaitza gisa - - FEM_ConstraintCurrentDensity - - - Constraint current density - Murrizketaren uneko dentsitatea - - - - Creates a FEM constraint current density - Uneko dentsitatearen FEM murrizketa bat sortzen du - - FEM_EquationMagnetodynamic2D @@ -6235,21 +6110,8 @@ Hasteko, hautatu emaitza mota bat. - Electromagnetic constraints - Murrizketa elektromagnetikoak - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Murriztu magnetizazioa - - - - Creates a FEM constraint magnetization - Magnetizazioaren FEM murrizketa bat sortzen du + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6351,11 +6213,6 @@ deformaziorako (elastikotasun ez linealerako) BoxWidget - - - Form - Inprimakia - x @@ -6394,11 +6251,6 @@ deformaziorako (elastikotasun ez linealerako) CylinderWidget - - - Form - Inprimakia - x @@ -6461,4 +6313,147 @@ deformaziorako (elastikotasun ez linealerako) FEM CalculiX ebazlearen lan-marko berria sortzen du (emaitzen errore-maneiatze gutxiago) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts index 6f66617194..8c057f3c48 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constraint bearing + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - FEM-elementtimenetelmän rajoitteiden parametrit + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Valittu objekti ei ole osa (part)! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Vain sylinteripintoja voidaan poimia - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Lomake - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Peruuta - - - Edit constraint - Muokkaa rajoitusta - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Verkkopinnan käyttö - - - Constraint force - Rajoitevoima - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Tuo/Vie - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Haluatko varmasti jatkaa? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Rajoitteet + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Ratkaise - + &Solve &Ratkaise - + Results Tulokset - + &Results &Tulokset - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Apuvälineet @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Lomake - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Lomake - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts index 61d0047f67..3846b4501c 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts @@ -10,13 +10,13 @@ - Constraint bearing - Contrainte de roulement + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Créer une contrainte FEM de roulement + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Contrainte de contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Créer une contrainte FEM de contact entre des faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Créer une contrainte FEM de déplacement agissant sur une entité géométrique + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Créer une contrainte FEM pour une entité géométrique fixe + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Créer une contrainte FEM pour une force agissant sur une entité géométrique + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Contrainte d'engrenage + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Créer une contrainte FEM d'engrenage + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Contrainte de flux de chaleur + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Créer une contrainte FEM de flux de chaleur agissant sur une face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Contrainte de température initiale + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Créer une contrainte FEM de température initiale agissant sur un corps + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Contrainte de rotation plane + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Créer une contrainte FEM de rotation plane + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Créer une contrainte FEM de pression agissant sur la face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Contrainte de poulie + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Créer une contrainte FEM de poulie + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Contrainte de ressort + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Créer une contrainte FEM de ressort agissant sur une face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Créer une contrainte FEM d'un flux concentré de chaleur/température agissant sur une face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Créer une contrainte FEM de déformation d'une face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Créer la contrainte FEM pour un roulement - - - - Make FEM constraint contact on face - Créer une contrainte FEM de contact sur une face - - - - Make FEM constraint displacement on face - Créer une contrainte de déplacement FEM sur une face - - - - Make FEM constraint fixed geometry - Créer une contrainte FEM de géométrie fixe - Create fluid boundary condition Créer une condition limite de fluide + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Créer une contrainte FEM de force sur la géométrie + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Créer une contrainte FEM pour un engrenage + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Créer une contrainte FEM pour le flux de chaleur sur la face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Créer une contrainte FEM pour la température initiale du corps + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Créer une contrainte FEM pour une surface de révolution plane + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Créer une contrainte FEM de pression sur une face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Créer une contrainte FEM de ressort sur une face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Créer une contrainte FEM pour une poulie + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Créer une contrainte FEM de température sur une face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Créer une contrainte FEM de déformation sur une face + Make local coordinate system on face + Make local coordinate system on face @@ -1216,13 +1216,13 @@ FEM : éléments FEM seulement (uniquement les arêtes n'appartenant pas aux fac Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Les groupes de maillages sont également exportés. -Chaque contrainte et chaque matériau (s'il y a différents matériaux) -consiste en deux groupes de maillages, les faces et les nœuds où -la contrainte ou le matériau est appliqué. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1325,15 +1325,15 @@ derniers paramètres de la boîte de dialogue utilisés - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Toutes les contraintes sont cachées dans la vue du modèle -lorsque la boîte de dialogue des résultats est ouverte + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Cacher les contraintes lors de l'ouverture de la boîte de dialogue des résultats + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1889,8 +1889,8 @@ Veuillez spécifier un autre fichier. FemGui::TaskFemConstraint - FEM constraint parameters - Paramètres de contrainte FEM + Analysis feature parameters + Analysis feature parameters @@ -2045,8 +2045,8 @@ Veuillez spécifier un autre fichier. - Only one type of selection (vertex,face or edge) per constraint allowed! - Un seul type de sélection (sommet, face ou arête) par contrainte autorisée ! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2074,8 +2074,8 @@ Veuillez spécifier un autre fichier. - Only one type of selection (vertex,face or edge) per constraint allowed! - Un seul type de sélection (sommet, face ou arête) est autorisé par contrainte ! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2203,8 +2203,8 @@ Veuillez spécifier un autre fichier. - Only one type of selection (vertex,face or edge) per constraint allowed! - Un seul type de sélection (sommet, face ou arête) est autorisé par contrainte ! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2222,18 +2222,18 @@ Veuillez spécifier un autre fichier. Nothing selected! - Aucune sélection ! + Rien n'a été sélectionné ! Selected object is not a part! - L'élément sélectionné n'est pas une part ! + L'objet sélectionné n'est pas une pièce ! - Only one type of selection (vertex,face or edge) per constraint allowed! - Un seul type de sélection (sommet, face ou arête) par contrainte autorisée ! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2320,8 +2320,8 @@ Veuillez spécifier un autre fichier. - Only one face can be selected for a plane rotation constraint! - Une seule face peut être sélectionnée pour une contrainte de rotation plane ! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2431,21 +2431,21 @@ Veuillez spécifier un autre fichier. Nothing selected! - Rien n'a été sélectionné ! + Aucune sélection ! Selected object is not a part! - L'objet sélectionné n'est pas une pièce ! + L'élément sélectionné n'est pas une part ! FemGui::TaskFemConstraintTransform - Constraint update error - Erreur de mise à jour de la contrainte + Analysis feature update error + Analysis feature update error @@ -2470,24 +2470,29 @@ Veuillez spécifier un autre fichier. Nothing selected! - Rien n'a été sélectionné ! + Aucune sélection ! - Only one face for rectangular transform constraint! - Une seule face pour une contrainte de déformation rectangulaire ! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface Selected object is not a part! - L'objet sélectionné n'est pas une pièce ! - - - - Only one face for transform constraint! - Une seule face pour une contrainte de transformation ! + L'élément sélectionné n'est pas une part ! @@ -2499,11 +2504,6 @@ Veuillez spécifier un autre fichier. Only cylindrical faces can be picked Seules des faces cylindriques peuvent être sélectionnées - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Seules les faces déformables peuvent être sélectionnées! Appliquez d'abord la contrainte de déplacement à la surface puis appliquez la contrainte à la surface - FemGui::TaskObjectName @@ -2813,11 +2813,6 @@ Veuillez spécifier un autre fichier. Form - - - Form - Forme - Fluid Section Parameter @@ -3067,8 +3062,8 @@ Veuillez spécifier un autre fichier. - Constraint Properties - Propriétés de contrainte + Analysis feature properties + Analysis feature properties @@ -3133,6 +3128,21 @@ with a harmonic/oscillating driving force La partie imaginaire n'est utilisée que pour les équations avec une force motrice harmonique ou oscillante + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3225,31 +3235,16 @@ Note: has no effect if a solid was selected Partie imaginaire de la composante en z du potentiel Remarque : n'a pas d'effet si un solide a été sélectionné - - - Whether the constraint defines a constant potential - Si la contrainte définit un potentiel constant - Potential Constant Potentiel constant - - - Whether the constraint defines a farfield potential - Si la contrainte définit un potentiel de champ lointain - Farfield / Electric infinity Champ lointain/Infinité électrique - - - Whether the constraint is for the electric force - Si la contrainte est pour la force électrique - Calculate Electric Force @@ -3598,11 +3593,6 @@ Remarque : pour la 2D, seul le réglage en x est possible, Cancel Annuler - - - Edit constraint - Modifier la contrainte - @@ -3632,11 +3622,6 @@ Remarque : pour la 2D, seul le réglage en x est possible, Meshing Maillage - - - Constraint force - Contrainte de force - @@ -3654,46 +3639,11 @@ Remarque : pour la 2D, seul le réglage en x est possible, Import-Export Importer-Exporter - - - Constraint Contact - Contrainte de contact - - - - Constraint displacement - Contrainte de déplacement - - - - Constraint fixed - Contrainte d'immobilisation - - - - Constraint fluid boundary - Contrainte de limite du fluide - - - - Constraint heat flux - Contrainte de flux de chaleur - Constraint initial temperature Contrainte de température initiale - - - Constraint planerotation - Contrainte de rotation du plan - - - - Constraint pressure - Contrainte de pression - Constraint pulley @@ -3704,16 +3654,6 @@ Remarque : pour la 2D, seul le réglage en x est possible, Constraint spring Contrainte de ressort - - - Constraint temperature - Contrainte de température - - - - Constraint transform - Contrainte de déformation - Edit post processing object @@ -3759,6 +3699,61 @@ Remarque : pour la 2D, seul le réglage en x est possible, Are you sure you want to continue? Êtes-vous sûr de vouloir continuer ? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Contrainte de limite du fluide + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4107,8 +4102,8 @@ Pour les variables possibles, voir la zone de description ci-dessous. - Constraints - Contraintes + Analysis features + Analysis features @@ -4600,8 +4595,8 @@ vecteur normal de la face est utilisée comme sens TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - Contrainte FEM de la tâche de flux de chaleur + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5243,128 +5238,126 @@ used for the Elmer solver - Electrostatic Constraints - Contraintes électrostatiques + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Contraintes électrostatiques - - - - Fluid Constraints - Contraintes du fluide - - - - &Fluid Constraints - Contraintes du &fluide + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Contraintes électromagnétiques + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - Contraintes &électromagnétiques + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Contraintes géométriques + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - Contraintes &géométriques + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Contraintes mécaniques + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - Contraintes &mécaniques + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Contraintes thermiques + Analysis features without solver + Analysis features without solver - &Thermal Constraints - Contraintes &thermiques + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Contraintes sans solveur - - - - &Constraints without solver - &Contraintes sans solveur - - - Overwrite Constants Remplacer les constantes - + &Overwrite Constants Remplacer les c&onstantes - + Mesh Maillage - + M&esh Ma&illage - + Solve Solveur - + &Solve Ré&solution - + Results Résultats - + &Results &Résultats - + Filter functions Fonctions de filtrage - + &Filter functions &Fonctions de filtrage - + Utilities Utilitaires @@ -5420,10 +5413,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Supprimer tous les plans de coupe + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5438,123 +5435,6 @@ used for the Elmer solver Créer une constante FEM de permittivité du vide pour remplacer la valeur standard - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Contrainte de source de chaleur pour un corps - - - - Creates a FEM constraint body heat source - Créer une contrainte FEM de type source de chaleur pour un corps - - - - FEM_ConstraintCentrif - - - Constraint centrif - Contrainte centrifuge - - - - Creates a FEM constraint centrif - Créer une contrainte FEM de type centrifuge - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Contrainte de potentiel électrostatique - - - - Creates a FEM constraint electrostatic potential - Créer une contrainte FEM de type potentiel électrostatique - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Contrainte de vitesse d'écoulement - - - - Creates a FEM constraint flow velocity - Créer une contrainte FEM de type vitesse d'écoulement - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Contrainte de vitesse d'écoulement initiale - - - - Creates a FEM constraint initial flow velocity - Créer une contrainte FEM de type vitesse d'écoulement initiale - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Contrainte de pression initiale - - - - Creates a FEM constraint initial pressure - Créer une contrainte FEM de type pression initiale - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Contrainte d'affichage de la section - - - - Creates a FEM constraint sectionprint - Créer une contrainte FEM d'affichage de la section - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Contrainte du poids propre - - - - Creates a FEM constraint self weight - Créer une contrainte FEM de type poids propre - - - - FEM_ConstraintTie - - - Constraint tie - Contrainte de liaison - - - - Creates a FEM constraint tie - Créer une contrainte FEM de type liaison - - FEM_ElementFluid1D @@ -5690,10 +5570,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Ouvrir des exemples de l'atelier FEM + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5769,8 +5653,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convertir la surface d'un maillage FEM en maillage + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5795,18 +5679,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Effacer le maillage d'un objet maillage FEM + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Afficher les informations du maillage FEM + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5817,8 +5705,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Créer un maillage FEM à partir d'une forme avec le mailleur Gmsh + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5843,8 +5731,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Créer un maillage FEM à partir d'un solide ou d'une face par le mailleur interne Netgen + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6186,19 +6074,6 @@ Veuillez d'abord sélectionner un type de résultat. Aucun objet de résultat - - FEM_ConstraintCurrentDensity - - - Constraint current density - Contrainte de densité de courant - - - - Creates a FEM constraint current density - Créer une contrainte FEM de densité de courant - - FEM_EquationMagnetodynamic2D @@ -6223,21 +6098,8 @@ Veuillez d'abord sélectionner un type de résultat. - Electromagnetic constraints - Contraintes électromagnétiques - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Contrainte de magnétisation - - - - Creates a FEM constraint magnetization - Créer une contrainte FEM de magnétisation + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6337,11 +6199,6 @@ Veuillez d'abord sélectionner un type de résultat. BoxWidget - - - Form - Forme - x @@ -6380,11 +6237,6 @@ Veuillez d'abord sélectionner un type de résultat. CylinderWidget - - - Form - Forme - x @@ -6447,4 +6299,147 @@ Veuillez d'abord sélectionner un type de résultat. Créer un solveur FEM nouveau modèle de CalculiX (moins de traitement des erreurs de résultat) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts index 3b06767a65..4b0ada9b76 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constraint bearing + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Parámetros de constricións FEM + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! O obxecto escolmado non é unha peza! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Sómente se poden coller faces cilíndricas - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Formulario - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Cancelar - - - Edit constraint - Editar constrición - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Malla - - - Constraint force - Constrición de forza - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Importar-Exportar - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Are you sure you want to continue? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Resolver - + &Solve &Solve - + Results Resultados - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Utilidades @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Formulario - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Formulario - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts index aa371adbc4..d9bbcc3182 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts @@ -10,13 +10,13 @@ - Constraint bearing - Ograničenje ležaja + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Stvori FEM ograničenje za ležaj + Creates a bearing constraint + Creates a bearing constraint @@ -28,15 +28,13 @@ - Constraint contact - - -Ograničenje kontakta + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Stvara FEM ograničenje za kontakt između lica + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -53,8 +51,8 @@ Ograničenje kontakta - Creates a FEM constraint for a displacement acting on a geometric entity - Stvara FEM ograničenje za djelovanje premještanja na geometrijsku cjelinu + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -71,8 +69,8 @@ Ograničenje kontakta - Creates a FEM constraint for a fixed geometric entity - Stvori FEM ograničenje za fiksnu geometrijsku cjelinu + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -107,8 +105,8 @@ Ograničenje kontakta - Creates a FEM constraint for a force acting on a geometric entity - Stvori FEM ograničenje za djelovanje sile na geometrijsku cjelinu + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -120,13 +118,13 @@ Ograničenje kontakta - Constraint gear - Ograničenje zupčanika + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Stvori FEM ograničenje za zupčanik + Creates a gear constraint + Creates a gear constraint @@ -138,13 +136,13 @@ Ograničenje kontakta - Constraint heatflux - Ograničenje toplinskog toka + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Stvori FEM ograničenje za toplotni tok koji djeluje na lice + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -156,13 +154,13 @@ Ograničenje kontakta - Constraint initial temperature - Ograničenje početne temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Stvara FEM ograničenje za početnu temperaturu koja djeluje na tijelo + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -174,15 +172,13 @@ Ograničenje kontakta - Constraint plane rotation - Ograničenje rotacije ravnine - - + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Stvara FEM ograničenje za lice rotacijske ravnine + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -199,8 +195,8 @@ Ograničenje kontakta - Creates a FEM constraint for a pressure acting on a face - Stvori FEM ograničenje za pritisak koji djeluje na lice + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -212,13 +208,13 @@ Ograničenje kontakta - Constraint pulley - Ograničenje kolotura + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Stvara FEM ograničenje za kolotur + Creates a pulley constraint + Creates a pulley constraint @@ -230,13 +226,13 @@ Ograničenje kontakta - Constraint spring - Ograničenje opruge + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Stvori FEM ograničenje za oprugu koja djeluje na lice + Creates a spring acting on a face + Creates a spring acting on a face @@ -253,8 +249,8 @@ Ograničenje kontakta - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Stvara FEM ograničenje za temperaturu/koncentrirani toplinski tok koji djeluje na površinu + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -271,8 +267,8 @@ Ograničenje kontakta - Create FEM constraint for transforming a face - Stvara FEM ograničenje deformacije na površinu + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -592,80 +588,80 @@ Ograničenje kontakta Command - - - Make FEM constraint for bearing - Stvori FEM ograničenje za ležaj - - - - Make FEM constraint contact on face - Napravite FEM ograničenja kontakta na licu - - - - Make FEM constraint displacement on face - Napravite premještanje FEM ograničenja na licu - - - - Make FEM constraint fixed geometry - Napravite FEM ograničenja Fiksnom geometrijom - Create fluid boundary condition Napravite granični uvjet tekućine + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Napravite FEM ograničenja sile na geometriji + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Stvori FEM ograničenje za zupčanik + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Napravite FEM ograničenja heatflux na licu + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Napravite FEM ograničenja početne temperature na tijelu + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Napravite FEM ograničenja rotacije ravnine lica + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Napravite FEM ograničenja pritiska na licu + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Napravite FEM ograničenja opruge na licu + Make spring on face + Make spring on face - Make FEM constraint for pulley - Stvori FEM ograničenje za kolotur + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Napravite FEM ograničenja temperature na licu + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Napravite FEM ograničenja deformiranja na licu + Make local coordinate system on face + Make local coordinate system on face @@ -1226,13 +1222,13 @@ koji ne pripadaju plohama i plohe koje ne pripadaju volumenima. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Mrežne grupe se također eksportiraju. -Svako ograničenje i, ako postoje različiti materijali, materijal -se sastoji od dvije mrežne grupe, površina i čvorova gdje je -ograničenje ili materijal primijenjeno. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1335,14 +1331,15 @@ sa posljednjim korištenim postavkama dijaloga - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Sva su ograničenja skrivena u prikazu modela kada se otvori dijalog rezultata + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Sakrij ograničenja kada se otvori dijalog rezultata + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1900,8 +1897,8 @@ Navedi drugu datoteku. FemGui::TaskFemConstraint - FEM constraint parameters - FEM parametri ograničenja + Analysis feature parameters + Analysis feature parameters @@ -2056,8 +2053,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Samo je jedna vrsta selekcije (vrh, ploha ili rub) po ograničenju dopuštena! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2085,8 +2082,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Samo je jedna vrsta selekcije (vrh, ploha ili rub) po ograničenju dopuštena! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2214,8 +2211,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Samo je jedna vrsta selekcije (vrh, ploha ili rub) po ograničenju dopuštena! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2243,8 +2240,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Samo je jedna vrsta selekcije (vrh, ploha ili rub) po ograničenju dopuštena! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2331,8 +2328,8 @@ Navedi drugu datoteku. - Only one face can be selected for a plane rotation constraint! - Samo jedna ploha se može odabrati za ograničenje rotacije ravnine! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2455,8 +2452,8 @@ Navedi drugu datoteku. FemGui::TaskFemConstraintTransform - Constraint update error - Ograničenje greška ažuriranja + Analysis feature update error + Analysis feature update error @@ -2486,8 +2483,18 @@ Navedi drugu datoteku. - Only one face for rectangular transform constraint! - Samo jedno lice za pravokutno ograničenje transformacije! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2495,11 +2502,6 @@ Navedi drugu datoteku. Selected object is not a part! Odabrani objekt nije jedan dio! - - - Only one face for transform constraint! - Samo jedno lice za ograničenje transformacije! - Only faces can be picked @@ -2510,11 +2512,6 @@ Navedi drugu datoteku. Only cylindrical faces can be picked Samo cilindrična naličja se mogu odabrati - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Samo transformabilna lica se mogu odabrati! Prvo primjeni premještanje na površinu prije nego primjeniš ograničenje na površinu - FemGui::TaskObjectName @@ -2824,11 +2821,6 @@ Navedi drugu datoteku. Form - - - Form - Obrazac - Fluid Section Parameter @@ -3079,8 +3071,8 @@ Navedi drugu datoteku. - Constraint Properties - Svojstva Ograničenja + Analysis feature properties + Analysis feature properties @@ -3145,6 +3137,21 @@ with a harmonic/oscillating driving force Imaginarni dio se koristi samo za jednadžbe s harmoničnim/oscilirajućim pogonskim silom. + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3237,31 +3244,16 @@ Note: has no effect if a solid was selected Imaginarni dio potencijalne z-komponente Napomena: nema utjecaja ako je odabrano volumensko tijelo - - - Whether the constraint defines a constant potential - Da li je ograničenje definirano konstantnim potencijalom - Potential Constant Konstantni potencijal - - - Whether the constraint defines a farfield potential - Da li je ograničenje definirano Fairfeld potencijalom - Farfield / Electric infinity Farfield / Electric infinity (beskonačno) - - - Whether the constraint is for the electric force - Je li ograničenje za električnu silu - Calculate Electric Force @@ -3612,11 +3604,6 @@ Napomena: u 2D je moguće samo podešavanje za x Cancel Otkazati - - - Edit constraint - Uredi ograničenje - @@ -3646,11 +3633,6 @@ Napomena: u 2D je moguće samo podešavanje za x Meshing Meshing (Putanje mreže) - - - Constraint force - Sila ograničenja - @@ -3668,46 +3650,11 @@ Napomena: u 2D je moguće samo podešavanje za x Import-Export Uvoz / izvoz - - - Constraint Contact - Kontaktno Ograničenje - - - - Constraint displacement - Ograničenje premještanja - - - - Constraint fixed - Ograničenje učvršćeno - - - - Constraint fluid boundary - Granica fluida s ograničenjem - - - - Constraint heat flux - Ograničenje toplinskog toka - Constraint initial temperature Ograničenje početne temperature - - - Constraint planerotation - Ograničenja rotacija ravnine - - - - Constraint pressure - Ograničenje tlaka - Constraint pulley @@ -3718,16 +3665,6 @@ Napomena: u 2D je moguće samo podešavanje za x Constraint spring Ograničenje opruge - - - Constraint temperature - Ograničenje temperature - - - - Constraint transform - Ograničenje deformacije - Edit post processing object @@ -3773,6 +3710,61 @@ Napomena: u 2D je moguće samo podešavanje za x Are you sure you want to continue? Jeste li sigurni da želite nastaviti? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Granično stanje tekučine + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4121,8 +4113,8 @@ Za moguće varijable, pogledaj okvir za opis ispod. - Constraints - Ograničenja + Analysis features + Analysis features @@ -4615,8 +4607,8 @@ vektora površine koristi se kao smjer TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5259,128 +5251,126 @@ koristiti za Elmerov rješavač - Electrostatic Constraints - Elektrostatička ograničenja + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Elektrostatička ograničenja - - - - Fluid Constraints - Ograničenja tekućine - - - - &Fluid Constraints - &Ograničenja tekućine + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Elektromagnetna ograničenja + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Elektromagnetna ograničenja + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrijska ograničenja + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrijska ograničenja + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mehanička ograničenja + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mehanička ograničenja + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Toplinska ograničenja + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Toplinska ograničenja + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Ograničenja bez alata za rješavanje - - - - &Constraints without solver - &Ograničenja bez alata za rješavanje - - - Overwrite Constants Prepiši konstante - + &Overwrite Constants &Prepiši konstante - + Mesh Mreža - + M&esh Mr&eža - + Solve Riješi - + &Solve &Riješi - + Results Rezultati - + &Results &Rezultati - + Filter functions Funkcije filtra - + &Filter functions &Funkcije filtra - + Utilities Uslužni programi @@ -5436,10 +5426,14 @@ koristiti za Elmerov rješavač FEM_ClippingPlaneRemoveAll - Remove all clipping planes Uklonite sve isječke ravnine + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5454,125 +5448,6 @@ koristiti za Elmerov rješavač Stvara FEM konstantu permitivnost vakuuma kojom se prepisuje standardna vrijednost - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Ograničenje izvora tjelesne topline - - - - Creates a FEM constraint body heat source - Stvara FEM ograničenja izvora tjelesne topline - - - - FEM_ConstraintCentrif - - - Constraint centrif - - -Ograničenje centrifugalnog naprezanja - - - - Creates a FEM constraint centrif - Stvara FEM ograničenje centrifugalnog naprezanja - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Ograničenja elektrostatskog potencijala - - - - Creates a FEM constraint electrostatic potential - Stvara FEM ograničenje elektrostatskog potencijala - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Ograničenja brzine protoka - - - - Creates a FEM constraint flow velocity - Stvara FEM ograničenje brzine protoka - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Ograničenja brzine početnog protoka - - - - Creates a FEM constraint initial flow velocity - Stvara FEM ograničenje početne brzine protoka - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Ograničenje početnog tlaka - - - - Creates a FEM constraint initial pressure - Stvara FEM ograničenje početnog tlaka - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Ograničenje presjeka ispisa - - - - Creates a FEM constraint sectionprint - Stvara FEM ograničenje presjeka ispisa - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Ograničenje vlastite težine - - - - Creates a FEM constraint self weight - Stvara FEM ograničenje vlastite težine - - - - FEM_ConstraintTie - - - Constraint tie - Ograničenje poveza - - - - Creates a FEM constraint tie - Stvara FEM ograničenje poveza - - FEM_ElementFluid1D @@ -5709,10 +5584,14 @@ Ograničenje centrifugalnog naprezanja FEM_Examples - Open FEM examples Otvori FEM primjere + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5788,8 +5667,8 @@ Ograničenje centrifugalnog naprezanja - Convert the surface of a FEM mesh to a mesh - Pretvoriti površinu FEM mreže u mrežu + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5814,18 +5693,22 @@ Ograničenje centrifugalnog naprezanja - Clear the Mesh of a FEM mesh object - Brisanje mreže FEM mrežnog objekta + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Prikaz informacija o FEM mreži + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5836,8 +5719,8 @@ Ograničenje centrifugalnog naprezanja - Create a FEM mesh from a shape by Gmsh mesher - Napravite FEM mrežu iz oblika pomoću Gmsh mreženja + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5862,8 +5745,8 @@ Ograničenje centrifugalnog naprezanja - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Kreiranje FEM mreže iz krutog tijela ili oblika lica uz pomoć Netgenovog internog kreatora mreža + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6206,19 +6089,6 @@ Molimo odaberite vrstu rezultata prvo. Nema objekta rezultata - - FEM_ConstraintCurrentDensity - - - Constraint current density - Ograničenje gustoće struje - - - - Creates a FEM constraint current density - Stvara FEM ograničenje gustoće struje - - FEM_EquationMagnetodynamic2D @@ -6244,21 +6114,8 @@ Molimo odaberite vrstu rezultata prvo. - Electromagnetic constraints - Elektromagnetna ograničenja - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Ograničenje magnetizacije - - - - Creates a FEM constraint magnetization - Stvara FEM ograničenje magnetizacije + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6360,11 +6217,6 @@ magnetodinamičke sile BoxWidget - - - Form - Obrazac - x @@ -6403,11 +6255,6 @@ magnetodinamičke sile CylinderWidget - - - Form - Obrazac - x @@ -6470,4 +6317,147 @@ magnetodinamičke sile Stvori FEM alat za rješavanje CalculiX new framework (manje rukovanje pogreškama rezultata) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts index d9bf74a963..1e823cbc3b 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts @@ -10,13 +10,13 @@ - Constraint bearing - Csapágykötés + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - VEM kényszerítés létrehozása egy csapágyra + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Kényszerítő kapcsolat + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - VEM kényszerítést hoz létre a felületek közötti kapcsolatokhoz + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - VEM kényszerítést hoz létre geometriai szerkezetre ható elmozduláshoz + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - VEM kényszerítés létrehozása rögzített geometriai szerkezethez + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - VEM kényszerítést hoz létre egy geometriai szerkezetre ható erőhöz + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Fogaskerés kényszerítés + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - VEM kényszerítés létrehozása egy fogaskerékhez + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Hőáram kényszerítése + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Létrehoz VEM kényszerítést egy felületre ható hőáramra + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Kezdeti hőmérséklet kényszerítés + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Létrehoz VEM kényszerítést a testre ható kezdeti hőmérsékletre + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Elforgatás definiálása síkban + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - FEM kényszerítést hoz létre a sík elforgatási felületéhez + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - VEM kényszert hoz létre a felületre ható nyomásra + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Szíjtárcsa kötés + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Csigák kötésének hozzáadása + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Rugó kötés + Spring + Spring - Creates a FEM constraint for a spring acting on a face - VEM kényszerítéstt hoz létre a felületre ható rúgóra + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - VEM kényszerítést hoz létre hőmérsékletnek/koncentrált hőáramnak a megadott felületre + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - VEM kényszerítést hoz létre felület átalakítására + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Csapágy VEM kötés hozzáadása - - - - Make FEM constraint contact on face - Érintkezzen VEM kényszertéssel a felületen - - - - Make FEM constraint displacement on face - Felületi VEM kényszertés elmozdulás hozzáadása - - - - Make FEM constraint fixed geometry - VEM-kényszer rögzített geometriájának beállítása - Create fluid boundary condition Adjon hozzá egy határfeltételt a folyadékhoz + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - VEM kényszer hozzáadása a geometriához + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - VEM határfeltételek létrehozása a fogaskerekek számára + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - VEM-határfeltétel létrehozása a felületi hőáramláshoz + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - VEM határfeltétel létrehozása a test kezdetleges hőmérsékletéhez + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - VEM-határfeltétel létrehozása a sík elforgatási felületéhez + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - VEM-kényszer létrehozása a felületre gyakorolt nyomáshoz + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - VEM-kényszer létrehozása egy felületre ható rugóhoz + Make spring on face + Make spring on face - Make FEM constraint for pulley - VEM-kényszer létrehozása a szíjtárcsához + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - VEM-kényszer létrehozása egy felület hőmérsékletére + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - VEM-kényszer létrehozása a felület deformációján + Make local coordinate system on face + Make local coordinate system on face @@ -1214,10 +1214,13 @@ VEM: Csak VEM-elemeket exportálunk. Ez csak olyan éleket jelent, amelyek nem t Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - A hálócsoportokat is exportálják. Minden kényszerítés és, ha különböző anyagok vannak, minden anyag két háló csoportból, felületből és csomópontból áll, amelyekre a kényszerítés vagy anyag meg van határozva. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1318,15 +1321,15 @@ az utoljára használt párbeszédpanel beállításaival - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Összes kényszerítés elrejtett a modell nézetben -az eredmények párbeszédpanel megnyitásakor + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Kényszerítések elrejtése az eredményjelző párbeszédpanel megnyitásakor + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1882,8 +1885,8 @@ Kérjük, adjon meg egy másik fájlt. FemGui::TaskFemConstraint - FEM constraint parameters - VEM kényszerítés paraméterei + Analysis feature parameters + Analysis feature parameters @@ -2038,8 +2041,8 @@ Kérjük, adjon meg egy másik fájlt. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kényszerítésenként csak egyféle kiválasztás (csúcs, felület vagy él) engedélyezett! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2067,8 +2070,8 @@ Kérjük, adjon meg egy másik fájlt. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kényszerítésenként csak egyféle kiválasztás (csúcs, felület vagy él) engedélyezett! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2196,8 +2199,8 @@ Kérjük, adjon meg egy másik fájlt. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kényszerítésenként csak egyféle kiválasztás (csúcs, felület vagy él) engedélyezett! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2225,8 +2228,8 @@ Kérjük, adjon meg egy másik fájlt. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kényszerítésenként csak egyféle kiválasztás (csúcs, felület vagy él) engedélyezett! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2313,8 +2316,8 @@ Kérjük, adjon meg egy másik fájlt. - Only one face can be selected for a plane rotation constraint! - Csak egy felület választható ki a síkforgatás kényszerítéshez! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2437,8 +2440,8 @@ Kérjük, adjon meg egy másik fájlt. FemGui::TaskFemConstraintTransform - Constraint update error - Kényszerítés frissítési hiba + Analysis feature update error + Analysis feature update error @@ -2468,19 +2471,24 @@ Kérjük, adjon meg egy másik fájlt. - Only one face for rectangular transform constraint! - Csak egy felület a téglalap alakú átalakító kényszerítéshez! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface Selected object is not a part! - A kijelölt tárgy nem alkotórész! - - - - Only one face for transform constraint! - Csak egy felület, amely kényszeríti az átalakítást! + A kijelölt objektum nem alkotórész! @@ -2492,11 +2500,6 @@ Kérjük, adjon meg egy másik fájlt. Only cylindrical faces can be picked Csak hengeres felületek választhatóak - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Csak átalakítható felületek választhatók ki! Először vigye fel a kényszerítés elmozdulását a felületre, majd kényszerítse a felületre - FemGui::TaskObjectName @@ -2806,11 +2809,6 @@ Kérjük, adjon meg egy másik fájlt. Form - - - Form - Űrlap - Fluid Section Parameter @@ -3060,8 +3058,8 @@ Kérjük, adjon meg egy másik fájlt. - Constraint Properties - Kényszerítés tulajdonságai + Analysis feature properties + Analysis feature properties @@ -3126,6 +3124,21 @@ with a harmonic/oscillating driving force A képzetes rész csak az egyenleteknél használatos harmonikus/rezgő hajtóerővel rendelkező egyenletek esetén + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3218,31 +3231,16 @@ Note: has no effect if a solid was selected A potenciális z-komponens képzetes része Megjegyzés: nincs hatása, ha szilárdtestet választottunk ki - - - Whether the constraint defines a constant potential - Meghatároz-e a kötés állandó feszültséget - Potential Constant Állandó feszültség - - - Whether the constraint defines a farfield potential - Meghatározza-e a kötés a távoli feszültséget - Farfield / Electric infinity Távoli mező / elektromos végtelen - - - Whether the constraint is for the electric force - Meghatároz-e a kényszertés elektromos erőhöz kapcsolódást - Calculate Electric Force @@ -3591,11 +3589,6 @@ Megjegyzés: 2D esetén csak az x beállítása lehetséges, Cancel Mégse - - - Edit constraint - Kényszerítés szerkesztése - @@ -3625,11 +3618,6 @@ Megjegyzés: 2D esetén csak az x beállítása lehetséges, Meshing Hálólétrehozás - - - Constraint force - Kényszerítés erőltetése - @@ -3647,46 +3635,11 @@ Megjegyzés: 2D esetén csak az x beállítása lehetséges, Import-Export Importálás-Exportálás - - - Constraint Contact - Felületi érintkezés kényszerítés - - - - Constraint displacement - Kényszerítés elmozdulása - - - - Constraint fixed - Kényszerítés rögzített - - - - Constraint fluid boundary - Folyadékhatár kényszerítés - - - - Constraint heat flux - Hőáramlás kényszerítés - Constraint initial temperature Kezdeti hőmérséklet kényszerítés - - - Constraint planerotation - Kényszerítő síkfogás - - - - Constraint pressure - Nyomásterhelés - Constraint pulley @@ -3697,16 +3650,6 @@ Megjegyzés: 2D esetén csak az x beállítása lehetséges, Constraint spring Rugó kötés - - - Constraint temperature - Rögzített hőmérséklet - - - - Constraint transform - Kényszerítés átalakítás - Edit post processing object @@ -3752,6 +3695,61 @@ Megjegyzés: 2D esetén csak az x beállítása lehetséges, Are you sure you want to continue? Biztosan folytatja? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Folyadékhatár állapota + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4100,8 +4098,8 @@ A lehetséges változókat lásd az alábbi leírási mezőben. - Constraints - Kényszerítések + Analysis features + Analysis features @@ -4594,8 +4592,8 @@ vektorát használják irányként TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - Hőáramlási feladat VEM-korlátja + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5238,128 +5236,126 @@ az Elmer megoldóhoz - Electrostatic Constraints - Elektrosztatikus kötések + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Elektrosztatikus kötések - - - - Fluid Constraints - Folyadék kényszerítések - - - - &Fluid Constraints - &Folyadék kényszerítések + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Elektromágneses kényszerítések + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Elektromágneses kényszerítések + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometriai kényszerítések + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometriai kényszerítések + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanikai kényszerítések + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanikai kényszerítések + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Hőmérséklet kényszerítések + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Hőmérséklet kényszerítések + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Kényszerítések megoldó nélkül - - - - &Constraints without solver - &Kényszerítések megoldó nélkül - - - Overwrite Constants Fellülíró kényszerítések - + &Overwrite Constants &Fellülíró kényszerítések - + Mesh Háló - + M&esh &Háló - + Solve Megoldás - + &Solve &Megoldás - + Results Eredmények - + &Results &Eredmény - + Filter functions Szűrési funkciók - + &Filter functions Szűrési &funkció - + Utilities Kiegészítők @@ -5415,10 +5411,14 @@ az Elmer megoldóhoz FEM_ClippingPlaneRemoveAll - Remove all clipping planes Az összes vágósík eltávolítása + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5433,123 +5433,6 @@ az Elmer megoldóhoz VEM állandó vákuum áteresztőképességet hoz létre az alapértelmezett érték felülírására - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Kényszeríti a test hőenergia forrását - - - - Creates a FEM constraint body heat source - Létrehoz egy VEM test hőenergia forrás kényszerítést - - - - FEM_ConstraintCentrif - - - Constraint centrif - Centrifugális kényszer - - - - Creates a FEM constraint centrif - Létrehoz egy véges elemes centrifugálási kényszerítést - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Elektrosztatikus potenciál kényszerítés - - - - Creates a FEM constraint electrostatic potential - Létrehoz egy VEM elektrosztatikus potenciál kényszerítést - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Áramlási sebesség kényszerítés - - - - Creates a FEM constraint flow velocity - Létrehoz egy VEM áramlási sebesség kényszerítést - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Kezdeti áramlási sebesség kényszerítés - - - - Creates a FEM constraint initial flow velocity - Létrehoz egy VEM kezdeti áramlási sebesség kényszerítést - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Kezdeti nyomás kényszerítés - - - - Creates a FEM constraint initial pressure - Létrehoz egy VEM kezdeti nyomás kényszerítést - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Kényszerítés szakasznyomtatás - - - - Creates a FEM constraint sectionprint - Létrehoz egy végeselemes szakasznyomtatás kényszerítést - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Önsúly kényszerítése - - - - Creates a FEM constraint self weight - Létrehoz egy VEM önsúly kényszerítést - - - - FEM_ConstraintTie - - - Constraint tie - Kötési kényszerítés - - - - Creates a FEM constraint tie - Létrehoz egy véges elemes kötési kényszerítést - - FEM_ElementFluid1D @@ -5686,10 +5569,14 @@ az Elmer megoldóhoz FEM_Examples - Open FEM examples Véges elemes példák megnyitása + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5765,8 +5652,8 @@ az Elmer megoldóhoz - Convert the surface of a FEM mesh to a mesh - Egy VEM háló felületet átalakítja egy hálóvá + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5791,18 +5678,22 @@ az Elmer megoldóhoz - Clear the Mesh of a FEM mesh object - Egy VEM háló tárgy egyértelmű hálója + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info VEM háló adatainak megjelenítése + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5813,8 +5704,8 @@ az Elmer megoldóhoz - Create a FEM mesh from a shape by Gmsh mesher - Egy VEM háló létrehozása egy Gmsh hálózó alakzatából + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5839,8 +5730,8 @@ az Elmer megoldóhoz - Create a FEM mesh from a solid or face shape by Netgen internal mesher - VEM hálót hoz létre szilárd test vagy felület alapján Netgen belső hálózó generátorral + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6182,19 +6073,6 @@ Kérjük, először válassza ki az eredmény típusát. Nincs eredmény tárgy - - FEM_ConstraintCurrentDensity - - - Constraint current density - Kényszerítés jelenlegi sűrűsége - - - - Creates a FEM constraint current density - Létrehoz egy VEM jelenlegi sűrűségi kényszerítést - - FEM_EquationMagnetodynamic2D @@ -6220,21 +6098,8 @@ Kérjük, először válassza ki az eredmény típusát. - Electromagnetic constraints - Elektromágneses kötések - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Kényszerítő mágnesezés - - - - Creates a FEM constraint magnetization - Létrehoz egy végeselemes mágnesezési kényszerítést + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6335,11 +6200,6 @@ Kérjük, először válassza ki az eredmény típusát. BoxWidget - - - Form - Űrlap - x @@ -6378,11 +6238,6 @@ Kérjük, először válassza ki az eredmény típusát. CylinderWidget - - - Form - Űrlap - x @@ -6445,4 +6300,147 @@ Kérjük, először válassza ki az eredmény típusát. Hozzáadja a CalculiX új keretrendszer VEM megoldót (kevesebb eredményhiba kezelése) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts index c32eb7d069..1afbecda7c 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts @@ -10,13 +10,13 @@ - Constraint bearing - Batasan bantalan + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Buat batasan FEM untuk bantalan + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Batasan kontak + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Buat batasan FEM untuk kontak antar permukaan + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Parameter kendala FEM + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Objek yang dipilih bukan bagiannya! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Hanya wajah silindris yang bisa dipetik - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Bentuk - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Membatalkan - - - Edit constraint - Edit kendala - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Meshing - - - Constraint force - Kendala kekuatan - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Ekspor Impor - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Apakah yakin ingin melanjutkan? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Memecahkan - + &Solve &Solve - + Results Results - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Utilitas @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Bentuk - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Bentuk - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts index 268afdaa50..a666fa9b3a 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts @@ -10,13 +10,13 @@ - Constraint bearing - Vincolo cuscinetto + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Crea un vincolo FEM per un cuscinetto + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Vincolo contatto + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Crea un vincolo FEM per il contatto tra le facce + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Crea un vincolo FEM per uno spostamento che agisce su un'entità geometrica + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Crea un vincolo FEM per un'entità geometrica fissa + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Vincolo ingranaggio + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Crea un vincolo FEM per un ingranaggio + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Vincolo flusso di calore + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Vincolo temperatura iniziale + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Crea un vincolo FEM per la temperatura iniziale che agisce su un corpo + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Vincolo rotazione piano + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Crea un vincolo FEM per le facce di rotazione del piano + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Crea un vincolo FEM per una puleggia + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Vincolo molla + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Crea un vincolo FEM per una temperatura/flusso di calore concentrato che agisce su una faccia + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Crea il vincolo FEM per cuscinetto - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Rendi il vincolo FEM per l'ingranaggio + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Nasconde i vincoli quando si apre la finestra dei risultati + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specificare un altro file, per favore. FemGui::TaskFemConstraint - FEM constraint parameters - Parametri di vincolo FEM + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specificare un altro file, per favore. - Only one type of selection (vertex,face or edge) per constraint allowed! - È permesso solo un tipo di selezione (vertice, faccia o bordo) per vincolo! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specificare un altro file, per favore. - Only one type of selection (vertex,face or edge) per constraint allowed! - È permesso solo un tipo di selezione (vertice, faccia o bordo) per vincolo! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specificare un altro file, per favore. - Only one type of selection (vertex,face or edge) per constraint allowed! - È permesso solo un tipo di selezione (vertice, faccia o bordo) per vincolo! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specificare un altro file, per favore. - Only one type of selection (vertex,face or edge) per constraint allowed! - È permesso solo un tipo di selezione (vertice, faccia o bordo) per vincolo! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specificare un altro file, per favore. - Only one face can be selected for a plane rotation constraint! - Solo una faccia può essere selezionata per un vincolo di rotazione piana! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specificare un altro file, per favore. FemGui::TaskFemConstraintTransform - Constraint update error - Errore aggiornamento vincolo + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specificare un altro file, per favore. - Only one face for rectangular transform constraint! - Solo una faccia per il vincolo di trasformazione rettangolare! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specificare un altro file, per favore. Selected object is not a part! L'oggetto selezionato non è una parte! - - - Only one face for transform constraint! - Solo una faccia per il vincolo di trasformazione! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specificare un altro file, per favore. Only cylindrical faces can be picked Si possono selezionare solo le superfici cilindriche - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specificare un altro file, per favore. Form - - - Form - Modulo - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specificare un altro file, per favore. - Constraint Properties - Proprietà del vincolo + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force La parte immaginaria è utilizzata solo per equazioni con una forza motrice armonica/oscillante + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Parte immaginaria componente z del potenziale Nota: non ha effetto se è stato selezionato un solido - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Costante Potenziale - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Se il vincolo è per la forza elettrica - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Annulla - - - Edit constraint - Modifica vincolo - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Meshing - - - Constraint force - Vincolo forza - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Importa/Esporta - - - Constraint Contact - Vincolo Contatto - - - - Constraint displacement - Spostamento dei vincoli - - - - Constraint fixed - Vincolo fisso - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Vincolo flusso di calore - Constraint initial temperature Vincolo temperatura iniziale - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Vincolo di pressione - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Vincolo molla - - - Constraint temperature - Vincolo temperatura - - - - Constraint transform - Vincolo trasformazione - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Sei sicuro di voler continuare? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ Per le variabili possibili, vedere la casella di descrizione qui sotto. - Constraints - Vincoli + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normale della faccia è usata come direzione TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Vincoli Elettrostatici + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Vincoli Elettrostatici - - - - Fluid Constraints - Vincoli dei Fluidi - - - - &Fluid Constraints - &Vincoli dei Fluidi + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Vincoli Elettromagnetici + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Vincoli Elettromagnetici + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Vincoli Geometrici + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Vincoli Geometrici + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Vincoli Meccanici + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Vincoli Meccanici + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Vincoli Termici + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Vincoli Termici + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Vincoli senza risolutore - - - - &Constraints without solver - &Vincoli senza risolutore - - - Overwrite Constants Sovrascrivi Costanti - + &Overwrite Constants S&Ovrascrivi costanti - + Mesh Mesh - + M&esh M&esh - + Solve Risolvi - + &Solve Ri&solvi - + Results Risultati - + &Results &Risultati - + Filter functions Funzioni di filtro - + &Filter functions &Funzioni di filtro - + Utilities Utilità @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Rimuovi tutti i piani di taglio + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Vincolo velocità di flusso iniziale - - - - Creates a FEM constraint initial flow velocity - Crea un vincolo FEM per la velocità di flusso iniziale - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Vincolo pressione iniziale - - - - Creates a FEM constraint initial pressure - Crea un vincolo FEM pressione iniziale - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Apri esempi FEM + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Converte la superficie di una mesh FEM in una mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Mostra informazioni FEM mesh + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Per favore seleziona prima un tipo di risultato. Nessun oggetto risultato - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Per favore seleziona prima un tipo di risultato. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Per favore seleziona prima un tipo di risultato. BoxWidget - - - Form - Modulo - x @@ -6393,11 +6250,6 @@ Per favore seleziona prima un tipo di risultato. CylinderWidget - - - Form - Modulo - x @@ -6460,4 +6312,147 @@ Per favore seleziona prima un tipo di risultato. Crea un solutore FEM CalculiX nuovo framework (meno gestione degli errori di risultato) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts index 2bd6f19307..27ce436a9e 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts @@ -10,13 +10,13 @@ - Constraint bearing - ベアリング拘束 + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - ベアリングのためのFEM拘束を作成 + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - 接触拘束 + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - 面間の接触のためのFEM拘束を作成 + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - ジオメトリーエンティティに作用する変位を表すFEM拘束を作成 + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - ジオメトリーエンティティの固定を表すFEM拘束を作成 + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - ジオメトリーエンティティに作用する力を表すFEM拘束を作成 + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - ギア拘束 + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - ギアのためのFEM拘束を作成 + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - 熱流束拘束 + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - 面に作用する熱流束のためのFEM拘束を作成 + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - 初期温度拘束 + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - ボディーに作用する初期温度を表すFEM拘束を作成 + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - 平面回転拘束 + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - 平面回転する面を表すFEM拘束を作成 + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - 面に作用する圧力を表すFEM拘束を作成 + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - プーリー拘束 + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - プーリーのためのFEM拘束を作成 + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - ばね拘束 + Spring + Spring - Creates a FEM constraint for a spring acting on a face - 面に作用するばねのためのFEM拘束を作成 + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - 面に作用する温度/集中熱流束を表すFEM拘束を作成 + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - 面の変換を行なうFEM拘束を作成 + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - ベアリングのためのFEM拘束を作成 - - - - Make FEM constraint contact on face - 面接触のためのFEM拘束を作成 - - - - Make FEM constraint displacement on face - 面変位のためのFEM拘束を作成 - - - - Make FEM constraint fixed geometry - ジオメトリー固定のためのFEM拘束を作成 - Create fluid boundary condition 流体境界条件を作成 + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - ジオメトリー荷重のためのFEM拘束を作成 + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - ギアのためのFEM拘束を作成 + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - 面熱流束のためのFEM拘束を作成 + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - ボディー初期温度のためのFEM拘束を作成 + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - 平面回転面のためのFEM拘束を作成 + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - 面圧力のためのFEM拘束を作成 + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - ばね面のためのFEM拘束を作成 + Make spring on face + Make spring on face - Make FEM constraint for pulley - プーリーのためのFEM拘束を作成 + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - 面温度のためのFEM拘束を作成 + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - 面変換のためのFEM拘束を作成 + Make local coordinate system on face + Make local coordinate system on face @@ -1214,11 +1214,13 @@ FEM: FEM要素のみがエクスポートされます。つまり面に属して Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - メッシュグループもエクスポートされます。 -全ての拘束、複数の材料がある場合は2つのメッシュグループから構成される材料、材料または拘束が適用されている面、節点。 +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1281,7 +1283,7 @@ constraint or material is applied. Mesh - Mesh + メッシュ @@ -1319,15 +1321,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - 結果ダイアログを開いたときに拘束を非表示にする + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1880,8 +1882,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - FEM拘束パラメーター + Analysis feature parameters + Analysis feature parameters @@ -2036,8 +2038,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - 拘束ごとに1種類の選択 (頂点、面、エッジ) しかできません! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2065,8 +2067,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - 拘束ごとに1種類の選択 (頂点、面、エッジ) しかできません! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2194,8 +2196,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - 拘束ごとに1種類の選択 (頂点、面、エッジ) しかできません! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2223,8 +2225,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - 拘束ごとに1種類の選択 (頂点、面、エッジ) しかできません! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2311,8 +2313,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - 平面回転拘束では面を1つだけ選択できます! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2435,8 +2437,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - 拘束更新エラー + Analysis feature update error + Analysis feature update error @@ -2466,8 +2468,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - 直交変換拘束では1つの面だけ使用できます! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2475,11 +2487,6 @@ Specify another file please. Selected object is not a part! 選択されたオブジェクトは部品ではありません! - - - Only one face for transform constraint! - 変換拘束では1つの面だけ使用できます! - Only faces can be picked @@ -2490,11 +2497,6 @@ Specify another file please. Only cylindrical faces can be picked 円筒面のみを選択できます。 - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - 変換可能な面のみを選択できます! まず表面に変位拘束を適用し、その後、表面に拘束を適用します。 - FemGui::TaskObjectName @@ -2804,11 +2806,6 @@ Specify another file please. Form - - - Form - フォーム - Fluid Section Parameter @@ -3004,7 +3001,7 @@ Specify another file please. 0 mm - 0 mm + 0 mm @@ -3058,8 +3055,8 @@ Specify another file please. - Constraint Properties - 拘束プロパティ + Analysis feature properties + Analysis feature properties @@ -3123,6 +3120,21 @@ Specify another file please. with a harmonic/oscillating driving force 虚部は調和/振動駆動力を持つ方程式でのみ使用されます。 + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3215,31 +3227,16 @@ Note: has no effect if a solid was selected ポテンシャル z 成分の虚部 注意: ソリッドが選択されている場合は無効 - - - Whether the constraint defines a constant potential - 拘束で定電位を定義するかどうか - Potential Constant ポテンシャル定数 - - - Whether the constraint defines a farfield potential - 拘束でファーフィールドポテンシャルを定義するかどうか - Farfield / Electric infinity ファーフィールド / 電気的無限遠 - - - Whether the constraint is for the electric force - 電気力用の拘束かどうか - Calculate Electric Force @@ -3504,7 +3501,7 @@ Note: for 2D only setting for x is possible, 0 mm - 0 mm + 0 mm @@ -3582,11 +3579,6 @@ Note: for 2D only setting for x is possible, Cancel キャンセル - - - Edit constraint - 拘束を編集 - @@ -3616,11 +3608,6 @@ Note: for 2D only setting for x is possible, Meshing メッシュ作成 - - - Constraint force - 拘束力 - @@ -3638,46 +3625,11 @@ Note: for 2D only setting for x is possible, Import-Export インポート/エクスポート - - - Constraint Contact - 接触拘束 - - - - Constraint displacement - 変位拘束 - - - - Constraint fixed - 固定拘束 - - - - Constraint fluid boundary - 流体境界拘束 - - - - Constraint heat flux - 熱流束拘束 - Constraint initial temperature 初期温度拘束 - - - Constraint planerotation - 平面回転拘束 - - - - Constraint pressure - 圧力拘束 - Constraint pulley @@ -3688,16 +3640,6 @@ Note: for 2D only setting for x is possible, Constraint spring ばね拘束 - - - Constraint temperature - 温度拘束 - - - - Constraint transform - 変換拘束 - Edit post processing object @@ -3743,6 +3685,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? 本当に続行しますか? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + 流体境界条件 + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4089,8 +4086,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4581,8 +4578,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5224,128 +5221,126 @@ used for the Elmer solver - Electrostatic Constraints - 静電的拘束 + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - 静電的拘束(&E) - - - - Fluid Constraints - 流体的拘束 - - - - &Fluid Constraints - 流体的拘束(&F) + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - 電磁拘束 + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - 電磁拘束(&E) + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - 幾何的拘束 + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - 幾何的拘束(&G) + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - 機械的拘束 + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - 機械的拘束(&M) + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - 熱的拘束 + Analysis features without solver + Analysis features without solver - &Thermal Constraints - 熱的拘束(&T) + &Analysis features without solver + &Analysis features without solver - Constraints without solver - ソルバー無しの拘束 - - - - &Constraints without solver - ソルバー無しの拘束(&C) - - - Overwrite Constants 定数を上書き - + &Overwrite Constants 定数を上書き(&O) - + Mesh Mesh - + M&esh メッシュ(&e) - + Solve 求解 - + &Solve 求解(&S) - + Results 結果 - + &Results 結果(&R) - + Filter functions フィルター関数 - + &Filter functions フィルター関数(&F) - + Utilities ユーティリティ @@ -5401,10 +5396,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes すべてのクリッピング平面を削除 + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5419,123 +5418,6 @@ used for the Elmer solver 標準値を上書きするためのFEM定数である真空誘電率を作成 - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - 体積発熱拘束 - - - - Creates a FEM constraint body heat source - 体積発熱FEM拘束を作成 - - - - FEM_ConstraintCentrif - - - Constraint centrif - 遠心荷重拘束 - - - - Creates a FEM constraint centrif - 遠心荷重FEM拘束を作成 - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - 静電ポテンシャル拘束 - - - - Creates a FEM constraint electrostatic potential - 静電ポテンシャルFEM拘束を作成 - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - 流速拘束 - - - - Creates a FEM constraint flow velocity - 流速FEM拘束を作成 - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - 初期流速拘束 - - - - Creates a FEM constraint initial flow velocity - 初期流速FEM拘束を作成 - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - 初期圧力拘束 - - - - Creates a FEM constraint initial pressure - 初期圧力FEM拘束を作成 - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - 断面集計表示拘束 - - - - Creates a FEM constraint sectionprint - 断面集計表示のFEM拘束を作成 - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - 自重拘束 - - - - Creates a FEM constraint self weight - 自重FEM拘束を作成 - - - - FEM_ConstraintTie - - - Constraint tie - 結合拘束 - - - - Creates a FEM constraint tie - 結合FEM拘束を作成 - - FEM_ElementFluid1D @@ -5671,10 +5553,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples FEM サンプルを開く + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5750,8 +5636,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - FEMメッシュの表面をメッシュに変換 + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5776,18 +5662,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - FEMメッシュオブジェクトのメッシュを削除 + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info FEMメッシュ情報を表示 + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5798,8 +5688,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Gmshメッシャーを使用して形状からFEMメッシュを作成 + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5824,8 +5714,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Netgen内部メッシャーを使用してソリッド、またはフェイス形状からFEMメッシュを作成 + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6035,7 +5925,7 @@ used for the Elmer solver Select elements part of the solid that shall be added to the list. To add the solid click "Add". - Select elements part of the solid that shall be added to the list. To add the solid click "Add". + リストに追加するソリッドの要素パーツを選択。ソリッドを追加するには「追加」をクリック。 @@ -6167,19 +6057,6 @@ Please select a result type first. 結果オブジェクトがありません。 - - FEM_ConstraintCurrentDensity - - - Constraint current density - 電流密度拘束 - - - - Creates a FEM constraint current density - 電流密度FEM拘束を作成 - - FEM_EquationMagnetodynamic2D @@ -6204,21 +6081,8 @@ Please select a result type first. - Electromagnetic constraints - 電磁拘束 - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - 磁化拘束 - - - - Creates a FEM constraint magnetization - 磁化FEM拘束を作成 + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6318,11 +6182,6 @@ Please select a result type first. BoxWidget - - - Form - フォーム - x @@ -6361,11 +6220,6 @@ Please select a result type first. CylinderWidget - - - Form - フォーム - x @@ -6428,4 +6282,147 @@ Please select a result type first. FEMソルバーCalculiXの新しいフレームワークを作成 (結果エラー処理が減少) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts index f23bd2c675..af0c38e73c 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts @@ -10,13 +10,13 @@ - Constraint bearing - საკისრის შეზღუდვა + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - საკისარისთვის FEM შეზღუდვის შექმნა + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - კონტაქტის შეზღუდვა + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - ზედაპირების შეხების სემ შეზღუდვის შექმნა + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - გეომეტრიული ერთეულზე მოქმედი გადაადგილების სემ შეზღუდვის შექმნა + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - ფიქსირებული გეომეტრიული ერთეულისთვის სემ შეზღუდვის შექმნა + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - გეომეტრიული ერთეულზე მოქმედი ძალის სემ შეზღუდვის შექმნა + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - კბილანის შეზღუდვა + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - კბილანისთვის FEM შეზღუდვის შექმნა + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - სითბოს ნაკადის შეზღუდვა + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - ქმნის FEM შეზღუდვას ზედაპირზე მოქმედი სითბოს ნაკადისთვის + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - საწყისი ტემპერატურის შეზღუდვა + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - სხეულზე მოქმედი საწყისი ტემპერატურების სემ შეზღუდვის შექმნა + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - სიბრტყის ტრიალის შეზღუდვა + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - ქმნის სემ შეზღუდვას სიბრტყის ბრუნვის ზედაპირისთვის + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - ქმნის ზედაპირზე მოქმედი წნევის სემ შეზღუდვას + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - შეზღუდული ბორბალი + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - ბორბლისთვის FEM შეზღუდვის შექმნა + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - ზამბარის შეზღუდვა + Spring + Spring - Creates a FEM constraint for a spring acting on a face - ქმნის FEM შეზღუდვას ზედაპირზე მოქმედი ზამბარისთვის + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - სემ ზედაპირზე ტემპერატურის/სითბოს კონცენტრირებული ნაკადის მოქმედების შეზღუდვა + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - ზედაპირის გარდაქმნის სემ შეზღუდვის შექმნა + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - საკისრისთვის FEM შეზღუდვის დადება - - - - Make FEM constraint contact on face - ზედაპირზე შეხების სემ შეზღუდვის შექმნა - - - - Make FEM constraint displacement on face - ზედაპირზე სემ გადაადგილების შეზღუდვის შექმნა - - - - Make FEM constraint fixed geometry - ფიქსირებულ გეომეტრიაზე სემ შეზღუდვის დადება - Create fluid boundary condition სითხის სასაზღვრო მდგომარეობის შექმნა + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - გეომეტრიაზე ძალის სემ შეზღუდვის დადება + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - კბილანაზე სემ ზღვრის დადება + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - ზედაპირზე სითბოს ნაკადის სემ შეზღუდვის შექმნა + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - ზედაპირზე საწყისი ტემპერატურის სემ შეზღუდვის შექმნა + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - სემ სიბრტყის მოტრიალების ზედაპირის შეზღუდვის შექმნა + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - ზედაპირზე წნევის სემ შეზღუდვის შექმნა + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - ზედაპირზე ზამბარის სემ შეზღუდვის შექმნა + Make spring on face + Make spring on face - Make FEM constraint for pulley - ბორბლისთვის FEM შეზღუდვის დადება + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - ზედაპირზე ტემპერატურის სემ შეზღუდვის შექმნა + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - ზედაპირზე წნევის სემ შეზღუდვის გარდაქმნა + Make local coordinate system on face + Make local coordinate system on face @@ -1216,11 +1216,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - გაიტანება ბადის ჯგუფებიც. -ყველა შეზღუდვა და თუ არსებობს სხვადასხვა მასალები, მასალა შედგება ორი ბადის ჯგუფისგან, ზედაპირებისგან ან უჯრედებისგან, რომელზეც შეზღუდვა ან მასალა გადატარდება. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1321,15 +1323,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - როცა შედეგების ფანჯარა იხსნება, -მოდელის ხედში ყველა შეზღუდვა დამალულია + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - შედეგის ფანჯრის გახსნისას შეზღუდვების დამალვა + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1887,8 +1889,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - სემ შეზღუდვის პარამეტრები + Analysis feature parameters + Analysis feature parameters @@ -2043,8 +2045,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - ნებადართულია მხოლოდ ერთი ტიპი (წვერო, ზედაპირი ან წიბო) თითო შეზღუდვაზე! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2072,8 +2074,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - ერთ შეზღუდვას მხოლოდ ერთი მონიშნული ტიპი (წვერო, ზედაპირი ან წიბო) შეიძლება, ჰქონდეს! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2201,8 +2203,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - ერთ შეზღუდვას მხოლოდ ერთი მონიშნული ტიპი (წვერო, ზედაპირი ან წიბო) შეიძლება, ჰქონდეს! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2230,8 +2232,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - ნებადართულია მხოლოდ ერთი ტიპი (წვერო, ზედაპირი ან წიბო) თითო შეზღუდვაზე! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2318,8 +2320,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - სიბრტყის მოტრიალების შეზღუდვად მხოლოდ ერთი ზედაპირი შეგიძლიათ აირჩიოთ! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2442,8 +2444,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - შეზღუდვის განახლების შეცდომა + Analysis feature update error + Analysis feature update error @@ -2473,8 +2475,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - მართკუთხედის გარდასაქმნის შესაზღუდად აირჩიეთ მხოლოდ ერთი ზედაპირი! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2482,11 +2494,6 @@ Specify another file please. Selected object is not a part! მონიშნული ობიექტი ნაწილი არაა! - - - Only one face for transform constraint! - შეზღუდვის გარდასაქმნელად აირჩიეთ მხოლოდ ერთი ზედაპირი! - Only faces can be picked @@ -2497,11 +2504,6 @@ Specify another file please. Only cylindrical faces can be picked შეგიძლიათ აირჩიოთ მხოლოდ ცილინდრული ზედაპირები - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - შესაძლებელია მხოლოდ გარდაქნადი ზედაპირების არჩევა! ჯერ გამოიყენეთ გადაადგილების შეზღუდვა, შემდეგ კი გამოიყენეთ ზედაპირზე შეზღუდვა - FemGui::TaskObjectName @@ -2811,11 +2813,6 @@ Specify another file please. Form - - - Form - ფორმა - Fluid Section Parameter @@ -3065,8 +3062,8 @@ Specify another file please. - Constraint Properties - შეზღუდვის თვისებები + Analysis feature properties + Analysis feature properties @@ -3131,6 +3128,21 @@ with a harmonic/oscillating driving force წარმოდგენითი ნაწილი მხოლოდ ჰარმონიული/რხევადი მამოძრავებელი ძალის მქონე ტოლობებთან ერთად გამოიყენება + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3223,31 +3235,16 @@ Note: has no effect if a solid was selected Z-კომპონენტის პოტენციალის წარმოდგენითი ნაწილი შენიშვნა: ეფექტი არ გააჩნია, თუ მონიშნული მყარია - - - Whether the constraint defines a constant potential - განსაზღვრავს თუ არა შეზღუდვა მუდმივ პოტენციალს - Potential Constant პოტენციალის კონსტანტა - - - Whether the constraint defines a farfield potential - განსაზღვრავს თუ არა შეზღუდვა შორი ველის პოტენციალს - Farfield / Electric infinity შორი ველი / ელექტრო უსასრულობა - - - Whether the constraint is for the electric force - არის თუ არა შეზღუდვა ელექტრული ძალისთვის - Calculate Electric Force @@ -3596,11 +3593,6 @@ Note: for 2D only setting for x is possible, Cancel გაუქმება - - - Edit constraint - ზღვრის ჩასწორება - @@ -3630,11 +3622,6 @@ Note: for 2D only setting for x is possible, Meshing ბადის აგება - - - Constraint force - ძალის ზღვარი - @@ -3652,46 +3639,11 @@ Note: for 2D only setting for x is possible, Import-Export შეტანა-გატანა - - - Constraint Contact - კონტაქტის შეზღუდვა - - - - Constraint displacement - გადაადგილების შეზღუდვა - - - - Constraint fixed - დამაგრებულის ზღვარი - - - - Constraint fluid boundary - სითხის საზღვრის შეზღუდვა - - - - Constraint heat flux - სითბოს ნაკადის შეზღუდვა - Constraint initial temperature საწყისი ტემპერატურის შეზღუდვა - - - Constraint planerotation - სიბრტყის ტრიალის შეზღუდვა - - - - Constraint pressure - წნევის შეზღუდვა - Constraint pulley @@ -3702,16 +3654,6 @@ Note: for 2D only setting for x is possible, Constraint spring ზამბარის შეზღუდვა - - - Constraint temperature - ტემპერატურის შეზღუდვა - - - - Constraint transform - გარდაქნის შეზღუდვა - Edit post processing object @@ -3757,6 +3699,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? დარწმუნებული ბრძანდებით, რომ გნებავთ, გააგრძელოთ? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + სითხის სასაზღვრო მდგომარეობა + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4105,8 +4102,8 @@ For possible variables, see the description box below. - Constraints - შეზღუდვები + Analysis features + Analysis features @@ -4275,7 +4272,7 @@ For possible variables, see the description box below. Distance - Distance + დაშორება @@ -4423,7 +4420,7 @@ generated by the flow Select multiple face(s), click Add or Remove - აირჩიეთ ერთზე მეტი ზედაპირი. დააწკაპუნეთ დამატებას ან წაშლას + მონიშნეთ ზედაპირ(ებ)-ი და დააწკაპუნეთ დამატებაზე ან წაშლაზე @@ -4598,8 +4595,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -4762,7 +4759,7 @@ used for the Elmer solver Select multiple face(s), click Add or Remove - მონიშნეთ ზედაპირ(ებ)-ი და დააწკაპუნეთ დამატებაზე ან წაშლაზე + აირჩიეთ ერთზე მეტი ზედაპირი. დააწკაპუნეთ დამატებას ან წაშლას @@ -5242,128 +5239,126 @@ used for the Elmer solver - Electrostatic Constraints - ელექტროსტატიკური შეზღუდვები + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &ელექტროსტატიკური შეზღუდვები - - - - Fluid Constraints - სითხის შეზღუდვები - - - - &Fluid Constraints - &სითხის შეზღუდვები + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - ელექტრომაგნიტური შეზღუდვები + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &ელექტრომაგნიტური შეზღუდვები + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - გეომეტრიული შეზღუდვები + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &გეომეტრიული შეზღუდვები + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - მექანიკური შეზღუდვები + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &მექანიკური შეზღუდვები + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - თერმული შეზღუდვები + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &თერმული შეზღუდვები + &Analysis features without solver + &Analysis features without solver - Constraints without solver - შეზღუდვები ამომხსნელის გარეშე - - - - &Constraints without solver - &შეზღუდვები ამომხსნელის გარეშე - - - Overwrite Constants კონსტანტებზე გადაწერა - + &Overwrite Constants &კონსტანტებზე გადაწერა - + Mesh Mesh - + M&esh &ბადე - + Solve ამოხსნა - + &Solve &გადაწყვეტა - + Results შედეგები - + &Results &შედეგები - + Filter functions ფილტრის ფუნქციები - + &Filter functions &ფილტრის ფუნქციები - + Utilities ხელსაწყოები @@ -5419,10 +5414,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes კვეთის ყველა სიბრტყის მოცილება + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5437,123 +5436,6 @@ used for the Elmer solver სემ ვაკუუმის გამტარობის კონსტანტის შექმნა სტანდარტულ მნიშვნელობაზე გადასაწერად - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - სხეულის სითბოს წყაროს შეზღუდვა - - - - Creates a FEM constraint body heat source - სხეულის სითბოს წყაროს FEM შეზღუდვის შექმნა - - - - FEM_ConstraintCentrif - - - Constraint centrif - ცენტრიფუგის შეზღუდვა - - - - Creates a FEM constraint centrif - ცენტრიფუგის სემ შეზღუდვის შექმნა - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - ელექტროსტატიკური პოტენციალის შეზღუდვა - - - - Creates a FEM constraint electrostatic potential - სემ ელექტროსტატიკური პოტენციალის შეზღუდვის შექმნა - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - დინების სიჩქარის ზღვარი - - - - Creates a FEM constraint flow velocity - ქმნის სემ დინების სიჩქარის შეზღუდვას - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - დინების საწყისი სიჩქარის ზღვარი - - - - Creates a FEM constraint initial flow velocity - ქმნის სემ დინების საწყისი სიჩქარის შეზღუდვას - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - საწყისი წნევის შეზღუდვა - - - - Creates a FEM constraint initial pressure - ქმნის სემ საწყისი წნევის შეზღუდვას - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - განივი კვეთის შეზღუდვა - - - - Creates a FEM constraint sectionprint - სემ განივი კვეთის შეზღუდვის შექმნა - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - საკუთარი წონის შეზღუდვა - - - - Creates a FEM constraint self weight - საკუთარი წონის სემ შეზღუდვის შექმნა - - - - FEM_ConstraintTie - - - Constraint tie - კავშირის შეზღუდვა - - - - Creates a FEM constraint tie - სემ კავშირის შეზღუდვის შექმნა - - FEM_ElementFluid1D @@ -5690,10 +5572,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples სემ მაგალითების გახსნა + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5769,8 +5655,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - სემ ბადის ზედაპირის ბადედ გარდაქმნა + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5795,18 +5681,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - ბადის ან სემ ბადის ობიექტის გასუფთავება + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info სემ ბადის ინფორმაციის ჩვენება + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5817,8 +5707,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - მოხაზულობიდან Gmsh-ის მეშვეობით სემ ბადის შექმნა + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5843,8 +5733,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - სემ ბადის მყარი სხეულისაგან ან ზედაპირის მოხაზულობისგან Netgen შიდა მეშერით შექმნა + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6186,19 +6076,6 @@ Please select a result type first. შედეგი ობიექტის გარეშე - - FEM_ConstraintCurrentDensity - - - Constraint current density - მიმდინარე სიმკვრივის შეზღუდვა - - - - Creates a FEM constraint current density - მიმდინარე სემ სიმკვრივის შეზღუდვის შექმნა - - FEM_EquationMagnetodynamic2D @@ -6224,21 +6101,8 @@ Please select a result type first. - Electromagnetic constraints - ელექტრომაგნიტური შეზღუდვები - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - მაგნეტიზაციის შეზღუდვა - - - - Creates a FEM constraint magnetization - მაგნეტიზაციის სემ შეზღუდვის შექმნა + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6340,11 +6204,6 @@ Please select a result type first. BoxWidget - - - Form - ფორმა - x @@ -6383,11 +6242,6 @@ Please select a result type first. CylinderWidget - - - Form - ფორმა - x @@ -6450,4 +6304,147 @@ Please select a result type first. სემ ამომხსნელის CalculiX ახალი Framework-ით შექმნა (ნაკლები შედეგის შეცდომები) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts index a5bdf89857..a45eafd951 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts @@ -10,13 +10,13 @@ - Constraint bearing - 지지점 구속 조건 + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - FEM constraint parameters + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Selected object is not a part! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Only cylindrical faces can be picked - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - 양식 - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel 취소하기 - - - Edit constraint - Edit constraint - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Meshing - - - Constraint force - Constraint force - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export 가져오기 내보내기 - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Are you sure you want to continue? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4110,8 +4105,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4603,8 +4598,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5247,128 +5242,126 @@ used for the Elmer solver - Electrostatic Constraints - 정적 전기 구속 조건 + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - 정전기 제약조건(&E) - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - 유체 제약조건(&F) + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - 형태상의 구속조건 + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - 형상 제약조건(&G) + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - 기계적 제약조건(&M) + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - 열 제약조건(&T) + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants 상수 덮어쓰기(&O) - + Mesh Mesh - + M&esh 메시(&E) - + Solve 솔버 실행 - + &Solve &Solve - + Results Results - + &Results 결과(&R) - + Filter functions Filter functions - + &Filter functions 필터 기능(&F) - + Utilities Utilities @@ -5424,10 +5417,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5442,123 +5439,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - 자중 구속조건 - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5695,10 +5575,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples FEM 예제 열기 + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5774,8 +5658,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - FEM 망요소의 표면을 메쉬로 변환 + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5800,18 +5684,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5822,8 +5710,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5848,8 +5736,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6191,19 +6079,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6229,21 +6104,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6345,11 +6207,6 @@ Please select a result type first. BoxWidget - - - Form - 양식 - x @@ -6388,11 +6245,6 @@ Please select a result type first. CylinderWidget - - - Form - 양식 - x @@ -6455,4 +6307,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts index 35646d84f9..b1ab35040c 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts @@ -10,13 +10,13 @@ - Constraint bearing - Lager-bevestiging + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creeert een FEM bevestiging voor een lager + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Contact-bevestiging + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creeert een FEM-bevestiging voor contact tussen vlakken + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Maakt een FEM-beperking voor een verplaatsing op een geometrische entiteit + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Maakt een FEM-beperking voor een vaste geometrische entiteit + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Maakt een FEM-beperking voor een kracht op een geometrische entiteit + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Tandwiel-beperking + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Maakt een FEM-beperking voor een tandwiel + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Warmte-flux beperking + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Maakt een FEM-beperking voor een warmte-flux op een oppervlak + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Maakt een FEM-beperking voor een start-temperatuur op een lichaam + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Vlak-rotatie-beperking + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Maakt een FEM-beperking voor een rotatie-vlak + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Maakt een FEM-beperking voor een druk op een oppervlak + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Maakt een FEM-beperking voor een katrol + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Maakt een FEM-beperking voor een veer werkend op een oppervlak + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creert een FEM-randvoorwaarde voor een temperatuur- of geconcentreerde warmte-flux op een oppervlak + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Creert een FEM-randvoorwaarde voor het transformeren van een oppervlak + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Maak een FEM-randvoorwaarde voor een lager - - - - Make FEM constraint contact on face - Maak een FEM-randvoorwaarde-contact op vlak - - - - Make FEM constraint displacement on face - Maak een FEM-randvoorwaarde-verplaatsing op vlak - - - - Make FEM constraint fixed geometry - Maak een FEM-randvoorwaarde vaste geometrie - Create fluid boundary condition Creer een vloeistof randvoorwaarde + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Maak een FEM-randvoorwaarde voor een kracht op een geometrie + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Maak een FEM-randvoorwaarde voor een tandwiel + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - FEM-beperking parameters + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Slechts één selectietype (vertex, vlak of rand) per beperking toegestaan! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Geselecteerd object is geen deel! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Alleen cylindrische vlakken kunnen geselecteerd worden - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Vorm - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potentiële constante - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Annuleren - - - Edit constraint - Beperking bewerken - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Meshing - - - Constraint force - Beperkingskracht - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Importeren-Exporteren - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Weet u zeker dat u wilt doorgaan? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Vloeistof randvoorwaarde + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Randvoorwaarde + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Elektromagnetische beperkingen + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Elektromagnetische beperkingen + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Oplossen - + &Solve &Oplossen - + Results Resultaten - + &Results &Resultaten - + Filter functions Filter functies - + &Filter functions &Filter functions - + Utilities Hulpmiddelen @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Beperking magnetisering - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Vorm - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Vorm - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts index 8229aa8abf..3c75b014e4 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts @@ -10,13 +10,13 @@ - Constraint bearing - Wiązanie łożyska + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Dodaje wiązanie łożyska + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Zdefiniuj kontakt + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Definiuje kontakt między powierzchniami + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Dodaje definicję przemieszczeń dla obiektu + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Dodaje pełne utwierdzenie obiektu + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Dodaje obciążenie siłą działającą na obiekt + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Zdefiniuj przełożenie + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Tworzy wiązanie przekładni + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Obciążenie strumieniem ciepła + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Dodaje obciążenie strumieniem ciepła działającym na powierzchni + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Zdefiniuj temperaturę początkową + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Dodaje temperaturę początkową ciała + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Zdefiniuj obrót w płaszczyźnie + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Dodaje wiązanie utrzymujące węzły na płaskiej powierzchni (MPC Plane) + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Dodaje obciążenie ciśnieniem działającym na powierzchnię + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Zdefiniuj koło pasowe + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Tworzy wiązanie koła pasowego + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Wiązanie sprężyny + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Dodaje wiązanie sprężyny działającej na powierzchni + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Tworzy wiązanie dla temperatury / koncentrycznego strumienia ciepła działającego na ścianę + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Dodaje wiązanie przekształcenia powierzchni + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Dodaj wiązanie MES łożyska - - - - Make FEM constraint contact on face - Dodaj kontakt na powierzchni - - - - Make FEM constraint displacement on face - Dodaj definicję przemieszczeń na powierzchni - - - - Make FEM constraint fixed geometry - Dodaj pełne utwierdzenie geometrii - Create fluid boundary condition Dodaj warunek brzegowy dla płynu + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Dodaj obciążenie siłą na geometrii + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Dodaj wiązanie dla przekładni + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Dodaj obciążenie strumieniem cieplnym na powierzchni + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Dodaj temperaturę początkową ciała + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Dodaj wiązanie utrzymujące węzły na płaskiej powierzchni (MPC Plane) + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Dodaj obciążenie ciśnieniem na powierzchni + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Dodaj wiązanie sprężyny dla powierzchni + Make spring on face + Make spring on face - Make FEM constraint for pulley - Dodaj wiązanie koła pasowego + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Dodaj definicję temperatury na powierzchni + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Dodaj wiązanie przekształcenia na powierzchni + Make local coordinate system on face + Make local coordinate system on face @@ -1214,10 +1214,13 @@ MES: Tylko elementy MES zostaną wyeksportowane. Oznacza to tylko krawędzie nie Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Grupy siatek są również eksportowane. Każde wiązanie i (jeśli są różne materiały) każdy materiał składa się z dwóch grup siatek, powierzchni i węzłów, dla których wiązanie lub materiał jest zdefiniowany. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1318,15 +1321,15 @@ z ostatnio użytymi ustawieniami - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Wszystkie wiązania są ukryte w widoku modelu -gdy okno dialogowe wyników jest otwarte + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Ukryj wiązania przy otwartym oknie dialogowym wyników + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1887,8 +1890,8 @@ Wybierz inny plik. FemGui::TaskFemConstraint - FEM constraint parameters - Parametry wiązań MES + Analysis feature parameters + Analysis feature parameters @@ -2043,8 +2046,8 @@ Wybierz inny plik. - Only one type of selection (vertex,face or edge) per constraint allowed! - Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na wiązanie! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2072,8 +2075,8 @@ Wybierz inny plik. - Only one type of selection (vertex,face or edge) per constraint allowed! - Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na wiązanie! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2201,8 +2204,8 @@ Wybierz inny plik. - Only one type of selection (vertex,face or edge) per constraint allowed! - Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na wiązanie! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2230,8 +2233,8 @@ Wybierz inny plik. - Only one type of selection (vertex,face or edge) per constraint allowed! - Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na wiązanie! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2318,8 +2321,8 @@ Wybierz inny plik. - Only one face can be selected for a plane rotation constraint! - Tylko jedna powierzchnia może być wybrana do wiązania utrzymującego węzły na płaskiej powierzchni (MPC Plane)! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2442,8 +2445,8 @@ Wybierz inny plik. FemGui::TaskFemConstraintTransform - Constraint update error - Błąd aktualizacji wiązania + Analysis feature update error + Analysis feature update error @@ -2473,8 +2476,18 @@ Wybierz inny plik. - Only one face for rectangular transform constraint! - Tylko jedna powierzchnia do wiązania przekształcenia prostokątnego! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2482,11 +2495,6 @@ Wybierz inny plik. Selected object is not a part! Wybrany obiekt nie jest częścią! - - - Only one face for transform constraint! - Tylko jedna powierzchnia do wiązania przekształcenia! - Only faces can be picked @@ -2497,11 +2505,6 @@ Wybierz inny plik. Only cylindrical faces can be picked Mogą być użyte tylko powierzchnie cylindryczne - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Tylko przekształcalne powierzchnie mogą być wybrane! Dodaj najpierw definicję przemieszczeń a następnie wiązanie do powierzchni - FemGui::TaskObjectName @@ -2811,11 +2814,6 @@ Wybierz inny plik. Form - - - Form - Formularz - Fluid Section Parameter @@ -3065,8 +3063,8 @@ Wybierz inny plik. - Constraint Properties - Właściwości wiązań + Analysis feature properties + Analysis feature properties @@ -3131,6 +3129,21 @@ with a harmonic/oscillating driving force Część urojona jest używana tylko w równaniach z harmoniczną / oscylującą siłą napędzającą + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3223,31 +3236,16 @@ Note: has no effect if a solid was selected Urojona część składowej z potencjału Uwaga: bez efektu, jeśli wybrano bryłę - - - Whether the constraint defines a constant potential - Czy wiązanie definiuje stały potencjał - Potential Constant Definicja potencjału elektrostatycznego - - - Whether the constraint defines a farfield potential - Czy wiązanie definiuje potencjał pola dalekiego - Farfield / Electric infinity Dalekie pole / nieskończoność elektryczna - - - Whether the constraint is for the electric force - Czy wiązanie dotyczy siły elektrycznej - Calculate Electric Force @@ -3596,11 +3594,6 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, Cancel Anuluj - - - Edit constraint - Edytuj wiązanie - @@ -3630,11 +3623,6 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, Meshing Tworzenie siatki - - - Constraint force - Zdefiniuj siłę - @@ -3652,46 +3640,11 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, Import-Export Import-Eksport - - - Constraint Contact - Zdefiniuj kontakt - - - - Constraint displacement - Zdefiniuj przemieszczenie - - - - Constraint fixed - Zdefiniuj przytwierdzenie - - - - Constraint fluid boundary - Zdefiniuj przepływ graniczny - - - - Constraint heat flux - Obciążenie strumieniem ciepła - Constraint initial temperature Zdefiniuj temperaturę początkową - - - Constraint planerotation - Wiązanie utrzymujące węzły na płaskiej powierzchni (MPC Plane) - - - - Constraint pressure - Zdefiniuj obciążenie ciśnieniem - Constraint pulley @@ -3702,16 +3655,6 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, Constraint spring Wiązanie sprężyny - - - Constraint temperature - Zdefiniuj temperaturę - - - - Constraint transform - Zdefiniuj odkształcenie - Edit post processing object @@ -3757,6 +3700,61 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, Are you sure you want to continue? Czy na pewno chcesz kontynuować? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Warunek brzegowy dla płynu + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4105,8 +4103,8 @@ Aby uzyskać możliwe zmienne, zobacz pole opisu poniżej. - Constraints - Wiązania + Analysis features + Analysis features @@ -4270,7 +4268,7 @@ Aby uzyskać możliwe zmienne, zobacz pole opisu poniżej. Location - Umiejscowienie + Położenie @@ -4598,8 +4596,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5242,130 +5240,128 @@ użyta przez solver Elmer - Electrostatic Constraints - Wiązania elektrostatyczne + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - Wiązania &elektrostatyczne - - - - Fluid Constraints - Wiązania płynu - - - - &Fluid Constraints - Wiązania &płynu + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Wiązania elektromagnetyczne + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Wiązania elektromagnetyczne + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Wiązania geometryczne + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - Wiązania &geometryczne + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Wiązania mechaniczne + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - Wiązania &mechaniczne + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Wiązania termiczne + Analysis features without solver + Analysis features without solver - &Thermal Constraints - Wiązania &termiczne + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Wiązania bez solvera - - - - &Constraints without solver - &Wiązania bez solvera - - - Overwrite Constants Nadpisz stałe - + &Overwrite Constants &Nadpisz stałe - + Mesh Siatka - + M&esh &Siatka - + Solve Rozwiąż - + &Solve &Rozwiąż - + Results Wyniki - + &Results &Wyniki - + Filter functions Funkcje filtrów - + &Filter functions &Funkcje filtra - + Utilities - &Narzędzia + Narzędzia @@ -5419,10 +5415,14 @@ użyta przez solver Elmer FEM_ClippingPlaneRemoveAll - Remove all clipping planes Usuń wszystkie płaszczyzny cięcia + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5437,123 +5437,6 @@ użyta przez solver Elmer Tworzy przenikalność elektryczną próżni nadpisując standardową wartość - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Zdefiniuj objętościowe źródło ciepła - - - - Creates a FEM constraint body heat source - Tworzy objętościowe źródło ciepła - - - - FEM_ConstraintCentrif - - - Constraint centrif - Zdefiniuj siłę odśrodkową - - - - Creates a FEM constraint centrif - Dodaje obciążenie siłą odśrodkową - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Zdefiniuj potencjał elektrostatyczny - - - - Creates a FEM constraint electrostatic potential - Tworzy warunek brzegowy potencjału elektrostatycznego - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Zdefiniuj prędkość przepływu - - - - Creates a FEM constraint flow velocity - Definiuje prędkość przepływu - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Zdefiniuj warunek początkowy prędkości przepływu - - - - Creates a FEM constraint initial flow velocity - Definiuje początkową prędkość przepływu - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Zdefiniuj początkowe obciążenie ciśnieniem - - - - Creates a FEM constraint initial pressure - Definiuje ciśnienie początkowe - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Zapis wyników z przekroju - - - - Creates a FEM constraint sectionprint - Dodaje zapis wyników z przekroju - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Zdefiniuj obciążenie ciężarem własnym - - - - Creates a FEM constraint self weight - Definiuje obciążenie ciężarem własnym - - - - FEM_ConstraintTie - - - Constraint tie - Zdefiniuj powiązanie - - - - Creates a FEM constraint tie - Dodaje kontakt wiązany - - FEM_ElementFluid1D @@ -5690,10 +5573,14 @@ sprężystość (naprężenia) FEM_Examples - Open FEM examples Otwórz przykłady + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5769,8 +5656,8 @@ sprężystość (naprężenia) - Convert the surface of a FEM mesh to a mesh - Konwertuj powierzchnię siatki MES na siatkę + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5795,18 +5682,22 @@ sprężystość (naprężenia) - Clear the Mesh of a FEM mesh object - Wyczyść dane Siatki z obiektu siatki MES + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Wyświetl informacje o siatce MES + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5817,8 +5708,8 @@ sprężystość (naprężenia) - Create a FEM mesh from a shape by Gmsh mesher - Tworzy siatkę MES z kształtu przy użyciu generatora siatki Gmsh + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5843,8 +5734,8 @@ sprężystość (naprężenia) - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Tworzy siatkę MES z bryły lub kształtu powierzchni przez wewnętrzny generator siatki Netgen + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6186,19 +6077,6 @@ Proszę najpierw wybrać typ wyniku. Brak obiektu wyniku - - FEM_ConstraintCurrentDensity - - - Constraint current density - Zdefiniuj gęstość prądu - - - - Creates a FEM constraint current density - Definiuje obciążenie gęstością prądu elektrycznego - - FEM_EquationMagnetodynamic2D @@ -6224,21 +6102,8 @@ sił magnetodynamicznych 2D - Electromagnetic constraints - Wiązania elektromagnetyczne - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Zdefiniuj magnetyzację - - - - Creates a FEM constraint magnetization - Dodaje warunek magnetyzacji + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6340,11 +6205,6 @@ deformacji (sprężystość nieliniowa) BoxWidget - - - Form - Formularz - x @@ -6383,11 +6243,6 @@ deformacji (sprężystość nieliniowa) CylinderWidget - - - Form - Formularz - x @@ -6406,7 +6261,7 @@ deformacji (sprężystość nieliniowa) Center - Wyśrodkowane + Środek @@ -6450,4 +6305,147 @@ deformacji (sprężystość nieliniowa) Dodaje solver CalculiX z nową strukturą (mniejsza obsługa błędów wynikowych) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts index 386b0df4a0..5cd2903e14 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts @@ -10,13 +10,13 @@ - Constraint bearing - Ação de rolamento + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Criar uma ação MEF para um rolamento + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Ação de contato + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Cria uma ação MEF de contato entre faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Criar uma ação MEF no deslocamento de uma entidade geométrica + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Criar uma ação FEM para a fixação de uma entidade geométrica + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Criar uma ação MEF para uma força atuando em uma entidade geométrica + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Ação de engrenagem + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Criar uma ação MEF para uma engrenagem + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Ação de fluxo de calor + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Cria uma ação MEF para um flux de calor atuando em uma face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Ação de temperatura inicial + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Cria uma ação MEF de temperatura inicial agindo em um corpo + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Ação de rotação de plano + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Cria uma ação MEF de plano de rotação em uma face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Cria uma ação MEF de pressão atuando em uma face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Ação de polia + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Cria uma ação MEF para uma polia + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Ação de mola + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Criar uma ação FEM para uma mola atuando sobre uma face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Cria uma ação MEF para um fluxo de calor concentrado/temperatura atuando em uma face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Criar uma ação MEF para transformar uma face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Criar ação MEF para um rolamento - - - - Make FEM constraint contact on face - Cria uma ação MEF de contato numa face - - - - Make FEM constraint displacement on face - Cria uma ação MEF de deslocamento numa face - - - - Make FEM constraint fixed geometry - Cria uma ação MEF de fixação de geometria - Create fluid boundary condition Criar condição de limite fluido + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Cria uma ação MEF de força em uma geometria + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Criar uma restrição FEM para uma engrenagem + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Cria uma ação MEF de fluxo de calor numa face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Criar uma ação MEF de temperatura inicial em um corpo + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Cria uma ação MEF de plano de rotação em uma face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Cria uma ação MEF de pressão numa face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Cria uma ação MEF de mola numa face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Criar uma restrição FEM para uma polia + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Cria uma ação MEF de temperatura numa face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Cria uma ação MEF de transformação numa face + Make local coordinate system on face + Make local coordinate system on face @@ -1216,13 +1216,13 @@ não pertencentes a faces e faces não pertencentes a volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Grupos de malha também são exportados. -Cada restrição e, se houver materiais diferentes, material -consiste em dois grupos de malha, faces e nós onde a -restrição ou material é aplicada. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1323,15 +1323,15 @@ com as últimas configurações utilizadas - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Todas as restrições estão escondidas na visão de modelo -quando a caixa de diálogo de resultado é aberta + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Oculta restrições quando abrir caixa de diálogo de resultados + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1893,8 +1893,8 @@ Especifique outro arquivo, por favor. FemGui::TaskFemConstraint - FEM constraint parameters - Parâmetros de restrições MEF + Analysis feature parameters + Analysis feature parameters @@ -2049,8 +2049,8 @@ Especifique outro arquivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Apenas um tipo de seleção (vértice, face ou aresta) por restrição permitida! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2078,8 +2078,8 @@ Especifique outro arquivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Apenas um tipo de seleção (vértice, face ou aresta) por restrição permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2207,8 +2207,8 @@ Especifique outro arquivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Apenas um tipo de seleção (vértice, face ou aresta) por restrição permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2236,8 +2236,8 @@ Especifique outro arquivo, por favor. - Only one type of selection (vertex,face or edge) per constraint allowed! - Apenas um tipo de seleção (vértice, face ou aresta) por restrição permitida! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2324,8 +2324,8 @@ Especifique outro arquivo, por favor. - Only one face can be selected for a plane rotation constraint! - Apenas uma face pode ser selecionada para uma restrição de rotação de plano! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2448,8 +2448,8 @@ Especifique outro arquivo, por favor. FemGui::TaskFemConstraintTransform - Constraint update error - Erro de atualização de restrição + Analysis feature update error + Analysis feature update error @@ -2479,8 +2479,18 @@ Especifique outro arquivo, por favor. - Only one face for rectangular transform constraint! - Apenas uma face para restrição de transformação retangular! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2488,11 +2498,6 @@ Especifique outro arquivo, por favor. Selected object is not a part! O objeto selecionado não é uma peça! - - - Only one face for transform constraint! - Apenas uma face para restrições de transformação! - Only faces can be picked @@ -2503,11 +2508,6 @@ Especifique outro arquivo, por favor. Only cylindrical faces can be picked Somente as faces cilíndricas podem ser selecionadas - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Apenas faces transformáveis podem ser selecionadas! Aplique a restrição de deslocamento à superfície primeiro e então aplique a restrição à superfície - FemGui::TaskObjectName @@ -2817,11 +2817,6 @@ Especifique outro arquivo, por favor. Form - - - Form - Formulário - Fluid Section Parameter @@ -3071,8 +3066,8 @@ Especifique outro arquivo, por favor. - Constraint Properties - Propriedades de Restrição + Analysis feature properties + Analysis feature properties @@ -3137,6 +3132,21 @@ with a harmonic/oscillating driving force Parte imaginária é usada apenas para equações com forças atuantes harmônicas/oscilantes + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3229,31 +3239,16 @@ Note: has no effect if a solid was selected Parte imaginária de componente-z potencial Nota: não surge efeito se um sólido foi selecionado - - - Whether the constraint defines a constant potential - Se a restrição define um potencial constante - Potential Constant Constante potencial - - - Whether the constraint defines a farfield potential - Se a restrição define um potencial de Campo distante - Farfield / Electric infinity Campo distante / Infinidade Elétrica - - - Whether the constraint is for the electric force - Se a restrição é para a força elétrica - Calculate Electric Force @@ -3602,11 +3597,6 @@ Nota: para configuração apenas 2D para x é possível, Cancel Cancelar - - - Edit constraint - Editar ação - @@ -3636,11 +3626,6 @@ Nota: para configuração apenas 2D para x é possível, Meshing Conversão em malhas - - - Constraint force - Ação de força - @@ -3658,46 +3643,11 @@ Nota: para configuração apenas 2D para x é possível, Import-Export Importação e exportação - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Ação de deslocamento - - - - Constraint fixed - Ação fixa - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Ação de temperatura inicial - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Ação de pressão - Constraint pulley @@ -3708,16 +3658,6 @@ Nota: para configuração apenas 2D para x é possível, Constraint spring Ação de mola - - - Constraint temperature - Ação de temperatura - - - - Constraint transform - Ação de transformação - Edit post processing object @@ -3763,6 +3703,61 @@ Nota: para configuração apenas 2D para x é possível, Are you sure you want to continue? Tem certeza que deseja continuar? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Condição do limite fluido + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4111,8 +4106,8 @@ For possible variables, see the description box below. - Constraints - Restrições + Analysis features + Analysis features @@ -4606,8 +4601,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5250,128 +5245,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Malha - + M&esh M&esh - + Solve Resolver - + &Solve &Solve - + Results Resultados - + &Results &Results - + Filter functions Funções de filtro - + &Filter functions &Filter functions - + Utilities Utilitários @@ -5427,10 +5420,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5445,123 +5442,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Restrição de centrífuga - - - - Creates a FEM constraint centrif - Cria uma restrição de centrífuga FEM - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Restrições de impressão de seções - - - - Creates a FEM constraint sectionprint - Cria uma restrição de impressão de seções FEM - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Restringir amarração - - - - Creates a FEM constraint tie - Cria uma amarração restrita FEM - - FEM_ElementFluid1D @@ -5698,10 +5578,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5777,8 +5661,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5803,18 +5687,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5825,8 +5713,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5851,8 +5739,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6194,19 +6082,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6232,21 +6107,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6348,11 +6210,6 @@ Please select a result type first. BoxWidget - - - Form - Formulário - x @@ -6391,11 +6248,6 @@ Please select a result type first. CylinderWidget - - - Form - Formulário - x @@ -6458,4 +6310,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts index 584666746d..ca0f3943ac 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constraint bearing + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Parâmetros de restrições FEM + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Objeto selecionado não é uma peça (parte)! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Somente as faces cilíndricas podem ser selecionadas - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Formulário - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Cancelar - - - Edit constraint - Editar restrição - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Emalhar - - - Constraint force - Restrição de Força - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Importar/Exportar - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Restringir pressão - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Restringir temperatura - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Tem certeza que deseja continuar? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Malha - + M&esh M&esh - + Solve Resolver - + &Solve &Solve - + Results Results - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Utilitários @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Formulário - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Formulário - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts index 3574a418a5..f63f340639 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constrângere purtătoare + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creează o constrângere FEM pentru un suport + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constrângere contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creează o constrângere FEM pentru contact între fețe + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creează o constrângere FEM pentru o deplasare care acționează pe o entitate geometrică + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creează o constrângere FEM pentru o entitate geometrică fixă + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creează o constrângere FEM pentru o forță acționând pe baza unei entități geometrice + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Echipament de construire + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creează o constrângere FEM pentru o transmisie + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Încălzire constrânsă + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creează o constrângere FEM pentru un flux de încălzire care acționează pe o față + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constrângere temperatură inițială + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creează o constrângere FEM pentru temperatura inițială, acționând pe un corp + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Rotire plan constrângere + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creează o constrângere FEM pentru rotaţia planului + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creează o constrângere FEM pentru o presiune care acționează pe o față + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constrângere scripete + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creează o constrângere FEM pentru un scripete + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constrângere arc + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creează o constrângere FEM pentru un arc care acționează pe o față + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creează o constrângere FEM pentru temperatură/flux de căldură concentrat acționând pe o față + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Creează o constrângere FEM pentru transformarea unei fețe + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ care nu aparțin fețelor și fețelor care nu aparțin volumelor. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Grupurile de plasă sunt, de asemenea, exportate. -Fiecare constrângere și, în cazul în care există materiale diferite, materialul -constă din două grupuri de plase, fețe și noduri unde se aplică -constrângere sau material. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Parametrii de constrângere FEM + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Obiectul selectat nu este o Part! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Numai fețele cilindrice pot fi ridicate - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Formular - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Renunţă - - - Edit constraint - Editare restricţie - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Meshing - - - Constraint force - Forţa de constrângere - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Import/Export - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constrângere dislocată - - - - Constraint fixed - Constrângere fixată - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constrângere temperatură inițială - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constrângere presiune - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constrângere arc - - - Constraint temperature - Temperatură constrângere - - - - Constraint transform - Constrângere pentru transformare - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Are you sure you want to continue? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Stare de limitare a lichidului + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Rezolvă - + &Solve &Solve - + Results Rezultate - + &Results &Results - + Filter functions Filtrează funcțiile - + &Filter functions &Filter functions - + Utilities Utilități @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Formular - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Formular - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts index 86820f3a74..d520696518 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts @@ -10,13 +10,13 @@ - Constraint bearing - Ограничительный подшипник + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Создает ограничение МКЭ для подшипника + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Ограничение контакта + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Создает ограничение FEM для контакта между гранями + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Создает ограничение МКЭ (FEM) для смещения, действующего на геометрический объект + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Создает ограничение МКЭ (FEM) для фиксированного геометрического объекта + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Создает ограничение МКЭ (FEM) для силы, действующей на геометрический объект + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Механизм ограничения + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Создает ограничение FEM для шестерни + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Ограничение теплового потока + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Создает ограничение МКЭ (FEM) для теплового потока, воздействующего на грань + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Ограничение начальной температуры + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Создает ограничение МКЭ (FEM) для начальной температуры, воздействующей на тело + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Ограничить вращение плоскости + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Создает ограничение МКЭ (FEM) для поверхности вращения плоскости + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Создает ограничение МКЭ (FEM) для давления, воздействующего на грань + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Ограничительный шкив + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Создает ограничение МКЭ (FEM) для шкива + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Ограничительная пружина + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Создает ограничение МКЭ (FEM) для пружины, воздействующей на грань + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Создает ограничение МКЭ (FEM) для температуры/концентрированного теплового потока, воздействующего на грань + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Создайте ограничение FEM для преобразования грани + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Сделать ограничение МКЭ (FEM) для подшипника - - - - Make FEM constraint contact on face - Сделать контакт ограничения МКЭ (FEM) на грани - - - - Make FEM constraint displacement on face - Сделать смещение ограничения МКЭ (FEM) на грани - - - - Make FEM constraint fixed geometry - Сделать фиксированную геометрию ограничения МКЭ (FEM) - Create fluid boundary condition Создайте граничное условие жидкости + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Наложить ограничение силы МКЭ (FEM) на геометрию + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Сделать ограничение МКЭ (FEM) для шестерни + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Сделать ограничение теплового потока МКЭ (FEM) на грани + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Сделать ограничение начальной температуры МКЭ (FEM) на теле + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Сделать ограничение вращения плоскости грани МКЭ (FEM) + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Сделать ограничение давления МКЭ (FEM) на грани + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Сделать ограничительную пружину МКЭ (FEM) на грани + Make spring on face + Make spring on face - Make FEM constraint for pulley - Сделать ограничение МКЭ (FEM) для шкива + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Сделать температурные ограничения МКЭ (FEM) на грани + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Сделать ограничение преобразования МКЭ (FEM) на грани + Make local coordinate system on face + Make local coordinate system on face @@ -1214,11 +1214,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Группы сеток также экспортируются. -Каждое ограничение и материал, состоящий из двух групп сеток, граней и узлов, к которым применяется ограничение или материал (если материалы разные). +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1319,15 +1321,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Все ограничения скрыты при просмотре модели -при открытии диалога результатов + All analysis features are hidden in the model view +when the results dialog is opened - Hide constraints when open result dialog - Скрыть ограничения при открытии диалогового окна результатов + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1883,8 +1885,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Параметры граничных условий для МКЭ + Analysis feature parameters + Analysis feature parameters @@ -2039,8 +2041,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Допускается только один тип выделения (вершина, грань или ребро) для каждого ограничения! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2068,8 +2070,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Допускается только один тип выделения (вершина, грань или ребро) для каждого ограничения! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2197,8 +2199,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Допускается только один тип выделения (вершина, грань или ребро) для каждого ограничения! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2226,8 +2228,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Допускается только один тип выделения (вершина, грань или ребро) для каждого ограничения! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2314,8 +2316,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Для ограничения вращения плоскости можно выбрать только одну часть! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2438,8 +2440,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Ошибка обновления ограничения + Analysis feature update error + Analysis feature update error @@ -2469,8 +2471,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Только одна грань для ограничения прямоугольного преобразования! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2478,11 +2490,6 @@ Specify another file please. Selected object is not a part! Выделенный объект не является деталью! - - - Only one face for transform constraint! - Только одна грань для ограничения преобразования! - Only faces can be picked @@ -2493,11 +2500,6 @@ Specify another file please. Only cylindrical faces can be picked Можно выбрать только цилиндрические грани - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Можно выбрать только преобразованные поверхности! Сначала применить ограничение смещения к поверхности, а затем применить ограничение к поверхности - FemGui::TaskObjectName @@ -2807,11 +2809,6 @@ Specify another file please. Form - - - Form - Форма - Fluid Section Parameter @@ -3061,8 +3058,8 @@ Specify another file please. - Constraint Properties - Свойства Ограничения + Analysis feature properties + Analysis feature properties @@ -3127,6 +3124,21 @@ with a harmonic/oscillating driving force Мнимая часть используется только для уравнений с гармонической/колеблющейся движущей силой + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3219,31 +3231,16 @@ Note: has no effect if a solid was selected Мнимая часть Z-компоненты комплексного потенциала Примечание: не влияет если выбрано твердое тело - - - Whether the constraint defines a constant potential - Определяет ли ограничение постоянный потенциал - Potential Constant Потенциальная константа - - - Whether the constraint defines a farfield potential - Определяет ли ограничение потенциал дальнего поля - Farfield / Electric infinity Фарфилд / Бесконечность электроэнергии - - - Whether the constraint is for the electric force - Является ли ограничение для электрической силы - Calculate Electric Force @@ -3592,11 +3589,6 @@ Note: for 2D only setting for x is possible, Cancel Отмена - - - Edit constraint - Изменить граничное условие - @@ -3626,11 +3618,6 @@ Note: for 2D only setting for x is possible, Meshing Построение сетки - - - Constraint force - Граничное условие силы - @@ -3648,46 +3635,11 @@ Note: for 2D only setting for x is possible, Import-Export Импорт/экспорт - - - Constraint Contact - Ограничение контакта - - - - Constraint displacement - Ограничение смещения - - - - Constraint fixed - Ограничение закрепления - - - - Constraint fluid boundary - Ограничить границу жидкости - - - - Constraint heat flux - Ограничение теплового потока - Constraint initial temperature Ограничение начальной температуры - - - Constraint planerotation - Ограничение вращения плоскости - - - - Constraint pressure - Ограничение давления - Constraint pulley @@ -3698,16 +3650,6 @@ Note: for 2D only setting for x is possible, Constraint spring Ограничительная пружина - - - Constraint temperature - Ограничение температуры - - - - Constraint transform - Ограничение преобразования - Edit post processing object @@ -3753,6 +3695,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Вы уверены, что хотите продолжить? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Граничное условие жидкости + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4101,8 +4098,8 @@ For possible variables, see the description box below. - Constraints - Ограничения + Analysis features + Analysis features @@ -4589,15 +4586,15 @@ normal vector of the face is used as direction Reverse direction - Развернуть направление + В обратном направлении TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - Задача Fem Ограничение Теплового потока + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5062,7 +5059,7 @@ used for the Elmer solver Wireframe - Каркас + Каркасная сетка @@ -5240,128 +5237,126 @@ used for the Elmer solver - Electrostatic Constraints - Электростатические Ограничения + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Электростатические Ограничения - - - - Fluid Constraints - Гидравлические Ограничения - - - - &Fluid Constraints - &Гидравлические Ограничения + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Электромагнитные граничные условия + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Электромагнитные граничные условия + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Геометрические Ограничения + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Геометрические Ограничения + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Механические ограничения + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Механические ограничения + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Термальные ограничения + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Термальные ограничения + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Ограничения без решения - - - - &Constraints without solver - &Ограничения без решения - - - Overwrite Constants Перезаписать константы - + &Overwrite Constants &Перезаписать константы - + Mesh Сеть - + M&esh &Сетка - + Solve Решить - + &Solve &Расчитать - + Results Результаты - + &Results &Результаты - + Filter functions Функции фильтра - + &Filter functions &Функции фильтра - + Utilities Вспомогательные @@ -5417,10 +5412,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Удалить все плоскости сечения + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5435,123 +5434,6 @@ used for the Elmer solver Создает постоянную диэлектрическую проницаемость вакуума МКЭ для перезаписи стандартного значения - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Задать тело, являющееся источником тепла - - - - Creates a FEM constraint body heat source - Создает граничное условие для МКЭ определяющее тело, являющееся источником тепла - - - - FEM_ConstraintCentrif - - - Constraint centrif - Ограничение центрифугирования - - - - Creates a FEM constraint centrif - Создает центробежную зависимость МКЭ - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Создать электростатический потенциал - - - - Creates a FEM constraint electrostatic potential - Создает граничное условие МКЭ для электростатического потенциала - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Граничное условие скорости потока - - - - Creates a FEM constraint flow velocity - Создает граничное условие скорости потока для МКЭ - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Начальное условие скорости потока - - - - Creates a FEM constraint initial flow velocity - Создает граничное условие начальной скорости потока для МКЭ - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Ограничить начальное давление - - - - Creates a FEM constraint initial pressure - Создает FEM ограничивающее первоначальное давление - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Печать секции ограничения - - - - Creates a FEM constraint sectionprint - Создать FEM ограничение Печати секции - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Граничное условие собственного веса - - - - Creates a FEM constraint self weight - Создает граничное условие собственного веса объекта для МКЭ - - - - FEM_ConstraintTie - - - Constraint tie - Связывание ограничения - - - - Creates a FEM constraint tie - Создает связывание ограничения МКЭ - - FEM_ElementFluid1D @@ -5687,10 +5569,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Открыть примеры МКЭ + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5766,8 +5652,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Преобразует поверхность сетки МКЭ в полигональную сетку + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5792,18 +5678,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Очистить сетку объекта сетки МКЭ + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Отображение информации о сетке МКЭ + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5814,8 +5704,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Создать сетку МКЭ из фигуры с помощью генератора сетки Gmsh + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5840,8 +5730,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Создайте сетку МКЭ из твердотельной или поверхностной фигуры с помощью внутреннего генератора сетки Netgen + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6183,19 +6073,6 @@ Please select a result type first. Нет результирующего объекта - - FEM_ConstraintCurrentDensity - - - Constraint current density - Граничные условия плотности потока - - - - Creates a FEM constraint current density - Создание граничного условия плотности потока для МКЭ - - FEM_EquationMagnetodynamic2D @@ -6221,21 +6098,8 @@ Please select a result type first. - Electromagnetic constraints - Электромагнитные граничные условия - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Граничные условия намагниченности - - - - Creates a FEM constraint magnetization - Создать граничные условия намагниченности для МКЭ + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6337,11 +6201,6 @@ Please select a result type first. BoxWidget - - - Form - Форма - x @@ -6380,11 +6239,6 @@ Please select a result type first. CylinderWidget - - - Form - Форма - x @@ -6447,4 +6301,147 @@ Please select a result type first. Создает новую структуру решателя МКЭ CalculiX (меньше обработки ошибок результатов) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts index 1a1a656266..c1112e091a 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts @@ -10,13 +10,13 @@ - Constraint bearing - Omejitev ležaja + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Ustvari omejilo MKE ležaja + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Omejitev stika + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Ustvari MKE omejilo stikanja ploskev + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Ustvari MKE omejilo pomika, ki deluje na geometrijsko enoto + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Ustvari omejilo MKE za nepremično geometrično prvino + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Ustvari omejilo MKE za silo, ki deluje na geometrijsko enoto + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Omejitev zobnika + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Ustvari omejilo MKE za zobnik + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Omejitev toplotnega toka + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Ustvari omejilo MKE za toplotni tok, ki deluje na ploskev + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Omejitev začetne temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Ustvari omejilo MKE za začetno temperaturo, ki deluje na telo + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Omejitev ravninskega sukanja + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Ustvari omejilo MKE za ravninsko sukanje ploskve + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Ustvari omejilo MKE za tlak, ki deluje na ploskev + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Omejitev škripca + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Ustvari omejilo MKE za škripec + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Omejitev vzmeti + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Ustvari omejilo MKE za vzmet, ki deluje na ploskev + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Ustvari omejilo MKE za temperaturo / zgoščen toplotni tok, ki deluje na ploskev + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Ustvari MKE omejilo preoblikovanja ploskve + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Napravi omejitev MKE za ležaj - - - - Make FEM constraint contact on face - Napravi na ploskvi omejitev dotika - - - - Make FEM constraint displacement on face - Naredi na ploskvi omejitev pomika - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Ustvari pogoj zamejitve tekočine + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Ustvari mejni pogoj FEM za začetno temperaturo telesa + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Določilke omejila MKE + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Znotraj enega omejila je mogoče izbrati le eno vrsto (oglišče, ploskev ali rob)! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Znotraj enega omejila je mogoče izbrati le eno vrsto (oglišče, ploskev ali rob)! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Znotraj enega omejila je mogoče izbrati le eno vrsto (oglišče, ploskev ali rob)! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Znotraj enega omejila je mogoče izbrati le eno vrsto (oglišče, ploskev ali rob)! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Izbrani predmet ni del! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Izberete lahko samo ploskve valja - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Izbrati je mogoče le ploskve, ki se lahko preoblikujejo! Uporabi na površju najprej omejitev pomika, nato pa uporabi omejitev površja - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Oblika - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Namišljeni del se uporablja le v enačbah s harminičnim oz. nihajočim gonilom + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Navidezni del z-komponente potenciala Opomba: nima učinka, če je izbrano telo - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Ali omejilo določa daljnopoljni potencial - Farfield / Electric infinity Daljno polje / Električna neskončnost - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Opomba: pri 2D je mogoče nastavili le x, Cancel Prekliči - - - Edit constraint - Uredi omejitev - @@ -3638,11 +3628,6 @@ Opomba: pri 2D je mogoče nastavili le x, Meshing Ploskovjenje - - - Constraint force - Omejitev sile - @@ -3660,46 +3645,11 @@ Opomba: pri 2D je mogoče nastavili le x, Import-Export Uvoz - Izvoz - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Omejitev pomika - - - - Constraint fixed - Omejitev pritrjenosti - - - - Constraint fluid boundary - Omeji zamejitve tekočine - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Omejitev začetne temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Omejitev tlaka - Constraint pulley @@ -3710,16 +3660,6 @@ Opomba: pri 2D je mogoče nastavili le x, Constraint spring Omejitev vzmeti - - - Constraint temperature - Omejitev temperature - - - - Constraint transform - Omejitev preoblikovanja - Edit post processing object @@ -3765,6 +3705,61 @@ Opomba: pri 2D je mogoče nastavili le x, Are you sure you want to continue? Ali ste prepričani da želite nadaljevati? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Pogoj zamejitve tekočine + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ Možne spremenljivke si oglejte v spodnjem opisnem okencu. - Constraints - Constraints + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Elektromagnetna omejila + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Elektromagnetna omejila + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Reši - + &Solve &Solve - + Results Izid - + &Results &Results - + Filter functions Zmožnosti presejanja - + &Filter functions &Zmožnosti presejanja - + Utilities Pripomočki @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Omejilo trenutne gostote - - - - Creates a FEM constraint current density - Ustvari MKE omejitev trenutne gostote - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Elektromagnetna omejila - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Omejitev namagnetenja - - - - Creates a FEM constraint magnetization - Ustvari MKE omejilo namagnetenja + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Oblika - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Oblika - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts index 85d34fe874..895d006789 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts @@ -10,13 +10,13 @@ - Constraint bearing - Ograničenje ležaja + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Napravi MKE ograničenje za ležaj + Creates a bearing constraint + Creates a bearing constraint @@ -24,17 +24,17 @@ Fem - Fem + MKE - Constraint contact - Ograničenje kontakta + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Napravi MKE ograničenje kontakta između sve stranice + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -42,7 +42,7 @@ Fem - Fem + MKE @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Napravi MKE ograničenje za pomeranje koje deluje na geometrijski entitet + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -60,7 +60,7 @@ Fem - Fem + MKE @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Napravi MKE ograničenje za učvršćen geometrijcki entitet + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -78,7 +78,7 @@ Fem - Fem + MKE @@ -96,7 +96,7 @@ Fem - Fem + MKE @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Napravi MKE ograničenje za silu koja deluje na geometrijcki entitet + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -114,17 +114,17 @@ Fem - Fem + MKE - Constraint gear - Ograničenje zupčanika + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Napravi MKE ograničenje za zupčanik + Creates a gear constraint + Creates a gear constraint @@ -132,17 +132,17 @@ Fem - Fem + MKE - Constraint heatflux - Ograničenje toplotnog fluksa + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Napravi MKE ograničenje toplotnog fluksa koji deluje na stranicu + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -150,17 +150,17 @@ Fem - Fem + MKE - Constraint initial temperature - Ograničenje početne temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Napravi MKE ograničenje početne temperature koja deluje na telo + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -168,17 +168,17 @@ Fem - Fem + MKE - Constraint plane rotation - Ograničenje rotacije ravni + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Napravi MKE ograničenje rotacije stranice u ravni + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -186,7 +186,7 @@ Fem - Fem + MKE @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Napravi MKE ograničenje pritiska koji deluje na stranicu + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -204,17 +204,17 @@ Fem - Fem + MKE - Constraint pulley - Ograničenje remenice + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Napravi MKE ograničenje za remenicu + Creates a pulley constraint + Creates a pulley constraint @@ -222,17 +222,17 @@ Fem - Fem + MKE - Constraint spring - Ograničenje opruge + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Napravi MKE ograničenje opruge koja deluje na stranicu + Creates a spring acting on a face + Creates a spring acting on a face @@ -240,7 +240,7 @@ Fem - Fem + MKE @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Napravi MKE ograničenje temperature/koncentrisanog toplotnog fluksa koja deluje na stranicu + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -258,7 +258,7 @@ Fem - Fem + MKE @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Napravi MKE ograničenje transformacije stranice + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -276,7 +276,7 @@ Fem - Fem + MKE @@ -304,7 +304,7 @@ Fem - Fem + MKE @@ -323,7 +323,7 @@ Fem - Fem + MKE @@ -341,7 +341,7 @@ Fem - Fem + MKE @@ -369,7 +369,7 @@ Fem - Fem + MKE @@ -387,7 +387,7 @@ Fem - Fem + MKE @@ -405,7 +405,7 @@ Fem - Fem + MKE @@ -423,7 +423,7 @@ Fem - Fem + MKE @@ -497,7 +497,7 @@ Fem - Fem + MKE @@ -527,7 +527,7 @@ Fem - Fem + MKE @@ -555,7 +555,7 @@ Fem - Fem + MKE @@ -573,7 +573,7 @@ Fem - Fem + MKE @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Napravi MKE ograničenje za ležaj - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Napravi MKE ograničenje pomeranja na stranici - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Napravi MKE ograničenje za zupčanik + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Napravi MKE ograničenje za remenicu + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1216,13 +1216,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1323,15 +1323,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1893,8 +1893,8 @@ Navedi drugu datoteku. FemGui::TaskFemConstraint - FEM constraint parameters - MKE parametri ograničenja + Analysis feature parameters + Analysis feature parameters @@ -2049,8 +2049,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2078,8 +2078,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2207,8 +2207,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2236,8 +2236,8 @@ Navedi drugu datoteku. - Only one type of selection (vertex,face or edge) per constraint allowed! - Dozvoljen je samo jedan tip selekcije (teme, stranica ili ivica) po ograničenju! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2324,8 +2324,8 @@ Navedi drugu datoteku. - Only one face can be selected for a plane rotation constraint! - Samo jedna stranica može biti izabrana za ograničenje rotacije ravni! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2448,8 +2448,8 @@ Navedi drugu datoteku. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2479,8 +2479,18 @@ Navedi drugu datoteku. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2488,11 +2498,6 @@ Navedi drugu datoteku. Selected object is not a part! Izabrani objekat nije deo! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2503,11 +2508,6 @@ Navedi drugu datoteku. Only cylindrical faces can be picked Mogu izabrati samo cilindrične stranice - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2817,11 +2817,6 @@ Navedi drugu datoteku. Form - - - Form - Obrazac - Fluid Section Parameter @@ -3071,8 +3066,8 @@ Navedi drugu datoteku. - Constraint Properties - Osobine ograničenja + Analysis feature properties + Analysis feature properties @@ -3137,6 +3132,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3229,31 +3239,16 @@ Note: has no effect if a solid was selected Imaginarni deo z-komponente potencijala Napomena: nema efekta ako je izabrano puno telo - - - Whether the constraint defines a constant potential - Da li ograničenje definiše konstantni potencijal - Potential Constant Konstantni potencijal - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Da li je ograničenje za električnu silu - Calculate Electric Force @@ -3602,11 +3597,6 @@ Note: for 2D only setting for x is possible, Cancel Otkaži - - - Edit constraint - Uredi ograničenje - @@ -3636,11 +3626,6 @@ Note: for 2D only setting for x is possible, Meshing Pravljenje mreže - - - Constraint force - Ograničenje sile - @@ -3658,46 +3643,11 @@ Note: for 2D only setting for x is possible, Import-Export Uvoz/Izvoz - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Ograničenje pomeranja - - - - Constraint fixed - Ograničenje učvršćenosti - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Ograničenje početne temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Ograničenje pritiska - Constraint pulley @@ -3708,16 +3658,6 @@ Note: for 2D only setting for x is possible, Constraint spring Ograničenje opruge - - - Constraint temperature - Ograničenje temperature - - - - Constraint transform - Ograničenje transformacije - Edit post processing object @@ -3763,6 +3703,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Da li si siguran da želiš da nastaviš? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Granični uslovi fluida + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4111,8 +4106,8 @@ Za moguće promenljive, pogledaj okvir za opis ispod. - Constraints - Constraints + Analysis features + Analysis features @@ -4193,7 +4188,7 @@ Za moguće promenljive, pogledaj okvir za opis ispod. Center distance - Center distance + Rastojanje od centra @@ -4213,7 +4208,7 @@ Za moguće promenljive, pogledaj okvir za opis ispod. Distance - Distance + Rastojanje @@ -4236,7 +4231,7 @@ Za moguće promenljive, pogledaj okvir za opis ispod. Center distance - Center distance + Rastojanje od centra @@ -4281,7 +4276,7 @@ Za moguće promenljive, pogledaj okvir za opis ispod. Distance - Distance + Rastojanje @@ -4606,8 +4601,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5250,128 +5245,126 @@ used for the Elmer solver - Electrostatic Constraints - Elektrostatička ograničenja + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Elektrostatička ograničenja - - - - Fluid Constraints - Ograničenja fluida - - - - &Fluid Constraints - &Ograničenja fluida + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Elektromagnetna ograničenja + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Elektromagnetna ograničenja + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrijska ograničenja + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrijska ograničenja + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mehanička ograničenja + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mehanička ograničenja + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Toplotna ograničenja + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Toplotna ograničenja + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Reši - + &Solve &Solve - + Results Rezultati - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Korisni alati @@ -5427,10 +5420,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5445,123 +5442,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Ograničenje elektrostatičkog potencijala - - - - Creates a FEM constraint electrostatic potential - Napravi MKE ograničenje elektrostatičkog potencijala - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5698,10 +5578,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5777,8 +5661,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5803,18 +5687,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Olakšaj mrežu MKE mrežnog objekta + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Prikaži informacije o MKE mreži + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5825,8 +5713,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Napravi MKE mrežu nekog oblika pomoću Gmsh generatora mreže + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5851,8 +5739,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Napravi MKE mrežu nekog punog tela ili stranice pomoću unutrašnjeg Netgen generatora mreže + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6194,19 +6082,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Ograničenje gustine struje - - - - Creates a FEM constraint current density - Napravi MKE ograničenje gustine struje - - FEM_EquationMagnetodynamic2D @@ -6232,21 +6107,8 @@ Please select a result type first. - Electromagnetic constraints - Elektromagnetna ograničenja - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Ograničenje magnetizacije - - - - Creates a FEM constraint magnetization - Napravi MKE ograničenje magnetizacije + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6348,11 +6210,6 @@ Please select a result type first. BoxWidget - - - Form - Obrazac - x @@ -6391,11 +6248,6 @@ Please select a result type first. CylinderWidget - - - Form - Obrazac - x @@ -6458,4 +6310,147 @@ Please select a result type first. Napravi MKЕ algoritam za rešavanje CalculiX nove generacije (poboljšana obrada grešaka) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts index f062429259..018781a8af 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts @@ -10,13 +10,13 @@ - Constraint bearing - Ограничење лежаја + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Направи МКЕ ограничење за лежај + Creates a bearing constraint + Creates a bearing constraint @@ -24,17 +24,17 @@ Fem - Fem + МКЕ - Constraint contact - Ограничење контакта + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Направи МКЕ ограничење контакта између све странице + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -42,7 +42,7 @@ Fem - Fem + МКЕ @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Направи МКЕ ограничење за померање које делује на геометријски ентитет + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -60,7 +60,7 @@ Fem - Fem + МКЕ @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - НаправиМКЕ ограничење за учвршћен геометријcки ентитет + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -78,7 +78,7 @@ Fem - Fem + МКЕ @@ -96,7 +96,7 @@ Fem - Fem + МКЕ @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Направи МКЕ ограничење за силу која делује на геометријcки ентитет + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -114,17 +114,17 @@ Fem - Fem + МКЕ - Constraint gear - Ограничење зупчаника + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Направи МКЕ ограничење за зупчаник + Creates a gear constraint + Creates a gear constraint @@ -132,17 +132,17 @@ Fem - Fem + МКЕ - Constraint heatflux - Ограничење топлотног флукса + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Направи МКЕ ограничење топлотног флукса који делује на страницу + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -150,17 +150,17 @@ Fem - Fem + МКЕ - Constraint initial temperature - Ограничење почетне температуре + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Направи МКЕ ограничење почетне температуре која делује на тело + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -168,17 +168,17 @@ Fem - Fem + МКЕ - Constraint plane rotation - Ограничење ротације равни + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Направи МКЕ ограничење ротације странице у равни + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -186,7 +186,7 @@ Fem - Fem + МКЕ @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Направи МКЕ ограничење притиска који делује на страницу + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -204,17 +204,17 @@ Fem - Fem + МКЕ - Constraint pulley - Ограничење ременице + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Направи МКЕ ограничење за ременицу + Creates a pulley constraint + Creates a pulley constraint @@ -222,17 +222,17 @@ Fem - Fem + МКЕ - Constraint spring - Ограничење опруге + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Направи МКЕ ограничење опруге која делује на страницу + Creates a spring acting on a face + Creates a spring acting on a face @@ -240,7 +240,7 @@ Fem - Fem + МКЕ @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Направи МКЕ ограничење температуре/концентрисаног топлотног флукса која делује на страницу + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -258,7 +258,7 @@ Fem - Fem + МКЕ @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Направи МКЕ ограничење трансформације странице + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -276,7 +276,7 @@ Fem - Fem + МКЕ @@ -304,7 +304,7 @@ Fem - Fem + МКЕ @@ -323,7 +323,7 @@ Fem - Fem + МКЕ @@ -341,7 +341,7 @@ Fem - Fem + МКЕ @@ -369,7 +369,7 @@ Fem - Fem + МКЕ @@ -387,7 +387,7 @@ Fem - Fem + МКЕ @@ -405,7 +405,7 @@ Fem - Fem + МКЕ @@ -423,7 +423,7 @@ Fem - Fem + МКЕ @@ -497,7 +497,7 @@ Fem - Fem + МКЕ @@ -527,7 +527,7 @@ Fem - Fem + МКЕ @@ -555,7 +555,7 @@ Fem - Fem + МКЕ @@ -573,7 +573,7 @@ Fem - Fem + МКЕ @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Направи МКЕ ограничење за лежај - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Направи МКЕ ограничење померања на страници - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Направи МКЕ ограничење за зупчаник + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Направи МКЕ ограничење за ременицу + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1206,7 +1206,7 @@ not belonging to faces and faces not belonging to volumes. FEM - FEM + МКЕ @@ -1216,13 +1216,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1323,15 +1323,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1893,8 +1893,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - МКЕ параметри ограничења + Analysis feature parameters + Analysis feature parameters @@ -2049,8 +2049,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2078,8 +2078,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2207,8 +2207,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2236,8 +2236,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Дозвољен је само један тип селекције (теме, страница или ивица) по ограничењу! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2324,8 +2324,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Само једна страница може бити изабрана за ограничење ротације равни! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2448,8 +2448,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2479,8 +2479,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2488,11 +2498,6 @@ Specify another file please. Selected object is not a part! Изабрани објекат није део! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2503,11 +2508,6 @@ Specify another file please. Only cylindrical faces can be picked Могу изабрати само цилиндричне странице - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2817,11 +2817,6 @@ Specify another file please. Form - - - Form - Образац - Fluid Section Parameter @@ -3071,8 +3066,8 @@ Specify another file please. - Constraint Properties - Особине ограничења + Analysis feature properties + Analysis feature properties @@ -3137,6 +3132,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3229,31 +3239,16 @@ Note: has no effect if a solid was selected Имагинарни део z-компоненте потенцијала Напомена: нема ефекта ако је изабрано пуно тело - - - Whether the constraint defines a constant potential - Да ли ограничење дефинише константни потенцијал - Potential Constant Константни потенцијал - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Да ли је ограничење за електричну силу - Calculate Electric Force @@ -3602,11 +3597,6 @@ Note: for 2D only setting for x is possible, Cancel Откажи - - - Edit constraint - Уреди ограничење - @@ -3636,11 +3626,6 @@ Note: for 2D only setting for x is possible, Meshing Прављење мреже - - - Constraint force - Ограничење cиле - @@ -3650,7 +3635,7 @@ Note: for 2D only setting for x is possible, FEM - FEM + МКЕ @@ -3658,46 +3643,11 @@ Note: for 2D only setting for x is possible, Import-Export Увоз/извоз - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Ограничење померања - - - - Constraint fixed - Ограничење учвршћености - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Ограничење почетне температуре - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Ограничење притиска - Constraint pulley @@ -3708,16 +3658,6 @@ Note: for 2D only setting for x is possible, Constraint spring Ограничење опруге - - - Constraint temperature - Ограничење температуре - - - - Constraint transform - Ограничење трансформације - Edit post processing object @@ -3763,6 +3703,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Да ли си сигуран да желиш да наставиш? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Гранични услови флуида + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4111,8 +4106,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4193,7 +4188,7 @@ For possible variables, see the description box below. Center distance - Center distance + Растојање од центра @@ -4213,7 +4208,7 @@ For possible variables, see the description box below. Distance - Distance + Растојање @@ -4236,7 +4231,7 @@ For possible variables, see the description box below. Center distance - Center distance + Растојање од центра @@ -4281,7 +4276,7 @@ For possible variables, see the description box below. Distance - Distance + Растојање @@ -4606,8 +4601,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5211,7 +5206,7 @@ used for the Elmer solver FEM - FEM + МКЕ @@ -5250,128 +5245,126 @@ used for the Elmer solver - Electrostatic Constraints - Електростатичка ограничења + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Електростатичка ограничења - - - - Fluid Constraints - Ограничења флуида - - - - &Fluid Constraints - &Ограничења флуида + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Електромагнетна ограничења + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Електромагнетна ограничења + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Геометријска ограничења + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Геометријска ограничења + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Механичка ограничења + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Механичка ограничења + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Топлотна ограничења + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Топлотна ограничења + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Реши - + &Solve &Solve - + Results Резултати - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Корисни алати @@ -5427,10 +5420,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5445,123 +5442,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Ограничење електростатичког потенцијала - - - - Creates a FEM constraint electrostatic potential - Направи МКЕ ограничење електростатичког потенцијала - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5698,10 +5578,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5777,8 +5661,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5803,18 +5687,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Олакшај мрежу МКЕ мрежног објекта + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Прикажи информације о МКЕ мрежи + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5825,8 +5713,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Направи МКЕ мрежу неког облика помоћу Gmsh генератора мреже + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5851,8 +5739,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Направи МКЕ мрежу неког пуног тела или странице помоћу унутрашњег Netgen генератора мреже + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6194,19 +6082,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Ограничење густине струје - - - - Creates a FEM constraint current density - Направи МКЕ ограничење густине струје - - FEM_EquationMagnetodynamic2D @@ -6227,26 +6102,13 @@ Please select a result type first. Fem - Fem + МКЕ - Electromagnetic constraints - Електромагнетна ограничења - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Ограничење магнетизације - - - - Creates a FEM constraint magnetization - Направи МКЕ ограничење магнетизације + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6292,7 +6154,7 @@ Please select a result type first. Fem - Fem + МКЕ @@ -6310,7 +6172,7 @@ Please select a result type first. Fem - Fem + МКЕ @@ -6348,11 +6210,6 @@ Please select a result type first. BoxWidget - - - Form - Образац - x @@ -6391,11 +6248,6 @@ Please select a result type first. CylinderWidget - - - Form - Образац - x @@ -6458,4 +6310,147 @@ Please select a result type first. Направи МКЕ алгоритам за решавање CalculiX нове генерације (побољшана обрада грешака) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts index b6bea56d3b..d4f3a59576 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constraint bearing + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - FEM constraint parameters + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! Markerad objekt är inte en komponent! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Endast cylindriska ytor kan väljas - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Form - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Avbryt - - - Edit constraint - Redigera begränsning - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Meshing - - - Constraint force - Constraint force - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Importera/Exportera - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Är du säker på att du vill fortsätta? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Begränsningar + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Nät - + M&esh M&esh - + Solve Lös - + &Solve &Solve - + Results Resultat - + &Results &Resultat - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Verktyg @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Form - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Form - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts index 64adc38352..dd8562ca03 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts @@ -10,13 +10,13 @@ - Constraint bearing - Kısıtlama-rulman + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Rulman için bir FEM kısıtlaması oluşturur + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Kısıtlama-temas + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Yüzeyler arası temas için bir FEM kısıtlaması oluşturur + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Geometrik bir unsur üzerinde hareket eden bir yer değiştirme için bir FEM kısıtlaması oluşturur + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Sabitlenmiş bir geometrik unsur için bir FEM kısıtlaması oluşturur + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Geometrik bir unsur üzerine etkiyen bir kuvvet için bir FEM kısıtlaması oluşturur + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Kısıtlama-dişli + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Dişli için bir FEM kısıtlaması oluşturur + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Kısıtlama-ısı akısı + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Bir yüzeyde hareket eden ısı akışı için bir FEM kısıtlaması oluşturur + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Başlangıç sıcaklığı kısıtı + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Bir gövde üzerinde hareket eden başlangıç sıcaklığı için bir FEM kısıtlaması oluşturur + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Düzlem dönüşünü kısıtla + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Düzlem dönüş yüzeyi için bir FEM kısıtlaması oluşturur + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Bir yüzeyde hareket eden basınç için bir FEM kısıtlaması oluşturur + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Kasnağı kısıtla + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Kasnak için bir FEM kısıtlaması oluşturur + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Kısıtlama-yay + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Bir yüzeyde hareket eden yay için bir FEM kısıtlaması oluşturur + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Bir yüzeyde hareket eden sıcaklık/yoğunlaşmış ısı akısı için bir FEM kısıtlaması oluşturur + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Bir yüzü dönüştürmek için FEM kısıtlaması oluşturur + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Rulman için bir FEM kısıtlaması yap - - - - Make FEM constraint contact on face - Bir geometrik yüzün üzerinde FEM kısıtlaması yapın - - - - Make FEM constraint displacement on face - Bir geometrik yüzün üzerinde FEM kısıtlama yer değiştirmesi yapın - - - - Make FEM constraint fixed geometry - Sabit geometri FEM kısıtlaması yap - Create fluid boundary condition Akışkan sınır koşulu oluştur + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Geometri üzerinde FEM kısıtlama kuvveti yapın + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Dişli için bir FEM kısıtlaması yap + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Yüzeydeki ısı akısı FEM kısıtlaması yap + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Gövdedeki başlangıç sıcaklığı FEM kısıtlaması yap + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Düzlem Dönüş yüzeyi FEM kısıtlaması yap + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Bir geometrik yüzün üzerinde FEM kısıtlama basıncı yapın + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Bir geometrik yüzün üzerinde FEM kısıtlaması yayı yap + Make spring on face + Make spring on face - Make FEM constraint for pulley - Kasnak için FEM kısıtlaması yapın + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Bir geometrik yüzün üzerinde FEM kısıtlaması sıcaklığı yapın + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Bir geometrik yüzün üzerinde FEM kısıtlaması dönüşümü yapın + Make local coordinate system on face + Make local coordinate system on face @@ -1215,11 +1215,13 @@ FEM: Yalnızca FEM öğeleri dışa aktarılacaktır. Bu, yalnızca geometrik y Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. - Metal örgü grupları da dışa aktarılır. -Her kısıtlama ve farklı malzemeler varsa; malzeme, kısıtlamanın veya malzemenin uygulandığı iki metal örgü grubundan, geometrik yüzlerden ve düğüm noktalarından oluşur. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. + Mesh groups are exported too. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1320,15 +1322,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Sonuç ileti ekranı açıldığında kısıtlamaları gizle + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1886,8 +1888,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Sonlu Elemanlar Metodu sınırlandırması oluştur + Analysis feature parameters + Analysis feature parameters @@ -2042,8 +2044,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kısıtlama başına tek bir seçim türüne (köşe, yüz veya kenar) izin verilmektedir! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2071,8 +2073,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kısıtlama başına tek bir seçim türüne (köşe, yüz veya kenar) izin verilmektedir! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2200,8 +2202,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kısıtlama başına tek bir seçim türüne (köşe, yüz veya kenar) izin verilmektedir! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2229,8 +2231,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Kısıtlama başına tek bir seçim türüne (köşe, yüz veya kenar) izin verilmektedir! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2317,8 +2319,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Düzlem dönüş kısıtlaması için tek bir yüz seçilebilir! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2441,8 +2443,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Kısıtlama güncelleme hatası + Analysis feature update error + Analysis feature update error @@ -2472,8 +2474,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Dikdörtgensel dönüşüm kısıtlaması için tek bir yüz gereklidir! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2481,11 +2493,6 @@ Specify another file please. Selected object is not a part! Temel nesne bir parçası olmadığını! - - - Only one face for transform constraint! - Dönüşüm kısıtlaması için tek bir yüz gereklidir! - Only faces can be picked @@ -2496,11 +2503,6 @@ Specify another file please. Only cylindrical faces can be picked Sadece silindirik yüzler seçilebilir - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Sadece dönüştürülebilir yüzler seçilebilir! Öncelikle yer değiştirme kısıtlamasını yüzeye uygulayın, sonra kısıtlamayı yüzeye uygulayın - FemGui::TaskObjectName @@ -2810,11 +2812,6 @@ Specify another file please. Form - - - Form - Şekil: - Fluid Section Parameter @@ -3064,8 +3061,8 @@ Specify another file please. - Constraint Properties - Kısıtlama Özellikleri + Analysis feature properties + Analysis feature properties @@ -3130,6 +3127,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3222,31 +3234,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potansiyel Sabiti - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Uzak alan / Elektrik sonsuz - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3595,11 +3592,6 @@ Note: for 2D only setting for x is possible, Cancel İptal - - - Edit constraint - Kısıt düzenleme - @@ -3629,11 +3621,6 @@ Note: for 2D only setting for x is possible, Meshing Meshing - - - Constraint force - Kısıt kuvveti - @@ -3651,46 +3638,11 @@ Note: for 2D only setting for x is possible, Import-Export İçe-Dışa Aktar - - - Constraint Contact - Teması Kısıtla - - - - Constraint displacement - Kısıtlama-yer değiştirme - - - - Constraint fixed - Kısıtlama-sabit - - - - Constraint fluid boundary - Akışkan sınırını kısıtla - - - - Constraint heat flux - Isı akısını kısıtla - Constraint initial temperature Başlangıç sıcaklığı kısıtı - - - Constraint planerotation - Düzlem dönüşünü kısıtla - - - - Constraint pressure - Kısıtlama-basınç - Constraint pulley @@ -3701,16 +3653,6 @@ Note: for 2D only setting for x is possible, Constraint spring Kısıtlama-yay - - - Constraint temperature - Sıcaklığı kısıtla - - - - Constraint transform - Dönüşümü kısıtla - Edit post processing object @@ -3756,6 +3698,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Devam etmek istediğinizden emin misiniz? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Akışkan sınır koşulu + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4104,8 +4101,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4599,8 +4596,8 @@ yön olarak kullanılır TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - Fem Isı Akışı Kısıtlama Görevi + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5243,128 +5240,126 @@ used for the Elmer solver - Electrostatic Constraints - Elektrostatik Kısıtlamalar + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Elektrostatik Kısıtlamalar - - - - Fluid Constraints - Akışkan Kısıtlamaları - - - - &Fluid Constraints - &Akışkan Kısıtlamaları + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrik Kısıtlamalar + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrik Kısıtlamalar + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mekanik Kısıtlamalar + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mekanik Kısıtlamalar + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Isıl Kısıtlamalar + Analysis features without solver + Analysis features without solver - &Thermal Constraints - Isıl Kısı&tlamalar + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Çözücüsüz kısıtlamalar - - - - &Constraints without solver - Çözü&cüsüz kısıtlamalar - - - Overwrite Constants Sabit Değerlerin Üzerine Yaz - + &Overwrite Constants &Sabit Değerlerin Üzerine Yaz - + Mesh Mesh - + M&esh M&esh - + Solve Çözmek - + &Solve &Çöz - + Results Sonuçlar - + &Results Sonuçla&r - + Filter functions Süzgeç işlevleri - + &Filter functions &Süzgeç işlevleri - + Utilities Yard. Uygulamalar @@ -5420,10 +5415,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5438,123 +5437,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5691,10 +5573,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5770,8 +5656,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5796,18 +5682,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5818,8 +5708,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5844,8 +5734,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6187,19 +6077,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6225,21 +6102,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6341,11 +6205,6 @@ Please select a result type first. BoxWidget - - - Form - Şekil: - x @@ -6384,11 +6243,6 @@ Please select a result type first. CylinderWidget - - - Form - Şekil: - x @@ -6451,4 +6305,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts index 9f81a790f4..073b831918 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts @@ -10,13 +10,13 @@ - Constraint bearing - Обмеження в роботі + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Обмеження контакту + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1216,13 +1216,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1323,15 +1323,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1896,8 +1896,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Обмежувальні параметри МСЕ + Analysis feature parameters + Analysis feature parameters @@ -2052,8 +2052,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2081,8 +2081,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2210,8 +2210,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2239,8 +2239,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2327,8 +2327,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2451,8 +2451,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2482,8 +2482,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2491,11 +2501,6 @@ Specify another file please. Selected object is not a part! Selected object is not a part! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2506,11 +2511,6 @@ Specify another file please. Only cylindrical faces can be picked Можуть бути обраними лише циліндричні поверхні - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2820,11 +2820,6 @@ Specify another file please. Form - - - Form - Форма - Fluid Section Parameter @@ -3074,8 +3069,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3140,6 +3135,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3232,31 +3242,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Чи визначає обмеження постійний потенціал - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Чи визначає обмеження потенціал далекого поля - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Чи є обмеження для електричної сили - Calculate Electric Force @@ -3605,11 +3600,6 @@ Note: for 2D only setting for x is possible, Cancel Скасувати - - - Edit constraint - Редагувати обмеження - @@ -3639,11 +3629,6 @@ Note: for 2D only setting for x is possible, Meshing Побудова сітки - - - Constraint force - Constraint force - @@ -3661,46 +3646,11 @@ Note: for 2D only setting for x is possible, Import-Export Імпорт-експорт - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3711,16 +3661,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3766,6 +3706,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Ви впевнені, що бажаєте продовжити? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4114,8 +4109,8 @@ For possible variables, see the description box below. - Constraints - Обмеження + Analysis features + Analysis features @@ -4609,8 +4604,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5253,128 +5248,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Електромагнітні обмеження + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Електромагнітні обмеження + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Сітка(Меш) - + M&esh M&esh - + Solve Розв’язати - + &Solve &Solve - + Results Results - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Утиліти @@ -5430,10 +5423,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5448,123 +5445,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5701,10 +5581,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5780,8 +5664,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5806,18 +5690,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5828,8 +5716,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5854,8 +5742,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6197,19 +6085,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6235,21 +6110,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6351,11 +6213,6 @@ Please select a result type first. BoxWidget - - - Form - Форма - x @@ -6394,11 +6251,6 @@ Please select a result type first. CylinderWidget - - - Form - Форма - x @@ -6461,4 +6313,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts index fddecfd65a..e15682ee7c 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constraint bearing + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - Paràmetres de restricció FEM + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! L'objecte seleccionat no és una peça. - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked Únicament es poden seleccionar cares cilíndriques - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - Forma - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel Cancel·la - - - Edit constraint - Edita la restricció - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing Mallat - - - Constraint force - Restricció de força - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Importació-exportació - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? Are you sure you want to continue? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve Resol - + &Solve &Solve - + Results Results - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities Utilitats @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - Forma - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - Forma - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts index e00a193ee4..b04b1dcdc1 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts @@ -10,13 +10,13 @@ - Constraint bearing - 轴承约束 + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - 建立对轴承的有限元约束 + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - 接触约束 + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - 建立对接触面的有限元约束 + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - 在几何实体上创建有限元位移约束 + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - 为固定几何实体创建有限元约束 + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - 为作用在几何实体上的力创建有限元约束 + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - 齿轮约束 + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - 为齿轮创建有限元约束 + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - 热流量约束 + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - 建立一个作用于面上的热流量约束 + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - 约束初始温度 + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - 在实体上创建初始温度有限元约束 + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - 约束平面旋转 + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - 在面上建立有限元接触约束 - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - 为滑轮建立有限元约束 + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - 在面上建立有限元温度约束 + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - 打开结果对话框时隐藏约束 + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - 有限元法约束参数 + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! 所选之物件并非零件! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked 反可以选取圆柱面 - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - 窗体 - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - 约束属性 + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel 取消 - - - Edit constraint - 编辑约束 - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing 建立网格 - - - Constraint force - 力约束 - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export Import-Export - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - 位移约束 - - - - Constraint fixed - 固定约束 - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature 约束初始温度 - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? 您确定要继续吗? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + 流体边界条件 + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - 约束 + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - 流体约束 - - - - &Fluid Constraints - 流体约束(&F) + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - 几何约束 + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - 几何约束(&G) + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - 力学约束 + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - 力学约束(&M) + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh 网格 - + M&esh 网格(&M) - + Solve 求解 - + &Solve 求解(&S) - + Results Results - + &Results 结果(&R) - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities 实用程序 @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - 窗体 - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - 窗体 - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts index 17a4d3612f..4accc6cca3 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts @@ -10,13 +10,13 @@ - Constraint bearing - Constraint bearing + Bearing constraint + Bearing constraint - Creates a FEM constraint for a bearing - Creates a FEM constraint for a bearing + Creates a bearing constraint + Creates a bearing constraint @@ -28,13 +28,13 @@ - Constraint contact - Constraint contact + Contact constraint + Contact constraint - Creates a FEM constraint for contact between faces - Creates a FEM constraint for contact between faces + Creates a contact constraint between faces + Creates a contact constraint between faces @@ -51,8 +51,8 @@ - Creates a FEM constraint for a displacement acting on a geometric entity - Creates a FEM constraint for a displacement acting on a geometric entity + Creates a displacement boundary condition for a geometric entity + Creates a displacement boundary condition for a geometric entity @@ -69,8 +69,8 @@ - Creates a FEM constraint for a fixed geometric entity - Creates a FEM constraint for a fixed geometric entity + Creates a fixed boundary condition for a geometric entity + Creates a fixed boundary condition for a geometric entity @@ -105,8 +105,8 @@ - Creates a FEM constraint for a force acting on a geometric entity - Creates a FEM constraint for a force acting on a geometric entity + Creates a force load applied to a geometric entity + Creates a force load applied to a geometric entity @@ -118,13 +118,13 @@ - Constraint gear - Constraint gear + Gear constraint + Gear constraint - Creates a FEM constraint for a gear - Creates a FEM constraint for a gear + Creates a gear constraint + Creates a gear constraint @@ -136,13 +136,13 @@ - Constraint heatflux - Constraint heatflux + Heat flux load + Heat flux load - Creates a FEM constraint for a heatflux acting on a face - Creates a FEM constraint for a heatflux acting on a face + Creates a heat flux load acting on a face + Creates a heat flux load acting on a face @@ -154,13 +154,13 @@ - Constraint initial temperature - Constraint initial temperature + Initial temperature + Initial temperature - Creates a FEM constraint for initial temperature acting on a body - Creates a FEM constraint for initial temperature acting on a body + Creates an initial temperature acting on a body + Creates an initial temperature acting on a body @@ -172,13 +172,13 @@ - Constraint plane rotation - Constraint plane rotation + Plane multi-point constraint + Plane multi-point constraint - Creates a FEM constraint for plane rotation face - Creates a FEM constraint for plane rotation face + Creates a plane multi-point constraint for a face + Creates a plane multi-point constraint for a face @@ -195,8 +195,8 @@ - Creates a FEM constraint for a pressure acting on a face - Creates a FEM constraint for a pressure acting on a face + Creates a pressure load acting on a face + Creates a pressure load acting on a face @@ -208,13 +208,13 @@ - Constraint pulley - Constraint pulley + Pulley constraint + Pulley constraint - Creates a FEM constraint for a pulley - Creates a FEM constraint for a pulley + Creates a pulley constraint + Creates a pulley constraint @@ -226,13 +226,13 @@ - Constraint spring - Constraint spring + Spring + Spring - Creates a FEM constraint for a spring acting on a face - Creates a FEM constraint for a spring acting on a face + Creates a spring acting on a face + Creates a spring acting on a face @@ -249,8 +249,8 @@ - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face - Creates a FEM constraint for a temperature/concentrated heat flux acting on a face + Creates a temperature/concentrated heat flux load acting on a face + Creates a temperature/concentrated heat flux load acting on a face @@ -267,8 +267,8 @@ - Create FEM constraint for transforming a face - Create FEM constraint for transforming a face + Create a local coordinate system on a face + Create a local coordinate system on a face @@ -588,80 +588,80 @@ Command - - - Make FEM constraint for bearing - Make FEM constraint for bearing - - - - Make FEM constraint contact on face - Make FEM constraint contact on face - - - - Make FEM constraint displacement on face - Make FEM constraint displacement on face - - - - Make FEM constraint fixed geometry - Make FEM constraint fixed geometry - Create fluid boundary condition Create fluid boundary condition + + + Make bearing constraint + Make bearing constraint + + + + Make contact constraint on a face + Make contact constraint on a face + + + + Make displacement boundary condition on face + Make displacement boundary condition on face + + + + Make fixed boundary condition for geometry + Make fixed boundary condition for geometry + - Make FEM constraint force on geometry - Make FEM constraint force on geometry + Make force load on geometry + Make force load on geometry - Make FEM constraint for gear - Make FEM constraint for gear + Make gear constraint + Make gear constraint - Make FEM constraint heatflux on face - Make FEM constraint heatflux on face + Make heat flux load on face + Make heat flux load on face - Make FEM constraint initial temperature on body - Make FEM constraint initial temperature on body + Make initial temperature condition on body + Make initial temperature condition on body - Make FEM constraint Plane Rotation face - Make FEM constraint Plane Rotation face + Make plane multi-point constraint on face + Make plane multi-point constraint on face - Make FEM constraint pressure on face - Make FEM constraint pressure on face + Make pressure load on face + Make pressure load on face - Make FEM constraint spring on face - Make FEM constraint spring on face + Make spring on face + Make spring on face - Make FEM constraint for pulley - Make FEM constraint for pulley + Make pulley constraint + Make pulley constraint - Make FEM constraint temperature on face - Make FEM constraint temperature on face + Make temperature boundary condition on face + Make temperature boundary condition on face - Make FEM constraint transform on face - Make FEM constraint transform on face + Make local coordinate system on face + Make local coordinate system on face @@ -1217,13 +1217,13 @@ not belonging to faces and faces not belonging to volumes. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. Mesh groups are exported too. -Every constraint and, if there are different materials, material -consists of two mesh groups, faces and nodes where the -constraint or material is applied. +Every analysis feature and, if there are different materials, +material consists of two mesh groups, faces and nodes where +the constraint or material is applied. @@ -1324,15 +1324,15 @@ with the last used dialog settings - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - All constraints are hidden in the model view + All analysis features are hidden in the model view when the results dialog is opened - Hide constraints when open result dialog - Hide constraints when open result dialog + Hide analysis features when open result dialog + Hide analysis features when open result dialog @@ -1895,8 +1895,8 @@ Specify another file please. FemGui::TaskFemConstraint - FEM constraint parameters - FEM拘束參數 + Analysis feature parameters + Analysis feature parameters @@ -2051,8 +2051,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! + Only one type of selection (vertex,face or edge) per analysis feature allowed! @@ -2080,8 +2080,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2209,8 +2209,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2238,8 +2238,8 @@ Specify another file please. - Only one type of selection (vertex,face or edge) per constraint allowed! - Only one type of selection (vertex,face or edge) per constraint allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! + Only one type of selection (vertex, face or edge) per analysis feature allowed! @@ -2326,8 +2326,8 @@ Specify another file please. - Only one face can be selected for a plane rotation constraint! - Only one face can be selected for a plane rotation constraint! + Only one face can be selected for a plane multi-point constraint! + Only one face can be selected for a plane multi-point constraint! @@ -2450,8 +2450,8 @@ Specify another file please. FemGui::TaskFemConstraintTransform - Constraint update error - Constraint update error + Analysis feature update error + Analysis feature update error @@ -2481,8 +2481,18 @@ Specify another file please. - Only one face for rectangular transform constraint! - Only one face for rectangular transform constraint! + Only one face for rectangular local coordinate system! + Only one face for rectangular local coordinate system! + + + + Only one face for local coordinate system! + Only one face for local coordinate system! + + + + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface @@ -2490,11 +2500,6 @@ Specify another file please. Selected object is not a part! 所選之物件並非零件 ! - - - Only one face for transform constraint! - Only one face for transform constraint! - Only faces can be picked @@ -2505,11 +2510,6 @@ Specify another file please. Only cylindrical faces can be picked 僅可以選取圓柱面 - - - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - Only transformable faces can be selected! Apply displacement constraint to surface first then apply constraint to surface - FemGui::TaskObjectName @@ -2819,11 +2819,6 @@ Specify another file please. Form - - - Form - 格式 - Fluid Section Parameter @@ -3073,8 +3068,8 @@ Specify another file please. - Constraint Properties - Constraint Properties + Analysis feature properties + Analysis feature properties @@ -3139,6 +3134,21 @@ with a harmonic/oscillating driving force Imaginary part is only used for equations with a harmonic/oscillating driving force + + + Whether the boundary condition defines a constant potential + Whether the boundary condition defines a constant potential + + + + Whether the boundary condition defines a farfield potential + Whether the boundary condition defines a farfield potential + + + + Whether the boundary condition is for the electric force + Whether the boundary condition is for the electric force + @@ -3231,31 +3241,16 @@ Note: has no effect if a solid was selected Imaginary part of potential z-component Note: has no effect if a solid was selected - - - Whether the constraint defines a constant potential - Whether the constraint defines a constant potential - Potential Constant Potential Constant - - - Whether the constraint defines a farfield potential - Whether the constraint defines a farfield potential - Farfield / Electric infinity Farfield / Electric infinity - - - Whether the constraint is for the electric force - Whether the constraint is for the electric force - Calculate Electric Force @@ -3604,11 +3599,6 @@ Note: for 2D only setting for x is possible, Cancel 取消 - - - Edit constraint - 編輯拘束 - @@ -3638,11 +3628,6 @@ Note: for 2D only setting for x is possible, Meshing 建立網格 - - - Constraint force - 力量拘束 - @@ -3660,46 +3645,11 @@ Note: for 2D only setting for x is possible, Import-Export 匯入-匯出 - - - Constraint Contact - Constraint Contact - - - - Constraint displacement - Constraint displacement - - - - Constraint fixed - Constraint fixed - - - - Constraint fluid boundary - Constraint fluid boundary - - - - Constraint heat flux - Constraint heat flux - Constraint initial temperature Constraint initial temperature - - - Constraint planerotation - Constraint planerotation - - - - Constraint pressure - Constraint pressure - Constraint pulley @@ -3710,16 +3660,6 @@ Note: for 2D only setting for x is possible, Constraint spring Constraint spring - - - Constraint temperature - Constraint temperature - - - - Constraint transform - Constraint transform - Edit post processing object @@ -3765,6 +3705,61 @@ Note: for 2D only setting for x is possible, Are you sure you want to continue? 您確定要繼續嗎? + + + Contact constraint + Contact constraint + + + + Displacement boundary condition + Displacement boundary condition + + + + Fixed boundary condition + Fixed boundary condition + + + + Fluid boundary condition + Fluid boundary condition + + + + Force load + Force load + + + + Heat flux load + Heat flux load + + + + Plane multi-point constraint + Plane multi-point constraint + + + + Pressure load + Pressure load + + + + Temperature boundary condition + Temperature boundary condition + + + + Local coordinate system + Local coordinate system + + + + Edit analysis feature + Edit analysis feature + ShowDisplacement @@ -4113,8 +4108,8 @@ For possible variables, see the description box below. - Constraints - Constraints + Analysis features + Analysis features @@ -4608,8 +4603,8 @@ normal vector of the face is used as direction TaskFemConstraintHeatflux - TaskFemConstraintHeatflux - TaskFemConstraintHeatflux + Task Fem Heat flux Load + Task Fem Heat flux Load @@ -5252,128 +5247,126 @@ used for the Elmer solver - Electrostatic Constraints - Electrostatic Constraints + Electrostatic boundary conditions + Electrostatic boundary conditions - &Electrostatic Constraints - &Electrostatic Constraints - - - - Fluid Constraints - Fluid Constraints - - - - &Fluid Constraints - &Fluid Constraints + &Electrostatic boundary conditions + &Electrostatic boundary conditions - - Electromagnetic Constraints - Electromagnetic Constraints + Fluid boundary conditions + Fluid boundary conditions + &Fluid boundary conditions + &Fluid boundary conditions + + + + Electromagnetic boundary conditions + Electromagnetic boundary conditions + + + + &Electromagnetic boundary conditions + &Electromagnetic boundary conditions + + + + Geometrical analysis features + Geometrical analysis features + + - &Electromagnetic Constraints - &Electromagnetic Constraints + &Geometrical analysis features + &Geometrical analysis features - Geometrical Constraints - Geometrical Constraints + Mechanical boundary conditions and loads + Mechanical boundary conditions and loads - &Geometrical Constraints - &Geometrical Constraints + &Mechanical boundary conditions and loads + &Mechanical boundary conditions and loads - Mechanical Constraints - Mechanical Constraints + Thermal boundary conditions and loads + Thermal boundary conditions and loads - &Mechanical Constraints - &Mechanical Constraints + &Thermal boundary conditions and loads + &Thermal boundary conditions and loads - Thermal Constraints - Thermal Constraints + Analysis features without solver + Analysis features without solver - &Thermal Constraints - &Thermal Constraints + &Analysis features without solver + &Analysis features without solver - Constraints without solver - Constraints without solver - - - - &Constraints without solver - &Constraints without solver - - - Overwrite Constants Overwrite Constants - + &Overwrite Constants &Overwrite Constants - + Mesh Mesh - + M&esh M&esh - + Solve 求解 - + &Solve &Solve - + Results 結果 - + &Results &Results - + Filter functions Filter functions - + &Filter functions &Filter functions - + Utilities 功能 @@ -5429,10 +5422,14 @@ used for the Elmer solver FEM_ClippingPlaneRemoveAll - Remove all clipping planes Remove all clipping planes + + + Removes all clipping planes + Removes all clipping planes + FEM_ConstantVacuumPermittivity @@ -5447,123 +5444,6 @@ used for the Elmer solver Creates a FEM constant vacuum permittivity to overwrite standard value - - FEM_ConstraintBodyHeatSource - - - Constraint body heat source - Constraint body heat source - - - - Creates a FEM constraint body heat source - Creates a FEM constraint body heat source - - - - FEM_ConstraintCentrif - - - Constraint centrif - Constraint centrif - - - - Creates a FEM constraint centrif - Creates a FEM constraint centrif - - - - FEM_ConstraintElectrostaticPotential - - - Constraint electrostatic potential - Constraint electrostatic potential - - - - Creates a FEM constraint electrostatic potential - Creates a FEM constraint electrostatic potential - - - - FEM_ConstraintFlowVelocity - - - Constraint flow velocity - Constraint flow velocity - - - - Creates a FEM constraint flow velocity - Creates a FEM constraint flow velocity - - - - FEM_ConstraintInitialFlowVelocity - - - Constraint initial flow velocity - Constraint initial flow velocity - - - - Creates a FEM constraint initial flow velocity - Creates a FEM constraint initial flow velocity - - - - FEM_ConstraintInitialPressure - - - Constraint initial pressure - Constraint initial pressure - - - - Creates a FEM constraint initial pressure - Creates a FEM constraint initial pressure - - - - FEM_ConstraintSectionPrint - - - Constraint sectionprint - Constraint sectionprint - - - - Creates a FEM constraint sectionprint - Creates a FEM constraint sectionprint - - - - FEM_ConstraintSelfWeight - - - Constraint self weight - Constraint self weight - - - - Creates a FEM constraint self weight - Creates a FEM constraint self weight - - - - FEM_ConstraintTie - - - Constraint tie - Constraint tie - - - - Creates a FEM constraint tie - Creates a FEM constraint tie - - FEM_ElementFluid1D @@ -5700,10 +5580,14 @@ used for the Elmer solver FEM_Examples - Open FEM examples Open FEM examples + + + Opens the FEM examples + Opens the FEM examples + FEM_MaterialEditor @@ -5779,8 +5663,8 @@ used for the Elmer solver - Convert the surface of a FEM mesh to a mesh - Convert the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh + Converts the surface of a FEM mesh to a mesh @@ -5805,18 +5689,22 @@ used for the Elmer solver - Clear the Mesh of a FEM mesh object - Clear the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object + Clears the Mesh of a FEM mesh object FEM_MeshDisplayInfo - Display FEM mesh info Display FEM mesh info + + + Displays FEM mesh information + Displays FEM mesh information + FEM_MeshGmshFromShape @@ -5827,8 +5715,8 @@ used for the Elmer solver - Create a FEM mesh from a shape by Gmsh mesher - Create a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher + Creates a FEM mesh from a shape by Gmsh mesher @@ -5853,8 +5741,8 @@ used for the Elmer solver - Create a FEM mesh from a solid or face shape by Netgen internal mesher - Create a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Creates a FEM mesh from a solid or face shape by Netgen internal mesher @@ -6196,19 +6084,6 @@ Please select a result type first. No result object - - FEM_ConstraintCurrentDensity - - - Constraint current density - Constraint current density - - - - Creates a FEM constraint current density - Creates a FEM constraint current density - - FEM_EquationMagnetodynamic2D @@ -6234,21 +6109,8 @@ Please select a result type first. - Electromagnetic constraints - Electromagnetic constraints - - - - FEM_ConstraintMagnetization - - - Constraint magnetization - Constraint magnetization - - - - Creates a FEM constraint magnetization - Creates a FEM constraint magnetization + Electromagnetic boundary conditions + Electromagnetic boundary conditions @@ -6350,11 +6212,6 @@ Please select a result type first. BoxWidget - - - Form - 格式 - x @@ -6393,11 +6250,6 @@ Please select a result type first. CylinderWidget - - - Form - 格式 - x @@ -6460,4 +6312,147 @@ Please select a result type first. Creates a FEM solver CalculiX new framework (less result error handling) + + FEM_ConstraintBodyHeatSource + + + Body heat source + Body heat source + + + + Creates a body heat source + Creates a body heat source + + + + FEM_ConstraintCentrif + + + Centrifugal load + Centrifugal load + + + + Creates a centrifugal load + Creates a centrifugal load + + + + FEM_ConstraintCurrentDensity + + + Current density boundary condition + Current density boundary condition + + + + Creates a current density boundary condition + Creates a current density boundary condition + + + + FEM_ConstraintElectrostaticPotential + + + Electrostatic potential boundary condition + Electrostatic potential boundary condition + + + + Creates an electrostatic potential boundary condition + Creates an electrostatic potential boundary condition + + + + FEM_ConstraintFlowVelocity + + + Flow velocity boundary condition + Flow velocity boundary condition + + + + Creates a flow velocity boundary condition + Creates a flow velocity boundary condition + + + + FEM_ConstraintInitialFlowVelocity + + + Initial flow velocity condition + Initial flow velocity condition + + + + Creates initial flow velocity condition + Creates initial flow velocity condition + + + + FEM_ConstraintInitialPressure + + + Initial pressure condition + Initial pressure condition + + + + Creates an initial pressure condition + Creates an initial pressure condition + + + + FEM_ConstraintMagnetization + + + Magnetization boundary condition + Magnetization boundary condition + + + + Creates a magnetization boundary condition + Creates a magnetization boundary condition + + + + FEM_ConstraintSectionPrint + + + Section print feature + Section print feature + + + + Creates a section print feature + Creates a section print feature + + + + FEM_ConstraintSelfWeight + + + Gravity load + Gravity load + + + + Creates a gravity load + Creates a gravity load + + + + FEM_ConstraintTie + + + Tie constraint + Tie constraint + + + + Creates a tie constraint + Creates a tie constraint + + diff --git a/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui b/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui index 76f049dffa..e263d118a6 100644 --- a/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui +++ b/src/Mod/Fem/Gui/Resources/ui/BodyHeatSource.ui @@ -11,7 +11,7 @@ - Constraint Properties + Analysis feature properties diff --git a/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui b/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui index f5ea8fa32e..3047b66c32 100644 --- a/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui +++ b/src/Mod/Fem/Gui/Resources/ui/CurrentDensity.ui @@ -11,7 +11,7 @@ - Constraint Properties + Analysis feature properties diff --git a/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui b/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui index 8c93b67813..de694f8fa3 100644 --- a/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui +++ b/src/Mod/Fem/Gui/Resources/ui/ElectrostaticPotential.ui @@ -11,7 +11,7 @@ - Constraint Properties + Analysis feature properties @@ -528,7 +528,7 @@ Note: has no effect if a solid was selected - Whether the constraint defines a constant potential + Whether the boundary condition defines a constant potential Potential Constant @@ -541,7 +541,7 @@ Note: has no effect if a solid was selected true - Whether the constraint defines a farfield potential + Whether the boundary condition defines a farfield potential Farfield / Electric infinity @@ -551,7 +551,7 @@ Note: has no effect if a solid was selected - Whether the constraint is for the electric force + Whether the boundary condition is for the electric force Calculate Electric Force diff --git a/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui b/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui index 088c802cc8..8f02645e72 100644 --- a/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui +++ b/src/Mod/Fem/Gui/Resources/ui/FlowVelocity.ui @@ -11,7 +11,7 @@ - Constraint Properties + Analysis feature properties diff --git a/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui b/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui index de26fc3c75..2df9fc21bf 100644 --- a/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui +++ b/src/Mod/Fem/Gui/Resources/ui/InitialFlowVelocity.ui @@ -11,7 +11,7 @@ - Constraint Properties + Analysis feature properties diff --git a/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui b/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui index 8bf1c8fee2..741dc19567 100644 --- a/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui +++ b/src/Mod/Fem/Gui/Resources/ui/InitialPressure.ui @@ -11,7 +11,7 @@ - Constraint Properties + Analysis feature properties diff --git a/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui b/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui index d2296c4524..4569891b8d 100644 --- a/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui +++ b/src/Mod/Fem/Gui/Resources/ui/Magnetization.ui @@ -11,7 +11,7 @@ - Constraint Properties + Analysis feature properties diff --git a/src/Mod/Fem/Gui/TaskAnalysisInfo.ui b/src/Mod/Fem/Gui/TaskAnalysisInfo.ui index e47d00978b..a331f2d928 100644 --- a/src/Mod/Fem/Gui/TaskAnalysisInfo.ui +++ b/src/Mod/Fem/Gui/TaskAnalysisInfo.ui @@ -45,7 +45,7 @@ - Constraints + Analysis features diff --git a/src/Mod/Fem/Gui/TaskFemConstraint.cpp b/src/Mod/Fem/Gui/TaskFemConstraint.cpp index 4b07bac81d..398b455b8a 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraint.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraint.cpp @@ -53,7 +53,7 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraint */ TaskFemConstraint::TaskFemConstraint(ViewProviderFemConstraint *ConstraintView,QWidget *parent,const char* pixmapname) - : TaskBox(Gui::BitmapFactory().pixmap(pixmapname),tr("FEM constraint parameters"),true, parent) + : TaskBox(Gui::BitmapFactory().pixmap(pixmapname),tr("Analysis feature parameters"),true, parent) , proxy(nullptr) , deleteAction(nullptr) , ConstraintView(ConstraintView) diff --git a/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp b/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp index 19c9c38152..13c4dd6842 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp @@ -454,7 +454,7 @@ void TaskDlgFemConstraintContact::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint Contact"); + QString msg = QObject::tr("Contact constraint"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::runCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp index 0455bce2d9..eb636db99f 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp @@ -343,7 +343,7 @@ void TaskFemConstraintDisplacement::addToSelection() for (const auto & SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { QString msg = tr( - "Only one type of selection (vertex,face or edge) per constraint allowed!"); + "Only one type of selection (vertex,face or edge) per analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -609,7 +609,7 @@ void TaskDlgFemConstraintDisplacement::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint displacement"); + QString msg = QObject::tr("Displacement boundary condition"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp index 054f9ebc82..30d2466248 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp @@ -149,7 +149,7 @@ void TaskFemConstraintFixed::addToSelection() for (const auto & SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { QString msg = tr( - "Only one type of selection (vertex,face or edge) per constraint allowed!"); + "Only one type of selection (vertex, face or edge) per analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -275,7 +275,7 @@ void TaskDlgFemConstraintFixed::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint fixed"); + QString msg = QObject::tr("Fixed boundary condition"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp index e7865615d1..fe8b0c1703 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp @@ -826,7 +826,7 @@ void TaskFemConstraintFluidBoundary::addToSelection() for (const auto & SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { QString msg = tr( - "Only one type of selection (vertex,face or edge) per constraint allowed!"); + "Only one type of selection (vertex, face or edge) per analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -957,7 +957,7 @@ void TaskDlgFemConstraintFluidBoundary::open() { // a transaction is already open when creating this panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint fluid boundary"); + QString msg = QObject::tr("Fluid boundary condition"); Gui::Command::openCommand((const char*)msg.toUtf8()); } } diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp index 40783aaf23..d8c3097231 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp @@ -173,7 +173,7 @@ void TaskFemConstraintForce::addToSelection() for (const auto & SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { QString msg = tr( - "Only one type of selection (vertex,face or edge) per constraint allowed!"); + "Only one type of selection (vertex, face or edge) per analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -434,7 +434,7 @@ void TaskDlgFemConstraintForce::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint force"); + QString msg = QObject::tr("Force load"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp index de43337a76..9f05ca7f64 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp @@ -421,7 +421,7 @@ void TaskDlgFemConstraintHeatflux::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint heat flux"); + QString msg = QObject::tr("Heat flux load"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui index 79b8adbbec..36edf5bb0f 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui +++ b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.ui @@ -11,7 +11,7 @@ - TaskFemConstraintHeatflux + Task Fem Heat flux Load diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp index 0cf696b228..c8608e1c8c 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp @@ -113,7 +113,7 @@ void TaskFemConstraintPlaneRotation::addToSelection() if (rows == 1) { QMessageBox::warning(this, tr("Selection error"), - tr("Only one face can be selected for a plane rotation constraint!")); + tr("Only one face can be selected for a plane multi-point constraint!")); Gui::Selection().clearSelection(); return; } @@ -182,7 +182,7 @@ void TaskFemConstraintPlaneRotation::addToSelection() QMessageBox::warning( this, tr("Selection error"), - tr("Only one face can be selected for a plane rotation constraint!")); + tr("Only one face can be selected for a plane multi-point constraint!")); Gui::Selection().clearSelection(); return; } @@ -293,7 +293,7 @@ void TaskDlgFemConstraintPlaneRotation::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint planerotation"); + QString msg = QObject::tr("Plane multi-point constraint"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp index 94304b2bf6..c17312ae44 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp @@ -292,7 +292,7 @@ void TaskDlgFemConstraintPressure::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint pressure"); + QString msg = QObject::tr("Pressure load"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp index 95dc613db4..cd87620454 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp @@ -330,7 +330,7 @@ void TaskDlgFemConstraintTemperature::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint temperature"); + QString msg = QObject::tr("Temperature boundary condition"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp index 99bc1d5e48..6ff3e9bf65 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp @@ -159,7 +159,7 @@ TaskFemConstraintTransform::TaskFemConstraintTransform( if ((p == 0) && (!Objects.empty())) { QMessageBox::warning(this, - tr("Constraint update error"), + tr("Analysis feature update error"), tr("The transformable faces have changed. Please add only the " "transformable faces and remove non-transformable faces!")); return; @@ -270,14 +270,14 @@ void TaskFemConstraintTransform::addToSelection() if (rows == 1) { QMessageBox::warning( - this, tr("Selection error"), tr("Only one face for rectangular transform constraint!")); + this, tr("Selection error"), tr("Only one face for rectangular local coordinate system!")); Gui::Selection().clearSelection(); return; } if ((rows == 0) && (selection.size() >= 2)) { QMessageBox::warning( - this, tr("Selection error"), tr("Only one face for rectangular transform constraint!")); + this, tr("Selection error"), tr("Only one face for rectangular local coordinate system!")); Gui::Selection().clearSelection(); return; } @@ -298,7 +298,7 @@ void TaskFemConstraintTransform::addToSelection() App::DocumentObject* obj = it.getObject(); if (subNames.size() != 1) { QMessageBox::warning( - this, tr("Selection error"), tr("Only one face for transform constraint!")); + this, tr("Selection error"), tr("Only one face for local coordinate system!")); Gui::Selection().clearSelection(); return; } @@ -357,8 +357,8 @@ void TaskFemConstraintTransform::addToSelection() QMessageBox::warning( this, tr("Selection error"), - tr("Only transformable faces can be selected! Apply displacement " - "constraint to surface first then apply constraint to surface")); + tr("Only transformable faces can be selected! Apply displacement boundary " + "condition to surface first then apply local coordinate system to surface")); Gui::Selection().clearSelection(); return; } @@ -560,7 +560,7 @@ void TaskDlgFemConstraintTransform::open() { // a transaction is already open at creation time of the panel if (!Gui::Command::hasPendingCommand()) { - QString msg = QObject::tr("Constraint transform"); + QString msg = QObject::tr("Local coordinate system"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); Gui::Command::doCommand( diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp index 687be8ee22..18fd18e0f1 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp @@ -136,7 +136,7 @@ std::vector ViewProviderFemConstraint::claimChildren()cons void ViewProviderFemConstraint::setupContextMenu(QMenu *menu, QObject *receiver, const char *member) { QAction *act; - act = menu->addAction(QObject::tr("Edit constraint"), receiver, member); + act = menu->addAction(QObject::tr("Edit analysis feature"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); ViewProviderDocumentObject::setupContextMenu(menu, receiver, member);// clazy:exclude=skipped-base-method diff --git a/src/Mod/Fem/Gui/Workbench.cpp b/src/Mod/Fem/Gui/Workbench.cpp index 8c09d82d21..ea948bcbf5 100755 --- a/src/Mod/Fem/Gui/Workbench.cpp +++ b/src/Mod/Fem/Gui/Workbench.cpp @@ -46,22 +46,20 @@ using namespace FemGui; qApp->translate("Workbench", "&Materials"); qApp->translate("Workbench", "Element Geometry"); qApp->translate("Workbench", "&Element Geometry"); - qApp->translate("Workbench", "Electrostatic Constraints"); - qApp->translate("Workbench", "&Electrostatic Constraints"); - qApp->translate("Workbench", "Electromagnetic Constraints"); - qApp->translate("Workbench", "&Electromagnetic Constraints"); - qApp->translate("Workbench", "Fluid Constraints"); - qApp->translate("Workbench", "&Fluid Constraints"); - qApp->translate("Workbench", "Electromagnetic Constraints"); - qApp->translate("Workbench", "&Electromagnetic Constraints"); - qApp->translate("Workbench", "Geometrical Constraints"); - qApp->translate("Workbench", "&Geometrical Constraints"); - qApp->translate("Workbench", "Mechanical Constraints"); - qApp->translate("Workbench", "&Mechanical Constraints"); - qApp->translate("Workbench", "Thermal Constraints"); - qApp->translate("Workbench", "&Thermal Constraints"); - qApp->translate("Workbench", "Constraints without solver"); - qApp->translate("Workbench", "&Constraints without solver"); + qApp->translate("Workbench", "Electrostatic boundary conditions"); + qApp->translate("Workbench", "&Electrostatic boundary conditions"); + qApp->translate("Workbench", "Fluid boundary conditions"); + qApp->translate("Workbench", "&Fluid boundary conditions"); + qApp->translate("Workbench", "Electromagnetic boundary conditions"); + qApp->translate("Workbench", "&Electromagnetic boundary conditions"); + qApp->translate("Workbench", "Geometrical analysis features"); + qApp->translate("Workbench", "&Geometrical analysis features"); + qApp->translate("Workbench", "Mechanical boundary conditions and loads"); + qApp->translate("Workbench", "&Mechanical boundary conditions and loads"); + qApp->translate("Workbench", "Thermal boundary conditions and loads"); + qApp->translate("Workbench", "&Thermal boundary conditions and loads"); + qApp->translate("Workbench", "Analysis features without solver"); + qApp->translate("Workbench", "&Analysis features without solver"); qApp->translate("Workbench", "Overwrite Constants"); qApp->translate("Workbench", "&Overwrite Constants"); // @@ -117,12 +115,12 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "FEM_ElementFluid1D"; Gui::ToolBarItem* electromag = new Gui::ToolBarItem(root); - electromag->setCommand("Electromagnetic Constraints"); + electromag->setCommand("Electromagnetic boundary conditions"); *electromag << "FEM_CompEmConstraints"; Gui::ToolBarItem* fluid = new Gui::ToolBarItem(root); - fluid->setCommand("Fluid Constraints"); + fluid->setCommand("Fluid boundary conditions"); *fluid << "FEM_ConstraintInitialFlowVelocity" << "FEM_ConstraintInitialPressure" @@ -130,14 +128,14 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "FEM_ConstraintFlowVelocity"; Gui::ToolBarItem* geom = new Gui::ToolBarItem(root); - geom->setCommand("Geometrical Constraints"); + geom->setCommand("Geometrical analysis features"); *geom << "FEM_ConstraintPlaneRotation" << "FEM_ConstraintSectionPrint" << "FEM_ConstraintTransform"; Gui::ToolBarItem* mech = new Gui::ToolBarItem(root); - mech->setCommand("Mechanical Constraints"); + mech->setCommand("Mechanical boundary conditions and loads"); *mech << "FEM_ConstraintFixed" << "FEM_ConstraintDisplacement" @@ -151,7 +149,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "FEM_ConstraintSelfWeight"; Gui::ToolBarItem* thermal = new Gui::ToolBarItem(root); - thermal->setCommand("Thermal Constraints"); + thermal->setCommand("Thermal boundary conditions and loads"); *thermal << "FEM_ConstraintInitialTemperature" << "Separator" @@ -253,14 +251,14 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "FEM_ElementFluid1D"; Gui::MenuItem* elec = new Gui::MenuItem; - elec->setCommand("&Electromagnetic Constraints"); + elec->setCommand("&Electromagnetic boundary conditions"); *elec << "FEM_ConstraintElectrostaticPotential" << "FEM_ConstraintCurrentDensity" << "FEM_ConstraintMagnetization"; Gui::MenuItem* fluid = new Gui::MenuItem; - fluid->setCommand("&Fluid Constraints"); + fluid->setCommand("&Fluid boundary conditions"); *fluid << "FEM_ConstraintInitialFlowVelocity" << "FEM_ConstraintInitialPressure" @@ -268,14 +266,14 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "FEM_ConstraintFlowVelocity"; Gui::MenuItem* geom = new Gui::MenuItem; - geom->setCommand("&Geometrical Constraints"); + geom->setCommand("&Geometrical analysis features"); *geom << "FEM_ConstraintPlaneRotation" << "FEM_ConstraintSectionPrint" << "FEM_ConstraintTransform"; Gui::MenuItem* mech = new Gui::MenuItem; - mech->setCommand("&Mechanical Constraints"); + mech->setCommand("&Mechanical boundary conditions and loads"); *mech << "FEM_ConstraintFixed" << "FEM_ConstraintDisplacement" @@ -289,7 +287,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "FEM_ConstraintSelfWeight"; Gui::MenuItem* thermal = new Gui::MenuItem; - thermal->setCommand("&Thermal Constraints"); + thermal->setCommand("&Thermal boundary conditions and loads"); *thermal << "FEM_ConstraintInitialTemperature" << "Separator" @@ -297,14 +295,14 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "FEM_ConstraintTemperature" << "FEM_ConstraintBodyHeatSource"; - Gui::MenuItem* nosolver = new Gui::MenuItem; - nosolver->setCommand("&Constraints without solver"); - *nosolver - << "FEM_ConstraintFluidBoundary" - << "Separator" - << "FEM_ConstraintBearing" - << "FEM_ConstraintGear" - << "FEM_ConstraintPulley"; +// Gui::MenuItem* nosolver = new Gui::MenuItem; +// nosolver->setCommand("&Analysis features without solver"); +// *nosolver +// << "FEM_ConstraintFluidBoundary" +// << "Separator" +// << "FEM_ConstraintBearing" +// << "FEM_ConstraintGear" +// << "FEM_ConstraintPulley"; Gui::MenuItem* constants = new Gui::MenuItem; constants->setCommand("&Overwrite Constants"); @@ -325,8 +323,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const << mech << thermal << "Separator" - << nosolver - << "Separator" +// << nosolver +// << "Separator" << constants; Gui::MenuItem* mesh = new Gui::MenuItem; diff --git a/src/Mod/Fem/femcommands/commands.py b/src/Mod/Fem/femcommands/commands.py index 0c747ef1e4..08e5ece306 100644 --- a/src/Mod/Fem/femcommands/commands.py +++ b/src/Mod/Fem/femcommands/commands.py @@ -152,7 +152,7 @@ class _ClippingPlaneRemoveAll(CommandManager): ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ClippingPlaneRemoveAll", - "Remove all clipping planes" + "Removes all clipping planes" ) self.is_active = "with_document" @@ -193,11 +193,11 @@ class _ConstraintBodyHeatSource(CommandManager): self.pixmap = "FEM_ConstraintBodyHeatSource" self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintBodyHeatSource", - "Constraint body heat source" + "Body heat source" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintBodyHeatSource", - "Creates a FEM constraint body heat source" + "Creates a body heat source" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -210,11 +210,11 @@ class _ConstraintCentrif(CommandManager): super(_ConstraintCentrif, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintCentrif", - "Constraint centrif" + "Centrifugal load" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintCentrif", - "Creates a FEM constraint centrif" + "Creates a centrifugal load" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -228,11 +228,11 @@ class _ConstraintCurrentDensity(CommandManager): self.pixmap = "FEM_ConstraintCurrentDensity" self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintCurrentDensity", - "Constraint current density" + "Current density boundary condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintCurrentDensity", - "Creates a FEM constraint current density" + "Creates a current density boundary condition" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -245,11 +245,11 @@ class _ConstraintElectrostaticPotential(CommandManager): super(_ConstraintElectrostaticPotential, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintElectrostaticPotential", - "Constraint electrostatic potential" + "Electrostatic potential boundary condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintElectrostaticPotential", - "Creates a FEM constraint electrostatic potential" + "Creates an electrostatic potential boundary condition" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -262,11 +262,11 @@ class _ConstraintFlowVelocity(CommandManager): super(_ConstraintFlowVelocity, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintFlowVelocity", - "Constraint flow velocity" + "Flow velocity boundary condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintFlowVelocity", - "Creates a FEM constraint flow velocity" + "Creates a flow velocity boundary condition" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -279,11 +279,11 @@ class _ConstraintInitialFlowVelocity(CommandManager): super(_ConstraintInitialFlowVelocity, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialFlowVelocity", - "Constraint initial flow velocity" + "Initial flow velocity condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialFlowVelocity", - "Creates a FEM constraint initial flow velocity" + "Creates initial flow velocity condition" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -296,11 +296,11 @@ class _ConstraintInitialPressure(CommandManager): super(_ConstraintInitialPressure, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialPressure", - "Constraint initial pressure" + "Initial pressure condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintInitialPressure", - "Creates a FEM constraint initial pressure" + "Creates an initial pressure condition" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -313,11 +313,11 @@ class _ConstraintMagnetization(CommandManager): super(_ConstraintMagnetization, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintMagnetization", - "Constraint magnetization" + "Magnetization boundary condition" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintMagnetization", - "Creates a FEM constraint magnetization" + "Creates a magnetization boundary condition" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -330,11 +330,11 @@ class _ConstraintSectionPrint(CommandManager): super(_ConstraintSectionPrint, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintSectionPrint", - "Constraint sectionprint" + "Section print feature" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintSectionPrint", - "Creates a FEM constraint sectionprint" + "Creates a section print feature" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -347,11 +347,11 @@ class _ConstraintSelfWeight(CommandManager): super(_ConstraintSelfWeight, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintSelfWeight", - "Constraint self weight" + "Gravity load" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintSelfWeight", - "Creates a FEM constraint self weight" + "Creates a gravity load" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_noset_edit" @@ -364,11 +364,11 @@ class _ConstraintTie(CommandManager): super(_ConstraintTie, self).__init__() self.menutext = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintTie", - "Constraint tie" + "Tie constraint" ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_ConstraintTie", - "Creates a FEM constraint tie" + "Creates a tie constraint" ) self.is_active = "with_analysis" self.do_activated = "add_obj_on_gui_set_edit" @@ -607,7 +607,7 @@ class _Examples(CommandManager): ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_Examples", - "Open FEM examples" + "Opens the FEM examples" ) self.is_active = "always" @@ -771,7 +771,7 @@ class _FEMMesh2Mesh(CommandManager): ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_FEMMesh2Mesh", - "Convert the surface of a FEM mesh to a mesh" + "Converts the surface of a FEM mesh to a mesh" ) self.is_active = "with_femmesh_andor_res" @@ -836,7 +836,7 @@ class _MeshClear(CommandManager): ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MeshClear", - "Clear the Mesh of a FEM mesh object" + "Clears the Mesh of a FEM mesh object" ) self.is_active = "with_femmesh" @@ -862,7 +862,7 @@ class _MeshDisplayInfo(CommandManager): ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MeshDisplayInfo", - "Display FEM mesh info" + "Displays FEM mesh information" ) self.is_active = "with_femmesh" @@ -892,7 +892,7 @@ class _MeshGmshFromShape(CommandManager): ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MeshGmshFromShape", - "Create a FEM mesh from a shape by Gmsh mesher" + "Creates a FEM mesh from a shape by Gmsh mesher" ) self.is_active = "with_part_feature" @@ -955,7 +955,7 @@ class _MeshNetgenFromShape(CommandManager): ) self.tooltip = Qt.QT_TRANSLATE_NOOP( "FEM_MeshNetgenFromShape", - "Create a FEM mesh from a solid or face shape by Netgen internal mesher" + "Creates a FEM mesh from a solid or face shape by Netgen internal mesher" ) self.is_active = "with_part_feature" diff --git a/src/Mod/Import/App/AppImport.cpp b/src/Mod/Import/App/AppImport.cpp index db9c05f264..2c5f1f9eeb 100644 --- a/src/Mod/Import/App/AppImport.cpp +++ b/src/Mod/Import/App/AppImport.cpp @@ -30,8 +30,9 @@ #include "StepShapePy.h" -namespace Import { - extern PyObject* initModule(); +namespace Import +{ +extern PyObject* initModule(); } PyMOD_INIT_FUNC(Import) @@ -41,13 +42,13 @@ PyMOD_INIT_FUNC(Import) try { Base::Interpreter().loadModule("Part"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } // add mesh elements - Base::Interpreter().addType(&Import::StepShapePy ::Type, importModule, "StepShape"); + Base::Interpreter().addType(&Import::StepShapePy ::Type, importModule, "StepShape"); Base::Console().Log("Loading Import module... done\n"); diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index fd3a62fb18..ac1957e29d 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -22,121 +22,137 @@ #include "PreCompiled.h" #if defined(__MINGW32__) -# define WNT // avoid conflict with GUID +#define WNT // avoid conflict with GUID #endif #ifndef _PreComp_ -# include -# if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wextra-semi" -# endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if OCC_VERSION_HEX >= 0x070500 -# include -# include -# endif -# if defined(__clang__) -# pragma clang diagnostic pop -# endif +#include +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wextra-semi" +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if OCC_VERSION_HEX >= 0x070500 +#include +#include +#endif +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #endif +#include "dxf/ImpExpDxf.h" #include #include #include #include #include -#include "dxf/ImpExpDxf.h" -#include #include #include #include +#include +#include #include #include -#include -#include +#include #include "ImportOCAF2.h" -namespace Import { +namespace Import +{ -class ImportOCAFExt : public Import::ImportOCAF2 +class ImportOCAFExt: public Import::ImportOCAF2 { public: ImportOCAFExt(Handle(TDocStd_Document) hStdDoc, App::Document* doc, const std::string& name) : ImportOCAF2(hStdDoc, doc, name) - { - } + {} - std::map > partColors; + std::map> partColors; private: - void applyFaceColors(Part::Feature* part, const std::vector& colors) override { + void applyFaceColors(Part::Feature* part, const std::vector& colors) override + { partColors[part] = colors; } }; -class Module : public Py::ExtensionModule +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Import") + Module() + : Py::ExtensionModule("Import") { - add_keyword_method("open",&Module::importer, - "open(string) -- Open the file and create a new document." - ); - add_keyword_method("insert",&Module::importer, - "insert(string,string) -- Insert the file into the given document." - ); - add_keyword_method("export",&Module::exporter, - "export(list,string) -- Export a list of objects into a single file." - ); - add_varargs_method("readDXF",&Module::readDXF, - "readDXF(filename,[document,ignore_errors,option_source]): Imports a DXF file into the given document. ignore_errors is True by default." - ); - add_varargs_method("writeDXFShape",&Module::writeDXFShape, - "writeDXFShape([shape],filename [version,usePolyline,optionSource]): Exports Shape(s) to a DXF file." - ); - add_varargs_method("writeDXFObject",&Module::writeDXFObject, - "writeDXFObject([objects],filename [,version,usePolyline,optionSource]): Exports DocumentObject(s) to a DXF file." - ); - initialize("This module is the Import module."); // register with Python + add_keyword_method("open", + &Module::importer, + "open(string) -- Open the file and create a new document."); + add_keyword_method("insert", + &Module::importer, + "insert(string,string) -- Insert the file into the given document."); + add_keyword_method("export", + &Module::exporter, + "export(list,string) -- Export a list of objects into a single file."); + add_varargs_method("readDXF", + &Module::readDXF, + "readDXF(filename,[document,ignore_errors,option_source]): Imports a " + "DXF file into the given document. ignore_errors is True by default."); + add_varargs_method("writeDXFShape", + &Module::writeDXFShape, + "writeDXFShape([shape],filename [version,usePolyline,optionSource]): " + "Exports Shape(s) to a DXF file."); + add_varargs_method( + "writeDXFObject", + &Module::writeDXFObject, + "writeDXFObject([objects],filename [,version,usePolyline,optionSource]): Exports " + "DocumentObject(s) to a DXF file."); + initialize("This module is the Import module."); // register with Python } ~Module() override = default; private: - Py::Object importer(const Py::Tuple& args, const Py::Dict &kwds) + Py::Object importer(const Py::Tuple& args, const Py::Dict& kwds) { char* Name; - char* DocName=nullptr; - PyObject *importHidden = Py_None; - PyObject *merge = Py_None; - PyObject *useLinkGroup = Py_None; + char* DocName = nullptr; + PyObject* importHidden = Py_None; + PyObject* merge = Py_None; + PyObject* useLinkGroup = Py_None; int mode = -1; - static const std::array kwd_list {"name", "docName", "importHidden", "merge", - "useLinkGroup", "mode", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "et|sO!O!O!i", - kwd_list, "utf-8", &Name, &DocName, &PyBool_Type, &importHidden, - &PyBool_Type, &merge, - &PyBool_Type, &useLinkGroup, &mode)) { + static const std::array + kwd_list {"name", "docName", "importHidden", "merge", "useLinkGroup", "mode", nullptr}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), + kwds.ptr(), + "et|sO!O!O!i", + kwd_list, + "utf-8", + &Name, + &DocName, + &PyBool_Type, + &importHidden, + &PyBool_Type, + &merge, + &PyBool_Type, + &useLinkGroup, + &mode)) { throw Py::Exception(); } @@ -147,7 +163,7 @@ private: try { Base::FileInfo file(Utf8Name.c_str()); - App::Document *pcDoc = nullptr; + App::Document* pcDoc = nullptr; if (DocName) { pcDoc = App::GetApplication().getDocument(DocName); } @@ -165,7 +181,8 @@ private: aReader.SetColorMode(true); aReader.SetNameMode(true); aReader.SetLayerMode(true); - if (aReader.ReadFile((Standard_CString)(name8bit.c_str())) != IFSelect_RetDone) { + if (aReader.ReadFile((Standard_CString)(name8bit.c_str())) + != IFSelect_RetDone) { throw Py::Exception(PyExc_IOError, "cannot read STEP file"); } @@ -184,24 +201,29 @@ private: Base::Console().Error("%s\n", e.GetMessageString()); Base::Console().Message("Try to load STEP file without colors...\n"); - Part::ImportStepParts(pcDoc,Utf8Name.c_str()); + Part::ImportStepParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); } } else if (file.hasExtension({"igs", "iges"})) { - Base::Reference hGrp = App::GetApplication().GetUserParameter() - .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("IGES"); + Base::Reference hGrp = App::GetApplication() + .GetUserParameter() + .GetGroup("BaseApp") + ->GetGroup("Preferences") + ->GetGroup("Mod/Part") + ->GetGroup("IGES"); try { IGESControl_Controller::Init(); IGESCAFControl_Reader aReader; // http://www.opencascade.org/org/forum/thread_20603/?forum=3 - aReader.SetReadVisible(hGrp->GetBool("SkipBlankEntities", true) - ? Standard_True : Standard_False); + aReader.SetReadVisible( + hGrp->GetBool("SkipBlankEntities", true) ? Standard_True : Standard_False); aReader.SetColorMode(true); aReader.SetNameMode(true); aReader.SetLayerMode(true); - if (aReader.ReadFile((Standard_CString)(name8bit.c_str())) != IFSelect_RetDone) { + if (aReader.ReadFile((Standard_CString)(name8bit.c_str())) + != IFSelect_RetDone) { throw Py::Exception(PyExc_IOError, "cannot read IGES file"); } @@ -217,13 +239,13 @@ private: #endif // http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor()) - ->SetModel(new IGESData_IGESModel); + ->SetModel(new IGESData_IGESModel); } catch (OSD_Exception& e) { Base::Console().Error("%s\n", e.GetMessageString()); Base::Console().Message("Try to load IGES file without colors...\n"); - Part::ImportIgesParts(pcDoc,Utf8Name.c_str()); + Part::ImportIgesParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); } } @@ -233,21 +255,25 @@ private: ImportOCAFExt ocaf(hDoc, pcDoc, file.fileNamePure()); ocaf.setImportOptions(ImportOCAFExt::customImportOptions()); - if (merge != Py_None) + if (merge != Py_None) { ocaf.setMerge(Base::asBoolean(merge)); - if (importHidden != Py_None) + } + if (importHidden != Py_None) { ocaf.setImportHiddenObject(Base::asBoolean(importHidden)); - if (useLinkGroup != Py_None) + } + if (useLinkGroup != Py_None) { ocaf.setUseLinkGroup(Base::asBoolean(useLinkGroup)); - if (mode >= 0) + } + if (mode >= 0) { ocaf.setMode(mode); + } ocaf.loadShapes(); hApp->Close(hDoc); if (!ocaf.partColors.empty()) { Py::List list; - for (auto &it : ocaf.partColors) { + for (auto& it : ocaf.partColors) { Py::Tuple tuple(2); tuple.setItem(0, Py::asObject(it.first->getPyObject())); @@ -271,19 +297,32 @@ private: return Py::None(); } - Py::Object exporter(const Py::Tuple& args, const Py::Dict &kwds) + Py::Object exporter(const Py::Tuple& args, const Py::Dict& kwds) { PyObject* object; char* Name; - PyObject *exportHidden = Py_None; - PyObject *legacy = Py_None; - PyObject *keepPlacement = Py_None; - static const std::array kwd_list{"obj", "name", "exportHidden", "legacy", "keepPlacement", + PyObject* exportHidden = Py_None; + PyObject* legacy = Py_None; + PyObject* keepPlacement = Py_None; + static const std::array kwd_list {"obj", + "name", + "exportHidden", + "legacy", + "keepPlacement", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "Oet|O!O!O!", - kwd_list, &object, "utf-8", &Name, &PyBool_Type, &exportHidden, - &PyBool_Type, &legacy, - &PyBool_Type, &keepPlacement)) { + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), + kwds.ptr(), + "Oet|O!O!O!", + kwd_list, + &object, + "utf-8", + &Name, + &PyBool_Type, + &exportHidden, + &PyBool_Type, + &legacy, + &PyBool_Type, + &keepPlacement)) { throw Py::Exception(); } @@ -300,8 +339,10 @@ private: std::vector objs; for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* item = (*it).ptr(); - if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) - objs.push_back(static_cast(item)->getDocumentObjectPtr()); + if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) { + objs.push_back( + static_cast(item)->getDocumentObjectPtr()); + } } if (legacy == Py_None) { @@ -313,10 +354,12 @@ private: if (!Base::asBoolean(legacy) || !ocaf.canFallback(objs)) { ocaf.setExportOptions(ExportOCAF2::customExportOptions()); - if (exportHidden != Py_None) + if (exportHidden != Py_None) { ocaf.setExportHiddenObject(Base::asBoolean(exportHidden)); - if (keepPlacement != Py_None) + } + if (keepPlacement != Py_None) { ocaf.setKeepPlacement(Base::asBoolean(keepPlacement)); + } ocaf.exportObjects(objs); } @@ -324,17 +367,19 @@ private: bool keepExplicitPlacement = Standard_True; ExportOCAF ocaf(hDoc, keepExplicitPlacement); // That stuff is exporting a list of selected objects into FreeCAD Tree - std::vector hierarchical_label; - std::vector hierarchical_loc; - std::vector hierarchical_part; - for(auto obj : objs) - ocaf.exportObject(obj,hierarchical_label, hierarchical_loc,hierarchical_part); + std::vector hierarchical_label; + std::vector hierarchical_loc; + std::vector hierarchical_part; + for (auto obj : objs) { + ocaf.exportObject(obj, hierarchical_label, hierarchical_loc, hierarchical_part); + } // Free Shapes must have absolute placement and not explicit - std::vector FreeLabels; - std::vector part_id; - ocaf.getFreeLabels(hierarchical_label,FreeLabels, part_id); - // Update is not performed automatically anymore: https://tracker.dev.opencascade.org/view.php?id=28055 + std::vector FreeLabels; + std::vector part_id; + ocaf.getFreeLabels(hierarchical_label, FreeLabels, part_id); + // Update is not performed automatically anymore: + // https://tracker.dev.opencascade.org/view.php?id=28055 XCAFDoc_DocumentTool::ShapeTool(hDoc->Main())->UpdateAssemblies(); } @@ -345,17 +390,27 @@ private: writer.Transfer(hDoc, STEPControl_AsIs); APIHeaderSection_MakeHeader makeHeader(writer.ChangeWriter().Model()); - Base::Reference hGrp = App::GetApplication().GetUserParameter() - .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP"); + Base::Reference hGrp = App::GetApplication() + .GetUserParameter() + .GetGroup("BaseApp") + ->GetGroup("Preferences") + ->GetGroup("Mod/Part") + ->GetGroup("STEP"); // Don't set name because STEP doesn't support UTF-8 // https://forum.freecad.org/viewtopic.php?f=8&t=52967 - makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); - makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); - makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::Application::getExecutableName().c_str())); + makeHeader.SetAuthorValue( + 1, + new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); + makeHeader.SetOrganizationValue( + 1, + new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); + makeHeader.SetOriginatingSystem( + new TCollection_HAsciiString(App::Application::getExecutableName().c_str())); makeHeader.SetDescriptionValue(1, new TCollection_HAsciiString("FreeCAD Model")); IFSelect_ReturnStatus ret = writer.Write(name8bit.c_str()); - if (ret == IFSelect_RetError || ret == IFSelect_RetFail || ret == IFSelect_RetStop) { + if (ret == IFSelect_RetError || ret == IFSelect_RetFail + || ret == IFSelect_RetStop) { PyErr_Format(PyExc_IOError, "Cannot open file '%s'", Utf8Name.c_str()); throw Py::Exception(); } @@ -364,9 +419,12 @@ private: IGESControl_Controller::Init(); IGESCAFControl_Writer writer; IGESData_GlobalSection header = writer.Model()->GlobalSection(); - header.SetAuthorName(new TCollection_HAsciiString(Part::Interface::writeIgesHeaderAuthor())); - header.SetCompanyName(new TCollection_HAsciiString(Part::Interface::writeIgesHeaderCompany())); - header.SetSendName(new TCollection_HAsciiString(Part::Interface::writeIgesHeaderProduct())); + header.SetAuthorName( + new TCollection_HAsciiString(Part::Interface::writeIgesHeaderAuthor())); + header.SetCompanyName( + new TCollection_HAsciiString(Part::Interface::writeIgesHeaderCompany())); + header.SetSendName( + new TCollection_HAsciiString(Part::Interface::writeIgesHeaderProduct())); writer.Model()->SetGlobalSection(header); writer.Transfer(hDoc); Standard_Boolean ret = writer.Write(name8bit.c_str()); @@ -378,15 +436,16 @@ private: else if (file.hasExtension({"glb", "gltf"})) { #if OCC_VERSION_HEX >= 0x070500 TColStd_IndexedDataMapOfStringString aMetadata; - RWGltf_CafWriter aWriter (name8bit.c_str(), file.hasExtension("glb")); - aWriter.SetTransformationFormat (RWGltf_WriterTrsfFormat_Compact); + RWGltf_CafWriter aWriter(name8bit.c_str(), file.hasExtension("glb")); + aWriter.SetTransformationFormat(RWGltf_WriterTrsfFormat_Compact); // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units - aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001); - aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (RWMesh_CoordinateSystem_Zup); + aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit(0.001); + aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem( + RWMesh_CoordinateSystem_Zup); #if OCC_VERSION_HEX >= 0x070700 aWriter.SetParallel(true); #endif - Standard_Boolean ret = aWriter.Perform (hDoc, aMetadata, Message_ProgressRange()); + Standard_Boolean ret = aWriter.Perform(hDoc, aMetadata, Message_ProgressRange()); if (!ret) { PyErr_Format(PyExc_IOError, "Cannot save to file '%s'", Utf8Name.c_str()); throw Py::Exception(); @@ -412,34 +471,46 @@ private: Py::Object readDXF(const Py::Tuple& args) { char* Name; - const char* DocName=nullptr; + const char* DocName = nullptr; const char* optionSource = nullptr; std::string defaultOptions = "User parameter:BaseApp/Preferences/Mod/Draft"; - bool IgnoreErrors=true; - if (!PyArg_ParseTuple(args.ptr(), "et|sbs","utf-8",&Name,&DocName,&IgnoreErrors,&optionSource)) + bool IgnoreErrors = true; + if (!PyArg_ParseTuple(args.ptr(), + "et|sbs", + "utf-8", + &Name, + &DocName, + &IgnoreErrors, + &optionSource)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); Base::FileInfo file(EncodedName.c_str()); - if (!file.exists()) + if (!file.exists()) { throw Py::RuntimeError("File doesn't exist"); + } - if (optionSource) + if (optionSource) { defaultOptions = optionSource; + } - App::Document *pcDoc; - if (DocName) + App::Document* pcDoc; + if (DocName) { pcDoc = App::GetApplication().getDocument(DocName); - else + } + else { pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + } + if (!pcDoc) { pcDoc = App::GetApplication().newDocument(DocName); + } try { // read the DXF file - ImpExpDxfRead dxf_file(EncodedName,pcDoc); + ImpExpDxfRead dxf_file(EncodedName, pcDoc); dxf_file.setOptionSource(defaultOptions); dxf_file.setOptions(); dxf_file.DoRead(IgnoreErrors); @@ -456,35 +527,36 @@ private: Py::Object writeDXFShape(const Py::Tuple& args) { - PyObject *shapeObj; + PyObject* shapeObj; char* fname; std::string filePath; std::string layerName; const char* optionSource = nullptr; std::string defaultOptions = "User parameter:BaseApp/Preferences/Mod/Import"; - int versionParm = -1; - bool versionOverride = false; - bool polyOverride = false; - PyObject *usePolyline = Py_False; + int versionParm = -1; + bool versionOverride = false; + bool polyOverride = false; + PyObject* usePolyline = Py_False; - //handle list of shapes - if (PyArg_ParseTuple(args.ptr(), "O!et|iOs", &(PyList_Type) , - &shapeObj, - "utf-8", - &fname, - &versionParm, - &usePolyline, - &optionSource)) { + // handle list of shapes + if (PyArg_ParseTuple(args.ptr(), + "O!et|iOs", + &(PyList_Type), + &shapeObj, + "utf-8", + &fname, + &versionParm, + &usePolyline, + &optionSource)) { filePath = std::string(fname); layerName = "none"; PyMem_Free(fname); - if ((versionParm == 12) || - (versionParm == 14)) { - versionOverride = true; + if ((versionParm == 12) || (versionParm == 14)) { + versionOverride = true; } if (usePolyline == Py_True) { - polyOverride = true; + polyOverride = true; } if (optionSource) { defaultOptions = optionSource; @@ -503,7 +575,8 @@ private: Py::Sequence list(shapeObj); for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { if (PyObject_TypeCheck((*it).ptr(), &(Part::TopoShapePy::Type))) { - Part::TopoShape* ts = static_cast((*it).ptr())->getTopoShapePtr(); + Part::TopoShape* ts = + static_cast((*it).ptr())->getTopoShapePtr(); TopoDS_Shape shape = ts->getShape(); writer.exportShape(shape); } @@ -517,23 +590,24 @@ private: } PyErr_Clear(); - if (PyArg_ParseTuple(args.ptr(), "O!et|iOs", &(Part::TopoShapePy::Type) , - &shapeObj, - "utf-8", - &fname, - &versionParm, - &usePolyline, - &optionSource)) { + if (PyArg_ParseTuple(args.ptr(), + "O!et|iOs", + &(Part::TopoShapePy::Type), + &shapeObj, + "utf-8", + &fname, + &versionParm, + &usePolyline, + &optionSource)) { filePath = std::string(fname); layerName = "none"; PyMem_Free(fname); - if ((versionParm == 12) || - (versionParm == 14)) { - versionOverride = true; + if ((versionParm == 12) || (versionParm == 14)) { + versionOverride = true; } if (usePolyline == Py_True) { - polyOverride = true; + polyOverride = true; } if (optionSource) { defaultOptions = optionSource; @@ -565,34 +639,35 @@ private: Py::Object writeDXFObject(const Py::Tuple& args) { - PyObject *docObj; + PyObject* docObj; char* fname; std::string filePath; std::string layerName; const char* optionSource = nullptr; std::string defaultOptions = "User parameter:BaseApp/Preferences/Mod/Import"; - int versionParm = -1; - bool versionOverride = false; - bool polyOverride = false; - PyObject *usePolyline = Py_False; + int versionParm = -1; + bool versionOverride = false; + bool polyOverride = false; + PyObject* usePolyline = Py_False; - if (PyArg_ParseTuple(args.ptr(), "O!et|iOs", &(PyList_Type) , - &docObj, - "utf-8", - &fname, - &versionParm, - &usePolyline, - &optionSource)) { + if (PyArg_ParseTuple(args.ptr(), + "O!et|iOs", + &(PyList_Type), + &docObj, + "utf-8", + &fname, + &versionParm, + &usePolyline, + &optionSource)) { filePath = std::string(fname); layerName = "none"; PyMem_Free(fname); - if ((versionParm == 12) || - (versionParm == 14)) { - versionOverride = true; + if ((versionParm == 12) || (versionParm == 14)) { + versionOverride = true; } if (usePolyline == Py_True) { - polyOverride = true; + polyOverride = true; } if (optionSource) { @@ -613,7 +688,8 @@ private: for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { if (PyObject_TypeCheck((*it).ptr(), &(Part::PartFeaturePy::Type))) { PyObject* item = (*it).ptr(); - App::DocumentObject* obj = static_cast(item)->getDocumentObjectPtr(); + App::DocumentObject* obj = + static_cast(item)->getDocumentObjectPtr(); Part::Feature* part = static_cast(obj); layerName = part->getNameInDocument(); writer.setLayerName(layerName); @@ -630,29 +706,30 @@ private: } PyErr_Clear(); - if (PyArg_ParseTuple(args.ptr(), "O!et|iOs", &(App::DocumentObjectPy::Type) , - &docObj, - "utf-8", - &fname, - &versionParm, - &usePolyline, - &optionSource)) { + if (PyArg_ParseTuple(args.ptr(), + "O!et|iOs", + &(App::DocumentObjectPy::Type), + &docObj, + "utf-8", + &fname, + &versionParm, + &usePolyline, + &optionSource)) { filePath = std::string(fname); layerName = "none"; PyMem_Free(fname); - if ((versionParm == 12) || - (versionParm == 14)) { - versionOverride = true; + if ((versionParm == 12) || (versionParm == 14)) { + versionOverride = true; } if (usePolyline == Py_True) { - polyOverride = true; + polyOverride = true; } if (optionSource) { defaultOptions = optionSource; } - + try { ImpExpDxfWrite writer(filePath); writer.setOptionSource(defaultOptions); @@ -663,7 +740,8 @@ private: writer.setPolyOverride(polyOverride); writer.setLayerName(layerName); writer.init(); - App::DocumentObject* obj = static_cast(docObj)->getDocumentObjectPtr(); + App::DocumentObject* obj = + static_cast(docObj)->getDocumentObjectPtr(); Part::Feature* part = static_cast(obj); layerName = part->getNameInDocument(); writer.setLayerName(layerName); @@ -687,4 +765,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Import +} // namespace Import diff --git a/src/Mod/Import/App/CMakeLists.txt b/src/Mod/Import/App/CMakeLists.txt index a08f727db4..4ad568f2a6 100644 --- a/src/Mod/Import/App/CMakeLists.txt +++ b/src/Mod/Import/App/CMakeLists.txt @@ -65,9 +65,9 @@ SET(SCL_Resources SCL/Aufspannung.stp SCL/gasket1.p21 SCL/Product1.stp - automotive_design.py # AP214e3 - ifc2x3.py # IFC - ifc4.py # IFC 4 + SCL_output/automotive_design.py # AP214e3 + SCL_output/ifc2x3.py # IFC + SCL_output/ifc4.py # IFC 4 PlmXmlParser.py ) SOURCE_GROUP("SCL" FILES ${SCL_Resources}) diff --git a/src/Mod/Import/App/ExportOCAF.cpp b/src/Mod/Import/App/ExportOCAF.cpp index cf9cd6327e..1da458d8dd 100644 --- a/src/Mod/Import/App/ExportOCAF.cpp +++ b/src/Mod/Import/App/ExportOCAF.cpp @@ -22,25 +22,25 @@ #include "PreCompiled.h" #if defined(__MINGW32__) -# define WNT // avoid conflict with GUID +#define WNT // avoid conflict with GUID #endif #ifndef _PreComp_ -# include -# include -# include -# include // for Precision::Confusion() -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for Precision::Confusion() +#include #endif #include @@ -54,12 +54,12 @@ #if OCC_VERSION_HEX >= 0x070500 // See https://dev.opencascade.org/content/occt-3d-viewer-becomes-srgb-aware -# define OCC_COLOR_SPACE Quantity_TOC_sRGB +#define OCC_COLOR_SPACE Quantity_TOC_sRGB #else -# define OCC_COLOR_SPACE Quantity_TOC_RGB +#define OCC_COLOR_SPACE Quantity_TOC_RGB #endif -static inline Quantity_ColorRGBA convertColor(const App::Color &c) +static inline Quantity_ColorRGBA convertColor(const App::Color& c) { return Quantity_ColorRGBA(Quantity_Color(c.r, c.g, c.b, OCC_COLOR_SPACE), 1.0 - c.a); } @@ -118,8 +118,9 @@ std::vector ExportOCAF::filterPart(App::Part* part) const } } - if (accept) + if (accept) { keepObjects.push_back(it); + } } entries.swap(keepObjects); @@ -129,11 +130,11 @@ std::vector ExportOCAF::filterPart(App::Part* part) const } int ExportOCAF::exportObject(App::DocumentObject* obj, - std::vector & hierarchical_label, - std::vector & hierarchical_loc, - std::vector & hierarchical_part) + std::vector& hierarchical_label, + std::vector& hierarchical_loc, + std::vector& hierarchical_part) { - std::vector local_label; + std::vector local_label; int root_id; int return_label = -1; @@ -148,15 +149,16 @@ int ExportOCAF::exportObject(App::DocumentObject* obj, } for (it = entries.begin(); it != entries.end(); ++it) { - int new_label=0; - new_label = exportObject((*it), hierarchical_label, hierarchical_loc, hierarchical_part); + int new_label = 0; + new_label = + exportObject((*it), hierarchical_label, hierarchical_loc, hierarchical_part); local_label.push_back(new_label); } - createNode(part,root_id, hierarchical_label, hierarchical_loc, hierarchical_part); + createNode(part, root_id, hierarchical_label, hierarchical_loc, hierarchical_part); std::vector::iterator label_it; for (label_it = local_label.begin(); label_it != local_label.end(); ++label_it) { - pushNode(root_id,(*label_it), hierarchical_label,hierarchical_loc); + pushNode(root_id, (*label_it), hierarchical_label, hierarchical_loc); } return_label = root_id; @@ -167,17 +169,20 @@ int ExportOCAF::exportObject(App::DocumentObject* obj, std::vector colors; findColors(part, colors); - return_label = saveShape(part, colors, hierarchical_label, hierarchical_loc, hierarchical_part); + return_label = + saveShape(part, colors, hierarchical_label, hierarchical_loc, hierarchical_part); } return return_label; } -// This function creates an Assembly node in an XCAF document with its relative placement information -void ExportOCAF::createNode(App::Part* part, int& root_id, - std::vector & hierarchical_label, - std::vector & hierarchical_loc, - std::vector & hierarchical_part) +// This function creates an Assembly node in an XCAF document with its relative placement +// information +void ExportOCAF::createNode(App::Part* part, + int& root_id, + std::vector& hierarchical_label, + std::vector& hierarchical_loc, + std::vector& hierarchical_part) { TDF_Label shapeLabel = aShapeTool->NewShape(); Handle(TDataStd_Name) N; @@ -192,24 +197,26 @@ void ExportOCAF::createNode(App::Part* part, int& root_id, gp_Trsf trf; trf.SetRotation(gp_Ax1(gp_Pnt(), gp_Dir(axis.x, axis.y, axis.z)), angle); - trf.SetTranslationPart(gp_Vec(pl.getPosition().x,pl.getPosition().y,pl.getPosition().z)); + trf.SetTranslationPart(gp_Vec(pl.getPosition().x, pl.getPosition().y, pl.getPosition().z)); TopLoc_Location MyLoc = TopLoc_Location(trf); - XCAFDoc_Location::Set(shapeLabel,TopLoc_Location(trf)); + XCAFDoc_Location::Set(shapeLabel, TopLoc_Location(trf)); hierarchical_label.push_back(shapeLabel); hierarchical_loc.push_back(MyLoc); hierarchical_part.push_back(part); - root_id=hierarchical_label.size(); + root_id = hierarchical_label.size(); } -int ExportOCAF::saveShape(Part::Feature* part, const std::vector& colors, - std::vector & hierarchical_label, - std::vector & hierarchical_loc, - std::vector & hierarchical_part) +int ExportOCAF::saveShape(Part::Feature* part, + const std::vector& colors, + std::vector& hierarchical_label, + std::vector& hierarchical_loc, + std::vector& hierarchical_part) { const TopoDS_Shape& shape = part->Shape.getValue(); - if (shape.IsNull()) + if (shape.IsNull()) { return -1; + } TopoDS_Shape baseShape; TopLoc_Location aLoc; @@ -221,8 +228,8 @@ int ExportOCAF::saveShape(Part::Feature* part, const std::vector& co double angle; rot.getValue(axis, angle); gp_Trsf trf; - trf.SetRotation(gp_Ax1(gp_Pnt(0.,0.,0.), gp_Dir(axis.x, axis.y, axis.z)), angle); - trf.SetTranslationPart(gp_Vec(pl.getPosition().x,pl.getPosition().y,pl.getPosition().z)); + trf.SetRotation(gp_Ax1(gp_Pnt(0., 0., 0.), gp_Dir(axis.x, axis.y, axis.z)), angle); + trf.SetTranslationPart(gp_Vec(pl.getPosition().x, pl.getPosition().y, pl.getPosition().z)); TopLoc_Location MyLoc = TopLoc_Location(trf); if (keepExplicitPlacement) { @@ -241,19 +248,19 @@ int ExportOCAF::saveShape(Part::Feature* part, const std::vector& co TDataStd_Name::Set(shapeLabel, TCollection_ExtendedString(part->Label.getValue(), true)); -/* - if (keepExplicitPlacement) { - aShapeTool->AddComponent(aShapeTool->BaseLabel(), shapeLabel, aLoc); - XCAFDoc_Location::Set(shapeLabel,MyLoc); - } -*/ + /* + if (keepExplicitPlacement) { + aShapeTool->AddComponent(aShapeTool->BaseLabel(), shapeLabel, aLoc); + XCAFDoc_Location::Set(shapeLabel,MyLoc); + } + */ // Add color information Quantity_ColorRGBA col; std::set face_index; TopTools_IndexedMapOfShape faces; - TopExp_Explorer xp(baseShape,TopAbs_FACE); + TopExp_Explorer xp(baseShape, TopAbs_FACE); while (xp.More()) { face_index.insert(faces.Add(xp.Current())); xp.Next(); @@ -261,7 +268,7 @@ int ExportOCAF::saveShape(Part::Feature* part, const std::vector& co // define color per face? if (colors.size() == face_index.size()) { - xp.Init(baseShape,TopAbs_FACE); + xp.Init(baseShape, TopAbs_FACE); while (xp.More()) { int index = faces.FindIndex(xp.Current()); if (face_index.find(index) != face_index.end()) { @@ -281,7 +288,7 @@ int ExportOCAF::saveShape(Part::Feature* part, const std::vector& co } if (!faceLabel.IsNull()) { - const App::Color& color = colors[index-1]; + const App::Color& color = colors[index - 1]; col = convertColor(color); aColorTool->SetColor(faceLabel, col, XCAFDoc_ColorSurf); } @@ -299,16 +306,16 @@ int ExportOCAF::saveShape(Part::Feature* part, const std::vector& co hierarchical_loc.push_back(MyLoc); hierarchical_part.push_back(part); - return(hierarchical_label.size()); + return (hierarchical_label.size()); } // This function is scanning the OCAF doc for Free Shapes and returns the label attached to it // If this Free Shapes are regular Part::Feature, we must use absolute coordinate instead of // allocating a placement into the hierarchy as it is not attached to a hierarchical node -void ExportOCAF::getFreeLabels(std::vector & hierarchical_label, - std::vector & labels, - std::vector & label_part_id) +void ExportOCAF::getFreeLabels(std::vector& hierarchical_label, + std::vector& labels, + std::vector& label_part_id) { TDF_LabelSequence FreeLabels; aShapeTool->GetFreeShapes(FreeLabels); @@ -324,36 +331,38 @@ void ExportOCAF::getFreeLabels(std::vector & hierarchical_label, } } -void ExportOCAF::getPartColors(std::vector hierarchical_part, - std::vector FreeLabels, - std::vector part_id, - std::vector < std::vector >& Colors) const +void ExportOCAF::getPartColors(std::vector hierarchical_part, + std::vector FreeLabels, + std::vector part_id, + std::vector>& Colors) const { // I am seeking for the colors of each parts std::size_t n = FreeLabels.size(); for (std::size_t i = 0; i < n; i++) { std::vector colors; - Part::Feature * part = static_cast(hierarchical_part.at(part_id.at(i))); + Part::Feature* part = static_cast(hierarchical_part.at(part_id.at(i))); findColors(part, colors); Colors.push_back(colors); } } -void ExportOCAF::reallocateFreeShape(std::vector hierarchical_part, - std::vector FreeLabels, - std::vector part_id, - std::vector< std::vector >& Colors) +void ExportOCAF::reallocateFreeShape(std::vector hierarchical_part, + std::vector FreeLabels, + std::vector part_id, + std::vector>& Colors) { std::size_t n = FreeLabels.size(); for (std::size_t i = 0; i < n; i++) { TDF_Label label = FreeLabels.at(i); // hierarchical part does contain only part currently and not node I should add node - if (hierarchical_part.at(part_id.at(i))->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { - Part::Feature * part = static_cast(hierarchical_part.at(part_id.at(i))); + if (hierarchical_part.at(part_id.at(i)) + ->getTypeId() + .isDerivedFrom(Part::Feature::getClassTypeId())) { + Part::Feature* part = static_cast(hierarchical_part.at(part_id.at(i))); aShapeTool->SetShape(label, part->Shape.getValue()); // Add color information std::vector colors; - colors=Colors.at(i); + colors = Colors.at(i); TopoDS_Shape baseShape = part->Shape.getValue(); // Add color information @@ -361,7 +370,7 @@ void ExportOCAF::reallocateFreeShape(std::vector hierarch std::set face_index; TopTools_IndexedMapOfShape faces; - TopExp_Explorer xp(baseShape,TopAbs_FACE); + TopExp_Explorer xp(baseShape, TopAbs_FACE); while (xp.More()) { face_index.insert(faces.Add(xp.Current())); xp.Next(); @@ -369,7 +378,7 @@ void ExportOCAF::reallocateFreeShape(std::vector hierarch // define color per face? if (colors.size() == face_index.size()) { - xp.Init(baseShape,TopAbs_FACE); + xp.Init(baseShape, TopAbs_FACE); while (xp.More()) { int index = faces.FindIndex(xp.Current()); if (face_index.find(index) != face_index.end()) { @@ -389,7 +398,7 @@ void ExportOCAF::reallocateFreeShape(std::vector hierarch } if (!faceLabel.IsNull()) { - const App::Color& color = colors[index-1]; + const App::Color& color = colors[index - 1]; col = convertColor(color); aColorTool->SetColor(faceLabel, col, XCAFDoc_ColorSurf); } @@ -408,26 +417,31 @@ void ExportOCAF::reallocateFreeShape(std::vector hierarch } // This function is moving a "standard" node into an Assembly node within an XCAF doc -void ExportOCAF::pushNode(int root_id, int node_id, std::vector & hierarchical_label,std::vector & hierarchical_loc) +void ExportOCAF::pushNode(int root_id, + int node_id, + std::vector& hierarchical_label, + std::vector& hierarchical_loc) { TDF_Label root; TDF_Label node; - root = hierarchical_label.at(root_id-1); - node = hierarchical_label.at(node_id-1); + root = hierarchical_label.at(root_id - 1); + node = hierarchical_label.at(node_id - 1); - XCAFDoc_DocumentTool::ShapeTool(root)->AddComponent(root, node, hierarchical_loc.at(node_id-1)); + XCAFDoc_DocumentTool::ShapeTool(root)->AddComponent(root, + node, + hierarchical_loc.at(node_id - 1)); } // ---------------------------------------------------------------------------- ExportOCAFCmd::ExportOCAFCmd(Handle(TDocStd_Document) h, bool explicitPlacement) - : ExportOCAF(h, explicitPlacement) -{ -} + : ExportOCAF(h, explicitPlacement) +{} void ExportOCAFCmd::findColors(Part::Feature* part, std::vector& colors) const { - std::map >::const_iterator it = partColors.find(part); - if (it != partColors.end()) + std::map>::const_iterator it = partColors.find(part); + if (it != partColors.end()) { colors = it->second; + } } diff --git a/src/Mod/Import/App/ExportOCAF.h b/src/Mod/Import/App/ExportOCAF.h index 5f7a5a71f0..53872ad608 100644 --- a/src/Mod/Import/App/ExportOCAF.h +++ b/src/Mod/Import/App/ExportOCAF.h @@ -40,16 +40,19 @@ class TDF_Label; class TopLoc_Location; -namespace App { +namespace App +{ class Document; class DocumentObject; class Part; -} -namespace Part { +} // namespace App +namespace Part +{ class Feature; } -namespace Import { +namespace Import +{ class ImportExport ExportOCAF { @@ -57,33 +60,38 @@ public: ExportOCAF(Handle(TDocStd_Document) h, bool explicitPlacement); virtual ~ExportOCAF(); int exportObject(App::DocumentObject* obj, - std::vector & hierarchical_label, - std::vector & hierarchical_loc, - std::vector & hierarchical_part); - int saveShape(Part::Feature* part, const std::vector&, - std::vector & hierarchical_label, - std::vector & hierarchical_loc, - std::vector & hierarchical_part); - void getPartColors(std::vector hierarchical_part, - std::vector FreeLabels, - std::vector part_id, - std::vector < std::vector >& Colors) const; - void reallocateFreeShape(std::vector hierarchical_part, - std::vector FreeLabels, - std::vector part_id, - std::vector< std::vector >& Colors); - void getFreeLabels(std::vector & hierarchical_label, - std::vector & labels, - std::vector & label_part_id); - void createNode(App::Part* part, int& root_it, - std::vector & hierarchical_label, - std::vector & hierarchical_loc, - std::vector & hierarchical_part); - void pushNode(int root, int node, std::vector & hierarchical_label, - std::vector & hierarchical_loc); + std::vector& hierarchical_label, + std::vector& hierarchical_loc, + std::vector& hierarchical_part); + int saveShape(Part::Feature* part, + const std::vector&, + std::vector& hierarchical_label, + std::vector& hierarchical_loc, + std::vector& hierarchical_part); + void getPartColors(std::vector hierarchical_part, + std::vector FreeLabels, + std::vector part_id, + std::vector>& Colors) const; + void reallocateFreeShape(std::vector hierarchical_part, + std::vector FreeLabels, + std::vector part_id, + std::vector>& Colors); + void getFreeLabels(std::vector& hierarchical_label, + std::vector& labels, + std::vector& label_part_id); + void createNode(App::Part* part, + int& root_it, + std::vector& hierarchical_label, + std::vector& hierarchical_loc, + std::vector& hierarchical_part); + void pushNode(int root, + int node, + std::vector& hierarchical_label, + std::vector& hierarchical_loc); private: - virtual void findColors(Part::Feature*, std::vector&) const {} + virtual void findColors(Part::Feature*, std::vector&) const + {} std::vector filterPart(App::Part* part) const; private: @@ -92,14 +100,15 @@ private: Handle(XCAFDoc_ColorTool) aColorTool; TDF_Label rootLabel; bool keepExplicitPlacement; - bool filterBaseFeature{true}; + bool filterBaseFeature {true}; }; -class ImportExport ExportOCAFCmd : public ExportOCAF +class ImportExport ExportOCAFCmd: public ExportOCAF { public: ExportOCAFCmd(Handle(TDocStd_Document) h, bool explicitPlacement); - void setPartColorsMap(const std::map >& colors) { + void setPartColorsMap(const std::map>& colors) + { partColors = colors; } @@ -107,10 +116,10 @@ private: void findColors(Part::Feature*, std::vector&) const override; private: - std::map > partColors; + std::map> partColors; }; -} +} // namespace Import -#endif //IMPORT_EXPORTOCAF_H +#endif // IMPORT_EXPORTOCAF_H diff --git a/src/Mod/Import/App/ImportOCAF.cpp b/src/Mod/Import/App/ImportOCAF.cpp index ce4f8fb183..0f74d8b178 100644 --- a/src/Mod/Import/App/ImportOCAF.cpp +++ b/src/Mod/Import/App/ImportOCAF.cpp @@ -22,29 +22,29 @@ #include "PreCompiled.h" #if defined(__MINGW32__) -# define WNT // avoid conflict with GUID +#define WNT // avoid conflict with GUID #endif #ifndef _PreComp_ -# include -# include // for Precision::Confusion() -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // for Precision::Confusion() +#include #endif #include @@ -57,21 +57,21 @@ #ifdef HAVE_TBB -# include -# include -# include +#include +#include +#include #endif using namespace Import; #if OCC_VERSION_HEX >= 0x070500 // See https://dev.opencascade.org/content/occt-3d-viewer-becomes-srgb-aware -# define OCC_COLOR_SPACE Quantity_TOC_sRGB +#define OCC_COLOR_SPACE Quantity_TOC_sRGB #else -# define OCC_COLOR_SPACE Quantity_TOC_RGB +#define OCC_COLOR_SPACE Quantity_TOC_RGB #endif -static inline App::Color convertColor(const Quantity_ColorRGBA &c) +static inline App::Color convertColor(const Quantity_ColorRGBA& c) { Standard_Real r, g, b; c.GetRGB().Values(r, g, b, OCC_COLOR_SPACE); @@ -84,9 +84,11 @@ static inline App::Color convertColor(const Quantity_ColorRGBA &c) #define OCAF_KEEP_PLACEMENT ImportOCAF::ImportOCAF(Handle(TDocStd_Document) h, App::Document* d, const std::string& name) - : pDoc(h), doc(d), default_name(name) + : pDoc(h) + , doc(d) + , default_name(name) { - aShapeTool = XCAFDoc_DocumentTool::ShapeTool (pDoc->Main()); + aShapeTool = XCAFDoc_DocumentTool::ShapeTool(pDoc->Main()); aColorTool = XCAFDoc_DocumentTool::ColorTool(pDoc->Main()); } @@ -129,11 +131,14 @@ void ImportOCAF::loadShapes() void ImportOCAF::setMerge(bool merge) { - this->merge=merge; + this->merge = merge; } -void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc, - const std::string& defaultname, const std::string& assembly, bool isRef, +void ImportOCAF::loadShapes(const TDF_Label& label, + const TopLoc_Location& loc, + const std::string& defaultname, + const std::string& assembly, + bool isRef, std::vector& lValue) { int hash = 0; @@ -143,59 +148,61 @@ void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc, #endif TopoDS_Shape aShape; - std::vector localValue; + std::vector localValue; - if (aShapeTool->GetShape(label,aShape)) { + if (aShapeTool->GetShape(label, aShape)) { hash = aShape.HashCode(HashUpper); } Handle(TDataStd_Name) name; std::string part_name = defaultname; - if (label.FindAttribute(TDataStd_Name::GetID(),name)) { + if (label.FindAttribute(TDataStd_Name::GetID(), name)) { TCollection_ExtendedString extstr = name->Get(); - char* str = new char[extstr.LengthOfCString()+1]; + char* str = new char[extstr.LengthOfCString() + 1]; extstr.ToUTF8CString(str); part_name = str; - delete [] str; + delete[] str; if (part_name.empty()) { part_name = defaultname; } else { - bool ws=true; + bool ws = true; for (char it : part_name) { if (it != ' ') { ws = false; break; } } - if (ws) + if (ws) { part_name = defaultname; + } } } TopLoc_Location part_loc = loc; Handle(XCAFDoc_Location) hLoc; if (label.FindAttribute(XCAFDoc_Location::GetID(), hLoc)) { - if (isRef) + if (isRef) { part_loc = part_loc * hLoc->Get(); - else + } + else { part_loc = hLoc->Get(); + } } #ifdef FC_DEBUG Base::Console().Log("H:%d, N:%s, T:%d, A:%d, S:%d, C:%d, SS:%d, F:%d, R:%d, C:%d, SS:%d\n", - hash, - part_name.c_str(), - aShapeTool->IsTopLevel(label), - aShapeTool->IsAssembly(label), - aShapeTool->IsShape(label), - aShapeTool->IsCompound(label), - aShapeTool->IsSimpleShape(label), - aShapeTool->IsFree(label), - aShapeTool->IsReference(label), - aShapeTool->IsComponent(label), - aShapeTool->IsSubShape(label) - ); + hash, + part_name.c_str(), + aShapeTool->IsTopLevel(label), + aShapeTool->IsAssembly(label), + aShapeTool->IsShape(label), + aShapeTool->IsCompound(label), + aShapeTool->IsSimpleShape(label), + aShapeTool->IsFree(label), + aShapeTool->IsReference(label), + aShapeTool->IsComponent(label), + aShapeTool->IsSubShape(label)); #endif #if defined(OCAF_KEEP_PLACEMENT) @@ -215,44 +222,50 @@ void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc, if (isRef || myRefShapes.find(hash) == myRefShapes.end()) { TopoDS_Shape aShape; - if (isRef && aShapeTool->GetShape(label, aShape)) + if (isRef && aShapeTool->GetShape(label, aShape)) { myRefShapes.insert(aShape.HashCode(HashUpper)); + } if (aShapeTool->IsSimpleShape(label) && (isRef || aShapeTool->IsFree(label))) { - if (!asm_name.empty()) + if (!asm_name.empty()) { part_name = asm_name; + } - // TODO: The merge parameter (last one from createShape) should become an Importer/Exporter - // option within the FreeCAD preference menu - // Currently it is merging STEP Compound Shape into a single Shape Part::Feature which - // is an OpenCascade computed Compound - if (isRef) + // TODO: The merge parameter (last one from createShape) should become an + // Importer/Exporter option within the FreeCAD preference menu Currently it is merging + // STEP Compound Shape into a single Shape Part::Feature which is an OpenCascade + // computed Compound + if (isRef) { createShape(label, loc, part_name, lValue, this->merge); - else + } + else { createShape(label, part_loc, part_name, localValue, this->merge); + } } else { if (aShapeTool->IsSimpleShape(label)) { // We are not creating a list of Part::Feature in that case but just // a single Part::Feature which has as a Shape a Compound of the Subshapes contained // within the global shape - // This is standard behavior of many STEP reader and avoid to register a crazy amount of - // Shape within the Tree as STEP file do mostly contain large assemblies + // This is standard behavior of many STEP reader and avoid to register a crazy + // amount of Shape within the Tree as STEP file do mostly contain large assemblies return; } // This is probably an Assembly let's try to create a Compound with the name for (TDF_ChildIterator it(label); it.More(); it.Next()) { - if (isRef) + if (isRef) { loadShapes(it.Value(), part_loc, part_name, asm_name, false, localValue); - else + } + else { loadShapes(it.Value(), part_loc, part_name, asm_name, isRef, localValue); + } } if (!localValue.empty()) { if (aShapeTool->IsAssembly(label)) { - App::Part *pcPart = nullptr; - pcPart = static_cast(doc->addObject("App::Part",asm_name.c_str())); + App::Part* pcPart = nullptr; + pcPart = static_cast(doc->addObject("App::Part", asm_name.c_str())); pcPart->Label.setValue(asm_name); pcPart->addObjects(localValue); @@ -268,8 +281,11 @@ void ImportOCAF::loadShapes(const TDF_Label& label, const TopLoc_Location& loc, } } -void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, const std::string& name, - std::vector& lValue, bool mergeShape) +void ImportOCAF::createShape(const TDF_Label& label, + const TopLoc_Location& loc, + const std::string& name, + std::vector& lValue, + bool mergeShape) { const TopoDS_Shape& aShape = aShapeTool->GetShape(label); #ifdef HAVE_TBB @@ -280,8 +296,8 @@ void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPOUND) { TopExp_Explorer xp; int ctSolids = 0, ctShells = 0, ctVertices = 0, ctEdges = 0; - std::vector localValue; - App::Part *pcPart = nullptr; + std::vector localValue; + App::Part* pcPart = nullptr; if (mergeShape) { @@ -294,26 +310,26 @@ void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, TopoDS_Compound comp; builder.MakeCompound(comp); -/* - std::vector colors; - for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) { - Quantity_Color aColor; - App::Color color(0.8f,0.8f,0.8f); - if (aColorTool->GetColor(xp.Current(), XCAFDoc_ColorGen, aColor) || - aColorTool->GetColor(xp.Current(), XCAFDoc_ColorSurf, aColor) || - aColorTool->GetColor(xp.Current(), XCAFDoc_ColorCurv, aColor)) { - color.r = (float)aColor.Red(); - color.g = (float)aColor.Green(); - color.b = (float)aColor.Blue(); - colors.push_back(color); - } - } + /* + std::vector colors; + for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) { + Quantity_Color aColor; + App::Color color(0.8f,0.8f,0.8f); + if (aColorTool->GetColor(xp.Current(), XCAFDoc_ColorGen, aColor) || + aColorTool->GetColor(xp.Current(), XCAFDoc_ColorSurf, aColor) || + aColorTool->GetColor(xp.Current(), XCAFDoc_ColorCurv, aColor)) { + color.r = (float)aColor.Red(); + color.g = (float)aColor.Green(); + color.b = (float)aColor.Blue(); + colors.push_back(color); + } + } - if (colors.size() > 1) { - createShape(label, loc, name, lValue, false); - return; - } -*/ + if (colors.size() > 1) { + createShape(label, loc, name, lValue, false); + return; + } + */ for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) { const TopoDS_Shape& sh = xp.Current(); if (!sh.IsNull()) { @@ -344,7 +360,7 @@ void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, // Ok we got a Compound which is computed // Just need to add it to a Part::Feature and push it to lValue - if (!comp.IsNull() && (ctSolids||ctShells||ctEdges||ctVertices)) { + if (!comp.IsNull() && (ctSolids || ctShells || ctEdges || ctVertices)) { Part::Feature* part = static_cast(doc->addObject("Part::Feature")); // Let's allocate the relative placement of the Compound from the STEP file tryPlacementFromLoc(part, loc); @@ -371,7 +387,7 @@ void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, } if (!localValue.empty() && !mergeShape) { - pcPart = static_cast(doc->addObject("App::Part",name.c_str())); + pcPart = static_cast(doc->addObject("App::Part", name.c_str())); pcPart->Label.setValue(name); // localValue contain the objects that must added to the local Part @@ -379,39 +395,44 @@ void ImportOCAF::createShape(const TDF_Label& label, const TopLoc_Location& loc, pcPart->addObjects(localValue); // Let's compute relative placement of the Part -/* - gp_Trsf trf; - Base::Matrix4D mtrx; - if ( loc.IsIdentity() ) - trf = loc.Transformation(); - else - trf = TopLoc_Location(loc.FirstDatum()).Transformation(); - Part::TopoShape::convertToMatrix(trf, mtrx); - Base::Placement pl; - pl.fromMatrix(mtrx); - pcPart->Placement.setValue(pl); -*/ + /* + gp_Trsf trf; + Base::Matrix4D mtrx; + if ( loc.IsIdentity() ) + trf = loc.Transformation(); + else + trf = TopLoc_Location(loc.FirstDatum()).Transformation(); + Part::TopoShape::convertToMatrix(trf, mtrx); + Base::Placement pl; + pl.fromMatrix(mtrx); + pcPart->Placement.setValue(pl); + */ lValue.push_back(pcPart); } - if (ctSolids > 0 || ctShells > 0) + if (ctSolids > 0 || ctShells > 0) { return; + } } else if (!aShape.IsNull()) { createShape(aShape, loc, name, lValue); } } -void ImportOCAF::createShape(const TopoDS_Shape& aShape, const TopLoc_Location& loc, const std::string& name, +void ImportOCAF::createShape(const TopoDS_Shape& aShape, + const TopLoc_Location& loc, + const std::string& name, std::vector& lvalue) { Part::Feature* part = static_cast(doc->addObject("Part::Feature")); - if (!loc.IsIdentity()) + if (!loc.IsIdentity()) { // part->Shape.setValue(aShape.Moved(TopLoc_Location(loc.FirstDatum()))); part->Shape.setValue(aShape.Moved(loc)); - else + } + else { part->Shape.setValue(aShape); + } part->Label.setValue(name); lvalue.push_back(part); @@ -422,10 +443,10 @@ void ImportOCAF::createShape(const TopoDS_Shape& aShape, const TopLoc_Location& void ImportOCAF::loadColors(Part::Feature* part, const TopoDS_Shape& aShape) { Quantity_ColorRGBA aColor; - App::Color color(0.8f,0.8f,0.8f); - if (aColorTool->GetColor(aShape, XCAFDoc_ColorGen, aColor) || - aColorTool->GetColor(aShape, XCAFDoc_ColorSurf, aColor) || - aColorTool->GetColor(aShape, XCAFDoc_ColorCurv, aColor)) { + App::Color color(0.8f, 0.8f, 0.8f); + if (aColorTool->GetColor(aShape, XCAFDoc_ColorGen, aColor) + || aColorTool->GetColor(aShape, XCAFDoc_ColorSurf, aColor) + || aColorTool->GetColor(aShape, XCAFDoc_ColorCurv, aColor)) { color = convertColor(aColor); std::vector colors; colors.push_back(color); @@ -433,7 +454,7 @@ void ImportOCAF::loadColors(Part::Feature* part, const TopoDS_Shape& aShape) } TopTools_IndexedMapOfShape faces; - TopExp_Explorer xp(aShape,TopAbs_FACE); + TopExp_Explorer xp(aShape, TopAbs_FACE); while (xp.More()) { faces.Add(xp.Current()); xp.Next(); @@ -442,14 +463,14 @@ void ImportOCAF::loadColors(Part::Feature* part, const TopoDS_Shape& aShape) bool found_face_color = false; std::vector faceColors; faceColors.resize(faces.Extent(), color); - xp.Init(aShape,TopAbs_FACE); + xp.Init(aShape, TopAbs_FACE); while (xp.More()) { - if (aColorTool->GetColor(xp.Current(), XCAFDoc_ColorGen, aColor) || - aColorTool->GetColor(xp.Current(), XCAFDoc_ColorSurf, aColor) || - aColorTool->GetColor(xp.Current(), XCAFDoc_ColorCurv, aColor)) { + if (aColorTool->GetColor(xp.Current(), XCAFDoc_ColorGen, aColor) + || aColorTool->GetColor(xp.Current(), XCAFDoc_ColorSurf, aColor) + || aColorTool->GetColor(xp.Current(), XCAFDoc_ColorCurv, aColor)) { int index = faces.FindIndex(xp.Current()); color = convertColor(aColor); - faceColors[index-1] = color; + faceColors[index - 1] = color; found_face_color = true; } xp.Next(); @@ -464,8 +485,7 @@ void ImportOCAF::loadColors(Part::Feature* part, const TopoDS_Shape& aShape) ImportOCAFCmd::ImportOCAFCmd(Handle(TDocStd_Document) h, App::Document* d, const std::string& name) : ImportOCAF(h, d, name) -{ -} +{} void ImportOCAFCmd::applyColors(Part::Feature* part, const std::vector& colors) { @@ -475,9 +495,11 @@ void ImportOCAFCmd::applyColors(Part::Feature* part, const std::vectorMain()); + aShapeTool = XCAFDoc_DocumentTool::ShapeTool(hdoc->Main()); hColors = XCAFDoc_DocumentTool::ColorTool(hdoc->Main()); } @@ -487,11 +509,11 @@ void ImportXCAF::loadShapes() { // collect sequence of labels to display TDF_LabelSequence shapeLabels, colorLabels; - aShapeTool->GetFreeShapes (shapeLabels); + aShapeTool->GetFreeShapes(shapeLabels); hColors->GetColors(colorLabels); // set presentations and show - for (Standard_Integer i=1; i <= shapeLabels.Length(); i++ ) { + for (Standard_Integer i = 1; i <= shapeLabels.Length(); i++) { // get the shapes and attributes const TDF_Label& label = shapeLabels.Value(i); loadShapes(label); @@ -530,8 +552,8 @@ void ImportXCAF::createShape(const TopoDS_Shape& shape, bool perface, bool setna std::map::const_iterator jt; jt = myColorMap.find(shape.HashCode(INT_MAX)); - App::Color partColor(0.8f,0.8f,0.8f); -#if 0//TODO + App::Color partColor(0.8f, 0.8f, 0.8f); +#if 0 // TODO Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(part); if (vp && vp->isDerivedFrom(PartGui::ViewProviderPart::getClassTypeId())) { if (jt != myColorMap.end()) { @@ -558,7 +580,7 @@ void ImportXCAF::createShape(const TopoDS_Shape& shape, bool perface, bool setna // check for colors per face if (perface && !myColorMap.empty()) { TopTools_IndexedMapOfShape faces; - TopExp_Explorer xp(shape,TopAbs_FACE); + TopExp_Explorer xp(shape, TopAbs_FACE); while (xp.More()) { faces.Add(xp.Current()); xp.Next(); @@ -567,19 +589,19 @@ void ImportXCAF::createShape(const TopoDS_Shape& shape, bool perface, bool setna bool found_face_color = false; std::vector faceColors; faceColors.resize(faces.Extent(), partColor); - xp.Init(shape,TopAbs_FACE); + xp.Init(shape, TopAbs_FACE); while (xp.More()) { jt = myColorMap.find(xp.Current().HashCode(INT_MAX)); if (jt != myColorMap.end()) { int index = faces.FindIndex(xp.Current()); - faceColors[index-1] = convertColor(jt->second); + faceColors[index - 1] = convertColor(jt->second); found_face_color = true; } xp.Next(); } if (found_face_color) { -#if 0//TODO +#if 0 // TODO Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(part); if (vp && vp->isDerivedFrom(PartGui::ViewProviderPartExt::getClassTypeId())) { static_cast(vp)->DiffuseColor.setValues(faceColors); @@ -592,53 +614,60 @@ void ImportXCAF::createShape(const TopoDS_Shape& shape, bool perface, bool setna void ImportXCAF::loadShapes(const TDF_Label& label) { TopoDS_Shape aShape; - if (aShapeTool->GetShape(label,aShape)) { - //if (aShapeTool->IsReference(label)) { - // TDF_Label reflabel; - // if (aShapeTool->GetReferredShape(label, reflabel)) { - // loadShapes(reflabel); - // } - //} + if (aShapeTool->GetShape(label, aShape)) { + // if (aShapeTool->IsReference(label)) { + // TDF_Label reflabel; + // if (aShapeTool->GetReferredShape(label, reflabel)) { + // loadShapes(reflabel); + // } + // } if (aShapeTool->IsTopLevel(label)) { int ctSolids = 0, ctShells = 0, ctComps = 0; // add the shapes TopExp_Explorer xp; - for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) + for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) { this->mySolids[xp.Current().HashCode(INT_MAX)] = (xp.Current()); - for (xp.Init(aShape, TopAbs_SHELL, TopAbs_SOLID); xp.More(); xp.Next(), ctShells++) + } + for (xp.Init(aShape, TopAbs_SHELL, TopAbs_SOLID); xp.More(); xp.Next(), ctShells++) { this->myShells[xp.Current().HashCode(INT_MAX)] = (xp.Current()); + } // if no solids and no shells were found then go for compounds if (ctSolids == 0 && ctShells == 0) { - for (xp.Init(aShape, TopAbs_COMPOUND); xp.More(); xp.Next(), ctComps++) + for (xp.Init(aShape, TopAbs_COMPOUND); xp.More(); xp.Next(), ctComps++) { this->myCompds[xp.Current().HashCode(INT_MAX)] = (xp.Current()); + } } if (ctComps == 0) { - for (xp.Init(aShape, TopAbs_FACE, TopAbs_SHELL); xp.More(); xp.Next()) + for (xp.Init(aShape, TopAbs_FACE, TopAbs_SHELL); xp.More(); xp.Next()) { this->myShapes[xp.Current().HashCode(INT_MAX)] = (xp.Current()); - for (xp.Init(aShape, TopAbs_WIRE, TopAbs_FACE); xp.More(); xp.Next()) + } + for (xp.Init(aShape, TopAbs_WIRE, TopAbs_FACE); xp.More(); xp.Next()) { this->myShapes[xp.Current().HashCode(INT_MAX)] = (xp.Current()); - for (xp.Init(aShape, TopAbs_EDGE, TopAbs_WIRE); xp.More(); xp.Next()) + } + for (xp.Init(aShape, TopAbs_EDGE, TopAbs_WIRE); xp.More(); xp.Next()) { this->myShapes[xp.Current().HashCode(INT_MAX)] = (xp.Current()); - for (xp.Init(aShape, TopAbs_VERTEX, TopAbs_EDGE); xp.More(); xp.Next()) + } + for (xp.Init(aShape, TopAbs_VERTEX, TopAbs_EDGE); xp.More(); xp.Next()) { this->myShapes[xp.Current().HashCode(INT_MAX)] = (xp.Current()); + } } } // getting color Quantity_ColorRGBA col; - if (hColors->GetColor(label, XCAFDoc_ColorGen, col) || - hColors->GetColor(label, XCAFDoc_ColorSurf, col) || - hColors->GetColor(label, XCAFDoc_ColorCurv, col)) { + if (hColors->GetColor(label, XCAFDoc_ColorGen, col) + || hColors->GetColor(label, XCAFDoc_ColorSurf, col) + || hColors->GetColor(label, XCAFDoc_ColorCurv, col)) { // add defined color myColorMap[aShape.HashCode(INT_MAX)] = col; } else { // http://www.opencascade.org/org/forum/thread_17107/ TopoDS_Iterator it; - for (it.Initialize(aShape);it.More(); it.Next()) { - if (hColors->GetColor(it.Value(), XCAFDoc_ColorGen, col) || - hColors->GetColor(it.Value(), XCAFDoc_ColorSurf, col) || - hColors->GetColor(it.Value(), XCAFDoc_ColorCurv, col)) { + for (it.Initialize(aShape); it.More(); it.Next()) { + if (hColors->GetColor(it.Value(), XCAFDoc_ColorGen, col) + || hColors->GetColor(it.Value(), XCAFDoc_ColorSurf, col) + || hColors->GetColor(it.Value(), XCAFDoc_ColorCurv, col)) { // add defined color myColorMap[it.Value().HashCode(INT_MAX)] = col; } @@ -647,14 +676,15 @@ void ImportXCAF::loadShapes(const TDF_Label& label) // getting names Handle(TDataStd_Name) name; - if (label.FindAttribute(TDataStd_Name::GetID(),name)) { + if (label.FindAttribute(TDataStd_Name::GetID(), name)) { TCollection_ExtendedString extstr = name->Get(); - char* str = new char[extstr.LengthOfCString()+1]; + char* str = new char[extstr.LengthOfCString() + 1]; extstr.ToUTF8CString(str); std::string labelName(str); - if (!labelName.empty()) + if (!labelName.empty()) { myNameMap[aShape.HashCode(INT_MAX)] = labelName; - delete [] str; + } + delete[] str; } #if 0 diff --git a/src/Mod/Import/App/ImportOCAF.h b/src/Mod/Import/App/ImportOCAF.h index 65549e32a7..3b323b55a4 100644 --- a/src/Mod/Import/App/ImportOCAF.h +++ b/src/Mod/Import/App/ImportOCAF.h @@ -43,15 +43,18 @@ class TDF_Label; class TopLoc_Location; -namespace App { +namespace App +{ class Document; class DocumentObject; -} -namespace Part { +} // namespace App +namespace Part +{ class Feature; } -namespace Import { +namespace Import +{ class ImportExport ImportOCAF { @@ -62,11 +65,24 @@ public: void setMerge(bool); private: - void loadShapes(const TDF_Label& label, const TopLoc_Location&, const std::string& partname, const std::string& assembly, bool isRef, std::vector &); - void createShape(const TDF_Label& label, const TopLoc_Location&, const std::string&, std::vector &, bool); - void createShape(const TopoDS_Shape& label, const TopLoc_Location&, const std::string&, std::vector &); + void loadShapes(const TDF_Label& label, + const TopLoc_Location&, + const std::string& partname, + const std::string& assembly, + bool isRef, + std::vector&); + void createShape(const TDF_Label& label, + const TopLoc_Location&, + const std::string&, + std::vector&, + bool); + void createShape(const TopoDS_Shape& label, + const TopLoc_Location&, + const std::string&, + std::vector&); void loadColors(Part::Feature* part, const TopoDS_Shape& aShape); - virtual void applyColors(Part::Feature*, const std::vector&){} + virtual void applyColors(Part::Feature*, const std::vector&) + {} static void tryPlacementFromLoc(App::GeoFeature*, const TopLoc_Location&); static void tryPlacementFromMatrix(App::GeoFeature*, const Base::Matrix4D&); @@ -75,17 +91,18 @@ private: App::Document* doc; Handle(XCAFDoc_ShapeTool) aShapeTool; Handle(XCAFDoc_ColorTool) aColorTool; - bool merge{true}; + bool merge {true}; std::string default_name; std::set myRefShapes; static const int HashUpper = INT_MAX; }; -class ImportExport ImportOCAFCmd : public ImportOCAF +class ImportExport ImportOCAFCmd: public ImportOCAF { public: ImportOCAFCmd(Handle(TDocStd_Document) h, App::Document* d, const std::string& name); - std::map > getPartColorsMap() const { + std::map> getPartColorsMap() const + { return partColors; } @@ -93,7 +110,7 @@ private: void applyColors(Part::Feature* part, const std::vector& colors) override; private: - std::map > partColors; + std::map> partColors; }; class ImportXCAF @@ -104,9 +121,10 @@ public: void loadShapes(); private: - void createShape(const TopoDS_Shape& shape, bool perface=false, bool setname=false) const; + void createShape(const TopoDS_Shape& shape, bool perface = false, bool setname = false) const; void loadShapes(const TDF_Label& label); - virtual void applyColors(Part::Feature*, const std::vector&){} + virtual void applyColors(Part::Feature*, const std::vector&) + {} private: Handle(TDocStd_Document) hdoc; @@ -122,6 +140,6 @@ private: std::map myNameMap; }; -} +} // namespace Import -#endif //IMPORT_IMPORTOCAF_H +#endif // IMPORT_IMPORTOCAF_H diff --git a/src/Mod/Import/App/ImportOCAF2.cpp b/src/Mod/Import/App/ImportOCAF2.cpp index 5156c2e904..7946aedd2c 100644 --- a/src/Mod/Import/App/ImportOCAF2.cpp +++ b/src/Mod/Import/App/ImportOCAF2.cpp @@ -22,32 +22,32 @@ #include "PreCompiled.h" #if defined(__MINGW32__) -# define WNT // avoid conflict with GUID +#define WNT // avoid conflict with GUID #endif #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include -#include #include +#include #include #include @@ -66,18 +66,18 @@ #if OCC_VERSION_HEX >= 0x070500 // See https://dev.opencascade.org/content/occt-3d-viewer-becomes-srgb-aware -# define OCC_COLOR_SPACE Quantity_TOC_sRGB +#define OCC_COLOR_SPACE Quantity_TOC_sRGB #else -# define OCC_COLOR_SPACE Quantity_TOC_RGB +#define OCC_COLOR_SPACE Quantity_TOC_RGB #endif -FC_LOG_LEVEL_INIT("Import",true,true) +FC_LOG_LEVEL_INIT("Import", true, true) using namespace Import; ///////////////////////////////////////////////////////////////////// -static inline App::Color convertColor(const Quantity_ColorRGBA &c) +static inline App::Color convertColor(const Quantity_ColorRGBA& c) { Standard_Real r, g, b; c.GetRGB().Values(r, g, b, OCC_COLOR_SPACE); @@ -87,23 +87,27 @@ static inline App::Color convertColor(const Quantity_ColorRGBA &c) 1.0f - static_cast(c.Alpha())); } -static inline Quantity_ColorRGBA convertColor(const App::Color &c) +static inline Quantity_ColorRGBA convertColor(const App::Color& c) { return Quantity_ColorRGBA(Quantity_Color(c.r, c.g, c.b, OCC_COLOR_SPACE), 1.0f - c.a); } -static inline std::ostream& operator<<(std::ostream& os, const Quantity_ColorRGBA &c) { +static inline std::ostream& operator<<(std::ostream& os, const Quantity_ColorRGBA& c) +{ App::Color color = convertColor(c); - auto toHex = [](float v) {return boost::format("%02X") % static_cast(v*255);}; + auto toHex = [](float v) { + return boost::format("%02X") % static_cast(v * 255); + }; return os << "#" << toHex(color.r) << toHex(color.g) << toHex(color.b) << toHex(color.a); } -static std::string labelName(TDF_Label label) { +static std::string labelName(TDF_Label label) +{ std::string txt; Handle(TDataStd_Name) name; - if (!label.IsNull() && label.FindAttribute(TDataStd_Name::GetID(),name)) { + if (!label.IsNull() && label.FindAttribute(TDataStd_Name::GetID(), name)) { TCollection_ExtendedString extstr = name->Get(); - char* str = new char[extstr.LengthOfCString()+1]; + char* str = new char[extstr.LengthOfCString() + 1]; extstr.ToUTF8CString(str); txt = str; delete[] str; @@ -112,52 +116,63 @@ static std::string labelName(TDF_Label label) { return txt; } -static void printLabel(TDF_Label label, Handle(XCAFDoc_ShapeTool) aShapeTool, - Handle(XCAFDoc_ColorTool) aColorTool, const char *msg = nullptr) +static void printLabel(TDF_Label label, + Handle(XCAFDoc_ShapeTool) aShapeTool, + Handle(XCAFDoc_ColorTool) aColorTool, + const char* msg = nullptr) { - if(label.IsNull() || !FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) + if (label.IsNull() || !FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) { return; - if(!msg) msg = "Label: "; - TCollection_AsciiString entry; - TDF_Tool::Entry(label,entry); - std::ostringstream ss; - ss << msg << entry << ", " << labelName(label) - << (aShapeTool->IsShape(label)?", shape":"") - << (aShapeTool->IsTopLevel(label)?", topLevel":"") - << (aShapeTool->IsFree(label)?", free":"") - << (aShapeTool->IsAssembly(label)?", assembly":"") - << (aShapeTool->IsSimpleShape(label)?", simple":"") - << (aShapeTool->IsCompound(label)?", compound":"") - << (aShapeTool->IsReference(label)?", reference":"") - << (aShapeTool->IsComponent(label)?", component":"") - << (aShapeTool->IsSubShape(label)?", subshape":""); - if(aShapeTool->IsSubShape(label)) { - auto shape = aShapeTool->GetShape(label); - if(!shape.IsNull()) - ss << ", " << Part::TopoShape::shapeName(shape.ShapeType(),true); } - if(aShapeTool->IsShape(label)) { + if (!msg) { + msg = "Label: "; + } + TCollection_AsciiString entry; + TDF_Tool::Entry(label, entry); + std::ostringstream ss; + ss << msg << entry << ", " << labelName(label) << (aShapeTool->IsShape(label) ? ", shape" : "") + << (aShapeTool->IsTopLevel(label) ? ", topLevel" : "") + << (aShapeTool->IsFree(label) ? ", free" : "") + << (aShapeTool->IsAssembly(label) ? ", assembly" : "") + << (aShapeTool->IsSimpleShape(label) ? ", simple" : "") + << (aShapeTool->IsCompound(label) ? ", compound" : "") + << (aShapeTool->IsReference(label) ? ", reference" : "") + << (aShapeTool->IsComponent(label) ? ", component" : "") + << (aShapeTool->IsSubShape(label) ? ", subshape" : ""); + if (aShapeTool->IsSubShape(label)) { + auto shape = aShapeTool->GetShape(label); + if (!shape.IsNull()) { + ss << ", " << Part::TopoShape::shapeName(shape.ShapeType(), true); + } + } + if (aShapeTool->IsShape(label)) { Quantity_ColorRGBA c; - if(aColorTool->GetColor(label,XCAFDoc_ColorGen,c)) + if (aColorTool->GetColor(label, XCAFDoc_ColorGen, c)) { ss << ", gc: " << c; - if(aColorTool->GetColor(label,XCAFDoc_ColorSurf,c)) + } + if (aColorTool->GetColor(label, XCAFDoc_ColorSurf, c)) { ss << ", sc: " << c; - if(aColorTool->GetColor(label,XCAFDoc_ColorCurv,c)) + } + if (aColorTool->GetColor(label, XCAFDoc_ColorCurv, c)) { ss << ", cc: " << c; + } } ss << std::endl; - Base::Console().Notify("ImportOCAF2",ss.str().c_str()); + Base::Console().Notify("ImportOCAF2", ss.str().c_str()); } -static void dumpLabels(TDF_Label label, Handle(XCAFDoc_ShapeTool) aShapeTool, - Handle(XCAFDoc_ColorTool) aColorTool, int depth=0) +static void dumpLabels(TDF_Label label, + Handle(XCAFDoc_ShapeTool) aShapeTool, + Handle(XCAFDoc_ColorTool) aColorTool, + int depth = 0) { - std::string indent(depth*2,' '); - printLabel(label,aShapeTool,aColorTool,indent.c_str()); + std::string indent(depth * 2, ' '); + printLabel(label, aShapeTool, aColorTool, indent.c_str()); TDF_ChildIterator it; - for (it.Initialize(label); it.More(); it.Next()) - dumpLabels(it.Value(),aShapeTool,aColorTool,depth+1); + for (it.Initialize(label); it.More(); it.Next()) { + dumpLabels(it.Value(), aShapeTool, aColorTool, depth + 1); + } } ///////////////////////////////////////////////////////////////////// @@ -172,9 +187,11 @@ ImportOCAFOptions::ImportOCAFOptions() } ImportOCAF2::ImportOCAF2(Handle(TDocStd_Document) h, App::Document* d, const std::string& name) - : pDoc(h), pDocument(d), default_name(name) + : pDoc(h) + , pDocument(d) + , default_name(name) { - aShapeTool = XCAFDoc_DocumentTool::ShapeTool (pDoc->Main()); + aShapeTool = XCAFDoc_DocumentTool::ShapeTool(pDoc->Main()); aColorTool = XCAFDoc_DocumentTool::ColorTool(pDoc->Main()); if (d->isSaved()) { @@ -201,11 +218,15 @@ ImportOCAFOptions ImportOCAF2::customImportOptions() defaultOptions.expandCompound = settings.getExpandCompound(); defaultOptions.mode = static_cast(settings.getImportMode()); - auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); - defaultOptions.defaultFaceColor.setPackedValue(hGrp->GetUnsigned("DefaultShapeColor", defaultOptions.defaultFaceColor.getPackedValue())); + auto hGrp = + App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + defaultOptions.defaultFaceColor.setPackedValue( + hGrp->GetUnsigned("DefaultShapeColor", defaultOptions.defaultFaceColor.getPackedValue())); defaultOptions.defaultFaceColor.a = 0; - defaultOptions.defaultEdgeColor.setPackedValue(hGrp->GetUnsigned("DefaultShapeLineColor", defaultOptions.defaultEdgeColor.getPackedValue())); + defaultOptions.defaultEdgeColor.setPackedValue( + hGrp->GetUnsigned("DefaultShapeLineColor", + defaultOptions.defaultEdgeColor.getPackedValue())); defaultOptions.defaultEdgeColor.a = 0; return defaultOptions; @@ -227,7 +248,7 @@ void ImportOCAF2::setUseLinkGroup(bool enable) void ImportOCAF2::setMode(int m) { - if (m<0 || m >= ModeMax) { + if (m < 0 || m >= ModeMax) { FC_WARN("Invalid import mode " << m); } else { @@ -245,85 +266,98 @@ void ImportOCAF2::setMode(int m) } } -static void setPlacement(App::PropertyPlacement *prop, const TopoDS_Shape &shape) { - prop->setValue(Base::Placement( - Part::TopoShape::convert(shape.Location().Transformation()))*prop->getValue()); +static void setPlacement(App::PropertyPlacement* prop, const TopoDS_Shape& shape) +{ + prop->setValue(Base::Placement(Part::TopoShape::convert(shape.Location().Transformation())) + * prop->getValue()); } -std::string ImportOCAF2::getLabelName(TDF_Label label) { +std::string ImportOCAF2::getLabelName(TDF_Label label) +{ std::string name; - if(label.IsNull()) + if (label.IsNull()) { return name; - if(!XCAFDoc_ShapeTool::IsReference(label)) + } + if (!XCAFDoc_ShapeTool::IsReference(label)) { return labelName(label); - if(!options.useBaseName) + } + if (!options.useBaseName) { name = labelName(label); + } TDF_Label ref; - if(name.empty() && XCAFDoc_ShapeTool::GetReferredShape(label,ref)) + if (name.empty() && XCAFDoc_ShapeTool::GetReferredShape(label, ref)) { name = labelName(ref); + } return name; } -void ImportOCAF2::setObjectName(Info &info, TDF_Label label) { - if(!info.obj) +void ImportOCAF2::setObjectName(Info& info, TDF_Label label) +{ + if (!info.obj) { return; + } info.baseName = getLabelName(label); - if(!info.baseName.empty()) + if (!info.baseName.empty()) { info.obj->Label.setValue(info.baseName.c_str()); - else{ + } + else { auto linked = info.obj->getLinkedObject(false); - if(!linked || linked==info.obj) + if (!linked || linked == info.obj) { return; + } info.obj->Label.setValue(linked->Label.getValue()); } } -bool ImportOCAF2::getColor(const TopoDS_Shape &shape, Info &info, bool check, bool noDefault) { +bool ImportOCAF2::getColor(const TopoDS_Shape& shape, Info& info, bool check, bool noDefault) +{ bool ret = false; Quantity_ColorRGBA aColor; - if(aColorTool->GetColor(shape, XCAFDoc_ColorSurf, aColor)) { + if (aColorTool->GetColor(shape, XCAFDoc_ColorSurf, aColor)) { App::Color c = convertColor(aColor); - if(!check || info.faceColor!=c) { + if (!check || info.faceColor != c) { info.faceColor = c; info.hasFaceColor = true; ret = true; } } - if(!noDefault && !info.hasFaceColor && aColorTool->GetColor(shape, XCAFDoc_ColorGen, aColor)) { + if (!noDefault && !info.hasFaceColor && aColorTool->GetColor(shape, XCAFDoc_ColorGen, aColor)) { App::Color c = convertColor(aColor); - if(!check || info.faceColor!=c) { + if (!check || info.faceColor != c) { info.faceColor = c; info.hasFaceColor = true; ret = true; } } - if(aColorTool->GetColor(shape, XCAFDoc_ColorCurv, aColor)) { + if (aColorTool->GetColor(shape, XCAFDoc_ColorCurv, aColor)) { App::Color c = convertColor(aColor); // Some STEP include a curve color with the same value of the face // color. And this will look weird in FC. So for shape with face // we'll ignore the curve color, if it is the same as the face color. - if((c!=info.faceColor || !TopExp_Explorer(shape,TopAbs_FACE).More()) && - (!check || info.edgeColor!=c)) - { + if ((c != info.faceColor || !TopExp_Explorer(shape, TopAbs_FACE).More()) + && (!check || info.edgeColor != c)) { info.edgeColor = c; info.hasEdgeColor = true; ret = true; } } - if(!check) { - if(!info.hasFaceColor) + if (!check) { + if (!info.hasFaceColor) { info.faceColor = options.defaultFaceColor; - if(!info.hasEdgeColor) + } + if (!info.hasEdgeColor) { info.edgeColor = options.defaultEdgeColor; + } } return ret; } -App::DocumentObject *ImportOCAF2::expandShape( - App::Document *doc, TDF_Label label, const TopoDS_Shape &shape) +App::DocumentObject* +ImportOCAF2::expandShape(App::Document* doc, TDF_Label label, const TopoDS_Shape& shape) { - if(shape.IsNull() || !TopExp_Explorer(shape,TopAbs_VERTEX).More()) + if (shape.IsNull() || !TopExp_Explorer(shape, TopAbs_VERTEX).More()) { return nullptr; + } // When saved as compound, STEP file does not support instance sharing, // meaning that even if the source compound may contain child shapes of @@ -343,43 +377,49 @@ App::DocumentObject *ImportOCAF2::expandShape( #endif std::vector objs; - if(shape.ShapeType() == TopAbs_COMPOUND) { - for(TopoDS_Iterator it(shape,Standard_False,Standard_False);it.More();it.Next()) { + if (shape.ShapeType() == TopAbs_COMPOUND) { + for (TopoDS_Iterator it(shape, Standard_False, Standard_False); it.More(); it.Next()) { TDF_Label childLabel; - if(!label.IsNull()) - aShapeTool->FindSubShape(label,it.Value(),childLabel); - auto child = expandShape(doc,childLabel,it.Value()); - if(child) { + if (!label.IsNull()) { + aShapeTool->FindSubShape(label, it.Value(), childLabel); + } + auto child = expandShape(doc, childLabel, it.Value()); + if (child) { objs.push_back(child); Info info; info.free = false; info.obj = child; - myShapes.emplace(it.Value().Located(TopLoc_Location()),info); + myShapes.emplace(it.Value().Located(TopLoc_Location()), info); } } - if(objs.empty()) + if (objs.empty()) { return nullptr; - auto compound = static_cast(doc->addObject("Part::Compound2","Compound")); + } + auto compound = + static_cast(doc->addObject("Part::Compound2", "Compound")); compound->Links.setValues(objs); // compound->Visibility.setValue(false); - setPlacement(&compound->Placement,shape); + setPlacement(&compound->Placement, shape); return compound; } Info info; info.obj = nullptr; - createObject(doc,label,shape,info,false); + createObject(doc, label, shape, info, false); return info.obj; } -bool ImportOCAF2::createObject(App::Document *doc, TDF_Label label, - const TopoDS_Shape &shape, Info &info, bool newDoc) +bool ImportOCAF2::createObject(App::Document* doc, + TDF_Label label, + const TopoDS_Shape& shape, + Info& info, + bool newDoc) { - if(shape.IsNull() || !TopExp_Explorer(shape,TopAbs_VERTEX).More()) { + if (shape.IsNull() || !TopExp_Explorer(shape, TopAbs_VERTEX).More()) { FC_WARN(labelName(label) << " has empty shape"); return false; } - getColor(shape,info); + getColor(shape, info); bool hasFaceColors = false; bool hasEdgeColors = false; @@ -388,62 +428,67 @@ bool ImportOCAF2::createObject(App::Document *doc, TDF_Label label, std::vector edgeColors; TDF_LabelSequence seq; - if(!label.IsNull() && aShapeTool->GetSubShapes(label,seq)) { + if (!label.IsNull() && aShapeTool->GetSubShapes(label, seq)) { - TopTools_IndexedMapOfShape faceMap,edgeMap; + TopTools_IndexedMapOfShape faceMap, edgeMap; TopExp::MapShapes(tshape.getShape(), TopAbs_FACE, faceMap); TopExp::MapShapes(tshape.getShape(), TopAbs_EDGE, edgeMap); - faceColors.assign(faceMap.Extent(),info.faceColor); - edgeColors.assign(edgeMap.Extent(),info.edgeColor); + faceColors.assign(faceMap.Extent(), info.faceColor); + edgeColors.assign(edgeMap.Extent(), info.edgeColor); // Two passes to get sub shape colors. First pass, look for solid, and // second pass look for face and edges. This allows lower level // subshape to override color of higher level ones. - for(int j=0;j<2;++j) { - for(int i=1;i<=seq.Length();++i) { + for (int j = 0; j < 2; ++j) { + for (int i = 1; i <= seq.Length(); ++i) { TDF_Label l = seq.Value(i); TopoDS_Shape subShape = aShapeTool->GetShape(l); - if(subShape.IsNull()) + if (subShape.IsNull()) { continue; - if(subShape.ShapeType()==TopAbs_FACE || subShape.ShapeType()==TopAbs_EDGE) { - if(j==0) + } + if (subShape.ShapeType() == TopAbs_FACE || subShape.ShapeType() == TopAbs_EDGE) { + if (j == 0) { continue; - }else if(j!=0) + } + } + else if (j != 0) { continue; + } - bool foundFaceColor=false,foundEdgeColor=false; - App::Color faceColor,edgeColor; + bool foundFaceColor = false, foundEdgeColor = false; + App::Color faceColor, edgeColor; Quantity_ColorRGBA aColor; - if(aColorTool->GetColor(l, XCAFDoc_ColorSurf, aColor) || - aColorTool->GetColor(l, XCAFDoc_ColorGen, aColor)) - { + if (aColorTool->GetColor(l, XCAFDoc_ColorSurf, aColor) + || aColorTool->GetColor(l, XCAFDoc_ColorGen, aColor)) { faceColor = convertColor(aColor); foundFaceColor = true; } - if(aColorTool->GetColor(l, XCAFDoc_ColorCurv, aColor)) { + if (aColorTool->GetColor(l, XCAFDoc_ColorCurv, aColor)) { edgeColor = convertColor(aColor); foundEdgeColor = true; - if(j==0 && foundFaceColor && !faceColors.empty() && edgeColor==faceColor) { + if (j == 0 && foundFaceColor && !faceColors.empty() && edgeColor == faceColor) { // Do not set edge the same color as face foundEdgeColor = false; } } - if(foundFaceColor) { - for(TopExp_Explorer exp(subShape,TopAbs_FACE);exp.More();exp.Next()) { - int idx = faceMap.FindIndex(exp.Current())-1; - if(idx>=0 && idx<(int)faceColors.size()) { + if (foundFaceColor) { + for (TopExp_Explorer exp(subShape, TopAbs_FACE); exp.More(); exp.Next()) { + int idx = faceMap.FindIndex(exp.Current()) - 1; + if (idx >= 0 && idx < (int)faceColors.size()) { faceColors[idx] = faceColor; hasFaceColors = true; info.hasFaceColor = true; - }else + } + else { assert(0); + } } } - if(foundEdgeColor) { - for(TopExp_Explorer exp(subShape,TopAbs_EDGE);exp.More();exp.Next()) { - int idx = edgeMap.FindIndex(exp.Current())-1; - if(idx>=0 && idx<(int)edgeColors.size()) { + if (foundEdgeColor) { + for (TopExp_Explorer exp(subShape, TopAbs_EDGE); exp.More(); exp.Next()) { + int idx = edgeMap.FindIndex(exp.Current()) - 1; + if (idx >= 0 && idx < (int)edgeColors.size()) { edgeColors[idx] = edgeColor; hasEdgeColors = true; info.hasEdgeColor = true; @@ -454,58 +499,67 @@ bool ImportOCAF2::createObject(App::Document *doc, TDF_Label label, } } - Part::Feature *feature; + Part::Feature* feature; - if(newDoc && (options.mode == ObjectPerDoc || - options.mode == ObjectPerDir)) - doc = getDocument(doc,label); + if (newDoc && (options.mode == ObjectPerDoc || options.mode == ObjectPerDir)) { + doc = getDocument(doc, label); + } - if(options.expandCompound && - (tshape.countSubShapes(TopAbs_SOLID)>1 || - (!tshape.countSubShapes(TopAbs_SOLID) && tshape.countSubShapes(TopAbs_SHELL)>1))) - { - feature = dynamic_cast(expandShape(doc,label,shape)); + if (options.expandCompound + && (tshape.countSubShapes(TopAbs_SOLID) > 1 + || (!tshape.countSubShapes(TopAbs_SOLID) && tshape.countSubShapes(TopAbs_SHELL) > 1))) { + feature = dynamic_cast(expandShape(doc, label, shape)); assert(feature); - } else { - feature = static_cast(doc->addObject("Part::Feature",tshape.shapeName().c_str())); + } + else { + feature = static_cast( + doc->addObject("Part::Feature", tshape.shapeName().c_str())); feature->Shape.setValue(shape); // feature->Visibility.setValue(false); } - applyFaceColors(feature,{info.faceColor}); - applyEdgeColors(feature,{info.edgeColor}); - if(hasFaceColors) - applyFaceColors(feature,faceColors); - if(hasEdgeColors) - applyEdgeColors(feature,edgeColors); + applyFaceColors(feature, {info.faceColor}); + applyEdgeColors(feature, {info.edgeColor}); + if (hasFaceColors) { + applyFaceColors(feature, faceColors); + } + if (hasEdgeColors) { + applyEdgeColors(feature, edgeColors); + } info.propPlacement = &feature->Placement; info.obj = feature; return true; } -App::Document *ImportOCAF2::getDocument(App::Document *doc, TDF_Label label) { - if(filePath.empty() || options.mode==SingleDoc || options.merge) +App::Document* ImportOCAF2::getDocument(App::Document* doc, TDF_Label label) +{ + if (filePath.empty() || options.mode == SingleDoc || options.merge) { return doc; + } auto name = getLabelName(label); - if(name.empty()) + if (name.empty()) { return doc; + } - auto newDoc = App::GetApplication().newDocument(name.c_str(),name.c_str(),false); + auto newDoc = App::GetApplication().newDocument(name.c_str(), name.c_str(), false); std::ostringstream ss; Base::FileInfo fi(doc->FileName.getValue()); std::string path = fi.dirPath(); - if(options.mode == GroupPerDir || options.mode == ObjectPerDir) { - for(int i=0;i<1000;++i) { + if (options.mode == GroupPerDir || options.mode == ObjectPerDir) { + for (int i = 0; i < 1000; ++i) { ss.str(""); ss << path << '/' << fi.fileNamePure() << "_parts"; - if(i>0) + if (i > 0) { ss << '_' << std::setfill('0') << std::setw(3) << i; + } Base::FileInfo fi2(ss.str()); - if(fi2.exists()) { - if(!fi2.isDir()) + if (fi2.exists()) { + if (!fi2.isDir()) { continue; - }else if(!fi2.createDirectory()) { + } + } + else if (!fi2.createDirectory()) { FC_WARN("Failed to create directory " << fi2.filePath()); break; } @@ -513,15 +567,17 @@ App::Document *ImportOCAF2::getDocument(App::Document *doc, TDF_Label label) { break; } } - for(int i=0;i<1000;++i) { + for (int i = 0; i < 1000; ++i) { ss.str(""); ss << path << '/' << newDoc->getName() << ".fcstd"; - if(i>0) + if (i > 0) { ss << '_' << std::setfill('0') << std::setw(3) << i; + } Base::FileInfo fi(ss.str()); - if(!fi.exists()) { - if(!newDoc->saveAs(fi.filePath().c_str())) + if (!fi.exists()) { + if (!newDoc->saveAs(fi.filePath().c_str())) { break; + } return newDoc; } } @@ -530,32 +586,38 @@ App::Document *ImportOCAF2::getDocument(App::Document *doc, TDF_Label label) { return doc; } -bool ImportOCAF2::createGroup(App::Document *doc, Info &info, const TopoDS_Shape &shape, - std::vector &children, - const boost::dynamic_bitset<> &visibilities, - bool canReduce) +bool ImportOCAF2::createGroup(App::Document* doc, + Info& info, + const TopoDS_Shape& shape, + std::vector& children, + const boost::dynamic_bitset<>& visibilities, + bool canReduce) { assert(children.size() == visibilities.size()); - if(children.empty()) + if (children.empty()) { return false; - bool hasColor = getColor(shape,info,false,true); - if(canReduce && !hasColor && options.reduceObjects && children.size()==1 && visibilities[0]) { + } + bool hasColor = getColor(shape, info, false, true); + if (canReduce && !hasColor && options.reduceObjects && children.size() == 1 + && visibilities[0]) { info.obj = children.front(); info.free = true; - info.propPlacement = dynamic_cast(info.obj->getPropertyByName("Placement")); - myCollapsedObjects.emplace(info.obj,info.propPlacement); + info.propPlacement = + dynamic_cast(info.obj->getPropertyByName("Placement")); + myCollapsedObjects.emplace(info.obj, info.propPlacement); return true; } - auto group = static_cast(doc->addObject("App::LinkGroup","LinkGroup")); - for(auto &child : children) { - if(child->getDocument()!=doc) { - auto link = static_cast(doc->addObject("App::Link","Link")); + auto group = static_cast(doc->addObject("App::LinkGroup", "LinkGroup")); + for (auto& child : children) { + if (child->getDocument() != doc) { + auto link = static_cast(doc->addObject("App::Link", "Link")); link->Label.setValue(child->Label.getValue()); - link->setLink(-1,child); + link->setLink(-1, child); auto pla = Base::freecad_dynamic_cast( child->getPropertyByName("Placement")); - if(pla) + if (pla) { link->Placement.setValue(pla->getValue()); + } child = link; } } @@ -563,28 +625,30 @@ bool ImportOCAF2::createGroup(App::Document *doc, Info &info, const TopoDS_Shape group->VisibilityList.setValue(visibilities); info.obj = group; info.propPlacement = &group->Placement; - if(getColor(shape,info,false,true)) { - if(info.hasFaceColor) - applyLinkColor(group,-1,info.faceColor); + if (getColor(shape, info, false, true)) { + if (info.hasFaceColor) { + applyLinkColor(group, -1, info.faceColor); + } } return true; } App::DocumentObject* ImportOCAF2::loadShapes() { - if(!options.useLinkGroup) { + if (!options.useLinkGroup) { ImportLegacy legacy(*this); legacy.setMerge(options.merge); legacy.loadShapes(); return nullptr; } - if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) - dumpLabels(pDoc->Main(),aShapeTool,aColorTool); + if (FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) { + dumpLabels(pDoc->Main(), aShapeTool, aColorTool); + } TDF_LabelSequence labels; aShapeTool->GetShapes(labels); - Base::SequencerLauncher seq("Importing...",labels.Length()); + Base::SequencerLauncher seq("Importing...", labels.Length()); FC_MSG("free shape count " << labels.Length()); sequencer = options.showProgress ? &seq : nullptr; @@ -594,51 +658,56 @@ App::DocumentObject* ImportOCAF2::loadShapes() myCollapsedObjects.clear(); std::vector objs; - aShapeTool->GetFreeShapes (labels); + aShapeTool->GetFreeShapes(labels); boost::dynamic_bitset<> vis; int count = 0; - for (Standard_Integer i=1; i <= labels.Length(); i++ ) { + for (Standard_Integer i = 1; i <= labels.Length(); i++) { auto label = labels.Value(i); - if(!options.importHidden && !aColorTool->IsVisible(label)) + if (!options.importHidden && !aColorTool->IsVisible(label)) { continue; + } ++count; } - for (Standard_Integer i=1; i <= labels.Length(); i++ ) { + for (Standard_Integer i = 1; i <= labels.Length(); i++) { auto label = labels.Value(i); - if(!options.importHidden && !aColorTool->IsVisible(label)) + if (!options.importHidden && !aColorTool->IsVisible(label)) { continue; - auto obj = loadShape(pDocument, label, - aShapeTool->GetShape(label), false, count>1); - if(obj) { + } + auto obj = loadShape(pDocument, label, aShapeTool->GetShape(label), false, count > 1); + if (obj) { objs.push_back(obj); vis.push_back(aColorTool->IsVisible(label)); } } - App::DocumentObject *ret = nullptr; - if(objs.size()==1) { + App::DocumentObject* ret = nullptr; + if (objs.size() == 1) { ret = objs.front(); - }else { - Info info; - if(createGroup(pDocument,info,TopoDS_Shape(),objs,vis)) - ret = info.obj; } - if(ret) { + else { + Info info; + if (createGroup(pDocument, info, TopoDS_Shape(), objs, vis)) { + ret = info.obj; + } + } + if (ret) { ret->recomputeFeature(true); } - if(options.merge && ret && !ret->isDerivedFrom(Part::Feature::getClassTypeId())) { + if (options.merge && ret && !ret->isDerivedFrom(Part::Feature::getClassTypeId())) { auto shape = Part::Feature::getTopoShape(ret); - auto feature = static_cast( - pDocument->addObject("Part::Feature", "Feature")); + auto feature = + static_cast(pDocument->addObject("Part::Feature", "Feature")); auto name = labelName(pDoc->Main()); - feature->Label.setValue(name.empty()?default_name.c_str():name.c_str()); + feature->Label.setValue(name.empty() ? default_name.c_str() : name.c_str()); feature->Shape.setValue(shape); - applyFaceColors(feature,{}); + applyFaceColors(feature, {}); - std::vector > objNames; - for(auto obj : App::Document::getDependencyList(objs,App::Document::DepSort)) - objNames.emplace_back(obj->getDocument(),obj->getNameInDocument()); - for(auto &v : objNames) + std::vector> objNames; + for (auto obj : App::Document::getDependencyList(objs, App::Document::DepSort)) { + objNames.emplace_back(obj->getDocument(), obj->getNameInDocument()); + } + for (auto& v : objNames) { v.first->removeObject(v.second.c_str()); + } ret = feature; ret->recomputeFeature(true); } @@ -647,177 +716,207 @@ App::DocumentObject* ImportOCAF2::loadShapes() } void ImportOCAF2::getSHUOColors(TDF_Label label, - std::map &colors, bool appendFirst) + std::map& colors, + bool appendFirst) { TDF_AttributeSequence seq; - if(label.IsNull() || !aShapeTool->GetAllComponentSHUO(label,seq)) + if (label.IsNull() || !aShapeTool->GetAllComponentSHUO(label, seq)) { return; + } std::ostringstream ss; - for(int i=1;i<=seq.Length();++i) { + for (int i = 1; i <= seq.Length(); ++i) { Handle(XCAFDoc_GraphNode) shuo = Handle(XCAFDoc_GraphNode)::DownCast(seq.Value(i)); - if(shuo.IsNull()) + if (shuo.IsNull()) { continue; + } TDF_Label slabel = shuo->Label(); // We only want to process the main shuo, i.e. those without upper_usage TDF_LabelSequence uppers; aShapeTool->GetSHUOUpperUsage(slabel, uppers); - if(uppers.Length()) + if (uppers.Length()) { continue; + } // appendFirst tells us whether we shall append the object name of the first label bool skipFirst = !appendFirst; ss.str(""); - while(true) { - if(skipFirst) + while (true) { + if (skipFirst) { skipFirst = false; + } else { TDF_Label l = shuo->Label().Father(); auto it = myNames.find(l); - if(it == myNames.end()) { + if (it == myNames.end()) { FC_WARN("Failed to find object of label " << labelName(l)); ss.str(""); break; } - if(!it->second.empty()) + if (!it->second.empty()) { ss << it->second << '.'; + } } - if(!shuo->NbChildren()) + if (!shuo->NbChildren()) { break; + } shuo = shuo->GetChild(1); } std::string subname = ss.str(); - if(subname.empty()) + if (subname.empty()) { continue; - if(!aColorTool->IsVisible(slabel)) { + } + if (!aColorTool->IsVisible(slabel)) { subname += App::DocumentObject::hiddenMarker(); - colors.emplace(subname,App::Color()); - } else { + colors.emplace(subname, App::Color()); + } + else { Quantity_ColorRGBA aColor; - if(aColorTool->GetColor(slabel, XCAFDoc_ColorSurf, aColor) || - aColorTool->GetColor(slabel, XCAFDoc_ColorGen, aColor)) - { + if (aColorTool->GetColor(slabel, XCAFDoc_ColorSurf, aColor) + || aColorTool->GetColor(slabel, XCAFDoc_ColorGen, aColor)) { colors.emplace(subname, convertColor(aColor)); } } } } -App::DocumentObject *ImportOCAF2::loadShape(App::Document *doc, - TDF_Label label, const TopoDS_Shape &shape, bool baseOnly, bool newDoc) +App::DocumentObject* ImportOCAF2::loadShape(App::Document* doc, + TDF_Label label, + const TopoDS_Shape& shape, + bool baseOnly, + bool newDoc) { - if(shape.IsNull()) + if (shape.IsNull()) { return nullptr; + } auto baseShape = shape.Located(TopLoc_Location()); auto it = myShapes.find(baseShape); - if(it == myShapes.end()) { + if (it == myShapes.end()) { Info info; auto baseLabel = aShapeTool->FindShape(baseShape); - if(sequencer && !baseLabel.IsNull() && aShapeTool->IsTopLevel(baseLabel)) + if (sequencer && !baseLabel.IsNull() && aShapeTool->IsTopLevel(baseLabel)) { sequencer->next(true); + } bool res; - if(baseLabel.IsNull() || !aShapeTool->IsAssembly(baseLabel)) - res = createObject(doc,baseLabel,baseShape,info,newDoc); - else - res = createAssembly(doc,baseLabel,baseShape,info,newDoc); - if(!res) + if (baseLabel.IsNull() || !aShapeTool->IsAssembly(baseLabel)) { + res = createObject(doc, baseLabel, baseShape, info, newDoc); + } + else { + res = createAssembly(doc, baseLabel, baseShape, info, newDoc); + } + if (!res) { return nullptr; - setObjectName(info,baseLabel); - it = myShapes.emplace(baseShape,info).first; + } + setObjectName(info, baseLabel); + it = myShapes.emplace(baseShape, info).first; } - if(baseOnly) + if (baseOnly) { return it->second.obj; + } - std::map shuoColors; - if(!options.useLinkGroup) - getSHUOColors(label,shuoColors,false); + std::map shuoColors; + if (!options.useLinkGroup) { + getSHUOColors(label, shuoColors, false); + } auto info = it->second; - getColor(shape,info,true); + getColor(shape, info, true); - if(shuoColors.empty() && info.free && doc==info.obj->getDocument()) { + if (shuoColors.empty() && info.free && doc == info.obj->getDocument()) { it->second.free = false; auto name = getLabelName(label); - if(info.faceColor!=it->second.faceColor || - info.edgeColor!=it->second.edgeColor || - (!name.empty() && !info.baseName.empty() && name!=info.baseName)) - { - auto compound = static_cast(doc->addObject("Part::Compound2","Compound")); + if (info.faceColor != it->second.faceColor || info.edgeColor != it->second.edgeColor + || (!name.empty() && !info.baseName.empty() && name != info.baseName)) { + auto compound = + static_cast(doc->addObject("Part::Compound2", "Compound")); compound->Links.setValue(info.obj); // compound->Visibility.setValue(false); info.propPlacement = &compound->Placement; - if(info.faceColor!=it->second.faceColor) - applyFaceColors(compound,{info.faceColor}); - if(info.edgeColor!=it->second.edgeColor) - applyEdgeColors(compound,{info.edgeColor}); + if (info.faceColor != it->second.faceColor) { + applyFaceColors(compound, {info.faceColor}); + } + if (info.edgeColor != it->second.edgeColor) { + applyEdgeColors(compound, {info.edgeColor}); + } info.obj = compound; - setObjectName(info,label); + setObjectName(info, label); } - setPlacement(info.propPlacement,shape); - myNames.emplace(label,info.obj->getNameInDocument()); + setPlacement(info.propPlacement, shape); + myNames.emplace(label, info.obj->getNameInDocument()); return info.obj; } - auto link = static_cast(doc->addObject("App::Link","Link")); - link->setLink(-1,info.obj); - setPlacement(&link->Placement,shape); + auto link = static_cast(doc->addObject("App::Link", "Link")); + link->setLink(-1, info.obj); + setPlacement(&link->Placement, shape); info.obj = link; - setObjectName(info,label); - if(info.faceColor!=it->second.faceColor) - applyLinkColor(link,-1,info.faceColor); + setObjectName(info, label); + if (info.faceColor != it->second.faceColor) { + applyLinkColor(link, -1, info.faceColor); + } - myNames.emplace(label,link->getNameInDocument()); - if(!shuoColors.empty()) - applyElementColors(link,shuoColors); + myNames.emplace(label, link->getNameInDocument()); + if (!shuoColors.empty()) { + applyElementColors(link, shuoColors); + } return link; } -struct ChildInfo { +struct ChildInfo +{ std::vector plas; boost::dynamic_bitset<> vis; - std::map colors; + std::map colors; std::vector labels; TopoDS_Shape shape; }; -bool ImportOCAF2::createAssembly(App::Document *_doc, - TDF_Label label, const TopoDS_Shape &shape, Info &info, bool newDoc) +bool ImportOCAF2::createAssembly(App::Document* _doc, + TDF_Label label, + const TopoDS_Shape& shape, + Info& info, + bool newDoc) { (void)label; std::vector children; std::map childrenMap; boost::dynamic_bitset<> visibilities; - std::map shuoColors; + std::map shuoColors; auto doc = _doc; - if(newDoc) - doc = getDocument(_doc,label); + if (newDoc) { + doc = getDocument(_doc, label); + } - for(TopoDS_Iterator it(shape,Standard_False,Standard_False);it.More();it.Next()) { + for (TopoDS_Iterator it(shape, Standard_False, Standard_False); it.More(); it.Next()) { TopoDS_Shape childShape = it.Value(); - if(childShape.IsNull()) + if (childShape.IsNull()) { continue; + } TDF_Label childLabel; - aShapeTool->Search(childShape,childLabel,Standard_True,Standard_True,Standard_False); - if(!childLabel.IsNull() && !options.importHidden && !aColorTool->IsVisible(childLabel)) + aShapeTool->Search(childShape, childLabel, Standard_True, Standard_True, Standard_False); + if (!childLabel.IsNull() && !options.importHidden && !aColorTool->IsVisible(childLabel)) { continue; + } auto obj = loadShape(doc, childLabel, childShape, options.reduceObjects); - if(!obj) + if (!obj) { continue; + } bool vis = true; - if(!childLabel.IsNull() && aShapeTool->IsComponent(childLabel)) + if (!childLabel.IsNull() && aShapeTool->IsComponent(childLabel)) { vis = aColorTool->IsVisible(childLabel); - if(!options.reduceObjects) { + } + if (!options.reduceObjects) { visibilities.push_back(vis); children.push_back(obj); - getSHUOColors(childLabel,shuoColors,true); + getSHUOColors(childLabel, shuoColors, true); continue; } - auto &childInfo = childrenMap[obj]; + auto& childInfo = childrenMap[obj]; if (childInfo.plas.empty()) { children.push_back(obj); visibilities.push_back(vis); @@ -826,25 +925,27 @@ bool ImportOCAF2::createAssembly(App::Document *_doc, childInfo.vis.push_back(vis); childInfo.labels.push_back(childLabel); - childInfo.plas.emplace_back(Part::TopoShape::convert(childShape.Location().Transformation())); + childInfo.plas.emplace_back( + Part::TopoShape::convert(childShape.Location().Transformation())); Quantity_ColorRGBA aColor; if (aColorTool->GetColor(childShape, XCAFDoc_ColorSurf, aColor)) { - childInfo.colors[childInfo.plas.size()-1] = convertColor(aColor); + childInfo.colors[childInfo.plas.size() - 1] = convertColor(aColor); } } assert(visibilities.size() == children.size()); - if(children.empty()) { - if(doc!=_doc) + if (children.empty()) { + if (doc != _doc) { App::GetApplication().closeDocument(doc->getName()); + } return false; } - if(options.reduceObjects) { - int i=-1; - for(auto &child : children) { + if (options.reduceObjects) { + int i = -1; + for (auto& child : children) { ++i; - auto &childInfo = childrenMap[child]; + auto& childInfo = childrenMap[child]; if (childInfo.plas.size() == 1) { child = loadShape(doc, childInfo.labels.front(), childInfo.shape); getSHUOColors(childInfo.labels.front(), shuoColors, true); @@ -854,29 +955,31 @@ bool ImportOCAF2::createAssembly(App::Document *_doc, visibilities[i] = true; // Okay, we are creating a link array - auto link = static_cast(doc->addObject("App::Link","Link")); - link->setLink(-1,child); + auto link = static_cast(doc->addObject("App::Link", "Link")); + link->setLink(-1, child); link->ShowElement.setValue(false); link->ElementCount.setValue(childInfo.plas.size()); auto it = myCollapsedObjects.find(child); - if(it!=myCollapsedObjects.end()) { + if (it != myCollapsedObjects.end()) { // child is a single component assembly that has been // collapsed, so we have to honour its placement - for(auto &pla : childInfo.plas) + for (auto& pla : childInfo.plas) { pla *= it->second->getValue(); + } } link->PlacementList.setValue(childInfo.plas); link->VisibilityList.setValue(childInfo.vis); - for(auto &v : childInfo.colors) - applyLinkColor(link,v.first,v.second); + for (auto& v : childInfo.colors) { + applyLinkColor(link, v.first, v.second); + } - int i=0; + int i = 0; std::string name = link->getNameInDocument(); name += '.'; - for(auto childLabel : childInfo.labels) { - myNames.emplace(childLabel,name + std::to_string(i++)); - getSHUOColors(childLabel,shuoColors,true); + for (auto childLabel : childInfo.labels) { + myNames.emplace(childLabel, name + std::to_string(i++)); + getSHUOColors(childLabel, shuoColors, true); } child = link; @@ -886,13 +989,16 @@ bool ImportOCAF2::createAssembly(App::Document *_doc, } } - if(children.empty()) + if (children.empty()) { return false; + } - if(!createGroup(doc,info,shape,children,visibilities,shuoColors.empty())) + if (!createGroup(doc, info, shape, children, visibilities, shuoColors.empty())) { return false; - if(!shuoColors.empty()) - applyElementColors(info.obj,shuoColors); + } + if (!shuoColors.empty()) { + applyElementColors(info.obj, shuoColors); + } return true; } @@ -905,7 +1011,8 @@ ExportOCAFOptions::ExportOCAFOptions() } ExportOCAF2::ExportOCAF2(Handle(TDocStd_Document) h, GetShapeColorsFunc func) - : pDoc(h) , getShapeColors(func) + : pDoc(h) + , getShapeColors(func) { aShapeTool = XCAFDoc_DocumentTool::ShapeTool(pDoc->Main()); aColorTool = XCAFDoc_DocumentTool::ColorTool(pDoc->Main()); @@ -925,17 +1032,21 @@ ExportOCAFOptions ExportOCAF2::customExportOptions() defaultOptions.exportHidden = settings.getExportHiddenObject(); defaultOptions.keepPlacement = settings.getExportKeepPlacement(); - auto handle = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); - defaultOptions.defaultColor.setPackedValue(handle->GetUnsigned("DefaultShapeColor", defaultOptions.defaultColor.getPackedValue())); + auto handle = + App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + defaultOptions.defaultColor.setPackedValue( + handle->GetUnsigned("DefaultShapeColor", defaultOptions.defaultColor.getPackedValue())); defaultOptions.defaultColor.a = 0; return defaultOptions; } -void ExportOCAF2::setName(TDF_Label label, App::DocumentObject *obj, const char *name) { - if(!name) { - if(!obj) +void ExportOCAF2::setName(TDF_Label label, App::DocumentObject* obj, const char* name) +{ + if (!name) { + if (!obj) { return; + } name = obj->Label.getValue(); } TDataStd_Name::Set(label, TCollection_ExtendedString(name, true)); @@ -944,74 +1055,83 @@ void ExportOCAF2::setName(TDF_Label label, App::DocumentObject *obj, const char // Similar to XCAFDoc_ShapeTool::FindSHUO but return only main SHUO, i.e. SHUO // with no upper_usage. It should not be necessary if we strictly export from // bottom up, but let's make sure of it. -static Standard_Boolean FindSHUO (const TDF_LabelSequence& theLabels, - Handle(XCAFDoc_GraphNode)& theSHUOAttr) +static Standard_Boolean FindSHUO(const TDF_LabelSequence& theLabels, + Handle(XCAFDoc_GraphNode) & theSHUOAttr) { - assert(theLabels.Length()>1); + assert(theLabels.Length() > 1); theSHUOAttr.Nullify(); TDF_AttributeSequence SHUOAttrs; TDF_Label aCompLabel = theLabels.Value(1); - if (! ::XCAFDoc_ShapeTool::GetAllComponentSHUO( aCompLabel, SHUOAttrs ) ) + if (!::XCAFDoc_ShapeTool::GetAllComponentSHUO(aCompLabel, SHUOAttrs)) { return Standard_False; + } for (Standard_Integer i = 1; i <= SHUOAttrs.Length(); i++) { Handle(XCAFDoc_GraphNode) anSHUO = Handle(XCAFDoc_GraphNode)::DownCast(SHUOAttrs.Value(i)); TDF_LabelSequence aUpLabels; // check for any upper_usage - ::XCAFDoc_ShapeTool::GetSHUOUpperUsage( anSHUO->Label(), aUpLabels ); - if ( aUpLabels.Length() > 0 ) - continue; // reject if there is one - int j=2; - for ( ; anSHUO->NbChildren() ; ++j ) { - if ( j>theLabels.Length() ) { - j=0; + ::XCAFDoc_ShapeTool::GetSHUOUpperUsage(anSHUO->Label(), aUpLabels); + if (aUpLabels.Length() > 0) { + continue; // reject if there is one + } + int j = 2; + for (; anSHUO->NbChildren(); ++j) { + if (j > theLabels.Length()) { + j = 0; break; } - anSHUO = anSHUO->GetChild( 1 ); - if ( theLabels.Value(j)!=anSHUO->Label().Father() ) { - j=0; + anSHUO = anSHUO->GetChild(1); + if (theLabels.Value(j) != anSHUO->Label().Father()) { + j = 0; break; } } - if( j!=theLabels.Length()+1 ) + if (j != theLabels.Length() + 1) { continue; + } theSHUOAttr = Handle(XCAFDoc_GraphNode)::DownCast(SHUOAttrs.Value(i)); break; } - return ( !theSHUOAttr.IsNull() ); + return (!theSHUOAttr.IsNull()); } -TDF_Label ExportOCAF2::findComponent(const char *subname, TDF_Label label, TDF_LabelSequence &labels) { - const char *dot = strchr(subname,'.'); - if(!dot) { - if(labels.Length()==1) +TDF_Label +ExportOCAF2::findComponent(const char* subname, TDF_Label label, TDF_LabelSequence& labels) +{ + const char* dot = strchr(subname, '.'); + if (!dot) { + if (labels.Length() == 1) { return labels.Value(1); + } Handle(XCAFDoc_GraphNode) ret; - if(labels.Length() && (FindSHUO(labels,ret) || aShapeTool->SetSHUO(labels,ret))) + if (labels.Length() && (FindSHUO(labels, ret) || aShapeTool->SetSHUO(labels, ret))) { return ret->Label(); + } return {}; } TDF_LabelSequence components; TDF_Label ref; - if(!aShapeTool->GetReferredShape(label,ref)) + if (!aShapeTool->GetReferredShape(label, ref)) { ref = label; - if(aShapeTool->GetComponents(ref,components)) { - for(int i=1;i<=components.Length();++i) { + } + if (aShapeTool->GetComponents(ref, components)) { + for (int i = 1; i <= components.Length(); ++i) { auto component = components.Value(i); - if(std::isdigit((int)subname[0])) { - auto n = std::to_string(i-1)+"."; - if(boost::starts_with(subname,n)) { + if (std::isdigit((int)subname[0])) { + auto n = std::to_string(i - 1) + "."; + if (boost::starts_with(subname, n)) { labels.Append(component); - return findComponent(subname+n.size(),component,labels); + return findComponent(subname + n.size(), component, labels); } } auto it = myNames.find(component); - if(it == myNames.end()) + if (it == myNames.end()) { continue; - for(auto &n : it->second) { - if(boost::starts_with(subname,n)) { + } + for (auto& n : it->second) { + if (boost::starts_with(subname, n)) { labels.Append(component); - return findComponent(subname+n.size(),component,labels); + return findComponent(subname + n.size(), component, labels); } } } @@ -1019,17 +1139,22 @@ TDF_Label ExportOCAF2::findComponent(const char *subname, TDF_Label label, TDF_L return {}; } -void ExportOCAF2::setupObject(TDF_Label label, App::DocumentObject *obj, - const Part::TopoShape &shape, const std::string &prefix, const char *name, bool force) +void ExportOCAF2::setupObject(TDF_Label label, + App::DocumentObject* obj, + const Part::TopoShape& shape, + const std::string& prefix, + const char* name, + bool force) { - setName(label,obj,name); - if(aShapeTool->IsComponent(label)) { - auto &names = myNames[label]; + setName(label, obj, name); + if (aShapeTool->IsComponent(label)) { + auto& names = myNames[label]; // The subname reference may contain several possible namings. - if(!name) { + if (!name) { // simple object internal name - names.push_back(prefix+obj->getNameInDocument()+"."); - } else { + names.push_back(prefix + obj->getNameInDocument() + "."); + } + else { // name is not NULL in case this is a collapsed link array element. // Collapsed means that the element is not an actual object, and // 'obj' here is actually the parent. The given 'name' is in fact @@ -1045,63 +1170,67 @@ void ExportOCAF2::setupObject(TDF_Label label, App::DocumentObject *obj, names.push_back(prefix + "$" + obj->Label.getValue() + "."); } - if(!getShapeColors || (!force && !mySetups.emplace(obj,name?name:"").second)) + if (!getShapeColors || (!force && !mySetups.emplace(obj, name ? name : "").second)) { return; + } - std::map > colors; - static std::string marker(App::DocumentObject::hiddenMarker()+"*"); - static std::array keys = {"Face*","Edge*",marker.c_str()}; + std::map> colors; + static std::string marker(App::DocumentObject::hiddenMarker() + "*"); + static std::array keys = {"Face*", "Edge*", marker.c_str()}; std::string childName; - if(name) { + if (name) { childName = name; childName += '.'; } - for(auto key : keys) { - for(auto &v : getShapeColors(obj,key)) { - const char *subname = v.first.c_str(); - if(name) { - if(!boost::starts_with(v.first,childName)) + for (auto key : keys) { + for (auto& v : getShapeColors(obj, key)) { + const char* subname = v.first.c_str(); + if (name) { + if (!boost::starts_with(v.first, childName)) { continue; + } subname += childName.size(); } - const char *dot = strrchr(subname,'.'); - if(!dot) - colors[""].emplace(subname,v.second); + const char* dot = strrchr(subname, '.'); + if (!dot) { + colors[""].emplace(subname, v.second); + } else { ++dot; - colors[std::string(subname,dot-subname)].emplace(dot,v.second); + colors[std::string(subname, dot - subname)].emplace(dot, v.second); } } } bool warned = false; - for(auto &v : colors) { + for (auto& v : colors) { TDF_Label nodeLabel = label; - if(!v.first.empty()) { + if (!v.first.empty()) { TDF_LabelSequence labels; - if(aShapeTool->IsComponent(label)) + if (aShapeTool->IsComponent(label)) { labels.Append(label); - nodeLabel = findComponent(v.first.c_str(),label,labels); - if(nodeLabel.IsNull()) { + } + nodeLabel = findComponent(v.first.c_str(), label, labels); + if (nodeLabel.IsNull()) { FC_WARN("Failed to find component " << v.first); continue; } } - for(auto &vv : v.second) { - if(vv.first == App::DocumentObject::hiddenMarker()) { - aColorTool->SetVisibility(nodeLabel,Standard_False); + for (auto& vv : v.second) { + if (vv.first == App::DocumentObject::hiddenMarker()) { + aColorTool->SetVisibility(nodeLabel, Standard_False); continue; } const App::Color& c = vv.second; Quantity_ColorRGBA color = convertColor(c); - auto colorType = vv.first[0]=='F'?XCAFDoc_ColorSurf:XCAFDoc_ColorCurv; - if(vv.first=="Face" || vv.first=="Edge") { + auto colorType = vv.first[0] == 'F' ? XCAFDoc_ColorSurf : XCAFDoc_ColorCurv; + if (vv.first == "Face" || vv.first == "Edge") { aColorTool->SetColor(nodeLabel, color, colorType); continue; } - if(nodeLabel!=label || aShapeTool->IsComponent(label)) { + if (nodeLabel != label || aShapeTool->IsComponent(label)) { // OCCT 7 seems to only support "Recommended practices for // model styling and organization" version 1.2 // (https://www.cax-if.org/documents/rec_prac_styling_org_v12.pdf). @@ -1113,7 +1242,7 @@ void ExportOCAF2::setupObject(TDF_Label label, App::DocumentObject *obj, // // The above observation is confirmed by further inspection of // OCCT code, XCAFDoc_ShapeTool.cxx and STEPCAFControl_Writer.cxx. - if(!warned) { + if (!warned) { warned = true; FC_WARN("Current OCCT does not support element color override, for object " << obj->getFullName()); @@ -1121,8 +1250,8 @@ void ExportOCAF2::setupObject(TDF_Label label, App::DocumentObject *obj, // continue; } - auto subShape = shape.getSubShape(vv.first.c_str(),true); - if(subShape.IsNull()) { + auto subShape = shape.getSubShape(vv.first.c_str(), true); + if (subShape.IsNull()) { FC_WARN("Failed to get subshape " << vv.first); continue; } @@ -1139,7 +1268,7 @@ void ExportOCAF2::setupObject(TDF_Label label, App::DocumentObject *obj, } TDF_Label subLabel = aShapeTool->AddSubShape(nodeLabel, subShape); - if(subLabel.IsNull()) { + if (subLabel.IsNull()) { FC_WARN("Failed to add subshape " << vv.first); continue; } @@ -1148,63 +1277,73 @@ void ExportOCAF2::setupObject(TDF_Label label, App::DocumentObject *obj, } } -void ExportOCAF2::exportObjects(std::vector &objs, const char *name) { - if(objs.empty()) +void ExportOCAF2::exportObjects(std::vector& objs, const char* name) +{ + if (objs.empty()) { return; + } myObjects.clear(); myNames.clear(); mySetups.clear(); - if(objs.size()==1) - exportObject(objs.front(),nullptr,TDF_Label()); + if (objs.size() == 1) { + exportObject(objs.front(), nullptr, TDF_Label()); + } else { auto label = aShapeTool->NewShape(); - App::Document *doc = nullptr; + App::Document* doc = nullptr; bool sameDoc = true; - for(auto obj : objs) { - if(doc) - sameDoc = sameDoc && doc==obj->getDocument(); - else + for (auto obj : objs) { + if (doc) { + sameDoc = sameDoc && doc == obj->getDocument(); + } + else { doc = obj->getDocument(); - exportObject(obj,nullptr,label); + } + exportObject(obj, nullptr, label); } - if(!name && doc && sameDoc) + if (!name && doc && sameDoc) { name = doc->getName(); - setName(label,nullptr,name); + } + setName(label, nullptr, name); } - if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) { - dumpLabels(pDoc->Main(),aShapeTool,aColorTool); + if (FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) { + dumpLabels(pDoc->Main(), aShapeTool, aColorTool); } - // Update is not performed automatically anymore: https://tracker.dev.opencascade.org/view.php?id=28055 + // Update is not performed automatically anymore: + // https://tracker.dev.opencascade.org/view.php?id=28055 aShapeTool->UpdateAssemblies(); } TDF_Label ExportOCAF2::exportObject(App::DocumentObject* parentObj, - const char *sub, TDF_Label parent, const char *name) + const char* sub, + TDF_Label parent, + const char* name) { - App::DocumentObject *obj; - auto shape = Part::Feature::getTopoShape(parentObj,sub,false,nullptr,&obj,false,!sub); - if(!obj || shape.isNull()) { - if (obj) + App::DocumentObject* obj; + auto shape = Part::Feature::getTopoShape(parentObj, sub, false, nullptr, &obj, false, !sub); + if (!obj || shape.isNull()) { + if (obj) { FC_WARN(obj->getFullName() << " has null shape"); + } return {}; } - //sub may contain more than one hierarchy, e.g. Assembly container may use - //getSubObjects to skip some hierarchy containing constraints and stuff - //when exporting. We search for extra '.', and set it as prefix if found. - //When setting SHUO's, we'll need this prefix for matching. + // sub may contain more than one hierarchy, e.g. Assembly container may use + // getSubObjects to skip some hierarchy containing constraints and stuff + // when exporting. We search for extra '.', and set it as prefix if found. + // When setting SHUO's, we'll need this prefix for matching. std::string prefix; - if(sub) { + if (sub) { auto len = strlen(sub); - if(len>1) { + if (len > 1) { --len; // The prefix ends with the second last '.', so search for it. - for(int i=0;len!=0;--len) { - if(sub[len]=='.' && ++i==2) { - prefix = std::string(sub,len+1); + for (int i = 0; len != 0; --len) { + if (sub[len] == '.' && ++i == 2) { + prefix = std::string(sub, len + 1); break; } } @@ -1212,24 +1351,26 @@ TDF_Label ExportOCAF2::exportObject(App::DocumentObject* parentObj, } TDF_Label label; - std::vector links; + std::vector links; int depth = 0; auto linked = obj; auto linkedShape = shape; - while(true) { + while (true) { auto s = Part::Feature::getTopoShape(linked); - if(s.isNull() || !s.getShape().IsPartner(shape.getShape())) + if (s.isNull() || !s.getShape().IsPartner(shape.getShape())) { break; + } linkedShape = s; // Search using our own cache. We can't rely on ShapeTool::FindShape() // in case this is an assembly. Because FindShape() search among its // own computed shape, i.e. its own created compound, and thus will // never match ours. auto it = myObjects.find(linked); - if(it != myObjects.end()) { - for(auto l : links) - myObjects.emplace(l,it->second); + if (it != myObjects.end()) { + for (auto l : links) { + myObjects.emplace(l, it->second); + } // Note: OCAF does not seem to support reference of references. We // have to flaten all multi-level link without scales. In other // word, all link will all be forced to refer to the same @@ -1239,45 +1380,49 @@ TDF_Label ExportOCAF2::exportObject(App::DocumentObject* parentObj, // a new shape every time Part::Feature::getTopoShape() is called. auto baseShape = aShapeTool->GetShape(it->second); shape.setShape(baseShape.Located(shape.getShape().Location())); - if(!parent.IsNull()) - label = aShapeTool->AddComponent(parent,shape.getShape(),Standard_False); - else - label = aShapeTool->AddShape(shape.getShape(),Standard_False,Standard_False); - setupObject(label,name?parentObj:obj,shape,prefix,name); + if (!parent.IsNull()) { + label = aShapeTool->AddComponent(parent, shape.getShape(), Standard_False); + } + else { + label = aShapeTool->AddShape(shape.getShape(), Standard_False, Standard_False); + } + setupObject(label, name ? parentObj : obj, shape, prefix, name); return label; } - auto next = linked->getLinkedObject(false,nullptr,false,depth++); - if(!next || linked==next) + auto next = linked->getLinkedObject(false, nullptr, false, depth++); + if (!next || linked == next) { break; + } linked = next; links.push_back(linked); } auto subs = obj->getSubObjects(); // subs empty means obj is not a container. - if(subs.empty()) { + if (subs.empty()) { - if(!parent.IsNull()) { + if (!parent.IsNull()) { // Search for non-located shape to see if we've stored the original shape before - if(!aShapeTool->FindShape(shape.getShape(),label)) { + if (!aShapeTool->FindShape(shape.getShape(), label)) { auto baseShape = linkedShape; - auto linked = links.empty()?obj:links.back(); + auto linked = links.empty() ? obj : links.back(); baseShape.setShape(baseShape.getShape().Located(TopLoc_Location())); label = aShapeTool->NewShape(); - aShapeTool->SetShape(label,baseShape.getShape()); - setupObject(label,linked,baseShape,prefix); + aShapeTool->SetShape(label, baseShape.getShape()); + setupObject(label, linked, baseShape, prefix); } - label = aShapeTool->AddComponent(parent,shape.getShape(),Standard_False); - setupObject(label,name?parentObj:obj,shape,prefix,name); - - }else{ + label = aShapeTool->AddComponent(parent, shape.getShape(), Standard_False); + setupObject(label, name ? parentObj : obj, shape, prefix, name); + } + else { // Here means we are exporting a single non-assembly object. We must // not call setupObject() on a non-located baseshape like above, // because OCCT does not respect shape style sharing when not // exporting assembly - if(!options.keepPlacement || shape.getPlacement() == Base::Placement()) + if (!options.keepPlacement || shape.getPlacement() == Base::Placement()) { shape.setShape(shape.getShape().Located(TopLoc_Location())); + } else { Base::Matrix4D mat = shape.getTransform(); shape.setShape(shape.getShape().Located(TopLoc_Location())); @@ -1287,59 +1432,68 @@ TDF_Label ExportOCAF2::exportObject(App::DocumentObject* parentObj, // a TopLoc_Location, so we need to clear it again. shape.setShape(shape.getShape().Located(TopLoc_Location())); } - label = aShapeTool->AddShape(shape.getShape(),Standard_False, Standard_False); - auto o = name?parentObj:obj; - if(o!=linked) - setupObject(label,linked,shape,prefix,nullptr,true); - setupObject(label,o,shape,prefix,name,true); + label = aShapeTool->AddShape(shape.getShape(), Standard_False, Standard_False); + auto o = name ? parentObj : obj; + if (o != linked) { + setupObject(label, linked, shape, prefix, nullptr, true); + } + setupObject(label, o, shape, prefix, name, true); } myObjects.emplace(obj, label); - for(auto link : links) + for (auto link : links) { myObjects.emplace(link, label); + } return label; } - if(obj->getExtensionByType(true) - || obj->getExtensionByType(true)) + if (obj->getExtensionByType(true) + || obj->getExtensionByType(true)) { groupLinks.push_back(obj); + } // Create a new assembly label = aShapeTool->NewShape(); // check for link array auto linkArray = obj->getLinkedObject(true)->getExtensionByType(true); - if(linkArray && (linkArray->getShowElementValue() || !linkArray->getElementCountValue())) + if (linkArray && (linkArray->getShowElementValue() || !linkArray->getElementCountValue())) { linkArray = nullptr; - for(auto &subobj : subs) { - App::DocumentObject *parentGrp = nullptr; + } + for (auto& subobj : subs) { + App::DocumentObject* parentGrp = nullptr; std::string childName; - auto sobj = obj->resolve(subobj.c_str(),&parentGrp,&childName); - if(!sobj) { + auto sobj = obj->resolve(subobj.c_str(), &parentGrp, &childName); + if (!sobj) { FC_WARN("Cannot find object " << obj->getFullName() << '.' << subobj); continue; } int vis = -1; - if(parentGrp) { - if(!groupLinks.empty() - && parentGrp->getExtensionByType(true,false)) - { + if (parentGrp) { + if (!groupLinks.empty() + && parentGrp->getExtensionByType(true, false)) { vis = groupLinks.back()->isElementVisible(childName.c_str()); - }else + } + else { vis = parentGrp->isElementVisible(childName.c_str()); + } } - if(vis < 0) - vis = sobj->Visibility.getValue()?1:0; + if (vis < 0) { + vis = sobj->Visibility.getValue() ? 1 : 0; + } - if(!vis && !options.exportHidden) + if (!vis && !options.exportHidden) { continue; + } - TDF_Label childLabel = exportObject(obj,subobj.c_str(),label,linkArray?childName.c_str():nullptr); - if(childLabel.IsNull()) + TDF_Label childLabel = + exportObject(obj, subobj.c_str(), label, linkArray ? childName.c_str() : nullptr); + if (childLabel.IsNull()) { continue; + } - if(!vis) { + if (!vis) { // Work around OCCT bug. If no color setting here, it will crash. // The culprit is at STEPCAFControl_Writer::1093 as shown below // @@ -1354,53 +1508,60 @@ TDF_Label ExportOCAF2::exportObject(App::DocumentObject* parentObj, // auto childShape = aShapeTool->GetShape(childLabel); Quantity_ColorRGBA col; - if(!aColorTool->GetInstanceColor(childShape,XCAFDoc_ColorGen,col) && - !aColorTool->GetInstanceColor(childShape,XCAFDoc_ColorSurf,col) && - !aColorTool->GetInstanceColor(childShape,XCAFDoc_ColorCurv,col)) - { - auto &c = options.defaultColor; + if (!aColorTool->GetInstanceColor(childShape, XCAFDoc_ColorGen, col) + && !aColorTool->GetInstanceColor(childShape, XCAFDoc_ColorSurf, col) + && !aColorTool->GetInstanceColor(childShape, XCAFDoc_ColorCurv, col)) { + auto& c = options.defaultColor; aColorTool->SetColor(childLabel, convertColor(c), XCAFDoc_ColorGen); FC_WARN(labelName(childLabel) << " set default color"); } - aColorTool->SetVisibility(childLabel,Standard_False); + aColorTool->SetVisibility(childLabel, Standard_False); } } - if (!groupLinks.empty() && groupLinks.back()==obj) + if (!groupLinks.empty() && groupLinks.back() == obj) { groupLinks.pop_back(); + } // Finished adding components. Now retrieve the computed non-located shape auto baseShape = shape; baseShape.setShape(aShapeTool->GetShape(label)); myObjects.emplace(obj, label); - for(auto link : links) + for (auto link : links) { myObjects.emplace(link, label); + } - if(!parent.IsNull() && !links.empty()) + if (!parent.IsNull() && !links.empty()) { linked = links.back(); - else + } + else { linked = obj; - setupObject(label,linked,baseShape,prefix); + } + setupObject(label, linked, baseShape, prefix); - if(!parent.IsNull()) { + if (!parent.IsNull()) { // If we are a component, swap in the base shape but keep our location. shape.setShape(baseShape.getShape().Located(shape.getShape().Location())); - label = aShapeTool->AddComponent(parent,label,shape.getShape().Location()); - setupObject(label,name?parentObj:obj,shape,prefix,name); + label = aShapeTool->AddComponent(parent, label, shape.getShape().Location()); + setupObject(label, name ? parentObj : obj, shape, prefix, name); } return label; } -bool ExportOCAF2::canFallback(std::vector objs) { - for(size_t i=0;i objs) +{ + for (size_t i = 0; i < objs.size(); ++i) { auto obj = objs[i]; - if(!obj || !obj->getNameInDocument()) + if (!obj || !obj->getNameInDocument()) { continue; - if(obj->getExtensionByType(true)) + } + if (obj->getExtensionByType(true)) { return false; - for(auto &sub : obj->getSubObjects()) + } + for (auto& sub : obj->getSubObjects()) { objs.push_back(obj->getSubObject(sub.c_str())); + } } return true; } diff --git a/src/Mod/Import/App/ImportOCAF2.h b/src/Mod/Import/App/ImportOCAF2.h index ef438b583d..45f434ea4c 100644 --- a/src/Mod/Import/App/ImportOCAF2.h +++ b/src/Mod/Import/App/ImportOCAF2.h @@ -39,32 +39,39 @@ #include #include -#include "ImportOCAF.h" #include "ExportOCAF.h" +#include "ImportOCAF.h" class TDF_Label; class TopLoc_Location; -namespace App { +namespace App +{ class Document; class DocumentObject; -} -namespace Part { +} // namespace App +namespace Part +{ class Feature; } -namespace Import { +namespace Import +{ -struct ShapeHasher { - std::size_t operator()(const TopoDS_Shape &s) const { +struct ShapeHasher +{ + std::size_t operator()(const TopoDS_Shape& s) const + { return s.HashCode(INT_MAX); } }; -struct LabelHasher { - std::size_t operator()(const TDF_Label &l) const { - return TDF_LabelMapHasher::HashCode(l,INT_MAX); +struct LabelHasher +{ + std::size_t operator()(const TDF_Label& l) const + { + return TDF_LabelMapHasher::HashCode(l, INT_MAX); } }; @@ -92,27 +99,34 @@ public: static ImportOCAFOptions customImportOptions(); void setImportOptions(ImportOCAFOptions opts); - void setMerge(bool enable) { + void setMerge(bool enable) + { options.merge = enable; } void setUseLinkGroup(bool enable); - void setBaseName(bool enable) { + void setBaseName(bool enable) + { options.useBaseName = enable; } - void setImportHiddenObject(bool enable) { + void setImportHiddenObject(bool enable) + { options.importHidden = enable; } - void setReduceObjects(bool enable) { + void setReduceObjects(bool enable) + { options.reduceObjects = enable; } - void setShowProgress(bool enable) { + void setShowProgress(bool enable) + { options.showProgress = enable; } - void setExpandCompound(bool enable) { + void setExpandCompound(bool enable) + { options.expandCompound = enable; } - enum ImportMode { + enum ImportMode + { SingleDoc = 0, GroupPerDoc = 1, GroupPerDir = 2, @@ -121,15 +135,17 @@ public: ModeMax, }; void setMode(int m); - int getMode() const { + int getMode() const + { return options.mode; } private: - struct Info { + struct Info + { std::string baseName; - App::DocumentObject *obj = nullptr; - App::PropertyPlacement *propPlacement = nullptr; + App::DocumentObject* obj = nullptr; + App::PropertyPlacement* propPlacement = nullptr; App::Color faceColor; App::Color edgeColor; bool hasFaceColor = false; @@ -137,40 +153,62 @@ private: int free = true; }; - App::DocumentObject *loadShape(App::Document *doc, TDF_Label label, - const TopoDS_Shape &shape, bool baseOnly=false, bool newDoc=true); - App::Document *getDocument(App::Document *doc, TDF_Label label); - bool createAssembly(App::Document *doc, TDF_Label label, - const TopoDS_Shape &shape, Info &info, bool newDoc); - bool createObject(App::Document *doc, TDF_Label label, - const TopoDS_Shape &shape, Info &info, bool newDoc); - bool createGroup(App::Document *doc, Info &info, - const TopoDS_Shape &shape, std::vector &children, - const boost::dynamic_bitset<> &visibilities, bool canReduce=false); - bool getColor(const TopoDS_Shape &shape, Info &info, bool check=false, bool noDefault=false); - void getSHUOColors(TDF_Label label, std::map &colors, bool appendFirst); - void setObjectName(Info &info, TDF_Label label); + App::DocumentObject* loadShape(App::Document* doc, + TDF_Label label, + const TopoDS_Shape& shape, + bool baseOnly = false, + bool newDoc = true); + App::Document* getDocument(App::Document* doc, TDF_Label label); + bool createAssembly(App::Document* doc, + TDF_Label label, + const TopoDS_Shape& shape, + Info& info, + bool newDoc); + bool createObject(App::Document* doc, + TDF_Label label, + const TopoDS_Shape& shape, + Info& info, + bool newDoc); + bool createGroup(App::Document* doc, + Info& info, + const TopoDS_Shape& shape, + std::vector& children, + const boost::dynamic_bitset<>& visibilities, + bool canReduce = false); + bool + getColor(const TopoDS_Shape& shape, Info& info, bool check = false, bool noDefault = false); + void + getSHUOColors(TDF_Label label, std::map& colors, bool appendFirst); + void setObjectName(Info& info, TDF_Label label); std::string getLabelName(TDF_Label label); - App::DocumentObject *expandShape(App::Document *doc, TDF_Label label, const TopoDS_Shape &shape); + App::DocumentObject* + expandShape(App::Document* doc, TDF_Label label, const TopoDS_Shape& shape); - virtual void applyEdgeColors(Part::Feature*, const std::vector&) {} - virtual void applyFaceColors(Part::Feature*, const std::vector&) {} - virtual void applyElementColors(App::DocumentObject*, const std::map&) {} - virtual void applyLinkColor(App::DocumentObject *, int /*index*/, App::Color){} + virtual void applyEdgeColors(Part::Feature*, const std::vector&) + {} + virtual void applyFaceColors(Part::Feature*, const std::vector&) + {} + virtual void applyElementColors(App::DocumentObject*, const std::map&) + {} + virtual void applyLinkColor(App::DocumentObject*, int /*index*/, App::Color) + {} private: - class ImportLegacy : public ImportOCAF { + class ImportLegacy: public ImportOCAF + { public: - explicit ImportLegacy(ImportOCAF2 &parent) - :ImportOCAF(parent.pDoc, parent.pDocument, parent.default_name),myParent(parent) + explicit ImportLegacy(ImportOCAF2& parent) + : ImportOCAF(parent.pDoc, parent.pDocument, parent.default_name) + , myParent(parent) {} private: - void applyColors(Part::Feature* part, const std::vector& colors) override { + void applyColors(Part::Feature* part, const std::vector& colors) override + { myParent.applyFaceColors(part, colors); } - ImportOCAF2 &myParent; + ImportOCAF2& myParent; }; friend class ImportLegacy; @@ -187,7 +225,7 @@ private: std::unordered_map myNames; std::unordered_map myCollapsedObjects; - Base::SequencerLauncher *sequencer{nullptr}; + Base::SequencerLauncher* sequencer {nullptr}; }; struct ImportExport ExportOCAFOptions @@ -201,41 +239,51 @@ struct ImportExport ExportOCAFOptions class ImportExport ExportOCAF2 { public: - using GetShapeColorsFunc = std::function( - App::DocumentObject*, const char*)>; - explicit ExportOCAF2(Handle(TDocStd_Document) h, GetShapeColorsFunc func=GetShapeColorsFunc()); + using GetShapeColorsFunc = + std::function(App::DocumentObject*, const char*)>; + explicit ExportOCAF2(Handle(TDocStd_Document) h, + GetShapeColorsFunc func = GetShapeColorsFunc()); static ExportOCAFOptions customExportOptions(); - void setExportOptions(ExportOCAFOptions opts) { + void setExportOptions(ExportOCAFOptions opts) + { options = opts; } - void setExportHiddenObject(bool enable) { + void setExportHiddenObject(bool enable) + { options.exportHidden = enable; } - void setKeepPlacement(bool enable) { + void setKeepPlacement(bool enable) + { options.keepPlacement = enable; } - void exportObjects(std::vector &objs, const char *name=nullptr); + void exportObjects(std::vector& objs, const char* name = nullptr); bool canFallback(std::vector objs); private: - TDF_Label exportObject(App::DocumentObject *obj, const char *sub, TDF_Label parent, const char *name=nullptr); - void setupObject(TDF_Label label, App::DocumentObject *obj, - const Part::TopoShape &shape, const std::string &prefix, - const char *name=nullptr, bool force=false); - void setName(TDF_Label label, App::DocumentObject *obj, const char *name=nullptr); - TDF_Label findComponent(const char *subname, TDF_Label label, TDF_LabelSequence &labels); + TDF_Label exportObject(App::DocumentObject* obj, + const char* sub, + TDF_Label parent, + const char* name = nullptr); + void setupObject(TDF_Label label, + App::DocumentObject* obj, + const Part::TopoShape& shape, + const std::string& prefix, + const char* name = nullptr, + bool force = false); + void setName(TDF_Label label, App::DocumentObject* obj, const char* name = nullptr); + TDF_Label findComponent(const char* subname, TDF_Label label, TDF_LabelSequence& labels); private: Handle(TDocStd_Document) pDoc; Handle(XCAFDoc_ShapeTool) aShapeTool; Handle(XCAFDoc_ColorTool) aColorTool; - std::unordered_map myObjects; + std::unordered_map myObjects; std::unordered_map, LabelHasher> myNames; - std::set > mySetups; + std::set> mySetups; std::vector groupLinks; @@ -244,6 +292,6 @@ private: ExportOCAFOptions options; }; -} +} // namespace Import -#endif //IMPORT_IMPORTOCAF2_H +#endif // IMPORT_IMPORTOCAF2_H diff --git a/src/Mod/Import/App/ImportOCAFAssembly.cpp b/src/Mod/Import/App/ImportOCAFAssembly.cpp index a95c981993..84df9e9c8e 100644 --- a/src/Mod/Import/App/ImportOCAFAssembly.cpp +++ b/src/Mod/Import/App/ImportOCAFAssembly.cpp @@ -22,23 +22,23 @@ #include "PreCompiled.h" #if defined(__MINGW32__) -# define WNT // avoid conflict with GUID +#define WNT // avoid conflict with GUID #endif #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -52,31 +52,33 @@ using namespace Import; -ImportOCAFAssembly::ImportOCAFAssembly(Handle(TDocStd_Document) h, App::Document* d, const std::string& name, App::DocumentObject *target) - : pDoc(h), - doc(d), - default_name(name), - targetObj(target) +ImportOCAFAssembly::ImportOCAFAssembly(Handle(TDocStd_Document) h, + App::Document* d, + const std::string& name, + App::DocumentObject* target) + : pDoc(h) + , doc(d) + , default_name(name) + , targetObj(target) { - aShapeTool = XCAFDoc_DocumentTool::ShapeTool (pDoc->Main()); + aShapeTool = XCAFDoc_DocumentTool::ShapeTool(pDoc->Main()); aColorTool = XCAFDoc_DocumentTool::ColorTool(pDoc->Main()); } ImportOCAFAssembly::~ImportOCAFAssembly() -{ -} +{} void ImportOCAFAssembly::loadShapes() { myRefShapes.clear(); - loadShapes(pDoc->Main(), TopLoc_Location(), default_name, "", false,0); + loadShapes(pDoc->Main(), TopLoc_Location(), default_name, "", false, 0); } void ImportOCAFAssembly::loadAssembly() { myRefShapes.clear(); - loadShapes(pDoc->Main(), TopLoc_Location(), default_name, "", false,0); + loadShapes(pDoc->Main(), TopLoc_Location(), default_name, "", false, 0); } @@ -84,88 +86,97 @@ std::string ImportOCAFAssembly::getName(const TDF_Label& label) { Handle(TDataStd_Name) name; std::string part_name; - if (label.FindAttribute(TDataStd_Name::GetID(),name)) { + if (label.FindAttribute(TDataStd_Name::GetID(), name)) { TCollection_ExtendedString extstr = name->Get(); - char* str = new char[extstr.LengthOfCString()+1]; + char* str = new char[extstr.LengthOfCString() + 1]; extstr.ToUTF8CString(str); part_name = str; - delete [] str; + delete[] str; return part_name; } return ""; - } -void ImportOCAFAssembly::loadShapes(const TDF_Label& label, const TopLoc_Location& loc, const std::string& defaultname, const std::string& assembly, bool isRef, int dep) +void ImportOCAFAssembly::loadShapes(const TDF_Label& label, + const TopLoc_Location& loc, + const std::string& defaultname, + const std::string& assembly, + bool isRef, + int dep) { int hash = 0; TopoDS_Shape aShape; - if (aShapeTool->GetShape(label,aShape)) { + if (aShapeTool->GetShape(label, aShape)) { hash = aShape.HashCode(HashUpper); } Handle(TDataStd_Name) name; std::string part_name = defaultname; - if (label.FindAttribute(TDataStd_Name::GetID(),name)) { + if (label.FindAttribute(TDataStd_Name::GetID(), name)) { TCollection_ExtendedString extstr = name->Get(); - char* str = new char[extstr.LengthOfCString()+1]; + char* str = new char[extstr.LengthOfCString() + 1]; extstr.ToUTF8CString(str); part_name = str; - delete [] str; + delete[] str; if (part_name.empty()) { part_name = defaultname; } else { - bool ws=true; + bool ws = true; for (std::string::iterator it = part_name.begin(); it != part_name.end(); ++it) { if (*it != ' ') { ws = false; break; } } - if (ws) + if (ws) { part_name = defaultname; + } } } TopLoc_Location part_loc = loc; Handle(XCAFDoc_Location) hLoc; if (label.FindAttribute(XCAFDoc_Location::GetID(), hLoc)) { - if (isRef) + if (isRef) { part_loc = part_loc * hLoc->Get(); - else + } + else { part_loc = hLoc->Get(); + } } #ifdef FC_DEBUG - const char *s; - if( !hLoc.IsNull() ) - s = hLoc->Get().IsIdentity()?"0":"1"; - else + const char* s; + if (!hLoc.IsNull()) { + s = hLoc->Get().IsIdentity() ? "0" : "1"; + } + else { s = "0"; + } std::stringstream str; - Base::Console().Log("H:%-9d \tN:%-30s \tTop:%d, Asm:%d, Shape:%d, Compound:%d, Simple:%d, Free:%d, Ref:%d, Component:%d, SubShape:%d\tTrf:%s-- Dep:%d \n", - hash, - part_name.c_str(), - aShapeTool->IsTopLevel(label), - aShapeTool->IsAssembly(label), - aShapeTool->IsShape(label), - aShapeTool->IsCompound(label), - aShapeTool->IsSimpleShape(label), - aShapeTool->IsFree(label), - aShapeTool->IsReference(label), - aShapeTool->IsComponent(label), - aShapeTool->IsSubShape(label), - s, - dep - ); + Base::Console().Log("H:%-9d \tN:%-30s \tTop:%d, Asm:%d, Shape:%d, Compound:%d, Simple:%d, " + "Free:%d, Ref:%d, Component:%d, SubShape:%d\tTrf:%s-- Dep:%d \n", + hash, + part_name.c_str(), + aShapeTool->IsTopLevel(label), + aShapeTool->IsAssembly(label), + aShapeTool->IsShape(label), + aShapeTool->IsCompound(label), + aShapeTool->IsSimpleShape(label), + aShapeTool->IsFree(label), + aShapeTool->IsReference(label), + aShapeTool->IsComponent(label), + aShapeTool->IsSubShape(label), + s, + dep); label.Dump(str); - Base::Console().Message(str.str().c_str() ); + Base::Console().Message(str.str().c_str()); #endif std::string asm_name = assembly; @@ -175,65 +186,74 @@ void ImportOCAFAssembly::loadShapes(const TDF_Label& label, const TopLoc_Locatio TDF_Label ref; if (aShapeTool->IsReference(label) && aShapeTool->GetReferredShape(label, ref)) { - loadShapes(ref, part_loc, part_name, asm_name, true,dep + 1); + loadShapes(ref, part_loc, part_name, asm_name, true, dep + 1); } if (isRef || myRefShapes.find(hash) == myRefShapes.end()) { TopoDS_Shape aShape; - if (isRef && aShapeTool->GetShape(label, aShape)) + if (isRef && aShapeTool->GetShape(label, aShape)) { myRefShapes.insert(aShape.HashCode(HashUpper)); + } if (aShapeTool->IsSimpleShape(label) && (isRef || aShapeTool->IsFree(label))) { - if (!asm_name.empty()) + if (!asm_name.empty()) { part_name = asm_name; - if (isRef) + } + if (isRef) { createShape(label, loc, part_name); - else + } + else { createShape(label, part_loc, part_name); + } } else { for (TDF_ChildIterator it(label); it.More(); it.Next()) { - loadShapes(it.Value(), part_loc, part_name, asm_name, isRef, dep+1); + loadShapes(it.Value(), part_loc, part_name, asm_name, isRef, dep + 1); } } } } -void ImportOCAFAssembly::createShape(const TDF_Label& label, const TopLoc_Location& loc, const std::string& name) +void ImportOCAFAssembly::createShape(const TDF_Label& label, + const TopLoc_Location& loc, + const std::string& name) { - Base::Console().Log("-create Shape\n"); + Base::Console().Log("-create Shape\n"); const TopoDS_Shape& aShape = aShapeTool->GetShape(label); if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPOUND) { TopExp_Explorer xp; int ctSolids = 0, ctShells = 0; - for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) - { + for (xp.Init(aShape, TopAbs_SOLID); xp.More(); xp.Next(), ctSolids++) { createShape(xp.Current(), loc, name); } - for (xp.Init(aShape, TopAbs_SHELL, TopAbs_SOLID); xp.More(); xp.Next(), ctShells++) - { + for (xp.Init(aShape, TopAbs_SHELL, TopAbs_SOLID); xp.More(); xp.Next(), ctShells++) { createShape(xp.Current(), loc, name); } - if (ctSolids > 0 || ctShells > 0) + if (ctSolids > 0 || ctShells > 0) { return; + } } createShape(aShape, loc, name); } -void ImportOCAFAssembly::createShape(const TopoDS_Shape& aShape, const TopLoc_Location& loc, const std::string& name) +void ImportOCAFAssembly::createShape(const TopoDS_Shape& aShape, + const TopLoc_Location& loc, + const std::string& name) { Part::Feature* part = static_cast(doc->addObject("Part::Feature")); - if (!loc.IsIdentity()) + if (!loc.IsIdentity()) { part->Shape.setValue(aShape.Moved(loc)); - else + } + else { part->Shape.setValue(aShape); + } part->Label.setValue(name); Quantity_Color aColor; - App::Color color(0.8f,0.8f,0.8f); - if (aColorTool->GetColor(aShape, XCAFDoc_ColorGen, aColor) || - aColorTool->GetColor(aShape, XCAFDoc_ColorSurf, aColor) || - aColorTool->GetColor(aShape, XCAFDoc_ColorCurv, aColor)) { + App::Color color(0.8f, 0.8f, 0.8f); + if (aColorTool->GetColor(aShape, XCAFDoc_ColorGen, aColor) + || aColorTool->GetColor(aShape, XCAFDoc_ColorSurf, aColor) + || aColorTool->GetColor(aShape, XCAFDoc_ColorCurv, aColor)) { color.r = (float)aColor.Red(); color.g = (float)aColor.Green(); color.b = (float)aColor.Blue(); @@ -243,7 +263,7 @@ void ImportOCAFAssembly::createShape(const TopoDS_Shape& aShape, const TopLoc_Lo } TopTools_IndexedMapOfShape faces; - TopExp_Explorer xp(aShape,TopAbs_FACE); + TopExp_Explorer xp(aShape, TopAbs_FACE); while (xp.More()) { faces.Add(xp.Current()); xp.Next(); @@ -251,16 +271,16 @@ void ImportOCAFAssembly::createShape(const TopoDS_Shape& aShape, const TopLoc_Lo bool found_face_color = false; std::vector faceColors; faceColors.resize(faces.Extent(), color); - xp.Init(aShape,TopAbs_FACE); + xp.Init(aShape, TopAbs_FACE); while (xp.More()) { - if (aColorTool->GetColor(xp.Current(), XCAFDoc_ColorGen, aColor) || - aColorTool->GetColor(xp.Current(), XCAFDoc_ColorSurf, aColor) || - aColorTool->GetColor(xp.Current(), XCAFDoc_ColorCurv, aColor)) { + if (aColorTool->GetColor(xp.Current(), XCAFDoc_ColorGen, aColor) + || aColorTool->GetColor(xp.Current(), XCAFDoc_ColorSurf, aColor) + || aColorTool->GetColor(xp.Current(), XCAFDoc_ColorCurv, aColor)) { int index = faces.FindIndex(xp.Current()); color.r = (float)aColor.Red(); color.g = (float)aColor.Green(); color.b = (float)aColor.Blue(); - faceColors[index-1] = color; + faceColors[index - 1] = color; found_face_color = true; } xp.Next(); @@ -270,5 +290,3 @@ void ImportOCAFAssembly::createShape(const TopoDS_Shape& aShape, const TopLoc_Lo applyColors(part, faceColors); } } - - diff --git a/src/Mod/Import/App/ImportOCAFAssembly.h b/src/Mod/Import/App/ImportOCAFAssembly.h index b88470de1e..5de3a62759 100644 --- a/src/Mod/Import/App/ImportOCAFAssembly.h +++ b/src/Mod/Import/App/ImportOCAFAssembly.h @@ -38,34 +38,46 @@ class TDF_Label; class TopLoc_Location; -namespace App { +namespace App +{ class Document; class DocumentObject; -} -namespace Part { +} // namespace App +namespace Part +{ class Feature; } -namespace Import { +namespace Import +{ class ImportExport ImportOCAFAssembly { public: - ImportOCAFAssembly(Handle(TDocStd_Document) h, App::Document* d, const std::string& name, App::DocumentObject *target); + ImportOCAFAssembly(Handle(TDocStd_Document) h, + App::Document* d, + const std::string& name, + App::DocumentObject* target); virtual ~ImportOCAFAssembly(); void loadShapes(); void loadAssembly(); protected: std::string getName(const TDF_Label& label); - App::DocumentObject *targetObj; + App::DocumentObject* targetObj; private: - void loadShapes(const TDF_Label& label, const TopLoc_Location&, const std::string& partname, const std::string& assembly, bool isRef, int dep); + void loadShapes(const TDF_Label& label, + const TopLoc_Location&, + const std::string& partname, + const std::string& assembly, + bool isRef, + int dep); void createShape(const TDF_Label& label, const TopLoc_Location&, const std::string&); void createShape(const TopoDS_Shape& label, const TopLoc_Location&, const std::string&); - virtual void applyColors(Part::Feature*, const std::vector&){} + virtual void applyColors(Part::Feature*, const std::vector&) + {} private: Handle(TDocStd_Document) pDoc; @@ -78,6 +90,6 @@ private: }; -} // namespace Import { +} // namespace Import -#endif //IMPORT_ImportOCAFAssembly_H +#endif // IMPORT_ImportOCAFAssembly_H diff --git a/src/Mod/Import/App/PlmXmlParser.py b/src/Mod/Import/App/PlmXmlParser.py index 56e36750a9..c5ad90319e 100644 --- a/src/Mod/Import/App/PlmXmlParser.py +++ b/src/Mod/Import/App/PlmXmlParser.py @@ -1,26 +1,26 @@ # PlmXmlParser -#*************************************************************************** -#* Copyright (c) 2015 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2015 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ import xml.etree.ElementTree as ET @@ -29,131 +29,149 @@ FreeCAD_On = False FreeCAD_Doc = None FreeCAD_ObjList = [] + def ParseUserData(element): res = {} - for i in element.findall('{http://www.plmxml.org/Schemas/PLMXMLSchema}UserData'): - for value in i.findall('{http://www.plmxml.org/Schemas/PLMXMLSchema}UserValue'): - res[value.attrib['title']] = value.attrib['value'] + for i in element.findall("{http://www.plmxml.org/Schemas/PLMXMLSchema}UserData"): + for value in i.findall("{http://www.plmxml.org/Schemas/PLMXMLSchema}UserValue"): + res[value.attrib["title"]] = value.attrib["value"] return res + def addPart(partElement): - global FreeCAD_On,FreeCAD_Doc,FreeCAD_ObjList + global FreeCAD_On, FreeCAD_Doc, FreeCAD_ObjList print("=== Part ======================================================") - name = partElement.attrib['name'] - id = partElement.attrib['id'] + name = partElement.attrib["name"] + id = partElement.attrib["id"] userData = ParseUserData(partElement) - bound = partElement.find('{http://www.plmxml.org/Schemas/PLMXMLSchema}Bound') - print(bound.attrib['values']) + bound = partElement.find("{http://www.plmxml.org/Schemas/PLMXMLSchema}Bound") + print(bound.attrib["values"]) - representation = partElement.find('{http://www.plmxml.org/Schemas/PLMXMLSchema}Representation') - format = representation.attrib['format'] - location = representation.attrib['location'] + representation = partElement.find("{http://www.plmxml.org/Schemas/PLMXMLSchema}Representation") + format = representation.attrib["format"] + location = representation.attrib["location"] print(id, name, userData, format, location) if FreeCAD_On: - import FreeCAD,Assembly + import FreeCAD, Assembly + print("Create Reference") - partObject =FreeCAD_Doc.addObject("App::Part",id) + partObject = FreeCAD_Doc.addObject("App::Part", id) FreeCAD_ObjList.append(partObject) partObject.Label = name partObject.Meta = userData + def addAssembly(asmElement): - global FreeCAD_On,FreeCAD_Doc,FreeCAD_ObjList + global FreeCAD_On, FreeCAD_Doc, FreeCAD_ObjList print("=== Assembly ======================================================") userData = ParseUserData(asmElement) - name = asmElement.attrib['name'] - id = asmElement.attrib['id'] - instanceRefs = asmElement.attrib['instanceRefs'] - userData['instanceRefs'] = instanceRefs + name = asmElement.attrib["name"] + id = asmElement.attrib["id"] + instanceRefs = asmElement.attrib["instanceRefs"] + userData["instanceRefs"] = instanceRefs print(id, name, instanceRefs, userData) if FreeCAD_On: - import FreeCAD,Assembly + import FreeCAD, Assembly + print("Create Reference") - admObject =FreeCAD_Doc.addObject("Assembly::Product",id) + admObject = FreeCAD_Doc.addObject("Assembly::Product", id) FreeCAD_ObjList.append(admObject) admObject.Label = name admObject.Meta = userData + def addReference(refElement): - global FreeCAD_On,FreeCAD_Doc,FreeCAD_ObjList + global FreeCAD_On, FreeCAD_Doc, FreeCAD_ObjList print("=== Reference ======================================================") userData = ParseUserData(refElement) - partRef = refElement.attrib['partRef'][1:] - userData['partRef'] = partRef - id = refElement.attrib['id'] - name = refElement.attrib['name'] - transform = refElement.find('{http://www.plmxml.org/Schemas/PLMXMLSchema}Transform') - mtrx = [float(i) for i in transform.text.split(' ')] + partRef = refElement.attrib["partRef"][1:] + userData["partRef"] = partRef + id = refElement.attrib["id"] + name = refElement.attrib["name"] + transform = refElement.find("{http://www.plmxml.org/Schemas/PLMXMLSchema}Transform") + mtrx = [float(i) for i in transform.text.split(" ")] print(mtrx) - print(id,name,partRef) + print(id, name, partRef) if FreeCAD_On: - import FreeCAD,Assembly + import FreeCAD, Assembly + print("Create Reference") - refObject =FreeCAD_Doc.addObject("Assembly::ProductRef",id) + refObject = FreeCAD_Doc.addObject("Assembly::ProductRef", id) FreeCAD_ObjList.append(refObject) refObject.Label = name refObject.Meta = userData + def resolveRefs(): - global FreeCAD_On,FreeCAD_Doc,FreeCAD_ObjList + global FreeCAD_On, FreeCAD_Doc, FreeCAD_ObjList print("=== Resolve References ======================================================") if FreeCAD_On: for i in FreeCAD_ObjList: - if i.TypeId == 'Assembly::Product': + if i.TypeId == "Assembly::Product": objectList = [] - for l in i.Meta['instanceRefs'].split(' '): + for l in i.Meta["instanceRefs"].split(" "): objectList.append(FreeCAD_Doc.getObject(l)) i.Items = objectList - if i.TypeId == 'Assembly::ProductRef': - i.Item = FreeCAD_Doc.getObject(i.Meta['partRef']) + if i.TypeId == "Assembly::ProductRef": + i.Item = FreeCAD_Doc.getObject(i.Meta["partRef"]) + def open(fileName): """called when freecad opens an PlmXml file""" - global FreeCAD_On,FreeCAD_Doc - import FreeCAD,os + global FreeCAD_On, FreeCAD_Doc + import FreeCAD, os + docname = os.path.splitext(os.path.basename(fileName))[0] doc = FreeCAD.newDocument(docname) - message='Started with opening of "'+fileName+'" file\n' + message = 'Started with opening of "' + fileName + '" file\n' FreeCAD.Console.PrintMessage(message) FreeCAD_Doc = doc FreeCAD_On = True parse(fileName) resolveRefs() -def insert(filename,docname): + +def insert(filename, docname): """called when freecad imports an PlmXml file""" - global FreeCAD_On,FreeCAD_Doc + global FreeCAD_On, FreeCAD_Doc import FreeCAD + FreeCAD.setActiveDocument(docname) - doc=FreeCAD.getDocument(docname) - FreeCAD.Console.PrintMessage('Started import of "'+filename+'" file') + doc = FreeCAD.getDocument(docname) + FreeCAD.Console.PrintMessage('Started import of "' + filename + '" file') FreeCAD_Doc = doc FreeCAD_On = True parse(fileName) resolveRefs() + def main(): - parse('../../../../data/tests/Jt/Engine/2_Cylinder_Engine3.plmxml') + parse("../../../../data/tests/Jt/Engine/2_Cylinder_Engine3.plmxml") + def parse(fileName): tree = ET.parse(fileName) root = tree.getroot() - ProductDef = root.find('{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductDef') + ProductDef = root.find("{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductDef") - res = ParseUserData(ProductDef.find('{http://www.plmxml.org/Schemas/PLMXMLSchema}UserData')) + res = ParseUserData(ProductDef.find("{http://www.plmxml.org/Schemas/PLMXMLSchema}UserData")) - InstanceGraph = ProductDef.find('{http://www.plmxml.org/Schemas/PLMXMLSchema}InstanceGraph') + InstanceGraph = ProductDef.find("{http://www.plmxml.org/Schemas/PLMXMLSchema}InstanceGraph") # get all the special elements we can read - Instances = InstanceGraph.findall('{http://www.plmxml.org/Schemas/PLMXMLSchema}Instance') - Parts = InstanceGraph.findall('{http://www.plmxml.org/Schemas/PLMXMLSchema}Part') - ProductInstances = InstanceGraph.findall('{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductInstance') - ProductRevisionViews = InstanceGraph.findall('{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductRevisionView') + Instances = InstanceGraph.findall("{http://www.plmxml.org/Schemas/PLMXMLSchema}Instance") + Parts = InstanceGraph.findall("{http://www.plmxml.org/Schemas/PLMXMLSchema}Part") + ProductInstances = InstanceGraph.findall( + "{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductInstance" + ) + ProductRevisionViews = InstanceGraph.findall( + "{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductRevisionView" + ) instanceTypesSet = set() for child in InstanceGraph: @@ -163,28 +181,31 @@ def parse(fileName): print(i) print("") - print(len(Instances),'\t{http://www.plmxml.org/Schemas/PLMXMLSchema}Instance') - print(len(Parts),'\t{http://www.plmxml.org/Schemas/PLMXMLSchema}Part') - print(len(ProductInstances),'\t{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductInstance') - print(len(ProductRevisionViews),'\t{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductRevisionView') + print(len(Instances), "\t{http://www.plmxml.org/Schemas/PLMXMLSchema}Instance") + print(len(Parts), "\t{http://www.plmxml.org/Schemas/PLMXMLSchema}Part") + print(len(ProductInstances), "\t{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductInstance") + print( + len(ProductRevisionViews), + "\t{http://www.plmxml.org/Schemas/PLMXMLSchema}ProductRevisionView", + ) # handle all instances for child in Instances: addReference(child) - #handle the parts and assemblies + # handle the parts and assemblies for child in Parts: - if 'type' in child.attrib: - if child.attrib['type'] == 'solid' : + if "type" in child.attrib: + if child.attrib["type"] == "solid": addPart(child) continue - if child.attrib['type'] == 'assembly' : + if child.attrib["type"] == "assembly": addAssembly(child) continue - print("Unknown Part type:",child) + print("Unknown Part type:", child) else: print("not Type in Part", child) -if __name__ == '__main__': +if __name__ == "__main__": main() diff --git a/src/Mod/Import/App/PreCompiled.cpp b/src/Mod/Import/App/PreCompiled.cpp index cd345efad8..7b200a1bf2 100644 --- a/src/Mod/Import/App/PreCompiled.cpp +++ b/src/Mod/Import/App/PreCompiled.cpp @@ -22,4 +22,3 @@ #include "PreCompiled.h" - diff --git a/src/Mod/Import/App/PreCompiled.h b/src/Mod/Import/App/PreCompiled.h index f6501fd1a9..1f00597316 100644 --- a/src/Mod/Import/App/PreCompiled.h +++ b/src/Mod/Import/App/PreCompiled.h @@ -29,30 +29,30 @@ /// point at which warnings of overly long specifiers disabled (needet for VC6) #ifdef _MSC_VER -# pragma warning( disable : 4251 ) -# pragma warning( disable : 4275 ) -# pragma warning( disable : 4503 ) -# pragma warning( disable : 4786 ) // specifier longer then 255 chars +#pragma warning(disable : 4251) +#pragma warning(disable : 4275) +#pragma warning(disable : 4503) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif #ifdef _PreComp_ // standard -#include -#include -#include -#include #include -#include +#include #include -#include +#include +#include +#include #include +#include +#include // OpenCasCade ===================================================================================== // Base #include -#endif //_PreComp_ +#endif //_PreComp_ #endif diff --git a/src/Mod/Import/App/SCL/AggregationDataTypes.py b/src/Mod/Import/App/SCL/AggregationDataTypes.py index 9bb4709e83..b7b7dca020 100644 --- a/src/Mod/Import/App/SCL/AggregationDataTypes.py +++ b/src/Mod/Import/App/SCL/AggregationDataTypes.py @@ -23,7 +23,7 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF @@ -33,37 +33,47 @@ from SimpleDataTypes import * from TypeChecker import check_type import BaseType + class BaseAggregate(object): - """ A class that define common properties to ARRAY, LIST, SET and BAG. - """ - def __init__( self , bound1 , bound2 , base_type ): + """A class that define common properties to ARRAY, LIST, SET and BAG.""" + + def __init__(self, bound1, bound2, base_type): # check that bound1bound2: + if bound1 != None and bound2 != None: + if bound1 > bound2: raise AssertionError("bound1 shall be less than or equal to bound2") self._bound1 = bound1 self._bound2 = bound2 self._base_type = base_type def __getitem__(self, index): - if indexself._bound2): - raise IndexError("ARRAY index out of bound (upper bound is %i, passed %i)"%(self._bound2,index)) + if index < self._bound1: + raise IndexError( + "ARRAY index out of bound (lower bound is %i, passed %i)" % (self._bound1, index) + ) + elif self._bound2 != None and index > self._bound2: + raise IndexError( + "ARRAY index out of bound (upper bound is %i, passed %i)" % (self._bound2, index) + ) else: - return list.__getitem__(self,index) - - def __setitem__(self,index,value): - if indexself._bound2): - raise IndexError("ARRAY index out of bound (upper bound is %i, passed %i)"%(self._bound2,index)) - elif not isinstance(value,self._base_type): - raise TypeError("%s type expected, passed %s."%(self._base_type, type(value))) + return list.__getitem__(self, index) + + def __setitem__(self, index, value): + if index < self._bound1: + raise IndexError( + "ARRAY index out of bound (lower bound is %i, passed %i)" % (self._bound1, index) + ) + elif self._bound2 != None and index > self._bound2: + raise IndexError( + "ARRAY index out of bound (upper bound is %i, passed %i)" % (self._bound2, index) + ) + elif not isinstance(value, self._base_type): + raise TypeError("%s type expected, passed %s." % (self._base_type, type(value))) else: # first find the length of the list, and extend it if ever # the index is - list.__setitem__(self,index,value) + list.__setitem__(self, index, value) + class ARRAY(BaseType.Type, BaseType.Aggregate): """ @@ -76,12 +86,12 @@ class ARRAY(BaseType.Type, BaseType.Aggregate): that an array value cannot contain duplicate elements. It may also specify that an array value need not contain an element at every index position. - + Given that m is the lower bound and n is the upper bound, there are exactly n-m+1 elements in the array. These elements are indexed by subscripts from m to n, inclusive (see 12.6.1). NOTE 1 { The bounds may be positive, negative or zero, but may not be indeterminate (?) (see 14.2). - + Syntax: 165 array_type = ARRAY bound_spec OF [ OPTIONAL ] [ UNIQUE ] base_type . 176 bound_spec = '[' bound_1 ':' bound_2 ']' . @@ -119,16 +129,17 @@ class ARRAY(BaseType.Type, BaseType.Aggregate): a total of 40 elements of data type something in the attribute named sectors. Within each ARRAY[11:14], no duplicates may occur; however, the same something instance may occur in two different ARRAY[11:14] values within a single value for the attribute named sectors. - + Python definition: ================== @TODO """ - def __init__( self , bound_1 , bound_2 , base_type , UNIQUE = False, OPTIONAL=False, scope = None): + + def __init__(self, bound_1, bound_2, base_type, UNIQUE=False, OPTIONAL=False, scope=None): BaseType.Type.__init__(self, base_type, scope) - if not type(bound_1)==int: + if not type(bound_1) == int: raise TypeError("ARRAY lower bound must be an integer") - if not type(bound_2)==int: + if not type(bound_2) == int: raise TypeError("ARRAY upper bound must be an integer") if not (bound_1 <= bound_2): raise AssertionError("ARRAY lower bound must be less than or equal to upper bound") @@ -139,8 +150,8 @@ class ARRAY(BaseType.Type, BaseType.Aggregate): self._optional = OPTIONAL # preallocate list elements list_size = bound_2 - bound_1 + 1 - self._container = list_size*[None] - + self._container = list_size * [None] + def bound_1(self): return self._bound_1 @@ -149,10 +160,10 @@ class ARRAY(BaseType.Type, BaseType.Aggregate): def get_hiindex(self): return INTEGER(self._bound_2) - + def get_loindex(self): return INTEGER(self._bound_1) - + def get_hibound(self): return INTEGER(self._bound_2) @@ -160,42 +171,54 @@ class ARRAY(BaseType.Type, BaseType.Aggregate): return INTEGER(self._bound_1) def get_size(self): - return INTEGER(self._bound_2 - self._bound_1 +1) - + return INTEGER(self._bound_2 - self._bound_1 + 1) + def get_value_unique(self): - ''' Return True if all items are different in the container, UNKNOWN if some items are - indeterminate, or False otherwise''' + """Return True if all items are different in the container, UNKNOWN if some items are + indeterminate, or False otherwise""" if None in self._container: return Unknown - if self.get_size()-len(set(self._container))>0: #some items are repeated + if self.get_size() - len(set(self._container)) > 0: # some items are repeated return False else: return True - + def __getitem__(self, index): - if indexself._bound_2): - raise IndexError("ARRAY index out of bound (upper bound is %i, passed %i)"%(self._bound_2,index)) + if index < self._bound_1: + raise IndexError( + "ARRAY index out of bound (lower bound is %i, passed %i)" % (self._bound_1, index) + ) + elif index > self._bound_2: + raise IndexError( + "ARRAY index out of bound (upper bound is %i, passed %i)" % (self._bound_2, index) + ) else: - value = self._container[index-self._bound_1] - if not self._optional and value==None: - raise AssertionError("Not OPTIONAL prevent the value with index %i from being None (default). Please set the value first."%index) + value = self._container[index - self._bound_1] + if not self._optional and value == None: + raise AssertionError( + "Not OPTIONAL prevent the value with index %i from being None (default). Please set the value first." + % index + ) return value - + def __setitem__(self, index, value): - if indexself._bound_2): - raise IndexError("ARRAY index out of bound (upper bound is %i, passed %i)"%(self._bound_2,index)) + if index < self._bound_1: + raise IndexError( + "ARRAY index out of bound (lower bound is %i, passed %i)" % (self._bound_1, index) + ) + elif index > self._bound_2: + raise IndexError( + "ARRAY index out of bound (upper bound is %i, passed %i)" % (self._bound_2, index) + ) else: # first check the type of the value - check_type(value,self.get_type()) + check_type(value, self.get_type()) # then check if the value is already in the array if self._unique: if value in self._container: raise AssertionError("UNIQUE keyword prevents inserting this instance.") - self._container[index-self._bound_1] = value + self._container[index - self._bound_1] = value + class LIST(BaseType.Type, BaseType.Aggregate): """ @@ -206,7 +229,7 @@ class LIST(BaseType.Type, BaseType.Aggregate): elements that can be held in the collection defined by a list data type. A list data type definition may optionally specify that a list value cannot contain duplicate elements. - + Syntax: 237 list_type = LIST [ bound_spec ] OF [ UNIQUE ] base_type . 176 bound_spec = '[' bound_1 ':' bound_2 ']' . @@ -228,24 +251,25 @@ class LIST(BaseType.Type, BaseType.Aggregate): EXAMPLE 28 { This example defines a list of arrays. The list can contain zero to ten arrays. Each array of ten integers shall be different from all other arrays in a particular list. complex_list : LIST[0:10] OF UNIQUE ARRAY[1:10] OF INTEGER; - + Python definition: ================== @TODO """ - def __init__( self , bound_1 , bound_2 , base_type , UNIQUE = False, scope = None): + + def __init__(self, bound_1, bound_2, base_type, UNIQUE=False, scope=None): BaseType.Type.__init__(self, base_type, scope) - if not type(bound_1)==int: + if not type(bound_1) == int: raise TypeError("LIST lower bound must be an integer") # bound_2 can be set to None self._unbounded = False if bound_2 == None: self._unbounded = True - elif not type(bound_2)==int: + elif not type(bound_2) == int: raise TypeError("LIST upper bound must be an integer") - if not bound_1>=0: + if not bound_1 >= 0: raise AssertionError("LIST lower bound must be greater of equal to 0") - if (type(bound_2)==int and not (bound_1 <= bound_2)): + if type(bound_2) == int and not (bound_1 <= bound_2): raise AssertionError("ARRAY lower bound must be less than or equal to upper bound") # set up class attributes self._bound_1 = bound_1 @@ -254,7 +278,7 @@ class LIST(BaseType.Type, BaseType.Aggregate): # preallocate list elements if bounds are both integers if not self._unbounded: list_size = bound_2 - bound_1 + 1 - self._container = list_size*[None] + self._container = list_size * [None] # for unbounded list, this will come after else: self._container = [None] @@ -264,15 +288,15 @@ class LIST(BaseType.Type, BaseType.Aggregate): def bound_2(self): return self._bound_2 - + def get_size(self): number_of_indeterminates = self._container.count(None) hiindex = len(self._container) - number_of_indeterminates return INTEGER(hiindex) - + def get_hiindex(self): - ''' When V is a bag, list or set, the returned value is the actual number of elements in - the aggregate value.''' + """When V is a bag, list or set, the returned value is the actual number of elements in + the aggregate value.""" number_of_indeterminates = self._container.count(None) hiindex = len(self._container) - number_of_indeterminates return INTEGER(hiindex) @@ -282,24 +306,24 @@ class LIST(BaseType.Type, BaseType.Aggregate): def get_hibound(self): hibound = self._bound_2 - if type(hibound)==int: + if type(hibound) == int: return INTEGER(hibound) else: return hibound - + def get_lobound(self): lobound = self._bound_1 - if type(lobound)==int: + if type(lobound) == int: return INTEGER(lobound) else: return lobound def get_value_unique(self): - ''' Return True if all items are different in the container, UNKNOWN if some items are - indeterminate, or False otherwise''' + """Return True if all items are different in the container, UNKNOWN if some items are + indeterminate, or False otherwise""" if None in self._container: return Unknown - if self.get_size()-len(set(self._container))>0: #some items are repeated + if self.get_size() - len(set(self._container)) > 0: # some items are repeated return False else: return True @@ -307,66 +331,88 @@ class LIST(BaseType.Type, BaseType.Aggregate): def __getitem__(self, index): # case bounded if not self._unbounded: - if indexself._bound_2): - raise IndexError("ARRAY index out of bound (upper bound is %i, passed %i)"%(self._bound_2,index)) + if index < self._bound_1: + raise IndexError( + "ARRAY index out of bound (lower bound is %i, passed %i)" + % (self._bound_1, index) + ) + elif index > self._bound_2: + raise IndexError( + "ARRAY index out of bound (upper bound is %i, passed %i)" + % (self._bound_2, index) + ) else: - value = self._container[index-self._bound_1] + value = self._container[index - self._bound_1] if value == None: - raise AssertionError("Value with index %i not defined. Please set the value first."%index) + raise AssertionError( + "Value with index %i not defined. Please set the value first." % index + ) return value - #case unbounded + # case unbounded else: - if index-self._bound_1>len(self._container): - raise AssertionError("Value with index %i not defined. Please set the value first."%index) + if index - self._bound_1 > len(self._container): + raise AssertionError( + "Value with index %i not defined. Please set the value first." % index + ) else: - value = self._container[index-self._bound_1] + value = self._container[index - self._bound_1] if value == None: - raise AssertionError("Value with index %i not defined. Please set the value first."%index) + raise AssertionError( + "Value with index %i not defined. Please set the value first." % index + ) return value - + def __setitem__(self, index, value): # case bounded if not self._unbounded: - if indexself._bound_2): - raise IndexError("ARRAY index out of bound (upper bound is %i, passed %i)"%(self._bound_2,index)) + if index < self._bound_1: + raise IndexError( + "ARRAY index out of bound (lower bound is %i, passed %i)" + % (self._bound_1, index) + ) + elif index > self._bound_2: + raise IndexError( + "ARRAY index out of bound (upper bound is %i, passed %i)" + % (self._bound_2, index) + ) else: # first check the type of the value - check_type(value,self.get_type()) + check_type(value, self.get_type()) # then check if the value is already in the array if self._unique: if value in self._container: raise AssertionError("UNIQUE keyword prevent inserting this instance.") - self._container[index-self._bound_1] = value + self._container[index - self._bound_1] = value # case unbounded else: - if index=0: + if not bound_1 >= 0: raise AssertionError("LIST lower bound must be greater of equal to 0") - if (type(bound_2)==int and not (bound_1 <= bound_2)): + if type(bound_2) == int and not (bound_1 <= bound_2): raise AssertionError("ARRAY lower bound must be less than or equal to upper bound") # set up class attributes self._bound_1 = bound_1 @@ -432,29 +479,29 @@ class BAG(BaseType.Type, BaseType.Aggregate): def bound_2(self): return self._bound_2 - def add(self,value): - ''' + def add(self, value): + """ Adds a value to the bag - ''' + """ if self._unbounded: - check_type(value,self.get_type()) + check_type(value, self.get_type()) self._container.append(value) else: # first ensure that the bag is not full if len(self._container) == self._bound_2 - self._bound_1 + 1: - raise AssertionError('BAG is full. Impossible to add any more item') + raise AssertionError("BAG is full. Impossible to add any more item") else: - check_type(value,self.get_type()) + check_type(value, self.get_type()) self._container.append(value) def get_size(self): - ''' When V is a bag, list or set, the returned value is the actual number of elements in - the aggregate value.''' + """When V is a bag, list or set, the returned value is the actual number of elements in + the aggregate value.""" return INTEGER(len(self._container)) - + def get_hiindex(self): - ''' When V is a bag, list or set, the returned value is the actual number of elements in - the aggregate value.''' + """When V is a bag, list or set, the returned value is the actual number of elements in + the aggregate value.""" return INTEGER(len(self._container)) def get_loindex(self): @@ -462,23 +509,24 @@ class BAG(BaseType.Type, BaseType.Aggregate): def get_hibound(self): hibound = self._bound_2 - if type(hibound)==int: + if type(hibound) == int: return INTEGER(hibound) else: return hibound def get_lobound(self): lobound = self._bound_1 - if type(lobound)==int: + if type(lobound) == int: return INTEGER(lobound) else: return lobound + def get_value_unique(self): - ''' Return True if all items are different in the container, UNKNOWN if some items are - indeterminate, or False otherwise''' + """Return True if all items are different in the container, UNKNOWN if some items are + indeterminate, or False otherwise""" if None in self._container: return Unknown - if self.get_size()-len(set(self._container))>0: #some items are repeated + if self.get_size() - len(set(self._container)) > 0: # some items are repeated return False else: return True @@ -520,24 +568,25 @@ class SET(BaseType.Type, BaseType.Aggregate): as in: a_set_of_points : SET [0:15] OF point; The value of the attribute named a_set_of_points now may contain no more than 15 points. - + Python definition: ================== The difference with the BAG class is that the base container for SET is a set object. """ - def __init__( self , bound_1 , bound_2 , base_type , scope = None): + + def __init__(self, bound_1, bound_2, base_type, scope=None): BaseType.Type.__init__(self, base_type, scope) - if not type(bound_1)==int: + if not type(bound_1) == int: raise TypeError("LIST lower bound must be an integer") # bound_2 can be set to None self._unbounded = False if bound_2 == None: self._unbounded = True - elif not type(bound_2)==int: + elif not type(bound_2) == int: raise TypeError("LIST upper bound must be an integer") - if not bound_1>=0: + if not bound_1 >= 0: raise AssertionError("LIST lower bound must be greater of equal to 0") - if (type(bound_2)==int and not (bound_1 <= bound_2)): + if type(bound_2) == int and not (bound_1 <= bound_2): raise AssertionError("ARRAY lower bound must be less than or equal to upper bound") # set up class attributes self._bound_1 = bound_1 @@ -550,30 +599,30 @@ class SET(BaseType.Type, BaseType.Aggregate): def bound_2(self): return self._bound_2 - def add(self,value): - ''' + def add(self, value): + """ Adds a value to the bag - ''' + """ if self._unbounded: - check_type(value,self.get_type()) + check_type(value, self.get_type()) self._container.add(value) else: # first ensure that the bag is not full if len(self._container) == self._bound_2 - self._bound_1 + 1: if not value in self._container: - raise AssertionError('SET is full. Impossible to add any more item') + raise AssertionError("SET is full. Impossible to add any more item") else: - check_type(value,self.get_type()) + check_type(value, self.get_type()) self._container.add(value) - + def get_size(self): - ''' When V is a bag, list or set, the returned value is the actual number of elements in - the aggregate value.''' + """When V is a bag, list or set, the returned value is the actual number of elements in + the aggregate value.""" return INTEGER(len(self._container)) - + def get_hiindex(self): - ''' When V is a bag, list or set, the returned value is the actual number of elements in - the aggregate value.''' + """When V is a bag, list or set, the returned value is the actual number of elements in + the aggregate value.""" return INTEGER(len(self._container)) def get_loindex(self): @@ -581,21 +630,21 @@ class SET(BaseType.Type, BaseType.Aggregate): def get_hibound(self): hibound = self._bound_2 - if type(hibound)==int: + if type(hibound) == int: return INTEGER(hibound) else: return hibound def get_lobound(self): lobound = self._bound_1 - if type(lobound)==int: + if type(lobound) == int: return INTEGER(lobound) else: return lobound - + def get_value_unique(self): - ''' Return True if all items are different in the container, UNKNOWN if some items are - indeterminate, or False otherwise''' + """Return True if all items are different in the container, UNKNOWN if some items are + indeterminate, or False otherwise""" if None in self._container: return Unknown else: diff --git a/src/Mod/Import/App/SCL/BaseType.py b/src/Mod/Import/App/SCL/BaseType.py index 9a787d1de3..4afdaa3d79 100644 --- a/src/Mod/Import/App/SCL/BaseType.py +++ b/src/Mod/Import/App/SCL/BaseType.py @@ -23,47 +23,54 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + class Type(object): - ''' + """ A type can be defined from its name and scope Looking into the scope dict returns the python type class. This is the base class for aggregated data types or constructed data types - ''' + """ + def __init__(self, typedef, scope): self._scope = scope self._typedef = typedef - + def get_scope(self): return self._scope - + def get_type(self): if type(self._typedef) == str: if self._scope == None: - raise AssertionError('No scope defined for this type') + raise AssertionError("No scope defined for this type") elif self._typedef in vars(self._scope): return vars(self._scope)[self._typedef] else: - raise TypeError("Type '%s' is not defined in given scope"%self._typedef) + raise TypeError("Type '%s' is not defined in given scope" % self._typedef) else: return self._typedef + class Aggregate: - ''' + """ This is an abstract class. ARRAY, LIST, SET and BAG inherit from this class - ''' + """ + pass + if __name__ == "__main__": import sys + scp = sys.modules[__name__] + class line: pass - new_type = Type('lie',scp) + + new_type = Type("lie", scp) print(new_type.get_type()) - \ No newline at end of file diff --git a/src/Mod/Import/App/SCL/Builtin.py b/src/Mod/Import/App/SCL/Builtin.py index ed8d70011b..c9a71e6bbc 100644 --- a/src/Mod/Import/App/SCL/Builtin.py +++ b/src/Mod/Import/App/SCL/Builtin.py @@ -23,7 +23,7 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF @@ -41,625 +41,654 @@ SCL_float_epsilon = 1e-7 # EXPRESS definition: # =================== -#14.1 CONST_E is a REAL constant representing the mathematical value e, the base of the natural -#logarithm function (ln). +# 14.1 CONST_E is a REAL constant representing the mathematical value e, the base of the natural +# logarithm function (ln). CONST_E = REAL(math.pi) # EXPRESS definition: # =================== -#14.2 Indeterminate -#The indeterminate symbol (?) stands for an ambiguous value. It is compatible with all data -#types. -#NOTE - The most common use of indeterminate (?) is as the upper bound specification of a bag, -#list or set. This usage represents the notion that the size of the aggregate value defined by the -#aggregation data type is unbounded. +# 14.2 Indeterminate +# The indeterminate symbol (?) stands for an ambiguous value. It is compatible with all data +# types. +# NOTE - The most common use of indeterminate (?) is as the upper bound specification of a bag, +# list or set. This usage represents the notion that the size of the aggregate value defined by the +# aggregation data type is unbounded. # python note: indeterminate value is mapped to None in aggregate bounds # EXPRESS definition: # =================== -#14.3 False -#false is a logical constant representing the logical notion of falsehood. It is compatible with -#the boolean and logical data types. +# 14.3 False +# false is a logical constant representing the logical notion of falsehood. It is compatible with +# the boolean and logical data types. FALSE = False # EXPRESS definition: # =================== -#14.4 Pi -#PI is a REAL constant representing the mathematical value π, the ratio of a circle's circumference -#to its diameter. +# 14.4 Pi +# PI is a REAL constant representing the mathematical value π, the ratio of a circle's circumference +# to its diameter. PI = REAL(math.pi) # EXPRESS definition: # =================== -#14.5 Self -#SELF refers to the current entity instance or type value. self may appear within an entity -#declaration, a type declaration or an entity constructor. -#NOTE - SELF is not a constant, but behaves as one in every context in which it can appear. +# 14.5 Self +# SELF refers to the current entity instance or type value. self may appear within an entity +# declaration, a type declaration or an entity constructor. +# NOTE - SELF is not a constant, but behaves as one in every context in which it can appear. # python note: SELF is not mapped to any constant, but is mapper to self # EXPRESS definition: # =================== -#14.6 True -#true is a logical constant representing the logical notion of truth. It is compatible with the -#boolean and logical data types. +# 14.6 True +# true is a logical constant representing the logical notion of truth. It is compatible with the +# boolean and logical data types. TRUE = True # EXPRESS definition: # =================== -#14.7 Unknown -#unknown is a logical constant representing that there is insufficient information available to -#be able to evaluate a logical condition. It is compatible with the logical data type, but not -#with the boolean data type. +# 14.7 Unknown +# unknown is a logical constant representing that there is insufficient information available to +# be able to evaluate a logical condition. It is compatible with the logical data type, but not +# with the boolean data type. # @TODO: define UNKNOWN in python # # Builtin Functions -#15 Built-in functions -#All functions (and mathematical operations in general) are assumed to evaluate to exact results. -#The prototype for each of the built-in functions is given to show the type of the formal parameters -#and the result. +# 15 Built-in functions +# All functions (and mathematical operations in general) are assumed to evaluate to exact results. +# The prototype for each of the built-in functions is given to show the type of the formal parameters +# and the result. # # EXPRESS definition: # =================== -#15.1 Abs - arithmetic function -#FUNCTION ABS ( V:NUMBER ) : NUMBER; -#The abs function returns the absolute value of a number. -#Parameters : V is a number. -#Result : The absolute value of V. The returned data type is identical to the data type of V. -#EXAMPLE 125 { ABS ( -10 ) --> 10 +# 15.1 Abs - arithmetic function +# FUNCTION ABS ( V:NUMBER ) : NUMBER; +# The abs function returns the absolute value of a number. +# Parameters : V is a number. +# Result : The absolute value of V. The returned data type is identical to the data type of V. +# EXAMPLE 125 { ABS ( -10 ) --> 10 # Python definition: # ================== # ABS is mapped to python abs builtin function def ABS(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("ABS function takes a NUMBER parameter") return type(V)(abs(V)) + # EXPRESS definition: # =================== -#15.2 ACos - arithmetic function -#FUNCTION ACOS ( V:NUMBER ) : REAL; -#The acos function returns the angle given a cosine value. -#Parameters : V is a number which is the cosine of an angle. -#Result : The angle in radians (0 <= result <= pi) whose cosine is V. -#Conditions : -1.0= 1.266103... +# 15.2 ACos - arithmetic function +# FUNCTION ACOS ( V:NUMBER ) : REAL; +# The acos function returns the angle given a cosine value. +# Parameters : V is a number which is the cosine of an angle. +# Result : The angle in radians (0 <= result <= pi) whose cosine is V. +# Conditions : -1.0= 1.266103... # Python definition: # ================== # ACOS is mapped to python math.acos builtin function def ACOS(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("ACOS function takes a NUMBER parameter") return REAL(math.acos(V)) + # it's the same for ASIN and ATAN def ASIN(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("ASIN function takes a NUMBER parameter") return REAL(math.asin(V)) + # EXPRESS definition: # =================== # 15.3 ATan - arithmetic function -#FUNCTION ATAN ( V1:NUMBER; V2:NUMBER ) : REAL; -#The atan function returns the angle given a tangent value of V , where V is given by the -#expression V = V1/V2. -#Parameters : -#a) V1 is a number. -#b) V2 is a number. -#Result : The angle in radians (-pi/2<=result<=pi/2) whose tangent is V. If V2 is zero, the result -#is pi/2 or -pi/2 depending on the sign of V1. -#Conditions : Both V1 and V2 shall not be zero. -#EXAMPLE 128 { ATAN ( -5.5, 3.0 ) --> -1.071449... -def ATAN(V1,V2): - if not isinstance(V1,NUMBER) and not isinstance(V2,NUMBER): +# FUNCTION ATAN ( V1:NUMBER; V2:NUMBER ) : REAL; +# The atan function returns the angle given a tangent value of V , where V is given by the +# expression V = V1/V2. +# Parameters : +# a) V1 is a number. +# b) V2 is a number. +# Result : The angle in radians (-pi/2<=result<=pi/2) whose tangent is V. If V2 is zero, the result +# is pi/2 or -pi/2 depending on the sign of V1. +# Conditions : Both V1 and V2 shall not be zero. +# EXAMPLE 128 { ATAN ( -5.5, 3.0 ) --> -1.071449... +def ATAN(V1, V2): + if not isinstance(V1, NUMBER) and not isinstance(V2, NUMBER): raise TypeError("ATAN function takes 2 NUMBER parameters") if V2 == 0: - if V1>0: - return REAL(math.pi/2) - elif V1<0: - return REAL(-math.pi/2) + if V1 > 0: + return REAL(math.pi / 2) + elif V1 < 0: + return REAL(-math.pi / 2) else: raise ValueError("ATAN parameters can be both equal to zero") else: - return REAL(math.atan(float(V1)/float(V2))) + return REAL(math.atan(float(V1) / float(V2))) + # EXPRESS definition: # =================== -#15.5 BLength - binary function -#FUNCTION BLENGTH ( V:BINARY ) : INTEGER; -#The blength function returns the number of bits in a binary. -#Parameters : V is a binary value. -#Result : The returned value is the actual number of bits in the binary value passed. -#EXAMPLE 129 -#LOCAL -#n : NUMBER; -#x : BINARY := %01010010 ; -#END_LOCAL; -#... -#n := BLENGTH ( x ); -- n is assigned the value 8 +# 15.5 BLength - binary function +# FUNCTION BLENGTH ( V:BINARY ) : INTEGER; +# The blength function returns the number of bits in a binary. +# Parameters : V is a binary value. +# Result : The returned value is the actual number of bits in the binary value passed. +# EXAMPLE 129 +# LOCAL +# n : NUMBER; +# x : BINARY := %01010010 ; +# END_LOCAL; +# ... +# n := BLENGTH ( x ); -- n is assigned the value 8 def BLENGTH(V): - if not isinstance(V,BINARY): + if not isinstance(V, BINARY): raise TypeError("BLENGTH function takes one BINARY parameter") return INTEGER(len(V)) -# EXPRESS definition: -# =================== -#15.6 Cos - arithmetic function -#FUNCTION COS ( V:NUMBER ) : REAL; -#The cos function returns the cosine of an angle. -#Parameters : V is a number which is an angle in radians. -#Result : The cosine of V (-1.0<=result<=1.0). -#EXAMPLE 130 { COS ( 0.5 ) --> 8.77582...E-1 -# -#15.21 Sin - arithmetic function -#FUNCTION SIN ( V:NUMBER ) : REAL; -#The sin function returns the sine of an angle. -#Parameters : V is a number representing an angle expressed in radians. -#Result : The sine of V (-1.0 <= result <= 1.0). -#EXAMPLE 144 { SIN ( PI ) --> 0.0 -# -def COS(V): - if not isinstance(V,NUMBER): - raise TypeError("COS function takes a NUMBER parameter") - return REAL(math.cos(V)) -def SIN(V): - if not isinstance(V,NUMBER): - raise TypeError("SIN function takes a NUMBER parameter") - return REAL(math.sin(V)) # EXPRESS definition: # =================== -#15.7 Exists - general function -#FUNCTION EXISTS ( V:GENERIC ) : BOOLEAN; -#The exists function returns true if a value exists for the input parameter, or false if no value -#exists for it. The exists function is useful for checking if values have been given to optional -#attributes, or if variables have been initialized. -#Parameters : V is an expression which results in any type. -#Result : true or false depending on whether V has an actual or indeterminate (?) value. -#EXAMPLE 131 { IF EXISTS ( a ) THEN ... +# 15.6 Cos - arithmetic function +# FUNCTION COS ( V:NUMBER ) : REAL; +# The cos function returns the cosine of an angle. +# Parameters : V is a number which is an angle in radians. +# Result : The cosine of V (-1.0<=result<=1.0). +# EXAMPLE 130 { COS ( 0.5 ) --> 8.77582...E-1 +# +# 15.21 Sin - arithmetic function +# FUNCTION SIN ( V:NUMBER ) : REAL; +# The sin function returns the sine of an angle. +# Parameters : V is a number representing an angle expressed in radians. +# Result : The sine of V (-1.0 <= result <= 1.0). +# EXAMPLE 144 { SIN ( PI ) --> 0.0 +# +def COS(V): + if not isinstance(V, NUMBER): + raise TypeError("COS function takes a NUMBER parameter") + return REAL(math.cos(V)) + + +def SIN(V): + if not isinstance(V, NUMBER): + raise TypeError("SIN function takes a NUMBER parameter") + return REAL(math.sin(V)) + + +# EXPRESS definition: +# =================== +# 15.7 Exists - general function +# FUNCTION EXISTS ( V:GENERIC ) : BOOLEAN; +# The exists function returns true if a value exists for the input parameter, or false if no value +# exists for it. The exists function is useful for checking if values have been given to optional +# attributes, or if variables have been initialized. +# Parameters : V is an expression which results in any type. +# Result : true or false depending on whether V has an actual or indeterminate (?) value. +# EXAMPLE 131 { IF EXISTS ( a ) THEN ... def EXISTS(V): - if V==None: + if V == None: return False else: return True + # EXPRESS definition: # =================== -#15.8 Exp - arithmetic function -#FUNCTION EXP ( V:NUMBER ) : REAL; -#The exp function returns e (the base of the natural logarithm system) raised to the power V. -#Parameters : V is a number. -#Result : The value eV . -#EXAMPLE 132 { EXP ( 10 ) --> 2.202646...E+4 +# 15.8 Exp - arithmetic function +# FUNCTION EXP ( V:NUMBER ) : REAL; +# The exp function returns e (the base of the natural logarithm system) raised to the power V. +# Parameters : V is a number. +# Result : The value eV . +# EXAMPLE 132 { EXP ( 10 ) --> 2.202646...E+4 def EXP(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("EXP function takes a NUMBER parameter") return REAL(math.exp(V)) - + + # EXPRESS definition: # =================== -#15.9 Format - general function -#FUNCTION FORMAT(N:NUMBER; F:STRING):STRING; -#The format returns a formatted string representation of a number. -#Parameters : -#a) N is a number (integer or real). -#b) F is a string containing formatting commands. -#Result : A string representation of N formatted according to F. Rounding is applied to the -#string representation if necessary. -#The formatting string contains special characters to indicate the appearance of the result. The -#formatting string can be written in three ways: -#a) The formatting string can give a symbolic description of the output representation. -#b) The formatting string can give a picture description of the output representation. -#c) When the formatting string is empty, a standard output representation is produced. +# 15.9 Format - general function +# FUNCTION FORMAT(N:NUMBER; F:STRING):STRING; +# The format returns a formatted string representation of a number. +# Parameters : +# a) N is a number (integer or real). +# b) F is a string containing formatting commands. +# Result : A string representation of N formatted according to F. Rounding is applied to the +# string representation if necessary. +# The formatting string contains special characters to indicate the appearance of the result. The +# formatting string can be written in three ways: +# a) The formatting string can give a symbolic description of the output representation. +# b) The formatting string can give a picture description of the output representation. +# c) When the formatting string is empty, a standard output representation is produced. # Table 20: -#Number Format Display Comment -#10 +7I ' +10' Zero suppression -#10 +07I '+000010' Zeros not suppressed -#10 10.3E ' 1.000E+01' -#123.456789 8.2F ' 123.46' -#123.456789 8.2E '1.23E+02' -#123.456789 08.2E '0.12E+02' Preceding zero forced -#9.876E123 8.2E '9.88E+123' Exponent part is 3 characters -#and width ignored -#32.777 6I ' 33' Rounded +# Number Format Display Comment +# 10 +7I ' +10' Zero suppression +# 10 +07I '+000010' Zeros not suppressed +# 10 10.3E ' 1.000E+01' +# 123.456789 8.2F ' 123.46' +# 123.456789 8.2E '1.23E+02' +# 123.456789 08.2E '0.12E+02' Preceding zero forced +# 9.876E123 8.2E '9.88E+123' Exponent part is 3 characters +# and width ignored +# 32.777 6I ' 33' Rounded # Python definition # ================= # python string formatting is obtained from the val function # @TODO: implement a safe eval or provide another implementation # that avoids unsafe eval python builtin function. -def FORMAT(N,F): - if not isinstance(N,NUMBER): +def FORMAT(N, F): + if not isinstance(N, NUMBER): raise TypeError("FORMAT function takes a NUMBER parameter") - if not isinstance(F,STRING): + if not isinstance(F, STRING): raise TypeError("FORMAT function takes a NUMBER parameter") py_formatting = F.lower() string_to_evaluate = "'%" - string_to_evaluate += "%s'"%py_formatting + string_to_evaluate += "%s'" % py_formatting string_to_evaluate += "%" - string_to_evaluate += "%s"%N + string_to_evaluate += "%s" % N result = eval(string_to_evaluate).upper() return STRING(result) + # EXPRESS definition: # =================== -#15.10 HiBound - arithmetic function -#FUNCTION HIBOUND ( V:AGGREGATE OF GENERIC ) : INTEGER; -#The hibound function returns the declared upper index of an array or the declared upper -#bound of a bag, list or set. -#Parameters : V is an aggregate value. -#Result : -#a) When V is an array the returned value is the declared upper index. -#b) When V is a bag, list or set the returned value is the declared upper bound; if there -#are no bounds declared or the upper bound is declared to be indeterminate (?) indeterminate -#(?) is returned. -#EXAMPLE 133 { Usage of hibound function on nested aggregate values. -#LOCAL -#a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; -#h1, h2, h3 : INTEGER; -#END_LOCAL; -#... -#a[-3][1][1] := 2; -- places a value in the list -#... -#h1 := HIBOUND(a); -- =19 (upper bound of array) -#h2 := HIBOUND(a[-3]); -- = 4 (upper bound of set) -#h3 := HIBOUND(a[-3][1]); -- = ? (upper bound of list (unbounded)) +# 15.10 HiBound - arithmetic function +# FUNCTION HIBOUND ( V:AGGREGATE OF GENERIC ) : INTEGER; +# The hibound function returns the declared upper index of an array or the declared upper +# bound of a bag, list or set. +# Parameters : V is an aggregate value. +# Result : +# a) When V is an array the returned value is the declared upper index. +# b) When V is a bag, list or set the returned value is the declared upper bound; if there +# are no bounds declared or the upper bound is declared to be indeterminate (?) indeterminate +# (?) is returned. +# EXAMPLE 133 { Usage of hibound function on nested aggregate values. +# LOCAL +# a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; +# h1, h2, h3 : INTEGER; +# END_LOCAL; +# ... +# a[-3][1][1] := 2; -- places a value in the list +# ... +# h1 := HIBOUND(a); -- =19 (upper bound of array) +# h2 := HIBOUND(a[-3]); -- = 4 (upper bound of set) +# h3 := HIBOUND(a[-3][1]); -- = ? (upper bound of list (unbounded)) def HIBOUND(V): - if not isinstance(V,Aggregate): + if not isinstance(V, Aggregate): raise TypeError("HIBOUND takes an aggregate of generic") return V.get_hibound() + # EXPRESS definition: # =================== -#15.11 HiIndex - arithmetic function -#FUNCTION HIINDEX ( V:AGGREGATE OF GENERIC ) : INTEGER; -#The hiindex function returns the upper index of an array or the number of elements in a bag, -#list or set -#Parameters : V is an aggregate value. -#Result : -#a) When V is an array, the returned value is the declared upper index. -#b) When V is a bag, list or set, the returned value is the actual number of elements in -#the aggregate value. -#EXAMPLE 134 { Usage of hiindex function on nested aggregate values. -#LOCAL -#a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; -#h1, h2, h3 : INTEGER; -#END_LOCAL; -#a[-3][1][1] := 2; -- places a value in the list -#h1 := HIINDEX(a); -- = 19 (upper bound of array) -#h2 := HIINDEX(a[-3]); -- = 1 (size of set) -- this is invalid with respect -#-- to the bounds on the SET -#h3 := HIINDEX(a[-3][1]); -- = 1 (size of list) +# 15.11 HiIndex - arithmetic function +# FUNCTION HIINDEX ( V:AGGREGATE OF GENERIC ) : INTEGER; +# The hiindex function returns the upper index of an array or the number of elements in a bag, +# list or set +# Parameters : V is an aggregate value. +# Result : +# a) When V is an array, the returned value is the declared upper index. +# b) When V is a bag, list or set, the returned value is the actual number of elements in +# the aggregate value. +# EXAMPLE 134 { Usage of hiindex function on nested aggregate values. +# LOCAL +# a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; +# h1, h2, h3 : INTEGER; +# END_LOCAL; +# a[-3][1][1] := 2; -- places a value in the list +# h1 := HIINDEX(a); -- = 19 (upper bound of array) +# h2 := HIINDEX(a[-3]); -- = 1 (size of set) -- this is invalid with respect +# -- to the bounds on the SET +# h3 := HIINDEX(a[-3][1]); -- = 1 (size of list) def HIINDEX(V): - if not isinstance(V,Aggregate): + if not isinstance(V, Aggregate): raise TypeError("HIINDEX takes an aggregate of generic") return V.get_hiindex() + # EXPRESS definition: # =================== -#15.12 Length - string function -#FUNCTION LENGTH ( V:STRING ) : INTEGER; -#The length function returns the number of characters in a string. -#Parameters : V is a string value. -#Result : The returned value is the number of characters in the string and shall be greater than -#or equal to zero. -#EXAMPLE 135 - Usage of the length function. -#LOCAL -#n : NUMBER; -#x1 : STRING := 'abc'; -#x2 : STRING := "000025FF000101B5; -#END_LOCAL; -#... -#n := LENGTH ( x1 ); -- n is assigned the value 3 -#n := LENGTH ( x2 ); -- n is assigned the value 2 +# 15.12 Length - string function +# FUNCTION LENGTH ( V:STRING ) : INTEGER; +# The length function returns the number of characters in a string. +# Parameters : V is a string value. +# Result : The returned value is the number of characters in the string and shall be greater than +# or equal to zero. +# EXAMPLE 135 - Usage of the length function. +# LOCAL +# n : NUMBER; +# x1 : STRING := 'abc'; +# x2 : STRING := "000025FF000101B5; +# END_LOCAL; +# ... +# n := LENGTH ( x1 ); -- n is assigned the value 3 +# n := LENGTH ( x2 ); -- n is assigned the value 2 def LENGTH(V): - if not isinstance(V,STRING): + if not isinstance(V, STRING): raise TypeError("LENGTH take a STRING parameter") return INTEGER(len(V)) + # EXPRESS definition: # =================== -#15.13 LoBound - arithmetic function -#FUNCTION LOBOUND ( V:AGGREGATE OF GENERIC ) : INTEGER; -#The lobound function returns the declared lower index of an array, or the declared lower -#bound of a bag, list or set. -#Parameters : V is an aggregate value. -#Result : -#a) When V is an array the returned value is the declared lower index. -#b) When V is a bag, list or set the returned value is the declared lower bound; if no -#lower bound is declared, zero (0) is returned. -#EXAMPLE 136 { Usage of lobound function on nested aggregate values. -#LOCAL -#a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; -#h1, h2, h3 : INTEGER; -#END_LOCAL; -#... -#h1 := LOBOUND(a); -- =-3 (lower index of array) -#h2 := LOBOUND(a[-3]); -- = 2 (lower bound of set) -#h3 := LOBOUND(a[-3][1]); -- = 0 (lower bound of list) +# 15.13 LoBound - arithmetic function +# FUNCTION LOBOUND ( V:AGGREGATE OF GENERIC ) : INTEGER; +# The lobound function returns the declared lower index of an array, or the declared lower +# bound of a bag, list or set. +# Parameters : V is an aggregate value. +# Result : +# a) When V is an array the returned value is the declared lower index. +# b) When V is a bag, list or set the returned value is the declared lower bound; if no +# lower bound is declared, zero (0) is returned. +# EXAMPLE 136 { Usage of lobound function on nested aggregate values. +# LOCAL +# a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; +# h1, h2, h3 : INTEGER; +# END_LOCAL; +# ... +# h1 := LOBOUND(a); -- =-3 (lower index of array) +# h2 := LOBOUND(a[-3]); -- = 2 (lower bound of set) +# h3 := LOBOUND(a[-3][1]); -- = 0 (lower bound of list) def LOBOUND(V): - if not isinstance(V,Aggregate): + if not isinstance(V, Aggregate): raise TypeError("HIBOUND takes an aggregate of generic") return V.get_lobound() - + + # EXPRESS definition: -# =================== -#15.14 Log - arithmetic function -#FUNCTION LOG ( V:NUMBER ) : REAL; -#The log function returns the natural logarithm of a number. -#Parameters : V is a number. -#Result : A real number which is the natural logarithm of V. -#Conditions : V > 0:0 -#EXAMPLE 137 { LOG ( 4.5 ) --> 1.504077...E0 -#15.15 Log2 - arithmetic function -#FUNCTION LOG2 ( V:NUMBER ) : REAL; -#The log2 function returns the base two logarithm of a number. -#Parameters : V is a number. -#Result : A real number which is the base two logarithm of V. -#Conditions : V > 0:0 -#EXAMPLE 138 { LOG2 ( 8 ) --> 3.00...E0 -#15.16 Log10 - arithmetic function -#FUNCTION LOG10 ( V:NUMBER ) : REAL; -#The log10 function returns the base ten logarithm of a number. -#Parameters : V is a number. -#Result : A real number which is the base ten logarithm of V. -#Conditions : V > 0:0 -#EXAMPLE 139 { LOG10 ( 10 ) --> 1.00...E0 +# =================== +# 15.14 Log - arithmetic function +# FUNCTION LOG ( V:NUMBER ) : REAL; +# The log function returns the natural logarithm of a number. +# Parameters : V is a number. +# Result : A real number which is the natural logarithm of V. +# Conditions : V > 0:0 +# EXAMPLE 137 { LOG ( 4.5 ) --> 1.504077...E0 +# 15.15 Log2 - arithmetic function +# FUNCTION LOG2 ( V:NUMBER ) : REAL; +# The log2 function returns the base two logarithm of a number. +# Parameters : V is a number. +# Result : A real number which is the base two logarithm of V. +# Conditions : V > 0:0 +# EXAMPLE 138 { LOG2 ( 8 ) --> 3.00...E0 +# 15.16 Log10 - arithmetic function +# FUNCTION LOG10 ( V:NUMBER ) : REAL; +# The log10 function returns the base ten logarithm of a number. +# Parameters : V is a number. +# Result : A real number which is the base ten logarithm of V. +# Conditions : V > 0:0 +# EXAMPLE 139 { LOG10 ( 10 ) --> 1.00...E0 def LOG(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("LOG function takes a NUMBER parameter") return REAL(math.log(V)) + + def LOG2(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("LOG2 function takes a NUMBER parameter") - return REAL(math.log(V,2)) + return REAL(math.log(V, 2)) + + def LOG10(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("LOG10 function takes a NUMBER parameter") return REAL(math.log10(V)) + # EXPRESS definition: -# =================== -#15.17 LoIndex - arithmetic function -#FUNCTION LOINDEX ( V:AGGREGATE OF GENERIC ) : INTEGER; -#The loindex function returns the lower index of an aggregate value. -#Parameters : V is an aggregate value. -#Result : -#a) When V is an array the returned value is the declared lower index. -#b) When V is a bag, list or set, the returned value is 1 (one). -#EXAMPLE 140 { Usage of loindex function on nested aggregate values. -#LOCAL -#a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; -#h1, h2, h3 : INTEGER; -#END_LOCAL; -#... -#h1 := LOINDEX(a); -- =-3 (lower bound of array) -#h2 := LOINDEX(a[-3]); -- = 1 (for set) -#h3 := LOINDEX(a[-3][1]); -- = 1 (for list) +# =================== +# 15.17 LoIndex - arithmetic function +# FUNCTION LOINDEX ( V:AGGREGATE OF GENERIC ) : INTEGER; +# The loindex function returns the lower index of an aggregate value. +# Parameters : V is an aggregate value. +# Result : +# a) When V is an array the returned value is the declared lower index. +# b) When V is a bag, list or set, the returned value is 1 (one). +# EXAMPLE 140 { Usage of loindex function on nested aggregate values. +# LOCAL +# a : ARRAY[-3:19] OF SET[2:4] OF LIST[0:?] OF INTEGER; +# h1, h2, h3 : INTEGER; +# END_LOCAL; +# ... +# h1 := LOINDEX(a); -- =-3 (lower bound of array) +# h2 := LOINDEX(a[-3]); -- = 1 (for set) +# h3 := LOINDEX(a[-3][1]); -- = 1 (for list) def LOINDEX(V): - if not isinstance(V,Aggregate): + if not isinstance(V, Aggregate): raise TypeError("LOINDEX takes an aggregate of generic") return V.get_loindex() + # EXPRESS definition: -# =================== -#15.18 NVL - null value function -#FUNCTION NVL(V:GENERIC:GEN1; SUBSTITUTE:GENERIC:GEN1):GENERIC:GEN1; -#The nvl function returns either the input value or an alternate value in the case where the input -#has a indeterminate (?) value. -#Parameters : -#a) V is an expression which is of any type. -#b) SUBSTITUTE is an expression which shall not evaluate to indeterminate (?). -#Result : When V is not indeterminate (?) that value is returned. Otherwise, SUBSTITUTE is -#returned. -#EXAMPLE 141 { ENTITY unit_vector; -#x, y : REAL; -#z : OPTIONAL REAL; -#WHERE -#x**2 + y**2 + NVL(z, 0.0)**2 = 1.0; -#END_ENTITY; -#The nvl function is used to supply zero (0.0) as the value of Z when Z is indeterminate (?). -def NVL(V,SUBSTITUTE): +# =================== +# 15.18 NVL - null value function +# FUNCTION NVL(V:GENERIC:GEN1; SUBSTITUTE:GENERIC:GEN1):GENERIC:GEN1; +# The nvl function returns either the input value or an alternate value in the case where the input +# has a indeterminate (?) value. +# Parameters : +# a) V is an expression which is of any type. +# b) SUBSTITUTE is an expression which shall not evaluate to indeterminate (?). +# Result : When V is not indeterminate (?) that value is returned. Otherwise, SUBSTITUTE is +# returned. +# EXAMPLE 141 { ENTITY unit_vector; +# x, y : REAL; +# z : OPTIONAL REAL; +# WHERE +# x**2 + y**2 + NVL(z, 0.0)**2 = 1.0; +# END_ENTITY; +# The nvl function is used to supply zero (0.0) as the value of Z when Z is indeterminate (?). +def NVL(V, SUBSTITUTE): if V is not None: return V else: return SUBSTITUTE + # EXPRESS definition: -# =================== -#15.19 Odd - arithmetic function -#FUNCTION ODD ( V:INTEGER ) : LOGICAL; -#The odd function returns true or false depending on whether a number is odd or even. -#Parameters : V is an integer number. -#Result : When V MOD 2 = 1 true is returned; otherwise false is returned. -#Conditions : Zero is not odd. -#EXAMPLE 142 { ODD ( 121 ) --> TRUE +# =================== +# 15.19 Odd - arithmetic function +# FUNCTION ODD ( V:INTEGER ) : LOGICAL; +# The odd function returns true or false depending on whether a number is odd or even. +# Parameters : V is an integer number. +# Result : When V MOD 2 = 1 true is returned; otherwise false is returned. +# Conditions : Zero is not odd. +# EXAMPLE 142 { ODD ( 121 ) --> TRUE def ODD(V): - if not isinstance(V,INTEGER): + if not isinstance(V, INTEGER): raise TypeError("ODD takes an INTEGER") - if V%2 == 0: + if V % 2 == 0: return False else: return True + # EXPRESS definition: -# =================== -#15.20 RolesOf - general function -#FUNCTION ROLESOF ( V:GENERIC ) : SET OF STRING; -#The rolesof function returns a set of strings containing the fully qualified names of the roles -#played by the specified entity instance. A fully qualified name is defined to be the name of the -#attribute qualified by the name of the schema and entity in which this attribute is declared (i.e. +# =================== +# 15.20 RolesOf - general function +# FUNCTION ROLESOF ( V:GENERIC ) : SET OF STRING; +# The rolesof function returns a set of strings containing the fully qualified names of the roles +# played by the specified entity instance. A fully qualified name is defined to be the name of the +# attribute qualified by the name of the schema and entity in which this attribute is declared (i.e. #'SCHEMA.ENTITY.ATTRIBUTE'). -#Parameters : V is any instance of an entity data type. -#Result : A set of string values (in upper case) containing the fully qualified names of the -#attributes of the entity instances which use the instance V. -#When a named data type is used or referenced, the schema and the name in that schema, -#if renamed, are also returned. Since use statements may be chained, all the chained schema -#names and the name in each schema are returned. -#EXAMPLE 143 { This example shows that a point might be used as the centre of a circle. The -#rolesof function determines what roles an entity instance actually plays. -#SCHEMA that_schema; -#ENTITY point; -#x, y, z : REAL; -#END_ENTITY; -#ENTITY line; -#start, -#end : point; -#END_ENTITY; -#END_SCHEMA; -#SCHEMA this_schema; -#USE FROM that_schema (point,line); -#CONSTANT -#origin : point := point(0.0, 0.0, 0.0); -#END_CONSTANT; -#ENTITY circle; -#centre : point; -#axis : vector; -#radius : REAL; -#END_ENTITY; -#... -#LOCAL -#p : point := point(1.0, 0.0, 0.0); -#c : circle := circle(p, vector(1,1,1), 1.0); -#l : line := line(p, origin); -#END_LOCAL; -#... -#IF 'THIS_SCHEMA.CIRCLE.CENTRE' IN ROLESOF(p) THEN -- true -#... -#IF 'THIS_SCHEMA.LINE.START' IN ROLESOF(p) THEN -- true -#... -#IF 'THAT_SCHEMA.LINE.START' IN ROLESOF(p) THEN -- true -#... -#IF 'THIS_SCHEMA.LINE.END' IN ROLESOF(p) THEN -- false -# +# Parameters : V is any instance of an entity data type. +# Result : A set of string values (in upper case) containing the fully qualified names of the +# attributes of the entity instances which use the instance V. +# When a named data type is used or referenced, the schema and the name in that schema, +# if renamed, are also returned. Since use statements may be chained, all the chained schema +# names and the name in each schema are returned. +# EXAMPLE 143 { This example shows that a point might be used as the centre of a circle. The +# rolesof function determines what roles an entity instance actually plays. +# SCHEMA that_schema; +# ENTITY point; +# x, y, z : REAL; +# END_ENTITY; +# ENTITY line; +# start, +# end : point; +# END_ENTITY; +# END_SCHEMA; +# SCHEMA this_schema; +# USE FROM that_schema (point,line); +# CONSTANT +# origin : point := point(0.0, 0.0, 0.0); +# END_CONSTANT; +# ENTITY circle; +# centre : point; +# axis : vector; +# radius : REAL; +# END_ENTITY; +# ... +# LOCAL +# p : point := point(1.0, 0.0, 0.0); +# c : circle := circle(p, vector(1,1,1), 1.0); +# l : line := line(p, origin); +# END_LOCAL; +# ... +# IF 'THIS_SCHEMA.CIRCLE.CENTRE' IN ROLESOF(p) THEN -- true +# ... +# IF 'THIS_SCHEMA.LINE.START' IN ROLESOF(p) THEN -- true +# ... +# IF 'THAT_SCHEMA.LINE.START' IN ROLESOF(p) THEN -- true +# ... +# IF 'THIS_SCHEMA.LINE.END' IN ROLESOF(p) THEN -- false +# # Python note: # @TODO: implement the ROLESOF function def ROLESOF(V): raise NotImplemented("Function ROLESOF not implemented") + # EXPRESS definition: -# =================== -#15.22 SizeOf - aggregate function -#FUNCTION SIZEOF ( V:AGGREGATE OF GENERIC ) : INTEGER; -#The sizeof function returns the number of elements in an aggregate value. -#Parameters : V is an aggregate value. -#Result : -#a) When V is an array the returned value is its declared number of elements in the -#aggregation data type. -#b) When V is a bag, list or set, the returned value is the actual number of elements in -#the aggregate value. -#EXAMPLE 145 { LOCAL -#n : NUMBER; -#y : ARRAY[2:5] OF b; -#END_LOCAL; -#... -#n := SIZEOF (y); -- n is assigned the value 4 +# =================== +# 15.22 SizeOf - aggregate function +# FUNCTION SIZEOF ( V:AGGREGATE OF GENERIC ) : INTEGER; +# The sizeof function returns the number of elements in an aggregate value. +# Parameters : V is an aggregate value. +# Result : +# a) When V is an array the returned value is its declared number of elements in the +# aggregation data type. +# b) When V is a bag, list or set, the returned value is the actual number of elements in +# the aggregate value. +# EXAMPLE 145 { LOCAL +# n : NUMBER; +# y : ARRAY[2:5] OF b; +# END_LOCAL; +# ... +# n := SIZEOF (y); -- n is assigned the value 4 def SIZEOF(V): - if not isinstance(V,Aggregate): + if not isinstance(V, Aggregate): raise TypeError("SIZEOF takes an aggregate of generic") return V.get_size() + # EXPRESS definition: -# =================== -#15.23 Sqrt - arithmetic function -#FUNCTION SQRT ( V:NUMBER ) : REAL; -#The sqrt function returns the non-negative square root of a number. -#Parameters : V is any non-negative number. -#Result : The non-negative square root of V. -#Conditions : V >= 0:0 -#EXAMPLE 146 - SQRT ( 121 ) --> 11.0 +# =================== +# 15.23 Sqrt - arithmetic function +# FUNCTION SQRT ( V:NUMBER ) : REAL; +# The sqrt function returns the non-negative square root of a number. +# Parameters : V is any non-negative number. +# Result : The non-negative square root of V. +# Conditions : V >= 0:0 +# EXAMPLE 146 - SQRT ( 121 ) --> 11.0 def SQRT(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("SQRT function takes a NUMBER parameter") - if V<0.0: + if V < 0.0: raise ValueError("SQRT takes a non-negative parameter") return REAL(math.sqrt(V)) - + + # EXPRESS definition: -# =================== -#15.24 Tan - arithmetic function -#FUNCTION TAN ( V:NUMBER ) : REAL; -#The tan function returns the tangent of an angle. -#Parameters : V is a number representing an angle expressed in radians. -#Result : The tangent of the angle. If the angle is npi/2, where n is an odd integer, indeterminate -#(?) is returned. -#EXAMPLE 147 - TAN ( 0.0 ) --> 0.0 +# =================== +# 15.24 Tan - arithmetic function +# FUNCTION TAN ( V:NUMBER ) : REAL; +# The tan function returns the tangent of an angle. +# Parameters : V is a number representing an angle expressed in radians. +# Result : The tangent of the angle. If the angle is npi/2, where n is an odd integer, indeterminate +# (?) is returned. +# EXAMPLE 147 - TAN ( 0.0 ) --> 0.0 def TAN(V): - if not isinstance(V,NUMBER): + if not isinstance(V, NUMBER): raise TypeError("TAN function takes a NUMBER parameter") # check if angle is npi/2 where n is an odd integer - a = V/(PI/2) - if abs(a%2-1.) < SCL_float_epsilon : + a = V / (PI / 2) + if abs(a % 2 - 1.0) < SCL_float_epsilon: return None else: return REAL(math.tan(V)) + # EXPRESS definition: -# =================== -#15.25 TypeOf - general function -#FUNCTION TYPEOF ( V:GENERIC ) : SET OF STRING; -#The typeof function returns a set of strings that contains the names of all the data types -#of which the parameter is a member. Except for the simple data types (binary, boolean, -#integer, logical, number, real, and string) and the aggregation data types (array, bag, -#list, set) these names are qualified by the name of the schema which contains the definition of -#the type. -#NOTE 1 { The primary purpose of this function is to check whether a given value (variable, at- -#tribute value) can be used for a certain purpose, e.g. to ensure assignment compatibility between -#two values. It may also be used if different subtypes or specializations of a given type have to be -#treated differently in some context. -#Parameters : V is a value of any type. -#Result : The contents of the returned set of string values are the names (in upper case) of all -#types the value V is a member of. Such names are qualified by the name of the schema which -#contains the definition of the type ('SCHEMA.TYPE') if it is neither a simple data type nor an -#aggregation data type. It may be derived by the following algorithm (which is given here for -#specification purposes rather than to prescribe any particular type of implementation) +# =================== +# 15.25 TypeOf - general function +# FUNCTION TYPEOF ( V:GENERIC ) : SET OF STRING; +# The typeof function returns a set of strings that contains the names of all the data types +# of which the parameter is a member. Except for the simple data types (binary, boolean, +# integer, logical, number, real, and string) and the aggregation data types (array, bag, +# list, set) these names are qualified by the name of the schema which contains the definition of +# the type. +# NOTE 1 { The primary purpose of this function is to check whether a given value (variable, at- +# tribute value) can be used for a certain purpose, e.g. to ensure assignment compatibility between +# two values. It may also be used if different subtypes or specializations of a given type have to be +# treated differently in some context. +# Parameters : V is a value of any type. +# Result : The contents of the returned set of string values are the names (in upper case) of all +# types the value V is a member of. Such names are qualified by the name of the schema which +# contains the definition of the type ('SCHEMA.TYPE') if it is neither a simple data type nor an +# aggregation data type. It may be derived by the following algorithm (which is given here for +# specification purposes rather than to prescribe any particular type of implementation) def TYPEOF(V): # Create the set to return v_types = set() # append the type of V to the set - try: #it's a class + try: # it's a class to_add = V.__name__.upper() - except AttributeError: #it's an instance, first retrieve the type + except AttributeError: # it's an instance, first retrieve the type to_add = type(V).__name__.upper() - if not to_add in ['FLOAT','INT','AGGREGATE']: + if not to_add in ["FLOAT", "INT", "AGGREGATE"]: v_types.add(to_add) # recursively adds the base class names for base_type in type(V).__bases__: - #print base_type + # print base_type if not base_type == object: v_types = v_types.union(TYPEOF(base_type)) # finally, converts the v_types set to SET return v_types -# EXPRESS definition: -# =================== -#15.26 UsedIn - general function -#FUNCTION USEDIN ( T:GENERIC; R:STRING) : BAG OF GENERIC; -#The usedin function returns each entity instance that uses a specified entity instance in a -#specified role. -def USEDIN(T,R): - raise NotImplemented("USEDIN function not yet implemented.") # EXPRESS definition: -# =================== -#15.27 Value - arithmetic function -#FUNCTION VALUE ( V:STRING ) : NUMBER; -#The value function returns the numeric representation of a string. -#Parameters : V is a string containing either a real or integer literal. -#Result : A number corresponding to the string representation. If it is not possible to interpret -#the string as either a real or integer literal, indeterminate (?) is returned. -#EXAMPLE 151 { VALUE ( '1.234' ) --> 1.234 (REAL) -#VALUE ( '20' ) --> 20 (INTEGER) -#VALUE ( 'abc' ) --> ? null +# =================== +# 15.26 UsedIn - general function +# FUNCTION USEDIN ( T:GENERIC; R:STRING) : BAG OF GENERIC; +# The usedin function returns each entity instance that uses a specified entity instance in a +# specified role. +def USEDIN(T, R): + raise NotImplemented("USEDIN function not yet implemented.") + + +# EXPRESS definition: +# =================== +# 15.27 Value - arithmetic function +# FUNCTION VALUE ( V:STRING ) : NUMBER; +# The value function returns the numeric representation of a string. +# Parameters : V is a string containing either a real or integer literal. +# Result : A number corresponding to the string representation. If it is not possible to interpret +# the string as either a real or integer literal, indeterminate (?) is returned. +# EXAMPLE 151 { VALUE ( '1.234' ) --> 1.234 (REAL) +# VALUE ( '20' ) --> 20 (INTEGER) +# VALUE ( 'abc' ) --> ? null def VALUE(V): - if not isinstance(V,STRING): + if not isinstance(V, STRING): raise TypeError("VALUE function takes a NUMBER parameter") # first try to instantiate an INTEGER from the string: try: return INTEGER(V) except Exception: - pass #not possible, try to cast to REAL + pass # not possible, try to cast to REAL try: return REAL(V) except Exception: @@ -667,50 +696,50 @@ def VALUE(V): # else return None return None + # EXPRESS definition: -# =================== -#15.28 Value in - membership function -#FUNCTION VALUE_IN ( C:AGGREGATE OF GENERIC:GEN; V:GENERIC:GEN ) : LOGICAL; -#The value in function returns a logical value depending on whether or not a particular value -#is a member of an aggregation. -#Parameters : -#a) C is an aggregation of any type. -#b) V is an expression which is assignment compatible with the base type of C. -#Result : -#a) If either V or C is indeterminate (?), unknown is returned. -#b) If any element of C has a value equal to the value of V, true is returned. -#c) If any element of C is indeterminate (?), unknown is returned. -#d) Otherwise false is returned. -#EXAMPLE 152 { The following test ensures that there is at least one point which is positioned at -#the origin. -#LOCAL -#points : SET OF point; -#END_LOCAL; -#... -#IF VALUE_IN(points, point(0.0, 0.0, 0.0)) THEN ... -def VALUE_IN(C,V): - if not isinstance(C,Aggregate): +# =================== +# 15.28 Value in - membership function +# FUNCTION VALUE_IN ( C:AGGREGATE OF GENERIC:GEN; V:GENERIC:GEN ) : LOGICAL; +# The value in function returns a logical value depending on whether or not a particular value +# is a member of an aggregation. +# Parameters : +# a) C is an aggregation of any type. +# b) V is an expression which is assignment compatible with the base type of C. +# Result : +# a) If either V or C is indeterminate (?), unknown is returned. +# b) If any element of C has a value equal to the value of V, true is returned. +# c) If any element of C is indeterminate (?), unknown is returned. +# d) Otherwise false is returned. +# EXAMPLE 152 { The following test ensures that there is at least one point which is positioned at +# the origin. +# LOCAL +# points : SET OF point; +# END_LOCAL; +# ... +# IF VALUE_IN(points, point(0.0, 0.0, 0.0)) THEN ... +def VALUE_IN(C, V): + if not isinstance(C, Aggregate): raise TypeError("VALUE_IN method takes an aggregate as first parameter") raise NotImplemented("VALUE_IN function not yet implemented") + # EXPRESS definition: -# =================== -#15.29 Value unique - uniqueness function -#FUNCTION VALUE UNIQUE ( V:AGGREGATE OF GENERIC) : LOGICAL; -#The value unique function returns a logical value depending on whether or not the elements -#of an aggregation are value unique. -#Parameters : V is an aggregation of any type. -#Result : -#a) If V is indeterminate (?), unknown is returned. -#b) If any any two elements of V are value equal, false is returned. -#c) If any element of V is indeterminate (?), unknown is returned. -#d) Otherwise true is returned. -#EXAMPLE 153 { The following test ensures that each point is placed at a different position, (by -#definition they are distinct, i.e., instance unique). -#IF VALUE_UNIQUE(points) THEN ... +# =================== +# 15.29 Value unique - uniqueness function +# FUNCTION VALUE UNIQUE ( V:AGGREGATE OF GENERIC) : LOGICAL; +# The value unique function returns a logical value depending on whether or not the elements +# of an aggregation are value unique. +# Parameters : V is an aggregation of any type. +# Result : +# a) If V is indeterminate (?), unknown is returned. +# b) If any any two elements of V are value equal, false is returned. +# c) If any element of V is indeterminate (?), unknown is returned. +# d) Otherwise true is returned. +# EXAMPLE 153 { The following test ensures that each point is placed at a different position, (by +# definition they are distinct, i.e., instance unique). +# IF VALUE_UNIQUE(points) THEN ... def VALUE_UNIQUE(V): - if not isinstance(V,Aggregate): + if not isinstance(V, Aggregate): raise TypeError("VALUE_UNIQUE method takes an aggregate as first parameter") return V.get_value_unique() - - \ No newline at end of file diff --git a/src/Mod/Import/App/SCL/ConstructedDataTypes.py b/src/Mod/Import/App/SCL/ConstructedDataTypes.py index 3c9f48626b..959e10336c 100644 --- a/src/Mod/Import/App/SCL/ConstructedDataTypes.py +++ b/src/Mod/Import/App/SCL/ConstructedDataTypes.py @@ -23,7 +23,7 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF @@ -32,6 +32,7 @@ import sys import BaseType + class EnumerationId(object): """ EXPRESS definition: @@ -40,15 +41,17 @@ class EnumerationId(object): values of the enumeration data type. These names are designated by enumeration_ids and are referred to as enumeration items. """ + pass + class ENUMERATION(object): """ EXPRESS definition: =================== An ENUMERATION data type has as its domain an ordered set of names. The names represent values of the enumeration data type. - + Python implementation: ====================== An enumeration is initialized from strings defining the types. @@ -57,21 +60,22 @@ class ENUMERATION(object): (ahead, behind); END_TYPE; -- ahead_or_behind - + is implemented in python with the line: >>> ahead_of_behind = ENUMERATION('ahead','behind', the_current_scope) >>> ahead_or_behind.ahead >>> ahead_of_behind.behind - + And, if and only if ahead and/or behind are not in scope (e.g. they are not entity names, and/or many enums define the same enumeration identifier): >>> ahead >>> behind """ - def __init__(self,*kargs,**args): + + def __init__(self, *kargs, **args): # first defining the scope - if 'scope' in args: - self._scope = args['scope'] + if "scope" in args: + self._scope = args["scope"] else: self._scope = None # store passed enum identifiers @@ -82,14 +86,14 @@ class ENUMERATION(object): # we create an attribute ahead with which is a new # instance of EnumerationId for enum_id_name in self._enum_id_names: - setattr(self,enum_id_name,EnumerationId()) + setattr(self, enum_id_name, EnumerationId()) # we store this new attributes to the enum_ids list, which # will be accessed by the type checker with the get_enum_ids method self._enum_ids.append(self.__getattribute__(enum_id_name)) # # Then we check if the enums names can be added to the current scope: # if the name is already in the scope, then another enums id or select - # has the same name -> we do nothing, enums will be called + # has the same name -> we do nothing, enums will be called # with ahead_of_behind.ahead or ahead_or_behind.behind. # otherwise, they can be called as only ahead or behind # Note: since ENUMERATIONS are defined *before* entities, if an entity @@ -101,24 +105,26 @@ class ENUMERATION(object): def get_enum_ids(self): return self._enum_ids - + + class SELECT(object): - """ A select data type has as its domain the union of the domains of the named data types in + """A select data type has as its domain the union of the domains of the named data types in its select list. The select data type is a generalization of each of the named data types in its select list. """ - def __init__(self,*kargs,**args): + + def __init__(self, *kargs, **args): # first defining the scope - if 'scope' in args: - self._scope = args['scope'] + if "scope" in args: + self._scope = args["scope"] else: self._scope = None # create the types from the list of arguments self._base_types = [] for types in list(kargs): - new_type = BaseType.Type(types,self._scope) + new_type = BaseType.Type(types, self._scope) self._base_types.append(new_type) - + def get_allowed_types(self): _auth_types = [] for types in self._base_types: @@ -126,12 +132,12 @@ class SELECT(object): return _auth_types def get_allowed_basic_types(self): - ''' if a select contains some subselect, goes down through the different - sublayers until there is no more ''' + """if a select contains some subselect, goes down through the different + sublayers until there is no more""" b = [] _auth_types = self.get_allowed_types() for _auth_type in _auth_types: - if isinstance(_auth_type,SELECT) or isinstance(_auth_type,ENUMERATION): + if isinstance(_auth_type, SELECT) or isinstance(_auth_type, ENUMERATION): h = _auth_type.get_allowed_types() b.extend(h) else: diff --git a/src/Mod/Import/App/SCL/Model.py b/src/Mod/Import/App/SCL/Model.py index e19eefc91b..738b10a3fd 100644 --- a/src/Mod/Import/App/SCL/Model.py +++ b/src/Mod/Import/App/SCL/Model.py @@ -23,33 +23,31 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + class Model(objet): - """ The container for entity instances - """ + """The container for entity instances""" + def __init_(self): print("Model initialized") self._instances = [] - + def add_instance(self, entity_instance): self._instances.append(entity_instance) - + def remove_instance(self, entity_instance): self._instances.remove(entity_instance) - + def get_instances(self): return self._instances - + def export_to_p21file(self, filename): raise AssertionError("Not implemented") - + def export_to_p28file(self, filename): raise AssertionError("Not implemented") - - - diff --git a/src/Mod/Import/App/SCL/Part21.py b/src/Mod/Import/App/SCL/Part21.py index f116305dd7..e76ce3eb6d 100644 --- a/src/Mod/Import/App/SCL/Part21.py +++ b/src/Mod/Import/App/SCL/Part21.py @@ -36,19 +36,21 @@ import time INSTANCE_DEFINITION_RE = re.compile("#(\d+)[^\S\n]?=[^\S\n]?(.*?)\((.*)\)[^\S\n]?;[\\r]?$") + def map_string_to_num(stri): - """ Take a string, check whether it is an integer, a float or not - """ - if ('.' in stri) or ('E' in stri): #it's definitely a float + """Take a string, check whether it is an integer, a float or not""" + if ("." in stri) or ("E" in stri): # it's definitely a float return REAL(stri) else: return INTEGER(stri) + class Model: """ A model contains a list of instances """ - def __init__(self,name): + + def __init__(self, name): self._name = name # a dict of instances # each time an instance is added to the model, count is incremented @@ -56,21 +58,22 @@ class Model: self._number_of_instances = 0 def add_instance(self, instance): - ''' + """ Adds an instance to the model - ''' + """ self._number_of_instances += 1 - self._instances[self._number_of_instances-1] = instance + self._instances[self._number_of_instances - 1] = instance def print_instances(self): - ''' + """ Dump instances to stdout - ''' + """ for idx in range(self._number_of_instances): "==========" - print("Instance #%i"%(idx+1)) + print("Instance #%i" % (idx + 1)) print(self._instances[idx]) + class Part21EntityInstance: """ A class to represent a Part21 instance as defined in one Part21 file @@ -83,7 +86,8 @@ class Part21EntityInstance: entity : entity_instance_attributes: ['$','$','#5'] """ - def __init__(self,entity_name,attributes): + + def __init__(self, entity_name, attributes): self._entity self._attributes_definition = attributes print(self._entity_name) @@ -98,6 +102,7 @@ class Part21Parser: self._number_of_ancestors : stores the number of ancestors of entity id. This enables to define the order of instances creation. """ + def __init__(self, filename): self._filename = filename # the schema @@ -106,12 +111,12 @@ class Part21Parser: self._instances_definition = {} # this dict contains lists of 0 ancestors, 1 ancestor, etc. # initializes this dict - #self._number_of_ancestors = {} # this kind of sorting don't work on non-trivial files - #for i in range(2000): + # self._number_of_ancestors = {} # this kind of sorting don't work on non-trivial files + # for i in range(2000): # self._number_of_ancestors[i]=[] self.parse_file() # reduce number_of_ancestors dict - #for item in self._number_of_ancestors.keys(): + # for item in self._number_of_ancestors.keys(): # if len(self._number_of_ancestors[item])==0: # del self._number_of_ancestors[item] @@ -124,7 +129,7 @@ class Part21Parser: def parse_file(self): init_time = time.time() - print("Parsing file %s..."%self._filename) + print("Parsing file %s..." % self._filename) fp = open(self._filename) while True: line = fp.readline() @@ -132,31 +137,32 @@ class Part21Parser: break # there may be a multiline definition. In this case, we read lines until we found # a ; - while (line.find(';') == -1): #it's a multiline - line = line.replace("\n","").replace("\r","") + fp.readline() + while line.find(";") == -1: # it's a multiline + line = line.replace("\n", "").replace("\r", "") + fp.readline() # parse line match_instance_definition = INSTANCE_DEFINITION_RE.search(line) # id,name,attrs if match_instance_definition: instance_id, entity_name, entity_attrs = match_instance_definition.groups() instance_int_id = int(instance_id) # find number of ancestors - #number_of_ancestors = entity_attrs.count('#') + # number_of_ancestors = entity_attrs.count('#') # fill number of ancestors dict - #self._number_of_ancestors[number_of_ancestors].append(instance_int_id) # this kind of sorting don't work on non-trivial files + # self._number_of_ancestors[number_of_ancestors].append(instance_int_id) # this kind of sorting don't work on non-trivial files # parse attributes string entity_attrs_list, str_len = Utils.process_nested_parent_str(entity_attrs) # then finally append this instance to the disct instance - self._instances_definition[instance_int_id] = (entity_name,entity_attrs_list) - else: #does not match with entity instance definition, parse the header - if line.startswith('FILE_SCHEMA'): - #identify the schema name + self._instances_definition[instance_int_id] = (entity_name, entity_attrs_list) + else: # does not match with entity instance definition, parse the header + if line.startswith("FILE_SCHEMA"): + # identify the schema name self._schema_name = line.split("'")[1].split("'")[0].split(" ")[0].lower() fp.close() - print('done in %fs.'%(time.time()-init_time)) - print('schema: - %s entities %i'%(self._schema_name,len(self._instances_definition))) + print("done in %fs." % (time.time() - init_time)) + print("schema: - %s entities %i" % (self._schema_name, len(self._instances_definition))) + class EntityInstancesFactory(object): - ''' + """ This class creates entity instances from the str definition For instance, the definition: 20: ('CARTESIAN_POINT', ["''", '(5.,125.,20.)']) @@ -166,44 +172,48 @@ class EntityInstancesFactory(object): p.[2] = REAL(125) p.[3] = REAL(20) new_instance = cartesian_point(STRING(''),p) - ''' + """ + def __init__(self, schema_name, instance_definition): # First try to import the schema module pass + class Part21Population(object): def __init__(self, part21_loader): - """ Take a part21_loader a tries to create entities - """ + """Take a part21_loader a tries to create entities""" self._part21_loader = part21_loader self._aggregate_scope = [] self._aggr_scope = False self.create_entity_instances() def create_entity_instances(self): - """ Starts entity instances creation - """ + """Starts entity instances creation""" for number_of_ancestor in list(self._part21_loader._number_of_ancestors): - for entity_definition_id in self._part21_loader._number_of_ancestors[number_of_ancestor]: + for entity_definition_id in self._part21_loader._number_of_ancestors[ + number_of_ancestor + ]: self.create_entity_instance(entity_definition_id) def create_entity_instance(self, instance_id): instance_definition = self._part21_loader._instances_definition[instance_id] - print("Instance definition to process",instance_definition) + print("Instance definition to process", instance_definition) # first find class name class_name = instance_definition[0].lower() - print("Class name:%s"%class_name) + print("Class name:%s" % class_name) object_ = globals()[class_name] # then attributes - #print object_.__doc__ + # print object_.__doc__ instance_attributes = instance_definition[1] - print("instance_attributes:",instance_attributes) + print("instance_attributes:", instance_attributes) a = object_(*instance_attributes) + if __name__ == "__main__": import time import sys from config_control_design import * + p21loader = Part21Parser("gasket1.p21") print("Creating instances") p21population = Part21Population(p21loader) diff --git a/src/Mod/Import/App/SCL/Rules.py b/src/Mod/Import/App/SCL/Rules.py index 1267a99d61..14989a97ba 100644 --- a/src/Mod/Import/App/SCL/Rules.py +++ b/src/Mod/Import/App/SCL/Rules.py @@ -23,7 +23,7 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF @@ -31,9 +31,11 @@ __doc__ = "This module defines EXPRESS rules" + class Rule(object): - ''' + """ This class describes a RULE @TODO: to be implemented - ''' + """ + pass diff --git a/src/Mod/Import/App/SCL/SCLBase.py b/src/Mod/Import/App/SCL/SCLBase.py index 617c816ad2..462c6daa30 100644 --- a/src/Mod/Import/App/SCL/SCLBase.py +++ b/src/Mod/Import/App/SCL/SCLBase.py @@ -23,22 +23,25 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + class BaseEntityClass(object): - """ A class that allows advanced __repr__ features for entity instances - """ + """A class that allows advanced __repr__ features for entity instances""" + def __repr__(self): - """ Displays attribute with their values - """ - doc_string = "# %s class description:\n%s\n# Instance attributes:\n"%(self.__class__,self.__doc__) + """Displays attribute with their values""" + doc_string = "# %s class description:\n%s\n# Instance attributes:\n" % ( + self.__class__, + self.__doc__, + ) # write each argument with its value properties = dir(self) for elem in properties: if not elem.startswith("_"): - doc_string += "\t%s:%s\n"%(elem,self.__getattribute__(elem)) + doc_string += "\t%s:%s\n" % (elem, self.__getattribute__(elem)) return doc_string diff --git a/src/Mod/Import/App/SCL/SimpleDataTypes.py b/src/Mod/Import/App/SCL/SimpleDataTypes.py index fa3e8716fe..180cbce340 100644 --- a/src/Mod/Import/App/SCL/SimpleDataTypes.py +++ b/src/Mod/Import/App/SCL/SimpleDataTypes.py @@ -23,7 +23,7 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF @@ -33,6 +33,7 @@ Docstrings are courtesy of ISO 10303-11:1994(E) """ + class NUMBER: """ EXPRESS definition: @@ -45,14 +46,16 @@ class NUMBER: represent it, e.g. the size of the crowd at a football game would be an integer, whereas the area of the pitch would be a real. size : NUMBER ; - + Python definition: ================== class NUMBER is an abstract class, aimed at being specialized. """ + pass - -class REAL(float,NUMBER): + + +class REAL(float, NUMBER): """ EXPRESS definition: =================== @@ -73,17 +76,19 @@ class REAL(float,NUMBER): quired. This expression shall evaluate to a positive integer value. b) When no resolution specification is given the precision of the real number is uncon- strained. - + Note 9.2.6: integer and real are both specializations of number; - + Python definition: ================== REAL both inherits from float and NUMBER """ + pass -class INTEGER(int,NUMBER): + +class INTEGER(int, NUMBER): """ EXPRESS definition: =================== @@ -96,17 +101,19 @@ class INTEGER(int,NUMBER): ENTITY foo; nodes : INTEGER; END_ENTITY; - + Note 9.2.6: integer and real are both specializations of number; - + Python definition: ================== INTEGER both inherits from int and NUMBER - + @TODO: note 9.2.6 tells that integer is a specialization of real """ + pass - + + class STRING(str): """ The string data type has as its domain sequences of characters. The characters which are @@ -118,7 +125,7 @@ class STRING(str): A string data type may be defined as either fixed or varying width (number of characters). If it is not specfically defined as fixed width (by using the fixed reserved word in the dfinition) the string has varying width. - + The domain of a fixed width string data type is the set of all character sequences of exactly the width specified in the type definition. The domain of a varying width string data type is the set of all character sequences of width @@ -127,12 +134,14 @@ class STRING(str): the width of these sequences. Substrings and individual characters may be addressed using subscripts as described in 12.5. The case (upper or lower) of letters within a string is significant. - + Python mapping: INTEGER is mapped the 'str' type. An additional width_spec parameter can be passed to handle the FIXED length constraint """ + pass - + + class LOGICAL: """ The logical data type has as its domain the three literals true, false and unknown. @@ -142,20 +151,24 @@ class LOGICAL: true. The logical data type is compatible with the boolean data type, except that the value unknown cannot be assigned to a boolean variable. """ + pass + + Unknown = LOGICAL() # -#The boolean data type has as its domain the two literals true and false. The boolean data -#type is a specialization of the logical data type. -# -#Python mapping: BOOLEAN is mapped to 'bool' type +# The boolean data type has as its domain the two literals true and false. The boolean data +# type is a specialization of the logical data type. +# +# Python mapping: BOOLEAN is mapped to 'bool' type # # The bool data type can't however be subclassed in Python (see # See http://mail.python.org/pipermail/python-dev/2002-March/020822.html) # so it is just set to bool BOOLEAN = bool - + + class BINARY(str): """ The binary data type has as its domain sequences of bits, each bit being represented by 0 or 1. @@ -172,45 +185,49 @@ class BINARY(str): than or equal to the maximum width specified in the type definition. If no width is specified, the domain is the set of all bit sequences, with no constraint on the width of these sequences. Subbinaries and individual bits may be addressed using subscripts as described in 12.3. - + Python mapping: BINARY is mapped to the 'str' type. A check is performed to validate it is a binary string representing a number. """ + def __new__(self, value, width=-1, fixed=False): return str.__new__(self, value) - + def __init__(self, value, width=-1, fixed=False): - """ By default, length is set to None""" + """By default, length is set to None""" self._specified_width = width self._fixed = fixed # Check implicit width - if (width!=-1) and not fixed: - raise ValueError("The 'width' parameter is passed but 'fixed' is still false. Please explicitly set 'fixed' to True to avoid implicit declaration") + if (width != -1) and not fixed: + raise ValueError( + "The 'width' parameter is passed but 'fixed' is still false. Please explicitly set 'fixed' to True to avoid implicit declaration" + ) # First check the string length if 'fixed' is set to True if fixed: if len(value) != width: - raise ValueError("The BINARY width %i is not consistent with the 'width' declaration(%i)"%(len(value),width)) + raise ValueError( + "The BINARY width %i is not consistent with the 'width' declaration(%i)" + % (len(value), width) + ) # Check that the value passed is actually a binary try: - int(value,2) + int(value, 2) except ValueError: - raise ValueError("%s is not a binary"%value) + raise ValueError("%s is not a binary" % value) -if __name__=="__main__": +if __name__ == "__main__": print("Creating REAL from float value") a = REAL(1.5) - print(a*2) + print(a * 2) print("Creating REAL from string value") a = REAL("1.2") - print(a*3) + print(a * 3) print("Creating INTEGER from int value") b = INTEGER(2) c = INTEGER(3) - print(b+c) + print(b + c) print("Creating INTEGER from string value") e = INTEGER("5") f = INTEGER("8") - print(e*f) - - \ No newline at end of file + print(e * f) diff --git a/src/Mod/Import/App/SCL/SimpleReader.py b/src/Mod/Import/App/SCL/SimpleReader.py index 0df392b55c..222dd39f2f 100644 --- a/src/Mod/Import/App/SCL/SimpleReader.py +++ b/src/Mod/Import/App/SCL/SimpleReader.py @@ -36,18 +36,16 @@ corresponding classes. In addition it writes out a graphviz file with the entity graph. """ -import Part21,sys +import Part21, sys - -__title__="Simple Part21 STEP reader" +__title__ = "Simple Part21 STEP reader" __author__ = "Juergen Riegel" __version__ = "0.1 (Jan 2014)" - class SimpleParser: - """ read the file + """read the file Part21.Part21Parser Loads all instances definition of a Part21 file into memory. Two dicts are created: @@ -55,117 +53,133 @@ class SimpleParser: Part21.Part21Parser._number_of_ancestors : stores the number of ancestors of entity id. This enables to define the order of instances creation. """ + def __init__(self, filename): import time import sys + self._p21loader = Part21.Part21Parser(filename) - #self._p21loader._number_of_ancestors = {} # not needed, save memory + # self._p21loader._number_of_ancestors = {} # not needed, save memory self.schemaModule = None self.schemaClasses = None self.instanceMape = {} - #for i in self._p21loader._instances_definition.keys(): + # for i in self._p21loader._instances_definition.keys(): # print i,self._p21loader._instances_definition[i][0],self._p21loader._instances_definition[i][1] - def _writeGraphVizEdge(self,num,attrList,file): + def _writeGraphVizEdge(self, num, attrList, file): for i in attrList: - if isinstance(i,list): - self._writeGraphVizEdge(num,i,file) - elif isinstance(i,str): - if not i == '' and i[0] == '#': + if isinstance(i, list): + self._writeGraphVizEdge(num, i, file) + elif isinstance(i, str): + if not i == "" and i[0] == "#": key = int(i[1:]) - file.write(' '+repr(num)+' -> '+repr(key)+'\n') + file.write(" " + repr(num) + " -> " + repr(key) + "\n") + def writeGraphViz(self, fileName): + print("Writing GraphViz file %s..." % fileName) + gvFile = open(fileName, "w") - def writeGraphViz(self,fileName): - print("Writing GraphViz file %s..."%fileName) - gvFile = open(fileName,'w') - - gvFile.write('digraph G {\n node [fontname=Verdana,fontsize=12]\n node [style=filled]\n node [fillcolor="#EEEEEE"]\n node [color="#EEEEEE"]\n edge [color="#31CEF0"]\n') + gvFile.write( + 'digraph G {\n node [fontname=Verdana,fontsize=12]\n node [style=filled]\n node [fillcolor="#EEEEEE"]\n node [color="#EEEEEE"]\n edge [color="#31CEF0"]\n' + ) for i in list(self._p21loader._instances_definition): - entityStr = '#'+repr(i) - nameStr = self._p21loader._instances_definition[i][0].lower() - sttrStr = repr(self._p21loader._instances_definition[i][1]).replace('"','').replace("'",'').replace(" ",'') - if len (sttrStr) > 40: - sttrStr = sttrStr[:39]+'....' - gvFile.write(' '+repr(i)+' [label="'+entityStr+'\n'+nameStr+'\n'+sttrStr+'"]\n') - self._writeGraphVizEdge( i,self._p21loader._instances_definition[i][1],gvFile) - gvFile.write('}\n') + entityStr = "#" + repr(i) + nameStr = self._p21loader._instances_definition[i][0].lower() + sttrStr = ( + repr(self._p21loader._instances_definition[i][1]) + .replace('"', "") + .replace("'", "") + .replace(" ", "") + ) + if len(sttrStr) > 40: + sttrStr = sttrStr[:39] + "...." + gvFile.write( + " " + repr(i) + ' [label="' + entityStr + "\n" + nameStr + "\n" + sttrStr + '"]\n' + ) + self._writeGraphVizEdge(i, self._p21loader._instances_definition[i][1], gvFile) + gvFile.write("}\n") def instantiate(self): """Instantiate the python class from the entities""" import inspect + # load the needed schema module - if self._p21loader.get_schema_name() == 'config_control_design': + if self._p21loader.get_schema_name() == "config_control_design": import config_control_design + self.schemaModule = config_control_design - if self._p21loader.get_schema_name() == 'automotive_design': + if self._p21loader.get_schema_name() == "automotive_design": import automotive_design + self.schemaModule = automotive_design if self.schemaModule: self.schemaClasses = dict(inspect.getmembers(self.schemaModule)) for i in list(self._p21loader._instances_definition): - #print i + # print i if i not in self.instanceMape: self._create_entity_instance(i) def _create_entity_instance(self, instance_id): if instance_id in self._p21loader._instances_definition: instance_definition = self._p21loader._instances_definition[instance_id] - #print "Instance definition to process",instance_definition + # print "Instance definition to process",instance_definition # first find class name class_name = instance_definition[0].lower() - #print "Class name:%s"%class_name + # print "Class name:%s"%class_name - if not class_name=='': + if not class_name == "": classDef = self.schemaClasses[class_name] # then attributes - #print object_.__doc__ + # print object_.__doc__ instance_attributes = instance_definition[1] self._transformAttributes(instance_attributes) - print('Attribute list after transform: ',instance_attributes) + print("Attribute list after transform: ", instance_attributes) - self.instanceMape[instance_id] = str('dummy#:'+str(instance_id)) # dummy instance to test + self.instanceMape[instance_id] = str( + "dummy#:" + str(instance_id) + ) # dummy instance to test else: - print('############################# lost entity: ',instance_id) - self.instanceMape[instance_id] = int(41) # dummy - #print "instance_attributes:",instance_attributes - #a = object_(*instance_attributes) + print("############################# lost entity: ", instance_id) + self.instanceMape[instance_id] = int(41) # dummy + # print "instance_attributes:",instance_attributes + # a = object_(*instance_attributes) - def _transformAttributes(self,attrList): + def _transformAttributes(self, attrList): n = 0 for i in attrList: - if isinstance(i,list): + if isinstance(i, list): self._transformAttributes(i) - elif isinstance(i,str): - if i == '': - print('empty string') - elif i[0] == '#': + elif isinstance(i, str): + if i == "": + print("empty string") + elif i[0] == "#": key = int(i[1:]) - #print 'Item: ',int(i[1:]) + # print 'Item: ',int(i[1:]) if key in self.instanceMape: - attrList[n] = self.instanceMape[key] + attrList[n] = self.instanceMape[key] else: self._create_entity_instance(key) if key not in self.instanceMape: - raise NameError("Needed instance not instantiated: ",key) + raise NameError("Needed instance not instantiated: ", key) else: - attrList[n] = self.instanceMape[key] - elif i[0] == '$': - #print 'Dollar' + attrList[n] = self.instanceMape[key] + elif i[0] == "$": + # print 'Dollar' pass elif i[0] == "'": - print('Dopelstring: ',i[1:-1]) + print("Dopelstring: ", i[1:-1]) else: - print('String: ',i) + print("String: ", i) else: raise NameError("Unknown attribute type") - n = n+1 + n = n + 1 + if __name__ == "__main__": - sys.path.append('..') # path where config_control_design.py is found - parser = SimpleReader("Aufspannung.stp") # simple test file - #parser.instantiate() - parser.writeGraphViz('TestGrap.gv') - #dot.exe -Tsvg -o Test.svg e:\fem-dev\src\Mod\Import\App\SCL\TestGrap-geo.gv + sys.path.append("..") # path where config_control_design.py is found + parser = SimpleReader("Aufspannung.stp") # simple test file + # parser.instantiate() + parser.writeGraphViz("TestGrap.gv") + # dot.exe -Tsvg -o Test.svg e:\fem-dev\src\Mod\Import\App\SCL\TestGrap-geo.gv diff --git a/src/Mod/Import/App/SCL/TypeChecker.py b/src/Mod/Import/App/SCL/TypeChecker.py index a4df44ca8d..cdfcb9ee02 100644 --- a/src/Mod/Import/App/SCL/TypeChecker.py +++ b/src/Mod/Import/App/SCL/TypeChecker.py @@ -23,7 +23,7 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF @@ -35,67 +35,89 @@ from . import BaseType RAISE_EXCEPTION_IF_TYPE_DOES_NOT_MATCH = True DEBUG = False + def cast_python_object_to_aggregate(obj, aggregate): - """ This function casts a python object to an aggregate type. For instance: + """This function casts a python object to an aggregate type. For instance: [1.,2.,3.]-> ARRAY(1,3,REAL)""" aggregate_lower_bound = aggregate.bound_1() aggregate_upper_bound = aggregate.bound_2() - if type(obj)==list: - for idx in range(aggregate_lower_bound,aggregate_upper_bound+1): - aggregate[idx] = obj[idx-aggregate_lower_bound] + if type(obj) == list: + for idx in range(aggregate_lower_bound, aggregate_upper_bound + 1): + aggregate[idx] = obj[idx - aggregate_lower_bound] return aggregate + def check_type(instance, expected_type): - """ This function checks whether an object is an instance of a given class + """This function checks whether an object is an instance of a given class returns False or True """ - type_match = False #by default, will be set to True if any match + type_match = False # by default, will be set to True if any match if DEBUG: print("===") - print("Instance passed: ",instance) + print("Instance passed: ", instance) print("Expected type: ", expected_type) # in the case of an enumeration, we have to check if the instance is in the list - if (isinstance(expected_type,ENUMERATION)): + if isinstance(expected_type, ENUMERATION): allowed_ids = expected_type.get_enum_ids() if instance in allowed_ids: type_match = True else: - raise TypeError('Enumeration ids must be %s ( passed %s)'%(allowed_ids,type(instance))) - elif (isinstance(expected_type,SELECT)): + raise TypeError( + "Enumeration ids must be %s ( passed %s)" % (allowed_ids, type(instance)) + ) + elif isinstance(expected_type, SELECT): # we check if the instance is of the type of any of the types that are in the SELECT allowed_types = expected_type.get_allowed_basic_types() for allowed_type in allowed_types: - if isinstance(instance,allowed_type): + if isinstance(instance, allowed_type): type_match = True if not type_match: if RAISE_EXCEPTION_IF_TYPE_DOES_NOT_MATCH: - raise TypeError('Argument type must be %s (you passed %s)'%(allowed_types,type(instance))) + raise TypeError( + "Argument type must be %s (you passed %s)" % (allowed_types, type(instance)) + ) else: - print("WARNING: expected '%s' but passed a '%s', casting from python value to EXPRESS type"%(allowed_types, type(instance))) + print( + "WARNING: expected '%s' but passed a '%s', casting from python value to EXPRESS type" + % (allowed_types, type(instance)) + ) return False - elif (isinstance(expected_type, BaseType.Aggregate)): + elif isinstance(expected_type, BaseType.Aggregate): # first check that they are instance of the same class if not (type(instance) == type(expected_type)): - raise TypeError('Expected %s but passed %s'%(type(expected_type),type(instance))) + raise TypeError("Expected %s but passed %s" % (type(expected_type), type(instance))) # then check that the base type is the same elif not (instance.get_type() == expected_type.get_type()): - #print instance.get_type() - #print expected_type.get_type() - raise TypeError('Expected %s:%s base type but passed %s:%s base type'%(type(expected_type),expected_type.get_type(),type(instance), instance.get_type())) + # print instance.get_type() + # print expected_type.get_type() + raise TypeError( + "Expected %s:%s base type but passed %s:%s base type" + % ( + type(expected_type), + expected_type.get_type(), + type(instance), + instance.get_type(), + ) + ) # check optional and unique attributes - #elif not (instance._unique == expected_type._unique): + # elif not (instance._unique == expected_type._unique): # raise TypeError('Aggregate expects UNIQUE:%s property but passed UNIQUE:%s'%(expected_type._unique, instance._unique)) - #elif not (instance._optional == expected_type._optional): + # elif not (instance._optional == expected_type._optional): # raise TypeError('Aggregate expects OPTIONAL:%s property but passed OPTIONAL:%s'%(expected_type._optional, instance._optional)) # @TODO: check aggregate bounds else: type_match = True - else: # simple data types - type_match = isinstance(instance,expected_type) + else: # simple data types + type_match = isinstance(instance, expected_type) if not type_match: if RAISE_EXCEPTION_IF_TYPE_DOES_NOT_MATCH: - raise TypeError('Argument type must be %s (you passed %s)'%(expected_type,type(instance))) + raise TypeError( + "Argument type must be %s (you passed %s)" % (expected_type, type(instance)) + ) else: - print("WARNING: expected '%s' but passed a '%s', casting from python value to EXPRESS type"%(expected_type, type(instance))) + print( + "WARNING: expected '%s' but passed a '%s', casting from python value to EXPRESS type" + % (expected_type, type(instance)) + ) return False return True diff --git a/src/Mod/Import/App/SCL/Utils.py b/src/Mod/Import/App/SCL/Utils.py index fc50f83b8e..4680acd9d6 100644 --- a/src/Mod/Import/App/SCL/Utils.py +++ b/src/Mod/Import/App/SCL/Utils.py @@ -23,48 +23,47 @@ # ARE DISCLAIMED. # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -''' This module provide string utils''' +""" This module provide string utils""" -def process_nested_parent_str(attr_str,idx=0): - ''' + +def process_nested_parent_str(attr_str, idx=0): + """ The first letter should be a parenthesis input string: "(1,4,(5,6),7)" output: ['1','4',['5','6'],'7'] - ''' + """ params = [] - current_param = '' + current_param = "" k = 0 - while (k 0) and (p.size_in_y > 0)): return p.size_in_x / p.size_in_y else: - return None + return None #################### # FUNCTION is_acyclic # @@ -41187,7 +41187,7 @@ def get_description_value(obj,): if (SIZEOF(description_bag) == 1): return description_bag[1].attribute_value else: - return None + return None #################### # FUNCTION constraints_param_b_spline # @@ -41392,7 +41392,7 @@ def cross_product(arg1,arg2,): :type arg2:direction ''' if ((( not EXISTS(arg1)) or (arg1.dim == 2)) or (( not EXISTS(arg2)) or (arg2.dim == 2))): - return None + return None else: # begin/end block v1 = normalise(arg1).direction_ratios @@ -41712,10 +41712,10 @@ def dot_product(arg1,arg2,): :type arg2:direction ''' if (( not EXISTS(arg1)) or ( not EXISTS(arg2))): - scalar = None + scalar = None else: if (arg1.dim != arg2.dim): - scalar = None + scalar = None else: # begin/end block vec1 = normalise(arg1) @@ -41737,7 +41737,7 @@ def get_role(obj,): if (SIZEOF(role_bag) == 1): return role_bag[1].role else: - return None + return None #################### # FUNCTION acyclic_curve_replica # diff --git a/src/Mod/Import/App/automotive_design.py b/src/Mod/Import/App/SCL_output/automotive_design.py similarity index 99% rename from src/Mod/Import/App/automotive_design.py rename to src/Mod/Import/App/SCL_output/automotive_design.py index 61c42495f9..bd9d39e10a 100644 --- a/src/Mod/Import/App/automotive_design.py +++ b/src/Mod/Import/App/SCL_output/automotive_design.py @@ -40840,7 +40840,7 @@ def get_name_value(obj,): if (SIZEOF(name_bag) == 1): return name_bag[1].attribute_value else: - return None + return None #################### # FUNCTION convert_spatial_to_ypr_rotation # @@ -40863,7 +40863,7 @@ def convert_spatial_to_ypr_rotation(pair,rotation,): dz = axis.direction_ratios[3] conv_angle = plane_angle_for_pair_in_radian(pair,angle) if (conv_angle == None ): - return None + return None ucf = angle / conv_angle s_a = SIN(conv_angle) c_a = COS(conv_angle) @@ -40890,7 +40890,7 @@ def convert_spatial_to_ypr_rotation(pair,rotation,): ya = 0 ra = 0 else: - ya = ucf * PI + ya = ucf * PI ra = ya pa = ucf * ATAN(s_a,ABS(c_a)) if (dy < 0): @@ -40900,29 +40900,29 @@ def convert_spatial_to_ypr_rotation(pair,rotation,): rotmat = [[((dx * dx) * cm1) + c_a,((dx * dy) * cm1) - (dz * s_a),((dx * dz) * cm1) + (dy * s_a)],[((dx * dy) * cm1) + (dz * s_a),((dy * dy) * cm1) + c_a,((dy * dz) * cm1) - (dx * s_a)],[((dx * dz) * cm1) - (dy * s_a),((dy * dz) * cm1) + (dx * s_a),((dz * dz) * cm1) + c_a]] if (ABS(rotmat[1][3]) == 1): if (rotmat[1][3] == 1): - pa = 0.5 * PI + pa = 0.5 * PI else: - pa = (-0.5) * PI + pa = (-0.5) * PI ra = 0 ya = ATAN(rotmat[2][1],rotmat[2][2]) if (rotmat[2][2] < 0): if (ya <= 0): - ya = ya + PI + ya = ya + PI else: - ya = ya - PI + ya = ya - PI else: ya = ATAN(-rotmat[1][2],rotmat[1][1]) if (rotmat[1][1] < 0): if (ya <= 0): - ya = ya + PI + ya = ya + PI else: - ya = ya - PI + ya = ya - PI ra = ATAN(-rotmat[2][3],rotmat[3][3]) if (rotmat[3][3] < 0): if (ra <= 0): - ra = ra + PI + ra = ra + PI else: - ra = ra - PI + ra = ra - PI s_y = SIN(ya) c_y = COS(ya) s_r = SIN(ra) @@ -41187,7 +41187,7 @@ def get_diameter_for_round_hole(rh,): for l in range(1,HIINDEX(ri_set),1): if (('AUTOMOTIVE_DESIGN.MEASURE_REPRESENTATION_ITEM' == TYPEOF(ri_set[l])) and ('AUTOMOTIVE_DESIGN.LENGTH_MEASURE_WITH_UNIT' == TYPEOF(ri_set[l]))): return ri_set[l].measure_with_unit.value_component - return None + return None #################### # FUNCTION list_of_topology_reversed # @@ -41258,7 +41258,7 @@ def shell_reversed(a_shell,): if ('AUTOMOTIVE_DESIGN.CLOSED_SHELL' == TYPEOF(a_shell)): return closed_shell_reversed(a_shell) else: - return None + return None #################### # FUNCTION topology_reversed # @@ -41282,7 +41282,7 @@ def topology_reversed(an_item,): return set_of_topology_reversed(an_item) if ('LIST' == TYPEOF(an_item)): return list_of_topology_reversed(an_item) - return None + return None #################### # FUNCTION first_proj_axis # @@ -41295,7 +41295,7 @@ def first_proj_axis(z_axis,arg,): :type arg:direction ''' if ( not EXISTS(z_axis)): - return None + return None else: z = normalise(z_axis) if ( not EXISTS(arg)): @@ -41305,9 +41305,9 @@ def first_proj_axis(z_axis,arg,): v = dummy_gri == direction([0,1,0]) else: if (arg.dim != 3): - return None + return None if (cross_product(arg,z).magnitude == 0): - return None + return None else: v = normalise(arg) x_vec = scalar_times_vector(dot_product(v,z),z) @@ -41367,7 +41367,7 @@ def orthogonal_complement(vec,): :type vec:direction ''' if ((vec.dim != 2) or ( not EXISTS(vec))): - return None + return None else: result = dummy_gri == direction([-vec.direction_ratios[2],vec.direction_ratios[1]]) return result @@ -41404,13 +41404,13 @@ def make_array_of_array(lis,low1,u1,low2,u2,): :type u2:INTEGER ''' if (((u1 - low1) + 1) != SIZEOF(lis)): - return None + return None if (((u2 - low2) + 1) != SIZEOF(lis[1])): - return None + return None res = [list_to_array(lis[1],low2,u2),(u1 - low1) + 1] for i in range(2,HIINDEX(lis),1): if (((u2 - low2) + 1) != SIZEOF(lis[i])): - return None + return None res[(low1 + i) - 1] = list_to_array(lis[i],low2,u2) return res @@ -41515,7 +41515,7 @@ def vector_difference(arg1,arg2,): :type arg2:vector_or_direction ''' if ((( not EXISTS(arg1)) or ( not EXISTS(arg2))) or (arg1.dim != arg2.dim)): - return None + return None else: if ('AUTOMOTIVE_DESIGN.VECTOR' == TYPEOF(arg1)): mag1 = arg1.magnitude @@ -41712,7 +41712,7 @@ def list_to_array(lis,low,u,): ''' n = SIZEOF(lis) if (n != ((u - low) + 1)): - return None + return None else: res = [lis[1],n] for i in range(2,n,1): @@ -41933,7 +41933,7 @@ def scalar_times_vector(scalar,vec,): :type vec:vector_or_direction ''' if (( not EXISTS(scalar)) or ( not EXISTS(vec))): - return None + return None else: if ('AUTOMOTIVE_DESIGN.VECTOR' == TYPEOF(vec)): v = dummy_gri == direction(vec.vector.orientation.direction_ratios) @@ -42014,7 +42014,7 @@ def dimensions_for_si_unit(n,): elif case_selector == sievert: return dimensional_exponents(2,0,-2,0,0,0,0) else: - return None + return None #################### # FUNCTION assembly_shape_is_defined # @@ -42175,13 +42175,13 @@ def normalise(arg,): :type arg:vector_or_direction ''' if ( not EXISTS(arg)): - result = None + result = None else: ndim = arg.dim if ('AUTOMOTIVE_DESIGN.VECTOR' == TYPEOF(arg)): v = dummy_gri == direction(arg.vector.orientation.direction_ratios) if (arg.magnitude == 0): - return None + return None else: vec = dummy_gri == vector(v,1) else: @@ -42199,7 +42199,7 @@ def normalise(arg,): else: result = v else: - return None + return None return result #################### @@ -42370,7 +42370,7 @@ def get_id_value(obj,): if (SIZEOF(id_bag) == 1): return id_bag[1].attribute_value else: - return None + return None #################### # FUNCTION aspect_ratio # @@ -42383,7 +42383,7 @@ def aspect_ratio(p,): if ((p.size_in_x > 0) and (p.size_in_y > 0)): return p.size_in_x / p.size_in_y else: - return None + return None #################### # FUNCTION convert_plane_angle_for_pair_from_radian # @@ -42397,19 +42397,19 @@ def convert_plane_angle_for_pair_from_radian(pair,angle_expr,): ''' link_cntxt = link_rep.representation.context_of_items if ( not ('AUTOMOTIVE_DESIGN.GLOBAL_UNIT_ASSIGNED_CONTEXT' == TYPEOF(link_cntxt))): - return None + return None pa_units = None if (SIZEOF(pa_units) != 1): - return None + return None pau = pa_units[1] if (( not ('AUTOMOTIVE_DESIGN.SI_UNIT' == TYPEOF(pau))) and ( not ('AUTOMOTIVE_DESIGN.CONVERSION_BASED_UNIT' == TYPEOF(pau)))): - return None + return None for while 'AUTOMOTIVE_DESIGN.CONVERSION_BASED_UNIT' == TYPEOF(pau) conv_factor = conv_factor * pau.conversion_based_unit.conversion_factor.value_component pau = pau.conversion_based_unit.conversion_factor.unit_component if ((( not ('AUTOMOTIVE_DESIGN.SI_UNIT' == TYPEOF(pau))) and ( not ('AUTOMOTIVE_DESIGN.CONVERSION_BASED_UNIT' == TYPEOF(pau)))) or ( not ('AUTOMOTIVE_DESIGN.PLANE_ANGLE_UNIT' == TYPEOF(pau)))): - return None + return None if (pau.si_unit.name != si_unit_name.radian): - return None + return None case_selector = pau.si_unit.prefix if case_selector == si_prefix.exa: conv_factor = 1e+018 * conv_factor @@ -42506,7 +42506,7 @@ def get_description_value(obj,): if (SIZEOF(description_bag) == 1): return description_bag[1].attribute_value else: - return None + return None #################### # FUNCTION constraints_param_b_spline # @@ -42597,7 +42597,7 @@ def representation_of_link(link,): ''' link_rep_rel = USEDIN(link,'AUTOMOTIVE_DESIGN.KINEMATIC_LINK_REPRESENTATION_RELATION.TOPOLOGICAL_ASPECTS') if (SIZEOF(link_rep_rel) == 0): - return None + return None else: return link_rep_rel[1].geometric_aspects @@ -42616,7 +42616,7 @@ def ypr_index(ypr,): return 2 elif case_selector == roll: return 3 - return None + return None #################### # FUNCTION acyclic_mapped_item_usage # @@ -42649,19 +42649,19 @@ def plane_angle_for_pair_in_radian(pair,angle,): ''' link_cntxt = link_rep.representation.context_of_items if ( not ('AUTOMOTIVE_DESIGN.GLOBAL_UNIT_ASSIGNED_CONTEXT' == TYPEOF(link_cntxt))): - return None + return None pa_units = None if (SIZEOF(pa_units) != 1): - return None + return None pau = pa_units[1] if (( not ('AUTOMOTIVE_DESIGN.SI_UNIT' == TYPEOF(pau))) and ( not ('AUTOMOTIVE_DESIGN.CONVERSION_BASED_UNIT' == TYPEOF(pau)))): - return None + return None for while 'AUTOMOTIVE_DESIGN.CONVERSION_BASED_UNIT' == TYPEOF(pau) converted_angle = converted_angle * pau.conversion_based_unit.conversion_factor.value_component pau = pau.conversion_based_unit.conversion_factor.unit_component if ((( not ('AUTOMOTIVE_DESIGN.SI_UNIT' == TYPEOF(pau))) and ( not ('AUTOMOTIVE_DESIGN.CONVERSION_BASED_UNIT' == TYPEOF(pau)))) or ( not ('AUTOMOTIVE_DESIGN.PLANE_ANGLE_UNIT' == TYPEOF(pau)))): - return None + return None if (pau.si_unit.name != si_unit_name.radian): - return None + return None case_selector = pau.si_unit.prefix if case_selector == si_prefix.exa: return 1e+018 * converted_angle @@ -42708,7 +42708,7 @@ def get_multi_language(x,): ''' if (SIZEOF(alas) > 0): return alas[1].language - return None + return None #################### # FUNCTION unique_link_usage # @@ -42806,7 +42806,7 @@ def cross_product(arg1,arg2,): :type arg2:direction ''' if (((( not EXISTS(arg1)) or (arg1.dim == 2)) or ( not EXISTS(arg2))) or (arg2.dim == 2)): - return None + return None else: v1 = normalise(arg1).direction_ratios v2 = normalise(arg2).direction_ratios @@ -43138,10 +43138,10 @@ def dot_product(arg1,arg2,): :type arg2:direction ''' if (( not EXISTS(arg1)) or ( not EXISTS(arg2))): - scalar = None + scalar = None else: if (arg1.dim != arg2.dim): - scalar = None + scalar = None else: vec1 = normalise(arg1) vec2 = normalise(arg2) @@ -43162,7 +43162,7 @@ def get_role(obj,): if (SIZEOF(role_bag) == 1): return role_bag[1].role else: - return None + return None #################### # FUNCTION acyclic_curve_replica # diff --git a/src/Mod/Import/App/SCL_output/config_control_design.py b/src/Mod/Import/App/SCL_output/config_control_design.py new file mode 100644 index 0000000000..7cf0c300b8 --- /dev/null +++ b/src/Mod/Import/App/SCL_output/config_control_design.py @@ -0,0 +1,18442 @@ +# This file was generated by fedex_python. You probably don't want to edit +# it since your modifications will be lost if fedex_plus is used to +# regenerate it. +import sys + +from SCL.SCLBase import * +from SCL.SimpleDataTypes import * +from SCL.ConstructedDataTypes import * +from SCL.AggregationDataTypes import * +from SCL.TypeChecker import check_type +from SCL.Builtin import * +from SCL.Rules import * + +schema_name = "config_control_design" + +schema_scope = sys.modules[__name__] + +# SELECT TYPE characterized_definition +characterized_definition = SELECT( + "characterized_product_definition", "shape_definition", scope=schema_scope +) +# Defined datatype parameter_value +class parameter_value(REAL): + def __init__(self, *kargs): + pass + + +# Defined datatype plane_angle_measure +class plane_angle_measure(REAL): + def __init__(self, *kargs): + pass + + +# SELECT TYPE change_request_item +change_request_item = SELECT("product_definition_formation", scope=schema_scope) +# Defined datatype text +class text(STRING): + def __init__(self, *kargs): + pass + + +# Defined datatype year_number +class year_number(INTEGER): + def __init__(self, *kargs): + pass + + +# SELECT TYPE characterized_product_definition +characterized_product_definition = SELECT( + "product_definition", "product_definition_relationship", scope=schema_scope +) +# SELECT TYPE reversible_topology_item +reversible_topology_item = SELECT( + "edge", "path", "face", "face_bound", "closed_shell", "open_shell", scope=schema_scope +) +# SELECT TYPE axis2_placement +axis2_placement = SELECT("axis2_placement_2d", "axis2_placement_3d", scope=schema_scope) +set_of_reversible_topology_item = SET(0, None, "reversible_topology_item", scope=schema_scope) +# Defined datatype week_in_year_number +class week_in_year_number(INTEGER): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = (1 <= self) and (self <= 53) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# Defined datatype knot_type +class knot_type(ENUMERATION): + def __init__(self, *kargs): + pass + + +# SELECT TYPE specified_item +specified_item = SELECT("product_definition", "shape_aspect", scope=schema_scope) +# Defined datatype minute_in_hour +class minute_in_hour(INTEGER): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = (0 <= self) and (self <= 59) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# Defined datatype transition_code +class transition_code(ENUMERATION): + def __init__(self, *kargs): + pass + + +# Defined datatype identifier +class identifier(STRING): + def __init__(self, *kargs): + pass + + +# SELECT TYPE measure_value +measure_value = SELECT( + "length_measure", + "mass_measure", + "plane_angle_measure", + "solid_angle_measure", + "area_measure", + "volume_measure", + "parameter_value", + "context_dependent_measure", + "descriptive_measure", + "positive_length_measure", + "positive_plane_angle_measure", + "count_measure", + scope=schema_scope, +) +# SELECT TYPE person_organization_select +person_organization_select = SELECT( + "person", "organization", "person_and_organization", scope=schema_scope +) +# Defined datatype preferred_surface_curve_representation +class preferred_surface_curve_representation(ENUMERATION): + def __init__(self, *kargs): + pass + + +# Defined datatype dimension_count +class dimension_count(INTEGER): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = self > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# SELECT TYPE pcurve_or_surface +pcurve_or_surface = SELECT("pcurve", "surface", scope=schema_scope) + +# Defined datatype length_measure +class length_measure(REAL): + def __init__(self, *kargs): + pass + + +# Defined datatype positive_length_measure +class positive_length_measure(length_measure): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = self > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# Defined datatype b_spline_curve_form +class b_spline_curve_form(ENUMERATION): + def __init__(self, *kargs): + pass + + +# Defined datatype hour_in_day +class hour_in_day(INTEGER): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = (0 <= self) and (self < 24) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# SELECT TYPE classified_item +classified_item = SELECT( + "product_definition_formation", "assembly_component_usage", scope=schema_scope +) +# Defined datatype si_unit_name +class si_unit_name(ENUMERATION): + def __init__(self, *kargs): + pass + + +# Defined datatype day_in_month_number +class day_in_month_number(INTEGER): + def __init__(self, *kargs): + pass + + +# SELECT TYPE founded_item_select +founded_item_select = SELECT("founded_item", "representation_item", scope=schema_scope) +# Defined datatype trimming_preference +class trimming_preference(ENUMERATION): + def __init__(self, *kargs): + pass + + +# SELECT TYPE vector_or_direction +vector_or_direction = SELECT("vector", "direction", scope=schema_scope) +# SELECT TYPE wireframe_model +wireframe_model = SELECT( + "shell_based_wireframe_model", "edge_based_wireframe_model", scope=schema_scope +) +# Defined datatype volume_measure +class volume_measure(REAL): + def __init__(self, *kargs): + pass + + +# SELECT TYPE geometric_set_select +geometric_set_select = SELECT("point", "curve", "surface", scope=schema_scope) +# Defined datatype positive_plane_angle_measure +class positive_plane_angle_measure(plane_angle_measure): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = self > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# SELECT TYPE start_request_item +start_request_item = SELECT("product_definition_formation", scope=schema_scope) +# Defined datatype b_spline_surface_form +class b_spline_surface_form(ENUMERATION): + def __init__(self, *kargs): + pass + + +# SELECT TYPE person_organization_item +person_organization_item = SELECT( + "change", + "start_work", + "change_request", + "start_request", + "configuration_item", + "product", + "product_definition_formation", + "product_definition", + "contract", + "security_classification", + scope=schema_scope, +) +# SELECT TYPE date_time_item +date_time_item = SELECT( + "product_definition", + "change_request", + "start_request", + "change", + "start_work", + "approval_person_organization", + "contract", + "security_classification", + "certification", + scope=schema_scope, +) +# SELECT TYPE shell +shell = SELECT("vertex_shell", "wire_shell", "open_shell", "closed_shell", scope=schema_scope) +# SELECT TYPE transformation +transformation = SELECT( + "item_defined_transformation", "functionally_defined_transformation", scope=schema_scope +) +# Defined datatype day_in_week_number +class day_in_week_number(INTEGER): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = (1 <= self) and (self <= 7) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# SELECT TYPE boolean_operand +boolean_operand = SELECT("solid_model", scope=schema_scope) +# SELECT TYPE certified_item +certified_item = SELECT("supplied_part_relationship", scope=schema_scope) +# SELECT TYPE date_time_select +date_time_select = SELECT("date", "local_time", "date_and_time", scope=schema_scope) +# Defined datatype solid_angle_measure +class solid_angle_measure(REAL): + def __init__(self, *kargs): + pass + + +# SELECT TYPE curve_on_surface +curve_on_surface = SELECT( + "pcurve", "surface_curve", "composite_curve_on_surface", scope=schema_scope +) +# SELECT TYPE trimming_select +trimming_select = SELECT("cartesian_point", "parameter_value", scope=schema_scope) +# Defined datatype ahead_or_behind +class ahead_or_behind(ENUMERATION): + def __init__(self, *kargs): + pass + + +# SELECT TYPE contracted_item +contracted_item = SELECT("product_definition_formation", scope=schema_scope) +# Defined datatype day_in_year_number +class day_in_year_number(INTEGER): + def __init__(self, *kargs): + pass + + +# Defined datatype mass_measure +class mass_measure(REAL): + def __init__(self, *kargs): + pass + + +# Defined datatype descriptive_measure +class descriptive_measure(STRING): + def __init__(self, *kargs): + pass + + +# Defined datatype area_measure +class area_measure(REAL): + def __init__(self, *kargs): + pass + + +# Defined datatype month_in_year_number +class month_in_year_number(INTEGER): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = (1 <= self) and (self <= 12) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# Defined datatype source +class source(ENUMERATION): + def __init__(self, *kargs): + pass + + +# SELECT TYPE unit +unit = SELECT("named_unit", scope=schema_scope) +# SELECT TYPE reversible_topology +reversible_topology = SELECT( + "reversible_topology_item", + "list_of_reversible_topology_item", + "set_of_reversible_topology_item", + scope=schema_scope, +) +# SELECT TYPE work_item +work_item = SELECT("product_definition_formation", scope=schema_scope) +# SELECT TYPE shape_definition +shape_definition = SELECT( + "product_definition_shape", "shape_aspect", "shape_aspect_relationship", scope=schema_scope +) +# Defined datatype second_in_minute +class second_in_minute(REAL): + def __init__(self, *kargs): + pass + self.wr1() + + def wr1(self): + eval_wr1_wr = (0 <= self) and (self < 60) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +# Defined datatype label +class label(STRING): + def __init__(self, *kargs): + pass + + +# Defined datatype context_dependent_measure +class context_dependent_measure(REAL): + def __init__(self, *kargs): + pass + + +# SELECT TYPE supported_item +supported_item = SELECT("action_directive", "action", "action_method", scope=schema_scope) +# Defined datatype si_prefix +class si_prefix(ENUMERATION): + def __init__(self, *kargs): + pass + + +# SELECT TYPE approved_item +approved_item = SELECT( + "product_definition_formation", + "product_definition", + "configuration_effectivity", + "configuration_item", + "security_classification", + "change_request", + "change", + "start_request", + "start_work", + "certification", + "contract", + scope=schema_scope, +) +# Defined datatype count_measure +class count_measure(NUMBER): + def __init__(self, *kargs): + pass + + +# SELECT TYPE surface_model +surface_model = SELECT("shell_based_surface_model", scope=schema_scope) +list_of_reversible_topology_item = LIST(0, None, "reversible_topology_item", scope=schema_scope) + +#################### +# ENTITY representation_item # +#################### +class representation_item(BaseEntityClass): + """Entity representation_item definition. + + :param name + :type name:label + """ + + def __init__( + self, + name, + ): + self.name = name + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = SIZEOF(using_representations(self)) > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY geometric_representation_item # +#################### +class geometric_representation_item(representation_item): + """Entity geometric_representation_item definition. + + :param dim + :type dim:dimension_count + """ + + def __init__( + self, + inherited0__name, + ): + representation_item.__init__( + self, + inherited0__name, + ) + + @apply + def dim(): + def fget(self): + attribute_eval = dimension_of(self) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument dim is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY functionally_defined_transformation # +#################### +class functionally_defined_transformation(BaseEntityClass): + """Entity functionally_defined_transformation definition. + + :param name + :type name:label + + :param description + :type description:text + """ + + def __init__( + self, + name, + description, + ): + self.name = name + self.description = description + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY cartesian_transformation_operator # +#################### +class cartesian_transformation_operator( + geometric_representation_item, functionally_defined_transformation +): + """Entity cartesian_transformation_operator definition. + + :param axis1 + :type axis1:direction + + :param axis2 + :type axis2:direction + + :param local_origin + :type local_origin:cartesian_point + + :param scale + :type scale:REAL + + :param scl + :type scl:REAL + """ + + def __init__( + self, + inherited0__name, + inherited1__name, + inherited2__description, + axis1, + axis2, + local_origin, + scale, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + functionally_defined_transformation.__init__( + self, + inherited1__name, + inherited2__description, + ) + self.axis1 = axis1 + self.axis2 = axis2 + self.local_origin = local_origin + self.scale = scale + + @apply + def axis1(): + def fget(self): + return self._axis1 + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, direction): + self._axis1 = direction(value) + else: + self._axis1 = value + else: + self._axis1 = value + + return property(**locals()) + + @apply + def axis2(): + def fget(self): + return self._axis2 + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, direction): + self._axis2 = direction(value) + else: + self._axis2 = value + else: + self._axis2 = value + + return property(**locals()) + + @apply + def local_origin(): + def fget(self): + return self._local_origin + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument local_origin is mantatory and can not be set to None" + ) + if not check_type(value, cartesian_point): + self._local_origin = cartesian_point(value) + else: + self._local_origin = value + + return property(**locals()) + + @apply + def scale(): + def fget(self): + return self._scale + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, REAL): + self._scale = REAL(value) + else: + self._scale = value + else: + self._scale = value + + return property(**locals()) + + @apply + def scl(): + def fget(self): + attribute_eval = NVL(self.scale, 1) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument scl is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.scl > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY cartesian_transformation_operator_3d # +#################### +class cartesian_transformation_operator_3d(cartesian_transformation_operator): + """Entity cartesian_transformation_operator_3d definition. + + :param axis3 + :type axis3:direction + + :param u + :type u:LIST(3,3,'direction', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__name, + inherited2__description, + inherited3__axis1, + inherited4__axis2, + inherited5__local_origin, + inherited6__scale, + axis3, + ): + cartesian_transformation_operator.__init__( + self, + inherited0__name, + inherited1__name, + inherited2__description, + inherited3__axis1, + inherited4__axis2, + inherited5__local_origin, + inherited6__scale, + ) + self.axis3 = axis3 + + @apply + def axis3(): + def fget(self): + return self._axis3 + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, direction): + self._axis3 = direction(value) + else: + self._axis3 = value + else: + self._axis3 = value + + return property(**locals()) + + @apply + def u(): + def fget(self): + attribute_eval = base_axis( + 3, + self.self.cartesian_transformation_operator.self.axis1, + self.self.cartesian_transformation_operator.self.axis2, + self.axis3, + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument u is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.self.geometric_representation_item.self.dim == 3 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY versioned_action_request # +#################### +class versioned_action_request(BaseEntityClass): + """Entity versioned_action_request definition. + + :param id + :type id:identifier + + :param version + :type version:label + + :param purpose + :type purpose:text + + :param description + :type description:text + """ + + def __init__( + self, + id, + version, + purpose, + description, + ): + self.id = id + self.version = version + self.purpose = purpose + self.description = description + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def version(): + def fget(self): + return self._version + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument version is mantatory and can not be set to None") + if not check_type(value, label): + self._version = label(value) + else: + self._version = value + + return property(**locals()) + + @apply + def purpose(): + def fget(self): + return self._purpose + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument purpose is mantatory and can not be set to None") + if not check_type(value, text): + self._purpose = text(value) + else: + self._purpose = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY representation # +#################### +class representation(BaseEntityClass): + """Entity representation definition. + + :param name + :type name:label + + :param items + :type items:SET(1,None,'representation_item', scope = schema_scope) + + :param context_of_items + :type context_of_items:representation_context + """ + + def __init__( + self, + name, + items, + context_of_items, + ): + self.name = name + self.items = items + self.context_of_items = context_of_items + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "representation_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + @apply + def context_of_items(): + def fget(self): + return self._context_of_items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument context_of_items is mantatory and can not be set to None" + ) + if not check_type(value, representation_context): + self._context_of_items = representation_context(value) + else: + self._context_of_items = value + + return property(**locals()) + + +#################### +# ENTITY shape_representation # +#################### +class shape_representation(representation): + """Entity shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + +#################### +# ENTITY manifold_surface_shape_representation # +#################### +class manifold_surface_shape_representation(shape_representation): + """Entity manifold_surface_shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + shape_representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) > 0 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = SIZEOF(None) == 0 + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + def wr7(self): + eval_wr7_wr = SIZEOF(None) == 0 + if not eval_wr7_wr: + raise AssertionError("Rule wr7 violated") + else: + return eval_wr7_wr + + def wr8(self): + eval_wr8_wr = SIZEOF(None) == 0 + if not eval_wr8_wr: + raise AssertionError("Rule wr8 violated") + else: + return eval_wr8_wr + + def wr9(self): + eval_wr9_wr = SIZEOF(None) == 0 + if not eval_wr9_wr: + raise AssertionError("Rule wr9 violated") + else: + return eval_wr9_wr + + def wr10(self): + eval_wr10_wr = SIZEOF(None) == 0 + if not eval_wr10_wr: + raise AssertionError("Rule wr10 violated") + else: + return eval_wr10_wr + + def wr11(self): + eval_wr11_wr = SIZEOF(None) == 0 + if not eval_wr11_wr: + raise AssertionError("Rule wr11 violated") + else: + return eval_wr11_wr + + def wr12(self): + eval_wr12_wr = SIZEOF(None) == 0 + if not eval_wr12_wr: + raise AssertionError("Rule wr12 violated") + else: + return eval_wr12_wr + + def wr13(self): + eval_wr13_wr = SIZEOF(None) == 0 + if not eval_wr13_wr: + raise AssertionError("Rule wr13 violated") + else: + return eval_wr13_wr + + def wr14(self): + eval_wr14_wr = SIZEOF(None) == 0 + if not eval_wr14_wr: + raise AssertionError("Rule wr14 violated") + else: + return eval_wr14_wr + + def wr15(self): + eval_wr15_wr = SIZEOF(None) == 0 + if not eval_wr15_wr: + raise AssertionError("Rule wr15 violated") + else: + return eval_wr15_wr + + +#################### +# ENTITY certification # +#################### +class certification(BaseEntityClass): + """Entity certification definition. + + :param name + :type name:label + + :param purpose + :type purpose:text + + :param kind + :type kind:certification_type + """ + + def __init__( + self, + name, + purpose, + kind, + ): + self.name = name + self.purpose = purpose + self.kind = kind + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def purpose(): + def fget(self): + return self._purpose + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument purpose is mantatory and can not be set to None") + if not check_type(value, text): + self._purpose = text(value) + else: + self._purpose = value + + return property(**locals()) + + @apply + def kind(): + def fget(self): + return self._kind + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument kind is mantatory and can not be set to None") + if not check_type(value, certification_type): + self._kind = certification_type(value) + else: + self._kind = value + + return property(**locals()) + + +#################### +# ENTITY product_definition_relationship # +#################### +class product_definition_relationship(BaseEntityClass): + """Entity product_definition_relationship definition. + + :param id + :type id:identifier + + :param name + :type name:label + + :param description + :type description:text + + :param relating_product_definition + :type relating_product_definition:product_definition + + :param related_product_definition + :type related_product_definition:product_definition + """ + + def __init__( + self, + id, + name, + description, + relating_product_definition, + related_product_definition, + ): + self.id = id + self.name = name + self.description = description + self.relating_product_definition = relating_product_definition + self.related_product_definition = related_product_definition + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def relating_product_definition(): + def fget(self): + return self._relating_product_definition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument relating_product_definition is mantatory and can not be set to None" + ) + if not check_type(value, product_definition): + self._relating_product_definition = product_definition(value) + else: + self._relating_product_definition = value + + return property(**locals()) + + @apply + def related_product_definition(): + def fget(self): + return self._related_product_definition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument related_product_definition is mantatory and can not be set to None" + ) + if not check_type(value, product_definition): + self._related_product_definition = product_definition(value) + else: + self._related_product_definition = value + + return property(**locals()) + + +#################### +# ENTITY product_definition_usage # +#################### +class product_definition_usage(product_definition_relationship): + """Entity product_definition_usage definition.""" + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + ): + product_definition_relationship.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + ) + + def wr1(self): + eval_wr1_wr = acyclic_product_definition_relationship( + self, + [self.self.product_definition_relationship.self.related_product_definition], + "CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_USAGE", + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY assembly_component_usage # +#################### +class assembly_component_usage(product_definition_usage): + """Entity assembly_component_usage definition. + + :param reference_designator + :type reference_designator:identifier + """ + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + reference_designator, + ): + product_definition_usage.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + ) + self.reference_designator = reference_designator + + @apply + def reference_designator(): + def fget(self): + return self._reference_designator + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, identifier): + self._reference_designator = identifier(value) + else: + self._reference_designator = value + else: + self._reference_designator = value + + return property(**locals()) + + +#################### +# ENTITY quantified_assembly_component_usage # +#################### +class quantified_assembly_component_usage(assembly_component_usage): + """Entity quantified_assembly_component_usage definition. + + :param quantity + :type quantity:measure_with_unit + """ + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + quantity, + ): + assembly_component_usage.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + ) + self.quantity = quantity + + @apply + def quantity(): + def fget(self): + return self._quantity + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument quantity is mantatory and can not be set to None") + if not check_type(value, measure_with_unit): + self._quantity = measure_with_unit(value) + else: + self._quantity = value + + return property(**locals()) + + +#################### +# ENTITY solid_model # +#################### +class solid_model(geometric_representation_item): + """Entity solid_model definition.""" + + def __init__( + self, + inherited0__name, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY manifold_solid_brep # +#################### +class manifold_solid_brep(solid_model): + """Entity manifold_solid_brep definition. + + :param outer + :type outer:closed_shell + """ + + def __init__( + self, + inherited0__name, + outer, + ): + solid_model.__init__( + self, + inherited0__name, + ) + self.outer = outer + + @apply + def outer(): + def fget(self): + return self._outer + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument outer is mantatory and can not be set to None") + if not check_type(value, closed_shell): + self._outer = closed_shell(value) + else: + self._outer = value + + return property(**locals()) + + +#################### +# ENTITY faceted_brep # +#################### +class faceted_brep(manifold_solid_brep): + """Entity faceted_brep definition.""" + + def __init__( + self, + inherited0__name, + inherited1__outer, + ): + manifold_solid_brep.__init__( + self, + inherited0__name, + inherited1__outer, + ) + + +#################### +# ENTITY action_directive # +#################### +class action_directive(BaseEntityClass): + """Entity action_directive definition. + + :param name + :type name:label + + :param description + :type description:text + + :param analysis + :type analysis:text + + :param comment + :type comment:text + + :param requests + :type requests:SET(1,None,'versioned_action_request', scope = schema_scope) + """ + + def __init__( + self, + name, + description, + analysis, + comment, + requests, + ): + self.name = name + self.description = description + self.analysis = analysis + self.comment = comment + self.requests = requests + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def analysis(): + def fget(self): + return self._analysis + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument analysis is mantatory and can not be set to None") + if not check_type(value, text): + self._analysis = text(value) + else: + self._analysis = value + + return property(**locals()) + + @apply + def comment(): + def fget(self): + return self._comment + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument comment is mantatory and can not be set to None") + if not check_type(value, text): + self._comment = text(value) + else: + self._comment = value + + return property(**locals()) + + @apply + def requests(): + def fget(self): + return self._requests + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument requests is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "versioned_action_request", scope=schema_scope)): + self._requests = SET(value) + else: + self._requests = value + + return property(**locals()) + + +#################### +# ENTITY named_unit # +#################### +class named_unit(BaseEntityClass): + """Entity named_unit definition. + + :param dimensions + :type dimensions:dimensional_exponents + """ + + def __init__( + self, + dimensions, + ): + self.dimensions = dimensions + + @apply + def dimensions(): + def fget(self): + return self._dimensions + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument dimensions is mantatory and can not be set to None") + if not check_type(value, dimensional_exponents): + self._dimensions = dimensional_exponents(value) + else: + self._dimensions = value + + return property(**locals()) + + +#################### +# ENTITY plane_angle_unit # +#################### +class plane_angle_unit(named_unit): + """Entity plane_angle_unit definition.""" + + def __init__( + self, + inherited0__dimensions, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + + def wr1(self): + eval_wr1_wr = ( + ( + ( + ( + ( + (self.self.named_unit.self.dimensions.self.length_exponent == 0) + and (self.self.named_unit.self.dimensions.self.mass_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.time_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0) + ) + and ( + self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent + == 0 + ) + ) + and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0) + ) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY measure_with_unit # +#################### +class measure_with_unit(BaseEntityClass): + """Entity measure_with_unit definition. + + :param value_component + :type value_component:measure_value + + :param unit_component + :type unit_component:unit + """ + + def __init__( + self, + value_component, + unit_component, + ): + self.value_component = value_component + self.unit_component = unit_component + + @apply + def value_component(): + def fget(self): + return self._value_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument value_component is mantatory and can not be set to None" + ) + if not check_type(value, measure_value): + self._value_component = measure_value(value) + else: + self._value_component = value + + return property(**locals()) + + @apply + def unit_component(): + def fget(self): + return self._unit_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument unit_component is mantatory and can not be set to None" + ) + if not check_type(value, unit): + self._unit_component = unit(value) + else: + self._unit_component = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = valid_units(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY area_measure_with_unit # +#################### +class area_measure_with_unit(measure_with_unit): + """Entity area_measure_with_unit definition.""" + + def __init__( + self, + inherited0__value_component, + inherited1__unit_component, + ): + measure_with_unit.__init__( + self, + inherited0__value_component, + inherited1__unit_component, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.AREA_UNIT" == TYPEOF( + self.self.measure_with_unit.self.unit_component + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY effectivity # +#################### +class effectivity(BaseEntityClass): + """Entity effectivity definition. + + :param id + :type id:identifier + """ + + def __init__( + self, + id, + ): + self.id = id + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + +#################### +# ENTITY serial_numbered_effectivity # +#################### +class serial_numbered_effectivity(effectivity): + """Entity serial_numbered_effectivity definition. + + :param effectivity_start_id + :type effectivity_start_id:identifier + + :param effectivity_end_id + :type effectivity_end_id:identifier + """ + + def __init__( + self, + inherited0__id, + effectivity_start_id, + effectivity_end_id, + ): + effectivity.__init__( + self, + inherited0__id, + ) + self.effectivity_start_id = effectivity_start_id + self.effectivity_end_id = effectivity_end_id + + @apply + def effectivity_start_id(): + def fget(self): + return self._effectivity_start_id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument effectivity_start_id is mantatory and can not be set to None" + ) + if not check_type(value, identifier): + self._effectivity_start_id = identifier(value) + else: + self._effectivity_start_id = value + + return property(**locals()) + + @apply + def effectivity_end_id(): + def fget(self): + return self._effectivity_end_id + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, identifier): + self._effectivity_end_id = identifier(value) + else: + self._effectivity_end_id = value + else: + self._effectivity_end_id = value + + return property(**locals()) + + +#################### +# ENTITY surface # +#################### +class surface(geometric_representation_item): + """Entity surface definition.""" + + def __init__( + self, + inherited0__name, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY offset_surface # +#################### +class offset_surface(surface): + """Entity offset_surface definition. + + :param basis_surface + :type basis_surface:surface + + :param distance + :type distance:length_measure + + :param self_intersect + :type self_intersect:LOGICAL + """ + + def __init__( + self, + inherited0__name, + basis_surface, + distance, + self_intersect, + ): + surface.__init__( + self, + inherited0__name, + ) + self.basis_surface = basis_surface + self.distance = distance + self.self_intersect = self_intersect + + @apply + def basis_surface(): + def fget(self): + return self._basis_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument basis_surface is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._basis_surface = surface(value) + else: + self._basis_surface = value + + return property(**locals()) + + @apply + def distance(): + def fget(self): + return self._distance + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument distance is mantatory and can not be set to None") + if not check_type(value, length_measure): + self._distance = length_measure(value) + else: + self._distance = value + + return property(**locals()) + + @apply + def self_intersect(): + def fget(self): + return self._self_intersect + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument self_intersect is mantatory and can not be set to None" + ) + if not check_type(value, LOGICAL): + self._self_intersect = LOGICAL(value) + else: + self._self_intersect = value + + return property(**locals()) + + +#################### +# ENTITY placement # +#################### +class placement(geometric_representation_item): + """Entity placement definition. + + :param location + :type location:cartesian_point + """ + + def __init__( + self, + inherited0__name, + location, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + self.location = location + + @apply + def location(): + def fget(self): + return self._location + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument location is mantatory and can not be set to None") + if not check_type(value, cartesian_point): + self._location = cartesian_point(value) + else: + self._location = value + + return property(**locals()) + + +#################### +# ENTITY axis2_placement_2d # +#################### +class axis2_placement_2d(placement): + """Entity axis2_placement_2d definition. + + :param ref_direction + :type ref_direction:direction + + :param p + :type p:LIST(2,2,'direction', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__location, + ref_direction, + ): + placement.__init__( + self, + inherited0__name, + inherited1__location, + ) + self.ref_direction = ref_direction + + @apply + def ref_direction(): + def fget(self): + return self._ref_direction + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, direction): + self._ref_direction = direction(value) + else: + self._ref_direction = value + else: + self._ref_direction = value + + return property(**locals()) + + @apply + def p(): + def fget(self): + attribute_eval = build_2axes(self.ref_direction) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument p is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.self.geometric_representation_item.self.dim == 2 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY product_category # +#################### +class product_category(BaseEntityClass): + """Entity product_category definition. + + :param name + :type name:label + + :param description + :type description:text + """ + + def __init__( + self, + name, + description, + ): + self.name = name + self.description = description + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY product_related_product_category # +#################### +class product_related_product_category(product_category): + """Entity product_related_product_category definition. + + :param products + :type products:SET(1,None,'product', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__description, + products, + ): + product_category.__init__( + self, + inherited0__name, + inherited1__description, + ) + self.products = products + + @apply + def products(): + def fget(self): + return self._products + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument products is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "product", scope=schema_scope)): + self._products = SET(value) + else: + self._products = value + + return property(**locals()) + + +#################### +# ENTITY curve # +#################### +class curve(geometric_representation_item): + """Entity curve definition.""" + + def __init__( + self, + inherited0__name, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY conic # +#################### +class conic(curve): + """Entity conic definition. + + :param position + :type position:axis2_placement + """ + + def __init__( + self, + inherited0__name, + position, + ): + curve.__init__( + self, + inherited0__name, + ) + self.position = position + + @apply + def position(): + def fget(self): + return self._position + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument position is mantatory and can not be set to None") + if not check_type(value, axis2_placement): + self._position = axis2_placement(value) + else: + self._position = value + + return property(**locals()) + + +#################### +# ENTITY hyperbola # +#################### +class hyperbola(conic): + """Entity hyperbola definition. + + :param semi_axis + :type semi_axis:positive_length_measure + + :param semi_imag_axis + :type semi_imag_axis:positive_length_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + semi_axis, + semi_imag_axis, + ): + conic.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.semi_axis = semi_axis + self.semi_imag_axis = semi_imag_axis + + @apply + def semi_axis(): + def fget(self): + return self._semi_axis + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument semi_axis is mantatory and can not be set to None") + if not check_type(value, positive_length_measure): + self._semi_axis = positive_length_measure(value) + else: + self._semi_axis = value + + return property(**locals()) + + @apply + def semi_imag_axis(): + def fget(self): + return self._semi_imag_axis + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument semi_imag_axis is mantatory and can not be set to None" + ) + if not check_type(value, positive_length_measure): + self._semi_imag_axis = positive_length_measure(value) + else: + self._semi_imag_axis = value + + return property(**locals()) + + +#################### +# ENTITY address # +#################### +class address(BaseEntityClass): + """Entity address definition. + + :param internal_location + :type internal_location:label + + :param street_number + :type street_number:label + + :param street + :type street:label + + :param postal_box + :type postal_box:label + + :param town + :type town:label + + :param region + :type region:label + + :param postal_code + :type postal_code:label + + :param country + :type country:label + + :param facsimile_number + :type facsimile_number:label + + :param telephone_number + :type telephone_number:label + + :param electronic_mail_address + :type electronic_mail_address:label + + :param telex_number + :type telex_number:label + """ + + def __init__( + self, + internal_location, + street_number, + street, + postal_box, + town, + region, + postal_code, + country, + facsimile_number, + telephone_number, + electronic_mail_address, + telex_number, + ): + self.internal_location = internal_location + self.street_number = street_number + self.street = street + self.postal_box = postal_box + self.town = town + self.region = region + self.postal_code = postal_code + self.country = country + self.facsimile_number = facsimile_number + self.telephone_number = telephone_number + self.electronic_mail_address = electronic_mail_address + self.telex_number = telex_number + + @apply + def internal_location(): + def fget(self): + return self._internal_location + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._internal_location = label(value) + else: + self._internal_location = value + else: + self._internal_location = value + + return property(**locals()) + + @apply + def street_number(): + def fget(self): + return self._street_number + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._street_number = label(value) + else: + self._street_number = value + else: + self._street_number = value + + return property(**locals()) + + @apply + def street(): + def fget(self): + return self._street + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._street = label(value) + else: + self._street = value + else: + self._street = value + + return property(**locals()) + + @apply + def postal_box(): + def fget(self): + return self._postal_box + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._postal_box = label(value) + else: + self._postal_box = value + else: + self._postal_box = value + + return property(**locals()) + + @apply + def town(): + def fget(self): + return self._town + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._town = label(value) + else: + self._town = value + else: + self._town = value + + return property(**locals()) + + @apply + def region(): + def fget(self): + return self._region + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._region = label(value) + else: + self._region = value + else: + self._region = value + + return property(**locals()) + + @apply + def postal_code(): + def fget(self): + return self._postal_code + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._postal_code = label(value) + else: + self._postal_code = value + else: + self._postal_code = value + + return property(**locals()) + + @apply + def country(): + def fget(self): + return self._country + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._country = label(value) + else: + self._country = value + else: + self._country = value + + return property(**locals()) + + @apply + def facsimile_number(): + def fget(self): + return self._facsimile_number + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._facsimile_number = label(value) + else: + self._facsimile_number = value + else: + self._facsimile_number = value + + return property(**locals()) + + @apply + def telephone_number(): + def fget(self): + return self._telephone_number + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._telephone_number = label(value) + else: + self._telephone_number = value + else: + self._telephone_number = value + + return property(**locals()) + + @apply + def electronic_mail_address(): + def fget(self): + return self._electronic_mail_address + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._electronic_mail_address = label(value) + else: + self._electronic_mail_address = value + else: + self._electronic_mail_address = value + + return property(**locals()) + + @apply + def telex_number(): + def fget(self): + return self._telex_number + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._telex_number = label(value) + else: + self._telex_number = value + else: + self._telex_number = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + ( + ( + ( + ( + ( + ( + ( + ( + ( + EXISTS(self.internal_location) + or EXISTS(self.street_number) + ) + or EXISTS(self.street) + ) + or EXISTS(self.postal_box) + ) + or EXISTS(self.town) + ) + or EXISTS(self.region) + ) + or EXISTS(self.postal_code) + ) + or EXISTS(self.country) + ) + or EXISTS(self.facsimile_number) + ) + or EXISTS(self.telephone_number) + ) + or EXISTS(self.electronic_mail_address) + ) or EXISTS(self.telex_number) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY organizational_address # +#################### +class organizational_address(address): + """Entity organizational_address definition. + + :param organizations + :type organizations:SET(1,None,'organization', scope = schema_scope) + + :param description + :type description:text + """ + + def __init__( + self, + inherited0__internal_location, + inherited1__street_number, + inherited2__street, + inherited3__postal_box, + inherited4__town, + inherited5__region, + inherited6__postal_code, + inherited7__country, + inherited8__facsimile_number, + inherited9__telephone_number, + inherited10__electronic_mail_address, + inherited11__telex_number, + organizations, + description, + ): + address.__init__( + self, + inherited0__internal_location, + inherited1__street_number, + inherited2__street, + inherited3__postal_box, + inherited4__town, + inherited5__region, + inherited6__postal_code, + inherited7__country, + inherited8__facsimile_number, + inherited9__telephone_number, + inherited10__electronic_mail_address, + inherited11__telex_number, + ) + self.organizations = organizations + self.description = description + + @apply + def organizations(): + def fget(self): + return self._organizations + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument organizations is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "organization", scope=schema_scope)): + self._organizations = SET(value) + else: + self._organizations = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY bounded_surface # +#################### +class bounded_surface(surface): + """Entity bounded_surface definition.""" + + def __init__( + self, + inherited0__name, + ): + surface.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY b_spline_surface # +#################### +class b_spline_surface(bounded_surface): + """Entity b_spline_surface definition. + + :param u_degree + :type u_degree:INTEGER + + :param v_degree + :type v_degree:INTEGER + + :param control_points_list + :type control_points_list:LIST(2,None,LIST(2,None,'cartesian_point', scope = schema_scope)) + + :param surface_form + :type surface_form:b_spline_surface_form + + :param u_closed + :type u_closed:LOGICAL + + :param v_closed + :type v_closed:LOGICAL + + :param self_intersect + :type self_intersect:LOGICAL + + :param u_upper + :type u_upper:INTEGER + + :param v_upper + :type v_upper:INTEGER + + :param control_points + :type control_points:ARRAY(0,u_upper,ARRAY(0,v_upper,'cartesian_point', scope = schema_scope)) + """ + + def __init__( + self, + inherited0__name, + u_degree, + v_degree, + control_points_list, + surface_form, + u_closed, + v_closed, + self_intersect, + ): + bounded_surface.__init__( + self, + inherited0__name, + ) + self.u_degree = u_degree + self.v_degree = v_degree + self.control_points_list = control_points_list + self.surface_form = surface_form + self.u_closed = u_closed + self.v_closed = v_closed + self.self_intersect = self_intersect + + @apply + def u_degree(): + def fget(self): + return self._u_degree + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument u_degree is mantatory and can not be set to None") + if not check_type(value, INTEGER): + self._u_degree = INTEGER(value) + else: + self._u_degree = value + + return property(**locals()) + + @apply + def v_degree(): + def fget(self): + return self._v_degree + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument v_degree is mantatory and can not be set to None") + if not check_type(value, INTEGER): + self._v_degree = INTEGER(value) + else: + self._v_degree = value + + return property(**locals()) + + @apply + def control_points_list(): + def fget(self): + return self._control_points_list + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument control_points_list is mantatory and can not be set to None" + ) + if not check_type( + value, LIST(2, None, LIST(2, None, "cartesian_point", scope=schema_scope)) + ): + self._control_points_list = LIST(value) + else: + self._control_points_list = value + + return property(**locals()) + + @apply + def surface_form(): + def fget(self): + return self._surface_form + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument surface_form is mantatory and can not be set to None" + ) + if not check_type(value, b_spline_surface_form): + self._surface_form = b_spline_surface_form(value) + else: + self._surface_form = value + + return property(**locals()) + + @apply + def u_closed(): + def fget(self): + return self._u_closed + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument u_closed is mantatory and can not be set to None") + if not check_type(value, LOGICAL): + self._u_closed = LOGICAL(value) + else: + self._u_closed = value + + return property(**locals()) + + @apply + def v_closed(): + def fget(self): + return self._v_closed + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument v_closed is mantatory and can not be set to None") + if not check_type(value, LOGICAL): + self._v_closed = LOGICAL(value) + else: + self._v_closed = value + + return property(**locals()) + + @apply + def self_intersect(): + def fget(self): + return self._self_intersect + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument self_intersect is mantatory and can not be set to None" + ) + if not check_type(value, LOGICAL): + self._self_intersect = LOGICAL(value) + else: + self._self_intersect = value + + return property(**locals()) + + @apply + def u_upper(): + def fget(self): + attribute_eval = SIZEOF(self.control_points_list) - 1 + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument u_upper is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + @apply + def v_upper(): + def fget(self): + attribute_eval = SIZEOF(self.control_points_list[1]) - 1 + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument v_upper is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + @apply + def control_points(): + def fget(self): + attribute_eval = make_array_of_array( + self.control_points_list, 0, self.u_upper, 0, self.v_upper + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument control_points is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + ( + ("CONFIG_CONTROL_DESIGN.UNIFORM_SURFACE" == TYPEOF(self)) + or ("CONFIG_CONTROL_DESIGN.QUASI_UNIFORM_SURFACE" == TYPEOF(self)) + ) + or ("CONFIG_CONTROL_DESIGN.BEZIER_SURFACE" == TYPEOF(self)) + ) or ("CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE_WITH_KNOTS" == TYPEOF(self)) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY uniform_surface # +#################### +class uniform_surface(b_spline_surface): + """Entity uniform_surface definition.""" + + def __init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ): + b_spline_surface.__init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ) + + +#################### +# ENTITY geometrically_bounded_surface_shape_representation # +#################### +class geometrically_bounded_surface_shape_representation(shape_representation): + """Entity geometrically_bounded_surface_shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + shape_representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) > 0 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = SIZEOF(None) == 0 + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + def wr7(self): + eval_wr7_wr = SIZEOF(None) > 0 + if not eval_wr7_wr: + raise AssertionError("Rule wr7 violated") + else: + return eval_wr7_wr + + +#################### +# ENTITY axis1_placement # +#################### +class axis1_placement(placement): + """Entity axis1_placement definition. + + :param axis + :type axis:direction + + :param z + :type z:direction + """ + + def __init__( + self, + inherited0__name, + inherited1__location, + axis, + ): + placement.__init__( + self, + inherited0__name, + inherited1__location, + ) + self.axis = axis + + @apply + def axis(): + def fget(self): + return self._axis + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, direction): + self._axis = direction(value) + else: + self._axis = value + else: + self._axis = value + + return property(**locals()) + + @apply + def z(): + def fget(self): + attribute_eval = NVL(normalise(self.axis), self.dummy_gri == direction([0, 0, 1])) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument z is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.self.geometric_representation_item.self.dim == 3 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY bounded_curve # +#################### +class bounded_curve(curve): + """Entity bounded_curve definition.""" + + def __init__( + self, + inherited0__name, + ): + curve.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY b_spline_curve # +#################### +class b_spline_curve(bounded_curve): + """Entity b_spline_curve definition. + + :param degree + :type degree:INTEGER + + :param control_points_list + :type control_points_list:LIST(2,None,'cartesian_point', scope = schema_scope) + + :param curve_form + :type curve_form:b_spline_curve_form + + :param closed_curve + :type closed_curve:LOGICAL + + :param self_intersect + :type self_intersect:LOGICAL + + :param upper_index_on_control_points + :type upper_index_on_control_points:INTEGER + + :param control_points + :type control_points:ARRAY(0,upper_index_on_control_points,'cartesian_point', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + degree, + control_points_list, + curve_form, + closed_curve, + self_intersect, + ): + bounded_curve.__init__( + self, + inherited0__name, + ) + self.degree = degree + self.control_points_list = control_points_list + self.curve_form = curve_form + self.closed_curve = closed_curve + self.self_intersect = self_intersect + + @apply + def degree(): + def fget(self): + return self._degree + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument degree is mantatory and can not be set to None") + if not check_type(value, INTEGER): + self._degree = INTEGER(value) + else: + self._degree = value + + return property(**locals()) + + @apply + def control_points_list(): + def fget(self): + return self._control_points_list + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument control_points_list is mantatory and can not be set to None" + ) + if not check_type(value, LIST(2, None, "cartesian_point", scope=schema_scope)): + self._control_points_list = LIST(value) + else: + self._control_points_list = value + + return property(**locals()) + + @apply + def curve_form(): + def fget(self): + return self._curve_form + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument curve_form is mantatory and can not be set to None") + if not check_type(value, b_spline_curve_form): + self._curve_form = b_spline_curve_form(value) + else: + self._curve_form = value + + return property(**locals()) + + @apply + def closed_curve(): + def fget(self): + return self._closed_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument closed_curve is mantatory and can not be set to None" + ) + if not check_type(value, LOGICAL): + self._closed_curve = LOGICAL(value) + else: + self._closed_curve = value + + return property(**locals()) + + @apply + def self_intersect(): + def fget(self): + return self._self_intersect + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument self_intersect is mantatory and can not be set to None" + ) + if not check_type(value, LOGICAL): + self._self_intersect = LOGICAL(value) + else: + self._self_intersect = value + + return property(**locals()) + + @apply + def upper_index_on_control_points(): + def fget(self): + attribute_eval = SIZEOF(self.control_points_list) - 1 + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument upper_index_on_control_points is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + @apply + def control_points(): + def fget(self): + attribute_eval = list_to_array( + self.control_points_list, 0, self.upper_index_on_control_points + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument control_points is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + ( + ("CONFIG_CONTROL_DESIGN.UNIFORM_CURVE" == TYPEOF(self)) + or ("CONFIG_CONTROL_DESIGN.QUASI_UNIFORM_CURVE" == TYPEOF(self)) + ) + or ("CONFIG_CONTROL_DESIGN.BEZIER_CURVE" == TYPEOF(self)) + ) or ("CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE_WITH_KNOTS" == TYPEOF(self)) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY rational_b_spline_curve # +#################### +class rational_b_spline_curve(b_spline_curve): + """Entity rational_b_spline_curve definition. + + :param weights_data + :type weights_data:LIST(2,None,'REAL', scope = schema_scope) + + :param weights + :type weights:ARRAY(0,upper_index_on_control_points,'REAL', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + weights_data, + ): + b_spline_curve.__init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ) + self.weights_data = weights_data + + @apply + def weights_data(): + def fget(self): + return self._weights_data + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument weights_data is mantatory and can not be set to None" + ) + if not check_type(value, LIST(2, None, "REAL", scope=schema_scope)): + self._weights_data = LIST(value) + else: + self._weights_data = value + + return property(**locals()) + + @apply + def weights(): + def fget(self): + attribute_eval = list_to_array(self.weights_data, 0, self.upper_index_on_control_points) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument weights is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = SIZEOF(self.weights_data) == SIZEOF( + self.self.b_spline_curve.self.control_points_list + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = curve_weights_positive(self) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY action_request_assignment # +#################### +class action_request_assignment(BaseEntityClass): + """Entity action_request_assignment definition. + + :param assigned_action_request + :type assigned_action_request:versioned_action_request + """ + + def __init__( + self, + assigned_action_request, + ): + self.assigned_action_request = assigned_action_request + + @apply + def assigned_action_request(): + def fget(self): + return self._assigned_action_request + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_action_request is mantatory and can not be set to None" + ) + if not check_type(value, versioned_action_request): + self._assigned_action_request = versioned_action_request(value) + else: + self._assigned_action_request = value + + return property(**locals()) + + +#################### +# ENTITY topological_representation_item # +#################### +class topological_representation_item(representation_item): + """Entity topological_representation_item definition.""" + + def __init__( + self, + inherited0__name, + ): + representation_item.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY face_bound # +#################### +class face_bound(topological_representation_item): + """Entity face_bound definition. + + :param bound + :type bound:loop + + :param orientation + :type orientation:BOOLEAN + """ + + def __init__( + self, + inherited0__name, + bound, + orientation, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.bound = bound + self.orientation = orientation + + @apply + def bound(): + def fget(self): + return self._bound + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument bound is mantatory and can not be set to None") + if not check_type(value, loop): + self._bound = loop(value) + else: + self._bound = value + + return property(**locals()) + + @apply + def orientation(): + def fget(self): + return self._orientation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument orientation is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._orientation = BOOLEAN(value) + else: + self._orientation = value + + return property(**locals()) + + +#################### +# ENTITY length_measure_with_unit # +#################### +class length_measure_with_unit(measure_with_unit): + """Entity length_measure_with_unit definition.""" + + def __init__( + self, + inherited0__value_component, + inherited1__unit_component, + ): + measure_with_unit.__init__( + self, + inherited0__value_component, + inherited1__unit_component, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.LENGTH_UNIT" == TYPEOF( + self.self.measure_with_unit.self.unit_component + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY dated_effectivity # +#################### +class dated_effectivity(effectivity): + """Entity dated_effectivity definition. + + :param effectivity_start_date + :type effectivity_start_date:date_and_time + + :param effectivity_end_date + :type effectivity_end_date:date_and_time + """ + + def __init__( + self, + inherited0__id, + effectivity_start_date, + effectivity_end_date, + ): + effectivity.__init__( + self, + inherited0__id, + ) + self.effectivity_start_date = effectivity_start_date + self.effectivity_end_date = effectivity_end_date + + @apply + def effectivity_start_date(): + def fget(self): + return self._effectivity_start_date + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument effectivity_start_date is mantatory and can not be set to None" + ) + if not check_type(value, date_and_time): + self._effectivity_start_date = date_and_time(value) + else: + self._effectivity_start_date = value + + return property(**locals()) + + @apply + def effectivity_end_date(): + def fget(self): + return self._effectivity_end_date + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, date_and_time): + self._effectivity_end_date = date_and_time(value) + else: + self._effectivity_end_date = value + else: + self._effectivity_end_date = value + + return property(**locals()) + + +#################### +# ENTITY direction # +#################### +class direction(geometric_representation_item): + """Entity direction definition. + + :param direction_ratios + :type direction_ratios:LIST(2,3,'REAL', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + direction_ratios, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + self.direction_ratios = direction_ratios + + @apply + def direction_ratios(): + def fget(self): + return self._direction_ratios + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument direction_ratios is mantatory and can not be set to None" + ) + if not check_type(value, LIST(2, 3, "REAL", scope=schema_scope)): + self._direction_ratios = LIST(value) + else: + self._direction_ratios = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY next_assembly_usage_occurrence # +#################### +class next_assembly_usage_occurrence(assembly_component_usage): + """Entity next_assembly_usage_occurrence definition.""" + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + ): + assembly_component_usage.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + ) + + +#################### +# ENTITY edge # +#################### +class edge(topological_representation_item): + """Entity edge definition. + + :param edge_start + :type edge_start:vertex + + :param edge_end + :type edge_end:vertex + """ + + def __init__( + self, + inherited0__name, + edge_start, + edge_end, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.edge_start = edge_start + self.edge_end = edge_end + + @apply + def edge_start(): + def fget(self): + return self._edge_start + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument edge_start is mantatory and can not be set to None") + if not check_type(value, vertex): + self._edge_start = vertex(value) + else: + self._edge_start = value + + return property(**locals()) + + @apply + def edge_end(): + def fget(self): + return self._edge_end + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument edge_end is mantatory and can not be set to None") + if not check_type(value, vertex): + self._edge_end = vertex(value) + else: + self._edge_end = value + + return property(**locals()) + + +#################### +# ENTITY oriented_edge # +#################### +class oriented_edge(edge): + """Entity oriented_edge definition. + + :param edge_element + :type edge_element:edge + + :param orientation + :type orientation:BOOLEAN + + :param edge_edge_start + :type edge_edge_start:vertex + + :param edge_edge_end + :type edge_edge_end:vertex + """ + + def __init__( + self, + inherited0__name, + inherited1__edge_start, + inherited2__edge_end, + edge_element, + orientation, + ): + edge.__init__( + self, + inherited0__name, + inherited1__edge_start, + inherited2__edge_end, + ) + self.edge_element = edge_element + self.orientation = orientation + + @apply + def edge_element(): + def fget(self): + return self._edge_element + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument edge_element is mantatory and can not be set to None" + ) + if not check_type(value, edge): + self._edge_element = edge(value) + else: + self._edge_element = value + + return property(**locals()) + + @apply + def orientation(): + def fget(self): + return self._orientation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument orientation is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._orientation = BOOLEAN(value) + else: + self._orientation = value + + return property(**locals()) + + @apply + def edge_edge_start(): + def fget(self): + attribute_eval = boolean_choose( + self.self.orientation, + self.self.edge_element.self.edge_start, + self.self.edge_element.self.edge_end, + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument edge_edge_start is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + @apply + def edge_edge_end(): + def fget(self): + attribute_eval = boolean_choose( + self.self.orientation, + self.self.edge_element.self.edge_end, + self.self.edge_element.self.edge_start, + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument edge_edge_end is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not ("CONFIG_CONTROL_DESIGN.ORIENTED_EDGE" == TYPEOF(self.self.edge_element)) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY person # +#################### +class person(BaseEntityClass): + """Entity person definition. + + :param id + :type id:identifier + + :param last_name + :type last_name:label + + :param first_name + :type first_name:label + + :param middle_names + :type middle_names:LIST(1,None,'STRING', scope = schema_scope) + + :param prefix_titles + :type prefix_titles:LIST(1,None,'STRING', scope = schema_scope) + + :param suffix_titles + :type suffix_titles:LIST(1,None,'STRING', scope = schema_scope) + """ + + def __init__( + self, + id, + last_name, + first_name, + middle_names, + prefix_titles, + suffix_titles, + ): + self.id = id + self.last_name = last_name + self.first_name = first_name + self.middle_names = middle_names + self.prefix_titles = prefix_titles + self.suffix_titles = suffix_titles + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def last_name(): + def fget(self): + return self._last_name + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._last_name = label(value) + else: + self._last_name = value + else: + self._last_name = value + + return property(**locals()) + + @apply + def first_name(): + def fget(self): + return self._first_name + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._first_name = label(value) + else: + self._first_name = value + else: + self._first_name = value + + return property(**locals()) + + @apply + def middle_names(): + def fget(self): + return self._middle_names + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, LIST(1, None, "STRING", scope=schema_scope)): + self._middle_names = LIST(value) + else: + self._middle_names = value + else: + self._middle_names = value + + return property(**locals()) + + @apply + def prefix_titles(): + def fget(self): + return self._prefix_titles + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, LIST(1, None, "STRING", scope=schema_scope)): + self._prefix_titles = LIST(value) + else: + self._prefix_titles = value + else: + self._prefix_titles = value + + return property(**locals()) + + @apply + def suffix_titles(): + def fget(self): + return self._suffix_titles + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, LIST(1, None, "STRING", scope=schema_scope)): + self._suffix_titles = LIST(value) + else: + self._suffix_titles = value + else: + self._suffix_titles = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = EXISTS(self.last_name) or EXISTS(self.first_name) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY document # +#################### +class document(BaseEntityClass): + """Entity document definition. + + :param id + :type id:identifier + + :param name + :type name:label + + :param description + :type description:text + + :param kind + :type kind:document_type + """ + + def __init__( + self, + id, + name, + description, + kind, + ): + self.id = id + self.name = name + self.description = description + self.kind = kind + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def kind(): + def fget(self): + return self._kind + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument kind is mantatory and can not be set to None") + if not check_type(value, document_type): + self._kind = document_type(value) + else: + self._kind = value + + return property(**locals()) + + +#################### +# ENTITY document_with_class # +#################### +class document_with_class(document): + """Entity document_with_class definition. + + :param class_ + :type class_:identifier + """ + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__kind, + class_, + ): + document.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__kind, + ) + self.class_ = class_ + + @apply + def class_(): + def fget(self): + return self._class_ + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument class_ is mantatory and can not be set to None") + if not check_type(value, identifier): + self._class_ = identifier(value) + else: + self._class_ = value + + return property(**locals()) + + +#################### +# ENTITY conversion_based_unit # +#################### +class conversion_based_unit(named_unit): + """Entity conversion_based_unit definition. + + :param name + :type name:label + + :param conversion_factor + :type conversion_factor:measure_with_unit + """ + + def __init__( + self, + inherited0__dimensions, + name, + conversion_factor, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + self.name = name + self.conversion_factor = conversion_factor + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def conversion_factor(): + def fget(self): + return self._conversion_factor + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument conversion_factor is mantatory and can not be set to None" + ) + if not check_type(value, measure_with_unit): + self._conversion_factor = measure_with_unit(value) + else: + self._conversion_factor = value + + return property(**locals()) + + +#################### +# ENTITY point # +#################### +class point(geometric_representation_item): + """Entity point definition.""" + + def __init__( + self, + inherited0__name, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY point_on_surface # +#################### +class point_on_surface(point): + """Entity point_on_surface definition. + + :param basis_surface + :type basis_surface:surface + + :param point_parameter_u + :type point_parameter_u:parameter_value + + :param point_parameter_v + :type point_parameter_v:parameter_value + """ + + def __init__( + self, + inherited0__name, + basis_surface, + point_parameter_u, + point_parameter_v, + ): + point.__init__( + self, + inherited0__name, + ) + self.basis_surface = basis_surface + self.point_parameter_u = point_parameter_u + self.point_parameter_v = point_parameter_v + + @apply + def basis_surface(): + def fget(self): + return self._basis_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument basis_surface is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._basis_surface = surface(value) + else: + self._basis_surface = value + + return property(**locals()) + + @apply + def point_parameter_u(): + def fget(self): + return self._point_parameter_u + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument point_parameter_u is mantatory and can not be set to None" + ) + if not check_type(value, parameter_value): + self._point_parameter_u = parameter_value(value) + else: + self._point_parameter_u = value + + return property(**locals()) + + @apply + def point_parameter_v(): + def fget(self): + return self._point_parameter_v + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument point_parameter_v is mantatory and can not be set to None" + ) + if not check_type(value, parameter_value): + self._point_parameter_v = parameter_value(value) + else: + self._point_parameter_v = value + + return property(**locals()) + + +#################### +# ENTITY product_definition_formation # +#################### +class product_definition_formation(BaseEntityClass): + """Entity product_definition_formation definition. + + :param id + :type id:identifier + + :param description + :type description:text + + :param of_product + :type of_product:product + """ + + def __init__( + self, + id, + description, + of_product, + ): + self.id = id + self.description = description + self.of_product = of_product + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def of_product(): + def fget(self): + return self._of_product + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument of_product is mantatory and can not be set to None") + if not check_type(value, product): + self._of_product = product(value) + else: + self._of_product = value + + return property(**locals()) + + +#################### +# ENTITY person_and_organization_assignment # +#################### +class person_and_organization_assignment(BaseEntityClass): + """Entity person_and_organization_assignment definition. + + :param assigned_person_and_organization + :type assigned_person_and_organization:person_and_organization + + :param role + :type role:person_and_organization_role + """ + + def __init__( + self, + assigned_person_and_organization, + role, + ): + self.assigned_person_and_organization = assigned_person_and_organization + self.role = role + + @apply + def assigned_person_and_organization(): + def fget(self): + return self._assigned_person_and_organization + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_person_and_organization is mantatory and can not be set to None" + ) + if not check_type(value, person_and_organization): + self._assigned_person_and_organization = person_and_organization(value) + else: + self._assigned_person_and_organization = value + + return property(**locals()) + + @apply + def role(): + def fget(self): + return self._role + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument role is mantatory and can not be set to None") + if not check_type(value, person_and_organization_role): + self._role = person_and_organization_role(value) + else: + self._role = value + + return property(**locals()) + + +#################### +# ENTITY cc_design_person_and_organization_assignment # +#################### +class cc_design_person_and_organization_assignment(person_and_organization_assignment): + """Entity cc_design_person_and_organization_assignment definition. + + :param items + :type items:SET(1,None,'person_organization_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_person_and_organization, + inherited1__role, + items, + ): + person_and_organization_assignment.__init__( + self, + inherited0__assigned_person_and_organization, + inherited1__role, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "person_organization_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = cc_design_person_and_organization_correlation(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY offset_curve_3d # +#################### +class offset_curve_3d(curve): + """Entity offset_curve_3d definition. + + :param basis_curve + :type basis_curve:curve + + :param distance + :type distance:length_measure + + :param self_intersect + :type self_intersect:LOGICAL + + :param ref_direction + :type ref_direction:direction + """ + + def __init__( + self, + inherited0__name, + basis_curve, + distance, + self_intersect, + ref_direction, + ): + curve.__init__( + self, + inherited0__name, + ) + self.basis_curve = basis_curve + self.distance = distance + self.self_intersect = self_intersect + self.ref_direction = ref_direction + + @apply + def basis_curve(): + def fget(self): + return self._basis_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument basis_curve is mantatory and can not be set to None") + if not check_type(value, curve): + self._basis_curve = curve(value) + else: + self._basis_curve = value + + return property(**locals()) + + @apply + def distance(): + def fget(self): + return self._distance + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument distance is mantatory and can not be set to None") + if not check_type(value, length_measure): + self._distance = length_measure(value) + else: + self._distance = value + + return property(**locals()) + + @apply + def self_intersect(): + def fget(self): + return self._self_intersect + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument self_intersect is mantatory and can not be set to None" + ) + if not check_type(value, LOGICAL): + self._self_intersect = LOGICAL(value) + else: + self._self_intersect = value + + return property(**locals()) + + @apply + def ref_direction(): + def fget(self): + return self._ref_direction + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument ref_direction is mantatory and can not be set to None" + ) + if not check_type(value, direction): + self._ref_direction = direction(value) + else: + self._ref_direction = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = (self.basis_curve.self.dim == 3) and (self.ref_direction.self.dim == 3) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY approval # +#################### +class approval(BaseEntityClass): + """Entity approval definition. + + :param status + :type status:approval_status + + :param level + :type level:label + """ + + def __init__( + self, + status, + level, + ): + self.status = status + self.level = level + + @apply + def status(): + def fget(self): + return self._status + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument status is mantatory and can not be set to None") + if not check_type(value, approval_status): + self._status = approval_status(value) + else: + self._status = value + + return property(**locals()) + + @apply + def level(): + def fget(self): + return self._level + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument level is mantatory and can not be set to None") + if not check_type(value, label): + self._level = label(value) + else: + self._level = value + + return property(**locals()) + + +#################### +# ENTITY composite_curve # +#################### +class composite_curve(bounded_curve): + """Entity composite_curve definition. + + :param segments + :type segments:LIST(1,None,'composite_curve_segment', scope = schema_scope) + + :param self_intersect + :type self_intersect:LOGICAL + + :param n_segments + :type n_segments:INTEGER + + :param closed_curve + :type closed_curve:LOGICAL + """ + + def __init__( + self, + inherited0__name, + segments, + self_intersect, + ): + bounded_curve.__init__( + self, + inherited0__name, + ) + self.segments = segments + self.self_intersect = self_intersect + + @apply + def segments(): + def fget(self): + return self._segments + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument segments is mantatory and can not be set to None") + if not check_type(value, LIST(1, None, "composite_curve_segment", scope=schema_scope)): + self._segments = LIST(value) + else: + self._segments = value + + return property(**locals()) + + @apply + def self_intersect(): + def fget(self): + return self._self_intersect + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument self_intersect is mantatory and can not be set to None" + ) + if not check_type(value, LOGICAL): + self._self_intersect = LOGICAL(value) + else: + self._self_intersect = value + + return property(**locals()) + + @apply + def n_segments(): + def fget(self): + attribute_eval = SIZEOF(self.segments) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument n_segments is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + @apply + def closed_curve(): + def fget(self): + attribute_eval = self.segments[self.n_segments].self.transition != discontinuous + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument closed_curve is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ((not self.closed_curve) and (SIZEOF(None) == 1)) or ( + self.closed_curve and (SIZEOF(None) == 0) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY composite_curve_on_surface # +#################### +class composite_curve_on_surface(composite_curve): + """Entity composite_curve_on_surface definition. + + :param basis_surface + :type basis_surface:SET(0,2,'surface', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__segments, + inherited2__self_intersect, + ): + composite_curve.__init__( + self, + inherited0__name, + inherited1__segments, + inherited2__self_intersect, + ) + + @apply + def basis_surface(): + def fget(self): + attribute_eval = get_basis_surface(self) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument basis_surface is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = SIZEOF(self.basis_surface) > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = constraints_composite_curve_on_surface(self) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY boundary_curve # +#################### +class boundary_curve(composite_curve_on_surface): + """Entity boundary_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__segments, + inherited2__self_intersect, + ): + composite_curve_on_surface.__init__( + self, + inherited0__name, + inherited1__segments, + inherited2__self_intersect, + ) + + def wr1(self): + eval_wr1_wr = self.self.composite_curve.self.closed_curve + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY representation_context # +#################### +class representation_context(BaseEntityClass): + """Entity representation_context definition. + + :param context_identifier + :type context_identifier:identifier + + :param context_type + :type context_type:text + + :param representations_in_context + :type representations_in_context:SET(1,None,'representation', scope = schema_scope) + """ + + def __init__( + self, + context_identifier, + context_type, + ): + self.context_identifier = context_identifier + self.context_type = context_type + + @apply + def context_identifier(): + def fget(self): + return self._context_identifier + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument context_identifier is mantatory and can not be set to None" + ) + if not check_type(value, identifier): + self._context_identifier = identifier(value) + else: + self._context_identifier = value + + return property(**locals()) + + @apply + def context_type(): + def fget(self): + return self._context_type + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument context_type is mantatory and can not be set to None" + ) + if not check_type(value, text): + self._context_type = text(value) + else: + self._context_type = value + + return property(**locals()) + + @apply + def representations_in_context(): + def fget(self): + return self._representations_in_context + + def fset(self, value): + # INVERSE argument + raise AssertionError( + "Argument representations_in_context is INVERSE. It is computed and can not be set to any value" + ) + + return property(**locals()) + + +#################### +# ENTITY geometric_representation_context # +#################### +class geometric_representation_context(representation_context): + """Entity geometric_representation_context definition. + + :param coordinate_space_dimension + :type coordinate_space_dimension:dimension_count + """ + + def __init__( + self, + inherited0__context_identifier, + inherited1__context_type, + coordinate_space_dimension, + ): + representation_context.__init__( + self, + inherited0__context_identifier, + inherited1__context_type, + ) + self.coordinate_space_dimension = coordinate_space_dimension + + @apply + def coordinate_space_dimension(): + def fget(self): + return self._coordinate_space_dimension + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument coordinate_space_dimension is mantatory and can not be set to None" + ) + if not check_type(value, dimension_count): + self._coordinate_space_dimension = dimension_count(value) + else: + self._coordinate_space_dimension = value + + return property(**locals()) + + +#################### +# ENTITY action_status # +#################### +class action_status(BaseEntityClass): + """Entity action_status definition. + + :param status + :type status:label + + :param assigned_action + :type assigned_action:executed_action + """ + + def __init__( + self, + status, + assigned_action, + ): + self.status = status + self.assigned_action = assigned_action + + @apply + def status(): + def fget(self): + return self._status + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument status is mantatory and can not be set to None") + if not check_type(value, label): + self._status = label(value) + else: + self._status = value + + return property(**locals()) + + @apply + def assigned_action(): + def fget(self): + return self._assigned_action + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_action is mantatory and can not be set to None" + ) + if not check_type(value, executed_action): + self._assigned_action = executed_action(value) + else: + self._assigned_action = value + + return property(**locals()) + + +#################### +# ENTITY application_context # +#################### +class application_context(BaseEntityClass): + """Entity application_context definition. + + :param application + :type application:text + + :param context_elements + :type context_elements:SET(1,None,'application_context_element', scope = schema_scope) + """ + + def __init__( + self, + application, + ): + self.application = application + + @apply + def application(): + def fget(self): + return self._application + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument application is mantatory and can not be set to None") + if not check_type(value, text): + self._application = text(value) + else: + self._application = value + + return property(**locals()) + + @apply + def context_elements(): + def fget(self): + return self._context_elements + + def fset(self, value): + # INVERSE argument + raise AssertionError( + "Argument context_elements is INVERSE. It is computed and can not be set to any value" + ) + + return property(**locals()) + + +#################### +# ENTITY change_request # +#################### +class change_request(action_request_assignment): + """Entity change_request definition. + + :param items + :type items:SET(1,None,'change_request_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_action_request, + items, + ): + action_request_assignment.__init__( + self, + inherited0__assigned_action_request, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "change_request_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY date_and_time # +#################### +class date_and_time(BaseEntityClass): + """Entity date_and_time definition. + + :param date_component + :type date_component:date + + :param time_component + :type time_component:local_time + """ + + def __init__( + self, + date_component, + time_component, + ): + self.date_component = date_component + self.time_component = time_component + + @apply + def date_component(): + def fget(self): + return self._date_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument date_component is mantatory and can not be set to None" + ) + if not check_type(value, date): + self._date_component = date(value) + else: + self._date_component = value + + return property(**locals()) + + @apply + def time_component(): + def fget(self): + return self._time_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument time_component is mantatory and can not be set to None" + ) + if not check_type(value, local_time): + self._time_component = local_time(value) + else: + self._time_component = value + + return property(**locals()) + + +#################### +# ENTITY approval_date_time # +#################### +class approval_date_time(BaseEntityClass): + """Entity approval_date_time definition. + + :param date_time + :type date_time:date_time_select + + :param dated_approval + :type dated_approval:approval + """ + + def __init__( + self, + date_time, + dated_approval, + ): + self.date_time = date_time + self.dated_approval = dated_approval + + @apply + def date_time(): + def fget(self): + return self._date_time + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument date_time is mantatory and can not be set to None") + if not check_type(value, date_time_select): + self._date_time = date_time_select(value) + else: + self._date_time = value + + return property(**locals()) + + @apply + def dated_approval(): + def fget(self): + return self._dated_approval + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument dated_approval is mantatory and can not be set to None" + ) + if not check_type(value, approval): + self._dated_approval = approval(value) + else: + self._dated_approval = value + + return property(**locals()) + + +#################### +# ENTITY approval_role # +#################### +class approval_role(BaseEntityClass): + """Entity approval_role definition. + + :param role + :type role:label + """ + + def __init__( + self, + role, + ): + self.role = role + + @apply + def role(): + def fget(self): + return self._role + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument role is mantatory and can not be set to None") + if not check_type(value, label): + self._role = label(value) + else: + self._role = value + + return property(**locals()) + + +#################### +# ENTITY application_context_element # +#################### +class application_context_element(BaseEntityClass): + """Entity application_context_element definition. + + :param name + :type name:label + + :param frame_of_reference + :type frame_of_reference:application_context + """ + + def __init__( + self, + name, + frame_of_reference, + ): + self.name = name + self.frame_of_reference = frame_of_reference + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def frame_of_reference(): + def fget(self): + return self._frame_of_reference + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument frame_of_reference is mantatory and can not be set to None" + ) + if not check_type(value, application_context): + self._frame_of_reference = application_context(value) + else: + self._frame_of_reference = value + + return property(**locals()) + + +#################### +# ENTITY product_context # +#################### +class product_context(application_context_element): + """Entity product_context definition. + + :param discipline_type + :type discipline_type:label + """ + + def __init__( + self, + inherited0__name, + inherited1__frame_of_reference, + discipline_type, + ): + application_context_element.__init__( + self, + inherited0__name, + inherited1__frame_of_reference, + ) + self.discipline_type = discipline_type + + @apply + def discipline_type(): + def fget(self): + return self._discipline_type + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument discipline_type is mantatory and can not be set to None" + ) + if not check_type(value, label): + self._discipline_type = label(value) + else: + self._discipline_type = value + + return property(**locals()) + + +#################### +# ENTITY elementary_surface # +#################### +class elementary_surface(surface): + """Entity elementary_surface definition. + + :param position + :type position:axis2_placement_3d + """ + + def __init__( + self, + inherited0__name, + position, + ): + surface.__init__( + self, + inherited0__name, + ) + self.position = position + + @apply + def position(): + def fget(self): + return self._position + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument position is mantatory and can not be set to None") + if not check_type(value, axis2_placement_3d): + self._position = axis2_placement_3d(value) + else: + self._position = value + + return property(**locals()) + + +#################### +# ENTITY spherical_surface # +#################### +class spherical_surface(elementary_surface): + """Entity spherical_surface definition. + + :param radius + :type radius:positive_length_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + radius, + ): + elementary_surface.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.radius = radius + + @apply + def radius(): + def fget(self): + return self._radius + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument radius is mantatory and can not be set to None") + if not check_type(value, positive_length_measure): + self._radius = positive_length_measure(value) + else: + self._radius = value + + return property(**locals()) + + +#################### +# ENTITY application_protocol_definition # +#################### +class application_protocol_definition(BaseEntityClass): + """Entity application_protocol_definition definition. + + :param status + :type status:label + + :param application_interpreted_model_schema_name + :type application_interpreted_model_schema_name:label + + :param application_protocol_year + :type application_protocol_year:year_number + + :param application + :type application:application_context + """ + + def __init__( + self, + status, + application_interpreted_model_schema_name, + application_protocol_year, + application, + ): + self.status = status + self.application_interpreted_model_schema_name = application_interpreted_model_schema_name + self.application_protocol_year = application_protocol_year + self.application = application + + @apply + def status(): + def fget(self): + return self._status + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument status is mantatory and can not be set to None") + if not check_type(value, label): + self._status = label(value) + else: + self._status = value + + return property(**locals()) + + @apply + def application_interpreted_model_schema_name(): + def fget(self): + return self._application_interpreted_model_schema_name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument application_interpreted_model_schema_name is mantatory and can not be set to None" + ) + if not check_type(value, label): + self._application_interpreted_model_schema_name = label(value) + else: + self._application_interpreted_model_schema_name = value + + return property(**locals()) + + @apply + def application_protocol_year(): + def fget(self): + return self._application_protocol_year + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument application_protocol_year is mantatory and can not be set to None" + ) + if not check_type(value, year_number): + self._application_protocol_year = year_number(value) + else: + self._application_protocol_year = value + + return property(**locals()) + + @apply + def application(): + def fget(self): + return self._application + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument application is mantatory and can not be set to None") + if not check_type(value, application_context): + self._application = application_context(value) + else: + self._application = value + + return property(**locals()) + + +#################### +# ENTITY specified_higher_usage_occurrence # +#################### +class specified_higher_usage_occurrence(assembly_component_usage): + """Entity specified_higher_usage_occurrence definition. + + :param upper_usage + :type upper_usage:assembly_component_usage + + :param next_usage + :type next_usage:next_assembly_usage_occurrence + """ + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + upper_usage, + next_usage, + ): + assembly_component_usage.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + ) + self.upper_usage = upper_usage + self.next_usage = next_usage + + @apply + def upper_usage(): + def fget(self): + return self._upper_usage + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument upper_usage is mantatory and can not be set to None") + if not check_type(value, assembly_component_usage): + self._upper_usage = assembly_component_usage(value) + else: + self._upper_usage = value + + return property(**locals()) + + @apply + def next_usage(): + def fget(self): + return self._next_usage + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument next_usage is mantatory and can not be set to None") + if not check_type(value, next_assembly_usage_occurrence): + self._next_usage = next_assembly_usage_occurrence(value) + else: + self._next_usage = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self != self.upper_usage + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = ( + self.self.product_definition_relationship.self.relating_product_definition + == self.upper_usage.self.relating_product_definition + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = ( + self.self.product_definition_relationship.self.related_product_definition + == self.next_usage.self.related_product_definition + ) + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = ( + self.upper_usage.self.related_product_definition + == self.next_usage.self.relating_product_definition + ) + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = not ( + "CONFIG_CONTROL_DESIGN.PROMISSORY_USAGE_OCCURRENCE" == TYPEOF(self.upper_usage) + ) + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + +#################### +# ENTITY product_definition_formation_with_specified_source # +#################### +class product_definition_formation_with_specified_source(product_definition_formation): + """Entity product_definition_formation_with_specified_source definition. + + :param make_or_buy + :type make_or_buy:source + """ + + def __init__( + self, + inherited0__id, + inherited1__description, + inherited2__of_product, + make_or_buy, + ): + product_definition_formation.__init__( + self, + inherited0__id, + inherited1__description, + inherited2__of_product, + ) + self.make_or_buy = make_or_buy + + @apply + def make_or_buy(): + def fget(self): + return self._make_or_buy + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument make_or_buy is mantatory and can not be set to None") + if not check_type(value, source): + self._make_or_buy = source(value) + else: + self._make_or_buy = value + + return property(**locals()) + + +#################### +# ENTITY action_request_solution # +#################### +class action_request_solution(BaseEntityClass): + """Entity action_request_solution definition. + + :param method + :type method:action_method + + :param request + :type request:versioned_action_request + """ + + def __init__( + self, + method, + request, + ): + self.method = method + self.request = request + + @apply + def method(): + def fget(self): + return self._method + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument method is mantatory and can not be set to None") + if not check_type(value, action_method): + self._method = action_method(value) + else: + self._method = value + + return property(**locals()) + + @apply + def request(): + def fget(self): + return self._request + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument request is mantatory and can not be set to None") + if not check_type(value, versioned_action_request): + self._request = versioned_action_request(value) + else: + self._request = value + + return property(**locals()) + + +#################### +# ENTITY uncertainty_measure_with_unit # +#################### +class uncertainty_measure_with_unit(measure_with_unit): + """Entity uncertainty_measure_with_unit definition. + + :param name + :type name:label + + :param description + :type description:text + """ + + def __init__( + self, + inherited0__value_component, + inherited1__unit_component, + name, + description, + ): + measure_with_unit.__init__( + self, + inherited0__value_component, + inherited1__unit_component, + ) + self.name = name + self.description = description + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = valid_measure_value(self.self.measure_with_unit.self.value_component) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY edge_based_wireframe_model # +#################### +class edge_based_wireframe_model(geometric_representation_item): + """Entity edge_based_wireframe_model definition. + + :param ebwm_boundary + :type ebwm_boundary:SET(1,None,'connected_edge_set', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + ebwm_boundary, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + self.ebwm_boundary = ebwm_boundary + + @apply + def ebwm_boundary(): + def fget(self): + return self._ebwm_boundary + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument ebwm_boundary is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "connected_edge_set", scope=schema_scope)): + self._ebwm_boundary = SET(value) + else: + self._ebwm_boundary = value + + return property(**locals()) + + +#################### +# ENTITY path # +#################### +class path(topological_representation_item): + """Entity path definition. + + :param edge_list + :type edge_list:LIST(1,None,'oriented_edge', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + edge_list, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.edge_list = edge_list + + @apply + def edge_list(): + def fget(self): + return self._edge_list + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument edge_list is mantatory and can not be set to None") + if not check_type(value, LIST(1, None, "oriented_edge", scope=schema_scope)): + self._edge_list = LIST(value) + else: + self._edge_list = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = path_head_to_tail(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY connected_face_set # +#################### +class connected_face_set(topological_representation_item): + """Entity connected_face_set definition. + + :param cfs_faces + :type cfs_faces:SET(1,None,'face', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + cfs_faces, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.cfs_faces = cfs_faces + + @apply + def cfs_faces(): + def fget(self): + return self._cfs_faces + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument cfs_faces is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "face", scope=schema_scope)): + self._cfs_faces = SET(value) + else: + self._cfs_faces = value + + return property(**locals()) + + +#################### +# ENTITY open_shell # +#################### +class open_shell(connected_face_set): + """Entity open_shell definition.""" + + def __init__( + self, + inherited0__name, + inherited1__cfs_faces, + ): + connected_face_set.__init__( + self, + inherited0__name, + inherited1__cfs_faces, + ) + + +#################### +# ENTITY oriented_open_shell # +#################### +class oriented_open_shell(open_shell): + """Entity oriented_open_shell definition. + + :param open_shell_element + :type open_shell_element:open_shell + + :param orientation + :type orientation:BOOLEAN + + :param connected_face_set_cfs_faces + :type connected_face_set_cfs_faces:SET(1,None,'face', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__cfs_faces, + open_shell_element, + orientation, + ): + open_shell.__init__( + self, + inherited0__name, + inherited1__cfs_faces, + ) + self.open_shell_element = open_shell_element + self.orientation = orientation + + @apply + def open_shell_element(): + def fget(self): + return self._open_shell_element + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument open_shell_element is mantatory and can not be set to None" + ) + if not check_type(value, open_shell): + self._open_shell_element = open_shell(value) + else: + self._open_shell_element = value + + return property(**locals()) + + @apply + def orientation(): + def fget(self): + return self._orientation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument orientation is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._orientation = BOOLEAN(value) + else: + self._orientation = value + + return property(**locals()) + + @apply + def connected_face_set_cfs_faces(): + def fget(self): + attribute_eval = conditional_reverse( + self.self.orientation, self.self.open_shell_element.self.cfs_faces + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument connected_face_set_cfs_faces is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not ( + "CONFIG_CONTROL_DESIGN.ORIENTED_OPEN_SHELL" == TYPEOF(self.self.open_shell_element) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY solid_angle_unit # +#################### +class solid_angle_unit(named_unit): + """Entity solid_angle_unit definition.""" + + def __init__( + self, + inherited0__dimensions, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + + def wr1(self): + eval_wr1_wr = ( + ( + ( + ( + ( + (self.self.named_unit.self.dimensions.self.length_exponent == 0) + and (self.self.named_unit.self.dimensions.self.mass_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.time_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0) + ) + and ( + self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent + == 0 + ) + ) + and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0) + ) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY coordinated_universal_time_offset # +#################### +class coordinated_universal_time_offset(BaseEntityClass): + """Entity coordinated_universal_time_offset definition. + + :param hour_offset + :type hour_offset:hour_in_day + + :param minute_offset + :type minute_offset:minute_in_hour + + :param sense + :type sense:ahead_or_behind + """ + + def __init__( + self, + hour_offset, + minute_offset, + sense, + ): + self.hour_offset = hour_offset + self.minute_offset = minute_offset + self.sense = sense + + @apply + def hour_offset(): + def fget(self): + return self._hour_offset + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument hour_offset is mantatory and can not be set to None") + if not check_type(value, hour_in_day): + self._hour_offset = hour_in_day(value) + else: + self._hour_offset = value + + return property(**locals()) + + @apply + def minute_offset(): + def fget(self): + return self._minute_offset + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, minute_in_hour): + self._minute_offset = minute_in_hour(value) + else: + self._minute_offset = value + else: + self._minute_offset = value + + return property(**locals()) + + @apply + def sense(): + def fget(self): + return self._sense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument sense is mantatory and can not be set to None") + if not check_type(value, ahead_or_behind): + self._sense = ahead_or_behind(value) + else: + self._sense = value + + return property(**locals()) + + +#################### +# ENTITY curve_replica # +#################### +class curve_replica(curve): + """Entity curve_replica definition. + + :param parent_curve + :type parent_curve:curve + + :param transformation + :type transformation:cartesian_transformation_operator + """ + + def __init__( + self, + inherited0__name, + parent_curve, + transformation, + ): + curve.__init__( + self, + inherited0__name, + ) + self.parent_curve = parent_curve + self.transformation = transformation + + @apply + def parent_curve(): + def fget(self): + return self._parent_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument parent_curve is mantatory and can not be set to None" + ) + if not check_type(value, curve): + self._parent_curve = curve(value) + else: + self._parent_curve = value + + return property(**locals()) + + @apply + def transformation(): + def fget(self): + return self._transformation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument transformation is mantatory and can not be set to None" + ) + if not check_type(value, cartesian_transformation_operator): + self._transformation = cartesian_transformation_operator(value) + else: + self._transformation = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.transformation.self.dim == self.parent_curve.self.dim + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = acyclic_curve_replica(self, self.parent_curve) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY quasi_uniform_surface # +#################### +class quasi_uniform_surface(b_spline_surface): + """Entity quasi_uniform_surface definition.""" + + def __init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ): + b_spline_surface.__init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ) + + +#################### +# ENTITY surface_curve # +#################### +class surface_curve(curve): + """Entity surface_curve definition. + + :param curve_3d + :type curve_3d:curve + + :param associated_geometry + :type associated_geometry:LIST(1,2,'pcurve_or_surface', scope = schema_scope) + + :param master_representation + :type master_representation:preferred_surface_curve_representation + + :param basis_surface + :type basis_surface:SET(1,2,'surface', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + curve_3d, + associated_geometry, + master_representation, + ): + curve.__init__( + self, + inherited0__name, + ) + self.curve_3d = curve_3d + self.associated_geometry = associated_geometry + self.master_representation = master_representation + + @apply + def curve_3d(): + def fget(self): + return self._curve_3d + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument curve_3d is mantatory and can not be set to None") + if not check_type(value, curve): + self._curve_3d = curve(value) + else: + self._curve_3d = value + + return property(**locals()) + + @apply + def associated_geometry(): + def fget(self): + return self._associated_geometry + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument associated_geometry is mantatory and can not be set to None" + ) + if not check_type(value, LIST(1, 2, "pcurve_or_surface", scope=schema_scope)): + self._associated_geometry = LIST(value) + else: + self._associated_geometry = value + + return property(**locals()) + + @apply + def master_representation(): + def fget(self): + return self._master_representation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument master_representation is mantatory and can not be set to None" + ) + if not check_type(value, preferred_surface_curve_representation): + self._master_representation = preferred_surface_curve_representation(value) + else: + self._master_representation = value + + return property(**locals()) + + @apply + def basis_surface(): + def fget(self): + attribute_eval = get_basis_surface(self) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument basis_surface is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.curve_3d.self.dim == 3 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = ("CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF(self.associated_geometry[1])) or ( + self.master_representation != pcurve_s1 + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = ("CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF(self.associated_geometry[2])) or ( + self.master_representation != pcurve_s2 + ) + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = not ("CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF(self.curve_3d)) + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + +#################### +# ENTITY action_request_status # +#################### +class action_request_status(BaseEntityClass): + """Entity action_request_status definition. + + :param status + :type status:label + + :param assigned_request + :type assigned_request:versioned_action_request + """ + + def __init__( + self, + status, + assigned_request, + ): + self.status = status + self.assigned_request = assigned_request + + @apply + def status(): + def fget(self): + return self._status + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument status is mantatory and can not be set to None") + if not check_type(value, label): + self._status = label(value) + else: + self._status = value + + return property(**locals()) + + @apply + def assigned_request(): + def fget(self): + return self._assigned_request + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_request is mantatory and can not be set to None" + ) + if not check_type(value, versioned_action_request): + self._assigned_request = versioned_action_request(value) + else: + self._assigned_request = value + + return property(**locals()) + + +#################### +# ENTITY founded_item # +#################### +class founded_item(BaseEntityClass): + """Entity founded_item definition.""" + + # This class does not define any attribute. + pass + + +#################### +# ENTITY composite_curve_segment # +#################### +class composite_curve_segment(founded_item): + """Entity composite_curve_segment definition. + + :param transition + :type transition:transition_code + + :param same_sense + :type same_sense:BOOLEAN + + :param parent_curve + :type parent_curve:curve + + :param using_curves + :type using_curves:BAG(1,None,'composite_curve', scope = schema_scope) + """ + + def __init__( + self, + transition, + same_sense, + parent_curve, + ): + founded_item.__init__( + self, + ) + self.transition = transition + self.same_sense = same_sense + self.parent_curve = parent_curve + + @apply + def transition(): + def fget(self): + return self._transition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument transition is mantatory and can not be set to None") + if not check_type(value, transition_code): + self._transition = transition_code(value) + else: + self._transition = value + + return property(**locals()) + + @apply + def same_sense(): + def fget(self): + return self._same_sense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument same_sense is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._same_sense = BOOLEAN(value) + else: + self._same_sense = value + + return property(**locals()) + + @apply + def parent_curve(): + def fget(self): + return self._parent_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument parent_curve is mantatory and can not be set to None" + ) + if not check_type(value, curve): + self._parent_curve = curve(value) + else: + self._parent_curve = value + + return property(**locals()) + + @apply + def using_curves(): + def fget(self): + return self._using_curves + + def fset(self, value): + # INVERSE argument + raise AssertionError( + "Argument using_curves is INVERSE. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.BOUNDED_CURVE" == TYPEOF(self.parent_curve) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY reparametrised_composite_curve_segment # +#################### +class reparametrised_composite_curve_segment(composite_curve_segment): + """Entity reparametrised_composite_curve_segment definition. + + :param param_length + :type param_length:parameter_value + """ + + def __init__( + self, + inherited0__transition, + inherited1__same_sense, + inherited2__parent_curve, + param_length, + ): + composite_curve_segment.__init__( + self, + inherited0__transition, + inherited1__same_sense, + inherited2__parent_curve, + ) + self.param_length = param_length + + @apply + def param_length(): + def fget(self): + return self._param_length + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument param_length is mantatory and can not be set to None" + ) + if not check_type(value, parameter_value): + self._param_length = parameter_value(value) + else: + self._param_length = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.param_length > 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY representation_relationship # +#################### +class representation_relationship(BaseEntityClass): + """Entity representation_relationship definition. + + :param name + :type name:label + + :param description + :type description:text + + :param rep_1 + :type rep_1:representation + + :param rep_2 + :type rep_2:representation + """ + + def __init__( + self, + name, + description, + rep_1, + rep_2, + ): + self.name = name + self.description = description + self.rep_1 = rep_1 + self.rep_2 = rep_2 + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def rep_1(): + def fget(self): + return self._rep_1 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument rep_1 is mantatory and can not be set to None") + if not check_type(value, representation): + self._rep_1 = representation(value) + else: + self._rep_1 = value + + return property(**locals()) + + @apply + def rep_2(): + def fget(self): + return self._rep_2 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument rep_2 is mantatory and can not be set to None") + if not check_type(value, representation): + self._rep_2 = representation(value) + else: + self._rep_2 = value + + return property(**locals()) + + +#################### +# ENTITY representation_relationship_with_transformation # +#################### +class representation_relationship_with_transformation(representation_relationship): + """Entity representation_relationship_with_transformation definition. + + :param transformation_operator + :type transformation_operator:transformation + """ + + def __init__( + self, + inherited0__name, + inherited1__description, + inherited2__rep_1, + inherited3__rep_2, + transformation_operator, + ): + representation_relationship.__init__( + self, + inherited0__name, + inherited1__description, + inherited2__rep_1, + inherited3__rep_2, + ) + self.transformation_operator = transformation_operator + + @apply + def transformation_operator(): + def fget(self): + return self._transformation_operator + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument transformation_operator is mantatory and can not be set to None" + ) + if not check_type(value, transformation): + self._transformation_operator = transformation(value) + else: + self._transformation_operator = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + self.self.representation_relationship.self.rep_1.self.context_of_items + != self.self.representation_relationship.self.rep_2.self.context_of_items + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY person_and_organization_role # +#################### +class person_and_organization_role(BaseEntityClass): + """Entity person_and_organization_role definition. + + :param name + :type name:label + """ + + def __init__( + self, + name, + ): + self.name = name + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + +#################### +# ENTITY quasi_uniform_curve # +#################### +class quasi_uniform_curve(b_spline_curve): + """Entity quasi_uniform_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ): + b_spline_curve.__init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ) + + +#################### +# ENTITY swept_surface # +#################### +class swept_surface(surface): + """Entity swept_surface definition. + + :param swept_curve + :type swept_curve:curve + """ + + def __init__( + self, + inherited0__name, + swept_curve, + ): + surface.__init__( + self, + inherited0__name, + ) + self.swept_curve = swept_curve + + @apply + def swept_curve(): + def fget(self): + return self._swept_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument swept_curve is mantatory and can not be set to None") + if not check_type(value, curve): + self._swept_curve = curve(value) + else: + self._swept_curve = value + + return property(**locals()) + + +#################### +# ENTITY property_definition # +#################### +class property_definition(BaseEntityClass): + """Entity property_definition definition. + + :param name + :type name:label + + :param description + :type description:text + + :param definition + :type definition:characterized_definition + """ + + def __init__( + self, + name, + description, + definition, + ): + self.name = name + self.description = description + self.definition = definition + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def definition(): + def fget(self): + return self._definition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument definition is mantatory and can not be set to None") + if not check_type(value, characterized_definition): + self._definition = characterized_definition(value) + else: + self._definition = value + + return property(**locals()) + + +#################### +# ENTITY global_uncertainty_assigned_context # +#################### +class global_uncertainty_assigned_context(representation_context): + """Entity global_uncertainty_assigned_context definition. + + :param uncertainty + :type uncertainty:SET(1,None,'uncertainty_measure_with_unit', scope = schema_scope) + """ + + def __init__( + self, + inherited0__context_identifier, + inherited1__context_type, + uncertainty, + ): + representation_context.__init__( + self, + inherited0__context_identifier, + inherited1__context_type, + ) + self.uncertainty = uncertainty + + @apply + def uncertainty(): + def fget(self): + return self._uncertainty + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument uncertainty is mantatory and can not be set to None") + if not check_type( + value, SET(1, None, "uncertainty_measure_with_unit", scope=schema_scope) + ): + self._uncertainty = SET(value) + else: + self._uncertainty = value + + return property(**locals()) + + +#################### +# ENTITY organization_relationship # +#################### +class organization_relationship(BaseEntityClass): + """Entity organization_relationship definition. + + :param name + :type name:label + + :param description + :type description:text + + :param relating_organization + :type relating_organization:organization + + :param related_organization + :type related_organization:organization + """ + + def __init__( + self, + name, + description, + relating_organization, + related_organization, + ): + self.name = name + self.description = description + self.relating_organization = relating_organization + self.related_organization = related_organization + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def relating_organization(): + def fget(self): + return self._relating_organization + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument relating_organization is mantatory and can not be set to None" + ) + if not check_type(value, organization): + self._relating_organization = organization(value) + else: + self._relating_organization = value + + return property(**locals()) + + @apply + def related_organization(): + def fget(self): + return self._related_organization + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument related_organization is mantatory and can not be set to None" + ) + if not check_type(value, organization): + self._related_organization = organization(value) + else: + self._related_organization = value + + return property(**locals()) + + +#################### +# ENTITY parabola # +#################### +class parabola(conic): + """Entity parabola definition. + + :param focal_dist + :type focal_dist:length_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + focal_dist, + ): + conic.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.focal_dist = focal_dist + + @apply + def focal_dist(): + def fget(self): + return self._focal_dist + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument focal_dist is mantatory and can not be set to None") + if not check_type(value, length_measure): + self._focal_dist = length_measure(value) + else: + self._focal_dist = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.focal_dist != 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY rectangular_composite_surface # +#################### +class rectangular_composite_surface(bounded_surface): + """Entity rectangular_composite_surface definition. + + :param segments + :type segments:LIST(1,None,LIST(1,None,'surface_patch', scope = schema_scope)) + + :param n_u + :type n_u:INTEGER + + :param n_v + :type n_v:INTEGER + """ + + def __init__( + self, + inherited0__name, + segments, + ): + bounded_surface.__init__( + self, + inherited0__name, + ) + self.segments = segments + + @apply + def segments(): + def fget(self): + return self._segments + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument segments is mantatory and can not be set to None") + if not check_type( + value, LIST(1, None, LIST(1, None, "surface_patch", scope=schema_scope)) + ): + self._segments = LIST(value) + else: + self._segments = value + + return property(**locals()) + + @apply + def n_u(): + def fget(self): + attribute_eval = SIZEOF(self.segments) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument n_u is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + @apply + def n_v(): + def fget(self): + attribute_eval = SIZEOF(self.segments[1]) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument n_v is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = [] == None + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = constraints_rectangular_composite_surface(self) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY lot_effectivity # +#################### +class lot_effectivity(effectivity): + """Entity lot_effectivity definition. + + :param effectivity_lot_id + :type effectivity_lot_id:identifier + + :param effectivity_lot_size + :type effectivity_lot_size:measure_with_unit + """ + + def __init__( + self, + inherited0__id, + effectivity_lot_id, + effectivity_lot_size, + ): + effectivity.__init__( + self, + inherited0__id, + ) + self.effectivity_lot_id = effectivity_lot_id + self.effectivity_lot_size = effectivity_lot_size + + @apply + def effectivity_lot_id(): + def fget(self): + return self._effectivity_lot_id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument effectivity_lot_id is mantatory and can not be set to None" + ) + if not check_type(value, identifier): + self._effectivity_lot_id = identifier(value) + else: + self._effectivity_lot_id = value + + return property(**locals()) + + @apply + def effectivity_lot_size(): + def fget(self): + return self._effectivity_lot_size + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument effectivity_lot_size is mantatory and can not be set to None" + ) + if not check_type(value, measure_with_unit): + self._effectivity_lot_size = measure_with_unit(value) + else: + self._effectivity_lot_size = value + + return property(**locals()) + + +#################### +# ENTITY surface_of_linear_extrusion # +#################### +class surface_of_linear_extrusion(swept_surface): + """Entity surface_of_linear_extrusion definition. + + :param extrusion_axis + :type extrusion_axis:vector + """ + + def __init__( + self, + inherited0__name, + inherited1__swept_curve, + extrusion_axis, + ): + swept_surface.__init__( + self, + inherited0__name, + inherited1__swept_curve, + ) + self.extrusion_axis = extrusion_axis + + @apply + def extrusion_axis(): + def fget(self): + return self._extrusion_axis + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument extrusion_axis is mantatory and can not be set to None" + ) + if not check_type(value, vector): + self._extrusion_axis = vector(value) + else: + self._extrusion_axis = value + + return property(**locals()) + + +#################### +# ENTITY shell_based_surface_model # +#################### +class shell_based_surface_model(geometric_representation_item): + """Entity shell_based_surface_model definition. + + :param sbsm_boundary + :type sbsm_boundary:SET(1,None,'shell', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + sbsm_boundary, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + self.sbsm_boundary = sbsm_boundary + + @apply + def sbsm_boundary(): + def fget(self): + return self._sbsm_boundary + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument sbsm_boundary is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "shell", scope=schema_scope)): + self._sbsm_boundary = SET(value) + else: + self._sbsm_boundary = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = constraints_geometry_shell_based_surface_model(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY uniform_curve # +#################### +class uniform_curve(b_spline_curve): + """Entity uniform_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ): + b_spline_curve.__init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ) + + +#################### +# ENTITY bezier_curve # +#################### +class bezier_curve(b_spline_curve): + """Entity bezier_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ): + b_spline_curve.__init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ) + + +#################### +# ENTITY loop # +#################### +class loop(topological_representation_item): + """Entity loop definition.""" + + def __init__( + self, + inherited0__name, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY edge_loop # +#################### +class edge_loop(loop, path): + """Entity edge_loop definition. + + :param ne + :type ne:INTEGER + """ + + def __init__( + self, + inherited0__name, + inherited1__name, + inherited2__edge_list, + ): + loop.__init__( + self, + inherited0__name, + ) + path.__init__( + self, + inherited1__name, + inherited2__edge_list, + ) + + @apply + def ne(): + def fget(self): + attribute_eval = SIZEOF(self.self.path.self.edge_list) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument ne is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + self.self.path.self.edge_list[1].self.edge_start + == self.self.path.self.edge_list[self.ne].self.edge_end + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY date # +#################### +class date(BaseEntityClass): + """Entity date definition. + + :param year_component + :type year_component:year_number + """ + + def __init__( + self, + year_component, + ): + self.year_component = year_component + + @apply + def year_component(): + def fget(self): + return self._year_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument year_component is mantatory and can not be set to None" + ) + if not check_type(value, year_number): + self._year_component = year_number(value) + else: + self._year_component = value + + return property(**locals()) + + +#################### +# ENTITY calendar_date # +#################### +class calendar_date(date): + """Entity calendar_date definition. + + :param day_component + :type day_component:day_in_month_number + + :param month_component + :type month_component:month_in_year_number + """ + + def __init__( + self, + inherited0__year_component, + day_component, + month_component, + ): + date.__init__( + self, + inherited0__year_component, + ) + self.day_component = day_component + self.month_component = month_component + + @apply + def day_component(): + def fget(self): + return self._day_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument day_component is mantatory and can not be set to None" + ) + if not check_type(value, day_in_month_number): + self._day_component = day_in_month_number(value) + else: + self._day_component = value + + return property(**locals()) + + @apply + def month_component(): + def fget(self): + return self._month_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument month_component is mantatory and can not be set to None" + ) + if not check_type(value, month_in_year_number): + self._month_component = month_in_year_number(value) + else: + self._month_component = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = valid_calendar_date(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY toroidal_surface # +#################### +class toroidal_surface(elementary_surface): + """Entity toroidal_surface definition. + + :param major_radius + :type major_radius:positive_length_measure + + :param minor_radius + :type minor_radius:positive_length_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + major_radius, + minor_radius, + ): + elementary_surface.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.major_radius = major_radius + self.minor_radius = minor_radius + + @apply + def major_radius(): + def fget(self): + return self._major_radius + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument major_radius is mantatory and can not be set to None" + ) + if not check_type(value, positive_length_measure): + self._major_radius = positive_length_measure(value) + else: + self._major_radius = value + + return property(**locals()) + + @apply + def minor_radius(): + def fget(self): + return self._minor_radius + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument minor_radius is mantatory and can not be set to None" + ) + if not check_type(value, positive_length_measure): + self._minor_radius = positive_length_measure(value) + else: + self._minor_radius = value + + return property(**locals()) + + +#################### +# ENTITY promissory_usage_occurrence # +#################### +class promissory_usage_occurrence(assembly_component_usage): + """Entity promissory_usage_occurrence definition.""" + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + ): + assembly_component_usage.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + inherited5__reference_designator, + ) + + +#################### +# ENTITY approval_assignment # +#################### +class approval_assignment(BaseEntityClass): + """Entity approval_assignment definition. + + :param assigned_approval + :type assigned_approval:approval + """ + + def __init__( + self, + assigned_approval, + ): + self.assigned_approval = assigned_approval + + @apply + def assigned_approval(): + def fget(self): + return self._assigned_approval + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_approval is mantatory and can not be set to None" + ) + if not check_type(value, approval): + self._assigned_approval = approval(value) + else: + self._assigned_approval = value + + return property(**locals()) + + +#################### +# ENTITY configuration_item # +#################### +class configuration_item(BaseEntityClass): + """Entity configuration_item definition. + + :param id + :type id:identifier + + :param name + :type name:label + + :param description + :type description:text + + :param item_concept + :type item_concept:product_concept + + :param purpose + :type purpose:label + """ + + def __init__( + self, + id, + name, + description, + item_concept, + purpose, + ): + self.id = id + self.name = name + self.description = description + self.item_concept = item_concept + self.purpose = purpose + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + else: + self._description = value + + return property(**locals()) + + @apply + def item_concept(): + def fget(self): + return self._item_concept + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument item_concept is mantatory and can not be set to None" + ) + if not check_type(value, product_concept): + self._item_concept = product_concept(value) + else: + self._item_concept = value + + return property(**locals()) + + @apply + def purpose(): + def fget(self): + return self._purpose + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, label): + self._purpose = label(value) + else: + self._purpose = value + else: + self._purpose = value + + return property(**locals()) + + +#################### +# ENTITY contract_assignment # +#################### +class contract_assignment(BaseEntityClass): + """Entity contract_assignment definition. + + :param assigned_contract + :type assigned_contract:contract + """ + + def __init__( + self, + assigned_contract, + ): + self.assigned_contract = assigned_contract + + @apply + def assigned_contract(): + def fget(self): + return self._assigned_contract + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_contract is mantatory and can not be set to None" + ) + if not check_type(value, contract): + self._assigned_contract = contract(value) + else: + self._assigned_contract = value + + return property(**locals()) + + +#################### +# ENTITY vector # +#################### +class vector(geometric_representation_item): + """Entity vector definition. + + :param orientation + :type orientation:direction + + :param magnitude + :type magnitude:length_measure + """ + + def __init__( + self, + inherited0__name, + orientation, + magnitude, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + self.orientation = orientation + self.magnitude = magnitude + + @apply + def orientation(): + def fget(self): + return self._orientation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument orientation is mantatory and can not be set to None") + if not check_type(value, direction): + self._orientation = direction(value) + else: + self._orientation = value + + return property(**locals()) + + @apply + def magnitude(): + def fget(self): + return self._magnitude + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument magnitude is mantatory and can not be set to None") + if not check_type(value, length_measure): + self._magnitude = length_measure(value) + else: + self._magnitude = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.magnitude >= 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY pcurve # +#################### +class pcurve(curve): + """Entity pcurve definition. + + :param basis_surface + :type basis_surface:surface + + :param reference_to_curve + :type reference_to_curve:definitional_representation + """ + + def __init__( + self, + inherited0__name, + basis_surface, + reference_to_curve, + ): + curve.__init__( + self, + inherited0__name, + ) + self.basis_surface = basis_surface + self.reference_to_curve = reference_to_curve + + @apply + def basis_surface(): + def fget(self): + return self._basis_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument basis_surface is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._basis_surface = surface(value) + else: + self._basis_surface = value + + return property(**locals()) + + @apply + def reference_to_curve(): + def fget(self): + return self._reference_to_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument reference_to_curve is mantatory and can not be set to None" + ) + if not check_type(value, definitional_representation): + self._reference_to_curve = definitional_representation(value) + else: + self._reference_to_curve = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = SIZEOF(self.reference_to_curve.self.representation.self.items) == 1 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = "CONFIG_CONTROL_DESIGN.CURVE" == TYPEOF( + self.reference_to_curve.self.representation.self.items[1] + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = ( + self.reference_to_curve.self.representation.self.items[ + 1 + ].self.geometric_representation_item.self.dim + == 2 + ) + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + +#################### +# ENTITY bounded_pcurve # +#################### +class bounded_pcurve(pcurve, bounded_curve): + """Entity bounded_pcurve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__basis_surface, + inherited2__reference_to_curve, + inherited3__name, + ): + pcurve.__init__( + self, + inherited0__name, + inherited1__basis_surface, + inherited2__reference_to_curve, + ) + bounded_curve.__init__( + self, + inherited3__name, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.BOUNDED_CURVE" == TYPEOF( + self.self.pcurve.self.reference_to_curve.self.items[1] + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY intersection_curve # +#################### +class intersection_curve(surface_curve): + """Entity intersection_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__curve_3d, + inherited2__associated_geometry, + inherited3__master_representation, + ): + surface_curve.__init__( + self, + inherited0__name, + inherited1__curve_3d, + inherited2__associated_geometry, + inherited3__master_representation, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(self.self.surface_curve.self.associated_geometry) == 2 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = associated_surface( + self.self.surface_curve.self.associated_geometry[1] + ) != associated_surface(self.self.surface_curve.self.associated_geometry[2]) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY trimmed_curve # +#################### +class trimmed_curve(bounded_curve): + """Entity trimmed_curve definition. + + :param basis_curve + :type basis_curve:curve + + :param trim_1 + :type trim_1:SET(1,2,'trimming_select', scope = schema_scope) + + :param trim_2 + :type trim_2:SET(1,2,'trimming_select', scope = schema_scope) + + :param sense_agreement + :type sense_agreement:BOOLEAN + + :param master_representation + :type master_representation:trimming_preference + """ + + def __init__( + self, + inherited0__name, + basis_curve, + trim_1, + trim_2, + sense_agreement, + master_representation, + ): + bounded_curve.__init__( + self, + inherited0__name, + ) + self.basis_curve = basis_curve + self.trim_1 = trim_1 + self.trim_2 = trim_2 + self.sense_agreement = sense_agreement + self.master_representation = master_representation + + @apply + def basis_curve(): + def fget(self): + return self._basis_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument basis_curve is mantatory and can not be set to None") + if not check_type(value, curve): + self._basis_curve = curve(value) + else: + self._basis_curve = value + + return property(**locals()) + + @apply + def trim_1(): + def fget(self): + return self._trim_1 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument trim_1 is mantatory and can not be set to None") + if not check_type(value, SET(1, 2, "trimming_select", scope=schema_scope)): + self._trim_1 = SET(value) + else: + self._trim_1 = value + + return property(**locals()) + + @apply + def trim_2(): + def fget(self): + return self._trim_2 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument trim_2 is mantatory and can not be set to None") + if not check_type(value, SET(1, 2, "trimming_select", scope=schema_scope)): + self._trim_2 = SET(value) + else: + self._trim_2 = value + + return property(**locals()) + + @apply + def sense_agreement(): + def fget(self): + return self._sense_agreement + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument sense_agreement is mantatory and can not be set to None" + ) + if not check_type(value, BOOLEAN): + self._sense_agreement = BOOLEAN(value) + else: + self._sense_agreement = value + + return property(**locals()) + + @apply + def master_representation(): + def fget(self): + return self._master_representation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument master_representation is mantatory and can not be set to None" + ) + if not check_type(value, trimming_preference): + self._master_representation = trimming_preference(value) + else: + self._master_representation = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = (HIINDEX(self.trim_1) == 1) or ( + TYPEOF(self.trim_1[1]) != TYPEOF(self.trim_1[2]) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = (HIINDEX(self.trim_2) == 1) or ( + TYPEOF(self.trim_2[1]) != TYPEOF(self.trim_2[2]) + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY product_definition_context # +#################### +class product_definition_context(application_context_element): + """Entity product_definition_context definition. + + :param life_cycle_stage + :type life_cycle_stage:label + """ + + def __init__( + self, + inherited0__name, + inherited1__frame_of_reference, + life_cycle_stage, + ): + application_context_element.__init__( + self, + inherited0__name, + inherited1__frame_of_reference, + ) + self.life_cycle_stage = life_cycle_stage + + @apply + def life_cycle_stage(): + def fget(self): + return self._life_cycle_stage + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument life_cycle_stage is mantatory and can not be set to None" + ) + if not check_type(value, label): + self._life_cycle_stage = label(value) + else: + self._life_cycle_stage = value + + return property(**locals()) + + +#################### +# ENTITY bounded_surface_curve # +#################### +class bounded_surface_curve(surface_curve, bounded_curve): + """Entity bounded_surface_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__curve_3d, + inherited2__associated_geometry, + inherited3__master_representation, + inherited4__name, + ): + surface_curve.__init__( + self, + inherited0__name, + inherited1__curve_3d, + inherited2__associated_geometry, + inherited3__master_representation, + ) + bounded_curve.__init__( + self, + inherited4__name, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.BOUNDED_CURVE" == TYPEOF( + self.self.surface_curve.self.curve_3d + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY item_defined_transformation # +#################### +class item_defined_transformation(BaseEntityClass): + """Entity item_defined_transformation definition. + + :param name + :type name:label + + :param description + :type description:text + + :param transform_item_1 + :type transform_item_1:representation_item + + :param transform_item_2 + :type transform_item_2:representation_item + """ + + def __init__( + self, + name, + description, + transform_item_1, + transform_item_2, + ): + self.name = name + self.description = description + self.transform_item_1 = transform_item_1 + self.transform_item_2 = transform_item_2 + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def transform_item_1(): + def fget(self): + return self._transform_item_1 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument transform_item_1 is mantatory and can not be set to None" + ) + if not check_type(value, representation_item): + self._transform_item_1 = representation_item(value) + else: + self._transform_item_1 = value + + return property(**locals()) + + @apply + def transform_item_2(): + def fget(self): + return self._transform_item_2 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument transform_item_2 is mantatory and can not be set to None" + ) + if not check_type(value, representation_item): + self._transform_item_2 = representation_item(value) + else: + self._transform_item_2 = value + + return property(**locals()) + + +#################### +# ENTITY action_method # +#################### +class action_method(BaseEntityClass): + """Entity action_method definition. + + :param name + :type name:label + + :param description + :type description:text + + :param consequence + :type consequence:text + + :param purpose + :type purpose:text + """ + + def __init__( + self, + name, + description, + consequence, + purpose, + ): + self.name = name + self.description = description + self.consequence = consequence + self.purpose = purpose + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def consequence(): + def fget(self): + return self._consequence + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument consequence is mantatory and can not be set to None") + if not check_type(value, text): + self._consequence = text(value) + else: + self._consequence = value + + return property(**locals()) + + @apply + def purpose(): + def fget(self): + return self._purpose + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument purpose is mantatory and can not be set to None") + if not check_type(value, text): + self._purpose = text(value) + else: + self._purpose = value + + return property(**locals()) + + +#################### +# ENTITY product_category_relationship # +#################### +class product_category_relationship(BaseEntityClass): + """Entity product_category_relationship definition. + + :param name + :type name:label + + :param description + :type description:text + + :param category + :type category:product_category + + :param sub_category + :type sub_category:product_category + """ + + def __init__( + self, + name, + description, + category, + sub_category, + ): + self.name = name + self.description = description + self.category = category + self.sub_category = sub_category + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def category(): + def fget(self): + return self._category + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument category is mantatory and can not be set to None") + if not check_type(value, product_category): + self._category = product_category(value) + else: + self._category = value + + return property(**locals()) + + @apply + def sub_category(): + def fget(self): + return self._sub_category + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument sub_category is mantatory and can not be set to None" + ) + if not check_type(value, product_category): + self._sub_category = product_category(value) + else: + self._sub_category = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = acyclic_product_category_relationship(self, [self.self.sub_category]) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY plane_angle_measure_with_unit # +#################### +class plane_angle_measure_with_unit(measure_with_unit): + """Entity plane_angle_measure_with_unit definition.""" + + def __init__( + self, + inherited0__value_component, + inherited1__unit_component, + ): + measure_with_unit.__init__( + self, + inherited0__value_component, + inherited1__unit_component, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.PLANE_ANGLE_UNIT" == TYPEOF( + self.self.measure_with_unit.self.unit_component + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY vertex # +#################### +class vertex(topological_representation_item): + """Entity vertex definition.""" + + def __init__( + self, + inherited0__name, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + + +#################### +# ENTITY representation_map # +#################### +class representation_map(BaseEntityClass): + """Entity representation_map definition. + + :param mapping_origin + :type mapping_origin:representation_item + + :param mapped_representation + :type mapped_representation:representation + + :param map_usage + :type map_usage:SET(1,None,'mapped_item', scope = schema_scope) + """ + + def __init__( + self, + mapping_origin, + mapped_representation, + ): + self.mapping_origin = mapping_origin + self.mapped_representation = mapped_representation + + @apply + def mapping_origin(): + def fget(self): + return self._mapping_origin + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument mapping_origin is mantatory and can not be set to None" + ) + if not check_type(value, representation_item): + self._mapping_origin = representation_item(value) + else: + self._mapping_origin = value + + return property(**locals()) + + @apply + def mapped_representation(): + def fget(self): + return self._mapped_representation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument mapped_representation is mantatory and can not be set to None" + ) + if not check_type(value, representation): + self._mapped_representation = representation(value) + else: + self._mapped_representation = value + + return property(**locals()) + + @apply + def map_usage(): + def fget(self): + return self._map_usage + + def fset(self, value): + # INVERSE argument + raise AssertionError( + "Argument map_usage is INVERSE. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = item_in_context( + self.self.mapping_origin, self.self.mapped_representation.self.context_of_items + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY product_definition_effectivity # +#################### +class product_definition_effectivity(effectivity): + """Entity product_definition_effectivity definition. + + :param usage + :type usage:product_definition_relationship + """ + + def __init__( + self, + inherited0__id, + usage, + ): + effectivity.__init__( + self, + inherited0__id, + ) + self.usage = usage + + @apply + def usage(): + def fget(self): + return self._usage + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument usage is mantatory and can not be set to None") + if not check_type(value, product_definition_relationship): + self._usage = product_definition_relationship(value) + else: + self._usage = value + + return property(**locals()) + + +#################### +# ENTITY configuration_effectivity # +#################### +class configuration_effectivity(product_definition_effectivity): + """Entity configuration_effectivity definition. + + :param configuration + :type configuration:configuration_design + """ + + def __init__( + self, + inherited0__id, + inherited1__usage, + configuration, + ): + product_definition_effectivity.__init__( + self, + inherited0__id, + inherited1__usage, + ) + self.configuration = configuration + + @apply + def configuration(): + def fget(self): + return self._configuration + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument configuration is mantatory and can not be set to None" + ) + if not check_type(value, configuration_design): + self._configuration = configuration_design(value) + else: + self._configuration = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_USAGE" == TYPEOF( + self.self.product_definition_effectivity.self.usage + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY ellipse # +#################### +class ellipse(conic): + """Entity ellipse definition. + + :param semi_axis_1 + :type semi_axis_1:positive_length_measure + + :param semi_axis_2 + :type semi_axis_2:positive_length_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + semi_axis_1, + semi_axis_2, + ): + conic.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.semi_axis_1 = semi_axis_1 + self.semi_axis_2 = semi_axis_2 + + @apply + def semi_axis_1(): + def fget(self): + return self._semi_axis_1 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument semi_axis_1 is mantatory and can not be set to None") + if not check_type(value, positive_length_measure): + self._semi_axis_1 = positive_length_measure(value) + else: + self._semi_axis_1 = value + + return property(**locals()) + + @apply + def semi_axis_2(): + def fget(self): + return self._semi_axis_2 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument semi_axis_2 is mantatory and can not be set to None") + if not check_type(value, positive_length_measure): + self._semi_axis_2 = positive_length_measure(value) + else: + self._semi_axis_2 = value + + return property(**locals()) + + +#################### +# ENTITY context_dependent_unit # +#################### +class context_dependent_unit(named_unit): + """Entity context_dependent_unit definition. + + :param name + :type name:label + """ + + def __init__( + self, + inherited0__dimensions, + name, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + self.name = name + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + +#################### +# ENTITY alternate_product_relationship # +#################### +class alternate_product_relationship(BaseEntityClass): + """Entity alternate_product_relationship definition. + + :param name + :type name:label + + :param definition + :type definition:text + + :param alternate + :type alternate:product + + :param base + :type base:product + + :param basis + :type basis:text + """ + + def __init__( + self, + name, + definition, + alternate, + base, + basis, + ): + self.name = name + self.definition = definition + self.alternate = alternate + self.base = base + self.basis = basis + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def definition(): + def fget(self): + return self._definition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument definition is mantatory and can not be set to None") + if not check_type(value, text): + self._definition = text(value) + else: + self._definition = value + + return property(**locals()) + + @apply + def alternate(): + def fget(self): + return self._alternate + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument alternate is mantatory and can not be set to None") + if not check_type(value, product): + self._alternate = product(value) + else: + self._alternate = value + + return property(**locals()) + + @apply + def base(): + def fget(self): + return self._base + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument base is mantatory and can not be set to None") + if not check_type(value, product): + self._base = product(value) + else: + self._base = value + + return property(**locals()) + + @apply + def basis(): + def fget(self): + return self._basis + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument basis is mantatory and can not be set to None") + if not check_type(value, text): + self._basis = text(value) + else: + self._basis = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.alternate != self.base + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY document_type # +#################### +class document_type(BaseEntityClass): + """Entity document_type definition. + + :param product_data_type + :type product_data_type:label + """ + + def __init__( + self, + product_data_type, + ): + self.product_data_type = product_data_type + + @apply + def product_data_type(): + def fget(self): + return self._product_data_type + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument product_data_type is mantatory and can not be set to None" + ) + if not check_type(value, label): + self._product_data_type = label(value) + else: + self._product_data_type = value + + return property(**locals()) + + +#################### +# ENTITY document_reference # +#################### +class document_reference(BaseEntityClass): + """Entity document_reference definition. + + :param assigned_document + :type assigned_document:document + + :param source + :type source:label + """ + + def __init__( + self, + assigned_document, + source, + ): + self.assigned_document = assigned_document + self.source = source + + @apply + def assigned_document(): + def fget(self): + return self._assigned_document + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_document is mantatory and can not be set to None" + ) + if not check_type(value, document): + self._assigned_document = document(value) + else: + self._assigned_document = value + + return property(**locals()) + + @apply + def source(): + def fget(self): + return self._source + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument source is mantatory and can not be set to None") + if not check_type(value, label): + self._source = label(value) + else: + self._source = value + + return property(**locals()) + + +#################### +# ENTITY mechanical_context # +#################### +class mechanical_context(product_context): + """Entity mechanical_context definition.""" + + def __init__( + self, + inherited0__name, + inherited1__frame_of_reference, + inherited2__discipline_type, + ): + product_context.__init__( + self, + inherited0__name, + inherited1__frame_of_reference, + inherited2__discipline_type, + ) + + def wr1(self): + eval_wr1_wr = self.self.discipline_type == "mechanical" + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY shell_based_wireframe_model # +#################### +class shell_based_wireframe_model(geometric_representation_item): + """Entity shell_based_wireframe_model definition. + + :param sbwm_boundary + :type sbwm_boundary:SET(1,None,'shell', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + sbwm_boundary, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + self.sbwm_boundary = sbwm_boundary + + @apply + def sbwm_boundary(): + def fget(self): + return self._sbwm_boundary + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument sbwm_boundary is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "shell", scope=schema_scope)): + self._sbwm_boundary = SET(value) + else: + self._sbwm_boundary = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = constraints_geometry_shell_based_wireframe_model(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY contract # +#################### +class contract(BaseEntityClass): + """Entity contract definition. + + :param name + :type name:label + + :param purpose + :type purpose:text + + :param kind + :type kind:contract_type + """ + + def __init__( + self, + name, + purpose, + kind, + ): + self.name = name + self.purpose = purpose + self.kind = kind + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def purpose(): + def fget(self): + return self._purpose + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument purpose is mantatory and can not be set to None") + if not check_type(value, text): + self._purpose = text(value) + else: + self._purpose = value + + return property(**locals()) + + @apply + def kind(): + def fget(self): + return self._kind + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument kind is mantatory and can not be set to None") + if not check_type(value, contract_type): + self._kind = contract_type(value) + else: + self._kind = value + + return property(**locals()) + + +#################### +# ENTITY dimensional_exponents # +#################### +class dimensional_exponents(BaseEntityClass): + """Entity dimensional_exponents definition. + + :param length_exponent + :type length_exponent:REAL + + :param mass_exponent + :type mass_exponent:REAL + + :param time_exponent + :type time_exponent:REAL + + :param electric_current_exponent + :type electric_current_exponent:REAL + + :param thermodynamic_temperature_exponent + :type thermodynamic_temperature_exponent:REAL + + :param amount_of_substance_exponent + :type amount_of_substance_exponent:REAL + + :param luminous_intensity_exponent + :type luminous_intensity_exponent:REAL + """ + + def __init__( + self, + length_exponent, + mass_exponent, + time_exponent, + electric_current_exponent, + thermodynamic_temperature_exponent, + amount_of_substance_exponent, + luminous_intensity_exponent, + ): + self.length_exponent = length_exponent + self.mass_exponent = mass_exponent + self.time_exponent = time_exponent + self.electric_current_exponent = electric_current_exponent + self.thermodynamic_temperature_exponent = thermodynamic_temperature_exponent + self.amount_of_substance_exponent = amount_of_substance_exponent + self.luminous_intensity_exponent = luminous_intensity_exponent + + @apply + def length_exponent(): + def fget(self): + return self._length_exponent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument length_exponent is mantatory and can not be set to None" + ) + if not check_type(value, REAL): + self._length_exponent = REAL(value) + else: + self._length_exponent = value + + return property(**locals()) + + @apply + def mass_exponent(): + def fget(self): + return self._mass_exponent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument mass_exponent is mantatory and can not be set to None" + ) + if not check_type(value, REAL): + self._mass_exponent = REAL(value) + else: + self._mass_exponent = value + + return property(**locals()) + + @apply + def time_exponent(): + def fget(self): + return self._time_exponent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument time_exponent is mantatory and can not be set to None" + ) + if not check_type(value, REAL): + self._time_exponent = REAL(value) + else: + self._time_exponent = value + + return property(**locals()) + + @apply + def electric_current_exponent(): + def fget(self): + return self._electric_current_exponent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument electric_current_exponent is mantatory and can not be set to None" + ) + if not check_type(value, REAL): + self._electric_current_exponent = REAL(value) + else: + self._electric_current_exponent = value + + return property(**locals()) + + @apply + def thermodynamic_temperature_exponent(): + def fget(self): + return self._thermodynamic_temperature_exponent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument thermodynamic_temperature_exponent is mantatory and can not be set to None" + ) + if not check_type(value, REAL): + self._thermodynamic_temperature_exponent = REAL(value) + else: + self._thermodynamic_temperature_exponent = value + + return property(**locals()) + + @apply + def amount_of_substance_exponent(): + def fget(self): + return self._amount_of_substance_exponent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument amount_of_substance_exponent is mantatory and can not be set to None" + ) + if not check_type(value, REAL): + self._amount_of_substance_exponent = REAL(value) + else: + self._amount_of_substance_exponent = value + + return property(**locals()) + + @apply + def luminous_intensity_exponent(): + def fget(self): + return self._luminous_intensity_exponent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument luminous_intensity_exponent is mantatory and can not be set to None" + ) + if not check_type(value, REAL): + self._luminous_intensity_exponent = REAL(value) + else: + self._luminous_intensity_exponent = value + + return property(**locals()) + + +#################### +# ENTITY start_request # +#################### +class start_request(action_request_assignment): + """Entity start_request definition. + + :param items + :type items:SET(1,None,'start_request_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_action_request, + items, + ): + action_request_assignment.__init__( + self, + inherited0__assigned_action_request, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "start_request_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY cc_design_specification_reference # +#################### +class cc_design_specification_reference(document_reference): + """Entity cc_design_specification_reference definition. + + :param items + :type items:SET(1,None,'specified_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_document, + inherited1__source, + items, + ): + document_reference.__init__( + self, + inherited0__assigned_document, + inherited1__source, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "specified_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY supplied_part_relationship # +#################### +class supplied_part_relationship(product_definition_relationship): + """Entity supplied_part_relationship definition.""" + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + ): + product_definition_relationship.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + ) + + +#################### +# ENTITY context_dependent_shape_representation # +#################### +class context_dependent_shape_representation(BaseEntityClass): + """Entity context_dependent_shape_representation definition. + + :param representation_relation + :type representation_relation:shape_representation_relationship + + :param represented_product_relation + :type represented_product_relation:product_definition_shape + """ + + def __init__( + self, + representation_relation, + represented_product_relation, + ): + self.representation_relation = representation_relation + self.represented_product_relation = represented_product_relation + + @apply + def representation_relation(): + def fget(self): + return self._representation_relation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument representation_relation is mantatory and can not be set to None" + ) + if not check_type(value, shape_representation_relationship): + self._representation_relation = shape_representation_relationship(value) + else: + self._representation_relation = value + + return property(**locals()) + + @apply + def represented_product_relation(): + def fget(self): + return self._represented_product_relation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument represented_product_relation is mantatory and can not be set to None" + ) + if not check_type(value, product_definition_shape): + self._represented_product_relation = product_definition_shape(value) + else: + self._represented_product_relation = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_RELATIONSHIP" == TYPEOF( + self.self.represented_product_relation.self.definition + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY degenerate_toroidal_surface # +#################### +class degenerate_toroidal_surface(toroidal_surface): + """Entity degenerate_toroidal_surface definition. + + :param select_outer + :type select_outer:BOOLEAN + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + inherited2__major_radius, + inherited3__minor_radius, + select_outer, + ): + toroidal_surface.__init__( + self, + inherited0__name, + inherited1__position, + inherited2__major_radius, + inherited3__minor_radius, + ) + self.select_outer = select_outer + + @apply + def select_outer(): + def fget(self): + return self._select_outer + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument select_outer is mantatory and can not be set to None" + ) + if not check_type(value, BOOLEAN): + self._select_outer = BOOLEAN(value) + else: + self._select_outer = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.major_radius < self.minor_radius + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY ordinal_date # +#################### +class ordinal_date(date): + """Entity ordinal_date definition. + + :param day_component + :type day_component:day_in_year_number + """ + + def __init__( + self, + inherited0__year_component, + day_component, + ): + date.__init__( + self, + inherited0__year_component, + ) + self.day_component = day_component + + @apply + def day_component(): + def fget(self): + return self._day_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument day_component is mantatory and can not be set to None" + ) + if not check_type(value, day_in_year_number): + self._day_component = day_in_year_number(value) + else: + self._day_component = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + ((not leap_year(self.self.year_component)) and (1 <= self.day_component)) + and (self.day_component <= 365) + ) or ( + (leap_year(self.self.year_component) and (1 <= self.day_component)) + and (self.day_component <= 366) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY face_outer_bound # +#################### +class face_outer_bound(face_bound): + """Entity face_outer_bound definition.""" + + def __init__( + self, + inherited0__name, + inherited1__bound, + inherited2__orientation, + ): + face_bound.__init__( + self, + inherited0__name, + inherited1__bound, + inherited2__orientation, + ) + + +#################### +# ENTITY mass_measure_with_unit # +#################### +class mass_measure_with_unit(measure_with_unit): + """Entity mass_measure_with_unit definition.""" + + def __init__( + self, + inherited0__value_component, + inherited1__unit_component, + ): + measure_with_unit.__init__( + self, + inherited0__value_component, + inherited1__unit_component, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.MASS_UNIT" == TYPEOF( + self.self.measure_with_unit.self.unit_component + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY brep_with_voids # +#################### +class brep_with_voids(manifold_solid_brep): + """Entity brep_with_voids definition. + + :param voids + :type voids:SET(1,None,'oriented_closed_shell', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__outer, + voids, + ): + manifold_solid_brep.__init__( + self, + inherited0__name, + inherited1__outer, + ) + self.voids = voids + + @apply + def voids(): + def fget(self): + return self._voids + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument voids is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "oriented_closed_shell", scope=schema_scope)): + self._voids = SET(value) + else: + self._voids = value + + return property(**locals()) + + +#################### +# ENTITY week_of_year_and_day_date # +#################### +class week_of_year_and_day_date(date): + """Entity week_of_year_and_day_date definition. + + :param week_component + :type week_component:week_in_year_number + + :param day_component + :type day_component:day_in_week_number + """ + + def __init__( + self, + inherited0__year_component, + week_component, + day_component, + ): + date.__init__( + self, + inherited0__year_component, + ) + self.week_component = week_component + self.day_component = day_component + + @apply + def week_component(): + def fget(self): + return self._week_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument week_component is mantatory and can not be set to None" + ) + if not check_type(value, week_in_year_number): + self._week_component = week_in_year_number(value) + else: + self._week_component = value + + return property(**locals()) + + @apply + def day_component(): + def fget(self): + return self._day_component + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, day_in_week_number): + self._day_component = day_in_week_number(value) + else: + self._day_component = value + else: + self._day_component = value + + return property(**locals()) + + +#################### +# ENTITY point_on_curve # +#################### +class point_on_curve(point): + """Entity point_on_curve definition. + + :param basis_curve + :type basis_curve:curve + + :param point_parameter + :type point_parameter:parameter_value + """ + + def __init__( + self, + inherited0__name, + basis_curve, + point_parameter, + ): + point.__init__( + self, + inherited0__name, + ) + self.basis_curve = basis_curve + self.point_parameter = point_parameter + + @apply + def basis_curve(): + def fget(self): + return self._basis_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument basis_curve is mantatory and can not be set to None") + if not check_type(value, curve): + self._basis_curve = curve(value) + else: + self._basis_curve = value + + return property(**locals()) + + @apply + def point_parameter(): + def fget(self): + return self._point_parameter + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument point_parameter is mantatory and can not be set to None" + ) + if not check_type(value, parameter_value): + self._point_parameter = parameter_value(value) + else: + self._point_parameter = value + + return property(**locals()) + + +#################### +# ENTITY shell_based_wireframe_shape_representation # +#################### +class shell_based_wireframe_shape_representation(shape_representation): + """Entity shell_based_wireframe_shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + shape_representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) >= 1 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = SIZEOF(None) == 0 + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + def wr7(self): + eval_wr7_wr = SIZEOF(None) == 0 + if not eval_wr7_wr: + raise AssertionError("Rule wr7 violated") + else: + return eval_wr7_wr + + def wr8(self): + eval_wr8_wr = SIZEOF(None) == 0 + if not eval_wr8_wr: + raise AssertionError("Rule wr8 violated") + else: + return eval_wr8_wr + + def wr9(self): + eval_wr9_wr = SIZEOF(None) == 0 + if not eval_wr9_wr: + raise AssertionError("Rule wr9 violated") + else: + return eval_wr9_wr + + def wr10(self): + eval_wr10_wr = SIZEOF(None) == 0 + if not eval_wr10_wr: + raise AssertionError("Rule wr10 violated") + else: + return eval_wr10_wr + + def wr11(self): + eval_wr11_wr = SIZEOF(None) == 0 + if not eval_wr11_wr: + raise AssertionError("Rule wr11 violated") + else: + return eval_wr11_wr + + def wr12(self): + eval_wr12_wr = SIZEOF(None) == 0 + if not eval_wr12_wr: + raise AssertionError("Rule wr12 violated") + else: + return eval_wr12_wr + + def wr13(self): + eval_wr13_wr = ( + self.self.context_of_items.self.geometric_representation_context.self.coordinate_space_dimension + == 3 + ) + if not eval_wr13_wr: + raise AssertionError("Rule wr13 violated") + else: + return eval_wr13_wr + + +#################### +# ENTITY face # +#################### +class face(topological_representation_item): + """Entity face definition. + + :param bounds + :type bounds:SET(1,None,'face_bound', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + bounds, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.bounds = bounds + + @apply + def bounds(): + def fget(self): + return self._bounds + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument bounds is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "face_bound", scope=schema_scope)): + self._bounds = SET(value) + else: + self._bounds = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not mixed_loop_type_set(list_to_set(list_face_loops(self))) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) <= 1 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY face_surface # +#################### +class face_surface(face, geometric_representation_item): + """Entity face_surface definition. + + :param face_geometry + :type face_geometry:surface + + :param same_sense + :type same_sense:BOOLEAN + """ + + def __init__( + self, + inherited0__name, + inherited1__bounds, + inherited2__name, + face_geometry, + same_sense, + ): + face.__init__( + self, + inherited0__name, + inherited1__bounds, + ) + geometric_representation_item.__init__( + self, + inherited2__name, + ) + self.face_geometry = face_geometry + self.same_sense = same_sense + + @apply + def face_geometry(): + def fget(self): + return self._face_geometry + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument face_geometry is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._face_geometry = surface(value) + else: + self._face_geometry = value + + return property(**locals()) + + @apply + def same_sense(): + def fget(self): + return self._same_sense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument same_sense is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._same_sense = BOOLEAN(value) + else: + self._same_sense = value + + return property(**locals()) + + +#################### +# ENTITY oriented_face # +#################### +class oriented_face(face): + """Entity oriented_face definition. + + :param face_element + :type face_element:face + + :param orientation + :type orientation:BOOLEAN + + :param face_bounds + :type face_bounds:SET(1,None,'face_bound', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__bounds, + face_element, + orientation, + ): + face.__init__( + self, + inherited0__name, + inherited1__bounds, + ) + self.face_element = face_element + self.orientation = orientation + + @apply + def face_element(): + def fget(self): + return self._face_element + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument face_element is mantatory and can not be set to None" + ) + if not check_type(value, face): + self._face_element = face(value) + else: + self._face_element = value + + return property(**locals()) + + @apply + def orientation(): + def fget(self): + return self._orientation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument orientation is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._orientation = BOOLEAN(value) + else: + self._orientation = value + + return property(**locals()) + + @apply + def face_bounds(): + def fget(self): + attribute_eval = conditional_reverse( + self.self.orientation, self.self.face_element.self.bounds + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument face_bounds is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not ("CONFIG_CONTROL_DESIGN.ORIENTED_FACE" == TYPEOF(self.self.face_element)) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY surface_of_revolution # +#################### +class surface_of_revolution(swept_surface): + """Entity surface_of_revolution definition. + + :param axis_position + :type axis_position:axis1_placement + + :param axis_line + :type axis_line:line + """ + + def __init__( + self, + inherited0__name, + inherited1__swept_curve, + axis_position, + ): + swept_surface.__init__( + self, + inherited0__name, + inherited1__swept_curve, + ) + self.axis_position = axis_position + + @apply + def axis_position(): + def fget(self): + return self._axis_position + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument axis_position is mantatory and can not be set to None" + ) + if not check_type(value, axis1_placement): + self._axis_position = axis1_placement(value) + else: + self._axis_position = value + + return property(**locals()) + + @apply + def axis_line(): + def fget(self): + attribute_eval = (self.dummy_gri == curve()) == line( + self.axis_position.self.location, + self.dummy_gri == vector(self.axis_position.self.z, 1), + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument axis_line is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + +#################### +# ENTITY advanced_brep_shape_representation # +#################### +class advanced_brep_shape_representation(shape_representation): + """Entity advanced_brep_shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + shape_representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) > 0 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = SIZEOF(None) == 0 + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + +#################### +# ENTITY edge_curve # +#################### +class edge_curve(edge, geometric_representation_item): + """Entity edge_curve definition. + + :param edge_geometry + :type edge_geometry:curve + + :param same_sense + :type same_sense:BOOLEAN + """ + + def __init__( + self, + inherited0__name, + inherited1__edge_start, + inherited2__edge_end, + inherited3__name, + edge_geometry, + same_sense, + ): + edge.__init__( + self, + inherited0__name, + inherited1__edge_start, + inherited2__edge_end, + ) + geometric_representation_item.__init__( + self, + inherited3__name, + ) + self.edge_geometry = edge_geometry + self.same_sense = same_sense + + @apply + def edge_geometry(): + def fget(self): + return self._edge_geometry + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument edge_geometry is mantatory and can not be set to None" + ) + if not check_type(value, curve): + self._edge_geometry = curve(value) + else: + self._edge_geometry = value + + return property(**locals()) + + @apply + def same_sense(): + def fget(self): + return self._same_sense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument same_sense is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._same_sense = BOOLEAN(value) + else: + self._same_sense = value + + return property(**locals()) + + +#################### +# ENTITY point_replica # +#################### +class point_replica(point): + """Entity point_replica definition. + + :param parent_pt + :type parent_pt:point + + :param transformation + :type transformation:cartesian_transformation_operator + """ + + def __init__( + self, + inherited0__name, + parent_pt, + transformation, + ): + point.__init__( + self, + inherited0__name, + ) + self.parent_pt = parent_pt + self.transformation = transformation + + @apply + def parent_pt(): + def fget(self): + return self._parent_pt + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument parent_pt is mantatory and can not be set to None") + if not check_type(value, point): + self._parent_pt = point(value) + else: + self._parent_pt = value + + return property(**locals()) + + @apply + def transformation(): + def fget(self): + return self._transformation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument transformation is mantatory and can not be set to None" + ) + if not check_type(value, cartesian_transformation_operator): + self._transformation = cartesian_transformation_operator(value) + else: + self._transformation = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.transformation.self.dim == self.parent_pt.self.dim + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = acyclic_point_replica(self, self.parent_pt) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY product # +#################### +class product(BaseEntityClass): + """Entity product definition. + + :param id + :type id:identifier + + :param name + :type name:label + + :param description + :type description:text + + :param frame_of_reference + :type frame_of_reference:SET(1,None,'product_context', scope = schema_scope) + """ + + def __init__( + self, + id, + name, + description, + frame_of_reference, + ): + self.id = id + self.name = name + self.description = description + self.frame_of_reference = frame_of_reference + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def frame_of_reference(): + def fget(self): + return self._frame_of_reference + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument frame_of_reference is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "product_context", scope=schema_scope)): + self._frame_of_reference = SET(value) + else: + self._frame_of_reference = value + + return property(**locals()) + + +#################### +# ENTITY shape_aspect_relationship # +#################### +class shape_aspect_relationship(BaseEntityClass): + """Entity shape_aspect_relationship definition. + + :param name + :type name:label + + :param description + :type description:text + + :param relating_shape_aspect + :type relating_shape_aspect:shape_aspect + + :param related_shape_aspect + :type related_shape_aspect:shape_aspect + """ + + def __init__( + self, + name, + description, + relating_shape_aspect, + related_shape_aspect, + ): + self.name = name + self.description = description + self.relating_shape_aspect = relating_shape_aspect + self.related_shape_aspect = related_shape_aspect + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def relating_shape_aspect(): + def fget(self): + return self._relating_shape_aspect + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument relating_shape_aspect is mantatory and can not be set to None" + ) + if not check_type(value, shape_aspect): + self._relating_shape_aspect = shape_aspect(value) + else: + self._relating_shape_aspect = value + + return property(**locals()) + + @apply + def related_shape_aspect(): + def fget(self): + return self._related_shape_aspect + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument related_shape_aspect is mantatory and can not be set to None" + ) + if not check_type(value, shape_aspect): + self._related_shape_aspect = shape_aspect(value) + else: + self._related_shape_aspect = value + + return property(**locals()) + + +#################### +# ENTITY rectangular_trimmed_surface # +#################### +class rectangular_trimmed_surface(bounded_surface): + """Entity rectangular_trimmed_surface definition. + + :param basis_surface + :type basis_surface:surface + + :param u1 + :type u1:parameter_value + + :param u2 + :type u2:parameter_value + + :param v1 + :type v1:parameter_value + + :param v2 + :type v2:parameter_value + + :param usense + :type usense:BOOLEAN + + :param vsense + :type vsense:BOOLEAN + """ + + def __init__( + self, + inherited0__name, + basis_surface, + u1, + u2, + v1, + v2, + usense, + vsense, + ): + bounded_surface.__init__( + self, + inherited0__name, + ) + self.basis_surface = basis_surface + self.u1 = u1 + self.u2 = u2 + self.v1 = v1 + self.v2 = v2 + self.usense = usense + self.vsense = vsense + + @apply + def basis_surface(): + def fget(self): + return self._basis_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument basis_surface is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._basis_surface = surface(value) + else: + self._basis_surface = value + + return property(**locals()) + + @apply + def u1(): + def fget(self): + return self._u1 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument u1 is mantatory and can not be set to None") + if not check_type(value, parameter_value): + self._u1 = parameter_value(value) + else: + self._u1 = value + + return property(**locals()) + + @apply + def u2(): + def fget(self): + return self._u2 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument u2 is mantatory and can not be set to None") + if not check_type(value, parameter_value): + self._u2 = parameter_value(value) + else: + self._u2 = value + + return property(**locals()) + + @apply + def v1(): + def fget(self): + return self._v1 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument v1 is mantatory and can not be set to None") + if not check_type(value, parameter_value): + self._v1 = parameter_value(value) + else: + self._v1 = value + + return property(**locals()) + + @apply + def v2(): + def fget(self): + return self._v2 + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument v2 is mantatory and can not be set to None") + if not check_type(value, parameter_value): + self._v2 = parameter_value(value) + else: + self._v2 = value + + return property(**locals()) + + @apply + def usense(): + def fget(self): + return self._usense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument usense is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._usense = BOOLEAN(value) + else: + self._usense = value + + return property(**locals()) + + @apply + def vsense(): + def fget(self): + return self._vsense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument vsense is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._vsense = BOOLEAN(value) + else: + self._vsense = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.u1 != self.u2 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = self.v1 != self.v2 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = ( + ( + ("CONFIG_CONTROL_DESIGN.ELEMENTARY_SURFACE" == TYPEOF(self.basis_surface)) + and (not ("CONFIG_CONTROL_DESIGN.PLANE" == TYPEOF(self.basis_surface))) + ) + or ("CONFIG_CONTROL_DESIGN.SURFACE_OF_REVOLUTION" == TYPEOF(self.basis_surface)) + ) or (self.usense == (self.u2 > self.u1)) + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = ( + ("CONFIG_CONTROL_DESIGN.SPHERICAL_SURFACE" == TYPEOF(self.basis_surface)) + or ("CONFIG_CONTROL_DESIGN.TOROIDAL_SURFACE" == TYPEOF(self.basis_surface)) + ) or (self.vsense == (self.v2 > self.v1)) + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + +#################### +# ENTITY plane # +#################### +class plane(elementary_surface): + """Entity plane definition.""" + + def __init__( + self, + inherited0__name, + inherited1__position, + ): + elementary_surface.__init__( + self, + inherited0__name, + inherited1__position, + ) + + +#################### +# ENTITY action_assignment # +#################### +class action_assignment(BaseEntityClass): + """Entity action_assignment definition. + + :param assigned_action + :type assigned_action:action + """ + + def __init__( + self, + assigned_action, + ): + self.assigned_action = assigned_action + + @apply + def assigned_action(): + def fget(self): + return self._assigned_action + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_action is mantatory and can not be set to None" + ) + if not check_type(value, action): + self._assigned_action = action(value) + else: + self._assigned_action = value + + return property(**locals()) + + +#################### +# ENTITY change # +#################### +class change(action_assignment): + """Entity change definition. + + :param items + :type items:SET(1,None,'work_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_action, + items, + ): + action_assignment.__init__( + self, + inherited0__assigned_action, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "work_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY circle # +#################### +class circle(conic): + """Entity circle definition. + + :param radius + :type radius:positive_length_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + radius, + ): + conic.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.radius = radius + + @apply + def radius(): + def fget(self): + return self._radius + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument radius is mantatory and can not be set to None") + if not check_type(value, positive_length_measure): + self._radius = positive_length_measure(value) + else: + self._radius = value + + return property(**locals()) + + +#################### +# ENTITY line # +#################### +class line(curve): + """Entity line definition. + + :param pnt + :type pnt:cartesian_point + + :param dir + :type dir:vector + """ + + def __init__( + self, + inherited0__name, + pnt, + dir, + ): + curve.__init__( + self, + inherited0__name, + ) + self.pnt = pnt + self.dir = dir + + @apply + def pnt(): + def fget(self): + return self._pnt + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument pnt is mantatory and can not be set to None") + if not check_type(value, cartesian_point): + self._pnt = cartesian_point(value) + else: + self._pnt = value + + return property(**locals()) + + @apply + def dir(): + def fget(self): + return self._dir + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument dir is mantatory and can not be set to None") + if not check_type(value, vector): + self._dir = vector(value) + else: + self._dir = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.dir.self.dim == self.pnt.self.dim + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY property_definition_representation # +#################### +class property_definition_representation(BaseEntityClass): + """Entity property_definition_representation definition. + + :param definition + :type definition:property_definition + + :param used_representation + :type used_representation:representation + """ + + def __init__( + self, + definition, + used_representation, + ): + self.definition = definition + self.used_representation = used_representation + + @apply + def definition(): + def fget(self): + return self._definition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument definition is mantatory and can not be set to None") + if not check_type(value, property_definition): + self._definition = property_definition(value) + else: + self._definition = value + + return property(**locals()) + + @apply + def used_representation(): + def fget(self): + return self._used_representation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument used_representation is mantatory and can not be set to None" + ) + if not check_type(value, representation): + self._used_representation = representation(value) + else: + self._used_representation = value + + return property(**locals()) + + +#################### +# ENTITY geometric_set # +#################### +class geometric_set(geometric_representation_item): + """Entity geometric_set definition. + + :param elements + :type elements:SET(1,None,'geometric_set_select', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + elements, + ): + geometric_representation_item.__init__( + self, + inherited0__name, + ) + self.elements = elements + + @apply + def elements(): + def fget(self): + return self._elements + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument elements is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "geometric_set_select", scope=schema_scope)): + self._elements = SET(value) + else: + self._elements = value + + return property(**locals()) + + +#################### +# ENTITY geometric_curve_set # +#################### +class geometric_curve_set(geometric_set): + """Entity geometric_curve_set definition.""" + + def __init__( + self, + inherited0__name, + inherited1__elements, + ): + geometric_set.__init__( + self, + inherited0__name, + inherited1__elements, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY personal_address # +#################### +class personal_address(address): + """Entity personal_address definition. + + :param people + :type people:SET(1,None,'person', scope = schema_scope) + + :param description + :type description:text + """ + + def __init__( + self, + inherited0__internal_location, + inherited1__street_number, + inherited2__street, + inherited3__postal_box, + inherited4__town, + inherited5__region, + inherited6__postal_code, + inherited7__country, + inherited8__facsimile_number, + inherited9__telephone_number, + inherited10__electronic_mail_address, + inherited11__telex_number, + people, + description, + ): + address.__init__( + self, + inherited0__internal_location, + inherited1__street_number, + inherited2__street, + inherited3__postal_box, + inherited4__town, + inherited5__region, + inherited6__postal_code, + inherited7__country, + inherited8__facsimile_number, + inherited9__telephone_number, + inherited10__electronic_mail_address, + inherited11__telex_number, + ) + self.people = people + self.description = description + + @apply + def people(): + def fget(self): + return self._people + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument people is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "person", scope=schema_scope)): + self._people = SET(value) + else: + self._people = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY document_relationship # +#################### +class document_relationship(BaseEntityClass): + """Entity document_relationship definition. + + :param name + :type name:label + + :param description + :type description:text + + :param relating_document + :type relating_document:document + + :param related_document + :type related_document:document + """ + + def __init__( + self, + name, + description, + relating_document, + related_document, + ): + self.name = name + self.description = description + self.relating_document = relating_document + self.related_document = related_document + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def relating_document(): + def fget(self): + return self._relating_document + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument relating_document is mantatory and can not be set to None" + ) + if not check_type(value, document): + self._relating_document = document(value) + else: + self._relating_document = value + + return property(**locals()) + + @apply + def related_document(): + def fget(self): + return self._related_document + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument related_document is mantatory and can not be set to None" + ) + if not check_type(value, document): + self._related_document = document(value) + else: + self._related_document = value + + return property(**locals()) + + +#################### +# ENTITY outer_boundary_curve # +#################### +class outer_boundary_curve(boundary_curve): + """Entity outer_boundary_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__segments, + inherited2__self_intersect, + ): + boundary_curve.__init__( + self, + inherited0__name, + inherited1__segments, + inherited2__self_intersect, + ) + + +#################### +# ENTITY shape_representation_relationship # +#################### +class shape_representation_relationship(representation_relationship): + """Entity shape_representation_relationship definition.""" + + def __init__( + self, + inherited0__name, + inherited1__description, + inherited2__rep_1, + inherited3__rep_2, + ): + representation_relationship.__init__( + self, + inherited0__name, + inherited1__description, + inherited2__rep_1, + inherited3__rep_2, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.SHAPE_REPRESENTATION" == ( + TYPEOF(self.self.representation_relationship.self.rep_1) + + TYPEOF(self.self.representation_relationship.self.rep_2) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY assembly_component_usage_substitute # +#################### +class assembly_component_usage_substitute(BaseEntityClass): + """Entity assembly_component_usage_substitute definition. + + :param name + :type name:label + + :param definition + :type definition:text + + :param base + :type base:assembly_component_usage + + :param substitute + :type substitute:assembly_component_usage + """ + + def __init__( + self, + name, + definition, + base, + substitute, + ): + self.name = name + self.definition = definition + self.base = base + self.substitute = substitute + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def definition(): + def fget(self): + return self._definition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument definition is mantatory and can not be set to None") + if not check_type(value, text): + self._definition = text(value) + else: + self._definition = value + + return property(**locals()) + + @apply + def base(): + def fget(self): + return self._base + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument base is mantatory and can not be set to None") + if not check_type(value, assembly_component_usage): + self._base = assembly_component_usage(value) + else: + self._base = value + + return property(**locals()) + + @apply + def substitute(): + def fget(self): + return self._substitute + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument substitute is mantatory and can not be set to None") + if not check_type(value, assembly_component_usage): + self._substitute = assembly_component_usage(value) + else: + self._substitute = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + self.base.self.relating_product_definition + == self.substitute.self.relating_product_definition + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = self.base != self.substitute + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY degenerate_pcurve # +#################### +class degenerate_pcurve(point): + """Entity degenerate_pcurve definition. + + :param basis_surface + :type basis_surface:surface + + :param reference_to_curve + :type reference_to_curve:definitional_representation + """ + + def __init__( + self, + inherited0__name, + basis_surface, + reference_to_curve, + ): + point.__init__( + self, + inherited0__name, + ) + self.basis_surface = basis_surface + self.reference_to_curve = reference_to_curve + + @apply + def basis_surface(): + def fget(self): + return self._basis_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument basis_surface is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._basis_surface = surface(value) + else: + self._basis_surface = value + + return property(**locals()) + + @apply + def reference_to_curve(): + def fget(self): + return self._reference_to_curve + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument reference_to_curve is mantatory and can not be set to None" + ) + if not check_type(value, definitional_representation): + self._reference_to_curve = definitional_representation(value) + else: + self._reference_to_curve = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = SIZEOF(self.reference_to_curve.self.representation.self.items) == 1 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = "CONFIG_CONTROL_DESIGN.CURVE" == TYPEOF( + self.reference_to_curve.self.representation.self.items[1] + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = ( + self.reference_to_curve.self.representation.self.items[ + 1 + ].self.geometric_representation_item.self.dim + == 2 + ) + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + +#################### +# ENTITY evaluated_degenerate_pcurve # +#################### +class evaluated_degenerate_pcurve(degenerate_pcurve): + """Entity evaluated_degenerate_pcurve definition. + + :param equivalent_point + :type equivalent_point:cartesian_point + """ + + def __init__( + self, + inherited0__name, + inherited1__basis_surface, + inherited2__reference_to_curve, + equivalent_point, + ): + degenerate_pcurve.__init__( + self, + inherited0__name, + inherited1__basis_surface, + inherited2__reference_to_curve, + ) + self.equivalent_point = equivalent_point + + @apply + def equivalent_point(): + def fget(self): + return self._equivalent_point + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument equivalent_point is mantatory and can not be set to None" + ) + if not check_type(value, cartesian_point): + self._equivalent_point = cartesian_point(value) + else: + self._equivalent_point = value + + return property(**locals()) + + +#################### +# ENTITY solid_angle_measure_with_unit # +#################### +class solid_angle_measure_with_unit(measure_with_unit): + """Entity solid_angle_measure_with_unit definition.""" + + def __init__( + self, + inherited0__value_component, + inherited1__unit_component, + ): + measure_with_unit.__init__( + self, + inherited0__value_component, + inherited1__unit_component, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.SOLID_ANGLE_UNIT" == TYPEOF( + self.self.measure_with_unit.self.unit_component + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY connected_edge_set # +#################### +class connected_edge_set(topological_representation_item): + """Entity connected_edge_set definition. + + :param ces_edges + :type ces_edges:SET(1,None,'edge', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + ces_edges, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.ces_edges = ces_edges + + @apply + def ces_edges(): + def fget(self): + return self._ces_edges + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument ces_edges is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "edge", scope=schema_scope)): + self._ces_edges = SET(value) + else: + self._ces_edges = value + + return property(**locals()) + + +#################### +# ENTITY action # +#################### +class action(BaseEntityClass): + """Entity action definition. + + :param name + :type name:label + + :param description + :type description:text + + :param chosen_method + :type chosen_method:action_method + """ + + def __init__( + self, + name, + description, + chosen_method, + ): + self.name = name + self.description = description + self.chosen_method = chosen_method + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def chosen_method(): + def fget(self): + return self._chosen_method + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument chosen_method is mantatory and can not be set to None" + ) + if not check_type(value, action_method): + self._chosen_method = action_method(value) + else: + self._chosen_method = value + + return property(**locals()) + + +#################### +# ENTITY executed_action # +#################### +class executed_action(action): + """Entity executed_action definition.""" + + def __init__( + self, + inherited0__name, + inherited1__description, + inherited2__chosen_method, + ): + action.__init__( + self, + inherited0__name, + inherited1__description, + inherited2__chosen_method, + ) + + +#################### +# ENTITY directed_action # +#################### +class directed_action(executed_action): + """Entity directed_action definition. + + :param directive + :type directive:action_directive + """ + + def __init__( + self, + inherited0__name, + inherited1__description, + inherited2__chosen_method, + directive, + ): + executed_action.__init__( + self, + inherited0__name, + inherited1__description, + inherited2__chosen_method, + ) + self.directive = directive + + @apply + def directive(): + def fget(self): + return self._directive + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument directive is mantatory and can not be set to None") + if not check_type(value, action_directive): + self._directive = action_directive(value) + else: + self._directive = value + + return property(**locals()) + + +#################### +# ENTITY organizational_project # +#################### +class organizational_project(BaseEntityClass): + """Entity organizational_project definition. + + :param name + :type name:label + + :param description + :type description:text + + :param responsible_organizations + :type responsible_organizations:SET(1,None,'organization', scope = schema_scope) + """ + + def __init__( + self, + name, + description, + responsible_organizations, + ): + self.name = name + self.description = description + self.responsible_organizations = responsible_organizations + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def responsible_organizations(): + def fget(self): + return self._responsible_organizations + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument responsible_organizations is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "organization", scope=schema_scope)): + self._responsible_organizations = SET(value) + else: + self._responsible_organizations = value + + return property(**locals()) + + +#################### +# ENTITY date_time_role # +#################### +class date_time_role(BaseEntityClass): + """Entity date_time_role definition. + + :param name + :type name:label + """ + + def __init__( + self, + name, + ): + self.name = name + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + +#################### +# ENTITY curve_bounded_surface # +#################### +class curve_bounded_surface(bounded_surface): + """Entity curve_bounded_surface definition. + + :param basis_surface + :type basis_surface:surface + + :param boundaries + :type boundaries:SET(1,None,'boundary_curve', scope = schema_scope) + + :param implicit_outer + :type implicit_outer:BOOLEAN + """ + + def __init__( + self, + inherited0__name, + basis_surface, + boundaries, + implicit_outer, + ): + bounded_surface.__init__( + self, + inherited0__name, + ) + self.basis_surface = basis_surface + self.boundaries = boundaries + self.implicit_outer = implicit_outer + + @apply + def basis_surface(): + def fget(self): + return self._basis_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument basis_surface is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._basis_surface = surface(value) + else: + self._basis_surface = value + + return property(**locals()) + + @apply + def boundaries(): + def fget(self): + return self._boundaries + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument boundaries is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "boundary_curve", scope=schema_scope)): + self._boundaries = SET(value) + else: + self._boundaries = value + + return property(**locals()) + + @apply + def implicit_outer(): + def fget(self): + return self._implicit_outer + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument implicit_outer is mantatory and can not be set to None" + ) + if not check_type(value, BOOLEAN): + self._implicit_outer = BOOLEAN(value) + else: + self._implicit_outer = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not ( + self.implicit_outer + and ("CONFIG_CONTROL_DESIGN.OUTER_BOUNDARY_CURVE" == TYPEOF(self.boundaries)) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = (not self.implicit_outer) or ( + "CONFIG_CONTROL_DESIGN.BOUNDED_SURFACE" == TYPEOF(self.basis_surface) + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) <= 1 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + +#################### +# ENTITY closed_shell # +#################### +class closed_shell(connected_face_set): + """Entity closed_shell definition.""" + + def __init__( + self, + inherited0__name, + inherited1__cfs_faces, + ): + connected_face_set.__init__( + self, + inherited0__name, + inherited1__cfs_faces, + ) + + +#################### +# ENTITY design_make_from_relationship # +#################### +class design_make_from_relationship(product_definition_relationship): + """Entity design_make_from_relationship definition.""" + + def __init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + ): + product_definition_relationship.__init__( + self, + inherited0__id, + inherited1__name, + inherited2__description, + inherited3__relating_product_definition, + inherited4__related_product_definition, + ) + + +#################### +# ENTITY definitional_representation # +#################### +class definitional_representation(representation): + """Entity definitional_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.PARAMETRIC_REPRESENTATION_CONTEXT" == TYPEOF( + self.self.representation.self.context_of_items + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY product_definition_shape # +#################### +class product_definition_shape(property_definition): + """Entity product_definition_shape definition.""" + + def __init__( + self, + inherited0__name, + inherited1__description, + inherited2__definition, + ): + property_definition.__init__( + self, + inherited0__name, + inherited1__description, + inherited2__definition, + ) + + def wr1(self): + eval_wr1_wr = not ( + "CONFIG_CONTROL_DESIGN.SHAPE_DEFINITION" + == TYPEOF(self.self.property_definition.self.definition) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY si_unit # +#################### +class si_unit(named_unit): + """Entity si_unit definition. + + :param prefix + :type prefix:si_prefix + + :param name + :type name:si_unit_name + + :param named_unit_dimensions + :type named_unit_dimensions:dimensional_exponents + """ + + def __init__( + self, + inherited0__dimensions, + prefix, + name, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + self.prefix = prefix + self.name = name + + @apply + def prefix(): + def fget(self): + return self._prefix + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, si_prefix): + self._prefix = si_prefix(value) + else: + self._prefix = value + else: + self._prefix = value + + return property(**locals()) + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, si_unit_name): + self._name = si_unit_name(value) + else: + self._name = value + + return property(**locals()) + + @apply + def named_unit_dimensions(): + def fget(self): + attribute_eval = dimensions_for_si_unit(self.self.name) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument named_unit_dimensions is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + +#################### +# ENTITY bezier_surface # +#################### +class bezier_surface(b_spline_surface): + """Entity bezier_surface definition.""" + + def __init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ): + b_spline_surface.__init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ) + + +#################### +# ENTITY certification_assignment # +#################### +class certification_assignment(BaseEntityClass): + """Entity certification_assignment definition. + + :param assigned_certification + :type assigned_certification:certification + """ + + def __init__( + self, + assigned_certification, + ): + self.assigned_certification = assigned_certification + + @apply + def assigned_certification(): + def fget(self): + return self._assigned_certification + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_certification is mantatory and can not be set to None" + ) + if not check_type(value, certification): + self._assigned_certification = certification(value) + else: + self._assigned_certification = value + + return property(**locals()) + + +#################### +# ENTITY start_work # +#################### +class start_work(action_assignment): + """Entity start_work definition. + + :param items + :type items:SET(1,None,'work_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_action, + items, + ): + action_assignment.__init__( + self, + inherited0__assigned_action, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "work_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY contract_type # +#################### +class contract_type(BaseEntityClass): + """Entity contract_type definition. + + :param description + :type description:label + """ + + def __init__( + self, + description, + ): + self.description = description + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, label): + self._description = label(value) + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY b_spline_curve_with_knots # +#################### +class b_spline_curve_with_knots(b_spline_curve): + """Entity b_spline_curve_with_knots definition. + + :param knot_multiplicities + :type knot_multiplicities:LIST(2,None,'INTEGER', scope = schema_scope) + + :param knots + :type knots:LIST(2,None,'REAL', scope = schema_scope) + + :param knot_spec + :type knot_spec:knot_type + + :param upper_index_on_knots + :type upper_index_on_knots:INTEGER + """ + + def __init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + knot_multiplicities, + knots, + knot_spec, + ): + b_spline_curve.__init__( + self, + inherited0__name, + inherited1__degree, + inherited2__control_points_list, + inherited3__curve_form, + inherited4__closed_curve, + inherited5__self_intersect, + ) + self.knot_multiplicities = knot_multiplicities + self.knots = knots + self.knot_spec = knot_spec + + @apply + def knot_multiplicities(): + def fget(self): + return self._knot_multiplicities + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument knot_multiplicities is mantatory and can not be set to None" + ) + if not check_type(value, LIST(2, None, "INTEGER", scope=schema_scope)): + self._knot_multiplicities = LIST(value) + else: + self._knot_multiplicities = value + + return property(**locals()) + + @apply + def knots(): + def fget(self): + return self._knots + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument knots is mantatory and can not be set to None") + if not check_type(value, LIST(2, None, "REAL", scope=schema_scope)): + self._knots = LIST(value) + else: + self._knots = value + + return property(**locals()) + + @apply + def knot_spec(): + def fget(self): + return self._knot_spec + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument knot_spec is mantatory and can not be set to None") + if not check_type(value, knot_type): + self._knot_spec = knot_type(value) + else: + self._knot_spec = value + + return property(**locals()) + + @apply + def upper_index_on_knots(): + def fget(self): + attribute_eval = SIZEOF(self.knots) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument upper_index_on_knots is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = constraints_param_b_spline( + self.degree, + self.upper_index_on_knots, + self.upper_index_on_control_points, + self.knot_multiplicities, + self.knots, + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(self.knot_multiplicities) == self.upper_index_on_knots + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY cc_design_approval # +#################### +class cc_design_approval(approval_assignment): + """Entity cc_design_approval definition. + + :param items + :type items:SET(1,None,'approved_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_approval, + items, + ): + approval_assignment.__init__( + self, + inherited0__assigned_approval, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "approved_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY edge_based_wireframe_shape_representation # +#################### +class edge_based_wireframe_shape_representation(shape_representation): + """Entity edge_based_wireframe_shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + shape_representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) >= 1 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = SIZEOF(None) == 0 + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + def wr7(self): + eval_wr7_wr = SIZEOF(None) == 0 + if not eval_wr7_wr: + raise AssertionError("Rule wr7 violated") + else: + return eval_wr7_wr + + def wr8(self): + eval_wr8_wr = SIZEOF(None) == 0 + if not eval_wr8_wr: + raise AssertionError("Rule wr8 violated") + else: + return eval_wr8_wr + + def wr9(self): + eval_wr9_wr = ( + self.self.context_of_items.self.geometric_representation_context.self.coordinate_space_dimension + == 3 + ) + if not eval_wr9_wr: + raise AssertionError("Rule wr9 violated") + else: + return eval_wr9_wr + + +#################### +# ENTITY geometrically_bounded_wireframe_shape_representation # +#################### +class geometrically_bounded_wireframe_shape_representation(shape_representation): + """Entity geometrically_bounded_wireframe_shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + shape_representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) >= 1 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = SIZEOF(None) == 0 + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + def wr7(self): + eval_wr7_wr = SIZEOF(None) == 0 + if not eval_wr7_wr: + raise AssertionError("Rule wr7 violated") + else: + return eval_wr7_wr + + +#################### +# ENTITY product_concept # +#################### +class product_concept(BaseEntityClass): + """Entity product_concept definition. + + :param id + :type id:identifier + + :param name + :type name:label + + :param description + :type description:text + + :param market_context + :type market_context:product_concept_context + """ + + def __init__( + self, + id, + name, + description, + market_context, + ): + self.id = id + self.name = name + self.description = description + self.market_context = market_context + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def market_context(): + def fget(self): + return self._market_context + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument market_context is mantatory and can not be set to None" + ) + if not check_type(value, product_concept_context): + self._market_context = product_concept_context(value) + else: + self._market_context = value + + return property(**locals()) + + +#################### +# ENTITY cc_design_contract # +#################### +class cc_design_contract(contract_assignment): + """Entity cc_design_contract definition. + + :param items + :type items:SET(1,None,'contracted_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_contract, + items, + ): + contract_assignment.__init__( + self, + inherited0__assigned_contract, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "contracted_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY seam_curve # +#################### +class seam_curve(surface_curve): + """Entity seam_curve definition.""" + + def __init__( + self, + inherited0__name, + inherited1__curve_3d, + inherited2__associated_geometry, + inherited3__master_representation, + ): + surface_curve.__init__( + self, + inherited0__name, + inherited1__curve_3d, + inherited2__associated_geometry, + inherited3__master_representation, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(self.self.surface_curve.self.associated_geometry) == 2 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = associated_surface( + self.self.surface_curve.self.associated_geometry[1] + ) == associated_surface(self.self.surface_curve.self.associated_geometry[2]) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF( + self.self.surface_curve.self.associated_geometry[1] + ) + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF( + self.self.surface_curve.self.associated_geometry[2] + ) + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + +#################### +# ENTITY axis2_placement_3d # +#################### +class axis2_placement_3d(placement): + """Entity axis2_placement_3d definition. + + :param axis + :type axis:direction + + :param ref_direction + :type ref_direction:direction + + :param p + :type p:LIST(3,3,'direction', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__location, + axis, + ref_direction, + ): + placement.__init__( + self, + inherited0__name, + inherited1__location, + ) + self.axis = axis + self.ref_direction = ref_direction + + @apply + def axis(): + def fget(self): + return self._axis + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, direction): + self._axis = direction(value) + else: + self._axis = value + else: + self._axis = value + + return property(**locals()) + + @apply + def ref_direction(): + def fget(self): + return self._ref_direction + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, direction): + self._ref_direction = direction(value) + else: + self._ref_direction = value + else: + self._ref_direction = value + + return property(**locals()) + + @apply + def p(): + def fget(self): + attribute_eval = build_axes(self.axis, self.ref_direction) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument p is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.self.placement.self.location.self.dim == 3 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = (not EXISTS(self.axis)) or (self.axis.self.dim == 3) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = (not EXISTS(self.ref_direction)) or (self.ref_direction.self.dim == 3) + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = ((not EXISTS(self.axis)) or (not EXISTS(self.ref_direction))) or ( + cross_product(self.axis, self.ref_direction).self.magnitude > 0 + ) + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + +#################### +# ENTITY rational_b_spline_surface # +#################### +class rational_b_spline_surface(b_spline_surface): + """Entity rational_b_spline_surface definition. + + :param weights_data + :type weights_data:LIST(2,None,LIST(2,None,'REAL', scope = schema_scope)) + + :param weights + :type weights:ARRAY(0,u_upper,ARRAY(0,v_upper,'REAL', scope = schema_scope)) + """ + + def __init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + weights_data, + ): + b_spline_surface.__init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ) + self.weights_data = weights_data + + @apply + def weights_data(): + def fget(self): + return self._weights_data + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument weights_data is mantatory and can not be set to None" + ) + if not check_type(value, LIST(2, None, LIST(2, None, "REAL", scope=schema_scope))): + self._weights_data = LIST(value) + else: + self._weights_data = value + + return property(**locals()) + + @apply + def weights(): + def fget(self): + attribute_eval = make_array_of_array( + self.weights_data, 0, self.u_upper, 0, self.v_upper + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument weights is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = ( + SIZEOF(self.weights_data) == SIZEOF(self.self.b_spline_surface.self.control_points_list) + ) and ( + SIZEOF(self.weights_data[1]) + == SIZEOF(self.self.b_spline_surface.self.control_points_list[1]) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = surface_weights_positive(self) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY configuration_design # +#################### +class configuration_design(BaseEntityClass): + """Entity configuration_design definition. + + :param configuration + :type configuration:configuration_item + + :param design + :type design:product_definition_formation + """ + + def __init__( + self, + configuration, + design, + ): + self.configuration = configuration + self.design = design + + @apply + def configuration(): + def fget(self): + return self._configuration + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument configuration is mantatory and can not be set to None" + ) + if not check_type(value, configuration_item): + self._configuration = configuration_item(value) + else: + self._configuration = value + + return property(**locals()) + + @apply + def design(): + def fget(self): + return self._design + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument design is mantatory and can not be set to None") + if not check_type(value, product_definition_formation): + self._design = product_definition_formation(value) + else: + self._design = value + + return property(**locals()) + + +#################### +# ENTITY design_context # +#################### +class design_context(product_definition_context): + """Entity design_context definition.""" + + def __init__( + self, + inherited0__name, + inherited1__frame_of_reference, + inherited2__life_cycle_stage, + ): + product_definition_context.__init__( + self, + inherited0__name, + inherited1__frame_of_reference, + inherited2__life_cycle_stage, + ) + + def wr1(self): + eval_wr1_wr = self.self.life_cycle_stage == "design" + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY product_definition # +#################### +class product_definition(BaseEntityClass): + """Entity product_definition definition. + + :param id + :type id:identifier + + :param description + :type description:text + + :param formation + :type formation:product_definition_formation + + :param frame_of_reference + :type frame_of_reference:product_definition_context + """ + + def __init__( + self, + id, + description, + formation, + frame_of_reference, + ): + self.id = id + self.description = description + self.formation = formation + self.frame_of_reference = frame_of_reference + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument id is mantatory and can not be set to None") + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def formation(): + def fget(self): + return self._formation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument formation is mantatory and can not be set to None") + if not check_type(value, product_definition_formation): + self._formation = product_definition_formation(value) + else: + self._formation = value + + return property(**locals()) + + @apply + def frame_of_reference(): + def fget(self): + return self._frame_of_reference + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument frame_of_reference is mantatory and can not be set to None" + ) + if not check_type(value, product_definition_context): + self._frame_of_reference = product_definition_context(value) + else: + self._frame_of_reference = value + + return property(**locals()) + + +#################### +# ENTITY product_definition_with_associated_documents # +#################### +class product_definition_with_associated_documents(product_definition): + """Entity product_definition_with_associated_documents definition. + + :param documentation_ids + :type documentation_ids:SET(1,None,'document', scope = schema_scope) + """ + + def __init__( + self, + inherited0__id, + inherited1__description, + inherited2__formation, + inherited3__frame_of_reference, + documentation_ids, + ): + product_definition.__init__( + self, + inherited0__id, + inherited1__description, + inherited2__formation, + inherited3__frame_of_reference, + ) + self.documentation_ids = documentation_ids + + @apply + def documentation_ids(): + def fget(self): + return self._documentation_ids + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument documentation_ids is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "document", scope=schema_scope)): + self._documentation_ids = SET(value) + else: + self._documentation_ids = value + + return property(**locals()) + + +#################### +# ENTITY organization # +#################### +class organization(BaseEntityClass): + """Entity organization definition. + + :param id + :type id:identifier + + :param name + :type name:label + + :param description + :type description:text + """ + + def __init__( + self, + id, + name, + description, + ): + self.id = id + self.name = name + self.description = description + + @apply + def id(): + def fget(self): + return self._id + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, identifier): + self._id = identifier(value) + else: + self._id = value + else: + self._id = value + + return property(**locals()) + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY cc_design_certification # +#################### +class cc_design_certification(certification_assignment): + """Entity cc_design_certification definition. + + :param items + :type items:SET(1,None,'certified_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_certification, + items, + ): + certification_assignment.__init__( + self, + inherited0__assigned_certification, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "certified_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY b_spline_surface_with_knots # +#################### +class b_spline_surface_with_knots(b_spline_surface): + """Entity b_spline_surface_with_knots definition. + + :param u_multiplicities + :type u_multiplicities:LIST(2,None,'INTEGER', scope = schema_scope) + + :param v_multiplicities + :type v_multiplicities:LIST(2,None,'INTEGER', scope = schema_scope) + + :param u_knots + :type u_knots:LIST(2,None,'REAL', scope = schema_scope) + + :param v_knots + :type v_knots:LIST(2,None,'REAL', scope = schema_scope) + + :param knot_spec + :type knot_spec:knot_type + + :param knot_u_upper + :type knot_u_upper:INTEGER + + :param knot_v_upper + :type knot_v_upper:INTEGER + """ + + def __init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + u_multiplicities, + v_multiplicities, + u_knots, + v_knots, + knot_spec, + ): + b_spline_surface.__init__( + self, + inherited0__name, + inherited1__u_degree, + inherited2__v_degree, + inherited3__control_points_list, + inherited4__surface_form, + inherited5__u_closed, + inherited6__v_closed, + inherited7__self_intersect, + ) + self.u_multiplicities = u_multiplicities + self.v_multiplicities = v_multiplicities + self.u_knots = u_knots + self.v_knots = v_knots + self.knot_spec = knot_spec + + @apply + def u_multiplicities(): + def fget(self): + return self._u_multiplicities + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument u_multiplicities is mantatory and can not be set to None" + ) + if not check_type(value, LIST(2, None, "INTEGER", scope=schema_scope)): + self._u_multiplicities = LIST(value) + else: + self._u_multiplicities = value + + return property(**locals()) + + @apply + def v_multiplicities(): + def fget(self): + return self._v_multiplicities + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument v_multiplicities is mantatory and can not be set to None" + ) + if not check_type(value, LIST(2, None, "INTEGER", scope=schema_scope)): + self._v_multiplicities = LIST(value) + else: + self._v_multiplicities = value + + return property(**locals()) + + @apply + def u_knots(): + def fget(self): + return self._u_knots + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument u_knots is mantatory and can not be set to None") + if not check_type(value, LIST(2, None, "REAL", scope=schema_scope)): + self._u_knots = LIST(value) + else: + self._u_knots = value + + return property(**locals()) + + @apply + def v_knots(): + def fget(self): + return self._v_knots + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument v_knots is mantatory and can not be set to None") + if not check_type(value, LIST(2, None, "REAL", scope=schema_scope)): + self._v_knots = LIST(value) + else: + self._v_knots = value + + return property(**locals()) + + @apply + def knot_spec(): + def fget(self): + return self._knot_spec + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument knot_spec is mantatory and can not be set to None") + if not check_type(value, knot_type): + self._knot_spec = knot_type(value) + else: + self._knot_spec = value + + return property(**locals()) + + @apply + def knot_u_upper(): + def fget(self): + attribute_eval = SIZEOF(self.u_knots) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument knot_u_upper is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + @apply + def knot_v_upper(): + def fget(self): + attribute_eval = SIZEOF(self.v_knots) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument knot_v_upper is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = constraints_param_b_spline( + self.self.b_spline_surface.self.u_degree, + self.knot_u_upper, + self.self.b_spline_surface.self.u_upper, + self.u_multiplicities, + self.u_knots, + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = constraints_param_b_spline( + self.self.b_spline_surface.self.v_degree, + self.knot_v_upper, + self.self.b_spline_surface.self.v_upper, + self.v_multiplicities, + self.v_knots, + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(self.u_multiplicities) == self.knot_u_upper + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(self.v_multiplicities) == self.knot_v_upper + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + +#################### +# ENTITY certification_type # +#################### +class certification_type(BaseEntityClass): + """Entity certification_type definition. + + :param description + :type description:label + """ + + def __init__( + self, + description, + ): + self.description = description + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, label): + self._description = label(value) + else: + self._description = value + + return property(**locals()) + + +#################### +# ENTITY oriented_path # +#################### +class oriented_path(path): + """Entity oriented_path definition. + + :param path_element + :type path_element:path + + :param orientation + :type orientation:BOOLEAN + + :param path_edge_list + :type path_edge_list:LIST(1,None,'oriented_edge', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__edge_list, + path_element, + orientation, + ): + path.__init__( + self, + inherited0__name, + inherited1__edge_list, + ) + self.path_element = path_element + self.orientation = orientation + + @apply + def path_element(): + def fget(self): + return self._path_element + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument path_element is mantatory and can not be set to None" + ) + if not check_type(value, path): + self._path_element = path(value) + else: + self._path_element = value + + return property(**locals()) + + @apply + def orientation(): + def fget(self): + return self._orientation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument orientation is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._orientation = BOOLEAN(value) + else: + self._orientation = value + + return property(**locals()) + + @apply + def path_edge_list(): + def fget(self): + attribute_eval = conditional_reverse( + self.self.orientation, self.self.path_element.self.edge_list + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument path_edge_list is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not ("CONFIG_CONTROL_DESIGN.ORIENTED_PATH" == TYPEOF(self.self.path_element)) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY security_classification # +#################### +class security_classification(BaseEntityClass): + """Entity security_classification definition. + + :param name + :type name:label + + :param purpose + :type purpose:text + + :param security_level + :type security_level:security_classification_level + """ + + def __init__( + self, + name, + purpose, + security_level, + ): + self.name = name + self.purpose = purpose + self.security_level = security_level + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def purpose(): + def fget(self): + return self._purpose + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument purpose is mantatory and can not be set to None") + if not check_type(value, text): + self._purpose = text(value) + else: + self._purpose = value + + return property(**locals()) + + @apply + def security_level(): + def fget(self): + return self._security_level + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument security_level is mantatory and can not be set to None" + ) + if not check_type(value, security_classification_level): + self._security_level = security_classification_level(value) + else: + self._security_level = value + + return property(**locals()) + + +#################### +# ENTITY vertex_loop # +#################### +class vertex_loop(loop): + """Entity vertex_loop definition. + + :param loop_vertex + :type loop_vertex:vertex + """ + + def __init__( + self, + inherited0__name, + loop_vertex, + ): + loop.__init__( + self, + inherited0__name, + ) + self.loop_vertex = loop_vertex + + @apply + def loop_vertex(): + def fget(self): + return self._loop_vertex + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument loop_vertex is mantatory and can not be set to None") + if not check_type(value, vertex): + self._loop_vertex = vertex(value) + else: + self._loop_vertex = value + + return property(**locals()) + + +#################### +# ENTITY approval_status # +#################### +class approval_status(BaseEntityClass): + """Entity approval_status definition. + + :param name + :type name:label + """ + + def __init__( + self, + name, + ): + self.name = name + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + +#################### +# ENTITY cartesian_point # +#################### +class cartesian_point(point): + """Entity cartesian_point definition. + + :param coordinates + :type coordinates:LIST(1,3,'REAL', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + coordinates, + ): + point.__init__( + self, + inherited0__name, + ) + self.coordinates = coordinates + + @apply + def coordinates(): + def fget(self): + return self._coordinates + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument coordinates is mantatory and can not be set to None") + if not check_type(value, LIST(1, 3, "REAL", scope=schema_scope)): + self._coordinates = LIST(value) + else: + self._coordinates = value + + return property(**locals()) + + +#################### +# ENTITY date_and_time_assignment # +#################### +class date_and_time_assignment(BaseEntityClass): + """Entity date_and_time_assignment definition. + + :param assigned_date_and_time + :type assigned_date_and_time:date_and_time + + :param role + :type role:date_time_role + """ + + def __init__( + self, + assigned_date_and_time, + role, + ): + self.assigned_date_and_time = assigned_date_and_time + self.role = role + + @apply + def assigned_date_and_time(): + def fget(self): + return self._assigned_date_and_time + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_date_and_time is mantatory and can not be set to None" + ) + if not check_type(value, date_and_time): + self._assigned_date_and_time = date_and_time(value) + else: + self._assigned_date_and_time = value + + return property(**locals()) + + @apply + def role(): + def fget(self): + return self._role + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument role is mantatory and can not be set to None") + if not check_type(value, date_time_role): + self._role = date_time_role(value) + else: + self._role = value + + return property(**locals()) + + +#################### +# ENTITY parametric_representation_context # +#################### +class parametric_representation_context(representation_context): + """Entity parametric_representation_context definition.""" + + def __init__( + self, + inherited0__context_identifier, + inherited1__context_type, + ): + representation_context.__init__( + self, + inherited0__context_identifier, + inherited1__context_type, + ) + + +#################### +# ENTITY product_concept_context # +#################### +class product_concept_context(application_context_element): + """Entity product_concept_context definition. + + :param market_segment_type + :type market_segment_type:label + """ + + def __init__( + self, + inherited0__name, + inherited1__frame_of_reference, + market_segment_type, + ): + application_context_element.__init__( + self, + inherited0__name, + inherited1__frame_of_reference, + ) + self.market_segment_type = market_segment_type + + @apply + def market_segment_type(): + def fget(self): + return self._market_segment_type + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument market_segment_type is mantatory and can not be set to None" + ) + if not check_type(value, label): + self._market_segment_type = label(value) + else: + self._market_segment_type = value + + return property(**locals()) + + +#################### +# ENTITY surface_patch # +#################### +class surface_patch(founded_item): + """Entity surface_patch definition. + + :param parent_surface + :type parent_surface:bounded_surface + + :param u_transition + :type u_transition:transition_code + + :param v_transition + :type v_transition:transition_code + + :param u_sense + :type u_sense:BOOLEAN + + :param v_sense + :type v_sense:BOOLEAN + + :param using_surfaces + :type using_surfaces:BAG(1,None,'rectangular_composite_surface', scope = schema_scope) + """ + + def __init__( + self, + parent_surface, + u_transition, + v_transition, + u_sense, + v_sense, + ): + founded_item.__init__( + self, + ) + self.parent_surface = parent_surface + self.u_transition = u_transition + self.v_transition = v_transition + self.u_sense = u_sense + self.v_sense = v_sense + + @apply + def parent_surface(): + def fget(self): + return self._parent_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument parent_surface is mantatory and can not be set to None" + ) + if not check_type(value, bounded_surface): + self._parent_surface = bounded_surface(value) + else: + self._parent_surface = value + + return property(**locals()) + + @apply + def u_transition(): + def fget(self): + return self._u_transition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument u_transition is mantatory and can not be set to None" + ) + if not check_type(value, transition_code): + self._u_transition = transition_code(value) + else: + self._u_transition = value + + return property(**locals()) + + @apply + def v_transition(): + def fget(self): + return self._v_transition + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument v_transition is mantatory and can not be set to None" + ) + if not check_type(value, transition_code): + self._v_transition = transition_code(value) + else: + self._v_transition = value + + return property(**locals()) + + @apply + def u_sense(): + def fget(self): + return self._u_sense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument u_sense is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._u_sense = BOOLEAN(value) + else: + self._u_sense = value + + return property(**locals()) + + @apply + def v_sense(): + def fget(self): + return self._v_sense + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument v_sense is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._v_sense = BOOLEAN(value) + else: + self._v_sense = value + + return property(**locals()) + + @apply + def using_surfaces(): + def fget(self): + return self._using_surfaces + + def fset(self, value): + # INVERSE argument + raise AssertionError( + "Argument using_surfaces is INVERSE. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not ( + "CONFIG_CONTROL_DESIGN.CURVE_BOUNDED_SURFACE" == TYPEOF(self.parent_surface) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY length_unit # +#################### +class length_unit(named_unit): + """Entity length_unit definition.""" + + def __init__( + self, + inherited0__dimensions, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + + def wr1(self): + eval_wr1_wr = ( + ( + ( + ( + ( + (self.self.named_unit.self.dimensions.self.length_exponent == 1) + and (self.self.named_unit.self.dimensions.self.mass_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.time_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0) + ) + and ( + self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent + == 0 + ) + ) + and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0) + ) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY shape_aspect # +#################### +class shape_aspect(BaseEntityClass): + """Entity shape_aspect definition. + + :param name + :type name:label + + :param description + :type description:text + + :param of_shape + :type of_shape:product_definition_shape + + :param product_definitional + :type product_definitional:LOGICAL + """ + + def __init__( + self, + name, + description, + of_shape, + product_definitional, + ): + self.name = name + self.description = description + self.of_shape = of_shape + self.product_definitional = product_definitional + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def of_shape(): + def fget(self): + return self._of_shape + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument of_shape is mantatory and can not be set to None") + if not check_type(value, product_definition_shape): + self._of_shape = product_definition_shape(value) + else: + self._of_shape = value + + return property(**locals()) + + @apply + def product_definitional(): + def fget(self): + return self._product_definitional + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument product_definitional is mantatory and can not be set to None" + ) + if not check_type(value, LOGICAL): + self._product_definitional = LOGICAL(value) + else: + self._product_definitional = value + + return property(**locals()) + + +#################### +# ENTITY volume_measure_with_unit # +#################### +class volume_measure_with_unit(measure_with_unit): + """Entity volume_measure_with_unit definition.""" + + def __init__( + self, + inherited0__value_component, + inherited1__unit_component, + ): + measure_with_unit.__init__( + self, + inherited0__value_component, + inherited1__unit_component, + ) + + def wr1(self): + eval_wr1_wr = "CONFIG_CONTROL_DESIGN.VOLUME_UNIT" == TYPEOF( + self.self.measure_with_unit.self.unit_component + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY advanced_face # +#################### +class advanced_face(face_surface): + """Entity advanced_face definition.""" + + def __init__( + self, + inherited0__name, + inherited1__bounds, + inherited2__name, + inherited3__face_geometry, + inherited4__same_sense, + ): + face_surface.__init__( + self, + inherited0__name, + inherited1__bounds, + inherited2__name, + inherited3__face_geometry, + inherited4__same_sense, + ) + + def wr1(self): + eval_wr1_wr = ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.ELEMENTARY_SURFACE", + "CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE", + "CONFIG_CONTROL_DESIGN.SWEPT_SURFACE", + ] + * TYPEOF(self.face_geometry) + ) + == 1 + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) == 0 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = ( + not ("CONFIG_CONTROL_DESIGN.SWEPT_SURFACE" == TYPEOF(self.face_geometry)) + ) or ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.LINE", + "CONFIG_CONTROL_DESIGN.CONIC", + "CONFIG_CONTROL_DESIGN.POLYLINE", + "CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE", + ] + * TYPEOF(self.face_geometry.self.swept_surface.self.swept_curve) + ) + == 1 + ) + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + def wr7(self): + eval_wr7_wr = SIZEOF(None) == 0 + if not eval_wr7_wr: + raise AssertionError("Rule wr7 violated") + else: + return eval_wr7_wr + + def wr8(self): + eval_wr8_wr = SIZEOF(None) == 0 + if not eval_wr8_wr: + raise AssertionError("Rule wr8 violated") + else: + return eval_wr8_wr + + def wr9(self): + eval_wr9_wr = SIZEOF(None) == 0 + if not eval_wr9_wr: + raise AssertionError("Rule wr9 violated") + else: + return eval_wr9_wr + + def wr10(self): + eval_wr10_wr = ( + ( + (not ("CONFIG_CONTROL_DESIGN.SWEPT_SURFACE" == TYPEOF(self.face_geometry))) + or ( + not ( + "CONFIG_CONTROL_DESIGN.POLYLINE" + == TYPEOF(self.face_geometry.self.swept_surface.self.swept_curve) + ) + ) + ) + or ( + SIZEOF( + self.face_geometry.self.swept_surface.self.swept_curve.self.polyline.self.points + ) + >= 3 + ) + ) and (SIZEOF(None) == 0) + if not eval_wr10_wr: + raise AssertionError("Rule wr10 violated") + else: + return eval_wr10_wr + + +#################### +# ENTITY security_classification_level # +#################### +class security_classification_level(BaseEntityClass): + """Entity security_classification_level definition. + + :param name + :type name:label + """ + + def __init__( + self, + name, + ): + self.name = name + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + +#################### +# ENTITY approval_relationship # +#################### +class approval_relationship(BaseEntityClass): + """Entity approval_relationship definition. + + :param name + :type name:label + + :param description + :type description:text + + :param relating_approval + :type relating_approval:approval + + :param related_approval + :type related_approval:approval + """ + + def __init__( + self, + name, + description, + relating_approval, + related_approval, + ): + self.name = name + self.description = description + self.relating_approval = relating_approval + self.related_approval = related_approval + + @apply + def name(): + def fget(self): + return self._name + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument name is mantatory and can not be set to None") + if not check_type(value, label): + self._name = label(value) + else: + self._name = value + + return property(**locals()) + + @apply + def description(): + def fget(self): + return self._description + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument description is mantatory and can not be set to None") + if not check_type(value, text): + self._description = text(value) + else: + self._description = value + + return property(**locals()) + + @apply + def relating_approval(): + def fget(self): + return self._relating_approval + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument relating_approval is mantatory and can not be set to None" + ) + if not check_type(value, approval): + self._relating_approval = approval(value) + else: + self._relating_approval = value + + return property(**locals()) + + @apply + def related_approval(): + def fget(self): + return self._related_approval + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument related_approval is mantatory and can not be set to None" + ) + if not check_type(value, approval): + self._related_approval = approval(value) + else: + self._related_approval = value + + return property(**locals()) + + +#################### +# ENTITY polyline # +#################### +class polyline(bounded_curve): + """Entity polyline definition. + + :param points + :type points:LIST(2,None,'cartesian_point', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + points, + ): + bounded_curve.__init__( + self, + inherited0__name, + ) + self.points = points + + @apply + def points(): + def fget(self): + return self._points + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument points is mantatory and can not be set to None") + if not check_type(value, LIST(2, None, "cartesian_point", scope=schema_scope)): + self._points = LIST(value) + else: + self._points = value + + return property(**locals()) + + +#################### +# ENTITY approval_person_organization # +#################### +class approval_person_organization(BaseEntityClass): + """Entity approval_person_organization definition. + + :param person_organization + :type person_organization:person_organization_select + + :param authorized_approval + :type authorized_approval:approval + + :param role + :type role:approval_role + """ + + def __init__( + self, + person_organization, + authorized_approval, + role, + ): + self.person_organization = person_organization + self.authorized_approval = authorized_approval + self.role = role + + @apply + def person_organization(): + def fget(self): + return self._person_organization + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument person_organization is mantatory and can not be set to None" + ) + if not check_type(value, person_organization_select): + self._person_organization = person_organization_select(value) + else: + self._person_organization = value + + return property(**locals()) + + @apply + def authorized_approval(): + def fget(self): + return self._authorized_approval + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument authorized_approval is mantatory and can not be set to None" + ) + if not check_type(value, approval): + self._authorized_approval = approval(value) + else: + self._authorized_approval = value + + return property(**locals()) + + @apply + def role(): + def fget(self): + return self._role + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument role is mantatory and can not be set to None") + if not check_type(value, approval_role): + self._role = approval_role(value) + else: + self._role = value + + return property(**locals()) + + +#################### +# ENTITY surface_replica # +#################### +class surface_replica(surface): + """Entity surface_replica definition. + + :param parent_surface + :type parent_surface:surface + + :param transformation + :type transformation:cartesian_transformation_operator_3d + """ + + def __init__( + self, + inherited0__name, + parent_surface, + transformation, + ): + surface.__init__( + self, + inherited0__name, + ) + self.parent_surface = parent_surface + self.transformation = transformation + + @apply + def parent_surface(): + def fget(self): + return self._parent_surface + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument parent_surface is mantatory and can not be set to None" + ) + if not check_type(value, surface): + self._parent_surface = surface(value) + else: + self._parent_surface = value + + return property(**locals()) + + @apply + def transformation(): + def fget(self): + return self._transformation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument transformation is mantatory and can not be set to None" + ) + if not check_type(value, cartesian_transformation_operator_3d): + self._transformation = cartesian_transformation_operator_3d(value) + else: + self._transformation = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = acyclic_surface_replica(self, self.parent_surface) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY security_classification_assignment # +#################### +class security_classification_assignment(BaseEntityClass): + """Entity security_classification_assignment definition. + + :param assigned_security_classification + :type assigned_security_classification:security_classification + """ + + def __init__( + self, + assigned_security_classification, + ): + self.assigned_security_classification = assigned_security_classification + + @apply + def assigned_security_classification(): + def fget(self): + return self._assigned_security_classification + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument assigned_security_classification is mantatory and can not be set to None" + ) + if not check_type(value, security_classification): + self._assigned_security_classification = security_classification(value) + else: + self._assigned_security_classification = value + + return property(**locals()) + + +#################### +# ENTITY cc_design_security_classification # +#################### +class cc_design_security_classification(security_classification_assignment): + """Entity cc_design_security_classification definition. + + :param items + :type items:SET(1,None,'classified_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_security_classification, + items, + ): + security_classification_assignment.__init__( + self, + inherited0__assigned_security_classification, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "classified_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + +#################### +# ENTITY faceted_brep_shape_representation # +#################### +class faceted_brep_shape_representation(shape_representation): + """Entity faceted_brep_shape_representation definition.""" + + def __init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ): + shape_representation.__init__( + self, + inherited0__name, + inherited1__items, + inherited2__context_of_items, + ) + + def wr1(self): + eval_wr1_wr = SIZEOF(None) == 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = SIZEOF(None) > 0 + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + def wr3(self): + eval_wr3_wr = SIZEOF(None) == 0 + if not eval_wr3_wr: + raise AssertionError("Rule wr3 violated") + else: + return eval_wr3_wr + + def wr4(self): + eval_wr4_wr = SIZEOF(None) == 0 + if not eval_wr4_wr: + raise AssertionError("Rule wr4 violated") + else: + return eval_wr4_wr + + def wr5(self): + eval_wr5_wr = SIZEOF(None) == 0 + if not eval_wr5_wr: + raise AssertionError("Rule wr5 violated") + else: + return eval_wr5_wr + + def wr6(self): + eval_wr6_wr = SIZEOF(None) == 0 + if not eval_wr6_wr: + raise AssertionError("Rule wr6 violated") + else: + return eval_wr6_wr + + def wr7(self): + eval_wr7_wr = SIZEOF(None) == 0 + if not eval_wr7_wr: + raise AssertionError("Rule wr7 violated") + else: + return eval_wr7_wr + + +#################### +# ENTITY document_usage_constraint # +#################### +class document_usage_constraint(BaseEntityClass): + """Entity document_usage_constraint definition. + + :param source + :type source:document + + :param subject_element + :type subject_element:label + + :param subject_element_value + :type subject_element_value:text + """ + + def __init__( + self, + source, + subject_element, + subject_element_value, + ): + self.source = source + self.subject_element = subject_element + self.subject_element_value = subject_element_value + + @apply + def source(): + def fget(self): + return self._source + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument source is mantatory and can not be set to None") + if not check_type(value, document): + self._source = document(value) + else: + self._source = value + + return property(**locals()) + + @apply + def subject_element(): + def fget(self): + return self._subject_element + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument subject_element is mantatory and can not be set to None" + ) + if not check_type(value, label): + self._subject_element = label(value) + else: + self._subject_element = value + + return property(**locals()) + + @apply + def subject_element_value(): + def fget(self): + return self._subject_element_value + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument subject_element_value is mantatory and can not be set to None" + ) + if not check_type(value, text): + self._subject_element_value = text(value) + else: + self._subject_element_value = value + + return property(**locals()) + + +#################### +# ENTITY vertex_point # +#################### +class vertex_point(vertex, geometric_representation_item): + """Entity vertex_point definition. + + :param vertex_geometry + :type vertex_geometry:point + """ + + def __init__( + self, + inherited0__name, + inherited1__name, + vertex_geometry, + ): + vertex.__init__( + self, + inherited0__name, + ) + geometric_representation_item.__init__( + self, + inherited1__name, + ) + self.vertex_geometry = vertex_geometry + + @apply + def vertex_geometry(): + def fget(self): + return self._vertex_geometry + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument vertex_geometry is mantatory and can not be set to None" + ) + if not check_type(value, point): + self._vertex_geometry = point(value) + else: + self._vertex_geometry = value + + return property(**locals()) + + +#################### +# ENTITY cc_design_date_and_time_assignment # +#################### +class cc_design_date_and_time_assignment(date_and_time_assignment): + """Entity cc_design_date_and_time_assignment definition. + + :param items + :type items:SET(1,None,'date_time_item', scope = schema_scope) + """ + + def __init__( + self, + inherited0__assigned_date_and_time, + inherited1__role, + items, + ): + date_and_time_assignment.__init__( + self, + inherited0__assigned_date_and_time, + inherited1__role, + ) + self.items = items + + @apply + def items(): + def fget(self): + return self._items + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument items is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "date_time_item", scope=schema_scope)): + self._items = SET(value) + else: + self._items = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = cc_design_date_time_correlation(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY oriented_closed_shell # +#################### +class oriented_closed_shell(closed_shell): + """Entity oriented_closed_shell definition. + + :param closed_shell_element + :type closed_shell_element:closed_shell + + :param orientation + :type orientation:BOOLEAN + + :param connected_face_set_cfs_faces + :type connected_face_set_cfs_faces:SET(1,None,'face', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__cfs_faces, + closed_shell_element, + orientation, + ): + closed_shell.__init__( + self, + inherited0__name, + inherited1__cfs_faces, + ) + self.closed_shell_element = closed_shell_element + self.orientation = orientation + + @apply + def closed_shell_element(): + def fget(self): + return self._closed_shell_element + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument closed_shell_element is mantatory and can not be set to None" + ) + if not check_type(value, closed_shell): + self._closed_shell_element = closed_shell(value) + else: + self._closed_shell_element = value + + return property(**locals()) + + @apply + def orientation(): + def fget(self): + return self._orientation + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument orientation is mantatory and can not be set to None") + if not check_type(value, BOOLEAN): + self._orientation = BOOLEAN(value) + else: + self._orientation = value + + return property(**locals()) + + @apply + def connected_face_set_cfs_faces(): + def fget(self): + attribute_eval = conditional_reverse( + self.self.orientation, self.self.closed_shell_element.self.cfs_faces + ) + return attribute_eval + + def fset(self, value): + # DERIVED argument + raise AssertionError( + "Argument connected_face_set_cfs_faces is DERIVED. It is computed and can not be set to any value" + ) + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not ( + "CONFIG_CONTROL_DESIGN.ORIENTED_CLOSED_SHELL" == TYPEOF(self.self.closed_shell_element) + ) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY person_and_organization # +#################### +class person_and_organization(BaseEntityClass): + """Entity person_and_organization definition. + + :param the_person + :type the_person:person + + :param the_organization + :type the_organization:organization + """ + + def __init__( + self, + the_person, + the_organization, + ): + self.the_person = the_person + self.the_organization = the_organization + + @apply + def the_person(): + def fget(self): + return self._the_person + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument the_person is mantatory and can not be set to None") + if not check_type(value, person): + self._the_person = person(value) + else: + self._the_person = value + + return property(**locals()) + + @apply + def the_organization(): + def fget(self): + return self._the_organization + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument the_organization is mantatory and can not be set to None" + ) + if not check_type(value, organization): + self._the_organization = organization(value) + else: + self._the_organization = value + + return property(**locals()) + + +#################### +# ENTITY cylindrical_surface # +#################### +class cylindrical_surface(elementary_surface): + """Entity cylindrical_surface definition. + + :param radius + :type radius:positive_length_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + radius, + ): + elementary_surface.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.radius = radius + + @apply + def radius(): + def fget(self): + return self._radius + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument radius is mantatory and can not be set to None") + if not check_type(value, positive_length_measure): + self._radius = positive_length_measure(value) + else: + self._radius = value + + return property(**locals()) + + +#################### +# ENTITY local_time # +#################### +class local_time(BaseEntityClass): + """Entity local_time definition. + + :param hour_component + :type hour_component:hour_in_day + + :param minute_component + :type minute_component:minute_in_hour + + :param second_component + :type second_component:second_in_minute + + :param zone + :type zone:coordinated_universal_time_offset + """ + + def __init__( + self, + hour_component, + minute_component, + second_component, + zone, + ): + self.hour_component = hour_component + self.minute_component = minute_component + self.second_component = second_component + self.zone = zone + + @apply + def hour_component(): + def fget(self): + return self._hour_component + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument hour_component is mantatory and can not be set to None" + ) + if not check_type(value, hour_in_day): + self._hour_component = hour_in_day(value) + else: + self._hour_component = value + + return property(**locals()) + + @apply + def minute_component(): + def fget(self): + return self._minute_component + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, minute_in_hour): + self._minute_component = minute_in_hour(value) + else: + self._minute_component = value + else: + self._minute_component = value + + return property(**locals()) + + @apply + def second_component(): + def fget(self): + return self._second_component + + def fset(self, value): + if value != None: # OPTIONAL attribute + if not check_type(value, second_in_minute): + self._second_component = second_in_minute(value) + else: + self._second_component = value + else: + self._second_component = value + + return property(**locals()) + + @apply + def zone(): + def fget(self): + return self._zone + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument zone is mantatory and can not be set to None") + if not check_type(value, coordinated_universal_time_offset): + self._zone = coordinated_universal_time_offset(value) + else: + self._zone = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = valid_time(self) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY mass_unit # +#################### +class mass_unit(named_unit): + """Entity mass_unit definition.""" + + def __init__( + self, + inherited0__dimensions, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + + def wr1(self): + eval_wr1_wr = ( + ( + ( + ( + ( + (self.self.named_unit.self.dimensions.self.length_exponent == 0) + and (self.self.named_unit.self.dimensions.self.mass_exponent == 1) + ) + and (self.self.named_unit.self.dimensions.self.time_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0) + ) + and ( + self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent + == 0 + ) + ) + and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0) + ) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY vertex_shell # +#################### +class vertex_shell(topological_representation_item): + """Entity vertex_shell definition. + + :param vertex_shell_extent + :type vertex_shell_extent:vertex_loop + """ + + def __init__( + self, + inherited0__name, + vertex_shell_extent, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.vertex_shell_extent = vertex_shell_extent + + @apply + def vertex_shell_extent(): + def fget(self): + return self._vertex_shell_extent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument vertex_shell_extent is mantatory and can not be set to None" + ) + if not check_type(value, vertex_loop): + self._vertex_shell_extent = vertex_loop(value) + else: + self._vertex_shell_extent = value + + return property(**locals()) + + +#################### +# ENTITY poly_loop # +#################### +class poly_loop(loop, geometric_representation_item): + """Entity poly_loop definition. + + :param polygon + :type polygon:LIST(3,None,'cartesian_point', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + inherited1__name, + polygon, + ): + loop.__init__( + self, + inherited0__name, + ) + geometric_representation_item.__init__( + self, + inherited1__name, + ) + self.polygon = polygon + + @apply + def polygon(): + def fget(self): + return self._polygon + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument polygon is mantatory and can not be set to None") + if not check_type(value, LIST(3, None, "cartesian_point", scope=schema_scope)): + self._polygon = LIST(value) + else: + self._polygon = value + + return property(**locals()) + + +#################### +# ENTITY wire_shell # +#################### +class wire_shell(topological_representation_item): + """Entity wire_shell definition. + + :param wire_shell_extent + :type wire_shell_extent:SET(1,None,'loop', scope = schema_scope) + """ + + def __init__( + self, + inherited0__name, + wire_shell_extent, + ): + topological_representation_item.__init__( + self, + inherited0__name, + ) + self.wire_shell_extent = wire_shell_extent + + @apply + def wire_shell_extent(): + def fget(self): + return self._wire_shell_extent + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument wire_shell_extent is mantatory and can not be set to None" + ) + if not check_type(value, SET(1, None, "loop", scope=schema_scope)): + self._wire_shell_extent = SET(value) + else: + self._wire_shell_extent = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = not mixed_loop_type_set(self.wire_shell_extent) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY area_unit # +#################### +class area_unit(named_unit): + """Entity area_unit definition.""" + + def __init__( + self, + inherited0__dimensions, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + + def wr1(self): + eval_wr1_wr = ( + ( + ( + ( + ( + (self.self.named_unit.self.dimensions.self.length_exponent == 2) + and (self.self.named_unit.self.dimensions.self.mass_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.time_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0) + ) + and ( + self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent + == 0 + ) + ) + and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0) + ) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY mapped_item # +#################### +class mapped_item(representation_item): + """Entity mapped_item definition. + + :param mapping_source + :type mapping_source:representation_map + + :param mapping_target + :type mapping_target:representation_item + """ + + def __init__( + self, + inherited0__name, + mapping_source, + mapping_target, + ): + representation_item.__init__( + self, + inherited0__name, + ) + self.mapping_source = mapping_source + self.mapping_target = mapping_target + + @apply + def mapping_source(): + def fget(self): + return self._mapping_source + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument mapping_source is mantatory and can not be set to None" + ) + if not check_type(value, representation_map): + self._mapping_source = representation_map(value) + else: + self._mapping_source = value + + return property(**locals()) + + @apply + def mapping_target(): + def fget(self): + return self._mapping_target + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError( + "Argument mapping_target is mantatory and can not be set to None" + ) + if not check_type(value, representation_item): + self._mapping_target = representation_item(value) + else: + self._mapping_target = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = acyclic_mapped_representation(using_representations(self), [self]) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY shape_definition_representation # +#################### +class shape_definition_representation(property_definition_representation): + """Entity shape_definition_representation definition.""" + + def __init__( + self, + inherited0__definition, + inherited1__used_representation, + ): + property_definition_representation.__init__( + self, + inherited0__definition, + inherited1__used_representation, + ) + + def wr1(self): + eval_wr1_wr = ( + "CONFIG_CONTROL_DESIGN.SHAPE_DEFINITION" == TYPEOF(self.self.definition.self.definition) + ) or ("CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_SHAPE" == TYPEOF(self.self.definition)) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + def wr2(self): + eval_wr2_wr = "CONFIG_CONTROL_DESIGN.SHAPE_REPRESENTATION" == TYPEOF( + self.self.used_representation + ) + if not eval_wr2_wr: + raise AssertionError("Rule wr2 violated") + else: + return eval_wr2_wr + + +#################### +# ENTITY volume_unit # +#################### +class volume_unit(named_unit): + """Entity volume_unit definition.""" + + def __init__( + self, + inherited0__dimensions, + ): + named_unit.__init__( + self, + inherited0__dimensions, + ) + + def wr1(self): + eval_wr1_wr = ( + ( + ( + ( + ( + (self.self.named_unit.self.dimensions.self.length_exponent == 3) + and (self.self.named_unit.self.dimensions.self.mass_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.time_exponent == 0) + ) + and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0) + ) + and ( + self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent + == 0 + ) + ) + and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0) + ) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0) + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY conical_surface # +#################### +class conical_surface(elementary_surface): + """Entity conical_surface definition. + + :param radius + :type radius:length_measure + + :param semi_angle + :type semi_angle:plane_angle_measure + """ + + def __init__( + self, + inherited0__name, + inherited1__position, + radius, + semi_angle, + ): + elementary_surface.__init__( + self, + inherited0__name, + inherited1__position, + ) + self.radius = radius + self.semi_angle = semi_angle + + @apply + def radius(): + def fget(self): + return self._radius + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument radius is mantatory and can not be set to None") + if not check_type(value, length_measure): + self._radius = length_measure(value) + else: + self._radius = value + + return property(**locals()) + + @apply + def semi_angle(): + def fget(self): + return self._semi_angle + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument semi_angle is mantatory and can not be set to None") + if not check_type(value, plane_angle_measure): + self._semi_angle = plane_angle_measure(value) + else: + self._semi_angle = value + + return property(**locals()) + + def wr1(self): + eval_wr1_wr = self.radius >= 0 + if not eval_wr1_wr: + raise AssertionError("Rule wr1 violated") + else: + return eval_wr1_wr + + +#################### +# ENTITY global_unit_assigned_context # +#################### +class global_unit_assigned_context(representation_context): + """Entity global_unit_assigned_context definition. + + :param units + :type units:SET(1,None,'unit', scope = schema_scope) + """ + + def __init__( + self, + inherited0__context_identifier, + inherited1__context_type, + units, + ): + representation_context.__init__( + self, + inherited0__context_identifier, + inherited1__context_type, + ) + self.units = units + + @apply + def units(): + def fget(self): + return self._units + + def fset(self, value): + # Mandatory argument + if value == None: + raise AssertionError("Argument units is mantatory and can not be set to None") + if not check_type(value, SET(1, None, "unit", scope=schema_scope)): + self._units = SET(value) + else: + self._units = value + + return property(**locals()) + + +#################### +# FUNCTION build_2axes # +#################### +def build_2axes( + ref_direction, +): + """ + :param ref_direction + :type ref_direction:direction + """ + return [d, orthogonal_complement(d)] + + +#################### +# FUNCTION item_in_context # +#################### +def item_in_context( + item, + cntxt, +): + """ + :param item + :type item:representation_item + :param cntxt + :type cntxt:representation_context + """ + if ( + SIZEOF( + USEDIN(item, "CONFIG_CONTROL_DESIGN.REPRESENTATION.ITEMS") + * cntxt.representations_in_context + ) + > 0 + ): + return TRUE + else: + y = None + if SIZEOF(y) > 0: + for i in range(1, HIINDEX(y), 1): + if item_in_context(y[i], cntxt): + return TRUE + return FALSE + + +#################### +# FUNCTION gbsf_check_point # +#################### +def gbsf_check_point( + pnt, +): + """ + :param pnt + :type pnt:point + """ + if "CONFIG_CONTROL_DESIGN.CARTESIAN_POINT" == TYPEOF(pnt): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.POINT_ON_CURVE" == TYPEOF(pnt): + return gbsf_check_curve(pnt.point_on_curve.basis_curve) + else: + if "CONFIG_CONTROL_DESIGN.POINT_ON_SURFACE" == TYPEOF(pnt): + return gbsf_check_surface(pnt.point_on_surface.basis_surface) + else: + if "CONFIG_CONTROL_DESIGN.DEGENERATE_PCURVE" == TYPEOF(pnt): + return gbsf_check_curve( + pnt.degenerate_pcurve.reference_to_curve.representation.items[1] + ) and gbsf_check_surface(pnt.degenerate_pcurve.basis_surface) + return FALSE + + +#################### +# FUNCTION build_axes # +#################### +def build_axes( + axis, + ref_direction, +): + """ + :param axis + :type axis:direction + :param ref_direction + :type ref_direction:direction + """ + d1 = NVL(normalise(axis), dummy_gri == direction([0, 0, 1])) + d2 = first_proj_axis(d1, ref_direction) + return [d2, normalise(cross_product(d1, d2)).orientation, d1] + + +#################### +# FUNCTION edge_reversed # +#################### +def edge_reversed( + an_edge, +): + """ + :param an_edge + :type an_edge:edge + """ + if "CONFIG_CONTROL_DESIGN.ORIENTED_EDGE" == TYPEOF(an_edge): + the_reverse = (dummy_tri == edge(an_edge.edge_end, an_edge.edge_start)) == oriented_edge( + an_edge.oriented_edge.edge_element, not an_edge.oriented_edge.orientation + ) + else: + the_reverse = (dummy_tri == edge(an_edge.edge_end, an_edge.edge_start)) == oriented_edge( + an_edge, FALSE + ) + return the_reverse + + +#################### +# FUNCTION cc_design_person_and_organization_correlation # +#################### +def cc_design_person_and_organization_correlation( + e, +): + """ + :param e + :type e:cc_design_person_and_organization_assignment + """ + po_role = e.person_and_organization_assignment.role.name + case_selector = po_role + if case_selector == "request_recipient": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "initiator": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "creator": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "part_supplier": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "design_supplier": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "design_owner": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "configuration_manager": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "contractor": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "classification_officer": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + else: + return TRUE + return TRUE + + +#################### +# FUNCTION constraints_composite_curve_on_surface # +#################### +def constraints_composite_curve_on_surface( + c, +): + """ + :param c + :type c:composite_curve_on_surface + """ + for k in range(1, n_segments, 1): + if ( + ( + not ( + "CONFIG_CONTROL_DESIGN.PCURVE" + == TYPEOF(c.composite_curve.segments[k].parent_curve) + ) + ) + and ( + not ( + "CONFIG_CONTROL_DESIGN.SURFACE_CURVE" + == TYPEOF(c.composite_curve.segments[k].parent_curve) + ) + ) + ) and ( + not ( + "CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE_ON_SURFACE" + == TYPEOF(c.composite_curve.segments[k].parent_curve) + ) + ): + return FALSE + return TRUE + + +#################### +# FUNCTION acyclic_mapped_representation # +#################### +def acyclic_mapped_representation( + parent_set, + children_set, +): + """ + :param parent_set + :type parent_set:(null) + :param children_set + :type children_set:(null) + """ + x = None + if SIZEOF(x) > 0: + for i in range(1, HIINDEX(x), 1): + if x[i].mapped_item.mapping_source.mapped_representation == parent_set: + return FALSE + if not acyclic_mapped_representation( + parent_set + x[i].mapped_item.mapping_source.mapped_representation, + x[i].mapped_item.mapping_source.mapped_representation.items, + ): + return FALSE + x = children_set - x + if SIZEOF(x) > 0: + for i in range(1, HIINDEX(x), 1): + y = None + if not acyclic_mapped_representation(parent_set, y): + return FALSE + return TRUE + + +#################### +# FUNCTION conditional_reverse # +#################### +def conditional_reverse( + p, + an_item, +): + """ + :param p + :type p:BOOLEAN + :param an_item + :type an_item:reversible_topology + """ + if p: + return an_item + else: + return topology_reversed(an_item) + + +#################### +# FUNCTION valid_measure_value # +#################### +def valid_measure_value( + m, +): + """ + :param m + :type m:measure_value + """ + if "REAL" == TYPEOF(m): + return m > 0 + else: + if "INTEGER" == TYPEOF(m): + return m > 0 + else: + return TRUE + + +#################### +# FUNCTION gbsf_check_curve # +#################### +def gbsf_check_curve( + cv, +): + """ + :param cv + :type cv:curve + """ + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.BOUNDED_CURVE", + "CONFIG_CONTROL_DESIGN.CONIC", + "CONFIG_CONTROL_DESIGN.CURVE_REPLICA", + "CONFIG_CONTROL_DESIGN.LINE", + "CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D", + ] + * TYPEOF(cv) + ) + > 1 + ): + return FALSE + else: + if ( + SIZEOF(["CONFIG_CONTROL_DESIGN.CIRCLE", "CONFIG_CONTROL_DESIGN.ELLIPSE"] * TYPEOF(cv)) + == 1 + ): + return TRUE + else: + if ( + ("CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE" == TYPEOF(cv)) + and (cv.b_spline_curve.self_intersect == FALSE) + ) or (cv.b_spline_curve.self_intersect == UNKNOWN): + return TRUE + else: + if ( + ("CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE" == TYPEOF(cv)) + and (cv.composite_curve.self_intersect == FALSE) + ) or (cv.composite_curve.self_intersect == UNKNOWN): + return SIZEOF(None) == 0 + else: + if "CONFIG_CONTROL_DESIGN.CURVE_REPLICA" == TYPEOF(cv): + return gbsf_check_curve(cv.curve_replica.parent_curve) + else: + if ( + ("CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D" == TYPEOF(cv)) + and ( + (cv.offset_curve_3d.self_intersect == FALSE) + or (cv.offset_curve_3d.self_intersect == UNKNOWN) + ) + ) and (not ("CONFIG_CONTROL_DESIGN.POLYLINE" == TYPEOF(cv.basis_curve))): + return gbsf_check_curve(cv.offset_curve_3d.basis_curve) + else: + if "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF(cv): + return gbsf_check_curve( + cv.pcurve.reference_to_curve.representation.items[1] + ) and gbsf_check_surface(cv.pcurve.basis_surface) + else: + if "CONFIG_CONTROL_DESIGN.POLYLINE" == TYPEOF(cv): + if SIZEOF(cv.polyline.points) >= 3: + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.SURFACE_CURVE" == TYPEOF(cv): + if gbsf_check_curve(cv.surface_curve.curve_3d): + for i in range( + 1, SIZEOF(cv.surface_curve.associated_geometry), 1 + ): + if "CONFIG_CONTROL_DESIGN.SURFACE" == TYPEOF( + cv.surface_curve.associated_geometry[i] + ): + if not gbsf_check_surface( + cv.surface_curve.associated_geometry[i] + ): + return FALSE + else: + if "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF( + cv.surface_curve.associated_geometry[i] + ): + if not gbsf_check_curve( + cv.surface_curve.associated_geometry[i] + ): + return FALSE + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.TRIMMED_CURVE" == TYPEOF(cv): + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.LINE", + "CONFIG_CONTROL_DESIGN.PARABOLA", + "CONFIG_CONTROL_DESIGN.HYPERBOLA", + ] + * TYPEOF(cv.trimmed_curve.basis_curve) + ) + == 1 + ): + return TRUE + else: + return gbsf_check_curve( + cv.trimmed_curve.basis_curve + ) + return FALSE + + +#################### +# FUNCTION unique_version_change_order # +#################### +def unique_version_change_order( + c, +): + """ + :param c + :type c:action + """ + for i in range(1, SIZEOF(ords.requests), 1): + assign = assign + None + for k in range(1, SIZEOF(assign), 1): + versions = versions + assign[k].items + return SIZEOF(None) == 0 + + +#################### +# FUNCTION base_axis # +#################### +def base_axis( + dim, + axis1, + axis2, + axis3, +): + """ + :param dim + :type dim:INTEGER + :param axis1 + :type axis1:direction + :param axis2 + :type axis2:direction + :param axis3 + :type axis3:direction + """ + if dim == 3: + d1 = NVL(normalise(axis3), dummy_gri == direction([0, 0, 1])) + d2 = first_proj_axis(d1, axis1) + u = [d2, second_proj_axis(d1, d2, axis2), d1] + else: + if EXISTS(axis1): + d1 = normalise(axis1) + u = [d1, orthogonal_complement(d1)] + if EXISTS(axis2): + factor = dot_product(axis2, u[2]) + if factor < 0: + u[2].direction_ratios[1] = -u[2].direction_ratios[1] + u[2].direction_ratios[2] = -u[2].direction_ratios[2] + else: + if EXISTS(axis2): + d1 = normalise(axis2) + u = [orthogonal_complement(d1), d1] + u[1].direction_ratios[1] = -u[1].direction_ratios[1] + u[1].direction_ratios[2] = -u[1].direction_ratios[2] + else: + u = [dummy_gri == direction([1, 0]), dummy_gri == direction([0, 1])] + return u + + +#################### +# FUNCTION get_basis_surface # +#################### +def get_basis_surface( + c, +): + """ + :param c + :type c:curve_on_surface + """ + surfs = [] + if "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF(c): + surfs = [c.pcurve.basis_surface] + else: + if "CONFIG_CONTROL_DESIGN.SURFACE_CURVE" == TYPEOF(c): + n = SIZEOF(c.surface_curve.associated_geometry) + for i in range(1, n, 1): + surfs = surfs + associated_surface(c.surface_curve.associated_geometry[i]) + if "CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE_ON_SURFACE" == TYPEOF(c): + n = SIZEOF(c.composite_curve.segments) + surfs = get_basis_surface(c.composite_curve.segments[1].parent_curve) + if n > 1: + for i in range(2, n, 1): + surfs = surfs * get_basis_surface(c.composite_curve.segments[i].parent_curve) + return surfs + + +#################### +# FUNCTION cc_design_date_time_correlation # +#################### +def cc_design_date_time_correlation( + e, +): + """ + :param e + :type e:cc_design_date_and_time_assignment + """ + dt_role = e.date_and_time_assignment.role.name + case_selector = dt_role + if case_selector == "creation_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "request_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "release_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "start_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "sign_off_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "contract_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "certification_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "classification_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + elif case_selector == "declassification_date": + if SIZEOF(e.items) != SIZEOF(None): + return FALSE + else: + return TRUE + return TRUE + + +#################### +# FUNCTION list_face_loops # +#################### +def list_face_loops( + f, +): + """ + :param f + :type f:face + """ + for i in range(1, SIZEOF(f.bounds), 1): + loops = loops + f.bounds[i].bound + return loops + + +#################### +# FUNCTION list_of_topology_reversed # +#################### +def list_of_topology_reversed( + a_list, +): + """ + :param a_list + :type a_list:list_of_reversible_topology_item + """ + the_reverse = [] + for i in range(1, SIZEOF(a_list), 1): + the_reverse = topology_reversed(a_list[i]) + the_reverse + return the_reverse + + +#################### +# FUNCTION msf_curve_check # +#################### +def msf_curve_check( + cv, +): + """ + :param cv + :type cv:curve + """ + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.BOUNDED_CURVE", + "CONFIG_CONTROL_DESIGN.CONIC", + "CONFIG_CONTROL_DESIGN.CURVE_REPLICA", + "CONFIG_CONTROL_DESIGN.LINE", + "CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D", + ] + * TYPEOF(cv) + ) + > 1 + ): + return FALSE + else: + if ( + ("CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE" == TYPEOF(cv)) + and (cv.b_spline_curve.self_intersect == FALSE) + ) or (cv.b_spline_curve.self_intersect == UNKNOWN): + return TRUE + else: + if ( + SIZEOF(["CONFIG_CONTROL_DESIGN.CONIC", "CONFIG_CONTROL_DESIGN.LINE"] * TYPEOF(cv)) + == 1 + ): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.CURVE_REPLICA" == TYPEOF(cv): + return msf_curve_check(cv.curve_replica.parent_curve) + else: + if ( + ("CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D" == TYPEOF(cv)) + and ( + (cv.offset_curve_3d.self_intersect == FALSE) + or (cv.offset_curve_3d.self_intersect == UNKNOWN) + ) + ) and (not ("CONFIG_CONTROL_DESIGN.POLYLINE" == TYPEOF(cv.basis_curve))): + return msf_curve_check(cv.offset_curve_3d.basis_curve) + else: + if "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF(cv): + return msf_curve_check( + cv.pcurve.reference_to_curve.representation.items[1] + ) and msf_surface_check(cv.pcurve.basis_surface) + else: + if "CONFIG_CONTROL_DESIGN.SURFACE_CURVE" == TYPEOF(cv): + if msf_curve_check(cv.surface_curve.curve_3d): + for i in range( + 1, SIZEOF(cv.surface_curve.associated_geometry), 1 + ): + if "CONFIG_CONTROL_DESIGN.SURFACE" == TYPEOF( + cv.surface_curve.associated_geometry[i] + ): + if not msf_surface_check( + cv.surface_curve.associated_geometry[i] + ): + return FALSE + else: + if "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF( + cv.surface_curve.associated_geometry[i] + ): + if not msf_curve_check( + cv.surface_curve.associated_geometry[i] + ): + return FALSE + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.POLYLINE" == TYPEOF(cv): + if SIZEOF(cv.polyline.points) >= 3: + return TRUE + return FALSE + + +#################### +# FUNCTION shell_reversed # +#################### +def shell_reversed( + a_shell, +): + """ + :param a_shell + :type a_shell:shell + """ + if "CONFIG_CONTROL_DESIGN.OPEN_SHELL" == TYPEOF(a_shell): + return open_shell_reversed(a_shell) + else: + if "CONFIG_CONTROL_DESIGN.CLOSED_SHELL" == TYPEOF(a_shell): + return closed_shell_reversed(a_shell) + else: + return None + + +#################### +# FUNCTION topology_reversed # +#################### +def topology_reversed( + an_item, +): + """ + :param an_item + :type an_item:reversible_topology + """ + if "CONFIG_CONTROL_DESIGN.EDGE" == TYPEOF(an_item): + return edge_reversed(an_item) + if "CONFIG_CONTROL_DESIGN.PATH" == TYPEOF(an_item): + return path_reversed(an_item) + if "CONFIG_CONTROL_DESIGN.FACE_BOUND" == TYPEOF(an_item): + return face_bound_reversed(an_item) + if "CONFIG_CONTROL_DESIGN.FACE" == TYPEOF(an_item): + return face_reversed(an_item) + if "CONFIG_CONTROL_DESIGN.SHELL" == TYPEOF(an_item): + return shell_reversed(an_item) + if "SET" == TYPEOF(an_item): + return set_of_topology_reversed(an_item) + if "LIST" == TYPEOF(an_item): + return list_of_topology_reversed(an_item) + return None + + +#################### +# FUNCTION first_proj_axis # +#################### +def first_proj_axis( + z_axis, + arg, +): + """ + :param z_axis + :type z_axis:direction + :param arg + :type arg:direction + """ + if not EXISTS(z_axis): + return None + else: + z = normalise(z_axis) + if not EXISTS(arg): + if z.direction_ratios != [1, 0, 0]: + v = dummy_gri == direction([1, 0, 0]) + else: + v = dummy_gri == direction([0, 1, 0]) + else: + if arg.dim != 3: + return None + if cross_product(arg, z).magnitude == 0: + return None + else: + v = normalise(arg) + x_vec = scalar_times_vector(dot_product(v, z), z) + x_axis = vector_difference(v, x_vec).orientation + x_axis = normalise(x_axis) + return x_axis + + +#################### +# FUNCTION orthogonal_complement # +#################### +def orthogonal_complement( + vec, +): + """ + :param vec + :type vec:direction + """ + if (vec.dim != 2) or (not EXISTS(vec)): + return None + else: + result = dummy_gri == direction([-vec.direction_ratios[2], vec.direction_ratios[1]]) + return result + + +#################### +# FUNCTION make_array_of_array # +#################### +def make_array_of_array( + lis, + low1, + u1, + low2, + u2, +): + """ + :param lis + :type lis:(null) + :param low1 + :type low1:INTEGER + :param u1 + :type u1:INTEGER + :param low2 + :type low2:INTEGER + :param u2 + :type u2:INTEGER + """ + if ((u1 - low1) + 1) != SIZEOF(lis): + return None + if ((u2 - low2) + 1) != SIZEOF(lis[1]): + return None + res = [list_to_array(lis[1], low2, u2), (u1 - low1) + 1] + for i in range(2, HIINDEX(lis), 1): + if ((u2 - low2) + 1) != SIZEOF(lis[i]): + return None + res[(low1 + i) - 1] = list_to_array(lis[i], low2, u2) + return res + + +#################### +# FUNCTION second_proj_axis # +#################### +def second_proj_axis( + z_axis, + x_axis, + arg, +): + """ + :param z_axis + :type z_axis:direction + :param x_axis + :type x_axis:direction + :param arg + :type arg:direction + """ + if not EXISTS(arg): + v = dummy_gri == direction([0, 1, 0]) + else: + v = arg + temp = scalar_times_vector(dot_product(v, z_axis), z_axis) + y_axis = vector_difference(v, temp) + temp = scalar_times_vector(dot_product(v, x_axis), x_axis) + y_axis = vector_difference(y_axis, temp) + y_axis = normalise(y_axis) + return y_axis.orientation + + +#################### +# FUNCTION bag_to_set # +#################### +def bag_to_set( + the_bag, +): + """ + :param the_bag + :type the_bag:(null) + """ + if SIZEOF(the_bag) > 0: + for i in range(1, HIINDEX(the_bag), 1): + the_set = the_set + the_bag[i] + return the_set + + +#################### +# FUNCTION valid_wireframe_edge_curve # +#################### +def valid_wireframe_edge_curve( + crv, +): + """ + :param crv + :type crv:curve + """ + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.LINE", + "CONFIG_CONTROL_DESIGN.CONIC", + "CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE", + "CONFIG_CONTROL_DESIGN.POLYLINE", + ] + * TYPEOF(crv) + ) + == 1 + ): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.CURVE_REPLICA" == TYPEOF(crv): + return valid_wireframe_edge_curve(crv.curve_replica.parent_curve) + else: + if "CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D" == TYPEOF(crv): + return valid_wireframe_edge_curve(crv.offset_curve_3d.basis_curve) + return FALSE + + +#################### +# FUNCTION acyclic_product_category_relationship # +#################### +def acyclic_product_category_relationship( + relation, + children, +): + """ + :param relation + :type relation:product_category_relationship + :param children + :type children:(null) + """ + for i in range(1, HIINDEX(children), 1): + if relation.category == children[i]: + return FALSE + x = bag_to_set( + USEDIN( + relation.category, + "CONFIG_CONTROL_DESIGN." + "PRODUCT_CATEGORY_RELATIONSHIP.SUB_CATEGORY", + ) + ) + local_children = children + relation.category + if SIZEOF(x) > 0: + for i in range(1, HIINDEX(x), 1): + if not acyclic_product_category_relationship(x[i], local_children): + return FALSE + return TRUE + + +#################### +# FUNCTION surface_weights_positive # +#################### +def surface_weights_positive( + b, +): + """ + :param b + :type b:rational_b_spline_surface + """ + for i in range(0, b.u_upper, 1): + for j in range(0, b.v_upper, 1): + if b.weights[i][j] <= 0: + result = FALSE + return result + return result + + +#################### +# FUNCTION vector_difference # +#################### +def vector_difference( + arg1, + arg2, +): + """ + :param arg1 + :type arg1:vector_or_direction + :param arg2 + :type arg2:vector_or_direction + """ + if ((not EXISTS(arg1)) or (not EXISTS(arg2))) or (arg1.dim != arg2.dim): + return None + else: + # begin/end block + if "CONFIG_CONTROL_DESIGN.VECTOR" == TYPEOF(arg1): + mag1 = arg1.magnitude + vec1 = arg1.orientation + else: + mag1 = 1 + vec1 = arg1 + if "CONFIG_CONTROL_DESIGN.VECTOR" == TYPEOF(arg2): + mag2 = arg2.magnitude + vec2 = arg2.orientation + else: + mag2 = 1 + vec2 = arg2 + vec1 = normalise(vec1) + vec2 = normalise(vec2) + ndim = SIZEOF(vec1.direction_ratios) + mag = 0 + res = dummy_gri == direction(vec1.direction_ratios) + for i in range(1, ndim, 1): + res.direction_ratios[i] = (mag1 * vec1.direction_ratios[i]) + ( + mag2 * vec2.direction_ratios[i] + ) + mag = mag + (res.direction_ratios[i] * res.direction_ratios[i]) + if mag > 0: + result = dummy_gri == vector(res, SQRT(mag)) + else: + result = dummy_gri == vector(vec1, 0) + return result + + +#################### +# FUNCTION acyclic_product_definition_relationship # +#################### +def acyclic_product_definition_relationship( + relation, + relatives, + specific_relation, +): + """ + :param relation + :type relation:product_definition_relationship + :param relatives + :type relatives:(null) + :param specific_relation + :type specific_relation:STRING + """ + if relation.relating_product_definition == relatives: + return FALSE + x = None + for i in range(1, HIINDEX(x), 1): + if not acyclic_product_definition_relationship( + x[i], relatives + relation.relating_product_definition, specific_relation + ): + return FALSE + return TRUE + + +#################### +# FUNCTION constraints_geometry_shell_based_wireframe_model # +#################### +def constraints_geometry_shell_based_wireframe_model( + m, +): + """ + :param m + :type m:shell_based_wireframe_model + """ + for j in range(1, SIZEOF(m.sbwm_boundary), 1): + if (not ("CONFIG_CONTROL_DESIGN.WIRE_SHELL" == TYPEOF(m.sbwm_boundary[j]))) and ( + not ("CONFIG_CONTROL_DESIGN.VERTEX_SHELL" == TYPEOF(m.sbwm_boundary[j])) + ): + result = FALSE + return result + return result + + +#################### +# FUNCTION list_to_set # +#################### +def list_to_set( + l, +): + """ + :param l + :type l:(null) + """ + for i in range(1, SIZEOF(l), 1): + s = s + l[i] + return s + + +#################### +# FUNCTION valid_calendar_date # +#################### +def valid_calendar_date( + date, +): + """ + :param date + :type date:calendar_date + """ + if not ((1 <= date.day_component) and (date.day_component <= 31)): + return FALSE + case_selector = date.month_component + if case_selector == 4: + return (1 <= date.day_component) and (date.day_component <= 30) + elif case_selector == 6: + return (1 <= date.day_component) and (date.day_component <= 30) + elif case_selector == 9: + return (1 <= date.day_component) and (date.day_component <= 30) + elif case_selector == 11: + return (1 <= date.day_component) and (date.day_component <= 30) + elif case_selector == 2: + # begin/end block + if leap_year(date.year_component): + return (1 <= date.day_component) and (date.day_component <= 29) + else: + return (1 <= date.day_component) and (date.day_component <= 28) + else: + return TRUE + + +#################### +# FUNCTION valid_wireframe_vertex_point # +#################### +def valid_wireframe_vertex_point( + pnt, +): + """ + :param pnt + :type pnt:point + """ + if "CONFIG_CONTROL_DESIGN.CARTESIAN_POINT" == TYPEOF(pnt): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.POINT_REPLICA" == TYPEOF(pnt): + return valid_wireframe_vertex_point(pnt.point_replica.parent_pt) + return FALSE + + +#################### +# FUNCTION list_to_array # +#################### +def list_to_array( + lis, + low, + u, +): + """ + :param lis + :type lis:(null) + :param low + :type low:INTEGER + :param u + :type u:INTEGER + """ + n = SIZEOF(lis) + if n != ((u - low) + 1): + return None + else: + res = [lis[1], n] + for i in range(2, n, 1): + res[(low + i) - 1] = lis[i] + return res + + +#################### +# FUNCTION using_items # +#################### +def using_items( + item, + checked_items, +): + """ + :param item + :type item:founded_item_select + :param checked_items + :type checked_items:(null) + """ + result_items = [] + new_check_items = checked_items + item + next_items = None + if SIZEOF(next_items) > 0: + for i in range(1, HIINDEX(next_items), 1): + if not (next_items[i] == new_check_items): + result_items = (result_items + next_items[i]) + using_items( + next_items[i], new_check_items + ) + return result_items + + +#################### +# FUNCTION constraints_geometry_shell_based_surface_model # +#################### +def constraints_geometry_shell_based_surface_model( + m, +): + """ + :param m + :type m:shell_based_surface_model + """ + for j in range(1, SIZEOF(m.sbsm_boundary), 1): + if (not ("CONFIG_CONTROL_DESIGN.OPEN_SHELL" == TYPEOF(m.sbsm_boundary[j]))) and ( + not ("CONFIG_CONTROL_DESIGN.CLOSED_SHELL" == TYPEOF(m.sbsm_boundary[j])) + ): + result = FALSE + return result + return result + + +#################### +# FUNCTION face_bound_reversed # +#################### +def face_bound_reversed( + a_face_bound, +): + """ + :param a_face_bound + :type a_face_bound:face_bound + """ + if "CONFIG_CONTROL_DESIGN.FACE_OUTER_BOUND" == TYPEOF(a_face_bound): + the_reverse = ( + dummy_tri + == face_bound(a_face_bound.face_bound.bound, not a_face_bound.face_bound.orientation) + ) == face_outer_bound() + else: + the_reverse = dummy_tri == face_bound(a_face_bound.bound, not a_face_bound.orientation) + return the_reverse + + +#################### +# FUNCTION set_of_topology_reversed # +#################### +def set_of_topology_reversed( + a_set, +): + """ + :param a_set + :type a_set:set_of_reversible_topology_item + """ + the_reverse = [] + for i in range(1, SIZEOF(a_set), 1): + the_reverse = the_reverse + topology_reversed(a_set[i]) + return the_reverse + + +#################### +# FUNCTION dimension_of # +#################### +def dimension_of( + item, +): + """ + :param item + :type item:geometric_representation_item + """ + x = using_representations(item) + y = x[1].context_of_items + return y.geometric_representation_context.coordinate_space_dimension + + +#################### +# FUNCTION scalar_times_vector # +#################### +def scalar_times_vector( + scalar, + vec, +): + """ + :param scalar + :type scalar:REAL + :param vec + :type vec:vector_or_direction + """ + if (not EXISTS(scalar)) or (not EXISTS(vec)): + return None + else: + if "CONFIG_CONTROL_DESIGN.VECTOR" == TYPEOF(vec): + v = dummy_gri == direction(vec.orientation.direction_ratios) + mag = scalar * vec.magnitude + else: + v = dummy_gri == direction(vec.direction_ratios) + mag = scalar + if mag < 0: + for i in range(1, SIZEOF(v.direction_ratios), 1): + v.direction_ratios[i] = -v.direction_ratios[i] + mag = -mag + result = dummy_gri == vector(normalise(v), mag) + return result + + +#################### +# FUNCTION dimensions_for_si_unit # +#################### +def dimensions_for_si_unit( + n, +): + """ + :param n + :type n:si_unit_name + """ + case_selector = n + if case_selector == metre: + return dimensional_exponents(1, 0, 0, 0, 0, 0, 0) + elif case_selector == gram: + return dimensional_exponents(0, 1, 0, 0, 0, 0, 0) + elif case_selector == second: + return dimensional_exponents(0, 0, 1, 0, 0, 0, 0) + elif case_selector == ampere: + return dimensional_exponents(0, 0, 0, 1, 0, 0, 0) + elif case_selector == kelvin: + return dimensional_exponents(0, 0, 0, 0, 1, 0, 0) + elif case_selector == mole: + return dimensional_exponents(0, 0, 0, 0, 0, 1, 0) + elif case_selector == candela: + return dimensional_exponents(0, 0, 0, 0, 0, 0, 1) + elif case_selector == radian: + return dimensional_exponents(0, 0, 0, 0, 0, 0, 0) + elif case_selector == steradian: + return dimensional_exponents(0, 0, 0, 0, 0, 0, 0) + elif case_selector == hertz: + return dimensional_exponents(0, 0, -1, 0, 0, 0, 0) + elif case_selector == newton: + return dimensional_exponents(1, 1, -2, 0, 0, 0, 0) + elif case_selector == pascal: + return dimensional_exponents(-1, 1, -2, 0, 0, 0, 0) + elif case_selector == joule: + return dimensional_exponents(2, 1, -2, 0, 0, 0, 0) + elif case_selector == watt: + return dimensional_exponents(2, 1, -3, 0, 0, 0, 0) + elif case_selector == coulomb: + return dimensional_exponents(0, 0, 1, 1, 0, 0, 0) + elif case_selector == volt: + return dimensional_exponents(2, 1, -3, -1, 0, 0, 0) + elif case_selector == farad: + return dimensional_exponents(-2, -1, 4, 1, 0, 0, 0) + elif case_selector == ohm: + return dimensional_exponents(2, 1, -3, -2, 0, 0, 0) + elif case_selector == siemens: + return dimensional_exponents(-2, -1, 3, 2, 0, 0, 0) + elif case_selector == weber: + return dimensional_exponents(2, 1, -2, -1, 0, 0, 0) + elif case_selector == tesla: + return dimensional_exponents(0, 1, -2, -1, 0, 0, 0) + elif case_selector == henry: + return dimensional_exponents(2, 1, -2, -2, 0, 0, 0) + elif case_selector == degree_celsius: + return dimensional_exponents(0, 0, 0, 0, 1, 0, 0) + elif case_selector == lumen: + return dimensional_exponents(0, 0, 0, 0, 0, 0, 1) + elif case_selector == lux: + return dimensional_exponents(-2, 0, 0, 0, 0, 0, 1) + elif case_selector == becquerel: + return dimensional_exponents(0, 0, -1, 0, 0, 0, 0) + elif case_selector == gray: + return dimensional_exponents(2, 0, -2, 0, 0, 0, 0) + elif case_selector == sievert: + return dimensional_exponents(2, 0, -2, 0, 0, 0, 0) + + +#################### +# FUNCTION assembly_shape_is_defined # +#################### +def assembly_shape_is_defined( + assy, + schma, +): + """ + :param assy + :type assy:next_assembly_usage_occurrence + :param schma + :type schma:STRING + """ + pr1_set = bag_to_set( + USEDIN(assy.related_product_definition, schma + ".PROPERTY_DEFINITION.DEFINITION") + ) + for i in range(1, HIINDEX(pr1_set), 1): + sdr_set = sdr_set + None + pdrel_set = bag_to_set( + USEDIN( + assy.related_product_definition, + (schma + ".PRODUCT_DEFINITION_RELATIONSHIP.") + "RELATED_PRODUCT_DEFINITION", + ) + ) + for j in range(1, HIINDEX(pdrel_set), 1): + pr2_set = pr2_set + USEDIN(pdrel_set[j], schma + ".PROPERTY_DEFINITION.DEFINITION") + for i in range(1, HIINDEX(pr2_set), 1): + sdr_set = sdr_set + None + if SIZEOF(sdr_set) > 0: + for i in range(1, HIINDEX(sdr_set), 1): + srr_set = None + if SIZEOF(srr_set) > 0: + for j in range(1, HIINDEX(srr_set), 1): + if SIZEOF(None * None) >= 1: + if SIZEOF(None) > 0: + return FALSE + return TRUE + + +#################### +# FUNCTION open_shell_reversed # +#################### +def open_shell_reversed( + a_shell, +): + """ + :param a_shell + :type a_shell:open_shell + """ + if "CONFIG_CONTROL_DESIGN.ORIENTED_OPEN_SHELL" == TYPEOF(a_shell): + the_reverse = ( + (dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) == open_shell() + ) == oriented_open_shell( + a_shell.oriented_open_shell.open_shell_element, + not a_shell.oriented_open_shell.orientation, + ) + else: + the_reverse = ( + (dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) == open_shell() + ) == oriented_open_shell(a_shell, FALSE) + return the_reverse + + +#################### +# FUNCTION acyclic_surface_replica # +#################### +def acyclic_surface_replica( + rep, + parent, +): + """ + :param rep + :type rep:surface_replica + :param parent + :type parent:surface + """ + if not ("CONFIG_CONTROL_DESIGN.SURFACE_REPLICA" == TYPEOF(parent)): + return TRUE + if parent == rep: + return FALSE + else: + return acyclic_surface_replica(rep, parent.surface_replica.parent_surface) + + +#################### +# FUNCTION gbsf_check_surface # +#################### +def gbsf_check_surface( + sf, +): + """ + :param sf + :type sf:surface + """ + if ( + ("CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE" == TYPEOF(sf)) + and (sf.b_spline_surface.self_intersect == FALSE) + ) or (sf.b_spline_surface.self_intersect == UNKNOWN): + return TRUE + else: + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.SPHERICAL_SURFACE", + "CONFIG_CONTROL_DESIGN.TOROIDAL_SURFACE", + ] + * TYPEOF(sf) + ) + == 1 + ): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.CURVE_BOUNDED_SURFACE" == TYPEOF(sf): + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.CONICAL_SURFACE", + "CONFIG_CONTROL_DESIGN.CYLINDRICAL_SURFACE", + "CONFIG_CONTROL_DESIGN.PLANE", + ] + * TYPEOF(sf.curve_bounded_surface.basis_surface) + ) + == 1 + ): + return SIZEOF(None) == 0 + else: + if gbsf_check_surface(sf.curve_bounded_surface.basis_surface): + return SIZEOF(None) == 0 + else: + if ( + ("CONFIG_CONTROL_DESIGN.OFFSET_SURFACE" == TYPEOF(sf)) + and (sf.offset_surface.self_intersect == FALSE) + ) or (sf.offset_surface.self_intersect == UNKNOWN): + return gbsf_check_surface(sf.offset_surface.basis_surface) + else: + if "CONFIG_CONTROL_DESIGN.RECTANGULAR_COMPOSITE_SURFACE" == TYPEOF(sf): + for i in range(1, SIZEOF(sf.rectangular_composite_surface.segments), 1): + for j in range( + 1, SIZEOF(sf.rectangular_composite_surface.segments[i]), 1 + ): + if not gbsf_check_surface( + sf.rectangular_composite_surface.segments[i][j].parent_surface + ): + return FALSE + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.RECTANGULAR_TRIMMED_SURFACE" == TYPEOF(sf): + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.CONICAL_SURFACE", + "CONFIG_CONTROL_DESIGN.CYLINDRICAL_SURFACE", + "CONFIG_CONTROL_DESIGN.PLANE", + ] + * TYPEOF(sf.rectangular_trimmed_surface.basis_surface) + ) + == 1 + ): + return TRUE + else: + return gbsf_check_surface( + sf.rectangular_trimmed_surface.basis_surface + ) + else: + if "CONFIG_CONTROL_DESIGN.SURFACE_REPLICA" == TYPEOF(sf): + return gbsf_check_surface(sf.surface_replica.parent_surface) + else: + if "CONFIG_CONTROL_DESIGN.SWEPT_SURFACE" == TYPEOF(sf): + return gbsf_check_curve(sf.swept_surface.swept_curve) + return FALSE + + +#################### +# FUNCTION msf_surface_check # +#################### +def msf_surface_check( + surf, +): + """ + :param surf + :type surf:surface + """ + if "CONFIG_CONTROL_DESIGN.ELEMENTARY_SURFACE" == TYPEOF(surf): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.SWEPT_SURFACE" == TYPEOF(surf): + return msf_curve_check(surf.swept_surface.swept_curve) + else: + if ( + ("CONFIG_CONTROL_DESIGN.OFFSET_SURFACE" == TYPEOF(surf)) + and (surf.offset_surface.self_intersect == FALSE) + ) or (surf.offset_surface.self_intersect == UNKNOWN): + return msf_surface_check(surf.offset_surface.basis_surface) + else: + if "CONFIG_CONTROL_DESIGN.SURFACE_REPLICA" == TYPEOF(surf): + return msf_surface_check(surf.surface_replica.parent_surface) + else: + if ( + ("CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE" == TYPEOF(surf)) + and (surf.b_spline_surface.self_intersect == FALSE) + ) or (surf.b_spline_surface.self_intersect == UNKNOWN): + return TRUE + return FALSE + + +#################### +# FUNCTION normalise # +#################### +def normalise( + arg, +): + """ + :param arg + :type arg:vector_or_direction + """ + if not EXISTS(arg): + result = None + else: + ndim = arg.dim + if "CONFIG_CONTROL_DESIGN.VECTOR" == TYPEOF(arg): + # begin/end block + v = dummy_gri == direction(arg.orientation.direction_ratios) + if arg.magnitude == 0: + return None + else: + vec = dummy_gri == vector(v, 1) + else: + v = dummy_gri == direction(arg.direction_ratios) + mag = 0 + for i in range(1, ndim, 1): + mag = mag + (v.direction_ratios[i] * v.direction_ratios[i]) + if mag > 0: + mag = SQRT(mag) + for i in range(1, ndim, 1): + v.direction_ratios[i] = v.direction_ratios[i] / mag + if "CONFIG_CONTROL_DESIGN.VECTOR" == TYPEOF(arg): + vec.orientation = v + result = vec + else: + result = v + else: + return None + return result + + +#################### +# FUNCTION msb_shells # +#################### +def msb_shells( + brep, +): + """ + :param brep + :type brep:manifold_solid_brep + """ + if SIZEOF(None) >= 1: + return brep.brep_with_voids.voids + brep.outer + else: + return [brep.outer] + + +#################### +# FUNCTION mixed_loop_type_set # +#################### +def mixed_loop_type_set( + l, +): + """ + :param l + :type l:(null) + """ + if SIZEOF(l) <= 1: + return FALSE + poly_loop_type = "CONFIG_CONTROL_DESIGN.POLY_LOOP" == TYPEOF(l[1]) + for i in range(2, SIZEOF(l), 1): + if ("CONFIG_CONTROL_DESIGN.POLY_LOOP" == TYPEOF(l[i])) != poly_loop_type: + return TRUE + return FALSE + + +#################### +# FUNCTION derive_dimensional_exponents # +#################### +def derive_dimensional_exponents( + x, +): + """ + :param x + :type x:unit + """ + result = x.dimensions + return result + + +#################### +# FUNCTION curve_weights_positive # +#################### +def curve_weights_positive( + b, +): + """ + :param b + :type b:rational_b_spline_curve + """ + for i in range(0, b.upper_index_on_control_points, 1): + if b.weights[i] <= 0: + result = FALSE + return result + return result + + +#################### +# FUNCTION valid_geometrically_bounded_wf_point # +#################### +def valid_geometrically_bounded_wf_point( + pnt, +): + """ + :param pnt + :type pnt:point + """ + if "CONFIG_CONTROL_DESIGN.CARTESIAN_POINT" == TYPEOF(pnt): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.POINT_ON_CURVE" == TYPEOF(pnt): + return valid_geometrically_bounded_wf_curve(pnt.point_on_curve.basis_curve) + else: + if "CONFIG_CONTROL_DESIGN.POINT_REPLICA" == TYPEOF(pnt): + return valid_geometrically_bounded_wf_point(pnt.point_replica.parent_pt) + return FALSE + + +#################### +# FUNCTION path_head_to_tail # +#################### +def path_head_to_tail( + a_path, +): + """ + :param a_path + :type a_path:path + """ + n = SIZEOF(a_path.edge_list) + for i in range(2, n, 1): + p = p and (a_path.edge_list[i - 1].edge_end == a_path.edge_list[i].edge_start) + return p + + +#################### +# FUNCTION path_reversed # +#################### +def path_reversed( + a_path, +): + """ + :param a_path + :type a_path:path + """ + if "CONFIG_CONTROL_DESIGN.ORIENTED_PATH" == TYPEOF(a_path): + the_reverse = ( + dummy_tri == path(list_of_topology_reversed(a_path.edge_list)) + ) == oriented_path(a_path.oriented_path.path_element, not a_path.oriented_path.orientation) + else: + the_reverse = ( + dummy_tri == path(list_of_topology_reversed(a_path.edge_list)) + ) == oriented_path(a_path, FALSE) + return the_reverse + + +#################### +# FUNCTION leap_year # +#################### +def leap_year( + year, +): + """ + :param year + :type year:INTEGER + """ + if (((year % 4) == 0) and ((year % 100) != 0)) or ((year % 400) == 0): + return TRUE + else: + return FALSE + + +#################### +# FUNCTION face_reversed # +#################### +def face_reversed( + a_face, +): + """ + :param a_face + :type a_face:face + """ + if "CONFIG_CONTROL_DESIGN.ORIENTED_FACE" == TYPEOF(a_face): + the_reverse = (dummy_tri == face(set_of_topology_reversed(a_face.bounds))) == oriented_face( + a_face.oriented_face.face_element, not a_face.oriented_face.orientation + ) + else: + the_reverse = (dummy_tri == face(set_of_topology_reversed(a_face.bounds))) == oriented_face( + a_face, FALSE + ) + return the_reverse + + +#################### +# FUNCTION constraints_param_b_spline # +#################### +def constraints_param_b_spline( + degree, + up_knots, + up_cp, + knot_mult, + knots, +): + """ + :param degree + :type degree:INTEGER + :param up_knots + :type up_knots:INTEGER + :param up_cp + :type up_cp:INTEGER + :param knot_mult + :type knot_mult:(null) + :param knots + :type knots:(null) + """ + sum = knot_mult[1] + for i in range(2, up_knots, 1): + sum = sum + knot_mult[i] + if (((degree < 1) or (up_knots < 2)) or (up_cp < degree)) or (sum != ((degree + up_cp) + 2)): + result = FALSE + return result + k = knot_mult[1] + if (k < 1) or (k > (degree + 1)): + result = FALSE + return result + for i in range(2, up_knots, 1): + if (knot_mult[i] < 1) or (knots[i] <= knots[i - 1]): + result = FALSE + return result + k = knot_mult[i] + if (i < up_knots) and (k > degree): + result = FALSE + return result + if (i == up_knots) and (k > (degree + 1)): + result = FALSE + return result + return result + + +#################### +# FUNCTION using_representations # +#################### +def using_representations( + item, +): + """ + :param item + :type item:founded_item_select + """ + results = [] + result_bag = USEDIN(item, "CONFIG_CONTROL_DESIGN.REPRESENTATION.ITEMS") + if SIZEOF(result_bag) > 0: + for i in range(1, HIINDEX(result_bag), 1): + results = results + result_bag[i] + intermediate_items = using_items(item, []) + if SIZEOF(intermediate_items) > 0: + for i in range(1, HIINDEX(intermediate_items), 1): + result_bag = USEDIN(intermediate_items[i], "CONFIG_CONTROL_DESIGN.REPRESENTATION.ITEMS") + if SIZEOF(result_bag) > 0: + for j in range(1, HIINDEX(result_bag), 1): + results = results + result_bag[j] + return results + + +#################### +# FUNCTION associated_surface # +#################### +def associated_surface( + arg, +): + """ + :param arg + :type arg:pcurve_or_surface + """ + if "CONFIG_CONTROL_DESIGN.PCURVE" == TYPEOF(arg): + surf = arg.basis_surface + else: + surf = arg + return surf + + +#################### +# FUNCTION acyclic_point_replica # +#################### +def acyclic_point_replica( + rep, + parent, +): + """ + :param rep + :type rep:point_replica + :param parent + :type parent:point + """ + if not ("CONFIG_CONTROL_DESIGN.POINT_REPLICA" == TYPEOF(parent)): + return TRUE + if parent == rep: + return FALSE + else: + return acyclic_point_replica(rep, parent.point_replica.parent_pt) + + +#################### +# FUNCTION cross_product # +#################### +def cross_product( + arg1, + arg2, +): + """ + :param arg1 + :type arg1:direction + :param arg2 + :type arg2:direction + """ + if (((not EXISTS(arg1)) or (arg1.dim == 2)) or (not EXISTS(arg2))) or (arg2.dim == 2): + return None + else: + # begin/end block + v1 = normalise(arg1).direction_ratios + v2 = normalise(arg2).direction_ratios + res = dummy_gri == direction( + [ + (v1[2] * v2[3]) - (v1[3] * v2[2]), + (v1[3] * v2[1]) - (v1[1] * v2[3]), + (v1[1] * v2[2]) - (v1[2] * v2[1]), + ] + ) + mag = 0 + for i in range(1, 3, 1): + mag = mag + (res.direction_ratios[i] * res.direction_ratios[i]) + if mag > 0: + result = dummy_gri == vector(res, SQRT(mag)) + else: + result = dummy_gri == vector(arg1, 0) + return result + + +#################### +# FUNCTION valid_units # +#################### +def valid_units( + m, +): + """ + :param m + :type m:measure_with_unit + """ + if "CONFIG_CONTROL_DESIGN.LENGTH_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 1, 0, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.MASS_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 1, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.TIME_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 1, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.ELECTRIC_CURRENT_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 1, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.THERMODYNAMIC_TEMPERATURE_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 0, 1, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.AMOUNT_OF_SUBSTANCE_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 0, 0, 1, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.LUMINOUS_INTENSITY_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 0, 0, 0, 1 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.PLANE_ANGLE_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.SOLID_ANGLE_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.AREA_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 2, 0, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.VOLUME_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 3, 0, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.RATIO_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.POSITIVE_LENGTH_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 1, 0, 0, 0, 0, 0, 0 + ): + return FALSE + if "CONFIG_CONTROL_DESIGN.POSITIVE_PLANE_ANGLE_MEASURE" == TYPEOF(m.value_component): + if derive_dimensional_exponents(m.unit_component) != dimensional_exponents( + 0, 0, 0, 0, 0, 0, 0 + ): + return FALSE + return TRUE + + +#################### +# FUNCTION constraints_rectangular_composite_surface # +#################### +def constraints_rectangular_composite_surface( + s, +): + """ + :param s + :type s:rectangular_composite_surface + """ + for i in range(1, s.n_u, 1): + for j in range(1, s.n_v, 1): + if not ( + ( + "CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE" + == TYPEOF(s.segments[i][j].parent_surface) + ) + or ( + "CONFIG_CONTROL_DESIGN.RECTANGULAR_TRIMMED_SURFACE" + == TYPEOF(s.segments[i][j].parent_surface) + ) + ): + return FALSE + for i in range(1, s.n_u - 1, 1): + for j in range(1, s.n_v, 1): + if s.segments[i][j].u_transition == discontinuous: + return FALSE + for i in range(1, s.n_u, 1): + for j in range(1, s.n_v - 1, 1): + if s.segments[i][j].v_transition == discontinuous: + return FALSE + return TRUE + + +#################### +# FUNCTION closed_shell_reversed # +#################### +def closed_shell_reversed( + a_shell, +): + """ + :param a_shell + :type a_shell:closed_shell + """ + if "CONFIG_CONTROL_DESIGN.ORIENTED_CLOSED_SHELL" == TYPEOF(a_shell): + the_reverse = ( + (dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) + == closed_shell() + ) == oriented_closed_shell( + a_shell.oriented_closed_shell.closed_shell_element, + not a_shell.oriented_closed_shell.orientation, + ) + else: + the_reverse = ( + (dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) + == closed_shell() + ) == oriented_closed_shell(a_shell, FALSE) + return the_reverse + + +#################### +# FUNCTION boolean_choose # +#################### +def boolean_choose( + b, + choice1, + choice2, +): + """ + :param b + :type b:BOOLEAN + :param choice1 + :type choice1:(null) + :param choice2 + :type choice2:(null) + """ + if b: + return choice1 + else: + return choice2 + + +#################### +# FUNCTION valid_time # +#################### +def valid_time( + time, +): + """ + :param time + :type time:local_time + """ + if EXISTS(time.second_component): + return EXISTS(time.minute_component) + else: + return TRUE + + +#################### +# FUNCTION valid_geometrically_bounded_wf_curve # +#################### +def valid_geometrically_bounded_wf_curve( + crv, +): + """ + :param crv + :type crv:curve + """ + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.POLYLINE", + "CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE", + "CONFIG_CONTROL_DESIGN.ELLIPSE", + "CONFIG_CONTROL_DESIGN.CIRCLE", + ] + * TYPEOF(crv) + ) + == 1 + ): + return TRUE + else: + if "CONFIG_CONTROL_DESIGN.TRIMMED_CURVE" == TYPEOF(crv): + if ( + SIZEOF( + [ + "CONFIG_CONTROL_DESIGN.LINE", + "CONFIG_CONTROL_DESIGN.PARABOLA", + "CONFIG_CONTROL_DESIGN.HYPERBOLA", + ] + * TYPEOF(crv.trimmed_curve.basis_curve) + ) + == 1 + ): + return TRUE + else: + return valid_geometrically_bounded_wf_curve(crv.trimmed_curve.basis_curve) + else: + if "CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D" == TYPEOF(crv): + return valid_geometrically_bounded_wf_curve(crv.offset_curve_3d.basis_curve) + else: + if "CONFIG_CONTROL_DESIGN.CURVE_REPLICA" == TYPEOF(crv): + return valid_geometrically_bounded_wf_curve(crv.curve_replica.parent_curve) + else: + if "CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE" == TYPEOF(crv): + return SIZEOF(None) == 0 + return FALSE + + +#################### +# FUNCTION dot_product # +#################### +def dot_product( + arg1, + arg2, +): + """ + :param arg1 + :type arg1:direction + :param arg2 + :type arg2:direction + """ + if (not EXISTS(arg1)) or (not EXISTS(arg2)): + scalar = None + else: + if arg1.dim != arg2.dim: + scalar = None + else: + # begin/end block + vec1 = normalise(arg1) + vec2 = normalise(arg2) + ndim = arg1.dim + scalar = 0 + for i in range(1, ndim, 1): + scalar = scalar + (vec1.direction_ratios[i] * vec2.direction_ratios[i]) + return scalar + + +#################### +# FUNCTION acyclic_curve_replica # +#################### +def acyclic_curve_replica( + rep, + parent, +): + """ + :param rep + :type rep:curve_replica + :param parent + :type parent:curve + """ + if not ("CONFIG_CONTROL_DESIGN.CURVE_REPLICA" == TYPEOF(parent)): + return TRUE + if parent == rep: + return FALSE + else: + return acyclic_curve_replica(rep, parent.curve_replica.parent_curve) + + +#################### +# RULE change_request_requires_approval # +#################### +change_request_requires_approval = Rule() + +#################### +# RULE restrict_date_time_role # +#################### +restrict_date_time_role = Rule() + +#################### +# RULE versioned_action_request_requires_status # +#################### +versioned_action_request_requires_status = Rule() + +#################### +# RULE acu_requires_security_classification # +#################### +acu_requires_security_classification = Rule() + +#################### +# RULE no_shape_for_supplied_part # +#################### +no_shape_for_supplied_part = Rule() + +#################### +# RULE dependent_instantiable_person_and_organization_role # +#################### +dependent_instantiable_person_and_organization_role = Rule() + +#################### +# RULE product_definition_requires_date_time # +#################### +product_definition_requires_date_time = Rule() + +#################### +# RULE compatible_dimension # +#################### +compatible_dimension = Rule() + +#################### +# RULE product_version_requires_approval # +#################### +product_version_requires_approval = Rule() + +#################### +# RULE change_requires_approval # +#################### +change_requires_approval = Rule() + +#################### +# RULE product_requires_version # +#################### +product_requires_version = Rule() + +#################### +# RULE product_definition_requires_person_organization # +#################### +product_definition_requires_person_organization = Rule() + +#################### +# RULE product_concept_requires_configuration_item # +#################### +product_concept_requires_configuration_item = Rule() + +#################### +# RULE certification_requires_date_time # +#################### +certification_requires_date_time = Rule() + +#################### +# RULE certification_requires_approval # +#################### +certification_requires_approval = Rule() + +#################### +# RULE subtype_mandatory_effectivity # +#################### +subtype_mandatory_effectivity = Rule() + +#################### +# RULE versioned_action_request_requires_solution # +#################### +versioned_action_request_requires_solution = Rule() + +#################### +# RULE effectivity_requires_approval # +#################### +effectivity_requires_approval = Rule() + +#################### +# RULE unique_version_change_order_rule # +#################### +unique_version_change_order_rule = Rule() + +#################### +# RULE dependent_instantiable_named_unit # +#################### +dependent_instantiable_named_unit = Rule() + +#################### +# RULE subtype_mandatory_product_definition_formation # +#################### +subtype_mandatory_product_definition_formation = Rule() + +#################### +# RULE approval_requires_approval_person_organization # +#################### +approval_requires_approval_person_organization = Rule() + +#################### +# RULE approvals_are_assigned # +#################### +approvals_are_assigned = Rule() + +#################### +# RULE start_work_requires_approval # +#################### +start_work_requires_approval = Rule() + +#################### +# RULE approval_person_organization_constraints # +#################### +approval_person_organization_constraints = Rule() + +#################### +# RULE configuration_item_requires_approval # +#################### +configuration_item_requires_approval = Rule() + +#################### +# RULE contract_requires_person_organization # +#################### +contract_requires_person_organization = Rule() + +#################### +# RULE dependent_instantiable_date_time_role # +#################### +dependent_instantiable_date_time_role = Rule() + +#################### +# RULE restrict_product_category_value # +#################### +restrict_product_category_value = Rule() + +#################### +# RULE start_work_requires_date_time # +#################### +start_work_requires_date_time = Rule() + +#################### +# RULE product_requires_product_category # +#################### +product_requires_product_category = Rule() + +#################### +# RULE dependent_instantiable_representation_item # +#################### +dependent_instantiable_representation_item = Rule() + +#################### +# RULE change_request_requires_person_organization # +#################### +change_request_requires_person_organization = Rule() + +#################### +# RULE product_definition_requires_approval # +#################### +product_definition_requires_approval = Rule() + +#################### +# RULE subtype_mandatory_representation_context # +#################### +subtype_mandatory_representation_context = Rule() + +#################### +# RULE security_classification_requires_date_time # +#################### +security_classification_requires_date_time = Rule() + +#################### +# RULE security_classification_optional_date_time # +#################### +security_classification_optional_date_time = Rule() + +#################### +# RULE as_required_quantity # +#################### +as_required_quantity = Rule() + +#################### +# RULE start_request_requires_approval # +#################### +start_request_requires_approval = Rule() + +#################### +# RULE geometric_representation_item_3d # +#################### +geometric_representation_item_3d = Rule() + +#################### +# RULE application_context_requires_ap_definition # +#################### +application_context_requires_ap_definition = Rule() + +#################### +# RULE subtype_mandatory_representation # +#################### +subtype_mandatory_representation = Rule() + +#################### +# RULE change_requires_date_time # +#################### +change_requires_date_time = Rule() + +#################### +# RULE dependent_instantiable_action_directive # +#################### +dependent_instantiable_action_directive = Rule() + +#################### +# RULE restrict_security_classification_level # +#################### +restrict_security_classification_level = Rule() + +#################### +# RULE approval_requires_approval_date_time # +#################### +approval_requires_approval_date_time = Rule() + +#################### +# RULE subtype_mandatory_product_definition_usage # +#################### +subtype_mandatory_product_definition_usage = Rule() + +#################### +# RULE restrict_approval_status # +#################### +restrict_approval_status = Rule() + +#################### +# RULE change_request_requires_date_time # +#################### +change_request_requires_date_time = Rule() + +#################### +# RULE dependent_instantiable_contract_type # +#################### +dependent_instantiable_contract_type = Rule() + +#################### +# RULE contract_requires_approval # +#################### +contract_requires_approval = Rule() + +#################### +# RULE restrict_document_type # +#################### +restrict_document_type = Rule() + +#################### +# RULE dependent_instantiable_certification_type # +#################### +dependent_instantiable_certification_type = Rule() + +#################### +# RULE design_context_for_property # +#################### +design_context_for_property = Rule() + +#################### +# RULE product_version_requires_person_organization # +#################### +product_version_requires_person_organization = Rule() + +#################### +# RULE dependent_instantiable_approval_status # +#################### +dependent_instantiable_approval_status = Rule() + +#################### +# RULE subtype_mandatory_shape_representation # +#################### +subtype_mandatory_shape_representation = Rule() + +#################### +# RULE dependent_instantiable_date # +#################### +dependent_instantiable_date = Rule() + +#################### +# RULE configuration_item_requires_person_organization # +#################### +configuration_item_requires_person_organization = Rule() + +#################### +# RULE dependent_instantiable_document_type # +#################### +dependent_instantiable_document_type = Rule() + +#################### +# RULE restrict_contract_type # +#################### +restrict_contract_type = Rule() + +#################### +# RULE subtype_mandatory_product_context # +#################### +subtype_mandatory_product_context = Rule() + +#################### +# RULE dependent_instantiable_parametric_representation_context # +#################### +dependent_instantiable_parametric_representation_context = Rule() + +#################### +# RULE security_classification_requires_person_organization # +#################### +security_classification_requires_person_organization = Rule() + +#################### +# RULE dependent_instantiable_shape_representation # +#################### +dependent_instantiable_shape_representation = Rule() + +#################### +# RULE restrict_action_request_status # +#################### +restrict_action_request_status = Rule() + +#################### +# RULE restrict_certification_type # +#################### +restrict_certification_type = Rule() + +#################### +# RULE subtype_mandatory_action # +#################### +subtype_mandatory_action = Rule() + +#################### +# RULE product_requires_person_organization # +#################### +product_requires_person_organization = Rule() + +#################### +# RULE product_version_requires_security_classification # +#################### +product_version_requires_security_classification = Rule() + +#################### +# RULE document_to_product_definition # +#################### +document_to_product_definition = Rule() + +#################### +# RULE start_request_requires_date_time # +#################### +start_request_requires_date_time = Rule() + +#################### +# RULE dependent_instantiable_security_classification_level # +#################### +dependent_instantiable_security_classification_level = Rule() + +#################### +# RULE global_unit_assignment # +#################### +global_unit_assignment = Rule() + +#################### +# RULE restrict_person_organization_role # +#################### +restrict_person_organization_role = Rule() + +#################### +# RULE coordinated_assembly_and_shape # +#################### +coordinated_assembly_and_shape = Rule() + +#################### +# RULE start_request_requires_person_organization # +#################### +start_request_requires_person_organization = Rule() + +#################### +# RULE no_shape_for_make_from # +#################### +no_shape_for_make_from = Rule() + +#################### +# RULE approval_date_time_constraints # +#################### +approval_date_time_constraints = Rule() + +#################### +# RULE security_classification_requires_approval # +#################### +security_classification_requires_approval = Rule() diff --git a/src/Mod/Import/App/ifc2x3.py b/src/Mod/Import/App/SCL_output/ifc2x3.py similarity index 99% rename from src/Mod/Import/App/ifc2x3.py rename to src/Mod/Import/App/SCL_output/ifc2x3.py index 64d5b94beb..c4cc420275 100644 --- a/src/Mod/Import/App/ifc2x3.py +++ b/src/Mod/Import/App/SCL_output/ifc2x3.py @@ -35949,7 +35949,7 @@ def ifcnormalise(arg,): :type arg:ifcvectorordirection ''' if ( not EXISTS(arg)): - return None + return None else: ndim = arg.dim if ('IFC2X3.IFCVECTOR' == TYPEOF(arg)): @@ -35958,7 +35958,7 @@ def ifcnormalise(arg,): vec.magnitude = arg.ifcvector.magnitude vec.orientation = v if (arg.magnitude == 0): - return None + return None else: vec.magnitude = 1 else: @@ -35976,7 +35976,7 @@ def ifcnormalise(arg,): else: result = v else: - return None + return None return result #################### @@ -36033,7 +36033,7 @@ def ifcvectorsum(arg1,arg2,): :type arg2:ifcvectorordirection ''' if ((( not EXISTS(arg1)) or ( not EXISTS(arg2))) or (arg1.dim != arg2.dim)): - return None + return None else: # begin/end block if ('IFC2X3.IFCVECTOR' == TYPEOF(arg1)): @@ -36073,7 +36073,7 @@ def ifcvectordifference(arg1,arg2,): :type arg2:ifcvectorordirection ''' if ((( not EXISTS(arg1)) or ( not EXISTS(arg2))) or (arg1.dim != arg2.dim)): - return None + return None else: # begin/end block if ('IFC2X3.IFCVECTOR' == TYPEOF(arg1)): @@ -36114,7 +36114,7 @@ def ifccorrectlocalplacement(axisplacement,relplacement,): ''' if (EXISTS(relplacement)): if ('IFC2X3.IFCGRIDPLACEMENT' == TYPEOF(relplacement)): - return None + return None if ('IFC2X3.IFCLOCALPLACEMENT' == TYPEOF(relplacement)): if ('IFC2X3.IFCAXIS2PLACEMENT2D' == TYPEOF(axisplacement)): return TRUE @@ -36125,7 +36125,7 @@ def ifccorrectlocalplacement(axisplacement,relplacement,): return FALSE else: return TRUE - return None + return None #################### # FUNCTION ifccorrectfillareastyle # @@ -36185,7 +36185,7 @@ def ifccurvedim(curve,): return 2 if ('IFC2X3.IFCOFFSETCURVE3D' == TYPEOF(curve)): return 3 - return None + return None #################### # FUNCTION ifcsamedirection # @@ -36219,7 +36219,7 @@ def ifclisttoarray(lis,low,u,): ''' n = SIZEOF(lis) if (n != ((u - low) + 1)): - return None + return None else: res = [lis[1],n] for i in range(2,n,1): @@ -36268,7 +36268,7 @@ def ifctopologyrepresentationtypes(reptype,items,): elif case_selector == 'Undefined': return TRUE else: - return None + return None return count == SIZEOF(items) #################### @@ -36300,10 +36300,10 @@ def ifcdotproduct(arg1,arg2,): :type arg2:ifcdirection ''' if (( not EXISTS(arg1)) or ( not EXISTS(arg2))): - scalar = None + scalar = None else: if (arg1.dim != arg2.dim): - scalar = None + scalar = None else: # begin/end block vec1 = ifcnormalise(arg1) @@ -36344,7 +36344,7 @@ def ifcfirstprojaxis(zaxis,arg,): :type arg:ifcdirection ''' if ( not EXISTS(zaxis)): - return None + return None else: z = ifcnormalise(zaxis) if ( not EXISTS(arg)): @@ -36354,9 +36354,9 @@ def ifcfirstprojaxis(zaxis,arg,): v = (ifcrepresentationitem() == ifcgeometricrepresentationitem()) == ifcdirection([0,1,0]) else: if (arg.dim != 3): - return None + return None if (ifccrossproduct(arg,z).magnitude == 0): - return None + return None else: v = ifcnormalise(arg) xvec = ifcscalartimesvector(ifcdotproduct(v,z),z) @@ -36424,7 +36424,7 @@ def ifcshaperepresentationtypes(reptype,items,): # begin/end block count = SIZEOF(None) else: - return None + return None return count == SIZEOF(items) #################### @@ -36509,7 +36509,7 @@ def ifcscalartimesvector(scalar,vec,): :type vec:ifcvectorordirection ''' if (( not EXISTS(scalar)) or ( not EXISTS(vec))): - return None + return None else: if ('IFC2X3.IFCVECTOR' == TYPEOF(vec)): v = vec.ifcvector.orientation @@ -36583,7 +36583,7 @@ def ifcorthogonalcomplement(vec,): :type vec:ifcdirection ''' if (( not EXISTS(vec)) or (vec.dim != 2)): - return None + return None else: result = (ifcrepresentationitem() == ifcgeometricrepresentationitem()) == ifcdirection([-vec.directionratios[2],vec.directionratios[1]]) return result @@ -36889,7 +36889,7 @@ def ifccorrectobjectassignment(constraint,objects,): count = SIZEOF(None) return count == 0 else: - return None + return None #################### # FUNCTION ifcvalidcalendardate # @@ -36968,7 +36968,7 @@ def ifccrossproduct(arg1,arg2,): :type arg2:ifcdirection ''' if ((( not EXISTS(arg1)) or (arg1.dim == 2)) or (( not EXISTS(arg2)) or (arg2.dim == 2))): - return None + return None else: # begin/end block v1 = ifcnormalise(arg1).directionratios diff --git a/src/Mod/Import/App/ifc4.py b/src/Mod/Import/App/SCL_output/ifc4.py similarity index 99% rename from src/Mod/Import/App/ifc4.py rename to src/Mod/Import/App/SCL_output/ifc4.py index 5f60cd3068..396814f622 100644 --- a/src/Mod/Import/App/ifc4.py +++ b/src/Mod/Import/App/SCL_output/ifc4.py @@ -42688,7 +42688,7 @@ def ifcnormalise(arg,): :type arg:ifcvectorordirection ''' if ( not EXISTS(arg)): - return None + return None else: if ('IFC4.IFCVECTOR' == TYPEOF(arg)): # begin/end block @@ -42697,7 +42697,7 @@ def ifcnormalise(arg,): vec.magnitude = arg.ifcvector.magnitude vec.orientation = v if (arg.ifcvector.magnitude == 0): - return None + return None else: vec.magnitude = 1 else: @@ -42717,7 +42717,7 @@ def ifcnormalise(arg,): else: result = v else: - return None + return None return result #################### @@ -42796,7 +42796,7 @@ def ifcvectorsum(arg1,arg2,): :type arg2:ifcvectorordirection ''' if ((( not EXISTS(arg1)) or ( not EXISTS(arg2))) or (arg1.dim != arg2.dim)): - return None + return None else: # begin/end block if ('IFC4.IFCVECTOR' == TYPEOF(arg1)): @@ -42836,7 +42836,7 @@ def ifcvectordifference(arg1,arg2,): :type arg2:ifcvectorordirection ''' if ((( not EXISTS(arg1)) or ( not EXISTS(arg2))) or (arg1.dim != arg2.dim)): - return None + return None else: # begin/end block if ('IFC4.IFCVECTOR' == TYPEOF(arg1)): @@ -42877,7 +42877,7 @@ def ifccorrectlocalplacement(axisplacement,relplacement,): ''' if (EXISTS(relplacement)): if ('IFC4.IFCGRIDPLACEMENT' == TYPEOF(relplacement)): - return None + return None if ('IFC4.IFCLOCALPLACEMENT' == TYPEOF(relplacement)): if ('IFC4.IFCAXIS2PLACEMENT2D' == TYPEOF(axisplacement)): return TRUE @@ -42888,7 +42888,7 @@ def ifccorrectlocalplacement(axisplacement,relplacement,): return FALSE else: return TRUE - return None + return None #################### # FUNCTION ifccorrectfillareastyle # @@ -42953,13 +42953,13 @@ def ifcmakearrayofarray(lis,low1,u1,low2,u2,): :type u2:INTEGER ''' if (((u1 - low1) + 1) != SIZEOF(lis)): - return None + return None if (((u2 - low2) + 1) != SIZEOF(lis[1])): - return None + return None res = [ifclisttoarray(lis[1],low2,u2),(u1 - low1) + 1] for i in range(2,HIINDEX(lis),1): if (((u2 - low2) + 1) != SIZEOF(lis[i])): - return None + return None res[(low1 + i) - 1] = ifclisttoarray(lis[i],low2,u2) return res @@ -42989,7 +42989,7 @@ def ifccurvedim(curve,): return 3 if ('IFC4.IFCPCURVE' == TYPEOF(curve)): return 3 - return None + return None #################### # FUNCTION ifcsamedirection # @@ -43023,7 +43023,7 @@ def ifclisttoarray(lis,low,u,): ''' n = SIZEOF(lis) if (n != ((u - low) + 1)): - return None + return None else: res = [lis[1],n] for i in range(2,n,1): @@ -43059,7 +43059,7 @@ def ifctopologyrepresentationtypes(reptype,items,): elif case_selector == 'Undefined': return TRUE else: - return None + return None return count == SIZEOF(items) #################### @@ -43091,10 +43091,10 @@ def ifcdotproduct(arg1,arg2,): :type arg2:ifcdirection ''' if (( not EXISTS(arg1)) or ( not EXISTS(arg2))): - scalar = None + scalar = None else: if (arg1.dim != arg2.dim): - scalar = None + scalar = None else: # begin/end block vec1 = ifcnormalise(arg1) @@ -43116,7 +43116,7 @@ def ifcfirstprojaxis(zaxis,arg,): :type arg:ifcdirection ''' if ( not EXISTS(zaxis)): - return None + return None else: z = ifcnormalise(zaxis) if ( not EXISTS(arg)): @@ -43126,9 +43126,9 @@ def ifcfirstprojaxis(zaxis,arg,): v = (ifcrepresentationitem() == ifcgeometricrepresentationitem()) == ifcdirection([0,1,0]) else: if (arg.dim != 3): - return None + return None if (ifccrossproduct(arg,z).magnitude == 0): - return None + return None else: v = ifcnormalise(arg) xvec = ifcscalartimesvector(ifcdotproduct(v,z),z) @@ -43238,7 +43238,7 @@ def ifcshaperepresentationtypes(reptype,items,): # begin/end block count = SIZEOF(None) else: - return None + return None return count == SIZEOF(items) #################### @@ -43323,7 +43323,7 @@ def ifcscalartimesvector(scalar,vec,): :type vec:ifcvectorordirection ''' if (( not EXISTS(scalar)) or ( not EXISTS(vec))): - return None + return None else: if ('IFC4.IFCVECTOR' == TYPEOF(vec)): v = vec.ifcvector.orientation @@ -43428,7 +43428,7 @@ def ifcorthogonalcomplement(vec,): :type vec:ifcdirection ''' if (( not EXISTS(vec)) or (vec.dim != 2)): - return None + return None else: result = (ifcrepresentationitem() == ifcgeometricrepresentationitem()) == ifcdirection([-vec.directionratios[2],vec.directionratios[1]]) return result @@ -43734,7 +43734,7 @@ def ifccorrectobjectassignment(constraint,objects,): count = SIZEOF(None) return count == 0 else: - return None + return None #################### # FUNCTION ifccurveweightspositive # @@ -43824,7 +43824,7 @@ def ifccrossproduct(arg1,arg2,): :type arg2:ifcdirection ''' if ((( not EXISTS(arg1)) or (arg1.dim == 2)) or (( not EXISTS(arg2)) or (arg2.dim == 2))): - return None + return None else: # begin/end block v1 = ifcnormalise(arg1).ifcdirection.directionratios diff --git a/src/Mod/Import/App/StepShape.cpp b/src/Mod/Import/App/StepShape.cpp index d371895b55..87b793f17d 100644 --- a/src/Mod/Import/App/StepShape.cpp +++ b/src/Mod/Import/App/StepShape.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -31,8 +31,8 @@ #include #include #include -#include #include +#include #include #include "StepShape.h" @@ -63,8 +63,8 @@ int StepShape::read(const char* fileName) Handle(TColStd_HSequenceOfTransient) list = aReader.GiveList(); - //Use method StepData_StepModel::NextNumberForLabel to find its rank with the following: - //Standard_CString label = "#..."; + // Use method StepData_StepModel::NextNumberForLabel to find its rank with the following: + // Standard_CString label = "#..."; Handle(StepData_StepModel) model = aReader.StepModel(); @@ -77,15 +77,15 @@ int StepShape::read(const char* fileName) model->DumpHeader(std::cout); #endif - for (int nent=1;nent<=model->NbEntities();nent++) { - Handle(Standard_Transient) entity=model->Entity(nent); - std::cout << "label entity " << nent << ":" ; + for (int nent = 1; nent <= model->NbEntities(); nent++) { + Handle(Standard_Transient) entity = model->Entity(nent); + std::cout << "label entity " << nent << ":"; #if OCC_VERSION_HEX < 0x070401 - model->PrintLabel(entity, msg); + model->PrintLabel(entity, msg); #else - model->PrintLabel(entity, std::cout); + model->PrintLabel(entity, std::cout); #endif - std::cout << ";"<< entity->DynamicType()->Name() << std::endl; + std::cout << ";" << entity->DynamicType()->Name() << std::endl; } return 0; diff --git a/src/Mod/Import/App/StepShape.h b/src/Mod/Import/App/StepShape.h index 705e3c9f70..015d897368 100644 --- a/src/Mod/Import/App/StepShape.h +++ b/src/Mod/Import/App/StepShape.h @@ -41,10 +41,9 @@ public: ~StepShape(); int read(const char* fileName); - }; -} // namespace Import +} // namespace Import -#endif // IMPORT_STEPSHAPE_H +#endif // IMPORT_STEPSHAPE_H diff --git a/src/Mod/Import/App/StepShapePy.xml b/src/Mod/Import/App/StepShapePy.xml index 1bbb901644..9605bc1e52 100644 --- a/src/Mod/Import/App/StepShapePy.xml +++ b/src/Mod/Import/App/StepShapePy.xml @@ -27,4 +27,4 @@ Read a STEP file into memory and make it accessible - \ No newline at end of file + diff --git a/src/Mod/Import/App/StepShapePyImp.cpp b/src/Mod/Import/App/StepShapePyImp.cpp index 752665c941..f1e7f04913 100644 --- a/src/Mod/Import/App/StepShapePyImp.cpp +++ b/src/Mod/Import/App/StepShapePyImp.cpp @@ -22,9 +22,11 @@ #include "PreCompiled.h" +// clang-format off // inclusion of the generated files (generated out of StepShapePy.xml) #include "StepShapePy.h" #include "StepShapePy.cpp" +// clang-format on using namespace Import; @@ -34,7 +36,7 @@ std::string StepShapePy::representation() const return {""}; } -PyObject *StepShapePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* StepShapePy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of StepShapePy and the Twin object return new StepShapePy(new StepShape); @@ -53,13 +55,13 @@ int StepShapePy::PyInit(PyObject* args, PyObject* /*kwd*/) return -1; } -PyObject* StepShapePy::read(PyObject * /*args*/) +PyObject* StepShapePy::read(PyObject* /*args*/) { PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented"); return nullptr; } -PyObject *StepShapePy::getCustomAttributes(const char* /*attr*/) const +PyObject* StepShapePy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Import/App/config_control_design.py b/src/Mod/Import/App/config_control_design.py deleted file mode 100644 index 7228a4febd..0000000000 --- a/src/Mod/Import/App/config_control_design.py +++ /dev/null @@ -1,13730 +0,0 @@ -# This file was generated by fedex_python. You probably don't want to edit -# it since your modifications will be lost if fedex_plus is used to -# regenerate it. -import sys - -from SCL.SCLBase import * -from SCL.SimpleDataTypes import * -from SCL.ConstructedDataTypes import * -from SCL.AggregationDataTypes import * -from SCL.TypeChecker import check_type -from SCL.Builtin import * -from SCL.Rules import * - -schema_name = 'config_control_design' - -schema_scope = sys.modules[__name__] - -# SELECT TYPE characterized_definition -characterized_definition = SELECT( - 'characterized_product_definition', - 'shape_definition', - scope = schema_scope) -# Defined datatype parameter_value -class parameter_value(REAL): - def __init__(self,*kargs): - pass - -# Defined datatype plane_angle_measure -class plane_angle_measure(REAL): - def __init__(self,*kargs): - pass - -# SELECT TYPE change_request_item -change_request_item = SELECT( - 'product_definition_formation', - scope = schema_scope) -# Defined datatype text -class text(STRING): - def __init__(self,*kargs): - pass - -# Defined datatype year_number -class year_number(INTEGER): - def __init__(self,*kargs): - pass - -# SELECT TYPE characterized_product_definition -characterized_product_definition = SELECT( - 'product_definition', - 'product_definition_relationship', - scope = schema_scope) -# SELECT TYPE reversible_topology_item -reversible_topology_item = SELECT( - 'edge', - 'path', - 'face', - 'face_bound', - 'closed_shell', - 'open_shell', - scope = schema_scope) -# SELECT TYPE axis2_placement -axis2_placement = SELECT( - 'axis2_placement_2d', - 'axis2_placement_3d', - scope = schema_scope) -set_of_reversible_topology_item = SET(0,None,'reversible_topology_item', scope = schema_scope) -# Defined datatype week_in_year_number -class week_in_year_number(INTEGER): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = ((1 <= self) and (self <= 53)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# Defined datatype knot_type -class knot_type(ENUMERATION): - def __init__(self,*kargs): - pass - -# SELECT TYPE specified_item -specified_item = SELECT( - 'product_definition', - 'shape_aspect', - scope = schema_scope) -# Defined datatype minute_in_hour -class minute_in_hour(INTEGER): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = ((0 <= self) and (self <= 59)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# Defined datatype transition_code -class transition_code(ENUMERATION): - def __init__(self,*kargs): - pass - -# Defined datatype identifier -class identifier(STRING): - def __init__(self,*kargs): - pass - -# SELECT TYPE measure_value -measure_value = SELECT( - 'length_measure', - 'mass_measure', - 'plane_angle_measure', - 'solid_angle_measure', - 'area_measure', - 'volume_measure', - 'parameter_value', - 'context_dependent_measure', - 'descriptive_measure', - 'positive_length_measure', - 'positive_plane_angle_measure', - 'count_measure', - scope = schema_scope) -# SELECT TYPE person_organization_select -person_organization_select = SELECT( - 'person', - 'organization', - 'person_and_organization', - scope = schema_scope) -# Defined datatype preferred_surface_curve_representation -class preferred_surface_curve_representation(ENUMERATION): - def __init__(self,*kargs): - pass - -# Defined datatype dimension_count -class dimension_count(INTEGER): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = (self > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# SELECT TYPE pcurve_or_surface -pcurve_or_surface = SELECT( - 'pcurve', - 'surface', - scope = schema_scope) - -# Defined datatype length_measure -class length_measure(REAL): - def __init__(self,*kargs): - pass - - -# Defined datatype positive_length_measure -class positive_length_measure(length_measure): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = (self > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# Defined datatype b_spline_curve_form -class b_spline_curve_form(ENUMERATION): - def __init__(self,*kargs): - pass - -# Defined datatype hour_in_day -class hour_in_day(INTEGER): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = ((0 <= self) and (self < 24)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# SELECT TYPE classified_item -classified_item = SELECT( - 'product_definition_formation', - 'assembly_component_usage', - scope = schema_scope) -# Defined datatype si_unit_name -class si_unit_name(ENUMERATION): - def __init__(self,*kargs): - pass - -# Defined datatype day_in_month_number -class day_in_month_number(INTEGER): - def __init__(self,*kargs): - pass - -# SELECT TYPE founded_item_select -founded_item_select = SELECT( - 'founded_item', - 'representation_item', - scope = schema_scope) -# Defined datatype trimming_preference -class trimming_preference(ENUMERATION): - def __init__(self,*kargs): - pass - -# SELECT TYPE vector_or_direction -vector_or_direction = SELECT( - 'vector', - 'direction', - scope = schema_scope) -# SELECT TYPE wireframe_model -wireframe_model = SELECT( - 'shell_based_wireframe_model', - 'edge_based_wireframe_model', - scope = schema_scope) -# Defined datatype volume_measure -class volume_measure(REAL): - def __init__(self,*kargs): - pass - -# SELECT TYPE geometric_set_select -geometric_set_select = SELECT( - 'point', - 'curve', - 'surface', - scope = schema_scope) -# Defined datatype positive_plane_angle_measure -class positive_plane_angle_measure(plane_angle_measure): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = (self > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# SELECT TYPE start_request_item -start_request_item = SELECT( - 'product_definition_formation', - scope = schema_scope) -# Defined datatype b_spline_surface_form -class b_spline_surface_form(ENUMERATION): - def __init__(self,*kargs): - pass - -# SELECT TYPE person_organization_item -person_organization_item = SELECT( - 'change', - 'start_work', - 'change_request', - 'start_request', - 'configuration_item', - 'product', - 'product_definition_formation', - 'product_definition', - 'contract', - 'security_classification', - scope = schema_scope) -# SELECT TYPE date_time_item -date_time_item = SELECT( - 'product_definition', - 'change_request', - 'start_request', - 'change', - 'start_work', - 'approval_person_organization', - 'contract', - 'security_classification', - 'certification', - scope = schema_scope) -# SELECT TYPE shell -shell = SELECT( - 'vertex_shell', - 'wire_shell', - 'open_shell', - 'closed_shell', - scope = schema_scope) -# SELECT TYPE transformation -transformation = SELECT( - 'item_defined_transformation', - 'functionally_defined_transformation', - scope = schema_scope) -# Defined datatype day_in_week_number -class day_in_week_number(INTEGER): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = ((1 <= self) and (self <= 7)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# SELECT TYPE boolean_operand -boolean_operand = SELECT( - 'solid_model', - scope = schema_scope) -# SELECT TYPE certified_item -certified_item = SELECT( - 'supplied_part_relationship', - scope = schema_scope) -# SELECT TYPE date_time_select -date_time_select = SELECT( - 'date', - 'local_time', - 'date_and_time', - scope = schema_scope) -# Defined datatype solid_angle_measure -class solid_angle_measure(REAL): - def __init__(self,*kargs): - pass - -# SELECT TYPE curve_on_surface -curve_on_surface = SELECT( - 'pcurve', - 'surface_curve', - 'composite_curve_on_surface', - scope = schema_scope) -# SELECT TYPE trimming_select -trimming_select = SELECT( - 'cartesian_point', - 'parameter_value', - scope = schema_scope) -# Defined datatype ahead_or_behind -class ahead_or_behind(ENUMERATION): - def __init__(self,*kargs): - pass - -# SELECT TYPE contracted_item -contracted_item = SELECT( - 'product_definition_formation', - scope = schema_scope) -# Defined datatype day_in_year_number -class day_in_year_number(INTEGER): - def __init__(self,*kargs): - pass - -# Defined datatype mass_measure -class mass_measure(REAL): - def __init__(self,*kargs): - pass - -# Defined datatype descriptive_measure -class descriptive_measure(STRING): - def __init__(self,*kargs): - pass - -# Defined datatype area_measure -class area_measure(REAL): - def __init__(self,*kargs): - pass - -# Defined datatype month_in_year_number -class month_in_year_number(INTEGER): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = ((1 <= self) and (self <= 12)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# Defined datatype source -class source(ENUMERATION): - def __init__(self,*kargs): - pass - -# SELECT TYPE unit -unit = SELECT( - 'named_unit', - scope = schema_scope) -# SELECT TYPE reversible_topology -reversible_topology = SELECT( - 'reversible_topology_item', - 'list_of_reversible_topology_item', - 'set_of_reversible_topology_item', - scope = schema_scope) -# SELECT TYPE work_item -work_item = SELECT( - 'product_definition_formation', - scope = schema_scope) -# SELECT TYPE shape_definition -shape_definition = SELECT( - 'product_definition_shape', - 'shape_aspect', - 'shape_aspect_relationship', - scope = schema_scope) -# Defined datatype second_in_minute -class second_in_minute(REAL): - def __init__(self,*kargs): - pass - self.wr1() - - def wr1(self): - eval_wr1_wr = ((0 <= self) and (self < 60)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - -# Defined datatype label -class label(STRING): - def __init__(self,*kargs): - pass - -# Defined datatype context_dependent_measure -class context_dependent_measure(REAL): - def __init__(self,*kargs): - pass - -# SELECT TYPE supported_item -supported_item = SELECT( - 'action_directive', - 'action', - 'action_method', - scope = schema_scope) -# Defined datatype si_prefix -class si_prefix(ENUMERATION): - def __init__(self,*kargs): - pass - - -# SELECT TYPE approved_item -approved_item = SELECT( - 'product_definition_formation', - 'product_definition', - 'configuration_effectivity', - 'configuration_item', - 'security_classification', - 'change_request', - 'change', - 'start_request', - 'start_work', - 'certification', - 'contract', - scope = schema_scope) -# Defined datatype count_measure -class count_measure(NUMBER): - def __init__(self,*kargs): - pass - -# SELECT TYPE surface_model -surface_model = SELECT( - 'shell_based_surface_model', - scope = schema_scope) -list_of_reversible_topology_item = LIST(0,None,'reversible_topology_item', scope = schema_scope) - -#################### - # ENTITY representation_item # -#################### -class representation_item(BaseEntityClass): - '''Entity representation_item definition. - - :param name - :type name:label - ''' - def __init__( self , name, ): - self.name = name - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (SIZEOF(using_representations(self)) > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY geometric_representation_item # -#################### -class geometric_representation_item(representation_item): - '''Entity geometric_representation_item definition. - - :param dim - :type dim:dimension_count - ''' - def __init__( self , inherited0__name , ): - representation_item.__init__(self , inherited0__name , ) - - @apply - def dim(): - def fget( self ): - attribute_eval = dimension_of(self) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument dim is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY functionally_defined_transformation # -#################### -class functionally_defined_transformation(BaseEntityClass): - '''Entity functionally_defined_transformation definition. - - :param name - :type name:label - - :param description - :type description:text - ''' - def __init__( self , name,description, ): - self.name = name - self.description = description - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY cartesian_transformation_operator # -#################### -class cartesian_transformation_operator(geometric_representation_item,functionally_defined_transformation): - '''Entity cartesian_transformation_operator definition. - - :param axis1 - :type axis1:direction - - :param axis2 - :type axis2:direction - - :param local_origin - :type local_origin:cartesian_point - - :param scale - :type scale:REAL - - :param scl - :type scl:REAL - ''' - def __init__( self , inherited0__name , inherited1__name , inherited2__description , axis1,axis2,local_origin,scale, ): - geometric_representation_item.__init__(self , inherited0__name , ) - functionally_defined_transformation.__init__(self , inherited1__name , inherited2__description , ) - self.axis1 = axis1 - self.axis2 = axis2 - self.local_origin = local_origin - self.scale = scale - - @apply - def axis1(): - def fget( self ): - return self._axis1 - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,direction): - self._axis1 = direction(value) - else: - self._axis1 = value - else: - self._axis1 = value - return property(**locals()) - - @apply - def axis2(): - def fget( self ): - return self._axis2 - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,direction): - self._axis2 = direction(value) - else: - self._axis2 = value - else: - self._axis2 = value - return property(**locals()) - - @apply - def local_origin(): - def fget( self ): - return self._local_origin - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument local_origin is mantatory and can not be set to None') - if not check_type(value,cartesian_point): - self._local_origin = cartesian_point(value) - else: - self._local_origin = value - return property(**locals()) - - @apply - def scale(): - def fget( self ): - return self._scale - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,REAL): - self._scale = REAL(value) - else: - self._scale = value - else: - self._scale = value - return property(**locals()) - - @apply - def scl(): - def fget( self ): - attribute_eval = NVL(self.scale,1) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument scl is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.scl > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY cartesian_transformation_operator_3d # -#################### -class cartesian_transformation_operator_3d(cartesian_transformation_operator): - '''Entity cartesian_transformation_operator_3d definition. - - :param axis3 - :type axis3:direction - - :param u - :type u:LIST(3,3,'direction', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__name , inherited2__description , inherited3__axis1 , inherited4__axis2 , inherited5__local_origin , inherited6__scale , axis3, ): - cartesian_transformation_operator.__init__(self , inherited0__name , inherited1__name , inherited2__description , inherited3__axis1 , inherited4__axis2 , inherited5__local_origin , inherited6__scale , ) - self.axis3 = axis3 - - @apply - def axis3(): - def fget( self ): - return self._axis3 - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,direction): - self._axis3 = direction(value) - else: - self._axis3 = value - else: - self._axis3 = value - return property(**locals()) - - @apply - def u(): - def fget( self ): - attribute_eval = base_axis(3,self.self.cartesian_transformation_operator.self.axis1,self.self.cartesian_transformation_operator.self.axis2,self.axis3) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument u is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.self.geometric_representation_item.self.dim == 3) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY versioned_action_request # -#################### -class versioned_action_request(BaseEntityClass): - '''Entity versioned_action_request definition. - - :param id - :type id:identifier - - :param version - :type version:label - - :param purpose - :type purpose:text - - :param description - :type description:text - ''' - def __init__( self , id,version,purpose,description, ): - self.id = id - self.version = version - self.purpose = purpose - self.description = description - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def version(): - def fget( self ): - return self._version - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument version is mantatory and can not be set to None') - if not check_type(value,label): - self._version = label(value) - else: - self._version = value - return property(**locals()) - - @apply - def purpose(): - def fget( self ): - return self._purpose - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument purpose is mantatory and can not be set to None') - if not check_type(value,text): - self._purpose = text(value) - else: - self._purpose = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY representation # -#################### -class representation(BaseEntityClass): - '''Entity representation definition. - - :param name - :type name:label - - :param items - :type items:SET(1,None,'representation_item', scope = schema_scope) - - :param context_of_items - :type context_of_items:representation_context - ''' - def __init__( self , name,items,context_of_items, ): - self.name = name - self.items = items - self.context_of_items = context_of_items - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'representation_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - - @apply - def context_of_items(): - def fget( self ): - return self._context_of_items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument context_of_items is mantatory and can not be set to None') - if not check_type(value,representation_context): - self._context_of_items = representation_context(value) - else: - self._context_of_items = value - return property(**locals()) - -#################### - # ENTITY shape_representation # -#################### -class shape_representation(representation): - '''Entity shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - -#################### - # ENTITY manifold_surface_shape_representation # -#################### -class manifold_surface_shape_representation(shape_representation): - '''Entity manifold_surface_shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - shape_representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) > 0) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (SIZEOF(None) == 0) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - def wr7(self): - eval_wr7_wr = (SIZEOF(None) == 0) - if not eval_wr7_wr: - raise AssertionError('Rule wr7 violated') - else: - return eval_wr7_wr - - def wr8(self): - eval_wr8_wr = (SIZEOF(None) == 0) - if not eval_wr8_wr: - raise AssertionError('Rule wr8 violated') - else: - return eval_wr8_wr - - def wr9(self): - eval_wr9_wr = (SIZEOF(None) == 0) - if not eval_wr9_wr: - raise AssertionError('Rule wr9 violated') - else: - return eval_wr9_wr - - def wr10(self): - eval_wr10_wr = (SIZEOF(None) == 0) - if not eval_wr10_wr: - raise AssertionError('Rule wr10 violated') - else: - return eval_wr10_wr - - def wr11(self): - eval_wr11_wr = (SIZEOF(None) == 0) - if not eval_wr11_wr: - raise AssertionError('Rule wr11 violated') - else: - return eval_wr11_wr - - def wr12(self): - eval_wr12_wr = (SIZEOF(None) == 0) - if not eval_wr12_wr: - raise AssertionError('Rule wr12 violated') - else: - return eval_wr12_wr - - def wr13(self): - eval_wr13_wr = (SIZEOF(None) == 0) - if not eval_wr13_wr: - raise AssertionError('Rule wr13 violated') - else: - return eval_wr13_wr - - def wr14(self): - eval_wr14_wr = (SIZEOF(None) == 0) - if not eval_wr14_wr: - raise AssertionError('Rule wr14 violated') - else: - return eval_wr14_wr - - def wr15(self): - eval_wr15_wr = (SIZEOF(None) == 0) - if not eval_wr15_wr: - raise AssertionError('Rule wr15 violated') - else: - return eval_wr15_wr - - -#################### - # ENTITY certification # -#################### -class certification(BaseEntityClass): - '''Entity certification definition. - - :param name - :type name:label - - :param purpose - :type purpose:text - - :param kind - :type kind:certification_type - ''' - def __init__( self , name,purpose,kind, ): - self.name = name - self.purpose = purpose - self.kind = kind - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def purpose(): - def fget( self ): - return self._purpose - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument purpose is mantatory and can not be set to None') - if not check_type(value,text): - self._purpose = text(value) - else: - self._purpose = value - return property(**locals()) - - @apply - def kind(): - def fget( self ): - return self._kind - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument kind is mantatory and can not be set to None') - if not check_type(value,certification_type): - self._kind = certification_type(value) - else: - self._kind = value - return property(**locals()) - -#################### - # ENTITY product_definition_relationship # -#################### -class product_definition_relationship(BaseEntityClass): - '''Entity product_definition_relationship definition. - - :param id - :type id:identifier - - :param name - :type name:label - - :param description - :type description:text - - :param relating_product_definition - :type relating_product_definition:product_definition - - :param related_product_definition - :type related_product_definition:product_definition - ''' - def __init__( self , id,name,description,relating_product_definition,related_product_definition, ): - self.id = id - self.name = name - self.description = description - self.relating_product_definition = relating_product_definition - self.related_product_definition = related_product_definition - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def relating_product_definition(): - def fget( self ): - return self._relating_product_definition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument relating_product_definition is mantatory and can not be set to None') - if not check_type(value,product_definition): - self._relating_product_definition = product_definition(value) - else: - self._relating_product_definition = value - return property(**locals()) - - @apply - def related_product_definition(): - def fget( self ): - return self._related_product_definition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument related_product_definition is mantatory and can not be set to None') - if not check_type(value,product_definition): - self._related_product_definition = product_definition(value) - else: - self._related_product_definition = value - return property(**locals()) - -#################### - # ENTITY product_definition_usage # -#################### -class product_definition_usage(product_definition_relationship): - '''Entity product_definition_usage definition. - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , ): - product_definition_relationship.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , ) - def wr1(self): - eval_wr1_wr = acyclic_product_definition_relationship(self,[self.self.product_definition_relationship.self.related_product_definition],'CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_USAGE') - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY assembly_component_usage # -#################### -class assembly_component_usage(product_definition_usage): - '''Entity assembly_component_usage definition. - - :param reference_designator - :type reference_designator:identifier - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , reference_designator, ): - product_definition_usage.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , ) - self.reference_designator = reference_designator - - @apply - def reference_designator(): - def fget( self ): - return self._reference_designator - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,identifier): - self._reference_designator = identifier(value) - else: - self._reference_designator = value - else: - self._reference_designator = value - return property(**locals()) - -#################### - # ENTITY quantified_assembly_component_usage # -#################### -class quantified_assembly_component_usage(assembly_component_usage): - '''Entity quantified_assembly_component_usage definition. - - :param quantity - :type quantity:measure_with_unit - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , quantity, ): - assembly_component_usage.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , ) - self.quantity = quantity - - @apply - def quantity(): - def fget( self ): - return self._quantity - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument quantity is mantatory and can not be set to None') - if not check_type(value,measure_with_unit): - self._quantity = measure_with_unit(value) - else: - self._quantity = value - return property(**locals()) - -#################### - # ENTITY solid_model # -#################### -class solid_model(geometric_representation_item): - '''Entity solid_model definition. - ''' - def __init__( self , inherited0__name , ): - geometric_representation_item.__init__(self , inherited0__name , ) - -#################### - # ENTITY manifold_solid_brep # -#################### -class manifold_solid_brep(solid_model): - '''Entity manifold_solid_brep definition. - - :param outer - :type outer:closed_shell - ''' - def __init__( self , inherited0__name , outer, ): - solid_model.__init__(self , inherited0__name , ) - self.outer = outer - - @apply - def outer(): - def fget( self ): - return self._outer - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument outer is mantatory and can not be set to None') - if not check_type(value,closed_shell): - self._outer = closed_shell(value) - else: - self._outer = value - return property(**locals()) - -#################### - # ENTITY faceted_brep # -#################### -class faceted_brep(manifold_solid_brep): - '''Entity faceted_brep definition. - ''' - def __init__( self , inherited0__name , inherited1__outer , ): - manifold_solid_brep.__init__(self , inherited0__name , inherited1__outer , ) - -#################### - # ENTITY action_directive # -#################### -class action_directive(BaseEntityClass): - '''Entity action_directive definition. - - :param name - :type name:label - - :param description - :type description:text - - :param analysis - :type analysis:text - - :param comment - :type comment:text - - :param requests - :type requests:SET(1,None,'versioned_action_request', scope = schema_scope) - ''' - def __init__( self , name,description,analysis,comment,requests, ): - self.name = name - self.description = description - self.analysis = analysis - self.comment = comment - self.requests = requests - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def analysis(): - def fget( self ): - return self._analysis - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument analysis is mantatory and can not be set to None') - if not check_type(value,text): - self._analysis = text(value) - else: - self._analysis = value - return property(**locals()) - - @apply - def comment(): - def fget( self ): - return self._comment - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument comment is mantatory and can not be set to None') - if not check_type(value,text): - self._comment = text(value) - else: - self._comment = value - return property(**locals()) - - @apply - def requests(): - def fget( self ): - return self._requests - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument requests is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'versioned_action_request', scope = schema_scope)): - self._requests = SET(value) - else: - self._requests = value - return property(**locals()) - -#################### - # ENTITY named_unit # -#################### -class named_unit(BaseEntityClass): - '''Entity named_unit definition. - - :param dimensions - :type dimensions:dimensional_exponents - ''' - def __init__( self , dimensions, ): - self.dimensions = dimensions - - @apply - def dimensions(): - def fget( self ): - return self._dimensions - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument dimensions is mantatory and can not be set to None') - if not check_type(value,dimensional_exponents): - self._dimensions = dimensional_exponents(value) - else: - self._dimensions = value - return property(**locals()) - -#################### - # ENTITY plane_angle_unit # -#################### -class plane_angle_unit(named_unit): - '''Entity plane_angle_unit definition. - ''' - def __init__( self , inherited0__dimensions , ): - named_unit.__init__(self , inherited0__dimensions , ) - def wr1(self): - eval_wr1_wr = (((((((self.self.named_unit.self.dimensions.self.length_exponent == 0) and (self.self.named_unit.self.dimensions.self.mass_exponent == 0)) and (self.self.named_unit.self.dimensions.self.time_exponent == 0)) and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0)) and (self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent == 0)) and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0)) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY measure_with_unit # -#################### -class measure_with_unit(BaseEntityClass): - '''Entity measure_with_unit definition. - - :param value_component - :type value_component:measure_value - - :param unit_component - :type unit_component:unit - ''' - def __init__( self , value_component,unit_component, ): - self.value_component = value_component - self.unit_component = unit_component - - @apply - def value_component(): - def fget( self ): - return self._value_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument value_component is mantatory and can not be set to None') - if not check_type(value,measure_value): - self._value_component = measure_value(value) - else: - self._value_component = value - return property(**locals()) - - @apply - def unit_component(): - def fget( self ): - return self._unit_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument unit_component is mantatory and can not be set to None') - if not check_type(value,unit): - self._unit_component = unit(value) - else: - self._unit_component = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = valid_units(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY area_measure_with_unit # -#################### -class area_measure_with_unit(measure_with_unit): - '''Entity area_measure_with_unit definition. - ''' - def __init__( self , inherited0__value_component , inherited1__unit_component , ): - measure_with_unit.__init__(self , inherited0__value_component , inherited1__unit_component , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.AREA_UNIT' == TYPEOF(self.self.measure_with_unit.self.unit_component)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY effectivity # -#################### -class effectivity(BaseEntityClass): - '''Entity effectivity definition. - - :param id - :type id:identifier - ''' - def __init__( self , id, ): - self.id = id - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - -#################### - # ENTITY serial_numbered_effectivity # -#################### -class serial_numbered_effectivity(effectivity): - '''Entity serial_numbered_effectivity definition. - - :param effectivity_start_id - :type effectivity_start_id:identifier - - :param effectivity_end_id - :type effectivity_end_id:identifier - ''' - def __init__( self , inherited0__id , effectivity_start_id,effectivity_end_id, ): - effectivity.__init__(self , inherited0__id , ) - self.effectivity_start_id = effectivity_start_id - self.effectivity_end_id = effectivity_end_id - - @apply - def effectivity_start_id(): - def fget( self ): - return self._effectivity_start_id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument effectivity_start_id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._effectivity_start_id = identifier(value) - else: - self._effectivity_start_id = value - return property(**locals()) - - @apply - def effectivity_end_id(): - def fget( self ): - return self._effectivity_end_id - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,identifier): - self._effectivity_end_id = identifier(value) - else: - self._effectivity_end_id = value - else: - self._effectivity_end_id = value - return property(**locals()) - -#################### - # ENTITY surface # -#################### -class surface(geometric_representation_item): - '''Entity surface definition. - ''' - def __init__( self , inherited0__name , ): - geometric_representation_item.__init__(self , inherited0__name , ) - -#################### - # ENTITY offset_surface # -#################### -class offset_surface(surface): - '''Entity offset_surface definition. - - :param basis_surface - :type basis_surface:surface - - :param distance - :type distance:length_measure - - :param self_intersect - :type self_intersect:LOGICAL - ''' - def __init__( self , inherited0__name , basis_surface,distance,self_intersect, ): - surface.__init__(self , inherited0__name , ) - self.basis_surface = basis_surface - self.distance = distance - self.self_intersect = self_intersect - - @apply - def basis_surface(): - def fget( self ): - return self._basis_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_surface is mantatory and can not be set to None') - if not check_type(value,surface): - self._basis_surface = surface(value) - else: - self._basis_surface = value - return property(**locals()) - - @apply - def distance(): - def fget( self ): - return self._distance - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument distance is mantatory and can not be set to None') - if not check_type(value,length_measure): - self._distance = length_measure(value) - else: - self._distance = value - return property(**locals()) - - @apply - def self_intersect(): - def fget( self ): - return self._self_intersect - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument self_intersect is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._self_intersect = LOGICAL(value) - else: - self._self_intersect = value - return property(**locals()) - -#################### - # ENTITY placement # -#################### -class placement(geometric_representation_item): - '''Entity placement definition. - - :param location - :type location:cartesian_point - ''' - def __init__( self , inherited0__name , location, ): - geometric_representation_item.__init__(self , inherited0__name , ) - self.location = location - - @apply - def location(): - def fget( self ): - return self._location - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument location is mantatory and can not be set to None') - if not check_type(value,cartesian_point): - self._location = cartesian_point(value) - else: - self._location = value - return property(**locals()) - -#################### - # ENTITY axis2_placement_2d # -#################### -class axis2_placement_2d(placement): - '''Entity axis2_placement_2d definition. - - :param ref_direction - :type ref_direction:direction - - :param p - :type p:LIST(2,2,'direction', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__location , ref_direction, ): - placement.__init__(self , inherited0__name , inherited1__location , ) - self.ref_direction = ref_direction - - @apply - def ref_direction(): - def fget( self ): - return self._ref_direction - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,direction): - self._ref_direction = direction(value) - else: - self._ref_direction = value - else: - self._ref_direction = value - return property(**locals()) - - @apply - def p(): - def fget( self ): - attribute_eval = build_2axes(self.ref_direction) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument p is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.self.geometric_representation_item.self.dim == 2) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY product_category # -#################### -class product_category(BaseEntityClass): - '''Entity product_category definition. - - :param name - :type name:label - - :param description - :type description:text - ''' - def __init__( self , name,description, ): - self.name = name - self.description = description - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY product_related_product_category # -#################### -class product_related_product_category(product_category): - '''Entity product_related_product_category definition. - - :param products - :type products:SET(1,None,'product', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__description , products, ): - product_category.__init__(self , inherited0__name , inherited1__description , ) - self.products = products - - @apply - def products(): - def fget( self ): - return self._products - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument products is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'product', scope = schema_scope)): - self._products = SET(value) - else: - self._products = value - return property(**locals()) - -#################### - # ENTITY curve # -#################### -class curve(geometric_representation_item): - '''Entity curve definition. - ''' - def __init__( self , inherited0__name , ): - geometric_representation_item.__init__(self , inherited0__name , ) - -#################### - # ENTITY conic # -#################### -class conic(curve): - '''Entity conic definition. - - :param position - :type position:axis2_placement - ''' - def __init__( self , inherited0__name , position, ): - curve.__init__(self , inherited0__name , ) - self.position = position - - @apply - def position(): - def fget( self ): - return self._position - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument position is mantatory and can not be set to None') - if not check_type(value,axis2_placement): - self._position = axis2_placement(value) - else: - self._position = value - return property(**locals()) - -#################### - # ENTITY hyperbola # -#################### -class hyperbola(conic): - '''Entity hyperbola definition. - - :param semi_axis - :type semi_axis:positive_length_measure - - :param semi_imag_axis - :type semi_imag_axis:positive_length_measure - ''' - def __init__( self , inherited0__name , inherited1__position , semi_axis,semi_imag_axis, ): - conic.__init__(self , inherited0__name , inherited1__position , ) - self.semi_axis = semi_axis - self.semi_imag_axis = semi_imag_axis - - @apply - def semi_axis(): - def fget( self ): - return self._semi_axis - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument semi_axis is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._semi_axis = positive_length_measure(value) - else: - self._semi_axis = value - return property(**locals()) - - @apply - def semi_imag_axis(): - def fget( self ): - return self._semi_imag_axis - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument semi_imag_axis is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._semi_imag_axis = positive_length_measure(value) - else: - self._semi_imag_axis = value - return property(**locals()) - -#################### - # ENTITY address # -#################### -class address(BaseEntityClass): - '''Entity address definition. - - :param internal_location - :type internal_location:label - - :param street_number - :type street_number:label - - :param street - :type street:label - - :param postal_box - :type postal_box:label - - :param town - :type town:label - - :param region - :type region:label - - :param postal_code - :type postal_code:label - - :param country - :type country:label - - :param facsimile_number - :type facsimile_number:label - - :param telephone_number - :type telephone_number:label - - :param electronic_mail_address - :type electronic_mail_address:label - - :param telex_number - :type telex_number:label - ''' - def __init__( self , internal_location,street_number,street,postal_box,town,region,postal_code,country,facsimile_number,telephone_number,electronic_mail_address,telex_number, ): - self.internal_location = internal_location - self.street_number = street_number - self.street = street - self.postal_box = postal_box - self.town = town - self.region = region - self.postal_code = postal_code - self.country = country - self.facsimile_number = facsimile_number - self.telephone_number = telephone_number - self.electronic_mail_address = electronic_mail_address - self.telex_number = telex_number - - @apply - def internal_location(): - def fget( self ): - return self._internal_location - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._internal_location = label(value) - else: - self._internal_location = value - else: - self._internal_location = value - return property(**locals()) - - @apply - def street_number(): - def fget( self ): - return self._street_number - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._street_number = label(value) - else: - self._street_number = value - else: - self._street_number = value - return property(**locals()) - - @apply - def street(): - def fget( self ): - return self._street - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._street = label(value) - else: - self._street = value - else: - self._street = value - return property(**locals()) - - @apply - def postal_box(): - def fget( self ): - return self._postal_box - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._postal_box = label(value) - else: - self._postal_box = value - else: - self._postal_box = value - return property(**locals()) - - @apply - def town(): - def fget( self ): - return self._town - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._town = label(value) - else: - self._town = value - else: - self._town = value - return property(**locals()) - - @apply - def region(): - def fget( self ): - return self._region - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._region = label(value) - else: - self._region = value - else: - self._region = value - return property(**locals()) - - @apply - def postal_code(): - def fget( self ): - return self._postal_code - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._postal_code = label(value) - else: - self._postal_code = value - else: - self._postal_code = value - return property(**locals()) - - @apply - def country(): - def fget( self ): - return self._country - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._country = label(value) - else: - self._country = value - else: - self._country = value - return property(**locals()) - - @apply - def facsimile_number(): - def fget( self ): - return self._facsimile_number - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._facsimile_number = label(value) - else: - self._facsimile_number = value - else: - self._facsimile_number = value - return property(**locals()) - - @apply - def telephone_number(): - def fget( self ): - return self._telephone_number - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._telephone_number = label(value) - else: - self._telephone_number = value - else: - self._telephone_number = value - return property(**locals()) - - @apply - def electronic_mail_address(): - def fget( self ): - return self._electronic_mail_address - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._electronic_mail_address = label(value) - else: - self._electronic_mail_address = value - else: - self._electronic_mail_address = value - return property(**locals()) - - @apply - def telex_number(): - def fget( self ): - return self._telex_number - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._telex_number = label(value) - else: - self._telex_number = value - else: - self._telex_number = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (((((((((((EXISTS(self.internal_location) or EXISTS(self.street_number)) or EXISTS(self.street)) or EXISTS(self.postal_box)) or EXISTS(self.town)) or EXISTS(self.region)) or EXISTS(self.postal_code)) or EXISTS(self.country)) or EXISTS(self.facsimile_number)) or EXISTS(self.telephone_number)) or EXISTS(self.electronic_mail_address)) or EXISTS(self.telex_number)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY organizational_address # -#################### -class organizational_address(address): - '''Entity organizational_address definition. - - :param organizations - :type organizations:SET(1,None,'organization', scope = schema_scope) - - :param description - :type description:text - ''' - def __init__( self , inherited0__internal_location , inherited1__street_number , inherited2__street , inherited3__postal_box , inherited4__town , inherited5__region , inherited6__postal_code , inherited7__country , inherited8__facsimile_number , inherited9__telephone_number , inherited10__electronic_mail_address , inherited11__telex_number , organizations,description, ): - address.__init__(self , inherited0__internal_location , inherited1__street_number , inherited2__street , inherited3__postal_box , inherited4__town , inherited5__region , inherited6__postal_code , inherited7__country , inherited8__facsimile_number , inherited9__telephone_number , inherited10__electronic_mail_address , inherited11__telex_number , ) - self.organizations = organizations - self.description = description - - @apply - def organizations(): - def fget( self ): - return self._organizations - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument organizations is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'organization', scope = schema_scope)): - self._organizations = SET(value) - else: - self._organizations = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY bounded_surface # -#################### -class bounded_surface(surface): - '''Entity bounded_surface definition. - ''' - def __init__( self , inherited0__name , ): - surface.__init__(self , inherited0__name , ) - -#################### - # ENTITY b_spline_surface # -#################### -class b_spline_surface(bounded_surface): - '''Entity b_spline_surface definition. - - :param u_degree - :type u_degree:INTEGER - - :param v_degree - :type v_degree:INTEGER - - :param control_points_list - :type control_points_list:LIST(2,None,LIST(2,None,'cartesian_point', scope = schema_scope)) - - :param surface_form - :type surface_form:b_spline_surface_form - - :param u_closed - :type u_closed:LOGICAL - - :param v_closed - :type v_closed:LOGICAL - - :param self_intersect - :type self_intersect:LOGICAL - - :param u_upper - :type u_upper:INTEGER - - :param v_upper - :type v_upper:INTEGER - - :param control_points - :type control_points:ARRAY(0,u_upper,ARRAY(0,v_upper,'cartesian_point', scope = schema_scope)) - ''' - def __init__( self , inherited0__name , u_degree,v_degree,control_points_list,surface_form,u_closed,v_closed,self_intersect, ): - bounded_surface.__init__(self , inherited0__name , ) - self.u_degree = u_degree - self.v_degree = v_degree - self.control_points_list = control_points_list - self.surface_form = surface_form - self.u_closed = u_closed - self.v_closed = v_closed - self.self_intersect = self_intersect - - @apply - def u_degree(): - def fget( self ): - return self._u_degree - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u_degree is mantatory and can not be set to None') - if not check_type(value,INTEGER): - self._u_degree = INTEGER(value) - else: - self._u_degree = value - return property(**locals()) - - @apply - def v_degree(): - def fget( self ): - return self._v_degree - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v_degree is mantatory and can not be set to None') - if not check_type(value,INTEGER): - self._v_degree = INTEGER(value) - else: - self._v_degree = value - return property(**locals()) - - @apply - def control_points_list(): - def fget( self ): - return self._control_points_list - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument control_points_list is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,LIST(2,None,'cartesian_point', scope = schema_scope))): - self._control_points_list = LIST(value) - else: - self._control_points_list = value - return property(**locals()) - - @apply - def surface_form(): - def fget( self ): - return self._surface_form - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument surface_form is mantatory and can not be set to None') - if not check_type(value,b_spline_surface_form): - self._surface_form = b_spline_surface_form(value) - else: - self._surface_form = value - return property(**locals()) - - @apply - def u_closed(): - def fget( self ): - return self._u_closed - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u_closed is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._u_closed = LOGICAL(value) - else: - self._u_closed = value - return property(**locals()) - - @apply - def v_closed(): - def fget( self ): - return self._v_closed - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v_closed is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._v_closed = LOGICAL(value) - else: - self._v_closed = value - return property(**locals()) - - @apply - def self_intersect(): - def fget( self ): - return self._self_intersect - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument self_intersect is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._self_intersect = LOGICAL(value) - else: - self._self_intersect = value - return property(**locals()) - - @apply - def u_upper(): - def fget( self ): - attribute_eval = (SIZEOF(self.control_points_list) - 1) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument u_upper is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - - @apply - def v_upper(): - def fget( self ): - attribute_eval = (SIZEOF(self.control_points_list[1]) - 1) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument v_upper is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - - @apply - def control_points(): - def fget( self ): - attribute_eval = make_array_of_array(self.control_points_list,0,self.u_upper,0,self.v_upper) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument control_points is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (((('CONFIG_CONTROL_DESIGN.UNIFORM_SURFACE' == TYPEOF(self)) or ('CONFIG_CONTROL_DESIGN.QUASI_UNIFORM_SURFACE' == TYPEOF(self))) or ('CONFIG_CONTROL_DESIGN.BEZIER_SURFACE' == TYPEOF(self))) or ('CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE_WITH_KNOTS' == TYPEOF(self))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY uniform_surface # -#################### -class uniform_surface(b_spline_surface): - '''Entity uniform_surface definition. - ''' - def __init__( self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ): - b_spline_surface.__init__(self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ) - -#################### - # ENTITY geometrically_bounded_surface_shape_representation # -#################### -class geometrically_bounded_surface_shape_representation(shape_representation): - '''Entity geometrically_bounded_surface_shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - shape_representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) > 0) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (SIZEOF(None) == 0) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - def wr7(self): - eval_wr7_wr = (SIZEOF(None) > 0) - if not eval_wr7_wr: - raise AssertionError('Rule wr7 violated') - else: - return eval_wr7_wr - - -#################### - # ENTITY axis1_placement # -#################### -class axis1_placement(placement): - '''Entity axis1_placement definition. - - :param axis - :type axis:direction - - :param z - :type z:direction - ''' - def __init__( self , inherited0__name , inherited1__location , axis, ): - placement.__init__(self , inherited0__name , inherited1__location , ) - self.axis = axis - - @apply - def axis(): - def fget( self ): - return self._axis - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,direction): - self._axis = direction(value) - else: - self._axis = value - else: - self._axis = value - return property(**locals()) - - @apply - def z(): - def fget( self ): - attribute_eval = NVL(normalise(self.axis),self.dummy_gri == direction([0,0,1])) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument z is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.self.geometric_representation_item.self.dim == 3) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY bounded_curve # -#################### -class bounded_curve(curve): - '''Entity bounded_curve definition. - ''' - def __init__( self , inherited0__name , ): - curve.__init__(self , inherited0__name , ) - -#################### - # ENTITY b_spline_curve # -#################### -class b_spline_curve(bounded_curve): - '''Entity b_spline_curve definition. - - :param degree - :type degree:INTEGER - - :param control_points_list - :type control_points_list:LIST(2,None,'cartesian_point', scope = schema_scope) - - :param curve_form - :type curve_form:b_spline_curve_form - - :param closed_curve - :type closed_curve:LOGICAL - - :param self_intersect - :type self_intersect:LOGICAL - - :param upper_index_on_control_points - :type upper_index_on_control_points:INTEGER - - :param control_points - :type control_points:ARRAY(0,upper_index_on_control_points,'cartesian_point', scope = schema_scope) - ''' - def __init__( self , inherited0__name , degree,control_points_list,curve_form,closed_curve,self_intersect, ): - bounded_curve.__init__(self , inherited0__name , ) - self.degree = degree - self.control_points_list = control_points_list - self.curve_form = curve_form - self.closed_curve = closed_curve - self.self_intersect = self_intersect - - @apply - def degree(): - def fget( self ): - return self._degree - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument degree is mantatory and can not be set to None') - if not check_type(value,INTEGER): - self._degree = INTEGER(value) - else: - self._degree = value - return property(**locals()) - - @apply - def control_points_list(): - def fget( self ): - return self._control_points_list - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument control_points_list is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'cartesian_point', scope = schema_scope)): - self._control_points_list = LIST(value) - else: - self._control_points_list = value - return property(**locals()) - - @apply - def curve_form(): - def fget( self ): - return self._curve_form - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument curve_form is mantatory and can not be set to None') - if not check_type(value,b_spline_curve_form): - self._curve_form = b_spline_curve_form(value) - else: - self._curve_form = value - return property(**locals()) - - @apply - def closed_curve(): - def fget( self ): - return self._closed_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument closed_curve is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._closed_curve = LOGICAL(value) - else: - self._closed_curve = value - return property(**locals()) - - @apply - def self_intersect(): - def fget( self ): - return self._self_intersect - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument self_intersect is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._self_intersect = LOGICAL(value) - else: - self._self_intersect = value - return property(**locals()) - - @apply - def upper_index_on_control_points(): - def fget( self ): - attribute_eval = (SIZEOF(self.control_points_list) - 1) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument upper_index_on_control_points is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - - @apply - def control_points(): - def fget( self ): - attribute_eval = list_to_array(self.control_points_list,0,self.upper_index_on_control_points) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument control_points is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (((('CONFIG_CONTROL_DESIGN.UNIFORM_CURVE' == TYPEOF(self)) or ('CONFIG_CONTROL_DESIGN.QUASI_UNIFORM_CURVE' == TYPEOF(self))) or ('CONFIG_CONTROL_DESIGN.BEZIER_CURVE' == TYPEOF(self))) or ('CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE_WITH_KNOTS' == TYPEOF(self))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY rational_b_spline_curve # -#################### -class rational_b_spline_curve(b_spline_curve): - '''Entity rational_b_spline_curve definition. - - :param weights_data - :type weights_data:LIST(2,None,'REAL', scope = schema_scope) - - :param weights - :type weights:ARRAY(0,upper_index_on_control_points,'REAL', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , weights_data, ): - b_spline_curve.__init__(self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ) - self.weights_data = weights_data - - @apply - def weights_data(): - def fget( self ): - return self._weights_data - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument weights_data is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'REAL', scope = schema_scope)): - self._weights_data = LIST(value) - else: - self._weights_data = value - return property(**locals()) - - @apply - def weights(): - def fget( self ): - attribute_eval = list_to_array(self.weights_data,0,self.upper_index_on_control_points) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument weights is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (SIZEOF(self.weights_data) == SIZEOF(self.self.b_spline_curve.self.control_points_list)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = curve_weights_positive(self) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY action_request_assignment # -#################### -class action_request_assignment(BaseEntityClass): - '''Entity action_request_assignment definition. - - :param assigned_action_request - :type assigned_action_request:versioned_action_request - ''' - def __init__( self , assigned_action_request, ): - self.assigned_action_request = assigned_action_request - - @apply - def assigned_action_request(): - def fget( self ): - return self._assigned_action_request - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_action_request is mantatory and can not be set to None') - if not check_type(value,versioned_action_request): - self._assigned_action_request = versioned_action_request(value) - else: - self._assigned_action_request = value - return property(**locals()) - -#################### - # ENTITY topological_representation_item # -#################### -class topological_representation_item(representation_item): - '''Entity topological_representation_item definition. - ''' - def __init__( self , inherited0__name , ): - representation_item.__init__(self , inherited0__name , ) - -#################### - # ENTITY face_bound # -#################### -class face_bound(topological_representation_item): - '''Entity face_bound definition. - - :param bound - :type bound:loop - - :param orientation - :type orientation:BOOLEAN - ''' - def __init__( self , inherited0__name , bound,orientation, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.bound = bound - self.orientation = orientation - - @apply - def bound(): - def fget( self ): - return self._bound - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument bound is mantatory and can not be set to None') - if not check_type(value,loop): - self._bound = loop(value) - else: - self._bound = value - return property(**locals()) - - @apply - def orientation(): - def fget( self ): - return self._orientation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument orientation is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._orientation = BOOLEAN(value) - else: - self._orientation = value - return property(**locals()) - -#################### - # ENTITY length_measure_with_unit # -#################### -class length_measure_with_unit(measure_with_unit): - '''Entity length_measure_with_unit definition. - ''' - def __init__( self , inherited0__value_component , inherited1__unit_component , ): - measure_with_unit.__init__(self , inherited0__value_component , inherited1__unit_component , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.LENGTH_UNIT' == TYPEOF(self.self.measure_with_unit.self.unit_component)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY dated_effectivity # -#################### -class dated_effectivity(effectivity): - '''Entity dated_effectivity definition. - - :param effectivity_start_date - :type effectivity_start_date:date_and_time - - :param effectivity_end_date - :type effectivity_end_date:date_and_time - ''' - def __init__( self , inherited0__id , effectivity_start_date,effectivity_end_date, ): - effectivity.__init__(self , inherited0__id , ) - self.effectivity_start_date = effectivity_start_date - self.effectivity_end_date = effectivity_end_date - - @apply - def effectivity_start_date(): - def fget( self ): - return self._effectivity_start_date - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument effectivity_start_date is mantatory and can not be set to None') - if not check_type(value,date_and_time): - self._effectivity_start_date = date_and_time(value) - else: - self._effectivity_start_date = value - return property(**locals()) - - @apply - def effectivity_end_date(): - def fget( self ): - return self._effectivity_end_date - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,date_and_time): - self._effectivity_end_date = date_and_time(value) - else: - self._effectivity_end_date = value - else: - self._effectivity_end_date = value - return property(**locals()) - -#################### - # ENTITY direction # -#################### -class direction(geometric_representation_item): - '''Entity direction definition. - - :param direction_ratios - :type direction_ratios:LIST(2,3,'REAL', scope = schema_scope) - ''' - def __init__( self , inherited0__name , direction_ratios, ): - geometric_representation_item.__init__(self , inherited0__name , ) - self.direction_ratios = direction_ratios - - @apply - def direction_ratios(): - def fget( self ): - return self._direction_ratios - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument direction_ratios is mantatory and can not be set to None') - if not check_type(value,LIST(2,3,'REAL', scope = schema_scope)): - self._direction_ratios = LIST(value) - else: - self._direction_ratios = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY next_assembly_usage_occurrence # -#################### -class next_assembly_usage_occurrence(assembly_component_usage): - '''Entity next_assembly_usage_occurrence definition. - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , ): - assembly_component_usage.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , ) - -#################### - # ENTITY edge # -#################### -class edge(topological_representation_item): - '''Entity edge definition. - - :param edge_start - :type edge_start:vertex - - :param edge_end - :type edge_end:vertex - ''' - def __init__( self , inherited0__name , edge_start,edge_end, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.edge_start = edge_start - self.edge_end = edge_end - - @apply - def edge_start(): - def fget( self ): - return self._edge_start - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument edge_start is mantatory and can not be set to None') - if not check_type(value,vertex): - self._edge_start = vertex(value) - else: - self._edge_start = value - return property(**locals()) - - @apply - def edge_end(): - def fget( self ): - return self._edge_end - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument edge_end is mantatory and can not be set to None') - if not check_type(value,vertex): - self._edge_end = vertex(value) - else: - self._edge_end = value - return property(**locals()) - -#################### - # ENTITY oriented_edge # -#################### -class oriented_edge(edge): - '''Entity oriented_edge definition. - - :param edge_element - :type edge_element:edge - - :param orientation - :type orientation:BOOLEAN - - :param edge_edge_start - :type edge_edge_start:vertex - - :param edge_edge_end - :type edge_edge_end:vertex - ''' - def __init__( self , inherited0__name , inherited1__edge_start , inherited2__edge_end , edge_element,orientation, ): - edge.__init__(self , inherited0__name , inherited1__edge_start , inherited2__edge_end , ) - self.edge_element = edge_element - self.orientation = orientation - - @apply - def edge_element(): - def fget( self ): - return self._edge_element - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument edge_element is mantatory and can not be set to None') - if not check_type(value,edge): - self._edge_element = edge(value) - else: - self._edge_element = value - return property(**locals()) - - @apply - def orientation(): - def fget( self ): - return self._orientation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument orientation is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._orientation = BOOLEAN(value) - else: - self._orientation = value - return property(**locals()) - - @apply - def edge_edge_start(): - def fget( self ): - attribute_eval = boolean_choose(self.self.orientation,self.self.edge_element.self.edge_start,self.self.edge_element.self.edge_end) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument edge_edge_start is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - - @apply - def edge_edge_end(): - def fget( self ): - attribute_eval = boolean_choose(self.self.orientation,self.self.edge_element.self.edge_end,self.self.edge_element.self.edge_start) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument edge_edge_end is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not ('CONFIG_CONTROL_DESIGN.ORIENTED_EDGE' == TYPEOF(self.self.edge_element))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY person # -#################### -class person(BaseEntityClass): - '''Entity person definition. - - :param id - :type id:identifier - - :param last_name - :type last_name:label - - :param first_name - :type first_name:label - - :param middle_names - :type middle_names:LIST(1,None,'STRING', scope = schema_scope) - - :param prefix_titles - :type prefix_titles:LIST(1,None,'STRING', scope = schema_scope) - - :param suffix_titles - :type suffix_titles:LIST(1,None,'STRING', scope = schema_scope) - ''' - def __init__( self , id,last_name,first_name,middle_names,prefix_titles,suffix_titles, ): - self.id = id - self.last_name = last_name - self.first_name = first_name - self.middle_names = middle_names - self.prefix_titles = prefix_titles - self.suffix_titles = suffix_titles - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def last_name(): - def fget( self ): - return self._last_name - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._last_name = label(value) - else: - self._last_name = value - else: - self._last_name = value - return property(**locals()) - - @apply - def first_name(): - def fget( self ): - return self._first_name - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._first_name = label(value) - else: - self._first_name = value - else: - self._first_name = value - return property(**locals()) - - @apply - def middle_names(): - def fget( self ): - return self._middle_names - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,LIST(1,None,'STRING', scope = schema_scope)): - self._middle_names = LIST(value) - else: - self._middle_names = value - else: - self._middle_names = value - return property(**locals()) - - @apply - def prefix_titles(): - def fget( self ): - return self._prefix_titles - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,LIST(1,None,'STRING', scope = schema_scope)): - self._prefix_titles = LIST(value) - else: - self._prefix_titles = value - else: - self._prefix_titles = value - return property(**locals()) - - @apply - def suffix_titles(): - def fget( self ): - return self._suffix_titles - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,LIST(1,None,'STRING', scope = schema_scope)): - self._suffix_titles = LIST(value) - else: - self._suffix_titles = value - else: - self._suffix_titles = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (EXISTS(self.last_name) or EXISTS(self.first_name)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY document # -#################### -class document(BaseEntityClass): - '''Entity document definition. - - :param id - :type id:identifier - - :param name - :type name:label - - :param description - :type description:text - - :param kind - :type kind:document_type - ''' - def __init__( self , id,name,description,kind, ): - self.id = id - self.name = name - self.description = description - self.kind = kind - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def kind(): - def fget( self ): - return self._kind - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument kind is mantatory and can not be set to None') - if not check_type(value,document_type): - self._kind = document_type(value) - else: - self._kind = value - return property(**locals()) - -#################### - # ENTITY document_with_class # -#################### -class document_with_class(document): - '''Entity document_with_class definition. - - :param class_ - :type class_:identifier - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__kind , class_, ): - document.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__kind , ) - self.class_ = class_ - - @apply - def class_(): - def fget( self ): - return self._class_ - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument class_ is mantatory and can not be set to None') - if not check_type(value,identifier): - self._class_ = identifier(value) - else: - self._class_ = value - return property(**locals()) - -#################### - # ENTITY conversion_based_unit # -#################### -class conversion_based_unit(named_unit): - '''Entity conversion_based_unit definition. - - :param name - :type name:label - - :param conversion_factor - :type conversion_factor:measure_with_unit - ''' - def __init__( self , inherited0__dimensions , name,conversion_factor, ): - named_unit.__init__(self , inherited0__dimensions , ) - self.name = name - self.conversion_factor = conversion_factor - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def conversion_factor(): - def fget( self ): - return self._conversion_factor - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument conversion_factor is mantatory and can not be set to None') - if not check_type(value,measure_with_unit): - self._conversion_factor = measure_with_unit(value) - else: - self._conversion_factor = value - return property(**locals()) - -#################### - # ENTITY point # -#################### -class point(geometric_representation_item): - '''Entity point definition. - ''' - def __init__( self , inherited0__name , ): - geometric_representation_item.__init__(self , inherited0__name , ) - -#################### - # ENTITY point_on_surface # -#################### -class point_on_surface(point): - '''Entity point_on_surface definition. - - :param basis_surface - :type basis_surface:surface - - :param point_parameter_u - :type point_parameter_u:parameter_value - - :param point_parameter_v - :type point_parameter_v:parameter_value - ''' - def __init__( self , inherited0__name , basis_surface,point_parameter_u,point_parameter_v, ): - point.__init__(self , inherited0__name , ) - self.basis_surface = basis_surface - self.point_parameter_u = point_parameter_u - self.point_parameter_v = point_parameter_v - - @apply - def basis_surface(): - def fget( self ): - return self._basis_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_surface is mantatory and can not be set to None') - if not check_type(value,surface): - self._basis_surface = surface(value) - else: - self._basis_surface = value - return property(**locals()) - - @apply - def point_parameter_u(): - def fget( self ): - return self._point_parameter_u - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument point_parameter_u is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._point_parameter_u = parameter_value(value) - else: - self._point_parameter_u = value - return property(**locals()) - - @apply - def point_parameter_v(): - def fget( self ): - return self._point_parameter_v - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument point_parameter_v is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._point_parameter_v = parameter_value(value) - else: - self._point_parameter_v = value - return property(**locals()) - -#################### - # ENTITY product_definition_formation # -#################### -class product_definition_formation(BaseEntityClass): - '''Entity product_definition_formation definition. - - :param id - :type id:identifier - - :param description - :type description:text - - :param of_product - :type of_product:product - ''' - def __init__( self , id,description,of_product, ): - self.id = id - self.description = description - self.of_product = of_product - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def of_product(): - def fget( self ): - return self._of_product - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument of_product is mantatory and can not be set to None') - if not check_type(value,product): - self._of_product = product(value) - else: - self._of_product = value - return property(**locals()) - -#################### - # ENTITY person_and_organization_assignment # -#################### -class person_and_organization_assignment(BaseEntityClass): - '''Entity person_and_organization_assignment definition. - - :param assigned_person_and_organization - :type assigned_person_and_organization:person_and_organization - - :param role - :type role:person_and_organization_role - ''' - def __init__( self , assigned_person_and_organization,role, ): - self.assigned_person_and_organization = assigned_person_and_organization - self.role = role - - @apply - def assigned_person_and_organization(): - def fget( self ): - return self._assigned_person_and_organization - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_person_and_organization is mantatory and can not be set to None') - if not check_type(value,person_and_organization): - self._assigned_person_and_organization = person_and_organization(value) - else: - self._assigned_person_and_organization = value - return property(**locals()) - - @apply - def role(): - def fget( self ): - return self._role - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument role is mantatory and can not be set to None') - if not check_type(value,person_and_organization_role): - self._role = person_and_organization_role(value) - else: - self._role = value - return property(**locals()) - -#################### - # ENTITY cc_design_person_and_organization_assignment # -#################### -class cc_design_person_and_organization_assignment(person_and_organization_assignment): - '''Entity cc_design_person_and_organization_assignment definition. - - :param items - :type items:SET(1,None,'person_organization_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_person_and_organization , inherited1__role , items, ): - person_and_organization_assignment.__init__(self , inherited0__assigned_person_and_organization , inherited1__role , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'person_organization_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = cc_design_person_and_organization_correlation(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY offset_curve_3d # -#################### -class offset_curve_3d(curve): - '''Entity offset_curve_3d definition. - - :param basis_curve - :type basis_curve:curve - - :param distance - :type distance:length_measure - - :param self_intersect - :type self_intersect:LOGICAL - - :param ref_direction - :type ref_direction:direction - ''' - def __init__( self , inherited0__name , basis_curve,distance,self_intersect,ref_direction, ): - curve.__init__(self , inherited0__name , ) - self.basis_curve = basis_curve - self.distance = distance - self.self_intersect = self_intersect - self.ref_direction = ref_direction - - @apply - def basis_curve(): - def fget( self ): - return self._basis_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_curve is mantatory and can not be set to None') - if not check_type(value,curve): - self._basis_curve = curve(value) - else: - self._basis_curve = value - return property(**locals()) - - @apply - def distance(): - def fget( self ): - return self._distance - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument distance is mantatory and can not be set to None') - if not check_type(value,length_measure): - self._distance = length_measure(value) - else: - self._distance = value - return property(**locals()) - - @apply - def self_intersect(): - def fget( self ): - return self._self_intersect - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument self_intersect is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._self_intersect = LOGICAL(value) - else: - self._self_intersect = value - return property(**locals()) - - @apply - def ref_direction(): - def fget( self ): - return self._ref_direction - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument ref_direction is mantatory and can not be set to None') - if not check_type(value,direction): - self._ref_direction = direction(value) - else: - self._ref_direction = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = ((self.basis_curve.self.dim == 3) and (self.ref_direction.self.dim == 3)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY approval # -#################### -class approval(BaseEntityClass): - '''Entity approval definition. - - :param status - :type status:approval_status - - :param level - :type level:label - ''' - def __init__( self , status,level, ): - self.status = status - self.level = level - - @apply - def status(): - def fget( self ): - return self._status - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument status is mantatory and can not be set to None') - if not check_type(value,approval_status): - self._status = approval_status(value) - else: - self._status = value - return property(**locals()) - - @apply - def level(): - def fget( self ): - return self._level - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument level is mantatory and can not be set to None') - if not check_type(value,label): - self._level = label(value) - else: - self._level = value - return property(**locals()) - -#################### - # ENTITY composite_curve # -#################### -class composite_curve(bounded_curve): - '''Entity composite_curve definition. - - :param segments - :type segments:LIST(1,None,'composite_curve_segment', scope = schema_scope) - - :param self_intersect - :type self_intersect:LOGICAL - - :param n_segments - :type n_segments:INTEGER - - :param closed_curve - :type closed_curve:LOGICAL - ''' - def __init__( self , inherited0__name , segments,self_intersect, ): - bounded_curve.__init__(self , inherited0__name , ) - self.segments = segments - self.self_intersect = self_intersect - - @apply - def segments(): - def fget( self ): - return self._segments - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument segments is mantatory and can not be set to None') - if not check_type(value,LIST(1,None,'composite_curve_segment', scope = schema_scope)): - self._segments = LIST(value) - else: - self._segments = value - return property(**locals()) - - @apply - def self_intersect(): - def fget( self ): - return self._self_intersect - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument self_intersect is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._self_intersect = LOGICAL(value) - else: - self._self_intersect = value - return property(**locals()) - - @apply - def n_segments(): - def fget( self ): - attribute_eval = SIZEOF(self.segments) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument n_segments is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - - @apply - def closed_curve(): - def fget( self ): - attribute_eval = (self.segments[self.n_segments].self.transition != discontinuous) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument closed_curve is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ((( not self.closed_curve) and (SIZEOF(None) == 1)) or (self.closed_curve and (SIZEOF(None) == 0))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY composite_curve_on_surface # -#################### -class composite_curve_on_surface(composite_curve): - '''Entity composite_curve_on_surface definition. - - :param basis_surface - :type basis_surface:SET(0,2,'surface', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__segments , inherited2__self_intersect , ): - composite_curve.__init__(self , inherited0__name , inherited1__segments , inherited2__self_intersect , ) - - @apply - def basis_surface(): - def fget( self ): - attribute_eval = get_basis_surface(self) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument basis_surface is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (SIZEOF(self.basis_surface) > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = constraints_composite_curve_on_surface(self) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY boundary_curve # -#################### -class boundary_curve(composite_curve_on_surface): - '''Entity boundary_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__segments , inherited2__self_intersect , ): - composite_curve_on_surface.__init__(self , inherited0__name , inherited1__segments , inherited2__self_intersect , ) - def wr1(self): - eval_wr1_wr = self.self.composite_curve.self.closed_curve - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY representation_context # -#################### -class representation_context(BaseEntityClass): - '''Entity representation_context definition. - - :param context_identifier - :type context_identifier:identifier - - :param context_type - :type context_type:text - - :param representations_in_context - :type representations_in_context:SET(1,None,'representation', scope = schema_scope) - ''' - def __init__( self , context_identifier,context_type, ): - self.context_identifier = context_identifier - self.context_type = context_type - - @apply - def context_identifier(): - def fget( self ): - return self._context_identifier - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument context_identifier is mantatory and can not be set to None') - if not check_type(value,identifier): - self._context_identifier = identifier(value) - else: - self._context_identifier = value - return property(**locals()) - - @apply - def context_type(): - def fget( self ): - return self._context_type - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument context_type is mantatory and can not be set to None') - if not check_type(value,text): - self._context_type = text(value) - else: - self._context_type = value - return property(**locals()) - - @apply - def representations_in_context(): - def fget( self ): - return self._representations_in_context - def fset( self, value ): - # INVERSE argument - raise AssertionError('Argument representations_in_context is INVERSE. It is computed and can not be set to any value') - return property(**locals()) - -#################### - # ENTITY geometric_representation_context # -#################### -class geometric_representation_context(representation_context): - '''Entity geometric_representation_context definition. - - :param coordinate_space_dimension - :type coordinate_space_dimension:dimension_count - ''' - def __init__( self , inherited0__context_identifier , inherited1__context_type , coordinate_space_dimension, ): - representation_context.__init__(self , inherited0__context_identifier , inherited1__context_type , ) - self.coordinate_space_dimension = coordinate_space_dimension - - @apply - def coordinate_space_dimension(): - def fget( self ): - return self._coordinate_space_dimension - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument coordinate_space_dimension is mantatory and can not be set to None') - if not check_type(value,dimension_count): - self._coordinate_space_dimension = dimension_count(value) - else: - self._coordinate_space_dimension = value - return property(**locals()) - -#################### - # ENTITY action_status # -#################### -class action_status(BaseEntityClass): - '''Entity action_status definition. - - :param status - :type status:label - - :param assigned_action - :type assigned_action:executed_action - ''' - def __init__( self , status,assigned_action, ): - self.status = status - self.assigned_action = assigned_action - - @apply - def status(): - def fget( self ): - return self._status - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument status is mantatory and can not be set to None') - if not check_type(value,label): - self._status = label(value) - else: - self._status = value - return property(**locals()) - - @apply - def assigned_action(): - def fget( self ): - return self._assigned_action - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_action is mantatory and can not be set to None') - if not check_type(value,executed_action): - self._assigned_action = executed_action(value) - else: - self._assigned_action = value - return property(**locals()) - -#################### - # ENTITY application_context # -#################### -class application_context(BaseEntityClass): - '''Entity application_context definition. - - :param application - :type application:text - - :param context_elements - :type context_elements:SET(1,None,'application_context_element', scope = schema_scope) - ''' - def __init__( self , application, ): - self.application = application - - @apply - def application(): - def fget( self ): - return self._application - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument application is mantatory and can not be set to None') - if not check_type(value,text): - self._application = text(value) - else: - self._application = value - return property(**locals()) - - @apply - def context_elements(): - def fget( self ): - return self._context_elements - def fset( self, value ): - # INVERSE argument - raise AssertionError('Argument context_elements is INVERSE. It is computed and can not be set to any value') - return property(**locals()) - -#################### - # ENTITY change_request # -#################### -class change_request(action_request_assignment): - '''Entity change_request definition. - - :param items - :type items:SET(1,None,'change_request_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_action_request , items, ): - action_request_assignment.__init__(self , inherited0__assigned_action_request , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'change_request_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY date_and_time # -#################### -class date_and_time(BaseEntityClass): - '''Entity date_and_time definition. - - :param date_component - :type date_component:date - - :param time_component - :type time_component:local_time - ''' - def __init__( self , date_component,time_component, ): - self.date_component = date_component - self.time_component = time_component - - @apply - def date_component(): - def fget( self ): - return self._date_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument date_component is mantatory and can not be set to None') - if not check_type(value,date): - self._date_component = date(value) - else: - self._date_component = value - return property(**locals()) - - @apply - def time_component(): - def fget( self ): - return self._time_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument time_component is mantatory and can not be set to None') - if not check_type(value,local_time): - self._time_component = local_time(value) - else: - self._time_component = value - return property(**locals()) - -#################### - # ENTITY approval_date_time # -#################### -class approval_date_time(BaseEntityClass): - '''Entity approval_date_time definition. - - :param date_time - :type date_time:date_time_select - - :param dated_approval - :type dated_approval:approval - ''' - def __init__( self , date_time,dated_approval, ): - self.date_time = date_time - self.dated_approval = dated_approval - - @apply - def date_time(): - def fget( self ): - return self._date_time - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument date_time is mantatory and can not be set to None') - if not check_type(value,date_time_select): - self._date_time = date_time_select(value) - else: - self._date_time = value - return property(**locals()) - - @apply - def dated_approval(): - def fget( self ): - return self._dated_approval - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument dated_approval is mantatory and can not be set to None') - if not check_type(value,approval): - self._dated_approval = approval(value) - else: - self._dated_approval = value - return property(**locals()) - -#################### - # ENTITY approval_role # -#################### -class approval_role(BaseEntityClass): - '''Entity approval_role definition. - - :param role - :type role:label - ''' - def __init__( self , role, ): - self.role = role - - @apply - def role(): - def fget( self ): - return self._role - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument role is mantatory and can not be set to None') - if not check_type(value,label): - self._role = label(value) - else: - self._role = value - return property(**locals()) - -#################### - # ENTITY application_context_element # -#################### -class application_context_element(BaseEntityClass): - '''Entity application_context_element definition. - - :param name - :type name:label - - :param frame_of_reference - :type frame_of_reference:application_context - ''' - def __init__( self , name,frame_of_reference, ): - self.name = name - self.frame_of_reference = frame_of_reference - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def frame_of_reference(): - def fget( self ): - return self._frame_of_reference - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument frame_of_reference is mantatory and can not be set to None') - if not check_type(value,application_context): - self._frame_of_reference = application_context(value) - else: - self._frame_of_reference = value - return property(**locals()) - -#################### - # ENTITY product_context # -#################### -class product_context(application_context_element): - '''Entity product_context definition. - - :param discipline_type - :type discipline_type:label - ''' - def __init__( self , inherited0__name , inherited1__frame_of_reference , discipline_type, ): - application_context_element.__init__(self , inherited0__name , inherited1__frame_of_reference , ) - self.discipline_type = discipline_type - - @apply - def discipline_type(): - def fget( self ): - return self._discipline_type - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument discipline_type is mantatory and can not be set to None') - if not check_type(value,label): - self._discipline_type = label(value) - else: - self._discipline_type = value - return property(**locals()) - -#################### - # ENTITY elementary_surface # -#################### -class elementary_surface(surface): - '''Entity elementary_surface definition. - - :param position - :type position:axis2_placement_3d - ''' - def __init__( self , inherited0__name , position, ): - surface.__init__(self , inherited0__name , ) - self.position = position - - @apply - def position(): - def fget( self ): - return self._position - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument position is mantatory and can not be set to None') - if not check_type(value,axis2_placement_3d): - self._position = axis2_placement_3d(value) - else: - self._position = value - return property(**locals()) - -#################### - # ENTITY spherical_surface # -#################### -class spherical_surface(elementary_surface): - '''Entity spherical_surface definition. - - :param radius - :type radius:positive_length_measure - ''' - def __init__( self , inherited0__name , inherited1__position , radius, ): - elementary_surface.__init__(self , inherited0__name , inherited1__position , ) - self.radius = radius - - @apply - def radius(): - def fget( self ): - return self._radius - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument radius is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._radius = positive_length_measure(value) - else: - self._radius = value - return property(**locals()) - -#################### - # ENTITY application_protocol_definition # -#################### -class application_protocol_definition(BaseEntityClass): - '''Entity application_protocol_definition definition. - - :param status - :type status:label - - :param application_interpreted_model_schema_name - :type application_interpreted_model_schema_name:label - - :param application_protocol_year - :type application_protocol_year:year_number - - :param application - :type application:application_context - ''' - def __init__( self , status,application_interpreted_model_schema_name,application_protocol_year,application, ): - self.status = status - self.application_interpreted_model_schema_name = application_interpreted_model_schema_name - self.application_protocol_year = application_protocol_year - self.application = application - - @apply - def status(): - def fget( self ): - return self._status - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument status is mantatory and can not be set to None') - if not check_type(value,label): - self._status = label(value) - else: - self._status = value - return property(**locals()) - - @apply - def application_interpreted_model_schema_name(): - def fget( self ): - return self._application_interpreted_model_schema_name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument application_interpreted_model_schema_name is mantatory and can not be set to None') - if not check_type(value,label): - self._application_interpreted_model_schema_name = label(value) - else: - self._application_interpreted_model_schema_name = value - return property(**locals()) - - @apply - def application_protocol_year(): - def fget( self ): - return self._application_protocol_year - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument application_protocol_year is mantatory and can not be set to None') - if not check_type(value,year_number): - self._application_protocol_year = year_number(value) - else: - self._application_protocol_year = value - return property(**locals()) - - @apply - def application(): - def fget( self ): - return self._application - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument application is mantatory and can not be set to None') - if not check_type(value,application_context): - self._application = application_context(value) - else: - self._application = value - return property(**locals()) - -#################### - # ENTITY specified_higher_usage_occurrence # -#################### -class specified_higher_usage_occurrence(assembly_component_usage): - '''Entity specified_higher_usage_occurrence definition. - - :param upper_usage - :type upper_usage:assembly_component_usage - - :param next_usage - :type next_usage:next_assembly_usage_occurrence - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , upper_usage,next_usage, ): - assembly_component_usage.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , ) - self.upper_usage = upper_usage - self.next_usage = next_usage - - @apply - def upper_usage(): - def fget( self ): - return self._upper_usage - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument upper_usage is mantatory and can not be set to None') - if not check_type(value,assembly_component_usage): - self._upper_usage = assembly_component_usage(value) - else: - self._upper_usage = value - return property(**locals()) - - @apply - def next_usage(): - def fget( self ): - return self._next_usage - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument next_usage is mantatory and can not be set to None') - if not check_type(value,next_assembly_usage_occurrence): - self._next_usage = next_assembly_usage_occurrence(value) - else: - self._next_usage = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self != self.upper_usage) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (self.self.product_definition_relationship.self.relating_product_definition == self.upper_usage.self.relating_product_definition) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (self.self.product_definition_relationship.self.related_product_definition == self.next_usage.self.related_product_definition) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (self.upper_usage.self.related_product_definition == self.next_usage.self.relating_product_definition) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = ( not ('CONFIG_CONTROL_DESIGN.PROMISSORY_USAGE_OCCURRENCE' == TYPEOF(self.upper_usage))) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - -#################### - # ENTITY product_definition_formation_with_specified_source # -#################### -class product_definition_formation_with_specified_source(product_definition_formation): - '''Entity product_definition_formation_with_specified_source definition. - - :param make_or_buy - :type make_or_buy:source - ''' - def __init__( self , inherited0__id , inherited1__description , inherited2__of_product , make_or_buy, ): - product_definition_formation.__init__(self , inherited0__id , inherited1__description , inherited2__of_product , ) - self.make_or_buy = make_or_buy - - @apply - def make_or_buy(): - def fget( self ): - return self._make_or_buy - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument make_or_buy is mantatory and can not be set to None') - if not check_type(value,source): - self._make_or_buy = source(value) - else: - self._make_or_buy = value - return property(**locals()) - -#################### - # ENTITY action_request_solution # -#################### -class action_request_solution(BaseEntityClass): - '''Entity action_request_solution definition. - - :param method - :type method:action_method - - :param request - :type request:versioned_action_request - ''' - def __init__( self , method,request, ): - self.method = method - self.request = request - - @apply - def method(): - def fget( self ): - return self._method - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument method is mantatory and can not be set to None') - if not check_type(value,action_method): - self._method = action_method(value) - else: - self._method = value - return property(**locals()) - - @apply - def request(): - def fget( self ): - return self._request - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument request is mantatory and can not be set to None') - if not check_type(value,versioned_action_request): - self._request = versioned_action_request(value) - else: - self._request = value - return property(**locals()) - -#################### - # ENTITY uncertainty_measure_with_unit # -#################### -class uncertainty_measure_with_unit(measure_with_unit): - '''Entity uncertainty_measure_with_unit definition. - - :param name - :type name:label - - :param description - :type description:text - ''' - def __init__( self , inherited0__value_component , inherited1__unit_component , name,description, ): - measure_with_unit.__init__(self , inherited0__value_component , inherited1__unit_component , ) - self.name = name - self.description = description - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = valid_measure_value(self.self.measure_with_unit.self.value_component) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY edge_based_wireframe_model # -#################### -class edge_based_wireframe_model(geometric_representation_item): - '''Entity edge_based_wireframe_model definition. - - :param ebwm_boundary - :type ebwm_boundary:SET(1,None,'connected_edge_set', scope = schema_scope) - ''' - def __init__( self , inherited0__name , ebwm_boundary, ): - geometric_representation_item.__init__(self , inherited0__name , ) - self.ebwm_boundary = ebwm_boundary - - @apply - def ebwm_boundary(): - def fget( self ): - return self._ebwm_boundary - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument ebwm_boundary is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'connected_edge_set', scope = schema_scope)): - self._ebwm_boundary = SET(value) - else: - self._ebwm_boundary = value - return property(**locals()) - -#################### - # ENTITY path # -#################### -class path(topological_representation_item): - '''Entity path definition. - - :param edge_list - :type edge_list:LIST(1,None,'oriented_edge', scope = schema_scope) - ''' - def __init__( self , inherited0__name , edge_list, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.edge_list = edge_list - - @apply - def edge_list(): - def fget( self ): - return self._edge_list - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument edge_list is mantatory and can not be set to None') - if not check_type(value,LIST(1,None,'oriented_edge', scope = schema_scope)): - self._edge_list = LIST(value) - else: - self._edge_list = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = path_head_to_tail(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY connected_face_set # -#################### -class connected_face_set(topological_representation_item): - '''Entity connected_face_set definition. - - :param cfs_faces - :type cfs_faces:SET(1,None,'face', scope = schema_scope) - ''' - def __init__( self , inherited0__name , cfs_faces, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.cfs_faces = cfs_faces - - @apply - def cfs_faces(): - def fget( self ): - return self._cfs_faces - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument cfs_faces is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'face', scope = schema_scope)): - self._cfs_faces = SET(value) - else: - self._cfs_faces = value - return property(**locals()) - -#################### - # ENTITY open_shell # -#################### -class open_shell(connected_face_set): - '''Entity open_shell definition. - ''' - def __init__( self , inherited0__name , inherited1__cfs_faces , ): - connected_face_set.__init__(self , inherited0__name , inherited1__cfs_faces , ) - -#################### - # ENTITY oriented_open_shell # -#################### -class oriented_open_shell(open_shell): - '''Entity oriented_open_shell definition. - - :param open_shell_element - :type open_shell_element:open_shell - - :param orientation - :type orientation:BOOLEAN - - :param connected_face_set_cfs_faces - :type connected_face_set_cfs_faces:SET(1,None,'face', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__cfs_faces , open_shell_element,orientation, ): - open_shell.__init__(self , inherited0__name , inherited1__cfs_faces , ) - self.open_shell_element = open_shell_element - self.orientation = orientation - - @apply - def open_shell_element(): - def fget( self ): - return self._open_shell_element - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument open_shell_element is mantatory and can not be set to None') - if not check_type(value,open_shell): - self._open_shell_element = open_shell(value) - else: - self._open_shell_element = value - return property(**locals()) - - @apply - def orientation(): - def fget( self ): - return self._orientation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument orientation is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._orientation = BOOLEAN(value) - else: - self._orientation = value - return property(**locals()) - - @apply - def connected_face_set_cfs_faces(): - def fget( self ): - attribute_eval = conditional_reverse(self.self.orientation,self.self.open_shell_element.self.cfs_faces) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument connected_face_set_cfs_faces is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not ('CONFIG_CONTROL_DESIGN.ORIENTED_OPEN_SHELL' == TYPEOF(self.self.open_shell_element))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY solid_angle_unit # -#################### -class solid_angle_unit(named_unit): - '''Entity solid_angle_unit definition. - ''' - def __init__( self , inherited0__dimensions , ): - named_unit.__init__(self , inherited0__dimensions , ) - def wr1(self): - eval_wr1_wr = (((((((self.self.named_unit.self.dimensions.self.length_exponent == 0) and (self.self.named_unit.self.dimensions.self.mass_exponent == 0)) and (self.self.named_unit.self.dimensions.self.time_exponent == 0)) and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0)) and (self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent == 0)) and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0)) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY coordinated_universal_time_offset # -#################### -class coordinated_universal_time_offset(BaseEntityClass): - '''Entity coordinated_universal_time_offset definition. - - :param hour_offset - :type hour_offset:hour_in_day - - :param minute_offset - :type minute_offset:minute_in_hour - - :param sense - :type sense:ahead_or_behind - ''' - def __init__( self , hour_offset,minute_offset,sense, ): - self.hour_offset = hour_offset - self.minute_offset = minute_offset - self.sense = sense - - @apply - def hour_offset(): - def fget( self ): - return self._hour_offset - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument hour_offset is mantatory and can not be set to None') - if not check_type(value,hour_in_day): - self._hour_offset = hour_in_day(value) - else: - self._hour_offset = value - return property(**locals()) - - @apply - def minute_offset(): - def fget( self ): - return self._minute_offset - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,minute_in_hour): - self._minute_offset = minute_in_hour(value) - else: - self._minute_offset = value - else: - self._minute_offset = value - return property(**locals()) - - @apply - def sense(): - def fget( self ): - return self._sense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument sense is mantatory and can not be set to None') - if not check_type(value,ahead_or_behind): - self._sense = ahead_or_behind(value) - else: - self._sense = value - return property(**locals()) - -#################### - # ENTITY curve_replica # -#################### -class curve_replica(curve): - '''Entity curve_replica definition. - - :param parent_curve - :type parent_curve:curve - - :param transformation - :type transformation:cartesian_transformation_operator - ''' - def __init__( self , inherited0__name , parent_curve,transformation, ): - curve.__init__(self , inherited0__name , ) - self.parent_curve = parent_curve - self.transformation = transformation - - @apply - def parent_curve(): - def fget( self ): - return self._parent_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument parent_curve is mantatory and can not be set to None') - if not check_type(value,curve): - self._parent_curve = curve(value) - else: - self._parent_curve = value - return property(**locals()) - - @apply - def transformation(): - def fget( self ): - return self._transformation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument transformation is mantatory and can not be set to None') - if not check_type(value,cartesian_transformation_operator): - self._transformation = cartesian_transformation_operator(value) - else: - self._transformation = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.transformation.self.dim == self.parent_curve.self.dim) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = acyclic_curve_replica(self,self.parent_curve) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY quasi_uniform_surface # -#################### -class quasi_uniform_surface(b_spline_surface): - '''Entity quasi_uniform_surface definition. - ''' - def __init__( self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ): - b_spline_surface.__init__(self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ) - -#################### - # ENTITY surface_curve # -#################### -class surface_curve(curve): - '''Entity surface_curve definition. - - :param curve_3d - :type curve_3d:curve - - :param associated_geometry - :type associated_geometry:LIST(1,2,'pcurve_or_surface', scope = schema_scope) - - :param master_representation - :type master_representation:preferred_surface_curve_representation - - :param basis_surface - :type basis_surface:SET(1,2,'surface', scope = schema_scope) - ''' - def __init__( self , inherited0__name , curve_3d,associated_geometry,master_representation, ): - curve.__init__(self , inherited0__name , ) - self.curve_3d = curve_3d - self.associated_geometry = associated_geometry - self.master_representation = master_representation - - @apply - def curve_3d(): - def fget( self ): - return self._curve_3d - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument curve_3d is mantatory and can not be set to None') - if not check_type(value,curve): - self._curve_3d = curve(value) - else: - self._curve_3d = value - return property(**locals()) - - @apply - def associated_geometry(): - def fget( self ): - return self._associated_geometry - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument associated_geometry is mantatory and can not be set to None') - if not check_type(value,LIST(1,2,'pcurve_or_surface', scope = schema_scope)): - self._associated_geometry = LIST(value) - else: - self._associated_geometry = value - return property(**locals()) - - @apply - def master_representation(): - def fget( self ): - return self._master_representation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument master_representation is mantatory and can not be set to None') - if not check_type(value,preferred_surface_curve_representation): - self._master_representation = preferred_surface_curve_representation(value) - else: - self._master_representation = value - return property(**locals()) - - @apply - def basis_surface(): - def fget( self ): - attribute_eval = get_basis_surface(self) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument basis_surface is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.curve_3d.self.dim == 3) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(self.associated_geometry[1])) or (self.master_representation != pcurve_s1)) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(self.associated_geometry[2])) or (self.master_representation != pcurve_s2)) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = ( not ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(self.curve_3d))) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - -#################### - # ENTITY action_request_status # -#################### -class action_request_status(BaseEntityClass): - '''Entity action_request_status definition. - - :param status - :type status:label - - :param assigned_request - :type assigned_request:versioned_action_request - ''' - def __init__( self , status,assigned_request, ): - self.status = status - self.assigned_request = assigned_request - - @apply - def status(): - def fget( self ): - return self._status - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument status is mantatory and can not be set to None') - if not check_type(value,label): - self._status = label(value) - else: - self._status = value - return property(**locals()) - - @apply - def assigned_request(): - def fget( self ): - return self._assigned_request - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_request is mantatory and can not be set to None') - if not check_type(value,versioned_action_request): - self._assigned_request = versioned_action_request(value) - else: - self._assigned_request = value - return property(**locals()) - -#################### - # ENTITY founded_item # -#################### -class founded_item(BaseEntityClass): - '''Entity founded_item definition. - ''' - # This class does not define any attribute. - pass - -#################### - # ENTITY composite_curve_segment # -#################### -class composite_curve_segment(founded_item): - '''Entity composite_curve_segment definition. - - :param transition - :type transition:transition_code - - :param same_sense - :type same_sense:BOOLEAN - - :param parent_curve - :type parent_curve:curve - - :param using_curves - :type using_curves:BAG(1,None,'composite_curve', scope = schema_scope) - ''' - def __init__( self , transition,same_sense,parent_curve, ): - founded_item.__init__(self , ) - self.transition = transition - self.same_sense = same_sense - self.parent_curve = parent_curve - - @apply - def transition(): - def fget( self ): - return self._transition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument transition is mantatory and can not be set to None') - if not check_type(value,transition_code): - self._transition = transition_code(value) - else: - self._transition = value - return property(**locals()) - - @apply - def same_sense(): - def fget( self ): - return self._same_sense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument same_sense is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._same_sense = BOOLEAN(value) - else: - self._same_sense = value - return property(**locals()) - - @apply - def parent_curve(): - def fget( self ): - return self._parent_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument parent_curve is mantatory and can not be set to None') - if not check_type(value,curve): - self._parent_curve = curve(value) - else: - self._parent_curve = value - return property(**locals()) - - @apply - def using_curves(): - def fget( self ): - return self._using_curves - def fset( self, value ): - # INVERSE argument - raise AssertionError('Argument using_curves is INVERSE. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.BOUNDED_CURVE' == TYPEOF(self.parent_curve)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY reparametrised_composite_curve_segment # -#################### -class reparametrised_composite_curve_segment(composite_curve_segment): - '''Entity reparametrised_composite_curve_segment definition. - - :param param_length - :type param_length:parameter_value - ''' - def __init__( self , inherited0__transition , inherited1__same_sense , inherited2__parent_curve , param_length, ): - composite_curve_segment.__init__(self , inherited0__transition , inherited1__same_sense , inherited2__parent_curve , ) - self.param_length = param_length - - @apply - def param_length(): - def fget( self ): - return self._param_length - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument param_length is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._param_length = parameter_value(value) - else: - self._param_length = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.param_length > 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY representation_relationship # -#################### -class representation_relationship(BaseEntityClass): - '''Entity representation_relationship definition. - - :param name - :type name:label - - :param description - :type description:text - - :param rep_1 - :type rep_1:representation - - :param rep_2 - :type rep_2:representation - ''' - def __init__( self , name,description,rep_1,rep_2, ): - self.name = name - self.description = description - self.rep_1 = rep_1 - self.rep_2 = rep_2 - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def rep_1(): - def fget( self ): - return self._rep_1 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument rep_1 is mantatory and can not be set to None') - if not check_type(value,representation): - self._rep_1 = representation(value) - else: - self._rep_1 = value - return property(**locals()) - - @apply - def rep_2(): - def fget( self ): - return self._rep_2 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument rep_2 is mantatory and can not be set to None') - if not check_type(value,representation): - self._rep_2 = representation(value) - else: - self._rep_2 = value - return property(**locals()) - -#################### - # ENTITY representation_relationship_with_transformation # -#################### -class representation_relationship_with_transformation(representation_relationship): - '''Entity representation_relationship_with_transformation definition. - - :param transformation_operator - :type transformation_operator:transformation - ''' - def __init__( self , inherited0__name , inherited1__description , inherited2__rep_1 , inherited3__rep_2 , transformation_operator, ): - representation_relationship.__init__(self , inherited0__name , inherited1__description , inherited2__rep_1 , inherited3__rep_2 , ) - self.transformation_operator = transformation_operator - - @apply - def transformation_operator(): - def fget( self ): - return self._transformation_operator - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument transformation_operator is mantatory and can not be set to None') - if not check_type(value,transformation): - self._transformation_operator = transformation(value) - else: - self._transformation_operator = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.self.representation_relationship.self.rep_1.self.context_of_items != self.self.representation_relationship.self.rep_2.self.context_of_items) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY person_and_organization_role # -#################### -class person_and_organization_role(BaseEntityClass): - '''Entity person_and_organization_role definition. - - :param name - :type name:label - ''' - def __init__( self , name, ): - self.name = name - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - -#################### - # ENTITY quasi_uniform_curve # -#################### -class quasi_uniform_curve(b_spline_curve): - '''Entity quasi_uniform_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ): - b_spline_curve.__init__(self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ) - -#################### - # ENTITY swept_surface # -#################### -class swept_surface(surface): - '''Entity swept_surface definition. - - :param swept_curve - :type swept_curve:curve - ''' - def __init__( self , inherited0__name , swept_curve, ): - surface.__init__(self , inherited0__name , ) - self.swept_curve = swept_curve - - @apply - def swept_curve(): - def fget( self ): - return self._swept_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument swept_curve is mantatory and can not be set to None') - if not check_type(value,curve): - self._swept_curve = curve(value) - else: - self._swept_curve = value - return property(**locals()) - -#################### - # ENTITY property_definition # -#################### -class property_definition(BaseEntityClass): - '''Entity property_definition definition. - - :param name - :type name:label - - :param description - :type description:text - - :param definition - :type definition:characterized_definition - ''' - def __init__( self , name,description,definition, ): - self.name = name - self.description = description - self.definition = definition - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def definition(): - def fget( self ): - return self._definition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument definition is mantatory and can not be set to None') - if not check_type(value,characterized_definition): - self._definition = characterized_definition(value) - else: - self._definition = value - return property(**locals()) - -#################### - # ENTITY global_uncertainty_assigned_context # -#################### -class global_uncertainty_assigned_context(representation_context): - '''Entity global_uncertainty_assigned_context definition. - - :param uncertainty - :type uncertainty:SET(1,None,'uncertainty_measure_with_unit', scope = schema_scope) - ''' - def __init__( self , inherited0__context_identifier , inherited1__context_type , uncertainty, ): - representation_context.__init__(self , inherited0__context_identifier , inherited1__context_type , ) - self.uncertainty = uncertainty - - @apply - def uncertainty(): - def fget( self ): - return self._uncertainty - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument uncertainty is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'uncertainty_measure_with_unit', scope = schema_scope)): - self._uncertainty = SET(value) - else: - self._uncertainty = value - return property(**locals()) - -#################### - # ENTITY organization_relationship # -#################### -class organization_relationship(BaseEntityClass): - '''Entity organization_relationship definition. - - :param name - :type name:label - - :param description - :type description:text - - :param relating_organization - :type relating_organization:organization - - :param related_organization - :type related_organization:organization - ''' - def __init__( self , name,description,relating_organization,related_organization, ): - self.name = name - self.description = description - self.relating_organization = relating_organization - self.related_organization = related_organization - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def relating_organization(): - def fget( self ): - return self._relating_organization - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument relating_organization is mantatory and can not be set to None') - if not check_type(value,organization): - self._relating_organization = organization(value) - else: - self._relating_organization = value - return property(**locals()) - - @apply - def related_organization(): - def fget( self ): - return self._related_organization - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument related_organization is mantatory and can not be set to None') - if not check_type(value,organization): - self._related_organization = organization(value) - else: - self._related_organization = value - return property(**locals()) - -#################### - # ENTITY parabola # -#################### -class parabola(conic): - '''Entity parabola definition. - - :param focal_dist - :type focal_dist:length_measure - ''' - def __init__( self , inherited0__name , inherited1__position , focal_dist, ): - conic.__init__(self , inherited0__name , inherited1__position , ) - self.focal_dist = focal_dist - - @apply - def focal_dist(): - def fget( self ): - return self._focal_dist - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument focal_dist is mantatory and can not be set to None') - if not check_type(value,length_measure): - self._focal_dist = length_measure(value) - else: - self._focal_dist = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.focal_dist != 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY rectangular_composite_surface # -#################### -class rectangular_composite_surface(bounded_surface): - '''Entity rectangular_composite_surface definition. - - :param segments - :type segments:LIST(1,None,LIST(1,None,'surface_patch', scope = schema_scope)) - - :param n_u - :type n_u:INTEGER - - :param n_v - :type n_v:INTEGER - ''' - def __init__( self , inherited0__name , segments, ): - bounded_surface.__init__(self , inherited0__name , ) - self.segments = segments - - @apply - def segments(): - def fget( self ): - return self._segments - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument segments is mantatory and can not be set to None') - if not check_type(value,LIST(1,None,LIST(1,None,'surface_patch', scope = schema_scope))): - self._segments = LIST(value) - else: - self._segments = value - return property(**locals()) - - @apply - def n_u(): - def fget( self ): - attribute_eval = SIZEOF(self.segments) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument n_u is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - - @apply - def n_v(): - def fget( self ): - attribute_eval = SIZEOF(self.segments[1]) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument n_v is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ([] == None) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = constraints_rectangular_composite_surface(self) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY lot_effectivity # -#################### -class lot_effectivity(effectivity): - '''Entity lot_effectivity definition. - - :param effectivity_lot_id - :type effectivity_lot_id:identifier - - :param effectivity_lot_size - :type effectivity_lot_size:measure_with_unit - ''' - def __init__( self , inherited0__id , effectivity_lot_id,effectivity_lot_size, ): - effectivity.__init__(self , inherited0__id , ) - self.effectivity_lot_id = effectivity_lot_id - self.effectivity_lot_size = effectivity_lot_size - - @apply - def effectivity_lot_id(): - def fget( self ): - return self._effectivity_lot_id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument effectivity_lot_id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._effectivity_lot_id = identifier(value) - else: - self._effectivity_lot_id = value - return property(**locals()) - - @apply - def effectivity_lot_size(): - def fget( self ): - return self._effectivity_lot_size - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument effectivity_lot_size is mantatory and can not be set to None') - if not check_type(value,measure_with_unit): - self._effectivity_lot_size = measure_with_unit(value) - else: - self._effectivity_lot_size = value - return property(**locals()) - -#################### - # ENTITY surface_of_linear_extrusion # -#################### -class surface_of_linear_extrusion(swept_surface): - '''Entity surface_of_linear_extrusion definition. - - :param extrusion_axis - :type extrusion_axis:vector - ''' - def __init__( self , inherited0__name , inherited1__swept_curve , extrusion_axis, ): - swept_surface.__init__(self , inherited0__name , inherited1__swept_curve , ) - self.extrusion_axis = extrusion_axis - - @apply - def extrusion_axis(): - def fget( self ): - return self._extrusion_axis - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument extrusion_axis is mantatory and can not be set to None') - if not check_type(value,vector): - self._extrusion_axis = vector(value) - else: - self._extrusion_axis = value - return property(**locals()) - -#################### - # ENTITY shell_based_surface_model # -#################### -class shell_based_surface_model(geometric_representation_item): - '''Entity shell_based_surface_model definition. - - :param sbsm_boundary - :type sbsm_boundary:SET(1,None,'shell', scope = schema_scope) - ''' - def __init__( self , inherited0__name , sbsm_boundary, ): - geometric_representation_item.__init__(self , inherited0__name , ) - self.sbsm_boundary = sbsm_boundary - - @apply - def sbsm_boundary(): - def fget( self ): - return self._sbsm_boundary - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument sbsm_boundary is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'shell', scope = schema_scope)): - self._sbsm_boundary = SET(value) - else: - self._sbsm_boundary = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = constraints_geometry_shell_based_surface_model(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY uniform_curve # -#################### -class uniform_curve(b_spline_curve): - '''Entity uniform_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ): - b_spline_curve.__init__(self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ) - -#################### - # ENTITY bezier_curve # -#################### -class bezier_curve(b_spline_curve): - '''Entity bezier_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ): - b_spline_curve.__init__(self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ) - -#################### - # ENTITY loop # -#################### -class loop(topological_representation_item): - '''Entity loop definition. - ''' - def __init__( self , inherited0__name , ): - topological_representation_item.__init__(self , inherited0__name , ) - -#################### - # ENTITY edge_loop # -#################### -class edge_loop(loop,path): - '''Entity edge_loop definition. - - :param ne - :type ne:INTEGER - ''' - def __init__( self , inherited0__name , inherited1__name , inherited2__edge_list , ): - loop.__init__(self , inherited0__name , ) - path.__init__(self , inherited1__name , inherited2__edge_list , ) - - @apply - def ne(): - def fget( self ): - attribute_eval = SIZEOF(self.self.path.self.edge_list) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument ne is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.self.path.self.edge_list[1].self.edge_start == self.self.path.self.edge_list[self.ne].self.edge_end) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY date # -#################### -class date(BaseEntityClass): - '''Entity date definition. - - :param year_component - :type year_component:year_number - ''' - def __init__( self , year_component, ): - self.year_component = year_component - - @apply - def year_component(): - def fget( self ): - return self._year_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument year_component is mantatory and can not be set to None') - if not check_type(value,year_number): - self._year_component = year_number(value) - else: - self._year_component = value - return property(**locals()) - -#################### - # ENTITY calendar_date # -#################### -class calendar_date(date): - '''Entity calendar_date definition. - - :param day_component - :type day_component:day_in_month_number - - :param month_component - :type month_component:month_in_year_number - ''' - def __init__( self , inherited0__year_component , day_component,month_component, ): - date.__init__(self , inherited0__year_component , ) - self.day_component = day_component - self.month_component = month_component - - @apply - def day_component(): - def fget( self ): - return self._day_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument day_component is mantatory and can not be set to None') - if not check_type(value,day_in_month_number): - self._day_component = day_in_month_number(value) - else: - self._day_component = value - return property(**locals()) - - @apply - def month_component(): - def fget( self ): - return self._month_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument month_component is mantatory and can not be set to None') - if not check_type(value,month_in_year_number): - self._month_component = month_in_year_number(value) - else: - self._month_component = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = valid_calendar_date(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY toroidal_surface # -#################### -class toroidal_surface(elementary_surface): - '''Entity toroidal_surface definition. - - :param major_radius - :type major_radius:positive_length_measure - - :param minor_radius - :type minor_radius:positive_length_measure - ''' - def __init__( self , inherited0__name , inherited1__position , major_radius,minor_radius, ): - elementary_surface.__init__(self , inherited0__name , inherited1__position , ) - self.major_radius = major_radius - self.minor_radius = minor_radius - - @apply - def major_radius(): - def fget( self ): - return self._major_radius - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument major_radius is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._major_radius = positive_length_measure(value) - else: - self._major_radius = value - return property(**locals()) - - @apply - def minor_radius(): - def fget( self ): - return self._minor_radius - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument minor_radius is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._minor_radius = positive_length_measure(value) - else: - self._minor_radius = value - return property(**locals()) - -#################### - # ENTITY promissory_usage_occurrence # -#################### -class promissory_usage_occurrence(assembly_component_usage): - '''Entity promissory_usage_occurrence definition. - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , ): - assembly_component_usage.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , inherited5__reference_designator , ) - -#################### - # ENTITY approval_assignment # -#################### -class approval_assignment(BaseEntityClass): - '''Entity approval_assignment definition. - - :param assigned_approval - :type assigned_approval:approval - ''' - def __init__( self , assigned_approval, ): - self.assigned_approval = assigned_approval - - @apply - def assigned_approval(): - def fget( self ): - return self._assigned_approval - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_approval is mantatory and can not be set to None') - if not check_type(value,approval): - self._assigned_approval = approval(value) - else: - self._assigned_approval = value - return property(**locals()) - -#################### - # ENTITY configuration_item # -#################### -class configuration_item(BaseEntityClass): - '''Entity configuration_item definition. - - :param id - :type id:identifier - - :param name - :type name:label - - :param description - :type description:text - - :param item_concept - :type item_concept:product_concept - - :param purpose - :type purpose:label - ''' - def __init__( self , id,name,description,item_concept,purpose, ): - self.id = id - self.name = name - self.description = description - self.item_concept = item_concept - self.purpose = purpose - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - else: - self._description = value - return property(**locals()) - - @apply - def item_concept(): - def fget( self ): - return self._item_concept - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument item_concept is mantatory and can not be set to None') - if not check_type(value,product_concept): - self._item_concept = product_concept(value) - else: - self._item_concept = value - return property(**locals()) - - @apply - def purpose(): - def fget( self ): - return self._purpose - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,label): - self._purpose = label(value) - else: - self._purpose = value - else: - self._purpose = value - return property(**locals()) - -#################### - # ENTITY contract_assignment # -#################### -class contract_assignment(BaseEntityClass): - '''Entity contract_assignment definition. - - :param assigned_contract - :type assigned_contract:contract - ''' - def __init__( self , assigned_contract, ): - self.assigned_contract = assigned_contract - - @apply - def assigned_contract(): - def fget( self ): - return self._assigned_contract - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_contract is mantatory and can not be set to None') - if not check_type(value,contract): - self._assigned_contract = contract(value) - else: - self._assigned_contract = value - return property(**locals()) - -#################### - # ENTITY vector # -#################### -class vector(geometric_representation_item): - '''Entity vector definition. - - :param orientation - :type orientation:direction - - :param magnitude - :type magnitude:length_measure - ''' - def __init__( self , inherited0__name , orientation,magnitude, ): - geometric_representation_item.__init__(self , inherited0__name , ) - self.orientation = orientation - self.magnitude = magnitude - - @apply - def orientation(): - def fget( self ): - return self._orientation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument orientation is mantatory and can not be set to None') - if not check_type(value,direction): - self._orientation = direction(value) - else: - self._orientation = value - return property(**locals()) - - @apply - def magnitude(): - def fget( self ): - return self._magnitude - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument magnitude is mantatory and can not be set to None') - if not check_type(value,length_measure): - self._magnitude = length_measure(value) - else: - self._magnitude = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.magnitude >= 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY pcurve # -#################### -class pcurve(curve): - '''Entity pcurve definition. - - :param basis_surface - :type basis_surface:surface - - :param reference_to_curve - :type reference_to_curve:definitional_representation - ''' - def __init__( self , inherited0__name , basis_surface,reference_to_curve, ): - curve.__init__(self , inherited0__name , ) - self.basis_surface = basis_surface - self.reference_to_curve = reference_to_curve - - @apply - def basis_surface(): - def fget( self ): - return self._basis_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_surface is mantatory and can not be set to None') - if not check_type(value,surface): - self._basis_surface = surface(value) - else: - self._basis_surface = value - return property(**locals()) - - @apply - def reference_to_curve(): - def fget( self ): - return self._reference_to_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument reference_to_curve is mantatory and can not be set to None') - if not check_type(value,definitional_representation): - self._reference_to_curve = definitional_representation(value) - else: - self._reference_to_curve = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (SIZEOF(self.reference_to_curve.self.representation.self.items) == 1) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = ('CONFIG_CONTROL_DESIGN.CURVE' == TYPEOF(self.reference_to_curve.self.representation.self.items[1])) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (self.reference_to_curve.self.representation.self.items[1].self.geometric_representation_item.self.dim == 2) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - -#################### - # ENTITY bounded_pcurve # -#################### -class bounded_pcurve(pcurve,bounded_curve): - '''Entity bounded_pcurve definition. - ''' - def __init__( self , inherited0__name , inherited1__basis_surface , inherited2__reference_to_curve , inherited3__name , ): - pcurve.__init__(self , inherited0__name , inherited1__basis_surface , inherited2__reference_to_curve , ) - bounded_curve.__init__(self , inherited3__name , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.BOUNDED_CURVE' == TYPEOF(self.self.pcurve.self.reference_to_curve.self.items[1])) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY intersection_curve # -#################### -class intersection_curve(surface_curve): - '''Entity intersection_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__curve_3d , inherited2__associated_geometry , inherited3__master_representation , ): - surface_curve.__init__(self , inherited0__name , inherited1__curve_3d , inherited2__associated_geometry , inherited3__master_representation , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(self.self.surface_curve.self.associated_geometry) == 2) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (associated_surface(self.self.surface_curve.self.associated_geometry[1]) != associated_surface(self.self.surface_curve.self.associated_geometry[2])) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY trimmed_curve # -#################### -class trimmed_curve(bounded_curve): - '''Entity trimmed_curve definition. - - :param basis_curve - :type basis_curve:curve - - :param trim_1 - :type trim_1:SET(1,2,'trimming_select', scope = schema_scope) - - :param trim_2 - :type trim_2:SET(1,2,'trimming_select', scope = schema_scope) - - :param sense_agreement - :type sense_agreement:BOOLEAN - - :param master_representation - :type master_representation:trimming_preference - ''' - def __init__( self , inherited0__name , basis_curve,trim_1,trim_2,sense_agreement,master_representation, ): - bounded_curve.__init__(self , inherited0__name , ) - self.basis_curve = basis_curve - self.trim_1 = trim_1 - self.trim_2 = trim_2 - self.sense_agreement = sense_agreement - self.master_representation = master_representation - - @apply - def basis_curve(): - def fget( self ): - return self._basis_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_curve is mantatory and can not be set to None') - if not check_type(value,curve): - self._basis_curve = curve(value) - else: - self._basis_curve = value - return property(**locals()) - - @apply - def trim_1(): - def fget( self ): - return self._trim_1 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument trim_1 is mantatory and can not be set to None') - if not check_type(value,SET(1,2,'trimming_select', scope = schema_scope)): - self._trim_1 = SET(value) - else: - self._trim_1 = value - return property(**locals()) - - @apply - def trim_2(): - def fget( self ): - return self._trim_2 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument trim_2 is mantatory and can not be set to None') - if not check_type(value,SET(1,2,'trimming_select', scope = schema_scope)): - self._trim_2 = SET(value) - else: - self._trim_2 = value - return property(**locals()) - - @apply - def sense_agreement(): - def fget( self ): - return self._sense_agreement - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument sense_agreement is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._sense_agreement = BOOLEAN(value) - else: - self._sense_agreement = value - return property(**locals()) - - @apply - def master_representation(): - def fget( self ): - return self._master_representation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument master_representation is mantatory and can not be set to None') - if not check_type(value,trimming_preference): - self._master_representation = trimming_preference(value) - else: - self._master_representation = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = ((HIINDEX(self.trim_1) == 1) or (TYPEOF(self.trim_1[1]) != TYPEOF(self.trim_1[2]))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = ((HIINDEX(self.trim_2) == 1) or (TYPEOF(self.trim_2[1]) != TYPEOF(self.trim_2[2]))) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY product_definition_context # -#################### -class product_definition_context(application_context_element): - '''Entity product_definition_context definition. - - :param life_cycle_stage - :type life_cycle_stage:label - ''' - def __init__( self , inherited0__name , inherited1__frame_of_reference , life_cycle_stage, ): - application_context_element.__init__(self , inherited0__name , inherited1__frame_of_reference , ) - self.life_cycle_stage = life_cycle_stage - - @apply - def life_cycle_stage(): - def fget( self ): - return self._life_cycle_stage - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument life_cycle_stage is mantatory and can not be set to None') - if not check_type(value,label): - self._life_cycle_stage = label(value) - else: - self._life_cycle_stage = value - return property(**locals()) - -#################### - # ENTITY bounded_surface_curve # -#################### -class bounded_surface_curve(surface_curve,bounded_curve): - '''Entity bounded_surface_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__curve_3d , inherited2__associated_geometry , inherited3__master_representation , inherited4__name , ): - surface_curve.__init__(self , inherited0__name , inherited1__curve_3d , inherited2__associated_geometry , inherited3__master_representation , ) - bounded_curve.__init__(self , inherited4__name , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.BOUNDED_CURVE' == TYPEOF(self.self.surface_curve.self.curve_3d)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY item_defined_transformation # -#################### -class item_defined_transformation(BaseEntityClass): - '''Entity item_defined_transformation definition. - - :param name - :type name:label - - :param description - :type description:text - - :param transform_item_1 - :type transform_item_1:representation_item - - :param transform_item_2 - :type transform_item_2:representation_item - ''' - def __init__( self , name,description,transform_item_1,transform_item_2, ): - self.name = name - self.description = description - self.transform_item_1 = transform_item_1 - self.transform_item_2 = transform_item_2 - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def transform_item_1(): - def fget( self ): - return self._transform_item_1 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument transform_item_1 is mantatory and can not be set to None') - if not check_type(value,representation_item): - self._transform_item_1 = representation_item(value) - else: - self._transform_item_1 = value - return property(**locals()) - - @apply - def transform_item_2(): - def fget( self ): - return self._transform_item_2 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument transform_item_2 is mantatory and can not be set to None') - if not check_type(value,representation_item): - self._transform_item_2 = representation_item(value) - else: - self._transform_item_2 = value - return property(**locals()) - -#################### - # ENTITY action_method # -#################### -class action_method(BaseEntityClass): - '''Entity action_method definition. - - :param name - :type name:label - - :param description - :type description:text - - :param consequence - :type consequence:text - - :param purpose - :type purpose:text - ''' - def __init__( self , name,description,consequence,purpose, ): - self.name = name - self.description = description - self.consequence = consequence - self.purpose = purpose - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def consequence(): - def fget( self ): - return self._consequence - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument consequence is mantatory and can not be set to None') - if not check_type(value,text): - self._consequence = text(value) - else: - self._consequence = value - return property(**locals()) - - @apply - def purpose(): - def fget( self ): - return self._purpose - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument purpose is mantatory and can not be set to None') - if not check_type(value,text): - self._purpose = text(value) - else: - self._purpose = value - return property(**locals()) - -#################### - # ENTITY product_category_relationship # -#################### -class product_category_relationship(BaseEntityClass): - '''Entity product_category_relationship definition. - - :param name - :type name:label - - :param description - :type description:text - - :param category - :type category:product_category - - :param sub_category - :type sub_category:product_category - ''' - def __init__( self , name,description,category,sub_category, ): - self.name = name - self.description = description - self.category = category - self.sub_category = sub_category - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def category(): - def fget( self ): - return self._category - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument category is mantatory and can not be set to None') - if not check_type(value,product_category): - self._category = product_category(value) - else: - self._category = value - return property(**locals()) - - @apply - def sub_category(): - def fget( self ): - return self._sub_category - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument sub_category is mantatory and can not be set to None') - if not check_type(value,product_category): - self._sub_category = product_category(value) - else: - self._sub_category = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = acyclic_product_category_relationship(self,[self.self.sub_category]) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY plane_angle_measure_with_unit # -#################### -class plane_angle_measure_with_unit(measure_with_unit): - '''Entity plane_angle_measure_with_unit definition. - ''' - def __init__( self , inherited0__value_component , inherited1__unit_component , ): - measure_with_unit.__init__(self , inherited0__value_component , inherited1__unit_component , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.PLANE_ANGLE_UNIT' == TYPEOF(self.self.measure_with_unit.self.unit_component)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY vertex # -#################### -class vertex(topological_representation_item): - '''Entity vertex definition. - ''' - def __init__( self , inherited0__name , ): - topological_representation_item.__init__(self , inherited0__name , ) - -#################### - # ENTITY representation_map # -#################### -class representation_map(BaseEntityClass): - '''Entity representation_map definition. - - :param mapping_origin - :type mapping_origin:representation_item - - :param mapped_representation - :type mapped_representation:representation - - :param map_usage - :type map_usage:SET(1,None,'mapped_item', scope = schema_scope) - ''' - def __init__( self , mapping_origin,mapped_representation, ): - self.mapping_origin = mapping_origin - self.mapped_representation = mapped_representation - - @apply - def mapping_origin(): - def fget( self ): - return self._mapping_origin - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument mapping_origin is mantatory and can not be set to None') - if not check_type(value,representation_item): - self._mapping_origin = representation_item(value) - else: - self._mapping_origin = value - return property(**locals()) - - @apply - def mapped_representation(): - def fget( self ): - return self._mapped_representation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument mapped_representation is mantatory and can not be set to None') - if not check_type(value,representation): - self._mapped_representation = representation(value) - else: - self._mapped_representation = value - return property(**locals()) - - @apply - def map_usage(): - def fget( self ): - return self._map_usage - def fset( self, value ): - # INVERSE argument - raise AssertionError('Argument map_usage is INVERSE. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = item_in_context(self.self.mapping_origin,self.self.mapped_representation.self.context_of_items) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY product_definition_effectivity # -#################### -class product_definition_effectivity(effectivity): - '''Entity product_definition_effectivity definition. - - :param usage - :type usage:product_definition_relationship - ''' - def __init__( self , inherited0__id , usage, ): - effectivity.__init__(self , inherited0__id , ) - self.usage = usage - - @apply - def usage(): - def fget( self ): - return self._usage - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument usage is mantatory and can not be set to None') - if not check_type(value,product_definition_relationship): - self._usage = product_definition_relationship(value) - else: - self._usage = value - return property(**locals()) - -#################### - # ENTITY configuration_effectivity # -#################### -class configuration_effectivity(product_definition_effectivity): - '''Entity configuration_effectivity definition. - - :param configuration - :type configuration:configuration_design - ''' - def __init__( self , inherited0__id , inherited1__usage , configuration, ): - product_definition_effectivity.__init__(self , inherited0__id , inherited1__usage , ) - self.configuration = configuration - - @apply - def configuration(): - def fget( self ): - return self._configuration - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument configuration is mantatory and can not be set to None') - if not check_type(value,configuration_design): - self._configuration = configuration_design(value) - else: - self._configuration = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_USAGE' == TYPEOF(self.self.product_definition_effectivity.self.usage)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY ellipse # -#################### -class ellipse(conic): - '''Entity ellipse definition. - - :param semi_axis_1 - :type semi_axis_1:positive_length_measure - - :param semi_axis_2 - :type semi_axis_2:positive_length_measure - ''' - def __init__( self , inherited0__name , inherited1__position , semi_axis_1,semi_axis_2, ): - conic.__init__(self , inherited0__name , inherited1__position , ) - self.semi_axis_1 = semi_axis_1 - self.semi_axis_2 = semi_axis_2 - - @apply - def semi_axis_1(): - def fget( self ): - return self._semi_axis_1 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument semi_axis_1 is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._semi_axis_1 = positive_length_measure(value) - else: - self._semi_axis_1 = value - return property(**locals()) - - @apply - def semi_axis_2(): - def fget( self ): - return self._semi_axis_2 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument semi_axis_2 is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._semi_axis_2 = positive_length_measure(value) - else: - self._semi_axis_2 = value - return property(**locals()) - -#################### - # ENTITY context_dependent_unit # -#################### -class context_dependent_unit(named_unit): - '''Entity context_dependent_unit definition. - - :param name - :type name:label - ''' - def __init__( self , inherited0__dimensions , name, ): - named_unit.__init__(self , inherited0__dimensions , ) - self.name = name - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - -#################### - # ENTITY alternate_product_relationship # -#################### -class alternate_product_relationship(BaseEntityClass): - '''Entity alternate_product_relationship definition. - - :param name - :type name:label - - :param definition - :type definition:text - - :param alternate - :type alternate:product - - :param base - :type base:product - - :param basis - :type basis:text - ''' - def __init__( self , name,definition,alternate,base,basis, ): - self.name = name - self.definition = definition - self.alternate = alternate - self.base = base - self.basis = basis - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def definition(): - def fget( self ): - return self._definition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument definition is mantatory and can not be set to None') - if not check_type(value,text): - self._definition = text(value) - else: - self._definition = value - return property(**locals()) - - @apply - def alternate(): - def fget( self ): - return self._alternate - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument alternate is mantatory and can not be set to None') - if not check_type(value,product): - self._alternate = product(value) - else: - self._alternate = value - return property(**locals()) - - @apply - def base(): - def fget( self ): - return self._base - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument base is mantatory and can not be set to None') - if not check_type(value,product): - self._base = product(value) - else: - self._base = value - return property(**locals()) - - @apply - def basis(): - def fget( self ): - return self._basis - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis is mantatory and can not be set to None') - if not check_type(value,text): - self._basis = text(value) - else: - self._basis = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.alternate != self.base) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY document_type # -#################### -class document_type(BaseEntityClass): - '''Entity document_type definition. - - :param product_data_type - :type product_data_type:label - ''' - def __init__( self , product_data_type, ): - self.product_data_type = product_data_type - - @apply - def product_data_type(): - def fget( self ): - return self._product_data_type - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument product_data_type is mantatory and can not be set to None') - if not check_type(value,label): - self._product_data_type = label(value) - else: - self._product_data_type = value - return property(**locals()) - -#################### - # ENTITY document_reference # -#################### -class document_reference(BaseEntityClass): - '''Entity document_reference definition. - - :param assigned_document - :type assigned_document:document - - :param source - :type source:label - ''' - def __init__( self , assigned_document,source, ): - self.assigned_document = assigned_document - self.source = source - - @apply - def assigned_document(): - def fget( self ): - return self._assigned_document - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_document is mantatory and can not be set to None') - if not check_type(value,document): - self._assigned_document = document(value) - else: - self._assigned_document = value - return property(**locals()) - - @apply - def source(): - def fget( self ): - return self._source - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument source is mantatory and can not be set to None') - if not check_type(value,label): - self._source = label(value) - else: - self._source = value - return property(**locals()) - -#################### - # ENTITY mechanical_context # -#################### -class mechanical_context(product_context): - '''Entity mechanical_context definition. - ''' - def __init__( self , inherited0__name , inherited1__frame_of_reference , inherited2__discipline_type , ): - product_context.__init__(self , inherited0__name , inherited1__frame_of_reference , inherited2__discipline_type , ) - def wr1(self): - eval_wr1_wr = (self.self.discipline_type == 'mechanical') - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY shell_based_wireframe_model # -#################### -class shell_based_wireframe_model(geometric_representation_item): - '''Entity shell_based_wireframe_model definition. - - :param sbwm_boundary - :type sbwm_boundary:SET(1,None,'shell', scope = schema_scope) - ''' - def __init__( self , inherited0__name , sbwm_boundary, ): - geometric_representation_item.__init__(self , inherited0__name , ) - self.sbwm_boundary = sbwm_boundary - - @apply - def sbwm_boundary(): - def fget( self ): - return self._sbwm_boundary - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument sbwm_boundary is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'shell', scope = schema_scope)): - self._sbwm_boundary = SET(value) - else: - self._sbwm_boundary = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = constraints_geometry_shell_based_wireframe_model(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY contract # -#################### -class contract(BaseEntityClass): - '''Entity contract definition. - - :param name - :type name:label - - :param purpose - :type purpose:text - - :param kind - :type kind:contract_type - ''' - def __init__( self , name,purpose,kind, ): - self.name = name - self.purpose = purpose - self.kind = kind - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def purpose(): - def fget( self ): - return self._purpose - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument purpose is mantatory and can not be set to None') - if not check_type(value,text): - self._purpose = text(value) - else: - self._purpose = value - return property(**locals()) - - @apply - def kind(): - def fget( self ): - return self._kind - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument kind is mantatory and can not be set to None') - if not check_type(value,contract_type): - self._kind = contract_type(value) - else: - self._kind = value - return property(**locals()) - -#################### - # ENTITY dimensional_exponents # -#################### -class dimensional_exponents(BaseEntityClass): - '''Entity dimensional_exponents definition. - - :param length_exponent - :type length_exponent:REAL - - :param mass_exponent - :type mass_exponent:REAL - - :param time_exponent - :type time_exponent:REAL - - :param electric_current_exponent - :type electric_current_exponent:REAL - - :param thermodynamic_temperature_exponent - :type thermodynamic_temperature_exponent:REAL - - :param amount_of_substance_exponent - :type amount_of_substance_exponent:REAL - - :param luminous_intensity_exponent - :type luminous_intensity_exponent:REAL - ''' - def __init__( self , length_exponent,mass_exponent,time_exponent,electric_current_exponent,thermodynamic_temperature_exponent,amount_of_substance_exponent,luminous_intensity_exponent, ): - self.length_exponent = length_exponent - self.mass_exponent = mass_exponent - self.time_exponent = time_exponent - self.electric_current_exponent = electric_current_exponent - self.thermodynamic_temperature_exponent = thermodynamic_temperature_exponent - self.amount_of_substance_exponent = amount_of_substance_exponent - self.luminous_intensity_exponent = luminous_intensity_exponent - - @apply - def length_exponent(): - def fget( self ): - return self._length_exponent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument length_exponent is mantatory and can not be set to None') - if not check_type(value,REAL): - self._length_exponent = REAL(value) - else: - self._length_exponent = value - return property(**locals()) - - @apply - def mass_exponent(): - def fget( self ): - return self._mass_exponent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument mass_exponent is mantatory and can not be set to None') - if not check_type(value,REAL): - self._mass_exponent = REAL(value) - else: - self._mass_exponent = value - return property(**locals()) - - @apply - def time_exponent(): - def fget( self ): - return self._time_exponent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument time_exponent is mantatory and can not be set to None') - if not check_type(value,REAL): - self._time_exponent = REAL(value) - else: - self._time_exponent = value - return property(**locals()) - - @apply - def electric_current_exponent(): - def fget( self ): - return self._electric_current_exponent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument electric_current_exponent is mantatory and can not be set to None') - if not check_type(value,REAL): - self._electric_current_exponent = REAL(value) - else: - self._electric_current_exponent = value - return property(**locals()) - - @apply - def thermodynamic_temperature_exponent(): - def fget( self ): - return self._thermodynamic_temperature_exponent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument thermodynamic_temperature_exponent is mantatory and can not be set to None') - if not check_type(value,REAL): - self._thermodynamic_temperature_exponent = REAL(value) - else: - self._thermodynamic_temperature_exponent = value - return property(**locals()) - - @apply - def amount_of_substance_exponent(): - def fget( self ): - return self._amount_of_substance_exponent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument amount_of_substance_exponent is mantatory and can not be set to None') - if not check_type(value,REAL): - self._amount_of_substance_exponent = REAL(value) - else: - self._amount_of_substance_exponent = value - return property(**locals()) - - @apply - def luminous_intensity_exponent(): - def fget( self ): - return self._luminous_intensity_exponent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument luminous_intensity_exponent is mantatory and can not be set to None') - if not check_type(value,REAL): - self._luminous_intensity_exponent = REAL(value) - else: - self._luminous_intensity_exponent = value - return property(**locals()) - -#################### - # ENTITY start_request # -#################### -class start_request(action_request_assignment): - '''Entity start_request definition. - - :param items - :type items:SET(1,None,'start_request_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_action_request , items, ): - action_request_assignment.__init__(self , inherited0__assigned_action_request , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'start_request_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY cc_design_specification_reference # -#################### -class cc_design_specification_reference(document_reference): - '''Entity cc_design_specification_reference definition. - - :param items - :type items:SET(1,None,'specified_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_document , inherited1__source , items, ): - document_reference.__init__(self , inherited0__assigned_document , inherited1__source , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'specified_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY supplied_part_relationship # -#################### -class supplied_part_relationship(product_definition_relationship): - '''Entity supplied_part_relationship definition. - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , ): - product_definition_relationship.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , ) - -#################### - # ENTITY context_dependent_shape_representation # -#################### -class context_dependent_shape_representation(BaseEntityClass): - '''Entity context_dependent_shape_representation definition. - - :param representation_relation - :type representation_relation:shape_representation_relationship - - :param represented_product_relation - :type represented_product_relation:product_definition_shape - ''' - def __init__( self , representation_relation,represented_product_relation, ): - self.representation_relation = representation_relation - self.represented_product_relation = represented_product_relation - - @apply - def representation_relation(): - def fget( self ): - return self._representation_relation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument representation_relation is mantatory and can not be set to None') - if not check_type(value,shape_representation_relationship): - self._representation_relation = shape_representation_relationship(value) - else: - self._representation_relation = value - return property(**locals()) - - @apply - def represented_product_relation(): - def fget( self ): - return self._represented_product_relation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument represented_product_relation is mantatory and can not be set to None') - if not check_type(value,product_definition_shape): - self._represented_product_relation = product_definition_shape(value) - else: - self._represented_product_relation = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_RELATIONSHIP' == TYPEOF(self.self.represented_product_relation.self.definition)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY degenerate_toroidal_surface # -#################### -class degenerate_toroidal_surface(toroidal_surface): - '''Entity degenerate_toroidal_surface definition. - - :param select_outer - :type select_outer:BOOLEAN - ''' - def __init__( self , inherited0__name , inherited1__position , inherited2__major_radius , inherited3__minor_radius , select_outer, ): - toroidal_surface.__init__(self , inherited0__name , inherited1__position , inherited2__major_radius , inherited3__minor_radius , ) - self.select_outer = select_outer - - @apply - def select_outer(): - def fget( self ): - return self._select_outer - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument select_outer is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._select_outer = BOOLEAN(value) - else: - self._select_outer = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.major_radius < self.minor_radius) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY ordinal_date # -#################### -class ordinal_date(date): - '''Entity ordinal_date definition. - - :param day_component - :type day_component:day_in_year_number - ''' - def __init__( self , inherited0__year_component , day_component, ): - date.__init__(self , inherited0__year_component , ) - self.day_component = day_component - - @apply - def day_component(): - def fget( self ): - return self._day_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument day_component is mantatory and can not be set to None') - if not check_type(value,day_in_year_number): - self._day_component = day_in_year_number(value) - else: - self._day_component = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (((( not leap_year(self.self.year_component)) and (1 <= self.day_component)) and (self.day_component <= 365)) or ((leap_year(self.self.year_component) and (1 <= self.day_component)) and (self.day_component <= 366))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY face_outer_bound # -#################### -class face_outer_bound(face_bound): - '''Entity face_outer_bound definition. - ''' - def __init__( self , inherited0__name , inherited1__bound , inherited2__orientation , ): - face_bound.__init__(self , inherited0__name , inherited1__bound , inherited2__orientation , ) - -#################### - # ENTITY mass_measure_with_unit # -#################### -class mass_measure_with_unit(measure_with_unit): - '''Entity mass_measure_with_unit definition. - ''' - def __init__( self , inherited0__value_component , inherited1__unit_component , ): - measure_with_unit.__init__(self , inherited0__value_component , inherited1__unit_component , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.MASS_UNIT' == TYPEOF(self.self.measure_with_unit.self.unit_component)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY brep_with_voids # -#################### -class brep_with_voids(manifold_solid_brep): - '''Entity brep_with_voids definition. - - :param voids - :type voids:SET(1,None,'oriented_closed_shell', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__outer , voids, ): - manifold_solid_brep.__init__(self , inherited0__name , inherited1__outer , ) - self.voids = voids - - @apply - def voids(): - def fget( self ): - return self._voids - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument voids is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'oriented_closed_shell', scope = schema_scope)): - self._voids = SET(value) - else: - self._voids = value - return property(**locals()) - -#################### - # ENTITY week_of_year_and_day_date # -#################### -class week_of_year_and_day_date(date): - '''Entity week_of_year_and_day_date definition. - - :param week_component - :type week_component:week_in_year_number - - :param day_component - :type day_component:day_in_week_number - ''' - def __init__( self , inherited0__year_component , week_component,day_component, ): - date.__init__(self , inherited0__year_component , ) - self.week_component = week_component - self.day_component = day_component - - @apply - def week_component(): - def fget( self ): - return self._week_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument week_component is mantatory and can not be set to None') - if not check_type(value,week_in_year_number): - self._week_component = week_in_year_number(value) - else: - self._week_component = value - return property(**locals()) - - @apply - def day_component(): - def fget( self ): - return self._day_component - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,day_in_week_number): - self._day_component = day_in_week_number(value) - else: - self._day_component = value - else: - self._day_component = value - return property(**locals()) - -#################### - # ENTITY point_on_curve # -#################### -class point_on_curve(point): - '''Entity point_on_curve definition. - - :param basis_curve - :type basis_curve:curve - - :param point_parameter - :type point_parameter:parameter_value - ''' - def __init__( self , inherited0__name , basis_curve,point_parameter, ): - point.__init__(self , inherited0__name , ) - self.basis_curve = basis_curve - self.point_parameter = point_parameter - - @apply - def basis_curve(): - def fget( self ): - return self._basis_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_curve is mantatory and can not be set to None') - if not check_type(value,curve): - self._basis_curve = curve(value) - else: - self._basis_curve = value - return property(**locals()) - - @apply - def point_parameter(): - def fget( self ): - return self._point_parameter - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument point_parameter is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._point_parameter = parameter_value(value) - else: - self._point_parameter = value - return property(**locals()) - -#################### - # ENTITY shell_based_wireframe_shape_representation # -#################### -class shell_based_wireframe_shape_representation(shape_representation): - '''Entity shell_based_wireframe_shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - shape_representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) >= 1) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (SIZEOF(None) == 0) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - def wr7(self): - eval_wr7_wr = (SIZEOF(None) == 0) - if not eval_wr7_wr: - raise AssertionError('Rule wr7 violated') - else: - return eval_wr7_wr - - def wr8(self): - eval_wr8_wr = (SIZEOF(None) == 0) - if not eval_wr8_wr: - raise AssertionError('Rule wr8 violated') - else: - return eval_wr8_wr - - def wr9(self): - eval_wr9_wr = (SIZEOF(None) == 0) - if not eval_wr9_wr: - raise AssertionError('Rule wr9 violated') - else: - return eval_wr9_wr - - def wr10(self): - eval_wr10_wr = (SIZEOF(None) == 0) - if not eval_wr10_wr: - raise AssertionError('Rule wr10 violated') - else: - return eval_wr10_wr - - def wr11(self): - eval_wr11_wr = (SIZEOF(None) == 0) - if not eval_wr11_wr: - raise AssertionError('Rule wr11 violated') - else: - return eval_wr11_wr - - def wr12(self): - eval_wr12_wr = (SIZEOF(None) == 0) - if not eval_wr12_wr: - raise AssertionError('Rule wr12 violated') - else: - return eval_wr12_wr - - def wr13(self): - eval_wr13_wr = (self.self.context_of_items.self.geometric_representation_context.self.coordinate_space_dimension == 3) - if not eval_wr13_wr: - raise AssertionError('Rule wr13 violated') - else: - return eval_wr13_wr - - -#################### - # ENTITY face # -#################### -class face(topological_representation_item): - '''Entity face definition. - - :param bounds - :type bounds:SET(1,None,'face_bound', scope = schema_scope) - ''' - def __init__( self , inherited0__name , bounds, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.bounds = bounds - - @apply - def bounds(): - def fget( self ): - return self._bounds - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument bounds is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'face_bound', scope = schema_scope)): - self._bounds = SET(value) - else: - self._bounds = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not mixed_loop_type_set(list_to_set(list_face_loops(self)))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) <= 1) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY face_surface # -#################### -class face_surface(face,geometric_representation_item): - '''Entity face_surface definition. - - :param face_geometry - :type face_geometry:surface - - :param same_sense - :type same_sense:BOOLEAN - ''' - def __init__( self , inherited0__name , inherited1__bounds , inherited2__name , face_geometry,same_sense, ): - face.__init__(self , inherited0__name , inherited1__bounds , ) - geometric_representation_item.__init__(self , inherited2__name , ) - self.face_geometry = face_geometry - self.same_sense = same_sense - - @apply - def face_geometry(): - def fget( self ): - return self._face_geometry - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument face_geometry is mantatory and can not be set to None') - if not check_type(value,surface): - self._face_geometry = surface(value) - else: - self._face_geometry = value - return property(**locals()) - - @apply - def same_sense(): - def fget( self ): - return self._same_sense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument same_sense is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._same_sense = BOOLEAN(value) - else: - self._same_sense = value - return property(**locals()) - -#################### - # ENTITY oriented_face # -#################### -class oriented_face(face): - '''Entity oriented_face definition. - - :param face_element - :type face_element:face - - :param orientation - :type orientation:BOOLEAN - - :param face_bounds - :type face_bounds:SET(1,None,'face_bound', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__bounds , face_element,orientation, ): - face.__init__(self , inherited0__name , inherited1__bounds , ) - self.face_element = face_element - self.orientation = orientation - - @apply - def face_element(): - def fget( self ): - return self._face_element - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument face_element is mantatory and can not be set to None') - if not check_type(value,face): - self._face_element = face(value) - else: - self._face_element = value - return property(**locals()) - - @apply - def orientation(): - def fget( self ): - return self._orientation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument orientation is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._orientation = BOOLEAN(value) - else: - self._orientation = value - return property(**locals()) - - @apply - def face_bounds(): - def fget( self ): - attribute_eval = conditional_reverse(self.self.orientation,self.self.face_element.self.bounds) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument face_bounds is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not ('CONFIG_CONTROL_DESIGN.ORIENTED_FACE' == TYPEOF(self.self.face_element))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY surface_of_revolution # -#################### -class surface_of_revolution(swept_surface): - '''Entity surface_of_revolution definition. - - :param axis_position - :type axis_position:axis1_placement - - :param axis_line - :type axis_line:line - ''' - def __init__( self , inherited0__name , inherited1__swept_curve , axis_position, ): - swept_surface.__init__(self , inherited0__name , inherited1__swept_curve , ) - self.axis_position = axis_position - - @apply - def axis_position(): - def fget( self ): - return self._axis_position - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument axis_position is mantatory and can not be set to None') - if not check_type(value,axis1_placement): - self._axis_position = axis1_placement(value) - else: - self._axis_position = value - return property(**locals()) - - @apply - def axis_line(): - def fget( self ): - attribute_eval = ((self.dummy_gri == curve()) == line(self.axis_position.self.location,self.dummy_gri == vector(self.axis_position.self.z,1))) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument axis_line is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - -#################### - # ENTITY advanced_brep_shape_representation # -#################### -class advanced_brep_shape_representation(shape_representation): - '''Entity advanced_brep_shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - shape_representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) > 0) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (SIZEOF(None) == 0) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - -#################### - # ENTITY edge_curve # -#################### -class edge_curve(edge,geometric_representation_item): - '''Entity edge_curve definition. - - :param edge_geometry - :type edge_geometry:curve - - :param same_sense - :type same_sense:BOOLEAN - ''' - def __init__( self , inherited0__name , inherited1__edge_start , inherited2__edge_end , inherited3__name , edge_geometry,same_sense, ): - edge.__init__(self , inherited0__name , inherited1__edge_start , inherited2__edge_end , ) - geometric_representation_item.__init__(self , inherited3__name , ) - self.edge_geometry = edge_geometry - self.same_sense = same_sense - - @apply - def edge_geometry(): - def fget( self ): - return self._edge_geometry - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument edge_geometry is mantatory and can not be set to None') - if not check_type(value,curve): - self._edge_geometry = curve(value) - else: - self._edge_geometry = value - return property(**locals()) - - @apply - def same_sense(): - def fget( self ): - return self._same_sense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument same_sense is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._same_sense = BOOLEAN(value) - else: - self._same_sense = value - return property(**locals()) - -#################### - # ENTITY point_replica # -#################### -class point_replica(point): - '''Entity point_replica definition. - - :param parent_pt - :type parent_pt:point - - :param transformation - :type transformation:cartesian_transformation_operator - ''' - def __init__( self , inherited0__name , parent_pt,transformation, ): - point.__init__(self , inherited0__name , ) - self.parent_pt = parent_pt - self.transformation = transformation - - @apply - def parent_pt(): - def fget( self ): - return self._parent_pt - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument parent_pt is mantatory and can not be set to None') - if not check_type(value,point): - self._parent_pt = point(value) - else: - self._parent_pt = value - return property(**locals()) - - @apply - def transformation(): - def fget( self ): - return self._transformation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument transformation is mantatory and can not be set to None') - if not check_type(value,cartesian_transformation_operator): - self._transformation = cartesian_transformation_operator(value) - else: - self._transformation = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.transformation.self.dim == self.parent_pt.self.dim) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = acyclic_point_replica(self,self.parent_pt) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY product # -#################### -class product(BaseEntityClass): - '''Entity product definition. - - :param id - :type id:identifier - - :param name - :type name:label - - :param description - :type description:text - - :param frame_of_reference - :type frame_of_reference:SET(1,None,'product_context', scope = schema_scope) - ''' - def __init__( self , id,name,description,frame_of_reference, ): - self.id = id - self.name = name - self.description = description - self.frame_of_reference = frame_of_reference - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def frame_of_reference(): - def fget( self ): - return self._frame_of_reference - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument frame_of_reference is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'product_context', scope = schema_scope)): - self._frame_of_reference = SET(value) - else: - self._frame_of_reference = value - return property(**locals()) - -#################### - # ENTITY shape_aspect_relationship # -#################### -class shape_aspect_relationship(BaseEntityClass): - '''Entity shape_aspect_relationship definition. - - :param name - :type name:label - - :param description - :type description:text - - :param relating_shape_aspect - :type relating_shape_aspect:shape_aspect - - :param related_shape_aspect - :type related_shape_aspect:shape_aspect - ''' - def __init__( self , name,description,relating_shape_aspect,related_shape_aspect, ): - self.name = name - self.description = description - self.relating_shape_aspect = relating_shape_aspect - self.related_shape_aspect = related_shape_aspect - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def relating_shape_aspect(): - def fget( self ): - return self._relating_shape_aspect - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument relating_shape_aspect is mantatory and can not be set to None') - if not check_type(value,shape_aspect): - self._relating_shape_aspect = shape_aspect(value) - else: - self._relating_shape_aspect = value - return property(**locals()) - - @apply - def related_shape_aspect(): - def fget( self ): - return self._related_shape_aspect - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument related_shape_aspect is mantatory and can not be set to None') - if not check_type(value,shape_aspect): - self._related_shape_aspect = shape_aspect(value) - else: - self._related_shape_aspect = value - return property(**locals()) - -#################### - # ENTITY rectangular_trimmed_surface # -#################### -class rectangular_trimmed_surface(bounded_surface): - '''Entity rectangular_trimmed_surface definition. - - :param basis_surface - :type basis_surface:surface - - :param u1 - :type u1:parameter_value - - :param u2 - :type u2:parameter_value - - :param v1 - :type v1:parameter_value - - :param v2 - :type v2:parameter_value - - :param usense - :type usense:BOOLEAN - - :param vsense - :type vsense:BOOLEAN - ''' - def __init__( self , inherited0__name , basis_surface,u1,u2,v1,v2,usense,vsense, ): - bounded_surface.__init__(self , inherited0__name , ) - self.basis_surface = basis_surface - self.u1 = u1 - self.u2 = u2 - self.v1 = v1 - self.v2 = v2 - self.usense = usense - self.vsense = vsense - - @apply - def basis_surface(): - def fget( self ): - return self._basis_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_surface is mantatory and can not be set to None') - if not check_type(value,surface): - self._basis_surface = surface(value) - else: - self._basis_surface = value - return property(**locals()) - - @apply - def u1(): - def fget( self ): - return self._u1 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u1 is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._u1 = parameter_value(value) - else: - self._u1 = value - return property(**locals()) - - @apply - def u2(): - def fget( self ): - return self._u2 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u2 is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._u2 = parameter_value(value) - else: - self._u2 = value - return property(**locals()) - - @apply - def v1(): - def fget( self ): - return self._v1 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v1 is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._v1 = parameter_value(value) - else: - self._v1 = value - return property(**locals()) - - @apply - def v2(): - def fget( self ): - return self._v2 - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v2 is mantatory and can not be set to None') - if not check_type(value,parameter_value): - self._v2 = parameter_value(value) - else: - self._v2 = value - return property(**locals()) - - @apply - def usense(): - def fget( self ): - return self._usense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument usense is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._usense = BOOLEAN(value) - else: - self._usense = value - return property(**locals()) - - @apply - def vsense(): - def fget( self ): - return self._vsense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument vsense is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._vsense = BOOLEAN(value) - else: - self._vsense = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.u1 != self.u2) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (self.v1 != self.v2) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (((('CONFIG_CONTROL_DESIGN.ELEMENTARY_SURFACE' == TYPEOF(self.basis_surface)) and ( not ('CONFIG_CONTROL_DESIGN.PLANE' == TYPEOF(self.basis_surface)))) or ('CONFIG_CONTROL_DESIGN.SURFACE_OF_REVOLUTION' == TYPEOF(self.basis_surface))) or (self.usense == (self.u2 > self.u1))) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = ((('CONFIG_CONTROL_DESIGN.SPHERICAL_SURFACE' == TYPEOF(self.basis_surface)) or ('CONFIG_CONTROL_DESIGN.TOROIDAL_SURFACE' == TYPEOF(self.basis_surface))) or (self.vsense == (self.v2 > self.v1))) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - -#################### - # ENTITY plane # -#################### -class plane(elementary_surface): - '''Entity plane definition. - ''' - def __init__( self , inherited0__name , inherited1__position , ): - elementary_surface.__init__(self , inherited0__name , inherited1__position , ) - -#################### - # ENTITY action_assignment # -#################### -class action_assignment(BaseEntityClass): - '''Entity action_assignment definition. - - :param assigned_action - :type assigned_action:action - ''' - def __init__( self , assigned_action, ): - self.assigned_action = assigned_action - - @apply - def assigned_action(): - def fget( self ): - return self._assigned_action - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_action is mantatory and can not be set to None') - if not check_type(value,action): - self._assigned_action = action(value) - else: - self._assigned_action = value - return property(**locals()) - -#################### - # ENTITY change # -#################### -class change(action_assignment): - '''Entity change definition. - - :param items - :type items:SET(1,None,'work_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_action , items, ): - action_assignment.__init__(self , inherited0__assigned_action , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'work_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY circle # -#################### -class circle(conic): - '''Entity circle definition. - - :param radius - :type radius:positive_length_measure - ''' - def __init__( self , inherited0__name , inherited1__position , radius, ): - conic.__init__(self , inherited0__name , inherited1__position , ) - self.radius = radius - - @apply - def radius(): - def fget( self ): - return self._radius - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument radius is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._radius = positive_length_measure(value) - else: - self._radius = value - return property(**locals()) - -#################### - # ENTITY line # -#################### -class line(curve): - '''Entity line definition. - - :param pnt - :type pnt:cartesian_point - - :param dir - :type dir:vector - ''' - def __init__( self , inherited0__name , pnt,dir, ): - curve.__init__(self , inherited0__name , ) - self.pnt = pnt - self.dir = dir - - @apply - def pnt(): - def fget( self ): - return self._pnt - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument pnt is mantatory and can not be set to None') - if not check_type(value,cartesian_point): - self._pnt = cartesian_point(value) - else: - self._pnt = value - return property(**locals()) - - @apply - def dir(): - def fget( self ): - return self._dir - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument dir is mantatory and can not be set to None') - if not check_type(value,vector): - self._dir = vector(value) - else: - self._dir = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.dir.self.dim == self.pnt.self.dim) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY property_definition_representation # -#################### -class property_definition_representation(BaseEntityClass): - '''Entity property_definition_representation definition. - - :param definition - :type definition:property_definition - - :param used_representation - :type used_representation:representation - ''' - def __init__( self , definition,used_representation, ): - self.definition = definition - self.used_representation = used_representation - - @apply - def definition(): - def fget( self ): - return self._definition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument definition is mantatory and can not be set to None') - if not check_type(value,property_definition): - self._definition = property_definition(value) - else: - self._definition = value - return property(**locals()) - - @apply - def used_representation(): - def fget( self ): - return self._used_representation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument used_representation is mantatory and can not be set to None') - if not check_type(value,representation): - self._used_representation = representation(value) - else: - self._used_representation = value - return property(**locals()) - -#################### - # ENTITY geometric_set # -#################### -class geometric_set(geometric_representation_item): - '''Entity geometric_set definition. - - :param elements - :type elements:SET(1,None,'geometric_set_select', scope = schema_scope) - ''' - def __init__( self , inherited0__name , elements, ): - geometric_representation_item.__init__(self , inherited0__name , ) - self.elements = elements - - @apply - def elements(): - def fget( self ): - return self._elements - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument elements is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'geometric_set_select', scope = schema_scope)): - self._elements = SET(value) - else: - self._elements = value - return property(**locals()) - -#################### - # ENTITY geometric_curve_set # -#################### -class geometric_curve_set(geometric_set): - '''Entity geometric_curve_set definition. - ''' - def __init__( self , inherited0__name , inherited1__elements , ): - geometric_set.__init__(self , inherited0__name , inherited1__elements , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY personal_address # -#################### -class personal_address(address): - '''Entity personal_address definition. - - :param people - :type people:SET(1,None,'person', scope = schema_scope) - - :param description - :type description:text - ''' - def __init__( self , inherited0__internal_location , inherited1__street_number , inherited2__street , inherited3__postal_box , inherited4__town , inherited5__region , inherited6__postal_code , inherited7__country , inherited8__facsimile_number , inherited9__telephone_number , inherited10__electronic_mail_address , inherited11__telex_number , people,description, ): - address.__init__(self , inherited0__internal_location , inherited1__street_number , inherited2__street , inherited3__postal_box , inherited4__town , inherited5__region , inherited6__postal_code , inherited7__country , inherited8__facsimile_number , inherited9__telephone_number , inherited10__electronic_mail_address , inherited11__telex_number , ) - self.people = people - self.description = description - - @apply - def people(): - def fget( self ): - return self._people - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument people is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'person', scope = schema_scope)): - self._people = SET(value) - else: - self._people = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY document_relationship # -#################### -class document_relationship(BaseEntityClass): - '''Entity document_relationship definition. - - :param name - :type name:label - - :param description - :type description:text - - :param relating_document - :type relating_document:document - - :param related_document - :type related_document:document - ''' - def __init__( self , name,description,relating_document,related_document, ): - self.name = name - self.description = description - self.relating_document = relating_document - self.related_document = related_document - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def relating_document(): - def fget( self ): - return self._relating_document - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument relating_document is mantatory and can not be set to None') - if not check_type(value,document): - self._relating_document = document(value) - else: - self._relating_document = value - return property(**locals()) - - @apply - def related_document(): - def fget( self ): - return self._related_document - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument related_document is mantatory and can not be set to None') - if not check_type(value,document): - self._related_document = document(value) - else: - self._related_document = value - return property(**locals()) - -#################### - # ENTITY outer_boundary_curve # -#################### -class outer_boundary_curve(boundary_curve): - '''Entity outer_boundary_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__segments , inherited2__self_intersect , ): - boundary_curve.__init__(self , inherited0__name , inherited1__segments , inherited2__self_intersect , ) - -#################### - # ENTITY shape_representation_relationship # -#################### -class shape_representation_relationship(representation_relationship): - '''Entity shape_representation_relationship definition. - ''' - def __init__( self , inherited0__name , inherited1__description , inherited2__rep_1 , inherited3__rep_2 , ): - representation_relationship.__init__(self , inherited0__name , inherited1__description , inherited2__rep_1 , inherited3__rep_2 , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.SHAPE_REPRESENTATION' == (TYPEOF(self.self.representation_relationship.self.rep_1) + TYPEOF(self.self.representation_relationship.self.rep_2))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY assembly_component_usage_substitute # -#################### -class assembly_component_usage_substitute(BaseEntityClass): - '''Entity assembly_component_usage_substitute definition. - - :param name - :type name:label - - :param definition - :type definition:text - - :param base - :type base:assembly_component_usage - - :param substitute - :type substitute:assembly_component_usage - ''' - def __init__( self , name,definition,base,substitute, ): - self.name = name - self.definition = definition - self.base = base - self.substitute = substitute - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def definition(): - def fget( self ): - return self._definition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument definition is mantatory and can not be set to None') - if not check_type(value,text): - self._definition = text(value) - else: - self._definition = value - return property(**locals()) - - @apply - def base(): - def fget( self ): - return self._base - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument base is mantatory and can not be set to None') - if not check_type(value,assembly_component_usage): - self._base = assembly_component_usage(value) - else: - self._base = value - return property(**locals()) - - @apply - def substitute(): - def fget( self ): - return self._substitute - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument substitute is mantatory and can not be set to None') - if not check_type(value,assembly_component_usage): - self._substitute = assembly_component_usage(value) - else: - self._substitute = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.base.self.relating_product_definition == self.substitute.self.relating_product_definition) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (self.base != self.substitute) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY degenerate_pcurve # -#################### -class degenerate_pcurve(point): - '''Entity degenerate_pcurve definition. - - :param basis_surface - :type basis_surface:surface - - :param reference_to_curve - :type reference_to_curve:definitional_representation - ''' - def __init__( self , inherited0__name , basis_surface,reference_to_curve, ): - point.__init__(self , inherited0__name , ) - self.basis_surface = basis_surface - self.reference_to_curve = reference_to_curve - - @apply - def basis_surface(): - def fget( self ): - return self._basis_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_surface is mantatory and can not be set to None') - if not check_type(value,surface): - self._basis_surface = surface(value) - else: - self._basis_surface = value - return property(**locals()) - - @apply - def reference_to_curve(): - def fget( self ): - return self._reference_to_curve - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument reference_to_curve is mantatory and can not be set to None') - if not check_type(value,definitional_representation): - self._reference_to_curve = definitional_representation(value) - else: - self._reference_to_curve = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (SIZEOF(self.reference_to_curve.self.representation.self.items) == 1) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = ('CONFIG_CONTROL_DESIGN.CURVE' == TYPEOF(self.reference_to_curve.self.representation.self.items[1])) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (self.reference_to_curve.self.representation.self.items[1].self.geometric_representation_item.self.dim == 2) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - -#################### - # ENTITY evaluated_degenerate_pcurve # -#################### -class evaluated_degenerate_pcurve(degenerate_pcurve): - '''Entity evaluated_degenerate_pcurve definition. - - :param equivalent_point - :type equivalent_point:cartesian_point - ''' - def __init__( self , inherited0__name , inherited1__basis_surface , inherited2__reference_to_curve , equivalent_point, ): - degenerate_pcurve.__init__(self , inherited0__name , inherited1__basis_surface , inherited2__reference_to_curve , ) - self.equivalent_point = equivalent_point - - @apply - def equivalent_point(): - def fget( self ): - return self._equivalent_point - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument equivalent_point is mantatory and can not be set to None') - if not check_type(value,cartesian_point): - self._equivalent_point = cartesian_point(value) - else: - self._equivalent_point = value - return property(**locals()) - -#################### - # ENTITY solid_angle_measure_with_unit # -#################### -class solid_angle_measure_with_unit(measure_with_unit): - '''Entity solid_angle_measure_with_unit definition. - ''' - def __init__( self , inherited0__value_component , inherited1__unit_component , ): - measure_with_unit.__init__(self , inherited0__value_component , inherited1__unit_component , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.SOLID_ANGLE_UNIT' == TYPEOF(self.self.measure_with_unit.self.unit_component)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY connected_edge_set # -#################### -class connected_edge_set(topological_representation_item): - '''Entity connected_edge_set definition. - - :param ces_edges - :type ces_edges:SET(1,None,'edge', scope = schema_scope) - ''' - def __init__( self , inherited0__name , ces_edges, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.ces_edges = ces_edges - - @apply - def ces_edges(): - def fget( self ): - return self._ces_edges - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument ces_edges is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'edge', scope = schema_scope)): - self._ces_edges = SET(value) - else: - self._ces_edges = value - return property(**locals()) - -#################### - # ENTITY action # -#################### -class action(BaseEntityClass): - '''Entity action definition. - - :param name - :type name:label - - :param description - :type description:text - - :param chosen_method - :type chosen_method:action_method - ''' - def __init__( self , name,description,chosen_method, ): - self.name = name - self.description = description - self.chosen_method = chosen_method - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def chosen_method(): - def fget( self ): - return self._chosen_method - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument chosen_method is mantatory and can not be set to None') - if not check_type(value,action_method): - self._chosen_method = action_method(value) - else: - self._chosen_method = value - return property(**locals()) - -#################### - # ENTITY executed_action # -#################### -class executed_action(action): - '''Entity executed_action definition. - ''' - def __init__( self , inherited0__name , inherited1__description , inherited2__chosen_method , ): - action.__init__(self , inherited0__name , inherited1__description , inherited2__chosen_method , ) - -#################### - # ENTITY directed_action # -#################### -class directed_action(executed_action): - '''Entity directed_action definition. - - :param directive - :type directive:action_directive - ''' - def __init__( self , inherited0__name , inherited1__description , inherited2__chosen_method , directive, ): - executed_action.__init__(self , inherited0__name , inherited1__description , inherited2__chosen_method , ) - self.directive = directive - - @apply - def directive(): - def fget( self ): - return self._directive - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument directive is mantatory and can not be set to None') - if not check_type(value,action_directive): - self._directive = action_directive(value) - else: - self._directive = value - return property(**locals()) - -#################### - # ENTITY organizational_project # -#################### -class organizational_project(BaseEntityClass): - '''Entity organizational_project definition. - - :param name - :type name:label - - :param description - :type description:text - - :param responsible_organizations - :type responsible_organizations:SET(1,None,'organization', scope = schema_scope) - ''' - def __init__( self , name,description,responsible_organizations, ): - self.name = name - self.description = description - self.responsible_organizations = responsible_organizations - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def responsible_organizations(): - def fget( self ): - return self._responsible_organizations - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument responsible_organizations is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'organization', scope = schema_scope)): - self._responsible_organizations = SET(value) - else: - self._responsible_organizations = value - return property(**locals()) - -#################### - # ENTITY date_time_role # -#################### -class date_time_role(BaseEntityClass): - '''Entity date_time_role definition. - - :param name - :type name:label - ''' - def __init__( self , name, ): - self.name = name - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - -#################### - # ENTITY curve_bounded_surface # -#################### -class curve_bounded_surface(bounded_surface): - '''Entity curve_bounded_surface definition. - - :param basis_surface - :type basis_surface:surface - - :param boundaries - :type boundaries:SET(1,None,'boundary_curve', scope = schema_scope) - - :param implicit_outer - :type implicit_outer:BOOLEAN - ''' - def __init__( self , inherited0__name , basis_surface,boundaries,implicit_outer, ): - bounded_surface.__init__(self , inherited0__name , ) - self.basis_surface = basis_surface - self.boundaries = boundaries - self.implicit_outer = implicit_outer - - @apply - def basis_surface(): - def fget( self ): - return self._basis_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument basis_surface is mantatory and can not be set to None') - if not check_type(value,surface): - self._basis_surface = surface(value) - else: - self._basis_surface = value - return property(**locals()) - - @apply - def boundaries(): - def fget( self ): - return self._boundaries - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument boundaries is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'boundary_curve', scope = schema_scope)): - self._boundaries = SET(value) - else: - self._boundaries = value - return property(**locals()) - - @apply - def implicit_outer(): - def fget( self ): - return self._implicit_outer - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument implicit_outer is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._implicit_outer = BOOLEAN(value) - else: - self._implicit_outer = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not (self.implicit_outer and ('CONFIG_CONTROL_DESIGN.OUTER_BOUNDARY_CURVE' == TYPEOF(self.boundaries)))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (( not self.implicit_outer) or ('CONFIG_CONTROL_DESIGN.BOUNDED_SURFACE' == TYPEOF(self.basis_surface))) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) <= 1) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - -#################### - # ENTITY closed_shell # -#################### -class closed_shell(connected_face_set): - '''Entity closed_shell definition. - ''' - def __init__( self , inherited0__name , inherited1__cfs_faces , ): - connected_face_set.__init__(self , inherited0__name , inherited1__cfs_faces , ) - -#################### - # ENTITY design_make_from_relationship # -#################### -class design_make_from_relationship(product_definition_relationship): - '''Entity design_make_from_relationship definition. - ''' - def __init__( self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , ): - product_definition_relationship.__init__(self , inherited0__id , inherited1__name , inherited2__description , inherited3__relating_product_definition , inherited4__related_product_definition , ) - -#################### - # ENTITY definitional_representation # -#################### -class definitional_representation(representation): - '''Entity definitional_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.PARAMETRIC_REPRESENTATION_CONTEXT' == TYPEOF(self.self.representation.self.context_of_items)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY product_definition_shape # -#################### -class product_definition_shape(property_definition): - '''Entity product_definition_shape definition. - ''' - def __init__( self , inherited0__name , inherited1__description , inherited2__definition , ): - property_definition.__init__(self , inherited0__name , inherited1__description , inherited2__definition , ) - def wr1(self): - eval_wr1_wr = ( not ('CONFIG_CONTROL_DESIGN.SHAPE_DEFINITION' == TYPEOF(self.self.property_definition.self.definition))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY si_unit # -#################### -class si_unit(named_unit): - '''Entity si_unit definition. - - :param prefix - :type prefix:si_prefix - - :param name - :type name:si_unit_name - - :param named_unit_dimensions - :type named_unit_dimensions:dimensional_exponents - ''' - def __init__( self , inherited0__dimensions , prefix,name, ): - named_unit.__init__(self , inherited0__dimensions , ) - self.prefix = prefix - self.name = name - - @apply - def prefix(): - def fget( self ): - return self._prefix - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,si_prefix): - self._prefix = si_prefix(value) - else: - self._prefix = value - else: - self._prefix = value - return property(**locals()) - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,si_unit_name): - self._name = si_unit_name(value) - else: - self._name = value - return property(**locals()) - - @apply - def named_unit_dimensions(): - def fget( self ): - attribute_eval = dimensions_for_si_unit(self.self.name) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument named_unit_dimensions is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - -#################### - # ENTITY bezier_surface # -#################### -class bezier_surface(b_spline_surface): - '''Entity bezier_surface definition. - ''' - def __init__( self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ): - b_spline_surface.__init__(self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ) - -#################### - # ENTITY certification_assignment # -#################### -class certification_assignment(BaseEntityClass): - '''Entity certification_assignment definition. - - :param assigned_certification - :type assigned_certification:certification - ''' - def __init__( self , assigned_certification, ): - self.assigned_certification = assigned_certification - - @apply - def assigned_certification(): - def fget( self ): - return self._assigned_certification - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_certification is mantatory and can not be set to None') - if not check_type(value,certification): - self._assigned_certification = certification(value) - else: - self._assigned_certification = value - return property(**locals()) - -#################### - # ENTITY start_work # -#################### -class start_work(action_assignment): - '''Entity start_work definition. - - :param items - :type items:SET(1,None,'work_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_action , items, ): - action_assignment.__init__(self , inherited0__assigned_action , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'work_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY contract_type # -#################### -class contract_type(BaseEntityClass): - '''Entity contract_type definition. - - :param description - :type description:label - ''' - def __init__( self , description, ): - self.description = description - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,label): - self._description = label(value) - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY b_spline_curve_with_knots # -#################### -class b_spline_curve_with_knots(b_spline_curve): - '''Entity b_spline_curve_with_knots definition. - - :param knot_multiplicities - :type knot_multiplicities:LIST(2,None,'INTEGER', scope = schema_scope) - - :param knots - :type knots:LIST(2,None,'REAL', scope = schema_scope) - - :param knot_spec - :type knot_spec:knot_type - - :param upper_index_on_knots - :type upper_index_on_knots:INTEGER - ''' - def __init__( self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , knot_multiplicities,knots,knot_spec, ): - b_spline_curve.__init__(self , inherited0__name , inherited1__degree , inherited2__control_points_list , inherited3__curve_form , inherited4__closed_curve , inherited5__self_intersect , ) - self.knot_multiplicities = knot_multiplicities - self.knots = knots - self.knot_spec = knot_spec - - @apply - def knot_multiplicities(): - def fget( self ): - return self._knot_multiplicities - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument knot_multiplicities is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'INTEGER', scope = schema_scope)): - self._knot_multiplicities = LIST(value) - else: - self._knot_multiplicities = value - return property(**locals()) - - @apply - def knots(): - def fget( self ): - return self._knots - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument knots is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'REAL', scope = schema_scope)): - self._knots = LIST(value) - else: - self._knots = value - return property(**locals()) - - @apply - def knot_spec(): - def fget( self ): - return self._knot_spec - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument knot_spec is mantatory and can not be set to None') - if not check_type(value,knot_type): - self._knot_spec = knot_type(value) - else: - self._knot_spec = value - return property(**locals()) - - @apply - def upper_index_on_knots(): - def fget( self ): - attribute_eval = SIZEOF(self.knots) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument upper_index_on_knots is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = constraints_param_b_spline(self.degree,self.upper_index_on_knots,self.upper_index_on_control_points,self.knot_multiplicities,self.knots) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(self.knot_multiplicities) == self.upper_index_on_knots) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY cc_design_approval # -#################### -class cc_design_approval(approval_assignment): - '''Entity cc_design_approval definition. - - :param items - :type items:SET(1,None,'approved_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_approval , items, ): - approval_assignment.__init__(self , inherited0__assigned_approval , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'approved_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY edge_based_wireframe_shape_representation # -#################### -class edge_based_wireframe_shape_representation(shape_representation): - '''Entity edge_based_wireframe_shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - shape_representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) >= 1) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (SIZEOF(None) == 0) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - def wr7(self): - eval_wr7_wr = (SIZEOF(None) == 0) - if not eval_wr7_wr: - raise AssertionError('Rule wr7 violated') - else: - return eval_wr7_wr - - def wr8(self): - eval_wr8_wr = (SIZEOF(None) == 0) - if not eval_wr8_wr: - raise AssertionError('Rule wr8 violated') - else: - return eval_wr8_wr - - def wr9(self): - eval_wr9_wr = (self.self.context_of_items.self.geometric_representation_context.self.coordinate_space_dimension == 3) - if not eval_wr9_wr: - raise AssertionError('Rule wr9 violated') - else: - return eval_wr9_wr - - -#################### - # ENTITY geometrically_bounded_wireframe_shape_representation # -#################### -class geometrically_bounded_wireframe_shape_representation(shape_representation): - '''Entity geometrically_bounded_wireframe_shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - shape_representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) >= 1) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (SIZEOF(None) == 0) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - def wr7(self): - eval_wr7_wr = (SIZEOF(None) == 0) - if not eval_wr7_wr: - raise AssertionError('Rule wr7 violated') - else: - return eval_wr7_wr - - -#################### - # ENTITY product_concept # -#################### -class product_concept(BaseEntityClass): - '''Entity product_concept definition. - - :param id - :type id:identifier - - :param name - :type name:label - - :param description - :type description:text - - :param market_context - :type market_context:product_concept_context - ''' - def __init__( self , id,name,description,market_context, ): - self.id = id - self.name = name - self.description = description - self.market_context = market_context - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def market_context(): - def fget( self ): - return self._market_context - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument market_context is mantatory and can not be set to None') - if not check_type(value,product_concept_context): - self._market_context = product_concept_context(value) - else: - self._market_context = value - return property(**locals()) - -#################### - # ENTITY cc_design_contract # -#################### -class cc_design_contract(contract_assignment): - '''Entity cc_design_contract definition. - - :param items - :type items:SET(1,None,'contracted_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_contract , items, ): - contract_assignment.__init__(self , inherited0__assigned_contract , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'contracted_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY seam_curve # -#################### -class seam_curve(surface_curve): - '''Entity seam_curve definition. - ''' - def __init__( self , inherited0__name , inherited1__curve_3d , inherited2__associated_geometry , inherited3__master_representation , ): - surface_curve.__init__(self , inherited0__name , inherited1__curve_3d , inherited2__associated_geometry , inherited3__master_representation , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(self.self.surface_curve.self.associated_geometry) == 2) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (associated_surface(self.self.surface_curve.self.associated_geometry[1]) == associated_surface(self.self.surface_curve.self.associated_geometry[2])) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(self.self.surface_curve.self.associated_geometry[1])) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(self.self.surface_curve.self.associated_geometry[2])) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - -#################### - # ENTITY axis2_placement_3d # -#################### -class axis2_placement_3d(placement): - '''Entity axis2_placement_3d definition. - - :param axis - :type axis:direction - - :param ref_direction - :type ref_direction:direction - - :param p - :type p:LIST(3,3,'direction', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__location , axis,ref_direction, ): - placement.__init__(self , inherited0__name , inherited1__location , ) - self.axis = axis - self.ref_direction = ref_direction - - @apply - def axis(): - def fget( self ): - return self._axis - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,direction): - self._axis = direction(value) - else: - self._axis = value - else: - self._axis = value - return property(**locals()) - - @apply - def ref_direction(): - def fget( self ): - return self._ref_direction - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,direction): - self._ref_direction = direction(value) - else: - self._ref_direction = value - else: - self._ref_direction = value - return property(**locals()) - - @apply - def p(): - def fget( self ): - attribute_eval = build_axes(self.axis,self.ref_direction) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument p is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.self.placement.self.location.self.dim == 3) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (( not EXISTS(self.axis)) or (self.axis.self.dim == 3)) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (( not EXISTS(self.ref_direction)) or (self.ref_direction.self.dim == 3)) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = ((( not EXISTS(self.axis)) or ( not EXISTS(self.ref_direction))) or (cross_product(self.axis,self.ref_direction).self.magnitude > 0)) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - -#################### - # ENTITY rational_b_spline_surface # -#################### -class rational_b_spline_surface(b_spline_surface): - '''Entity rational_b_spline_surface definition. - - :param weights_data - :type weights_data:LIST(2,None,LIST(2,None,'REAL', scope = schema_scope)) - - :param weights - :type weights:ARRAY(0,u_upper,ARRAY(0,v_upper,'REAL', scope = schema_scope)) - ''' - def __init__( self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , weights_data, ): - b_spline_surface.__init__(self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ) - self.weights_data = weights_data - - @apply - def weights_data(): - def fget( self ): - return self._weights_data - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument weights_data is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,LIST(2,None,'REAL', scope = schema_scope))): - self._weights_data = LIST(value) - else: - self._weights_data = value - return property(**locals()) - - @apply - def weights(): - def fget( self ): - attribute_eval = make_array_of_array(self.weights_data,0,self.u_upper,0,self.v_upper) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument weights is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ((SIZEOF(self.weights_data) == SIZEOF(self.self.b_spline_surface.self.control_points_list)) and (SIZEOF(self.weights_data[1]) == SIZEOF(self.self.b_spline_surface.self.control_points_list[1]))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = surface_weights_positive(self) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY configuration_design # -#################### -class configuration_design(BaseEntityClass): - '''Entity configuration_design definition. - - :param configuration - :type configuration:configuration_item - - :param design - :type design:product_definition_formation - ''' - def __init__( self , configuration,design, ): - self.configuration = configuration - self.design = design - - @apply - def configuration(): - def fget( self ): - return self._configuration - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument configuration is mantatory and can not be set to None') - if not check_type(value,configuration_item): - self._configuration = configuration_item(value) - else: - self._configuration = value - return property(**locals()) - - @apply - def design(): - def fget( self ): - return self._design - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument design is mantatory and can not be set to None') - if not check_type(value,product_definition_formation): - self._design = product_definition_formation(value) - else: - self._design = value - return property(**locals()) - -#################### - # ENTITY design_context # -#################### -class design_context(product_definition_context): - '''Entity design_context definition. - ''' - def __init__( self , inherited0__name , inherited1__frame_of_reference , inherited2__life_cycle_stage , ): - product_definition_context.__init__(self , inherited0__name , inherited1__frame_of_reference , inherited2__life_cycle_stage , ) - def wr1(self): - eval_wr1_wr = (self.self.life_cycle_stage == 'design') - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY product_definition # -#################### -class product_definition(BaseEntityClass): - '''Entity product_definition definition. - - :param id - :type id:identifier - - :param description - :type description:text - - :param formation - :type formation:product_definition_formation - - :param frame_of_reference - :type frame_of_reference:product_definition_context - ''' - def __init__( self , id,description,formation,frame_of_reference, ): - self.id = id - self.description = description - self.formation = formation - self.frame_of_reference = frame_of_reference - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument id is mantatory and can not be set to None') - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def formation(): - def fget( self ): - return self._formation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument formation is mantatory and can not be set to None') - if not check_type(value,product_definition_formation): - self._formation = product_definition_formation(value) - else: - self._formation = value - return property(**locals()) - - @apply - def frame_of_reference(): - def fget( self ): - return self._frame_of_reference - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument frame_of_reference is mantatory and can not be set to None') - if not check_type(value,product_definition_context): - self._frame_of_reference = product_definition_context(value) - else: - self._frame_of_reference = value - return property(**locals()) - -#################### - # ENTITY product_definition_with_associated_documents # -#################### -class product_definition_with_associated_documents(product_definition): - '''Entity product_definition_with_associated_documents definition. - - :param documentation_ids - :type documentation_ids:SET(1,None,'document', scope = schema_scope) - ''' - def __init__( self , inherited0__id , inherited1__description , inherited2__formation , inherited3__frame_of_reference , documentation_ids, ): - product_definition.__init__(self , inherited0__id , inherited1__description , inherited2__formation , inherited3__frame_of_reference , ) - self.documentation_ids = documentation_ids - - @apply - def documentation_ids(): - def fget( self ): - return self._documentation_ids - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument documentation_ids is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'document', scope = schema_scope)): - self._documentation_ids = SET(value) - else: - self._documentation_ids = value - return property(**locals()) - -#################### - # ENTITY organization # -#################### -class organization(BaseEntityClass): - '''Entity organization definition. - - :param id - :type id:identifier - - :param name - :type name:label - - :param description - :type description:text - ''' - def __init__( self , id,name,description, ): - self.id = id - self.name = name - self.description = description - - @apply - def id(): - def fget( self ): - return self._id - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,identifier): - self._id = identifier(value) - else: - self._id = value - else: - self._id = value - return property(**locals()) - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY cc_design_certification # -#################### -class cc_design_certification(certification_assignment): - '''Entity cc_design_certification definition. - - :param items - :type items:SET(1,None,'certified_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_certification , items, ): - certification_assignment.__init__(self , inherited0__assigned_certification , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'certified_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY b_spline_surface_with_knots # -#################### -class b_spline_surface_with_knots(b_spline_surface): - '''Entity b_spline_surface_with_knots definition. - - :param u_multiplicities - :type u_multiplicities:LIST(2,None,'INTEGER', scope = schema_scope) - - :param v_multiplicities - :type v_multiplicities:LIST(2,None,'INTEGER', scope = schema_scope) - - :param u_knots - :type u_knots:LIST(2,None,'REAL', scope = schema_scope) - - :param v_knots - :type v_knots:LIST(2,None,'REAL', scope = schema_scope) - - :param knot_spec - :type knot_spec:knot_type - - :param knot_u_upper - :type knot_u_upper:INTEGER - - :param knot_v_upper - :type knot_v_upper:INTEGER - ''' - def __init__( self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , u_multiplicities,v_multiplicities,u_knots,v_knots,knot_spec, ): - b_spline_surface.__init__(self , inherited0__name , inherited1__u_degree , inherited2__v_degree , inherited3__control_points_list , inherited4__surface_form , inherited5__u_closed , inherited6__v_closed , inherited7__self_intersect , ) - self.u_multiplicities = u_multiplicities - self.v_multiplicities = v_multiplicities - self.u_knots = u_knots - self.v_knots = v_knots - self.knot_spec = knot_spec - - @apply - def u_multiplicities(): - def fget( self ): - return self._u_multiplicities - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u_multiplicities is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'INTEGER', scope = schema_scope)): - self._u_multiplicities = LIST(value) - else: - self._u_multiplicities = value - return property(**locals()) - - @apply - def v_multiplicities(): - def fget( self ): - return self._v_multiplicities - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v_multiplicities is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'INTEGER', scope = schema_scope)): - self._v_multiplicities = LIST(value) - else: - self._v_multiplicities = value - return property(**locals()) - - @apply - def u_knots(): - def fget( self ): - return self._u_knots - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u_knots is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'REAL', scope = schema_scope)): - self._u_knots = LIST(value) - else: - self._u_knots = value - return property(**locals()) - - @apply - def v_knots(): - def fget( self ): - return self._v_knots - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v_knots is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'REAL', scope = schema_scope)): - self._v_knots = LIST(value) - else: - self._v_knots = value - return property(**locals()) - - @apply - def knot_spec(): - def fget( self ): - return self._knot_spec - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument knot_spec is mantatory and can not be set to None') - if not check_type(value,knot_type): - self._knot_spec = knot_type(value) - else: - self._knot_spec = value - return property(**locals()) - - @apply - def knot_u_upper(): - def fget( self ): - attribute_eval = SIZEOF(self.u_knots) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument knot_u_upper is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - - @apply - def knot_v_upper(): - def fget( self ): - attribute_eval = SIZEOF(self.v_knots) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument knot_v_upper is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = constraints_param_b_spline(self.self.b_spline_surface.self.u_degree,self.knot_u_upper,self.self.b_spline_surface.self.u_upper,self.u_multiplicities,self.u_knots) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = constraints_param_b_spline(self.self.b_spline_surface.self.v_degree,self.knot_v_upper,self.self.b_spline_surface.self.v_upper,self.v_multiplicities,self.v_knots) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(self.u_multiplicities) == self.knot_u_upper) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(self.v_multiplicities) == self.knot_v_upper) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - -#################### - # ENTITY certification_type # -#################### -class certification_type(BaseEntityClass): - '''Entity certification_type definition. - - :param description - :type description:label - ''' - def __init__( self , description, ): - self.description = description - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,label): - self._description = label(value) - else: - self._description = value - return property(**locals()) - -#################### - # ENTITY oriented_path # -#################### -class oriented_path(path): - '''Entity oriented_path definition. - - :param path_element - :type path_element:path - - :param orientation - :type orientation:BOOLEAN - - :param path_edge_list - :type path_edge_list:LIST(1,None,'oriented_edge', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__edge_list , path_element,orientation, ): - path.__init__(self , inherited0__name , inherited1__edge_list , ) - self.path_element = path_element - self.orientation = orientation - - @apply - def path_element(): - def fget( self ): - return self._path_element - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument path_element is mantatory and can not be set to None') - if not check_type(value,path): - self._path_element = path(value) - else: - self._path_element = value - return property(**locals()) - - @apply - def orientation(): - def fget( self ): - return self._orientation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument orientation is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._orientation = BOOLEAN(value) - else: - self._orientation = value - return property(**locals()) - - @apply - def path_edge_list(): - def fget( self ): - attribute_eval = conditional_reverse(self.self.orientation,self.self.path_element.self.edge_list) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument path_edge_list is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not ('CONFIG_CONTROL_DESIGN.ORIENTED_PATH' == TYPEOF(self.self.path_element))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY security_classification # -#################### -class security_classification(BaseEntityClass): - '''Entity security_classification definition. - - :param name - :type name:label - - :param purpose - :type purpose:text - - :param security_level - :type security_level:security_classification_level - ''' - def __init__( self , name,purpose,security_level, ): - self.name = name - self.purpose = purpose - self.security_level = security_level - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def purpose(): - def fget( self ): - return self._purpose - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument purpose is mantatory and can not be set to None') - if not check_type(value,text): - self._purpose = text(value) - else: - self._purpose = value - return property(**locals()) - - @apply - def security_level(): - def fget( self ): - return self._security_level - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument security_level is mantatory and can not be set to None') - if not check_type(value,security_classification_level): - self._security_level = security_classification_level(value) - else: - self._security_level = value - return property(**locals()) - -#################### - # ENTITY vertex_loop # -#################### -class vertex_loop(loop): - '''Entity vertex_loop definition. - - :param loop_vertex - :type loop_vertex:vertex - ''' - def __init__( self , inherited0__name , loop_vertex, ): - loop.__init__(self , inherited0__name , ) - self.loop_vertex = loop_vertex - - @apply - def loop_vertex(): - def fget( self ): - return self._loop_vertex - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument loop_vertex is mantatory and can not be set to None') - if not check_type(value,vertex): - self._loop_vertex = vertex(value) - else: - self._loop_vertex = value - return property(**locals()) - -#################### - # ENTITY approval_status # -#################### -class approval_status(BaseEntityClass): - '''Entity approval_status definition. - - :param name - :type name:label - ''' - def __init__( self , name, ): - self.name = name - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - -#################### - # ENTITY cartesian_point # -#################### -class cartesian_point(point): - '''Entity cartesian_point definition. - - :param coordinates - :type coordinates:LIST(1,3,'REAL', scope = schema_scope) - ''' - def __init__( self , inherited0__name , coordinates, ): - point.__init__(self , inherited0__name , ) - self.coordinates = coordinates - - @apply - def coordinates(): - def fget( self ): - return self._coordinates - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument coordinates is mantatory and can not be set to None') - if not check_type(value,LIST(1,3,'REAL', scope = schema_scope)): - self._coordinates = LIST(value) - else: - self._coordinates = value - return property(**locals()) - -#################### - # ENTITY date_and_time_assignment # -#################### -class date_and_time_assignment(BaseEntityClass): - '''Entity date_and_time_assignment definition. - - :param assigned_date_and_time - :type assigned_date_and_time:date_and_time - - :param role - :type role:date_time_role - ''' - def __init__( self , assigned_date_and_time,role, ): - self.assigned_date_and_time = assigned_date_and_time - self.role = role - - @apply - def assigned_date_and_time(): - def fget( self ): - return self._assigned_date_and_time - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_date_and_time is mantatory and can not be set to None') - if not check_type(value,date_and_time): - self._assigned_date_and_time = date_and_time(value) - else: - self._assigned_date_and_time = value - return property(**locals()) - - @apply - def role(): - def fget( self ): - return self._role - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument role is mantatory and can not be set to None') - if not check_type(value,date_time_role): - self._role = date_time_role(value) - else: - self._role = value - return property(**locals()) - -#################### - # ENTITY parametric_representation_context # -#################### -class parametric_representation_context(representation_context): - '''Entity parametric_representation_context definition. - ''' - def __init__( self , inherited0__context_identifier , inherited1__context_type , ): - representation_context.__init__(self , inherited0__context_identifier , inherited1__context_type , ) - -#################### - # ENTITY product_concept_context # -#################### -class product_concept_context(application_context_element): - '''Entity product_concept_context definition. - - :param market_segment_type - :type market_segment_type:label - ''' - def __init__( self , inherited0__name , inherited1__frame_of_reference , market_segment_type, ): - application_context_element.__init__(self , inherited0__name , inherited1__frame_of_reference , ) - self.market_segment_type = market_segment_type - - @apply - def market_segment_type(): - def fget( self ): - return self._market_segment_type - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument market_segment_type is mantatory and can not be set to None') - if not check_type(value,label): - self._market_segment_type = label(value) - else: - self._market_segment_type = value - return property(**locals()) - -#################### - # ENTITY surface_patch # -#################### -class surface_patch(founded_item): - '''Entity surface_patch definition. - - :param parent_surface - :type parent_surface:bounded_surface - - :param u_transition - :type u_transition:transition_code - - :param v_transition - :type v_transition:transition_code - - :param u_sense - :type u_sense:BOOLEAN - - :param v_sense - :type v_sense:BOOLEAN - - :param using_surfaces - :type using_surfaces:BAG(1,None,'rectangular_composite_surface', scope = schema_scope) - ''' - def __init__( self , parent_surface,u_transition,v_transition,u_sense,v_sense, ): - founded_item.__init__(self , ) - self.parent_surface = parent_surface - self.u_transition = u_transition - self.v_transition = v_transition - self.u_sense = u_sense - self.v_sense = v_sense - - @apply - def parent_surface(): - def fget( self ): - return self._parent_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument parent_surface is mantatory and can not be set to None') - if not check_type(value,bounded_surface): - self._parent_surface = bounded_surface(value) - else: - self._parent_surface = value - return property(**locals()) - - @apply - def u_transition(): - def fget( self ): - return self._u_transition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u_transition is mantatory and can not be set to None') - if not check_type(value,transition_code): - self._u_transition = transition_code(value) - else: - self._u_transition = value - return property(**locals()) - - @apply - def v_transition(): - def fget( self ): - return self._v_transition - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v_transition is mantatory and can not be set to None') - if not check_type(value,transition_code): - self._v_transition = transition_code(value) - else: - self._v_transition = value - return property(**locals()) - - @apply - def u_sense(): - def fget( self ): - return self._u_sense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument u_sense is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._u_sense = BOOLEAN(value) - else: - self._u_sense = value - return property(**locals()) - - @apply - def v_sense(): - def fget( self ): - return self._v_sense - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument v_sense is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._v_sense = BOOLEAN(value) - else: - self._v_sense = value - return property(**locals()) - - @apply - def using_surfaces(): - def fget( self ): - return self._using_surfaces - def fset( self, value ): - # INVERSE argument - raise AssertionError('Argument using_surfaces is INVERSE. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not ('CONFIG_CONTROL_DESIGN.CURVE_BOUNDED_SURFACE' == TYPEOF(self.parent_surface))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY length_unit # -#################### -class length_unit(named_unit): - '''Entity length_unit definition. - ''' - def __init__( self , inherited0__dimensions , ): - named_unit.__init__(self , inherited0__dimensions , ) - def wr1(self): - eval_wr1_wr = (((((((self.self.named_unit.self.dimensions.self.length_exponent == 1) and (self.self.named_unit.self.dimensions.self.mass_exponent == 0)) and (self.self.named_unit.self.dimensions.self.time_exponent == 0)) and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0)) and (self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent == 0)) and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0)) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY shape_aspect # -#################### -class shape_aspect(BaseEntityClass): - '''Entity shape_aspect definition. - - :param name - :type name:label - - :param description - :type description:text - - :param of_shape - :type of_shape:product_definition_shape - - :param product_definitional - :type product_definitional:LOGICAL - ''' - def __init__( self , name,description,of_shape,product_definitional, ): - self.name = name - self.description = description - self.of_shape = of_shape - self.product_definitional = product_definitional - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def of_shape(): - def fget( self ): - return self._of_shape - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument of_shape is mantatory and can not be set to None') - if not check_type(value,product_definition_shape): - self._of_shape = product_definition_shape(value) - else: - self._of_shape = value - return property(**locals()) - - @apply - def product_definitional(): - def fget( self ): - return self._product_definitional - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument product_definitional is mantatory and can not be set to None') - if not check_type(value,LOGICAL): - self._product_definitional = LOGICAL(value) - else: - self._product_definitional = value - return property(**locals()) - -#################### - # ENTITY volume_measure_with_unit # -#################### -class volume_measure_with_unit(measure_with_unit): - '''Entity volume_measure_with_unit definition. - ''' - def __init__( self , inherited0__value_component , inherited1__unit_component , ): - measure_with_unit.__init__(self , inherited0__value_component , inherited1__unit_component , ) - def wr1(self): - eval_wr1_wr = ('CONFIG_CONTROL_DESIGN.VOLUME_UNIT' == TYPEOF(self.self.measure_with_unit.self.unit_component)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY advanced_face # -#################### -class advanced_face(face_surface): - '''Entity advanced_face definition. - ''' - def __init__( self , inherited0__name , inherited1__bounds , inherited2__name , inherited3__face_geometry , inherited4__same_sense , ): - face_surface.__init__(self , inherited0__name , inherited1__bounds , inherited2__name , inherited3__face_geometry , inherited4__same_sense , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(['CONFIG_CONTROL_DESIGN.ELEMENTARY_SURFACE','CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE','CONFIG_CONTROL_DESIGN.SWEPT_SURFACE'] * TYPEOF(self.face_geometry)) == 1) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) == 0) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (( not ('CONFIG_CONTROL_DESIGN.SWEPT_SURFACE' == TYPEOF(self.face_geometry))) or (SIZEOF(['CONFIG_CONTROL_DESIGN.LINE','CONFIG_CONTROL_DESIGN.CONIC','CONFIG_CONTROL_DESIGN.POLYLINE','CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE'] * TYPEOF(self.face_geometry.self.swept_surface.self.swept_curve)) == 1)) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - def wr7(self): - eval_wr7_wr = (SIZEOF(None) == 0) - if not eval_wr7_wr: - raise AssertionError('Rule wr7 violated') - else: - return eval_wr7_wr - - def wr8(self): - eval_wr8_wr = (SIZEOF(None) == 0) - if not eval_wr8_wr: - raise AssertionError('Rule wr8 violated') - else: - return eval_wr8_wr - - def wr9(self): - eval_wr9_wr = (SIZEOF(None) == 0) - if not eval_wr9_wr: - raise AssertionError('Rule wr9 violated') - else: - return eval_wr9_wr - - def wr10(self): - eval_wr10_wr = (((( not ('CONFIG_CONTROL_DESIGN.SWEPT_SURFACE' == TYPEOF(self.face_geometry))) or ( not ('CONFIG_CONTROL_DESIGN.POLYLINE' == TYPEOF(self.face_geometry.self.swept_surface.self.swept_curve)))) or (SIZEOF(self.face_geometry.self.swept_surface.self.swept_curve.self.polyline.self.points) >= 3)) and (SIZEOF(None) == 0)) - if not eval_wr10_wr: - raise AssertionError('Rule wr10 violated') - else: - return eval_wr10_wr - - -#################### - # ENTITY security_classification_level # -#################### -class security_classification_level(BaseEntityClass): - '''Entity security_classification_level definition. - - :param name - :type name:label - ''' - def __init__( self , name, ): - self.name = name - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - -#################### - # ENTITY approval_relationship # -#################### -class approval_relationship(BaseEntityClass): - '''Entity approval_relationship definition. - - :param name - :type name:label - - :param description - :type description:text - - :param relating_approval - :type relating_approval:approval - - :param related_approval - :type related_approval:approval - ''' - def __init__( self , name,description,relating_approval,related_approval, ): - self.name = name - self.description = description - self.relating_approval = relating_approval - self.related_approval = related_approval - - @apply - def name(): - def fget( self ): - return self._name - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument name is mantatory and can not be set to None') - if not check_type(value,label): - self._name = label(value) - else: - self._name = value - return property(**locals()) - - @apply - def description(): - def fget( self ): - return self._description - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument description is mantatory and can not be set to None') - if not check_type(value,text): - self._description = text(value) - else: - self._description = value - return property(**locals()) - - @apply - def relating_approval(): - def fget( self ): - return self._relating_approval - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument relating_approval is mantatory and can not be set to None') - if not check_type(value,approval): - self._relating_approval = approval(value) - else: - self._relating_approval = value - return property(**locals()) - - @apply - def related_approval(): - def fget( self ): - return self._related_approval - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument related_approval is mantatory and can not be set to None') - if not check_type(value,approval): - self._related_approval = approval(value) - else: - self._related_approval = value - return property(**locals()) - -#################### - # ENTITY polyline # -#################### -class polyline(bounded_curve): - '''Entity polyline definition. - - :param points - :type points:LIST(2,None,'cartesian_point', scope = schema_scope) - ''' - def __init__( self , inherited0__name , points, ): - bounded_curve.__init__(self , inherited0__name , ) - self.points = points - - @apply - def points(): - def fget( self ): - return self._points - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument points is mantatory and can not be set to None') - if not check_type(value,LIST(2,None,'cartesian_point', scope = schema_scope)): - self._points = LIST(value) - else: - self._points = value - return property(**locals()) - -#################### - # ENTITY approval_person_organization # -#################### -class approval_person_organization(BaseEntityClass): - '''Entity approval_person_organization definition. - - :param person_organization - :type person_organization:person_organization_select - - :param authorized_approval - :type authorized_approval:approval - - :param role - :type role:approval_role - ''' - def __init__( self , person_organization,authorized_approval,role, ): - self.person_organization = person_organization - self.authorized_approval = authorized_approval - self.role = role - - @apply - def person_organization(): - def fget( self ): - return self._person_organization - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument person_organization is mantatory and can not be set to None') - if not check_type(value,person_organization_select): - self._person_organization = person_organization_select(value) - else: - self._person_organization = value - return property(**locals()) - - @apply - def authorized_approval(): - def fget( self ): - return self._authorized_approval - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument authorized_approval is mantatory and can not be set to None') - if not check_type(value,approval): - self._authorized_approval = approval(value) - else: - self._authorized_approval = value - return property(**locals()) - - @apply - def role(): - def fget( self ): - return self._role - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument role is mantatory and can not be set to None') - if not check_type(value,approval_role): - self._role = approval_role(value) - else: - self._role = value - return property(**locals()) - -#################### - # ENTITY surface_replica # -#################### -class surface_replica(surface): - '''Entity surface_replica definition. - - :param parent_surface - :type parent_surface:surface - - :param transformation - :type transformation:cartesian_transformation_operator_3d - ''' - def __init__( self , inherited0__name , parent_surface,transformation, ): - surface.__init__(self , inherited0__name , ) - self.parent_surface = parent_surface - self.transformation = transformation - - @apply - def parent_surface(): - def fget( self ): - return self._parent_surface - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument parent_surface is mantatory and can not be set to None') - if not check_type(value,surface): - self._parent_surface = surface(value) - else: - self._parent_surface = value - return property(**locals()) - - @apply - def transformation(): - def fget( self ): - return self._transformation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument transformation is mantatory and can not be set to None') - if not check_type(value,cartesian_transformation_operator_3d): - self._transformation = cartesian_transformation_operator_3d(value) - else: - self._transformation = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = acyclic_surface_replica(self,self.parent_surface) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY security_classification_assignment # -#################### -class security_classification_assignment(BaseEntityClass): - '''Entity security_classification_assignment definition. - - :param assigned_security_classification - :type assigned_security_classification:security_classification - ''' - def __init__( self , assigned_security_classification, ): - self.assigned_security_classification = assigned_security_classification - - @apply - def assigned_security_classification(): - def fget( self ): - return self._assigned_security_classification - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument assigned_security_classification is mantatory and can not be set to None') - if not check_type(value,security_classification): - self._assigned_security_classification = security_classification(value) - else: - self._assigned_security_classification = value - return property(**locals()) - -#################### - # ENTITY cc_design_security_classification # -#################### -class cc_design_security_classification(security_classification_assignment): - '''Entity cc_design_security_classification definition. - - :param items - :type items:SET(1,None,'classified_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_security_classification , items, ): - security_classification_assignment.__init__(self , inherited0__assigned_security_classification , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'classified_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - -#################### - # ENTITY faceted_brep_shape_representation # -#################### -class faceted_brep_shape_representation(shape_representation): - '''Entity faceted_brep_shape_representation definition. - ''' - def __init__( self , inherited0__name , inherited1__items , inherited2__context_of_items , ): - shape_representation.__init__(self , inherited0__name , inherited1__items , inherited2__context_of_items , ) - def wr1(self): - eval_wr1_wr = (SIZEOF(None) == 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = (SIZEOF(None) > 0) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - def wr3(self): - eval_wr3_wr = (SIZEOF(None) == 0) - if not eval_wr3_wr: - raise AssertionError('Rule wr3 violated') - else: - return eval_wr3_wr - - def wr4(self): - eval_wr4_wr = (SIZEOF(None) == 0) - if not eval_wr4_wr: - raise AssertionError('Rule wr4 violated') - else: - return eval_wr4_wr - - def wr5(self): - eval_wr5_wr = (SIZEOF(None) == 0) - if not eval_wr5_wr: - raise AssertionError('Rule wr5 violated') - else: - return eval_wr5_wr - - def wr6(self): - eval_wr6_wr = (SIZEOF(None) == 0) - if not eval_wr6_wr: - raise AssertionError('Rule wr6 violated') - else: - return eval_wr6_wr - - def wr7(self): - eval_wr7_wr = (SIZEOF(None) == 0) - if not eval_wr7_wr: - raise AssertionError('Rule wr7 violated') - else: - return eval_wr7_wr - - -#################### - # ENTITY document_usage_constraint # -#################### -class document_usage_constraint(BaseEntityClass): - '''Entity document_usage_constraint definition. - - :param source - :type source:document - - :param subject_element - :type subject_element:label - - :param subject_element_value - :type subject_element_value:text - ''' - def __init__( self , source,subject_element,subject_element_value, ): - self.source = source - self.subject_element = subject_element - self.subject_element_value = subject_element_value - - @apply - def source(): - def fget( self ): - return self._source - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument source is mantatory and can not be set to None') - if not check_type(value,document): - self._source = document(value) - else: - self._source = value - return property(**locals()) - - @apply - def subject_element(): - def fget( self ): - return self._subject_element - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument subject_element is mantatory and can not be set to None') - if not check_type(value,label): - self._subject_element = label(value) - else: - self._subject_element = value - return property(**locals()) - - @apply - def subject_element_value(): - def fget( self ): - return self._subject_element_value - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument subject_element_value is mantatory and can not be set to None') - if not check_type(value,text): - self._subject_element_value = text(value) - else: - self._subject_element_value = value - return property(**locals()) - -#################### - # ENTITY vertex_point # -#################### -class vertex_point(vertex,geometric_representation_item): - '''Entity vertex_point definition. - - :param vertex_geometry - :type vertex_geometry:point - ''' - def __init__( self , inherited0__name , inherited1__name , vertex_geometry, ): - vertex.__init__(self , inherited0__name , ) - geometric_representation_item.__init__(self , inherited1__name , ) - self.vertex_geometry = vertex_geometry - - @apply - def vertex_geometry(): - def fget( self ): - return self._vertex_geometry - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument vertex_geometry is mantatory and can not be set to None') - if not check_type(value,point): - self._vertex_geometry = point(value) - else: - self._vertex_geometry = value - return property(**locals()) - -#################### - # ENTITY cc_design_date_and_time_assignment # -#################### -class cc_design_date_and_time_assignment(date_and_time_assignment): - '''Entity cc_design_date_and_time_assignment definition. - - :param items - :type items:SET(1,None,'date_time_item', scope = schema_scope) - ''' - def __init__( self , inherited0__assigned_date_and_time , inherited1__role , items, ): - date_and_time_assignment.__init__(self , inherited0__assigned_date_and_time , inherited1__role , ) - self.items = items - - @apply - def items(): - def fget( self ): - return self._items - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument items is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'date_time_item', scope = schema_scope)): - self._items = SET(value) - else: - self._items = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = cc_design_date_time_correlation(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY oriented_closed_shell # -#################### -class oriented_closed_shell(closed_shell): - '''Entity oriented_closed_shell definition. - - :param closed_shell_element - :type closed_shell_element:closed_shell - - :param orientation - :type orientation:BOOLEAN - - :param connected_face_set_cfs_faces - :type connected_face_set_cfs_faces:SET(1,None,'face', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__cfs_faces , closed_shell_element,orientation, ): - closed_shell.__init__(self , inherited0__name , inherited1__cfs_faces , ) - self.closed_shell_element = closed_shell_element - self.orientation = orientation - - @apply - def closed_shell_element(): - def fget( self ): - return self._closed_shell_element - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument closed_shell_element is mantatory and can not be set to None') - if not check_type(value,closed_shell): - self._closed_shell_element = closed_shell(value) - else: - self._closed_shell_element = value - return property(**locals()) - - @apply - def orientation(): - def fget( self ): - return self._orientation - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument orientation is mantatory and can not be set to None') - if not check_type(value,BOOLEAN): - self._orientation = BOOLEAN(value) - else: - self._orientation = value - return property(**locals()) - - @apply - def connected_face_set_cfs_faces(): - def fget( self ): - attribute_eval = conditional_reverse(self.self.orientation,self.self.closed_shell_element.self.cfs_faces) - return attribute_eval - def fset( self, value ): - # DERIVED argument - raise AssertionError('Argument connected_face_set_cfs_faces is DERIVED. It is computed and can not be set to any value') - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not ('CONFIG_CONTROL_DESIGN.ORIENTED_CLOSED_SHELL' == TYPEOF(self.self.closed_shell_element))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY person_and_organization # -#################### -class person_and_organization(BaseEntityClass): - '''Entity person_and_organization definition. - - :param the_person - :type the_person:person - - :param the_organization - :type the_organization:organization - ''' - def __init__( self , the_person,the_organization, ): - self.the_person = the_person - self.the_organization = the_organization - - @apply - def the_person(): - def fget( self ): - return self._the_person - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument the_person is mantatory and can not be set to None') - if not check_type(value,person): - self._the_person = person(value) - else: - self._the_person = value - return property(**locals()) - - @apply - def the_organization(): - def fget( self ): - return self._the_organization - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument the_organization is mantatory and can not be set to None') - if not check_type(value,organization): - self._the_organization = organization(value) - else: - self._the_organization = value - return property(**locals()) - -#################### - # ENTITY cylindrical_surface # -#################### -class cylindrical_surface(elementary_surface): - '''Entity cylindrical_surface definition. - - :param radius - :type radius:positive_length_measure - ''' - def __init__( self , inherited0__name , inherited1__position , radius, ): - elementary_surface.__init__(self , inherited0__name , inherited1__position , ) - self.radius = radius - - @apply - def radius(): - def fget( self ): - return self._radius - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument radius is mantatory and can not be set to None') - if not check_type(value,positive_length_measure): - self._radius = positive_length_measure(value) - else: - self._radius = value - return property(**locals()) - -#################### - # ENTITY local_time # -#################### -class local_time(BaseEntityClass): - '''Entity local_time definition. - - :param hour_component - :type hour_component:hour_in_day - - :param minute_component - :type minute_component:minute_in_hour - - :param second_component - :type second_component:second_in_minute - - :param zone - :type zone:coordinated_universal_time_offset - ''' - def __init__( self , hour_component,minute_component,second_component,zone, ): - self.hour_component = hour_component - self.minute_component = minute_component - self.second_component = second_component - self.zone = zone - - @apply - def hour_component(): - def fget( self ): - return self._hour_component - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument hour_component is mantatory and can not be set to None') - if not check_type(value,hour_in_day): - self._hour_component = hour_in_day(value) - else: - self._hour_component = value - return property(**locals()) - - @apply - def minute_component(): - def fget( self ): - return self._minute_component - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,minute_in_hour): - self._minute_component = minute_in_hour(value) - else: - self._minute_component = value - else: - self._minute_component = value - return property(**locals()) - - @apply - def second_component(): - def fget( self ): - return self._second_component - def fset( self, value ): - if value != None: # OPTIONAL attribute - if not check_type(value,second_in_minute): - self._second_component = second_in_minute(value) - else: - self._second_component = value - else: - self._second_component = value - return property(**locals()) - - @apply - def zone(): - def fget( self ): - return self._zone - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument zone is mantatory and can not be set to None') - if not check_type(value,coordinated_universal_time_offset): - self._zone = coordinated_universal_time_offset(value) - else: - self._zone = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = valid_time(self) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY mass_unit # -#################### -class mass_unit(named_unit): - '''Entity mass_unit definition. - ''' - def __init__( self , inherited0__dimensions , ): - named_unit.__init__(self , inherited0__dimensions , ) - def wr1(self): - eval_wr1_wr = (((((((self.self.named_unit.self.dimensions.self.length_exponent == 0) and (self.self.named_unit.self.dimensions.self.mass_exponent == 1)) and (self.self.named_unit.self.dimensions.self.time_exponent == 0)) and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0)) and (self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent == 0)) and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0)) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY vertex_shell # -#################### -class vertex_shell(topological_representation_item): - '''Entity vertex_shell definition. - - :param vertex_shell_extent - :type vertex_shell_extent:vertex_loop - ''' - def __init__( self , inherited0__name , vertex_shell_extent, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.vertex_shell_extent = vertex_shell_extent - - @apply - def vertex_shell_extent(): - def fget( self ): - return self._vertex_shell_extent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument vertex_shell_extent is mantatory and can not be set to None') - if not check_type(value,vertex_loop): - self._vertex_shell_extent = vertex_loop(value) - else: - self._vertex_shell_extent = value - return property(**locals()) - -#################### - # ENTITY poly_loop # -#################### -class poly_loop(loop,geometric_representation_item): - '''Entity poly_loop definition. - - :param polygon - :type polygon:LIST(3,None,'cartesian_point', scope = schema_scope) - ''' - def __init__( self , inherited0__name , inherited1__name , polygon, ): - loop.__init__(self , inherited0__name , ) - geometric_representation_item.__init__(self , inherited1__name , ) - self.polygon = polygon - - @apply - def polygon(): - def fget( self ): - return self._polygon - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument polygon is mantatory and can not be set to None') - if not check_type(value,LIST(3,None,'cartesian_point', scope = schema_scope)): - self._polygon = LIST(value) - else: - self._polygon = value - return property(**locals()) - -#################### - # ENTITY wire_shell # -#################### -class wire_shell(topological_representation_item): - '''Entity wire_shell definition. - - :param wire_shell_extent - :type wire_shell_extent:SET(1,None,'loop', scope = schema_scope) - ''' - def __init__( self , inherited0__name , wire_shell_extent, ): - topological_representation_item.__init__(self , inherited0__name , ) - self.wire_shell_extent = wire_shell_extent - - @apply - def wire_shell_extent(): - def fget( self ): - return self._wire_shell_extent - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument wire_shell_extent is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'loop', scope = schema_scope)): - self._wire_shell_extent = SET(value) - else: - self._wire_shell_extent = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = ( not mixed_loop_type_set(self.wire_shell_extent)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY area_unit # -#################### -class area_unit(named_unit): - '''Entity area_unit definition. - ''' - def __init__( self , inherited0__dimensions , ): - named_unit.__init__(self , inherited0__dimensions , ) - def wr1(self): - eval_wr1_wr = (((((((self.self.named_unit.self.dimensions.self.length_exponent == 2) and (self.self.named_unit.self.dimensions.self.mass_exponent == 0)) and (self.self.named_unit.self.dimensions.self.time_exponent == 0)) and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0)) and (self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent == 0)) and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0)) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY mapped_item # -#################### -class mapped_item(representation_item): - '''Entity mapped_item definition. - - :param mapping_source - :type mapping_source:representation_map - - :param mapping_target - :type mapping_target:representation_item - ''' - def __init__( self , inherited0__name , mapping_source,mapping_target, ): - representation_item.__init__(self , inherited0__name , ) - self.mapping_source = mapping_source - self.mapping_target = mapping_target - - @apply - def mapping_source(): - def fget( self ): - return self._mapping_source - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument mapping_source is mantatory and can not be set to None') - if not check_type(value,representation_map): - self._mapping_source = representation_map(value) - else: - self._mapping_source = value - return property(**locals()) - - @apply - def mapping_target(): - def fget( self ): - return self._mapping_target - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument mapping_target is mantatory and can not be set to None') - if not check_type(value,representation_item): - self._mapping_target = representation_item(value) - else: - self._mapping_target = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = acyclic_mapped_representation(using_representations(self),[self]) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY shape_definition_representation # -#################### -class shape_definition_representation(property_definition_representation): - '''Entity shape_definition_representation definition. - ''' - def __init__( self , inherited0__definition , inherited1__used_representation , ): - property_definition_representation.__init__(self , inherited0__definition , inherited1__used_representation , ) - def wr1(self): - eval_wr1_wr = (('CONFIG_CONTROL_DESIGN.SHAPE_DEFINITION' == TYPEOF(self.self.definition.self.definition)) or ('CONFIG_CONTROL_DESIGN.PRODUCT_DEFINITION_SHAPE' == TYPEOF(self.self.definition))) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - def wr2(self): - eval_wr2_wr = ('CONFIG_CONTROL_DESIGN.SHAPE_REPRESENTATION' == TYPEOF(self.self.used_representation)) - if not eval_wr2_wr: - raise AssertionError('Rule wr2 violated') - else: - return eval_wr2_wr - - -#################### - # ENTITY volume_unit # -#################### -class volume_unit(named_unit): - '''Entity volume_unit definition. - ''' - def __init__( self , inherited0__dimensions , ): - named_unit.__init__(self , inherited0__dimensions , ) - def wr1(self): - eval_wr1_wr = (((((((self.self.named_unit.self.dimensions.self.length_exponent == 3) and (self.self.named_unit.self.dimensions.self.mass_exponent == 0)) and (self.self.named_unit.self.dimensions.self.time_exponent == 0)) and (self.self.named_unit.self.dimensions.self.electric_current_exponent == 0)) and (self.self.named_unit.self.dimensions.self.thermodynamic_temperature_exponent == 0)) and (self.self.named_unit.self.dimensions.self.amount_of_substance_exponent == 0)) and (self.self.named_unit.self.dimensions.self.luminous_intensity_exponent == 0)) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY conical_surface # -#################### -class conical_surface(elementary_surface): - '''Entity conical_surface definition. - - :param radius - :type radius:length_measure - - :param semi_angle - :type semi_angle:plane_angle_measure - ''' - def __init__( self , inherited0__name , inherited1__position , radius,semi_angle, ): - elementary_surface.__init__(self , inherited0__name , inherited1__position , ) - self.radius = radius - self.semi_angle = semi_angle - - @apply - def radius(): - def fget( self ): - return self._radius - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument radius is mantatory and can not be set to None') - if not check_type(value,length_measure): - self._radius = length_measure(value) - else: - self._radius = value - return property(**locals()) - - @apply - def semi_angle(): - def fget( self ): - return self._semi_angle - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument semi_angle is mantatory and can not be set to None') - if not check_type(value,plane_angle_measure): - self._semi_angle = plane_angle_measure(value) - else: - self._semi_angle = value - return property(**locals()) - def wr1(self): - eval_wr1_wr = (self.radius >= 0) - if not eval_wr1_wr: - raise AssertionError('Rule wr1 violated') - else: - return eval_wr1_wr - - -#################### - # ENTITY global_unit_assigned_context # -#################### -class global_unit_assigned_context(representation_context): - '''Entity global_unit_assigned_context definition. - - :param units - :type units:SET(1,None,'unit', scope = schema_scope) - ''' - def __init__( self , inherited0__context_identifier , inherited1__context_type , units, ): - representation_context.__init__(self , inherited0__context_identifier , inherited1__context_type , ) - self.units = units - - @apply - def units(): - def fget( self ): - return self._units - def fset( self, value ): - # Mandatory argument - if value==None: - raise AssertionError('Argument units is mantatory and can not be set to None') - if not check_type(value,SET(1,None,'unit', scope = schema_scope)): - self._units = SET(value) - else: - self._units = value - return property(**locals()) - -#################### - # FUNCTION build_2axes # -#################### -def build_2axes(ref_direction,): - ''' - :param ref_direction - :type ref_direction:direction - ''' - return [d,orthogonal_complement(d)] - -#################### - # FUNCTION item_in_context # -#################### -def item_in_context(item,cntxt,): - ''' - :param item - :type item:representation_item - :param cntxt - :type cntxt:representation_context - ''' - if (SIZEOF(USEDIN(item,'CONFIG_CONTROL_DESIGN.REPRESENTATION.ITEMS') * cntxt.representations_in_context) > 0): - return TRUE - else: - y = None - if (SIZEOF(y) > 0): - for i in range(1,HIINDEX(y),1): - if (item_in_context(y[i],cntxt)): - return TRUE - return FALSE - -#################### - # FUNCTION gbsf_check_point # -#################### -def gbsf_check_point(pnt,): - ''' - :param pnt - :type pnt:point - ''' - if ('CONFIG_CONTROL_DESIGN.CARTESIAN_POINT' == TYPEOF(pnt)): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.POINT_ON_CURVE' == TYPEOF(pnt)): - return gbsf_check_curve(pnt.point_on_curve.basis_curve) - else: - if ('CONFIG_CONTROL_DESIGN.POINT_ON_SURFACE' == TYPEOF(pnt)): - return gbsf_check_surface(pnt.point_on_surface.basis_surface) - else: - if ('CONFIG_CONTROL_DESIGN.DEGENERATE_PCURVE' == TYPEOF(pnt)): - return gbsf_check_curve(pnt.degenerate_pcurve.reference_to_curve.representation.items[1]) and gbsf_check_surface(pnt.degenerate_pcurve.basis_surface) - return FALSE - -#################### - # FUNCTION build_axes # -#################### -def build_axes(axis,ref_direction,): - ''' - :param axis - :type axis:direction - :param ref_direction - :type ref_direction:direction - ''' - d1 = NVL(normalise(axis),dummy_gri == direction([0,0,1])) - d2 = first_proj_axis(d1,ref_direction) - return [d2,normalise(cross_product(d1,d2)).orientation,d1] - -#################### - # FUNCTION edge_reversed # -#################### -def edge_reversed(an_edge,): - ''' - :param an_edge - :type an_edge:edge - ''' - if ('CONFIG_CONTROL_DESIGN.ORIENTED_EDGE' == TYPEOF(an_edge)): - the_reverse = (dummy_tri == edge(an_edge.edge_end,an_edge.edge_start)) == oriented_edge(an_edge.oriented_edge.edge_element, not an_edge.oriented_edge.orientation) - else: - the_reverse = (dummy_tri == edge(an_edge.edge_end,an_edge.edge_start)) == oriented_edge(an_edge,FALSE) - return the_reverse - -#################### - # FUNCTION cc_design_person_and_organization_correlation # -#################### -def cc_design_person_and_organization_correlation(e,): - ''' - :param e - :type e:cc_design_person_and_organization_assignment - ''' - po_role = e.person_and_organization_assignment.role.name - case_selector = po_role - if case_selector == 'request_recipient': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'initiator': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'creator': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'part_supplier': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'design_supplier': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'design_owner': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'configuration_manager': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'contractor': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'classification_officer': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - else: - return TRUE - return TRUE - -#################### - # FUNCTION constraints_composite_curve_on_surface # -#################### -def constraints_composite_curve_on_surface(c,): - ''' - :param c - :type c:composite_curve_on_surface - ''' - for k in range(1,n_segments,1): - if ((( not ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(c.composite_curve.segments[k].parent_curve))) and ( not ('CONFIG_CONTROL_DESIGN.SURFACE_CURVE' == TYPEOF(c.composite_curve.segments[k].parent_curve)))) and ( not ('CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE_ON_SURFACE' == TYPEOF(c.composite_curve.segments[k].parent_curve)))): - return FALSE - return TRUE - -#################### - # FUNCTION acyclic_mapped_representation # -#################### -def acyclic_mapped_representation(parent_set,children_set,): - ''' - :param parent_set - :type parent_set:(null) - :param children_set - :type children_set:(null) - ''' - x = None - if (SIZEOF(x) > 0): - for i in range(1,HIINDEX(x),1): - if (x[i].mapped_item.mapping_source.mapped_representation == parent_set): - return FALSE - if ( not acyclic_mapped_representation(parent_set + x[i].mapped_item.mapping_source.mapped_representation,x[i].mapped_item.mapping_source.mapped_representation.items)): - return FALSE - x = children_set - x - if (SIZEOF(x) > 0): - for i in range(1,HIINDEX(x),1): - y = None - if ( not acyclic_mapped_representation(parent_set,y)): - return FALSE - return TRUE - -#################### - # FUNCTION conditional_reverse # -#################### -def conditional_reverse(p,an_item,): - ''' - :param p - :type p:BOOLEAN - :param an_item - :type an_item:reversible_topology - ''' - if (p): - return an_item - else: - return topology_reversed(an_item) - -#################### - # FUNCTION valid_measure_value # -#################### -def valid_measure_value(m,): - ''' - :param m - :type m:measure_value - ''' - if ('REAL' == TYPEOF(m)): - return m > 0 - else: - if ('INTEGER' == TYPEOF(m)): - return m > 0 - else: - return TRUE - -#################### - # FUNCTION gbsf_check_curve # -#################### -def gbsf_check_curve(cv,): - ''' - :param cv - :type cv:curve - ''' - if (SIZEOF(['CONFIG_CONTROL_DESIGN.BOUNDED_CURVE','CONFIG_CONTROL_DESIGN.CONIC','CONFIG_CONTROL_DESIGN.CURVE_REPLICA','CONFIG_CONTROL_DESIGN.LINE','CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1): - return FALSE - else: - if (SIZEOF(['CONFIG_CONTROL_DESIGN.CIRCLE','CONFIG_CONTROL_DESIGN.ELLIPSE'] * TYPEOF(cv)) == 1): - return TRUE - else: - if ((('CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE' == TYPEOF(cv)) and (cv.b_spline_curve.self_intersect == FALSE)) or (cv.b_spline_curve.self_intersect == UNKNOWN)): - return TRUE - else: - if ((('CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE' == TYPEOF(cv)) and (cv.composite_curve.self_intersect == FALSE)) or (cv.composite_curve.self_intersect == UNKNOWN)): - return SIZEOF(None) == 0 - else: - if ('CONFIG_CONTROL_DESIGN.CURVE_REPLICA' == TYPEOF(cv)): - return gbsf_check_curve(cv.curve_replica.parent_curve) - else: - if ((('CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D' == TYPEOF(cv)) and ((cv.offset_curve_3d.self_intersect == FALSE) or (cv.offset_curve_3d.self_intersect == UNKNOWN))) and ( not ('CONFIG_CONTROL_DESIGN.POLYLINE' == TYPEOF(cv.basis_curve)))): - return gbsf_check_curve(cv.offset_curve_3d.basis_curve) - else: - if ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(cv)): - return gbsf_check_curve(cv.pcurve.reference_to_curve.representation.items[1]) and gbsf_check_surface(cv.pcurve.basis_surface) - else: - if ('CONFIG_CONTROL_DESIGN.POLYLINE' == TYPEOF(cv)): - if (SIZEOF(cv.polyline.points) >= 3): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.SURFACE_CURVE' == TYPEOF(cv)): - if (gbsf_check_curve(cv.surface_curve.curve_3d)): - for i in range(1,SIZEOF(cv.surface_curve.associated_geometry),1): - if ('CONFIG_CONTROL_DESIGN.SURFACE' == TYPEOF(cv.surface_curve.associated_geometry[i])): - if ( not gbsf_check_surface(cv.surface_curve.associated_geometry[i])): - return FALSE - else: - if ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(cv.surface_curve.associated_geometry[i])): - if ( not gbsf_check_curve(cv.surface_curve.associated_geometry[i])): - return FALSE - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.TRIMMED_CURVE' == TYPEOF(cv)): - if (SIZEOF(['CONFIG_CONTROL_DESIGN.LINE','CONFIG_CONTROL_DESIGN.PARABOLA','CONFIG_CONTROL_DESIGN.HYPERBOLA'] * TYPEOF(cv.trimmed_curve.basis_curve)) == 1): - return TRUE - else: - return gbsf_check_curve(cv.trimmed_curve.basis_curve) - return FALSE - -#################### - # FUNCTION unique_version_change_order # -#################### -def unique_version_change_order(c,): - ''' - :param c - :type c:action - ''' - for i in range(1,SIZEOF(ords.requests),1): - assign = assign + None - for k in range(1,SIZEOF(assign),1): - versions = versions + assign[k].items - return SIZEOF(None) == 0 - -#################### - # FUNCTION base_axis # -#################### -def base_axis(dim,axis1,axis2,axis3,): - ''' - :param dim - :type dim:INTEGER - :param axis1 - :type axis1:direction - :param axis2 - :type axis2:direction - :param axis3 - :type axis3:direction - ''' - if (dim == 3): - d1 = NVL(normalise(axis3),dummy_gri == direction([0,0,1])) - d2 = first_proj_axis(d1,axis1) - u = [d2,second_proj_axis(d1,d2,axis2),d1] - else: - if (EXISTS(axis1)): - d1 = normalise(axis1) - u = [d1,orthogonal_complement(d1)] - if (EXISTS(axis2)): - factor = dot_product(axis2,u[2]) - if (factor < 0): - u[2].direction_ratios[1] = -u[2].direction_ratios[1] - u[2].direction_ratios[2] = -u[2].direction_ratios[2] - else: - if (EXISTS(axis2)): - d1 = normalise(axis2) - u = [orthogonal_complement(d1),d1] - u[1].direction_ratios[1] = -u[1].direction_ratios[1] - u[1].direction_ratios[2] = -u[1].direction_ratios[2] - else: - u = [dummy_gri == direction([1,0]),dummy_gri == direction([0,1])] - return u - -#################### - # FUNCTION get_basis_surface # -#################### -def get_basis_surface(c,): - ''' - :param c - :type c:curve_on_surface - ''' - surfs = [] - if ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(c)): - surfs = [c.pcurve.basis_surface] - else: - if ('CONFIG_CONTROL_DESIGN.SURFACE_CURVE' == TYPEOF(c)): - n = SIZEOF(c.surface_curve.associated_geometry) - for i in range(1,n,1): - surfs = surfs + associated_surface(c.surface_curve.associated_geometry[i]) - if ('CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE_ON_SURFACE' == TYPEOF(c)): - n = SIZEOF(c.composite_curve.segments) - surfs = get_basis_surface(c.composite_curve.segments[1].parent_curve) - if (n > 1): - for i in range(2,n,1): - surfs = surfs * get_basis_surface(c.composite_curve.segments[i].parent_curve) - return surfs - -#################### - # FUNCTION cc_design_date_time_correlation # -#################### -def cc_design_date_time_correlation(e,): - ''' - :param e - :type e:cc_design_date_and_time_assignment - ''' - dt_role = e.date_and_time_assignment.role.name - case_selector = dt_role - if case_selector == 'creation_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'request_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'release_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'start_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'sign_off_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'contract_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'certification_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'classification_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - elif case_selector == 'declassification_date': - if (SIZEOF(e.items) != SIZEOF(None)): - return FALSE - else: - return TRUE - return TRUE - -#################### - # FUNCTION list_face_loops # -#################### -def list_face_loops(f,): - ''' - :param f - :type f:face - ''' - for i in range(1,SIZEOF(f.bounds),1): - loops = loops + f.bounds[i].bound - return loops - -#################### - # FUNCTION list_of_topology_reversed # -#################### -def list_of_topology_reversed(a_list,): - ''' - :param a_list - :type a_list:list_of_reversible_topology_item - ''' - the_reverse = [] - for i in range(1,SIZEOF(a_list),1): - the_reverse = topology_reversed(a_list[i]) + the_reverse - return the_reverse - -#################### - # FUNCTION msf_curve_check # -#################### -def msf_curve_check(cv,): - ''' - :param cv - :type cv:curve - ''' - if (SIZEOF(['CONFIG_CONTROL_DESIGN.BOUNDED_CURVE','CONFIG_CONTROL_DESIGN.CONIC','CONFIG_CONTROL_DESIGN.CURVE_REPLICA','CONFIG_CONTROL_DESIGN.LINE','CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D'] * TYPEOF(cv)) > 1): - return FALSE - else: - if ((('CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE' == TYPEOF(cv)) and (cv.b_spline_curve.self_intersect == FALSE)) or (cv.b_spline_curve.self_intersect == UNKNOWN)): - return TRUE - else: - if (SIZEOF(['CONFIG_CONTROL_DESIGN.CONIC','CONFIG_CONTROL_DESIGN.LINE'] * TYPEOF(cv)) == 1): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.CURVE_REPLICA' == TYPEOF(cv)): - return msf_curve_check(cv.curve_replica.parent_curve) - else: - if ((('CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D' == TYPEOF(cv)) and ((cv.offset_curve_3d.self_intersect == FALSE) or (cv.offset_curve_3d.self_intersect == UNKNOWN))) and ( not ('CONFIG_CONTROL_DESIGN.POLYLINE' == TYPEOF(cv.basis_curve)))): - return msf_curve_check(cv.offset_curve_3d.basis_curve) - else: - if ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(cv)): - return msf_curve_check(cv.pcurve.reference_to_curve.representation.items[1]) and msf_surface_check(cv.pcurve.basis_surface) - else: - if ('CONFIG_CONTROL_DESIGN.SURFACE_CURVE' == TYPEOF(cv)): - if (msf_curve_check(cv.surface_curve.curve_3d)): - for i in range(1,SIZEOF(cv.surface_curve.associated_geometry),1): - if ('CONFIG_CONTROL_DESIGN.SURFACE' == TYPEOF(cv.surface_curve.associated_geometry[i])): - if ( not msf_surface_check(cv.surface_curve.associated_geometry[i])): - return FALSE - else: - if ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(cv.surface_curve.associated_geometry[i])): - if ( not msf_curve_check(cv.surface_curve.associated_geometry[i])): - return FALSE - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.POLYLINE' == TYPEOF(cv)): - if (SIZEOF(cv.polyline.points) >= 3): - return TRUE - return FALSE - -#################### - # FUNCTION shell_reversed # -#################### -def shell_reversed(a_shell,): - ''' - :param a_shell - :type a_shell:shell - ''' - if ('CONFIG_CONTROL_DESIGN.OPEN_SHELL' == TYPEOF(a_shell)): - return open_shell_reversed(a_shell) - else: - if ('CONFIG_CONTROL_DESIGN.CLOSED_SHELL' == TYPEOF(a_shell)): - return closed_shell_reversed(a_shell) - else: - return None - -#################### - # FUNCTION topology_reversed # -#################### -def topology_reversed(an_item,): - ''' - :param an_item - :type an_item:reversible_topology - ''' - if ('CONFIG_CONTROL_DESIGN.EDGE' == TYPEOF(an_item)): - return edge_reversed(an_item) - if ('CONFIG_CONTROL_DESIGN.PATH' == TYPEOF(an_item)): - return path_reversed(an_item) - if ('CONFIG_CONTROL_DESIGN.FACE_BOUND' == TYPEOF(an_item)): - return face_bound_reversed(an_item) - if ('CONFIG_CONTROL_DESIGN.FACE' == TYPEOF(an_item)): - return face_reversed(an_item) - if ('CONFIG_CONTROL_DESIGN.SHELL' == TYPEOF(an_item)): - return shell_reversed(an_item) - if ('SET' == TYPEOF(an_item)): - return set_of_topology_reversed(an_item) - if ('LIST' == TYPEOF(an_item)): - return list_of_topology_reversed(an_item) - return None - -#################### - # FUNCTION first_proj_axis # -#################### -def first_proj_axis(z_axis,arg,): - ''' - :param z_axis - :type z_axis:direction - :param arg - :type arg:direction - ''' - if ( not EXISTS(z_axis)): - return None - else: - z = normalise(z_axis) - if ( not EXISTS(arg)): - if (z.direction_ratios != [1,0,0]): - v = dummy_gri == direction([1,0,0]) - else: - v = dummy_gri == direction([0,1,0]) - else: - if (arg.dim != 3): - return None - if (cross_product(arg,z).magnitude == 0): - return None - else: - v = normalise(arg) - x_vec = scalar_times_vector(dot_product(v,z),z) - x_axis = vector_difference(v,x_vec).orientation - x_axis = normalise(x_axis) - return x_axis - -#################### - # FUNCTION orthogonal_complement # -#################### -def orthogonal_complement(vec,): - ''' - :param vec - :type vec:direction - ''' - if ((vec.dim != 2) or ( not EXISTS(vec))): - return None - else: - result = dummy_gri == direction([-vec.direction_ratios[2],vec.direction_ratios[1]]) - return result - -#################### - # FUNCTION make_array_of_array # -#################### -def make_array_of_array(lis,low1,u1,low2,u2,): - ''' - :param lis - :type lis:(null) - :param low1 - :type low1:INTEGER - :param u1 - :type u1:INTEGER - :param low2 - :type low2:INTEGER - :param u2 - :type u2:INTEGER - ''' - if (((u1 - low1) + 1) != SIZEOF(lis)): - return None - if (((u2 - low2) + 1) != SIZEOF(lis[1])): - return None - res = [list_to_array(lis[1],low2,u2),(u1 - low1) + 1] - for i in range(2,HIINDEX(lis),1): - if (((u2 - low2) + 1) != SIZEOF(lis[i])): - return None - res[(low1 + i) - 1] = list_to_array(lis[i],low2,u2) - return res - -#################### - # FUNCTION second_proj_axis # -#################### -def second_proj_axis(z_axis,x_axis,arg,): - ''' - :param z_axis - :type z_axis:direction - :param x_axis - :type x_axis:direction - :param arg - :type arg:direction - ''' - if ( not EXISTS(arg)): - v = dummy_gri == direction([0,1,0]) - else: - v = arg - temp = scalar_times_vector(dot_product(v,z_axis),z_axis) - y_axis = vector_difference(v,temp) - temp = scalar_times_vector(dot_product(v,x_axis),x_axis) - y_axis = vector_difference(y_axis,temp) - y_axis = normalise(y_axis) - return y_axis.orientation - -#################### - # FUNCTION bag_to_set # -#################### -def bag_to_set(the_bag,): - ''' - :param the_bag - :type the_bag:(null) - ''' - if (SIZEOF(the_bag) > 0): - for i in range(1,HIINDEX(the_bag),1): - the_set = the_set + the_bag[i] - return the_set - -#################### - # FUNCTION valid_wireframe_edge_curve # -#################### -def valid_wireframe_edge_curve(crv,): - ''' - :param crv - :type crv:curve - ''' - if (SIZEOF(['CONFIG_CONTROL_DESIGN.LINE','CONFIG_CONTROL_DESIGN.CONIC','CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE','CONFIG_CONTROL_DESIGN.POLYLINE'] * TYPEOF(crv)) == 1): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.CURVE_REPLICA' == TYPEOF(crv)): - return valid_wireframe_edge_curve(crv.curve_replica.parent_curve) - else: - if ('CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D' == TYPEOF(crv)): - return valid_wireframe_edge_curve(crv.offset_curve_3d.basis_curve) - return FALSE - -#################### - # FUNCTION acyclic_product_category_relationship # -#################### -def acyclic_product_category_relationship(relation,children,): - ''' - :param relation - :type relation:product_category_relationship - :param children - :type children:(null) - ''' - for i in range(1,HIINDEX(children),1): - if (relation.category == children[i]): - return FALSE - x = bag_to_set(USEDIN(relation.category,'CONFIG_CONTROL_DESIGN.' + 'PRODUCT_CATEGORY_RELATIONSHIP.SUB_CATEGORY')) - local_children = children + relation.category - if (SIZEOF(x) > 0): - for i in range(1,HIINDEX(x),1): - if ( not acyclic_product_category_relationship(x[i],local_children)): - return FALSE - return TRUE - -#################### - # FUNCTION surface_weights_positive # -#################### -def surface_weights_positive(b,): - ''' - :param b - :type b:rational_b_spline_surface - ''' - for i in range(0,b.u_upper,1): - for j in range(0,b.v_upper,1): - if (b.weights[i][j] <= 0): - result = FALSE - return result - return result - -#################### - # FUNCTION vector_difference # -#################### -def vector_difference(arg1,arg2,): - ''' - :param arg1 - :type arg1:vector_or_direction - :param arg2 - :type arg2:vector_or_direction - ''' - if ((( not EXISTS(arg1)) or ( not EXISTS(arg2))) or (arg1.dim != arg2.dim)): - return None - else: - # begin/end block - if ('CONFIG_CONTROL_DESIGN.VECTOR' == TYPEOF(arg1)): - mag1 = arg1.magnitude - vec1 = arg1.orientation - else: - mag1 = 1 - vec1 = arg1 - if ('CONFIG_CONTROL_DESIGN.VECTOR' == TYPEOF(arg2)): - mag2 = arg2.magnitude - vec2 = arg2.orientation - else: - mag2 = 1 - vec2 = arg2 - vec1 = normalise(vec1) - vec2 = normalise(vec2) - ndim = SIZEOF(vec1.direction_ratios) - mag = 0 - res = dummy_gri == direction(vec1.direction_ratios) - for i in range(1,ndim,1): - res.direction_ratios[i] = (mag1 * vec1.direction_ratios[i]) + (mag2 * vec2.direction_ratios[i]) - mag = mag + (res.direction_ratios[i] * res.direction_ratios[i]) - if (mag > 0): - result = dummy_gri == vector(res,SQRT(mag)) - else: - result = dummy_gri == vector(vec1,0) - return result - -#################### - # FUNCTION acyclic_product_definition_relationship # -#################### -def acyclic_product_definition_relationship(relation,relatives,specific_relation,): - ''' - :param relation - :type relation:product_definition_relationship - :param relatives - :type relatives:(null) - :param specific_relation - :type specific_relation:STRING - ''' - if (relation.relating_product_definition == relatives): - return FALSE - x = None - for i in range(1,HIINDEX(x),1): - if ( not acyclic_product_definition_relationship(x[i],relatives + relation.relating_product_definition,specific_relation)): - return FALSE - return TRUE - -#################### - # FUNCTION constraints_geometry_shell_based_wireframe_model # -#################### -def constraints_geometry_shell_based_wireframe_model(m,): - ''' - :param m - :type m:shell_based_wireframe_model - ''' - for j in range(1,SIZEOF(m.sbwm_boundary),1): - if (( not ('CONFIG_CONTROL_DESIGN.WIRE_SHELL' == TYPEOF(m.sbwm_boundary[j]))) and ( not ('CONFIG_CONTROL_DESIGN.VERTEX_SHELL' == TYPEOF(m.sbwm_boundary[j])))): - result = FALSE - return result - return result - -#################### - # FUNCTION list_to_set # -#################### -def list_to_set(l,): - ''' - :param l - :type l:(null) - ''' - for i in range(1,SIZEOF(l),1): - s = s + l[i] - return s - -#################### - # FUNCTION valid_calendar_date # -#################### -def valid_calendar_date(date,): - ''' - :param date - :type date:calendar_date - ''' - if ( not ((1 <= date.day_component) and (date.day_component <= 31))): - return FALSE - case_selector = date.month_component - if case_selector == 4: - return (1 <= date.day_component) and (date.day_component <= 30) - elif case_selector == 6: - return (1 <= date.day_component) and (date.day_component <= 30) - elif case_selector == 9: - return (1 <= date.day_component) and (date.day_component <= 30) - elif case_selector == 11: - return (1 <= date.day_component) and (date.day_component <= 30) - elif case_selector == 2: - # begin/end block - if (leap_year(date.year_component)): - return (1 <= date.day_component) and (date.day_component <= 29) - else: - return (1 <= date.day_component) and (date.day_component <= 28) - else: - return TRUE - -#################### - # FUNCTION valid_wireframe_vertex_point # -#################### -def valid_wireframe_vertex_point(pnt,): - ''' - :param pnt - :type pnt:point - ''' - if ('CONFIG_CONTROL_DESIGN.CARTESIAN_POINT' == TYPEOF(pnt)): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.POINT_REPLICA' == TYPEOF(pnt)): - return valid_wireframe_vertex_point(pnt.point_replica.parent_pt) - return FALSE - -#################### - # FUNCTION list_to_array # -#################### -def list_to_array(lis,low,u,): - ''' - :param lis - :type lis:(null) - :param low - :type low:INTEGER - :param u - :type u:INTEGER - ''' - n = SIZEOF(lis) - if (n != ((u - low) + 1)): - return None - else: - res = [lis[1],n] - for i in range(2,n,1): - res[(low + i) - 1] = lis[i] - return res - -#################### - # FUNCTION using_items # -#################### -def using_items(item,checked_items,): - ''' - :param item - :type item:founded_item_select - :param checked_items - :type checked_items:(null) - ''' - result_items = [] - new_check_items = checked_items + item - next_items = None - if (SIZEOF(next_items) > 0): - for i in range(1,HIINDEX(next_items),1): - if ( not (next_items[i] == new_check_items)): - result_items = (result_items + next_items[i]) + using_items(next_items[i],new_check_items) - return result_items - -#################### - # FUNCTION constraints_geometry_shell_based_surface_model # -#################### -def constraints_geometry_shell_based_surface_model(m,): - ''' - :param m - :type m:shell_based_surface_model - ''' - for j in range(1,SIZEOF(m.sbsm_boundary),1): - if (( not ('CONFIG_CONTROL_DESIGN.OPEN_SHELL' == TYPEOF(m.sbsm_boundary[j]))) and ( not ('CONFIG_CONTROL_DESIGN.CLOSED_SHELL' == TYPEOF(m.sbsm_boundary[j])))): - result = FALSE - return result - return result - -#################### - # FUNCTION face_bound_reversed # -#################### -def face_bound_reversed(a_face_bound,): - ''' - :param a_face_bound - :type a_face_bound:face_bound - ''' - if ('CONFIG_CONTROL_DESIGN.FACE_OUTER_BOUND' == TYPEOF(a_face_bound)): - the_reverse = (dummy_tri == face_bound(a_face_bound.face_bound.bound, not a_face_bound.face_bound.orientation)) == face_outer_bound() - else: - the_reverse = dummy_tri == face_bound(a_face_bound.bound, not a_face_bound.orientation) - return the_reverse - -#################### - # FUNCTION set_of_topology_reversed # -#################### -def set_of_topology_reversed(a_set,): - ''' - :param a_set - :type a_set:set_of_reversible_topology_item - ''' - the_reverse = [] - for i in range(1,SIZEOF(a_set),1): - the_reverse = the_reverse + topology_reversed(a_set[i]) - return the_reverse - -#################### - # FUNCTION dimension_of # -#################### -def dimension_of(item,): - ''' - :param item - :type item:geometric_representation_item - ''' - x = using_representations(item) - y = x[1].context_of_items - return y.geometric_representation_context.coordinate_space_dimension - -#################### - # FUNCTION scalar_times_vector # -#################### -def scalar_times_vector(scalar,vec,): - ''' - :param scalar - :type scalar:REAL - :param vec - :type vec:vector_or_direction - ''' - if (( not EXISTS(scalar)) or ( not EXISTS(vec))): - return None - else: - if ('CONFIG_CONTROL_DESIGN.VECTOR' == TYPEOF(vec)): - v = dummy_gri == direction(vec.orientation.direction_ratios) - mag = scalar * vec.magnitude - else: - v = dummy_gri == direction(vec.direction_ratios) - mag = scalar - if (mag < 0): - for i in range(1,SIZEOF(v.direction_ratios),1): - v.direction_ratios[i] = -v.direction_ratios[i] - mag = -mag - result = dummy_gri == vector(normalise(v),mag) - return result - -#################### - # FUNCTION dimensions_for_si_unit # -#################### -def dimensions_for_si_unit(n,): - ''' - :param n - :type n:si_unit_name - ''' - case_selector = n - if case_selector == metre: - return dimensional_exponents(1,0,0,0,0,0,0) - elif case_selector == gram: - return dimensional_exponents(0,1,0,0,0,0,0) - elif case_selector == second: - return dimensional_exponents(0,0,1,0,0,0,0) - elif case_selector == ampere: - return dimensional_exponents(0,0,0,1,0,0,0) - elif case_selector == kelvin: - return dimensional_exponents(0,0,0,0,1,0,0) - elif case_selector == mole: - return dimensional_exponents(0,0,0,0,0,1,0) - elif case_selector == candela: - return dimensional_exponents(0,0,0,0,0,0,1) - elif case_selector == radian: - return dimensional_exponents(0,0,0,0,0,0,0) - elif case_selector == steradian: - return dimensional_exponents(0,0,0,0,0,0,0) - elif case_selector == hertz: - return dimensional_exponents(0,0,-1,0,0,0,0) - elif case_selector == newton: - return dimensional_exponents(1,1,-2,0,0,0,0) - elif case_selector == pascal: - return dimensional_exponents(-1,1,-2,0,0,0,0) - elif case_selector == joule: - return dimensional_exponents(2,1,-2,0,0,0,0) - elif case_selector == watt: - return dimensional_exponents(2,1,-3,0,0,0,0) - elif case_selector == coulomb: - return dimensional_exponents(0,0,1,1,0,0,0) - elif case_selector == volt: - return dimensional_exponents(2,1,-3,-1,0,0,0) - elif case_selector == farad: - return dimensional_exponents(-2,-1,4,1,0,0,0) - elif case_selector == ohm: - return dimensional_exponents(2,1,-3,-2,0,0,0) - elif case_selector == siemens: - return dimensional_exponents(-2,-1,3,2,0,0,0) - elif case_selector == weber: - return dimensional_exponents(2,1,-2,-1,0,0,0) - elif case_selector == tesla: - return dimensional_exponents(0,1,-2,-1,0,0,0) - elif case_selector == henry: - return dimensional_exponents(2,1,-2,-2,0,0,0) - elif case_selector == degree_celsius: - return dimensional_exponents(0,0,0,0,1,0,0) - elif case_selector == lumen: - return dimensional_exponents(0,0,0,0,0,0,1) - elif case_selector == lux: - return dimensional_exponents(-2,0,0,0,0,0,1) - elif case_selector == becquerel: - return dimensional_exponents(0,0,-1,0,0,0,0) - elif case_selector == gray: - return dimensional_exponents(2,0,-2,0,0,0,0) - elif case_selector == sievert: - return dimensional_exponents(2,0,-2,0,0,0,0) - -#################### - # FUNCTION assembly_shape_is_defined # -#################### -def assembly_shape_is_defined(assy,schma,): - ''' - :param assy - :type assy:next_assembly_usage_occurrence - :param schma - :type schma:STRING - ''' - pr1_set = bag_to_set(USEDIN(assy.related_product_definition,schma + '.PROPERTY_DEFINITION.DEFINITION')) - for i in range(1,HIINDEX(pr1_set),1): - sdr_set = sdr_set + None - pdrel_set = bag_to_set(USEDIN(assy.related_product_definition,(schma + '.PRODUCT_DEFINITION_RELATIONSHIP.') + 'RELATED_PRODUCT_DEFINITION')) - for j in range(1,HIINDEX(pdrel_set),1): - pr2_set = pr2_set + USEDIN(pdrel_set[j],schma + '.PROPERTY_DEFINITION.DEFINITION') - for i in range(1,HIINDEX(pr2_set),1): - sdr_set = sdr_set + None - if (SIZEOF(sdr_set) > 0): - for i in range(1,HIINDEX(sdr_set),1): - srr_set = None - if (SIZEOF(srr_set) > 0): - for j in range(1,HIINDEX(srr_set),1): - if (SIZEOF(None * None) >= 1): - if (SIZEOF(None) > 0): - return FALSE - return TRUE - -#################### - # FUNCTION open_shell_reversed # -#################### -def open_shell_reversed(a_shell,): - ''' - :param a_shell - :type a_shell:open_shell - ''' - if ('CONFIG_CONTROL_DESIGN.ORIENTED_OPEN_SHELL' == TYPEOF(a_shell)): - the_reverse = ((dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) == open_shell()) == oriented_open_shell(a_shell.oriented_open_shell.open_shell_element, not a_shell.oriented_open_shell.orientation) - else: - the_reverse = ((dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) == open_shell()) == oriented_open_shell(a_shell,FALSE) - return the_reverse - -#################### - # FUNCTION acyclic_surface_replica # -#################### -def acyclic_surface_replica(rep,parent,): - ''' - :param rep - :type rep:surface_replica - :param parent - :type parent:surface - ''' - if ( not ('CONFIG_CONTROL_DESIGN.SURFACE_REPLICA' == TYPEOF(parent))): - return TRUE - if (parent == rep): - return FALSE - else: - return acyclic_surface_replica(rep,parent.surface_replica.parent_surface) - -#################### - # FUNCTION gbsf_check_surface # -#################### -def gbsf_check_surface(sf,): - ''' - :param sf - :type sf:surface - ''' - if ((('CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE' == TYPEOF(sf)) and (sf.b_spline_surface.self_intersect == FALSE)) or (sf.b_spline_surface.self_intersect == UNKNOWN)): - return TRUE - else: - if (SIZEOF(['CONFIG_CONTROL_DESIGN.SPHERICAL_SURFACE','CONFIG_CONTROL_DESIGN.TOROIDAL_SURFACE'] * TYPEOF(sf)) == 1): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.CURVE_BOUNDED_SURFACE' == TYPEOF(sf)): - if (SIZEOF(['CONFIG_CONTROL_DESIGN.CONICAL_SURFACE','CONFIG_CONTROL_DESIGN.CYLINDRICAL_SURFACE','CONFIG_CONTROL_DESIGN.PLANE'] * TYPEOF(sf.curve_bounded_surface.basis_surface)) == 1): - return SIZEOF(None) == 0 - else: - if (gbsf_check_surface(sf.curve_bounded_surface.basis_surface)): - return SIZEOF(None) == 0 - else: - if ((('CONFIG_CONTROL_DESIGN.OFFSET_SURFACE' == TYPEOF(sf)) and (sf.offset_surface.self_intersect == FALSE)) or (sf.offset_surface.self_intersect == UNKNOWN)): - return gbsf_check_surface(sf.offset_surface.basis_surface) - else: - if ('CONFIG_CONTROL_DESIGN.RECTANGULAR_COMPOSITE_SURFACE' == TYPEOF(sf)): - for i in range(1,SIZEOF(sf.rectangular_composite_surface.segments),1): - for j in range(1,SIZEOF(sf.rectangular_composite_surface.segments[i]),1): - if ( not gbsf_check_surface(sf.rectangular_composite_surface.segments[i][j].parent_surface)): - return FALSE - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.RECTANGULAR_TRIMMED_SURFACE' == TYPEOF(sf)): - if (SIZEOF(['CONFIG_CONTROL_DESIGN.CONICAL_SURFACE','CONFIG_CONTROL_DESIGN.CYLINDRICAL_SURFACE','CONFIG_CONTROL_DESIGN.PLANE'] * TYPEOF(sf.rectangular_trimmed_surface.basis_surface)) == 1): - return TRUE - else: - return gbsf_check_surface(sf.rectangular_trimmed_surface.basis_surface) - else: - if ('CONFIG_CONTROL_DESIGN.SURFACE_REPLICA' == TYPEOF(sf)): - return gbsf_check_surface(sf.surface_replica.parent_surface) - else: - if ('CONFIG_CONTROL_DESIGN.SWEPT_SURFACE' == TYPEOF(sf)): - return gbsf_check_curve(sf.swept_surface.swept_curve) - return FALSE - -#################### - # FUNCTION msf_surface_check # -#################### -def msf_surface_check(surf,): - ''' - :param surf - :type surf:surface - ''' - if ('CONFIG_CONTROL_DESIGN.ELEMENTARY_SURFACE' == TYPEOF(surf)): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.SWEPT_SURFACE' == TYPEOF(surf)): - return msf_curve_check(surf.swept_surface.swept_curve) - else: - if ((('CONFIG_CONTROL_DESIGN.OFFSET_SURFACE' == TYPEOF(surf)) and (surf.offset_surface.self_intersect == FALSE)) or (surf.offset_surface.self_intersect == UNKNOWN)): - return msf_surface_check(surf.offset_surface.basis_surface) - else: - if ('CONFIG_CONTROL_DESIGN.SURFACE_REPLICA' == TYPEOF(surf)): - return msf_surface_check(surf.surface_replica.parent_surface) - else: - if ((('CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE' == TYPEOF(surf)) and (surf.b_spline_surface.self_intersect == FALSE)) or (surf.b_spline_surface.self_intersect == UNKNOWN)): - return TRUE - return FALSE - -#################### - # FUNCTION normalise # -#################### -def normalise(arg,): - ''' - :param arg - :type arg:vector_or_direction - ''' - if ( not EXISTS(arg)): - result = None - else: - ndim = arg.dim - if ('CONFIG_CONTROL_DESIGN.VECTOR' == TYPEOF(arg)): - # begin/end block - v = dummy_gri == direction(arg.orientation.direction_ratios) - if (arg.magnitude == 0): - return None - else: - vec = dummy_gri == vector(v,1) - else: - v = dummy_gri == direction(arg.direction_ratios) - mag = 0 - for i in range(1,ndim,1): - mag = mag + (v.direction_ratios[i] * v.direction_ratios[i]) - if (mag > 0): - mag = SQRT(mag) - for i in range(1,ndim,1): - v.direction_ratios[i] = v.direction_ratios[i] / mag - if ('CONFIG_CONTROL_DESIGN.VECTOR' == TYPEOF(arg)): - vec.orientation = v - result = vec - else: - result = v - else: - return None - return result - -#################### - # FUNCTION msb_shells # -#################### -def msb_shells(brep,): - ''' - :param brep - :type brep:manifold_solid_brep - ''' - if (SIZEOF(None) >= 1): - return brep.brep_with_voids.voids + brep.outer - else: - return [brep.outer] - -#################### - # FUNCTION mixed_loop_type_set # -#################### -def mixed_loop_type_set(l,): - ''' - :param l - :type l:(null) - ''' - if (SIZEOF(l) <= 1): - return FALSE - poly_loop_type = 'CONFIG_CONTROL_DESIGN.POLY_LOOP' == TYPEOF(l[1]) - for i in range(2,SIZEOF(l),1): - if (('CONFIG_CONTROL_DESIGN.POLY_LOOP' == TYPEOF(l[i])) != poly_loop_type): - return TRUE - return FALSE - -#################### - # FUNCTION derive_dimensional_exponents # -#################### -def derive_dimensional_exponents(x,): - ''' - :param x - :type x:unit - ''' - result = x.dimensions - return result - -#################### - # FUNCTION curve_weights_positive # -#################### -def curve_weights_positive(b,): - ''' - :param b - :type b:rational_b_spline_curve - ''' - for i in range(0,b.upper_index_on_control_points,1): - if (b.weights[i] <= 0): - result = FALSE - return result - return result - -#################### - # FUNCTION valid_geometrically_bounded_wf_point # -#################### -def valid_geometrically_bounded_wf_point(pnt,): - ''' - :param pnt - :type pnt:point - ''' - if ('CONFIG_CONTROL_DESIGN.CARTESIAN_POINT' == TYPEOF(pnt)): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.POINT_ON_CURVE' == TYPEOF(pnt)): - return valid_geometrically_bounded_wf_curve(pnt.point_on_curve.basis_curve) - else: - if ('CONFIG_CONTROL_DESIGN.POINT_REPLICA' == TYPEOF(pnt)): - return valid_geometrically_bounded_wf_point(pnt.point_replica.parent_pt) - return FALSE - -#################### - # FUNCTION path_head_to_tail # -#################### -def path_head_to_tail(a_path,): - ''' - :param a_path - :type a_path:path - ''' - n = SIZEOF(a_path.edge_list) - for i in range(2,n,1): - p = p and (a_path.edge_list[i - 1].edge_end == a_path.edge_list[i].edge_start) - return p - -#################### - # FUNCTION path_reversed # -#################### -def path_reversed(a_path,): - ''' - :param a_path - :type a_path:path - ''' - if ('CONFIG_CONTROL_DESIGN.ORIENTED_PATH' == TYPEOF(a_path)): - the_reverse = (dummy_tri == path(list_of_topology_reversed(a_path.edge_list))) == oriented_path(a_path.oriented_path.path_element, not a_path.oriented_path.orientation) - else: - the_reverse = (dummy_tri == path(list_of_topology_reversed(a_path.edge_list))) == oriented_path(a_path,FALSE) - return the_reverse - -#################### - # FUNCTION leap_year # -#################### -def leap_year(year,): - ''' - :param year - :type year:INTEGER - ''' - if ((((year % 4) == 0) and ((year % 100) != 0)) or ((year % 400) == 0)): - return TRUE - else: - return FALSE - -#################### - # FUNCTION face_reversed # -#################### -def face_reversed(a_face,): - ''' - :param a_face - :type a_face:face - ''' - if ('CONFIG_CONTROL_DESIGN.ORIENTED_FACE' == TYPEOF(a_face)): - the_reverse = (dummy_tri == face(set_of_topology_reversed(a_face.bounds))) == oriented_face(a_face.oriented_face.face_element, not a_face.oriented_face.orientation) - else: - the_reverse = (dummy_tri == face(set_of_topology_reversed(a_face.bounds))) == oriented_face(a_face,FALSE) - return the_reverse - -#################### - # FUNCTION constraints_param_b_spline # -#################### -def constraints_param_b_spline(degree,up_knots,up_cp,knot_mult,knots,): - ''' - :param degree - :type degree:INTEGER - :param up_knots - :type up_knots:INTEGER - :param up_cp - :type up_cp:INTEGER - :param knot_mult - :type knot_mult:(null) - :param knots - :type knots:(null) - ''' - sum = knot_mult[1] - for i in range(2,up_knots,1): - sum = sum + knot_mult[i] - if ((((degree < 1) or (up_knots < 2)) or (up_cp < degree)) or (sum != ((degree + up_cp) + 2))): - result = FALSE - return result - k = knot_mult[1] - if ((k < 1) or (k > (degree + 1))): - result = FALSE - return result - for i in range(2,up_knots,1): - if ((knot_mult[i] < 1) or (knots[i] <= knots[i - 1])): - result = FALSE - return result - k = knot_mult[i] - if ((i < up_knots) and (k > degree)): - result = FALSE - return result - if ((i == up_knots) and (k > (degree + 1))): - result = FALSE - return result - return result - -#################### - # FUNCTION using_representations # -#################### -def using_representations(item,): - ''' - :param item - :type item:founded_item_select - ''' - results = [] - result_bag = USEDIN(item,'CONFIG_CONTROL_DESIGN.REPRESENTATION.ITEMS') - if (SIZEOF(result_bag) > 0): - for i in range(1,HIINDEX(result_bag),1): - results = results + result_bag[i] - intermediate_items = using_items(item,[]) - if (SIZEOF(intermediate_items) > 0): - for i in range(1,HIINDEX(intermediate_items),1): - result_bag = USEDIN(intermediate_items[i],'CONFIG_CONTROL_DESIGN.REPRESENTATION.ITEMS') - if (SIZEOF(result_bag) > 0): - for j in range(1,HIINDEX(result_bag),1): - results = results + result_bag[j] - return results - -#################### - # FUNCTION associated_surface # -#################### -def associated_surface(arg,): - ''' - :param arg - :type arg:pcurve_or_surface - ''' - if ('CONFIG_CONTROL_DESIGN.PCURVE' == TYPEOF(arg)): - surf = arg.basis_surface - else: - surf = arg - return surf - -#################### - # FUNCTION acyclic_point_replica # -#################### -def acyclic_point_replica(rep,parent,): - ''' - :param rep - :type rep:point_replica - :param parent - :type parent:point - ''' - if ( not ('CONFIG_CONTROL_DESIGN.POINT_REPLICA' == TYPEOF(parent))): - return TRUE - if (parent == rep): - return FALSE - else: - return acyclic_point_replica(rep,parent.point_replica.parent_pt) - -#################### - # FUNCTION cross_product # -#################### -def cross_product(arg1,arg2,): - ''' - :param arg1 - :type arg1:direction - :param arg2 - :type arg2:direction - ''' - if (((( not EXISTS(arg1)) or (arg1.dim == 2)) or ( not EXISTS(arg2))) or (arg2.dim == 2)): - return None - else: - # begin/end block - v1 = normalise(arg1).direction_ratios - v2 = normalise(arg2).direction_ratios - res = dummy_gri == direction([(v1[2] * v2[3]) - (v1[3] * v2[2]),(v1[3] * v2[1]) - (v1[1] * v2[3]),(v1[1] * v2[2]) - (v1[2] * v2[1])]) - mag = 0 - for i in range(1,3,1): - mag = mag + (res.direction_ratios[i] * res.direction_ratios[i]) - if (mag > 0): - result = dummy_gri == vector(res,SQRT(mag)) - else: - result = dummy_gri == vector(arg1,0) - return result - -#################### - # FUNCTION valid_units # -#################### -def valid_units(m,): - ''' - :param m - :type m:measure_with_unit - ''' - if ('CONFIG_CONTROL_DESIGN.LENGTH_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(1,0,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.MASS_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,1,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.TIME_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,1,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.ELECTRIC_CURRENT_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,1,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.THERMODYNAMIC_TEMPERATURE_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,0,1,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.AMOUNT_OF_SUBSTANCE_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,0,0,1,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.LUMINOUS_INTENSITY_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,0,0,0,1)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.PLANE_ANGLE_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.SOLID_ANGLE_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.AREA_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(2,0,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.VOLUME_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(3,0,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.RATIO_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.POSITIVE_LENGTH_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(1,0,0,0,0,0,0)): - return FALSE - if ('CONFIG_CONTROL_DESIGN.POSITIVE_PLANE_ANGLE_MEASURE' == TYPEOF(m.value_component)): - if (derive_dimensional_exponents(m.unit_component) != dimensional_exponents(0,0,0,0,0,0,0)): - return FALSE - return TRUE - -#################### - # FUNCTION constraints_rectangular_composite_surface # -#################### -def constraints_rectangular_composite_surface(s,): - ''' - :param s - :type s:rectangular_composite_surface - ''' - for i in range(1,s.n_u,1): - for j in range(1,s.n_v,1): - if ( not (('CONFIG_CONTROL_DESIGN.B_SPLINE_SURFACE' == TYPEOF(s.segments[i][j].parent_surface)) or ('CONFIG_CONTROL_DESIGN.RECTANGULAR_TRIMMED_SURFACE' == TYPEOF(s.segments[i][j].parent_surface)))): - return FALSE - for i in range(1,s.n_u - 1,1): - for j in range(1,s.n_v,1): - if (s.segments[i][j].u_transition == discontinuous): - return FALSE - for i in range(1,s.n_u,1): - for j in range(1,s.n_v - 1,1): - if (s.segments[i][j].v_transition == discontinuous): - return FALSE - return TRUE - -#################### - # FUNCTION closed_shell_reversed # -#################### -def closed_shell_reversed(a_shell,): - ''' - :param a_shell - :type a_shell:closed_shell - ''' - if ('CONFIG_CONTROL_DESIGN.ORIENTED_CLOSED_SHELL' == TYPEOF(a_shell)): - the_reverse = ((dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) == closed_shell()) == oriented_closed_shell(a_shell.oriented_closed_shell.closed_shell_element, not a_shell.oriented_closed_shell.orientation) - else: - the_reverse = ((dummy_tri == connected_face_set(a_shell.connected_face_set.cfs_faces)) == closed_shell()) == oriented_closed_shell(a_shell,FALSE) - return the_reverse - -#################### - # FUNCTION boolean_choose # -#################### -def boolean_choose(b,choice1,choice2,): - ''' - :param b - :type b:BOOLEAN - :param choice1 - :type choice1:(null) - :param choice2 - :type choice2:(null) - ''' - if (b): - return choice1 - else: - return choice2 - -#################### - # FUNCTION valid_time # -#################### -def valid_time(time,): - ''' - :param time - :type time:local_time - ''' - if (EXISTS(time.second_component)): - return EXISTS(time.minute_component) - else: - return TRUE - -#################### - # FUNCTION valid_geometrically_bounded_wf_curve # -#################### -def valid_geometrically_bounded_wf_curve(crv,): - ''' - :param crv - :type crv:curve - ''' - if (SIZEOF(['CONFIG_CONTROL_DESIGN.POLYLINE','CONFIG_CONTROL_DESIGN.B_SPLINE_CURVE','CONFIG_CONTROL_DESIGN.ELLIPSE','CONFIG_CONTROL_DESIGN.CIRCLE'] * TYPEOF(crv)) == 1): - return TRUE - else: - if ('CONFIG_CONTROL_DESIGN.TRIMMED_CURVE' == TYPEOF(crv)): - if (SIZEOF(['CONFIG_CONTROL_DESIGN.LINE','CONFIG_CONTROL_DESIGN.PARABOLA','CONFIG_CONTROL_DESIGN.HYPERBOLA'] * TYPEOF(crv.trimmed_curve.basis_curve)) == 1): - return TRUE - else: - return valid_geometrically_bounded_wf_curve(crv.trimmed_curve.basis_curve) - else: - if ('CONFIG_CONTROL_DESIGN.OFFSET_CURVE_3D' == TYPEOF(crv)): - return valid_geometrically_bounded_wf_curve(crv.offset_curve_3d.basis_curve) - else: - if ('CONFIG_CONTROL_DESIGN.CURVE_REPLICA' == TYPEOF(crv)): - return valid_geometrically_bounded_wf_curve(crv.curve_replica.parent_curve) - else: - if ('CONFIG_CONTROL_DESIGN.COMPOSITE_CURVE' == TYPEOF(crv)): - return SIZEOF(None) == 0 - return FALSE - -#################### - # FUNCTION dot_product # -#################### -def dot_product(arg1,arg2,): - ''' - :param arg1 - :type arg1:direction - :param arg2 - :type arg2:direction - ''' - if (( not EXISTS(arg1)) or ( not EXISTS(arg2))): - scalar = None - else: - if (arg1.dim != arg2.dim): - scalar = None - else: - # begin/end block - vec1 = normalise(arg1) - vec2 = normalise(arg2) - ndim = arg1.dim - scalar = 0 - for i in range(1,ndim,1): - scalar = scalar + (vec1.direction_ratios[i] * vec2.direction_ratios[i]) - return scalar - -#################### - # FUNCTION acyclic_curve_replica # -#################### -def acyclic_curve_replica(rep,parent,): - ''' - :param rep - :type rep:curve_replica - :param parent - :type parent:curve - ''' - if ( not ('CONFIG_CONTROL_DESIGN.CURVE_REPLICA' == TYPEOF(parent))): - return TRUE - if (parent == rep): - return FALSE - else: - return acyclic_curve_replica(rep,parent.curve_replica.parent_curve) - -#################### - # RULE change_request_requires_approval # -#################### -change_request_requires_approval = Rule() - -#################### - # RULE restrict_date_time_role # -#################### -restrict_date_time_role = Rule() - -#################### - # RULE versioned_action_request_requires_status # -#################### -versioned_action_request_requires_status = Rule() - -#################### - # RULE acu_requires_security_classification # -#################### -acu_requires_security_classification = Rule() - -#################### - # RULE no_shape_for_supplied_part # -#################### -no_shape_for_supplied_part = Rule() - -#################### - # RULE dependent_instantiable_person_and_organization_role # -#################### -dependent_instantiable_person_and_organization_role = Rule() - -#################### - # RULE product_definition_requires_date_time # -#################### -product_definition_requires_date_time = Rule() - -#################### - # RULE compatible_dimension # -#################### -compatible_dimension = Rule() - -#################### - # RULE product_version_requires_approval # -#################### -product_version_requires_approval = Rule() - -#################### - # RULE change_requires_approval # -#################### -change_requires_approval = Rule() - -#################### - # RULE product_requires_version # -#################### -product_requires_version = Rule() - -#################### - # RULE product_definition_requires_person_organization # -#################### -product_definition_requires_person_organization = Rule() - -#################### - # RULE product_concept_requires_configuration_item # -#################### -product_concept_requires_configuration_item = Rule() - -#################### - # RULE certification_requires_date_time # -#################### -certification_requires_date_time = Rule() - -#################### - # RULE certification_requires_approval # -#################### -certification_requires_approval = Rule() - -#################### - # RULE subtype_mandatory_effectivity # -#################### -subtype_mandatory_effectivity = Rule() - -#################### - # RULE versioned_action_request_requires_solution # -#################### -versioned_action_request_requires_solution = Rule() - -#################### - # RULE effectivity_requires_approval # -#################### -effectivity_requires_approval = Rule() - -#################### - # RULE unique_version_change_order_rule # -#################### -unique_version_change_order_rule = Rule() - -#################### - # RULE dependent_instantiable_named_unit # -#################### -dependent_instantiable_named_unit = Rule() - -#################### - # RULE subtype_mandatory_product_definition_formation # -#################### -subtype_mandatory_product_definition_formation = Rule() - -#################### - # RULE approval_requires_approval_person_organization # -#################### -approval_requires_approval_person_organization = Rule() - -#################### - # RULE approvals_are_assigned # -#################### -approvals_are_assigned = Rule() - -#################### - # RULE start_work_requires_approval # -#################### -start_work_requires_approval = Rule() - -#################### - # RULE approval_person_organization_constraints # -#################### -approval_person_organization_constraints = Rule() - -#################### - # RULE configuration_item_requires_approval # -#################### -configuration_item_requires_approval = Rule() - -#################### - # RULE contract_requires_person_organization # -#################### -contract_requires_person_organization = Rule() - -#################### - # RULE dependent_instantiable_date_time_role # -#################### -dependent_instantiable_date_time_role = Rule() - -#################### - # RULE restrict_product_category_value # -#################### -restrict_product_category_value = Rule() - -#################### - # RULE start_work_requires_date_time # -#################### -start_work_requires_date_time = Rule() - -#################### - # RULE product_requires_product_category # -#################### -product_requires_product_category = Rule() - -#################### - # RULE dependent_instantiable_representation_item # -#################### -dependent_instantiable_representation_item = Rule() - -#################### - # RULE change_request_requires_person_organization # -#################### -change_request_requires_person_organization = Rule() - -#################### - # RULE product_definition_requires_approval # -#################### -product_definition_requires_approval = Rule() - -#################### - # RULE subtype_mandatory_representation_context # -#################### -subtype_mandatory_representation_context = Rule() - -#################### - # RULE security_classification_requires_date_time # -#################### -security_classification_requires_date_time = Rule() - -#################### - # RULE security_classification_optional_date_time # -#################### -security_classification_optional_date_time = Rule() - -#################### - # RULE as_required_quantity # -#################### -as_required_quantity = Rule() - -#################### - # RULE start_request_requires_approval # -#################### -start_request_requires_approval = Rule() - -#################### - # RULE geometric_representation_item_3d # -#################### -geometric_representation_item_3d = Rule() - -#################### - # RULE application_context_requires_ap_definition # -#################### -application_context_requires_ap_definition = Rule() - -#################### - # RULE subtype_mandatory_representation # -#################### -subtype_mandatory_representation = Rule() - -#################### - # RULE change_requires_date_time # -#################### -change_requires_date_time = Rule() - -#################### - # RULE dependent_instantiable_action_directive # -#################### -dependent_instantiable_action_directive = Rule() - -#################### - # RULE restrict_security_classification_level # -#################### -restrict_security_classification_level = Rule() - -#################### - # RULE approval_requires_approval_date_time # -#################### -approval_requires_approval_date_time = Rule() - -#################### - # RULE subtype_mandatory_product_definition_usage # -#################### -subtype_mandatory_product_definition_usage = Rule() - -#################### - # RULE restrict_approval_status # -#################### -restrict_approval_status = Rule() - -#################### - # RULE change_request_requires_date_time # -#################### -change_request_requires_date_time = Rule() - -#################### - # RULE dependent_instantiable_contract_type # -#################### -dependent_instantiable_contract_type = Rule() - -#################### - # RULE contract_requires_approval # -#################### -contract_requires_approval = Rule() - -#################### - # RULE restrict_document_type # -#################### -restrict_document_type = Rule() - -#################### - # RULE dependent_instantiable_certification_type # -#################### -dependent_instantiable_certification_type = Rule() - -#################### - # RULE design_context_for_property # -#################### -design_context_for_property = Rule() - -#################### - # RULE product_version_requires_person_organization # -#################### -product_version_requires_person_organization = Rule() - -#################### - # RULE dependent_instantiable_approval_status # -#################### -dependent_instantiable_approval_status = Rule() - -#################### - # RULE subtype_mandatory_shape_representation # -#################### -subtype_mandatory_shape_representation = Rule() - -#################### - # RULE dependent_instantiable_date # -#################### -dependent_instantiable_date = Rule() - -#################### - # RULE configuration_item_requires_person_organization # -#################### -configuration_item_requires_person_organization = Rule() - -#################### - # RULE dependent_instantiable_document_type # -#################### -dependent_instantiable_document_type = Rule() - -#################### - # RULE restrict_contract_type # -#################### -restrict_contract_type = Rule() - -#################### - # RULE subtype_mandatory_product_context # -#################### -subtype_mandatory_product_context = Rule() - -#################### - # RULE dependent_instantiable_parametric_representation_context # -#################### -dependent_instantiable_parametric_representation_context = Rule() - -#################### - # RULE security_classification_requires_person_organization # -#################### -security_classification_requires_person_organization = Rule() - -#################### - # RULE dependent_instantiable_shape_representation # -#################### -dependent_instantiable_shape_representation = Rule() - -#################### - # RULE restrict_action_request_status # -#################### -restrict_action_request_status = Rule() - -#################### - # RULE restrict_certification_type # -#################### -restrict_certification_type = Rule() - -#################### - # RULE subtype_mandatory_action # -#################### -subtype_mandatory_action = Rule() - -#################### - # RULE product_requires_person_organization # -#################### -product_requires_person_organization = Rule() - -#################### - # RULE product_version_requires_security_classification # -#################### -product_version_requires_security_classification = Rule() - -#################### - # RULE document_to_product_definition # -#################### -document_to_product_definition = Rule() - -#################### - # RULE start_request_requires_date_time # -#################### -start_request_requires_date_time = Rule() - -#################### - # RULE dependent_instantiable_security_classification_level # -#################### -dependent_instantiable_security_classification_level = Rule() - -#################### - # RULE global_unit_assignment # -#################### -global_unit_assignment = Rule() - -#################### - # RULE restrict_person_organization_role # -#################### -restrict_person_organization_role = Rule() - -#################### - # RULE coordinated_assembly_and_shape # -#################### -coordinated_assembly_and_shape = Rule() - -#################### - # RULE start_request_requires_person_organization # -#################### -start_request_requires_person_organization = Rule() - -#################### - # RULE no_shape_for_make_from # -#################### -no_shape_for_make_from = Rule() - -#################### - # RULE approval_date_time_constraints # -#################### -approval_date_time_constraints = Rule() - -#################### - # RULE security_classification_requires_approval # -#################### -security_classification_requires_approval = Rule() diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index 3366f173d1..315a56b2a9 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -23,33 +23,33 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# if OCC_VERSION_HEX < 0x070600 -# include -# endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#if OCC_VERSION_HEX < 0x070600 +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -74,7 +74,8 @@ using BRepAdaptor_HCurve = BRepAdaptor_Curve; //****************************************************************************** // reading -ImpExpDxfRead::ImpExpDxfRead(std::string filepath, App::Document *pcDoc) : CDxfRead(filepath.c_str()) +ImpExpDxfRead::ImpExpDxfRead(std::string filepath, App::Document* pcDoc) + : CDxfRead(filepath.c_str()) { document = pcDoc; setOptionSource("User parameter:BaseApp/Preferences/Mod/Draft"); @@ -83,10 +84,11 @@ ImpExpDxfRead::ImpExpDxfRead(std::string filepath, App::Document *pcDoc) : CDxfR void ImpExpDxfRead::setOptions() { - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(getOptionSource().c_str()); - optionGroupLayers = hGrp->GetBool("groupLayers",false); - optionImportAnnotations = hGrp->GetBool("dxftext",false); - optionScaling = hGrp->GetFloat("dxfScaling",1.0); + ParameterGrp::handle hGrp = + App::GetApplication().GetParameterGroupByPath(getOptionSource().c_str()); + optionGroupLayers = hGrp->GetBool("groupLayers", false); + optionImportAnnotations = hGrp->GetBool("dxftext", false); + optionScaling = hGrp->GetFloat("dxfScaling", 1.0); } gp_Pnt ImpExpDxfRead::makePoint(const double* p) @@ -99,15 +101,16 @@ gp_Pnt ImpExpDxfRead::makePoint(const double* p) sp2 = sp2 * optionScaling; sp3 = sp3 * optionScaling; } - return {sp1,sp2,sp3}; + return {sp1, sp2, sp3}; } void ImpExpDxfRead::OnReadLine(const double* s, const double* e, bool /*hidden*/) { gp_Pnt p0 = makePoint(s); gp_Pnt p1 = makePoint(e); - if (p0.IsEqual(p1,0.00000001)) + if (p0.IsEqual(p1, 0.00000001)) { return; + } BRepBuilderAPI_MakeEdge makeEdge(p0, p1); TopoDS_Edge edge = makeEdge.Edge(); AddObject(new Part::TopoShape(edge)); @@ -122,13 +125,18 @@ void ImpExpDxfRead::OnReadPoint(const double* s) } -void ImpExpDxfRead::OnReadArc(const double* s, const double* e, const double* c, bool dir, bool /*hidden*/) +void ImpExpDxfRead::OnReadArc(const double* s, + const double* e, + const double* c, + bool dir, + bool /*hidden*/) { gp_Pnt p0 = makePoint(s); gp_Pnt p1 = makePoint(e); gp_Dir up(0, 0, 1); - if (!dir) + if (!dir) { up = -up; + } gp_Pnt pc = makePoint(c); gp_Circ circle(gp_Ax2(pc, up), p0.Distance(pc)); if (circle.Radius() > 0) { @@ -146,8 +154,9 @@ void ImpExpDxfRead::OnReadCircle(const double* s, const double* c, bool dir, boo { gp_Pnt p0 = makePoint(s); gp_Dir up(0, 0, 1); - if (!dir) + if (!dir) { up = -up; + } gp_Pnt pc = makePoint(c); gp_Circ circle(gp_Ax2(pc, up), p0.Distance(pc)); if (circle.Radius() > 0) { @@ -164,8 +173,8 @@ void ImpExpDxfRead::OnReadCircle(const double* s, const double* c, bool dir, boo Handle(Geom_BSplineCurve) getSplineFromPolesAndKnots(struct SplineData& sd) { std::size_t numPoles = sd.control_points; - if (sd.controlx.size() > numPoles || sd.controly.size() > numPoles || - sd.controlz.size() > numPoles || sd.weight.size() > numPoles) { + if (sd.controlx.size() > numPoles || sd.controly.size() > numPoles + || sd.controlz.size() > numPoles || sd.weight.size() > numPoles) { return nullptr; } @@ -211,13 +220,14 @@ Handle(Geom_BSplineCurve) getSplineFromPolesAndKnots(struct SplineData& sd) } else { // non-rational - for (int i=occweights.Lower(); i<=occweights.Upper(); i++) { + for (int i = occweights.Lower(); i <= occweights.Upper(); i++) { occweights(i) = 1.0; } } Standard_Boolean periodic = sd.flag == 2; - Handle(Geom_BSplineCurve) geom = new Geom_BSplineCurve(occpoles, occweights, occknots, occmults, sd.degree, periodic); + Handle(Geom_BSplineCurve) geom = + new Geom_BSplineCurve(occpoles, occweights, occknots, occmults, sd.degree, periodic); return geom; } @@ -259,13 +269,16 @@ void ImpExpDxfRead::OnReadSpline(struct SplineData& sd) try { Handle(Geom_BSplineCurve) geom; - if (sd.control_points > 0) + if (sd.control_points > 0) { geom = getSplineFromPolesAndKnots(sd); - else if (sd.fit_points > 0) + } + else if (sd.fit_points > 0) { geom = getInterpolationSpline(sd); + } - if (geom.IsNull()) + if (geom.IsNull()) { throw Standard_Failure(); + } BRepBuilderAPI_MakeEdge makeEdge(geom); TopoDS_Edge edge = makeEdge.Edge(); @@ -277,14 +290,21 @@ void ImpExpDxfRead::OnReadSpline(struct SplineData& sd) } -void ImpExpDxfRead::OnReadEllipse(const double* c, double major_radius, double minor_radius, double rotation, double /*start_angle*/, double /*end_angle*/, bool dir) +void ImpExpDxfRead::OnReadEllipse(const double* c, + double major_radius, + double minor_radius, + double rotation, + double /*start_angle*/, + double /*end_angle*/, + bool dir) { gp_Dir up(0, 0, 1); - if(!dir) + if (!dir) { up = -up; + } gp_Pnt pc = makePoint(c); gp_Elips ellipse(gp_Ax2(pc, up), major_radius * optionScaling, minor_radius * optionScaling); - ellipse.Rotate(gp_Ax1(pc,up),rotation); + ellipse.Rotate(gp_Ax1(pc, up), rotation); if (ellipse.MinorRadius() > 0) { BRepBuilderAPI_MakeEdge makeEdge(ellipse); TopoDS_Edge edge = makeEdge.Edge(); @@ -296,48 +316,61 @@ void ImpExpDxfRead::OnReadEllipse(const double* c, double major_radius, double m } -void ImpExpDxfRead::OnReadText(const double *point, const double /*height*/, const char* text) +void ImpExpDxfRead::OnReadText(const double* point, const double /*height*/, const char* text) { if (optionImportAnnotations) { - Base::Vector3d pt(point[0] * optionScaling, point[1] * optionScaling, point[2] * optionScaling); - if(LayerName().substr(0, 6) != "BLOCKS") { - App::Annotation *pcFeature = static_cast(document->addObject("App::Annotation", "Text")); + Base::Vector3d pt(point[0] * optionScaling, + point[1] * optionScaling, + point[2] * optionScaling); + if (LayerName().substr(0, 6) != "BLOCKS") { + App::Annotation* pcFeature = + static_cast(document->addObject("App::Annotation", "Text")); pcFeature->LabelText.setValue(Deformat(text)); pcFeature->Position.setValue(pt); } - //else std::cout << "skipped text in block: " << LayerName() << std::endl; + // else std::cout << "skipped text in block: " << LayerName() << std::endl; } } -void ImpExpDxfRead::OnReadInsert(const double* point, const double* scale, const char* name, double rotation) +void ImpExpDxfRead::OnReadInsert(const double* point, + const double* scale, + const char* name, + double rotation) { - //std::cout << "Inserting block " << name << " rotation " << rotation << " pos " << point[0] << "," << point[1] << "," << point[2] << " scale " << scale[0] << "," << scale[1] << "," << scale[2] << std::endl; + // std::cout << "Inserting block " << name << " rotation " << rotation << " pos " << point[0] << + // "," << point[1] << "," << point[2] << " scale " << scale[0] << "," << scale[1] << "," << + // scale[2] << std::endl; std::string prefix = "BLOCKS "; prefix += name; prefix += " "; auto checkScale = [=](double v) { return v != 0.0 ? v : 1.0; }; - for(std::map > ::const_iterator i = layers.begin(); i != layers.end(); ++i) { + for (std::map>::const_iterator i = layers.begin(); + i != layers.end(); + ++i) { std::string k = i->first; - if(k.substr(0, prefix.size()) == prefix) { + if (k.substr(0, prefix.size()) == prefix) { BRep_Builder builder; TopoDS_Compound comp; builder.MakeCompound(comp); std::vector v = i->second; - for(std::vector::const_iterator j = v.begin(); j != v.end(); ++j) { + for (std::vector::const_iterator j = v.begin(); j != v.end(); ++j) { const TopoDS_Shape& sh = (*j)->getShape(); - if (!sh.IsNull()) + if (!sh.IsNull()) { builder.Add(comp, sh); + } } if (!comp.IsNull()) { Part::TopoShape* pcomp = new Part::TopoShape(comp); Base::Matrix4D mat; - mat.scale(checkScale(scale[0]),checkScale(scale[1]),checkScale(scale[2])); + mat.scale(checkScale(scale[0]), checkScale(scale[1]), checkScale(scale[2])); mat.rotZ(rotation); - mat.move(point[0]*optionScaling,point[1]*optionScaling,point[2]*optionScaling); - pcomp->transformShape(mat,true); + mat.move(point[0] * optionScaling, + point[1] * optionScaling, + point[2] * optionScaling); + pcomp->transformShape(mat, true); AddObject(pcomp); } } @@ -345,29 +378,43 @@ void ImpExpDxfRead::OnReadInsert(const double* point, const double* scale, const } -void ImpExpDxfRead::OnReadDimension(const double* s, const double* e, const double* point, double /*rotation*/) +void ImpExpDxfRead::OnReadDimension(const double* s, + const double* e, + const double* point, + double /*rotation*/) { if (optionImportAnnotations) { Base::Interpreter().runString("import Draft"); - Base::Interpreter().runStringArg("p1=FreeCAD.Vector(%f,%f,%f)",s[0]*optionScaling,s[1]*optionScaling,s[2]*optionScaling); - Base::Interpreter().runStringArg("p2=FreeCAD.Vector(%f,%f,%f)",e[0]*optionScaling,e[1]*optionScaling,e[2]*optionScaling); - Base::Interpreter().runStringArg("p3=FreeCAD.Vector(%f,%f,%f)",point[0]*optionScaling,point[1]*optionScaling,point[2]*optionScaling); + Base::Interpreter().runStringArg("p1=FreeCAD.Vector(%f,%f,%f)", + s[0] * optionScaling, + s[1] * optionScaling, + s[2] * optionScaling); + Base::Interpreter().runStringArg("p2=FreeCAD.Vector(%f,%f,%f)", + e[0] * optionScaling, + e[1] * optionScaling, + e[2] * optionScaling); + Base::Interpreter().runStringArg("p3=FreeCAD.Vector(%f,%f,%f)", + point[0] * optionScaling, + point[1] * optionScaling, + point[2] * optionScaling); Base::Interpreter().runString("Draft.makeDimension(p1,p2,p3)"); } } -void ImpExpDxfRead::AddObject(Part::TopoShape *shape) +void ImpExpDxfRead::AddObject(Part::TopoShape* shape) { - //std::cout << "layer:" << LayerName() << std::endl; - std::vector vec; - if (layers.count(LayerName())) + // std::cout << "layer:" << LayerName() << std::endl; + std::vector vec; + if (layers.count(LayerName())) { vec = layers[LayerName()]; + } vec.push_back(shape); layers[LayerName()] = vec; if (!optionGroupLayers) { - if(LayerName().substr(0, 6) != "BLOCKS") { - Part::Feature *pcFeature = static_cast(document->addObject("Part::Feature", "Shape")); + if (LayerName().substr(0, 6) != "BLOCKS") { + Part::Feature* pcFeature = + static_cast(document->addObject("Part::Feature", "Shape")); pcFeature->Shape.setValue(shape->getShape()); } } @@ -378,34 +425,35 @@ std::string ImpExpDxfRead::Deformat(const char* text) { // this function removes DXF formatting from texts std::stringstream ss; - bool escape = false; // turned on when finding an escape character - bool longescape = false; // turned on for certain escape codes that expect additional chars - for(unsigned int i = 0; i > ::const_iterator i = layers.begin(); i != layers.end(); ++i) { + for (std::map>::const_iterator i = + layers.begin(); + i != layers.end(); + ++i) { BRep_Builder builder; TopoDS_Compound comp; builder.MakeCompound(comp); std::string k = i->first; - if (k == "0") // FreeCAD doesn't like an object name being '0'... + if (k == "0") { // FreeCAD doesn't like an object name being '0'... k = "LAYER_0"; + } std::vector v = i->second; - if(k.substr(0, 6) != "BLOCKS") { - for(std::vector::const_iterator j = v.begin(); j != v.end(); ++j) { + if (k.substr(0, 6) != "BLOCKS") { + for (std::vector::const_iterator j = v.begin(); j != v.end(); + ++j) { const TopoDS_Shape& sh = (*j)->getShape(); - if (!sh.IsNull()) + if (!sh.IsNull()) { builder.Add(comp, sh); + } } if (!comp.IsNull()) { - Part::Feature *pcFeature = static_cast(document->addObject("Part::Feature", k.c_str())); + Part::Feature* pcFeature = static_cast( + document->addObject("Part::Feature", k.c_str())); pcFeature->Shape.setValue(comp); } } @@ -444,22 +499,22 @@ void ImpExpDxfRead::AddGraphics() const void gPntToTuple(double* result, gp_Pnt& p) { - result[0] = p.X(); - result[1] = p.Y(); - result[2] = p.Z(); + result[0] = p.X(); + result[1] = p.Y(); + result[2] = p.Z(); } point3D gPntTopoint3D(gp_Pnt& p) { - point3D result; - result.x = p.X(); - result.y = p.Y(); - result.z = p.Z(); - return result; + point3D result; + result.x = p.X(); + result.y = p.Y(); + result.z = p.Z(); + return result; } -ImpExpDxfWrite::ImpExpDxfWrite(std::string filepath) : - CDxfWrite(filepath.c_str()) +ImpExpDxfWrite::ImpExpDxfWrite(std::string filepath) + : CDxfWrite(filepath.c_str()) { setOptionSource("User parameter:BaseApp/Preferences/Mod/Import"); setOptions(); @@ -469,20 +524,21 @@ ImpExpDxfWrite::~ImpExpDxfWrite() = default; void ImpExpDxfWrite::setOptions() { - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(getOptionSource().c_str()); - optionMaxLength = hGrp->GetFloat("maxsegmentlength",5.0); - optionExpPoints = hGrp->GetBool("ExportPoints",false); - m_version = hGrp->GetInt("DxfVersionOut",14); - optionPolyLine = hGrp->GetBool("DiscretizeEllipses",false); - m_polyOverride = hGrp->GetBool("DiscretizeEllipses",false); + ParameterGrp::handle hGrp = + App::GetApplication().GetParameterGroupByPath(getOptionSource().c_str()); + optionMaxLength = hGrp->GetFloat("maxsegmentlength", 5.0); + optionExpPoints = hGrp->GetBool("ExportPoints", false); + m_version = hGrp->GetInt("DxfVersionOut", 14); + optionPolyLine = hGrp->GetBool("DiscretizeEllipses", false); + m_polyOverride = hGrp->GetBool("DiscretizeEllipses", false); setDataDir(App::Application::getResourceDir() + "Mod/Import/DxfPlate/"); } void ImpExpDxfWrite::exportShape(const TopoDS_Shape input) { - //export Edges + // export Edges TopExp_Explorer edges(input, TopAbs_EDGE); - for (int i = 1 ; edges.More(); edges.Next(),i++) { + for (int i = 1; edges.More(); edges.Next(), i++) { const TopoDS_Edge& edge = TopoDS::Edge(edges.Current()); BRepAdaptor_Curve adapt(edge); if (adapt.GetType() == GeomAbs_Circle) { @@ -490,100 +546,124 @@ void ImpExpDxfWrite::exportShape(const TopoDS_Shape input) double l = adapt.LastParameter(); gp_Pnt s = adapt.Value(f); gp_Pnt e = adapt.Value(l); - if (fabs(l-f) > 1.0 && s.SquareDistance(e) < 0.001) { + if (fabs(l - f) > 1.0 && s.SquareDistance(e) < 0.001) { exportCircle(adapt); - } else { + } + else { exportArc(adapt); } - } else if (adapt.GetType() == GeomAbs_Ellipse) { + } + else if (adapt.GetType() == GeomAbs_Ellipse) { double f = adapt.FirstParameter(); double l = adapt.LastParameter(); gp_Pnt s = adapt.Value(f); gp_Pnt e = adapt.Value(l); - if (fabs(l-f) > 1.0 && s.SquareDistance(e) < 0.001) { + if (fabs(l - f) > 1.0 && s.SquareDistance(e) < 0.001) { if (m_polyOverride) { if (m_version >= 14) { exportLWPoly(adapt); - } else { //m_version < 14 - exportPolyline(adapt); } - } else if (optionPolyLine) { - if (m_version >= 14) { - exportLWPoly(adapt); - } else { //m_version < 14 + else { // m_version < 14 exportPolyline(adapt); } - } else { //no overrides, do what's right! - if (m_version < 14) { - exportPolyline(adapt); - } else { - exportEllipse(adapt); - } } - } else { // it's an arc + else if (optionPolyLine) { + if (m_version >= 14) { + exportLWPoly(adapt); + } + else { // m_version < 14 + exportPolyline(adapt); + } + } + else { // no overrides, do what's right! + if (m_version < 14) { + exportPolyline(adapt); + } + else { + exportEllipse(adapt); + } + } + } + else { // it's an arc if (m_polyOverride) { if (m_version >= 14) { exportLWPoly(adapt); - } else { //m_version < 14 + } + else { // m_version < 14 exportPolyline(adapt); } - } else if (optionPolyLine) { + } + else if (optionPolyLine) { if (m_version >= 14) { exportLWPoly(adapt); - } else { //m_version < 14 + } + else { // m_version < 14 exportPolyline(adapt); } - } else { //no overrides, do what's right! + } + else { // no overrides, do what's right! if (m_version < 14) { exportPolyline(adapt); - } else { + } + else { exportEllipseArc(adapt); } } } - } else if (adapt.GetType() == GeomAbs_BSplineCurve) { - if (m_polyOverride) { - if (m_version >= 14) { - exportLWPoly(adapt); - } else { //m_version < 14 - exportPolyline(adapt); - } - } else if (optionPolyLine) { - if (m_version >= 14) { - exportLWPoly(adapt); - } else { //m_version < 14 - exportPolyline(adapt); - } - } else { //no overrides, do what's right! - if (m_version < 14) { - exportPolyline(adapt); - } else { - exportBSpline(adapt); - } + } + else if (adapt.GetType() == GeomAbs_BSplineCurve) { + if (m_polyOverride) { + if (m_version >= 14) { + exportLWPoly(adapt); } - } else if (adapt.GetType() == GeomAbs_BezierCurve) { + else { // m_version < 14 + exportPolyline(adapt); + } + } + else if (optionPolyLine) { + if (m_version >= 14) { + exportLWPoly(adapt); + } + else { // m_version < 14 + exportPolyline(adapt); + } + } + else { // no overrides, do what's right! + if (m_version < 14) { + exportPolyline(adapt); + } + else { + exportBSpline(adapt); + } + } + } + else if (adapt.GetType() == GeomAbs_BezierCurve) { exportBCurve(adapt); - } else if (adapt.GetType() == GeomAbs_Line) { + } + else if (adapt.GetType() == GeomAbs_Line) { exportLine(adapt); - } else { - Base::Console().Warning("ImpExpDxf - unknown curve type: %d\n", static_cast(adapt.GetType())); + } + else { + Base::Console().Warning("ImpExpDxf - unknown curve type: %d\n", + static_cast(adapt.GetType())); } } if (optionExpPoints) { TopExp_Explorer verts(input, TopAbs_VERTEX); std::vector duplicates; - for (int i = 1 ; verts.More(); verts.Next(),i++) { + for (int i = 1; verts.More(); verts.Next(), i++) { const TopoDS_Vertex& v = TopoDS::Vertex(verts.Current()); gp_Pnt p = BRep_Tool::Pnt(v); duplicates.push_back(p); } - std::sort(duplicates.begin(),duplicates.end(),ImpExpDxfWrite::gp_PntCompare); - auto newEnd = std::unique(duplicates.begin(),duplicates.end(),ImpExpDxfWrite::gp_PntEqual); - std::vector uniquePts(duplicates.begin(),newEnd); + std::sort(duplicates.begin(), duplicates.end(), ImpExpDxfWrite::gp_PntCompare); + auto newEnd = + std::unique(duplicates.begin(), duplicates.end(), ImpExpDxfWrite::gp_PntEqual); + std::vector uniquePts(duplicates.begin(), newEnd); for (auto& p : uniquePts) { - double point[3] = {0,0,0}; + double point[3] = {0, 0, 0}; gPntToTuple(point, p); writePoint(point); } @@ -593,22 +673,24 @@ void ImpExpDxfWrite::exportShape(const TopoDS_Shape input) bool ImpExpDxfWrite::gp_PntEqual(gp_Pnt p1, gp_Pnt p2) { bool result = false; - if (p1.IsEqual(p2,Precision::Confusion())) { + if (p1.IsEqual(p2, Precision::Confusion())) { result = true; } return result; } -//is p1 "less than" p2? +// is p1 "less than" p2? bool ImpExpDxfWrite::gp_PntCompare(gp_Pnt p1, gp_Pnt p2) { bool result = false; - if (!(p1.IsEqual(p2,Precision::Confusion()))) { //ie v1 != v2 - if (!(fabs(p1.X() - p2.X()) < Precision::Confusion())) { // x1 != x2 + if (!(p1.IsEqual(p2, Precision::Confusion()))) { // ie v1 != v2 + if (!(fabs(p1.X() - p2.X()) < Precision::Confusion())) { // x1 != x2 result = p1.X() < p2.X(); - } else if (!(fabs(p1.Y() - p2.Y()) < Precision::Confusion())) { // y1 != y2 + } + else if (!(fabs(p1.Y() - p2.Y()) < Precision::Confusion())) { // y1 != y2 result = p1.Y() < p2.Y(); - } else { + } + else { result = p1.Z() < p2.Z(); } } @@ -620,10 +702,10 @@ void ImpExpDxfWrite::exportCircle(BRepAdaptor_Curve& c) { gp_Circ circ = c.Circle(); gp_Pnt p = circ.Location(); - double center[3] = {0,0,0}; + double center[3] = {0, 0, 0}; gPntToTuple(center, p); - double radius = circ.Radius(); + double radius = circ.Radius(); writeCircle(center, radius); } @@ -632,26 +714,26 @@ void ImpExpDxfWrite::exportEllipse(BRepAdaptor_Curve& c) { gp_Elips ellp = c.Ellipse(); gp_Pnt p = ellp.Location(); - double center[3] = {0,0,0}; + double center[3] = {0, 0, 0}; gPntToTuple(center, p); double major = ellp.MajorRadius(); double minor = ellp.MinorRadius(); - gp_Dir xaxis = ellp.XAxis().Direction(); //direction of major axis - //rotation appears to be the clockwise(?) angle between major & +Y?? + gp_Dir xaxis = ellp.XAxis().Direction(); // direction of major axis + // rotation appears to be the clockwise(?) angle between major & +Y?? double rotation = xaxis.AngleWithRef(gp_Dir(0, 1, 0), gp_Dir(0, 0, 1)); - //2*M_PI = 6.28319 is invalid(doesn't display in LibreCAD), but 2PI = 6.28318 is valid! - //writeEllipse(center, major, minor, rotation, 0.0, 2 * M_PI, true ); - writeEllipse(center, major, minor, rotation, 0.0, 6.28318, true ); + // 2*M_PI = 6.28319 is invalid(doesn't display in LibreCAD), but 2PI = 6.28318 is valid! + // writeEllipse(center, major, minor, rotation, 0.0, 2 * M_PI, true ); + writeEllipse(center, major, minor, rotation, 0.0, 6.28318, true); } void ImpExpDxfWrite::exportArc(BRepAdaptor_Curve& c) { gp_Circ circ = c.Circle(); gp_Pnt p = circ.Location(); - double center[3] = {0,0,0}; + double center[3] = {0, 0, 0}; gPntToTuple(center, p); double f = c.FirstParameter(); @@ -659,55 +741,55 @@ void ImpExpDxfWrite::exportArc(BRepAdaptor_Curve& c) gp_Pnt s = c.Value(f); double start[3]; gPntToTuple(start, s); - gp_Pnt m = c.Value((l+f)/2.0); + gp_Pnt m = c.Value((l + f) / 2.0); gp_Pnt e = c.Value(l); - double end[3] = {0,0,0}; + double end[3] = {0, 0, 0}; gPntToTuple(end, e); - gp_Vec v1(m,s); - gp_Vec v2(m,e); - gp_Vec v3(0,0,1); - double a = v3.DotCross(v1,v2); + gp_Vec v1(m, s); + gp_Vec v2(m, e); + gp_Vec v3(0, 0, 1); + double a = v3.DotCross(v1, v2); - bool dir = (a < 0) ? true: false; - writeArc(start, end, center, dir ); + bool dir = (a < 0) ? true : false; + writeArc(start, end, center, dir); } void ImpExpDxfWrite::exportEllipseArc(BRepAdaptor_Curve& c) { gp_Elips ellp = c.Ellipse(); gp_Pnt p = ellp.Location(); - double center[3] = {0,0,0}; + double center[3] = {0, 0, 0}; gPntToTuple(center, p); double major = ellp.MajorRadius(); double minor = ellp.MinorRadius(); - gp_Dir xaxis = ellp.XAxis().Direction(); //direction of major axis - //rotation appears to be the clockwise angle between major & +Y?? + gp_Dir xaxis = ellp.XAxis().Direction(); // direction of major axis + // rotation appears to be the clockwise angle between major & +Y?? double rotation = xaxis.AngleWithRef(gp_Dir(0, 1, 0), gp_Dir(0, 0, 1)); double f = c.FirstParameter(); double l = c.LastParameter(); gp_Pnt s = c.Value(f); - gp_Pnt m = c.Value((l+f)/2.0); + gp_Pnt m = c.Value((l + f) / 2.0); gp_Pnt e = c.Value(l); - gp_Vec v1(m,s); - gp_Vec v2(m,e); - gp_Vec v3(0,0,1); - double a = v3.DotCross(v1,v2); // a = v3 dot (v1 cross v2) - // relates to "handedness" of 3 vectors - // a > 0 ==> v2 is CCW from v1 (righthanded)? - // a < 0 ==> v2 is CW from v1 (lefthanded)? + gp_Vec v1(m, s); + gp_Vec v2(m, e); + gp_Vec v3(0, 0, 1); + double a = v3.DotCross(v1, v2); // a = v3 dot (v1 cross v2) + // relates to "handedness" of 3 vectors + // a > 0 ==> v2 is CCW from v1 (righthanded)? + // a < 0 ==> v2 is CW from v1 (lefthanded)? - double startAngle = fmod(f,2.0*M_PI); //revolutions - double endAngle = fmod(l,2.0*M_PI); - bool endIsCW = (a < 0) ? true: false; //if !endIsCW swap(start,end) - //not sure if this is a hack or not. seems to make valid arcs. + double startAngle = fmod(f, 2.0 * M_PI); // revolutions + double endAngle = fmod(l, 2.0 * M_PI); + bool endIsCW = (a < 0) ? true : false; // if !endIsCW swap(start,end) + // not sure if this is a hack or not. seems to make valid arcs. if (!endIsCW) { startAngle = -startAngle; - endAngle = -endAngle; + endAngle = -endAngle; } writeEllipse(center, major, minor, rotation, startAngle, endAngle, endIsCW); @@ -717,8 +799,8 @@ void ImpExpDxfWrite::exportBSpline(BRepAdaptor_Curve& c) { SplineDataOut sd; Handle(Geom_BSplineCurve) spline; - double f,l; - gp_Pnt s,ePt; + double f, l; + gp_Pnt s, ePt; Standard_Real tol3D = 0.001; Standard_Integer maxDegree = 3, maxSegment = 200; @@ -726,71 +808,79 @@ void ImpExpDxfWrite::exportBSpline(BRepAdaptor_Curve& c) Approx_Curve3d approx(hCurve, tol3D, GeomAbs_C0, maxSegment, maxDegree); if (approx.IsDone() && approx.HasResult()) { spline = approx.Curve(); - } else { - if (approx.HasResult()) { //result, but not within tolerance + } + else { + if (approx.HasResult()) { // result, but not within tolerance spline = approx.Curve(); Base::Console().Message("DxfWrite::exportBSpline - result not within tolerance\n"); - } else { + } + else { f = c.FirstParameter(); l = c.LastParameter(); s = c.Value(f); ePt = c.Value(l); - Base::Console().Message("DxfWrite::exportBSpline - no result- from:(%.3f,%.3f) to:(%.3f,%.3f) poles: %d\n", - s.X(),s.Y(),ePt.X(),ePt.Y(),spline->NbPoles()); - TColgp_Array1OfPnt controlPoints(0,1); - controlPoints.SetValue(0,s); - controlPoints.SetValue(1,ePt); - spline = GeomAPI_PointsToBSpline(controlPoints,1).Curve(); + Base::Console().Message( + "DxfWrite::exportBSpline - no result- from:(%.3f,%.3f) to:(%.3f,%.3f) poles: %d\n", + s.X(), + s.Y(), + ePt.X(), + ePt.Y(), + spline->NbPoles()); + TColgp_Array1OfPnt controlPoints(0, 1); + controlPoints.SetValue(0, s); + controlPoints.SetValue(1, ePt); + spline = GeomAPI_PointsToBSpline(controlPoints, 1).Curve(); } } - //WF? norm of surface containing curve?? + // WF? norm of surface containing curve?? sd.norm.x = 0.0; sd.norm.y = 0.0; sd.norm.z = 1.0; sd.flag = spline->IsClosed(); - sd.flag += spline->IsPeriodic()*2; - sd.flag += spline->IsRational()*4; - sd.flag += 8; //planar spline + sd.flag += spline->IsPeriodic() * 2; + sd.flag += spline->IsRational() * 4; + sd.flag += 8; // planar spline sd.degree = spline->Degree(); sd.control_points = spline->NbPoles(); - sd.knots = spline->NbKnots(); + sd.knots = spline->NbKnots(); gp_Pnt p; - spline->D0(spline->FirstParameter(),p); + spline->D0(spline->FirstParameter(), p); sd.starttan = gPntTopoint3D(p); - spline->D0(spline->LastParameter(),p); + spline->D0(spline->LastParameter(), p); sd.endtan = gPntTopoint3D(p); - //next bit is from DrawingExport.cpp (Dan Falk?). + // next bit is from DrawingExport.cpp (Dan Falk?). Standard_Integer m = 0; if (spline->IsPeriodic()) { - m = spline->NbPoles() + 2*spline->Degree() - spline->Multiplicity(1) + 2; + m = spline->NbPoles() + 2 * spline->Degree() - spline->Multiplicity(1) + 2; } else { - for (int i=1; i<= spline->NbKnots(); i++) + for (int i = 1; i <= spline->NbKnots(); i++) { m += spline->Multiplicity(i); + } } - TColStd_Array1OfReal knotsequence(1,m); + TColStd_Array1OfReal knotsequence(1, m); spline->KnotSequence(knotsequence); - for (int i = knotsequence.Lower() ; i <= knotsequence.Upper(); i++) { - sd.knot.push_back(knotsequence(i)); + for (int i = knotsequence.Lower(); i <= knotsequence.Upper(); i++) { + sd.knot.push_back(knotsequence(i)); } sd.knots = knotsequence.Length(); - TColgp_Array1OfPnt poles(1,spline->NbPoles()); + TColgp_Array1OfPnt poles(1, spline->NbPoles()); spline->Poles(poles); for (int i = poles.Lower(); i <= poles.Upper(); i++) { sd.control.push_back(gPntTopoint3D(poles(i))); } - //OCC doesn't have separate lists for control points and fit points. + // OCC doesn't have separate lists for control points and fit points. writeSpline(sd); } void ImpExpDxfWrite::exportBCurve(BRepAdaptor_Curve& c) { - (void) c; + (void)c; Base::Console().Message("BCurve dxf export not yet supported\n"); } @@ -799,10 +889,10 @@ void ImpExpDxfWrite::exportLine(BRepAdaptor_Curve& c) double f = c.FirstParameter(); double l = c.LastParameter(); gp_Pnt s = c.Value(f); - double start[3] = {0,0,0}; + double start[3] = {0, 0, 0}; gPntToTuple(start, s); gp_Pnt e = c.Value(l); - double end[3] = {0,0,0}; + double end[3] = {0, 0, 0}; gPntToTuple(end, e); writeLine(start, end); } @@ -819,15 +909,15 @@ void ImpExpDxfWrite::exportLWPoly(BRepAdaptor_Curve& c) pd.nVert = 0; GCPnts_UniformAbscissa discretizer; - discretizer.Initialize (c, optionMaxLength); + discretizer.Initialize(c, optionMaxLength); std::vector points; - if (discretizer.IsDone () && discretizer.NbPoints () > 0) { - int nbPoints = discretizer.NbPoints (); - for (int i=1; i<=nbPoints; i++) { - gp_Pnt p = c.Value (discretizer.Parameter (i)); + if (discretizer.IsDone() && discretizer.NbPoints() > 0) { + int nbPoints = discretizer.NbPoints(); + for (int i = 1; i <= nbPoints; i++) { + gp_Pnt p = c.Value(discretizer.Parameter(i)); pd.Verts.push_back(gPntTopoint3D(p)); } - pd.nVert = discretizer.NbPoints (); + pd.nVert = discretizer.NbPoints(); writeLWPolyLine(pd); } } @@ -844,26 +934,30 @@ void ImpExpDxfWrite::exportPolyline(BRepAdaptor_Curve& c) pd.nVert = 0; GCPnts_UniformAbscissa discretizer; - discretizer.Initialize (c, optionMaxLength); + discretizer.Initialize(c, optionMaxLength); std::vector points; - if (discretizer.IsDone () && discretizer.NbPoints () > 0) { - int nbPoints = discretizer.NbPoints (); - for (int i=1; i<=nbPoints; i++) { - gp_Pnt p = c.Value (discretizer.Parameter (i)); + if (discretizer.IsDone() && discretizer.NbPoints() > 0) { + int nbPoints = discretizer.NbPoints(); + for (int i = 1; i <= nbPoints; i++) { + gp_Pnt p = c.Value(discretizer.Parameter(i)); pd.Verts.push_back(gPntTopoint3D(p)); } - pd.nVert = discretizer.NbPoints (); + pd.nVert = discretizer.NbPoints(); writePolyline(pd); } } -void ImpExpDxfWrite::exportText(const char* text, Base::Vector3d position1, Base::Vector3d position2, double size, int just) +void ImpExpDxfWrite::exportText(const char* text, + Base::Vector3d position1, + Base::Vector3d position2, + double size, + int just) { - double location1[3] = {0,0,0}; + double location1[3] = {0, 0, 0}; location1[0] = position1.x; location1[1] = position1.y; location1[2] = position1.z; - double location2[3] = {0,0,0}; + double location2[3] = {0, 0, 0}; location2[0] = position2.x; location2[1] = position2.y; location2[2] = position2.z; @@ -871,90 +965,96 @@ void ImpExpDxfWrite::exportText(const char* text, Base::Vector3d position1, Base writeText(text, location1, location2, size, just); } -void ImpExpDxfWrite::exportLinearDim(Base::Vector3d textLocn, Base::Vector3d lineLocn, - Base::Vector3d extLine1Start, Base::Vector3d extLine2Start, - char* dimText, int type) +void ImpExpDxfWrite::exportLinearDim(Base::Vector3d textLocn, + Base::Vector3d lineLocn, + Base::Vector3d extLine1Start, + Base::Vector3d extLine2Start, + char* dimText, + int type) { - double text[3] = {0,0,0}; + double text[3] = {0, 0, 0}; text[0] = textLocn.x; text[1] = textLocn.y; text[2] = textLocn.z; - double line[3] = {0,0,0}; + double line[3] = {0, 0, 0}; line[0] = lineLocn.x; line[1] = lineLocn.y; line[2] = lineLocn.z; - double ext1[3] = {0,0,0}; + double ext1[3] = {0, 0, 0}; ext1[0] = extLine1Start.x; ext1[1] = extLine1Start.y; ext1[2] = extLine1Start.z; - double ext2[3] = {0,0,0}; + double ext2[3] = {0, 0, 0}; ext2[0] = extLine2Start.x; ext2[1] = extLine2Start.y; ext2[2] = extLine2Start.z; - writeLinearDim(text, line, ext1,ext2,dimText, type); + writeLinearDim(text, line, ext1, ext2, dimText, type); } -void ImpExpDxfWrite::exportAngularDim(Base::Vector3d textLocn, Base::Vector3d lineLocn, - Base::Vector3d extLine1End, Base::Vector3d extLine2End, - Base::Vector3d apexPoint, - char* dimText) +void ImpExpDxfWrite::exportAngularDim(Base::Vector3d textLocn, + Base::Vector3d lineLocn, + Base::Vector3d extLine1End, + Base::Vector3d extLine2End, + Base::Vector3d apexPoint, + char* dimText) { - double text[3] = {0,0,0}; + double text[3] = {0, 0, 0}; text[0] = textLocn.x; text[1] = textLocn.y; text[2] = textLocn.z; - double line[3] = {0,0,0}; + double line[3] = {0, 0, 0}; line[0] = lineLocn.x; line[1] = lineLocn.y; line[2] = lineLocn.z; - double ext1[3] = {0,0,0}; + double ext1[3] = {0, 0, 0}; ext1[0] = extLine1End.x; ext1[1] = extLine1End.y; ext1[2] = extLine1End.z; - double ext2[3] = {0,0,0}; + double ext2[3] = {0, 0, 0}; ext2[0] = extLine2End.x; ext2[1] = extLine2End.y; ext2[2] = extLine2End.z; - double apex[3] = {0,0,0}; + double apex[3] = {0, 0, 0}; apex[0] = apexPoint.x; apex[1] = apexPoint.y; apex[2] = apexPoint.z; writeAngularDim(text, line, apex, ext1, apex, ext2, dimText); } -void ImpExpDxfWrite::exportRadialDim(Base::Vector3d centerPoint, Base::Vector3d textLocn, - Base::Vector3d arcPoint, - char* dimText) +void ImpExpDxfWrite::exportRadialDim(Base::Vector3d centerPoint, + Base::Vector3d textLocn, + Base::Vector3d arcPoint, + char* dimText) { - double center[3] = {0,0,0}; + double center[3] = {0, 0, 0}; center[0] = centerPoint.x; center[1] = centerPoint.y; center[2] = centerPoint.z; - double text[3] = {0,0,0}; + double text[3] = {0, 0, 0}; text[0] = textLocn.x; text[1] = textLocn.y; text[2] = textLocn.z; - double arc[3] = {0,0,0}; + double arc[3] = {0, 0, 0}; arc[0] = arcPoint.x; arc[1] = arcPoint.y; arc[2] = arcPoint.z; writeRadialDim(center, text, arc, dimText); - } void ImpExpDxfWrite::exportDiametricDim(Base::Vector3d textLocn, - Base::Vector3d arcPoint1, Base::Vector3d arcPoint2, - char* dimText) + Base::Vector3d arcPoint1, + Base::Vector3d arcPoint2, + char* dimText) { - double text[3] = {0,0,0}; + double text[3] = {0, 0, 0}; text[0] = textLocn.x; text[1] = textLocn.y; text[2] = textLocn.z; - double arc1[3] = {0,0,0}; + double arc1[3] = {0, 0, 0}; arc1[0] = arcPoint1.x; arc1[1] = arcPoint1.y; arc1[2] = arcPoint1.z; - double arc2[3] = {0,0,0}; + double arc2[3] = {0, 0, 0}; arc2[0] = arcPoint2.x; arc2[1] = arcPoint2.y; arc2[2] = arcPoint2.z; diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.h b/src/Mod/Import/App/dxf/ImpExpDxf.h index 17e5f42705..b0f60adbff 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.h +++ b/src/Mod/Import/App/dxf/ImpExpDxf.h @@ -35,90 +35,126 @@ class BRepAdaptor_Curve; namespace Import { - class ImportExport ImpExpDxfRead : public CDxfRead +class ImportExport ImpExpDxfRead: public CDxfRead +{ +public: + ImpExpDxfRead(std::string filepath, App::Document* pcDoc); + + // CDxfRead's virtual functions + void OnReadLine(const double* s, const double* e, bool hidden) override; + void OnReadPoint(const double* s) override; + void OnReadText(const double* point, const double height, const char* text) override; + void + OnReadArc(const double* s, const double* e, const double* c, bool dir, bool hidden) override; + void OnReadCircle(const double* s, const double* c, bool dir, bool hidden) override; + void OnReadEllipse(const double* c, + double major_radius, + double minor_radius, + double rotation, + double start_angle, + double end_angle, + bool dir) override; + void OnReadSpline(struct SplineData& sd) override; + void OnReadInsert(const double* point, + const double* scale, + const char* name, + double rotation) override; + void OnReadDimension(const double* s, + const double* e, + const double* point, + double rotation) override; + void AddGraphics() const override; + + // FreeCAD-specific functions + void AddObject(Part::TopoShape* shape); // Called by OnRead functions to add Part objects + std::string Deformat(const char* text); // Removes DXF formatting from texts + + std::string getOptionSource() { - public: - ImpExpDxfRead(std::string filepath, App::Document *pcDoc); - - // CDxfRead's virtual functions - void OnReadLine(const double* s, const double* e, bool hidden) override; - void OnReadPoint(const double* s) override; - void OnReadText(const double* point, const double height, const char* text) override; - void OnReadArc(const double* s, const double* e, const double* c, bool dir, bool hidden) override; - void OnReadCircle(const double* s, const double* c, bool dir, bool hidden) override; - void OnReadEllipse(const double* c, double major_radius, double minor_radius, double rotation, double start_angle, double end_angle, bool dir) override; - void OnReadSpline(struct SplineData& sd) override; - void OnReadInsert(const double* point, const double* scale, const char* name, double rotation) override; - void OnReadDimension(const double* s, const double* e, const double* point, double rotation) override; - void AddGraphics() const override; - - // FreeCAD-specific functions - void AddObject(Part::TopoShape *shape); //Called by OnRead functions to add Part objects - std::string Deformat(const char* text); // Removes DXF formatting from texts - - std::string getOptionSource() { return m_optionSource; } - void setOptionSource(std::string s) { m_optionSource = s; } - void setOptions(); - - private: - gp_Pnt makePoint(const double* p); - - protected: - App::Document *document; - bool optionGroupLayers; - bool optionImportAnnotations; - double optionScaling; - std::map > layers; - std::string m_optionSource; - }; - - class ImportExport ImpExpDxfWrite : public CDxfWrite + return m_optionSource; + } + void setOptionSource(std::string s) { - public: - explicit ImpExpDxfWrite(std::string filepath); - ~ImpExpDxfWrite(); + m_optionSource = s; + } + void setOptions(); - void exportShape(const TopoDS_Shape input); - std::string getOptionSource() { return m_optionSource; } - void setOptionSource(std::string s) { m_optionSource = s; } - void setOptions(); +private: + gp_Pnt makePoint(const double* p); - void exportText(const char* text, Base::Vector3d position1, Base::Vector3d position2, double size, int just); - void exportLinearDim(Base::Vector3d textLocn, Base::Vector3d lineLocn, - Base::Vector3d extLine1Start, Base::Vector3d extLine2Start, - char* dimText, int type); - void exportAngularDim(Base::Vector3d textLocn, Base::Vector3d lineLocn, - Base::Vector3d extLine1Start, Base::Vector3d extLine2Start, - Base::Vector3d apexPoint, - char* dimText); - void exportRadialDim(Base::Vector3d centerPoint, Base::Vector3d textLocn, - Base::Vector3d arcPoint, - char* dimText); - void exportDiametricDim(Base::Vector3d textLocn, - Base::Vector3d arcPoint1, Base::Vector3d arcPoint2, - char* dimText); +protected: + App::Document* document; + bool optionGroupLayers; + bool optionImportAnnotations; + double optionScaling; + std::map> layers; + std::string m_optionSource; +}; + +class ImportExport ImpExpDxfWrite: public CDxfWrite +{ +public: + explicit ImpExpDxfWrite(std::string filepath); + ~ImpExpDxfWrite(); + + void exportShape(const TopoDS_Shape input); + std::string getOptionSource() + { + return m_optionSource; + } + void setOptionSource(std::string s) + { + m_optionSource = s; + } + void setOptions(); + + void exportText(const char* text, + Base::Vector3d position1, + Base::Vector3d position2, + double size, + int just); + void exportLinearDim(Base::Vector3d textLocn, + Base::Vector3d lineLocn, + Base::Vector3d extLine1Start, + Base::Vector3d extLine2Start, + char* dimText, + int type); + void exportAngularDim(Base::Vector3d textLocn, + Base::Vector3d lineLocn, + Base::Vector3d extLine1Start, + Base::Vector3d extLine2Start, + Base::Vector3d apexPoint, + char* dimText); + void exportRadialDim(Base::Vector3d centerPoint, + Base::Vector3d textLocn, + Base::Vector3d arcPoint, + char* dimText); + void exportDiametricDim(Base::Vector3d textLocn, + Base::Vector3d arcPoint1, + Base::Vector3d arcPoint2, + char* dimText); - static bool gp_PntEqual(gp_Pnt p1, gp_Pnt p2); - static bool gp_PntCompare(gp_Pnt p1, gp_Pnt p2); + static bool gp_PntEqual(gp_Pnt p1, gp_Pnt p2); + static bool gp_PntCompare(gp_Pnt p1, gp_Pnt p2); - protected: - void exportCircle(BRepAdaptor_Curve& c); - void exportEllipse(BRepAdaptor_Curve& c); - void exportArc(BRepAdaptor_Curve& c); - void exportEllipseArc(BRepAdaptor_Curve& c); - void exportBSpline(BRepAdaptor_Curve& c); - void exportBCurve(BRepAdaptor_Curve& c); - void exportLine(BRepAdaptor_Curve& c); - void exportLWPoly(BRepAdaptor_Curve& c); //LWPolyline not supported in R12? - void exportPolyline(BRepAdaptor_Curve& c); +protected: + void exportCircle(BRepAdaptor_Curve& c); + void exportEllipse(BRepAdaptor_Curve& c); + void exportArc(BRepAdaptor_Curve& c); + void exportEllipseArc(BRepAdaptor_Curve& c); + void exportBSpline(BRepAdaptor_Curve& c); + void exportBCurve(BRepAdaptor_Curve& c); + void exportLine(BRepAdaptor_Curve& c); + void exportLWPoly(BRepAdaptor_Curve& c); // LWPolyline not supported in R12? + void exportPolyline(BRepAdaptor_Curve& c); -// std::string m_optionSource; - double optionMaxLength; - bool optionPolyLine; - bool optionExpPoints; - }; + // std::string m_optionSource; + double optionMaxLength; + bool optionPolyLine; + bool optionExpPoints; +}; -} +} // namespace Import -#endif // IMPEXPDXF_H +#endif // IMPEXPDXF_H diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index e25c40c1ab..ce5c44f18b 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -5,7 +5,7 @@ #include "PreCompiled.h" -//required by windows for M_PI definition +// required by windows for M_PI definition #define _USE_MATH_DEFINES #include #include @@ -13,13 +13,13 @@ #include #include +#include "dxf.h" #include #include #include +#include #include #include -#include -#include "dxf.h" using namespace std; @@ -33,32 +33,33 @@ Base::Vector3d toVector3d(const double* a) return result; } -CDxfWrite::CDxfWrite(const char* filepath) : -//TODO: these should probably be parameters in config file -//handles: -//boilerplate 0 - A00 -//used by dxf.cpp A01 - FFFE -//ACAD HANDSEED FFFF +CDxfWrite::CDxfWrite(const char* filepath) + : // TODO: these should probably be parameters in config file + // handles: + // boilerplate 0 - A00 + // used by dxf.cpp A01 - FFFE + // ACAD HANDSEED FFFF -m_handle(0xA00), //room for 2560 handles in boilerplate files -//m_entityHandle(0x300), //don't need special ranges for handles -//m_layerHandle(0x30), -//m_blockHandle(0x210), -//m_blkRecordHandle(0x110), -m_polyOverride(false), -m_layerName("none") + m_handle(0xA00) + , // room for 2560 handles in boilerplate files + // m_entityHandle(0x300), //don't need special ranges for handles + // m_layerHandle(0x30), + // m_blockHandle(0x210), + // m_blkRecordHandle(0x110), + m_polyOverride(false) + , m_layerName("none") { // start the file m_fail = false; m_version = 12; Base::FileInfo fi(filepath); m_ofs = new Base::ofstream(fi, ios::out); - m_ssBlock = new std::ostringstream(); + m_ssBlock = new std::ostringstream(); m_ssBlkRecord = new std::ostringstream(); - m_ssEntity = new std::ostringstream(); - m_ssLayer = new std::ostringstream(); + m_ssEntity = new std::ostringstream(); + m_ssLayer = new std::ostringstream(); - if(!(*m_ofs)){ + if (!(*m_ofs)) { m_fail = true; return; } @@ -93,28 +94,25 @@ void CDxfWrite::endRun() writeEntitiesSection(); writeObjectsSection(); - (*m_ofs) << " 0" << endl; + (*m_ofs) << " 0" << endl; (*m_ofs) << "EOF"; } //*************************** -//writeHeaderSection -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeHeaderSection +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeHeaderSection() { std::stringstream ss; - ss << "FreeCAD v" - << App::Application::Config()["BuildVersionMajor"] - << "." - << App::Application::Config()["BuildVersionMinor"] - << " " - << App::Application::Config()["BuildRevision"]; + ss << "FreeCAD v" << App::Application::Config()["BuildVersionMajor"] << "." + << App::Application::Config()["BuildVersionMinor"] << " " + << App::Application::Config()["BuildRevision"]; - //header & version - (*m_ofs) << "999" << endl; - (*m_ofs) << ss.str() << endl; + // header & version + (*m_ofs) << "999" << endl; + (*m_ofs) << ss.str() << endl; - //static header content + // static header content ss.str(""); ss.clear(); ss << "header" << m_version << ".rub"; @@ -123,15 +121,15 @@ void CDxfWrite::writeHeaderSection() } //*************************** -//writeClassesSection -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeClassesSection +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeClassesSection() { if (m_version < 14) { return; } - //static classes section content + // static classes section content std::stringstream ss; ss << "classes" << m_version << ".rub"; std::string fileSpec = m_dataDir + ss.str(); @@ -139,11 +137,11 @@ void CDxfWrite::writeClassesSection() } //*************************** -//writeTablesSection -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeTablesSection +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeTablesSection() { - //static tables section head end content + // static tables section head end content std::stringstream ss; ss << "tables1" << m_version << ".rub"; std::string fileSpec = m_dataDir + ss.str(); @@ -151,7 +149,7 @@ void CDxfWrite::writeTablesSection() (*m_ofs) << (*m_ssLayer).str(); - //static tables section tail end content + // static tables section tail end content ss.str(""); ss.clear(); ss << "tables2" << m_version << ".rub"; @@ -160,140 +158,140 @@ void CDxfWrite::writeTablesSection() if (m_version > 12) { (*m_ofs) << (*m_ssBlkRecord).str(); - (*m_ofs) << " 0" << endl; - (*m_ofs) << "ENDTAB" << endl; + (*m_ofs) << " 0" << endl; + (*m_ofs) << "ENDTAB" << endl; } - (*m_ofs) << " 0" << endl; - (*m_ofs) << "ENDSEC" << endl; + (*m_ofs) << " 0" << endl; + (*m_ofs) << "ENDSEC" << endl; } //*************************** -//makeLayerTable -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// makeLayerTable +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::makeLayerTable() { std::string tablehash = getLayerHandle(); - (*m_ssLayer) << " 0" << endl; - (*m_ssLayer) << "TABLE" << endl; - (*m_ssLayer) << " 2" << endl; - (*m_ssLayer) << "LAYER" << endl; - (*m_ssLayer) << " 5" << endl; - (*m_ssLayer) << tablehash << endl; + (*m_ssLayer) << " 0" << endl; + (*m_ssLayer) << "TABLE" << endl; + (*m_ssLayer) << " 2" << endl; + (*m_ssLayer) << "LAYER" << endl; + (*m_ssLayer) << " 5" << endl; + (*m_ssLayer) << tablehash << endl; if (m_version > 12) { - (*m_ssLayer) << "330" << endl; - (*m_ssLayer) << 0 << endl; - (*m_ssLayer) << "100" << endl; - (*m_ssLayer) << "AcDbSymbolTable" << endl; + (*m_ssLayer) << "330" << endl; + (*m_ssLayer) << 0 << endl; + (*m_ssLayer) << "100" << endl; + (*m_ssLayer) << "AcDbSymbolTable" << endl; } - (*m_ssLayer) << " 70" << endl; + (*m_ssLayer) << " 70" << endl; (*m_ssLayer) << m_layerList.size() + 1 << endl; - (*m_ssLayer) << " 0" << endl; - (*m_ssLayer) << "LAYER" << endl; - (*m_ssLayer) << " 5" << endl; - (*m_ssLayer) << getLayerHandle() << endl; + (*m_ssLayer) << " 0" << endl; + (*m_ssLayer) << "LAYER" << endl; + (*m_ssLayer) << " 5" << endl; + (*m_ssLayer) << getLayerHandle() << endl; if (m_version > 12) { - (*m_ssLayer) << "330" << endl; - (*m_ssLayer) << tablehash << endl; - (*m_ssLayer) << "100" << endl; - (*m_ssLayer) << "AcDbSymbolTableRecord" << endl; - (*m_ssLayer) << "100" << endl; - (*m_ssLayer) << "AcDbLayerTableRecord" << endl; + (*m_ssLayer) << "330" << endl; + (*m_ssLayer) << tablehash << endl; + (*m_ssLayer) << "100" << endl; + (*m_ssLayer) << "AcDbSymbolTableRecord" << endl; + (*m_ssLayer) << "100" << endl; + (*m_ssLayer) << "AcDbLayerTableRecord" << endl; } - (*m_ssLayer) << " 2" << endl; - (*m_ssLayer) << "0" << endl; - (*m_ssLayer) << " 70" << endl; - (*m_ssLayer) << " 0" << endl; - (*m_ssLayer) << " 62" << endl; - (*m_ssLayer) << " 7" << endl; - (*m_ssLayer) << " 6" << endl; + (*m_ssLayer) << " 2" << endl; + (*m_ssLayer) << "0" << endl; + (*m_ssLayer) << " 70" << endl; + (*m_ssLayer) << " 0" << endl; + (*m_ssLayer) << " 62" << endl; + (*m_ssLayer) << " 7" << endl; + (*m_ssLayer) << " 6" << endl; (*m_ssLayer) << "CONTINUOUS" << endl; for (auto& l : m_layerList) { - (*m_ssLayer) << " 0" << endl; - (*m_ssLayer) << "LAYER" << endl; - (*m_ssLayer) << " 5" << endl; + (*m_ssLayer) << " 0" << endl; + (*m_ssLayer) << "LAYER" << endl; + (*m_ssLayer) << " 5" << endl; (*m_ssLayer) << getLayerHandle() << endl; if (m_version > 12) { - (*m_ssLayer) << "330" << endl; - (*m_ssLayer) << tablehash << endl; - (*m_ssLayer) << "100" << endl; - (*m_ssLayer) << "AcDbSymbolTableRecord" << endl; - (*m_ssLayer) << "100" << endl; - (*m_ssLayer) << "AcDbLayerTableRecord" << endl; + (*m_ssLayer) << "330" << endl; + (*m_ssLayer) << tablehash << endl; + (*m_ssLayer) << "100" << endl; + (*m_ssLayer) << "AcDbSymbolTableRecord" << endl; + (*m_ssLayer) << "100" << endl; + (*m_ssLayer) << "AcDbLayerTableRecord" << endl; } - (*m_ssLayer) << " 2" << endl; + (*m_ssLayer) << " 2" << endl; (*m_ssLayer) << l << endl; - (*m_ssLayer) << " 70" << endl; - (*m_ssLayer) << " 0" << endl; - (*m_ssLayer) << " 62" << endl; - (*m_ssLayer) << " 7" << endl; - (*m_ssLayer) << " 6" << endl; - (*m_ssLayer) << "CONTINUOUS" << endl; + (*m_ssLayer) << " 70" << endl; + (*m_ssLayer) << " 0" << endl; + (*m_ssLayer) << " 62" << endl; + (*m_ssLayer) << " 7" << endl; + (*m_ssLayer) << " 6" << endl; + (*m_ssLayer) << "CONTINUOUS" << endl; } - (*m_ssLayer) << " 0" << endl; - (*m_ssLayer) << "ENDTAB" << endl; + (*m_ssLayer) << " 0" << endl; + (*m_ssLayer) << "ENDTAB" << endl; } //*************************** -//makeBlockRecordTableHead -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// makeBlockRecordTableHead +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::makeBlockRecordTableHead() { if (m_version < 14) { return; } - std::string tablehash = getBlkRecordHandle(); - m_saveBlockRecordTableHandle = tablehash; - (*m_ssBlkRecord) << " 0" << endl; - (*m_ssBlkRecord) << "TABLE" << endl; - (*m_ssBlkRecord) << " 2" << endl; - (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; - (*m_ssBlkRecord) << " 5" << endl; - (*m_ssBlkRecord) << tablehash << endl; - (*m_ssBlkRecord) << "330" << endl; - (*m_ssBlkRecord) << "0" << endl; - (*m_ssBlkRecord) << "100" << endl; - (*m_ssBlkRecord) << "AcDbSymbolTable" << endl; - (*m_ssBlkRecord) << " 70" << endl; - (*m_ssBlkRecord) << (m_blockList.size() + 5) << endl; + std::string tablehash = getBlkRecordHandle(); + m_saveBlockRecordTableHandle = tablehash; + (*m_ssBlkRecord) << " 0" << endl; + (*m_ssBlkRecord) << "TABLE" << endl; + (*m_ssBlkRecord) << " 2" << endl; + (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; + (*m_ssBlkRecord) << " 5" << endl; + (*m_ssBlkRecord) << tablehash << endl; + (*m_ssBlkRecord) << "330" << endl; + (*m_ssBlkRecord) << "0" << endl; + (*m_ssBlkRecord) << "100" << endl; + (*m_ssBlkRecord) << "AcDbSymbolTable" << endl; + (*m_ssBlkRecord) << " 70" << endl; + (*m_ssBlkRecord) << (m_blockList.size() + 5) << endl; - m_saveModelSpaceHandle = getBlkRecordHandle(); - (*m_ssBlkRecord) << " 0" << endl; - (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; - (*m_ssBlkRecord) << " 5" << endl; - (*m_ssBlkRecord) << m_saveModelSpaceHandle << endl; - (*m_ssBlkRecord) << "330" << endl; - (*m_ssBlkRecord) << tablehash << endl; - (*m_ssBlkRecord) << "100" << endl; - (*m_ssBlkRecord) << "AcDbSymbolTableRecord" << endl; - (*m_ssBlkRecord) << "100" << endl; - (*m_ssBlkRecord) << "AcDbBlockTableRecord" << endl; - (*m_ssBlkRecord) << " 2" << endl; - (*m_ssBlkRecord) << "*MODEL_SPACE" << endl; -// (*m_ssBlkRecord) << " 1" << endl; -// (*m_ssBlkRecord) << " " << endl; + m_saveModelSpaceHandle = getBlkRecordHandle(); + (*m_ssBlkRecord) << " 0" << endl; + (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; + (*m_ssBlkRecord) << " 5" << endl; + (*m_ssBlkRecord) << m_saveModelSpaceHandle << endl; + (*m_ssBlkRecord) << "330" << endl; + (*m_ssBlkRecord) << tablehash << endl; + (*m_ssBlkRecord) << "100" << endl; + (*m_ssBlkRecord) << "AcDbSymbolTableRecord" << endl; + (*m_ssBlkRecord) << "100" << endl; + (*m_ssBlkRecord) << "AcDbBlockTableRecord" << endl; + (*m_ssBlkRecord) << " 2" << endl; + (*m_ssBlkRecord) << "*MODEL_SPACE" << endl; + // (*m_ssBlkRecord) << " 1" << endl; + // (*m_ssBlkRecord) << " " << endl; - m_savePaperSpaceHandle = getBlkRecordHandle(); - (*m_ssBlkRecord) << " 0" << endl; - (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; - (*m_ssBlkRecord) << " 5" << endl; - (*m_ssBlkRecord) << m_savePaperSpaceHandle << endl; - (*m_ssBlkRecord) << "330" << endl; - (*m_ssBlkRecord) << tablehash << endl; - (*m_ssBlkRecord) << "100" << endl; - (*m_ssBlkRecord) << "AcDbSymbolTableRecord" << endl; - (*m_ssBlkRecord) << "100" << endl; - (*m_ssBlkRecord) << "AcDbBlockTableRecord" << endl; - (*m_ssBlkRecord) << " 2" << endl; - (*m_ssBlkRecord) << "*PAPER_SPACE" << endl; -// (*m_ssBlkRecord) << " 1" << endl; -// (*m_ssBlkRecord) << " " << endl; + m_savePaperSpaceHandle = getBlkRecordHandle(); + (*m_ssBlkRecord) << " 0" << endl; + (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; + (*m_ssBlkRecord) << " 5" << endl; + (*m_ssBlkRecord) << m_savePaperSpaceHandle << endl; + (*m_ssBlkRecord) << "330" << endl; + (*m_ssBlkRecord) << tablehash << endl; + (*m_ssBlkRecord) << "100" << endl; + (*m_ssBlkRecord) << "AcDbSymbolTableRecord" << endl; + (*m_ssBlkRecord) << "100" << endl; + (*m_ssBlkRecord) << "AcDbBlockTableRecord" << endl; + (*m_ssBlkRecord) << " 2" << endl; + (*m_ssBlkRecord) << "*PAPER_SPACE" << endl; + // (*m_ssBlkRecord) << " 1" << endl; + // (*m_ssBlkRecord) << " " << endl; } //*************************** -//makeBlockRecordTableBody -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// makeBlockRecordTableBody +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::makeBlockRecordTableBody() { if (m_version < 14) { @@ -302,130 +300,130 @@ void CDxfWrite::makeBlockRecordTableBody() int iBlkRecord = 0; for (auto& b : m_blockList) { - (*m_ssBlkRecord) << " 0" << endl; - (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; - (*m_ssBlkRecord) << " 5" << endl; - (*m_ssBlkRecord) << m_blkRecordList.at(iBlkRecord) << endl; - (*m_ssBlkRecord) << "330" << endl; - (*m_ssBlkRecord) << m_saveBlockRecordTableHandle << endl; - (*m_ssBlkRecord) << "100" << endl; - (*m_ssBlkRecord) << "AcDbSymbolTableRecord" << endl; - (*m_ssBlkRecord) << "100" << endl; - (*m_ssBlkRecord) << "AcDbBlockTableRecord" << endl; - (*m_ssBlkRecord) << " 2" << endl; - (*m_ssBlkRecord) << b << endl; -// (*m_ssBlkRecord) << " 70" << endl; -// (*m_ssBlkRecord) << " 0" << endl; + (*m_ssBlkRecord) << " 0" << endl; + (*m_ssBlkRecord) << "BLOCK_RECORD" << endl; + (*m_ssBlkRecord) << " 5" << endl; + (*m_ssBlkRecord) << m_blkRecordList.at(iBlkRecord) << endl; + (*m_ssBlkRecord) << "330" << endl; + (*m_ssBlkRecord) << m_saveBlockRecordTableHandle << endl; + (*m_ssBlkRecord) << "100" << endl; + (*m_ssBlkRecord) << "AcDbSymbolTableRecord" << endl; + (*m_ssBlkRecord) << "100" << endl; + (*m_ssBlkRecord) << "AcDbBlockTableRecord" << endl; + (*m_ssBlkRecord) << " 2" << endl; + (*m_ssBlkRecord) << b << endl; + // (*m_ssBlkRecord) << " 70" << endl; + // (*m_ssBlkRecord) << " 0" << endl; iBlkRecord++; } } //*************************** -//makeBlockSectionHead -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// makeBlockSectionHead +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::makeBlockSectionHead() { - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << "SECTION" << endl; - (*m_ssBlock) << " 2" << endl; - (*m_ssBlock) << "BLOCKS" << endl; - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << "BLOCK" << endl; - (*m_ssBlock) << " 5" << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << "SECTION" << endl; + (*m_ssBlock) << " 2" << endl; + (*m_ssBlock) << "BLOCKS" << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << "BLOCK" << endl; + (*m_ssBlock) << " 5" << endl; m_currentBlock = getBlockHandle(); (*m_ssBlock) << m_currentBlock << endl; if (m_version > 12) { - (*m_ssBlock) << "330" << endl; + (*m_ssBlock) << "330" << endl; (*m_ssBlock) << m_saveModelSpaceHandle << endl; - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbEntity" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbEntity" << endl; } - (*m_ssBlock) << " 8" << endl; - (*m_ssBlock) << "0" << endl; + (*m_ssBlock) << " 8" << endl; + (*m_ssBlock) << "0" << endl; if (m_version > 12) { - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbBlockBegin" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbBlockBegin" << endl; } - (*m_ssBlock) << " 2" << endl; + (*m_ssBlock) << " 2" << endl; (*m_ssBlock) << "*MODEL_SPACE" << endl; - (*m_ssBlock) << " 70" << endl; - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << " 10" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 20" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 30" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 3" << endl; + (*m_ssBlock) << " 70" << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << " 10" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 20" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 30" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 3" << endl; (*m_ssBlock) << "*MODEL_SPACE" << endl; - (*m_ssBlock) << " 1" << endl; - (*m_ssBlock) << " " << endl; - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << "ENDBLK" << endl; - (*m_ssBlock) << " 5" << endl; - (*m_ssBlock) << getBlockHandle() << endl; + (*m_ssBlock) << " 1" << endl; + (*m_ssBlock) << " " << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << "ENDBLK" << endl; + (*m_ssBlock) << " 5" << endl; + (*m_ssBlock) << getBlockHandle() << endl; if (m_version > 12) { - (*m_ssBlock) << "330" << endl; + (*m_ssBlock) << "330" << endl; (*m_ssBlock) << m_saveModelSpaceHandle << endl; - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbEntity" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbEntity" << endl; } - (*m_ssBlock) << " 8" << endl; - (*m_ssBlock) << "0" << endl; + (*m_ssBlock) << " 8" << endl; + (*m_ssBlock) << "0" << endl; if (m_version > 12) { - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbBlockEnd" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbBlockEnd" << endl; } - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << "BLOCK" << endl; - (*m_ssBlock) << " 5" << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << "BLOCK" << endl; + (*m_ssBlock) << " 5" << endl; m_currentBlock = getBlockHandle(); (*m_ssBlock) << m_currentBlock << endl; if (m_version > 12) { - (*m_ssBlock) << "330" << endl; + (*m_ssBlock) << "330" << endl; (*m_ssBlock) << m_savePaperSpaceHandle << endl; - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbEntity" << endl; - (*m_ssBlock) << " 67" << endl; - (*m_ssBlock) << "1" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbEntity" << endl; + (*m_ssBlock) << " 67" << endl; + (*m_ssBlock) << "1" << endl; } - (*m_ssBlock) << " 8" << endl; - (*m_ssBlock) << "0" << endl; + (*m_ssBlock) << " 8" << endl; + (*m_ssBlock) << "0" << endl; if (m_version > 12) { - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbBlockBegin" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbBlockBegin" << endl; } - (*m_ssBlock) << " 2" << endl; + (*m_ssBlock) << " 2" << endl; (*m_ssBlock) << "*PAPER_SPACE" << endl; - (*m_ssBlock) << " 70" << endl; - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << " 10" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 20" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 30" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 3" << endl; + (*m_ssBlock) << " 70" << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << " 10" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 20" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 30" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 3" << endl; (*m_ssBlock) << "*PAPER_SPACE" << endl; - (*m_ssBlock) << " 1" << endl; - (*m_ssBlock) << " " << endl; - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << "ENDBLK" << endl; - (*m_ssBlock) << " 5" << endl; - (*m_ssBlock) << getBlockHandle() << endl; + (*m_ssBlock) << " 1" << endl; + (*m_ssBlock) << " " << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << "ENDBLK" << endl; + (*m_ssBlock) << " 5" << endl; + (*m_ssBlock) << getBlockHandle() << endl; if (m_version > 12) { - (*m_ssBlock) << "330" << endl; + (*m_ssBlock) << "330" << endl; (*m_ssBlock) << m_savePaperSpaceHandle << endl; - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbEntity" << endl; - (*m_ssBlock) << " 67" << endl; //paper_space flag - (*m_ssBlock) << " 1" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbEntity" << endl; + (*m_ssBlock) << " 67" << endl; // paper_space flag + (*m_ssBlock) << " 1" << endl; } - (*m_ssBlock) << " 8" << endl; - (*m_ssBlock) << "0" << endl; + (*m_ssBlock) << " 8" << endl; + (*m_ssBlock) << "0" << endl; if (m_version > 12) { - (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "100" << endl; (*m_ssBlock) << "AcDbBlockEnd" << endl; } } @@ -435,14 +433,14 @@ std::string CDxfWrite::getPlateFile(std::string fileSpec) std::stringstream outString; Base::FileInfo fi(fileSpec); if (!fi.isReadable()) { - Base::Console().Message("dxf unable to open %s!\n",fileSpec.c_str()); - } else { + Base::Console().Message("dxf unable to open %s!\n", fileSpec.c_str()); + } + else { string line; - ifstream inFile (fi.filePath().c_str()); + ifstream inFile(fi.filePath().c_str()); - while (!inFile.eof()) - { - getline(inFile,line); + while (!inFile.eof()) { + getline(inFile, line); if (!inFile.eof()) { outString << line << '\n'; } @@ -463,41 +461,41 @@ std::string CDxfWrite::getHandle() std::string CDxfWrite::getEntityHandle() { return getHandle(); -// m_entityHandle++; -// std::stringstream ss; -// ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); -// ss << m_entityHandle; -// return ss.str(); + // m_entityHandle++; + // std::stringstream ss; + // ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); + // ss << m_entityHandle; + // return ss.str(); } std::string CDxfWrite::getLayerHandle() { return getHandle(); -// m_layerHandle++; -// std::stringstream ss; -// ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); -// ss << m_layerHandle; -// return ss.str(); + // m_layerHandle++; + // std::stringstream ss; + // ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); + // ss << m_layerHandle; + // return ss.str(); } std::string CDxfWrite::getBlockHandle() { return getHandle(); -// m_blockHandle++; -// std::stringstream ss; -// ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); -// ss << m_blockHandle; -// return ss.str(); + // m_blockHandle++; + // std::stringstream ss; + // ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); + // ss << m_blockHandle; + // return ss.str(); } std::string CDxfWrite::getBlkRecordHandle() { return getHandle(); -// m_blkRecordHandle++; -// std::stringstream ss; -// ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); -// ss << m_blkRecordHandle; -// return ss.str(); + // m_blkRecordHandle++; + // std::stringstream ss; + // ss << std::uppercase << std::hex << std::setfill('0') << std::setw(2); + // ss << m_blkRecordHandle; + // return ss.str(); } void CDxfWrite::addBlockName(std::string b, std::string h) @@ -508,185 +506,187 @@ void CDxfWrite::addBlockName(std::string b, std::string h) void CDxfWrite::setLayerName(std::string s) { - m_layerName = s; - m_layerList.push_back(s); + m_layerName = s; + m_layerList.push_back(s); } void CDxfWrite::writeLine(const double* s, const double* e) { - putLine(toVector3d(s),toVector3d(e),m_ssEntity, getEntityHandle(), m_saveModelSpaceHandle); + putLine(toVector3d(s), toVector3d(e), m_ssEntity, getEntityHandle(), m_saveModelSpaceHandle); } -void CDxfWrite::putLine(const Base::Vector3d s, const Base::Vector3d e, - std::ostringstream* outStream, const std::string handle, - const std::string ownerHandle) +void CDxfWrite::putLine(const Base::Vector3d s, + const Base::Vector3d e, + std::ostringstream* outStream, + const std::string handle, + const std::string ownerHandle) { - (*outStream) << " 0" << endl; - (*outStream) << "LINE" << endl; - (*outStream) << " 5" << endl; - (*outStream) << handle << endl; + (*outStream) << " 0" << endl; + (*outStream) << "LINE" << endl; + (*outStream) << " 5" << endl; + (*outStream) << handle << endl; if (m_version > 12) { - (*outStream) << "330" << endl; - (*outStream) << ownerHandle << endl; - (*outStream) << "100" << endl; - (*outStream) << "AcDbEntity" << endl; + (*outStream) << "330" << endl; + (*outStream) << ownerHandle << endl; + (*outStream) << "100" << endl; + (*outStream) << "AcDbEntity" << endl; } - (*outStream) << " 8" << endl; // Group code for layer name - (*outStream) << getLayerName() << endl; // Layer number + (*outStream) << " 8" << endl; // Group code for layer name + (*outStream) << getLayerName() << endl; // Layer number if (m_version > 12) { - (*outStream) << "100" << endl; + (*outStream) << "100" << endl; (*outStream) << "AcDbLine" << endl; } - (*outStream) << " 10" << endl; // Start point of line - (*outStream) << s.x << endl; // X in WCS coordinates - (*outStream) << " 20" << endl; - (*outStream) << s.y << endl; // Y in WCS coordinates - (*outStream) << " 30" << endl; - (*outStream) << s.z << endl; // Z in WCS coordinates - (*outStream) << " 11" << endl; // End point of line - (*outStream) << e.x << endl; // X in WCS coordinates - (*outStream) << " 21" << endl; - (*outStream) << e.y << endl; // Y in WCS coordinates - (*outStream) << " 31" << endl; - (*outStream) << e.z << endl; // Z in WCS coordinates + (*outStream) << " 10" << endl; // Start point of line + (*outStream) << s.x << endl; // X in WCS coordinates + (*outStream) << " 20" << endl; + (*outStream) << s.y << endl; // Y in WCS coordinates + (*outStream) << " 30" << endl; + (*outStream) << s.z << endl; // Z in WCS coordinates + (*outStream) << " 11" << endl; // End point of line + (*outStream) << e.x << endl; // X in WCS coordinates + (*outStream) << " 21" << endl; + (*outStream) << e.y << endl; // Y in WCS coordinates + (*outStream) << " 31" << endl; + (*outStream) << e.z << endl; // Z in WCS coordinates } //*************************** -//writeLWPolyLine (Note: LWPolyline might not be supported in R12 -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writeLWPolyLine(const LWPolyDataOut &pd) +// writeLWPolyLine (Note: LWPolyline might not be supported in R12 +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writeLWPolyLine(const LWPolyDataOut& pd) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "LWPOLYLINE" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "LWPOLYLINE" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } if (m_version > 12) { - (*m_ssEntity) << "100" << endl; //100 groups are not part of R12 - (*m_ssEntity) << "AcDbPolyline" << endl; + (*m_ssEntity) << "100" << endl; // 100 groups are not part of R12 + (*m_ssEntity) << "AcDbPolyline" << endl; } - (*m_ssEntity) << " 8" << endl; // Group code for layer name - (*m_ssEntity) << getLayerName() << endl; // Layer name - (*m_ssEntity) << " 90" << endl; - (*m_ssEntity) << pd.nVert << endl; // number of vertices - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << pd.Flag << endl; - (*m_ssEntity) << " 43" << endl; - (*m_ssEntity) << "0" << endl; //Constant width opt -// (*m_ssEntity) << pd.Width << endl; //Constant width opt -// (*m_ssEntity) << " 38" << endl; -// (*m_ssEntity) << pd.Elev << endl; // Elevation -// (*m_ssEntity) << " 39" << endl; -// (*m_ssEntity) << pd.Thick << endl; // Thickness + (*m_ssEntity) << " 8" << endl; // Group code for layer name + (*m_ssEntity) << getLayerName() << endl; // Layer name + (*m_ssEntity) << " 90" << endl; + (*m_ssEntity) << pd.nVert << endl; // number of vertices + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << pd.Flag << endl; + (*m_ssEntity) << " 43" << endl; + (*m_ssEntity) << "0" << endl; // Constant width opt + // (*m_ssEntity) << pd.Width << endl; //Constant width opt + // (*m_ssEntity) << " 38" << endl; + // (*m_ssEntity) << pd.Elev << endl; // Elevation + // (*m_ssEntity) << " 39" << endl; + // (*m_ssEntity) << pd.Thick << endl; // Thickness for (auto& p : pd.Verts) { - (*m_ssEntity) << " 10" << endl; // Vertices - (*m_ssEntity) << p.x << endl; - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << p.y << endl; + (*m_ssEntity) << " 10" << endl; // Vertices + (*m_ssEntity) << p.x << endl; + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << p.y << endl; } for (auto& s : pd.StartWidth) { - (*m_ssEntity) << " 40" << endl; - (*m_ssEntity) << s << endl; // Start Width + (*m_ssEntity) << " 40" << endl; + (*m_ssEntity) << s << endl; // Start Width } for (auto& e : pd.EndWidth) { - (*m_ssEntity) << " 41" << endl; - (*m_ssEntity) << e << endl; // End Width + (*m_ssEntity) << " 41" << endl; + (*m_ssEntity) << e << endl; // End Width } - for (auto& b : pd.Bulge) { // Bulge - (*m_ssEntity) << " 42" << endl; - (*m_ssEntity) << b << endl; + for (auto& b : pd.Bulge) { // Bulge + (*m_ssEntity) << " 42" << endl; + (*m_ssEntity) << b << endl; } -// (*m_ssEntity) << "210" << endl; //Extrusion dir -// (*m_ssEntity) << pd.Extr.x << endl; -// (*m_ssEntity) << "220" << endl; -// (*m_ssEntity) << pd.Extr.y << endl; -// (*m_ssEntity) << "230" << endl; -// (*m_ssEntity) << pd.Extr.z << endl; + // (*m_ssEntity) << "210" << endl; //Extrusion dir + // (*m_ssEntity) << pd.Extr.x << endl; + // (*m_ssEntity) << "220" << endl; + // (*m_ssEntity) << pd.Extr.y << endl; + // (*m_ssEntity) << "230" << endl; + // (*m_ssEntity) << pd.Extr.z << endl; } //*************************** -//writePolyline -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writePolyline(const LWPolyDataOut &pd) +// writePolyline +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writePolyline(const LWPolyDataOut& pd) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "POLYLINE" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "POLYLINE" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; // Layer name + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; // Layer name if (m_version > 12) { - (*m_ssEntity) << "100" << endl; //100 groups are not part of R12 - (*m_ssEntity) << "AcDbPolyline" << endl; + (*m_ssEntity) << "100" << endl; // 100 groups are not part of R12 + (*m_ssEntity) << "AcDbPolyline" << endl; } - (*m_ssEntity) << " 66" << endl; - (*m_ssEntity) << " 1" << endl; // vertices follow - (*m_ssEntity) << " 10" << endl; - (*m_ssEntity) << "0.0" << endl; - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << "0.0" << endl; - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << "0.0" << endl; - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << "0" << endl; + (*m_ssEntity) << " 66" << endl; + (*m_ssEntity) << " 1" << endl; // vertices follow + (*m_ssEntity) << " 10" << endl; + (*m_ssEntity) << "0.0" << endl; + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << "0.0" << endl; + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << "0.0" << endl; + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << "0" << endl; for (auto& p : pd.Verts) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "VERTEX" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "VERTEX" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; - (*m_ssEntity) << " 10" << endl; - (*m_ssEntity) << p.x << endl; - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << p.y << endl; - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << "0.0" << endl; + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; + (*m_ssEntity) << " 10" << endl; + (*m_ssEntity) << p.x << endl; + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << p.y << endl; + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << "0.0" << endl; } - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "SEQEND" << endl; - (*m_ssEntity) << " 5" << endl; - (*m_ssEntity) << getEntityHandle() << endl; - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "SEQEND" << endl; + (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << getEntityHandle() << endl; + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; } void CDxfWrite::writePoint(const double* s) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "POINT" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "POINT" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; // Group code for layer name - (*m_ssEntity) << getLayerName() << endl; // Layer name + (*m_ssEntity) << " 8" << endl; // Group code for layer name + (*m_ssEntity) << getLayerName() << endl; // Layer name if (m_version > 12) { - (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "100" << endl; (*m_ssEntity) << "AcDbPoint" << endl; } - (*m_ssEntity) << " 10" << endl; - (*m_ssEntity) << s[0] << endl; // X in WCS coordinates - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << s[1] << endl; // Y in WCS coordinates - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << s[2] << endl; // Z in WCS coordinates + (*m_ssEntity) << " 10" << endl; + (*m_ssEntity) << s[0] << endl; // X in WCS coordinates + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << s[1] << endl; // Y in WCS coordinates + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << s[2] << endl; // Z in WCS coordinates } void CDxfWrite::writeArc(const double* s, const double* e, const double* c, bool dir) @@ -696,615 +696,640 @@ void CDxfWrite::writeArc(const double* s, const double* e, const double* c, bool double bx = e[0] - c[0]; double by = e[1] - c[1]; - double start_angle = atan2(ay, ax) * 180/M_PI; - double end_angle = atan2(by, bx) * 180/M_PI; - double radius = sqrt(ax*ax + ay*ay); - if(!dir){ + double start_angle = atan2(ay, ax) * 180 / M_PI; + double end_angle = atan2(by, bx) * 180 / M_PI; + double radius = sqrt(ax * ax + ay * ay); + if (!dir) { double temp = start_angle; start_angle = end_angle; end_angle = temp; } - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "ARC" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "ARC" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; // Group code for layer name - (*m_ssEntity) << getLayerName() << endl; // Layer number -// (*m_ssEntity) << " 62" << endl; -// (*m_ssEntity) << " 0" << endl; - if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbCircle" << endl; + (*m_ssEntity) << " 8" << endl; // Group code for layer name + (*m_ssEntity) << getLayerName() << endl; // Layer number + // (*m_ssEntity) << " 62" << endl; + // (*m_ssEntity) << " 0" << endl; + if (m_version > 12) { + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbCircle" << endl; } - (*m_ssEntity) << " 10" << endl; // Centre X - (*m_ssEntity) << c[0] << endl; // X in WCS coordinates - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << c[1] << endl; // Y in WCS coordinates - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << c[2] << endl; // Z in WCS coordinates - (*m_ssEntity) << " 40" << endl; // - (*m_ssEntity) << radius << endl; // Radius + (*m_ssEntity) << " 10" << endl; // Centre X + (*m_ssEntity) << c[0] << endl; // X in WCS coordinates + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << c[1] << endl; // Y in WCS coordinates + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << c[2] << endl; // Z in WCS coordinates + (*m_ssEntity) << " 40" << endl; // + (*m_ssEntity) << radius << endl; // Radius if (m_version > 12) { - (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "100" << endl; (*m_ssEntity) << "AcDbArc" << endl; } - (*m_ssEntity) << " 50" << endl; - (*m_ssEntity) << start_angle << endl; // Start angle - (*m_ssEntity) << " 51" << endl; - (*m_ssEntity) << end_angle << endl; // End angle + (*m_ssEntity) << " 50" << endl; + (*m_ssEntity) << start_angle << endl; // Start angle + (*m_ssEntity) << " 51" << endl; + (*m_ssEntity) << end_angle << endl; // End angle } void CDxfWrite::writeCircle(const double* c, double radius) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "CIRCLE" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "CIRCLE" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; // Group code for layer name - (*m_ssEntity) << getLayerName() << endl; // Layer number - if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbCircle" << endl; + (*m_ssEntity) << " 8" << endl; // Group code for layer name + (*m_ssEntity) << getLayerName() << endl; // Layer number + if (m_version > 12) { + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbCircle" << endl; } - (*m_ssEntity) << " 10" << endl; // Centre X - (*m_ssEntity) << c[0] << endl; // X in WCS coordinates - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << c[1] << endl; // Y in WCS coordinates -// (*m_ssEntity) << " 30" << endl; -// (*m_ssEntity) << c[2] << endl; // Z in WCS coordinates - (*m_ssEntity) << " 40" << endl; // - (*m_ssEntity) << radius << endl; // Radius + (*m_ssEntity) << " 10" << endl; // Centre X + (*m_ssEntity) << c[0] << endl; // X in WCS coordinates + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << c[1] << endl; // Y in WCS coordinates + // (*m_ssEntity) << " 30" << endl; + // (*m_ssEntity) << c[2] << endl; // Z in WCS coordinates + (*m_ssEntity) << " 40" << endl; // + (*m_ssEntity) << radius << endl; // Radius } -void CDxfWrite::writeEllipse(const double* c, double major_radius, double minor_radius, - double rotation, double start_angle, double end_angle, +void CDxfWrite::writeEllipse(const double* c, + double major_radius, + double minor_radius, + double rotation, + double start_angle, + double end_angle, bool endIsCW) { double m[3]; - m[2]=0; + m[2] = 0; m[0] = major_radius * sin(rotation); m[1] = major_radius * cos(rotation); - double ratio = minor_radius/major_radius; + double ratio = minor_radius / major_radius; - if(!endIsCW){ //end is NOT CW from start + if (!endIsCW) { // end is NOT CW from start double temp = start_angle; start_angle = end_angle; end_angle = temp; } - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "ELLIPSE" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "ELLIPSE" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; // Group code for layer name - (*m_ssEntity) << getLayerName() << endl; // Layer number - if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEllipse" << endl; + (*m_ssEntity) << " 8" << endl; // Group code for layer name + (*m_ssEntity) << getLayerName() << endl; // Layer number + if (m_version > 12) { + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEllipse" << endl; } - (*m_ssEntity) << " 10" << endl; // Centre X - (*m_ssEntity) << c[0] << endl; // X in WCS coordinates - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << c[1] << endl; // Y in WCS coordinates - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << c[2] << endl; // Z in WCS coordinates - (*m_ssEntity) << " 11" << endl; // - (*m_ssEntity) << m[0] << endl; // Major X - (*m_ssEntity) << " 21" << endl; - (*m_ssEntity) << m[1] << endl; // Major Y - (*m_ssEntity) << " 31" << endl; - (*m_ssEntity) << m[2] << endl; // Major Z - (*m_ssEntity) << " 40" << endl; // - (*m_ssEntity) << ratio << endl; // Ratio -// (*m_ssEntity) << "210" << endl; //extrusion dir?? -// (*m_ssEntity) << "0" << endl; -// (*m_ssEntity) << "220" << endl; -// (*m_ssEntity) << "0" << endl; -// (*m_ssEntity) << "230" << endl; -// (*m_ssEntity) << "1" << endl; - (*m_ssEntity) << " 41" << endl; - (*m_ssEntity) << start_angle << endl; // Start angle (radians [0..2pi]) - (*m_ssEntity) << " 42" << endl; - (*m_ssEntity) << end_angle << endl; // End angle + (*m_ssEntity) << " 10" << endl; // Centre X + (*m_ssEntity) << c[0] << endl; // X in WCS coordinates + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << c[1] << endl; // Y in WCS coordinates + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << c[2] << endl; // Z in WCS coordinates + (*m_ssEntity) << " 11" << endl; // + (*m_ssEntity) << m[0] << endl; // Major X + (*m_ssEntity) << " 21" << endl; + (*m_ssEntity) << m[1] << endl; // Major Y + (*m_ssEntity) << " 31" << endl; + (*m_ssEntity) << m[2] << endl; // Major Z + (*m_ssEntity) << " 40" << endl; // + (*m_ssEntity) << ratio + << endl; // Ratio + // (*m_ssEntity) << "210" << endl; //extrusion dir?? + // (*m_ssEntity) << "0" << endl; + // (*m_ssEntity) << "220" << endl; + // (*m_ssEntity) << "0" << endl; + // (*m_ssEntity) << "230" << endl; + // (*m_ssEntity) << "1" << endl; + (*m_ssEntity) << " 41" << endl; + (*m_ssEntity) << start_angle << endl; // Start angle (radians [0..2pi]) + (*m_ssEntity) << " 42" << endl; + (*m_ssEntity) << end_angle << endl; // End angle } //*************************** -//writeSpline -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writeSpline(const SplineDataOut &sd) +// writeSpline +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writeSpline(const SplineDataOut& sd) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "SPLINE" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "SPLINE" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; // Group code for layer name - (*m_ssEntity) << getLayerName() << endl; // Layer name + (*m_ssEntity) << " 8" << endl; // Group code for layer name + (*m_ssEntity) << getLayerName() << endl; // Layer name if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbSpline" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbSpline" << endl; } - (*m_ssEntity) << "210" << endl; - (*m_ssEntity) << "0" << endl; - (*m_ssEntity) << "220" << endl; - (*m_ssEntity) << "0" << endl; - (*m_ssEntity) << "230" << endl; - (*m_ssEntity) << "1" << endl; + (*m_ssEntity) << "210" << endl; + (*m_ssEntity) << "0" << endl; + (*m_ssEntity) << "220" << endl; + (*m_ssEntity) << "0" << endl; + (*m_ssEntity) << "230" << endl; + (*m_ssEntity) << "1" << endl; - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << sd.flag << endl; //flags - (*m_ssEntity) << " 71" << endl; - (*m_ssEntity) << sd.degree << endl; - (*m_ssEntity) << " 72" << endl; - (*m_ssEntity) << sd.knots << endl; - (*m_ssEntity) << " 73" << endl; - (*m_ssEntity) << sd.control_points << endl; - (*m_ssEntity) << " 74" << endl; - (*m_ssEntity) << 0 << endl; + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << sd.flag << endl; // flags + (*m_ssEntity) << " 71" << endl; + (*m_ssEntity) << sd.degree << endl; + (*m_ssEntity) << " 72" << endl; + (*m_ssEntity) << sd.knots << endl; + (*m_ssEntity) << " 73" << endl; + (*m_ssEntity) << sd.control_points << endl; + (*m_ssEntity) << " 74" << endl; + (*m_ssEntity) << 0 << endl; -// (*m_ssEntity) << " 12" << endl; -// (*m_ssEntity) << sd.starttan.x << endl; -// (*m_ssEntity) << " 22" << endl; -// (*m_ssEntity) << sd.starttan.y << endl; -// (*m_ssEntity) << " 32" << endl; -// (*m_ssEntity) << sd.starttan.z << endl; -// (*m_ssEntity) << " 13" << endl; -// (*m_ssEntity) << sd.endtan.x << endl; -// (*m_ssEntity) << " 23" << endl; -// (*m_ssEntity) << sd.endtan.y << endl; -// (*m_ssEntity) << " 33" << endl; -// (*m_ssEntity) << sd.endtan.z << endl; + // (*m_ssEntity) << " 12" << endl; + // (*m_ssEntity) << sd.starttan.x << endl; + // (*m_ssEntity) << " 22" << endl; + // (*m_ssEntity) << sd.starttan.y << endl; + // (*m_ssEntity) << " 32" << endl; + // (*m_ssEntity) << sd.starttan.z << endl; + // (*m_ssEntity) << " 13" << endl; + // (*m_ssEntity) << sd.endtan.x << endl; + // (*m_ssEntity) << " 23" << endl; + // (*m_ssEntity) << sd.endtan.y << endl; + // (*m_ssEntity) << " 33" << endl; + // (*m_ssEntity) << sd.endtan.z << endl; for (auto& k : sd.knot) { - (*m_ssEntity) << " 40" << endl; - (*m_ssEntity) << k << endl; + (*m_ssEntity) << " 40" << endl; + (*m_ssEntity) << k << endl; } for (auto& w : sd.weight) { - (*m_ssEntity) << " 41" << endl; - (*m_ssEntity) << w << endl; + (*m_ssEntity) << " 41" << endl; + (*m_ssEntity) << w << endl; } for (auto& c : sd.control) { - (*m_ssEntity) << " 10" << endl; - (*m_ssEntity) << c.x << endl; // X in WCS coordinates - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << c.y << endl; // Y in WCS coordinates - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << c.z << endl; // Z in WCS coordinates + (*m_ssEntity) << " 10" << endl; + (*m_ssEntity) << c.x << endl; // X in WCS coordinates + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << c.y << endl; // Y in WCS coordinates + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << c.z << endl; // Z in WCS coordinates } for (auto& f : sd.fit) { - (*m_ssEntity) << " 11" << endl; - (*m_ssEntity) << f.x << endl; // X in WCS coordinates - (*m_ssEntity) << " 21" << endl; - (*m_ssEntity) << f.y << endl; // Y in WCS coordinates - (*m_ssEntity) << " 31" << endl; - (*m_ssEntity) << f.z << endl; // Z in WCS coordinates + (*m_ssEntity) << " 11" << endl; + (*m_ssEntity) << f.x << endl; // X in WCS coordinates + (*m_ssEntity) << " 21" << endl; + (*m_ssEntity) << f.y << endl; // Y in WCS coordinates + (*m_ssEntity) << " 31" << endl; + (*m_ssEntity) << f.z << endl; // Z in WCS coordinates } } //*************************** -//writeVertex -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeVertex +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeVertex(double x, double y, double z) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "VERTEX" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "VERTEX" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbVertex" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbVertex" << endl; } - (*m_ssEntity) << " 10" << endl; - (*m_ssEntity) << x << endl; - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << y << endl; - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << z << endl; - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << 0 << endl; + (*m_ssEntity) << " 10" << endl; + (*m_ssEntity) << x << endl; + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << y << endl; + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << z << endl; + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << 0 << endl; } -void CDxfWrite::writeText(const char* text, const double* location1, const double* location2, - const double height, const int horizJust) +void CDxfWrite::writeText(const char* text, + const double* location1, + const double* location2, + const double height, + const int horizJust) { - putText(text, toVector3d(location1), toVector3d(location2), - height, horizJust, - m_ssEntity, getEntityHandle(), m_saveModelSpaceHandle); + putText(text, + toVector3d(location1), + toVector3d(location2), + height, + horizJust, + m_ssEntity, + getEntityHandle(), + m_saveModelSpaceHandle); } //*************************** -//putText -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::putText(const char* text, const Base::Vector3d location1, const Base::Vector3d location2, - const double height, const int horizJust, - std::ostringstream* outStream, const std::string handle, - const std::string ownerHandle) +// putText +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::putText(const char* text, + const Base::Vector3d location1, + const Base::Vector3d location2, + const double height, + const int horizJust, + std::ostringstream* outStream, + const std::string handle, + const std::string ownerHandle) { - (void) location2; + (void)location2; - (*outStream) << " 0" << endl; - (*outStream) << "TEXT" << endl; - (*outStream) << " 5" << endl; + (*outStream) << " 0" << endl; + (*outStream) << "TEXT" << endl; + (*outStream) << " 5" << endl; (*outStream) << handle << endl; if (m_version > 12) { - (*outStream) << "330" << endl; - (*outStream) << ownerHandle << endl; - (*outStream) << "100" << endl; - (*outStream) << "AcDbEntity" << endl; + (*outStream) << "330" << endl; + (*outStream) << ownerHandle << endl; + (*outStream) << "100" << endl; + (*outStream) << "AcDbEntity" << endl; } - (*outStream) << " 8" << endl; - (*outStream) << getLayerName() << endl; + (*outStream) << " 8" << endl; + (*outStream) << getLayerName() << endl; if (m_version > 12) { - (*outStream) << "100" << endl; - (*outStream) << "AcDbText" << endl; + (*outStream) << "100" << endl; + (*outStream) << "AcDbText" << endl; } -// (*outStream) << " 39" << endl; -// (*outStream) << 0 << endl; //thickness - (*outStream) << " 10" << endl; //first alignment point - (*outStream) << location1.x << endl; - (*outStream) << " 20" << endl; - (*outStream) << location1.y << endl; - (*outStream) << " 30" << endl; - (*outStream) << location1.z << endl; - (*outStream) << " 40" << endl; - (*outStream) << height << endl; - (*outStream) << " 1" << endl; - (*outStream) << text << endl; -// (*outStream) << " 50" << endl; -// (*outStream) << 0 << endl; //rotation -// (*outStream) << " 41" << endl; -// (*outStream) << 1 << endl; -// (*outStream) << " 51" << endl; -// (*outStream) << 0 << endl; + // (*outStream) << " 39" << endl; + // (*outStream) << 0 << endl; //thickness + (*outStream) << " 10" << endl; // first alignment point + (*outStream) << location1.x << endl; + (*outStream) << " 20" << endl; + (*outStream) << location1.y << endl; + (*outStream) << " 30" << endl; + (*outStream) << location1.z << endl; + (*outStream) << " 40" << endl; + (*outStream) << height << endl; + (*outStream) << " 1" << endl; + (*outStream) << text << endl; + // (*outStream) << " 50" << endl; + // (*outStream) << 0 << endl; //rotation + // (*outStream) << " 41" << endl; + // (*outStream) << 1 << endl; + // (*outStream) << " 51" << endl; + // (*outStream) << 0 << endl; - (*outStream) << " 7" << endl; - (*outStream) << "STANDARD" << endl; //style -// (*outStream) << " 71" << endl; //default -// (*outStream) << "0" << endl; - (*outStream) << " 72" << endl; - (*outStream) << horizJust << endl; -//// (*outStream) << " 73" << endl; -//// (*outStream) << "0" << endl; - (*outStream) << " 11" << endl; //second alignment point - (*outStream) << location2.x << endl; - (*outStream) << " 21" << endl; - (*outStream) << location2.y << endl; - (*outStream) << " 31" << endl; - (*outStream) << location2.z << endl; -// (*outStream) << "210" << endl; -// (*outStream) << "0" << endl; -// (*outStream) << "220" << endl; -// (*outStream) << "0" << endl; -// (*outStream) << "230" << endl; -// (*outStream) << "1" << endl; + (*outStream) << " 7" << endl; + (*outStream) << "STANDARD" << endl; // style + // (*outStream) << " 71" << endl; //default + // (*outStream) << "0" << endl; + (*outStream) << " 72" << endl; + (*outStream) << horizJust << endl; + //// (*outStream) << " 73" << endl; + //// (*outStream) << "0" << endl; + (*outStream) << " 11" << endl; // second alignment point + (*outStream) << location2.x << endl; + (*outStream) << " 21" << endl; + (*outStream) << location2.y << endl; + (*outStream) << " 31" << endl; + (*outStream) << location2.z << endl; + // (*outStream) << "210" << endl; + // (*outStream) << "0" << endl; + // (*outStream) << "220" << endl; + // (*outStream) << "0" << endl; + // (*outStream) << "230" << endl; + // (*outStream) << "1" << endl; if (m_version > 12) { - (*outStream) << "100" << endl; - (*outStream) << "AcDbText" << endl; + (*outStream) << "100" << endl; + (*outStream) << "AcDbText" << endl; } - } -void CDxfWrite::putArrow(Base::Vector3d arrowPos, Base::Vector3d barb1Pos, Base::Vector3d barb2Pos, - std::ostringstream* outStream, const std::string handle, +void CDxfWrite::putArrow(Base::Vector3d arrowPos, + Base::Vector3d barb1Pos, + Base::Vector3d barb2Pos, + std::ostringstream* outStream, + const std::string handle, const std::string ownerHandle) { - (*outStream) << " 0" << endl; - (*outStream) << "SOLID" << endl; - (*outStream) << " 5" << endl; - (*outStream) << handle << endl; + (*outStream) << " 0" << endl; + (*outStream) << "SOLID" << endl; + (*outStream) << " 5" << endl; + (*outStream) << handle << endl; if (m_version > 12) { - (*outStream) << "330" << endl; + (*outStream) << "330" << endl; (*outStream) << ownerHandle << endl; - (*outStream) << "100" << endl; - (*outStream) << "AcDbEntity" << endl; + (*outStream) << "100" << endl; + (*outStream) << "AcDbEntity" << endl; } - (*outStream) << " 8" << endl; - (*outStream) << "0" << endl; - (*outStream) << " 62" << endl; - (*outStream) << " 0" << endl; + (*outStream) << " 8" << endl; + (*outStream) << "0" << endl; + (*outStream) << " 62" << endl; + (*outStream) << " 0" << endl; if (m_version > 12) { - (*outStream) << "100" << endl; + (*outStream) << "100" << endl; (*outStream) << "AcDbTrace" << endl; } - (*outStream) << " 10" << endl; - (*outStream) << barb1Pos.x << endl; - (*outStream) << " 20" << endl; - (*outStream) << barb1Pos.y << endl; - (*outStream) << " 30" << endl; - (*outStream) << barb1Pos.z << endl; - (*outStream) << " 11" << endl; - (*outStream) << barb2Pos.x << endl; - (*outStream) << " 21" << endl; - (*outStream) << barb2Pos.y << endl; - (*outStream) << " 31" << endl; - (*outStream) << barb2Pos.z << endl; - (*outStream) << " 12" << endl; - (*outStream) << arrowPos.x << endl; - (*outStream) << " 22" << endl; - (*outStream) << arrowPos.y << endl; - (*outStream) << " 32" << endl; - (*outStream) << arrowPos.z << endl; - (*outStream) << " 13" << endl; - (*outStream) << arrowPos.x << endl; - (*outStream) << " 23" << endl; - (*outStream) << arrowPos.y << endl; - (*outStream) << " 33" << endl; - (*outStream) << arrowPos.z << endl; + (*outStream) << " 10" << endl; + (*outStream) << barb1Pos.x << endl; + (*outStream) << " 20" << endl; + (*outStream) << barb1Pos.y << endl; + (*outStream) << " 30" << endl; + (*outStream) << barb1Pos.z << endl; + (*outStream) << " 11" << endl; + (*outStream) << barb2Pos.x << endl; + (*outStream) << " 21" << endl; + (*outStream) << barb2Pos.y << endl; + (*outStream) << " 31" << endl; + (*outStream) << barb2Pos.z << endl; + (*outStream) << " 12" << endl; + (*outStream) << arrowPos.x << endl; + (*outStream) << " 22" << endl; + (*outStream) << arrowPos.y << endl; + (*outStream) << " 32" << endl; + (*outStream) << arrowPos.z << endl; + (*outStream) << " 13" << endl; + (*outStream) << arrowPos.x << endl; + (*outStream) << " 23" << endl; + (*outStream) << arrowPos.y << endl; + (*outStream) << " 33" << endl; + (*outStream) << arrowPos.z << endl; } //*************************** -//writeLinearDim -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeLinearDim +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project #define ALIGNED 0 #define HORIZONTAL 1 #define VERTICAL 2 -void CDxfWrite::writeLinearDim(const double* textMidPoint, const double* lineDefPoint, - const double* extLine1, const double* extLine2, - const char* dimText, int type) +void CDxfWrite::writeLinearDim(const double* textMidPoint, + const double* lineDefPoint, + const double* extLine1, + const double* extLine2, + const char* dimText, + int type) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "DIMENSION" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "DIMENSION" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbDimension" << endl; } - (*m_ssEntity) << " 2" << endl; - (*m_ssEntity) << "*" << getLayerName() << endl; // blockName - (*m_ssEntity) << " 10" << endl; //dimension line definition point - (*m_ssEntity) << lineDefPoint[0] << endl; - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << lineDefPoint[1] << endl; - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << lineDefPoint[2] << endl; - (*m_ssEntity) << " 11" << endl; //text mid point - (*m_ssEntity) << textMidPoint[0] << endl; - (*m_ssEntity) << " 21" << endl; - (*m_ssEntity) << textMidPoint[1] << endl; - (*m_ssEntity) << " 31" << endl; - (*m_ssEntity) << textMidPoint[2] << endl; + (*m_ssEntity) << " 2" << endl; + (*m_ssEntity) << "*" << getLayerName() << endl; // blockName + (*m_ssEntity) << " 10" << endl; // dimension line definition point + (*m_ssEntity) << lineDefPoint[0] << endl; + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << lineDefPoint[1] << endl; + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << lineDefPoint[2] << endl; + (*m_ssEntity) << " 11" << endl; // text mid point + (*m_ssEntity) << textMidPoint[0] << endl; + (*m_ssEntity) << " 21" << endl; + (*m_ssEntity) << textMidPoint[1] << endl; + (*m_ssEntity) << " 31" << endl; + (*m_ssEntity) << textMidPoint[2] << endl; if (type == ALIGNED) { - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << 1 << endl; // dimType1 = Aligned + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << 1 << endl; // dimType1 = Aligned } - if ( (type == HORIZONTAL) || - (type == VERTICAL) ) { - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << 32 << endl; // dimType0 = Aligned + 32 (bit for unique block)? + if ((type == HORIZONTAL) || (type == VERTICAL)) { + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << 32 << endl; // dimType0 = Aligned + 32 (bit for unique block)? } -// (*m_ssEntity) << " 71" << endl; // not R12 -// (*m_ssEntity) << 1 << endl; // attachPoint ??1 = topleft - (*m_ssEntity) << " 1" << endl; - (*m_ssEntity) << dimText << endl; - (*m_ssEntity) << " 3" << endl; - (*m_ssEntity) << "STANDARD" << endl; //style -//linear dims + // (*m_ssEntity) << " 71" << endl; // not R12 + // (*m_ssEntity) << 1 << endl; // attachPoint ??1 = topleft + (*m_ssEntity) << " 1" << endl; + (*m_ssEntity) << dimText << endl; + (*m_ssEntity) << " 3" << endl; + (*m_ssEntity) << "STANDARD" << endl; // style + // linear dims if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbAlignedDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbAlignedDimension" << endl; } - (*m_ssEntity) << " 13" << endl; - (*m_ssEntity) << extLine1[0] << endl; - (*m_ssEntity) << " 23" << endl; - (*m_ssEntity) << extLine1[1] << endl; - (*m_ssEntity) << " 33" << endl; - (*m_ssEntity) << extLine1[2] << endl; - (*m_ssEntity) << " 14" << endl; - (*m_ssEntity) << extLine2[0] << endl; - (*m_ssEntity) << " 24" << endl; - (*m_ssEntity) << extLine2[1] << endl; - (*m_ssEntity) << " 34" << endl; - (*m_ssEntity) << extLine2[2] << endl; + (*m_ssEntity) << " 13" << endl; + (*m_ssEntity) << extLine1[0] << endl; + (*m_ssEntity) << " 23" << endl; + (*m_ssEntity) << extLine1[1] << endl; + (*m_ssEntity) << " 33" << endl; + (*m_ssEntity) << extLine1[2] << endl; + (*m_ssEntity) << " 14" << endl; + (*m_ssEntity) << extLine2[0] << endl; + (*m_ssEntity) << " 24" << endl; + (*m_ssEntity) << extLine2[1] << endl; + (*m_ssEntity) << " 34" << endl; + (*m_ssEntity) << extLine2[2] << endl; if (m_version > 12) { if (type == VERTICAL) { - (*m_ssEntity) << " 50" << endl; - (*m_ssEntity) << "90" << endl; + (*m_ssEntity) << " 50" << endl; + (*m_ssEntity) << "90" << endl; } - if ( (type == HORIZONTAL) || - (type == VERTICAL) ) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbRotatedDimension" << endl; + if ((type == HORIZONTAL) || (type == VERTICAL)) { + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbRotatedDimension" << endl; } } writeDimBlockPreamble(); - writeLinearDimBlock(textMidPoint,lineDefPoint, - extLine1, extLine2, - dimText, type); + writeLinearDimBlock(textMidPoint, lineDefPoint, extLine1, extLine2, dimText, type); writeBlockTrailer(); } //*************************** -//writeAngularDim -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writeAngularDim(const double* textMidPoint, const double* lineDefPoint, - const double* startExt1, const double* endExt1, - const double* startExt2, const double* endExt2, - const char* dimText) +// writeAngularDim +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writeAngularDim(const double* textMidPoint, + const double* lineDefPoint, + const double* startExt1, + const double* endExt1, + const double* startExt2, + const double* endExt2, + const char* dimText) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "DIMENSION" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "DIMENSION" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbDimension" << endl; } - (*m_ssEntity) << " 2" << endl; - (*m_ssEntity) << "*" << getLayerName() << endl; // blockName + (*m_ssEntity) << " 2" << endl; + (*m_ssEntity) << "*" << getLayerName() << endl; // blockName - (*m_ssEntity) << " 10" << endl; - (*m_ssEntity) << endExt2[0] << endl; - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << endExt2[1] << endl; - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << endExt2[2] << endl; + (*m_ssEntity) << " 10" << endl; + (*m_ssEntity) << endExt2[0] << endl; + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << endExt2[1] << endl; + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << endExt2[2] << endl; - (*m_ssEntity) << " 11" << endl; - (*m_ssEntity) << textMidPoint[0] << endl; - (*m_ssEntity) << " 21" << endl; - (*m_ssEntity) << textMidPoint[1] << endl; - (*m_ssEntity) << " 31" << endl; - (*m_ssEntity) << textMidPoint[2] << endl; + (*m_ssEntity) << " 11" << endl; + (*m_ssEntity) << textMidPoint[0] << endl; + (*m_ssEntity) << " 21" << endl; + (*m_ssEntity) << textMidPoint[1] << endl; + (*m_ssEntity) << " 31" << endl; + (*m_ssEntity) << textMidPoint[2] << endl; - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << 2 << endl; // dimType 2 = Angular 5 = Angular 3 point - // +32 for block?? (not R12) -// (*m_ssEntity) << " 71" << endl; // not R12? not required? -// (*m_ssEntity) << 5 << endl; // attachPoint 5 = middle - (*m_ssEntity) << " 1" << endl; - (*m_ssEntity) << dimText << endl; - (*m_ssEntity) << " 3" << endl; - (*m_ssEntity) << "STANDARD" << endl; //style -//angular dims + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << 2 << endl; // dimType 2 = Angular 5 = Angular 3 point + // +32 for block?? (not R12) + // (*m_ssEntity) << " 71" << endl; // not R12? not required? + // (*m_ssEntity) << 5 << endl; // attachPoint 5 = middle + (*m_ssEntity) << " 1" << endl; + (*m_ssEntity) << dimText << endl; + (*m_ssEntity) << " 3" << endl; + (*m_ssEntity) << "STANDARD" << endl; // style + // angular dims if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDb2LineAngularDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDb2LineAngularDimension" << endl; } - (*m_ssEntity) << " 13" << endl; - (*m_ssEntity) << startExt1[0] << endl; - (*m_ssEntity) << " 23" << endl; - (*m_ssEntity) << startExt1[1] << endl; - (*m_ssEntity) << " 33" << endl; - (*m_ssEntity) << startExt1[2] << endl; + (*m_ssEntity) << " 13" << endl; + (*m_ssEntity) << startExt1[0] << endl; + (*m_ssEntity) << " 23" << endl; + (*m_ssEntity) << startExt1[1] << endl; + (*m_ssEntity) << " 33" << endl; + (*m_ssEntity) << startExt1[2] << endl; - (*m_ssEntity) << " 14" << endl; - (*m_ssEntity) << endExt1[0] << endl; - (*m_ssEntity) << " 24" << endl; - (*m_ssEntity) << endExt1[1] << endl; - (*m_ssEntity) << " 34" << endl; - (*m_ssEntity) << endExt1[2] << endl; + (*m_ssEntity) << " 14" << endl; + (*m_ssEntity) << endExt1[0] << endl; + (*m_ssEntity) << " 24" << endl; + (*m_ssEntity) << endExt1[1] << endl; + (*m_ssEntity) << " 34" << endl; + (*m_ssEntity) << endExt1[2] << endl; - (*m_ssEntity) << " 15" << endl; - (*m_ssEntity) << startExt2[0] << endl; - (*m_ssEntity) << " 25" << endl; - (*m_ssEntity) << startExt2[1] << endl; - (*m_ssEntity) << " 35" << endl; - (*m_ssEntity) << startExt2[2] << endl; + (*m_ssEntity) << " 15" << endl; + (*m_ssEntity) << startExt2[0] << endl; + (*m_ssEntity) << " 25" << endl; + (*m_ssEntity) << startExt2[1] << endl; + (*m_ssEntity) << " 35" << endl; + (*m_ssEntity) << startExt2[2] << endl; - (*m_ssEntity) << " 16" << endl; + (*m_ssEntity) << " 16" << endl; (*m_ssEntity) << lineDefPoint[0] << endl; - (*m_ssEntity) << " 26" << endl; + (*m_ssEntity) << " 26" << endl; (*m_ssEntity) << lineDefPoint[1] << endl; - (*m_ssEntity) << " 36" << endl; + (*m_ssEntity) << " 36" << endl; (*m_ssEntity) << lineDefPoint[2] << endl; writeDimBlockPreamble(); - writeAngularDimBlock(textMidPoint, lineDefPoint, - startExt1, endExt1, - startExt2, endExt2, + writeAngularDimBlock(textMidPoint, + lineDefPoint, + startExt1, + endExt1, + startExt2, + endExt2, dimText); writeBlockTrailer(); } //*************************** -//writeRadialDim -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writeRadialDim(const double* centerPoint, const double* textMidPoint, - const double* arcPoint, - const char* dimText) +// writeRadialDim +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writeRadialDim(const double* centerPoint, + const double* textMidPoint, + const double* arcPoint, + const char* dimText) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "DIMENSION" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "DIMENSION" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbDimension" << endl; } - (*m_ssEntity) << " 2" << endl; - (*m_ssEntity) << "*" << getLayerName() << endl; // blockName - (*m_ssEntity) << " 10" << endl; // arc center point + (*m_ssEntity) << " 2" << endl; + (*m_ssEntity) << "*" << getLayerName() << endl; // blockName + (*m_ssEntity) << " 10" << endl; // arc center point (*m_ssEntity) << centerPoint[0] << endl; - (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << " 20" << endl; (*m_ssEntity) << centerPoint[1] << endl; - (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << " 30" << endl; (*m_ssEntity) << centerPoint[2] << endl; - (*m_ssEntity) << " 11" << endl; //text mid point - (*m_ssEntity) << textMidPoint[0] << endl; - (*m_ssEntity) << " 21" << endl; - (*m_ssEntity) << textMidPoint[1] << endl; - (*m_ssEntity) << " 31" << endl; - (*m_ssEntity) << textMidPoint[2] << endl; - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << 4 << endl; // dimType 4 = Radius -// (*m_ssEntity) << " 71" << endl; // not R12 -// (*m_ssEntity) << 1 << endl; // attachPoint 5 = middle center - (*m_ssEntity) << " 1" << endl; - (*m_ssEntity) << dimText << endl; - (*m_ssEntity) << " 3" << endl; - (*m_ssEntity) << "STANDARD" << endl; //style -//radial dims + (*m_ssEntity) << " 11" << endl; // text mid point + (*m_ssEntity) << textMidPoint[0] << endl; + (*m_ssEntity) << " 21" << endl; + (*m_ssEntity) << textMidPoint[1] << endl; + (*m_ssEntity) << " 31" << endl; + (*m_ssEntity) << textMidPoint[2] << endl; + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << 4 << endl; // dimType 4 = Radius + // (*m_ssEntity) << " 71" << endl; // not R12 + // (*m_ssEntity) << 1 << endl; // attachPoint 5 = middle center + (*m_ssEntity) << " 1" << endl; + (*m_ssEntity) << dimText << endl; + (*m_ssEntity) << " 3" << endl; + (*m_ssEntity) << "STANDARD" << endl; // style + // radial dims if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbRadialDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbRadialDimension" << endl; } - (*m_ssEntity) << " 15" << endl; - (*m_ssEntity) << arcPoint[0] << endl; - (*m_ssEntity) << " 25" << endl; - (*m_ssEntity) << arcPoint[1] << endl; - (*m_ssEntity) << " 35" << endl; - (*m_ssEntity) << arcPoint[2] << endl; - (*m_ssEntity) << " 40" << endl; // leader length???? - (*m_ssEntity) << 0 << endl; + (*m_ssEntity) << " 15" << endl; + (*m_ssEntity) << arcPoint[0] << endl; + (*m_ssEntity) << " 25" << endl; + (*m_ssEntity) << arcPoint[1] << endl; + (*m_ssEntity) << " 35" << endl; + (*m_ssEntity) << arcPoint[2] << endl; + (*m_ssEntity) << " 40" << endl; // leader length???? + (*m_ssEntity) << 0 << endl; writeDimBlockPreamble(); writeRadialDimBlock(centerPoint, textMidPoint, arcPoint, dimText); @@ -1312,63 +1337,64 @@ void CDxfWrite::writeRadialDim(const double* centerPoint, const double* textMidP } //*************************** -//writeDiametricDim -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeDiametricDim +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeDiametricDim(const double* textMidPoint, - const double* arcPoint1, const double* arcPoint2, - const char* dimText) + const double* arcPoint1, + const double* arcPoint2, + const char* dimText) { - (*m_ssEntity) << " 0" << endl; - (*m_ssEntity) << "DIMENSION" << endl; - (*m_ssEntity) << " 5" << endl; + (*m_ssEntity) << " 0" << endl; + (*m_ssEntity) << "DIMENSION" << endl; + (*m_ssEntity) << " 5" << endl; (*m_ssEntity) << getEntityHandle() << endl; if (m_version > 12) { - (*m_ssEntity) << "330" << endl; - (*m_ssEntity) << m_saveModelSpaceHandle << endl; - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbEntity" << endl; + (*m_ssEntity) << "330" << endl; + (*m_ssEntity) << m_saveModelSpaceHandle << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbEntity" << endl; } - (*m_ssEntity) << " 8" << endl; - (*m_ssEntity) << getLayerName() << endl; + (*m_ssEntity) << " 8" << endl; + (*m_ssEntity) << getLayerName() << endl; if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbDimension" << endl; } - (*m_ssEntity) << " 2" << endl; - (*m_ssEntity) << "*" << getLayerName() << endl; // blockName - (*m_ssEntity) << " 10" << endl; - (*m_ssEntity) << arcPoint1[0] << endl; - (*m_ssEntity) << " 20" << endl; - (*m_ssEntity) << arcPoint1[1] << endl; - (*m_ssEntity) << " 30" << endl; - (*m_ssEntity) << arcPoint1[2] << endl; - (*m_ssEntity) << " 11" << endl; //text mid point - (*m_ssEntity) << textMidPoint[0] << endl; - (*m_ssEntity) << " 21" << endl; - (*m_ssEntity) << textMidPoint[1] << endl; - (*m_ssEntity) << " 31" << endl; - (*m_ssEntity) << textMidPoint[2] << endl; - (*m_ssEntity) << " 70" << endl; - (*m_ssEntity) << 3 << endl; // dimType 3 = Diameter -// (*m_ssEntity) << " 71" << endl; // not R12 -// (*m_ssEntity) << 5 << endl; // attachPoint 5 = middle center - (*m_ssEntity) << " 1" << endl; - (*m_ssEntity) << dimText << endl; - (*m_ssEntity) << " 3" << endl; - (*m_ssEntity) << "STANDARD" << endl; //style -//diametric dims + (*m_ssEntity) << " 2" << endl; + (*m_ssEntity) << "*" << getLayerName() << endl; // blockName + (*m_ssEntity) << " 10" << endl; + (*m_ssEntity) << arcPoint1[0] << endl; + (*m_ssEntity) << " 20" << endl; + (*m_ssEntity) << arcPoint1[1] << endl; + (*m_ssEntity) << " 30" << endl; + (*m_ssEntity) << arcPoint1[2] << endl; + (*m_ssEntity) << " 11" << endl; // text mid point + (*m_ssEntity) << textMidPoint[0] << endl; + (*m_ssEntity) << " 21" << endl; + (*m_ssEntity) << textMidPoint[1] << endl; + (*m_ssEntity) << " 31" << endl; + (*m_ssEntity) << textMidPoint[2] << endl; + (*m_ssEntity) << " 70" << endl; + (*m_ssEntity) << 3 << endl; // dimType 3 = Diameter + // (*m_ssEntity) << " 71" << endl; // not R12 + // (*m_ssEntity) << 5 << endl; // attachPoint 5 = middle center + (*m_ssEntity) << " 1" << endl; + (*m_ssEntity) << dimText << endl; + (*m_ssEntity) << " 3" << endl; + (*m_ssEntity) << "STANDARD" << endl; // style + // diametric dims if (m_version > 12) { - (*m_ssEntity) << "100" << endl; - (*m_ssEntity) << "AcDbDiametricDimension" << endl; + (*m_ssEntity) << "100" << endl; + (*m_ssEntity) << "AcDbDiametricDimension" << endl; } - (*m_ssEntity) << " 15" << endl; - (*m_ssEntity) << arcPoint2[0] << endl; - (*m_ssEntity) << " 25" << endl; - (*m_ssEntity) << arcPoint2[1] << endl; - (*m_ssEntity) << " 35" << endl; - (*m_ssEntity) << arcPoint2[2] << endl; - (*m_ssEntity) << " 40" << endl; // leader length???? - (*m_ssEntity) << 0 << endl; + (*m_ssEntity) << " 15" << endl; + (*m_ssEntity) << arcPoint2[0] << endl; + (*m_ssEntity) << " 25" << endl; + (*m_ssEntity) << arcPoint2[1] << endl; + (*m_ssEntity) << " 35" << endl; + (*m_ssEntity) << arcPoint2[2] << endl; + (*m_ssEntity) << " 40" << endl; // leader length???? + (*m_ssEntity) << 0 << endl; writeDimBlockPreamble(); writeDiametricDimBlock(textMidPoint, arcPoint1, arcPoint2, dimText); @@ -1376,110 +1402,115 @@ void CDxfWrite::writeDiametricDim(const double* textMidPoint, } //*************************** -//writeDimBlockPreamble -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeDimBlockPreamble +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeDimBlockPreamble() { if (m_version > 12) { std::string blockName("*"); blockName += getLayerName(); m_saveBlkRecordHandle = getBlkRecordHandle(); - addBlockName(blockName,m_saveBlkRecordHandle); + addBlockName(blockName, m_saveBlkRecordHandle); } m_currentBlock = getBlockHandle(); - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << "BLOCK" << endl; - (*m_ssBlock) << " 5" << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << "BLOCK" << endl; + (*m_ssBlock) << " 5" << endl; (*m_ssBlock) << m_currentBlock << endl; if (m_version > 12) { - (*m_ssBlock) << "330" << endl; + (*m_ssBlock) << "330" << endl; (*m_ssBlock) << m_saveBlkRecordHandle << endl; - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbEntity" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbEntity" << endl; } - (*m_ssBlock) << " 8" << endl; + (*m_ssBlock) << " 8" << endl; (*m_ssBlock) << getLayerName() << endl; if (m_version > 12) { - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbBlockBegin" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbBlockBegin" << endl; } - (*m_ssBlock) << " 2" << endl; - (*m_ssBlock) << "*" << getLayerName() << endl; // blockName - (*m_ssBlock) << " 70" << endl; - (*m_ssBlock) << " 1" << endl; - (*m_ssBlock) << " 10" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 20" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 30" << endl; - (*m_ssBlock) << 0.0 << endl; - (*m_ssBlock) << " 3" << endl; - (*m_ssBlock) << "*" << getLayerName() << endl; // blockName - (*m_ssBlock) << " 1" << endl; - (*m_ssBlock) << " " << endl; + (*m_ssBlock) << " 2" << endl; + (*m_ssBlock) << "*" << getLayerName() << endl; // blockName + (*m_ssBlock) << " 70" << endl; + (*m_ssBlock) << " 1" << endl; + (*m_ssBlock) << " 10" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 20" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 30" << endl; + (*m_ssBlock) << 0.0 << endl; + (*m_ssBlock) << " 3" << endl; + (*m_ssBlock) << "*" << getLayerName() << endl; // blockName + (*m_ssBlock) << " 1" << endl; + (*m_ssBlock) << " " << endl; } //*************************** -//writeBlockTrailer -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeBlockTrailer +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeBlockTrailer() { - (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << " 0" << endl; (*m_ssBlock) << "ENDBLK" << endl; - (*m_ssBlock) << " 5" << endl; + (*m_ssBlock) << " 5" << endl; (*m_ssBlock) << getBlockHandle() << endl; if (m_version > 12) { - (*m_ssBlock) << "330" << endl; - (*m_ssBlock) << m_saveBlkRecordHandle << endl; - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbEntity" << endl; + (*m_ssBlock) << "330" << endl; + (*m_ssBlock) << m_saveBlkRecordHandle << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbEntity" << endl; } -// (*m_ssBlock) << " 67" << endl; -// (*m_ssBlock) << "1" << endl; - (*m_ssBlock) << " 8" << endl; + // (*m_ssBlock) << " 67" << endl; + // (*m_ssBlock) << "1" << endl; + (*m_ssBlock) << " 8" << endl; (*m_ssBlock) << getLayerName() << endl; if (m_version > 12) { - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbBlockEnd" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbBlockEnd" << endl; } } //*************************** -//writeLinearDimBlock -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writeLinearDimBlock(const double* textMidPoint, const double* dimLine, - const double* e1Start, const double* e2Start, - const char* dimText, int type) +// writeLinearDimBlock +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writeLinearDimBlock(const double* textMidPoint, + const double* dimLine, + const double* e1Start, + const double* e2Start, + const char* dimText, + int type) { - Base::Vector3d e1S(e1Start[0],e1Start[1],e1Start[2]); - Base::Vector3d e2S(e2Start[0],e2Start[1],e2Start[2]); - Base::Vector3d dl(dimLine[0],dimLine[1],dimLine[2]); //point on DimLine (somewhere!) - Base::Vector3d perp = dl.DistanceToLineSegment(e2S,e1S); + Base::Vector3d e1S(e1Start[0], e1Start[1], e1Start[2]); + Base::Vector3d e2S(e2Start[0], e2Start[1], e2Start[2]); + Base::Vector3d dl(dimLine[0], dimLine[1], dimLine[2]); // point on DimLine (somewhere!) + Base::Vector3d perp = dl.DistanceToLineSegment(e2S, e1S); Base::Vector3d e1E = e1S - perp; Base::Vector3d e2E = e2S - perp; Base::Vector3d para = e1E - e2E; - Base::Vector3d X(1.0,0.0,0.0); + Base::Vector3d X(1.0, 0.0, 0.0); double angle = para.GetAngle(X); angle = angle * 180.0 / M_PI; if (type == ALIGNED) { - //NOP - } else if (type == HORIZONTAL) { + // NOP + } + else if (type == HORIZONTAL) { double x = e1Start[0]; double y = dimLine[1]; e1E = Base::Vector3d(x, y, 0.0); x = e2Start[0]; e2E = Base::Vector3d(x, y, 0.0); - perp = Base::Vector3d(0, -1, 0); //down - para = Base::Vector3d(1, 0, 0); //right + perp = Base::Vector3d(0, -1, 0); // down + para = Base::Vector3d(1, 0, 0); // right if (dimLine[1] > e1Start[1]) { - perp = Base::Vector3d(0, 1, 0); //up + perp = Base::Vector3d(0, 1, 0); // up } if (e1Start[0] > e2Start[0]) { - para = Base::Vector3d(-1, 0, 0); //left + para = Base::Vector3d(-1, 0, 0); // left } angle = 0; - } else if (type == VERTICAL) { + } + else if (type == VERTICAL) { double x = dimLine[0]; double y = e1Start[1]; e1E = Base::Vector3d(x, y, 0.0); @@ -1496,206 +1527,226 @@ void CDxfWrite::writeLinearDimBlock(const double* textMidPoint, const double* di angle = 90; } - double arrowLen = 5.0; //magic number - double arrowWidth = arrowLen/6.0/2.0; //magic number calc! + double arrowLen = 5.0; // magic number + double arrowWidth = arrowLen / 6.0 / 2.0; // magic number calc! - putLine(e2S, e2E, - m_ssBlock, getBlockHandle(), + putLine(e2S, e2E, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); + + putLine(e1S, e1E, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); + + putLine(e1E, e2E, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); + + putText(dimText, + toVector3d(textMidPoint), + toVector3d(dimLine), + 3.5, + 1, + m_ssBlock, + getBlockHandle(), m_saveBlkRecordHandle); - putLine(e1S, e1E, - m_ssBlock, getBlockHandle(), - m_saveBlkRecordHandle); - - putLine(e1E, e2E, - m_ssBlock, getBlockHandle(), - m_saveBlkRecordHandle); - - putText(dimText,toVector3d(textMidPoint), toVector3d(dimLine),3.5,1, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); - perp.Normalize(); para.Normalize(); Base::Vector3d arrowStart = e1E; - Base::Vector3d barb1 = arrowStart + perp*arrowWidth - para*arrowLen; - Base::Vector3d barb2 = arrowStart - perp*arrowWidth - para*arrowLen; - putArrow(arrowStart, barb1, barb2, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + Base::Vector3d barb1 = arrowStart + perp * arrowWidth - para * arrowLen; + Base::Vector3d barb2 = arrowStart - perp * arrowWidth - para * arrowLen; + putArrow(arrowStart, barb1, barb2, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); arrowStart = e2E; - barb1 = arrowStart + perp*arrowWidth + para*arrowLen; - barb2 = arrowStart - perp*arrowWidth + para*arrowLen; - putArrow(arrowStart, barb1, barb2, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + barb1 = arrowStart + perp * arrowWidth + para * arrowLen; + barb2 = arrowStart - perp * arrowWidth + para * arrowLen; + putArrow(arrowStart, barb1, barb2, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); } //*************************** -//writeAngularDimBlock -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writeAngularDimBlock(const double* textMidPoint, const double* lineDefPoint, - const double* startExt1, const double* endExt1, - const double* startExt2, const double* endExt2, - const char* dimText) +// writeAngularDimBlock +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writeAngularDimBlock(const double* textMidPoint, + const double* lineDefPoint, + const double* startExt1, + const double* endExt1, + const double* startExt2, + const double* endExt2, + const char* dimText) { - Base::Vector3d e1S(startExt1[0],startExt1[1],startExt1[2]); //apex - Base::Vector3d e2S(startExt2[0],startExt2[1],startExt2[2]); - Base::Vector3d e1E(endExt1[0],endExt1[1],endExt1[2]); - Base::Vector3d e2E(endExt2[0],endExt2[1],endExt2[2]); + Base::Vector3d e1S(startExt1[0], startExt1[1], startExt1[2]); // apex + Base::Vector3d e2S(startExt2[0], startExt2[1], startExt2[2]); + Base::Vector3d e1E(endExt1[0], endExt1[1], endExt1[2]); + Base::Vector3d e2E(endExt2[0], endExt2[1], endExt2[2]); Base::Vector3d e1 = e1E - e1S; Base::Vector3d e2 = e2E - e2S; - double startAngle = atan2(e2.y,e2.x); - double endAngle = atan2(e1.y,e1.x); + double startAngle = atan2(e2.y, e2.x); + double endAngle = atan2(e1.y, e1.x); double span = fabs(endAngle - startAngle); double offset = span * 0.10; if (startAngle < 0) { - startAngle += 2.0 * M_PI; + startAngle += 2.0 * M_PI; } if (endAngle < 0) { - endAngle += 2.0 * M_PI; + endAngle += 2.0 * M_PI; } - Base::Vector3d startOff(cos(startAngle + offset),sin(startAngle + offset),0.0); - Base::Vector3d endOff(cos(endAngle - offset),sin(endAngle - offset),0.0); + Base::Vector3d startOff(cos(startAngle + offset), sin(startAngle + offset), 0.0); + Base::Vector3d endOff(cos(endAngle - offset), sin(endAngle - offset), 0.0); startAngle = startAngle * 180.0 / M_PI; endAngle = endAngle * 180.0 / M_PI; - Base::Vector3d linePt(lineDefPoint[0],lineDefPoint[1],lineDefPoint[2]); + Base::Vector3d linePt(lineDefPoint[0], lineDefPoint[1], lineDefPoint[2]); double radius = (e2S - linePt).Length(); - (*m_ssBlock) << " 0" << endl; - (*m_ssBlock) << "ARC" << endl; //dimline arc - (*m_ssBlock) << " 5" << endl; + (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << "ARC" << endl; // dimline arc + (*m_ssBlock) << " 5" << endl; (*m_ssBlock) << getBlockHandle() << endl; if (m_version > 12) { - (*m_ssBlock) << "330" << endl; + (*m_ssBlock) << "330" << endl; (*m_ssBlock) << m_saveBlkRecordHandle << endl; - (*m_ssBlock) << "100" << endl; - (*m_ssBlock) << "AcDbEntity" << endl; + (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "AcDbEntity" << endl; } - (*m_ssBlock) << " 8" << endl; - (*m_ssBlock) << "0" << endl; -// (*m_ssBlock) << " 62" << endl; -// (*m_ssBlock) << " 0" << endl; + (*m_ssBlock) << " 8" << endl; + (*m_ssBlock) << "0" << endl; + // (*m_ssBlock) << " 62" << endl; + // (*m_ssBlock) << " 0" << endl; if (m_version > 12) { - (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "100" << endl; (*m_ssBlock) << "AcDbCircle" << endl; } - (*m_ssBlock) << " 10" << endl; - (*m_ssBlock) << startExt2[0] << endl; //arc center - (*m_ssBlock) << " 20" << endl; - (*m_ssBlock) << startExt2[1] << endl; - (*m_ssBlock) << " 30" << endl; - (*m_ssBlock) << startExt2[2] << endl; - (*m_ssBlock) << " 40" << endl; - (*m_ssBlock) << radius << endl; //radius + (*m_ssBlock) << " 10" << endl; + (*m_ssBlock) << startExt2[0] << endl; // arc center + (*m_ssBlock) << " 20" << endl; + (*m_ssBlock) << startExt2[1] << endl; + (*m_ssBlock) << " 30" << endl; + (*m_ssBlock) << startExt2[2] << endl; + (*m_ssBlock) << " 40" << endl; + (*m_ssBlock) << radius << endl; // radius if (m_version > 12) { - (*m_ssBlock) << "100" << endl; + (*m_ssBlock) << "100" << endl; (*m_ssBlock) << "AcDbArc" << endl; } - (*m_ssBlock) << " 50" << endl; - (*m_ssBlock) << startAngle << endl; //start angle - (*m_ssBlock) << " 51" << endl; - (*m_ssBlock) << endAngle << endl; //end angle + (*m_ssBlock) << " 50" << endl; + (*m_ssBlock) << startAngle << endl; // start angle + (*m_ssBlock) << " 51" << endl; + (*m_ssBlock) << endAngle << endl; // end angle - putText(dimText,toVector3d(textMidPoint), toVector3d(textMidPoint),3.5,1, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + putText(dimText, + toVector3d(textMidPoint), + toVector3d(textMidPoint), + 3.5, + 1, + m_ssBlock, + getBlockHandle(), + m_saveBlkRecordHandle); e1.Normalize(); e2.Normalize(); Base::Vector3d arrow1Start = e1S + e1 * radius; Base::Vector3d arrow2Start = e2S + e2 * radius; - //wf: idk why the Tan pts have to be reversed. something to do with CW angles in Dxf? + // wf: idk why the Tan pts have to be reversed. something to do with CW angles in Dxf? Base::Vector3d endTan = e1S + (startOff * radius); Base::Vector3d startTan = e2S + (endOff * radius); Base::Vector3d tanP1 = (arrow1Start - startTan).Normalize(); - Base::Vector3d perp1(-tanP1.y,tanP1.x,tanP1.z); + Base::Vector3d perp1(-tanP1.y, tanP1.x, tanP1.z); Base::Vector3d tanP2 = (arrow2Start - endTan).Normalize(); - Base::Vector3d perp2(-tanP2.y,tanP2.x,tanP2.z); - double arrowLen = 5.0; //magic number - double arrowWidth = arrowLen/6.0/2.0; //magic number calc! + Base::Vector3d perp2(-tanP2.y, tanP2.x, tanP2.z); + double arrowLen = 5.0; // magic number + double arrowWidth = arrowLen / 6.0 / 2.0; // magic number calc! - Base::Vector3d barb1 = arrow1Start + perp1*arrowWidth - tanP1*arrowLen; - Base::Vector3d barb2 = arrow1Start - perp1*arrowWidth - tanP1*arrowLen; + Base::Vector3d barb1 = arrow1Start + perp1 * arrowWidth - tanP1 * arrowLen; + Base::Vector3d barb2 = arrow1Start - perp1 * arrowWidth - tanP1 * arrowLen; - putArrow(arrow1Start, barb1, barb2, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + putArrow(arrow1Start, barb1, barb2, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); - barb1 = arrow2Start + perp2*arrowWidth - tanP2*arrowLen; - barb2 = arrow2Start - perp2*arrowWidth - tanP2*arrowLen; + barb1 = arrow2Start + perp2 * arrowWidth - tanP2 * arrowLen; + barb2 = arrow2Start - perp2 * arrowWidth - tanP2 * arrowLen; - putArrow(arrow2Start, barb1, barb2, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + putArrow(arrow2Start, barb1, barb2, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); } //*************************** -//writeRadialDimBlock -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project -void CDxfWrite::writeRadialDimBlock(const double* centerPoint, const double* textMidPoint, - const double* arcPoint, const char* dimText) +// writeRadialDimBlock +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +void CDxfWrite::writeRadialDimBlock(const double* centerPoint, + const double* textMidPoint, + const double* arcPoint, + const char* dimText) { - putLine(toVector3d(centerPoint), toVector3d(arcPoint), - m_ssBlock, getBlockHandle(), + putLine(toVector3d(centerPoint), + toVector3d(arcPoint), + m_ssBlock, + getBlockHandle(), m_saveBlkRecordHandle); - putText(dimText,toVector3d(textMidPoint), toVector3d(textMidPoint),3.5,1, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + putText(dimText, + toVector3d(textMidPoint), + toVector3d(textMidPoint), + 3.5, + 1, + m_ssBlock, + getBlockHandle(), + m_saveBlkRecordHandle); - Base::Vector3d c(centerPoint[0],centerPoint[1],centerPoint[2]); - Base::Vector3d a(arcPoint[0],arcPoint[1],arcPoint[2]); + Base::Vector3d c(centerPoint[0], centerPoint[1], centerPoint[2]); + Base::Vector3d a(arcPoint[0], arcPoint[1], arcPoint[2]); Base::Vector3d para = a - c; - double arrowLen = 5.0; //magic number - double arrowWidth = arrowLen/6.0/2.0; //magic number calc! + double arrowLen = 5.0; // magic number + double arrowWidth = arrowLen / 6.0 / 2.0; // magic number calc! para.Normalize(); - Base::Vector3d perp(-para.y,para.x,para.z); + Base::Vector3d perp(-para.y, para.x, para.z); Base::Vector3d arrowStart = a; - Base::Vector3d barb1 = arrowStart + perp*arrowWidth - para*arrowLen; - Base::Vector3d barb2 = arrowStart - perp*arrowWidth - para*arrowLen; + Base::Vector3d barb1 = arrowStart + perp * arrowWidth - para * arrowLen; + Base::Vector3d barb2 = arrowStart - perp * arrowWidth - para * arrowLen; - putArrow(arrowStart, barb1, barb2, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + putArrow(arrowStart, barb1, barb2, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); } //*************************** -//writeDiametricDimBlock -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeDiametricDimBlock +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeDiametricDimBlock(const double* textMidPoint, - const double* arcPoint1, const double* arcPoint2, - const char* dimText) + const double* arcPoint1, + const double* arcPoint2, + const char* dimText) { - putLine(toVector3d(arcPoint1), toVector3d(arcPoint2), - m_ssBlock, getBlockHandle(), + putLine(toVector3d(arcPoint1), + toVector3d(arcPoint2), + m_ssBlock, + getBlockHandle(), m_saveBlkRecordHandle); - putText(dimText,toVector3d(textMidPoint), toVector3d(textMidPoint),3.5,1, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + putText(dimText, + toVector3d(textMidPoint), + toVector3d(textMidPoint), + 3.5, + 1, + m_ssBlock, + getBlockHandle(), + m_saveBlkRecordHandle); - Base::Vector3d a1(arcPoint1[0],arcPoint1[1],arcPoint1[2]); - Base::Vector3d a2(arcPoint2[0],arcPoint2[1],arcPoint2[2]); + Base::Vector3d a1(arcPoint1[0], arcPoint1[1], arcPoint1[2]); + Base::Vector3d a2(arcPoint2[0], arcPoint2[1], arcPoint2[2]); Base::Vector3d para = a2 - a1; - double arrowLen = 5.0; //magic number - double arrowWidth = arrowLen/6.0/2.0; //magic number calc! + double arrowLen = 5.0; // magic number + double arrowWidth = arrowLen / 6.0 / 2.0; // magic number calc! para.Normalize(); - Base::Vector3d perp(-para.y,para.x,para.z); + Base::Vector3d perp(-para.y, para.x, para.z); Base::Vector3d arrowStart = a1; - Base::Vector3d barb1 = arrowStart + perp*arrowWidth + para*arrowLen; - Base::Vector3d barb2 = arrowStart - perp*arrowWidth + para*arrowLen; + Base::Vector3d barb1 = arrowStart + perp * arrowWidth + para * arrowLen; + Base::Vector3d barb2 = arrowStart - perp * arrowWidth + para * arrowLen; - putArrow(arrowStart, barb1, barb2, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); + putArrow(arrowStart, barb1, barb2, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); arrowStart = a2; - barb1 = arrowStart + perp*arrowWidth - para*arrowLen; - barb2 = arrowStart - perp*arrowWidth - para*arrowLen; - putArrow(arrowStart, barb1, barb2, - m_ssBlock,getBlockHandle(),m_saveBlkRecordHandle); - + barb1 = arrowStart + perp * arrowWidth - para * arrowLen; + barb2 = arrowStart - perp * arrowWidth - para * arrowLen; + putArrow(arrowStart, barb1, barb2, m_ssBlock, getBlockHandle(), m_saveBlkRecordHandle); } //*************************** -//writeBlocksSection -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeBlocksSection +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeBlocksSection() { if (m_version < 14) { @@ -1705,16 +1756,16 @@ void CDxfWrite::writeBlocksSection() (*m_ofs) << getPlateFile(fileSpec); } - //write blocks content + // write blocks content (*m_ofs) << (*m_ssBlock).str(); - (*m_ofs) << " 0" << endl; - (*m_ofs) << "ENDSEC" << endl; + (*m_ofs) << " 0" << endl; + (*m_ofs) << "ENDSEC" << endl; } //*************************** -//writeEntitiesSection -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeEntitiesSection +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeEntitiesSection() { std::stringstream ss; @@ -1722,17 +1773,17 @@ void CDxfWrite::writeEntitiesSection() std::string fileSpec = m_dataDir + ss.str(); (*m_ofs) << getPlateFile(fileSpec); - //write entities content + // write entities content (*m_ofs) << (*m_ssEntity).str(); - (*m_ofs) << " 0" << endl; - (*m_ofs) << "ENDSEC" << endl; + (*m_ofs) << " 0" << endl; + (*m_ofs) << "ENDSEC" << endl; } //*************************** -//writeObjectsSection -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// writeObjectsSection +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project void CDxfWrite::writeObjectsSection() { if (m_version < 14) { @@ -1747,19 +1798,19 @@ void CDxfWrite::writeObjectsSection() CDxfRead::CDxfRead(const char* filepath) { // start the file - memset( m_str, '\0', sizeof(m_str) ); - memset( m_unused_line, '\0', sizeof(m_unused_line) ); + memset(m_str, '\0', sizeof(m_str)); + memset(m_unused_line, '\0', sizeof(m_unused_line)); m_fail = false; m_ColorIndex = 0; m_eUnits = eMillimeters; m_measurement_inch = false; strcpy(m_layer_name, "0"); // Default layer name - memset( m_section_name, '\0', sizeof(m_section_name) ); - memset( m_block_name, '\0', sizeof(m_block_name) ); + memset(m_section_name, '\0', sizeof(m_section_name)); + memset(m_block_name, '\0', sizeof(m_block_name)); m_ignore_errors = true; m_ifs = new ifstream(filepath); - if(!(*m_ifs)){ + if (!(*m_ifs)) { m_fail = true; printf("DXF file didn't load\n"); return; @@ -1779,45 +1830,64 @@ CDxfRead::~CDxfRead() delete m_encoding; } -double CDxfRead::mm( double value ) const +double CDxfRead::mm(double value) const { - //re #6461 - //this if handles situation of malformed DXF file where - //MEASUREMENT specifies English units, but - //INSUNITS specifies millimeters or is not specified + // re #6461 + // this if handles situation of malformed DXF file where + // MEASUREMENT specifies English units, but + // INSUNITS specifies millimeters or is not specified //(millimeters is our default) - if(m_measurement_inch && - (m_eUnits == eMillimeters)) - { + if (m_measurement_inch && (m_eUnits == eMillimeters)) { value *= 25.4; } - switch(m_eUnits) - { - case eUnspecified: return(value * 1.0); // We don't know any better. - case eInches: return(value * 25.4); - case eFeet: return(value * 25.4 * 12); - case eMiles: return(value * 1609344.0); - case eMillimeters: return(value * 1.0); - case eCentimeters: return(value * 10.0); - case eMeters: return(value * 1000.0); - case eKilometers: return(value * 1000000.0); - case eMicroinches: return(value * 25.4 / 1000.0); - case eMils: return(value * 25.4 / 1000.0); - case eYards: return(value * 3 * 12 * 25.4); - case eAngstroms: return(value * 0.0000001); - case eNanometers: return(value * 0.000001); - case eMicrons: return(value * 0.001); - case eDecimeters: return(value * 100.0); - case eDekameters: return(value * 10000.0); - case eHectometers: return(value * 100000.0); - case eGigameters: return(value * 1000000000000.0); - case eAstronomicalUnits: return(value * 149597870690000.0); - case eLightYears: return(value * 9454254955500000000.0); - case eParsecs: return(value * 30856774879000000000.0); - default: return(value * 1.0); // We don't know any better. - } // End switch -} // End mm() method + switch (m_eUnits) { + case eUnspecified: + return (value * 1.0); // We don't know any better. + case eInches: + return (value * 25.4); + case eFeet: + return (value * 25.4 * 12); + case eMiles: + return (value * 1609344.0); + case eMillimeters: + return (value * 1.0); + case eCentimeters: + return (value * 10.0); + case eMeters: + return (value * 1000.0); + case eKilometers: + return (value * 1000000.0); + case eMicroinches: + return (value * 25.4 / 1000.0); + case eMils: + return (value * 25.4 / 1000.0); + case eYards: + return (value * 3 * 12 * 25.4); + case eAngstroms: + return (value * 0.0000001); + case eNanometers: + return (value * 0.000001); + case eMicrons: + return (value * 0.001); + case eDecimeters: + return (value * 100.0); + case eDekameters: + return (value * 10000.0); + case eHectometers: + return (value * 100000.0); + case eGigameters: + return (value * 1000000000000.0); + case eAstronomicalUnits: + return (value * 149597870690000.0); + case eLightYears: + return (value * 9454254955500000000.0); + case eParsecs: + return (value * 30856774879000000000.0); + default: + return (value * 1.0); // We don't know any better. + } // End switch +} // End mm() method bool CDxfRead::ReadLine() @@ -1826,71 +1896,105 @@ bool CDxfRead::ReadLine() double e[3] = {0, 0, 0}; bool hidden = false; - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { - printf("CDxfRead::ReadLine() Failed to read integer from '%s'\n", m_str ); + if (sscanf(m_str, "%d", &n) != 1) { + printf("CDxfRead::ReadLine() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found, so finish with line - ResolveColorIndex(); - OnReadLine(s, e, hidden); - hidden = false; + ResolveColorIndex(); + OnReadLine(s, e, hidden); + hidden = false; return true; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; - case 6: // line style name follows + case 6: // line style name follows get_line(); - if(m_str[0] == 'h' || m_str[0] == 'H')hidden = true; + if (m_str[0] == 'h' || m_str[0] == 'H') { + hidden = true; + } break; case 10: // start x get_line(); - ss.str(m_str); ss >> s[0]; s[0] = mm(s[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[0]; + s[0] = mm(s[0]); + if (ss.fail()) { + return false; + } break; case 20: // start y get_line(); - ss.str(m_str); ss >> s[1]; s[1] = mm(s[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[1]; + s[1] = mm(s[1]); + if (ss.fail()) { + return false; + } break; case 30: // start z get_line(); - ss.str(m_str); ss >> s[2]; s[2] = mm(s[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[2]; + s[2] = mm(s[2]); + if (ss.fail()) { + return false; + } break; case 11: // end x get_line(); - ss.str(m_str); ss >> e[0]; e[0] = mm(e[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> e[0]; + e[0] = mm(e[0]); + if (ss.fail()) { + return false; + } break; case 21: // end y get_line(); - ss.str(m_str); ss >> e[1]; e[1] = mm(e[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> e[1]; + e[1] = mm(e[1]); + if (ss.fail()) { + return false; + } break; case 31: // end z get_line(); - ss.str(m_str); ss >> e[2]; e[2] = mm(e[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> e[2]; + e[2] = mm(e[2]); + if (ss.fail()) { + return false; + } break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 100: @@ -1912,9 +2016,10 @@ bool CDxfRead::ReadLine() ResolveColorIndex(); OnReadLine(s, e, false); } - catch(...) - { - if (! IgnoreErrors()) throw; // Re-throw the exception. + catch (...) { + if (!IgnoreErrors()) { + throw; // Re-throw the exception. + } } return false; @@ -1924,27 +2029,25 @@ bool CDxfRead::ReadPoint() { double s[3] = {0, 0, 0}; - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { - printf("CDxfRead::ReadPoint() Failed to read integer from '%s'\n", m_str ); + if (sscanf(m_str, "%d", &n) != 1) { + printf("CDxfRead::ReadPoint() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found, so finish with line - ResolveColorIndex(); + ResolveColorIndex(); OnReadPoint(s); return true; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; @@ -1952,23 +2055,42 @@ bool CDxfRead::ReadPoint() case 10: // start x get_line(); - ss.str(m_str); ss >> s[0]; s[0] = mm(s[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[0]; + s[0] = mm(s[0]); + if (ss.fail()) { + return false; + } break; case 20: // start y get_line(); - ss.str(m_str); ss >> s[1]; s[1] = mm(s[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[1]; + s[1] = mm(s[1]); + if (ss.fail()) { + return false; + } break; case 30: // start z get_line(); - ss.str(m_str); ss >> s[2]; s[2] = mm(s[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[2]; + s[2] = mm(s[2]); + if (ss.fail()) { + return false; + } break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 100: @@ -1984,16 +2106,16 @@ bool CDxfRead::ReadPoint() get_line(); break; } - } try { ResolveColorIndex(); OnReadPoint(s); } - catch(...) - { - if (! IgnoreErrors()) throw; // Re-throw the exception. + catch (...) { + if (!IgnoreErrors()) { + throw; // Re-throw the exception. + } } return false; @@ -2001,81 +2123,112 @@ bool CDxfRead::ReadPoint() bool CDxfRead::ReadArc() { - double start_angle = 0.0;// in degrees + double start_angle = 0.0; // in degrees double end_angle = 0.0; double radius = 0.0; - double c[3] = {0,0,0}; // centre + double c[3] = {0, 0, 0}; // centre double z_extrusion_dir = 1.0; bool hidden = false; - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadArc() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found, so finish with arc - ResolveColorIndex(); - OnReadArc(start_angle, end_angle, radius, c,z_extrusion_dir, hidden); - hidden = false; - return true; + ResolveColorIndex(); + OnReadArc(start_angle, end_angle, radius, c, z_extrusion_dir, hidden); + hidden = false; + return true; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; - case 6: // line style name follows + case 6: // line style name follows get_line(); - if(m_str[0] == 'h' || m_str[0] == 'H')hidden = true; + if (m_str[0] == 'h' || m_str[0] == 'H') { + hidden = true; + } break; case 10: // centre x get_line(); - ss.str(m_str); ss >> c[0]; c[0] = mm(c[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[0]; + c[0] = mm(c[0]); + if (ss.fail()) { + return false; + } break; case 20: // centre y get_line(); - ss.str(m_str); ss >> c[1]; c[1] = mm(c[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[1]; + c[1] = mm(c[1]); + if (ss.fail()) { + return false; + } break; case 30: // centre z get_line(); - ss.str(m_str); ss >> c[2]; c[2] = mm(c[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[2]; + c[2] = mm(c[2]); + if (ss.fail()) { + return false; + } break; case 40: // radius get_line(); - ss.str(m_str); ss >> radius; radius = mm(radius); if(ss.fail()) return false; + ss.str(m_str); + ss >> radius; + radius = mm(radius); + if (ss.fail()) { + return false; + } break; case 50: // start angle get_line(); - ss.str(m_str); ss >> start_angle; if(ss.fail()) return false; + ss.str(m_str); + ss >> start_angle; + if (ss.fail()) { + return false; + } break; case 51: // end angle get_line(); - ss.str(m_str); ss >> end_angle; if(ss.fail()) return false; + ss.str(m_str); + ss >> end_angle; + if (ss.fail()) { + return false; + } break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; - case 100: case 39: case 210: @@ -2084,9 +2237,13 @@ bool CDxfRead::ReadArc() get_line(); break; case 230: - //Z extrusion direction for arc + // Z extrusion direction for arc get_line(); - ss.str(m_str); ss >> z_extrusion_dir; if(ss.fail()) return false; + ss.str(m_str); + ss >> z_extrusion_dir; + if (ss.fail()) { + return false; + } break; default: @@ -2114,154 +2271,258 @@ bool CDxfRead::ReadSpline() double temp_double; - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadSpline() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found, so finish with Spline - ResolveColorIndex(); + ResolveColorIndex(); OnReadSpline(sd); return true; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 210: // normal x get_line(); - ss.str(m_str); ss >> sd.norm[0]; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.norm[0]; + if (ss.fail()) { + return false; + } break; case 220: // normal y get_line(); - ss.str(m_str); ss >> sd.norm[1]; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.norm[1]; + if (ss.fail()) { + return false; + } break; case 230: // normal z get_line(); - ss.str(m_str); ss >> sd.norm[2]; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.norm[2]; + if (ss.fail()) { + return false; + } break; case 70: // flag get_line(); - ss.str(m_str); ss >> sd.flag; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.flag; + if (ss.fail()) { + return false; + } break; case 71: // degree get_line(); - ss.str(m_str); ss >> sd.degree; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.degree; + if (ss.fail()) { + return false; + } break; case 72: // knots get_line(); - ss.str(m_str); ss >> sd.knots; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.knots; + if (ss.fail()) { + return false; + } break; case 73: // control points get_line(); - ss.str(m_str); ss >> sd.control_points; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.control_points; + if (ss.fail()) { + return false; + } break; case 74: // fit points get_line(); - ss.str(m_str); ss >> sd.fit_points; if(ss.fail()) return false; + ss.str(m_str); + ss >> sd.fit_points; + if (ss.fail()) { + return false; + } break; case 12: // starttan x get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.starttanx.push_back(temp_double); break; case 22: // starttan y get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.starttany.push_back(temp_double); break; case 32: // starttan z get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.starttanz.push_back(temp_double); break; case 13: // endtan x get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.endtanx.push_back(temp_double); break; case 23: // endtan y get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.endtany.push_back(temp_double); break; case 33: // endtan z get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.endtanz.push_back(temp_double); break; case 40: // knot get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.knot.push_back(temp_double); break; case 41: // weight get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.weight.push_back(temp_double); break; case 10: // control x get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.controlx.push_back(temp_double); break; case 20: // control y get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.controly.push_back(temp_double); break; case 30: // control z get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.controlz.push_back(temp_double); break; case 11: // fit x get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.fitx.push_back(temp_double); break; case 21: // fit y get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.fity.push_back(temp_double); break; case 31: // fit z get_line(); - ss.str(m_str); ss >> temp_double; temp_double = mm(temp_double); if(ss.fail()) return false; + ss.str(m_str); + ss >> temp_double; + temp_double = mm(temp_double); + if (ss.fail()) { + return false; + } sd.fitz.push_back(temp_double); break; case 42: @@ -2285,21 +2546,19 @@ bool CDxfRead::ReadSpline() bool CDxfRead::ReadCircle() { double radius = 0.0; - double c[3] = {0,0,0}; // centre + double c[3] = {0, 0, 0}; // centre bool hidden = false; - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadCircle() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found, so finish with Circle ResolveColorIndex(); @@ -2307,12 +2566,14 @@ bool CDxfRead::ReadCircle() hidden = false; return true; - case 6: // line style name follows + case 6: // line style name follows get_line(); - if(m_str[0] == 'h' || m_str[0] == 'H')hidden = true; + if (m_str[0] == 'h' || m_str[0] == 'H') { + hidden = true; + } break; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; @@ -2320,27 +2581,51 @@ bool CDxfRead::ReadCircle() case 10: // centre x get_line(); - ss.str(m_str); ss >> c[0]; c[0] = mm(c[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[0]; + c[0] = mm(c[0]); + if (ss.fail()) { + return false; + } break; case 20: // centre y get_line(); - ss.str(m_str); ss >> c[1]; c[1] = mm(c[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[1]; + c[1] = mm(c[1]); + if (ss.fail()) { + return false; + } break; case 30: // centre z get_line(); - ss.str(m_str); ss >> c[2]; c[2] = mm(c[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[2]; + c[2] = mm(c[2]); + if (ss.fail()) { + return false; + } break; case 40: // radius get_line(); - ss.str(m_str); ss >> radius; radius = mm(radius); if(ss.fail()) return false; + ss.str(m_str); + ss >> radius; + radius = mm(radius); + if (ss.fail()) { + return false; + } break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 100: @@ -2365,27 +2650,25 @@ bool CDxfRead::ReadCircle() bool CDxfRead::ReadText() { - double c[3]; // coordinate + double c[3]; // coordinate double height = 0.03082; std::string textPrefix; - memset( c, 0, sizeof(c) ); + memset(c, 0, sizeof(c)); - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadText() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: return false; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; @@ -2393,38 +2676,59 @@ bool CDxfRead::ReadText() case 10: // centre x get_line(); - ss.str(m_str); ss >> c[0]; c[0] = mm(c[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[0]; + c[0] = mm(c[0]); + if (ss.fail()) { + return false; + } break; case 20: // centre y get_line(); - ss.str(m_str); ss >> c[1]; c[1] = mm(c[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[1]; + c[1] = mm(c[1]); + if (ss.fail()) { + return false; + } break; case 30: // centre z get_line(); - ss.str(m_str); ss >> c[2]; c[2] = mm(c[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[2]; + c[2] = mm(c[2]); + if (ss.fail()) { + return false; + } break; case 40: // text height get_line(); - ss.str(m_str); ss >> height; height = mm(height); if(ss.fail()) return false; + ss.str(m_str); + ss >> height; + height = mm(height); + if (ss.fail()) { + return false; + } break; case 3: // Additional text that goes before the type 1 text - // Note that if breaking the text into type-3 records splits a UFT-8 encoding we do the decoding - // after splicing the lines together. I'm not sure if this actually occurs, but handling the text - // this way will treat this condition properly. + // Note that if breaking the text into type-3 records splits a UFT-8 encoding we do + // the decoding after splicing the lines together. I'm not sure if this actually + // occurs, but handling the text this way will treat this condition properly. get_line(); textPrefix.append(m_str); break; case 1: // final text - // Note that we treat this as the end of the TEXT or MTEXT entity but this may cause us to miss - // other properties. Officially the entity ends at the start of the next entity, the BLKEND record - // that ends the containing BLOCK, or the ENDSEC record that ends the ENTITIES section. These are - // all code 0 records. Changing this would require either some sort of peek/pushback ability or the understanding - // that ReadText() and all the other Read... methods return having already read a code 0. + // Note that we treat this as the end of the TEXT or MTEXT entity but this may cause + // us to miss other properties. Officially the entity ends at the start of the next + // entity, the BLKEND record that ends the containing BLOCK, or the ENDSEC record + // that ends the ENTITIES section. These are all code 0 records. Changing this would + // require either some sort of peek/pushback ability or the understanding that + // ReadText() and all the other Read... methods return having already read a code 0. get_line(); textPrefix.append(m_str); ResolveColorIndex(); @@ -2435,12 +2739,16 @@ bool CDxfRead::ReadText() delete utfStr; } } - return(true); + return (true); case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 100: @@ -2464,30 +2772,28 @@ bool CDxfRead::ReadText() bool CDxfRead::ReadEllipse() { - double c[3] = {0,0,0}; // centre - double m[3] = {0,0,0}; //major axis point - double ratio=0; //ratio of major to minor axis - double start=0; //start of arc - double end=0; // end of arc + double c[3] = {0, 0, 0}; // centre + double m[3] = {0, 0, 0}; // major axis point + double ratio = 0; // ratio of major to minor axis + double start = 0; // start of arc + double end = 0; // end of arc - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadEllipse() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found, so finish with Ellipse - ResolveColorIndex(); + ResolveColorIndex(); OnReadEllipse(c, m, ratio, start, end); return true; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; @@ -2495,52 +2801,98 @@ bool CDxfRead::ReadEllipse() case 10: // centre x get_line(); - ss.str(m_str); ss >> c[0]; c[0] = mm(c[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[0]; + c[0] = mm(c[0]); + if (ss.fail()) { + return false; + } break; case 20: // centre y get_line(); - ss.str(m_str); ss >> c[1]; c[1] = mm(c[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[1]; + c[1] = mm(c[1]); + if (ss.fail()) { + return false; + } break; case 30: // centre z get_line(); - ss.str(m_str); ss >> c[2]; c[2] = mm(c[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[2]; + c[2] = mm(c[2]); + if (ss.fail()) { + return false; + } break; case 11: // major x get_line(); - ss.str(m_str); ss >> m[0]; m[0] = mm(m[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> m[0]; + m[0] = mm(m[0]); + if (ss.fail()) { + return false; + } break; case 21: // major y get_line(); - ss.str(m_str); ss >> m[1]; m[1] = mm(m[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> m[1]; + m[1] = mm(m[1]); + if (ss.fail()) { + return false; + } break; case 31: // major z get_line(); - ss.str(m_str); ss >> m[2]; m[2] = mm(m[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> m[2]; + m[2] = mm(m[2]); + if (ss.fail()) { + return false; + } break; case 40: // ratio get_line(); - ss.str(m_str); ss >> ratio; if(ss.fail()) return false; + ss.str(m_str); + ss >> ratio; + if (ss.fail()) { + return false; + } break; case 41: // start get_line(); - ss.str(m_str); ss >> start; if(ss.fail()) return false; + ss.str(m_str); + ss >> start; + if (ss.fail()) { + return false; + } break; case 42: // end get_line(); - ss.str(m_str); ss >> end; if(ss.fail()) return false; + ss.str(m_str); + ss >> end; + if (ss.fail()) { + return false; + } break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 100: case 210: @@ -2572,27 +2924,25 @@ static double poly_first_x; static double poly_first_y; static double poly_first_z; -static void AddPolyLinePoint(CDxfRead* dxf_read, double x, double y, double z, bool bulge_found, double bulge) +static void +AddPolyLinePoint(CDxfRead* dxf_read, double x, double y, double z, bool bulge_found, double bulge) { try { - if(poly_prev_found) - { + if (poly_prev_found) { bool arc_done = false; - if(poly_prev_bulge_found) - { + if (poly_prev_bulge_found) { double cot = 0.5 * ((1.0 / poly_prev_bulge) - poly_prev_bulge); double cx = ((poly_prev_x + x) - ((y - poly_prev_y) * cot)) / 2.0; double cy = ((poly_prev_y + y) + ((x - poly_prev_x) * cot)) / 2.0; double ps[3] = {poly_prev_x, poly_prev_y, poly_prev_z}; double pe[3] = {x, y, z}; - double pc[3] = {cx, cy, (poly_prev_z + z)/2.0}; + double pc[3] = {cx, cy, (poly_prev_z + z) / 2.0}; dxf_read->OnReadArc(ps, pe, pc, poly_prev_bulge >= 0, false); arc_done = true; } - if(!arc_done) - { + if (!arc_done) { double s[3] = {poly_prev_x, poly_prev_y, poly_prev_z}; double e[3] = {x, y, z}; dxf_read->OnReadLine(s, e, false); @@ -2603,8 +2953,7 @@ static void AddPolyLinePoint(CDxfRead* dxf_read, double x, double y, double z, b poly_prev_x = x; poly_prev_y = y; poly_prev_z = z; - if(!poly_first_found) - { + if (!poly_first_found) { poly_first_x = x; poly_first_y = y; poly_first_z = z; @@ -2613,9 +2962,10 @@ static void AddPolyLinePoint(CDxfRead* dxf_read, double x, double y, double z, b poly_prev_bulge_found = bulge_found; poly_prev_bulge = bulge; } - catch(...) - { - if (! dxf_read->IgnoreErrors()) throw; // Re-throw it. + catch (...) { + if (!dxf_read->IgnoreErrors()) { + throw; // Re-throw it. + } } } @@ -2640,23 +2990,21 @@ bool CDxfRead::ReadLwPolyLine() int flags; bool next_item_found = false; - while(!((*m_ifs).eof()) && !next_item_found) - { + while (!((*m_ifs).eof()) && !next_item_found) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadLwPolyLine() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found - ResolveColorIndex(); - if(x_found && y_found){ + ResolveColorIndex(); + if (x_found && y_found) { // add point AddPolyLinePoint(this, x, y, z, bulge_found, bulge); bulge_found = false; @@ -2665,51 +3013,75 @@ bool CDxfRead::ReadLwPolyLine() } next_item_found = true; break; - case 8: // Layer name follows + case 8: // Layer name follows get_line(); strcpy(m_layer_name, m_str); break; case 10: // x get_line(); - if(x_found && y_found){ + if (x_found && y_found) { // add point AddPolyLinePoint(this, x, y, z, bulge_found, bulge); bulge_found = false; x_found = false; y_found = false; } - ss.str(m_str); ss >> x; x = mm(x); if(ss.fail()) return false; + ss.str(m_str); + ss >> x; + x = mm(x); + if (ss.fail()) { + return false; + } x_found = true; break; case 20: // y get_line(); - ss.str(m_str); ss >> y; y = mm(y); if(ss.fail()) return false; + ss.str(m_str); + ss >> y; + y = mm(y); + if (ss.fail()) { + return false; + } y_found = true; break; case 38: // elevation get_line(); - ss.str(m_str); ss >> z; z = mm(z); if(ss.fail()) return false; + ss.str(m_str); + ss >> z; + z = mm(z); + if (ss.fail()) { + return false; + } break; case 42: // bulge get_line(); - ss.str(m_str); ss >> bulge; if(ss.fail()) return false; + ss.str(m_str); + ss >> bulge; + if (ss.fail()) { + return false; + } bulge_found = true; break; case 70: // flags get_line(); - if(sscanf(m_str, "%d", &flags) != 1) + if (sscanf(m_str, "%d", &flags) != 1) { return false; + } closed = ((flags & 1) != 0); break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; default: // skip the next line @@ -2718,12 +3090,10 @@ bool CDxfRead::ReadLwPolyLine() } } - if(next_item_found) - { - if(closed && poly_first_found) - { + if (next_item_found) { + if (closed && poly_first_found) { // repeat the first point - ResolveColorIndex(); + ResolveColorIndex(); AddPolyLinePoint(this, poly_first_x, poly_first_y, poly_first_z, false, 0.0); } return true; @@ -2733,7 +3103,7 @@ bool CDxfRead::ReadLwPolyLine() } -bool CDxfRead::ReadVertex(double *pVertex, bool *bulge_found, double *bulge) +bool CDxfRead::ReadVertex(double* pVertex, bool* bulge_found, double* bulge) { bool x_found = false; bool y_found = false; @@ -2748,60 +3118,83 @@ bool CDxfRead::ReadVertex(double *pVertex, bool *bulge_found, double *bulge) pVertex[1] = 0.0; pVertex[2] = 0.0; - while(!(*m_ifs).eof()) { + while (!(*m_ifs).eof()) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadVertex() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ - case 0: - ResolveColorIndex(); - put_line(m_str); // read one line too many. put it back. - return(x_found && y_found); - break; + switch (n) { + case 0: + ResolveColorIndex(); + put_line(m_str); // read one line too many. put it back. + return (x_found && y_found); + break; - case 8: // Layer name follows - get_line(); - strcpy(m_layer_name, m_str); - break; + case 8: // Layer name follows + get_line(); + strcpy(m_layer_name, m_str); + break; - case 10: - // x - get_line(); - ss.str(m_str); ss >> x; pVertex[0] = mm(x); if(ss.fail()) return false; - x_found = true; - break; - case 20: - // y - get_line(); - ss.str(m_str); ss >> y; pVertex[1] = mm(y); if(ss.fail()) return false; - y_found = true; - break; - case 30: - // z - get_line(); - ss.str(m_str); ss >> z; pVertex[2] = mm(z); if(ss.fail()) return false; - break; + case 10: + // x + get_line(); + ss.str(m_str); + ss >> x; + pVertex[0] = mm(x); + if (ss.fail()) { + return false; + } + x_found = true; + break; + case 20: + // y + get_line(); + ss.str(m_str); + ss >> y; + pVertex[1] = mm(y); + if (ss.fail()) { + return false; + } + y_found = true; + break; + case 30: + // z + get_line(); + ss.str(m_str); + ss >> z; + pVertex[2] = mm(z); + if (ss.fail()) { + return false; + } + break; - case 42: - get_line(); - *bulge_found = true; - ss.str(m_str); ss >> *bulge; if(ss.fail()) return false; - break; - case 62: - // color index - get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; - break; + case 42: + get_line(); + *bulge_found = true; + ss.str(m_str); + ss >> *bulge; + if (ss.fail()) { + return false; + } + break; + case 62: + // color index + get_line(); + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } + break; - default: - // skip the next line - get_line(); - break; + default: + // skip the next line + get_line(); + break; } } @@ -2809,7 +3202,6 @@ bool CDxfRead::ReadVertex(double *pVertex, bool *bulge_found, double *bulge) } - bool CDxfRead::ReadPolyLine() { PolyLineStart(); @@ -2817,60 +3209,65 @@ bool CDxfRead::ReadPolyLine() bool closed = false; int flags; bool first_vertex_section_found = false; - double first_vertex[3] = {0,0,0}; + double first_vertex[3] = {0, 0, 0}; bool bulge_found; double bulge; - while(!(*m_ifs).eof()) - { + while (!(*m_ifs).eof()) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadPolyLine() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found - ResolveColorIndex(); + ResolveColorIndex(); get_line(); - if (! strcmp(m_str,"VERTEX")) - { - double vertex[3] = {0,0,0}; - if (CDxfRead::ReadVertex(vertex, &bulge_found, &bulge)) - { - if(!first_vertex_section_found) { + if (!strcmp(m_str, "VERTEX")) { + double vertex[3] = {0, 0, 0}; + if (CDxfRead::ReadVertex(vertex, &bulge_found, &bulge)) { + if (!first_vertex_section_found) { first_vertex_section_found = true; - memcpy(first_vertex, vertex, 3*sizeof(double)); + memcpy(first_vertex, vertex, 3 * sizeof(double)); } AddPolyLinePoint(this, vertex[0], vertex[1], vertex[2], bulge_found, bulge); break; } } - if (! strcmp(m_str,"SEQEND")) - { - if(closed && first_vertex_section_found) { - AddPolyLinePoint(this, first_vertex[0], first_vertex[1], first_vertex[2], 0, 0); + if (!strcmp(m_str, "SEQEND")) { + if (closed && first_vertex_section_found) { + AddPolyLinePoint(this, + first_vertex[0], + first_vertex[1], + first_vertex[2], + 0, + 0); } first_vertex_section_found = false; PolyLineStart(); - return(true); + return (true); } break; case 70: // flags get_line(); - if(sscanf(m_str, "%d", &flags) != 1) + if (sscanf(m_str, "%d", &flags) != 1) { return false; + } closed = ((flags & 1) != 0); break; - case 62: + case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; default: // skip the next line @@ -2882,55 +3279,67 @@ bool CDxfRead::ReadPolyLine() return false; } -void CDxfRead::OnReadArc(double start_angle, double end_angle, double radius, const double* c, double z_extrusion_dir, bool hidden){ - double s[3] = {0,0,0}, e[3] = {0,0,0}, temp[3] = {0,0,0}; - if (z_extrusion_dir==1.0) - { - temp[0] =c[0]; - temp[1] =c[1]; - temp[2] =c[2]; - s[0] = c[0] + radius * cos(start_angle * M_PI/180); - s[1] = c[1] + radius * sin(start_angle * M_PI/180); - s[2] = c[2]; - e[0] = c[0] + radius * cos(end_angle * M_PI/180); - e[1] = c[1] + radius * sin(end_angle * M_PI/180); - e[2] = c[2]; - } - else - { - temp[0] =-c[0]; - temp[1] =c[1]; - temp[2] =c[2]; - - e[0] = -(c[0] + radius * cos(start_angle * M_PI/180)); - e[1] = (c[1] + radius * sin(start_angle * M_PI/180)); - e[2] = c[2]; - s[0] = -(c[0] + radius * cos(end_angle * M_PI/180)); - s[1] = (c[1] + radius * sin(end_angle * M_PI/180)); - s[2] = c[2]; +void CDxfRead::OnReadArc(double start_angle, + double end_angle, + double radius, + const double* c, + double z_extrusion_dir, + bool hidden) +{ + double s[3] = {0, 0, 0}, e[3] = {0, 0, 0}, temp[3] = {0, 0, 0}; + if (z_extrusion_dir == 1.0) { + temp[0] = c[0]; + temp[1] = c[1]; + temp[2] = c[2]; + s[0] = c[0] + radius * cos(start_angle * M_PI / 180); + s[1] = c[1] + radius * sin(start_angle * M_PI / 180); + s[2] = c[2]; + e[0] = c[0] + radius * cos(end_angle * M_PI / 180); + e[1] = c[1] + radius * sin(end_angle * M_PI / 180); + e[2] = c[2]; + } + else { + temp[0] = -c[0]; + temp[1] = c[1]; + temp[2] = c[2]; + e[0] = -(c[0] + radius * cos(start_angle * M_PI / 180)); + e[1] = (c[1] + radius * sin(start_angle * M_PI / 180)); + e[2] = c[2]; + s[0] = -(c[0] + radius * cos(end_angle * M_PI / 180)); + s[1] = (c[1] + radius * sin(end_angle * M_PI / 180)); + s[2] = c[2]; } OnReadArc(s, e, temp, true, hidden); } -void CDxfRead::OnReadCircle(const double* c, double radius, bool hidden){ +void CDxfRead::OnReadCircle(const double* c, double radius, bool hidden) +{ double s[3]; double start_angle = 0; - s[0] = c[0] + radius * cos(start_angle * M_PI/180); - s[1] = c[1] + radius * sin(start_angle * M_PI/180); + s[0] = c[0] + radius * cos(start_angle * M_PI / 180); + s[1] = c[1] + radius * sin(start_angle * M_PI / 180); s[2] = c[2]; - OnReadCircle(s, c, false, hidden); //false to change direction because otherwise the arc length is zero + OnReadCircle(s, + c, + false, + hidden); // false to change direction because otherwise the arc length is zero } -void CDxfRead::OnReadEllipse(const double* c, const double* m, double ratio, double start_angle, double end_angle){ - double major_radius = sqrt(m[0]*m[0] + m[1]*m[1] + m[2]*m[2]); +void CDxfRead::OnReadEllipse(const double* c, + const double* m, + double ratio, + double start_angle, + double end_angle) +{ + double major_radius = sqrt(m[0] * m[0] + m[1] * m[1] + m[2] * m[2]); double minor_radius = major_radius * ratio; - //Since we only support 2d stuff, we can calculate the rotation from the major axis x and y value only, - //since z is zero, major_radius is the vector length + // Since we only support 2d stuff, we can calculate the rotation from the major axis x and y + // value only, since z is zero, major_radius is the vector length - double rotation = atan2(m[1]/major_radius,m[0]/major_radius); + double rotation = atan2(m[1] / major_radius, m[0] / major_radius); OnReadEllipse(c, major_radius, minor_radius, rotation, start_angle, end_angle, true); @@ -2939,28 +3348,26 @@ void CDxfRead::OnReadEllipse(const double* c, const double* m, double ratio, dou bool CDxfRead::ReadInsert() { - double c[3] = {0,0,0}; // coordinate - double s[3] = {1,1,1}; // scale - double rot = 0.0; // rotation + double c[3] = {0, 0, 0}; // coordinate + double s[3] = {1, 1, 1}; // scale + double rot = 0.0; // rotation char name[1024] = {0}; - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadInsert() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found ResolveColorIndex(); - OnReadInsert(c, s, name, rot * M_PI/180); - return(true); + OnReadInsert(c, s, name, rot * M_PI / 180); + return (true); case 8: // Layer name follows get_line(); @@ -2969,37 +3376,68 @@ bool CDxfRead::ReadInsert() case 10: // coord x get_line(); - ss.str(m_str); ss >> c[0]; c[0] = mm(c[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[0]; + c[0] = mm(c[0]); + if (ss.fail()) { + return false; + } break; case 20: // coord y get_line(); - ss.str(m_str); ss >> c[1]; c[1] = mm(c[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[1]; + c[1] = mm(c[1]); + if (ss.fail()) { + return false; + } break; case 30: // coord z get_line(); - ss.str(m_str); ss >> c[2]; c[2] = mm(c[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> c[2]; + c[2] = mm(c[2]); + if (ss.fail()) { + return false; + } break; case 41: // scale x get_line(); - ss.str(m_str); ss >> s[0]; if(ss.fail()) return false; + ss.str(m_str); + ss >> s[0]; + if (ss.fail()) { + return false; + } break; case 42: // scale y get_line(); - ss.str(m_str); ss >> s[1]; if(ss.fail()) return false; + ss.str(m_str); + ss >> s[1]; + if (ss.fail()) { + return false; + } break; case 43: // scale z get_line(); - ss.str(m_str); ss >> s[2]; if(ss.fail()) return false; + ss.str(m_str); + ss >> s[2]; + if (ss.fail()) { + return false; + } break; case 50: // rotation get_line(); - ss.str(m_str); ss >> rot; if(ss.fail()) return false; + ss.str(m_str); + ss >> rot; + if (ss.fail()) { + return false; + } break; case 2: // block name @@ -3009,7 +3447,11 @@ bool CDxfRead::ReadInsert() case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 100: case 39: @@ -3031,28 +3473,26 @@ bool CDxfRead::ReadInsert() bool CDxfRead::ReadDimension() { - double s[3] = {0,0,0}; // startpoint - double e[3] = {0,0,0}; // endpoint - double p[3] = {0,0,0}; // dimpoint - double rot = -1.0; // rotation + double s[3] = {0, 0, 0}; // startpoint + double e[3] = {0, 0, 0}; // endpoint + double p[3] = {0, 0, 0}; // dimpoint + double rot = -1.0; // rotation - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadInsert() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 0: // next item found ResolveColorIndex(); - OnReadDimension(s, e, p, rot * M_PI/180); - return(true); + OnReadDimension(s, e, p, rot * M_PI / 180); + return (true); case 8: // Layer name follows get_line(); @@ -3061,57 +3501,110 @@ bool CDxfRead::ReadDimension() case 13: // start x get_line(); - ss.str(m_str); ss >> s[0]; s[0] = mm(s[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[0]; + s[0] = mm(s[0]); + if (ss.fail()) { + return false; + } break; case 23: // start y get_line(); - ss.str(m_str); ss >> s[1]; s[1] = mm(s[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[1]; + s[1] = mm(s[1]); + if (ss.fail()) { + return false; + } break; case 33: // start z get_line(); - ss.str(m_str); ss >> s[2]; s[2] = mm(s[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> s[2]; + s[2] = mm(s[2]); + if (ss.fail()) { + return false; + } break; case 14: // end x get_line(); - ss.str(m_str); ss >> e[0]; e[0] = mm(e[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> e[0]; + e[0] = mm(e[0]); + if (ss.fail()) { + return false; + } break; case 24: // end y get_line(); - ss.str(m_str); ss >> e[1]; e[1] = mm(e[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> e[1]; + e[1] = mm(e[1]); + if (ss.fail()) { + return false; + } break; case 34: // end z get_line(); - ss.str(m_str); ss >> e[2]; e[2] = mm(e[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> e[2]; + e[2] = mm(e[2]); + if (ss.fail()) { + return false; + } break; case 10: // dimline x get_line(); - ss.str(m_str); ss >> p[0]; p[0] = mm(p[0]); if(ss.fail()) return false; + ss.str(m_str); + ss >> p[0]; + p[0] = mm(p[0]); + if (ss.fail()) { + return false; + } break; case 20: // dimline y get_line(); - ss.str(m_str); ss >> p[1]; p[1] = mm(p[1]); if(ss.fail()) return false; + ss.str(m_str); + ss >> p[1]; + p[1] = mm(p[1]); + if (ss.fail()) { + return false; + } break; case 30: // dimline z get_line(); - ss.str(m_str); ss >> p[2]; p[2] = mm(p[2]); if(ss.fail()) return false; + ss.str(m_str); + ss >> p[2]; + p[2] = mm(p[2]); + if (ss.fail()) { + return false; + } break; case 50: // rotation get_line(); - ss.str(m_str); ss >> rot; if(ss.fail()) return false; + ss.str(m_str); + ss >> rot; + if (ss.fail()) { + return false; + } break; case 62: // color index get_line(); - ss.str(m_str); ss >> m_ColorIndex; if(ss.fail()) return false; + ss.str(m_str); + ss >> m_ColorIndex; + if (ss.fail()) { + return false; + } break; case 100: case 39: @@ -3133,18 +3626,16 @@ bool CDxfRead::ReadDimension() bool CDxfRead::ReadBlockInfo() { - while(!((*m_ifs).eof())) - { + while (!((*m_ifs).eof())) { get_line(); int n; - if(sscanf(m_str, "%d", &n) != 1) - { + if (sscanf(m_str, "%d", &n) != 1) { printf("CDxfRead::ReadBlockInfo() Failed to read integer from '%s'\n", m_str); return false; } std::istringstream ss; ss.imbue(std::locale("C")); - switch(n){ + switch (n) { case 2: // block name get_line(); @@ -3167,10 +3658,9 @@ bool CDxfRead::ReadBlockInfo() void CDxfRead::get_line() { - if (m_unused_line[0] != '\0') - { + if (m_unused_line[0] != '\0') { strcpy(m_str, m_unused_line); - memset( m_unused_line, '\0', sizeof(m_unused_line)); + memset(m_unused_line, '\0', sizeof(m_unused_line)); return; } @@ -3180,11 +3670,11 @@ void CDxfRead::get_line() size_t len = strlen(m_str); int j = 0; bool non_white_found = false; - for(size_t i = 0; i::const_iterator first = VersionNames.cbegin(); std::vector::const_iterator last = VersionNames.cend(); std::vector::const_iterator found = std::lower_bound(first, last, m_str); - if (found == last) + if (found == last) { m_version = RNewer; - else if (*found == m_str) + } + else if (*found == m_str) { m_version = (eDXFVersion_t)(std::distance(first, found) + (ROlder + 1)); - else if (found == first) + } + else if (found == first) { m_version = ROlder; - else + } + else { m_version = RUnknown; + } return ResolveEncoding(); } @@ -3323,7 +3813,8 @@ bool CDxfRead::ReadDWGCodePage() { get_line(); get_line(); - assert(m_CodePage == nullptr); // If not, we have found two DWGCODEPAGE variables or DoRead was called twice on the same CDxfRead object. + assert(m_CodePage == nullptr); // If not, we have found two DWGCODEPAGE variables or DoRead was + // called twice on the same CDxfRead object. m_CodePage = new std::string(m_str); return ResolveEncoding(); @@ -3335,7 +3826,7 @@ bool CDxfRead::ResolveEncoding() delete m_encoding; m_encoding = nullptr; } - if (m_version >= R2007) { // Note this does not include RUnknown, but does include RLater + if (m_version >= R2007) { // Note this does not include RUnknown, but does include RLater m_encoding = new std::string("utf_8"); stringToUTF8 = &CDxfRead::UTF8ToUTF8; } @@ -3345,31 +3836,37 @@ bool CDxfRead::ResolveEncoding() stringToUTF8 = &CDxfRead::GeneralToUTF8; } else { - // Codepage names may be of the form "ansi_1252" which we map to "cp1252" but we don't map "ansi_x3xxxx" (which happens to mean "ascii") + // Codepage names may be of the form "ansi_1252" which we map to "cp1252" but we don't map + // "ansi_x3xxxx" (which happens to mean "ascii") std::string* p = new std::string(*m_CodePage); std::string p_lower; - for (std::string::const_iterator i = p->begin(); i != p->end(); ++i) + for (std::string::const_iterator i = p->begin(); i != p->end(); ++i) { p_lower += tolower(*i); - if (p_lower.substr(0, 5) == "ansi_" - && p_lower.substr(0, 7) != "ansi_x3") + } + if (p_lower.substr(0, 5) == "ansi_" && p_lower.substr(0, 7) != "ansi_x3") { p->replace(0, 5, "cp"); + } m_encoding = p; - // At this point we want to recognize synonyms for "utf_8" and use the custom decoder function. - // This is because this is one of the common cases and our decoder function is a fast no-op. - // We don't actually use the decoder function we get from PyCodec_Decoder because to call it we have to convert the (char *) text into - // a 'bytes' object first so we can pass it to the function using PyObject_Callxxx(), getting the PYObject containing the - // Python string, which we then decode back to UTF-8. It is simpler to call PyUnicode_DecodeXxxx which takes a (const char *) - // and is just a direct c++ callable. + // At this point we want to recognize synonyms for "utf_8" and use the custom decoder + // function. This is because this is one of the common cases and our decoder function is a + // fast no-op. We don't actually use the decoder function we get from PyCodec_Decoder + // because to call it we have to convert the (char *) text into a 'bytes' object first so we + // can pass it to the function using PyObject_Callxxx(), getting the PYObject containing the + // Python string, which we then decode back to UTF-8. It is simpler to call + // PyUnicode_DecodeXxxx which takes a (const char *) and is just a direct c++ callable. Base::PyGILStateLocker lock; PyObject* pyDecoder = PyCodec_Decoder(m_encoding->c_str()); - if (pyDecoder == nullptr) - return false; // A key error exception will have been placed. + if (pyDecoder == nullptr) { + return false; // A key error exception will have been placed. + } PyObject* pyUTF8Decoder = PyCodec_Decoder("utf_8"); assert(pyUTF8Decoder != nullptr); - if (pyDecoder == pyUTF8Decoder) + if (pyDecoder == pyUTF8Decoder) { stringToUTF8 = &CDxfRead::UTF8ToUTF8; - else + } + else { stringToUTF8 = &CDxfRead::GeneralToUTF8; + } Py_DECREF(pyDecoder); Py_DECREF(pyUTF8Decoder); } @@ -3385,18 +3882,21 @@ const char* CDxfRead::GeneralToUTF8(const char* encoded) const { Base::PyGILStateLocker lock; PyObject* decoded = PyUnicode_Decode(encoded, strlen(encoded), m_encoding->c_str(), "strict"); - if (decoded == nullptr) + if (decoded == nullptr) { return nullptr; + } Py_ssize_t len; const char* converted = PyUnicode_AsUTF8AndSize(decoded, &len); char* result = nullptr; if (converted != nullptr) { // converted only has lifetime of decoded so we must save a copy. - result = (char *)malloc(len + 1); - if (result == nullptr) + result = (char*)malloc(len + 1); + if (result == nullptr) { PyErr_SetString(PyExc_MemoryError, "Out of memory"); - else + } + else { memcpy(result, converted, len + 1); + } } Py_DECREF(decoded); return result; @@ -3405,174 +3905,164 @@ const char* CDxfRead::GeneralToUTF8(const char* encoded) const void CDxfRead::DoRead(const bool ignore_errors /* = false */) { m_ignore_errors = ignore_errors; - if(m_fail) + if (m_fail) { return; + } get_line(); - while(!((*m_ifs).eof())) - { - if (!strcmp( m_str, "$INSUNITS" )){ - if (!ReadUnits()) + while (!((*m_ifs).eof())) { + if (!strcmp(m_str, "$INSUNITS")) { + if (!ReadUnits()) { return; + } continue; - } // End if - then + } // End if - then - if (!strcmp( m_str, "$MEASUREMENT" )){ + if (!strcmp(m_str, "$MEASUREMENT")) { get_line(); get_line(); int n = 1; - if(sscanf(m_str, "%d", &n) == 1) - { - if(n == 0)m_measurement_inch = true; + if (sscanf(m_str, "%d", &n) == 1) { + if (n == 0) { + m_measurement_inch = true; + } } continue; - } // End if - then + } // End if - then if (!strcmp(m_str, "$ACADVER")) { - if (!ReadVersion()) - return; - continue; - }// End if - then - - if (!strcmp(m_str, "$DWGCODEPAGE")) { - if (!ReadDWGCodePage()) - return; - continue; - }// End if - then - - if (!strcmp(m_str, "0")) - { - get_line(); - if (!strcmp( m_str, "SECTION" )){ - strcpy(m_section_name, ""); - get_line(); - get_line(); - if (strcmp( m_str, "ENTITIES" )) - strcpy(m_section_name, m_str); - strcpy(m_block_name, ""); - - } // End if - then - else if (!strcmp( m_str, "TABLE" )){ - get_line(); - get_line(); - } - - else if (!strcmp( m_str, "LAYER" )){ - get_line(); - get_line(); - if(!ReadLayer()) - { - printf("CDxfRead::DoRead() Failed to read layer\n"); - //return; Some objects or tables can have "LAYER" as name... - } - continue; - } - - else if (!strcmp( m_str, "BLOCK" )) { - if(!ReadBlockInfo()) - { - printf("CDxfRead::DoRead() Failed to read block info\n"); + if (!ReadVersion()) { return; } continue; - } // End if - then + } // End if - then - else if (!strcmp( m_str, "ENDSEC" )){ - strcpy(m_section_name, ""); - strcpy(m_block_name, ""); - } // End if - then - else if(!strcmp(m_str, "LINE")){ - if(!ReadLine()) - { + if (!strcmp(m_str, "$DWGCODEPAGE")) { + if (!ReadDWGCodePage()) { + return; + } + continue; + } // End if - then + + if (!strcmp(m_str, "0")) { + get_line(); + if (!strcmp(m_str, "SECTION")) { + strcpy(m_section_name, ""); + get_line(); + get_line(); + if (strcmp(m_str, "ENTITIES")) { + strcpy(m_section_name, m_str); + } + strcpy(m_block_name, ""); + + } // End if - then + else if (!strcmp(m_str, "TABLE")) { + get_line(); + get_line(); + } + + else if (!strcmp(m_str, "LAYER")) { + get_line(); + get_line(); + if (!ReadLayer()) { + printf("CDxfRead::DoRead() Failed to read layer\n"); + // return; Some objects or tables can have "LAYER" as name... + } + continue; + } + + else if (!strcmp(m_str, "BLOCK")) { + if (!ReadBlockInfo()) { + printf("CDxfRead::DoRead() Failed to read block info\n"); + return; + } + continue; + } // End if - then + + else if (!strcmp(m_str, "ENDSEC")) { + strcpy(m_section_name, ""); + strcpy(m_block_name, ""); + } // End if - then + else if (!strcmp(m_str, "LINE")) { + if (!ReadLine()) { printf("CDxfRead::DoRead() Failed to read line\n"); return; } continue; } - else if(!strcmp(m_str, "ARC")){ - if(!ReadArc()) - { + else if (!strcmp(m_str, "ARC")) { + if (!ReadArc()) { printf("CDxfRead::DoRead() Failed to read arc\n"); return; } continue; } - else if(!strcmp(m_str, "CIRCLE")){ - if(!ReadCircle()) - { + else if (!strcmp(m_str, "CIRCLE")) { + if (!ReadCircle()) { printf("CDxfRead::DoRead() Failed to read circle\n"); return; } continue; } - else if(!strcmp(m_str, "MTEXT")){ - if(!ReadText()) - { + else if (!strcmp(m_str, "MTEXT")) { + if (!ReadText()) { printf("CDxfRead::DoRead() Failed to read text\n"); return; } continue; } - else if(!strcmp(m_str, "TEXT")){ - if(!ReadText()) - { + else if (!strcmp(m_str, "TEXT")) { + if (!ReadText()) { printf("CDxfRead::DoRead() Failed to read text\n"); return; } continue; } - else if(!strcmp(m_str, "ELLIPSE")){ - if(!ReadEllipse()) - { + else if (!strcmp(m_str, "ELLIPSE")) { + if (!ReadEllipse()) { printf("CDxfRead::DoRead() Failed to read ellipse\n"); return; } continue; } - else if(!strcmp(m_str, "SPLINE")){ - if(!ReadSpline()) - { + else if (!strcmp(m_str, "SPLINE")) { + if (!ReadSpline()) { printf("CDxfRead::DoRead() Failed to read spline\n"); return; } continue; } else if (!strcmp(m_str, "LWPOLYLINE")) { - if(!ReadLwPolyLine()) - { + if (!ReadLwPolyLine()) { printf("CDxfRead::DoRead() Failed to read LW Polyline\n"); return; } continue; } else if (!strcmp(m_str, "POLYLINE")) { - if(!ReadPolyLine()) - { + if (!ReadPolyLine()) { printf("CDxfRead::DoRead() Failed to read Polyline\n"); return; } continue; } else if (!strcmp(m_str, "POINT")) { - if(!ReadPoint()) - { + if (!ReadPoint()) { printf("CDxfRead::DoRead() Failed to read Point\n"); return; } continue; } else if (!strcmp(m_str, "INSERT")) { - if(!ReadInsert()) - { + if (!ReadInsert()) { printf("CDxfRead::DoRead() Failed to read Insert\n"); return; } continue; } else if (!strcmp(m_str, "DIMENSION")) { - if(!ReadDimension()) - { + if (!ReadDimension()) { printf("CDxfRead::DoRead() Failed to read Dimension\n"); return; } @@ -3586,12 +4076,12 @@ void CDxfRead::DoRead(const bool ignore_errors /* = false */) } -void CDxfRead::ResolveColorIndex() +void CDxfRead::ResolveColorIndex() { - if (m_ColorIndex == ColorBylayer) // if color = layer color, replace by color from layer + if (m_ColorIndex == ColorBylayer) // if color = layer color, replace by color from layer { - m_ColorIndex = m_layer_ColorIndex_map[std::string(m_layer_name)]; + m_ColorIndex = m_layer_ColorIndex_map[std::string(m_layer_name)]; } } @@ -3599,22 +4089,19 @@ std::string CDxfRead::LayerName() const { std::string result; - if (strlen(m_section_name) > 0) - { + if (strlen(m_section_name) > 0) { result.append(m_section_name); result.append(" "); } - if (strlen(m_block_name) > 0) - { + if (strlen(m_block_name) > 0) { result.append(m_block_name); result.append(" "); } - if (strlen(m_layer_name) > 0) - { + if (strlen(m_layer_name) > 0) { result.append(m_layer_name); } - return(result); + return (result); } diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index b7bf67c69d..17f668f1ab 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -21,12 +21,11 @@ #include - -typedef int ColorIndex_t; // DXF color index +typedef int ColorIndex_t; // DXF color index typedef enum { - eUnspecified = 0, // Unspecified (No units) + eUnspecified = 0, // Unspecified (No units) eInches, eFeet, eMiles, @@ -50,7 +49,7 @@ typedef enum } eDxfUnits_t; -//spline data for reading +// spline data for reading struct SplineData { double norm[3]; @@ -76,8 +75,8 @@ struct SplineData }; //*************************** -//data structures for writing -//added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project +// data structures for writing +// added by Wandererfan 2018 (wandererfan@gmail.com) for FreeCAD project struct point3D { double x; @@ -104,7 +103,7 @@ struct SplineDataOut struct LWPolyDataOut { double nVert; - int Flag; + int Flag; double Width; double Elev; double Thick; @@ -132,7 +131,8 @@ typedef enum } eDXFVersion_t; //******************** -class CDxfWrite{ +class CDxfWrite +{ private: std::ofstream* m_ofs; bool m_fail; @@ -142,20 +142,32 @@ private: std::ostringstream* m_ssLayer; protected: - void putLine(const Base::Vector3d s, const Base::Vector3d e, - std::ostringstream* outStream, const std::string handle, + void putLine(const Base::Vector3d s, + const Base::Vector3d e, + std::ostringstream* outStream, + const std::string handle, const std::string ownerHandle); - void putText(const char* text, const Base::Vector3d location1, const Base::Vector3d location2, - const double height, const int horizJust, - std::ostringstream* outStream, const std::string handle, + void putText(const char* text, + const Base::Vector3d location1, + const Base::Vector3d location2, + const double height, + const int horizJust, + std::ostringstream* outStream, + const std::string handle, const std::string ownerHandle); - void putArrow(Base::Vector3d arrowPos, Base::Vector3d barb1Pos, Base::Vector3d barb2Pos, - std::ostringstream* outStream, const std::string handle, + void putArrow(Base::Vector3d arrowPos, + Base::Vector3d barb1Pos, + Base::Vector3d barb2Pos, + std::ostringstream* outStream, + const std::string handle, const std::string ownerHandle); //! copy boiler plate file std::string getPlateFile(std::string fileSpec); - void setDataDir(std::string s) { m_dataDir = s; } + void setDataDir(std::string s) + { + m_dataDir = s; + } std::string getHandle(); std::string getEntityHandle(); std::string getLayerHandle(); @@ -170,7 +182,7 @@ protected: int m_blockHandle; int m_blkRecordHandle; bool m_polyOverride; - + std::string m_saveModelSpaceHandle; std::string m_savePaperSpaceHandle; std::string m_saveBlockRecordTableHandle; @@ -185,56 +197,93 @@ protected: public: ImportExport CDxfWrite(const char* filepath); ImportExport ~CDxfWrite(); - + ImportExport void init(); ImportExport void endRun(); - ImportExport bool Failed(){return m_fail;} -// void setOptions(void); -// bool isVersionValid(int vers); - ImportExport std::string getLayerName() { return m_layerName; } + ImportExport bool Failed() + { + return m_fail; + } + // void setOptions(void); + // bool isVersionValid(int vers); + ImportExport std::string getLayerName() + { + return m_layerName; + } ImportExport void setLayerName(std::string s); - ImportExport void setVersion(int v) { m_version = v;} - ImportExport void setPolyOverride(bool b) { m_polyOverride = b; } + ImportExport void setVersion(int v) + { + m_version = v; + } + ImportExport void setPolyOverride(bool b) + { + m_polyOverride = b; + } ImportExport void addBlockName(std::string s, std::string blkRecordHandle); ImportExport void writeLine(const double* s, const double* e); ImportExport void writePoint(const double*); ImportExport void writeArc(const double* s, const double* e, const double* c, bool dir); - ImportExport void writeEllipse(const double* c, double major_radius, double minor_radius, - double rotation, double start_angle, double end_angle, bool endIsCW); - ImportExport void writeCircle(const double* c, double radius ); - ImportExport void writeSpline(const SplineDataOut &sd); - ImportExport void writeLWPolyLine(const LWPolyDataOut &pd); - ImportExport void writePolyline(const LWPolyDataOut &pd); + ImportExport void writeEllipse(const double* c, + double major_radius, + double minor_radius, + double rotation, + double start_angle, + double end_angle, + bool endIsCW); + ImportExport void writeCircle(const double* c, double radius); + ImportExport void writeSpline(const SplineDataOut& sd); + ImportExport void writeLWPolyLine(const LWPolyDataOut& pd); + ImportExport void writePolyline(const LWPolyDataOut& pd); ImportExport void writeVertex(double x, double y, double z); - ImportExport void writeText(const char* text, const double* location1, const double* location2, - const double height, const int horizJust); - ImportExport void writeLinearDim(const double* textMidPoint, const double* lineDefPoint, - const double* extLine1, const double* extLine2, - const char* dimText, int type); - ImportExport void writeLinearDimBlock(const double* textMidPoint, const double* lineDefPoint, - const double* extLine1, const double* extLine2, - const char* dimText, int type); - ImportExport void writeAngularDim(const double* textMidPoint, const double* lineDefPoint, - const double* startExt1, const double* endExt1, - const double* startExt2, const double* endExt2, - const char* dimText); - ImportExport void writeAngularDimBlock(const double* textMidPoint, const double* lineDefPoint, - const double* startExt1, const double* endExt1, - const double* startExt2, const double* endExt2, - const char* dimText); - ImportExport void writeRadialDim(const double* centerPoint, const double* textMidPoint, - const double* arcPoint, - const char* dimText); - ImportExport void writeRadialDimBlock(const double* centerPoint, const double* textMidPoint, - const double* arcPoint, const char* dimText); + ImportExport void writeText(const char* text, + const double* location1, + const double* location2, + const double height, + const int horizJust); + ImportExport void writeLinearDim(const double* textMidPoint, + const double* lineDefPoint, + const double* extLine1, + const double* extLine2, + const char* dimText, + int type); + ImportExport void writeLinearDimBlock(const double* textMidPoint, + const double* lineDefPoint, + const double* extLine1, + const double* extLine2, + const char* dimText, + int type); + ImportExport void writeAngularDim(const double* textMidPoint, + const double* lineDefPoint, + const double* startExt1, + const double* endExt1, + const double* startExt2, + const double* endExt2, + const char* dimText); + ImportExport void writeAngularDimBlock(const double* textMidPoint, + const double* lineDefPoint, + const double* startExt1, + const double* endExt1, + const double* startExt2, + const double* endExt2, + const char* dimText); + ImportExport void writeRadialDim(const double* centerPoint, + const double* textMidPoint, + const double* arcPoint, + const char* dimText); + ImportExport void writeRadialDimBlock(const double* centerPoint, + const double* textMidPoint, + const double* arcPoint, + const char* dimText); ImportExport void writeDiametricDim(const double* textMidPoint, - const double* arcPoint1, const double* arcPoint2, - const char* dimText); + const double* arcPoint1, + const double* arcPoint2, + const char* dimText); ImportExport void writeDiametricDimBlock(const double* textMidPoint, - const double* arcPoint1, const double* arcPoint2, - const char* dimText); + const double* arcPoint1, + const double* arcPoint2, + const char* dimText); ImportExport void writeDimBlockPreamble(); ImportExport void writeBlockTrailer(); @@ -253,7 +302,8 @@ public: }; // derive a class from this and implement it's virtual functions -class CDxfRead{ +class CDxfRead +{ private: std::ifstream* m_ifs; @@ -268,7 +318,8 @@ private: bool m_ignore_errors; - std::map m_layer_ColorIndex_map; // Mapping from layer name -> layer color index + std::map + m_layer_ColorIndex_map; // Mapping from layer name -> layer color index const ColorIndex_t ColorBylayer = 256; const ColorIndex_t ColorByBlock = 0; @@ -283,10 +334,19 @@ private: bool ReadSpline(); bool ReadLwPolyLine(); bool ReadPolyLine(); - bool ReadVertex(double *pVertex, bool *bulge_found, double *bulge); - void OnReadArc(double start_angle, double end_angle, double radius, const double* c, double z_extrusion_dir, bool hidden); + bool ReadVertex(double* pVertex, bool* bulge_found, double* bulge); + void OnReadArc(double start_angle, + double end_angle, + double radius, + const double* c, + double z_extrusion_dir, + bool hidden); void OnReadCircle(const double* c, double radius, bool hidden); - void OnReadEllipse(const double* c, const double* m, double ratio, double start_angle, double end_angle); + void OnReadEllipse(const double* c, + const double* m, + double ratio, + double start_angle, + double end_angle); bool ReadInsert(); bool ReadDimension(); bool ReadBlockInfo(); @@ -295,44 +355,79 @@ private: bool ResolveEncoding(); void get_line(); - void put_line(const char *value); + void put_line(const char* value); void ResolveColorIndex(); protected: ColorIndex_t m_ColorIndex; - eDXFVersion_t m_version;// Version from $ACADVER variable in DXF + eDXFVersion_t m_version; // Version from $ACADVER variable in DXF const char* (CDxfRead::*stringToUTF8)(const char*) const; private: - const std::string* m_CodePage; // Code Page name from $DWGCODEPAGE or null if none/not read yet - // The following was going to be python's canonical name for the encoding, but this is (a) not easily found and (b) does not speed up finding the encoding object. - const std::string* m_encoding;// A name for the encoding implied by m_version and m_CodePage + const std::string* m_CodePage; // Code Page name from $DWGCODEPAGE or null if none/not read yet + // The following was going to be python's canonical name for the encoding, but this is (a) not + // easily found and (b) does not speed up finding the encoding object. + const std::string* m_encoding; // A name for the encoding implied by m_version and m_CodePage const char* UTF8ToUTF8(const char* encoded) const; const char* GeneralToUTF8(const char* encoded) const; public: - ImportExport CDxfRead(const char* filepath); // this opens the file - ImportExport virtual ~CDxfRead(); // this closes the file + ImportExport CDxfRead(const char* filepath); // this opens the file + ImportExport virtual ~CDxfRead(); // this closes the file - ImportExport bool Failed(){return m_fail;} - ImportExport void DoRead(const bool ignore_errors = false); // this reads the file and calls the following functions + ImportExport bool Failed() + { + return m_fail; + } + ImportExport void DoRead( + const bool ignore_errors = false); // this reads the file and calls the following functions - ImportExport double mm( double value ) const; + ImportExport double mm(double value) const; - ImportExport bool IgnoreErrors() const { return(m_ignore_errors); } + ImportExport bool IgnoreErrors() const + { + return (m_ignore_errors); + } - ImportExport virtual void OnReadLine(const double* /*s*/, const double* /*e*/, bool /*hidden*/){} - ImportExport virtual void OnReadPoint(const double* /*s*/){} - ImportExport virtual void OnReadText(const double* /*point*/, const double /*height*/, const char* /*text*/){} - ImportExport virtual void OnReadArc(const double* /*s*/, const double* /*e*/, const double* /*c*/, bool /*dir*/, bool /*hidden*/){} - ImportExport virtual void OnReadCircle(const double* /*s*/, const double* /*c*/, bool /*dir*/, bool /*hidden*/){} - ImportExport virtual void OnReadEllipse(const double* /*c*/, double /*major_radius*/, double /*minor_radius*/, double /*rotation*/, double /*start_angle*/, double /*end_angle*/, bool /*dir*/){} - ImportExport virtual void OnReadSpline(struct SplineData& /*sd*/){} - ImportExport virtual void OnReadInsert(const double* /*point*/, const double* /*scale*/, const char* /*name*/, double /*rotation*/){} - ImportExport virtual void OnReadDimension(const double* /*s*/, const double* /*e*/, const double* /*point*/, double /*rotation*/){} - ImportExport virtual void AddGraphics() const { } + ImportExport virtual void OnReadLine(const double* /*s*/, const double* /*e*/, bool /*hidden*/) + {} + ImportExport virtual void OnReadPoint(const double* /*s*/) + {} + ImportExport virtual void + OnReadText(const double* /*point*/, const double /*height*/, const char* /*text*/) + {} + ImportExport virtual void OnReadArc(const double* /*s*/, + const double* /*e*/, + const double* /*c*/, + bool /*dir*/, + bool /*hidden*/) + {} + ImportExport virtual void + OnReadCircle(const double* /*s*/, const double* /*c*/, bool /*dir*/, bool /*hidden*/) + {} + ImportExport virtual void OnReadEllipse(const double* /*c*/, + double /*major_radius*/, + double /*minor_radius*/, + double /*rotation*/, + double /*start_angle*/, + double /*end_angle*/, + bool /*dir*/) + {} + ImportExport virtual void OnReadSpline(struct SplineData& /*sd*/) + {} + ImportExport virtual void OnReadInsert(const double* /*point*/, + const double* /*scale*/, + const char* /*name*/, + double /*rotation*/) + {} + ImportExport virtual void OnReadDimension(const double* /*s*/, + const double* /*e*/, + const double* /*point*/, + double /*rotation*/) + {} + ImportExport virtual void AddGraphics() const + {} ImportExport std::string LayerName() const; - }; #endif diff --git a/src/Mod/Import/CMakeLists.txt b/src/Mod/Import/CMakeLists.txt index 8a606109ce..2a00dc1203 100644 --- a/src/Mod/Import/CMakeLists.txt +++ b/src/Mod/Import/CMakeLists.txt @@ -81,4 +81,3 @@ INSTALL( FILES_MATCHING PATTERN "*.rub*" ) - diff --git a/src/Mod/Import/DxfPlate/blocks10.rub b/src/Mod/Import/DxfPlate/blocks10.rub index 31d5f12ed3..cd0eed6f9a 100644 --- a/src/Mod/Import/DxfPlate/blocks10.rub +++ b/src/Mod/Import/DxfPlate/blocks10.rub @@ -19,6 +19,6 @@ BLOCK 3 *MODEL_SPACE 1 - + 0 ENDBLK diff --git a/src/Mod/Import/DxfPlate/tables112.rub b/src/Mod/Import/DxfPlate/tables112.rub index 4d9e1b1cf7..c86e1526c0 100644 --- a/src/Mod/Import/DxfPlate/tables112.rub +++ b/src/Mod/Import/DxfPlate/tables112.rub @@ -67,6 +67,6 @@ txt 42 1 4 - + 0 ENDTAB diff --git a/src/Mod/Import/Gui/AppImportGui.cpp b/src/Mod/Import/Gui/AppImportGui.cpp index 99e8aea2e9..e1d815bc98 100644 --- a/src/Mod/Import/Gui/AppImportGui.cpp +++ b/src/Mod/Import/Gui/AppImportGui.cpp @@ -10,12 +10,12 @@ * for detail see the LICENCE text file. * * * * FreeCAD is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU Library General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * - * License along with FreeCAD; if not, write to the Free Software * + * License along with FreeCAD; if not, write to the Free Software * * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * * USA * * * @@ -35,7 +35,8 @@ void CreateImportCommands(); -namespace ImportGui { +namespace ImportGui +{ extern PyObject* initModule(); } @@ -49,7 +50,7 @@ PyMOD_INIT_FUNC(ImportGui) try { Base::Interpreter().loadModule("PartGui"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 6ef4d14b70..4173739cd0 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -22,77 +22,77 @@ #include "PreCompiled.h" #if defined(__MINGW32__) -# define WNT // avoid conflict with GUID +#define WNT // avoid conflict with GUID #endif #ifndef _PreComp_ -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wextra-semi" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wextra-semi" #endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -# if OCC_VERSION_HEX >= 0x070500 -# include -# include -# endif -# if defined(__clang__) -# pragma clang diagnostic pop -# endif +#if OCC_VERSION_HEX >= 0x070500 +#include +#include +#endif +#if defined(__clang__) +#pragma clang diagnostic pop +#endif #endif #include @@ -105,19 +105,20 @@ #include #include #include -#include -#include -#include #include #include #include +#include #include +#include #include +#include FC_LOG_LEVEL_INIT("Import", true, true) -namespace ImportGui { +namespace ImportGui +{ class OCAFBrowser { public: @@ -146,10 +147,10 @@ private: void load(const TDF_Label& label, QTreeWidgetItem* item, const QString&); std::string toString(const TCollection_ExtendedString& extstr) const { - char* str = new char[extstr.LengthOfCString()+1]; + char* str = new char[extstr.LengthOfCString() + 1]; extstr.ToUTF8CString(str); std::string text(str); - delete [] str; + delete[] str; return text; } @@ -176,15 +177,16 @@ void OCAFBrowser::load(const TDF_Label& label, QTreeWidgetItem* item, const QStr label.Dump(std::cout); Handle(TDataStd_Name) name; - if (label.FindAttribute(TDataStd_Name::GetID(),name)) { - QString text = QString::fromLatin1("%1 %2").arg(s, QString::fromUtf8(toString(name->Get()).c_str())); + if (label.FindAttribute(TDataStd_Name::GetID(), name)) { + QString text = + QString::fromLatin1("%1 %2").arg(s, QString::fromUtf8(toString(name->Get()).c_str())); item->setText(0, text); } TDF_IDList localList; - TDF_AttributeIterator itr (label); - for ( ; itr.More(); itr.Next()) { + TDF_AttributeIterator itr(label); + for (; itr.More(); itr.Next()) { localList.Append(itr.Value()->ID()); } @@ -221,33 +223,33 @@ void OCAFBrowser::load(const TDF_Label& label, QTreeWidgetItem* item, const QStr str << attr->DynamicType()->Name() << " = "; if (!shape.IsNull()) { switch (shape.ShapeType()) { - case TopAbs_COMPOUND: - str << "COMPOUND PRIMITIVE"; - break; - case TopAbs_COMPSOLID: - str << "COMPSOLID PRIMITIVE"; - break; - case TopAbs_SOLID: - str << "SOLID PRIMITIVE"; - break; - case TopAbs_SHELL: - str << "SHELL PRIMITIVE"; - break; - case TopAbs_FACE: - str << "FACE PRIMITIVE"; - break; - case TopAbs_WIRE: - str << "WIRE PRIMITIVE"; - break; - case TopAbs_EDGE: - str << "EDGE PRIMITIVE"; - break; - case TopAbs_VERTEX: - str << "VERTEX PRIMITIVE"; - break; - case TopAbs_SHAPE: - str << "SHAPE PRIMITIVE"; - break; + case TopAbs_COMPOUND: + str << "COMPOUND PRIMITIVE"; + break; + case TopAbs_COMPSOLID: + str << "COMPSOLID PRIMITIVE"; + break; + case TopAbs_SOLID: + str << "SOLID PRIMITIVE"; + break; + case TopAbs_SHELL: + str << "SHELL PRIMITIVE"; + break; + case TopAbs_FACE: + str << "FACE PRIMITIVE"; + break; + case TopAbs_WIRE: + str << "WIRE PRIMITIVE"; + break; + case TopAbs_EDGE: + str << "EDGE PRIMITIVE"; + break; + case TopAbs_VERTEX: + str << "VERTEX PRIMITIVE"; + break; + case TopAbs_SHAPE: + str << "SHAPE PRIMITIVE"; + break; } } child->setText(0, text); @@ -259,8 +261,8 @@ void OCAFBrowser::load(const TDF_Label& label, QTreeWidgetItem* item, const QStr } - int i=1; - for (TDF_ChildIterator it(label); it.More(); it.Next(),i++) { + int i = 1; + for (TDF_ChildIterator it(label); it.More(); it.Next(), i++) { QString text = QString::fromLatin1("%1:%2").arg(s).arg(i); QTreeWidgetItem* child = new QTreeWidgetItem(); child->setText(0, text); @@ -270,24 +272,26 @@ void OCAFBrowser::load(const TDF_Label& label, QTreeWidgetItem* item, const QStr } } -class ImportOCAFExt : public Import::ImportOCAF2 +class ImportOCAFExt: public Import::ImportOCAF2 { public: ImportOCAFExt(Handle(TDocStd_Document) h, App::Document* d, const std::string& name) : ImportOCAF2(h, d, name) - { - } + {} private: - void applyFaceColors(Part::Feature* part, const std::vector& colors) override { - auto vp = dynamic_cast(Gui::Application::Instance->getViewProvider(part)); - if (!vp) + void applyFaceColors(Part::Feature* part, const std::vector& colors) override + { + auto vp = dynamic_cast( + Gui::Application::Instance->getViewProvider(part)); + if (!vp) { return; - if(colors.empty()) { + } + if (colors.empty()) { return; } - if(colors.size() == 1) { + if (colors.size() == 1) { vp->ShapeColor.setValue(colors.front()); vp->Transparency.setValue(100 * colors.front().a); } @@ -295,99 +299,120 @@ private: vp->DiffuseColor.setValues(colors); } } - void applyEdgeColors(Part::Feature* part, const std::vector& colors) override { - auto vp = dynamic_cast(Gui::Application::Instance->getViewProvider(part)); - if (!vp) + void applyEdgeColors(Part::Feature* part, const std::vector& colors) override + { + auto vp = dynamic_cast( + Gui::Application::Instance->getViewProvider(part)); + if (!vp) { return; - if(colors.size() == 1) + } + if (colors.size() == 1) { vp->LineColor.setValue(colors.front()); - else + } + else { vp->LineColorArray.setValues(colors); + } } - void applyLinkColor(App::DocumentObject *obj, int index, App::Color color) override { - auto vp = dynamic_cast(Gui::Application::Instance->getViewProvider(obj)); - if(!vp) + void applyLinkColor(App::DocumentObject* obj, int index, App::Color color) override + { + auto vp = + dynamic_cast(Gui::Application::Instance->getViewProvider(obj)); + if (!vp) { return; - if(index<0) { + } + if (index < 0) { vp->OverrideMaterial.setValue(true); vp->ShapeMaterial.setDiffuseColor(color); return; } - if(vp->OverrideMaterialList.getSize()<=index) - vp->OverrideMaterialList.setSize(index+1); - vp->OverrideMaterialList.set1Value(index,true); + if (vp->OverrideMaterialList.getSize() <= index) { + vp->OverrideMaterialList.setSize(index + 1); + } + vp->OverrideMaterialList.set1Value(index, true); App::Material mat(App::Material::DEFAULT); - if(vp->MaterialList.getSize()<=index) - vp->MaterialList.setSize(index+1,mat); + if (vp->MaterialList.getSize() <= index) { + vp->MaterialList.setSize(index + 1, mat); + } mat.diffuseColor = color; - vp->MaterialList.set1Value(index,mat); + vp->MaterialList.set1Value(index, mat); } - void applyElementColors(App::DocumentObject *obj, - const std::map &colors) override + void applyElementColors(App::DocumentObject* obj, + const std::map& colors) override { auto vp = Gui::Application::Instance->getViewProvider(obj); - if(!vp) + if (!vp) { return; + } (void)colors; } }; -class ExportOCAFGui : public Import::ExportOCAF +class ExportOCAFGui: public Import::ExportOCAF { public: ExportOCAFGui(Handle(TDocStd_Document) h, bool explicitPlacement) : ExportOCAF(h, explicitPlacement) - { - } + {} void findColors(Part::Feature* part, std::vector& colors) const override { Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(part); if (vp && vp->isDerivedFrom(PartGui::ViewProviderPartExt::getClassTypeId())) { colors = static_cast(vp)->DiffuseColor.getValues(); - if (colors.empty()) - colors.push_back(static_cast(vp)->ShapeColor.getValue()); + if (colors.empty()) { + colors.push_back( + static_cast(vp)->ShapeColor.getValue()); + } } } }; -class Module : public Py::ExtensionModule +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("ImportGui") + Module() + : Py::ExtensionModule("ImportGui") { - add_keyword_method("open",&Module::insert, - "open(string) -- Open the file and create a new document." - ); - add_keyword_method("insert",&Module::insert, - "insert(string,string) -- Insert the file into the given document." - ); - add_varargs_method("exportOptions",&Module::exportOptions, - "exportOptions(string) -- Return the export options of a file type." - ); - add_keyword_method("export",&Module::exporter, - "export(list,string) -- Export a list of objects into a single file." - ); - add_varargs_method("ocaf",&Module::ocaf, - "ocaf(string) -- Browse the ocaf structure." - ); - initialize("This module is the ImportGui module."); // register with Python + add_keyword_method("open", + &Module::insert, + "open(string) -- Open the file and create a new document."); + add_keyword_method("insert", + &Module::insert, + "insert(string,string) -- Insert the file into the given document."); + add_varargs_method("exportOptions", + &Module::exportOptions, + "exportOptions(string) -- Return the export options of a file type."); + add_keyword_method("export", + &Module::exporter, + "export(list,string) -- Export a list of objects into a single file."); + add_varargs_method("ocaf", &Module::ocaf, "ocaf(string) -- Browse the ocaf structure."); + initialize("This module is the ImportGui module."); // register with Python } private: - Py::Object insert(const Py::Tuple& args, const Py::Dict &kwds) + Py::Object insert(const Py::Tuple& args, const Py::Dict& kwds) { char* Name; - char* DocName=nullptr; - PyObject *importHidden = Py_None; - PyObject *merge = Py_None; - PyObject *useLinkGroup = Py_None; + char* DocName = nullptr; + PyObject* importHidden = Py_None; + PyObject* merge = Py_None; + PyObject* useLinkGroup = Py_None; int mode = -1; - static const std::array kwd_list{"name", "docName", "importHidden", "merge", "useLinkGroup", - "mode", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "et|sO!O!O!i", - kwd_list, "utf-8", &Name, &DocName, &PyBool_Type, &importHidden, - &PyBool_Type, &merge, - &PyBool_Type, &useLinkGroup, &mode)) { + static const std::array + kwd_list {"name", "docName", "importHidden", "merge", "useLinkGroup", "mode", nullptr}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), + kwds.ptr(), + "et|sO!O!O!i", + kwd_list, + "utf-8", + &Name, + &DocName, + &PyBool_Type, + &importHidden, + &PyBool_Type, + &merge, + &PyBool_Type, + &useLinkGroup, + &mode)) { throw Py::Exception(); } @@ -398,7 +423,7 @@ private: try { Base::FileInfo file(Utf8Name.c_str()); - App::Document *pcDoc = nullptr; + App::Document* pcDoc = nullptr; if (DocName) { pcDoc = App::GetApplication().getDocument(DocName); } @@ -412,16 +437,18 @@ private: ImportOCAFExt ocaf(hDoc, pcDoc, file.fileNamePure()); ocaf.setImportOptions(ImportOCAFExt::customImportOptions()); FC_TIME_INIT(t); - FC_DURATION_DECL_INIT2(d1,d2); + FC_DURATION_DECL_INIT2(d1, d2); if (file.hasExtension({"stp", "step"})) { - if(mode<0) + if (mode < 0) { mode = ocaf.getMode(); - if(mode && !pcDoc->isSaved()) { + } + if (mode && !pcDoc->isSaved()) { auto gdoc = Gui::Application::Instance->getDocument(pcDoc); - if(!gdoc->save()) + if (!gdoc->save()) { return Py::Object(); + } } try { @@ -449,20 +476,24 @@ private: Base::Console().Error("%s\n", e.GetMessageString()); Base::Console().Message("Try to load STEP file without colors...\n"); - Part::ImportStepParts(pcDoc,Utf8Name.c_str()); + Part::ImportStepParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); } } else if (file.hasExtension({"igs", "iges"})) { - Base::Reference hGrp = App::GetApplication().GetUserParameter() - .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("IGES"); + Base::Reference hGrp = App::GetApplication() + .GetUserParameter() + .GetGroup("BaseApp") + ->GetGroup("Preferences") + ->GetGroup("Mod/Part") + ->GetGroup("IGES"); try { IGESControl_Controller::Init(); IGESCAFControl_Reader aReader; // http://www.opencascade.org/org/forum/thread_20603/?forum=3 - aReader.SetReadVisible(hGrp->GetBool("SkipBlankEntities", true) - ? Standard_True : Standard_False); + aReader.SetReadVisible( + hGrp->GetBool("SkipBlankEntities", true) ? Standard_True : Standard_False); aReader.SetColorMode(true); aReader.SetNameMode(true); aReader.SetLayerMode(true); @@ -482,13 +513,13 @@ private: #endif // http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor()) - ->SetModel(new IGESData_IGESModel); + ->SetModel(new IGESData_IGESModel); } catch (OSD_Exception& e) { Base::Console().Error("%s\n", e.GetMessageString()); Base::Console().Message("Try to load IGES file without colors...\n"); - Part::ImportIgesParts(pcDoc,Utf8Name.c_str()); + Part::ImportIgesParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); } } @@ -496,25 +527,28 @@ private: throw Py::Exception(PyExc_IOError, "no supported file format"); } - FC_DURATION_PLUS(d1,t); - if (merge != Py_None) + FC_DURATION_PLUS(d1, t); + if (merge != Py_None) { ocaf.setMerge(Base::asBoolean(merge)); - if (importHidden != Py_None) + } + if (importHidden != Py_None) { ocaf.setImportHiddenObject(Base::asBoolean(importHidden)); - if (useLinkGroup != Py_None) + } + if (useLinkGroup != Py_None) { ocaf.setUseLinkGroup(Base::asBoolean(useLinkGroup)); + } ocaf.setMode(mode); auto ret = ocaf.loadShapes(); hApp->Close(hDoc); - FC_DURATION_PLUS(d2,t); - FC_DURATION_LOG(d1,"file read"); - FC_DURATION_LOG(d2,"import"); - FC_DURATION_LOG((d1+d2),"total"); + FC_DURATION_PLUS(d2, t); + FC_DURATION_LOG(d1, "file read"); + FC_DURATION_LOG(d2, "import"); + FC_DURATION_LOG((d1 + d2), "total"); - if(ret) { + if (ret) { App::GetApplication().setActiveDocument(pcDoc); auto gdoc = Gui::Application::Instance->getDocument(pcDoc); - if(gdoc) { + if (gdoc) { gdoc->setActiveView(); Gui::Application::Instance->commandManager().runCommandByName("Std_ViewFitAll"); } @@ -532,18 +566,22 @@ private: return Py::None(); } - static std::map getShapeColors(App::DocumentObject *obj, const char *subname) { + static std::map getShapeColors(App::DocumentObject* obj, + const char* subname) + { auto vp = Gui::Application::Instance->getViewProvider(obj); - if(vp) + if (vp) { return vp->getElementColors(subname); + } return {}; } Py::Object exportOptions(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string Utf8Name = std::string(Name); PyMem_Free(Name); @@ -565,23 +603,31 @@ private: return options; } - Py::Object exporter(const Py::Tuple& args, const Py::Dict &kwds) + Py::Object exporter(const Py::Tuple& args, const Py::Dict& kwds) { PyObject* object; char* Name; - PyObject *pyoptions = nullptr; - PyObject *pyexportHidden = Py_None; - PyObject *pylegacy = Py_None; - PyObject *pykeepPlacement = Py_None; - static const std::array kwd_list{"obj", "name", "options", "exportHidden", "legacy", - "keepPlacement", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "Oet|O!O!O!O!", - kwd_list, &object, - "utf-8", &Name, - &PyDict_Type, &pyoptions, - &PyBool_Type, &pyexportHidden, - &PyBool_Type, &pylegacy, - &PyBool_Type, &pykeepPlacement)) { + PyObject* pyoptions = nullptr; + PyObject* pyexportHidden = Py_None; + PyObject* pylegacy = Py_None; + PyObject* pykeepPlacement = Py_None; + static const std::array + kwd_list {"obj", "name", "options", "exportHidden", "legacy", "keepPlacement", nullptr}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), + kwds.ptr(), + "Oet|O!O!O!O!", + kwd_list, + &object, + "utf-8", + &Name, + &PyDict_Type, + &pyoptions, + &PyBool_Type, + &pyexportHidden, + &PyBool_Type, + &pylegacy, + &PyBool_Type, + &pykeepPlacement)) { throw Py::Exception(); } @@ -593,9 +639,12 @@ private: Part::OCAF::ImportExportSettings settings; // still support old way - bool legacyExport = (pylegacy == Py_None ? settings.getExportLegacy() : Base::asBoolean(pylegacy)); - bool exportHidden = (pyexportHidden == Py_None ? settings.getExportHiddenObject() : Base::asBoolean(pyexportHidden)); - bool keepPlacement = (pykeepPlacement == Py_None ? settings.getExportKeepPlacement() : Base::asBoolean(pykeepPlacement)); + bool legacyExport = + (pylegacy == Py_None ? settings.getExportLegacy() : Base::asBoolean(pylegacy)); + bool exportHidden = (pyexportHidden == Py_None ? settings.getExportHiddenObject() + : Base::asBoolean(pyexportHidden)); + bool keepPlacement = (pykeepPlacement == Py_None ? settings.getExportKeepPlacement() + : Base::asBoolean(pykeepPlacement)); // new way if (pyoptions) { @@ -617,11 +666,13 @@ private: Handle(TDocStd_Document) hDoc; hApp->NewDocument(TCollection_ExtendedString("MDTV-CAF"), hDoc); - std::vector objs; + std::vector objs; for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* item = (*it).ptr(); - if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) - objs.push_back(static_cast(item)->getDocumentObjectPtr()); + if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) { + objs.push_back( + static_cast(item)->getDocumentObjectPtr()); + } } Import::ExportOCAF2 ocaf(hDoc, &getShapeColors); @@ -636,32 +687,36 @@ private: bool keepExplicitPlacement = Standard_True; ExportOCAFGui ocaf(hDoc, keepExplicitPlacement); // That stuff is exporting a list of selected objects into FreeCAD Tree - std::vector hierarchical_label; - std::vector hierarchical_loc; - std::vector hierarchical_part; - for(auto obj : objs) - ocaf.exportObject(obj,hierarchical_label, hierarchical_loc,hierarchical_part); + std::vector hierarchical_label; + std::vector hierarchical_loc; + std::vector hierarchical_part; + for (auto obj : objs) { + ocaf.exportObject(obj, hierarchical_label, hierarchical_loc, hierarchical_part); + } // Free Shapes must have absolute placement and not explicit - std::vector FreeLabels; - std::vector part_id; - ocaf.getFreeLabels(hierarchical_label,FreeLabels, part_id); - // Got issue with the colors as they are coming from the View Provider they can't be determined into - // the App Code. - std::vector< std::vector > Colors; - ocaf.getPartColors(hierarchical_part,FreeLabels,part_id,Colors); - ocaf.reallocateFreeShape(hierarchical_part,FreeLabels,part_id,Colors); + std::vector FreeLabels; + std::vector part_id; + ocaf.getFreeLabels(hierarchical_label, FreeLabels, part_id); + // Got issue with the colors as they are coming from the View Provider they can't be + // determined into the App Code. + std::vector> Colors; + ocaf.getPartColors(hierarchical_part, FreeLabels, part_id, Colors); + ocaf.reallocateFreeShape(hierarchical_part, FreeLabels, part_id, Colors); XCAFDoc_DocumentTool::ShapeTool(hDoc->Main())->UpdateAssemblies(); } Base::FileInfo file(Utf8Name.c_str()); if (file.hasExtension({"stp", "step"})) { - ParameterGrp::handle hGrp_stp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Part/STEP"); - std::string scheme = hGrp_stp->GetASCII("Scheme", Part::Interface::writeStepScheme()); + ParameterGrp::handle hGrp_stp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Part/STEP"); + std::string scheme = + hGrp_stp->GetASCII("Scheme", Part::Interface::writeStepScheme()); std::list supported = Part::supportedSTEPSchemes(); - if (std::find(supported.begin(), supported.end(), scheme) != supported.end()) + if (std::find(supported.begin(), supported.end(), scheme) != supported.end()) { Part::Interface::writeStepScheme(scheme.c_str()); + } STEPCAFControl_Writer writer; Part::Interface::writeStepAssembly(Part::Interface::Assembly::On); @@ -670,17 +725,27 @@ private: // edit STEP header APIHeaderSection_MakeHeader makeHeader(writer.ChangeWriter().Model()); - Base::Reference hGrp = App::GetApplication().GetUserParameter() - .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("STEP"); + Base::Reference hGrp = App::GetApplication() + .GetUserParameter() + .GetGroup("BaseApp") + ->GetGroup("Preferences") + ->GetGroup("Mod/Part") + ->GetGroup("STEP"); // Don't set name because STEP doesn't support UTF-8 // https://forum.freecad.org/viewtopic.php?f=8&t=52967 - makeHeader.SetAuthorValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); - makeHeader.SetOrganizationValue (1, new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); - makeHeader.SetOriginatingSystem(new TCollection_HAsciiString(App::Application::getExecutableName().c_str())); + makeHeader.SetAuthorValue( + 1, + new TCollection_HAsciiString(hGrp->GetASCII("Author", "Author").c_str())); + makeHeader.SetOrganizationValue( + 1, + new TCollection_HAsciiString(hGrp->GetASCII("Company").c_str())); + makeHeader.SetOriginatingSystem( + new TCollection_HAsciiString(App::Application::getExecutableName().c_str())); makeHeader.SetDescriptionValue(1, new TCollection_HAsciiString("FreeCAD Model")); IFSelect_ReturnStatus ret = writer.Write(name8bit.c_str()); - if (ret == IFSelect_RetError || ret == IFSelect_RetFail || ret == IFSelect_RetStop) { + if (ret == IFSelect_RetError || ret == IFSelect_RetFail + || ret == IFSelect_RetStop) { PyErr_Format(PyExc_IOError, "Cannot open file '%s'", Utf8Name.c_str()); throw Py::Exception(); } @@ -689,9 +754,12 @@ private: IGESControl_Controller::Init(); IGESCAFControl_Writer writer; IGESData_GlobalSection header = writer.Model()->GlobalSection(); - header.SetAuthorName(new TCollection_HAsciiString(Part::Interface::writeIgesHeaderAuthor())); - header.SetCompanyName(new TCollection_HAsciiString(Part::Interface::writeIgesHeaderCompany())); - header.SetSendName(new TCollection_HAsciiString(Part::Interface::writeIgesHeaderProduct())); + header.SetAuthorName( + new TCollection_HAsciiString(Part::Interface::writeIgesHeaderAuthor())); + header.SetCompanyName( + new TCollection_HAsciiString(Part::Interface::writeIgesHeaderCompany())); + header.SetSendName( + new TCollection_HAsciiString(Part::Interface::writeIgesHeaderProduct())); writer.Model()->SetGlobalSection(header); writer.Transfer(hDoc); Standard_Boolean ret = writer.Write((const char*)name8bit.c_str()); @@ -703,15 +771,16 @@ private: else if (file.hasExtension({"glb", "gltf"})) { #if OCC_VERSION_HEX >= 0x070500 TColStd_IndexedDataMapOfStringString aMetadata; - RWGltf_CafWriter aWriter (name8bit.c_str(), file.hasExtension("glb")); - aWriter.SetTransformationFormat (RWGltf_WriterTrsfFormat_Compact); + RWGltf_CafWriter aWriter(name8bit.c_str(), file.hasExtension("glb")); + aWriter.SetTransformationFormat(RWGltf_WriterTrsfFormat_Compact); // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units - aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit (0.001); - aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem (RWMesh_CoordinateSystem_Zup); + aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit(0.001); + aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem( + RWMesh_CoordinateSystem_Zup); #if OCC_VERSION_HEX >= 0x070700 aWriter.SetParallel(true); #endif - Standard_Boolean ret = aWriter.Perform (hDoc, aMetadata, Message_ProgressRange()); + Standard_Boolean ret = aWriter.Perform(hDoc, aMetadata, Message_ProgressRange()); if (!ret) { PyErr_Format(PyExc_IOError, "Cannot save to file '%s'", Utf8Name.c_str()); throw Py::Exception(); @@ -736,8 +805,9 @@ private: Py::Object ocaf(const Py::Tuple& args) { const char* Name; - if (!PyArg_ParseTuple(args.ptr(), "s",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "s", &Name)) { throw Py::Exception(); + } try { Base::FileInfo file(Name); @@ -751,7 +821,7 @@ private: aReader.SetColorMode(true); aReader.SetNameMode(true); aReader.SetLayerMode(true); - aReader.SetSHUOMode(true); + aReader.SetSHUOMode(true); if (aReader.ReadFile((Standard_CString)Name) != IFSelect_RetDone) { throw Py::Exception(PyExc_IOError, "cannot read STEP file"); } @@ -768,13 +838,17 @@ private: #endif } else if (file.hasExtension({"igs", "iges"})) { - Base::Reference hGrp = App::GetApplication().GetUserParameter() - .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part")->GetGroup("IGES"); + Base::Reference hGrp = App::GetApplication() + .GetUserParameter() + .GetGroup("BaseApp") + ->GetGroup("Preferences") + ->GetGroup("Mod/Part") + ->GetGroup("IGES"); IGESControl_Controller::Init(); IGESCAFControl_Reader aReader; // http://www.opencascade.org/org/forum/thread_20603/?forum=3 - aReader.SetReadVisible(hGrp->GetBool("SkipBlankEntities", true) - ? Standard_True : Standard_False); + aReader.SetReadVisible(hGrp->GetBool("SkipBlankEntities", true) ? Standard_True + : Standard_False); aReader.SetColorMode(true); aReader.SetNameMode(true); aReader.SetLayerMode(true); @@ -794,7 +868,7 @@ private: #endif // http://opencascade.blogspot.de/2009/03/unnoticeable-memory-leaks-part-2.html Handle(IGESToBRep_Actor)::DownCast(aReader.WS()->TransferReader()->Actor()) - ->SetModel(new IGESData_IGESModel); + ->SetModel(new IGESData_IGESModel); } else { throw Py::Exception(PyExc_IOError, "no supported file format"); @@ -806,14 +880,14 @@ private: QTreeWidget* tree = new QTreeWidget(); tree->setHeaderLabel(QString::fromLatin1("OCAF Browser")); - QVBoxLayout *layout = new QVBoxLayout; + QVBoxLayout* layout = new QVBoxLayout; layout->addWidget(tree); dlg->setLayout(layout); QDialogButtonBox* btn = new QDialogButtonBox(dlg); btn->setStandardButtons(QDialogButtonBox::Close); QObject::connect(btn, &QDialogButtonBox::rejected, dlg, &QDialog::reject); - QHBoxLayout *boxlayout = new QHBoxLayout; + QHBoxLayout* boxlayout = new QHBoxLayout; boxlayout->addWidget(btn); layout->addLayout(boxlayout); } @@ -843,4 +917,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace ImportGui +} // namespace ImportGui diff --git a/src/Mod/Import/Gui/Command.cpp b/src/Mod/Import/Gui/Command.cpp index ad333559bb..9f83693807 100644 --- a/src/Mod/Import/Gui/Command.cpp +++ b/src/Mod/Import/Gui/Command.cpp @@ -38,29 +38,32 @@ using Gui::FileDialog; DEF_STD_CMD_A(FCCmdImportReadBREP) FCCmdImportReadBREP::FCCmdImportReadBREP() - : Command("Import_ReadBREP") + : Command("Import_ReadBREP") { - sAppModule = "Import"; - sGroup = "Import"; - sMenuText = "Read BREP"; - sToolTipText = "Read a BREP file"; - sWhatsThis = "Import_ReadBREP"; - sStatusTip = sToolTipText; - sPixmap = "Std_Tool1"; + sAppModule = "Import"; + sGroup = "Import"; + sMenuText = "Read BREP"; + sToolTipText = "Read a BREP file"; + sWhatsThis = "Import_ReadBREP"; + sStatusTip = sToolTipText; + sPixmap = "Std_Tool1"; } void FCCmdImportReadBREP::activated(int iMsg) { Q_UNUSED(iMsg); openCommand(QT_TRANSLATE_NOOP("Command", "Read BREP")); - QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), QString(), QString(), QLatin1String("BREP (*.brep *.rle)")); + QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), + QString(), + QString(), + QLatin1String("BREP (*.brep *.rle)")); if (fn.isEmpty()) { abortCommand(); return; } fn = Base::Tools::escapeEncodeFilename(fn); - doCommand(Doc,"TopoShape = Import.ReadBREP(\"%s\")",(const char*)fn.toUtf8()); + doCommand(Doc, "TopoShape = Import.ReadBREP(\"%s\")", (const char*)fn.toUtf8()); commitCommand(); } @@ -75,27 +78,30 @@ bool FCCmdImportReadBREP::isActive() DEF_STD_CMD_A(ImportStep) ImportStep::ImportStep() - : Command("Part_ImportStep") + : Command("Part_ImportStep") { - sAppModule = "Part"; - sGroup = "Part"; - sMenuText = "Import STEP"; - sToolTipText = "Create or change a Import STEP feature"; - sWhatsThis = "Part_ImportStep"; - sStatusTip = sToolTipText; - sPixmap = "Save"; + sAppModule = "Part"; + sGroup = "Part"; + sMenuText = "Import STEP"; + sToolTipText = "Create or change a Import STEP feature"; + sWhatsThis = "Part_ImportStep"; + sStatusTip = sToolTipText; + sPixmap = "Save"; } void ImportStep::activated(int iMsg) { Q_UNUSED(iMsg); - QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), QString(), QString(), QLatin1String("STEP (*.stp *.step)")); + QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), + QString(), + QString(), + QLatin1String("STEP (*.stp *.step)")); if (!fn.isEmpty()) { openCommand(QT_TRANSLATE_NOOP("Command", "Part ImportSTEP Create")); - doCommand(Doc,"f = App.document().addObject(\"ImportStep\",\"ImportStep\")"); + doCommand(Doc, "f = App.document().addObject(\"ImportStep\",\"ImportStep\")"); fn = Base::Tools::escapeEncodeFilename(fn); - doCommand(Doc,"f.FileName = \"%s\"",(const char*)fn.toUtf8()); + doCommand(Doc, "f.FileName = \"%s\"", (const char*)fn.toUtf8()); commitCommand(); updateActive(); } @@ -103,10 +109,12 @@ void ImportStep::activated(int iMsg) bool ImportStep::isActive() { - if (getActiveGuiDocument()) + if (getActiveGuiDocument()) { return true; - else + } + else { return false; + } } @@ -116,26 +124,29 @@ bool ImportStep::isActive() DEF_STD_CMD_A(ImportIges) ImportIges::ImportIges() - : Command("Import_Iges") + : Command("Import_Iges") { - sAppModule = "Import"; - sGroup = "Part"; - sMenuText = "Import IGES"; - sToolTipText = "Create or change a Import IGES feature"; - sWhatsThis = "Import_Iges"; - sStatusTip = sToolTipText; - sPixmap = "Save"; + sAppModule = "Import"; + sGroup = "Part"; + sMenuText = "Import IGES"; + sToolTipText = "Create or change a Import IGES feature"; + sWhatsThis = "Import_Iges"; + sStatusTip = sToolTipText; + sPixmap = "Save"; } void ImportIges::activated(int iMsg) { Q_UNUSED(iMsg); - QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), QString(), QString(), QLatin1String("IGES (*.igs *.iges)")); + QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), + QString(), + QString(), + QLatin1String("IGES (*.igs *.iges)")); if (!fn.isEmpty()) { openCommand(QT_TRANSLATE_NOOP("Command", "ImportIGES Create")); - doCommand(Doc,"f = App.document().addObject(\"ImportIges\",\"ImportIges\")"); + doCommand(Doc, "f = App.document().addObject(\"ImportIges\",\"ImportIges\")"); fn = Base::Tools::escapeEncodeFilename(fn); - doCommand(Doc,"f.FileName = \"%s\"",(const char*)fn.toUtf8()); + doCommand(Doc, "f.FileName = \"%s\"", (const char*)fn.toUtf8()); commitCommand(); updateActive(); } @@ -143,15 +154,17 @@ void ImportIges::activated(int iMsg) bool ImportIges::isActive() { - if (getActiveGuiDocument()) + if (getActiveGuiDocument()) { return true; - else + } + else { return false; + } } void CreateImportCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new FCCmdImportReadBREP()); } diff --git a/src/Mod/Import/Gui/PreCompiled.h b/src/Mod/Import/Gui/PreCompiled.h index 54ece8376f..854f2d6324 100644 --- a/src/Mod/Import/Gui/PreCompiled.h +++ b/src/Mod/Import/Gui/PreCompiled.h @@ -29,61 +29,58 @@ // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning(disable : 4005) -# pragma warning(disable : 4251) -# pragma warning(disable : 4503) -# pragma warning(disable : 4786) // specifier longer then 255 chars +#pragma warning(disable : 4005) +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif #ifdef _PreComp_ // standard -#include -#include #include +#include +#include // STL -#include #include -#include #include +#include +#include #ifndef FC_OS_WIN32 -# include +#include #endif // OpenCasCade Base #include // OpenCascade View +#include +#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include #include -#include -#include -#include +#include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #ifndef FC_OS_WIN32 #include @@ -93,10 +90,10 @@ // Qt Toolkit #ifndef __QtAll__ -# include +#include #endif -#endif //_PreComp_ +#endif //_PreComp_ -#endif // __PRECOMPILED_GUI__ +#endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/Import/Gui/Workbench.cpp b/src/Mod/Import/Gui/Workbench.cpp index 8a31896fdd..ebdbbf7e7d 100644 --- a/src/Mod/Import/Gui/Workbench.cpp +++ b/src/Mod/Import/Gui/Workbench.cpp @@ -46,4 +46,3 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const Gui::ToolBarItem* root = new Gui::ToolBarItem; return root; } - diff --git a/src/Mod/Import/Gui/Workbench.h b/src/Mod/Import/Gui/Workbench.h index 3a8271fffc..fe59a2671d 100644 --- a/src/Mod/Import/Gui/Workbench.h +++ b/src/Mod/Import/Gui/Workbench.h @@ -26,12 +26,13 @@ #include -namespace ImportGui { +namespace ImportGui +{ /** * @author Werner Mayer */ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -44,7 +45,7 @@ protected: Gui::ToolBarItem* setupCommandBars() const override; }; -} // namespace ImportGui +} // namespace ImportGui -#endif // IMPORT_WORKBENCH_H +#endif // IMPORT_WORKBENCH_H diff --git a/src/Mod/Import/ImportGlobal.h b/src/Mod/Import/ImportGlobal.h index 65dd3e5bd1..69a155f80d 100644 --- a/src/Mod/Import/ImportGlobal.h +++ b/src/Mod/Import/ImportGlobal.h @@ -29,19 +29,19 @@ // Import #ifndef ImportExport #ifdef Import_EXPORTS -# define ImportExport FREECAD_DECL_EXPORT +#define ImportExport FREECAD_DECL_EXPORT #else -# define ImportExport FREECAD_DECL_IMPORT +#define ImportExport FREECAD_DECL_IMPORT #endif #endif // ImportGui #ifndef ImportGuiExport #ifdef ImportGui_EXPORTS -# define ImportGuiExport FREECAD_DECL_EXPORT +#define ImportGuiExport FREECAD_DECL_EXPORT #else -# define ImportGuiExport FREECAD_DECL_IMPORT +#define ImportGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //IMPORT_GLOBAL_H +#endif // IMPORT_GLOBAL_H diff --git a/src/Mod/Import/Init.py b/src/Mod/Import/Init.py index 730665c0b0..658ca17173 100644 --- a/src/Mod/Import/Init.py +++ b/src/Mod/Import/Init.py @@ -1,36 +1,35 @@ # FreeCAD init script of the Import module # (c) 2001 Juergen Riegel -#*************************************************************************** -#* Copyright (c) 2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ - +# *************************************************************************** +# * Copyright (c) 2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Append the open handler -#FreeCAD.addImportType("STEP 214 (*.step *.stp)","ImportGui") -#FreeCAD.addExportType("STEP 214 (*.step *.stp)","ImportGui") -#FreeCAD.addExportType("IGES files (*.iges *.igs)","ImportGui") -FreeCAD.addImportType("PLMXML files (*.plmxml)","PlmXmlParser") -FreeCAD.addImportType("STEPZ Zip File Type (*.stpZ *.stpz)","stepZ") -FreeCAD.addExportType("STEPZ zip File Type (*.stpZ *.stpz)","stepZ") -FreeCAD.addExportType("glTF (*.gltf *.glb)","ImportGui") +# FreeCAD.addImportType("STEP 214 (*.step *.stp)","ImportGui") +# FreeCAD.addExportType("STEP 214 (*.step *.stp)","ImportGui") +# FreeCAD.addExportType("IGES files (*.iges *.igs)","ImportGui") +FreeCAD.addImportType("PLMXML files (*.plmxml)", "PlmXmlParser") +FreeCAD.addImportType("STEPZ Zip File Type (*.stpZ *.stpz)", "stepZ") +FreeCAD.addExportType("STEPZ zip File Type (*.stpZ *.stpz)", "stepZ") +FreeCAD.addExportType("glTF (*.gltf *.glb)", "ImportGui") diff --git a/src/Mod/Import/InitGui.py b/src/Mod/Import/InitGui.py index 7b3d4e94ae..4ae974a1db 100644 --- a/src/Mod/Import/InitGui.py +++ b/src/Mod/Import/InitGui.py @@ -6,34 +6,34 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -#*************************************************************************** -#* Copyright (c) 2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Registered in Part's Init.py file -FreeCAD.changeImportModule("STEP with colors (*.step *.stp)","Import","ImportGui") -FreeCAD.changeExportModule("STEP with colors (*.step *.stp)","Import","ImportGui") -FreeCAD.changeExportModule("glTF (*.gltf *.glb)","Import","ImportGui") +FreeCAD.changeImportModule("STEP with colors (*.step *.stp)", "Import", "ImportGui") +FreeCAD.changeExportModule("STEP with colors (*.step *.stp)", "Import", "ImportGui") +FreeCAD.changeExportModule("glTF (*.gltf *.glb)", "Import", "ImportGui") """ class ImportWorkbench ( Workbench ): @@ -74,5 +74,5 @@ class ImportWorkbench ( Workbench ): Gui.addWorkbench("Import",ImportWorkbench()) """ # See https://forum.freecad.org/viewtopic.php?f=3&t=26782 -#import Import_rc -#FreeCADGui.addPreferencePage(":/ui/preferences-import.ui","Import-Export") +# import Import_rc +# FreeCADGui.addPreferencePage(":/ui/preferences-import.ui","Import-Export") diff --git a/src/Mod/Import/Resources/Import.qrc b/src/Mod/Import/Resources/Import.qrc index e041b2aec2..55b1e3e31b 100644 --- a/src/Mod/Import/Resources/Import.qrc +++ b/src/Mod/Import/Resources/Import.qrc @@ -1,5 +1,5 @@ - + ui/preferences-import.ui - + diff --git a/src/Mod/Import/import.dox b/src/Mod/Import/import.dox index ad8b67c776..446762d982 100644 --- a/src/Mod/Import/import.dox +++ b/src/Mod/Import/import.dox @@ -2,4 +2,3 @@ * \ingroup UTILITIES * brief Utilities to import various file formats using OpenCasCade OCAF */ - diff --git a/src/Mod/Import/stepZ.py b/src/Mod/Import/stepZ.py index c4116e0005..1e55c3a775 100644 --- a/src/Mod/Import/stepZ.py +++ b/src/Mod/Import/stepZ.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- -#**************************************************************************** -#* Copyright (c) 2018 Maurice * -#* * -#* StepZ Import Export compressed STEP files for FreeCAD * -#* License: LGPLv2+ * -#* * -#**************************************************************************** +# **************************************************************************** +# * Copyright (c) 2018 Maurice * +# * * +# * StepZ Import Export compressed STEP files for FreeCAD * +# * License: LGPLv2+ * +# * * +# **************************************************************************** # workaround for unicode in gzipping filename # OCC7 doesn't support non-ASCII characters at the moment @@ -34,130 +34,149 @@ import builtins import importlib -import zipfile as zf +import zipfile as zf # import stepZ; import importlib; importlib.reload(stepZ); stepZ.open(u"C:/Temp/brick.stpz") + def mkz_string(input): if isinstance(input, str): return input else: - input = input.encode('utf-8') + input = input.encode("utf-8") return input + + #### def mkz_unicode(input): if isinstance(input, str): return input else: - input = input.decode('utf-8') + input = input.decode("utf-8") return input + #### def sayz(msg): FreeCAD.Console.PrintMessage(msg) - FreeCAD.Console.PrintMessage('\n') + FreeCAD.Console.PrintMessage("\n") + + #### def sayzw(msg): FreeCAD.Console.PrintWarning(msg) - FreeCAD.Console.PrintWarning('\n') + FreeCAD.Console.PrintWarning("\n") + + #### def sayzerr(msg): FreeCAD.Console.PrintError(msg) - FreeCAD.Console.PrintWarning('\n') + FreeCAD.Console.PrintWarning("\n") + + #### -def import_stpz(fn,fc,doc): + +def import_stpz(fn, fc, doc): # sayz(fn) ext = os.path.splitext(os.path.basename(fn))[1] - fname=os.path.splitext(os.path.basename(fn))[0] - basepath=os.path.split(fn)[0] - filepath = os.path.join(basepath,fname + u'.stp') + fname = os.path.splitext(os.path.basename(fn))[0] + basepath = os.path.split(fn)[0] + filepath = os.path.join(basepath, fname + ".stp") - tempdir = tempfile.gettempdir() # get the current temporary directory - tempfilepath = os.path.join(tempdir,fname + u'.stp') + tempdir = tempfile.gettempdir() # get the current temporary directory + tempfilepath = os.path.join(tempdir, fname + ".stp") - with builtins.open(tempfilepath, 'wb') as f: #py3 + with builtins.open(tempfilepath, "wb") as f: # py3 f.write(fc) - #ImportGui.insert(filepath) + # ImportGui.insert(filepath) if doc is None: ImportGui.open(tempfilepath) else: - ImportGui.open(tempfilepath,doc.Name) + ImportGui.open(tempfilepath, doc.Name) FreeCADGui.SendMsgToActiveView("ViewFit") try: os.remove(tempfilepath) except OSError: - sayzerr("error on removing "+tempfilepath+" file") + sayzerr("error on removing " + tempfilepath + " file") + + ### -def open(filename,doc=None): + +def open(filename, doc=None): if zf.is_zipfile(filename): - with zf.ZipFile(filename, 'r') as fz: + with zf.ZipFile(filename, "r") as fz: file_names = fz.namelist() for fn in file_names: sayz(fn) with fz.open(fn) as zfile: file_content = zfile.read() - import_stpz(filename,file_content,doc) + import_stpz(filename, file_content, doc) else: - with gz.open(filename, 'rb') as f: - fnm=os.path.splitext(os.path.basename(filename))[0] + with gz.open(filename, "rb") as f: + fnm = os.path.splitext(os.path.basename(filename))[0] sayz(fnm) file_content = f.read() - import_stpz(filename,file_content,doc) + import_stpz(filename, file_content, doc) + + #### -def insert(filename,doc): + +def insert(filename, doc): doc = FreeCAD.ActiveDocument open(filename, doc) + #### -def export(objs,filename): + +def export(objs, filename): """exporting to file folder""" - #sayz(filename) - sayz("stpZ version "+___stpZversion___) + # sayz(filename) + sayz("stpZ version " + ___stpZversion___) ext = os.path.splitext(os.path.basename(filename))[1] - fname=os.path.splitext(os.path.basename(filename))[0] - basepath=os.path.split(filename)[0] - tempdir = tempfile.gettempdir() # get the current temporary directory + fname = os.path.splitext(os.path.basename(filename))[0] + basepath = os.path.split(filename)[0] + tempdir = tempfile.gettempdir() # get the current temporary directory - filepath = os.path.join(basepath,fname) + u'.stp' - filepath_base = os.path.join(basepath,fname) + filepath = os.path.join(basepath, fname) + ".stp" + filepath_base = os.path.join(basepath, fname) - namefpath = os.path.join(basepath,fname) + namefpath = os.path.join(basepath, fname) - outfpath = os.path.join(basepath,fname)+u'.stpZ' - outfpathT = os.path.join(tempdir,fname)+u'.stpZ' - outfpath_stp = os.path.join(basepath,fname)+u'.stp' - outfpathT_stp = os.path.join(tempdir,fname)+u'.stp' + outfpath = os.path.join(basepath, fname) + ".stpZ" + outfpathT = os.path.join(tempdir, fname) + ".stpZ" + outfpath_stp = os.path.join(basepath, fname) + ".stp" + outfpathT_stp = os.path.join(tempdir, fname) + ".stp" outfpath_base = basepath - #outfpath_str = mkz_string(os.path.join(basepath,fname)) - outfpath_str = os.path.join(basepath,fname)+u'.stp' - outfpathT_str = os.path.join(tempdir,fname)+u'.stp' - + # outfpath_str = mkz_string(os.path.join(basepath,fname)) + outfpath_str = os.path.join(basepath, fname) + ".stp" + outfpathT_str = os.path.join(tempdir, fname) + ".stp" if os.path.exists(outfpathT_stp): os.remove(outfpathT_stp) - sayzw("Old temp file with the same name removed '"+ outfpathT_stp +"'") - ImportGui.export(objs,outfpathT_stp) - with builtins.open(outfpathT_stp, 'rb') as f_in: + sayzw("Old temp file with the same name removed '" + outfpathT_stp + "'") + ImportGui.export(objs, outfpathT_stp) + with builtins.open(outfpathT_stp, "rb") as f_in: file_content = f_in.read() new_f_content = file_content f_in.close() - with gz.open(outfpathT_str, 'wb') as f_out: + with gz.open(outfpathT_str, "wb") as f_out: f_out.write(new_f_content) f_out.close() if os.path.exists(outfpath): shutil.move(outfpathT_str, outfpath) - #os.remove(outfpathT_stp) + # os.remove(outfpathT_stp) else: shutil.move(outfpathT_str, outfpath) - #os.remove(outfpathT_stp) + # os.remove(outfpathT_stp) + #### diff --git a/src/Mod/Inspection/App/AppInspection.cpp b/src/Mod/Inspection/App/AppInspection.cpp index 79c0bdab45..48dbff3927 100644 --- a/src/Mod/Inspection/App/AppInspection.cpp +++ b/src/Mod/Inspection/App/AppInspection.cpp @@ -28,13 +28,15 @@ #include "InspectionFeature.h" -namespace Inspection { -class Module : public Py::ExtensionModule +namespace Inspection +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Inspection") + Module() + : Py::ExtensionModule("Inspection") { - initialize("This module is the Inspection module."); // register with Python + initialize("This module is the Inspection module."); // register with Python } private: @@ -45,7 +47,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Inspection +} // namespace Inspection /* Python entry */ @@ -56,9 +58,10 @@ PyMOD_INIT_FUNC(Inspection) // PyObject* mod = Inspection::initModule(); Base::Console().Log("Loading Inspection module... done\n"); - + // clang-format off Inspection::PropertyDistanceList ::init(); Inspection::Feature ::init(); Inspection::Group ::init(); + // clang-format on PyMOD_Return(mod); } diff --git a/src/Mod/Inspection/App/InspectionFeature.cpp b/src/Mod/Inspection/App/InspectionFeature.cpp index 3af64c1b9a..46a77575a7 100644 --- a/src/Mod/Inspection/App/InspectionFeature.cpp +++ b/src/Mod/Inspection/App/InspectionFeature.cpp @@ -23,16 +23,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -#include #include +#include -#include #include #include +#include #include -#include #include #include +#include #include #include @@ -45,14 +45,14 @@ #include #include -#include #include #include #include #include +#include +#include #include #include -#include #include "InspectionFeature.h" @@ -60,7 +60,8 @@ using namespace Inspection; namespace sp = std::placeholders; -InspectActualMesh::InspectActualMesh(const Mesh::MeshObject& rMesh) : _mesh(rMesh.getKernel()) +InspectActualMesh::InspectActualMesh(const Mesh::MeshObject& rMesh) + : _mesh(rMesh.getKernel()) { Base::Matrix4D tmp; _clTrf = rMesh.getTransform(); @@ -85,9 +86,9 @@ Base::Vector3f InspectActualMesh::getPoint(unsigned long index) const // ---------------------------------------------------------------- -InspectActualPoints::InspectActualPoints(const Points::PointKernel& rPoints) : _rKernel(rPoints) -{ -} +InspectActualPoints::InspectActualPoints(const Points::PointKernel& rPoints) + : _rKernel(rPoints) +{} unsigned long InspectActualPoints::countPoints() const { @@ -102,7 +103,8 @@ Base::Vector3f InspectActualPoints::getPoint(unsigned long index) const // ---------------------------------------------------------------- -InspectActualShape::InspectActualShape(const Part::TopoShape& shape) : _rShape(shape) +InspectActualShape::InspectActualShape(const Part::TopoShape& shape) + : _rShape(shape) { Standard_Real deflection = _rShape.getAccuracy(); fetchPoints(deflection); @@ -142,158 +144,167 @@ Base::Vector3f InspectActualShape::getPoint(unsigned long index) const // ---------------------------------------------------------------- -namespace Inspection { - class MeshInspectGrid : public MeshCore::MeshGrid +namespace Inspection +{ +class MeshInspectGrid: public MeshCore::MeshGrid +{ +public: + MeshInspectGrid(const MeshCore::MeshKernel& mesh, float fGridLen, const Base::Matrix4D& mat) + : MeshCore::MeshGrid(mesh) + , _transform(mat) { - public: - MeshInspectGrid (const MeshCore::MeshKernel &mesh, float fGridLen, const Base::Matrix4D& mat) - : MeshCore::MeshGrid(mesh), _transform(mat) - { - Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox().Transformed(mat); - Rebuild(std::max((unsigned long)(clBBMesh.LengthX() / fGridLen), 1), - std::max((unsigned long)(clBBMesh.LengthY() / fGridLen), 1), - std::max((unsigned long)(clBBMesh.LengthZ() / fGridLen), 1)); - } + Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox().Transformed(mat); + Rebuild(std::max((unsigned long)(clBBMesh.LengthX() / fGridLen), 1), + std::max((unsigned long)(clBBMesh.LengthY() / fGridLen), 1), + std::max((unsigned long)(clBBMesh.LengthZ() / fGridLen), 1)); + } - void Validate (const MeshCore::MeshKernel& kernel) override - { - // do nothing - boost::ignore_unused(kernel); - } + void Validate(const MeshCore::MeshKernel& kernel) override + { + // do nothing + boost::ignore_unused(kernel); + } - void Validate () - { - // do nothing - } + void Validate() + { + // do nothing + } - bool Verify() const override - { - // do nothing - return true; - } + bool Verify() const override + { + // do nothing + return true; + } - protected: - void CalculateGridLength (unsigned long /*ulCtGrid*/, unsigned long /*ulMaxGrids*/) override - { - // do nothing - } +protected: + void CalculateGridLength(unsigned long /*ulCtGrid*/, unsigned long /*ulMaxGrids*/) override + { + // do nothing + } - void CalculateGridLength (int /*iCtGridPerAxis*/) override - { - // do nothing - } + void CalculateGridLength(int /*iCtGridPerAxis*/) override + { + // do nothing + } - unsigned long HasElements () const override - { - return _pclMesh->CountFacets(); - } + unsigned long HasElements() const override + { + return _pclMesh->CountFacets(); + } - void Pos (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const - { - rulX = (unsigned long)((rclPoint.x - _fMinX) / _fGridLenX); - rulY = (unsigned long)((rclPoint.y - _fMinY) / _fGridLenY); - rulZ = (unsigned long)((rclPoint.z - _fMinZ) / _fGridLenZ); + void Pos(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const + { + rulX = (unsigned long)((rclPoint.x - _fMinX) / _fGridLenX); + rulY = (unsigned long)((rclPoint.y - _fMinY) / _fGridLenY); + rulZ = (unsigned long)((rclPoint.z - _fMinZ) / _fGridLenZ); - assert((rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ)); - } + assert((rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ)); + } - void AddFacet (const MeshCore::MeshGeomFacet &rclFacet, unsigned long ulFacetIndex) - { - unsigned long ulX1; - unsigned long ulY1; - unsigned long ulZ1; - unsigned long ulX2; - unsigned long ulY2; - unsigned long ulZ2; + void AddFacet(const MeshCore::MeshGeomFacet& rclFacet, unsigned long ulFacetIndex) + { + unsigned long ulX1; + unsigned long ulY1; + unsigned long ulZ1; + unsigned long ulX2; + unsigned long ulY2; + unsigned long ulZ2; - Base::BoundBox3f clBB; - clBB.Add(rclFacet._aclPoints[0]); - clBB.Add(rclFacet._aclPoints[1]); - clBB.Add(rclFacet._aclPoints[2]); + Base::BoundBox3f clBB; + clBB.Add(rclFacet._aclPoints[0]); + clBB.Add(rclFacet._aclPoints[1]); + clBB.Add(rclFacet._aclPoints[2]); - Pos(Base::Vector3f(clBB.MinX,clBB.MinY,clBB.MinZ), ulX1, ulY1, ulZ1); - Pos(Base::Vector3f(clBB.MaxX,clBB.MaxY,clBB.MaxZ), ulX2, ulY2, ulZ2); - + Pos(Base::Vector3f(clBB.MinX, clBB.MinY, clBB.MinZ), ulX1, ulY1, ulZ1); + Pos(Base::Vector3f(clBB.MaxX, clBB.MaxY, clBB.MaxZ), ulX2, ulY2, ulZ2); - if ((ulX1 < ulX2) || (ulY1 < ulY2) || (ulZ1 < ulZ2)) { - for (unsigned long ulX = ulX1; ulX <= ulX2; ulX++) { - for (unsigned long ulY = ulY1; ulY <= ulY2; ulY++) { - for (unsigned long ulZ = ulZ1; ulZ <= ulZ2; ulZ++) { - if (rclFacet.IntersectBoundingBox(GetBoundBox(ulX, ulY, ulZ))) - _aulGrid[ulX][ulY][ulZ].insert(ulFacetIndex); + + if ((ulX1 < ulX2) || (ulY1 < ulY2) || (ulZ1 < ulZ2)) { + for (unsigned long ulX = ulX1; ulX <= ulX2; ulX++) { + for (unsigned long ulY = ulY1; ulY <= ulY2; ulY++) { + for (unsigned long ulZ = ulZ1; ulZ <= ulZ2; ulZ++) { + if (rclFacet.IntersectBoundingBox(GetBoundBox(ulX, ulY, ulZ))) { + _aulGrid[ulX][ulY][ulZ].insert(ulFacetIndex); } } } } - else { - _aulGrid[ulX1][ulY1][ulZ1].insert(ulFacetIndex); + } + else { + _aulGrid[ulX1][ulY1][ulZ1].insert(ulFacetIndex); + } + } + + void InitGrid() override + { + unsigned long i, j; + + Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox().Transformed(_transform); + + float fLengthX = clBBMesh.LengthX(); + float fLengthY = clBBMesh.LengthY(); + float fLengthZ = clBBMesh.LengthZ(); + + _fGridLenX = (1.0f + fLengthX) / float(_ulCtGridsX); + _fMinX = clBBMesh.MinX - 0.5f; + + _fGridLenY = (1.0f + fLengthY) / float(_ulCtGridsY); + _fMinY = clBBMesh.MinY - 0.5f; + + _fGridLenZ = (1.0f + fLengthZ) / float(_ulCtGridsZ); + _fMinZ = clBBMesh.MinZ - 0.5f; + + _aulGrid.clear(); + _aulGrid.resize(_ulCtGridsX); + for (i = 0; i < _ulCtGridsX; i++) { + _aulGrid[i].resize(_ulCtGridsY); + for (j = 0; j < _ulCtGridsY; j++) { + _aulGrid[i][j].resize(_ulCtGridsZ); } } + } - void InitGrid () override - { - unsigned long i, j; + void RebuildGrid() override + { + _ulCtElements = _pclMesh->CountFacets(); + InitGrid(); - Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox().Transformed(_transform); - - float fLengthX = clBBMesh.LengthX(); - float fLengthY = clBBMesh.LengthY(); - float fLengthZ = clBBMesh.LengthZ(); - - _fGridLenX = (1.0f + fLengthX) / float(_ulCtGridsX); - _fMinX = clBBMesh.MinX - 0.5f; - - _fGridLenY = (1.0f + fLengthY) / float(_ulCtGridsY); - _fMinY = clBBMesh.MinY - 0.5f; - - _fGridLenZ = (1.0f + fLengthZ) / float(_ulCtGridsZ); - _fMinZ = clBBMesh.MinZ - 0.5f; - - _aulGrid.clear(); - _aulGrid.resize(_ulCtGridsX); - for (i = 0; i < _ulCtGridsX; i++) { - _aulGrid[i].resize(_ulCtGridsY); - for (j = 0; j < _ulCtGridsY; j++) - _aulGrid[i][j].resize(_ulCtGridsZ); - } + unsigned long i = 0; + MeshCore::MeshFacetIterator clFIter(*_pclMesh); + clFIter.Transform(_transform); + for (clFIter.Init(); clFIter.More(); clFIter.Next()) { + AddFacet(*clFIter, i++); } + } - void RebuildGrid () override - { - _ulCtElements = _pclMesh->CountFacets(); - InitGrid(); - - unsigned long i = 0; - MeshCore::MeshFacetIterator clFIter(*_pclMesh); - clFIter.Transform(_transform); - for (clFIter.Init(); clFIter.More(); clFIter.Next()) { - AddFacet(*clFIter, i++); - } - } +private: + Base::Matrix4D _transform; +}; +} // namespace Inspection - private: - Base::Matrix4D _transform; - }; -} - -InspectNominalMesh::InspectNominalMesh(const Mesh::MeshObject& rMesh, float offset) : _mesh(rMesh.getKernel()) +InspectNominalMesh::InspectNominalMesh(const Mesh::MeshObject& rMesh, float offset) + : _mesh(rMesh.getKernel()) { Base::Matrix4D tmp; _clTrf = rMesh.getTransform(); _bApply = _clTrf != tmp; // Max. limit of grid elements - float fMaxGridElements=8000000.0f; + float fMaxGridElements = 8000000.0f; Base::BoundBox3f box = _mesh.GetBoundBox().Transformed(rMesh.getTransform()); // estimate the minimum allowed grid length - float fMinGridLen = (float)pow((box.LengthX()*box.LengthY()*box.LengthZ()/fMaxGridElements), 0.3333f); + float fMinGridLen = + (float)pow((box.LengthX() * box.LengthY() * box.LengthZ() / fMaxGridElements), 0.3333f); float fGridLen = 5.0f * MeshCore::MeshAlgorithm(_mesh).GetAverageEdgeLength(); - // We want to avoid to get too small grid elements otherwise building up the grid structure would take - // too much time and memory. - // Having quite a dense grid speeds up more the following algorithms extremely. Due to the issue above it's - // always a compromise between speed and memory usage. + // We want to avoid to get too small grid elements otherwise building up the grid structure + // would take too much time and memory. Having quite a dense grid speeds up more the following + // algorithms extremely. Due to the issue above it's always a compromise between speed and + // memory usage. fGridLen = std::max(fMinGridLen, fGridLen); // build up grid structure to speed up algorithms @@ -309,8 +320,9 @@ InspectNominalMesh::~InspectNominalMesh() float InspectNominalMesh::getDistance(const Base::Vector3f& point) const { - if (!_box.IsInBox(point)) - return FLT_MAX; // must be inside bbox + if (!_box.IsInBox(point)) { + return FLT_MAX; // must be inside bbox + } std::vector indices; //_pGrid->GetElements(point, indices); @@ -320,7 +332,7 @@ float InspectNominalMesh::getDistance(const Base::Vector3f& point) const indices.insert(indices.begin(), inds.begin(), inds.end()); } - float fMinDist=FLT_MAX; + float fMinDist = FLT_MAX; bool positive = true; for (unsigned long it : indices) { MeshCore::MeshGeomFacet geomFace = _mesh.GetFacet(it); @@ -335,14 +347,16 @@ float InspectNominalMesh::getDistance(const Base::Vector3f& point) const } } - if (!positive) + if (!positive) { fMinDist = -fMinDist; + } return fMinDist; } // ---------------------------------------------------------------- -InspectNominalFastMesh::InspectNominalFastMesh(const Mesh::MeshObject& rMesh, float offset) : _mesh(rMesh.getKernel()) +InspectNominalFastMesh::InspectNominalFastMesh(const Mesh::MeshObject& rMesh, float offset) + : _mesh(rMesh.getKernel()) { const MeshCore::MeshKernel& kernel = rMesh.getKernel(); @@ -351,24 +365,25 @@ InspectNominalFastMesh::InspectNominalFastMesh(const Mesh::MeshObject& rMesh, fl _bApply = _clTrf != tmp; // Max. limit of grid elements - float fMaxGridElements=8000000.0f; + float fMaxGridElements = 8000000.0f; Base::BoundBox3f box = kernel.GetBoundBox().Transformed(rMesh.getTransform()); // estimate the minimum allowed grid length - float fMinGridLen = (float)pow((box.LengthX()*box.LengthY()*box.LengthZ()/fMaxGridElements), 0.3333f); + float fMinGridLen = + (float)pow((box.LengthX() * box.LengthY() * box.LengthZ() / fMaxGridElements), 0.3333f); float fGridLen = 5.0f * MeshCore::MeshAlgorithm(kernel).GetAverageEdgeLength(); - // We want to avoid to get too small grid elements otherwise building up the grid structure would take - // too much time and memory. - // Having quite a dense grid speeds up more the following algorithms extremely. Due to the issue above it's - // always a compromise between speed and memory usage. + // We want to avoid to get too small grid elements otherwise building up the grid structure + // would take too much time and memory. Having quite a dense grid speeds up more the following + // algorithms extremely. Due to the issue above it's always a compromise between speed and + // memory usage. fGridLen = std::max(fMinGridLen, fGridLen); // build up grid structure to speed up algorithms _pGrid = new MeshInspectGrid(kernel, fGridLen, rMesh.getTransform()); _box = box; _box.Enlarge(offset); - max_level = (unsigned long)(offset/fGridLen); + max_level = (unsigned long)(offset / fGridLen); } InspectNominalFastMesh::~InspectNominalFastMesh() @@ -382,11 +397,12 @@ InspectNominalFastMesh::~InspectNominalFastMesh() */ float InspectNominalFastMesh::getDistance(const Base::Vector3f& point) const { - if (!_box.IsInBox(point)) - return FLT_MAX; // must be inside bbox + if (!_box.IsInBox(point)) { + return FLT_MAX; // must be inside bbox + } std::set indices; -#if 0 // a point in a neighbour grid can be nearer +#if 0 // a point in a neighbour grid can be nearer std::vector elements; _pGrid->GetElements(point, elements); indices.insert(elements.begin(), elements.end()); @@ -394,13 +410,15 @@ float InspectNominalFastMesh::getDistance(const Base::Vector3f& point) const unsigned long ulX, ulY, ulZ; _pGrid->Position(point, ulX, ulY, ulZ); unsigned long ulLevel = 0; - while (indices.empty() && ulLevel <= max_level) + while (indices.empty() && ulLevel <= max_level) { _pGrid->GetHull(ulX, ulY, ulZ, ulLevel++, indices); - if (indices.empty() || ulLevel==1) + } + if (indices.empty() || ulLevel == 1) { _pGrid->GetHull(ulX, ulY, ulZ, ulLevel, indices); + } #endif - float fMinDist=FLT_MAX; + float fMinDist = FLT_MAX; bool positive = true; for (unsigned long it : indices) { MeshCore::MeshGeomFacet geomFace = _mesh.GetFacet(it); @@ -415,18 +433,19 @@ float InspectNominalFastMesh::getDistance(const Base::Vector3f& point) const } } - if (!positive) + if (!positive) { fMinDist = -fMinDist; + } return fMinDist; } // ---------------------------------------------------------------- InspectNominalPoints::InspectNominalPoints(const Points::PointKernel& Kernel, float /*offset*/) - : _rKernel(Kernel) + : _rKernel(Kernel) { - int uGridPerAxis = 50; // totally 125.000 grid elements - this->_pGrid = new Points::PointsGrid (Kernel, uGridPerAxis); + int uGridPerAxis = 50; // totally 125.000 grid elements + this->_pGrid = new Points::PointsGrid(Kernel, uGridPerAxis); } InspectNominalPoints::~InspectNominalPoints() @@ -436,14 +455,14 @@ InspectNominalPoints::~InspectNominalPoints() float InspectNominalPoints::getDistance(const Base::Vector3f& point) const { - //TODO: Make faster + // TODO: Make faster std::set indices; - unsigned long x,y,z; - Base::Vector3d pointd(point.x,point.y,point.z); + unsigned long x, y, z; + Base::Vector3d pointd(point.x, point.y, point.z); _pGrid->Position(pointd, x, y, z); - _pGrid->GetElements(x,y,z,indices); + _pGrid->GetElements(x, y, z, indices); - double fMinDist=DBL_MAX; + double fMinDist = DBL_MAX; for (unsigned long it : indices) { Base::Vector3d pt = _rKernel.getPoint(it); double fDist = Base::Distance(pointd, pt); @@ -469,12 +488,11 @@ InspectNominalShape::InspectNominalShape(const TopoDS_Shape& shape, float /*radi TopExp_Explorer xp; xp.Init(_rShape, TopAbs_SHELL); if (xp.More()) { - distss->LoadS1(xp.Current()); - isSolid = true; + distss->LoadS1(xp.Current()); + isSolid = true; } - } - //distss->SetDeflection(radius); + // distss->SetDeflection(radius); } InspectNominalShape::~InspectNominalShape() @@ -484,22 +502,24 @@ InspectNominalShape::~InspectNominalShape() float InspectNominalShape::getDistance(const Base::Vector3f& point) const { - gp_Pnt pnt3d(point.x,point.y,point.z); + gp_Pnt pnt3d(point.x, point.y, point.z); BRepBuilderAPI_MakeVertex mkVert(pnt3d); distss->LoadS2(mkVert.Vertex()); - float fMinDist=FLT_MAX; + float fMinDist = FLT_MAX; if (distss->Perform() && distss->NbSolution() > 0) { fMinDist = (float)distss->Value(); // the shape is a solid, check if the vertex is inside if (isSolid) { - if (isInsideSolid(pnt3d)) + if (isInsideSolid(pnt3d)) { fMinDist = -fMinDist; + } } else if (fMinDist > 0) { // check if the distance was computed from a face - if (isBelowFace(pnt3d)) + if (isBelowFace(pnt3d)) { fMinDist = -fMinDist; + } } } return fMinDist; @@ -521,7 +541,7 @@ bool InspectNominalShape::isBelowFace(const gp_Pnt& pnt3d) const TopoDS_Shape face = distss->SupportOnShape1(index); Standard_Real u, v; distss->ParOnFaceS1(index, u, v); - //gp_Pnt pnt = distss->PointOnShape1(index); + // gp_Pnt pnt = distss->PointOnShape1(index); BRepGProp_Face props(TopoDS::Face(face)); gp_Vec normal; gp_Pnt center; @@ -560,7 +580,7 @@ void PropertyDistanceList::setValue(float lValue) { aboutToSetValue(); _lValueList.resize(1); - _lValueList[0]=lValue; + _lValueList[0] = lValue; hasSetValue(); } @@ -571,29 +591,30 @@ void PropertyDistanceList::setValues(const std::vector& values) hasSetValue(); } -PyObject *PropertyDistanceList::getPyObject() +PyObject* PropertyDistanceList::getPyObject() { PyObject* list = PyList_New(getSize()); - for (int i = 0;i values; values.resize(nSize); - for (Py_ssize_t i=0; iob_type->tp_name; throw Py::TypeError(error); } - + values[i] = (float)PyFloat_AsDouble(item); } @@ -601,7 +622,7 @@ void PropertyDistanceList::setPyObject(PyObject *value) } else if (PyFloat_Check(value)) { setValue((float)PyFloat_AsDouble(value)); - } + } else { std::string error = std::string("type must be float or list of float, not "); error += value->ob_type->tp_name; @@ -609,34 +630,35 @@ void PropertyDistanceList::setPyObject(PyObject *value) } } -void PropertyDistanceList::Save (Base::Writer &writer) const +void PropertyDistanceList::Save(Base::Writer& writer) const { if (writer.isForceXML()) { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; writer.incInd(); - for(int i = 0;i" << std::endl; + for (int i = 0; i < getSize(); i++) { + writer.Stream() << writer.ind() << "" << std::endl; + } writer.decInd(); - writer.Stream() << writer.ind() <<"" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } else { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyDistanceList::Restore(Base::XMLReader &reader) +void PropertyDistanceList::Restore(Base::XMLReader& reader) { reader.readElement("FloatList"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } } -void PropertyDistanceList::SaveDocFile (Base::Writer &writer) const +void PropertyDistanceList::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); uint32_t uCt = (uint32_t)getSize(); @@ -646,10 +668,10 @@ void PropertyDistanceList::SaveDocFile (Base::Writer &writer) const } } -void PropertyDistanceList::RestoreDocFile(Base::Reader &reader) +void PropertyDistanceList::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); - uint32_t uCt=0; + uint32_t uCt = 0; str >> uCt; std::vector values(uCt); for (float& it : values) { @@ -658,66 +680,74 @@ void PropertyDistanceList::RestoreDocFile(Base::Reader &reader) setValues(values); } -App::Property *PropertyDistanceList::Copy() const +App::Property* PropertyDistanceList::Copy() const { - PropertyDistanceList *p= new PropertyDistanceList(); + PropertyDistanceList* p = new PropertyDistanceList(); p->_lValueList = _lValueList; return p; } -void PropertyDistanceList::Paste(const App::Property &from) +void PropertyDistanceList::Paste(const App::Property& from) { aboutToSetValue(); _lValueList = dynamic_cast(from)._lValueList; hasSetValue(); } -unsigned int PropertyDistanceList::getMemSize () const +unsigned int PropertyDistanceList::getMemSize() const { return static_cast(_lValueList.size() * sizeof(float)); } // ---------------------------------------------------------------- -namespace Inspection { +namespace Inspection +{ // helper class to use Qt's concurrent framework struct DistanceInspection { - DistanceInspection(float radius, InspectActualGeometry* a, + DistanceInspection(float radius, + InspectActualGeometry* a, std::vector n) - : radius(radius), actual(a), nominal(n) - { - } + : radius(radius) + , actual(a) + , nominal(n) + {} float mapped(unsigned long index) const { Base::Vector3f pnt = actual->getPoint(index); - float fMinDist=FLT_MAX; + float fMinDist = FLT_MAX; for (auto it : nominal) { float fDist = it->getDistance(pnt); - if (fabs(fDist) < fabs(fMinDist)) + if (fabs(fDist) < fabs(fMinDist)) { fMinDist = fDist; + } } - if (fMinDist > this->radius) + if (fMinDist > this->radius) { fMinDist = FLT_MAX; - else if (-fMinDist > this->radius) + } + else if (-fMinDist > this->radius) { fMinDist = -FLT_MAX; + } return fMinDist; } float radius; - InspectActualGeometry* actual; + InspectActualGeometry* actual; std::vector nominal; }; -// Helper internal class for QtConcurrent map operation. Holds sums-of-squares and counts for RMS calculation -class DistanceInspectionRMS { +// Helper internal class for QtConcurrent map operation. Holds sums-of-squares and counts for RMS +// calculation +class DistanceInspectionRMS +{ public: DistanceInspectionRMS() = default; - DistanceInspectionRMS& operator += (const DistanceInspectionRMS& rhs) + DistanceInspectionRMS& operator+=(const DistanceInspectionRMS& rhs) { this->m_numv += rhs.m_numv; this->m_sumsq += rhs.m_sumsq; @@ -725,38 +755,43 @@ public: } double getRMS() { - if (this->m_numv == 0) + if (this->m_numv == 0) { return 0.0; + } return sqrt(this->m_sumsq / (double)this->m_numv); } - int m_numv{0}; - double m_sumsq{0.0}; + int m_numv {0}; + double m_sumsq {0.0}; }; -} +} // namespace Inspection PROPERTY_SOURCE(Inspection::Feature, App::DocumentObject) Feature::Feature() { - ADD_PROPERTY(SearchRadius,(0.05)); - ADD_PROPERTY(Thickness,(0.0)); - ADD_PROPERTY(Actual,(nullptr)); - ADD_PROPERTY(Nominals,(nullptr)); - ADD_PROPERTY(Distances,(0.0)); + ADD_PROPERTY(SearchRadius, (0.05)); + ADD_PROPERTY(Thickness, (0.0)); + ADD_PROPERTY(Actual, (nullptr)); + ADD_PROPERTY(Nominals, (nullptr)); + ADD_PROPERTY(Distances, (0.0)); } Feature::~Feature() = default; short Feature::mustExecute() const { - if (SearchRadius.isTouched()) + if (SearchRadius.isTouched()) { return 1; - if (Thickness.isTouched()) + } + if (Thickness.isTouched()) { return 1; - if (Actual.isTouched()) + } + if (Actual.isTouched()) { return 1; - if (Nominals.isTouched()) + } + if (Nominals.isTouched()) { return 1; + } return 0; } @@ -765,8 +800,9 @@ App::DocumentObjectExecReturn* Feature::execute() bool useMultithreading = true; App::DocumentObject* pcActual = Actual.getValue(); - if (!pcActual) + if (!pcActual) { throw Base::ValueError("No actual geometry to inspect specified"); + } InspectActualGeometry* actual = nullptr; if (pcActual->getTypeId().isDerivedFrom(Mesh::Feature::getClassTypeId())) { @@ -786,6 +822,7 @@ App::DocumentObjectExecReturn* Feature::execute() throw Base::TypeError("Unknown geometric type"); } + // clang-format off // get a list of nominals std::vector inspectNominal; const std::vector& nominals = Nominals.getValues(); @@ -805,12 +842,14 @@ App::DocumentObjectExecReturn* Feature::execute() nominal = new InspectNominalShape(part->Shape.getValue(), this->SearchRadius.getValue()); } - if (nominal) + if (nominal) { inspectNominal.push_back(nominal); + } } + // clang-format on #if 0 -#if 1 // test with some huge data sets +#if 1 // test with some huge data sets std::vector index(actual->countPoints()); std::generate(index.begin(), index.end(), Base::iotaGen(0)); DistanceInspection check(this->SearchRadius.getValue(), actual, inspectNominal); @@ -866,16 +905,16 @@ App::DocumentObjectExecReturn* Feature::execute() #else unsigned long count = actual->countPoints(); std::vector vals(count); - std::function fMap = [&](unsigned int index) - { + std::function fMap = [&](unsigned int index) { DistanceInspectionRMS res; Base::Vector3f pnt = actual->getPoint(index); float fMinDist = FLT_MAX; for (auto it : inspectNominal) { float fDist = it->getDistance(pnt); - if (fabs(fDist) < fabs(fMinDist)) + if (fabs(fDist) < fabs(fMinDist)) { fMinDist = fDist; + } } if (fMinDist > this->SearchRadius.getValue()) { @@ -899,18 +938,23 @@ App::DocumentObjectExecReturn* Feature::execute() // Build vector of increasing indices std::vector index(count); std::iota(index.begin(), index.end(), 0); - // Perform map-reduce operation : compute distances and update sum of squares for RMS computation - QFuture future = QtConcurrent::mappedReduced( - index, fMap, &DistanceInspectionRMS::operator+=); + // Perform map-reduce operation : compute distances and update sum of squares for RMS + // computation + QFuture future = + QtConcurrent::mappedReduced(index, fMap, &DistanceInspectionRMS::operator+=); // Setup progress bar Base::FutureWatcherProgress progress("Inspecting...", actual->countPoints()); QFutureWatcher watcher; - QObject::connect(&watcher, &QFutureWatcher::progressValueChanged, - &progress, &Base::FutureWatcherProgress::progressValueChanged); + QObject::connect(&watcher, + &QFutureWatcher::progressValueChanged, + &progress, + &Base::FutureWatcherProgress::progressValueChanged); // Keep UI responsive during computation QEventLoop loop; - QObject::connect(&watcher, &QFutureWatcher::finished, - &loop, &QEventLoop::quit); + QObject::connect(&watcher, + &QFutureWatcher::finished, + &loop, + &QEventLoop::quit); watcher.setFuture(future); loop.exec(); res = future.result(); @@ -921,18 +965,23 @@ App::DocumentObjectExecReturn* Feature::execute() str << "Inspecting " << this->Label.getValue() << "..."; Base::SequencerLauncher seq(str.str().c_str(), count); - for (unsigned int i = 0; i < count; i++) + for (unsigned int i = 0; i < count; i++) { res += fMap(i); + } } Base::Console().Message("RMS value for '%s' with search radius [%.4f,%.4f] is: %.4f\n", - this->Label.getValue(), -this->SearchRadius.getValue(), this->SearchRadius.getValue(), res.getRMS()); + this->Label.getValue(), + -this->SearchRadius.getValue(), + this->SearchRadius.getValue(), + res.getRMS()); Distances.setValues(vals); #endif delete actual; - for (auto it : inspectNominal) + for (auto it : inspectNominal) { delete it; + } return nullptr; } diff --git a/src/Mod/Inspection/App/InspectionFeature.h b/src/Mod/Inspection/App/InspectionFeature.h index d9c9f1bb86..cb265ae6cb 100644 --- a/src/Mod/Inspection/App/InspectionFeature.h +++ b/src/Mod/Inspection/App/InspectionFeature.h @@ -26,22 +26,32 @@ #include #include -#include #include +#include class TopoDS_Shape; class BRepExtrema_DistShapeShape; class gp_Pnt; -namespace MeshCore { +namespace MeshCore +{ class MeshKernel; class MeshGrid; -} +} // namespace MeshCore -namespace Mesh { class MeshObject; } -namespace Points { class PointsGrid; } -namespace Part { class TopoShape; } +namespace Mesh +{ +class MeshObject; +} +namespace Points +{ +class PointsGrid; +} +namespace Part +{ +class TopoShape; +} namespace Inspection { @@ -57,7 +67,7 @@ public: virtual Base::Vector3f getPoint(unsigned long) const = 0; }; -class InspectionExport InspectActualMesh : public InspectActualGeometry +class InspectionExport InspectActualMesh: public InspectActualGeometry { public: explicit InspectActualMesh(const Mesh::MeshObject& rMesh); @@ -71,7 +81,7 @@ private: Base::Matrix4D _clTrf; }; -class InspectionExport InspectActualPoints : public InspectActualGeometry +class InspectionExport InspectActualPoints: public InspectActualGeometry { public: explicit InspectActualPoints(const Points::PointKernel&); @@ -82,7 +92,7 @@ private: const Points::PointKernel& _rKernel; }; -class InspectionExport InspectActualShape : public InspectActualGeometry +class InspectionExport InspectActualShape: public InspectActualGeometry { public: explicit InspectActualShape(const Part::TopoShape&); @@ -106,7 +116,7 @@ public: virtual float getDistance(const Base::Vector3f&) const = 0; }; -class InspectionExport InspectNominalMesh : public InspectNominalGeometry +class InspectionExport InspectNominalMesh: public InspectNominalGeometry { public: InspectNominalMesh(const Mesh::MeshObject& rMesh, float offset); @@ -121,7 +131,7 @@ private: Base::Matrix4D _clTrf; }; -class InspectionExport InspectNominalFastMesh : public InspectNominalGeometry +class InspectionExport InspectNominalFastMesh: public InspectNominalGeometry { public: InspectNominalFastMesh(const Mesh::MeshObject& rMesh, float offset); @@ -137,7 +147,7 @@ protected: Base::Matrix4D _clTrf; }; -class InspectionExport InspectNominalPoints : public InspectNominalGeometry +class InspectionExport InspectNominalPoints: public InspectNominalGeometry { public: InspectNominalPoints(const Points::PointKernel&, float offset); @@ -149,7 +159,7 @@ private: Points::PointsGrid* _pGrid; }; -class InspectionExport InspectNominalShape : public InspectNominalGeometry +class InspectionExport InspectNominalShape: public InspectNominalGeometry { public: InspectNominalShape(const TopoDS_Shape&, float offset); @@ -163,7 +173,7 @@ private: private: BRepExtrema_DistShapeShape* distss; const TopoDS_Shape& _rShape; - bool isSolid{false}; + bool isSolid {false}; }; class InspectionExport PropertyDistanceList: public App::PropertyLists @@ -171,46 +181,54 @@ class InspectionExport PropertyDistanceList: public App::PropertyLists TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - /** * A constructor. * A more elaborate description of the constructor. */ PropertyDistanceList(); - + /** * A destructor. * A more elaborate description of the destructor. */ ~PropertyDistanceList() override; - + void setSize(int newSize) override; int getSize() const override; - /** Sets the property + /** Sets the property */ void setValue(float); - + /// index operator - float operator[] (const int idx) const {return _lValueList.operator[] (idx);} - - void set1Value (const int idx, float value){_lValueList.operator[] (idx) = value;} - void setValues (const std::vector& values); - - const std::vector &getValues() const{return _lValueList;} - - PyObject *getPyObject() override; - void setPyObject(PyObject *) override; - - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; - - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; - - Property *Copy() const override; - void Paste(const Property &from) override; - unsigned int getMemSize () const override; + float operator[](const int idx) const + { + return _lValueList.operator[](idx); + } + + void set1Value(const int idx, float value) + { + _lValueList.operator[](idx) = value; + } + void setValues(const std::vector& values); + + const std::vector& getValues() const + { + return _lValueList; + } + + PyObject* getPyObject() override; + void setPyObject(PyObject*) override; + + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; + + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; + + Property* Copy() const override; + void Paste(const Property& from) override; + unsigned int getMemSize() const override; private: std::vector _lValueList; @@ -221,7 +239,7 @@ private: /** The inspection feature. * \author Werner Mayer */ -class InspectionExport Feature : public App::DocumentObject +class InspectionExport Feature: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Inspection::Feature); @@ -232,11 +250,11 @@ public: /** @name Properties */ //@{ - App::PropertyFloat SearchRadius; - App::PropertyFloat Thickness; - App::PropertyLink Actual; - App::PropertyLinkList Nominals; - PropertyDistanceList Distances; + App::PropertyFloat SearchRadius; + App::PropertyFloat Thickness; + App::PropertyLink Actual; + App::PropertyLinkList Nominals; + PropertyDistanceList Distances; //@} /** @name Actions */ @@ -248,10 +266,12 @@ public: /// returns the type name of the ViewProvider const char* getViewProviderName() const override - { return "InspectionGui::ViewProviderInspection"; } + { + return "InspectionGui::ViewProviderInspection"; + } }; -class InspectionExport Group : public App::DocumentObjectGroup +class InspectionExport Group: public App::DocumentObjectGroup { PROPERTY_HEADER_WITH_OVERRIDE(Inspection::Group); @@ -262,10 +282,12 @@ public: /// returns the type name of the ViewProvider const char* getViewProviderName() const override - { return "InspectionGui::ViewProviderInspectionGroup"; } + { + return "InspectionGui::ViewProviderInspectionGroup"; + } }; -} //namespace Inspection +} // namespace Inspection -#endif // INSPECTION_FEATURE_H +#endif // INSPECTION_FEATURE_H diff --git a/src/Mod/Inspection/App/PreCompiled.cpp b/src/Mod/Inspection/App/PreCompiled.cpp index 41bf7beded..2ac4ea20cd 100644 --- a/src/Mod/Inspection/App/PreCompiled.cpp +++ b/src/Mod/Inspection/App/PreCompiled.cpp @@ -20,4 +20,4 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Inspection/App/PreCompiled.h b/src/Mod/Inspection/App/PreCompiled.h index 29e9553e2b..7f47174e9d 100644 --- a/src/Mod/Inspection/App/PreCompiled.h +++ b/src/Mod/Inspection/App/PreCompiled.h @@ -19,17 +19,17 @@ * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ - + #ifndef APP_PRECOMPILED_H #define APP_PRECOMPILED_H #include #ifdef _MSC_VER -# pragma warning(disable : 4005) -# pragma warning(disable : 4251) -# pragma warning(disable : 4503) -# pragma warning(disable : 4786)// specifier longer then 255 chars +#pragma warning(disable : 4005) +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif #ifdef _PreComp_ @@ -38,13 +38,13 @@ #include // OCC -#include #include #include +#include #include -#include #include #include +#include // boost #include @@ -55,7 +55,6 @@ #include #include -#endif //_PreComp_ +#endif //_PreComp_ #endif - diff --git a/src/Mod/Inspection/Gui/AppInspectionGui.cpp b/src/Mod/Inspection/Gui/AppInspectionGui.cpp index d7e141c894..4ed78333ad 100644 --- a/src/Mod/Inspection/Gui/AppInspectionGui.cpp +++ b/src/Mod/Inspection/Gui/AppInspectionGui.cpp @@ -35,13 +35,15 @@ void CreateInspectionCommands(); -namespace InspectionGui { -class Module : public Py::ExtensionModule +namespace InspectionGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("InspectionGui") + Module() + : Py::ExtensionModule("InspectionGui") { - initialize("This module is the InspectionGui module."); // register with Python + initialize("This module is the InspectionGui module."); // register with Python } private: @@ -52,7 +54,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace InspectionGui +} // namespace InspectionGui /* Python entry */ @@ -64,10 +66,12 @@ PyMOD_INIT_FUNC(InspectionGui) } // instantiating the commands + // clang-format off CreateInspectionCommands(); InspectionGui::ViewProviderInspection ::init(); InspectionGui::ViewProviderInspectionGroup ::init(); InspectionGui::Workbench ::init(); + // clang-format on // ADD YOUR CODE HERE // diff --git a/src/Mod/Inspection/Gui/Command.cpp b/src/Mod/Inspection/Gui/Command.cpp index e7d0f0c255..a1d8117cd8 100644 --- a/src/Mod/Inspection/Gui/Command.cpp +++ b/src/Mod/Inspection/Gui/Command.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include #include @@ -35,21 +35,21 @@ #include #include -#include "VisualInspection.h" #include "ViewProviderInspection.h" +#include "VisualInspection.h" DEF_STD_CMD_A(CmdVisualInspection) CmdVisualInspection::CmdVisualInspection() - : Command("Inspection_VisualInspection") + : Command("Inspection_VisualInspection") { - sAppModule = "Inspection"; - sGroup = QT_TR_NOOP("Inspection"); - sMenuText = QT_TR_NOOP("Visual inspection..."); - sToolTipText = QT_TR_NOOP("Visual inspection"); - sStatusTip = QT_TR_NOOP("Visual inspection"); - sWhatsThis = "Inspection_VisualInspection"; + sAppModule = "Inspection"; + sGroup = QT_TR_NOOP("Inspection"); + sMenuText = QT_TR_NOOP("Visual inspection..."); + sToolTipText = QT_TR_NOOP("Visual inspection"); + sStatusTip = QT_TR_NOOP("Visual inspection"); + sWhatsThis = "Inspection_VisualInspection"; } void CmdVisualInspection::activated(int) @@ -68,15 +68,15 @@ bool CmdVisualInspection::isActive() DEF_STD_CMD_A(CmdInspectElement) CmdInspectElement::CmdInspectElement() - : Command("Inspection_InspectElement") + : Command("Inspection_InspectElement") { - sAppModule = "Inspection"; - sGroup = QT_TR_NOOP("Inspection"); - sMenuText = QT_TR_NOOP("Inspection..."); - sToolTipText = QT_TR_NOOP("Get distance information"); - sWhatsThis = "Inspection_InspectElement"; - sStatusTip = sToolTipText; - sPixmap = "inspect_pipette"; + sAppModule = "Inspection"; + sGroup = QT_TR_NOOP("Inspection"); + sMenuText = QT_TR_NOOP("Inspection..."); + sToolTipText = QT_TR_NOOP("Get distance information"); + sWhatsThis = "Inspection_InspectElement"; + sStatusTip = sToolTipText; + sPixmap = "inspect_pipette"; } void CmdInspectElement::activated(int) @@ -89,17 +89,19 @@ void CmdInspectElement::activated(int) viewer->setRedirectToSceneGraphEnabled(true); viewer->setRedirectToSceneGraph(true); viewer->setSelectionEnabled(false); - viewer->setEditingCursor(QCursor(Gui::BitmapFactory().pixmapFromSvg("inspect_pipette",QSize(32,32)),4,29)); + viewer->setEditingCursor( + QCursor(Gui::BitmapFactory().pixmapFromSvg("inspect_pipette", QSize(32, 32)), 4, 29)); viewer->addEventCallback(SoButtonEvent::getClassTypeId(), - InspectionGui::ViewProviderInspection::inspectCallback); - } + InspectionGui::ViewProviderInspection::inspectCallback); + } } bool CmdInspectElement::isActive() { App::Document* doc = App::GetApplication().getActiveDocument(); - if (!doc || doc->countObjectsOfType(Inspection::Feature::getClassTypeId()) == 0) + if (!doc || doc->countObjectsOfType(Inspection::Feature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -112,7 +114,7 @@ bool CmdInspectElement::isActive() void CreateInspectionCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdVisualInspection()); rcCmdMgr.addCommand(new CmdInspectElement()); } diff --git a/src/Mod/Inspection/Gui/PreCompiled.cpp b/src/Mod/Inspection/Gui/PreCompiled.cpp index 41bf7beded..2ac4ea20cd 100644 --- a/src/Mod/Inspection/Gui/PreCompiled.cpp +++ b/src/Mod/Inspection/Gui/PreCompiled.cpp @@ -20,4 +20,4 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Inspection/Gui/PreCompiled.h b/src/Mod/Inspection/Gui/PreCompiled.h index 6751f3a7c2..d6afd093c4 100644 --- a/src/Mod/Inspection/Gui/PreCompiled.h +++ b/src/Mod/Inspection/Gui/PreCompiled.h @@ -26,10 +26,10 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4005) -# pragma warning(disable : 4251) -# pragma warning(disable : 4503) -# pragma warning(disable : 4786)// specifier longer then 255 chars +#pragma warning(disable : 4005) +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif #ifdef _PreComp_ @@ -63,4 +63,4 @@ #endif //_PreComp_ -#endif // GUI_PRECOMPILED_H +#endif // GUI_PRECOMPILED_H diff --git a/src/Mod/Inspection/Gui/Resources/Inspection.qrc b/src/Mod/Inspection/Gui/Resources/Inspection.qrc index 8587b871d8..776bd1a28a 100644 --- a/src/Mod/Inspection/Gui/Resources/Inspection.qrc +++ b/src/Mod/Inspection/Gui/Resources/Inspection.qrc @@ -1,5 +1,5 @@ - + icons/inspect_pipette.svg icons/InspectionWorkbench.svg translations/Inspection_fr.qm @@ -36,4 +36,4 @@ translations/Inspection_ko.qm translations/Inspection_id.qm - + diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection.ts index 3841cfd56e..5c0386ab35 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations - + Do you want to remove all annotations? - + Annotation - + Leave info mode - + Distance: > %1 - + Distance: < %1 - - + + Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_be.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_be.ts index 592bf56747..5c3155d209 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_be.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_be.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Візуальная праверка @@ -94,38 +94,38 @@ QObject - + Remove annotations Выдаліць заметкі - + Do you want to remove all annotations? Ці жадаеце вы выдаліць усе заметкі? - + Annotation Заметка - + Leave info mode Выйсці з інфармацыйнага рэжыму - + Distance: > %1 Адлегласць: > %1 - + Distance: < %1 Адлегласць: < %1 - - + + Distance: %1 Адлегласць: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ca.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ca.ts index 517ab76961..ef940b5717 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ca.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ca.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Inspecció Visual @@ -94,38 +94,38 @@ QObject - + Remove annotations Elimina les anotacions - + Do you want to remove all annotations? Vols eliminar totes les anotacions? - + Annotation Anotació - + Leave info mode Surt del mode d'informació - + Distance: > %1 Distància: > %1 - + Distance: < %1 Distància: < %1 - - + + Distance: %1 Distància: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts index 8fdfa9885e..46fc3ee454 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Vizuální kontrola @@ -94,38 +94,38 @@ QObject - + Remove annotations Odstranit anotace - + Do you want to remove all annotations? Chcete odstranit všechny poznámky? - + Annotation Vysvětlivka - + Leave info mode Opustit info režim - + Distance: > %1 Vzdálenost: > %1 - + Distance: < %1 Vzdálenost: < %1 - - + + Distance: %1 Vzdálenost: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_de.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_de.ts index d34d0d22f8..069ddbb39d 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_de.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_de.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Sichtkontrolle @@ -94,38 +94,38 @@ QObject - + Remove annotations Anmerkungen entfernen - + Do you want to remove all annotations? Möchtest du alle Anmerkungen entfernen? - + Annotation Anmerkung - + Leave info mode Info-Modus verlassen - + Distance: > %1 Entfernung: > %1 - + Distance: < %1 Entfernung: < %1 - - + + Distance: %1 Entfernung: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.qm b/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.qm index d300a48fa4..1b690cc5e7 100644 Binary files a/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.qm and b/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.qm differ diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.ts index e0913da92b..13fccdfc1f 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_el.ts @@ -6,7 +6,7 @@ Inspection - Inspection + Επιθεώρηση @@ -24,7 +24,7 @@ Inspection - Inspection + Επιθεώρηση @@ -41,7 +41,7 @@ Command - + Visual Inspection Οπτική επιθεώρηση @@ -56,7 +56,7 @@ Actual - Actual + Πραγματικό @@ -94,38 +94,38 @@ QObject - + Remove annotations Αφαίρεση σχολιασμών - + Do you want to remove all annotations? Θέλετε να αφαιρέσετε όλες τις σημειώσεις; - + Annotation Σχολιασμός - + Leave info mode Έξοδος από τη λειτουργία πληροφοριών - + Distance: > %1 Απόσταση: > %1 - + Distance: < %1 Απόσταση: < %1 - - + + Distance: %1 Απόσταση: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-AR.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-AR.ts index df920621af..6b3ffc1eff 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-AR.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-AR.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Inspección visual @@ -94,38 +94,38 @@ QObject - + Remove annotations Eliminar anotaciones - + Do you want to remove all annotations? ¿Desea eliminar todas las anotaciones? - + Annotation Anotación - + Leave info mode Salir del modo información - + Distance: > %1 Distancia: > %1 - + Distance: < %1 Distancia: < %1 - - + + Distance: %1 Distancia: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-ES.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-ES.ts index bf2f312232..05076749d1 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-ES.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_es-ES.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Inspección visual @@ -94,38 +94,38 @@ QObject - + Remove annotations Eliminar anotaciones - + Do you want to remove all annotations? ¿Desea eliminar todas las anotaciones? - + Annotation Anotación - + Leave info mode Salir del modo información - + Distance: > %1 Distancia: > %1 - + Distance: < %1 Distancia: < %1 - - + + Distance: %1 Distancia: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_eu.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_eu.ts index 95f74704b8..55c0fddd39 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_eu.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_eu.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Ikusizko ikuskatzea @@ -94,38 +94,38 @@ QObject - + Remove annotations Kendu oharpenak - + Do you want to remove all annotations? Oharpen guztiak kendu nahi dituzu? - + Annotation Oharpena - + Leave info mode Utzi informazio modua - + Distance: > %1 Distantzia: > %1 - + Distance: < %1 Distantzia: < %1 - - + + Distance: %1 Distantzia: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_fi.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_fi.ts index 8e4f171f24..af05b69368 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_fi.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_fi.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Huomautus - + Leave info mode Poistu Tieto tilasta - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_fr.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_fr.ts index 7d9fa7d955..9af1e87f26 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_fr.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_fr.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Inspection visuelle @@ -94,38 +94,38 @@ QObject - + Remove annotations Supprimer les annotations - + Do you want to remove all annotations? Voulez-vous supprimer toutes les annotations ? - + Annotation Annotation - + Leave info mode Quitter le mode information - + Distance: > %1 Distance : > %1 - + Distance: < %1 Distance : < %1 - - + + Distance: %1 Distance : %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_gl.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_gl.ts index 7da077e311..7fb9eebf87 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_gl.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_gl.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Apuntamento - + Leave info mode Saír do modo de información - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_hr.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_hr.ts index 5abb99e882..1093181948 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_hr.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_hr.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Vizualni Pregled @@ -94,39 +94,39 @@ QObject - + Remove annotations Ukloni napomene - + Do you want to remove all annotations? Želite li ukloniti sve napomene? - + Annotation Anotacija - + Leave info mode Zatvori info način rada - + Distance: > %1 Udaljenost: > %1 - + Distance: < %1 Udaljenost: < %1 - - + + Distance: %1 Udaljenost: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_hu.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_hu.ts index 5f4a7eb3b0..5bf73377cf 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_hu.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_hu.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Szemrevételezés @@ -94,38 +94,38 @@ QObject - + Remove annotations Megjegyzések eltávolítása - + Do you want to remove all annotations? Szeretné eltávolítani az összes megjegyzést? - + Annotation Jegyzet - + Leave info mode Hagyja az info módot - + Distance: > %1 Távolság: > %1 - + Distance: < %1 Távolság: < %1 - - + + Distance: %1 Távolság: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_id.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_id.ts index 7acbf15623..ac2c4c03d3 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_id.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_id.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Anotasi - + Leave info mode Tinggalkan info mode - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_it.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_it.ts index 6f891013c8..2afed44b25 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_it.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_it.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Ispezione Visiva @@ -94,38 +94,38 @@ QObject - + Remove annotations Rimuovi annotazioni - + Do you want to remove all annotations? Vuoi rimuovere tutte le annotazioni? - + Annotation Annotazione - + Leave info mode Esci dalla modalità info - + Distance: > %1 Distanza: > %1 - + Distance: < %1 Distanza: < %1 - - + + Distance: %1 Distanza %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ja.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ja.ts index 67e50d8ec8..1d1c698733 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ja.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ja.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection 外観検査 @@ -94,38 +94,38 @@ QObject - + Remove annotations 注釈を削除 - + Do you want to remove all annotations? すべての注釈を削除しますか? - + Annotation 注釈 - + Leave info mode 情報モードを解除 - + Distance: > %1 距離: > %1 - + Distance: < %1 距離: < %1 - - + + Distance: %1 距離: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ka.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ka.ts index 840f5bb875..241a89a543 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ka.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ka.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection ვიზუალური შემოწმება @@ -94,38 +94,38 @@ QObject - + Remove annotations ანოტაციების წაშლა - + Do you want to remove all annotations? გსურთ, წაშალოთ ყველა ანოტაცია? - + Annotation ანოტაცია - + Leave info mode საინფორმაციო რეჟიმიდან გასვლა - + Distance: > %1 დაშორება: > %1 - + Distance: < %1 დაშორება: < %1 - - + + Distance: %1 დაშორება: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ko.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ko.ts index af9975b964..65132c185a 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ko.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ko.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Annotation - + Leave info mode Leave info mode - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_nl.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_nl.ts index 930be34d87..59ee478cfc 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_nl.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_nl.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visuele inspectie @@ -94,38 +94,38 @@ QObject - + Remove annotations Verwijder aantekeningen - + Do you want to remove all annotations? Wil je alle aantekeningen verwijderen? - + Annotation Aantekening - + Leave info mode Info modus verlaten - + Distance: > %1 Afstand: > %1 - + Distance: < %1 Afstand: < %1 - - + + Distance: %1 Afstand: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_pl.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_pl.ts index e97cbe2b17..67432525dc 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_pl.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_pl.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Kontrola wzrokowa @@ -94,38 +94,38 @@ QObject - + Remove annotations Usuń adnotacje - + Do you want to remove all annotations? Czy chcesz usunąć wszystkie adnotacje? - + Annotation Opisy - + Leave info mode Opuść tryb informacyjny - + Distance: > %1 Odległość: > %1 - + Distance: < %1 Odległość: < %1 - - + + Distance: %1 Odległość: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-BR.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-BR.ts index dc059683a3..63f1162269 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-BR.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-BR.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Inspeção Visual @@ -94,38 +94,38 @@ QObject - + Remove annotations Remover anotações - + Do you want to remove all annotations? Você deseja remover todas as anotações? - + Annotation Anotação - + Leave info mode Sair do modo de info - + Distance: > %1 Distância: > %1 - + Distance: < %1 Distância: < %1 - - + + Distance: %1 Distância: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-PT.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-PT.ts index 606ae77aae..e8440619a3 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-PT.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_pt-PT.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Anotação - + Leave info mode Sair do modo de informação - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ro.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ro.ts index e22cfce4d5..2a96aa3f78 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ro.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ro.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Inspecție vizuală @@ -94,38 +94,38 @@ QObject - + Remove annotations Elimină adnotările - + Do you want to remove all annotations? Doriţi să eliminaţi toate adnotările? - + Annotation Notatie - + Leave info mode Parasiti modul informare - + Distance: > %1 Distanță: > %1 - + Distance: < %1 Distanță: < %1 - - + + Distance: %1 Distanță: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ru.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ru.ts index 09b81ccad5..05d9c113e2 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_ru.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_ru.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Визуальная проверка @@ -94,38 +94,38 @@ QObject - + Remove annotations Удалить аннотации - + Do you want to remove all annotations? Вы хотите удалить все аннотации? - + Annotation Заметка - + Leave info mode Выйти из информационного режима - + Distance: > %1 Расстояние: > %1 - + Distance: < %1 Расстояние: < %1 - - + + Distance: %1 Расстояние: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sl.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sl.ts index 8d195a1d53..ea09c67514 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sl.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sl.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Vidni pregled @@ -94,38 +94,38 @@ QObject - + Remove annotations Odstrani pripise - + Do you want to remove all annotations? Ali želite odstraniti vse pripise? - + Annotation Pripis - + Leave info mode Zapusti podatkovni način - + Distance: > %1 Razdalja: > %1 - + Distance: < %1 Razdalja: < %1 - - + + Distance: %1 Razdalja: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr-CS.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr-CS.ts index 029165db3a..5ac75e5eaa 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr-CS.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr-CS.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Vizuelni pregled @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Napomena - + Leave info mode Napusti info režim - + Distance: > %1 Rastojanje: > %1 - + Distance: < %1 Rastojanje: < %1 - - + + Distance: %1 Rastojanje: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr.ts index ffec987593..dbb4d58d45 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sr.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Визуелни преглед @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Напомена - + Leave info mode Напусти инфо режим - + Distance: > %1 Растојање: > %1 - + Distance: < %1 Растојање: < %1 - - + + Distance: %1 Растојање: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sv-SE.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sv-SE.ts index f5a4f46061..94e4030050 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_sv-SE.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_sv-SE.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Annotering - + Leave info mode Lämna info läge - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_tr.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_tr.ts index 211fa2e96a..dccc12429c 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_tr.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_tr.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Görsel inceleme @@ -94,38 +94,38 @@ QObject - + Remove annotations Açıklamaları kaldır - + Do you want to remove all annotations? Tüm açıklamaları kaldırmak istiyor musunuz? - + Annotation Not - + Leave info mode Bilgi modundan çık - + Distance: > %1 Mesafe: > %1 - + Distance: < %1 Mesafe: < %1 - - + + Distance: %1 Mesafe: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_uk.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_uk.ts index 7c5c642341..0714aefb17 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_uk.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_uk.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Візуальний огляд @@ -94,38 +94,38 @@ QObject - + Remove annotations Видалити анотації - + Do you want to remove all annotations? Видалити всі анотації? - + Annotation Анотація - + Leave info mode Вийти з інформаційного режиму - + Distance: > %1 Відстань: > %1 - + Distance: < %1 Відстань: < %1 - - + + Distance: %1 Відстань: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_val-ES.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_val-ES.ts index 9fe05dacf6..df0ec31ee7 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_val-ES.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_val-ES.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations Remove annotations - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation Anotació - + Leave info mode Ix del mode info - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-CN.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-CN.ts index 2822683e4b..96caa03f13 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-CN.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-CN.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection 可视性检查 @@ -94,38 +94,38 @@ QObject - + Remove annotations 移除标注 - + Do you want to remove all annotations? 你想移除所有标注吗? - + Annotation 注释 - + Leave info mode 退出查询模式 - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-TW.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-TW.ts index 0d68fd42f3..02e95d0143 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-TW.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_zh-TW.ts @@ -41,7 +41,7 @@ Command - + Visual Inspection Visual Inspection @@ -94,38 +94,38 @@ QObject - + Remove annotations 刪除註解 - + Do you want to remove all annotations? Do you want to remove all annotations? - + Annotation 注釋 - + Leave info mode 離開訊息模式 - + Distance: > %1 Distance: > %1 - + Distance: < %1 Distance: < %1 - - + + Distance: %1 Distance: %1 diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp index ebe105c7df..363719eae6 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp @@ -23,27 +23,27 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -66,14 +66,22 @@ using namespace InspectionGui; bool ViewProviderInspection::addflag = false; -App::PropertyFloatConstraint::Constraints ViewProviderInspection::floatRange = {1.0,64.0,1.0}; +App::PropertyFloatConstraint::Constraints ViewProviderInspection::floatRange = {1.0, 64.0, 1.0}; PROPERTY_SOURCE(InspectionGui::ViewProviderInspection, Gui::ViewProviderDocumentObject) ViewProviderInspection::ViewProviderInspection() { - ADD_PROPERTY_TYPE(OutsideGrayed,(false),"",(App::PropertyType) (App::Prop_Output|App::Prop_Hidden),""); - ADD_PROPERTY_TYPE(PointSize,(1.0),"Display",(App::PropertyType) (App::Prop_None/*App::Prop_Hidden*/),""); + ADD_PROPERTY_TYPE(OutsideGrayed, + (false), + "", + (App::PropertyType)(App::Prop_Output | App::Prop_Hidden), + ""); + ADD_PROPERTY_TYPE(PointSize, + (1.0), + "Display", + (App::PropertyType)(App::Prop_None /*App::Prop_Hidden*/), + ""); PointSize.setConstraints(&floatRange); pcColorRoot = new SoSeparator(); @@ -82,7 +90,7 @@ ViewProviderInspection::ViewProviderInspection() pcMatBinding->ref(); pcColorMat = new SoMaterial; pcColorMat->ref(); - pcColorStyle = new SoDrawStyle(); + pcColorStyle = new SoDrawStyle(); pcColorRoot->addChild(pcColorStyle); pcCoords = new SoCoordinate3; pcCoords->ref(); @@ -90,7 +98,7 @@ ViewProviderInspection::ViewProviderInspection() pcColorBar = new Gui::SoFCColorBar; pcColorBar->Attach(this); pcColorBar->ref(); - pcColorBar->setRange( -0.1f, 0.1f, 3 ); + pcColorBar->setRange(-0.1f, 0.1f, 3); pcLinkRoot = new SoGroup; pcLinkRoot->ref(); @@ -98,7 +106,7 @@ ViewProviderInspection::ViewProviderInspection() pcPointStyle->ref(); pcPointStyle->style = SoDrawStyle::POINTS; pcPointStyle->pointSize = PointSize.getValue(); - SelectionStyle.setValue(1); // BBOX + SelectionStyle.setValue(1); // BBOX } ViewProviderInspection::~ViewProviderInspection() @@ -121,7 +129,7 @@ void ViewProviderInspection::onChanged(const App::Property* prop) pcColorBar->Notify(0); } } - else if ( prop == &PointSize ) { + else if (prop == &PointSize) { pcPointStyle->pointSize = PointSize.getValue(); } else { @@ -141,20 +149,20 @@ void ViewProviderInspection::show() pcColorStyle->style = SoDrawStyle::FILLED; } -void ViewProviderInspection::attach(App::DocumentObject *pcFeat) +void ViewProviderInspection::attach(App::DocumentObject* pcFeat) { // creates the standard viewing modes inherited::attach(pcFeat); - SoShapeHints * flathints = new SoShapeHints; - flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; + SoShapeHints* flathints = new SoShapeHints; + flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE; flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; SoGroup* pcColorShadedRoot = new SoGroup(); pcColorShadedRoot->addChild(flathints); // color shaded ------------------------------------------ - SoDrawStyle *pcFlatStyle = new SoDrawStyle(); + SoDrawStyle* pcFlatStyle = new SoDrawStyle(); pcFlatStyle->style = SoDrawStyle::FILLED; pcColorShadedRoot->addChild(pcFlatStyle); @@ -165,11 +173,12 @@ void ViewProviderInspection::attach(App::DocumentObject *pcFeat) addDisplayMaskMode(pcColorShadedRoot, "ColorShaded"); // Check for an already existing color bar - Gui::SoFCColorBar* pcBar = ((Gui::SoFCColorBar*)findFrontRootOfType(Gui::SoFCColorBar::getClassTypeId())); + Gui::SoFCColorBar* pcBar = + ((Gui::SoFCColorBar*)findFrontRootOfType(Gui::SoFCColorBar::getClassTypeId())); if (pcBar) { float fMin = pcColorBar->getMinValue(); float fMax = pcColorBar->getMaxValue(); - + // Attach to the foreign color bar and delete our own bar pcBar->Attach(this); pcBar->ref(); @@ -217,7 +226,8 @@ bool ViewProviderInspection::setupLines(const Data::ComplexGeoData* data) return true; } -bool ViewProviderInspection::setupPoints(const Data::ComplexGeoData* data, App::PropertyContainer* container) +bool ViewProviderInspection::setupPoints(const Data::ComplexGeoData* data, + App::PropertyContainer* container) { std::vector points; std::vector normals; @@ -229,14 +239,18 @@ bool ViewProviderInspection::setupPoints(const Data::ComplexGeoData* data, App:: } normals.reserve(normals_d.size()); - std::transform(normals_d.cbegin(), normals_d.cend(), std::back_inserter(normals), [](const Base::Vector3d& p){ - return Base::toVector(p); - }); + std::transform(normals_d.cbegin(), + normals_d.cend(), + std::back_inserter(normals), + [](const Base::Vector3d& p) { + return Base::toVector(p); + }); // If getPoints() doesn't deliver normals check a second property if (normals.empty() && container) { App::Property* propN = container->getPropertyByName("Normal"); - if (propN && propN->getTypeId().isDerivedFrom(Points::PropertyNormalList::getClassTypeId())) { + if (propN + && propN->getTypeId().isDerivedFrom(Points::PropertyNormalList::getClassTypeId())) { normals = static_cast(propN)->getValues(); } } @@ -257,9 +271,9 @@ void ViewProviderInspection::setupCoords(const std::vector& poin this->pcLinkRoot->addChild(this->pcCoords); this->pcCoords->point.setNum(points.size()); SbVec3f* pts = this->pcCoords->point.startEditing(); - for (size_t i=0; i < points.size(); i++) { + for (size_t i = 0; i < points.size(); i++) { const Base::Vector3d& p = points[i]; - pts[i].setValue((float)p.x,(float)p.y,(float)p.z); + pts[i].setValue((float)p.x, (float)p.y, (float)p.z); } this->pcCoords->point.finishEditing(); } @@ -270,7 +284,7 @@ void ViewProviderInspection::setupNormals(const std::vector& nor normalNode->vector.setNum(normals.size()); SbVec3f* norm = normalNode->vector.startEditing(); - std::size_t i=0; + std::size_t i = 0; for (const auto& it : normals) { norm[i++].setValue(it.x, it.y, it.z); } @@ -285,11 +299,11 @@ void ViewProviderInspection::setupLineIndexes(const std::vectorpcLinkRoot->addChild(line); line->coordIndex.setNum(3 * lines.size()); int32_t* indices = line->coordIndex.startEditing(); - unsigned long j=0; + unsigned long j = 0; for (const auto& it : lines) { - indices[3*j+0] = it.I1; - indices[3*j+1] = it.I2; - indices[3*j+2] = SO_END_LINE_INDEX; + indices[3 * j + 0] = it.I1; + indices[3 * j + 1] = it.I2; + indices[3 * j + 2] = SO_END_LINE_INDEX; j++; } line->coordIndex.finishEditing(); @@ -299,14 +313,14 @@ void ViewProviderInspection::setupFaceIndexes(const std::vectorpcLinkRoot->addChild(face); - face->coordIndex.setNum(4*faces.size()); + face->coordIndex.setNum(4 * faces.size()); int32_t* indices = face->coordIndex.startEditing(); - unsigned long j=0; + unsigned long j = 0; for (const auto& it : faces) { - indices[4*j+0] = it.I1; - indices[4*j+1] = it.I2; - indices[4*j+2] = it.I3; - indices[4*j+3] = SO_END_FACE_INDEX; + indices[4 * j + 0] = it.I1; + indices[4 * j + 1] = it.I2; + indices[4 * j + 2] = it.I3; + indices[4 * j + 3] = SO_END_FACE_INDEX; j++; } face->coordIndex.finishEditing(); @@ -316,8 +330,10 @@ void ViewProviderInspection::updateData(const App::Property* prop) { // set to the expected size if (prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { - App::GeoFeature* object = static_cast(prop)->getValue(); - const App::PropertyComplexGeoData* propData = object ? object->getPropertyOfGeometry() : nullptr; + App::GeoFeature* object = + static_cast(prop)->getValue(); + const App::PropertyComplexGeoData* propData = + object ? object->getPropertyOfGeometry() : nullptr; if (propData) { Gui::coinRemoveAllChildren(this->pcLinkRoot); @@ -333,8 +349,9 @@ void ViewProviderInspection::updateData(const App::Property* prop) // force an update of the Inventor data nodes if (this->pcObject) { App::Property* link = this->pcObject->getPropertyByName("Actual"); - if (link) + if (link) { updateData(link); + } setDistances(); } } @@ -342,7 +359,7 @@ void ViewProviderInspection::updateData(const App::Property* prop) if (strcmp(prop->getName(), "SearchRadius") == 0) { float fSearchRadius = ((App::PropertyFloat*)prop)->getValue(); this->search_radius = fSearchRadius; - pcColorBar->setRange( -fSearchRadius, fSearchRadius, 4 ); + pcColorBar->setRange(-fSearchRadius, fSearchRadius, 4); pcColorBar->Notify(0); } } @@ -355,8 +372,9 @@ SoSeparator* ViewProviderInspection::getFrontRoot() const void ViewProviderInspection::setDistances() { - if (!pcObject) + if (!pcObject) { return; + } App::Property* pDistances = pcObject->getPropertyByName("Distances"); if (!pDistances) { @@ -364,27 +382,32 @@ void ViewProviderInspection::setDistances() return; } if (pDistances->getTypeId() != Inspection::PropertyDistanceList::getClassTypeId()) { - SoDebugError::post("ViewProviderInspection::setDistances", - "Property 'Distances' has type %s (Inspection::PropertyDistanceList was expected)", pDistances->getTypeId().getName()); + SoDebugError::post( + "ViewProviderInspection::setDistances", + "Property 'Distances' has type %s (Inspection::PropertyDistanceList was expected)", + pDistances->getTypeId().getName()); return; } // distance values - const std::vector& fValues = static_cast(pDistances)->getValues(); + const std::vector& fValues = + static_cast(pDistances)->getValues(); if ((int)fValues.size() != this->pcCoords->point.getNum()) { pcMatBinding->value = SoMaterialBinding::OVERALL; return; } - if (pcColorMat->diffuseColor.getNum() != static_cast(fValues.size())) + if (pcColorMat->diffuseColor.getNum() != static_cast(fValues.size())) { pcColorMat->diffuseColor.setNum(static_cast(fValues.size())); - if (pcColorMat->transparency.getNum() != static_cast(fValues.size())) + } + if (pcColorMat->transparency.getNum() != static_cast(fValues.size())) { pcColorMat->transparency.setNum(static_cast(fValues.size())); + } - SbColor * cols = pcColorMat->diffuseColor.startEditing(); - float * tran = pcColorMat->transparency.startEditing(); + SbColor* cols = pcColorMat->diffuseColor.startEditing(); + float* tran = pcColorMat->transparency.startEditing(); - unsigned long j=0; + unsigned long j = 0; for (std::vector::const_iterator jt = fValues.begin(); jt != fValues.end(); ++jt, j++) { App::Color col = pcColorBar->getColor(*jt); cols[j] = SbColor(col.r, col.g, col.b); @@ -406,7 +429,7 @@ QIcon ViewProviderInspection::getIcon() const // Get the icon of the view provider to the associated feature QIcon px = inherited::getIcon(); App::Property* pActual = pcObject->getPropertyByName("Actual"); - if (pActual && pActual->getTypeId().isDerivedFrom( App::PropertyLink::getClassTypeId())) { + if (pActual && pActual->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { App::DocumentObject* docobj = ((App::PropertyLink*)pActual)->getValue(); if (docobj) { Gui::Document* doc = Gui::Application::Instance->getDocument(docobj->getDocument()); @@ -420,7 +443,7 @@ QIcon ViewProviderInspection::getIcon() const void ViewProviderInspection::setDisplayMode(const char* ModeName) { - if (strcmp("Visual Inspection",ModeName)==0) { + if (strcmp("Visual Inspection", ModeName) == 0) { setDistances(); setDisplayMaskMode("ColorShaded"); } @@ -436,30 +459,37 @@ std::vector ViewProviderInspection::getDisplayModes() const return StrList; } -void ViewProviderInspection::OnChange(Base::Subject &/*rCaller*/, int /*rcReason*/) +void ViewProviderInspection::OnChange(Base::Subject& /*rCaller*/, int /*rcReason*/) { setActiveMode(); } -namespace InspectionGui { +namespace InspectionGui +{ // Proxy class that receives an asynchronous custom event -class ViewProviderProxyObject : public QObject +class ViewProviderProxyObject: public QObject { public: - explicit ViewProviderProxyObject(QWidget* w) : QObject(nullptr), widget(w) {} + explicit ViewProviderProxyObject(QWidget* w) + : QObject(nullptr) + , widget(w) + {} ~ViewProviderProxyObject() override = default; - void customEvent(QEvent *) override + void customEvent(QEvent*) override { if (!widget.isNull()) { QList flags = widget->findChildren(); if (!flags.isEmpty()) { - int ret = QMessageBox::question(Gui::getMainWindow(), - QObject::tr("Remove annotations"), - QObject::tr("Do you want to remove all annotations?"), - QMessageBox::Yes,QMessageBox::No); + int ret = + QMessageBox::question(Gui::getMainWindow(), + QObject::tr("Remove annotations"), + QObject::tr("Do you want to remove all annotations?"), + QMessageBox::Yes, + QMessageBox::No); if (ret == QMessageBox::Yes) { - for (auto it : flags) + for (auto it : flags) { it->deleteLater(); + } } } } @@ -467,17 +497,19 @@ public: this->deleteLater(); } - static void addFlag(Gui::View3DInventorViewer* view, const QString& text, const SoPickedPoint * point) + static void + addFlag(Gui::View3DInventorViewer* view, const QString& text, const SoPickedPoint* point) { Gui::Flag* flag = new Gui::Flag; QPalette p; - p.setColor(QPalette::Window, QColor(85,0,127)); - p.setColor(QPalette::Text, QColor(220,220,220)); + p.setColor(QPalette::Window, QColor(85, 0, 127)); + p.setColor(QPalette::Text, QColor(220, 220, 220)); flag->setPalette(p); flag->setText(text); flag->setOrigin(point->getPoint()); Gui::GLFlagWindow* flags = nullptr; - std::list glItems = view->getGraphicsItemsOfType(Gui::GLFlagWindow::getClassTypeId()); + std::list glItems = + view->getGraphicsItemsOfType(Gui::GLFlagWindow::getClassTypeId()); if (glItems.empty()) { flags = new Gui::GLFlagWindow(view); view->addGraphicsItem(flags); @@ -491,19 +523,21 @@ public: private: QPointer widget; }; -} +} // namespace InspectionGui -void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) +void ViewProviderInspection::inspectCallback(void* ud, SoEventCallback* n) { - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); const SoEvent* ev = n->getEvent(); if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) { - const SoMouseButtonEvent * mbe = static_cast(ev); + const SoMouseButtonEvent* mbe = static_cast(ev); - // Mark all incoming mouse button events as handled, especially, to deactivate the selection node + // Mark all incoming mouse button events as handled, especially, to deactivate the selection + // node n->getAction()->setHandled(); n->setHandled(); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { + if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 + && mbe->getState() == SoButtonEvent::UP) { n->setHandled(); // context-menu QMenu menu; @@ -518,9 +552,8 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) else if (cl == id) { // post an event to a proxy object to make sure to avoid problems // when opening a modal dialog - QApplication::postEvent( - new ViewProviderProxyObject(view->getGLWidget()), - new QEvent(QEvent::User)); + QApplication::postEvent(new ViewProviderProxyObject(view->getGLWidget()), + new QEvent(QEvent::User)); view->setEditing(false); view->getWidget()->setCursor(QCursor(Qt::ArrowCursor)); view->setRedirectToSceneGraph(false); @@ -529,8 +562,9 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) view->removeEventCallback(SoButtonEvent::getClassTypeId(), inspectCallback, ud); } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::UP) { - const SoPickedPoint * point = n->getPickedPoint(); + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::UP) { + const SoPickedPoint* point = n->getPickedPoint(); if (!point) { Base::Console().Message("No point picked.\n"); return; @@ -543,11 +577,13 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) if (vp && vp->getTypeId().isDerivedFrom(ViewProviderInspection::getClassTypeId())) { ViewProviderInspection* that = static_cast(vp); QString info = that->inspectDistance(point); - Gui::getMainWindow()->setPaneText(1,info); - if (addflag) + Gui::getMainWindow()->setPaneText(1, info); + if (addflag) { ViewProviderProxyObject::addFlag(view, info, point); - else + } + else { Gui::ToolTip::showText(QCursor::pos(), info); + } } else { // the nearest picked point was not part of the view provider @@ -557,17 +593,21 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) action.apply(view->getSoRenderManager()->getSceneGraph()); const SoPickedPointList& pps = action.getPickedPointList(); - for (int i=0; igetViewProviderByPathFromTail(point->getPath()); - if (vp && vp->getTypeId().isDerivedFrom(ViewProviderInspection::getClassTypeId())) { + if (vp + && vp->getTypeId().isDerivedFrom( + ViewProviderInspection::getClassTypeId())) { ViewProviderInspection* self = static_cast(vp); QString info = self->inspectDistance(point); - Gui::getMainWindow()->setPaneText(1,info); - if (addflag) + Gui::getMainWindow()->setPaneText(1, info); + if (addflag) { ViewProviderProxyObject::addFlag(view, info, point); - else + } + else { Gui::ToolTip::showText(QCursor::pos(), info); + } break; } } @@ -576,9 +616,8 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) } // toggle between inspection and navigation mode else if (ev->getTypeId().isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { - const SoKeyboardEvent * const ke = static_cast(ev); - if (ke->getState() == SoButtonEvent::DOWN && - ke->getKey() == SoKeyboardEvent::ESCAPE) { + const SoKeyboardEvent* const ke = static_cast(ev); + if (ke->getState() == SoButtonEvent::DOWN && ke->getKey() == SoKeyboardEvent::ESCAPE) { SbBool toggle = view->isRedirectedToSceneGraph(); view->setRedirectToSceneGraph(!toggle); n->setHandled(); @@ -586,29 +625,35 @@ void ViewProviderInspection::inspectCallback(void * ud, SoEventCallback * n) } } -namespace InspectionGui { -float calcArea (const SbVec3f& v1, const SbVec3f& v2, const SbVec3f& v3) +namespace InspectionGui { - SbVec3f a = v2-v1; - SbVec3f b = v3-v1; - return a.cross(b).length()/2.0f; -} - -bool calcWeights(const SbVec3f& v1, const SbVec3f& v2, const SbVec3f& v3, - const SbVec3f& p, float& w0, float& w1, float& w2) +float calcArea(const SbVec3f& v1, const SbVec3f& v2, const SbVec3f& v3) { - float fAreaABC = calcArea(v1,v2,v3); - float fAreaPBC = calcArea(p,v2,v3); - float fAreaPCA = calcArea(p,v3,v1); - float fAreaPAB = calcArea(p,v1,v2); - - w0=fAreaPBC/fAreaABC; - w1=fAreaPCA/fAreaABC; - w2=fAreaPAB/fAreaABC; - - return fabs(w0+w1+w2-1.0f)<0.001f; + SbVec3f a = v2 - v1; + SbVec3f b = v3 - v1; + return a.cross(b).length() / 2.0f; } + +bool calcWeights(const SbVec3f& v1, + const SbVec3f& v2, + const SbVec3f& v3, + const SbVec3f& p, + float& w0, + float& w1, + float& w2) +{ + float fAreaABC = calcArea(v1, v2, v3); + float fAreaPBC = calcArea(p, v2, v3); + float fAreaPCA = calcArea(p, v3, v1); + float fAreaPAB = calcArea(p, v1, v2); + + w0 = fAreaPBC / fAreaABC; + w1 = fAreaPCA / fAreaABC; + w2 = fAreaPAB / fAreaABC; + + return fabs(w0 + w1 + w2 - 1.0f) < 0.001f; } +} // namespace InspectionGui QString ViewProviderInspection::inspectDistance(const SoPickedPoint* pp) const { @@ -616,24 +661,28 @@ QString ViewProviderInspection::inspectDistance(const SoPickedPoint* pp) const const SoDetail* detail = pp->getDetail(pp->getPath()->getTail()); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { // get the distances of the three points of the picked facet - const SoFaceDetail * facedetail = static_cast(detail); + const SoFaceDetail* facedetail = static_cast(detail); App::Property* pDistance = this->pcObject->getPropertyByName("Distances"); - if (pDistance && pDistance->getTypeId() == Inspection::PropertyDistanceList::getClassTypeId()) { - Inspection::PropertyDistanceList* dist = static_cast(pDistance); + if (pDistance + && pDistance->getTypeId() == Inspection::PropertyDistanceList::getClassTypeId()) { + Inspection::PropertyDistanceList* dist = + static_cast(pDistance); int index1 = facedetail->getPoint(0)->getCoordinateIndex(); int index2 = facedetail->getPoint(1)->getCoordinateIndex(); int index3 = facedetail->getPoint(2)->getCoordinateIndex(); float fVal1 = (*dist)[index1]; float fVal2 = (*dist)[index2]; float fVal3 = (*dist)[index3]; - + App::Property* pActual = this->pcObject->getPropertyByName("Actual"); - if (pActual && pActual->getTypeId().isDerivedFrom( App::PropertyLink::getClassTypeId())) { + if (pActual + && pActual->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { float fSearchRadius = this->search_radius; if (fVal1 > fSearchRadius || fVal2 > fSearchRadius || fVal3 > fSearchRadius) { info = QObject::tr("Distance: > %1").arg(fSearchRadius); } - else if (fVal1 < -fSearchRadius || fVal2 < -fSearchRadius || fVal3 < -fSearchRadius) { + else if (fVal1 < -fSearchRadius || fVal2 < -fSearchRadius + || fVal3 < -fSearchRadius) { info = QObject::tr("Distance: < %1").arg(-fSearchRadius); } else { @@ -644,7 +693,8 @@ QString ViewProviderInspection::inspectDistance(const SoPickedPoint* pp) const SoPath* selectionPath = searchAction.getPath(); if (selectionPath) { - SoCoordinate3* coords = static_cast(selectionPath->getTail()); + SoCoordinate3* coords = + static_cast(selectionPath->getTail()); const SbVec3f& v1 = coords->point[index1]; const SbVec3f& v2 = coords->point[index2]; const SbVec3f& v3 = coords->point[index3]; @@ -661,13 +711,14 @@ QString ViewProviderInspection::inspectDistance(const SoPickedPoint* pp) const } else if (detail && detail->getTypeId() == SoPointDetail::getClassTypeId()) { // safe downward cast, know the type - const SoPointDetail * pointdetail = static_cast(detail); + const SoPointDetail* pointdetail = static_cast(detail); // get the distance of the picked point int index = pointdetail->getCoordinateIndex(); App::Property* prop = this->pcObject->getPropertyByName("Distances"); if (prop && prop->getTypeId() == Inspection::PropertyDistanceList::getClassTypeId()) { - Inspection::PropertyDistanceList* dist = static_cast(prop); + Inspection::PropertyDistanceList* dist = + static_cast(prop); float fVal = (*dist)[index]; info = QObject::tr("Distance: %1").arg(fVal); } @@ -693,6 +744,7 @@ ViewProviderInspectionGroup::~ViewProviderInspectionGroup() = default; */ QIcon ViewProviderInspectionGroup::getIcon() const { + // clang-format off static const char * const ScanViewOpen[]={ "16 16 10 1", "c c #000000", @@ -749,6 +801,7 @@ QIcon ViewProviderInspectionGroup::getIcon() const ".##############c", "..cccccccccccccc", "................"}; + // clang-format on QIcon groupIcon; groupIcon.addPixmap(QPixmap(ScanViewClosed), QIcon::Normal, QIcon::Off); diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.h b/src/Mod/Inspection/Gui/ViewProviderInspection.h index 56e91f1461..ad7df2d015 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.h +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.h @@ -36,18 +36,20 @@ class SoDrawStyle; class SoSeparator; class SoCoordinate3; -namespace Gui { - class SoFCColorBar; - class View3DInventorViewer; -} +namespace Gui +{ +class SoFCColorBar; +class View3DInventorViewer; +} // namespace Gui -namespace InspectionGui { +namespace InspectionGui +{ /** * @author Werner Mayer */ -class ViewProviderInspection : public Gui::ViewProviderDocumentObject, - public Base::Observer{ +class ViewProviderInspection: public Gui::ViewProviderDocumentObject, public Base::Observer +{ using inherited = ViewProviderDocumentObject; PROPERTY_HEADER_WITH_OVERRIDE(InspectionGui::ViewProviderInspection); @@ -59,15 +61,16 @@ public: App::PropertyBool OutsideGrayed; App::PropertyFloatConstraint PointSize; - void attach(App::DocumentObject *pcFeat) override; + void attach(App::DocumentObject* pcFeat) override; /// Sets the viewing mode void setDisplayMode(const char* ModeName) override; /// Returns a list of all possible modes std::vector getDisplayModes() const override; /// Update colorbar after recomputation of distances. void updateData(const App::Property*) override; - /// Once the color bar settings has been changed this method gets called to update the feature's representation - void OnChange(Base::Subject &rCaller,int rcReason) override; + /// Once the color bar settings has been changed this method gets called to update the feature's + /// representation + void OnChange(Base::Subject& rCaller, int rcReason) override; QIcon getIcon() const override; /// Returns a color bar SoSeparator* getFrontRoot() const override; @@ -76,7 +79,7 @@ public: /// Show the object in the view void show() override; - static void inspectCallback(void * ud, SoEventCallback * n); + static void inspectCallback(void* ud, SoEventCallback* n); protected: void onChanged(const App::Property* prop) override; @@ -93,22 +96,22 @@ private: void setupFaceIndexes(const std::vector&); protected: - SoMaterial * pcColorMat; + SoMaterial* pcColorMat; SoMaterialBinding* pcMatBinding; - SoGroup * pcLinkRoot; + SoGroup* pcLinkRoot; Gui::SoFCColorBar* pcColorBar; - SoDrawStyle * pcColorStyle; - SoDrawStyle * pcPointStyle; - SoSeparator * pcColorRoot; - SoCoordinate3 * pcCoords; + SoDrawStyle* pcColorStyle; + SoDrawStyle* pcPointStyle; + SoSeparator* pcColorRoot; + SoCoordinate3* pcCoords; private: - float search_radius{FLT_MAX}; + float search_radius {FLT_MAX}; static bool addflag; static App::PropertyFloatConstraint::Constraints floatRange; }; -class ViewProviderInspectionGroup : public Gui::ViewProviderDocumentObjectGroup +class ViewProviderInspectionGroup: public Gui::ViewProviderDocumentObjectGroup { PROPERTY_HEADER_WITH_OVERRIDE(InspectionGui::ViewProviderInspectionGroup); @@ -120,8 +123,7 @@ public: QIcon getIcon() const override; }; -} // namespace InspectionGui +} // namespace InspectionGui -#endif // INSPECTIOGUI_VIEWPROVIDERINSPECTION_H - +#endif // INSPECTIOGUI_VIEWPROVIDERINSPECTION_H diff --git a/src/Mod/Inspection/Gui/VisualInspection.cpp b/src/Mod/Inspection/Gui/VisualInspection.cpp index e1c68ecd6e..afaaad9845 100644 --- a/src/Mod/Inspection/Gui/VisualInspection.cpp +++ b/src/Mod/Inspection/Gui/VisualInspection.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -40,21 +40,22 @@ using namespace InspectionGui; -namespace InspectionGui { -class SingleSelectionItem : public QTreeWidgetItem +namespace InspectionGui +{ +class SingleSelectionItem: public QTreeWidgetItem { public: - explicit SingleSelectionItem (QTreeWidget* parent) - : QTreeWidgetItem(parent), _compItem(nullptr) - { - } + explicit SingleSelectionItem(QTreeWidget* parent) + : QTreeWidgetItem(parent) + , _compItem(nullptr) + {} - explicit SingleSelectionItem (QTreeWidgetItem* parent) - : QTreeWidgetItem (parent), _compItem(nullptr) - { - } + explicit SingleSelectionItem(QTreeWidgetItem* parent) + : QTreeWidgetItem(parent) + , _compItem(nullptr) + {} - ~SingleSelectionItem () override = default; + ~SingleSelectionItem() override = default; SingleSelectionItem* getCompetitiveItem() const { @@ -69,7 +70,7 @@ public: private: SingleSelectionItem* _compItem; }; -} +} // namespace InspectionGui /* TRANSLATOR InspectionGui::DlgVisualInspectionImp */ @@ -78,17 +79,24 @@ private: * name 'name' and widget flags set to 'f'. */ VisualInspection::VisualInspection(QWidget* parent, Qt::WindowFlags fl) - : QDialog(parent, fl), ui(new Ui_VisualInspection) + : QDialog(parent, fl) + , ui(new Ui_VisualInspection) { ui->setupUi(this); - connect(ui->treeWidgetActual, &QTreeWidget::itemClicked, - this, &VisualInspection::onActivateItem); - connect(ui->treeWidgetNominal, &QTreeWidget::itemClicked, - this, &VisualInspection::onActivateItem); - connect(ui->buttonBox, &QDialogButtonBox::helpRequested, - Gui::getMainWindow(), &Gui::MainWindow::whatsThis); + connect(ui->treeWidgetActual, + &QTreeWidget::itemClicked, + this, + &VisualInspection::onActivateItem); + connect(ui->treeWidgetNominal, + &QTreeWidget::itemClicked, + this, + &VisualInspection::onActivateItem); + connect(ui->buttonBox, + &QDialogButtonBox::helpRequested, + Gui::getMainWindow(), + &Gui::MainWindow::whatsThis); - //FIXME: Not used yet + // FIXME: Not used yet ui->textLabel2->hide(); ui->thickness->hide(); ui->searchRadius->setUnit(Base::Unit::Length); @@ -111,12 +119,11 @@ VisualInspection::VisualInspection(QWidget* parent, Qt::WindowFlags fl) std::vector obj = doc->getObjects(); Base::Type point = Base::Type::fromName("Points::Feature"); - Base::Type mesh = Base::Type::fromName("Mesh::Feature"); + Base::Type mesh = Base::Type::fromName("Mesh::Feature"); Base::Type shape = Base::Type::fromName("Part::Feature"); for (auto it : obj) { - if (it->getTypeId().isDerivedFrom(point) || - it->getTypeId().isDerivedFrom(mesh) || - it->getTypeId().isDerivedFrom(shape)) { + if (it->getTypeId().isDerivedFrom(point) || it->getTypeId().isDerivedFrom(mesh) + || it->getTypeId().isDerivedFrom(shape)) { Gui::ViewProvider* view = gui->getViewProvider(it); QIcon px = view->getIcon(); SingleSelectionItem* item1 = new SingleSelectionItem(ui->treeWidgetActual); @@ -150,8 +157,8 @@ VisualInspection::~VisualInspection() void VisualInspection::loadSettings() { - ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Inspection/Inspection"); + ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Inspection/Inspection"); double searchDistance = ui->searchRadius->value().getValue(); searchDistance = handle->GetFloat("SearchDistance", searchDistance); @@ -164,8 +171,8 @@ void VisualInspection::loadSettings() void VisualInspection::saveSettings() { - ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Inspection/Inspection"); + ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Inspection/Inspection"); double searchDistance = ui->searchRadius->value().getValue(); handle->SetFloat("SearchDistance", searchDistance); @@ -178,11 +185,12 @@ void VisualInspection::onActivateItem(QTreeWidgetItem* item) if (item) { SingleSelectionItem* sel = static_cast(item); SingleSelectionItem* cmp = sel->getCompetitiveItem(); - if (cmp && cmp->checkState(0) == Qt::Checked) + if (cmp && cmp->checkState(0) == Qt::Checked) { cmp->setCheckState(0, Qt::Unchecked); + } } - bool ok=false; + bool ok = false; for (QTreeWidgetItemIterator it(ui->treeWidgetActual); *it; ++it) { SingleSelectionItem* sel = (SingleSelectionItem*)*it; if (sel->checkState(0) == Qt::Checked) { @@ -193,7 +201,7 @@ void VisualInspection::onActivateItem(QTreeWidgetItem* item) if (ok) { ok = false; - for (QTreeWidgetItemIterator it (ui->treeWidgetNominal); *it; ++it) { + for (QTreeWidgetItemIterator it(ui->treeWidgetNominal); *it; ++it) { SingleSelectionItem* sel = (SingleSelectionItem*)*it; if (sel->checkState(0) == Qt::Checked) { ok = true; @@ -216,8 +224,9 @@ void VisualInspection::accept() QStringList nominalNames; for (QTreeWidgetItemIterator it(ui->treeWidgetNominal); *it; it++) { SingleSelectionItem* sel = (SingleSelectionItem*)*it; - if (sel->checkState(0) == Qt::Checked) + if (sel->checkState(0) == Qt::Checked) { nominalNames << sel->data(0, Qt::UserRole).toString(); + } } double searchRadius = ui->searchRadius->value().getValue(); @@ -228,33 +237,42 @@ void VisualInspection::accept() doc->openCommand(QT_TRANSLATE_NOOP("Command", "Visual Inspection")); // create a group - Gui::Command::runCommand( - Gui::Command::App, "App_activeDocument___InspectionGroup=App.ActiveDocument.addObject(\"Inspection::Group\",\"Inspection\")"); - + Gui::Command::runCommand(Gui::Command::App, + "App_activeDocument___InspectionGroup=App.ActiveDocument." + "addObject(\"Inspection::Group\",\"Inspection\")"); + // for each actual geometry create an inspection feature for (QTreeWidgetItemIterator it(ui->treeWidgetActual); *it; it++) { SingleSelectionItem* sel = (SingleSelectionItem*)*it; if (sel->checkState(0) == Qt::Checked) { QString actualName = sel->data(0, Qt::UserRole).toString(); Gui::Command::doCommand(Gui::Command::App, - "App_activeDocument___InspectionGroup.newObject(\"Inspection::Feature\",\"%s_Inspect\")", (const char*)actualName.toLatin1()); - Gui::Command::doCommand(Gui::Command::App, + "App_activeDocument___InspectionGroup.newObject(" + "\"Inspection::Feature\",\"%s_Inspect\")", + (const char*)actualName.toLatin1()); + Gui::Command::doCommand( + Gui::Command::App, "App.ActiveDocument.ActiveObject.Actual=App.ActiveDocument.%s\n" "App_activeDocument___activeObject___Nominals=list()\n" "App.ActiveDocument.ActiveObject.SearchRadius=%.3f\n" - "App.ActiveDocument.ActiveObject.Thickness=%.3f\n", (const char*)actualName.toLatin1(), searchRadius, thickness); + "App.ActiveDocument.ActiveObject.Thickness=%.3f\n", + (const char*)actualName.toLatin1(), + searchRadius, + thickness); for (const auto& it : nominalNames) { Gui::Command::doCommand(Gui::Command::App, - "App_activeDocument___activeObject___Nominals.append(App.ActiveDocument.%s)\n", (const char*)it.toLatin1()); + "App_activeDocument___activeObject___Nominals.append(" + "App.ActiveDocument.%s)\n", + (const char*)it.toLatin1()); } Gui::Command::doCommand(Gui::Command::App, - "App.ActiveDocument.ActiveObject.Nominals=App_activeDocument___activeObject___Nominals\n" - "del App_activeDocument___activeObject___Nominals\n"); + "App.ActiveDocument.ActiveObject.Nominals=App_" + "activeDocument___activeObject___Nominals\n" + "del App_activeDocument___activeObject___Nominals\n"); } } - Gui::Command::runCommand(Gui::Command::App, - "del App_activeDocument___InspectionGroup\n"); + Gui::Command::runCommand(Gui::Command::App, "del App_activeDocument___InspectionGroup\n"); doc->commitCommand(); doc->getDocument()->recompute(); @@ -263,18 +281,20 @@ void VisualInspection::accept() for (QTreeWidgetItemIterator it(ui->treeWidgetActual); *it; it++) { SingleSelectionItem* sel = (SingleSelectionItem*)*it; if (sel->checkState(0) == Qt::Checked) { - Gui::Command::doCommand(Gui::Command::App - , "Gui.ActiveDocument.getObject(\"%s\").Visibility=False" - , (const char*)sel->data(0, Qt::UserRole).toString().toLatin1()); + Gui::Command::doCommand( + Gui::Command::App, + "Gui.ActiveDocument.getObject(\"%s\").Visibility=False", + (const char*)sel->data(0, Qt::UserRole).toString().toLatin1()); } } for (QTreeWidgetItemIterator it(ui->treeWidgetNominal); *it; it++) { SingleSelectionItem* sel = (SingleSelectionItem*)*it; if (sel->checkState(0) == Qt::Checked) { - Gui::Command::doCommand(Gui::Command::App - , "Gui.ActiveDocument.getObject(\"%s\").Visibility=False" - , (const char*)sel->data(0, Qt::UserRole).toString().toLatin1()); + Gui::Command::doCommand( + Gui::Command::App, + "Gui.ActiveDocument.getObject(\"%s\").Visibility=False", + (const char*)sel->data(0, Qt::UserRole).toString().toLatin1()); } } } diff --git a/src/Mod/Inspection/Gui/VisualInspection.h b/src/Mod/Inspection/Gui/VisualInspection.h index ea22dd40fc..15fe2d2926 100644 --- a/src/Mod/Inspection/Gui/VisualInspection.h +++ b/src/Mod/Inspection/Gui/VisualInspection.h @@ -29,15 +29,16 @@ class QTreeWidgetItem; class QPushButton; -namespace InspectionGui { +namespace InspectionGui +{ class Ui_VisualInspection; -class VisualInspection : public QDialog +class VisualInspection: public QDialog { Q_OBJECT public: explicit VisualInspection(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); - ~ VisualInspection() override; + ~VisualInspection() override; void accept() override; @@ -51,6 +52,6 @@ private: QPushButton* buttonOk; }; -} // namespace InspectionGui +} // namespace InspectionGui -#endif // INSPECTIONGUI_VISUALINSPECTION_H +#endif // INSPECTIONGUI_VISUALINSPECTION_H diff --git a/src/Mod/Inspection/Gui/Workbench.cpp b/src/Mod/Inspection/Gui/Workbench.cpp index 4caffeeed7..c2a02150d0 100644 --- a/src/Mod/Inspection/Gui/Workbench.cpp +++ b/src/Mod/Inspection/Gui/Workbench.cpp @@ -40,7 +40,7 @@ Workbench::~Workbench() = default; Gui::MenuItem* Workbench::setupMenuBar() const { Gui::MenuItem* root = StdWorkbench::setupMenuBar(); - Gui::MenuItem* item = root->findItem( "&Windows" ); + Gui::MenuItem* item = root->findItem("&Windows"); Gui::MenuItem* insp = new Gui::MenuItem; root->insertItem(item, insp); insp->setCommand("Inspection"); @@ -52,8 +52,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const Gui::ToolBarItem* Workbench::setupToolBars() const { Gui::ToolBarItem* root = StdWorkbench::setupToolBars(); - //Gui::ToolBarItem* insp = new Gui::ToolBarItem(root); - //insp->setCommand( "Inspection Tools" ); - //*insp << "Inspection_VisualInspection"; + // Gui::ToolBarItem* insp = new Gui::ToolBarItem(root); + // insp->setCommand( "Inspection Tools" ); + //*insp << "Inspection_VisualInspection"; return root; } diff --git a/src/Mod/Inspection/Gui/Workbench.h b/src/Mod/Inspection/Gui/Workbench.h index 3706b88e67..4adca9fd27 100644 --- a/src/Mod/Inspection/Gui/Workbench.h +++ b/src/Mod/Inspection/Gui/Workbench.h @@ -26,9 +26,10 @@ #include -namespace InspectionGui { +namespace InspectionGui +{ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -41,7 +42,7 @@ protected: Gui::ToolBarItem* setupToolBars() const override; }; -} // namespace InspectionGui +} // namespace InspectionGui -#endif // Inspection_WORKBENCH_H +#endif // Inspection_WORKBENCH_H diff --git a/src/Mod/Inspection/Init.py b/src/Mod/Inspection/Init.py index 803687116c..16f51fcc6c 100644 --- a/src/Mod/Inspection/Init.py +++ b/src/Mod/Inspection/Init.py @@ -1,24 +1,24 @@ -#*************************************************************************** -#* Copyright (c) 2001,2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2001,2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # FreeCAD init script of the Inspection module diff --git a/src/Mod/Inspection/InitGui.py b/src/Mod/Inspection/InitGui.py index 49cf1f7bba..20a4ca3e42 100644 --- a/src/Mod/Inspection/InitGui.py +++ b/src/Mod/Inspection/InitGui.py @@ -1,25 +1,25 @@ -#*************************************************************************** -#* Copyright (c) 2002,2003 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002,2003 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Inspection gui init module # @@ -27,17 +27,23 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -class InspectionWorkbench ( Workbench ): + +class InspectionWorkbench(Workbench): "Inspection workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Inspection/Resources/icons/InspectionWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Inspection/Resources/icons/InspectionWorkbench.svg" + ) self.__class__.MenuText = "Inspection" self.__class__.ToolTip = "Inspection workbench" def Initialize(self): # load the module import InspectionGui + def GetClassName(self): return "InspectionGui::Workbench" + Gui.addWorkbench(InspectionWorkbench()) diff --git a/src/Mod/Inspection/Inspection.dox b/src/Mod/Inspection/Inspection.dox index de7fe4b9c1..43db6c6a22 100644 --- a/src/Mod/Inspection/Inspection.dox +++ b/src/Mod/Inspection/Inspection.dox @@ -1,3 +1,2 @@ /** \defgroup TEMPLATE Inspection * \ingroup CWORKBENCHES */ - diff --git a/src/Mod/Inspection/InspectionGlobal.h b/src/Mod/Inspection/InspectionGlobal.h index 99f594df32..291a14c6cc 100644 --- a/src/Mod/Inspection/InspectionGlobal.h +++ b/src/Mod/Inspection/InspectionGlobal.h @@ -29,19 +29,19 @@ // Inspection #ifndef InspectionExport #ifdef Inspection_EXPORTS -# define InspectionExport FREECAD_DECL_EXPORT +#define InspectionExport FREECAD_DECL_EXPORT #else -# define InspectionExport FREECAD_DECL_IMPORT +#define InspectionExport FREECAD_DECL_IMPORT #endif #endif // InspectionGui #ifndef InspectionGuiExport #ifdef InspectionGui_EXPORTS -# define InspectionGuiExport FREECAD_DECL_EXPORT +#define InspectionGuiExport FREECAD_DECL_EXPORT #else -# define InspectionGuiExport FREECAD_DECL_IMPORT +#define InspectionGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //INSPECTION_GLOBAL_H +#endif // INSPECTION_GLOBAL_H diff --git a/src/Mod/JtReader/App/AppJtReader.cpp b/src/Mod/JtReader/App/AppJtReader.cpp index 156634e40e..847971af75 100644 --- a/src/Mod/JtReader/App/AppJtReader.cpp +++ b/src/Mod/JtReader/App/AppJtReader.cpp @@ -30,32 +30,30 @@ extern struct PyMethodDef JtReader_methods[]; extern "C" { -void AppJtReaderExport initJtReader() { +void AppJtReaderExport initJtReader() +{ - static struct PyModuleDef JtReaderAPIDef = { - PyModuleDef_HEAD_INIT, - "JtReader", 0, -1, JtReader_methods, - NULL, NULL, NULL, NULL - }; - PyModule_Create(&JtReaderAPIDef); + static struct PyModuleDef JtReaderAPIDef = + {PyModuleDef_HEAD_INIT, "JtReader", 0, -1, JtReader_methods, NULL, NULL, NULL, NULL}; + PyModule_Create(&JtReaderAPIDef); - // load dependent module - Base::Interpreter().loadModule("Mesh"); + // load dependent module + Base::Interpreter().loadModule("Mesh"); // Initialize JtTk - //JtkEntityFactory::init(); + // JtkEntityFactory::init(); - // Note, non-evaluation JT Open Toolkit licensees must uncomment the - // following line, inserting their "Sold_To_ID". Each licensee has a - // unique Sold_To_ID issued by UGS Corp. - // - //JtkEntityFactory::registerCustomer( 1103193 ); - //JtkEntityFactory::registerCustomer(1103103); + // Note, non-evaluation JT Open Toolkit licensees must uncomment the + // following line, inserting their "Sold_To_ID". Each licensee has a + // unique Sold_To_ID issued by UGS Corp. + // + // JtkEntityFactory::registerCustomer( 1103193 ); + // JtkEntityFactory::registerCustomer(1103103); - Base::Console().Log("Loading JtReader module... done\n"); + Base::Console().Log("Loading JtReader module... done\n"); - return; + return; } -} // extern "C" { +} // extern "C" { diff --git a/src/Mod/JtReader/App/AppJtReaderPy.cpp b/src/Mod/JtReader/App/AppJtReaderPy.cpp index 53ac9056a5..bedcda48b3 100644 --- a/src/Mod/JtReader/App/AppJtReaderPy.cpp +++ b/src/Mod/JtReader/App/AppJtReaderPy.cpp @@ -36,198 +36,199 @@ using std::vector; using namespace MeshCore; -//using namespace JtReader; +// using namespace JtReader; /* module functions */ -static PyObject * read(PyObject * /*self*/, PyObject *args) +static PyObject* read(PyObject* /*self*/, PyObject* args) { - char* Name; - if (!PyArg_ParseTuple(args, "et","utf-8",&Name)) + char* Name; + if (!PyArg_ParseTuple(args, "et", "utf-8", &Name)) { return NULL; - std::string EncodedName = std::string(Name); - PyMem_Free(Name); + } + std::string EncodedName = std::string(Name); + PyMem_Free(Name); - PY_TRY { - //std::auto_ptr apcKernel(new MeshCore::MeshKernel()); + PY_TRY + { + // std::auto_ptr apcKernel(new MeshCore::MeshKernel()); - //vector facets; - //facets.resize(0 /* some size*/); + // vector facets; + // facets.resize(0 /* some size*/); - //const SimpleMeshFacet* It=iterStart(); - //int i=0; - //while(It=iterGetNext()) - //{ - // facets[i]._aclPoints[0].x = It->p1[0]; - // facets[i]._aclPoints[0].y = It->p1[1]; - // facets[i]._aclPoints[0].z = It->p1[2]; - // facets[i]._aclPoints[1].x = It->p2[0]; - // facets[i]._aclPoints[1].y = It->p2[1]; - // facets[i]._aclPoints[1].z = It->p2[2]; - // facets[i]._aclPoints[2].x = It->p3[0]; - // facets[i]._aclPoints[2].y = It->p3[1]; - // facets[i]._aclPoints[2].z = It->p3[2]; - //} - - //(*apcKernel) = facets; + // const SimpleMeshFacet* It=iterStart(); + // int i=0; + // while(It=iterGetNext()) + //{ + // facets[i]._aclPoints[0].x = It->p1[0]; + // facets[i]._aclPoints[0].y = It->p1[1]; + // facets[i]._aclPoints[0].z = It->p1[2]; + // facets[i]._aclPoints[1].x = It->p2[0]; + // facets[i]._aclPoints[1].y = It->p2[1]; + // facets[i]._aclPoints[1].z = It->p2[2]; + // facets[i]._aclPoints[2].x = It->p3[0]; + // facets[i]._aclPoints[2].y = It->p3[1]; + // facets[i]._aclPoints[2].z = It->p3[2]; + // } - //return new Mesh::MeshPy(new Mesh::MeshObject(*(apcKernel.release()))); + //(*apcKernel) = facets; - } PY_CATCH; + // return new Mesh::MeshPy(new Mesh::MeshObject(*(apcKernel.release()))); + } + PY_CATCH; - Py_Return; + Py_Return; } -static PyObject * -open(PyObject * /*self*/, PyObject *args) +static PyObject* open(PyObject* /*self*/, PyObject* args) { - char* Name; - if (!PyArg_ParseTuple(args, "et","utf-8",&Name)) + char* Name; + if (!PyArg_ParseTuple(args, "et", "utf-8", &Name)) { return NULL; - std::string EncodedName = std::string(Name); - PyMem_Free(Name); - - PY_TRY { - - //Base::Console().Log("Open in Mesh with %s",Name); - Base::FileInfo file(EncodedName.c_str()); - - // extract ending - if(file.extension() == "") - Py_Error(Base::PyExc_FC_GeneralError, "no file ending"); - - if(file.hasExtension("jt")) - { - TestJtReader reader; - reader.setFile(EncodedName.c_str()); - reader.read(); - - // create new document and add Import feature - // App::Document *pcDoc = App::GetApplication().newDocument("Unnamed"); - // Mesh::Feature *pcFeature = (Mesh::Feature*)pcDoc->addObject("Mesh::Feature",file.fileNamePure().c_str()); - // - // std::auto_ptr apcKernel(new MeshCore::MeshKernel()); - - // readFile(EncodedName.c_str(),0); - - // vector facets; - // facets.resize(iterSize()); - - // const SimpleMeshFacet* It=iterStart(); - // int i=0; - // while(It=iterGetNext()) - // { - // facets[i]._aclPoints[0].x = It->p1[0]; - // facets[i]._aclPoints[0].y = It->p1[1]; - // facets[i]._aclPoints[0].z = It->p1[2]; - // facets[i]._aclPoints[1].x = It->p2[0]; - // facets[i]._aclPoints[1].y = It->p2[1]; - // facets[i]._aclPoints[1].z = It->p2[2]; - // facets[i]._aclPoints[2].x = It->p3[0]; - // facets[i]._aclPoints[2].y = It->p3[1]; - // facets[i]._aclPoints[2].z = It->p3[2]; - // i++; - // } - // clearData(); - // (*apcKernel) = facets; - // pcFeature->Mesh.setValue(*(apcKernel.get())); - - ////pcFeature->FileName.setValue( Name ); - // pcDoc->recompute(); } - else + std::string EncodedName = std::string(Name); + PyMem_Free(Name); + + PY_TRY { - Py_Error(Base::PyExc_FC_GeneralError, "unknown file ending"); - } + // Base::Console().Log("Open in Mesh with %s",Name); + Base::FileInfo file(EncodedName.c_str()); - } PY_CATCH; - - Py_Return; -} - - -/* module functions */ -static PyObject * -insert(PyObject * /*self*/, PyObject *args) -{ - char* Name; - const char* DocName; - if (!PyArg_ParseTuple(args, "ets","utf-8",&Name,&DocName)) - return NULL; - std::string EncodedName = std::string(Name); - PyMem_Free(Name); - - PY_TRY { - - Base::FileInfo file(EncodedName.c_str()); - - // extract ending - if(file.extension() == "") - Py_Error(Base::PyExc_FC_GeneralError, "no file ending"); - - if(file.hasExtension("jt") ) - { - // add Import feature - App::Document *pcDoc = App::GetApplication().getDocument(DocName); - if (!pcDoc) - { - char szBuf[200]; - snprintf(szBuf, 200, "Import called to the non-existing document '%s'", DocName); - Py_Error(Base::PyExc_FC_GeneralError, szBuf); + // extract ending + if (file.extension() == "") { + Py_Error(Base::PyExc_FC_GeneralError, "no file ending"); } - //readFile(EncodedName.c_str(),0); + if (file.hasExtension("jt")) { + TestJtReader reader; + reader.setFile(EncodedName.c_str()); + reader.read(); - //vector facets; + // create new document and add Import feature + // App::Document *pcDoc = App::GetApplication().newDocument("Unnamed"); + // Mesh::Feature *pcFeature = + // (Mesh::Feature*)pcDoc->addObject("Mesh::Feature",file.fileNamePure().c_str()); + // + // std::auto_ptr apcKernel(new MeshCore::MeshKernel()); - //if(iterSize()>0){ - // facets.resize(iterSize()); + // readFile(EncodedName.c_str(),0); - // const SimpleMeshFacet* It=iterStart(); - // int i=0; - // while(It=iterGetNext()) - // { - // facets[i]._aclPoints[0].x = It->p1[0]; - // facets[i]._aclPoints[0].y = It->p1[1]; - // facets[i]._aclPoints[0].z = It->p1[2]; - // facets[i]._aclPoints[1].x = It->p2[0]; - // facets[i]._aclPoints[1].y = It->p2[1]; - // facets[i]._aclPoints[1].z = It->p2[2]; - // facets[i]._aclPoints[2].x = It->p3[0]; - // facets[i]._aclPoints[2].y = It->p3[1]; - // facets[i]._aclPoints[2].z = It->p3[2]; - // i++; - // } - // clearData(); - // Mesh::Feature *pcFeature = (Mesh::Feature*)pcDoc->addObject("Mesh::Feature",file.fileNamePure().c_str()); - // - // std::auto_ptr apcKernel(new MeshCore::MeshKernel()); - // (*apcKernel) = facets; - // pcFeature->Mesh.setValue(*(apcKernel.get())); + // vector facets; + // facets.resize(iterSize()); - // //pcDoc->recompute(); + // const SimpleMeshFacet* It=iterStart(); + // int i=0; + // while(It=iterGetNext()) + // { + // facets[i]._aclPoints[0].x = It->p1[0]; + // facets[i]._aclPoints[0].y = It->p1[1]; + // facets[i]._aclPoints[0].z = It->p1[2]; + // facets[i]._aclPoints[1].x = It->p2[0]; + // facets[i]._aclPoints[1].y = It->p2[1]; + // facets[i]._aclPoints[1].z = It->p2[2]; + // facets[i]._aclPoints[2].x = It->p3[0]; + // facets[i]._aclPoints[2].y = It->p3[1]; + // facets[i]._aclPoints[2].z = It->p3[2]; + // i++; + // } + // clearData(); + // (*apcKernel) = facets; + // pcFeature->Mesh.setValue(*(apcKernel.get())); - //}else{ - // clearData(); - // //Py_Error(Base::BaseExceptionFreeCADError,"No Mesh in file"); - // Base::Console().Warning("No Mesh in file: %s\n",EncodedName.c_str()); - //} - } - else - { - Py_Error(Base::PyExc_FC_GeneralError, "unknown file ending"); + ////pcFeature->FileName.setValue( Name ); + // pcDoc->recompute(); + } + else { + Py_Error(Base::PyExc_FC_GeneralError, "unknown file ending"); + } } + PY_CATCH; - } PY_CATCH; + Py_Return; +} - Py_Return; + +/* module functions */ +static PyObject* insert(PyObject* /*self*/, PyObject* args) +{ + char* Name; + const char* DocName; + if (!PyArg_ParseTuple(args, "ets", "utf-8", &Name, &DocName)) { + return NULL; + } + std::string EncodedName = std::string(Name); + PyMem_Free(Name); + + PY_TRY + { + + Base::FileInfo file(EncodedName.c_str()); + + // extract ending + if (file.extension() == "") { + Py_Error(Base::PyExc_FC_GeneralError, "no file ending"); + } + + if (file.hasExtension("jt")) { + // add Import feature + App::Document* pcDoc = App::GetApplication().getDocument(DocName); + if (!pcDoc) { + char szBuf[200]; + snprintf(szBuf, 200, "Import called to the non-existing document '%s'", DocName); + Py_Error(Base::PyExc_FC_GeneralError, szBuf); + } + + // readFile(EncodedName.c_str(),0); + + // vector facets; + + // if(iterSize()>0){ + // facets.resize(iterSize()); + + // const SimpleMeshFacet* It=iterStart(); + // int i=0; + // while(It=iterGetNext()) + // { + // facets[i]._aclPoints[0].x = It->p1[0]; + // facets[i]._aclPoints[0].y = It->p1[1]; + // facets[i]._aclPoints[0].z = It->p1[2]; + // facets[i]._aclPoints[1].x = It->p2[0]; + // facets[i]._aclPoints[1].y = It->p2[1]; + // facets[i]._aclPoints[1].z = It->p2[2]; + // facets[i]._aclPoints[2].x = It->p3[0]; + // facets[i]._aclPoints[2].y = It->p3[1]; + // facets[i]._aclPoints[2].z = It->p3[2]; + // i++; + // } + // clearData(); + // Mesh::Feature *pcFeature = + // (Mesh::Feature*)pcDoc->addObject("Mesh::Feature",file.fileNamePure().c_str()); + // + // std::auto_ptr apcKernel(new MeshCore::MeshKernel()); + // (*apcKernel) = facets; + // pcFeature->Mesh.setValue(*(apcKernel.get())); + + // //pcDoc->recompute(); + + //}else{ + // clearData(); + // //Py_Error(Base::BaseExceptionFreeCADError,"No Mesh in file"); + // Base::Console().Warning("No Mesh in file: %s\n",EncodedName.c_str()); + //} + } + else { + Py_Error(Base::PyExc_FC_GeneralError, "unknown file ending"); + } + } + PY_CATCH; + + Py_Return; } /* registration table */ struct PyMethodDef JtReader_methods[] = { - {"open" ,open , Py_NEWARGS, "open a jt file in a new Document"}, - {"insert" ,insert, Py_NEWARGS, "isert a jt file in a existing document"}, - {"read" ,read, Py_NEWARGS, "Read a Mesh from a jt file and returns a Mesh object."}, - {NULL, NULL, 0, NULL} -}; + {"open", open, Py_NEWARGS, "open a jt file in a new Document"}, + {"insert", insert, Py_NEWARGS, "isert a jt file in a existing document"}, + {"read", read, Py_NEWARGS, "Read a Mesh from a jt file and returns a Mesh object."}, + {NULL, NULL, 0, NULL}}; diff --git a/src/Mod/JtReader/App/FcLodHandler.cpp b/src/Mod/JtReader/App/FcLodHandler.cpp index 1f6315b850..003924bbc9 100644 --- a/src/Mod/JtReader/App/FcLodHandler.cpp +++ b/src/Mod/JtReader/App/FcLodHandler.cpp @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" @@ -29,5 +29,5 @@ void FcLodHandler::startLod() { - Base::Console().Log("FcLodHandler::startLod()"); + Base::Console().Log("FcLodHandler::startLod()"); } diff --git a/src/Mod/JtReader/App/FcLodHandler.h b/src/Mod/JtReader/App/FcLodHandler.h index f564743d57..370ff90ead 100644 --- a/src/Mod/JtReader/App/FcLodHandler.h +++ b/src/Mod/JtReader/App/FcLodHandler.h @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef FcLodHandler_HEADER #define FcLodHandler_HEADER @@ -29,16 +29,7 @@ class FcLodHandler: public LodHandler { public: virtual void startLod(); - - - }; - #endif - - - - - diff --git a/src/Mod/JtReader/App/JrJt/Context.h b/src/Mod/JtReader/App/JrJt/Context.h index 5151f0f259..7673e9e5cf 100644 --- a/src/Mod/JtReader/App/JrJt/Context.h +++ b/src/Mod/JtReader/App/JrJt/Context.h @@ -1,46 +1,44 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef Context_HEADER #define Context_HEADER +#include "Context.h" #include #include -#include "Context.h" using namespace std; class Context { public: - Context(istream &s) :Strm(s){}; + Context(istream& s) + : Strm(s) {}; uint8_t VersionMinor; uint8_t VersionMajor; - istream & Strm; - + istream& Strm; }; - #endif - diff --git a/src/Mod/JtReader/App/JrJt/Element_Header.h b/src/Mod/JtReader/App/JrJt/Element_Header.h index 832a92451b..258d4712ef 100644 --- a/src/Mod/JtReader/App/JrJt/Element_Header.h +++ b/src/Mod/JtReader/App/JrJt/Element_Header.h @@ -1,37 +1,36 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef Element_Header_HEADER #define Element_Header_HEADER +#include #include #include -#include #include "Context.h" #include "GUID.h" -#include "UChar.h" #include "I32.h" - +#include "UChar.h" using namespace std; @@ -39,14 +38,14 @@ using namespace std; struct Element_Header { - Element_Header(){}; + Element_Header() {}; - Element_Header(Context& cont, bool zLib=false) + Element_Header(Context& cont, bool zLib = false) { read(cont, zLib); }; - inline void read(Context& cont ,bool zLib=false) + inline void read(Context& cont, bool zLib = false) { // only zip less implemented so far... assert(zLib == false); @@ -56,20 +55,10 @@ struct Element_Header Object_Base_Type.read(cont); }; - I32 Element_Length; + I32 Element_Length; GUID Object_Type_ID; UChar Object_Base_Type; - - }; - #endif - - - - - - - diff --git a/src/Mod/JtReader/App/JrJt/GUID.h b/src/Mod/JtReader/App/JrJt/GUID.h index 2d75da3e60..6daf53587e 100644 --- a/src/Mod/JtReader/App/JrJt/GUID.h +++ b/src/Mod/JtReader/App/JrJt/GUID.h @@ -1,24 +1,24 @@ /*************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef GUID_HEADER #define GUID_HEADER @@ -27,10 +27,9 @@ #include #include -#include "U8.h" #include "U16.h" #include "U32.h" - +#include "U8.h" using namespace std; @@ -39,10 +38,30 @@ using namespace std; struct GUID { - GUID(){}; + GUID() {}; - GUID(uint32_t a1, uint16_t b1, uint16_t b2, uint8_t c1, uint8_t c2, uint8_t c3, uint8_t c4, uint8_t c5, uint8_t c6, uint8_t c7, uint8_t c8) - :_A1(a1), _B1(b1), _B2(b2), _C1(c1), _C2(c2), _C3(c3), _C4(c4), _C5(c5), _C6(c6), _C7(c7), _C8(c8) + GUID(uint32_t a1, + uint16_t b1, + uint16_t b2, + uint8_t c1, + uint8_t c2, + uint8_t c3, + uint8_t c4, + uint8_t c5, + uint8_t c6, + uint8_t c7, + uint8_t c8) + : _A1(a1) + , _B1(b1) + , _B2(b2) + , _C1(c1) + , _C2(c2) + , _C3(c3) + , _C4(c4) + , _C5(c5) + , _C6(c6) + , _C7(c7) + , _C8(c8) {} GUID(Context& cont) @@ -50,23 +69,16 @@ struct GUID read(cont); } - bool operator!=(const GUID& other) const { - return !operator == (other); + bool operator!=(const GUID& other) const + { + return !operator==(other); } - bool operator==(const GUID& other) const { - return - _A1 == other._A1 - && _B1 == other._B1 - && _B2 == other._B2 - && _C1 == other._C1 - && _C2 == other._C2 - && _C3 == other._C3 - && _C4 == other._C4 - && _C5 == other._C5 - && _C6 == other._C6 - && _C7 == other._C7 - && _C8 == other._C8; + bool operator==(const GUID& other) const + { + return _A1 == other._A1 && _B1 == other._B1 && _B2 == other._B2 && _C1 == other._C1 + && _C2 == other._C2 && _C3 == other._C3 && _C4 == other._C4 && _C5 == other._C5 + && _C6 == other._C6 && _C7 == other._C7 && _C8 == other._C8; } inline void read(Context& cont) @@ -86,9 +98,11 @@ struct GUID _C8.read(cont); } - std::string toString()const{ + std::string toString() const + { std::stringstream strm; - strm << "{" << std::hex << _A1 << "-" << _B1 << _B2 << "-" << _C1 << _C2 << _C3 << _C4 << _C5 << _C6 << _C7 << _C8 << "}"; + strm << "{" << std::hex << _A1 << "-" << _B1 << _B2 << "-" << _C1 << _C2 << _C3 << _C4 + << _C5 << _C6 << _C7 << _C8 << "}"; return strm.str(); } @@ -97,17 +111,15 @@ struct GUID U16 _B1; U16 _B2; - U8 _C1; - U8 _C2; - U8 _C3; - U8 _C4; - U8 _C5; - U8 _C6; - U8 _C7; - U8 _C8; - + U8 _C1; + U8 _C2; + U8 _C3; + U8 _C4; + U8 _C5; + U8 _C6; + U8 _C7; + U8 _C8; }; - -#endif \ No newline at end of file +#endif diff --git a/src/Mod/JtReader/App/JrJt/I32.h b/src/Mod/JtReader/App/JrJt/I32.h index fbac085c2d..3d90020cf0 100644 --- a/src/Mod/JtReader/App/JrJt/I32.h +++ b/src/Mod/JtReader/App/JrJt/I32.h @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef I32_HEADER #define I32_HEADER @@ -30,7 +30,7 @@ using namespace std; struct I32 { - I32(){}; + I32() {}; I32(Context& cont) { @@ -51,5 +51,4 @@ struct I32 }; - -#endif \ No newline at end of file +#endif diff --git a/src/Mod/JtReader/App/JrJt/JtReader.cpp b/src/Mod/JtReader/App/JrJt/JtReader.cpp index 0161924646..c44a49f8a6 100644 --- a/src/Mod/JtReader/App/JrJt/JtReader.cpp +++ b/src/Mod/JtReader/App/JrJt/JtReader.cpp @@ -5,10 +5,10 @@ #include #include +#include "Element_Header.h" #include "GUID.h" #include "I32.h" #include "LodHandler.h" -#include "Element_Header.h" #include "Segment_Header.h" #include "TOC_Entry.h" #include "UChar.h" @@ -17,81 +17,90 @@ using namespace std; -const GUID JtReader::TriStripSetShapeLODElement_ID(0x10dd10ab, 0x2ac8, 0x11d1, 0x9b, 0x6b, 0x0, 0x80, 0xc7, 0xbb, 0x59, 0x97); +const GUID JtReader::TriStripSetShapeLODElement_ID(0x10dd10ab, + 0x2ac8, + 0x11d1, + 0x9b, + 0x6b, + 0x0, + 0x80, + 0xc7, + 0xbb, + 0x59, + 0x97); JtReader::JtReader() -{ -} +{} JtReader::~JtReader() -{ -} +{} void JtReader::setFile(const std::string fileName) { - this->_fileName = fileName; + this->_fileName = fileName; } const std::vector& JtReader::readToc() { - ifstream strm; + ifstream strm; - strm.open(_fileName, ios::binary); + strm.open(_fileName, ios::binary); - if (!strm) - throw "cannot open file"; + if (!strm) { + throw "cannot open file"; + } - Context cont(strm); + Context cont(strm); - char headerString[80]; - strm.read(headerString, 80); + char headerString[80]; + strm.read(headerString, 80); - UChar Byte_Order(cont); - I32 Empty_Field(cont); - I32 TOC_Offset(cont); + UChar Byte_Order(cont); + I32 Empty_Field(cont); + I32 TOC_Offset(cont); - GUID LSG_Segment_ID(cont); + GUID LSG_Segment_ID(cont); - cont.Strm.seekg((int32_t)TOC_Offset); - - I32 Entry_Count(cont); - + cont.Strm.seekg((int32_t)TOC_Offset); + + I32 Entry_Count(cont); + TocEntries.resize(Entry_Count); - for (std::vector::iterator i = TocEntries.begin(); i != TocEntries.end(); ++i) - i->read(cont); - - return TocEntries; - + for (std::vector::iterator i = TocEntries.begin(); i != TocEntries.end(); ++i) { + i->read(cont); + } + return TocEntries; } void JtReader::readLodSegment(const TOC_Entry& toc, LodHandler& /*handler*/) { - std::ifstream strm; - strm.open(_fileName, ios::binary); + std::ifstream strm; + strm.open(_fileName, ios::binary); - if (!strm) throw "cannot open file"; + if (!strm) { + throw "cannot open file"; + } - strm.seekg((int32_t)toc.Segment_Offset); + strm.seekg((int32_t)toc.Segment_Offset); - Context cont(strm); + Context cont(strm); - - // check if called with the right Toc - assert(toc.getSegmentType() == 7); - // read the segment header - Segment_Header header(cont); + // check if called with the right Toc + assert(toc.getSegmentType() == 7); - // read the non zip Element header - Element_Header eHeader(cont, false); + // read the segment header + Segment_Header header(cont); - if ( eHeader.Object_Type_ID != TriStripSetShapeLODElement_ID) - return; + // read the non zip Element header + Element_Header eHeader(cont, false); - + if (eHeader.Object_Type_ID != TriStripSetShapeLODElement_ID) { + return; + } } diff --git a/src/Mod/JtReader/App/JrJt/JtReader.h b/src/Mod/JtReader/App/JrJt/JtReader.h index 04b8893a56..bae66c8301 100644 --- a/src/Mod/JtReader/App/JrJt/JtReader.h +++ b/src/Mod/JtReader/App/JrJt/JtReader.h @@ -1,33 +1,30 @@ #pragma once +#include "TOC_Entry.h" #include #include -#include "TOC_Entry.h" class LodHandler; - class JtReader { public: - JtReader(); - ~JtReader(); + JtReader(); + ~JtReader(); - void setFile(const std::string fileName); + void setFile(const std::string fileName); - const std::vector& readToc(); + const std::vector& readToc(); - void readSegment(int tocIndex); + void readSegment(int tocIndex); - void readLodSegment(const TOC_Entry&, LodHandler&); + void readLodSegment(const TOC_Entry&, LodHandler&); - static const GUID TriStripSetShapeLODElement_ID; + static const GUID TriStripSetShapeLODElement_ID; protected: - std::string _fileName; - vector TocEntries; - + std::string _fileName; + vector TocEntries; }; - diff --git a/src/Mod/JtReader/App/JrJt/LodHandler.h b/src/Mod/JtReader/App/JrJt/LodHandler.h index c61c2d5d3c..fcdd9942ca 100644 --- a/src/Mod/JtReader/App/JrJt/LodHandler.h +++ b/src/Mod/JtReader/App/JrJt/LodHandler.h @@ -1,41 +1,34 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef LodHandler_HEADER #define LodHandler_HEADER - class LodHandler { public: - virtual void startLod(){}; - - - + virtual void startLod() {}; }; - #endif - - diff --git a/src/Mod/JtReader/App/JrJt/Segment_Header.h b/src/Mod/JtReader/App/JrJt/Segment_Header.h index bde3d139df..e996a4b2d1 100644 --- a/src/Mod/JtReader/App/JrJt/Segment_Header.h +++ b/src/Mod/JtReader/App/JrJt/Segment_Header.h @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef Segment_Header_HEADER #define Segment_Header_HEADER @@ -28,10 +28,9 @@ #include "Context.h" #include "GUID.h" +#include "I32.h" #include "U16.h" #include "U32.h" -#include "I32.h" - using namespace std; @@ -39,7 +38,7 @@ using namespace std; struct Segment_Header { - Segment_Header(){}; + Segment_Header() {}; Segment_Header(Context& cont) { @@ -54,15 +53,9 @@ struct Segment_Header }; GUID Segment_ID; - I32 Segment_Type; - I32 Segment_Length; - - + I32 Segment_Type; + I32 Segment_Length; }; - #endif - - - diff --git a/src/Mod/JtReader/App/JrJt/TOC_Entry.h b/src/Mod/JtReader/App/JrJt/TOC_Entry.h index 73f9f0e985..9ce22f126f 100644 --- a/src/Mod/JtReader/App/JrJt/TOC_Entry.h +++ b/src/Mod/JtReader/App/JrJt/TOC_Entry.h @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef TOC_Entry_HEADER #define TOC_Entry_HEADER @@ -28,10 +28,9 @@ #include "Context.h" #include "GUID.h" +#include "I32.h" #include "U16.h" #include "U32.h" -#include "I32.h" - using namespace std; @@ -39,7 +38,7 @@ using namespace std; struct TOC_Entry { - TOC_Entry(){}; + TOC_Entry() {}; TOC_Entry(Context& cont) { @@ -54,26 +53,25 @@ struct TOC_Entry Segment_Attributes.read(cont); }; - uint8_t getSegmentType()const + uint8_t getSegmentType() const { return Segment_Attributes >> 24; } - std::string toString()const{ + std::string toString() const + { stringstream strm; - strm << getSegmentType() << ":" << Segment_Offset << ":" << Segment_Length << ":" << Segment_ID.toString(); + strm << getSegmentType() << ":" << Segment_Offset << ":" << Segment_Length << ":" + << Segment_ID.toString(); return strm.str(); } GUID Segment_ID; - I32 Segment_Offset; - I32 Segment_Length; - U32 Segment_Attributes; - - + I32 Segment_Offset; + I32 Segment_Length; + U32 Segment_Attributes; }; - -#endif \ No newline at end of file +#endif diff --git a/src/Mod/JtReader/App/JrJt/U16.h b/src/Mod/JtReader/App/JrJt/U16.h index 3bb5488e1c..433ca8fde5 100644 --- a/src/Mod/JtReader/App/JrJt/U16.h +++ b/src/Mod/JtReader/App/JrJt/U16.h @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef U16_HEADER #define U16_HEADER @@ -30,9 +30,11 @@ using namespace std; struct U16 { - U16(){}; + U16() {}; - U16(uint16_t ui) :_U16(ui){} + U16(uint16_t ui) + : _U16(ui) + {} U16(Context& cont) { @@ -53,5 +55,4 @@ struct U16 }; - -#endif \ No newline at end of file +#endif diff --git a/src/Mod/JtReader/App/JrJt/U32.h b/src/Mod/JtReader/App/JrJt/U32.h index ccf258d724..908f928367 100644 --- a/src/Mod/JtReader/App/JrJt/U32.h +++ b/src/Mod/JtReader/App/JrJt/U32.h @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef U32_HEADER #define U32_HEADER @@ -30,9 +30,11 @@ using namespace std; struct U32 { - U32(){}; + U32() {}; - U32(uint32_t ui) :_U32(ui){} + U32(uint32_t ui) + : _U32(ui) + {} U32(Context& cont) { @@ -53,6 +55,4 @@ struct U32 }; - - -#endif \ No newline at end of file +#endif diff --git a/src/Mod/JtReader/App/JrJt/U8.h b/src/Mod/JtReader/App/JrJt/U8.h index a6131565c0..8bd41428aa 100644 --- a/src/Mod/JtReader/App/JrJt/U8.h +++ b/src/Mod/JtReader/App/JrJt/U8.h @@ -1,39 +1,41 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef U8_HEADER #define U8_HEADER +#include "Context.h" #include #include -#include "Context.h" using namespace std; struct U8 { - U8(){}; + U8() {}; - U8(uint8_t ui) :_U8(ui){} + U8(uint8_t ui) + : _U8(ui) + {} U8(Context& cont) { @@ -51,9 +53,8 @@ struct U8 } - uint8_t _U8; }; -#endif \ No newline at end of file +#endif diff --git a/src/Mod/JtReader/App/JrJt/UChar.h b/src/Mod/JtReader/App/JrJt/UChar.h index 32831bf1a9..4e82475113 100644 --- a/src/Mod/JtReader/App/JrJt/UChar.h +++ b/src/Mod/JtReader/App/JrJt/UChar.h @@ -1,37 +1,37 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #ifndef UChar_HEADER #define UChar_HEADER +#include "Context.h" #include #include -#include "Context.h" using namespace std; struct UChar { - UChar(){}; + UChar() {}; UChar(Context& cont) { @@ -52,5 +52,4 @@ struct UChar }; - -#endif \ No newline at end of file +#endif diff --git a/src/Mod/JtReader/App/JtReader.cpp b/src/Mod/JtReader/App/JtReader.cpp index 70e2df2c9f..72d2930ad3 100644 --- a/src/Mod/JtReader/App/JtReader.cpp +++ b/src/Mod/JtReader/App/JtReader.cpp @@ -7,19 +7,19 @@ #ifndef _PreComp_ #include #include -#include #include +#include #endif -#include #include +#include #include #include using std::string; -using std::vector; using std::strstream; +using std::vector; #include "JtReader.h" @@ -32,697 +32,647 @@ vector result; vector::const_iterator resultIt; -#define indent(i) {for(int l=0; l < i; l++) InfoOut << " ";} +#define indent(i) \ + { \ + for (int l = 0; l < i; l++) \ + InfoOut << " "; \ + } -void printXform(JtkTransform *partXform, int level) +void printXform(JtkTransform* partXform, int level) { - float *elements= NULL; + float* elements = NULL; - indent(level); - InfoOut << "JtkTRANSFORM\n"; + indent(level); + InfoOut << "JtkTRANSFORM\n"; - partXform->getTElements(elements); - if( elements ) - { - indent(level+1); - InfoOut << elements[0] << ", " << elements[1] << ", " - << elements[2] << ", " << elements[3] << "\n"; - indent(level+1); - InfoOut << elements[4] << ", " << elements[5] << ", " - << elements[6] << ", " << elements[7] << "\n"; - indent(level+1); - InfoOut << elements[8] << ", " << elements[9] << ", " - << elements[10] << ", " << elements[11] << "\n"; - indent(level+1); - InfoOut << elements[12] << ", " << elements[13] << ", " - << elements[14] << ", " << elements[15] << "\n"; + partXform->getTElements(elements); + if (elements) { + indent(level + 1); + InfoOut << elements[0] << ", " << elements[1] << ", " << elements[2] << ", " << elements[3] + << "\n"; + indent(level + 1); + InfoOut << elements[4] << ", " << elements[5] << ", " << elements[6] << ", " << elements[7] + << "\n"; + indent(level + 1); + InfoOut << elements[8] << ", " << elements[9] << ", " << elements[10] << ", " + << elements[11] << "\n"; + indent(level + 1); + InfoOut << elements[12] << ", " << elements[13] << ", " << elements[14] << ", " + << elements[15] << "\n"; #ifdef _DEBUG - JtkEntityFactory::deleteMemory( elements ); + JtkEntityFactory::deleteMemory(elements); #else - delete [] elements; + delete[] elements; #endif - } + } } -void printMaterial(JtkMaterial *partMaterial, int level) +void printMaterial(JtkMaterial* partMaterial, int level) { - float *ambient= NULL, - *diffuse= NULL, - *specular= NULL, - *emission= NULL, - shininess= -999.0; + float *ambient = NULL, *diffuse = NULL, *specular = NULL, *emission = NULL, shininess = -999.0; - indent(level); - InfoOut << "JtkMATERIAL\n"; + indent(level); + InfoOut << "JtkMATERIAL\n"; - partMaterial->getAmbientColor(ambient); - if( ambient ) - { - indent(level+1); - InfoOut << "ambient = ( " << ambient[0] << ", " << ambient[1] << ", " - << ambient[2] << ", " << ambient[3] << " )\n"; + partMaterial->getAmbientColor(ambient); + if (ambient) { + indent(level + 1); + InfoOut << "ambient = ( " << ambient[0] << ", " << ambient[1] << ", " << ambient[2] << ", " + << ambient[3] << " )\n"; #ifdef _DEBUG - JtkEntityFactory::deleteMemory( ambient ); + JtkEntityFactory::deleteMemory(ambient); #else - delete [] ambient; + delete[] ambient; #endif - } + } - partMaterial->getDiffuseColor(diffuse); - if( diffuse ) - { - indent(level+1); - InfoOut << "diffuse = ( " << diffuse[0] << ", " << diffuse[1] << ", " - << diffuse[2] << ", " << diffuse[3] << " )\n"; + partMaterial->getDiffuseColor(diffuse); + if (diffuse) { + indent(level + 1); + InfoOut << "diffuse = ( " << diffuse[0] << ", " << diffuse[1] << ", " << diffuse[2] << ", " + << diffuse[3] << " )\n"; #ifdef _DEBUG - JtkEntityFactory::deleteMemory( diffuse ); + JtkEntityFactory::deleteMemory(diffuse); #else - delete [] diffuse; + delete[] diffuse; #endif - } + } - partMaterial->getSpecularColor(specular); - if( specular ) - { - indent(level+1); - InfoOut << "specular = ( " << specular[0] << ", " << specular[1] << ", " - << specular[2] << ", " << specular[3] << " )\n"; + partMaterial->getSpecularColor(specular); + if (specular) { + indent(level + 1); + InfoOut << "specular = ( " << specular[0] << ", " << specular[1] << ", " << specular[2] + << ", " << specular[3] << " )\n"; #ifdef _DEBUG - JtkEntityFactory::deleteMemory( specular ); + JtkEntityFactory::deleteMemory(specular); #else - delete [] specular; + delete[] specular; #endif - } + } - partMaterial->getEmissionColor(emission); - if( emission ) - { - indent(level+1); - InfoOut << "emission = ( " << emission[0] << ", " << emission[1] << ", " - << emission[2] << ", " << emission[3] << " )\n"; + partMaterial->getEmissionColor(emission); + if (emission) { + indent(level + 1); + InfoOut << "emission = ( " << emission[0] << ", " << emission[1] << ", " << emission[2] + << ", " << emission[3] << " )\n"; #ifdef _DEBUG - JtkEntityFactory::deleteMemory( emission ); + JtkEntityFactory::deleteMemory(emission); #else - delete [] emission; + delete[] emission; #endif - } + } - partMaterial->getShininess(shininess); - if( shininess != -999.0 ) - { - indent(level+1); - InfoOut << "shininess = " << shininess << "\n"; - } + partMaterial->getShininess(shininess); + if (shininess != -999.0) { + indent(level + 1); + InfoOut << "shininess = " << shininess << "\n"; + } } -void printBrep(JtkBrep *partBrep, int level) +void printBrep(JtkBrep* partBrep, int level) { - indent(level); - InfoOut << "JtkBREP\n"; + indent(level); + InfoOut << "JtkBREP\n"; } -void printWrep(JtkWrep *partWrep, int level) +void printWrep(JtkWrep* partWrep, int level) { - indent(level); - InfoOut << "JtkWREP\n"; + indent(level); + InfoOut << "JtkWREP\n"; } -void printShape(JtkShape *partShape, int level) +void printShape(JtkShape* partShape, int level) { - indent(level); - InfoOut << "JtkSHAPE\n"; + indent(level); + InfoOut << "JtkSHAPE\n"; - for(int set=0; set < partShape->numOfSets(); set++) - { - indent(level+1); - InfoOut << "geom set #" << set << ":\n"; + for (int set = 0; set < partShape->numOfSets(); set++) { + indent(level + 1); + InfoOut << "geom set #" << set << ":\n"; - float *vertex= NULL, - *normal= NULL, - *color= NULL, - *texture= NULL; - int vertexCount= -1, - normCount= -1, - colorCount= -1, - textCount= -1; + float *vertex = NULL, *normal = NULL, *color = NULL, *texture = NULL; + int vertexCount = -1, normCount = -1, colorCount = -1, textCount = -1; - partShape->getInternal(vertex, vertexCount, normal, normCount, - color, colorCount, texture, textCount, set); + partShape->getInternal(vertex, + vertexCount, + normal, + normCount, + color, + colorCount, + texture, + textCount, + set); - if( vertex && (vertexCount > 0) ) - { - indent(level+2); - InfoOut << "vertices = ( "; + if (vertex && (vertexCount > 0)) { + indent(level + 2); + InfoOut << "vertices = ( "; - for(int elems=0; elems < vertexCount*3; elems++) - { - InfoOut << ((elems != 0) ? ", " : "") << vertex[elems]; - } + for (int elems = 0; elems < vertexCount * 3; elems++) { + InfoOut << ((elems != 0) ? ", " : "") << vertex[elems]; + } - InfoOut << " )\n"; + InfoOut << " )\n"; #ifdef _DEBUG - JtkEntityFactory::deleteMemory( vertex ); + JtkEntityFactory::deleteMemory(vertex); #else - delete [] vertex; + delete[] vertex; #endif - } - - if( normal && (normCount > 0) ) - { - indent(level+2); - InfoOut << "normals = ( "; - - for(int elems=0; elems < normCount*3; elems++) - { - InfoOut << ((elems != 0) ? ", " : "") << normal[elems]; - } - - InfoOut << " )\n"; - -#ifdef _DEBUG - JtkEntityFactory::deleteMemory( normal ); -#else - delete [] normal; -#endif - } - - if( color && (colorCount > 0) ) - { - indent(level+2); - InfoOut << "color = ( "; - - for(int elems=0; elems < colorCount*3; elems++) - { - InfoOut << ((elems != 0) ? ", " : "") << color[elems]; - } - - InfoOut << " )\n"; - -#ifdef _DEBUG - JtkEntityFactory::deleteMemory( color ); -#else - delete [] color; -#endif - } - - if( texture && (textCount > 0) ) - { - indent(level+2); - InfoOut << "texture = ( "; - - for(int elems=0; elems < textCount; elems++) - { - InfoOut << ((elems != 0) ? ", " : "") << texture[elems]; - } - - InfoOut << " )\n"; - -#ifdef _DEBUG - JtkEntityFactory::deleteMemory( texture ); -#else - delete [] texture; -#endif - } - } -} - -int myPreactionCB_PrintName(JtkHierarchy *CurrNode, int level, JtkClientData*) -{ - indent(level); - - my_level++; - - switch (CurrNode->typeID()) - { - case JtkEntity::JtkNONE: - InfoOut << "JtkNONE\n"; - break; - - case JtkEntity::JtkBREP: - InfoOut << "JtkBREP\n"; - break; - - case JtkEntity::JtkREGION: - InfoOut << "JtkREGION\n"; - break; - - case JtkEntity::JtkSHELL: - InfoOut << "JtkSHELL\n"; - break; - - case JtkEntity::JtkLOOP: - InfoOut << "JtkLOOP\n"; - break; - - case JtkEntity::JtkCOEDGE: - InfoOut << "JtkCOEDGE\n"; - break; - - case JtkEntity::JtkEDGE: - InfoOut << "JtkEDGE\n"; - break; - - case JtkEntity::JtkVERTEX: - InfoOut << "JtkVERTEX\n"; - break; - - case JtkEntity::JtkNURBSSURFACE: - InfoOut << "JtkNURBSSURFACE\n"; - break; - - case JtkEntity::JtkUVCURVE: - InfoOut << "JtkUVCURVE\n"; - break; - - case JtkEntity::JtkXYZCURVE: - InfoOut << "JtkXYZCURVE\n"; - break; - - case JtkEntity::JtkTRISTRIPSET: - InfoOut << "JtkTRISTRIPSET\n"; - break; - - case JtkEntity::JtkPOINTSET: - InfoOut << "JtkPOINTSET\n"; - break; - - case JtkEntity::JtkLINESTRIPSET: - InfoOut << "JtkLINESTRIPSET\n"; - break; - - case JtkEntity::JtkPOLYGONSET: - InfoOut << "JtkPOLYGONSET\n"; - break; - - case JtkEntity::JtkPOINT: - InfoOut << "JtkPOINT\n"; - break; - - case JtkEntity::JtkMATERIAL: - InfoOut << "JtkMATERIAL\n"; - break; - - case JtkEntity::JtkTRANSFORM: - InfoOut << "JtkTRANSFORM\n"; - break; - - case JtkEntity::JtkPROPERTY: - InfoOut << "JtkPROPERTY\n"; - break; - - case JtkEntity::JtkPART: - { - InfoOut << "JtkPART: "; - InfoOut << CurrNode->name() << "\n"; - - if( want_details ) - { - JtkTransform *partXform= NULL; - ((JtkPart*) CurrNode)->getTransform(partXform); - if( partXform ) - { - printXform(partXform, level+1); - } - - JtkMaterial *partMaterial= NULL; - ((JtkPart*) CurrNode)->getMaterial(partMaterial); - if( partMaterial ) - { - printMaterial(partMaterial, level+1); - } - - JtkBrep *partBrep= NULL; - ((JtkPart*) CurrNode)->getBrep(partBrep); - if( partBrep ) - { - printBrep(partBrep, level+1); - } - - JtkWrep *partWrep= NULL; - ((JtkPart*) CurrNode)->getWrep(partWrep); - if( partWrep ) - { - printWrep(partWrep, level+1); - } - - int partNumShapeLODs= -1; - partNumShapeLODs= ((JtkPart*) CurrNode)->numPolyLODs(); - for(int lod=0; lod < partNumShapeLODs; lod++) - { - indent(level+1); - InfoOut << "LOD#" << lod << ":\n"; - - int partNumShapes= -1; - partNumShapes= ((JtkPart*) CurrNode)->numPolyShapes(lod); - for(int shNum=0; shNum < partNumShapes; shNum++) - { - indent(level+2); - InfoOut << "Shape#" << shNum << ":\n"; - - JtkShape *partShape= NULL; - ((JtkPart*) CurrNode)->getPolyShape(partShape, lod, shNum); - if( partShape ) - { - printShape(partShape, level+3); - } - } - } - } - } - break; - - case JtkEntity::JtkASSEMBLY: - { - InfoOut << "JtkASSEMBLY: "; - InfoOut << CurrNode->name() << "(" - << ((JtkAssembly*) CurrNode)->numChildren() - << " children)\n"; - - if( want_details ) - { - JtkTransform *partXform= NULL; - ((JtkPart*) CurrNode)->getTransform(partXform); - if( partXform ) - { - printXform(partXform, level+1); - } - - JtkMaterial *partMaterial= NULL; - ((JtkPart*) CurrNode)->getMaterial(partMaterial); - if( partMaterial ) - { - printMaterial(partMaterial, level+1); - } - } - } - break; - - case JtkEntity::JtkINSTANCE: - { - InfoOut << "JtkINSTANCE: "; - InfoOut << CurrNode->name() << "\n"; - - if( want_details ) - { - JtkTransform *partXform= NULL; - ((JtkPart*) CurrNode)->getTransform(partXform); - if( partXform ) - { - printXform(partXform, level+1); - } - - JtkMaterial *partMaterial= NULL; - ((JtkPart*) CurrNode)->getMaterial(partMaterial); - if( partMaterial ) - { - printMaterial(partMaterial, level+1); - } - } - } - break; - - - case JtkEntity::JtkCLIENTDATA: - InfoOut << "JtkCLIENTDATA\n"; - break; - - case JtkEntity::JtkWIRE: - InfoOut << "JtkWIRE\n"; - break; - } - - return( Jtk_OK ); -} - -void insertShapeFaces(JtkShape *partShape) -{ - for(int set=0; set < partShape->numOfSets(); set++) - { - float *vertex= NULL, - *normal= NULL, - *color= NULL, - *texture= NULL; - int vertexCount= -1, - normCount= -1, - colorCount= -1, - textCount= -1; - - partShape->getInternal(vertex, vertexCount, normal, normCount, color, colorCount, texture, textCount, set); - - if(normCount < 3) - return; - - - if( vertex && (vertexCount > 0) && normal && (normCount > 0) ) - { - for(int i = 0 ; i< vertexCount-2; i++) - { - SimpleMeshFacet temp; - temp.n[0] = normal[i*3+0]; - temp.n[1] = normal[i*3+1]; - temp.n[2] = normal[i*3+2]; - temp.p1[0]= vertex[i*3+0]; - temp.p1[1]= vertex[i*3+1]; - temp.p1[2]= vertex[i*3+2]; - temp.p2[0]= vertex[i*3+3]; - temp.p2[1]= vertex[i*3+4]; - temp.p2[2]= vertex[i*3+5]; - temp.p3[0]= vertex[i*3+6]; - temp.p3[1]= vertex[i*3+7]; - temp.p3[2]= vertex[i*3+8]; - - result.push_back(temp); -/* - file << " facet normal "<< normal[i*3+0] << " " << normal[i*3+1] << " " << normal[i*3+2] << " " << endl; - file << " outer loop" << endl; - file << " vertex " << vertex[i*3+0] << " " << vertex[i*3+1] << " " << vertex[i*3+2] << " " << endl; - file << " vertex " << vertex[i*3+3] << " " << vertex[i*3+4] << " " << vertex[i*3+5] << " " << endl; - file << " vertex " << vertex[i*3+6] << " " << vertex[i*3+7] << " " << vertex[i*3+8] << " " << endl; - file << " endloop" << endl; - file << " endfacet" << endl; -*/ - } - } -#ifdef _DEBUG - if (vertex) JtkEntityFactory::deleteMemory( vertex ); - if (vertex) JtkEntityFactory::deleteMemory( normal ); - if (color) JtkEntityFactory::deleteMemory( color ); - if (texture) JtkEntityFactory::deleteMemory( texture ); -#else - if (vertex) delete [] vertex; - if (vertex) delete [] normal; - if (color) delete [] color; - if (texture)delete [] texture; -#endif - - } + if (normal && (normCount > 0)) { + indent(level + 2); + InfoOut << "normals = ( "; + for (int elems = 0; elems < normCount * 3; elems++) { + InfoOut << ((elems != 0) ? ", " : "") << normal[elems]; + } + + InfoOut << " )\n"; + +#ifdef _DEBUG + JtkEntityFactory::deleteMemory(normal); +#else + delete[] normal; +#endif + } + + if (color && (colorCount > 0)) { + indent(level + 2); + InfoOut << "color = ( "; + + for (int elems = 0; elems < colorCount * 3; elems++) { + InfoOut << ((elems != 0) ? ", " : "") << color[elems]; + } + + InfoOut << " )\n"; + +#ifdef _DEBUG + JtkEntityFactory::deleteMemory(color); +#else + delete[] color; +#endif + } + + if (texture && (textCount > 0)) { + indent(level + 2); + InfoOut << "texture = ( "; + + for (int elems = 0; elems < textCount; elems++) { + InfoOut << ((elems != 0) ? ", " : "") << texture[elems]; + } + + InfoOut << " )\n"; + +#ifdef _DEBUG + JtkEntityFactory::deleteMemory(texture); +#else + delete[] texture; +#endif + } + } +} + +int myPreactionCB_PrintName(JtkHierarchy* CurrNode, int level, JtkClientData*) +{ + indent(level); + + my_level++; + + switch (CurrNode->typeID()) { + case JtkEntity::JtkNONE: + InfoOut << "JtkNONE\n"; + break; + + case JtkEntity::JtkBREP: + InfoOut << "JtkBREP\n"; + break; + + case JtkEntity::JtkREGION: + InfoOut << "JtkREGION\n"; + break; + + case JtkEntity::JtkSHELL: + InfoOut << "JtkSHELL\n"; + break; + + case JtkEntity::JtkLOOP: + InfoOut << "JtkLOOP\n"; + break; + + case JtkEntity::JtkCOEDGE: + InfoOut << "JtkCOEDGE\n"; + break; + + case JtkEntity::JtkEDGE: + InfoOut << "JtkEDGE\n"; + break; + + case JtkEntity::JtkVERTEX: + InfoOut << "JtkVERTEX\n"; + break; + + case JtkEntity::JtkNURBSSURFACE: + InfoOut << "JtkNURBSSURFACE\n"; + break; + + case JtkEntity::JtkUVCURVE: + InfoOut << "JtkUVCURVE\n"; + break; + + case JtkEntity::JtkXYZCURVE: + InfoOut << "JtkXYZCURVE\n"; + break; + + case JtkEntity::JtkTRISTRIPSET: + InfoOut << "JtkTRISTRIPSET\n"; + break; + + case JtkEntity::JtkPOINTSET: + InfoOut << "JtkPOINTSET\n"; + break; + + case JtkEntity::JtkLINESTRIPSET: + InfoOut << "JtkLINESTRIPSET\n"; + break; + + case JtkEntity::JtkPOLYGONSET: + InfoOut << "JtkPOLYGONSET\n"; + break; + + case JtkEntity::JtkPOINT: + InfoOut << "JtkPOINT\n"; + break; + + case JtkEntity::JtkMATERIAL: + InfoOut << "JtkMATERIAL\n"; + break; + + case JtkEntity::JtkTRANSFORM: + InfoOut << "JtkTRANSFORM\n"; + break; + + case JtkEntity::JtkPROPERTY: + InfoOut << "JtkPROPERTY\n"; + break; + + case JtkEntity::JtkPART: { + InfoOut << "JtkPART: "; + InfoOut << CurrNode->name() << "\n"; + + if (want_details) { + JtkTransform* partXform = NULL; + ((JtkPart*)CurrNode)->getTransform(partXform); + if (partXform) { + printXform(partXform, level + 1); + } + + JtkMaterial* partMaterial = NULL; + ((JtkPart*)CurrNode)->getMaterial(partMaterial); + if (partMaterial) { + printMaterial(partMaterial, level + 1); + } + + JtkBrep* partBrep = NULL; + ((JtkPart*)CurrNode)->getBrep(partBrep); + if (partBrep) { + printBrep(partBrep, level + 1); + } + + JtkWrep* partWrep = NULL; + ((JtkPart*)CurrNode)->getWrep(partWrep); + if (partWrep) { + printWrep(partWrep, level + 1); + } + + int partNumShapeLODs = -1; + partNumShapeLODs = ((JtkPart*)CurrNode)->numPolyLODs(); + for (int lod = 0; lod < partNumShapeLODs; lod++) { + indent(level + 1); + InfoOut << "LOD#" << lod << ":\n"; + + int partNumShapes = -1; + partNumShapes = ((JtkPart*)CurrNode)->numPolyShapes(lod); + for (int shNum = 0; shNum < partNumShapes; shNum++) { + indent(level + 2); + InfoOut << "Shape#" << shNum << ":\n"; + + JtkShape* partShape = NULL; + ((JtkPart*)CurrNode)->getPolyShape(partShape, lod, shNum); + if (partShape) { + printShape(partShape, level + 3); + } + } + } + } + } break; + + case JtkEntity::JtkASSEMBLY: { + InfoOut << "JtkASSEMBLY: "; + InfoOut << CurrNode->name() << "(" << ((JtkAssembly*)CurrNode)->numChildren() + << " children)\n"; + + if (want_details) { + JtkTransform* partXform = NULL; + ((JtkPart*)CurrNode)->getTransform(partXform); + if (partXform) { + printXform(partXform, level + 1); + } + + JtkMaterial* partMaterial = NULL; + ((JtkPart*)CurrNode)->getMaterial(partMaterial); + if (partMaterial) { + printMaterial(partMaterial, level + 1); + } + } + } break; + + case JtkEntity::JtkINSTANCE: { + InfoOut << "JtkINSTANCE: "; + InfoOut << CurrNode->name() << "\n"; + + if (want_details) { + JtkTransform* partXform = NULL; + ((JtkPart*)CurrNode)->getTransform(partXform); + if (partXform) { + printXform(partXform, level + 1); + } + + JtkMaterial* partMaterial = NULL; + ((JtkPart*)CurrNode)->getMaterial(partMaterial); + if (partMaterial) { + printMaterial(partMaterial, level + 1); + } + } + } break; + + + case JtkEntity::JtkCLIENTDATA: + InfoOut << "JtkCLIENTDATA\n"; + break; + + case JtkEntity::JtkWIRE: + InfoOut << "JtkWIRE\n"; + break; + } + + return (Jtk_OK); +} + +void insertShapeFaces(JtkShape* partShape) +{ + for (int set = 0; set < partShape->numOfSets(); set++) { + float *vertex = NULL, *normal = NULL, *color = NULL, *texture = NULL; + int vertexCount = -1, normCount = -1, colorCount = -1, textCount = -1; + + partShape->getInternal(vertex, + vertexCount, + normal, + normCount, + color, + colorCount, + texture, + textCount, + set); + + if (normCount < 3) { + return; + } + + + if (vertex && (vertexCount > 0) && normal && (normCount > 0)) { + for (int i = 0; i < vertexCount - 2; i++) { + SimpleMeshFacet temp; + temp.n[0] = normal[i * 3 + 0]; + temp.n[1] = normal[i * 3 + 1]; + temp.n[2] = normal[i * 3 + 2]; + temp.p1[0] = vertex[i * 3 + 0]; + temp.p1[1] = vertex[i * 3 + 1]; + temp.p1[2] = vertex[i * 3 + 2]; + temp.p2[0] = vertex[i * 3 + 3]; + temp.p2[1] = vertex[i * 3 + 4]; + temp.p2[2] = vertex[i * 3 + 5]; + temp.p3[0] = vertex[i * 3 + 6]; + temp.p3[1] = vertex[i * 3 + 7]; + temp.p3[2] = vertex[i * 3 + 8]; + + result.push_back(temp); + /* + file << " facet normal "<< normal[i*3+0] << " " << normal[i*3+1] << " " + << normal[i*3+2] << " " << endl; file << " outer loop" << endl; file << " + vertex " << vertex[i*3+0] << " " << vertex[i*3+1] << " " << vertex[i*3+2] << " " + << endl; file << " vertex " << vertex[i*3+3] << " " << vertex[i*3+4] << " " + << vertex[i*3+5] << " " << endl; file << " vertex " << vertex[i*3+6] << " " + << vertex[i*3+7] << " " << vertex[i*3+8] << " " << endl; file << " endloop" << + endl; file << " endfacet" << endl; + */ + } + } +#ifdef _DEBUG + if (vertex) { + JtkEntityFactory::deleteMemory(vertex); + } + if (vertex) { + JtkEntityFactory::deleteMemory(normal); + } + if (color) { + JtkEntityFactory::deleteMemory(color); + } + if (texture) { + JtkEntityFactory::deleteMemory(texture); + } +#else + if (vertex) { + delete[] vertex; + } + if (vertex) { + delete[] normal; + } + if (color) { + delete[] color; + } + if (texture) { + delete[] texture; + } +#endif + } } - -int myPreactionCB_CollectFacets(JtkHierarchy *CurrNode, int level, JtkClientData*) +int myPreactionCB_CollectFacets(JtkHierarchy* CurrNode, int level, JtkClientData*) { - switch (CurrNode->typeID()) - { + switch (CurrNode->typeID()) { + + case JtkEntity::JtkPART: { - case JtkEntity::JtkPART: - { - - { - JtkTransform *partXform= NULL; - ((JtkPart*) CurrNode)->getTransform(partXform); - if( partXform ) { - printXform(partXform, level+1); - } + JtkTransform* partXform = NULL; + ((JtkPart*)CurrNode)->getTransform(partXform); + if (partXform) { + printXform(partXform, level + 1); + } + + int partNumShapeLODs = -1; + partNumShapeLODs = ((JtkPart*)CurrNode)->numPolyLODs(); + for (int lod = 0; lod < partNumShapeLODs; lod++) { + indent(level + 1); + InfoOut << "LOD#" << lod << ":\n"; + + if (iLod != lod && iLod != -1) { + continue; + } + + int partNumShapes = -1; + partNumShapes = ((JtkPart*)CurrNode)->numPolyShapes(lod); + for (int shNum = 0; shNum < partNumShapes; shNum++) { + indent(level + 2); + InfoOut << "Shape#" << shNum << ":\n"; + + JtkShape* partShape = NULL; + ((JtkPart*)CurrNode)->getPolyShape(partShape, lod, shNum); + if (partShape) { + insertShapeFaces(partShape); + } + } + } + } + } break; + + case JtkEntity::JtkASSEMBLY: { + InfoOut << "JtkASSEMBLY: "; + InfoOut << CurrNode->name() << "(" << ((JtkAssembly*)CurrNode)->numChildren() + << " children)\n"; - int partNumShapeLODs= -1; - partNumShapeLODs= ((JtkPart*) CurrNode)->numPolyLODs(); - for(int lod=0; lod < partNumShapeLODs; lod++) { - indent(level+1); - InfoOut << "LOD#" << lod << ":\n"; - - if(iLod!=lod && iLod!=-1) - continue; - - int partNumShapes= -1; - partNumShapes= ((JtkPart*) CurrNode)->numPolyShapes(lod); - for(int shNum=0; shNum < partNumShapes; shNum++) - { - indent(level+2); - InfoOut << "Shape#" << shNum << ":\n"; - - JtkShape *partShape= NULL; - ((JtkPart*) CurrNode)->getPolyShape(partShape, lod, shNum); - if( partShape ) - { - insertShapeFaces(partShape); - } - } + JtkTransform* partXform = NULL; + ((JtkPart*)CurrNode)->getTransform(partXform); + if (partXform) {} } - } - } - break; + } break; - case JtkEntity::JtkASSEMBLY: - { - InfoOut << "JtkASSEMBLY: "; - InfoOut << CurrNode->name() << "(" - << ((JtkAssembly*) CurrNode)->numChildren() - << " children)\n"; - - { - JtkTransform *partXform= NULL; - ((JtkPart*) CurrNode)->getTransform(partXform); - if( partXform ) + case JtkEntity::JtkINSTANCE: { { - + JtkTransform* partXform = NULL; + ((JtkPart*)CurrNode)->getTransform(partXform); + if (partXform) {} } - - } - } - break; - - case JtkEntity::JtkINSTANCE: - { - { - JtkTransform *partXform= NULL; - ((JtkPart*) CurrNode)->getTransform(partXform); - if( partXform ) - { - - } - - } - } - break; - - } - return( Jtk_OK ); + } break; + } + return (Jtk_OK); } /* Interface functions */ void testLicence(void) { - // Try to create a JtkCADExporter to test for JT write/general licensing - JtkCADExporter *jtwriter = NULL; - jtwriter = JtkEntityFactory::createCADExporter(); - if( !jtwriter ) - { - cerr << "No export license found.\n"; - exit(1); - } - else - { - jtwriter->ref(); - jtwriter->unref(); - jtwriter = NULL; - } + // Try to create a JtkCADExporter to test for JT write/general licensing + JtkCADExporter* jtwriter = NULL; + jtwriter = JtkEntityFactory::createCADExporter(); + if (!jtwriter) { + cerr << "No export license found.\n"; + exit(1); + } + else { + jtwriter->ref(); + jtwriter->unref(); + jtwriter = NULL; + } - // Try to create a JtkCADImporter to test for JT read licensing - JtkCADImporter *jtreader = NULL; - jtreader = JtkEntityFactory::createCADImporter(); - if( !jtreader ) - { - cerr << "No import license found.\n"; - exit(1); - } - else - { - jtreader->ref(); - jtreader->unref(); - jtreader = NULL; - } + // Try to create a JtkCADImporter to test for JT read licensing + JtkCADImporter* jtreader = NULL; + jtreader = JtkEntityFactory::createCADImporter(); + if (!jtreader) { + cerr << "No import license found.\n"; + exit(1); + } + else { + jtreader->ref(); + jtreader->unref(); + jtreader = NULL; + } } void readFile(const char* FileName, int iLods) { - iLod = iLods; + iLod = iLods; - testLicence(); + testLicence(); - JtkCADImporter* importer= NULL; - importer= JtkEntityFactory::createCADImporter(); - if( importer ) - { - importer->ref(); - importer->setShapeLoadOption(JtkCADImporter::JtkALL_LODS); - importer->setBrepLoadOption(JtkCADImporter::JtkTESS_AND_BREP); - JtkHierarchy *root= NULL; + JtkCADImporter* importer = NULL; + importer = JtkEntityFactory::createCADImporter(); + if (importer) { + importer->ref(); + importer->setShapeLoadOption(JtkCADImporter::JtkALL_LODS); + importer->setBrepLoadOption(JtkCADImporter::JtkTESS_AND_BREP); + JtkHierarchy* root = NULL; - root= importer->import(FileName); + root = importer->import(FileName); - if( root ) { - root->ref(); - JtkTraverser* trav = JtkEntityFactory::createTraverser(); - trav->setupPreActionCallback(myPreactionCB_CollectFacets); - if( trav ) { - trav->ref(); - trav->traverseGraph(root); - trav->unref(); - trav = NULL; - } else { - throw "Unable to create JtkTraverser.\n"; + if (root) { + root->ref(); + JtkTraverser* trav = JtkEntityFactory::createTraverser(); + trav->setupPreActionCallback(myPreactionCB_CollectFacets); + if (trav) { + trav->ref(); + trav->traverseGraph(root); + trav->unref(); + trav = NULL; + } + else { + throw "Unable to create JtkTraverser.\n"; + } + + root->unref(); + root = NULL; + } + else { + throw "Unable in find root node. Check file...\n"; } - root->unref(); - root = NULL; - }else{ - throw "Unable in find root node. Check file...\n"; - } - - importer->unref(); - importer = NULL; + importer->unref(); + importer = NULL; } - else - { + else { throw "Unable to create JtkCADImporter. Check license...\n"; } - - // Uninitialize JtTk - //JtkEntityFactory::fini(); - + // Uninitialize JtTk + // JtkEntityFactory::fini(); } - - const SimpleMeshFacet* iterStart(void) { - resultIt = result.begin(); - if(resultIt != result.end()) - return &(*(resultIt)); - else - return 0; + resultIt = result.begin(); + if (resultIt != result.end()) { + return &(*(resultIt)); + } + else { + return 0; + } } const SimpleMeshFacet* iterGetNext(void) { - if(++resultIt != result.end()) - return &(*(resultIt)); - else - return 0; + if (++resultIt != result.end()) { + return &(*(resultIt)); + } + else { + return 0; + } } unsigned int iterSize(void) { - return (unsigned int) result.size(); + return (unsigned int)result.size(); } /** clears the internal structure */ void clearData(void) { - result.clear(); - resultIt = result.begin(); - InfoOut.clear(); - my_level = 0; + result.clear(); + resultIt = result.begin(); + InfoOut.clear(); + my_level = 0; } - diff --git a/src/Mod/JtReader/App/JtReader.h b/src/Mod/JtReader/App/JtReader.h index 65948ae3ce..07630b6e28 100644 --- a/src/Mod/JtReader/App/JtReader.h +++ b/src/Mod/JtReader/App/JtReader.h @@ -9,13 +9,14 @@ /** simple facet structure */ -struct SimpleMeshFacet { - float p1[3],p2[3],p3[3],n[3]; +struct SimpleMeshFacet +{ + float p1[3], p2[3], p3[3], n[3]; }; /** Reads a JT File an build up the internal data structure - * imports all the meshes of all Parts, recursing the Assamblies. - */ + * imports all the meshes of all Parts, recursing the Assamblies. + */ void readFile(const char* FileName, int iLods = 0); /** Write the read Part to a file */ @@ -33,4 +34,4 @@ unsigned int iterSize(void); /** clears the internal structure */ void clearData(void); -#endif // __JtReader_h__ \ No newline at end of file +#endif // __JtReader_h__ diff --git a/src/Mod/JtReader/App/PreCompiled.cpp b/src/Mod/JtReader/App/PreCompiled.cpp index 0b915d1b1b..af15487840 100644 --- a/src/Mod/JtReader/App/PreCompiled.cpp +++ b/src/Mod/JtReader/App/PreCompiled.cpp @@ -4,4 +4,4 @@ ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/JtReader/App/PreCompiled.h b/src/Mod/JtReader/App/PreCompiled.h index 69fd594b69..1132c3a4f6 100644 --- a/src/Mod/JtReader/App/PreCompiled.h +++ b/src/Mod/JtReader/App/PreCompiled.h @@ -11,11 +11,11 @@ // Importing of App classes #ifdef FC_OS_WIN32 -# define MeshExport __declspec(dllimport) -# define AppJtReaderExport __declspec(dllexport) -#else // for Linux -# define MeshExport -# define AppJtReaderExport +#define MeshExport __declspec(dllimport) +#define AppJtReaderExport __declspec(dllexport) +#else // for Linux +#define MeshExport +#define AppJtReaderExport #endif #ifdef _PreComp_ @@ -23,16 +23,16 @@ /// point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning( disable : 4251 ) -# pragma warning( disable : 4503 ) -# pragma warning( disable : 4275 ) -# pragma warning( disable : 4786 ) // specifier longer then 255 chars +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4275) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif // standard -#include #include +#include // STL #include @@ -51,6 +51,6 @@ // sys #include -#endif //_PreComp_ +#endif //_PreComp_ #endif diff --git a/src/Mod/JtReader/App/TestJtReader.cpp b/src/Mod/JtReader/App/TestJtReader.cpp index a06205764c..4a66f04a21 100644 --- a/src/Mod/JtReader/App/TestJtReader.cpp +++ b/src/Mod/JtReader/App/TestJtReader.cpp @@ -1,24 +1,24 @@ /************************************************************************** -* Copyright (c) 2014 Juergen Riegel * -* * -* This file is part of the FreeCAD CAx development system. * -* * -* This library is free software; you can redistribute it and/or * -* modify it under the terms of the GNU Library General Public * -* License as published by the Free Software Foundation; either * -* version 2 of the License, or (at your option) any later version. * -* * -* This library is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU Library General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this library; see the file COPYING.LIB. If not, * -* write to the Free Software Foundation, Inc., 59 Temple Place, * -* Suite 330, Boston, MA 02111-1307, USA * -* * -***************************************************************************/ + * Copyright (c) 2014 Juergen Riegel * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ #include "PreCompiled.h" #ifndef _PreComp_ @@ -28,39 +28,32 @@ #include #include -#include "TestJtReader.h" #include "FcLodHandler.h" +#include "TestJtReader.h" TestJtReader::TestJtReader() -{ -} +{} TestJtReader::~TestJtReader() -{ -} +{} void TestJtReader::read(void) { - //const std::vector& toc = readToc(); + // const std::vector& toc = readToc(); - for (std::vector::const_iterator i = TocEntries.begin(); i != TocEntries.end(); ++i){ + for (std::vector::const_iterator i = TocEntries.begin(); i != TocEntries.end(); + ++i) { int segType = i->getSegmentType(); - if (segType == 7){ + if (segType == 7) { FcLodHandler handler; readLodSegment(*i, handler); - - } Base::Console().Log(i->toString().c_str()); } - - - - } diff --git a/src/Mod/JtReader/App/TestJtReader.h b/src/Mod/JtReader/App/TestJtReader.h index 15addb7dd1..341776a8d0 100644 --- a/src/Mod/JtReader/App/TestJtReader.h +++ b/src/Mod/JtReader/App/TestJtReader.h @@ -9,11 +9,8 @@ class TestJtReader: public JtReader { public: - TestJtReader(); - ~TestJtReader(); - - void read(void); - + TestJtReader(); + ~TestJtReader(); + void read(void); }; - diff --git a/src/Mod/JtReader/Init.py b/src/Mod/JtReader/Init.py index 2d985feb40..cb44eff0af 100644 --- a/src/Mod/JtReader/Init.py +++ b/src/Mod/JtReader/Init.py @@ -2,4 +2,4 @@ # (c) 2007 Juergen Riegel LGPL # Append the open handler -FreeCAD.addImportType("JtOpen (*.jt)","JtReader") +FreeCAD.addImportType("JtOpen (*.jt)", "JtReader") diff --git a/src/Mod/JtReader/InitGui.py b/src/Mod/JtReader/InitGui.py index 826f9602a1..18f23f31b9 100644 --- a/src/Mod/JtReader/InitGui.py +++ b/src/Mod/JtReader/InitGui.py @@ -1,29 +1,28 @@ -#*************************************************************************** -#* Copyright (c) 2002,2003 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2002,2003 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** # JtReader gui init module # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up - diff --git a/src/Mod/Mesh/App/AppMeshPy.cpp b/src/Mod/Mesh/App/AppMeshPy.cpp index a157286215..2e01572cbc 100644 --- a/src/Mod/Mesh/App/AppMeshPy.cpp +++ b/src/Mod/Mesh/App/AppMeshPy.cpp @@ -211,6 +211,7 @@ private: auto fTolerance( hGrp->GetFloat("MaxDeviationExport", 0.1f) ); int exportAmfCompressed( hGrp->GetBool("ExportAmfCompressed", true) ); + bool export3mfModel( hGrp->GetBool("Export3mfModel", true) ); static const std::array kwList{"objectList", "filename", "tolerance", "exportAmfCompressed", nullptr}; @@ -261,6 +262,7 @@ private: else if (exportFormat == MeshIO::ThreeMF) { Extension3MFFactory::initialize(); exporter = std::make_unique(outputFileName, Extension3MFFactory::createExtensions()); + dynamic_cast(exporter.get())->setForceModel(export3mfModel); } else if (exportFormat != MeshIO::Undefined) { exporter = std::make_unique(outputFileName, exportFormat); diff --git a/src/Mod/Mesh/App/Core/Degeneration.cpp b/src/Mod/Mesh/App/Core/Degeneration.cpp index fa285267ee..033ad2beef 100644 --- a/src/Mod/Mesh/App/Core/Degeneration.cpp +++ b/src/Mod/Mesh/App/Core/Degeneration.cpp @@ -1118,7 +1118,7 @@ bool MeshEvalCorruptedFacets::Evaluate() const MeshFacetArray& rFaces = _rclMesh.GetFacets(); for (const auto & it : rFaces) { - // dupicated point indices + // duplicated point indices if (it.IsDegenerated()) return false; } diff --git a/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp b/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp index 4b799010ed..15c29286da 100644 --- a/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp +++ b/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp @@ -37,7 +37,6 @@ using namespace MeshCore; Writer3MF::Writer3MF(std::ostream &str) : zip(str) - , objectIndex(0) { zip.putNextEntry("3D/3dmodel.model"); Initialize(zip); @@ -45,12 +44,16 @@ Writer3MF::Writer3MF(std::ostream &str) Writer3MF::Writer3MF(const std::string &filename) : zip(filename) - , objectIndex(0) { zip.putNextEntry("3D/3dmodel.model"); Initialize(zip); } +void Writer3MF::SetForceModel(bool model) +{ + forceModel = model; +} + void Writer3MF::Initialize(std::ostream &str) { str << "\n" @@ -63,8 +66,9 @@ void Writer3MF::Finish(std::ostream &str) { str << Base::blanks(1) << "\n"; str << Base::blanks(1) << "\n"; - for (const auto& it : items) + for (const auto& it : items) { str << Base::blanks(2) << it; + } str << Base::blanks(1) << "\n"; str << "\n"; } @@ -87,13 +91,15 @@ bool Writer3MF::Save() zip.closeEntry(); zip.putNextEntry("_rels/.rels"); - if (!SaveRels(zip)) + if (!SaveRels(zip)) { return false; + } zip.closeEntry(); zip.putNextEntry("[Content_Types].xml"); - if (!SaveContent(zip)) + if (!SaveContent(zip)) { return false; + } zip.closeEntry(); for (const auto& it : resources) { zip.putNextEntry(it.fileNameInZip); @@ -106,11 +112,13 @@ bool Writer3MF::Save() bool Writer3MF::SaveObject(std::ostream &str, int id, const MeshKernel& mesh) const { + // NOLINTBEGIN(readability-magic-numbers, cppcoreguidelines-avoid-magic-numbers) const MeshPointArray& rPoints = mesh.GetPoints(); const MeshFacetArray& rFacets = mesh.GetFacets(); - if (!str || str.bad()) + if (!str || str.bad()) { return false; + } str << Base::blanks(2) << "\n"; str << Base::blanks(3) << "\n"; @@ -118,7 +126,7 @@ bool Writer3MF::SaveObject(std::ostream &str, int id, const MeshKernel& mesh) co // vertices str << Base::blanks(4) << "\n"; std::size_t index = 0; - for (MeshPointArray::_TConstIterator it = rPoints.begin(); it != rPoints.end(); ++it, ++index) { + for (auto it = rPoints.begin(); it != rPoints.end(); ++it, ++index) { str << Base::blanks(5) << "x << "\" y=\"" << it->y << "\" z=\"" << it->z @@ -138,16 +146,15 @@ bool Writer3MF::SaveObject(std::ostream &str, int id, const MeshKernel& mesh) co str << Base::blanks(3) << "\n"; str << Base::blanks(2) << "\n"; + // NOLINTEND(readability-magic-numbers, cppcoreguidelines-avoid-magic-numbers) return true; } std::string Writer3MF::GetType(const MeshKernel& mesh) const { - if (MeshEvalSolid(mesh).Evaluate()) - return "model"; - else - return "surface"; + bool isSolid = (forceModel || MeshEvalSolid(mesh).Evaluate()); + return isSolid ? "model" : "surface"; } void Writer3MF::SaveBuildItem(int id, const Base::Matrix4D& mat) @@ -157,8 +164,9 @@ void Writer3MF::SaveBuildItem(int id, const Base::Matrix4D& mat) items.push_back(str.str()); } -std::string Writer3MF::DumpMatrix(const Base::Matrix4D& mat) const +std::string Writer3MF::DumpMatrix(const Base::Matrix4D& mat) { + // NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic) // The matrix representation in the specs is the transposed version of Matrix4D // This means that for the 3x3 sub-matrix the indices must be swapped // @@ -170,18 +178,25 @@ std::string Writer3MF::DumpMatrix(const Base::Matrix4D& mat) const << mat[0][2] << " " << mat[1][2] << " " << mat[2][2] << " " << mat[0][3] << " " << mat[1][3] << " " << mat[2][3]; return str.str(); + // NOLINTEND(cppcoreguidelines-pro-bounds-pointer-arithmetic) } bool Writer3MF::SaveRels(std::ostream &str) const { + // NOLINTBEGIN(modernize-raw-string-literal) int ids = 1; str << "\n" << "\n" - << " \n"; - for (const auto& it : resources) - str << " \n"; + << " \n"; + for (const auto& it : resources) { + str << " \n"; + } str << "\n"; return true; + // NOLINTEND(modernize-raw-string-literal) } bool Writer3MF::SaveContent(std::ostream &str) const @@ -190,8 +205,10 @@ bool Writer3MF::SaveContent(std::ostream &str) const << "\n" << " \n" << " \n"; - for (const auto& it : resources) - str << " \n"; + for (const auto& it : resources) { + str << " \n"; + } str << ""; return true; } diff --git a/src/Mod/Mesh/App/Core/IO/Writer3MF.h b/src/Mod/Mesh/App/Core/IO/Writer3MF.h index 03b9a04a11..cb5f5df834 100644 --- a/src/Mod/Mesh/App/Core/IO/Writer3MF.h +++ b/src/Mod/Mesh/App/Core/IO/Writer3MF.h @@ -62,7 +62,12 @@ public: * \param filename */ explicit Writer3MF(const std::string &filename); - + /*! + * \brief SetForceModel + * Forcces to write the mesh as model even if itsn't a solid. + * \param model + */ + void SetForceModel(bool model); /*! * \brief Add a mesh object resource to the 3MF file. * \param mesh The mesh object to be written @@ -83,20 +88,21 @@ public: bool Save(); private: - void Initialize(std::ostream &str); + static void Initialize(std::ostream &str); void Finish(std::ostream &str); std::string GetType(const MeshKernel& mesh) const; void SaveBuildItem(int id, const Base::Matrix4D& mat); - std::string DumpMatrix(const Base::Matrix4D& mat) const; + static std::string DumpMatrix(const Base::Matrix4D& mat); bool SaveObject(std::ostream &str, int id, const MeshKernel& mesh) const; bool SaveRels(std::ostream &str) const; bool SaveContent(std::ostream &str) const; private: zipios::ZipOutputStream zip; - int objectIndex; + int objectIndex = 0; std::vector items; std::vector resources; + bool forceModel = true; }; } // namespace MeshCore diff --git a/src/Mod/Mesh/App/Exporter.cpp b/src/Mod/Mesh/App/Exporter.cpp index 86c3da6628..8ac2eb0655 100644 --- a/src/Mod/Mesh/App/Exporter.cpp +++ b/src/Mod/Mesh/App/Exporter.cpp @@ -300,6 +300,11 @@ bool Exporter3MF::addMesh(const char *name, const MeshObject & mesh) return ok; } +void Exporter3MF::setForceModel(bool model) +{ + d->writer3mf.SetForceModel(model); +} + void Exporter3MF::write() { d->writer3mf.Save(); diff --git a/src/Mod/Mesh/App/Exporter.h b/src/Mod/Mesh/App/Exporter.h index 64d817c266..fd42f9042e 100644 --- a/src/Mod/Mesh/App/Exporter.h +++ b/src/Mod/Mesh/App/Exporter.h @@ -187,6 +187,12 @@ public: ~Exporter3MF() override; bool addMesh(const char *name, const MeshObject & mesh) override; + /*! + * \brief SetForceModel + * Forcces to write the mesh as model even if itsn't a solid. + * \param model + */ + void setForceModel(bool model); private: /// Write the meshes of the added objects to the output file diff --git a/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui b/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui index d5af012028..457e6a931f 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui +++ b/src/Mod/Mesh/Gui/DlgSettingsImportExport.ui @@ -76,6 +76,25 @@ + + + + Always export mesh as model type in 3MF format even if not a solid + + + Export 3MF files as model type + + + true + + + Export3mfModel + + + Mod/Mesh + + + diff --git a/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp b/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp index ed085a17bb..76e3825f60 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp +++ b/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp @@ -53,6 +53,7 @@ void DlgSettingsImportExport::saveSettings() handle->SetFloat("MaxDeviationExport", value); ui->exportAmfCompressed->onSave(); + ui->export3mfModel->onSave(); ParameterGrp::handle asy = handle->GetGroup("Asymptote"); asy->SetASCII("Width", ui->asymptoteWidth->text().toLatin1()); @@ -71,6 +72,7 @@ void DlgSettingsImportExport::loadSettings() ui->maxDeviationExport->setValue(value); ui->exportAmfCompressed->onRestore(); + ui->export3mfModel->onRestore(); ParameterGrp::handle asy = handle->GetGroup("Asymptote"); ui->asymptoteWidth->setText(QString::fromStdString(asy->GetASCII("Width"))); diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh.ts index 0d3924e9d3..b8db5c2d38 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh.ts @@ -1346,12 +1346,22 @@ - + + Always export mesh as model type in 3MF format even if not a solid + + + + + Export 3MF files as model type + + + + Width: - + Height: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts index 1c2a81a4d9..ad76a0fbb3 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts @@ -25,7 +25,7 @@ Mesh - Паліганальная сетка + Mesh @@ -650,7 +650,7 @@ Mesh - Mesh + Паліганальная сетка @@ -1346,12 +1346,22 @@ Экспартаваць сціснутыя файлы AMF - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Шырыня: - + Height: Вышыня: @@ -1367,7 +1377,7 @@ is used when writing a file in AMF format Mesh view - Прагляд паліганальнай сеткі + Выгляд паліганальнай сеткі diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts index ec909f86fc..90e4d174b9 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts @@ -1346,12 +1346,22 @@ Exporta fitxers AMF utilitzant la compressió - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Amplada: - + Height: Alçada: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts index bf98c4bcd7..6745b44bcd 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts @@ -1346,12 +1346,22 @@ Exportovat soubory AMF za použití komprese - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Šířka: - + Height: Výška: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts index f661ed4bc0..4f13b9c8e2 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts @@ -1346,12 +1346,22 @@ Export von AMF-Dateien mit Komprimierung - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Breite: - + Height: Höhe: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_el.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_el.ts index 0e988d8d3b..b40be3d35e 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_el.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_el.ts @@ -1346,12 +1346,22 @@ Εξαγωγή αρχείων AMF με τη χρήση συμπίεσης - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Πλάτος: - + Height: Ύψος: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts index 11b1e137e1..bca1b3c3e9 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts @@ -1346,12 +1346,22 @@ Exportar archivos AMF utilizando compresión - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Ancho: - + Height: Altura: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts index 750a06ca0d..7d7a18c5e7 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts @@ -1346,12 +1346,22 @@ Exportar archivos AMF utilizando compresión - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Ancho: - + Height: Altura: @@ -1855,7 +1865,7 @@ a una apariencia poco realista para superficies curvas mientras que si se usa el Sphere - Esfera + Esféra @@ -1989,7 +1999,7 @@ a una apariencia poco realista para superficies curvas mientras que si se usa el Delete - Borrar + Eliminar diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts index 5b180da876..3919c4511e 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts @@ -1346,12 +1346,22 @@ Esportatu AMF fitxategiak konpresioa erabiliz - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Zabalera: - + Height: Altuera: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts index c22952710f..65dd87c838 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts @@ -1346,12 +1346,22 @@ Vie AMF-tiedostot pakkaamista käyttäen - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Leveys: - + Height: Korkeus: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts index 4c36a868db..90610dd612 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts @@ -25,7 +25,7 @@ Mesh - Mesh + Maillage @@ -650,7 +650,7 @@ Mesh - Maillage + Mesh @@ -1346,12 +1346,22 @@ Exporter les fichiers AMF en utilisant la compression - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Largeur : - + Height: Hauteur : @@ -1824,7 +1834,7 @@ l'ombrage Phong conduit à un aspect plus lisse. Tolerance - Tolérance  + Tolérance @@ -1900,7 +1910,7 @@ l'ombrage Phong conduit à un aspect plus lisse. Tolerance - Tolérance + Tolérance  diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_gl.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_gl.ts index e3d223e734..d9b97cddac 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_gl.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_gl.ts @@ -1346,12 +1346,22 @@ Exportar ficheiros AMF empregando compresión - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Ancho: - + Height: Alto: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts index d1b6e35275..4aeebcb54b 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts @@ -1346,14 +1346,24 @@ Izvoz AMF datoteke pomoću kompresije - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Širina: - + Height: - Visina: + Duljina: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_hu.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_hu.ts index dc6118d637..9776db292f 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_hu.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_hu.ts @@ -1346,12 +1346,22 @@ AMF-fájlok exportálása tömörítéssel - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Szélesség: - + Height: Magasság: @@ -1990,7 +2000,7 @@ Ha a felület szöge ≥ gyűrődésszögét, a feület árnyékolást használj Delete - Törlés + Töröl diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_id.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_id.ts index e061df5e49..5bc1eedcf1 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_id.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_id.ts @@ -1346,12 +1346,22 @@ Ekspor file AMF menggunakan kompresi - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Lebar: - + Height: Tinggi: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_it.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_it.ts index b39bacab91..5168c38faf 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_it.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_it.ts @@ -1346,12 +1346,22 @@ Esporta i file AMF utilizzando la compressione - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Larghezza: - + Height: Altezza: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ja.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ja.ts index 04580672e6..fedd8a5694 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ja.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ja.ts @@ -1346,12 +1346,22 @@ 圧縮を使用してAMFファイルをエクスポート - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: 幅: - + Height: 高さ: @@ -1852,7 +1862,7 @@ to a smoother appearance. Sphere - 球体 + diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts index 287ce7733c..71b6ac6a13 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts @@ -25,7 +25,7 @@ Mesh - ბადე + Mesh @@ -650,7 +650,7 @@ Mesh - Mesh + ბადე @@ -1346,12 +1346,22 @@ AMF ფაილის გატანისას მისი შეკუმშვა - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: სიგანე: - + Height: სიმაღლე: @@ -1657,7 +1667,7 @@ to a smoother appearance. No selection - მონიშნული არაფერი არაა + არაფერია მონიშნული @@ -1899,7 +1909,7 @@ to a smoother appearance. Tolerance - სიზუსტე + დაშვება diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ko.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ko.ts index 7ad297842a..bdeba6ee0f 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ko.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ko.ts @@ -1346,12 +1346,22 @@ Export AMF files using compression - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: 너비: - + Height: 높이: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts index e3c2fa25fd..fb087110de 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts @@ -25,7 +25,7 @@ Mesh - Mesh + Mesh @@ -153,7 +153,7 @@ Mesh - Mesh + Mesh @@ -1347,12 +1347,22 @@ AMF-bestanden exporteren met behulp van compressie - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Breedte: - + Height: Hoogte: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts index 4ba616bdb4..600dfe871f 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts @@ -1346,12 +1346,22 @@ Eksport plików AMF z kompresją - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Szerokość: - + Height: Wysokość: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-BR.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-BR.ts index b3813fd227..2ae8355b23 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-BR.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-BR.ts @@ -1346,12 +1346,22 @@ Exportar arquivos AMF usando compressão - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Largura: - + Height: Altura: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-PT.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-PT.ts index dccbef4cb7..21ae0ea587 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-PT.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pt-PT.ts @@ -1346,12 +1346,22 @@ Exportar ficheiros AMF usando compressão - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Largura: - + Height: Altura: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ro.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ro.ts index 0054a9d68a..ca556008d6 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ro.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ro.ts @@ -1346,12 +1346,22 @@ Export fișiere AMF utilizând compresia - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Latime: - + Height: Inaltime: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts index d7da03bd6b..ee0eb06797 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts @@ -25,7 +25,7 @@ Mesh - Полигональная сетка + Сеть @@ -650,7 +650,7 @@ Mesh - Сеть + Полигональная сетка @@ -1346,12 +1346,22 @@ Экспорт AMF файлов со сжатием - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Ширина: - + Height: Высота: @@ -1655,7 +1665,7 @@ to a smoother appearance. No selection - Ничего не выбрано + Нет выбора @@ -1897,7 +1907,7 @@ to a smoother appearance. Tolerance - Точность + Допуск diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sl.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sl.ts index be1b6e2021..3d6a826197 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sl.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sl.ts @@ -25,7 +25,7 @@ Mesh - Ploskovje + Mesh @@ -650,7 +650,7 @@ Mesh - Mesh + Ploskovje @@ -1346,12 +1346,22 @@ Izvozi dadoteke AMF z uporabo kompresije - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Širina: - + Height: Višina: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts index 6760719af4..a777ea268b 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts @@ -1346,12 +1346,22 @@ Izvezi AMF datoteku koristeći kompresiju - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Širina: - + Height: Visina: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts index faab184661..158505669f 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts @@ -1346,12 +1346,22 @@ Извези AMF датотеку користећи компресију - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Ширина: - + Height: Висина: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sv-SE.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sv-SE.ts index 70b2a20266..fd21878a14 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sv-SE.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sv-SE.ts @@ -1346,12 +1346,22 @@ Exportera AMF-filer med komprimering - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Bredd: - + Height: Höjd: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_tr.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_tr.ts index b4efe581c1..0d4900ecd4 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_tr.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_tr.ts @@ -1348,12 +1348,22 @@ Sınırlamala Bilgisi... Sıkıştırmayı kullanarak AMF dosyalarını dışa aktarma - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Genişlik: - + Height: Yükseklik: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts index 45ea13b6ee..0a32be1c8e 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts @@ -1346,12 +1346,22 @@ Експорт AMF файлів із стисненням - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Ширина: - + Height: Висота: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts index 61c7fe4518..b161f63872 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts @@ -1346,12 +1346,22 @@ Exporta fitxers AMF utilitzant la compressió - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: Amplària: - + Height: Alçària: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-CN.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-CN.ts index 38cb1b0547..e3f8bb65f9 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-CN.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-CN.ts @@ -1346,12 +1346,22 @@ 导出压缩的 AMF 文件 - + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid + + + + Export 3MF files as model type + Export 3MF files as model type + + + Width: 宽度: - + Height: 高度: diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-TW.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-TW.ts index 85b59a55a6..c35a8acbea 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-TW.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_zh-TW.ts @@ -1346,14 +1346,24 @@ Export AMF files using compression - - Width: - 寬度: + + Always export mesh as model type in 3MF format even if not a solid + Always export mesh as model type in 3MF format even if not a solid - + + Export 3MF files as model type + Export 3MF files as model type + + + + Width: + 寬度: + + + Height: - 高度: + 高度: diff --git a/src/Mod/MeshPart/App/AppMeshPart.cpp b/src/Mod/MeshPart/App/AppMeshPart.cpp index 6483d22c43..1fb7b4d611 100644 --- a/src/Mod/MeshPart/App/AppMeshPart.cpp +++ b/src/Mod/MeshPart/App/AppMeshPart.cpp @@ -27,7 +27,8 @@ #include -namespace MeshPart { +namespace MeshPart +{ extern PyObject* initModule(); } @@ -37,9 +38,9 @@ PyMOD_INIT_FUNC(MeshPart) // load dependent module try { Base::Interpreter().loadModule("Part"); - //Base::Interpreter().loadModule("Mesh"); + // Base::Interpreter().loadModule("Mesh"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } diff --git a/src/Mod/MeshPart/App/AppMeshPartPy.cpp b/src/Mod/MeshPart/App/AppMeshPartPy.cpp index 6d9b707955..4215369f0c 100644 --- a/src/Mod/MeshPart/App/AppMeshPartPy.cpp +++ b/src/Mod/MeshPart/App/AppMeshPartPy.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -33,17 +33,18 @@ #include #include #include +#include +#include +#include #include #include #include -#include -#include -#include #include "MeshAlgos.h" #include "Mesher.h" +// clang-format off namespace MeshPart { class Module : public Py::ExtensionModule { @@ -639,3 +640,4 @@ PyObject* initModule() } } // namespace MeshPart +// clang-format on diff --git a/src/Mod/MeshPart/App/CurveProjector.cpp b/src/Mod/MeshPart/App/CurveProjector.cpp index 71742a05b5..46bb9f307c 100644 --- a/src/Mod/MeshPart/App/CurveProjector.cpp +++ b/src/Mod/MeshPart/App/CurveProjector.cpp @@ -22,26 +22,26 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# ifdef FC_OS_LINUX -# include -# endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#ifdef FC_OS_LINUX +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -59,32 +59,31 @@ using namespace MeshPart; -using MeshCore::MeshKernel; -using MeshCore::MeshFacetIterator; -using MeshCore::MeshPointIterator; using MeshCore::MeshAlgorithm; -using MeshCore::MeshFacetGrid; using MeshCore::MeshFacet; +using MeshCore::MeshFacetGrid; +using MeshCore::MeshFacetIterator; +using MeshCore::MeshKernel; +using MeshCore::MeshPointIterator; -CurveProjector::CurveProjector(const TopoDS_Shape &aShape, const MeshKernel &pMesh) - : _Shape(aShape) - , _Mesh(pMesh) -{ -} +CurveProjector::CurveProjector(const TopoDS_Shape& aShape, const MeshKernel& pMesh) + : _Shape(aShape) + , _Mesh(pMesh) +{} -void CurveProjector::writeIntersectionPointsToFile(const char *name) +void CurveProjector::writeIntersectionPointsToFile(const char* name) { - // export points - Base::FileInfo fi(name); - Base::ofstream str(fi, std::ios::out | std::ios::binary); - str.precision(4); - str.setf(std::ios::fixed | std::ios::showpoint); - for (const auto & it1 : mvEdgeSplitPoints) { - for (const auto & it2 : it1.second) { - str << it2.p1.x << " " << it2.p1.y << " " << it2.p1.z << std::endl; - } - } - str.close(); + // export points + Base::FileInfo fi(name); + Base::ofstream str(fi, std::ios::out | std::ios::binary); + str.precision(4); + str.setf(std::ios::fixed | std::ios::showpoint); + for (const auto& it1 : mvEdgeSplitPoints) { + for (const auto& it2 : it1.second) { + str << it2.p1.x << " " << it2.p1.y << " " << it2.p1.z << std::endl; + } + } + str.close(); } @@ -93,159 +92,170 @@ void CurveProjector::writeIntersectionPointsToFile(const char *name) // Separator for additional classes //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -CurveProjectorShape::CurveProjectorShape(const TopoDS_Shape &aShape, const MeshKernel &pMesh) - : CurveProjector(aShape, pMesh) +CurveProjectorShape::CurveProjectorShape(const TopoDS_Shape& aShape, const MeshKernel& pMesh) + : CurveProjector(aShape, pMesh) { CurveProjectorShape::Do(); } void CurveProjectorShape::Do() { - TopExp_Explorer Ex; - for (Ex.Init(_Shape, TopAbs_EDGE); Ex.More(); Ex.Next()) { - const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); + TopExp_Explorer Ex; + for (Ex.Init(_Shape, TopAbs_EDGE); Ex.More(); Ex.Next()) { + const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); - //std::vector vSplitEdges; - projectCurve(aEdge, mvEdgeSplitPoints[aEdge]); - } + // std::vector vSplitEdges; + projectCurve(aEdge, mvEdgeSplitPoints[aEdge]); + } } void CurveProjectorShape::projectCurve(const TopoDS_Edge& aEdge, - std::vector &vSplitEdges) + std::vector& vSplitEdges) { - Standard_Real fFirst, fLast; - Handle(Geom_Curve) hCurve = BRep_Tool::Curve( aEdge,fFirst,fLast ); + Standard_Real fFirst, fLast; + Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge, fFirst, fLast); - // getting start point - gp_Pnt gpPt = hCurve->Value(fFirst); + // getting start point + gp_Pnt gpPt = hCurve->Value(fFirst); - // projection of the first point - Base::Vector3f cStartPoint = Base::Vector3f((float)gpPt.X(), - (float)gpPt.Y(), - (float)gpPt.Z()); - Base::Vector3f cResultPoint, cSplitPoint, cPlanePnt, cPlaneNormal; - MeshCore::FacetIndex uStartFacetIdx,uCurFacetIdx; - MeshCore::FacetIndex uLastFacetIdx=MeshCore::FACET_INDEX_MAX-1; // use another value as FACET_INDEX_MAX - MeshCore::FacetIndex auNeighboursIdx[3]; - bool GoOn; + // projection of the first point + Base::Vector3f cStartPoint = Base::Vector3f((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()); + Base::Vector3f cResultPoint, cSplitPoint, cPlanePnt, cPlaneNormal; + MeshCore::FacetIndex uStartFacetIdx, uCurFacetIdx; + MeshCore::FacetIndex uLastFacetIdx = + MeshCore::FACET_INDEX_MAX - 1; // use another value as FACET_INDEX_MAX + MeshCore::FacetIndex auNeighboursIdx[3]; + bool GoOn; - if( !findStartPoint(_Mesh,cStartPoint,cResultPoint,uStartFacetIdx) ) - return; + if (!findStartPoint(_Mesh, cStartPoint, cResultPoint, uStartFacetIdx)) { + return; + } - uCurFacetIdx = uStartFacetIdx; - do{ - MeshGeomFacet cCurFacet= _Mesh.GetFacet(uCurFacetIdx); - _Mesh.GetFacetNeighbours ( uCurFacetIdx, auNeighboursIdx[0], auNeighboursIdx[1], auNeighboursIdx[2]); - Base::Vector3f PointOnEdge[3]; + uCurFacetIdx = uStartFacetIdx; + do { + MeshGeomFacet cCurFacet = _Mesh.GetFacet(uCurFacetIdx); + _Mesh.GetFacetNeighbours(uCurFacetIdx, + auNeighboursIdx[0], + auNeighboursIdx[1], + auNeighboursIdx[2]); + Base::Vector3f PointOnEdge[3]; - GoOn = false; - int NbrOfHits = 0,HitIdx=0; + GoOn = false; + int NbrOfHits = 0, HitIdx = 0; - for(int i=0; i<3; i++) - { - // ignore last visited facet - if ( auNeighboursIdx[i] == uLastFacetIdx ) - continue; + for (int i = 0; i < 3; i++) { + // ignore last visited facet + if (auNeighboursIdx[i] == uLastFacetIdx) { + continue; + } - // get points of the edge i - const Base::Vector3f& cP0 = cCurFacet._aclPoints[i]; - const Base::Vector3f& cP1 = cCurFacet._aclPoints[(i+1)%3]; + // get points of the edge i + const Base::Vector3f& cP0 = cCurFacet._aclPoints[i]; + const Base::Vector3f& cP1 = cCurFacet._aclPoints[(i + 1) % 3]; - if ( auNeighboursIdx[i] != MeshCore::FACET_INDEX_MAX ) - { - // calculate the normal by the edge vector and the middle between the two face normals - MeshGeomFacet N = _Mesh.GetFacet( auNeighboursIdx[i] ); - cPlaneNormal = ( N.GetNormal() + cCurFacet.GetNormal() ) % ( cP1 - cP0 ); - cPlanePnt = cP0; - }else{ - // with no neighbours the face normal is used - cPlaneNormal = cCurFacet.GetNormal() % ( cP1 - cP0 ); - cPlanePnt = cP0; - } + if (auNeighboursIdx[i] != MeshCore::FACET_INDEX_MAX) { + // calculate the normal by the edge vector and the middle between the two face + // normals + MeshGeomFacet N = _Mesh.GetFacet(auNeighboursIdx[i]); + cPlaneNormal = (N.GetNormal() + cCurFacet.GetNormal()) % (cP1 - cP0); + cPlanePnt = cP0; + } + else { + // with no neighbours the face normal is used + cPlaneNormal = cCurFacet.GetNormal() % (cP1 - cP0); + cPlanePnt = cP0; + } - Handle(Geom_Plane) hPlane = new Geom_Plane(gp_Pln(gp_Pnt(cPlanePnt.x,cPlanePnt.y,cPlanePnt.z), - gp_Dir(cPlaneNormal.x,cPlaneNormal.y,cPlaneNormal.z))); + Handle(Geom_Plane) hPlane = + new Geom_Plane(gp_Pln(gp_Pnt(cPlanePnt.x, cPlanePnt.y, cPlanePnt.z), + gp_Dir(cPlaneNormal.x, cPlaneNormal.y, cPlaneNormal.z))); - GeomAPI_IntCS Alg(hCurve,hPlane); + GeomAPI_IntCS Alg(hCurve, hPlane); - if ( Alg.IsDone() ) - { - // deciding by the number of result points (intersections) - if( Alg.NbPoints() == 1) - { - gp_Pnt P = Alg.Point(1); - float l = ((Base::Vector3f((float)P.X(),(float)P.Y(),(float)P.Z()) - cP0) - * (cP1 - cP0) ) / ((cP1 - cP0) * (cP1 - cP0)); - // is the Point on the Edge of the facet? - if(l<0.0 || l>1.0) - PointOnEdge[i] = Base::Vector3f(FLOAT_MAX,0,0); - else{ - cSplitPoint = (1-l) * cP0 + l * cP1; - PointOnEdge[i] = (1-l)*cP0 + l * cP1; - NbrOfHits ++; - HitIdx = i; - } - // no intersection - }else if(Alg.NbPoints() == 0){ - PointOnEdge[i] = Base::Vector3f(FLOAT_MAX,0,0); - // more the one intersection (@ToDo) - }else if(Alg.NbPoints() > 1){ - PointOnEdge[i] = Base::Vector3f(FLOAT_MAX,0,0); - Base::Console().Log("MeshAlgos::projectCurve(): More then one intersection in Facet %lu, Edge %d\n",uCurFacetIdx,i); + if (Alg.IsDone()) { + // deciding by the number of result points (intersections) + if (Alg.NbPoints() == 1) { + gp_Pnt P = Alg.Point(1); + float l = ((Base::Vector3f((float)P.X(), (float)P.Y(), (float)P.Z()) - cP0) + * (cP1 - cP0)) + / ((cP1 - cP0) * (cP1 - cP0)); + // is the Point on the Edge of the facet? + if (l < 0.0 || l > 1.0) { + PointOnEdge[i] = Base::Vector3f(FLOAT_MAX, 0, 0); + } + else { + cSplitPoint = (1 - l) * cP0 + l * cP1; + PointOnEdge[i] = (1 - l) * cP0 + l * cP1; + NbrOfHits++; + HitIdx = i; + } + // no intersection + } + else if (Alg.NbPoints() == 0) { + PointOnEdge[i] = Base::Vector3f(FLOAT_MAX, 0, 0); + // more the one intersection (@ToDo) + } + else if (Alg.NbPoints() > 1) { + PointOnEdge[i] = Base::Vector3f(FLOAT_MAX, 0, 0); + Base::Console().Log("MeshAlgos::projectCurve(): More then one intersection in " + "Facet %lu, Edge %d\n", + uCurFacetIdx, + i); + } + } } - } - } - uLastFacetIdx = uCurFacetIdx; + uLastFacetIdx = uCurFacetIdx; - if(NbrOfHits == 1) - { - uCurFacetIdx = auNeighboursIdx[HitIdx]; - FaceSplitEdge splitEdge; - splitEdge.ulFaceIndex = uCurFacetIdx; - splitEdge.p1 = cResultPoint; - splitEdge.p2 = cSplitPoint; - vSplitEdges.push_back( splitEdge ); - cResultPoint = cSplitPoint; - GoOn = true; - }else{ - Base::Console().Log("MeshAlgos::projectCurve(): Possible reentry in Facet %lu\n", uCurFacetIdx); - } + if (NbrOfHits == 1) { + uCurFacetIdx = auNeighboursIdx[HitIdx]; + FaceSplitEdge splitEdge; + splitEdge.ulFaceIndex = uCurFacetIdx; + splitEdge.p1 = cResultPoint; + splitEdge.p2 = cSplitPoint; + vSplitEdges.push_back(splitEdge); + cResultPoint = cSplitPoint; + GoOn = true; + } + else { + Base::Console().Log("MeshAlgos::projectCurve(): Possible reentry in Facet %lu\n", + uCurFacetIdx); + } - if( uCurFacetIdx == uStartFacetIdx ) - GoOn = false; - - }while(GoOn); + if (uCurFacetIdx == uStartFacetIdx) { + GoOn = false; + } + } while (GoOn); } -bool CurveProjectorShape::findStartPoint(const MeshKernel &MeshK,const Base::Vector3f &Pnt,Base::Vector3f &Rslt,MeshCore::FacetIndex &FaceIndex) +bool CurveProjectorShape::findStartPoint(const MeshKernel& MeshK, + const Base::Vector3f& Pnt, + Base::Vector3f& Rslt, + MeshCore::FacetIndex& FaceIndex) { - Base::Vector3f TempResultPoint; - float MinLength = FLOAT_MAX; - bool bHit = false; + Base::Vector3f TempResultPoint; + float MinLength = FLOAT_MAX; + bool bHit = false; - // go through the whole Mesh - MeshFacetIterator It(MeshK); - for(It.Init();It.More();It.Next()) - { - // try to project (with angle) to the face - if(It->Foraminate (Pnt, It->GetNormal(), TempResultPoint) ) - { - // distance to the projected point - float Dist = (Pnt-TempResultPoint).Length(); - if(Dist < MinLength) - { - // remember the point with the closest distance - bHit = true; - MinLength = Dist; - Rslt = TempResultPoint; - FaceIndex = It.Position(); - } + // go through the whole Mesh + MeshFacetIterator It(MeshK); + for (It.Init(); It.More(); It.Next()) { + // try to project (with angle) to the face + if (It->Foraminate(Pnt, It->GetNormal(), TempResultPoint)) { + // distance to the projected point + float Dist = (Pnt - TempResultPoint).Length(); + if (Dist < MinLength) { + // remember the point with the closest distance + bHit = true; + MinLength = Dist; + Rslt = TempResultPoint; + FaceIndex = It.Position(); + } + } } - } - return bHit; + return bHit; } @@ -255,148 +265,149 @@ bool CurveProjectorShape::findStartPoint(const MeshKernel &MeshK,const Base::Vec //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -CurveProjectorSimple::CurveProjectorSimple(const TopoDS_Shape &aShape, const MeshKernel &pMesh) -: CurveProjector(aShape,pMesh) +CurveProjectorSimple::CurveProjectorSimple(const TopoDS_Shape& aShape, const MeshKernel& pMesh) + : CurveProjector(aShape, pMesh) { - Do(); + Do(); } void CurveProjectorSimple::Do() { - TopExp_Explorer Ex; + TopExp_Explorer Ex; - std::vector vEdgePolygon; + std::vector vEdgePolygon; - for (Ex.Init(_Shape, TopAbs_EDGE); Ex.More(); Ex.Next()) - { - const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); -// GetSampledCurves(aEdge,vEdgePolygon,2000); + for (Ex.Init(_Shape, TopAbs_EDGE); Ex.More(); Ex.Next()) { + const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); + // GetSampledCurves(aEdge,vEdgePolygon,2000); - //std::vector vSplitEdges; - projectCurve(aEdge,vEdgePolygon, mvEdgeSplitPoints[aEdge]); - } + // std::vector vSplitEdges; + projectCurve(aEdge, vEdgePolygon, mvEdgeSplitPoints[aEdge]); + } } -void CurveProjectorSimple::GetSampledCurves( const TopoDS_Edge& aEdge, std::vector& rclPoints, unsigned long ulNbOfPoints) +void CurveProjectorSimple::GetSampledCurves(const TopoDS_Edge& aEdge, + std::vector& rclPoints, + unsigned long ulNbOfPoints) { - rclPoints.clear(); + rclPoints.clear(); Standard_Real fBegin, fEnd; - Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge,fBegin,fEnd); - float fLen = float(fEnd - fBegin); + Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge, fBegin, fEnd); + float fLen = float(fEnd - fBegin); - for (unsigned long i = 0; i < ulNbOfPoints; i++) - { - gp_Pnt gpPt = hCurve->Value(fBegin + (fLen * float(i)) / float(ulNbOfPoints-1)); - rclPoints.emplace_back((float)gpPt.X(), - (float)gpPt.Y(), - (float)gpPt.Z()); + for (unsigned long i = 0; i < ulNbOfPoints; i++) { + gp_Pnt gpPt = hCurve->Value(fBegin + (fLen * float(i)) / float(ulNbOfPoints - 1)); + rclPoints.emplace_back((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()); } } -//projectToNeighbours(Handle(Geom_Curve) hCurve,float pos +// projectToNeighbours(Handle(Geom_Curve) hCurve,float pos -void CurveProjectorSimple::projectCurve( const TopoDS_Edge& aEdge, - const std::vector &/*rclPoints*/, - std::vector &/*vSplitEdges*/) +void CurveProjectorSimple::projectCurve(const TopoDS_Edge& aEdge, + const std::vector& /*rclPoints*/, + std::vector& /*vSplitEdges*/) { - Base::Vector3f /*cResultPoint, cSplitPoint, cPlanePnt, cPlaneNormal,*/TempResultPoint; - bool bFirst = true; - //unsigned long auNeighboursIdx[3]; - //std::map >::iterator N1,N2,N3; + Base::Vector3f /*cResultPoint, cSplitPoint, cPlanePnt, cPlaneNormal,*/ TempResultPoint; + bool bFirst = true; + // unsigned long auNeighboursIdx[3]; + // std::map >::iterator N1,N2,N3; - Standard_Real fBegin, fEnd; - Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge,fBegin,fEnd); - float fLen = float(fEnd - fBegin); + Standard_Real fBegin, fEnd; + Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge, fBegin, fEnd); + float fLen = float(fEnd - fBegin); - unsigned long ulNbOfPoints = 1000,PointCount=0; + unsigned long ulNbOfPoints = 1000, PointCount = 0; - MeshFacetIterator It(_Mesh); + MeshFacetIterator It(_Mesh); - Base::SequencerLauncher seq("Building up projection map...", ulNbOfPoints+1); - Base::FileInfo fi("projected.asc"); - Base::ofstream str(fi, std::ios::out | std::ios::binary); - str.precision(4); - str.setf(std::ios::fixed | std::ios::showpoint); + Base::SequencerLauncher seq("Building up projection map...", ulNbOfPoints + 1); + Base::FileInfo fi("projected.asc"); + Base::ofstream str(fi, std::ios::out | std::ios::binary); + str.precision(4); + str.setf(std::ios::fixed | std::ios::showpoint); - std::map > FaceProjctMap; + std::map> FaceProjctMap; - for (unsigned long i = 0; i <= ulNbOfPoints; i++) - { - seq.next(); - gp_Pnt gpPt = hCurve->Value(fBegin + (fLen * float(i)) / float(ulNbOfPoints-1)); + for (unsigned long i = 0; i <= ulNbOfPoints; i++) { + seq.next(); + gp_Pnt gpPt = hCurve->Value(fBegin + (fLen * float(i)) / float(ulNbOfPoints - 1)); + + // go through the whole Mesh + for (It.Init(); It.More(); It.Next()) { + // try to project (with angle) to the face + if (It->IntersectWithLine( + Base::Vector3f((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()), + It->GetNormal(), + TempResultPoint)) { + FaceProjctMap[It.Position()].push_back(TempResultPoint); + str << TempResultPoint.x << " " << TempResultPoint.y << " " << TempResultPoint.z + << std::endl; + Base::Console().Log("IDX %d\n", It.Position()); + + if (bFirst) { + bFirst = false; + } + + PointCount++; + } + } + } + + str.close(); + Base::Console().Log("Projection map [%d facets with %d points]\n", + FaceProjctMap.size(), + PointCount); + + // estimate the first face + // gp_Pnt gpPt = hCurve->Value(fBegin); + // if( + // !findStartPoint(MeshK,Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()),cResultPoint,uCurFacetIdx) + // ) + // uCurFacetIdx = FaceProjctMap.begin()->first; + + /* + do{ + Base::Console().Log("Grow on %d %d left\n",uCurFacetIdx,FaceProjctMap.size()); + + if(FaceProjctMap[uCurFacetIdx].size() == 1) + { + Base::Console().Log("Single hit\n"); + }else{ - // go through the whole Mesh - for(It.Init();It.More();It.Next()) - { - // try to project (with angle) to the face - if (It->IntersectWithLine (Base::Vector3f((float)gpPt.X(),(float)gpPt.Y(),(float)gpPt.Z()), - It->GetNormal(), TempResultPoint)) - { - FaceProjctMap[It.Position()].push_back(TempResultPoint); - str << TempResultPoint.x << " " - << TempResultPoint.y << " " - << TempResultPoint.z << std::endl; - Base::Console().Log("IDX %d\n",It.Position()); - if(bFirst){ - bFirst = false; } - PointCount++; - } - } - } + FaceProjctMap.erase(uCurFacetIdx); - str.close(); - Base::Console().Log("Projection map [%d facets with %d points]\n",FaceProjctMap.size(),PointCount); + // estimate next facet + MeshGeomFacet cCurFacet= MeshK.GetFacet(uCurFacetIdx); + MeshK.GetFacetNeighbours ( uCurFacetIdx, auNeighboursIdx[0], auNeighboursIdx[1], + auNeighboursIdx[2]); - // estimate the first face -// gp_Pnt gpPt = hCurve->Value(fBegin); -// if( !findStartPoint(MeshK,Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()),cResultPoint,uCurFacetIdx) ) -// uCurFacetIdx = FaceProjctMap.begin()->first; + uCurFacetIdx = MeshCore::FACET_INDEX_MAX; + PointCount = 0; -/* - do{ - Base::Console().Log("Grow on %d %d left\n",uCurFacetIdx,FaceProjctMap.size()); - - if(FaceProjctMap[uCurFacetIdx].size() == 1) - { - Base::Console().Log("Single hit\n"); - }else{ - - - } - - FaceProjctMap.erase(uCurFacetIdx); - - // estimate next facet - MeshGeomFacet cCurFacet= MeshK.GetFacet(uCurFacetIdx); - MeshK.GetFacetNeighbours ( uCurFacetIdx, auNeighboursIdx[0], auNeighboursIdx[1], auNeighboursIdx[2]); - - uCurFacetIdx = MeshCore::FACET_INDEX_MAX; - PointCount = 0; - - for(int i=0; i<3; i++) - { - N1 = FaceProjctMap.find(auNeighboursIdx[i]); - // if the i'th neighbour is valid - if ( N1 != FaceProjctMap.end() ) - { - unsigned long temp = N1->second.size(); - if(temp >= PointCount){ - PointCount = N1->second.size(); - uCurFacetIdx = auNeighboursIdx[i]; + for(int i=0; i<3; i++) + { + N1 = FaceProjctMap.find(auNeighboursIdx[i]); + // if the i'th neighbour is valid + if ( N1 != FaceProjctMap.end() ) + { + unsigned long temp = N1->second.size(); + if(temp >= PointCount){ + PointCount = N1->second.size(); + uCurFacetIdx = auNeighboursIdx[i]; + } + } } - } - } - }while(uCurFacetIdx != MeshCore::FACET_INDEX_MAX); -*/ + }while(uCurFacetIdx != MeshCore::FACET_INDEX_MAX); + */ } /* @@ -416,9 +427,8 @@ void CurveProjectorSimple::projectCurve( const TopoDS_Edge& aEdge, Base::Vector3f cStartPoint = Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()); Base::Vector3f cResultPoint, cSplitPoint, cPlanePnt, cPlaneNormal,TempResultPoint; MeshCore::FacetIndex uStartFacetIdx,uCurFacetIdx; - MeshCore::FacetIndex uLastFacetIdx=MeshCore::FACET_INDEX_MAX-1; // use another value as FACET_INDEX_MAX - MeshCore::FacetIndex auNeighboursIdx[3]; - bool GoOn; + MeshCore::FacetIndex uLastFacetIdx=MeshCore::FACET_INDEX_MAX-1; // use another value as +FACET_INDEX_MAX MeshCore::FacetIndex auNeighboursIdx[3]; bool GoOn; // go through the whole Mesh, find the first projection MeshFacetIterator It(MeshK); @@ -443,14 +453,16 @@ void CurveProjectorSimple::projectCurve( const TopoDS_Edge& aEdge, float fStep = (fLast-fFirst)/20; unsigned long HitCount,Sentinel = 0 ; MeshGeomFacet cCurFacet= MeshK.GetFacet(uCurFacetIdx); - MeshK.GetFacetNeighbours ( uCurFacetIdx, auNeighboursIdx[0], auNeighboursIdx[1], auNeighboursIdx[2]); + MeshK.GetFacetNeighbours ( uCurFacetIdx, auNeighboursIdx[0], auNeighboursIdx[1], +auNeighboursIdx[2]); do{ // lower the step until you find a neigbourfacet to project... fStep /= 2.0; // still on the same facet? gpPt = hCurve->Value(fAct+fStep); - if(MeshFacetFunc::IntersectWithLine (cCurFacet, Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()), cCurFacet.GetNormal(), cResultPoint) ) + if(MeshFacetFunc::IntersectWithLine (cCurFacet, Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()), +cCurFacet.GetNormal(), cResultPoint) ) { fAct += fStep; fStep *= 2.0; @@ -466,7 +478,8 @@ void CurveProjectorSimple::projectCurve( const TopoDS_Edge& aEdge, // try to project next interval MeshGeomFacet N = MeshK.GetFacet( auNeighboursIdx[i] ); gpPt = hCurve->Value(fAct+fStep); - if(MeshFacetFunc::IntersectWithLine (*It, Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()), It->GetNormal(), cResultPoint) ) + if(MeshFacetFunc::IntersectWithLine (*It, Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()), +It->GetNormal(), cResultPoint) ) { HitCount++; uStartFacetIdx = auNeighboursIdx[i]; @@ -502,9 +515,8 @@ void CurveProjectorSimple::projectCurve( const TopoDS_Edge& aEdge, Base::Vector3f cStartPoint = Base::Vector3f(gpPt.X(),gpPt.Y(),gpPt.Z()); Base::Vector3f cResultPoint, cSplitPoint, cPlanePnt, cPlaneNormal; MeshCore::FacetIndex uStartFacetIdx,uCurFacetIdx; - MeshCore::FacetIndex uLastFacetIdx=MeshCore::FACET_INDEX_MAX-1; // use another value as FACET_INDEX_MAX - MeshCore::FacetIndex auNeighboursIdx[3]; - bool GoOn; + MeshCore::FacetIndex uLastFacetIdx=MeshCore::FACET_INDEX_MAX-1; // use another value as +FACET_INDEX_MAX MeshCore::FacetIndex auNeighboursIdx[3]; bool GoOn; if( !findStartPoint(MeshK,cStartPoint,cResultPoint,uStartFacetIdx) ) return; @@ -515,8 +527,9 @@ void CurveProjectorSimple::projectCurve( const TopoDS_Edge& aEdge, MeshFacetIterator It1(MeshK); for(It1.Init();It1.More();It1.Next()) { - // cycling through the points and find the first projecteble point ( if the curve starts outside the mesh) - for( std::vector::const_iterator It = rclPoints.begin()+1;It!=rclPoints.end();++It) + // cycling through the points and find the first projecteble point ( if the curve starts outside +the mesh) for( std::vector::const_iterator It = +rclPoints.begin()+1;It!=rclPoints.end();++It) { // MeshGeomFacet facet = MeshK.GetFacet(uStartFacetIdx); MeshGeomFacet facet = *It1; @@ -532,32 +545,32 @@ void CurveProjectorSimple::projectCurve( const TopoDS_Edge& aEdge, } */ -bool CurveProjectorSimple::findStartPoint(const MeshKernel &MeshK,const Base::Vector3f &Pnt,Base::Vector3f &Rslt,MeshCore::FacetIndex &FaceIndex) +bool CurveProjectorSimple::findStartPoint(const MeshKernel& MeshK, + const Base::Vector3f& Pnt, + Base::Vector3f& Rslt, + MeshCore::FacetIndex& FaceIndex) { - Base::Vector3f TempResultPoint; - float MinLength = FLOAT_MAX; - bool bHit = false; + Base::Vector3f TempResultPoint; + float MinLength = FLOAT_MAX; + bool bHit = false; - // go through the whole Mesh - MeshFacetIterator It(MeshK); - for(It.Init();It.More();It.Next()) - { - // try to project (with angle) to the face - if(It->Foraminate (Pnt, It->GetNormal(), TempResultPoint) ) - { - // distance to the projected point - float Dist = (Pnt-TempResultPoint).Length(); - if(Dist < MinLength) - { - // remember the point with the closest distance - bHit = true; - MinLength = Dist; - Rslt = TempResultPoint; - FaceIndex = It.Position(); - } + // go through the whole Mesh + MeshFacetIterator It(MeshK); + for (It.Init(); It.More(); It.Next()) { + // try to project (with angle) to the face + if (It->Foraminate(Pnt, It->GetNormal(), TempResultPoint)) { + // distance to the projected point + float Dist = (Pnt - TempResultPoint).Length(); + if (Dist < MinLength) { + // remember the point with the closest distance + bHit = true; + MinLength = Dist; + Rslt = TempResultPoint; + FaceIndex = It.Position(); + } + } } - } - return bHit; + return bHit; } //************************************************************************** @@ -566,151 +579,153 @@ bool CurveProjectorSimple::findStartPoint(const MeshKernel &MeshK,const Base::Ve //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -CurveProjectorWithToolMesh::CurveProjectorWithToolMesh(const TopoDS_Shape &aShape, const MeshKernel &pMesh,MeshKernel &rToolMesh) -: CurveProjector(aShape,pMesh),ToolMesh(rToolMesh) +CurveProjectorWithToolMesh::CurveProjectorWithToolMesh(const TopoDS_Shape& aShape, + const MeshKernel& pMesh, + MeshKernel& rToolMesh) + : CurveProjector(aShape, pMesh) + , ToolMesh(rToolMesh) { - Do(); + Do(); } void CurveProjectorWithToolMesh::Do() { - TopExp_Explorer Ex; - std::vector cVAry; + TopExp_Explorer Ex; + std::vector cVAry; - for (Ex.Init(_Shape, TopAbs_EDGE); Ex.More(); Ex.Next()) - { - const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); - makeToolMesh(aEdge,cVAry); - } + for (Ex.Init(_Shape, TopAbs_EDGE); Ex.More(); Ex.Next()) { + const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); + makeToolMesh(aEdge, cVAry); + } - ToolMesh.AddFacets(cVAry); + ToolMesh.AddFacets(cVAry); } -//projectToNeighbours(Handle(Geom_Curve) hCurve,float pos +// projectToNeighbours(Handle(Geom_Curve) hCurve,float pos -void CurveProjectorWithToolMesh::makeToolMesh( const TopoDS_Edge& aEdge,std::vector &cVAry ) +void CurveProjectorWithToolMesh::makeToolMesh(const TopoDS_Edge& aEdge, + std::vector& cVAry) { - Standard_Real fBegin, fEnd; - Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge,fBegin,fEnd); - float fLen = float(fEnd - fBegin); - Base::Vector3f cResultPoint; + Standard_Real fBegin, fEnd; + Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge, fBegin, fEnd); + float fLen = float(fEnd - fBegin); + Base::Vector3f cResultPoint; - unsigned long ulNbOfPoints = 15,PointCount=0/*,uCurFacetIdx*/; + unsigned long ulNbOfPoints = 15, PointCount = 0 /*,uCurFacetIdx*/; - std::vector LineSegs; + std::vector LineSegs; - MeshFacetIterator It(_Mesh); + MeshFacetIterator It(_Mesh); - Base::SequencerLauncher seq("Building up tool mesh...", ulNbOfPoints+1); + Base::SequencerLauncher seq("Building up tool mesh...", ulNbOfPoints + 1); - std::map > FaceProjctMap; + std::map> FaceProjctMap; - for (unsigned long i = 0; i < ulNbOfPoints; i++) - { - seq.next(); - gp_Pnt gpPt = hCurve->Value(fBegin + (fLen * float(i)) / float(ulNbOfPoints-1)); - Base::Vector3f LinePoint((float)gpPt.X(), - (float)gpPt.Y(), - (float)gpPt.Z()); + for (unsigned long i = 0; i < ulNbOfPoints; i++) { + seq.next(); + gp_Pnt gpPt = hCurve->Value(fBegin + (fLen * float(i)) / float(ulNbOfPoints - 1)); + Base::Vector3f LinePoint((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()); - Base::Vector3f ResultNormal; - - // go through the whole Mesh - for(It.Init();It.More();It.Next()) - { - // try to project (with angle) to the face - if (It->IntersectWithLine (Base::Vector3f((float)gpPt.X(),(float)gpPt.Y(),(float)gpPt.Z()), - It->GetNormal(), cResultPoint) ) - { - if(Base::Distance(LinePoint,cResultPoint) < 0.5) - ResultNormal += It->GetNormal(); - } - } - LineSeg s; - s.p = Base::Vector3f((float)gpPt.X(), - (float)gpPt.Y(), - (float)gpPt.Z()); - s.n = ResultNormal.Normalize(); - LineSegs.push_back(s); - } - - Base::Console().Log("Projection map [%d facets with %d points]\n",FaceProjctMap.size(),PointCount); - - - // build up the new mesh - Base::Vector3f lp(FLOAT_MAX,0,0), ln, p1, p2, p3, p4,p5,p6; - float ToolSize = 0.2f; - - for (const auto & It2 : LineSegs) - { - if(lp.x != FLOAT_MAX) - { - p1 = lp + (ln * (-ToolSize)); - p2 = lp + (ln * ToolSize); - p3 = lp; - p4 = It2.p; - p5 = It2.p + (It2.n * (-ToolSize)); - p6 = It2.p + (It2.n * ToolSize); - - cVAry.emplace_back(p3,p2,p6); - cVAry.emplace_back(p3,p6,p4); - cVAry.emplace_back(p1,p3,p4); - cVAry.emplace_back(p1,p4,p5); + Base::Vector3f ResultNormal; + // go through the whole Mesh + for (It.Init(); It.More(); It.Next()) { + // try to project (with angle) to the face + if (It->IntersectWithLine( + Base::Vector3f((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()), + It->GetNormal(), + cResultPoint)) { + if (Base::Distance(LinePoint, cResultPoint) < 0.5) { + ResultNormal += It->GetNormal(); + } + } + } + LineSeg s; + s.p = Base::Vector3f((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()); + s.n = ResultNormal.Normalize(); + LineSegs.push_back(s); } - lp = It2.p; - ln = It2.n; - } + Base::Console().Log("Projection map [%d facets with %d points]\n", + FaceProjctMap.size(), + PointCount); + + + // build up the new mesh + Base::Vector3f lp(FLOAT_MAX, 0, 0), ln, p1, p2, p3, p4, p5, p6; + float ToolSize = 0.2f; + + for (const auto& It2 : LineSegs) { + if (lp.x != FLOAT_MAX) { + p1 = lp + (ln * (-ToolSize)); + p2 = lp + (ln * ToolSize); + p3 = lp; + p4 = It2.p; + p5 = It2.p + (It2.n * (-ToolSize)); + p6 = It2.p + (It2.n * ToolSize); + + cVAry.emplace_back(p3, p2, p6); + cVAry.emplace_back(p3, p6, p4); + cVAry.emplace_back(p1, p3, p4); + cVAry.emplace_back(p1, p4, p5); + } + + lp = It2.p; + ln = It2.n; + } } // ---------------------------------------------------------------------------- MeshProjection::MeshProjection(const MeshKernel& rMesh) - : _rcMesh(rMesh) -{ -} + : _rcMesh(rMesh) +{} -void MeshProjection::discretize(const TopoDS_Edge& aEdge, std::vector& polyline, std::size_t minPoints) const +void MeshProjection::discretize(const TopoDS_Edge& aEdge, + std::vector& polyline, + std::size_t minPoints) const { BRepAdaptor_Curve clCurve(aEdge); Standard_Real fFirst = clCurve.FirstParameter(); - Standard_Real fLast = clCurve.LastParameter(); + Standard_Real fLast = clCurve.LastParameter(); GCPnts_UniformDeflection clDefl(clCurve, 0.01f, fFirst, fLast); if (clDefl.IsDone() == Standard_True) { Standard_Integer nNbPoints = clDefl.NbPoints(); for (Standard_Integer i = 1; i <= nNbPoints; i++) { gp_Pnt gpPt = clCurve.Value(clDefl.Parameter(i)); - polyline.emplace_back( (float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z() ); + polyline.emplace_back((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()); } } if (polyline.size() < minPoints) { - GCPnts_UniformAbscissa clAbsc(clCurve, static_cast(minPoints), fFirst, fLast); + GCPnts_UniformAbscissa clAbsc(clCurve, + static_cast(minPoints), + fFirst, + fLast); if (clAbsc.IsDone() == Standard_True) { polyline.clear(); Standard_Integer nNbPoints = clAbsc.NbPoints(); for (Standard_Integer i = 1; i <= nNbPoints; i++) { gp_Pnt gpPt = clCurve.Value(clAbsc.Parameter(i)); - polyline.emplace_back( (float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z() ); + polyline.emplace_back((float)gpPt.X(), (float)gpPt.Y(), (float)gpPt.Z()); } } } } -void MeshProjection::splitMeshByShape ( const TopoDS_Shape &aShape, float fMaxDist ) const +void MeshProjection::splitMeshByShape(const TopoDS_Shape& aShape, float fMaxDist) const { std::vector rPolyLines; - projectToMesh( aShape, fMaxDist, rPolyLines ); + projectToMesh(aShape, fMaxDist, rPolyLines); Base::FileInfo fi("output.asc"); Base::ofstream str(fi, std::ios::out | std::ios::binary); str.precision(4); str.setf(std::ios::fixed | std::ios::showpoint); - for (const auto & it : rPolyLines) { + for (const auto& it : rPolyLines) { for (const auto& jt : it.points) { str << jt.x << " " << jt.y << " " << jt.z << std::endl; } @@ -718,8 +733,10 @@ void MeshProjection::splitMeshByShape ( const TopoDS_Shape &aShape, float fMaxDi str.close(); } -bool MeshProjection::findIntersection(const Edge& edgeSegm, const Edge& meshEdge, - const Base::Vector3f& dir, Base::Vector3f& res) const +bool MeshProjection::findIntersection(const Edge& edgeSegm, + const Edge& meshEdge, + const Base::Vector3f& dir, + Base::Vector3f& res) const { Base::Vector3f planeNormal; planeNormal = dir.Cross(edgeSegm.cPt2 - edgeSegm.cPt1); @@ -731,30 +748,33 @@ bool MeshProjection::findIntersection(const Edge& edgeSegm, const Edge& meshEdge dist2 = planeNormal.Dot(edgeSegm.cPt2 - meshEdge.cPt1); if (dist1 * dist2 < 0) { // intersection detected - float t = planeNormal.Dot(meshEdge.cPt1 - edgeSegm.cPt1) / - planeNormal.Dot(edgeSegm.cPt2 - edgeSegm.cPt1); - res = edgeSegm.cPt1 * (1-t) + edgeSegm.cPt2 * t; + float t = planeNormal.Dot(meshEdge.cPt1 - edgeSegm.cPt1) + / planeNormal.Dot(edgeSegm.cPt2 - edgeSegm.cPt1); + res = edgeSegm.cPt1 * (1 - t) + edgeSegm.cPt2 * t; return true; } } return false; } -void MeshProjection::findSectionParameters(const TopoDS_Edge& edge, const Base::Vector3f& dir, std::set& parameters) const +void MeshProjection::findSectionParameters(const TopoDS_Edge& edge, + const Base::Vector3f& dir, + std::set& parameters) const { - MeshAlgorithm clAlg( _rcMesh ); + MeshAlgorithm clAlg(_rcMesh); float fAvgLen = clAlg.GetAverageEdgeLength(); BRepAdaptor_Curve adapt(edge); double edgeLen = GCPnts_AbscissaPoint::Length(adapt, Precision::Confusion()); std::vector polyline; - discretize(edge, polyline, std::max(10, static_cast(edgeLen/fAvgLen))); - if (polyline.empty()) + discretize(edge, polyline, std::max(10, static_cast(edgeLen / fAvgLen))); + if (polyline.empty()) { return; + } std::vector lines; Base::Vector3f start = polyline.front(); - for (auto it = polyline.begin()+1; it != polyline.end(); ++it) { + for (auto it = polyline.begin() + 1; it != polyline.end(); ++it) { Edge line; line.cPt1 = start; line.cPt2 = *it; @@ -767,9 +787,9 @@ void MeshProjection::findSectionParameters(const TopoDS_Edge& edge, const Base:: Base::Vector3f res; for (const auto& it : facets) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { Base::Vector3f pt1 = points[it._aulPoints[i]]; - Base::Vector3f pt2 = points[it._aulPoints[(i+1)%3]]; + Base::Vector3f pt2 = points[it._aulPoints[(i + 1) % 3]]; Edge line; line.cPt1 = pt1; line.cPt2 = pt2; @@ -777,12 +797,12 @@ void MeshProjection::findSectionParameters(const TopoDS_Edge& edge, const Base:: for (auto jt : lines) { if (findIntersection(jt, line, dir, res)) { try { - BRepBuilderAPI_MakeVertex aBuilder(gp_Pnt(res.x,res.y,res.z)); + BRepBuilderAPI_MakeVertex aBuilder(gp_Pnt(res.x, res.y, res.z)); BRepExtrema_DistShapeShape extss(aBuilder.Vertex(), edge); if (extss.NbSolution() == 1) { Standard_Real par; - //gp_pnt pnt = extss.PointOnShape2(1); - //Standard_Real par = BRep_Tool::Parameter(aBuilder.Vertex(), edge); + // gp_pnt pnt = extss.PointOnShape2(1); + // Standard_Real par = BRep_Tool::Parameter(aBuilder.Vertex(), edge); extss.ParOnEdgeS2(1, par); parameters.insert(par); break; @@ -797,20 +817,23 @@ void MeshProjection::findSectionParameters(const TopoDS_Edge& edge, const Base:: } } -void MeshProjection::projectToMesh (const TopoDS_Shape &aShape, float fMaxDist, std::vector& rPolyLines) const +void MeshProjection::projectToMesh(const TopoDS_Shape& aShape, + float fMaxDist, + std::vector& rPolyLines) const { // calculate the average edge length and create a grid - MeshAlgorithm clAlg( _rcMesh ); + MeshAlgorithm clAlg(_rcMesh); float fAvgLen = clAlg.GetAverageEdgeLength(); - MeshFacetGrid cGrid( _rcMesh, 5.0f*fAvgLen ); + MeshFacetGrid cGrid(_rcMesh, 5.0f * fAvgLen); TopExp_Explorer Ex; - int iCnt=0; - for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) + int iCnt = 0; + for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { iCnt++; + } - Base::SequencerLauncher seq( "Project curve on mesh", iCnt ); + Base::SequencerLauncher seq("Project curve on mesh", iCnt); for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); @@ -818,8 +841,9 @@ void MeshProjection::projectToMesh (const TopoDS_Shape &aShape, float fMaxDist, projectEdgeToEdge(aEdge, fMaxDist, cGrid, rSplitEdges); PolyLine polyline; polyline.points.reserve(rSplitEdges.size()); - for (auto it : rSplitEdges) + for (auto it : rSplitEdges) { polyline.points.push_back(it.cPt); + } rPolyLines.push_back(polyline); seq.next(); } @@ -833,7 +857,7 @@ void MeshProjection::projectOnMesh(const std::vector& pointsIn, // calculate the average edge length and create a grid MeshAlgorithm clAlg(_rcMesh); float fAvgLen = clAlg.GetAverageEdgeLength(); - MeshFacetGrid cGrid(_rcMesh, 5.0f*fAvgLen); + MeshFacetGrid cGrid(_rcMesh, 5.0f * fAvgLen); // get all boundary points and edges of the mesh std::vector boundaryPoints; @@ -842,20 +866,20 @@ void MeshProjection::projectOnMesh(const std::vector& pointsIn, const MeshCore::MeshFacetArray& facets = _rcMesh.GetFacets(); const MeshCore::MeshPointArray& points = _rcMesh.GetPoints(); for (const auto& it : facets) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { if (!it.HasNeighbour(i)) { boundaryPoints.push_back(points[it._aulPoints[i]]); MeshCore::MeshGeomEdge edge; edge._bBorder = true; edge._aclPoints[0] = points[it._aulPoints[i]]; - edge._aclPoints[1] = points[it._aulPoints[(i+1)%3]]; + edge._aclPoints[1] = points[it._aulPoints[(i + 1) % 3]]; boundaryEdges.push_back(edge); } } } - Base::SequencerLauncher seq( "Project points on mesh", pointsIn.size() ); + Base::SequencerLauncher seq("Project points on mesh", pointsIn.size()); for (auto it : pointsIn) { Base::Vector3f result; @@ -863,8 +887,9 @@ void MeshProjection::projectOnMesh(const std::vector& pointsIn, if (clAlg.NearestFacetOnRay(it, dir, cGrid, result, index)) { MeshCore::MeshGeomFacet geomFacet = _rcMesh.GetFacet(index); if (tolerance > 0 && geomFacet.IntersectPlaneWithLine(it, dir, result)) { - if (geomFacet.IsPointOfFace(result, tolerance)) + if (geomFacet.IsPointOfFace(result, tolerance)) { pointsOut.push_back(result); + } } else { pointsOut.push_back(result); @@ -873,12 +898,13 @@ void MeshProjection::projectOnMesh(const std::vector& pointsIn, else { // go through the boundary points and check if the point can be directly projected // onto one of them - auto boundaryPnt = std::find_if(boundaryPoints.begin(), boundaryPoints.end(), - [&it, &dir](const Base::Vector3f& pnt)->bool { - Base::Vector3f vec = pnt - it; - float angle = vec.GetAngle(dir); - return angle < 1e-6f; - }); + auto boundaryPnt = std::find_if(boundaryPoints.begin(), + boundaryPoints.end(), + [&it, &dir](const Base::Vector3f& pnt) -> bool { + Base::Vector3f vec = pnt - it; + float angle = vec.GetAngle(dir); + return angle < 1e-6f; + }); if (boundaryPnt != boundaryPoints.end()) { pointsOut.push_back(*boundaryPnt); @@ -889,8 +915,8 @@ void MeshProjection::projectOnMesh(const std::vector& pointsIn, Base::Vector3f result1, result2; for (auto jt : boundaryEdges) { jt.ClosestPointsToLine(it, dir, result1, result2); - float dot = (result1-jt._aclPoints[0]).Dot(result1-jt._aclPoints[1]); - //float distance = Base::Distance(result1, result2); + float dot = (result1 - jt._aclPoints[0]).Dot(result1 - jt._aclPoints[1]); + // float distance = Base::Distance(result1, result2); Base::Vector3f vec = result1 - it; float angle = vec.GetAngle(dir); if (dot <= 0 && angle < 1e-6f) { @@ -905,19 +931,22 @@ void MeshProjection::projectOnMesh(const std::vector& pointsIn, } } -void MeshProjection::projectParallelToMesh (const TopoDS_Shape &aShape, const Base::Vector3f& dir, std::vector& rPolyLines) const +void MeshProjection::projectParallelToMesh(const TopoDS_Shape& aShape, + const Base::Vector3f& dir, + std::vector& rPolyLines) const { // calculate the average edge length and create a grid MeshAlgorithm clAlg(_rcMesh); float fAvgLen = clAlg.GetAverageEdgeLength(); - MeshFacetGrid cGrid(_rcMesh, 5.0f*fAvgLen); + MeshFacetGrid cGrid(_rcMesh, 5.0f * fAvgLen); TopExp_Explorer Ex; - int iCnt=0; - for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) + int iCnt = 0; + for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { iCnt++; + } - Base::SequencerLauncher seq( "Project curve on mesh", iCnt ); + Base::SequencerLauncher seq("Project curve on mesh", iCnt); for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { const TopoDS_Edge& aEdge = TopoDS::Edge(Ex.Current()); @@ -935,8 +964,8 @@ void MeshProjection::projectParallelToMesh (const TopoDS_Shape &aShape, const Ba hitPoints.emplace_back(result, index); if (hitPoints.size() > 1) { - HitPoint p1 = hitPoints[hitPoints.size()-2]; - HitPoint p2 = hitPoints[hitPoints.size()-1]; + HitPoint p1 = hitPoints[hitPoints.size() - 2]; + HitPoint p2 = hitPoints[hitPoints.size() - 1]; hitPointPairs.emplace_back(p1, p2); } } @@ -946,8 +975,13 @@ void MeshProjection::projectParallelToMesh (const TopoDS_Shape &aShape, const Ba PolyLine polyline; for (auto it : hitPointPairs) { points.clear(); - if (meshProjection.projectLineOnMesh(cGrid, it.first.first, it.first.second, - it.second.first, it.second.second, dir, points)) { + if (meshProjection.projectLineOnMesh(cGrid, + it.first.first, + it.first.second, + it.second.first, + it.second.second, + dir, + points)) { polyline.points.insert(polyline.points.end(), points.begin(), points.end()); } } @@ -957,14 +991,16 @@ void MeshProjection::projectParallelToMesh (const TopoDS_Shape &aShape, const Ba } } -void MeshProjection::projectParallelToMesh (const std::vector &aEdges, const Base::Vector3f& dir, std::vector& rPolyLines) const +void MeshProjection::projectParallelToMesh(const std::vector& aEdges, + const Base::Vector3f& dir, + std::vector& rPolyLines) const { // calculate the average edge length and create a grid MeshAlgorithm clAlg(_rcMesh); float fAvgLen = clAlg.GetAverageEdgeLength(); - MeshFacetGrid cGrid(_rcMesh, 5.0f*fAvgLen); + MeshFacetGrid cGrid(_rcMesh, 5.0f * fAvgLen); - Base::SequencerLauncher seq( "Project curve on mesh", aEdges.size() ); + Base::SequencerLauncher seq("Project curve on mesh", aEdges.size()); for (const auto& it : aEdges) { std::vector points = it.points; @@ -980,8 +1016,8 @@ void MeshProjection::projectParallelToMesh (const std::vector &aEdges, hitPoints.emplace_back(result, index); if (hitPoints.size() > 1) { - HitPoint p1 = hitPoints[hitPoints.size()-2]; - HitPoint p2 = hitPoints[hitPoints.size()-1]; + HitPoint p1 = hitPoints[hitPoints.size() - 2]; + HitPoint p2 = hitPoints[hitPoints.size() - 1]; hitPointPairs.emplace_back(p1, p2); } } @@ -991,8 +1027,13 @@ void MeshProjection::projectParallelToMesh (const std::vector &aEdges, PolyLine polyline; for (auto it : hitPointPairs) { points.clear(); - if (meshProjection.projectLineOnMesh(cGrid, it.first.first, it.first.second, - it.second.first, it.second.second, dir, points)) { + if (meshProjection.projectLineOnMesh(cGrid, + it.first.first, + it.first.second, + it.second.first, + it.second.second, + dir, + points)) { polyline.points.insert(polyline.points.end(), points.begin(), points.end()); } } @@ -1002,18 +1043,21 @@ void MeshProjection::projectParallelToMesh (const std::vector &aEdges, } } -void MeshProjection::projectEdgeToEdge( const TopoDS_Edge &aEdge, float fMaxDist, const MeshFacetGrid& rGrid, - std::vector& rSplitEdges ) const +void MeshProjection::projectEdgeToEdge(const TopoDS_Edge& aEdge, + float fMaxDist, + const MeshFacetGrid& rGrid, + std::vector& rSplitEdges) const { std::vector auFInds; - std::map, std::list > pEdgeToFace; + std::map, std::list> + pEdgeToFace; const std::vector& rclFAry = _rcMesh.GetFacets(); // search the facets in the local area of the curve std::vector acPolyLine; discretize(aEdge, acPolyLine); - MeshAlgorithm(_rcMesh).SearchFacetsFromPolyline( acPolyLine, fMaxDist, rGrid, auFInds); + MeshAlgorithm(_rcMesh).SearchFacetsFromPolyline(acPolyLine, fMaxDist, rGrid, auFInds); // remove duplicated elements std::sort(auFInds.begin(), auFInds.end()); auFInds.erase(std::unique(auFInds.begin(), auFInds.end()), auFInds.end()); @@ -1022,9 +1066,12 @@ void MeshProjection::projectEdgeToEdge( const TopoDS_Edge &aEdge, float fMaxDist for (MeshCore::FacetIndex index : auFInds) { const MeshFacet& rF = rclFAry[index]; for (int i = 0; i < 3; i++) { - MeshCore::PointIndex ulPt0 = std::min(rF._aulPoints[i], rF._aulPoints[(i+1)%3]); - MeshCore::PointIndex ulPt1 = std::max(rF._aulPoints[i], rF._aulPoints[(i+1)%3]); - pEdgeToFace[std::pair(ulPt0, ulPt1)].push_front(index); + MeshCore::PointIndex ulPt0 = + std::min(rF._aulPoints[i], rF._aulPoints[(i + 1) % 3]); + MeshCore::PointIndex ulPt1 = + std::max(rF._aulPoints[i], rF._aulPoints[(i + 1) % 3]); + pEdgeToFace[std::pair(ulPt0, ulPt1)] + .push_front(index); } } @@ -1033,65 +1080,69 @@ void MeshProjection::projectEdgeToEdge( const TopoDS_Edge &aEdge, float fMaxDist BRepAdaptor_Curve clCurve(aEdge); Standard_Real fFirst = clCurve.FirstParameter(); - Standard_Real fLast = clCurve.LastParameter(); - Handle(Geom_Curve) hCurve = BRep_Tool::Curve( aEdge,fFirst,fLast ); + Standard_Real fLast = clCurve.LastParameter(); + Handle(Geom_Curve) hCurve = BRep_Tool::Curve(aEdge, fFirst, fLast); // bounds of curve -// Bnd_Box clBB; -// BndLib_Add3dCurve::Add( BRepAdaptor_Curve(aEdge), 0.0, clBB ); + // Bnd_Box clBB; + // BndLib_Add3dCurve::Add( BRepAdaptor_Curve(aEdge), 0.0, clBB ); - MeshPointIterator cPI( _rcMesh ); - MeshFacetIterator cFI( _rcMesh ); + MeshPointIterator cPI(_rcMesh); + MeshFacetIterator cFI(_rcMesh); - Base::SequencerLauncher seq( "Project curve on mesh", pEdgeToFace.size() ); - std::map, std::list >::iterator it; - for ( it = pEdgeToFace.begin(); it != pEdgeToFace.end(); ++it ) { + Base::SequencerLauncher seq("Project curve on mesh", pEdgeToFace.size()); + std::map, + std::list>::iterator it; + for (it = pEdgeToFace.begin(); it != pEdgeToFace.end(); ++it) { seq.next(); // edge points MeshCore::PointIndex uE0 = it->first.first; - cPI.Set( uE0 ); + cPI.Set(uE0); Base::Vector3f cE0 = *cPI; MeshCore::PointIndex uE1 = it->first.second; - cPI.Set( uE1 ); + cPI.Set(uE1); Base::Vector3f cE1 = *cPI; const std::list& auFaces = it->second; - if ( auFaces.size() > 2 ) - continue; // non-manifold edge -> don't handle this -// if ( clBB.IsOut( gp_Pnt(cE0.x, cE0.y, cE0.z) ) && clBB.IsOut( gp_Pnt(cE1.x, cE1.y, cE1.z) ) ) -// continue; + if (auFaces.size() > 2) { + continue; // non-manifold edge -> don't handle this + } + // if ( clBB.IsOut( gp_Pnt(cE0.x, cE0.y, cE0.z) ) && clBB.IsOut( gp_Pnt(cE1.x, cE1.y, + // cE1.z) ) ) + // continue; Base::Vector3f cEdgeNormal; for (MeshCore::FacetIndex itF : auFaces) { - cFI.Set( itF ); + cFI.Set(itF); cEdgeNormal += cFI->GetNormal(); } // create a plane from the edge normal and point Base::Vector3f cPlaneNormal = cEdgeNormal % (cE1 - cE0); - Handle(Geom_Plane) hPlane = new Geom_Plane(gp_Pln(gp_Pnt(cE0.x,cE0.y,cE0.z), - gp_Dir(cPlaneNormal.x,cPlaneNormal.y,cPlaneNormal.z))); + Handle(Geom_Plane) hPlane = + new Geom_Plane(gp_Pln(gp_Pnt(cE0.x, cE0.y, cE0.z), + gp_Dir(cPlaneNormal.x, cPlaneNormal.y, cPlaneNormal.z))); // get intersection of curve and plane - GeomAPI_IntCS Alg(hCurve,hPlane); - if ( Alg.IsDone() ) { + GeomAPI_IntCS Alg(hCurve, hPlane); + if (Alg.IsDone()) { Standard_Integer nNbPoints = Alg.NbPoints(); - if ( nNbPoints == 1 ) { + if (nNbPoints == 1) { Standard_Real fU, fV, fW; - Alg.Parameters( 1, fU, fV, fW); + Alg.Parameters(1, fU, fV, fW); gp_Pnt P = Alg.Point(1); Base::Vector3f cP0((float)P.X(), (float)P.Y(), (float)P.Z()); - float l = ( (cP0 - cE0) * (cE1 - cE0) ) / ( (cE1 - cE0) * ( cE1 - cE0) ); + float l = ((cP0 - cE0) * (cE1 - cE0)) / ((cE1 - cE0) * (cE1 - cE0)); // lies the point inside the edge? - if ( l>=0.0f && l<=1.0f ) { - Base::Vector3f cSplitPoint = (1-l) * cE0 + l * cE1; - float fDist = Base::Distance( cP0, cSplitPoint ); + if (l >= 0.0f && l <= 1.0f) { + Base::Vector3f cSplitPoint = (1 - l) * cE0 + l * cE1; + float fDist = Base::Distance(cP0, cSplitPoint); - if ( fDist <= fMaxDist ) { + if (fDist <= fMaxDist) { SplitEdge splitEdge; splitEdge.uE0 = uE0; splitEdge.uE1 = uE1; @@ -1101,23 +1152,23 @@ void MeshProjection::projectEdgeToEdge( const TopoDS_Edge &aEdge, float fMaxDist } } // search for the right solution - else if ( nNbPoints > 1 ) { - int nCntSol=0; + else if (nNbPoints > 1) { + int nCntSol = 0; Base::Vector3f cSplitPoint; Standard_Real fSol; Base::Vector3f cP0; - for ( int j=1; j<=nNbPoints; j++ ) { + for (int j = 1; j <= nNbPoints; j++) { Standard_Real fU, fV, fW; - Alg.Parameters( j, fU, fV, fW); + Alg.Parameters(j, fU, fV, fW); gp_Pnt P = Alg.Point(j); cP0.Set((float)P.X(), (float)P.Y(), (float)P.Z()); - float l = ( (cP0 - cE0) * (cE1 - cE0) ) / ( (cE1 - cE0) * ( cE1 - cE0) ); + float l = ((cP0 - cE0) * (cE1 - cE0)) / ((cE1 - cE0) * (cE1 - cE0)); // lies the point inside the edge? - if ( l>=0.0 && l<=1.0 ) { - cSplitPoint = (1-l) * cE0 + l * cE1; - float fDist = Base::Distance( cP0, cSplitPoint ); + if (l >= 0.0 && l <= 1.0) { + cSplitPoint = (1 - l) * cE0 + l * cE1; + float fDist = Base::Distance(cP0, cSplitPoint); if (fDist <= fMaxDist) { nCntSol++; @@ -1127,14 +1178,14 @@ void MeshProjection::projectEdgeToEdge( const TopoDS_Edge &aEdge, float fMaxDist } // ok, only one sensible solution - if ( nCntSol == 1 ) { + if (nCntSol == 1) { SplitEdge splitEdge; splitEdge.uE0 = uE0; splitEdge.uE1 = uE1; splitEdge.cPt = cSplitPoint; rParamSplitEdges[fSol] = splitEdge; } - else if ( nCntSol > 1 ) { + else if (nCntSol > 1) { Base::Console().Log("More than one possible intersection points\n"); } } @@ -1142,7 +1193,7 @@ void MeshProjection::projectEdgeToEdge( const TopoDS_Edge &aEdge, float fMaxDist } // sorted by parameter - for (const auto & itS : rParamSplitEdges) { - rSplitEdges.push_back( itS.second ); + for (const auto& itS : rParamSplitEdges) { + rSplitEdges.push_back(itS.second); } } diff --git a/src/Mod/MeshPart/App/CurveProjector.h b/src/Mod/MeshPart/App/CurveProjector.h index 63fdd1b4b5..08714d9e2a 100644 --- a/src/Mod/MeshPart/App/CurveProjector.h +++ b/src/Mod/MeshPart/App/CurveProjector.h @@ -24,7 +24,7 @@ #define _CurveProjector_h_ #ifdef FC_USE_GTS -# include +#include #endif #include @@ -38,10 +38,10 @@ namespace MeshCore class MeshKernel; class MeshGeomFacet; class MeshFacetGrid; -} +} // namespace MeshCore -using MeshCore::MeshKernel; using MeshCore::MeshGeomFacet; +using MeshCore::MeshKernel; namespace MeshPart { @@ -51,35 +51,39 @@ namespace MeshPart class MeshPartExport CurveProjector { public: - CurveProjector(const TopoDS_Shape &aShape, const MeshKernel &pMesh); - virtual ~CurveProjector() = default; + CurveProjector(const TopoDS_Shape& aShape, const MeshKernel& pMesh); + virtual ~CurveProjector() = default; - struct FaceSplitEdge - { - MeshCore::FacetIndex ulFaceIndex; - Base::Vector3f p1,p2; - }; + struct FaceSplitEdge + { + MeshCore::FacetIndex ulFaceIndex; + Base::Vector3f p1, p2; + }; - template - struct TopoDSLess { - bool operator()(const T& x, const T& y) const { - return x.HashCode(INT_MAX-1) < y.HashCode(INT_MAX-1); + template + struct TopoDSLess + { + bool operator()(const T& x, const T& y) const + { + return x.HashCode(INT_MAX - 1) < y.HashCode(INT_MAX - 1); + } + }; + + using result_type = std::map, TopoDSLess>; + + + result_type& result() + { + return mvEdgeSplitPoints; } - }; - using result_type = std::map,TopoDSLess >; - - - result_type &result() {return mvEdgeSplitPoints;} - - void writeIntersectionPointsToFile(const char *name="export_pts.asc"); + void writeIntersectionPointsToFile(const char* name = "export_pts.asc"); protected: - virtual void Do()=0; - const TopoDS_Shape &_Shape; - const MeshKernel &_Mesh; - result_type mvEdgeSplitPoints; - + virtual void Do() = 0; + const TopoDS_Shape& _Shape; + const MeshKernel& _Mesh; + result_type mvEdgeSplitPoints; }; @@ -88,44 +92,48 @@ protected: class MeshPartExport CurveProjectorShape: public CurveProjector { public: - CurveProjectorShape(const TopoDS_Shape &aShape, const MeshKernel &pMesh); - ~CurveProjectorShape() override = default; + CurveProjectorShape(const TopoDS_Shape& aShape, const MeshKernel& pMesh); + ~CurveProjectorShape() override = default; - void projectCurve(const TopoDS_Edge& aEdge, - std::vector &vSplitEdges); - - bool findStartPoint(const MeshKernel &MeshK,const Base::Vector3f &Pnt,Base::Vector3f &Rslt,MeshCore::FacetIndex &FaceIndex); + void projectCurve(const TopoDS_Edge& aEdge, std::vector& vSplitEdges); + bool findStartPoint(const MeshKernel& MeshK, + const Base::Vector3f& Pnt, + Base::Vector3f& Rslt, + MeshCore::FacetIndex& FaceIndex); protected: - void Do() override; + void Do() override; }; - /** Project by projecting a sampled curve to the mesh */ class MeshPartExport CurveProjectorSimple: public CurveProjector { public: - CurveProjectorSimple(const TopoDS_Shape &aShape, const MeshKernel &pMesh); - ~CurveProjectorSimple() override = default; + CurveProjectorSimple(const TopoDS_Shape& aShape, const MeshKernel& pMesh); + ~CurveProjectorSimple() override = default; - /// helper to discredicice a Edge... - void GetSampledCurves( const TopoDS_Edge& aEdge, std::vector& rclPoints, unsigned long ulNbOfPoints = 30); + /// helper to discredicice a Edge... + void GetSampledCurves(const TopoDS_Edge& aEdge, + std::vector& rclPoints, + unsigned long ulNbOfPoints = 30); - void projectCurve(const TopoDS_Edge& aEdge, - const std::vector &rclPoints, - std::vector &vSplitEdges); - - bool findStartPoint(const MeshKernel &MeshK,const Base::Vector3f &Pnt,Base::Vector3f &Rslt,MeshCore::FacetIndex &FaceIndex); + void projectCurve(const TopoDS_Edge& aEdge, + const std::vector& rclPoints, + std::vector& vSplitEdges); + bool findStartPoint(const MeshKernel& MeshK, + const Base::Vector3f& Pnt, + Base::Vector3f& Rslt, + MeshCore::FacetIndex& FaceIndex); protected: - void Do() override; + void Do() override; }; /** Project by projecting a sampled curve to the mesh @@ -133,22 +141,25 @@ protected: class MeshPartExport CurveProjectorWithToolMesh: public CurveProjector { public: - struct LineSeg { - Base::Vector3f p; - Base::Vector3f n; - }; + struct LineSeg + { + Base::Vector3f p; + Base::Vector3f n; + }; - CurveProjectorWithToolMesh(const TopoDS_Shape &aShape, const MeshKernel &pMesh,MeshKernel &rToolMesh); - ~CurveProjectorWithToolMesh() override = default; + CurveProjectorWithToolMesh(const TopoDS_Shape& aShape, + const MeshKernel& pMesh, + MeshKernel& rToolMesh); + ~CurveProjectorWithToolMesh() override = default; - void makeToolMesh(const TopoDS_Edge& aEdge,std::vector &cVAry ); + void makeToolMesh(const TopoDS_Edge& aEdge, std::vector& cVAry); - MeshKernel &ToolMesh; + MeshKernel& ToolMesh; protected: - void Do() override; + void Do() override; }; /** @@ -162,7 +173,7 @@ public: struct SplitEdge { MeshCore::PointIndex uE0, uE1; /**< start and endpoint of an edge */ - Base::Vector3f cPt; /**< Point on edge (\a uE0, \a uE1) */ + Base::Vector3f cPt; /**< Point on edge (\a uE0, \a uE1) */ }; struct Edge { @@ -184,49 +195,66 @@ public: * @param dir * @param parameters */ - void findSectionParameters(const TopoDS_Edge& edge, const Base::Vector3f& dir, std::set& parameters) const; - void discretize(const TopoDS_Edge& aEdge, std::vector& polyline, std::size_t minPoints=2) const; + void findSectionParameters(const TopoDS_Edge& edge, + const Base::Vector3f& dir, + std::set& parameters) const; + void discretize(const TopoDS_Edge& aEdge, + std::vector& polyline, + std::size_t minPoints = 2) const; /** - * Searches all edges that intersect with the projected curve \a aShape. Therefore \a aShape must - * contain shapes of type TopoDS_Edge, other shape types are ignored. A possible solution is - * taken if the distance between the curve point and the projected point is <= \a fMaxDist. + * Searches all edges that intersect with the projected curve \a aShape. Therefore \a aShape + * must contain shapes of type TopoDS_Edge, other shape types are ignored. A possible solution + * is taken if the distance between the curve point and the projected point is <= \a fMaxDist. */ - void projectToMesh (const TopoDS_Shape &aShape, float fMaxDist, std::vector& rPolyLines) const; + void projectToMesh(const TopoDS_Shape& aShape, + float fMaxDist, + std::vector& rPolyLines) const; /** * @brief projectOnMesh - * Projects the given points onto the mesh along a given direction. The points can can be projected - * will be saved to \a pointsOut + * Projects the given points onto the mesh along a given direction. The points can can be + * projected will be saved to \a pointsOut * @brief projectOnMesh * @param pointsIn * @param dir * @param tolerance * @param pointsOut */ - void projectOnMesh(const std::vector& pointsIn, const Base::Vector3f& dir, - float tolerance, std::vector& pointsOut) const; + void projectOnMesh(const std::vector& pointsIn, + const Base::Vector3f& dir, + float tolerance, + std::vector& pointsOut) const; /** * Project all edges of the shape onto the mesh using parallel projection. */ - void projectParallelToMesh (const TopoDS_Shape &aShape, const Base::Vector3f& dir, std::vector& rPolyLines) const; + void projectParallelToMesh(const TopoDS_Shape& aShape, + const Base::Vector3f& dir, + std::vector& rPolyLines) const; /** * Project all polylines onto the mesh using parallel projection. */ - void projectParallelToMesh (const std::vector& aEdges, const Base::Vector3f& dir, std::vector& rPolyLines) const; + void projectParallelToMesh(const std::vector& aEdges, + const Base::Vector3f& dir, + std::vector& rPolyLines) const; /** - * Cuts the mesh at the curve defined by \a aShape. This method call @ref projectToMesh() to get the - * split the facet at the found points. @see projectToMesh() for more details. + * Cuts the mesh at the curve defined by \a aShape. This method call @ref projectToMesh() to get + * the split the facet at the found points. @see projectToMesh() for more details. */ - void splitMeshByShape (const TopoDS_Shape &aShape, float fMaxDist) const; + void splitMeshByShape(const TopoDS_Shape& aShape, float fMaxDist) const; protected: - void projectEdgeToEdge(const TopoDS_Edge &aCurve, float fMaxDist, const MeshCore::MeshFacetGrid& rGrid, + void projectEdgeToEdge(const TopoDS_Edge& aCurve, + float fMaxDist, + const MeshCore::MeshFacetGrid& rGrid, std::vector& rSplitEdges) const; - bool findIntersection(const Edge&, const Edge&, const Base::Vector3f& dir, Base::Vector3f& res) const; + bool findIntersection(const Edge&, + const Edge&, + const Base::Vector3f& dir, + Base::Vector3f& res) const; private: const MeshKernel& _rcMesh; }; -} // namespace MeshPart +} // namespace MeshPart #endif diff --git a/src/Mod/MeshPart/App/MeshAlgos.cpp b/src/Mod/MeshPart/App/MeshAlgos.cpp index f812be8d21..150cb252cc 100644 --- a/src/Mod/MeshPart/App/MeshAlgos.cpp +++ b/src/Mod/MeshPart/App/MeshAlgos.cpp @@ -22,13 +22,13 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# ifdef FC_OS_LINUX -# include -# endif +#ifdef FC_OS_LINUX +#include +#endif #endif -#include #include +#include #include #include #include @@ -43,66 +43,74 @@ using namespace MeshCore; void MeshAlgos::offset(MeshCore::MeshKernel* Mesh, float fSize) { - std::vector normals = Mesh->CalcVertexNormals(); + std::vector normals = Mesh->CalcVertexNormals(); - unsigned int i = 0; - // go through all the Vertex normals - for(std::vector::iterator It= normals.begin();It != normals.end();++It,i++) - // and move each mesh point in the normal direction - Mesh->MovePoint(i,It->Normalize() * fSize); - Mesh->RecalcBoundBox(); + unsigned int i = 0; + // go through all the Vertex normals + for (std::vector::iterator It = normals.begin(); It != normals.end(); + ++It, i++) { + // and move each mesh point in the normal direction + Mesh->MovePoint(i, It->Normalize() * fSize); + } + Mesh->RecalcBoundBox(); } - void MeshAlgos::offsetSpecial2(MeshCore::MeshKernel* Mesh, float fSize) { Base::Builder3D builder; - std::vector PointNormals= Mesh->CalcVertexNormals(); + std::vector PointNormals = Mesh->CalcVertexNormals(); std::vector FaceNormals; std::set fliped; MeshFacetIterator it(*Mesh); - for ( it.Init(); it.More(); it.Next() ) + for (it.Init(); it.More(); it.Next()) { FaceNormals.push_back(it->GetNormal().Normalize()); + } unsigned int i = 0; // go through all the Vertex normals - for(std::vector::iterator It= PointNormals.begin();It != PointNormals.end();++It,i++) { - Base::Line3f line{Mesh->GetPoint(i), Mesh->GetPoint(i) + It->Normalize() * fSize}; + for (std::vector::iterator It = PointNormals.begin(); It != PointNormals.end(); + ++It, i++) { + Base::Line3f line {Mesh->GetPoint(i), Mesh->GetPoint(i) + It->Normalize() * fSize}; Base::DrawStyle drawStyle; - builder.addNode(Base::LineItem{line, drawStyle}); + builder.addNode(Base::LineItem {line, drawStyle}); // and move each mesh point in the normal direction - Mesh->MovePoint(i,It->Normalize() * fSize); + Mesh->MovePoint(i, It->Normalize() * fSize); } Mesh->RecalcBoundBox(); MeshTopoAlgorithm alg(*Mesh); - for(int l= 0; l<1 ;l++){ - for ( it.Init(),i=0; it.More(); it.Next(),i++ ) - { - if(it->IsFlag(MeshFacet::INVALID)) + for (int l = 0; l < 1; l++) { + for (it.Init(), i = 0; it.More(); it.Next(), i++) { + if (it->IsFlag(MeshFacet::INVALID)) { continue; + } // calculate the angle between them - float angle = acos((FaceNormals[i] * it->GetNormal()) / (it->GetNormal().Length() * FaceNormals[i].Length())); - if (angle > 1.6){ + float angle = acos((FaceNormals[i] * it->GetNormal()) + / (it->GetNormal().Length() * FaceNormals[i].Length())); + if (angle > 1.6) { Base::DrawStyle drawStyle; drawStyle.pointSize = 4.0F; - Base::PointItem item{it->GetGravityPoint(), drawStyle, Base::ColorRGB{1.0F, 0.0F, 0.0F}}; + Base::PointItem item {it->GetGravityPoint(), + drawStyle, + Base::ColorRGB {1.0F, 0.0F, 0.0F}}; builder.addNode(item); fliped.insert(it.Position()); } } // if there are no flipped triangles -> stop - //int f =fliped.size(); - if(fliped.empty()) + // int f =fliped.size(); + if (fliped.empty()) { break; + } - for(MeshCore::FacetIndex It : fliped) + for (MeshCore::FacetIndex It : fliped) { alg.CollapseFacet(It); + } fliped.clear(); } @@ -110,56 +118,59 @@ void MeshAlgos::offsetSpecial2(MeshCore::MeshKernel* Mesh, float fSize) // search for intersected facets MeshCore::MeshEvalSelfIntersection eval(*Mesh); - std::vector > faces; + std::vector> faces; eval.GetIntersections(faces); builder.saveToLog(); - } void MeshAlgos::offsetSpecial(MeshCore::MeshKernel* Mesh, float fSize, float zmax, float zmin) { - std::vector normals = Mesh->CalcVertexNormals(); + std::vector normals = Mesh->CalcVertexNormals(); - unsigned int i = 0; - // go through all the Vertex normals - for(std::vector::iterator It= normals.begin();It != normals.end();++It,i++) - { - Base::Vector3f Pnt = Mesh->GetPoint(i); + unsigned int i = 0; + // go through all the Vertex normals + for (std::vector::iterator It = normals.begin(); It != normals.end(); + ++It, i++) { + Base::Vector3f Pnt = Mesh->GetPoint(i); - if(Pnt.z < zmax && Pnt.z > zmin) - { - Pnt.z = 0; - Mesh->MovePoint(i,Pnt.Normalize() * fSize); - }else - // and move each mesh point in the normal direction - Mesh->MovePoint(i,It->Normalize() * fSize); - } + if (Pnt.z < zmax && Pnt.z > zmin) { + Pnt.z = 0; + Mesh->MovePoint(i, Pnt.Normalize() * fSize); + } + else { + // and move each mesh point in the normal direction + Mesh->MovePoint(i, It->Normalize() * fSize); + } + } } void MeshAlgos::coarsen(MeshCore::MeshKernel* /*Mesh*/, float /*f*/) { #ifdef FC_USE_GTS - GtsSurface * surface; + GtsSurface* surface; - // create a GTS surface - surface = MeshAlgos::createGTSSurface(Mesh); + // create a GTS surface + surface = MeshAlgos::createGTSSurface(Mesh); - Mesh->Clear(); + Mesh->Clear(); - guint stop_number=100000; - gdouble fold = 3.1415 / 180.; + guint stop_number = 100000; + gdouble fold = 3.1415 / 180.; - gts_surface_coarsen (surface, - NULL, NULL, - NULL, NULL, - (GtsStopFunc)gts_coarsen_stop_number, - &stop_number, fold); + gts_surface_coarsen(surface, + NULL, + NULL, + NULL, + NULL, + (GtsStopFunc)gts_coarsen_stop_number, + &stop_number, + fold); - // get the standard mesh - fillMeshFromGTSSurface(Mesh,surface); + // get the standard mesh + fillMeshFromGTSSurface(Mesh, surface); #endif } @@ -170,143 +181,142 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, int /*Type*/) { #ifdef FC_USE_GTS - GtsSurface * s1, * s2, * s3; - GtsSurfaceInter * si; - GNode * tree1, * tree2; - gboolean check_self_intersection = false; - gboolean closed = true, is_open1, is_open2; + GtsSurface *s1, *s2, *s3; + GtsSurfaceInter* si; + GNode *tree1, *tree2; + gboolean check_self_intersection = false; + gboolean closed = true, is_open1, is_open2; - // create a GTS surface - s1 = MeshAlgos::createGTSSurface(pMesh1); - s2 = MeshAlgos::createGTSSurface(pMesh2); + // create a GTS surface + s1 = MeshAlgos::createGTSSurface(pMesh1); + s2 = MeshAlgos::createGTSSurface(pMesh2); - // clear the mesh (memory) - //Mesh1.clear(); - //Mesh2.clear(); + // clear the mesh (memory) + // Mesh1.clear(); + // Mesh2.clear(); - /* check that the surfaces are orientable manifolds */ - if (!gts_surface_is_orientable (s1)) { - gts_object_destroy (GTS_OBJECT (s1)); - gts_object_destroy (GTS_OBJECT (s2)); - throw std::runtime_error("surface 1 is not an orientable manifold\n"); - } - if (!gts_surface_is_orientable (s2)) { - gts_object_destroy (GTS_OBJECT (s1)); - gts_object_destroy (GTS_OBJECT (s2)); - throw std::runtime_error("surface 2 is not an orientable manifold\n"); - } - - /* check that the surfaces are not self-intersecting */ - if (check_self_intersection) { - GtsSurface * self_intersects; - - self_intersects = gts_surface_is_self_intersecting (s1); - if (self_intersects != NULL) { -// if (verbose) -// gts_surface_print_stats (self_intersects, stderr); -// gts_surface_write (self_intersects, stdout); - gts_object_destroy (GTS_OBJECT (self_intersects)); - gts_object_destroy (GTS_OBJECT (s1)); - gts_object_destroy (GTS_OBJECT (s2)); - throw std::runtime_error("surface is self-intersecting\n"); + /* check that the surfaces are orientable manifolds */ + if (!gts_surface_is_orientable(s1)) { + gts_object_destroy(GTS_OBJECT(s1)); + gts_object_destroy(GTS_OBJECT(s2)); + throw std::runtime_error("surface 1 is not an orientable manifold\n"); } - self_intersects = gts_surface_is_self_intersecting (s2); - if (self_intersects != NULL) { -// if (verbose) -// gts_surface_print_stats (self_intersects, stderr); -// gts_surface_write (self_intersects, stdout); - gts_object_destroy (GTS_OBJECT (self_intersects)); - gts_object_destroy (GTS_OBJECT (s1)); - gts_object_destroy (GTS_OBJECT (s2)); - throw std::runtime_error("surface is self-intersecting\n"); + if (!gts_surface_is_orientable(s2)) { + gts_object_destroy(GTS_OBJECT(s1)); + gts_object_destroy(GTS_OBJECT(s2)); + throw std::runtime_error("surface 2 is not an orientable manifold\n"); } - } - /* build bounding box tree for first surface */ - tree1 = gts_bb_tree_surface (s1); - is_open1 = gts_surface_volume (s1) < 0. ? true : false; + /* check that the surfaces are not self-intersecting */ + if (check_self_intersection) { + GtsSurface* self_intersects; - /* build bounding box tree for second surface */ - tree2 = gts_bb_tree_surface (s2); - is_open2 = gts_surface_volume (s2) < 0. ? true : false; - - si = gts_surface_inter_new (gts_surface_inter_class (), - s1, s2, tree1, tree2, is_open1, is_open2); - g_assert (gts_surface_inter_check (si, &closed)); - if (!closed) { - gts_object_destroy (GTS_OBJECT (s1)); - gts_object_destroy (GTS_OBJECT (s2)); - gts_bb_tree_destroy (tree1, true); - gts_bb_tree_destroy (tree2, true); - throw"the intersection of 1 and 2 is not a closed curve\n"; - } - - s3 = gts_surface_new (gts_surface_class (), - gts_face_class (), - gts_edge_class (), - gts_vertex_class ()); - if (Type==0) { // union - gts_surface_inter_boolean (si, s3, GTS_1_OUT_2); - gts_surface_inter_boolean (si, s3, GTS_2_OUT_1); - } - else if (Type==1) { // inter - gts_surface_inter_boolean (si, s3, GTS_1_IN_2); - gts_surface_inter_boolean (si, s3, GTS_2_IN_1); - } - else if (Type==2) { //diff - gts_surface_inter_boolean (si, s3, GTS_1_OUT_2); - gts_surface_inter_boolean (si, s3, GTS_2_IN_1); - gts_surface_foreach_face (si->s2, (GtsFunc) gts_triangle_revert, NULL); - gts_surface_foreach_face (s2, (GtsFunc) gts_triangle_revert, NULL); - } - else if (Type==3) { // cut inner - gts_surface_inter_boolean (si, s3, GTS_1_IN_2); - } - else if (Type==4) { // cut outer - gts_surface_inter_boolean (si, s3, GTS_1_OUT_2); - } - - // check that the resulting surface is not self-intersecting - if (check_self_intersection) { - GtsSurface * self_intersects; - - self_intersects = gts_surface_is_self_intersecting (s3); - if (self_intersects != NULL) { -// if (verbose) -// gts_surface_print_stats (self_intersects, stderr); -// gts_surface_write (self_intersects, stdout); - gts_object_destroy (GTS_OBJECT (self_intersects)); - gts_object_destroy (GTS_OBJECT (s1)); - gts_object_destroy (GTS_OBJECT (s2)); - gts_object_destroy (GTS_OBJECT (s3)); - gts_object_destroy (GTS_OBJECT (si)); - gts_bb_tree_destroy (tree1, true); - gts_bb_tree_destroy (tree2, true); - throw std::runtime_error("the resulting surface is self-intersecting\n"); + self_intersects = gts_surface_is_self_intersecting(s1); + if (self_intersects != NULL) { + // if (verbose) + // gts_surface_print_stats (self_intersects, stderr); + // gts_surface_write (self_intersects, stdout); + gts_object_destroy(GTS_OBJECT(self_intersects)); + gts_object_destroy(GTS_OBJECT(s1)); + gts_object_destroy(GTS_OBJECT(s2)); + throw std::runtime_error("surface is self-intersecting\n"); + } + self_intersects = gts_surface_is_self_intersecting(s2); + if (self_intersects != NULL) { + // if (verbose) + // gts_surface_print_stats (self_intersects, stderr); + // gts_surface_write (self_intersects, stdout); + gts_object_destroy(GTS_OBJECT(self_intersects)); + gts_object_destroy(GTS_OBJECT(s1)); + gts_object_destroy(GTS_OBJECT(s2)); + throw std::runtime_error("surface is self-intersecting\n"); + } } - } - // display summary information about the resulting surface -// if (verbose) -// gts_surface_print_stats (s3, stderr); - // write resulting surface to standard output - // get the standard mesh - fillMeshFromGTSSurface(pResult,s3); + /* build bounding box tree for first surface */ + tree1 = gts_bb_tree_surface(s1); + is_open1 = gts_surface_volume(s1) < 0. ? true : false; + + /* build bounding box tree for second surface */ + tree2 = gts_bb_tree_surface(s2); + is_open2 = gts_surface_volume(s2) < 0. ? true : false; + + si = gts_surface_inter_new(gts_surface_inter_class(), s1, s2, tree1, tree2, is_open1, is_open2); + g_assert(gts_surface_inter_check(si, &closed)); + if (!closed) { + gts_object_destroy(GTS_OBJECT(s1)); + gts_object_destroy(GTS_OBJECT(s2)); + gts_bb_tree_destroy(tree1, true); + gts_bb_tree_destroy(tree2, true); + throw "the intersection of 1 and 2 is not a closed curve\n"; + } + + s3 = gts_surface_new(gts_surface_class(), + gts_face_class(), + gts_edge_class(), + gts_vertex_class()); + if (Type == 0) { // union + gts_surface_inter_boolean(si, s3, GTS_1_OUT_2); + gts_surface_inter_boolean(si, s3, GTS_2_OUT_1); + } + else if (Type == 1) { // inter + gts_surface_inter_boolean(si, s3, GTS_1_IN_2); + gts_surface_inter_boolean(si, s3, GTS_2_IN_1); + } + else if (Type == 2) { // diff + gts_surface_inter_boolean(si, s3, GTS_1_OUT_2); + gts_surface_inter_boolean(si, s3, GTS_2_IN_1); + gts_surface_foreach_face(si->s2, (GtsFunc)gts_triangle_revert, NULL); + gts_surface_foreach_face(s2, (GtsFunc)gts_triangle_revert, NULL); + } + else if (Type == 3) { // cut inner + gts_surface_inter_boolean(si, s3, GTS_1_IN_2); + } + else if (Type == 4) { // cut outer + gts_surface_inter_boolean(si, s3, GTS_1_OUT_2); + } + + // check that the resulting surface is not self-intersecting + if (check_self_intersection) { + GtsSurface* self_intersects; + + self_intersects = gts_surface_is_self_intersecting(s3); + if (self_intersects != NULL) { + // if (verbose) + // gts_surface_print_stats (self_intersects, stderr); + // gts_surface_write (self_intersects, stdout); + gts_object_destroy(GTS_OBJECT(self_intersects)); + gts_object_destroy(GTS_OBJECT(s1)); + gts_object_destroy(GTS_OBJECT(s2)); + gts_object_destroy(GTS_OBJECT(s3)); + gts_object_destroy(GTS_OBJECT(si)); + gts_bb_tree_destroy(tree1, true); + gts_bb_tree_destroy(tree2, true); + throw std::runtime_error("the resulting surface is self-intersecting\n"); + } + } + // display summary information about the resulting surface + // if (verbose) + // gts_surface_print_stats (s3, stderr); + // write resulting surface to standard output + + // get the standard mesh + fillMeshFromGTSSurface(pResult, s3); - // destroy surfaces - gts_object_destroy (GTS_OBJECT (s1)); - gts_object_destroy (GTS_OBJECT (s2)); -// gts_object_destroy (GTS_OBJECT (s3)); -// gts_object_destroy (GTS_OBJECT (si)); + // destroy surfaces + gts_object_destroy(GTS_OBJECT(s1)); + gts_object_destroy(GTS_OBJECT(s2)); + // gts_object_destroy (GTS_OBJECT (s3)); + // gts_object_destroy (GTS_OBJECT (si)); - // destroy bounding box trees (including bounding boxes) -// gts_bb_tree_destroy (tree1, true); -// gts_bb_tree_destroy (tree2, true); + // destroy bounding box trees (including bounding boxes) + // gts_bb_tree_destroy (tree1, true); + // gts_bb_tree_destroy (tree2, true); #endif - return pMesh1; + return pMesh1; } @@ -314,70 +324,70 @@ MeshCore::MeshKernel* MeshAlgos::boolean(MeshCore::MeshKernel* pMesh1, /// helper function - construct a Edge out of two Vertexes if not already there -static GtsEdge * new_edge (GtsVertex * v1, GtsVertex * v2) +static GtsEdge* new_edge(GtsVertex* v1, GtsVertex* v2) { - GtsSegment * s = gts_vertices_are_connected (v1, v2); - if( s == NULL ) - return gts_edge_new (gts_edge_class (), v1, v2); - else - return GTS_EDGE (s); + GtsSegment* s = gts_vertices_are_connected(v1, v2); + if (s == NULL) { + return gts_edge_new(gts_edge_class(), v1, v2); + } + else { + return GTS_EDGE(s); + } } GtsSurface* MeshAlgos::createGTSSurface(MeshCore::MeshKernel* Mesh) { - GtsSurface* Surf = gts_surface_new (gts_surface_class (), - gts_face_class (), - gts_edge_class (), - gts_vertex_class () ); + GtsSurface* Surf = gts_surface_new(gts_surface_class(), + gts_face_class(), + gts_edge_class(), + gts_vertex_class()); - unsigned long p1,p2,p3; - Base::Vector3f Vertex; + unsigned long p1, p2, p3; + Base::Vector3f Vertex; - // Getting all the points - GtsVertex ** aVertex = (GtsVertex **) malloc(Mesh->CountPoints() * sizeof (GtsVertex *)); - for (unsigned int PIter = 0;PIter < Mesh->CountPoints(); PIter++) - { - Vertex = Mesh->GetPoint(PIter); - aVertex[PIter] = gts_vertex_new (gts_vertex_class (), Vertex.x, Vertex.y, Vertex.z); - } + // Getting all the points + GtsVertex** aVertex = (GtsVertex**)malloc(Mesh->CountPoints() * sizeof(GtsVertex*)); + for (unsigned int PIter = 0; PIter < Mesh->CountPoints(); PIter++) { + Vertex = Mesh->GetPoint(PIter); + aVertex[PIter] = gts_vertex_new(gts_vertex_class(), Vertex.x, Vertex.y, Vertex.z); + } // cycling through the facets - for (unsigned int pFIter = 0;pFIter < Mesh->CountFacets(); pFIter++) - { - // getting the three points of the facet - Mesh->GetFacetPoints(pFIter,p1,p2,p3); + for (unsigned int pFIter = 0; pFIter < Mesh->CountFacets(); pFIter++) { + // getting the three points of the facet + Mesh->GetFacetPoints(pFIter, p1, p2, p3); - // creating the edges and add the face to the surface - gts_surface_add_face (Surf, - gts_face_new (Surf->face_class, - new_edge (aVertex[p1],aVertex[p2]), - new_edge (aVertex[p2],aVertex[p3]), - new_edge (aVertex[p3],aVertex[p1]))); - } + // creating the edges and add the face to the surface + gts_surface_add_face(Surf, + gts_face_new(Surf->face_class, + new_edge(aVertex[p1], aVertex[p2]), + new_edge(aVertex[p2], aVertex[p3]), + new_edge(aVertex[p3], aVertex[p1]))); + } - Base::Console().Log("GTS [%d faces, %d Points, %d Edges,%s ,%s]\n",gts_surface_face_number(Surf), - gts_surface_vertex_number(Surf), - gts_surface_edge_number(Surf), - gts_surface_is_orientable (Surf)?"orientable":"not orientable", - gts_surface_is_self_intersecting(Surf)?"self-intersections":"no self-intersection" ); - - return Surf; + Base::Console().Log("GTS [%d faces, %d Points, %d Edges,%s ,%s]\n", + gts_surface_face_number(Surf), + gts_surface_vertex_number(Surf), + gts_surface_edge_number(Surf), + gts_surface_is_orientable(Surf) ? "orientable" : "not orientable", + gts_surface_is_self_intersecting(Surf) ? "self-intersections" + : "no self-intersection"); + return Surf; } /// helper function for the face (triangle iteration -static void onFaces (GtsTriangle * t, std::vector *VAry ) +static void onFaces(GtsTriangle* t, std::vector* VAry) { - GtsVertex *mv0,*mv1,*mv2; + GtsVertex *mv0, *mv1, *mv2; - gts_triangle_vertices (t,&mv0,&mv1,&mv2); - - VAry->push_back(MeshGeomFacet(Base::Vector3f(mv0->p.x,mv0->p.y,mv0->p.z), - Base::Vector3f(mv1->p.x,mv1->p.y,mv1->p.z), - Base::Vector3f(mv2->p.x,mv2->p.y,mv2->p.z))); + gts_triangle_vertices(t, &mv0, &mv1, &mv2); + VAry->push_back(MeshGeomFacet(Base::Vector3f(mv0->p.x, mv0->p.y, mv0->p.z), + Base::Vector3f(mv1->p.x, mv1->p.y, mv1->p.z), + Base::Vector3f(mv2->p.x, mv2->p.y, mv2->p.z))); } /* @@ -388,55 +398,54 @@ static void onVertices(GtsVertex *v, MeshKernel *pKernel ) void MeshAlgos::fillMeshFromGTSSurface(MeshCore::MeshKernel* pMesh, GtsSurface* pSurface) { - std::vector VAry; + std::vector VAry; - // remove old mesh - pMesh->Clear(); + // remove old mesh + pMesh->Clear(); -// gts_surface_foreach_vertex(pSurface,(GtsFunc) onVertices,&MeshK); - gts_surface_foreach_face (pSurface, (GtsFunc) onFaces,&VAry); + // gts_surface_foreach_vertex(pSurface,(GtsFunc) onVertices,&MeshK); + gts_surface_foreach_face(pSurface, (GtsFunc)onFaces, &VAry); - // destroy surfaces - gts_object_destroy (GTS_OBJECT (pSurface)); - - // put the facets the simple way in the mesh, totp is recalculated! - (*pMesh) = VAry; + // destroy surfaces + gts_object_destroy(GTS_OBJECT(pSurface)); + // put the facets the simple way in the mesh, totp is recalculated! + (*pMesh) = VAry; } #endif -#include -#include -#include -#include -#include -#include -#include -#include #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include -void MeshAlgos::cutByShape(const TopoDS_Shape &aShape,const MeshCore::MeshKernel* pMesh,MeshCore::MeshKernel* pToolMesh) +void MeshAlgos::cutByShape(const TopoDS_Shape& aShape, + const MeshCore::MeshKernel* pMesh, + MeshCore::MeshKernel* pToolMesh) { - // calculate the projection for each Edge -// CurveProjectorShape Project(aShape,*pMesh); - CurveProjectorWithToolMesh Project(aShape,*pMesh,*pToolMesh); - - //IntersectionLine Lines; -// MeshWithProperty *ResultMesh = new MeshWithProperty(); - - - // boolean(pMesh,ToolMesh,ResultMesh,1); + // calculate the projection for each Edge + // CurveProjectorShape Project(aShape,*pMesh); + CurveProjectorWithToolMesh Project(aShape, *pMesh, *pToolMesh); + // IntersectionLine Lines; + // MeshWithProperty *ResultMesh = new MeshWithProperty(); + // boolean(pMesh,ToolMesh,ResultMesh,1); } /* -void MeshAlgos::doIntersection(const MeshWithProperty &pMesh,const MeshWithProperty ToolMesh,IntersectionLine &Lines) +void MeshAlgos::doIntersection(const MeshWithProperty &pMesh,const MeshWithProperty +ToolMesh,IntersectionLine &Lines) { @@ -444,140 +453,145 @@ void MeshAlgos::doIntersection(const MeshWithProperty &pMesh,const MeshWithPrope */ -void MeshAlgos::cutByCurve(MeshCore::MeshKernel* pMesh,const std::vector &vSplitEdges) +void MeshAlgos::cutByCurve(MeshCore::MeshKernel* pMesh, + const std::vector& vSplitEdges) { - MeshTopoAlgorithm cTopAlg(*pMesh); + MeshTopoAlgorithm cTopAlg(*pMesh); - for (const auto & it : vSplitEdges) - { - cTopAlg.SplitFacet( it.ulFaceIndex, it.p1, it.p2 ); - } + for (const auto& it : vSplitEdges) { + cTopAlg.SplitFacet(it.ulFaceIndex, it.p1, it.p2); + } } class _VertexCompare { - public: - bool operator () (const TopoDS_Vertex &rclV1, const TopoDS_Vertex &rclV2) const +public: + bool operator()(const TopoDS_Vertex& rclV1, const TopoDS_Vertex& rclV2) const { - if (rclV1.IsSame(rclV2) == Standard_True) - return false; + if (rclV1.IsSame(rclV2) == Standard_True) { + return false; + } - gp_XYZ clP1 = BRep_Tool::Pnt(rclV1).XYZ(); - gp_XYZ clP2 = BRep_Tool::Pnt(rclV2).XYZ(); + gp_XYZ clP1 = BRep_Tool::Pnt(rclV1).XYZ(); + gp_XYZ clP2 = BRep_Tool::Pnt(rclV2).XYZ(); - if (fabs(clP1.X() - clP2.X()) < dE) - { - if (fabs(clP1.Y() - clP2.Y()) < dE) - return clP1.Z() < clP2.Z(); - else - return clP1.Y() < clP2.Y(); - } - else - return clP1.X() < clP2.X(); + if (fabs(clP1.X() - clP2.X()) < dE) { + if (fabs(clP1.Y() - clP2.Y()) < dE) { + return clP1.Z() < clP2.Z(); + } + else { + return clP1.Y() < clP2.Y(); + } + } + else { + return clP1.X() < clP2.X(); + } } double dE = 1.0e-5; }; - -void MeshAlgos::LoftOnCurve(MeshCore::MeshKernel &ResultMesh, const TopoDS_Shape &Shape, const std::vector &poly, const Base::Vector3f & up, float MaxSize) +void MeshAlgos::LoftOnCurve(MeshCore::MeshKernel& ResultMesh, + const TopoDS_Shape& Shape, + const std::vector& poly, + const Base::Vector3f& up, + float MaxSize) { - TopExp_Explorer Ex; - Standard_Real fBegin, fEnd; - std::vector cVAry; - std::map,_VertexCompare> ConnectMap; + TopExp_Explorer Ex; + Standard_Real fBegin, fEnd; + std::vector cVAry; + std::map, _VertexCompare> ConnectMap; - for (Ex.Init(Shape, TopAbs_EDGE); Ex.More(); Ex.Next()) - { - // get the edge and the belonging Vertexes - TopoDS_Edge Edge = (TopoDS_Edge&)Ex.Current(); - TopoDS_Vertex V1, V2; - TopExp::Vertices(Edge, V1, V2); - bool bBegin = false,bEnd = false; - // getting the geometric curve and the interval - GeomLProp_CLProps prop(BRep_Tool::Curve(Edge,fBegin,fEnd),1,0.0000000001); - int res = int((fEnd - fBegin)/MaxSize); - // do at least 2 segments - if(res < 2) - res = 2; - gp_Dir Tangent; - - std::vector prePoint(poly.size()); - std::vector actPoint(poly.size()); - - // checking if there is already a end to connect - if(ConnectMap.find(V1) != ConnectMap.end() ){ - bBegin = true; - prePoint = ConnectMap[V1]; - } - - if(ConnectMap.find(V2) != ConnectMap.end() ) - bEnd = true; - - for (long i = 0; i < res; i++) - { - - // get point and tangent at the position, up is fix for the moment - prop.SetParameter(fBegin + ((fEnd - fBegin) * float(i)) / float(res-1)); - prop.Tangent(Tangent); - Base::Vector3f Tng((float)Tangent.X(), - (float)Tangent.Y(), - (float)Tangent.Z()); - Base::Vector3f Ptn((float)prop.Value().X(), - (float)prop.Value().Y(), - (float)prop.Value().Z()); - Base::Vector3f Up (up); - // normalize and calc the third vector of the plane coordinatesystem - Tng.Normalize(); - Up.Normalize(); - Base::Vector3f Third(Tng%Up); - -// Base::Console().Log("Pos: %f %f %f \n",Ptn.x,Ptn.y,Ptn.z); - - unsigned int l=0; - std::vector::const_iterator It; - - // got through the profile - for(It=poly.begin();It!=poly.end();++It,l++) - actPoint[l] = ((Third*It->x)+(Up*It->y)+(Tng*It->z)+Ptn); - - if(i == res-1 && !bEnd) - // remember the last row to connect to a otger edge with the same vertex - ConnectMap[V2] = actPoint; - - if(i==1 && bBegin) - // using the end of an other edge as start - prePoint = ConnectMap[V1]; - - if(i==0 && !bBegin) - // remember the first row for connection to a edge with the same vertex - ConnectMap[V1] = actPoint; - - if(i ) // not the first row or something to connect to - { - for(l=0;l prePoint(poly.size()); + std::vector actPoint(poly.size()); + + // checking if there is already a end to connect + if (ConnectMap.find(V1) != ConnectMap.end()) { + bBegin = true; + prePoint = ConnectMap[V1]; + } + + if (ConnectMap.find(V2) != ConnectMap.end()) { + bEnd = true; + } + + for (long i = 0; i < res; i++) { + + // get point and tangent at the position, up is fix for the moment + prop.SetParameter(fBegin + ((fEnd - fBegin) * float(i)) / float(res - 1)); + prop.Tangent(Tangent); + Base::Vector3f Tng((float)Tangent.X(), (float)Tangent.Y(), (float)Tangent.Z()); + Base::Vector3f Ptn((float)prop.Value().X(), + (float)prop.Value().Y(), + (float)prop.Value().Z()); + Base::Vector3f Up(up); + // normalize and calc the third vector of the plane coordinatesystem + Tng.Normalize(); + Up.Normalize(); + Base::Vector3f Third(Tng % Up); + + // Base::Console().Log("Pos: %f %f %f \n",Ptn.x,Ptn.y,Ptn.z); + + unsigned int l = 0; + std::vector::const_iterator It; + + // got through the profile + for (It = poly.begin(); It != poly.end(); ++It, l++) { + actPoint[l] = ((Third * It->x) + (Up * It->y) + (Tng * It->z) + Ptn); + } + + if (i == res - 1 && !bEnd) { + // remember the last row to connect to a otger edge with the same vertex + ConnectMap[V2] = actPoint; + } + + if (i == 1 && bBegin) { + // using the end of an other edge as start + prePoint = ConnectMap[V1]; + } + + if (i == 0 && !bBegin) { + // remember the first row for connection to a edge with the same vertex + ConnectMap[V1] = actPoint; + } + + if (i) // not the first row or something to connect to + { + for (l = 0; l < actPoint.size(); l++) { + if (l) // not first point in row + { + if (i == res - 1 && bEnd) { // if last row and a end to connect + actPoint = ConnectMap[V2]; + } + + Base::Vector3f p1 = prePoint[l - 1], p2 = actPoint[l - 1], p3 = prePoint[l], + p4 = actPoint[l]; + + cVAry.emplace_back(p1, p2, p3); + cVAry.emplace_back(p3, p2, p4); + } + } + } + + prePoint = actPoint; + } } - } - - ResultMesh.AddFacets(cVAry); + ResultMesh.AddFacets(cVAry); } diff --git a/src/Mod/MeshPart/App/MeshAlgos.h b/src/Mod/MeshPart/App/MeshAlgos.h index 2e8b1827c4..e8cb0dd7b0 100644 --- a/src/Mod/MeshPart/App/MeshAlgos.h +++ b/src/Mod/MeshPart/App/MeshAlgos.h @@ -24,7 +24,7 @@ #define _MeshAlgos_h_ #ifdef FC_USE_GTS -# include +#include #endif #include @@ -50,61 +50,72 @@ namespace MeshPart class MeshPartExport MeshAlgos { public: - /** Calculate per Vertex normals and adds the Normal property bag - */ - static void offset(MeshCore::MeshKernel* Mesh, float fSize); - static void offsetSpecial2(MeshCore::MeshKernel* Mesh, float fSize); - static void offsetSpecial(MeshCore::MeshKernel* Mesh, float fSize, float zmax, float zmin); + /** Calculate per Vertex normals and adds the Normal property bag + */ + static void offset(MeshCore::MeshKernel* Mesh, float fSize); + static void offsetSpecial2(MeshCore::MeshKernel* Mesh, float fSize); + static void offsetSpecial(MeshCore::MeshKernel* Mesh, float fSize, float zmax, float zmin); - /** Coarsen the mesh - */ - static void coarsen(MeshCore::MeshKernel* Mesh, float f); + /** Coarsen the mesh + */ + static void coarsen(MeshCore::MeshKernel* Mesh, float f); - /** makes a boolean add - * The int Type stears the boolean oberation: 0=add;1=intersection;2=diff - */ - static MeshCore::MeshKernel* boolean(MeshCore::MeshKernel* Mesh1, MeshCore::MeshKernel* Mesh2, MeshCore::MeshKernel* pResult, int Type=0); + /** makes a boolean add + * The int Type stears the boolean oberation: 0=add;1=intersection;2=diff + */ + static MeshCore::MeshKernel* boolean(MeshCore::MeshKernel* Mesh1, + MeshCore::MeshKernel* Mesh2, + MeshCore::MeshKernel* pResult, + int Type = 0); #ifdef FC_USE_GTS - /** Creates a GTS Surface from a MeshKernel - */ - static GtsSurface* createGTSSurface(MeshCore::MeshKernel* Mesh); + /** Creates a GTS Surface from a MeshKernel + */ + static GtsSurface* createGTSSurface(MeshCore::MeshKernel* Mesh); - /** Creates a GTS Surface from a MeshKernel - */ + /** Creates a GTS Surface from a MeshKernel + */ - static void fillMeshFromGTSSurface(MeshCore::MeshKernel* pMesh, GtsSurface* pSurface); + static void fillMeshFromGTSSurface(MeshCore::MeshKernel* pMesh, GtsSurface* pSurface); #endif - static void cutByShape(const TopoDS_Shape &aShape,const MeshCore::MeshKernel* pMesh,MeshCore::MeshKernel* pToolMesh); + static void cutByShape(const TopoDS_Shape& aShape, + const MeshCore::MeshKernel* pMesh, + MeshCore::MeshKernel* pToolMesh); - /// helper to discredicice a Edge... - static void GetSampledCurves( const TopoDS_Edge& aEdge, std::vector& rclPoints, unsigned long ulNbOfPoints = 30); + /// helper to discredicice a Edge... + static void GetSampledCurves(const TopoDS_Edge& aEdge, + std::vector& rclPoints, + unsigned long ulNbOfPoints = 30); - /// creates a mesh loft on base of a curve and an up vector - static void LoftOnCurve(MeshCore::MeshKernel &ResultMesh,const TopoDS_Shape &Shape, const std::vector &poly, - const Base::Vector3f & up = Base::Vector3f(0,0,1), float MaxSize = 0.1); + /// creates a mesh loft on base of a curve and an up vector + static void LoftOnCurve(MeshCore::MeshKernel& ResultMesh, + const TopoDS_Shape& Shape, + const std::vector& poly, + const Base::Vector3f& up = Base::Vector3f(0, 0, 1), + float MaxSize = 0.1); - /* - struct FaceSplitEdge - { - unsigned long ulFaceIndex; - Base::Vector3f p1,p2; - }; - - static void projectCurve( MeshWithProperty* pMesh, - const TopoDS_Edge& aEdge, - const std::vector &rclPoints, - std::vector &vSplitEdges); -*/ - static void cutByCurve(MeshCore::MeshKernel* pMesh,const std::vector &vSplitEdges); -/* - static bool projectPointToMesh(MeshKernel &MeshK,const Base::Vector3f &Pnt,Base::Vector3f &Rslt,unsigned long &FaceIndex); -*/ + /* + struct FaceSplitEdge + { + unsigned long ulFaceIndex; + Base::Vector3f p1,p2; + }; + static void projectCurve( MeshWithProperty* pMesh, + const TopoDS_Edge& aEdge, + const std::vector &rclPoints, + std::vector &vSplitEdges); + */ + static void cutByCurve(MeshCore::MeshKernel* pMesh, + const std::vector& vSplitEdges); + /* + static bool projectPointToMesh(MeshKernel &MeshK,const Base::Vector3f &Pnt,Base::Vector3f + &Rslt,unsigned long &FaceIndex); + */ }; -} // namespace MeshPart +} // namespace MeshPart #endif diff --git a/src/Mod/MeshPart/App/MeshFlattening.cpp b/src/Mod/MeshPart/App/MeshFlattening.cpp index 9d1290373d..ba4384c490 100644 --- a/src/Mod/MeshPart/App/MeshFlattening.cpp +++ b/src/Mod/MeshPart/App/MeshFlattening.cpp @@ -22,17 +22,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include #endif #include "MeshFlattening.h" @@ -50,30 +50,30 @@ std::vector> getBoundaries(ColMat vertices, ColMat< std::vector> edge_vector; - for (long i=0; i hash {v1, v2}; hash_list.push_back(hash); - if (v1 < v2) - hash_map[hash] = std::vector{v1, v2, 0}; - else - hash_map[hash] = std::vector{v2, v1, 0}; + if (v1 < v2) { + hash_map[hash] = std::vector {v1, v2, 0}; + } + else { + hash_map[hash] = std::vector {v2, v1, 0}; + } } } - for (auto & hash: hash_list) + for (auto& hash : hash_list) { hash_map[hash][2] += 1; + } - for (auto &hash: hash_map) - { - if (hash.second[2] == 1) - { + for (auto& hash : hash_map) { + if (hash.second[2] == 1) { long v0 = hash.second[0]; long v1 = hash.second[1]; @@ -83,8 +83,7 @@ std::vector> getBoundaries(ColMat vertices, ColMat< } - while (neighbour_map.size() != 0) - { + while (neighbour_map.size() != 0) { long start_index = neighbour_map.begin()->first; long close_index = start_index; long next_index = neighbour_map[start_index][1]; @@ -94,33 +93,27 @@ std::vector> getBoundaries(ColMat vertices, ColMat< edge_vector_0.push_back(start_index); neighbour_map.erase(start_index); edge_vector_0.push_back(next_index); - while (next_index != close_index) - { + while (next_index != close_index) { temporary_next = neighbour_map[next_index][0]; - if (temporary_next != start_index) - { + if (temporary_next != start_index) { start_index = next_index; next_index = temporary_next; } - else - { + else { start_index = next_index; next_index = neighbour_map[start_index][1]; } neighbour_map.erase(start_index); edge_vector_0.push_back(next_index); - } edge_vector.push_back(edge_vector_0); } std::vector> edges; - for (auto &edge: edge_vector) - { + for (auto& edge : edge_vector) { ColMat edge_vertices; edge_vertices.resize(edge.size(), 3); int i = 0; - for (auto index: edge) - { + for (auto index : edge) { edge_vertices.row(i) = vertices.row(index); i++; } @@ -132,35 +125,33 @@ std::vector> getBoundaries(ColMat vertices, ColMat< FaceUnwrapper::FaceUnwrapper(const TopoDS_Face& face) { long i = 0; -// transform to nurbs: + // transform to nurbs: TopLoc_Location location; -// triangulate: - const Handle(Poly_Triangulation) &triangulation = BRep_Tool::Triangulation(face, location); + // triangulate: + const Handle(Poly_Triangulation)& triangulation = BRep_Tool::Triangulation(face, location); - if (triangulation.IsNull()) + if (triangulation.IsNull()) { throw std::runtime_error("null triangulation in face construction"); + } Standard_Integer numNodes = triangulation->NbNodes(); Standard_Integer numTriangles = triangulation->NbTriangles(); -// compute uv coordinates - if (triangulation->HasUVNodes()) - { + // compute uv coordinates + if (triangulation->HasUVNodes()) { this->uv_nodes.resize(numNodes, 2); i = 0; - for (Standard_Integer index = 1; index <= numNodes; ++index) - { + for (Standard_Integer index = 1; index <= numNodes; ++index) { const gp_Pnt2d& _uv_node = triangulation->UVNode(index); this->uv_nodes.row(i) << _uv_node.X(), _uv_node.Y(); i++; } } -// + // this->xyz_nodes.resize(numNodes, 3); i = 0; - for (Standard_Integer index = 1; index <= numNodes; ++index) - { + for (Standard_Integer index = 1; index <= numNodes; ++index) { gp_Pnt _node = triangulation->Node(index); this->xyz_nodes.row(i) << _node.X(), _node.Y(), _node.Z(); i++; @@ -168,45 +159,47 @@ FaceUnwrapper::FaceUnwrapper(const TopoDS_Face& face) this->tris.resize(numTriangles, 3); i = 0; - for (Standard_Integer index = 1; index <= numTriangles; ++index) - { + for (Standard_Integer index = 1; index <= numTriangles; ++index) { int n1, n2, n3; const Poly_Triangle& _tri = triangulation->Triangle(index); _tri.Get(n1, n2, n3); - this->tris.row(i) << n1-1, n2-1, n3-1; + this->tris.row(i) << n1 - 1, n2 - 1, n3 - 1; i++; } } void FaceUnwrapper::findFlatNodes(int steps, double val) { - std::vector fixed_pins; //TODO: INPUT - lscmrelax::LscmRelax mesh_flattener(this->xyz_nodes.transpose(), this->tris.transpose(), fixed_pins); + std::vector fixed_pins; // TODO: INPUT + lscmrelax::LscmRelax mesh_flattener(this->xyz_nodes.transpose(), + this->tris.transpose(), + fixed_pins); mesh_flattener.lscm(); - for (int j=0; jze_nodes = mesh_flattener.flat_vertices.transpose(); } ColMat FaceUnwrapper::interpolateFlatFace(const TopoDS_Face& face) { - if (this->uv_nodes.size() == 0) - throw(std::runtime_error("no uv-coordinates found, interpolating with nurbs is only possible if the Flattener was constructed with a nurbs.")); + if (this->uv_nodes.size() == 0) { + throw(std::runtime_error("no uv-coordinates found, interpolating with nurbs is only " + "possible if the Flattener was constructed with a nurbs.")); + } // extract xyz poles, knots, weights, degree - const Handle(Geom_Surface) &_surface = BRep_Tool::Surface(face); - const Handle(Geom_BSplineSurface) &_bspline = Handle(Geom_BSplineSurface)::DownCast(_surface); + const Handle(Geom_Surface)& _surface = BRep_Tool::Surface(face); + const Handle(Geom_BSplineSurface)& _bspline = Handle(Geom_BSplineSurface)::DownCast(_surface); - const TColStd_Array1OfReal &_uknots = _bspline->UKnotSequence(); - const TColStd_Array1OfReal &_vknots = _bspline->VKnotSequence(); + const TColStd_Array1OfReal& _uknots = _bspline->UKnotSequence(); + const TColStd_Array1OfReal& _vknots = _bspline->VKnotSequence(); Eigen::VectorXd weights; weights.resize(_bspline->NbUPoles() * _bspline->NbVPoles()); long i = 0; - for (long u=1; u <= _bspline->NbUPoles(); u++) - { - for (long v=1; v <= _bspline->NbVPoles(); v++) - { + for (long u = 1; u <= _bspline->NbUPoles(); u++) { + for (long v = 1; v <= _bspline->NbVPoles(); v++) { weights[i] = _bspline->Weight(u, v); i++; } @@ -216,12 +209,10 @@ ColMat FaceUnwrapper::interpolateFlatFace(const TopoDS_Face& face) Eigen::VectorXd v_knots; u_knots.resize(_uknots.Length()); v_knots.resize(_vknots.Length()); - for (long u=1; u <= _uknots.Length(); u++) - { + for (long u = 1; u <= _uknots.Length(); u++) { u_knots[u - 1] = _uknots.Value(u); } - for (long v=1; v <= _vknots.Length(); v++) - { + for (long v = 1; v <= _vknots.Length(); v++) { v_knots[v - 1] = _vknots.Value(v); } @@ -229,7 +220,7 @@ ColMat FaceUnwrapper::interpolateFlatFace(const TopoDS_Face& face) nu = nurbs::NurbsBase2D(u_knots, v_knots, weights, _bspline->UDegree(), _bspline->VDegree()); A = nu.getInfluenceMatrix(this->uv_nodes); - Eigen::LeastSquaresConjugateGradient solver; + Eigen::LeastSquaresConjugateGradient solver; solver.compute(A); ColMat ze_poles; ColMat flat_poles; @@ -243,17 +234,17 @@ ColMat FaceUnwrapper::interpolateFlatFace(const TopoDS_Face& face) } -FaceUnwrapper::FaceUnwrapper(ColMat< double, int(3) > xyz_nodes, ColMat< long int, int(3) > tris) +FaceUnwrapper::FaceUnwrapper(ColMat xyz_nodes, ColMat tris) { this->tris = tris; this->xyz_nodes = xyz_nodes; - } std::vector> FaceUnwrapper::getFlatBoundaryNodes() { - if (this->ze_nodes.size() == 0) + if (this->ze_nodes.size() == 0) { throw(std::runtime_error("flat vertices not xet computed")); + } ColMat flat_vertices; flat_vertices.resize(this->ze_nodes.rows(), 3); diff --git a/src/Mod/MeshPart/App/MeshFlattening.h b/src/Mod/MeshPart/App/MeshFlattening.h index 0ef9a6a16a..8b99d467e1 100644 --- a/src/Mod/MeshPart/App/MeshFlattening.h +++ b/src/Mod/MeshPart/App/MeshFlattening.h @@ -36,6 +36,7 @@ #include "MeshFlatteningNurbs.h" +// clang-format off using Vector3 = Eigen::Vector3d; using Vector2 = Eigen::Vector2d; @@ -75,5 +76,6 @@ public: spMat A; // mapping between nurbs(poles) and mesh(vertices) computed with nurbs-basis-functions and uv_mesh }; +// clang-format on -#endif // MESHFLATTENING +#endif // MESHFLATTENING diff --git a/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp b/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp index 7c332318ef..c77a6b9268 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningBoostPython.cpp @@ -22,17 +22,23 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include #endif // boost is purposely not in the precompiled headers, see // https://github.com/FreeCAD/FreeCAD/pull/7979#issuecomment-1358123252 +#include +#include +#include +#include +#include +#include #include #include #include @@ -40,18 +46,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include #include "MeshFlattening.h" #include "MeshFlatteningLscmRelax.h" #include "MeshFlatteningNurbs.h" +// clang-format off namespace py = boost::python; const TopoDS_Face& getTopoDSFace(const py::object& face) @@ -261,3 +262,4 @@ BOOST_PYTHON_MODULE(flatmesh) fm::eigen_matrix>::to_python_converter(); fm::eigen_matrix>::to_python_converter(); } +// clang-format on diff --git a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp index e462d76e9a..025d81416c 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.cpp @@ -22,16 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #ifndef M_PI -# define M_PI 3.14159265358979323846f +#define M_PI 3.14159265358979323846f #endif #include @@ -43,6 +43,7 @@ // area constrained (scale the final unwrapped mesh to the original area) // FEM approach +// clang-format off namespace lscmrelax { @@ -715,3 +716,4 @@ Eigen::MatrixXd LscmRelax::get_nullspace() } +// clang-format on diff --git a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.h b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.h index 1874a793d3..27d9abbf28 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.h +++ b/src/Mod/MeshPart/App/MeshFlatteningLscmRelax.h @@ -21,6 +21,7 @@ ***************************************************************************/ +// clang-format off // LeastSquareConformalMapping + fem relaxing // ------------------------------------------ // @@ -123,3 +124,4 @@ public: } #endif +// clang-format on diff --git a/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp b/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp index db35df9087..03e28a57fc 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningNurbs.cpp @@ -22,13 +22,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include "MeshFlatteningNurbs.h" +// clang-format off namespace nurbs{ double divide(double a, double b) @@ -516,3 +517,4 @@ Eigen::VectorXd NurbsBase1D::getUMesh(int num_u_points) } +// clang-format on diff --git a/src/Mod/MeshPart/App/MeshFlatteningNurbs.h b/src/Mod/MeshPart/App/MeshFlatteningNurbs.h index dd4929f434..7a963a87a5 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningNurbs.h +++ b/src/Mod/MeshPart/App/MeshFlatteningNurbs.h @@ -20,6 +20,7 @@ * * ***************************************************************************/ +// clang-format off #ifndef NURBS_H #define NURBS_H @@ -115,3 +116,4 @@ struct NurbsBase1D } #endif +// clang-format on diff --git a/src/Mod/MeshPart/App/MeshFlatteningPy.cpp b/src/Mod/MeshPart/App/MeshFlatteningPy.cpp index 8ba715cb26..700aba7f23 100644 --- a/src/Mod/MeshPart/App/MeshFlatteningPy.cpp +++ b/src/Mod/MeshPart/App/MeshFlatteningPy.cpp @@ -20,6 +20,7 @@ * * ***************************************************************************/ +// clang-format off #ifdef _MSC_VER # define strdup _strdup #endif @@ -162,3 +163,4 @@ PYBIND11_MODULE(flatmesh, m) .def_readonly("A", &FaceUnwrapper::A); }; +// clang-format on diff --git a/src/Mod/MeshPart/App/Mesher.cpp b/src/Mod/MeshPart/App/Mesher.cpp index ed023917d0..7680b8f6f8 100644 --- a/src/Mod/MeshPart/App/Mesher.cpp +++ b/src/Mod/MeshPart/App/Mesher.cpp @@ -22,12 +22,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -40,47 +40,47 @@ #ifdef HAVE_SMESH #if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Woverloaded-virtual" -# pragma clang diagnostic ignored "-Wextra-semi" -#elif defined (__GNUC__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpedantic" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Woverloaded-virtual" +#pragma clang diagnostic ignored "-Wextra-semi" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wpedantic" #endif -#include -#include -#include #include +#include +#include +#include #if SMESH_VERSION_MAJOR < 7 #include #endif -#include -#include -#include -#include -#include #include +#include +#include +#include +#include #include -#include +#include #include #include +#include #include #include #if defined(HAVE_NETGEN) -#include #include +#include #include -#endif // HAVE_NETGEN +#endif // HAVE_NETGEN #if defined(__clang__) -# pragma clang diagnostic pop -#elif defined (__GNUC__) -# pragma GCC diagnostic pop +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop #endif -#endif // HAVE_SMESH +#endif // HAVE_SMESH using namespace MeshPart; @@ -94,8 +94,9 @@ MeshingOutput::MeshingOutput() int MeshingOutput::overflow(int c) { - if (c != EOF) + if (c != EOF) { buffer.push_back((char)c); + } return c; } @@ -108,7 +109,7 @@ int MeshingOutput::sync() std::string sub; if (pos != std::string::npos) { // chop the last newline - sub = buffer.substr(pos+3, buffer.size()-pos-4); + sub = buffer.substr(pos + 3, buffer.size() - pos - 4); } else { sub = buffer; @@ -122,16 +123,20 @@ int MeshingOutput::sync() // ---------------------------------------------------------------------------- -namespace MeshPart { +namespace MeshPart +{ -struct Vertex { +struct Vertex +{ static const double deflection; - Standard_Real x,y,z; + Standard_Real x, y, z; Standard_Integer i = 0; mutable MeshCore::MeshPoint p; Vertex(Standard_Real X, Standard_Real Y, Standard_Real Z) - : x(X),y(Y),z(Z) + : x(X) + , y(Y) + , z(Z) { p.x = static_cast(x); p.y = static_cast(y); @@ -143,15 +148,18 @@ struct Vertex { return p; } - bool operator < (const Vertex &v) const + bool operator<(const Vertex& v) const { - if (fabs ( this->x - v.x) >= deflection) + if (fabs(this->x - v.x) >= deflection) { return this->x < v.x; - if (fabs ( this->y - v.y) >= deflection) + } + if (fabs(this->y - v.y) >= deflection) { return this->y < v.y; - if (fabs ( this->z - v.z) >= deflection) + } + if (fabs(this->z - v.z) >= deflection) { return this->z < v.z; - return false; // points are considered to be equal + } + return false; // points are considered to be equal } }; @@ -159,20 +167,21 @@ const double Vertex::deflection = gp::Resolution(); // ---------------------------------------------------------------------------- -class BrepMesh { +class BrepMesh +{ bool segments; std::vector colors; + public: BrepMesh(bool s, const std::vector& c) : segments(s) , colors(c) - { - } + {} Mesh::MeshObject* create(const std::vector& domains) const { - std::map > colorMap; - for (std::size_t i=0; i> colorMap; + for (std::size_t i = 0; i < colors.size(); i++) { colorMap[colors[i]].push_back(i); } @@ -180,8 +189,9 @@ public: MeshCore::MeshFacetArray faces; std::size_t numTriangles = 0; - for (const auto& it : domains) + for (const auto& it : domains) { numTriangles += it.facets.size(); + } faces.reserve(numTriangles); std::set vertices; @@ -189,7 +199,7 @@ public: Standard_Real x2, y2, z2; Standard_Real x3, y3, z3; - std::vector< std::vector > meshSegments; + std::vector> meshSegments; std::size_t numMeshFaces = 0; for (const auto& domain : domains) { @@ -212,7 +222,7 @@ public: MeshCore::MeshFacet face; // 1st vertex - Vertex v1(x1,y1,z1); + Vertex v1(x1, y1, z1); it = vertices.find(v1); if (it == vertices.end()) { v1.i = vertices.size(); @@ -224,7 +234,7 @@ public: } // 2nd vertex - Vertex v2(x2,y2,z2); + Vertex v2(x2, y2, z2); it = vertices.find(v2); if (it == vertices.end()) { v2.i = vertices.size(); @@ -236,7 +246,7 @@ public: } // 3rd vertex - Vertex v3(x3,y3,z3); + Vertex v3(x3, y3, z3); it = vertices.find(v3); if (it == vertices.end()) { v3.i = vertices.size(); @@ -248,9 +258,9 @@ public: } // make sure that we don't insert invalid facets - if (face._aulPoints[0] != face._aulPoints[1] && - face._aulPoints[1] != face._aulPoints[2] && - face._aulPoints[2] != face._aulPoints[0]) { + if (face._aulPoints[0] != face._aulPoints[1] + && face._aulPoints[1] != face._aulPoints[2] + && face._aulPoints[2] != face._aulPoints[0]) { faces.push_back(face); numDomainFaces++; } @@ -259,7 +269,9 @@ public: // add a segment for the face if (createSegm || this->segments) { std::vector segment(numDomainFaces); - std::generate(segment.begin(), segment.end(), Base::iotaGen(numMeshFaces)); + std::generate(segment.begin(), + segment.end(), + Base::iotaGen(numMeshFaces)); numMeshFaces += numDomainFaces; meshSegments.push_back(segment); } @@ -267,8 +279,9 @@ public: MeshCore::MeshPointArray verts; verts.resize(vertices.size()); - for (const auto& it : vertices) + for (const auto& it : vertices) { verts[it.i] = it.toPoint(); + } MeshCore::MeshKernel kernel; kernel.Adopt(verts, faces, true); @@ -300,14 +313,13 @@ public: return meshdata; } }; -} +} // namespace MeshPart // ---------------------------------------------------------------------------- Mesher::Mesher(const TopoDS_Shape& s) - : shape(s) -{ -} + : shape(s) +{} Mesher::~Mesher() = default; @@ -337,8 +349,9 @@ Mesh::MeshObject* Mesher::createMesh() const #else std::list hypoth; - if (!Mesher::_mesh_gen) + if (!Mesher::_mesh_gen) { Mesher::_mesh_gen = new SMESH_Gen(); + } SMESH_Gen* meshgen = Mesher::_mesh_gen; #if SMESH_VERSION_MAJOR >= 9 @@ -348,137 +361,147 @@ Mesh::MeshObject* Mesher::createMesh() const #endif - int hyp=0; + int hyp = 0; switch (method) { -#if defined (HAVE_NETGEN) - case Netgen: { +#if defined(HAVE_NETGEN) + case Netgen: { #if SMESH_VERSION_MAJOR >= 9 - NETGENPlugin_Hypothesis_2D* hyp2d = new NETGENPlugin_Hypothesis_2D(hyp++,meshgen); + NETGENPlugin_Hypothesis_2D* hyp2d = new NETGENPlugin_Hypothesis_2D(hyp++, meshgen); #else - NETGENPlugin_Hypothesis_2D* hyp2d = new NETGENPlugin_Hypothesis_2D(hyp++,0,meshgen); + NETGENPlugin_Hypothesis_2D* hyp2d = new NETGENPlugin_Hypothesis_2D(hyp++, 0, meshgen); #endif - if (fineness >=0 && fineness < 5) { - hyp2d->SetFineness(NETGENPlugin_Hypothesis_2D::Fineness(fineness)); - } - // user defined values - else { - if (growthRate > 0) - hyp2d->SetGrowthRate(growthRate); - if (nbSegPerEdge > 0) - hyp2d->SetNbSegPerEdge(nbSegPerEdge); - if (nbSegPerRadius > 0) - hyp2d->SetNbSegPerRadius(nbSegPerRadius); - } + if (fineness >= 0 && fineness < 5) { + hyp2d->SetFineness(NETGENPlugin_Hypothesis_2D::Fineness(fineness)); + } + // user defined values + else { + if (growthRate > 0) { + hyp2d->SetGrowthRate(growthRate); + } + if (nbSegPerEdge > 0) { + hyp2d->SetNbSegPerEdge(nbSegPerEdge); + } + if (nbSegPerRadius > 0) { + hyp2d->SetNbSegPerRadius(nbSegPerRadius); + } + } - if (maxLen > 0) - hyp2d->SetMaxSize(maxLen); - if (minLen > 0) - hyp2d->SetMinSize(minLen); + if (maxLen > 0) { + hyp2d->SetMaxSize(maxLen); + } + if (minLen > 0) { + hyp2d->SetMinSize(minLen); + } - hyp2d->SetQuadAllowed(allowquad); - hyp2d->SetOptimize(optimize); - hyp2d->SetSecondOrder(secondOrder); // apply bisecting to create four triangles out of one - hypoth.push_back(hyp2d); - -#if SMESH_VERSION_MAJOR >= 9 - NETGENPlugin_NETGEN_2D* alg2d = new NETGENPlugin_NETGEN_2D(hyp++,meshgen); -#else - NETGENPlugin_NETGEN_2D* alg2d = new NETGENPlugin_NETGEN_2D(hyp++,0,meshgen); -#endif - hypoth.push_back(alg2d); - } break; -#endif -#if defined (HAVE_MEFISTO) - case Mefisto: { - if (maxLength > 0) { -#if SMESH_VERSION_MAJOR >= 9 - StdMeshers_MaxLength* hyp1d = new StdMeshers_MaxLength(hyp++, meshgen); -#else - StdMeshers_MaxLength* hyp1d = new StdMeshers_MaxLength(hyp++, 0, meshgen); -#endif - hyp1d->SetLength(maxLength); - hypoth.push_back(hyp1d); - } - else if (localLength > 0) { -#if SMESH_VERSION_MAJOR >= 9 - StdMeshers_LocalLength* hyp1d = new StdMeshers_LocalLength(hyp++,meshgen); -#else - StdMeshers_LocalLength* hyp1d = new StdMeshers_LocalLength(hyp++,0,meshgen); -#endif - hyp1d->SetLength(localLength); - hypoth.push_back(hyp1d); - } - else if (maxArea > 0) { -#if SMESH_VERSION_MAJOR >= 9 - StdMeshers_MaxElementArea* hyp2d = new StdMeshers_MaxElementArea(hyp++,meshgen); -#else - StdMeshers_MaxElementArea* hyp2d = new StdMeshers_MaxElementArea(hyp++,0,meshgen); -#endif - hyp2d->SetMaxArea(maxArea); + hyp2d->SetQuadAllowed(allowquad); + hyp2d->SetOptimize(optimize); + hyp2d->SetSecondOrder( + secondOrder); // apply bisecting to create four triangles out of one hypoth.push_back(hyp2d); - } - else if (deflection > 0) { -#if SMESH_VERSION_MAJOR >= 9 - StdMeshers_Deflection1D* hyp1d = new StdMeshers_Deflection1D(hyp++,meshgen); -#else - StdMeshers_Deflection1D* hyp1d = new StdMeshers_Deflection1D(hyp++,0,meshgen); -#endif - hyp1d->SetDeflection(deflection); - hypoth.push_back(hyp1d); - } - else if (minLen > 0 && maxLen > 0) { -#if SMESH_VERSION_MAJOR >= 9 - StdMeshers_Arithmetic1D* hyp1d = new StdMeshers_Arithmetic1D(hyp++,meshgen); -#else - StdMeshers_Arithmetic1D* hyp1d = new StdMeshers_Arithmetic1D(hyp++,0,meshgen); -#endif - hyp1d->SetLength(minLen, false); - hyp1d->SetLength(maxLen, true); - hypoth.push_back(hyp1d); - } - else { -#if SMESH_VERSION_MAJOR >= 9 - StdMeshers_AutomaticLength* hyp1d = new StdMeshers_AutomaticLength(hyp++,meshgen); -#else - StdMeshers_AutomaticLength* hyp1d = new StdMeshers_AutomaticLength(hyp++,0,meshgen); -#endif - hypoth.push_back(hyp1d); - } - { #if SMESH_VERSION_MAJOR >= 9 - StdMeshers_NumberOfSegments* hyp1d = new StdMeshers_NumberOfSegments(hyp++,meshgen); + NETGENPlugin_NETGEN_2D* alg2d = new NETGENPlugin_NETGEN_2D(hyp++, meshgen); #else - StdMeshers_NumberOfSegments* hyp1d = new StdMeshers_NumberOfSegments(hyp++,0,meshgen); + NETGENPlugin_NETGEN_2D* alg2d = new NETGENPlugin_NETGEN_2D(hyp++, 0, meshgen); #endif - hyp1d->SetNumberOfSegments(1); - hypoth.push_back(hyp1d); - } + hypoth.push_back(alg2d); + } break; +#endif +#if defined(HAVE_MEFISTO) + case Mefisto: { + if (maxLength > 0) { +#if SMESH_VERSION_MAJOR >= 9 + StdMeshers_MaxLength* hyp1d = new StdMeshers_MaxLength(hyp++, meshgen); +#else + StdMeshers_MaxLength* hyp1d = new StdMeshers_MaxLength(hyp++, 0, meshgen); +#endif + hyp1d->SetLength(maxLength); + hypoth.push_back(hyp1d); + } + else if (localLength > 0) { +#if SMESH_VERSION_MAJOR >= 9 + StdMeshers_LocalLength* hyp1d = new StdMeshers_LocalLength(hyp++, meshgen); +#else + StdMeshers_LocalLength* hyp1d = new StdMeshers_LocalLength(hyp++, 0, meshgen); +#endif + hyp1d->SetLength(localLength); + hypoth.push_back(hyp1d); + } + else if (maxArea > 0) { +#if SMESH_VERSION_MAJOR >= 9 + StdMeshers_MaxElementArea* hyp2d = new StdMeshers_MaxElementArea(hyp++, meshgen); +#else + StdMeshers_MaxElementArea* hyp2d = new StdMeshers_MaxElementArea(hyp++, 0, meshgen); +#endif + hyp2d->SetMaxArea(maxArea); + hypoth.push_back(hyp2d); + } + else if (deflection > 0) { +#if SMESH_VERSION_MAJOR >= 9 + StdMeshers_Deflection1D* hyp1d = new StdMeshers_Deflection1D(hyp++, meshgen); +#else + StdMeshers_Deflection1D* hyp1d = new StdMeshers_Deflection1D(hyp++, 0, meshgen); +#endif + hyp1d->SetDeflection(deflection); + hypoth.push_back(hyp1d); + } + else if (minLen > 0 && maxLen > 0) { +#if SMESH_VERSION_MAJOR >= 9 + StdMeshers_Arithmetic1D* hyp1d = new StdMeshers_Arithmetic1D(hyp++, meshgen); +#else + StdMeshers_Arithmetic1D* hyp1d = new StdMeshers_Arithmetic1D(hyp++, 0, meshgen); +#endif + hyp1d->SetLength(minLen, false); + hyp1d->SetLength(maxLen, true); + hypoth.push_back(hyp1d); + } + else { +#if SMESH_VERSION_MAJOR >= 9 + StdMeshers_AutomaticLength* hyp1d = new StdMeshers_AutomaticLength(hyp++, meshgen); +#else + StdMeshers_AutomaticLength* hyp1d = + new StdMeshers_AutomaticLength(hyp++, 0, meshgen); +#endif + hypoth.push_back(hyp1d); + } - if (regular) { + { #if SMESH_VERSION_MAJOR >= 9 - StdMeshers_Regular_1D* hyp1d = new StdMeshers_Regular_1D(hyp++,meshgen); + StdMeshers_NumberOfSegments* hyp1d = + new StdMeshers_NumberOfSegments(hyp++, meshgen); #else - StdMeshers_Regular_1D* hyp1d = new StdMeshers_Regular_1D(hyp++,0,meshgen); + StdMeshers_NumberOfSegments* hyp1d = + new StdMeshers_NumberOfSegments(hyp++, 0, meshgen); #endif - hypoth.push_back(hyp1d); - } + hyp1d->SetNumberOfSegments(1); + hypoth.push_back(hyp1d); + } + + if (regular) { +#if SMESH_VERSION_MAJOR >= 9 + StdMeshers_Regular_1D* hyp1d = new StdMeshers_Regular_1D(hyp++, meshgen); +#else + StdMeshers_Regular_1D* hyp1d = new StdMeshers_Regular_1D(hyp++, 0, meshgen); +#endif + hypoth.push_back(hyp1d); + } #if SMESH_VERSION_MAJOR < 7 - StdMeshers_TrianglePreference* hyp2d_1 = new StdMeshers_TrianglePreference(hyp++,0,meshgen); - hypoth.push_back(hyp2d_1); + StdMeshers_TrianglePreference* hyp2d_1 = + new StdMeshers_TrianglePreference(hyp++, 0, meshgen); + hypoth.push_back(hyp2d_1); #endif #if SMESH_VERSION_MAJOR >= 9 - StdMeshers_MEFISTO_2D* alg2d = new StdMeshers_MEFISTO_2D(hyp++,meshgen); + StdMeshers_MEFISTO_2D* alg2d = new StdMeshers_MEFISTO_2D(hyp++, meshgen); #else - StdMeshers_MEFISTO_2D* alg2d = new StdMeshers_MEFISTO_2D(hyp++,0,meshgen); + StdMeshers_MEFISTO_2D* alg2d = new StdMeshers_MEFISTO_2D(hyp++, 0, meshgen); #endif - hypoth.push_back(alg2d); - } break; + hypoth.push_back(alg2d); + } break; #endif - default: - break; + default: + break; } // Set new cout @@ -487,8 +510,9 @@ Mesh::MeshObject* Mesher::createMesh() const // Apply the hypothesis and create the mesh mesh->ShapeToMesh(shape); - for (int i=0; iAddHypothesis(shape, i); + } meshgen->Compute(*mesh, mesh->GetShapeToMesh()); // Restore old cout @@ -502,11 +526,12 @@ Mesh::MeshObject* Mesher::createMesh() const mesh->ShapeToMesh(aNull); mesh->Clear(); delete mesh; - for (auto it : hypoth) + for (auto it : hypoth) { delete it; + } return meshdata; -#endif // HAVE_SMESH +#endif // HAVE_SMESH } Mesh::MeshObject* Mesher::createFrom(SMESH_Mesh* mesh) const @@ -520,9 +545,9 @@ Mesh::MeshObject* Mesher::createFrom(SMESH_Mesh* mesh) const verts.reserve(mesh->NbNodes()); faces.reserve(mesh->NbFaces()); - int index=0; + int index = 0; std::map mapNodeIndex; - for (;aNodeIter->more();) { + for (; aNodeIter->more();) { const SMDS_MeshNode* aNode = aNodeIter->next(); MeshCore::MeshPoint p; p.Set((float)aNode->X(), (float)aNode->Y(), (float)aNode->Z()); @@ -530,11 +555,11 @@ Mesh::MeshObject* Mesher::createFrom(SMESH_Mesh* mesh) const mapNodeIndex[aNode] = index++; } - for (;aFaceIter->more();) { + for (; aFaceIter->more();) { const SMDS_MeshFace* aFace = aFaceIter->next(); if (aFace->NbNodes() == 3) { MeshCore::MeshFacet f; - for (int i=0; i<3;i++) { + for (int i = 0; i < 3; i++) { const SMDS_MeshNode* node = aFace->GetNode(i); f._aulPoints[i] = mapNodeIndex[node]; } @@ -617,12 +642,12 @@ Mesh::MeshObject* Mesher::createFrom(SMESH_Mesh* mesh) const // Two solutions are possible: // <4,6,7>, <4,5,6> or <4,5,7>, <5,6,7> - Base::Vector3d v4(node4->X(),node4->Y(),node4->Z()); - Base::Vector3d v5(node5->X(),node5->Y(),node5->Z()); - Base::Vector3d v6(node6->X(),node6->Y(),node6->Z()); - Base::Vector3d v7(node7->X(),node7->Y(),node7->Z()); - double dist46 = Base::DistanceP2(v4,v6); - double dist57 = Base::DistanceP2(v5,v7); + Base::Vector3d v4(node4->X(), node4->Y(), node4->Z()); + Base::Vector3d v5(node5->X(), node5->Y(), node5->Z()); + Base::Vector3d v6(node6->X(), node6->Y(), node6->Z()); + Base::Vector3d v7(node7->X(), node7->Y(), node7->Z()); + double dist46 = Base::DistanceP2(v4, v6); + double dist57 = Base::DistanceP2(v5, v7); if (dist46 > dist57) { f5._aulPoints[0] = mapNodeIndex[node4]; f5._aulPoints[1] = mapNodeIndex[node6]; diff --git a/src/Mod/MeshPart/App/Mesher.h b/src/Mod/MeshPart/App/Mesher.h index 6cb979260a..7297e92057 100644 --- a/src/Mod/MeshPart/App/Mesher.h +++ b/src/Mod/MeshPart/App/Mesher.h @@ -28,23 +28,28 @@ #include #ifdef HAVE_SMESH -# include +#include #endif class TopoDS_Shape; class SMESH_Gen; class SMESH_Mesh; -namespace Mesh { class MeshObject; } -namespace MeshPart { +namespace Mesh +{ +class MeshObject; +} +namespace MeshPart +{ class Mesher { public: - enum Method { + enum Method + { None = 0, Mefisto = 1, -#if defined (HAVE_NETGEN) +#if defined(HAVE_NETGEN) Netgen = 2, #endif Standard = 3 @@ -54,83 +59,155 @@ public: ~Mesher(); void setMethod(Method m) - { method = m; } + { + method = m; + } Method getMethod() const - { return method; } + { + return method; + } /** @name Mefisto settings */ //@{ void setMaxLength(double s) - { maxLength = s; } + { + maxLength = s; + } double getMaxLength() const - { return maxLength; } + { + return maxLength; + } void setMaxArea(double s) - { maxArea = s; } + { + maxArea = s; + } double getMaxArea() const - { return maxArea; } + { + return maxArea; + } void setLocalLength(double s) - { localLength = s; } + { + localLength = s; + } double getLocalLength() const - { return localLength; } + { + return localLength; + } void setDeflection(double s) - { deflection = s; } + { + deflection = s; + } double getDeflection() const - { return deflection; } + { + return deflection; + } void setAngularDeflection(double s) - { angularDeflection = s; } + { + angularDeflection = s; + } double getAngularDeflection() const - { return angularDeflection; } + { + return angularDeflection; + } void setMinMaxLengths(double f, double l) - { minLen = f; maxLen = l; } + { + minLen = f; + maxLen = l; + } void getMinMaxLengths(double& f, double& l) const - { f = minLen; l= maxLen; } + { + f = minLen; + l = maxLen; + } void setRegular(bool s) - { regular = s; } + { + regular = s; + } bool isRegular() const - { return regular; } + { + return regular; + } void setRelative(bool s) - { relative = s; } + { + relative = s; + } bool isRelative() const - { return relative; } + { + return relative; + } void setSegments(bool s) - { segments = s; } + { + segments = s; + } bool isSegments() const - { return segments; } + { + return segments; + } void setColors(const std::vector& c) - { colors = c; } + { + colors = c; + } //@} -#if defined (HAVE_NETGEN) +#if defined(HAVE_NETGEN) /** @name Netgen settings */ //@{ void setFineness(int s) - { fineness = s; } + { + fineness = s; + } int getFineness() const - { return fineness; } + { + return fineness; + } void setGrowthRate(double r) - { growthRate = r; } + { + growthRate = r; + } double getGrowthRate() const - { return growthRate; } + { + return growthRate; + } void setNbSegPerEdge(double v) - { nbSegPerEdge = v;} + { + nbSegPerEdge = v; + } double getNbSegPerEdge() const - { return nbSegPerEdge; } + { + return nbSegPerEdge; + } void setNbSegPerRadius(double v) - { nbSegPerRadius = v; } + { + nbSegPerRadius = v; + } double getNbSegPerRadius() const - { return nbSegPerRadius; } + { + return nbSegPerRadius; + } void setSecondOrder(bool on) - { secondOrder = on; } + { + secondOrder = on; + } bool getSecondOrder() const - { return secondOrder; } + { + return secondOrder; + } void setOptimize(bool on) - { optimize = on;} + { + optimize = on; + } bool getOptimize() const - { return optimize; } + { + return optimize; + } void setQuadAllowed(bool on) - { allowquad = on;} + { + allowquad = on; + } bool isQuadAllowed() const - { return allowquad; } + { + return allowquad; + } //@} #endif @@ -142,31 +219,31 @@ private: private: const TopoDS_Shape& shape; - Method method{None}; - double maxLength{0}; - double maxArea{0}; - double localLength{0}; - double deflection{0}; - double angularDeflection{0.5}; - double minLen{0}, maxLen{0}; - bool relative{false}; - bool regular{false}; - bool segments{false}; -#if defined (HAVE_NETGEN) - int fineness{5}; - double growthRate{0}; - double nbSegPerEdge{0}; - double nbSegPerRadius{0}; - bool secondOrder{false}; - bool optimize{true}; - bool allowquad{false}; + Method method {None}; + double maxLength {0}; + double maxArea {0}; + double localLength {0}; + double deflection {0}; + double angularDeflection {0.5}; + double minLen {0}, maxLen {0}; + bool relative {false}; + bool regular {false}; + bool segments {false}; +#if defined(HAVE_NETGEN) + int fineness {5}; + double growthRate {0}; + double nbSegPerEdge {0}; + double nbSegPerRadius {0}; + bool secondOrder {false}; + bool optimize {true}; + bool allowquad {false}; #endif std::vector colors; - static SMESH_Gen *_mesh_gen; + static SMESH_Gen* _mesh_gen; }; -class MeshingOutput : public std::streambuf +class MeshingOutput: public std::streambuf { public: MeshingOutput(); @@ -179,6 +256,6 @@ private: std::string buffer; }; -} // namespace MeshPart +} // namespace MeshPart -#endif // MESHPART_MESHER_H +#endif // MESHPART_MESHER_H diff --git a/src/Mod/MeshPart/App/PreCompiled.h b/src/Mod/MeshPart/App/PreCompiled.h index 4b4917bf65..7c1101f012 100644 --- a/src/Mod/MeshPart/App/PreCompiled.h +++ b/src/Mod/MeshPart/App/PreCompiled.h @@ -26,10 +26,10 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4244) -# pragma warning(disable : 4275) -# pragma warning(disable : 4290) -# pragma warning(disable : 4522) +#pragma warning(disable : 4244) +#pragma warning(disable : 4275) +#pragma warning(disable : 4290) +#pragma warning(disable : 4522) #endif #ifdef _PreComp_ @@ -49,24 +49,23 @@ #include // OpenCasCade -#include -#include -#include #include #include #include #include #include #include +#include +#include +#include #include -#include #include +#include +#include #include #include #include #include -#include -#include #include #include #include @@ -77,6 +76,7 @@ #include #include #include +#include -#endif // _PreComp_ +#endif // _PreComp_ #endif diff --git a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp index 160b913d96..f71dc60387 100644 --- a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp +++ b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp @@ -43,13 +43,15 @@ void loadMeshPartResource() Gui::Translator::instance()->refresh(); } -namespace MeshPartGui { -class Module : public Py::ExtensionModule +namespace MeshPartGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("MeshPartGui") + Module() + : Py::ExtensionModule("MeshPartGui") { - initialize("This module is the MeshPartGui module."); // register with Python + initialize("This module is the MeshPartGui module."); // register with Python } private: @@ -60,7 +62,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace MeshPartGui +} // namespace MeshPartGui /* Python entry */ @@ -74,12 +76,14 @@ PyMOD_INIT_FUNC(MeshPartGui) PyObject* mod = MeshPartGui::initModule(); Base::Console().Log("Loading GUI of MeshPart module... done\n"); + // clang-format off // instantiating the commands CreateMeshPartCommands(); MeshPartGui::Workbench ::init(); MeshPartGui::ViewProviderCurveOnMesh ::init(); + // clang-format on - // add resources and reloads the translators + // add resources and reloads the translators loadMeshPartResource(); PyMOD_Return(mod); diff --git a/src/Mod/MeshPart/Gui/Command.cpp b/src/Mod/MeshPart/Gui/Command.cpp index 4dfb6994fc..2445d564b0 100644 --- a/src/Mod/MeshPart/Gui/Command.cpp +++ b/src/Mod/MeshPart/Gui/Command.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include #include @@ -51,14 +51,14 @@ using namespace std; DEF_STD_CMD_A(CmdMeshPartMesher) CmdMeshPartMesher::CmdMeshPartMesher() - : Command("MeshPart_Mesher") + : Command("MeshPart_Mesher") { - sAppModule = "MeshPart"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh from shape..."); - sToolTipText = QT_TR_NOOP("Tessellate shape"); - sWhatsThis = "MeshPart_Mesher"; - sStatusTip = sToolTipText; + sAppModule = "MeshPart"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Create mesh from shape..."); + sToolTipText = QT_TR_NOOP("Tessellate shape"); + sWhatsThis = "MeshPart_Mesher"; + sStatusTip = sToolTipText; } void CmdMeshPartMesher::activated(int) @@ -76,13 +76,13 @@ bool CmdMeshPartMesher::isActive() DEF_STD_CMD_A(CmdMeshPartTrimByPlane) CmdMeshPartTrimByPlane::CmdMeshPartTrimByPlane() - : Command("MeshPart_TrimByPlane") + : Command("MeshPart_TrimByPlane") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Trim mesh with a plane"); - sToolTipText = QT_TR_NOOP("Trims a mesh with a plane"); - sStatusTip = QT_TR_NOOP("Trims a mesh with a plane"); + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Trim mesh with a plane"); + sToolTipText = QT_TR_NOOP("Trims a mesh with a plane"); + sStatusTip = QT_TR_NOOP("Trims a mesh with a plane"); } void CmdMeshPartTrimByPlane::activated(int) @@ -91,18 +91,22 @@ void CmdMeshPartTrimByPlane::activated(int) std::vector plane = getSelection().getObjectsOfType(partType); if (plane.empty()) { QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("MeshPart_TrimByPlane", "Select plane"), - qApp->translate("MeshPart_TrimByPlane", "Please select a plane at which you trim the mesh.")); + qApp->translate("MeshPart_TrimByPlane", "Select plane"), + qApp->translate("MeshPart_TrimByPlane", + "Please select a plane at which you trim the mesh.")); return; } QMessageBox msgBox(Gui::getMainWindow()); msgBox.setIcon(QMessageBox::Question); - msgBox.setWindowTitle(qApp->translate("MeshPart_TrimByPlane","Trim by plane")); - msgBox.setText(qApp->translate("MeshPart_TrimByPlane","Select the side you want to keep.")); - QPushButton* inner = msgBox.addButton(qApp->translate("MeshPart_TrimByPlane","Below"), QMessageBox::ActionRole); - QPushButton* outer = msgBox.addButton(qApp->translate("MeshPart_TrimByPlane","Above"), QMessageBox::ActionRole); - QPushButton* split = msgBox.addButton(qApp->translate("MeshPart_TrimByPlane","Split"), QMessageBox::ActionRole); + msgBox.setWindowTitle(qApp->translate("MeshPart_TrimByPlane", "Trim by plane")); + msgBox.setText(qApp->translate("MeshPart_TrimByPlane", "Select the side you want to keep.")); + QPushButton* inner = + msgBox.addButton(qApp->translate("MeshPart_TrimByPlane", "Below"), QMessageBox::ActionRole); + QPushButton* outer = + msgBox.addButton(qApp->translate("MeshPart_TrimByPlane", "Above"), QMessageBox::ActionRole); + QPushButton* split = + msgBox.addButton(qApp->translate("MeshPart_TrimByPlane", "Split"), QMessageBox::ActionRole); msgBox.addButton(QMessageBox::Cancel); msgBox.setDefaultButton(inner); msgBox.exec(); @@ -123,12 +127,14 @@ void CmdMeshPartTrimByPlane::activated(int) return; } - Base::Placement plnPlacement = static_cast(plane.front())->Placement.getValue(); + Base::Placement plnPlacement = + static_cast(plane.front())->Placement.getValue(); openCommand(QT_TRANSLATE_NOOP("Command", "Trim with plane")); - std::vector docObj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector docObj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto it : docObj) { - Base::Vector3d normal(0,0,1); + Base::Vector3d normal(0, 0, 1); plnPlacement.getRotation().multVec(normal, normal); Base::Vector3d base = plnPlacement.getPosition(); @@ -166,8 +172,9 @@ void CmdMeshPartTrimByPlane::activated(int) bool CmdMeshPartTrimByPlane::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) { return false; + } return true; } @@ -178,14 +185,14 @@ bool CmdMeshPartTrimByPlane::isActive() DEF_STD_CMD_A(CmdMeshPartSection) CmdMeshPartSection::CmdMeshPartSection() - : Command("MeshPart_SectionByPlane") + : Command("MeshPart_SectionByPlane") { - sAppModule = "MeshPart"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create section from mesh and plane"); - sToolTipText = QT_TR_NOOP("Section"); - sWhatsThis = "MeshPart_Section"; - sStatusTip = sToolTipText; + sAppModule = "MeshPart"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Create section from mesh and plane"); + sToolTipText = QT_TR_NOOP("Section"); + sWhatsThis = "MeshPart_Section"; + sStatusTip = sToolTipText; } void CmdMeshPartSection::activated(int) @@ -193,19 +200,22 @@ void CmdMeshPartSection::activated(int) Base::Type partType = Base::Type::fromName("Part::Plane"); std::vector plane = getSelection().getObjectsOfType(partType); if (plane.empty()) { - QMessageBox::warning(Gui::getMainWindow(), + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("MeshPart_Section", "Select plane"), - qApp->translate("MeshPart_Section", "Please select a plane at which you section the mesh.")); + qApp->translate("MeshPart_Section", + "Please select a plane at which you section the mesh.")); return; } Base::Placement plm = static_cast(plane.front())->Placement.getValue(); - Base::Vector3d normal(0,0,1); + Base::Vector3d normal(0, 0, 1); plm.getRotation().multVec(normal, normal); Base::Vector3d base = plm.getPosition(); openCommand(QT_TRANSLATE_NOOP("Command", "Section with plane")); - std::vector docObj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector docObj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); Mesh::MeshObject::TPlane tplane; tplane.first = Base::convertTo(base); tplane.second = Base::convertTo(normal); @@ -250,8 +260,9 @@ void CmdMeshPartSection::activated(int) bool CmdMeshPartSection::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) { return false; + } return true; } @@ -262,15 +273,15 @@ bool CmdMeshPartSection::isActive() DEF_STD_CMD_A(CmdMeshPartCrossSections) CmdMeshPartCrossSections::CmdMeshPartCrossSections() - :Command("MeshPart_CrossSections") + : Command("MeshPart_CrossSections") { - sAppModule = "MeshPart"; - sGroup = QT_TR_NOOP("MeshPart"); - sMenuText = QT_TR_NOOP("Cross-sections..."); - sToolTipText = QT_TR_NOOP("Cross-sections"); - sWhatsThis = "MeshPart_CrossSections"; - sStatusTip = sToolTipText; - //sPixmap = "MeshPart_CrossSections"; + sAppModule = "MeshPart"; + sGroup = QT_TR_NOOP("MeshPart"); + sMenuText = QT_TR_NOOP("Cross-sections..."); + sToolTipText = QT_TR_NOOP("Cross-sections"); + sWhatsThis = "MeshPart_CrossSections"; + sStatusTip = sToolTipText; + // sPixmap = "MeshPart_CrossSections"; } void CmdMeshPartCrossSections::activated(int iMsg) @@ -278,8 +289,8 @@ void CmdMeshPartCrossSections::activated(int iMsg) Q_UNUSED(iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (!dlg) { - std::vector obj = Gui::Selection().getObjectsOfType - (Mesh::Feature::getClassTypeId()); + std::vector obj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); Base::BoundBox3d bbox; for (auto it : obj) { bbox.Add(static_cast(it)->Mesh.getBoundingBox()); @@ -291,23 +302,23 @@ void CmdMeshPartCrossSections::activated(int iMsg) bool CmdMeshPartCrossSections::isActive() { - return (Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0 && - !Gui::Control().activeDialog()); + return (Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0 + && !Gui::Control().activeDialog()); } DEF_STD_CMD_A(CmdMeshPartCurveOnMesh) CmdMeshPartCurveOnMesh::CmdMeshPartCurveOnMesh() - : Command("MeshPart_CurveOnMesh") + : Command("MeshPart_CurveOnMesh") { - sAppModule = "MeshPart"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Curve on mesh..."); - sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of a mesh.\n" - "This command only works with a 'mesh' object."); - sWhatsThis = "MeshPart_CurveOnMesh"; - sStatusTip = sToolTipText; - sPixmap = "MeshPart_CurveOnMesh"; + sAppModule = "MeshPart"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Curve on mesh..."); + sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of a mesh.\n" + "This command only works with a 'mesh' object."); + sWhatsThis = "MeshPart_CurveOnMesh"; + sStatusTip = sToolTipText; + sPixmap = "MeshPart_CurveOnMesh"; } void CmdMeshPartCurveOnMesh::activated(int) @@ -318,18 +329,21 @@ void CmdMeshPartCurveOnMesh::activated(int) return; } - Gui::Control().showDialog(new MeshPartGui::TaskCurveOnMesh(static_cast(mdis.front()))); + Gui::Control().showDialog( + new MeshPartGui::TaskCurveOnMesh(static_cast(mdis.front()))); } bool CmdMeshPartCurveOnMesh::isActive() { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; + } // Check for the selected mesh feature (all Mesh types) App::Document* doc = App::GetApplication().getActiveDocument(); - if (doc && doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) + if (doc && doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) { return true; + } return false; } @@ -337,7 +351,7 @@ bool CmdMeshPartCurveOnMesh::isActive() void CreateMeshPartCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdMeshPartMesher()); rcCmdMgr.addCommand(new CmdMeshPartTrimByPlane()); rcCmdMgr.addCommand(new CmdMeshPartSection()); diff --git a/src/Mod/MeshPart/Gui/CrossSections.cpp b/src/Mod/MeshPart/Gui/CrossSections.cpp index f76099a050..47c07446b5 100644 --- a/src/Mod/MeshPart/Gui/CrossSections.cpp +++ b/src/Mod/MeshPart/Gui/CrossSections.cpp @@ -22,38 +22,38 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include -# include -# include -# include -# include +#include +#include +#include +#include -# include -# include -# include -# include +#include +#include +#include +#include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include #include +#include +#include +#include #include #include #include #include #include -#include #include #include #include -#include -#include #include "CrossSections.h" #include "ui_CrossSections.h" @@ -62,8 +62,9 @@ using namespace MeshPartGui; namespace sp = std::placeholders; -namespace MeshPartGui { -class ViewProviderCrossSections : public Gui::ViewProvider +namespace MeshPartGui +{ +class ViewProviderCrossSections: public Gui::ViewProvider { public: ViewProviderCrossSections() @@ -87,8 +88,7 @@ public: planes->unref(); } void updateData(const App::Property*) override - { - } + {} const char* getDefaultDisplayMode() const override { return ""; @@ -101,15 +101,15 @@ public: { coords->point.setNum(v.size()); SbVec3f* p = coords->point.startEditing(); - for (unsigned int i=0; ipoint.finishEditing(); - unsigned int count = v.size()/5; + unsigned int count = v.size() / 5; planes->numVertices.setNum(count); int32_t* l = planes->numVertices.startEditing(); - for (unsigned int i=0; inumVertices.finishEditing(); @@ -120,12 +120,16 @@ private: SoLineSet* planes; }; -class MeshCrossSection { +class MeshCrossSection +{ public: MeshCrossSection(const MeshCore::MeshKernel& mesh, const MeshCore::MeshFacetGrid& grid, - double x, double y, double z, - bool connectEdges, double eps) + double x, + double y, + double z, + bool connectEdges, + double eps) : mesh(mesh) , grid(grid) , x(x) @@ -133,25 +137,25 @@ public: , z(z) , connectEdges(connectEdges) , epsilon(eps) - { - } + {} std::list section(double d) { Mesh::MeshObject::TPolylines polylines; MeshCore::MeshAlgorithm algo(mesh); - Base::Vector3f p(x*d, y*d, z*d); + Base::Vector3f p(x * d, y * d, z * d); Base::Vector3f n(x, y, z); algo.CutWithPlane(p, n, grid, polylines, epsilon, connectEdges); std::list wires; - for (const auto & polyline : polylines) { + for (const auto& polyline : polylines) { BRepBuilderAPI_MakePolygon mkPoly; for (auto jt : polyline) { mkPoly.Add(Base::convertTo(jt)); } - if (mkPoly.IsDone()) + if (mkPoly.IsDone()) { wires.push_back(mkPoly.Wire()); + } } return wires; @@ -160,14 +164,15 @@ public: private: const MeshCore::MeshKernel& mesh; const MeshCore::MeshFacetGrid& grid; - double x,y,z; + double x, y, z; bool connectEdges; double epsilon; }; -} +} // namespace MeshPartGui CrossSections::CrossSections(const Base::BoundBox3d& bb, QWidget* parent, Qt::WindowFlags fl) - : QDialog(parent, fl), bbox(bb) + : QDialog(parent, fl) + , bbox(bb) { ui = new Ui_CrossSections(); ui->setupUi(this); @@ -206,13 +211,14 @@ CrossSections::~CrossSections() void CrossSections::setupConnections() { + // clang-format off connect(ui->xyPlane, &QRadioButton::clicked, this, &CrossSections::xyPlaneClicked); connect(ui->xzPlane, &QRadioButton::clicked, this, &CrossSections::xzPlaneClicked); connect(ui->yzPlane, &QRadioButton::clicked, this, &CrossSections::yzPlaneClicked); - connect(ui->position, qOverload(&Gui::QuantitySpinBox::valueChanged), + connect(ui->position,qOverload(&Gui::QuantitySpinBox::valueChanged), this, &CrossSections::positionValueChanged); connect(ui->distance, qOverload(&Gui::QuantitySpinBox::valueChanged), this, &CrossSections::distanceValueChanged); @@ -222,20 +228,23 @@ void CrossSections::setupConnections() this, &CrossSections::checkBothSidesToggled); connect(ui->sectionsBox, &QGroupBox::toggled, this, &CrossSections::sectionsBoxToggled); - + // clang-format on } CrossSections::Plane CrossSections::plane() const { - if (ui->xyPlane->isChecked()) + if (ui->xyPlane->isChecked()) { return CrossSections::XY; - else if (ui->xzPlane->isChecked()) + } + else if (ui->xzPlane->isChecked()) { return CrossSections::XZ; - else + } + else { return CrossSections::YZ; + } } -void CrossSections::changeEvent(QEvent *e) +void CrossSections::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -260,15 +269,17 @@ void CrossSections::accept() void CrossSections::apply() { - std::vector obj = Gui::Selection(). - getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector obj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); std::vector d; - if (ui->sectionsBox->isChecked()) + if (ui->sectionsBox->isChecked()) { d = getPlanes(); - else + } + else { d.push_back(ui->position->value().getValue()); - double a=0,b=0,c=0; + } + double a = 0, b = 0, c = 0; switch (plane()) { case CrossSections::XY: c = 1.0; @@ -284,7 +295,7 @@ void CrossSections::apply() bool connectEdges = ui->checkBoxConnect->isChecked(); double eps = ui->spinEpsilon->value(); -#if 1 // multi-threaded sections +#if 1 // multi-threaded sections for (auto it : obj) { const Mesh::MeshObject& mesh = static_cast(it)->Mesh.getValue(); @@ -293,29 +304,30 @@ void CrossSections::apply() MeshCore::MeshFacetGrid grid(kernel); - //NOLINTBEGIN + // NOLINTBEGIN MeshCrossSection cs(kernel, grid, a, b, c, connectEdges, eps); - QFuture< std::list > future = QtConcurrent::mapped - (d, std::bind(&MeshCrossSection::section, &cs, sp::_1)); + QFuture> future = + QtConcurrent::mapped(d, std::bind(&MeshCrossSection::section, &cs, sp::_1)); future.waitForFinished(); - //NOLINTEND + // NOLINTEND TopoDS_Compound comp; BRep_Builder builder; builder.MakeCompound(comp); - for (const auto & w : future) { - for (const auto & wt : w) { - if (!wt.IsNull()) + for (const auto& w : future) { + for (const auto& wt : w) { + if (!wt.IsNull()) { builder.Add(comp, wt); + } } } App::Document* doc = it->getDocument(); std::string s = it->getNameInDocument(); s += "_cs"; - Part::Feature* section = static_cast - (doc->addObject("Part::Feature",s.c_str())); + Part::Feature* section = + static_cast(doc->addObject("Part::Feature", s.c_str())); section->Shape.setValue(comp); section->purgeTouched(); } @@ -329,8 +341,8 @@ void CrossSections::apply() for (std::vector::iterator jt = d.begin(); jt != d.end(); ++jt) { double d = *jt; str << "(" - << "App.Vector(" << a*d << ", " << b*d << ", " << c*d << "), " - << "App.Vector(" << a << ", " << b << ", " << c << ")" + << "App.Vector(" << a * d << ", " << b * d << ", " << c * d << "), " + << "App.Vector(" << a << ", " << b << ", " << c << ")" << "), "; } str << "]"; @@ -340,26 +352,31 @@ void CrossSections::apply() App::Document* doc = (*it)->getDocument(); std::string s = (*it)->getNameInDocument(); s += "_cs"; - Gui::Command::runCommand(Gui::Command::App, QString::fromLatin1( - "points=FreeCAD.getDocument(\"%1\").%2.Mesh.crossSections(%3, %4, %5)\n" - "wires=[]\n" - "for i in points:\n" - " wires.extend([Part.makePolygon(j) for j in i])\n") - .arg(QLatin1String(doc->getName())) - .arg(QLatin1String((*it)->getNameInDocument())) - .arg(planes) - .arg(eps) - .arg(connectEdges ? QLatin1String("True") : QLatin1String("False")) - .toLatin1()); + Gui::Command::runCommand( + Gui::Command::App, + QString::fromLatin1( + "points=FreeCAD.getDocument(\"%1\").%2.Mesh.crossSections(%3, %4, %5)\n" + "wires=[]\n" + "for i in points:\n" + " wires.extend([Part.makePolygon(j) for j in i])\n") + .arg(QLatin1String(doc->getName())) + .arg(QLatin1String((*it)->getNameInDocument())) + .arg(planes) + .arg(eps) + .arg(connectEdges ? QLatin1String("True") : QLatin1String("False")) + .toLatin1()); - Gui::Command::runCommand(Gui::Command::App, QString::fromLatin1( - "comp=Part.Compound(wires)\n" - "slice=FreeCAD.getDocument(\"%1\").addObject(\"Part::Feature\",\"%2\")\n" - "slice.Shape=comp\n" - "slice.purgeTouched()\n" - "del slice,comp,wires,points") - .arg(QLatin1String(doc->getName())) - .arg(QLatin1String(s.c_str())).toLatin1()); + Gui::Command::runCommand( + Gui::Command::App, + QString::fromLatin1( + "comp=Part.Compound(wires)\n" + "slice=FreeCAD.getDocument(\"%1\").addObject(\"Part::Feature\",\"%2\")\n" + "slice.Shape=comp\n" + "slice.purgeTouched()\n" + "del slice,comp,wires,points") + .arg(QLatin1String(doc->getName())) + .arg(QLatin1String(s.c_str())) + .toLatin1()); } } catch (const Base::Exception& e) { @@ -377,8 +394,9 @@ void CrossSections::xyPlaneClicked() } else { double dist = bbox.LengthZ() / ui->countSections->value(); - if (!ui->checkBothSides->isChecked()) + if (!ui->checkBothSides->isChecked()) { dist *= 0.5f; + } ui->distance->setValue(dist); calcPlanes(CrossSections::XY); } @@ -393,8 +411,9 @@ void CrossSections::xzPlaneClicked() } else { double dist = bbox.LengthY() / ui->countSections->value(); - if (!ui->checkBothSides->isChecked()) + if (!ui->checkBothSides->isChecked()) { dist *= 0.5f; + } ui->distance->setValue(dist); calcPlanes(CrossSections::XZ); } @@ -409,8 +428,9 @@ void CrossSections::yzPlaneClicked() } else { double dist = bbox.LengthX() / ui->countSections->value(); - if (!ui->checkBothSides->isChecked()) + if (!ui->checkBothSides->isChecked()) { dist *= 0.5f; + } ui->distance->setValue(dist); calcPlanes(CrossSections::YZ); } @@ -475,8 +495,9 @@ void CrossSections::countSectionsValueChanged(int v) dist = bbox.LengthX() / v; break; } - if (!ui->checkBothSides->isChecked()) + if (!ui->checkBothSides->isChecked()) { dist *= 0.5f; + } ui->distance->setValue(dist); calcPlanes(type); } @@ -552,14 +573,14 @@ std::vector CrossSections::getPlanes() const std::vector d; if (both) { - double start = pos-0.5f*(count-1)*stp; - for (int i=0; i& d, double Base::Vector3f v[4]; switch (type) { case XY: - v[0].Set(bound[0],bound[2],it); - v[1].Set(bound[1],bound[2],it); - v[2].Set(bound[1],bound[3],it); - v[3].Set(bound[0],bound[3],it); + v[0].Set(bound[0], bound[2], it); + v[1].Set(bound[1], bound[2], it); + v[2].Set(bound[1], bound[3], it); + v[3].Set(bound[0], bound[3], it); break; case XZ: - v[0].Set(bound[0],it,bound[2]); - v[1].Set(bound[1],it,bound[2]); - v[2].Set(bound[1],it,bound[3]); - v[3].Set(bound[0],it,bound[3]); + v[0].Set(bound[0], it, bound[2]); + v[1].Set(bound[1], it, bound[2]); + v[2].Set(bound[1], it, bound[3]); + v[3].Set(bound[0], it, bound[3]); break; case YZ: - v[0].Set(it,bound[0],bound[2]); - v[1].Set(it,bound[1],bound[2]); - v[2].Set(it,bound[1],bound[3]); - v[3].Set(it,bound[0],bound[3]); + v[0].Set(it, bound[0], bound[2]); + v[1].Set(it, bound[1], bound[2]); + v[2].Set(it, bound[1], bound[3]); + v[3].Set(it, bound[0], bound[3]); break; } @@ -605,9 +626,10 @@ void CrossSections::makePlanes(Plane type, const std::vector& d, double TaskCrossSections::TaskCrossSections(const Base::BoundBox3d& bb) { widget = new CrossSections(bb); - taskbox = new Gui::TaskView::TaskBox( - Gui::BitmapFactory().pixmap("Mesh_CrossSections"), - widget->windowTitle(), true, nullptr); + taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("Mesh_CrossSections"), + widget->windowTitle(), + true, + nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/MeshPart/Gui/CrossSections.h b/src/Mod/MeshPart/Gui/CrossSections.h index 99eee47a2d..f99e69b7e5 100644 --- a/src/Mod/MeshPart/Gui/CrossSections.h +++ b/src/Mod/MeshPart/Gui/CrossSections.h @@ -31,28 +31,37 @@ #include -namespace Gui { +namespace Gui +{ class View3DInventor; } -namespace MeshPartGui { +namespace MeshPartGui +{ class ViewProviderCrossSections; class Ui_CrossSections; -class CrossSections : public QDialog +class CrossSections: public QDialog { Q_OBJECT - enum Plane { XY, XZ, YZ }; + enum Plane + { + XY, + XZ, + YZ + }; public: - explicit CrossSections(const Base::BoundBox3d& bb, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); + explicit CrossSections(const Base::BoundBox3d& bb, + QWidget* parent = nullptr, + Qt::WindowFlags fl = Qt::WindowFlags()); ~CrossSections() override; void accept() override; void apply(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void keyPressEvent(QKeyEvent*) override; private: @@ -69,7 +78,7 @@ private: private: std::vector getPlanes() const; void calcPlane(Plane, double); - void calcPlanes(Plane/*, double, bool, int*/); + void calcPlanes(Plane /*, double, bool, int*/); void makePlanes(Plane, const std::vector&, double[4]); Plane plane() const; @@ -80,7 +89,7 @@ private: QPointer view; }; -class TaskCrossSections : public Gui::TaskView::TaskDialog +class TaskCrossSections: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -92,13 +101,15 @@ public: void clicked(int id) override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel; + } private: CrossSections* widget; Gui::TaskView::TaskBox* taskbox; }; -} // namespace MeshPartGui +} // namespace MeshPartGui -#endif // MESHPARTGUI_CROSSSECTIONS_H +#endif // MESHPARTGUI_CROSSSECTIONS_H diff --git a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp index 00e62a10cc..ff294c1564 100644 --- a/src/Mod/MeshPart/Gui/CurveOnMesh.cpp +++ b/src/Mod/MeshPart/Gui/CurveOnMesh.cpp @@ -23,32 +23,32 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include @@ -57,11 +57,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include @@ -79,9 +79,9 @@ #endif - /* XPM */ -static const char *cursor_curveonmesh[]={ +// clang-format off +static const char* cursor_curveonmesh[] = { "32 32 3 1", "+ c white", "# c red", @@ -118,6 +118,7 @@ static const char *cursor_curveonmesh[]={ "................................", "................................", "................................"}; +// clang-format on using namespace MeshPartGui; @@ -137,7 +138,7 @@ ViewProviderCurveOnMesh::ViewProviderCurveOnMesh() SoGroup* pcLineRoot = new SoSeparator(); pcLineRoot->addChild(pcLinesStyle); - SoBaseColor * linecol = new SoBaseColor; + SoBaseColor* linecol = new SoBaseColor; linecol->rgb.setValue(1.0f, 1.0f, 0.0f); pcLineRoot->addChild(linecol); pcLineRoot->addChild(pcCoords); @@ -155,7 +156,7 @@ ViewProviderCurveOnMesh::ViewProviderCurveOnMesh() SoGroup* pcPointRoot = new SoSeparator(); pcPointRoot->addChild(pcPointStyle); - SoBaseColor * pointcol = new SoBaseColor; + SoBaseColor* pointcol = new SoBaseColor; pointcol->rgb.setValue(1.0f, 0.5f, 0.0f); pcPointRoot->addChild(pointcol); pcPointRoot->addChild(pcNodes); @@ -230,7 +231,8 @@ public: int maxDegree; GeomAbs_Shape cont; - ApproxPar() { + ApproxPar() + { weight1 = 0.2; weight2 = 0.4; weight3 = 0.2; @@ -242,14 +244,13 @@ public: Private() : curve(new ViewProviderCurveOnMesh) , editcursor(QPixmap(cursor_curveonmesh), 7, 7) - { - } + {} ~Private() { delete curve; delete grid; } - static void vertexCallback(void * ud, SoEventCallback * n); + static void vertexCallback(void* ud, SoEventCallback* n); std::vector convert(const std::vector& points) const { std::vector pts; @@ -278,7 +279,8 @@ public: MeshCore::MeshProjection meshProjection(kernel); Base::Vector3f v1 = Base::convertTo(last.point); Base::Vector3f v2 = Base::convertTo(pick.point); - Base::Vector3f vd = Base::convertTo(viewer->getViewer()->getViewDirection()); + Base::Vector3f vd = + Base::convertTo(viewer->getViewer()->getViewDirection()); if (meshProjection.projectLineOnMesh(*grid, v1, last.facet, v2, pick.facet, vd, polyline)) { if (polyline.size() > 1) { if (cutLines.empty()) { @@ -290,7 +292,7 @@ public: dir2.normalize(); std::size_t num = pickedPoints.size(); if (num >= 2) { - dir1 = pickedPoints[num-1].point - pickedPoints[num-2].point; + dir1 = pickedPoints[num - 1].point - pickedPoints[num - 2].point; dir1.normalize(); } @@ -301,7 +303,7 @@ public: } else { std::vector& segm = cutLines.back(); - segm.insert(segm.end(), polyline.begin()+1, polyline.end()); + segm.insert(segm.end(), polyline.begin() + 1, polyline.end()); } } @@ -313,14 +315,14 @@ public: } std::vector pickedPoints; - std::list > cutLines; - bool wireClosed{false}; - double distance{1}; - double cosAngle{0.7071}; // 45 degree - bool approximate{true}; + std::list> cutLines; + bool wireClosed {false}; + double distance {1}; + double cosAngle {0.7071}; // 45 degree + bool approximate {true}; ViewProviderCurveOnMesh* curve; - Gui::ViewProviderDocumentObject* mesh{0}; - MeshCore::MeshFacetGrid* grid{nullptr}; + Gui::ViewProviderDocumentObject* mesh {0}; + MeshCore::MeshFacetGrid* grid {nullptr}; MeshCore::MeshKernel kernel; QPointer viewer; QCursor editcursor; @@ -328,9 +330,9 @@ public: }; CurveOnMeshHandler::CurveOnMeshHandler(QObject* parent) - : QObject(parent), d_ptr(new Private) -{ -} + : QObject(parent) + , d_ptr(new Private) +{} CurveOnMeshHandler::~CurveOnMeshHandler() { @@ -342,7 +344,10 @@ void CurveOnMeshHandler::enableApproximation(bool on) d_ptr->approximate = on; } -void CurveOnMeshHandler::setParameters(int maxDegree, GeomAbs_Shape cont, double tol3d, double angle) +void CurveOnMeshHandler::setParameters(int maxDegree, + GeomAbs_Shape cont, + double tol3d, + double angle) { d_ptr->par.maxDegree = maxDegree; d_ptr->par.cont = cont; @@ -368,13 +373,15 @@ void CurveOnMeshHandler::onCreate() std::vector segm = d_ptr->convert(*it); if (d_ptr->approximate) { Handle(Geom_BSplineCurve) spline = approximateSpline(segm); - if (!spline.IsNull()) + if (!spline.IsNull()) { displaySpline(spline); + } } else { TopoDS_Wire wire; - if (makePolyline(segm, wire)) + if (makePolyline(segm, wire)) { displayPolyline(wire); + } } } @@ -449,8 +456,9 @@ std::vector CurveOnMeshHandler::getVertexes() const { std::vector pts; pts.reserve(d_ptr->pickedPoints.size()); - for (const auto & it : d_ptr->pickedPoints) + for (const auto& it : d_ptr->pickedPoints) { pts.push_back(it.point); + } return pts; } @@ -466,19 +474,24 @@ std::vector CurveOnMeshHandler::getPoints() const Handle(Geom_BSplineCurve) CurveOnMeshHandler::approximateSpline(const std::vector& points) { - TColgp_Array1OfPnt pnts(1,points.size()); + TColgp_Array1OfPnt pnts(1, points.size()); Standard_Integer index = 1; for (const auto& it : points) { - float x,y,z; - it.getValue(x,y,z); - pnts(index++) = gp_Pnt(x,y,z); + float x, y, z; + it.getValue(x, y, z); + pnts(index++) = gp_Pnt(x, y, z); } try { - //GeomAPI_PointsToBSpline fit(pnts, 1, 2, GeomAbs_C0, 1.0e-3); - //GeomAPI_PointsToBSpline fit(pnts, d_ptr->par.weight1, d_ptr->par.weight2, d_ptr->par.weight3, - // d_ptr->par.maxDegree, d_ptr->par.cont, d_ptr->par.tol3d); - GeomAPI_PointsToBSpline fit(pnts, 1, d_ptr->par.maxDegree, d_ptr->par.cont, d_ptr->par.tol3d); + // GeomAPI_PointsToBSpline fit(pnts, 1, 2, GeomAbs_C0, 1.0e-3); + // GeomAPI_PointsToBSpline fit(pnts, d_ptr->par.weight1, d_ptr->par.weight2, + // d_ptr->par.weight3, + // d_ptr->par.maxDegree, d_ptr->par.cont, d_ptr->par.tol3d); + GeomAPI_PointsToBSpline fit(pnts, + 1, + d_ptr->par.maxDegree, + d_ptr->par.cont, + d_ptr->par.tol3d); Handle(Geom_BSplineCurve) spline = fit.Curve(); return spline; } @@ -497,18 +510,18 @@ void CurveOnMeshHandler::approximateEdge(const TopoDS_Edge& edge, double toleran const TColgp_Array1OfPnt& aNodes = aPoly->Nodes(); std::vector pts; pts.reserve(numNodes); - for (int i=aNodes.Lower(); i<=aNodes.Upper(); i++) { + for (int i = aNodes.Lower(); i <= aNodes.Upper(); i++) { const gp_Pnt& p = aNodes.Value(i); pts.emplace_back(static_cast(p.X()), - static_cast(p.Y()), - static_cast(p.Z())); + static_cast(p.Y()), + static_cast(p.Z())); } d_ptr->curve->setPoints(pts); } } -void CurveOnMeshHandler::displaySpline(const Handle(Geom_BSplineCurve)& spline) +void CurveOnMeshHandler::displaySpline(const Handle(Geom_BSplineCurve) & spline) { if (d_ptr->viewer) { double u = spline->FirstParameter(); @@ -529,9 +542,9 @@ bool CurveOnMeshHandler::makePolyline(const std::vector& points, TopoDS { BRepBuilderAPI_MakePolygon mkPoly; for (const auto& it : points) { - float x,y,z; - it.getValue(x,y,z); - mkPoly.Add(gp_Pnt(x,y,z)); + float x, y, z; + it.getValue(x, y, z); + mkPoly.Add(gp_Pnt(x, y, z)); } if (mkPoly.IsDone()) { @@ -548,7 +561,8 @@ void CurveOnMeshHandler::displayPolyline(const TopoDS_Wire& wire) Gui::View3DInventorViewer* view3d = d_ptr->viewer->getViewer(); App::Document* doc = view3d->getDocument()->getDocument(); doc->openTransaction("Add polyline"); - Part::Feature* part = static_cast(doc->addObject("Part::Feature", "Polyline")); + Part::Feature* part = + static_cast(doc->addObject("Part::Feature", "Polyline")); part->Shape.setValue(wire); doc->commitTransaction(); } @@ -578,23 +592,27 @@ void CurveOnMeshHandler::closeWire() } } -void CurveOnMeshHandler::Private::vertexCallback(void * ud, SoEventCallback * cb) +void CurveOnMeshHandler::Private::vertexCallback(void* ud, SoEventCallback* cb) { - Gui::View3DInventorViewer* view = static_cast(cb->getUserData()); + Gui::View3DInventorViewer* view = static_cast(cb->getUserData()); const SoEvent* ev = cb->getEvent(); if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) { // set as handled cb->setHandled(); - const SoMouseButtonEvent * mbe = static_cast(ev); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { - const SoPickedPoint * pp = cb->getPickedPoint(); + const SoMouseButtonEvent* mbe = static_cast(ev); + if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::DOWN) { + const SoPickedPoint* pp = cb->getPickedPoint(); if (pp) { CurveOnMeshHandler* self = static_cast(ud); if (!self->d_ptr->wireClosed) { Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(pp->getPath()); - if (vp && vp->getTypeId().isDerivedFrom(MeshGui::ViewProviderMesh::getClassTypeId())) { - MeshGui::ViewProviderMesh* mesh = static_cast(vp); + if (vp + && vp->getTypeId().isDerivedFrom( + MeshGui::ViewProviderMesh::getClassTypeId())) { + MeshGui::ViewProviderMesh* mesh = + static_cast(vp); const SoDetail* detail = pp->getDetail(); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { // get the mesh and build a grid @@ -634,7 +652,9 @@ void CurveOnMeshHandler::Private::vertexCallback(void * ud, SoEventCallback * cb } } // try to 'complete' the curve - else if (vp && vp->getTypeId().isDerivedFrom(ViewProviderCurveOnMesh::getClassTypeId())) { + else if (vp + && vp->getTypeId().isDerivedFrom( + ViewProviderCurveOnMesh::getClassTypeId())) { const SbVec3f& p = pp->getPoint(); if (self->tryCloseWire(p)) { self->closeWire(); @@ -643,11 +663,11 @@ void CurveOnMeshHandler::Private::vertexCallback(void * ud, SoEventCallback * cb } } else { - Gui::getMainWindow()->statusBar()->showMessage( - tr("No point was picked")); + Gui::getMainWindow()->statusBar()->showMessage(tr("No point was picked")); } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 + && mbe->getState() == SoButtonEvent::UP) { CurveOnMeshHandler* self = static_cast(ud); QTimer::singleShot(100, self, &CurveOnMeshHandler::onContextMenu); } diff --git a/src/Mod/MeshPart/Gui/CurveOnMesh.h b/src/Mod/MeshPart/Gui/CurveOnMesh.h index f683c0b2b3..1daa9a1063 100644 --- a/src/Mod/MeshPart/Gui/CurveOnMesh.h +++ b/src/Mod/MeshPart/Gui/CurveOnMesh.h @@ -23,10 +23,10 @@ #ifndef MESHPARTGUI_CURVEONMESH_H #define MESHPARTGUI_CURVEONMESH_H -#include -#include -#include #include +#include +#include +#include #include @@ -37,15 +37,16 @@ class SoDrawStyle; class TopoDS_Edge; class TopoDS_Wire; -namespace Gui { +namespace Gui +{ class View3DInventor; class ViewProvider; -} +} // namespace Gui namespace MeshPartGui { -class ViewProviderCurveOnMesh : public Gui::ViewProviderDocumentObject +class ViewProviderCurveOnMesh: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(MeshPartGui::ViewProviderCurveOnMesh); @@ -59,13 +60,13 @@ public: void setDisplayMode(const char* ModeName) override; private: - SoCoordinate3 * pcCoords; - SoCoordinate3 * pcNodes; - SoDrawStyle * pcPointStyle; - SoDrawStyle * pcLinesStyle; + SoCoordinate3* pcCoords; + SoCoordinate3* pcNodes; + SoDrawStyle* pcPointStyle; + SoDrawStyle* pcLinesStyle; }; -class CurveOnMeshHandler : public QObject +class CurveOnMeshHandler: public QObject { Q_OBJECT @@ -81,7 +82,7 @@ public: private: Handle(Geom_BSplineCurve) approximateSpline(const std::vector& points); void approximateEdge(const TopoDS_Edge&, double tolerance); - void displaySpline(const Handle(Geom_BSplineCurve)&); + void displaySpline(const Handle(Geom_BSplineCurve) &); bool makePolyline(const std::vector& points, TopoDS_Wire& wire); void displayPolyline(const TopoDS_Wire& wire); std::vector getPoints() const; @@ -101,6 +102,6 @@ private: std::unique_ptr d_ptr; }; -} +} // namespace MeshPartGui -#endif // MESHPARTGUI_CURVEONMESH_H +#endif // MESHPARTGUI_CURVEONMESH_H diff --git a/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py b/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py index 8ee5893b95..a5bef0af75 100644 --- a/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py +++ b/src/Mod/MeshPart/Gui/MeshFlatteningCommand.py @@ -1,24 +1,24 @@ -#*************************************************************************** -#* Copyright (c) 2017 Lorenz Lechner * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This library is free software; you can redistribute it and/or * -#* modify it under the terms of the GNU Library General Public * -#* License as published by the Free Software Foundation; either * -#* version 2 of the License, or (at your option) any later version. * -#* * -#* This library is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this library; see the file COPYING.LIB. If not, * -#* write to the Free Software Foundation, Inc., 59 Temple Place, * -#* Suite 330, Boston, MA 02111-1307, USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2017 Lorenz Lechner * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This library is free software; you can redistribute it and/or * +# * modify it under the terms of the GNU Library General Public * +# * License as published by the Free Software Foundation; either * +# * version 2 of the License, or (at your option) any later version. * +# * * +# * This library is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this library; see the file COPYING.LIB. If not, * +# * write to the Free Software Foundation, Inc., 59 Temple Place, * +# * Suite 330, Boston, MA 02111-1307, USA * +# * * +# ***************************************************************************/ import Mesh import FreeCAD as App @@ -26,7 +26,8 @@ import FreeCADGui as Gui import Part import MeshPartGui -from PySide.QtCore import QT_TRANSLATE_NOOP # for translations +from PySide.QtCore import QT_TRANSLATE_NOOP # for translations + class BaseCommand(object): def __init__(self): @@ -43,21 +44,28 @@ class CreateFlatMesh(BaseCommand): """create flat wires from a meshed face""" def GetResources(self): - return {'Pixmap': 'MeshPart_CreateFlatMesh.svg', - 'MenuText': QT_TRANSLATE_NOOP("MeshPart_CreateFlatMesh", "Unwrap Mesh"), - 'ToolTip': QT_TRANSLATE_NOOP("MeshPart_CreateFlatMesh", "Find a flat representation of a mesh.")} + return { + "Pixmap": "MeshPart_CreateFlatMesh.svg", + "MenuText": QT_TRANSLATE_NOOP("MeshPart_CreateFlatMesh", "Unwrap Mesh"), + "ToolTip": QT_TRANSLATE_NOOP( + "MeshPart_CreateFlatMesh", "Find a flat representation of a mesh." + ), + } def Activated(self): import numpy as np import flatmesh - obj = Gui.Selection.getSelection()[0] # obj must be a Mesh (Mesh-Design->Meshes->Create-Mesh) + + obj = Gui.Selection.getSelection()[ + 0 + ] # obj must be a Mesh (Mesh-Design->Meshes->Create-Mesh) points = np.array([[i.x, i.y, i.z] for i in obj.Mesh.Points]) - faces = np.array([list(i) for i in obj.Mesh.Topology[1]]) + faces = np.array([list(i) for i in obj.Mesh.Topology[1]]) flattener = flatmesh.FaceUnwrapper(points, faces) flattener.findFlatNodes(5, 0.95) boundaries = flattener.getFlatBoundaryNodes() - #print('number of nodes: {}'.format(len(flattener.ze_nodes))) - #print('number of faces: {}'.format(len(flattener.tris))) + # print('number of nodes: {}'.format(len(flattener.ze_nodes))) + # print('number of faces: {}'.format(len(flattener.tris))) wires = [] for edge in boundaries: @@ -65,23 +73,28 @@ class CreateFlatMesh(BaseCommand): Part.show(Part.Wire(pi)) def IsActive(self): - assert(super(CreateFlatMesh, self).IsActive()) - assert(isinstance(Gui.Selection.getSelection()[0].Mesh, Mesh.Mesh)) + assert super(CreateFlatMesh, self).IsActive() + assert isinstance(Gui.Selection.getSelection()[0].Mesh, Mesh.Mesh) return True class CreateFlatFace(BaseCommand): """create a flat face from a single face - only full faces are supported right now""" + only full faces are supported right now""" def GetResources(self): - return {'Pixmap': 'MeshPart_CreateFlatFace.svg', - 'MenuText': QT_TRANSLATE_NOOP("MeshPart_CreateFlatFace", "Unwrap Face"), - 'ToolTip': QT_TRANSLATE_NOOP("MeshPart_CreateFlatFace", "Find a flat representation of a face.")} + return { + "Pixmap": "MeshPart_CreateFlatFace.svg", + "MenuText": QT_TRANSLATE_NOOP("MeshPart_CreateFlatFace", "Unwrap Face"), + "ToolTip": QT_TRANSLATE_NOOP( + "MeshPart_CreateFlatFace", "Find a flat representation of a face." + ), + } def Activated(self): import numpy as np import flatmesh + face = Gui.Selection.getSelectionEx()[0].SubObjects[0] shape = face.toNurbs() face = shape.Faces[0] @@ -104,16 +117,17 @@ class CreateFlatFace(BaseCommand): Part.show(bs.toShape()) def IsActive(self): - assert(super(CreateFlatFace, self).IsActive()) - assert(isinstance(Gui.Selection.getSelectionEx()[0].SubObjects[0], Part.Face)) + assert super(CreateFlatFace, self).IsActive() + assert isinstance(Gui.Selection.getSelectionEx()[0].SubObjects[0], Part.Face) return True # Test if pybind11 dependency is available try: import flatmesh - Gui.addCommand('MeshPart_CreateFlatMesh', CreateFlatMesh()) - Gui.addCommand('MeshPart_CreateFlatFace', CreateFlatFace()) + + Gui.addCommand("MeshPart_CreateFlatMesh", CreateFlatMesh()) + Gui.addCommand("MeshPart_CreateFlatFace", CreateFlatFace()) except ImportError: App.Console.PrintLog("flatmesh-commands are not available\n") App.Console.PrintLog("flatmesh needs pybind11 as build dependency\n") diff --git a/src/Mod/MeshPart/Gui/PreCompiled.h b/src/Mod/MeshPart/Gui/PreCompiled.h index 81142904cf..7b8b8dda80 100644 --- a/src/Mod/MeshPart/Gui/PreCompiled.h +++ b/src/Mod/MeshPart/Gui/PreCompiled.h @@ -26,9 +26,9 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4005) -# pragma warning(disable : 4290) -# pragma warning(disable : 4275) +#pragma warning(disable : 4005) +#pragma warning(disable : 4290) +#pragma warning(disable : 4275) #endif #ifdef _PreComp_ @@ -40,31 +40,30 @@ // Qt Toolkit #include #include -#include -#include #include +#include #include #include #include #include -#include #include +#include // OCCT -#include -#include #include #include #include -#include +#include +#include #include -#include +#include #include #include #include #include #include #include +#include // Inventor #include @@ -77,6 +76,6 @@ #include #include -#endif //_PreComp_ +#endif //_PreComp_ -#endif // __PRECOMPILED_GUI__ +#endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc b/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc index 6c58ee8b3a..8ad53a9b91 100644 --- a/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc +++ b/src/Mod/MeshPart/Gui/Resources/MeshPart.qrc @@ -6,4 +6,3 @@ icons/MeshPart_CreateFlatMesh.svg - diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart.ts index ff2e19846d..1d3bfd9a42 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart - + Cross-sections... - + Cross-sections @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh - + Curve on mesh... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. @@ -59,17 +59,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh - + Create section from mesh and plane - + Section @@ -96,12 +96,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane - + Section with plane @@ -169,7 +169,7 @@ This command only works with a 'mesh' object. - + Failure @@ -177,32 +177,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create - + Close wire - + Clear - + Cancel - + Wrong mesh picked - + No point was picked @@ -477,30 +477,30 @@ A value in the range of 0.2-10. - + Gmsh - - + + No active document - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. @@ -508,12 +508,12 @@ Select a different shape, please. MeshPart_Section - + Select plane - + Please select a plane at which you section the mesh. @@ -531,27 +531,27 @@ Select a different shape, please. - + Trim by plane - + Select the side you want to keep. - + Below - + Above - + Split @@ -567,12 +567,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh - + Find a flat representation of a mesh. @@ -580,12 +580,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face - + Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_be.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_be.ts index b5711b1b41..8438c399be 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_be.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_be.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Паліганальная сетка Дэталяў - + Cross-sections... Папярочныя перасекі... - + Cross-sections Папярочныя перасекі @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Паліганальная сетка - + Curve on mesh... Крывая на паліганальнай сетцы... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Стварае набліжаную крывую - над паліганальнай сеткай. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh - Mesh + Паліганальная сетка - + Create section from mesh and plane Стварыць перасек з паліганальнай сеткі і плоскасці - + Section Перасек @@ -80,7 +80,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + Паліганальная сетка @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Абрэзаць плоскасцю - + Section with plane Перасек плоскасцю @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Злучыць рэбры, калі адлегласць меней, чым - + Failure Няўдача @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Стварыць - + Close wire Замкнуць ломаную лінію - + Clear Ачысціць - + Cancel Скасаваць - + Wrong mesh picked Абрана няправільная паліганальная сетка - + No point was picked Не абрана ніводнай кропкі @@ -485,32 +485,32 @@ A value in the range of 0.2-10. Пакінуць панэль адчыненай - + Gmsh Gmsh - - + + No active document Без бягучага дакумента - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Вы абралі цела без наканечніка. Калі ласка, усталюйце наканечнік цела, альбо абярыце іншую фігуру. - + You have selected a shape without faces. Select a different shape, please. Вы абралі фігуру без граняў. Калі ласка, абярыце іншую фігуру. - + Select a shape for meshing, first. Спачатку абярыце фігуру для стварэння паліганальнай сеткі. @@ -518,12 +518,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Абраць плоскасць - + Please select a plane at which you section the mesh. Калі ласка, абярыце плоскасць, якой вы будзеце разразаць паліганальную сетку. @@ -541,27 +541,27 @@ Select a different shape, please. Калі ласка, абярыце плоскасць, якой вы будзеце абразаць паліганальную сетку. - + Trim by plane Абрэзаць плоскасцю - + Select the side you want to keep. Абярыце бок, які вы жадаеце пакінуць. - + Below Ніжэй - + Above Вышэй - + Split Падзяліць @@ -577,12 +577,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Разгарнуць паліганальную сетку - + Find a flat representation of a mesh. Знайсці плоскае ўяўленне паліганальнай сеткі. @@ -590,12 +590,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Разгарнуць грань - + Find a flat representation of a face. Знайсці плоскае ўяўленне грані. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ca.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ca.ts index 32c88ae009..bb9cb25a1a 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ca.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ca.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Mallat - + Cross-sections... Interseccions... - + Cross-sections Interseccions @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Corba en malla... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Crea una corba aproximada damunt d'una malla. @@ -60,17 +60,17 @@ Aquesta comanda només funciona amb objectes 'malla'. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Crea una secció a partir d'una malla i un pla - + Section Secció @@ -97,12 +97,12 @@ Aquesta comanda només funciona amb objectes 'malla'. Command - + Trim with plane Retalla amb el pla - + Section with plane Secció amb un pla @@ -170,7 +170,7 @@ Aquesta comanda només funciona amb objectes 'malla'. Connecta les arestes si la distància és menor que - + Failure Fallada @@ -178,32 +178,32 @@ Aquesta comanda només funciona amb objectes 'malla'. MeshPartGui::CurveOnMeshHandler - + Create Crea - + Close wire Tanca el filferro - + Clear Neteja - + Cancel Cancel·la - + Wrong mesh picked S'ha seleccionat una malla incorrecta - + No point was picked No s'ha seleccionat cap punt. @@ -480,32 +480,32 @@ A value in the range of 0.2-10. Deixa el tauler obert - + Gmsh Gmsh - - + + No active document Document no Actiu - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Heu seleccionat un cos sense punta Posa la punta del cos o selecciona una forma diferent, si us plau. - + You have selected a shape without faces. Select a different shape, please. Heu seleccionat una forma sense cares. Seleccioneu una forma diferent, si us plau. - + Select a shape for meshing, first. Seleccioneu primer una forma per al mallat @@ -513,12 +513,12 @@ Seleccioneu una forma diferent, si us plau. MeshPart_Section - + Select plane Seleccioneu un pla - + Please select a plane at which you section the mesh. Seleccioneu un pla a partir del qual seccionat la malla @@ -536,27 +536,27 @@ Seleccioneu una forma diferent, si us plau. Seleccioneu un pla al qual ajustar la malla - + Trim by plane Divideix pel pla - + Select the side you want to keep. Seleccioneu la cara que voleu conservar. - + Below Davall - + Above Damunt - + Split Dividir @@ -572,12 +572,12 @@ Seleccioneu una forma diferent, si us plau. MeshPart_CreateFlatMesh - + Unwrap Mesh Desembolica la malla - + Find a flat representation of a mesh. Trobeu una representació plana d'una malla. @@ -585,12 +585,12 @@ Seleccioneu una forma diferent, si us plau. MeshPart_CreateFlatFace - + Unwrap Face Desembolica la cara - + Find a flat representation of a face. Trobeu una representació plana d'una malla. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts index 3d454b8c13..fdb7405e0c 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Síťový díl - + Cross-sections... Řezy... - + Cross-sections Řezy @@ -22,21 +22,21 @@ CmdMeshPartCurveOnMesh - + Mesh - Mesh + Síť - + Curve on mesh... Křivka na síť... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Vytvoří přibližnou křivku na povrchu sítě. -Tento příkaz pracuje pouze s objektem typu 'mesh'. +Tento příkaz funguje pouze se 'síťovým' objektem. @@ -44,7 +44,7 @@ Tento příkaz pracuje pouze s objektem typu 'mesh'. Mesh - Mesh + Síť @@ -60,17 +60,17 @@ Tento příkaz pracuje pouze s objektem typu 'mesh'. CmdMeshPartSection - + Mesh - Mesh + Síť - + Create section from mesh and plane Vytvořit průřez ze sítě a roviny - + Section Výběr @@ -80,7 +80,7 @@ Tento příkaz pracuje pouze s objektem typu 'mesh'. Mesh - Mesh + Síť @@ -97,12 +97,12 @@ Tento příkaz pracuje pouze s objektem typu 'mesh'. Command - + Trim with plane Oříznout rovinou - + Section with plane Průřez pomocí roviny @@ -170,7 +170,7 @@ Tento příkaz pracuje pouze s objektem typu 'mesh'. Propojit hrany, pokud je vzdálenost menší než - + Failure Selhání @@ -178,32 +178,32 @@ Tento příkaz pracuje pouze s objektem typu 'mesh'. MeshPartGui::CurveOnMeshHandler - + Create Vytvořit - + Close wire Uzavření drátu - + Clear Vyčistit - + Cancel Zrušit - + Wrong mesh picked Je vybrána špatná síť - + No point was picked Nebyl vybrán bod @@ -220,9 +220,9 @@ Tento příkaz pracuje pouze s objektem typu 'mesh'. Press 'Start', then pick points on the mesh; when enough points have been set, right-click and choose 'Create'. Repeat this process to create more splines. Close this task panel to complete the operation. This command only works with a 'mesh' object, not a regular face or surface. To convert an object to a mesh use the tools of the Mesh Workbench. - Stiskněte 'Start' a vyberte body na síti; po nastavení dostatečného počtu bodů klikněte pravým tlačítkem myši a zvolte „Vytvořit“. Tento postup opakujte, chcete-li vytvořit další spline. Pro dokončení operace zavřete tento panel úloh. + Stiskněte 'Start' a vyberte body na síti; po nastavení dostatečného počtu bodů klikněte pravým tlačítkem myši a zvolte 'Vytvořit'. Tento postup opakujte, chcete-li vytvořit další splajn. Pro dokončení operace zavřete tento panel úloh. -Tento příkaz funguje pouze s „síťovým“ objektem, nikoli s běžnou plochou nebo plochou. Chcete-li převést objekt na síť, použijte nástroje Mesh Workbench. +Tento příkaz funguje pouze se 'síťovým' objektem, nikoli s běžnou plochou nebo povrchem. Chcete-li převést objekt na síť, použijte nástroje pracovního prostředí Síť. @@ -486,32 +486,32 @@ Hodnota v rozmezí 0.2-10. Ponechat panel otevřený - + Gmsh Gmsh - - + + No active document Žádný aktivní dokument - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Vybrali jste tělo bez špičky. Buď nastavte špičku těla nebo vyberte jiný tvar, prosím. - + You have selected a shape without faces. Select a different shape, please. Vybrali jste tvar bez ploch. Vyberte jiný tvar, prosím. - + Select a shape for meshing, first. Nejprve vyber tvar pro síťování. @@ -519,12 +519,12 @@ Vyberte jiný tvar, prosím. MeshPart_Section - + Select plane Vyberte rovinu - + Please select a plane at which you section the mesh. Prosím vyberte rovinu, kterou povede řez sítě. @@ -542,27 +542,27 @@ Vyberte jiný tvar, prosím. Prosím vyberte rovinu, kterou ořezáváte síť. - + Trim by plane Oříznout pomocí roviny - + Select the side you want to keep. Vyberte stranu, kterou chcete zachovat. - + Below Pod - + Above Nad - + Split Rozdělit @@ -578,12 +578,12 @@ Vyberte jiný tvar, prosím. MeshPart_CreateFlatMesh - + Unwrap Mesh Rozbalte síť - + Find a flat representation of a mesh. Najděte ploché znázornění sítě. @@ -591,12 +591,12 @@ Vyberte jiný tvar, prosím. MeshPart_CreateFlatFace - + Unwrap Face Rozbalit obličej - + Find a flat representation of a face. Najděte ploché znázornění sítě. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_de.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_de.ts index b47d939d99..628df10369 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_de.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_de.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Netz-Formteil - + Cross-sections... Schnitte... - + Cross-sections Schnitte @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Netz - + Curve on mesh... Kurve auf Netz... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Erstellt eine angenäherte Kurve auf einem Netz. @@ -60,17 +60,17 @@ Dieser Befehl funktioniert nur mit einem 'mesh'-Objekt. CmdMeshPartSection - + Mesh Netz - + Create section from mesh and plane Schnitt aus Netz und Fläche erstellen - + Section Schnitt @@ -97,12 +97,12 @@ Dieser Befehl funktioniert nur mit einem 'mesh'-Objekt. Command - + Trim with plane An Ebene trimmen - + Section with plane Mit Ebene schneiden @@ -170,7 +170,7 @@ Dieser Befehl funktioniert nur mit einem 'mesh'-Objekt. Kanten verbinden, wenn der Abstand kleiner ist als - + Failure Ein Fehler ist aufgetreten @@ -178,32 +178,32 @@ Dieser Befehl funktioniert nur mit einem 'mesh'-Objekt. MeshPartGui::CurveOnMeshHandler - + Create Erstellen - + Close wire Kantenzug schließen - + Clear Leeren - + Cancel Abbrechen - + Wrong mesh picked Falsches Netz ausgewählt - + No point was picked Es wurde kein Punkt ausgewählt @@ -484,32 +484,32 @@ Ein Wert im Bereich von 0.2-10. Fenster geöffnet lassen - + Gmsh Gmsh - - + + No active document Kein aktives Dokument - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Es wurde ein Körper ohne TIP ausgewählt. Bitte TIP des Körpers festlegen oder eine andere Form auswählen. - + You have selected a shape without faces. Select a different shape, please. Du hast eine Form ohne Flächen ausgewählt. Wähle bitte eine andere Form aus. - + Select a shape for meshing, first. Wählen Sie zuerst eine Form für die Vernetzung. @@ -517,12 +517,12 @@ Wähle bitte eine andere Form aus. MeshPart_Section - + Select plane Ebene auswählen - + Please select a plane at which you section the mesh. Bitte wählen Sie eine Ebene, bei der Sie das Netz unterteilen. @@ -540,27 +540,27 @@ Wähle bitte eine andere Form aus. Bitte wählen Sie eine Ebene, mit welcher Sie das Netz trimmen. - + Trim by plane Beschneiden mit einer Ebene - + Select the side you want to keep. Wählen Sie die Seite, die Sie behalten möchten. - + Below Unter - + Above Über - + Split Teilen @@ -576,12 +576,12 @@ Wähle bitte eine andere Form aus. MeshPart_CreateFlatMesh - + Unwrap Mesh Netz abwickeln - + Find a flat representation of a mesh. Ermittelt eine ebene Darstellung eines Netzes. @@ -589,12 +589,12 @@ Wähle bitte eine andere Form aus. MeshPart_CreateFlatFace - + Unwrap Face Fläche abwickeln - + Find a flat representation of a face. Ermittelt eine ebene Darstellung einer Fläche. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_el.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_el.ts index dbcb9afd64..4216dc8be7 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_el.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_el.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart ΕξάρτημαΠλέγματος - + Cross-sections... Ορθογώνιες διατομές... - + Cross-sections Ορθογώνιες διατομές @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh - Mesh + Πλέγμα - + Curve on mesh... Καμπύλη σε πλέγμα... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Δημιουργεί μια κατά προσέγγιση καμπύλη πάνω από ένα πλέγμα. @@ -44,7 +44,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + Πλέγμα @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh - Mesh + Πλέγμα - + Create section from mesh and plane Δημιουργήστε τομή από πλέγμα και επίπεδο - + Section Τομή @@ -80,7 +80,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + Πλέγμα @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Περικοπή με επίπεδο - + Section with plane Τμήμα με επίπεδο @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Συνδέστε τις άκρες εάν η απόσταση είναι μικρότερη από - + Failure Αποτυχία @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Δημιουργήστε - + Close wire Κλείσιμο σύρματος - + Clear Εκκαθάριση - + Cancel Ακύρωση - + Wrong mesh picked Επιλέχθηκε λάθος πλέγμα - + No point was picked Δεν επιλέχθηκε κανένα σημείο @@ -484,32 +484,32 @@ A value in the range of 0.2-10. Αφήστε τον πίνακα ανοιχτό - + Gmsh Gmsh - - + + No active document Κανένα ενεργό έγγραφο - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Έχετε επιλέξει σώμα χωρίς άκρη. Είτε ρυθμίστε την άκρη του σώματος είτε επιλέξτε ένα διαφορετικό σχήμα. - + You have selected a shape without faces. Select a different shape, please. Έχετε επιλέξει ένα σχήμα χωρίς πρόσωπα. Πρακαλώ επιλέξτε άλλο σχήμα. - + Select a shape for meshing, first. Επιλέξτε ένα σχήμα για πλεγματοποίηση, πρώτα. @@ -517,12 +517,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Επιλέξτε επίπεδο - + Please select a plane at which you section the mesh. Παρακαλώ επιλέξτε ένα επίπεδο τομής για το πλέγμα. @@ -540,27 +540,27 @@ Select a different shape, please. Παρακαλώ επιλέξτε ένα επίπεδο στο οποίο θα περικοπούν οι ακμές του πλέγματος. - + Trim by plane Περικοπή ανά επίπεδο - + Select the side you want to keep. Επιλέξτε την πλευρά που θέλετε να κρατήσετε. - + Below Κάτω - + Above Πάνω - + Split Χωρισμός @@ -576,12 +576,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Ξετυλίξτε το πλέγμα - + Find a flat representation of a mesh. Βρείτε μια επίπεδη παράσταση ενός πλέγματος. @@ -589,12 +589,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Ξετυλίξτε το πρόσωπο - + Find a flat representation of a face. Βρείτε μια επίπεδη παράσταση ενός πλέγματος. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-AR.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-AR.ts index aca3031a00..985d81bcc8 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-AR.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-AR.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart PiezaDeMalla - + Cross-sections... Cortes transversales... - + Cross-sections Cortes transversales @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Malla - + Curve on mesh... Curva en malla... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Crea una curva aproximada sobre una malla. @@ -60,17 +60,17 @@ Este comando solo funciona con un objeto 'malla'. CmdMeshPartSection - + Mesh Malla - + Create section from mesh and plane Crear corte desde malla y plano - + Section Corte @@ -97,12 +97,12 @@ Este comando solo funciona con un objeto 'malla'. Command - + Trim with plane Recortar con plano - + Section with plane Corte con plano @@ -170,7 +170,7 @@ Este comando solo funciona con un objeto 'malla'. Conecte las aristas si la distancia es inferior a - + Failure Fallo @@ -178,32 +178,32 @@ Este comando solo funciona con un objeto 'malla'. MeshPartGui::CurveOnMeshHandler - + Create Crear - + Close wire Cerrar alambre - + Clear Limpiar - + Cancel Cancelar - + Wrong mesh picked Malla equivocada seleccionada - + No point was picked No fue elegido ningún punto @@ -486,32 +486,32 @@ Un valor en el rango de 0.2-10. Dejar panel abierto - + Gmsh Gmsh - - + + No active document Ningún documento activo - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Ha seleccionado un cuerpo sin punta. Puede establecer la punta del cuerpo o seleccionar una forma diferente, por favor. - + You have selected a shape without faces. Select a different shape, please. Has seleccionado una forma sin caras. Selecciona una forma diferente, por favor. - + Select a shape for meshing, first. Seleccione primero una forma para la malla. @@ -519,12 +519,12 @@ Selecciona una forma diferente, por favor. MeshPart_Section - + Select plane Seleccionar plano - + Please select a plane at which you section the mesh. Por favor seleccione el plano de corte de la malla. @@ -542,27 +542,27 @@ Selecciona una forma diferente, por favor. Por favor, seleccione un plano en el que recortar la malla. - + Trim by plane Recortar por plano - + Select the side you want to keep. Seleccione el lado que desea mantener. - + Below Debajo - + Above Encima - + Split Dividir @@ -578,12 +578,12 @@ Selecciona una forma diferente, por favor. MeshPart_CreateFlatMesh - + Unwrap Mesh Desenvolver Malla - + Find a flat representation of a mesh. Encuentra una representación plana de una malla. @@ -591,12 +591,12 @@ Selecciona una forma diferente, por favor. MeshPart_CreateFlatFace - + Unwrap Face Desenvolver Cara - + Find a flat representation of a face. Encuentra una representación plana de la cara. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-ES.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-ES.ts index 4cec0bf725..e79a240cb3 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-ES.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_es-ES.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart MeshPart - + Cross-sections... Cortes transversales... - + Cross-sections Cortes transversales @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Malla - + Curve on mesh... Curva en malla... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Crea una curva aproximada encima de una malla. @@ -60,17 +60,17 @@ Este comando solo funciona con un objeto 'malla'. CmdMeshPartSection - + Mesh Malla - + Create section from mesh and plane Crear sección de malla y del plano - + Section Sección @@ -97,12 +97,12 @@ Este comando solo funciona con un objeto 'malla'. Command - + Trim with plane Cortar con plano - + Section with plane Sección con planos @@ -170,7 +170,7 @@ Este comando solo funciona con un objeto 'malla'. Conectar aristas si la distancia es inferior a - + Failure Fallo @@ -178,32 +178,32 @@ Este comando solo funciona con un objeto 'malla'. MeshPartGui::CurveOnMeshHandler - + Create Crear - + Close wire Cerrar alambre - + Clear Limpiar - + Cancel Cancelar - + Wrong mesh picked Malla equivocada seleccionada - + No point was picked No fue elegido ningún punto @@ -486,32 +486,32 @@ Un valor en el rango de 0.2-10. Dejar panel abierto - + Gmsh Gmsh - - + + No active document Ningún documento activo - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Ha seleccionado un cuerpo sin punta. Puede establecer la punta del cuerpo o seleccionar una forma diferente, por favor. - + You have selected a shape without faces. Select a different shape, please. Ha seleccionado una forma sin caras. Seleccione una forma diferente, por favor. - + Select a shape for meshing, first. Seleccione primero una forma para el mallado. @@ -519,12 +519,12 @@ Seleccione una forma diferente, por favor. MeshPart_Section - + Select plane Seleccionar plano - + Please select a plane at which you section the mesh. Por favor seleccione el plano de corte de la malla. @@ -542,27 +542,27 @@ Seleccione una forma diferente, por favor. Por favor seleccione el plano de corte de la malla. - + Trim by plane Corte por plano - + Select the side you want to keep. Seleccione el lado que desea mantener. - + Below Debajo - + Above Encima - + Split Dividir @@ -578,12 +578,12 @@ Seleccione una forma diferente, por favor. MeshPart_CreateFlatMesh - + Unwrap Mesh Desenvolver Malla - + Find a flat representation of a mesh. Encuentra una representación plana de una malla. @@ -591,12 +591,12 @@ Seleccione una forma diferente, por favor. MeshPart_CreateFlatFace - + Unwrap Face Desenvolver Cara - + Find a flat representation of a face. Encuentra una representación plana de la cara. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_eu.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_eu.ts index e27b0776a8..cee4e026a0 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_eu.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_eu.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Amaraun-pieza - + Cross-sections... Zeharkako sekzioak... - + Cross-sections Zeharkako sekzioak @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Amarauna - + Curve on mesh... Kurba amaraunean... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Amaraun baten gainean hari egokitzen zaion gutxi gora beherako kurba bat sortzen du. @@ -60,17 +60,17 @@ Komando honek 'amarauna' objektuetan soilik funtzionatzen du. CmdMeshPartSection - + Mesh Amarauna - + Create section from mesh and plane Sortu sekzioa amaraunetik eta planotik - + Section Sekzioa @@ -97,12 +97,12 @@ Komando honek 'amarauna' objektuetan soilik funtzionatzen du. Command - + Trim with plane Ebaki planoarekin - + Section with plane Sekzioa planoarekin @@ -170,7 +170,7 @@ Komando honek 'amarauna' objektuetan soilik funtzionatzen du. Konektatu ertzak distantzia hau baino txikiagoa bada: - + Failure Hutsegitea @@ -178,32 +178,32 @@ Komando honek 'amarauna' objektuetan soilik funtzionatzen du. MeshPartGui::CurveOnMeshHandler - + Create Sortu - + Close wire Itxi lerroa - + Clear Garbitu - + Cancel Utzi - + Wrong mesh picked Amaraun okerra aukeratu da - + No point was picked Ez da punturik aukeratu @@ -487,32 +487,32 @@ A value in the range of 0.2-10. Utzi panela irekita - + Gmsh Gmsh - - + + No active document Ez dago dokumentu aktiborik - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Puntarik ez duen gorputz bat hautatu duzu. Ezarri gorputzaren punta edo hautatu beste forma bat. - + You have selected a shape without faces. Select a different shape, please. Aurpegirik ez duen forma bat hautatu duzu. Hautatu beste forma bat. - + Select a shape for meshing, first. Hasteko, hautatu forma bat amarauna sortzeko. @@ -520,12 +520,12 @@ Hautatu beste forma bat. MeshPart_Section - + Select plane Hautatu planoa - + Please select a plane at which you section the mesh. Hautatu amarauna ebakitzeko erabiliko den planoa. @@ -543,27 +543,27 @@ Hautatu beste forma bat. Hautatu amarauna muxarratzeko erabiliko den planoa. - + Trim by plane Ebaki planoaren bidez - + Select the side you want to keep. Hautatu mantendu nahi duzun aldea. - + Below Azpian - + Above Gainean - + Split Zatitu @@ -579,12 +579,12 @@ Hautatu beste forma bat. MeshPart_CreateFlatMesh - + Unwrap Mesh Desestali amarauna - + Find a flat representation of a mesh. Aurkitu amaraunaren irudikapen laua. @@ -592,12 +592,12 @@ Hautatu beste forma bat. MeshPart_CreateFlatFace - + Unwrap Face Desestali aurpegia - + Find a flat representation of a face. Aurkitu aurpegiaren irudikapen laua. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fi.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fi.ts index 1f5e074023..803c6d9294 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fi.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fi.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart VerkotaOsa - + Cross-sections... Poikkileikkaukset... - + Cross-sections Poikkileikkaukset @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Käyrä verkkopinnan päällä... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Luo arvioidun käyrän verkkopinna päälle. @@ -60,17 +60,17 @@ Tämä komento toimii vain 'verkkopinta' -objektin kanssa. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Luo osio verkkopinnasta ja tasosta - + Section Leikkaus @@ -97,12 +97,12 @@ Tämä komento toimii vain 'verkkopinta' -objektin kanssa. Command - + Trim with plane Leikkaa tasolla - + Section with plane Lohkotaso @@ -170,7 +170,7 @@ Tämä komento toimii vain 'verkkopinta' -objektin kanssa. Yhdistä reunat, jos etäisyys on pienempi kuin - + Failure Virhe @@ -178,32 +178,32 @@ Tämä komento toimii vain 'verkkopinta' -objektin kanssa. MeshPartGui::CurveOnMeshHandler - + Create Luo - + Close wire Sulje viiva - + Clear Tyhjennä - + Cancel Peruuta - + Wrong mesh picked Väärä verkkopinta valittu - + No point was picked Yhtään kohdetta ei valittu @@ -486,32 +486,32 @@ Arvo välillä 0,2-10. Jätä paneeli auki - + Gmsh Gmsh - - + + No active document Ei aktiivista dokumenttia - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. Valitse ensin muoto verkkoihin. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Valitse taso - + Please select a plane at which you section the mesh. Valitse taso, jolla leikkaat verkkopinnan. @@ -542,27 +542,27 @@ Select a different shape, please. Valitse taso, jolla säädät verkkopintaa. - + Trim by plane Säädä tasolla - + Select the side you want to keep. Valitse sivu, jonka haluat pitää. - + Below Alapuolella - + Above Yläpuolella - + Split Jaa osiin @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fr.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fr.ts index 9ac7e64a3e..7e51c813b2 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fr.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_fr.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Maillage - + Cross-sections... Coupes... - + Cross-sections Coupes @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Maillage - + Curve on mesh... Courbe sur maillage ... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Crée une courbe approximative au dessus d'un maillage. @@ -60,17 +60,17 @@ Cette commande ne fonctionne qu'avec un objet "mesh". CmdMeshPartSection - + Mesh Maillage - + Create section from mesh and plane Créer une section à partir d'un maillage et d'un plan - + Section Section @@ -97,12 +97,12 @@ Cette commande ne fonctionne qu'avec un objet "mesh". Command - + Trim with plane Ajuster avec un plan - + Section with plane Section avec un plan @@ -170,7 +170,7 @@ Cette commande ne fonctionne qu'avec un objet "mesh". Racorder les arêtes si la distance est inférieure à - + Failure Échec @@ -178,32 +178,32 @@ Cette commande ne fonctionne qu'avec un objet "mesh". MeshPartGui::CurveOnMeshHandler - + Create Créer - + Close wire Fermer un fil - + Clear Effacer - + Cancel Annuler - + Wrong mesh picked Mauvaise maille choisie - + No point was picked Aucun point n'a été sélectionné @@ -486,32 +486,32 @@ Une valeur dans la plage de 0.2-10. Laisser le panneau ouvert - + Gmsh Gmsh - - + + No active document Aucun document actif - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Vous avez sélectionné un corps sans fonction résultante. Définissez la fonction résultante du corps ou sélectionnez une forme différente, s'il vous plaît. - + You have selected a shape without faces. Select a different shape, please. Vous avez sélectionné une forme sans face. Merci de sélectionner une forme différente. - + Select a shape for meshing, first. Sélectionner d'abord une forme pour le maillage. @@ -519,12 +519,12 @@ Merci de sélectionner une forme différente. MeshPart_Section - + Select plane Sélectionnez un plan - + Please select a plane at which you section the mesh. Veuillez sélectionner un plan à partir duquel vous découpez le maillage. @@ -542,27 +542,27 @@ Merci de sélectionner une forme différente. Sélectionnez un plan à partir duquel vous ajustez le maillage. - + Trim by plane Découpe par un plan - + Select the side you want to keep. Sélectionnez le coté que vous souhaitez conserver. - + Below En dessous - + Above Au-dessus - + Split Scinder @@ -578,12 +578,12 @@ Merci de sélectionner une forme différente. MeshPart_CreateFlatMesh - + Unwrap Mesh Développer un maillage - + Find a flat representation of a mesh. Rechercher une représentation plane d’un maillage. @@ -591,12 +591,12 @@ Merci de sélectionner une forme différente. MeshPart_CreateFlatFace - + Unwrap Face Développer une face - + Find a flat representation of a face. Rechercher une représentation plane d’une face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_gl.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_gl.ts index 066d4ce728..c3159b505a 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_gl.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_gl.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart MeshPart - + Cross-sections... Cortes transversais... - + Cross-sections Cortes transversais @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Curva en malla... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Creates an approximated curve on top of a mesh. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Facer sección a partir de malla e plano - + Section Sección @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Trim with plane - + Section with plane Section with plane @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Connect edges if distance less than - + Failure Failure @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Facer - + Close wire Pechar arame - + Clear Baleirar - + Cancel Cancelar - + Wrong mesh picked Selección de malla errada - + No point was picked Ningúm punto escolmado @@ -486,32 +486,32 @@ A value in the range of 0.2-10. Leave panel open - + Gmsh Gmsh - - + + No active document Ningún documento activo - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. Escolme primeiro unha forma para a malla. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Escolmar plano - + Please select a plane at which you section the mesh. Escolme un plano co que seccionar a malla. @@ -542,27 +542,27 @@ Select a different shape, please. Escolme un plano co que tallar a malla. - + Trim by plane Plano de tallada - + Select the side you want to keep. Escolmar lado que queiras manter. - + Below Abaixo - + Above Arriba - + Split Dividir @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hr.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hr.ts index 9d308dfb50..021ed3eb93 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hr.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hr.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Mrežasti Oblik - + Cross-sections... Presjeci... - + Cross-sections Presjeci @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mreža - + Curve on mesh... Krivulja na mreži... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Stvara približnu krivulju na vrhu mreže. @@ -60,17 +60,17 @@ Ova naredba radi samo s 'mrežnim' objektom. CmdMeshPartSection - + Mesh Mreža - + Create section from mesh and plane Stvori presjek iz mreže i ravnine - + Section Odsječak @@ -97,12 +97,12 @@ Ova naredba radi samo s 'mrežnim' objektom. Command - + Trim with plane Skraćivanje sa ravninom - + Section with plane Presjek s ravninom @@ -170,7 +170,7 @@ Ova naredba radi samo s 'mrežnim' objektom. Spojite rubove ako je udaljenost manja od - + Failure Neuspjeh @@ -178,32 +178,32 @@ Ova naredba radi samo s 'mrežnim' objektom. MeshPartGui::CurveOnMeshHandler - + Create Stvoriti - + Close wire Zatvori žicu - + Clear Brisanje - + Cancel Otkazati - + Wrong mesh picked Izabrana pogrešna mreža - + No point was picked Ni jedan vrh nije odabran @@ -489,32 +489,32 @@ Vrijednost u rasponu 0.2-10. Ostavite prozor otvoren - + Gmsh Gmsh - - + + No active document Nema aktivnog dokumenta - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Odabrali ste tijelo bez vrha. Postavite vrh tijela ili odaberite drugi oblik, molim. - + You have selected a shape without faces. Select a different shape, please. Odabrali ste oblik bez naličja. Odaberite drugačiji oblik, molim. - + Select a shape for meshing, first. Prvo daberite oblik za umrežavanje. @@ -522,12 +522,12 @@ Odaberite drugačiji oblik, molim. MeshPart_Section - + Select plane Odaberite ravninu - + Please select a plane at which you section the mesh. Molimo odaberite ravninu na kojoj se dijeli mreža. @@ -545,27 +545,27 @@ Odaberite drugačiji oblik, molim. Molimo odaberite ravninu na kojoj se skraćuje mreža. - + Trim by plane Skraćivanje sa ravninom - + Select the side you want to keep. Odaberite stranu koju želite zadržati. - + Below Ispod - + Above Iznad - + Split Razdjeli @@ -581,12 +581,12 @@ Odaberite drugačiji oblik, molim. MeshPart_CreateFlatMesh - + Unwrap Mesh Raširi Mrežu - + Find a flat representation of a mesh. Pronađite ravni prikaz mreže. @@ -594,12 +594,12 @@ Odaberite drugačiji oblik, molim. MeshPart_CreateFlatFace - + Unwrap Face Raširi Lice - + Find a flat representation of a face. Pronađite ravni prikaz lica. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hu.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hu.ts index 8b94d2dd92..5f60b40fa5 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hu.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_hu.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart RészekKapcsolása - + Cross-sections... Keresztmetszet... - + Cross-sections Keresztmetszet @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Háló - + Curve on mesh... Görbe a hálón... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Közelítő ívet hoz létre a háló tetején. @@ -60,17 +60,17 @@ Ez a parancs csak 'háló' objektummal működik. CmdMeshPartSection - + Mesh Háló - + Create section from mesh and plane Létrehoz egy szakaszt a hálóból és a síkból - + Section Szakasz @@ -97,12 +97,12 @@ Ez a parancs csak 'háló' objektummal működik. Command - + Trim with plane Síkkal metsz - + Section with plane Síkkal szakaszt @@ -170,7 +170,7 @@ Ez a parancs csak 'háló' objektummal működik. Csatlakoztassa az éleket, ha a távolság kisebb, mint - + Failure Hiba @@ -178,32 +178,32 @@ Ez a parancs csak 'háló' objektummal működik. MeshPartGui::CurveOnMeshHandler - + Create Létrehozás - + Close wire Drótháló lezárása - + Clear Törlés - + Cancel Mégse - + Wrong mesh picked Rossz háló választva - + No point was picked Nem lett pont kiválasztva @@ -340,7 +340,7 @@ felületeltérés szorozva az aktuális hálószakasz hosszával (él) A hálószegmensek az objektum felületek színe szerint lesznek csoportosítva. -Ezek a csoportok a hálókimeneti formátumokhoz lesznek exportálva, amelyek +Ezek a csoportok a hálókimeneti formátumokhoz lesznek exportálva, amelyek támogatják ezt a tulajdonságot (pl. OBJ formátum). @@ -486,32 +486,32 @@ A value in the range of 0.2-10. A panel nyitva hagyása - + Gmsh Gmsh ( http://gmsh.info/ ) - - + + No active document Nincs aktív dokumentum - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Kiválasztott egy csúcs nélküli testet. Kérem állítsa be a test csúcsát, vagy válasszon egy másik alakzatot. - + You have selected a shape without faces. Select a different shape, please. Felületek nélküli alakzatot választott. Válasszon másik alakzatot. - + Select a shape for meshing, first. Válassza ki a formát kapcsolás előtt. @@ -519,12 +519,12 @@ Válasszon másik alakzatot. MeshPart_Section - + Select plane Sík kijelölése - + Please select a plane at which you section the mesh. Kérjük válasszon egy síkot, mellyel a szakaszolja a hálótestet. @@ -542,27 +542,27 @@ Válasszon másik alakzatot. Kérjük válasszon egy síkot, mellyel kimetszi a hálótestet. - + Trim by plane Vágás síkkal - + Select the side you want to keep. Jelölje ki a megtartani kívánt oldalt. - + Below Alá - + Above Fölé - + Split Feloszt @@ -578,12 +578,12 @@ Válasszon másik alakzatot. MeshPart_CreateFlatMesh - + Unwrap Mesh Háló kiterítése - + Find a flat representation of a mesh. Háló sík ábrázolásának keresése. @@ -591,12 +591,12 @@ Válasszon másik alakzatot. MeshPart_CreateFlatFace - + Unwrap Face Felület kiterítése - + Find a flat representation of a face. Felület sík ábrázolásának keresése. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_id.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_id.ts index 07d21b57f1..fdfdef336c 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_id.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_id.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart MeshPart - + Cross-sections... Persimpangan... - + Cross-sections Persimpangan @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Kurva pada mesh... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Creates an approximated curve on top of a mesh. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Buat bagian dari mesh dan plane - + Section Bagian @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Trim with plane - + Section with plane Section with plane @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Connect edges if distance less than - + Failure Failure @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Membuat - + Close wire Tutup kawat - + Clear Bersih - + Cancel Membatalkan - + Wrong mesh picked Jala yang salah dipetik - + No point was picked Tidak ada gunanya dipilih @@ -486,32 +486,32 @@ A value in the range of 0.2-10. Leave panel open - + Gmsh Gmsh - - + + No active document Tidak ada dokumen aktif - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. Pilih bentuk untuk meshing, pertama. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Pilih pesawat - + Please select a plane at which you section the mesh. Silakan pilih pesawat di mana Anda bagian jala. @@ -542,27 +542,27 @@ Select a different shape, please. Pilih pesawat di mana Anda memangkas tersebut jala. - + Trim by plane Trim by plane - + Select the side you want to keep. Select the side you want to keep. - + Below Below - + Above Above - + Split Split @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_it.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_it.ts index 0398c72c46..661f6a9dfe 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_it.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_it.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart MeshPart - + Cross-sections... Sezioni... - + Cross-sections Sezioni @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Curvatura sulla mesh... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Crea una curva approssimativa su di un solido. @@ -60,17 +60,17 @@ Questo comando funziona solo con un oggetto 'solido'. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Sezione da mesh e piano - + Section Seziona @@ -97,12 +97,12 @@ Questo comando funziona solo con un oggetto 'solido'. Command - + Trim with plane Taglio con un piano - + Section with plane Seziona con un piano @@ -170,7 +170,7 @@ Questo comando funziona solo con un oggetto 'solido'. Collega i bordi se la distanza è inferiore a - + Failure Fallito @@ -178,32 +178,32 @@ Questo comando funziona solo con un oggetto 'solido'. MeshPartGui::CurveOnMeshHandler - + Create Crea - + Close wire Chiudi il wire - + Clear Pulisci - + Cancel Annulla - + Wrong mesh picked Rilevata mesh errata - + No point was picked Nessun punto è stato selezionato @@ -486,32 +486,32 @@ Un valore nell'intervallo tra 0.2-10. Lascia il pannello aperto - + Gmsh Gmsh - - + + No active document Nessun documento attivo - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Hai selezionato un corpo senza punta. Impostare la punta del corpo o selezionare una forma diversa, per favore. - + You have selected a shape without faces. Select a different shape, please. Hai selezionato una forma senza facce. Seleziona una forma diversa, per favore. - + Select a shape for meshing, first. Selezionare prima una forma per il meshing. @@ -519,12 +519,12 @@ Seleziona una forma diversa, per favore. MeshPart_Section - + Select plane Seleziona piano - + Please select a plane at which you section the mesh. Selezionare un piano con il quale sezionare la mesh. @@ -542,27 +542,27 @@ Seleziona una forma diversa, per favore. Selezionare un piano con il quale rifilare la mesh. - + Trim by plane Rifila con un piano - + Select the side you want to keep. Selezionare il lato da mantenere. - + Below Sotto - + Above Sopra - + Split Dividi @@ -578,12 +578,12 @@ Seleziona una forma diversa, per favore. MeshPart_CreateFlatMesh - + Unwrap Mesh Dispiega Mesh - + Find a flat representation of a mesh. Trova una rappresentazione piatta di una mesh. @@ -591,12 +591,12 @@ Seleziona una forma diversa, per favore. MeshPart_CreateFlatFace - + Unwrap Face Dispiega Faccia - + Find a flat representation of a face. Trova una rappresentazione piatta di una faccia. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ja.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ja.ts index 4bceb1d068..b038686cf7 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ja.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ja.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart メッシュパート - + Cross-sections... 断面... - + Cross-sections 断面 @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh - Mesh + メッシュ - + Curve on mesh... メッシュ上の曲線... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. メッシュの上に近似曲線を作成します。 @@ -44,7 +44,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + メッシュ @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh - Mesh + メッシュ - + Create section from mesh and plane メッシュと平面から断面を作成 - + Section セクション @@ -80,7 +80,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + メッシュ @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane 平面でトリム - + Section with plane 平面で切断 @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. 距離が小さい場合はエッジを接続する - + Failure 失敗 @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create 作成 - + Close wire 閉じた連線 - + Clear クリア - + Cancel キャンセル - + Wrong mesh picked 不適切なメッシュがピックされています。 - + No point was picked ピックされた点はありません @@ -485,32 +485,32 @@ A value in the range of 0.2-10. パネルを開いたままにする - + Gmsh Gmsh - - + + No active document アクティブなドキュメントがありません - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. チップのないボディを選択しました。 ボディの先端を設定するか、別の形を選択してください。 - + You have selected a shape without faces. Select a different shape, please. 面のないシェイプを選択しました。 別のシェイプを選択してください。 - + Select a shape for meshing, first. 最初にメッシュにするシェイプを選択してください。 @@ -518,12 +518,12 @@ Select a different shape, please. MeshPart_Section - + Select plane 平面を選択 - + Please select a plane at which you section the mesh. メッシュの分割を行う平面を選択してください。 @@ -541,27 +541,27 @@ Select a different shape, please. メッシュのトリムを行う平面を選択してください。 - + Trim by plane 平面でトリム - + Select the side you want to keep. 維持したい側面を選択してください。 - + Below 下側 - + Above 上側 - + Split スプリット @@ -577,12 +577,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh メッシュを展開 - + Find a flat representation of a mesh. メッシュの平面表現を作成 @@ -590,12 +590,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face 面を展開 - + Find a flat representation of a face. 面の平面表現を作成 diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ka.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ka.ts index 84375d8bf1..8f45ce373f 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ka.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ka.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart ნაწილის ბადე - + Cross-sections... განივი კვეთები... - + Cross-sections განივი კვეთები @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh ბადე - + Curve on mesh... მრავალკუთხა ბადის გამრუდება... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. ქმნის მიახლოებულ მრუდს ბადის თავზე. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh - Mesh + ბადე - + Create section from mesh and plane ბადით და სიბრტყის სექციის შექმნა - + Section სექცია @@ -80,7 +80,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + ბადე @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane სიბრტყით კვეთა - + Section with plane კვეთა სიბრტყით @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. წიბოების დაკავშირება, თუ დაშორება ნაკლებია, ვიდრე - + Failure შეცდომა @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create შექმნა - + Close wire პოლიხაზის დახურვა - + Clear გასუფთავება - + Cancel გაუქმება - + Wrong mesh picked არცჩეულია არასწორი მრავალკუთხა ბადე - + No point was picked წერტილი არჩეული არაა @@ -340,7 +340,7 @@ Surface deviation multiplied by the length of the current mesh segment (edge) ქსელის სეგმენტები დაჯგუფდება ობიექტის ზედაპირის ფერის მიხედვით. -ეს ჯგუფები გატანილი იქნება ბადის გამომავალი ფორმატებისთვის, +ეს ჯგუფები გატანილი იქნება ბადის გამომავალი ფორმატებისთვის, რომლებსაც აქვთ ამ თვისების მხარდაჭერა(მაგ. ფორმატი OBJ). @@ -486,32 +486,32 @@ A value in the range of 0.2-10. პანელის გახსნა - + Gmsh Gmsh - - + + No active document აქტიური დოკუმენტის გარეშე - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. მონიშნულია სხეული ბუნიკის გარეშე. დააყენეთ ბუნიკი, ან აირჩიეთ სხვა სხეული. - + You have selected a shape without faces. Select a different shape, please. თქვენს მონიშნულ მონახაზს ზედაპირები არ გააჩნია. გთხოვთ აირჩიოთ სხვა მონახაზი. - + Select a shape for meshing, first. ბადის შესაქმნელად ჯერ აირჩიეთ მოხაზულობა. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane სიბრტყის არჩევა - + Please select a plane at which you section the mesh. გთხოვთ, აირჩიოთ სიბრტყე, რომელზედაც ჭრით ბადეს. @@ -542,27 +542,27 @@ Select a different shape, please. აირჩიეთ სიბრტყე, რომლითაც გავკვეთთ ბადეს. - + Trim by plane სიბრტყით კვეთა - + Select the side you want to keep. აირჩიეთ მხარე, რომელსაც იტოვებთ. - + Below ქვემოთ - + Above ზემოდან - + Split გაყოფა @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh ბადის განშლა - + Find a flat representation of a mesh. ბადის ბრტყელი ვარიანტის ნახვა. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face სიბრტყის განშლა - + Find a flat representation of a face. ზედაპირის ბრტყელი ვარიანტის ნახვა. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ko.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ko.ts index 1f3b54fbd2..d48d532617 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ko.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ko.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart MeshPart - + Cross-sections... 횡단면... - + Cross-sections 횡단면 @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... 메쉬위에 곡선... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Creates an approximated curve on top of a mesh. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Create section from mesh and plane - + Section 단면 @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane 평면으로 다듬기 - + Section with plane 평면이 있는 단면 @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. 거리가 다음보다 작을 경우 가장자리를 연결 하십시오 - + Failure 실패 @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create 만들기 - + Close wire 선 닫기 - + Clear 지우기 - + Cancel 취소하기 - + Wrong mesh picked 잘못된 메쉬 선택 - + No point was picked 포인트가 선택되지 않았습니다 @@ -484,32 +484,32 @@ A value in the range of 0.2-10. Leave panel open - + Gmsh Gmsh - - + + No active document 활성 문서가 없습니다 - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. 메쉬 생성을 위해 쉐이프를 먼저 선택하세요. @@ -517,12 +517,12 @@ Select a different shape, please. MeshPart_Section - + Select plane 평면 선택 - + Please select a plane at which you section the mesh. 메쉬를 단면화할 평면을 선택하세요. @@ -540,27 +540,27 @@ Select a different shape, please. 메쉬를 자를 평면을 선택하세요. - + Trim by plane 평면에 의한 자르기 - + Select the side you want to keep. 유지할 측면을 선택하세요. - + Below Below - + Above Above - + Split 분할 @@ -576,12 +576,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -589,12 +589,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_nl.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_nl.ts index 7c8d8c6bf1..15441a36f5 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_nl.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_nl.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Mesh onderdeel - + Cross-sections... Dwarsdoorsneden... - + Cross-sections Dwarsdoorsneden @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Ronding op gaas... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Maakt een geschatte curve bovenop een maaswerk. @@ -60,17 +60,17 @@ Deze opdracht werkt alleen met een 'maaswerk' object. CmdMeshPartSection - + Mesh - Mesh + Mesh - + Create section from mesh and plane Genereer doorsnede van maaswerk en vlak - + Section Deel @@ -80,7 +80,7 @@ Deze opdracht werkt alleen met een 'maaswerk' object. Mesh - Mesh + Mesh @@ -97,12 +97,12 @@ Deze opdracht werkt alleen met een 'maaswerk' object. Command - + Trim with plane Bijsnijden met vlak - + Section with plane Sectie met vlak @@ -170,7 +170,7 @@ Deze opdracht werkt alleen met een 'maaswerk' object. Verbind de randen als afstand kleiner is dan - + Failure Mislukt @@ -178,32 +178,32 @@ Deze opdracht werkt alleen met een 'maaswerk' object. MeshPartGui::CurveOnMeshHandler - + Create Aanmaken - + Close wire Sluit draad - + Clear Wissen - + Cancel Annuleren - + Wrong mesh picked Verkeerde gaas gepakt - + No point was picked Geen punt was geselecteerd @@ -486,32 +486,32 @@ Een waarde tussen 0,2 en 10. Laat paneel open - + Gmsh Gmsh - - + + No active document Geen actief document - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Je hebt een vast lichaam geselecteerd zonder tip. Stel de punt van het vaste lichaam in of selecteer een andere vorm, alstublieft. - + You have selected a shape without faces. Select a different shape, please. Je hebt een vorm zonder vlakken geselecteerd. Selecteer een andere vorm alstublieft. - + Select a shape for meshing, first. Selecteer voor de meshing eerst een vorm. @@ -519,12 +519,12 @@ Selecteer een andere vorm alstublieft. MeshPart_Section - + Select plane Selecteer vlak - + Please select a plane at which you section the mesh. Selecteer een vlak waarop u het gaas compartimenteerd. @@ -542,27 +542,27 @@ Selecteer een andere vorm alstublieft. Selecteer een vlak waarop u de mesh trimt. - + Trim by plane Trim door middel van plaat - + Select the side you want to keep. Selecteer de zijde die U wenst te behouden. - + Below Onderaan - + Above Bovenaan - + Split Delen @@ -578,12 +578,12 @@ Selecteer een andere vorm alstublieft. MeshPart_CreateFlatMesh - + Unwrap Mesh Mesh uitrollen - + Find a flat representation of a mesh. Zoek een platte representatie van een mesh. @@ -591,12 +591,12 @@ Selecteer een andere vorm alstublieft. MeshPart_CreateFlatFace - + Unwrap Face Vlak uitrollen - + Find a flat representation of a face. Zoek een platte representatie van een vlak. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pl.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pl.ts index 8e9d93497e..9c1f9a1a9e 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pl.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pl.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Siatka Części - + Cross-sections... Przekrój poprzeczny ... - + Cross-sections Przekrój poprzeczny @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Siatka - + Curve on mesh... Krzywa na siatce... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Tworzy przybliżoną krzywą na wierzchu siatki. @@ -60,17 +60,17 @@ To polecenie działa tylko z obiektem typu Siatka. CmdMeshPartSection - + Mesh Siatka - + Create section from mesh and plane Utwórz przekrój z siatki i płaszczyzny - + Section Przekrój @@ -97,12 +97,12 @@ To polecenie działa tylko z obiektem typu Siatka. Command - + Trim with plane Przytnij płaszczyzną - + Section with plane Przekrój z płaszczyzną @@ -170,7 +170,7 @@ To polecenie działa tylko z obiektem typu Siatka. Połącz krawędzie, jeśli odległość jest mniejsza niż - + Failure Niepowodzenie @@ -178,32 +178,32 @@ To polecenie działa tylko z obiektem typu Siatka. MeshPartGui::CurveOnMeshHandler - + Create Utwórz - + Close wire Zamknij linie łamaną - + Clear Wyczyść - + Cancel Anuluj - + Wrong mesh picked Wybrano nieodpowiednią siatkę - + No point was picked Nie wybrano żadnego punktu @@ -486,32 +486,32 @@ Wartość w zakresie 0,2–10. Pozostaw panel otwarty - + Gmsh Gmsh - - + + No active document Brak aktywnego dokumentu - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Wybrałeś zawartość bez czubka. Proszę, ustaw czubek zawartości lub wybierz inny kształt. - + You have selected a shape without faces. Select a different shape, please. Wybrałeś kształt bez ścian. Proszę wybrać inny kształt. - + Select a shape for meshing, first. Najpierw wybierz kształt do utworzenia siatki. @@ -519,12 +519,12 @@ Proszę wybrać inny kształt. MeshPart_Section - + Select plane Wybierz płaszczyznę - + Please select a plane at which you section the mesh. Wybierz płaszczyznę którą chcesz podzielić siatkę. @@ -542,27 +542,27 @@ Proszę wybrać inny kształt. Proszę wybrać płaszczyznę, na której przycinasz siatkę. - + Trim by plane Przytnij płaszczyzną - + Select the side you want to keep. Wybierz tę stronę, którą zamierzasz pozostawić. - + Below Poniżej - + Above Powyżej - + Split Rozdziel @@ -578,12 +578,12 @@ Proszę wybrać inny kształt. MeshPart_CreateFlatMesh - + Unwrap Mesh Rozwiń siatkę - + Find a flat representation of a mesh. Znajdź płaską reprezentację siatki. @@ -591,12 +591,12 @@ Proszę wybrać inny kształt. MeshPart_CreateFlatFace - + Unwrap Face Rozwiń ścianę - + Find a flat representation of a face. Znajdź płaską reprezentację siatki. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-BR.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-BR.ts index baa097553e..2cc18fa532 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-BR.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-BR.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart MeshPart - + Cross-sections... Secções transversais... - + Cross-sections Secções transversais @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Malha - + Curve on mesh... Curva na malha... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Cria uma curva aproximada sobre uma malha. @@ -60,17 +60,17 @@ Este comando só funciona com um objeto do tipo "malha". CmdMeshPartSection - + Mesh Malha - + Create section from mesh and plane Criar a seção a partir da malha e plano - + Section Seção @@ -97,12 +97,12 @@ Este comando só funciona com um objeto do tipo "malha". Command - + Trim with plane Recortar com um plano - + Section with plane Seção com um plano @@ -170,7 +170,7 @@ Este comando só funciona com um objeto do tipo "malha". Conecte as arestas se a distância for menor que - + Failure Falha @@ -178,32 +178,32 @@ Este comando só funciona com um objeto do tipo "malha". MeshPartGui::CurveOnMeshHandler - + Create Criar - + Close wire Fechar aresta - + Clear Limpar - + Cancel Cancelar - + Wrong mesh picked Malha errada escolhida - + No point was picked Nenhum ponto foi escolhido @@ -486,32 +486,32 @@ Um valor na amplitude de 0.2-10. Deixar painel aberto - + Gmsh Gmsh - - + + No active document Nenhum documento ativo - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Você selecionou um corpo sem ponta. Por favor, defina a ponta do corpo ou selecione uma forma diferente. - + You have selected a shape without faces. Select a different shape, please. Você selecionou uma forma sem faces. Por favor, selecione uma forma diferente. - + Select a shape for meshing, first. Selecione primeiro uma forma para malhagem. @@ -519,12 +519,12 @@ Por favor, selecione uma forma diferente. MeshPart_Section - + Select plane Selecionar plano - + Please select a plane at which you section the mesh. Favor selecione um plano em que possa aparar a malha. @@ -542,27 +542,27 @@ Por favor, selecione uma forma diferente. Favor selecionar um plano em que possa aparar a malha. - + Trim by plane Cortar por plano - + Select the side you want to keep. Selecione o lado que deseja manter. - + Below Abaixo - + Above Acima - + Split Separar @@ -578,12 +578,12 @@ Por favor, selecione uma forma diferente. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Por favor, selecione uma forma diferente. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-PT.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-PT.ts index 670b7f80a2..781e8caa62 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-PT.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_pt-PT.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart MeshPart - + Cross-sections... Perfis transversais ... - + Cross-sections Perfis transversais @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Malha - + Curve on mesh... Curva na malha... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Cria uma curva aproximada em cima de uma malha. @@ -60,17 +60,17 @@ Este comando só funciona com um objeto 'malha'. CmdMeshPartSection - + Mesh Malha - + Create section from mesh and plane Criar secção a partir da malha e plano - + Section Secção @@ -97,12 +97,12 @@ Este comando só funciona com um objeto 'malha'. Command - + Trim with plane Aparar com plano - + Section with plane Seccionar com plano @@ -170,7 +170,7 @@ Este comando só funciona com um objeto 'malha'. Conectar as arestas se distância for menor que - + Failure Falha @@ -178,32 +178,32 @@ Este comando só funciona com um objeto 'malha'. MeshPartGui::CurveOnMeshHandler - + Create Criar - + Close wire Fechar traço - + Clear Limpar - + Cancel Cancelar - + Wrong mesh picked Malha errada escolhida - + No point was picked Nenhum ponto foi escolhido @@ -486,32 +486,32 @@ Um valor na amplitude de 0.2-10. Deixar painel aberto - + Gmsh Gmsh - - + + No active document Nenhum documento ativo - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Selecionou um corpo sem ponta. Defina a ponta do corpo ou selecione uma forma diferente, por favor. - + You have selected a shape without faces. Select a different shape, please. Selecionou uma forma sem faces. Selecione uma forma diferente, por favor. - + Select a shape for meshing, first. Selecione primeiro, uma forma para a malha. @@ -519,12 +519,12 @@ Selecione uma forma diferente, por favor. MeshPart_Section - + Select plane Selecionar plano - + Please select a plane at which you section the mesh. Favor selecione um plano em que possa seccionar a malha. @@ -542,27 +542,27 @@ Selecione uma forma diferente, por favor. Favor selecione um plano com o qual possa aparar a malha. - + Trim by plane Aparar com plano - + Select the side you want to keep. Selecione o lado a manter. - + Below Abaixo - + Above Acima - + Split Separar @@ -578,12 +578,12 @@ Selecione uma forma diferente, por favor. MeshPart_CreateFlatMesh - + Unwrap Mesh Desfazer Malha - + Find a flat representation of a mesh. Encontra representação plana da malha. @@ -591,12 +591,12 @@ Selecione uma forma diferente, por favor. MeshPart_CreateFlatFace - + Unwrap Face Desfazer Face - + Find a flat representation of a face. Procura uma representação plana da face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ro.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ro.ts index bba7baa259..ded3f943fc 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ro.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ro.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Obiect rețea 3D - + Cross-sections... Sectiune transversala... - + Cross-sections Sectiune transversala @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Curbe de pe plasă... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Creează o curbă aproximativă pe o plasă. @@ -60,17 +60,17 @@ Această comandă funcționează doar cu un obiect 'plasă'. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Creează o secțiune plecând de la la o plasă şi un plan - + Section Secţiune @@ -97,12 +97,12 @@ Această comandă funcționează doar cu un obiect 'plasă'. Command - + Trim with plane Secționat de un plan - + Section with plane Secţiune cu plan @@ -170,7 +170,7 @@ Această comandă funcționează doar cu un obiect 'plasă'. Conectează marginile dacă distanța este mai mică de - + Failure Eșec @@ -178,32 +178,32 @@ Această comandă funcționează doar cu un obiect 'plasă'. MeshPartGui::CurveOnMeshHandler - + Create Creează - + Close wire Fir închis - + Clear Șterge - + Cancel Renunţă - + Wrong mesh picked Ochiurilor de plasă greşit alese - + No point was picked Nu a fost ales nici un punct @@ -486,32 +486,32 @@ O valoare în intervalul 0.2-10. Păstrați panoul deschis - + Gmsh Zgură - - + + No active document Nici un document activ - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Ai selectat un corp fără sfaturi. Te rog setează vârful corpului sau selectează o altă formă. - + You have selected a shape without faces. Select a different shape, please. Ați selectat o formă fără fețe. Selectați o altă formă, vă rog. - + Select a shape for meshing, first. Selectati mai intai o forma pentru crearea retelei. @@ -519,12 +519,12 @@ Selectați o altă formă, vă rog. MeshPart_Section - + Select plane Selectare plan - + Please select a plane at which you section the mesh. Vă rugăm să selectaţi un plan de la care secţionați Plasa. @@ -542,27 +542,27 @@ Selectați o altă formă, vă rog. Vă rugăm să selectaţi un plan de la care să tăiaţi ochiurile de plasă. - + Trim by plane Secționat de un plan - + Select the side you want to keep. Selectaţi partea pe care doriţi să o păstraţi. - + Below Dedesubt - + Above Deasupra - + Split Divizare @@ -578,12 +578,12 @@ Selectați o altă formă, vă rog. MeshPart_CreateFlatMesh - + Unwrap Mesh Desfaceți plasă - + Find a flat representation of a mesh. Găsește o reprezentare plană a unei ochiuri de plasă. @@ -591,12 +591,12 @@ Selectați o altă formă, vă rog. MeshPart_CreateFlatFace - + Unwrap Face Desfaceți Fața - + Find a flat representation of a face. Găsiți o reprezentare plană a unei fețe. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ru.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ru.ts index b122b3a073..5553f268b3 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ru.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_ru.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Полигональная сетка для детали - + Cross-sections... Поперечные сечения... - + Cross-sections Поперечные сечения @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Сетка - + Curve on mesh... Скруглить полигональную сетку... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Создает приблизительную кривую поверх полигональной сетки. @@ -44,7 +44,7 @@ This command only works with a 'mesh' object. Mesh - Полигональная сетка + Сетка @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh - Сеть + Полигональная сетка - + Create section from mesh and plane Создать секцию из полигональной сетки и плоскости - + Section Разрез (Сечение) @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Обрезать плоскостью - + Section with plane Сечение плоскостью @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Подключите рёбра, если расстояние меньше, чем - + Failure Сбой @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Создать - + Close wire Замкнуть ломаную - + Clear Очистить - + Cancel Отмена - + Wrong mesh picked Выбрана неправильная полигональная сетка - + No point was picked Не выбрано ни одной точки @@ -486,32 +486,32 @@ A value in the range of 0.2-10. Открыть панель - + Gmsh Gmsh - - + + No active document Нет активного документа - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Вы выбрали тело без наконечника. Пожалуйста, либо установите наконечник, либо выберите другую форму. - + You have selected a shape without faces. Select a different shape, please. Вы выбрали форму без граней. Выберите другую форму, пожалуйста. - + Select a shape for meshing, first. Сначала выберите фигуру для создания полигональной сетки. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Выбрать плоскость - + Please select a plane at which you section the mesh. Выберите плоскость которой вы разделе сетку. @@ -542,27 +542,27 @@ Select a different shape, please. Выберите плоскость, которая подрежет полигональную сетку. - + Trim by plane Обрезать плоскостью - + Select the side you want to keep. Выберите сторону, которую вы хотите сохранить. - + Below Ниже - + Above Выше - + Split Разделить @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Развернуть сетку - + Find a flat representation of a mesh. Найдите плоское представление сетки. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Развернуть грани - + Find a flat representation of a face. Найдите плоское изображение фаски. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sl.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sl.ts index 8bfb211ae6..9013a3bba9 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sl.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sl.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Ploskovje - + Cross-sections... Prečni prerezi … - + Cross-sections Prečni prerezi @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Ploskovje - + Curve on mesh... Krivulja na ploskovju ... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Ustvari približno krivuljo po vrhu ploskovja. @@ -60,17 +60,17 @@ Ta ukaz deluje le s "ploskovji". CmdMeshPartSection - + Mesh - Mesh + Ploskovje - + Create section from mesh and plane Ustvari prerez iz ploskovja in ravnine - + Section Presek @@ -97,12 +97,12 @@ Ta ukaz deluje le s "ploskovji". Command - + Trim with plane Prireži z ravnino - + Section with plane Prerez z ravnino @@ -170,7 +170,7 @@ Ta ukaz deluje le s "ploskovji". Stakni robove, če je razdalja manjša od - + Failure Napaka @@ -178,32 +178,32 @@ Ta ukaz deluje le s "ploskovji". MeshPartGui::CurveOnMeshHandler - + Create Ustvari - + Close wire Skledni črtovje - + Clear Počisti - + Cancel Prekliči - + Wrong mesh picked Izbrano je napačno ploskovje - + No point was picked Ni izbranih točk @@ -485,32 +485,32 @@ Razpon vrednosti je 0.2-10. Ohrani odprto podokno - + Gmsh Gmsh - - + + No active document Ni dejavnega dokumenta - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Izbrali ste telo brez konice. Ali določite telesu konico ali pa izberite drugo obliko. - + You have selected a shape without faces. Select a different shape, please. Izbrali ste lik brez ploskev. Izberite drugi lik. - + Select a shape for meshing, first. Najprej izberite obliko za ploskovjenje. @@ -518,12 +518,12 @@ Izberite drugi lik. MeshPart_Section - + Select plane Izberite ravnino - + Please select a plane at which you section the mesh. Izberite ravnino s katero želite prerezati ploskovje. @@ -541,27 +541,27 @@ Izberite drugi lik. Izberite ravnino, s katero želite prirezati ploskovje. - + Trim by plane Prereži z ravnino - + Select the side you want to keep. Izberite stran, ki jo želite obdržati. - + Below Pod - + Above Nad - + Split Razdeli @@ -577,12 +577,12 @@ Izberite drugi lik. MeshPart_CreateFlatMesh - + Unwrap Mesh Razvij ploskovje - + Find a flat representation of a mesh. Iskanje ravninske predstavitve ploskovja. @@ -590,12 +590,12 @@ Izberite drugi lik. MeshPart_CreateFlatFace - + Unwrap Face Razvij ploskev - + Find a flat representation of a face. Iskanje ravninske predstavitve ploskve. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr-CS.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr-CS.ts index 0ff8836dc3..7d17e15eba 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr-CS.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr-CS.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Mreža Dela - + Cross-sections... Poprečni presek... - + Cross-sections Poprečni presek @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Kriva na mreži... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Napravi približnu krivu na površini mreže. @@ -60,17 +60,17 @@ Ova komanda radi samo sa objektom koji je mreža. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Napravi presek od mreže i ravni - + Section Presek @@ -80,7 +80,7 @@ Ova komanda radi samo sa objektom koji je mreža. Mesh - Mesh + Mreža @@ -97,12 +97,12 @@ Ova komanda radi samo sa objektom koji je mreža. Command - + Trim with plane Opseci sa ravni - + Section with plane Preseci pomoću ravni @@ -170,7 +170,7 @@ Ova komanda radi samo sa objektom koji je mreža. Poveži ivice ako je rastojanje manje od - + Failure Neuspeh @@ -178,32 +178,32 @@ Ova komanda radi samo sa objektom koji je mreža. MeshPartGui::CurveOnMeshHandler - + Create Napravi - + Close wire Zatvori žicu - + Clear Obriši - + Cancel Otkaži - + Wrong mesh picked Izabrana pogrešna mreža - + No point was picked Nijedna tačka nije izabrana @@ -486,32 +486,32 @@ Vrednost u opsegu od 0,2-10. Ostavi panel otvoren - + Gmsh Gmsh - - + + No active document Nema aktivnog dokumenta - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Izabrao si telo koje nema krajnji tipski oblik. Ili zadaj krajnji tipski oblik ili izaberi drugo telo. - + You have selected a shape without faces. Select a different shape, please. Izabrao si oblik bez stranica. Izaberi drugi oblik. - + Select a shape for meshing, first. Prvo izaberi oblik za pravljenje mreže. @@ -519,12 +519,12 @@ Izaberi drugi oblik. MeshPart_Section - + Select plane Izaberi ravan - + Please select a plane at which you section the mesh. Izaberi ravan kojom ćete iseći mrežu. @@ -542,27 +542,27 @@ Izaberi drugi oblik. Izaberi ravan kojom ćete iseći mrežu. - + Trim by plane Opseci pomoću ravni - + Select the side you want to keep. Izaberi stranu koju želite da zadržite. - + Below Ispod - + Above Iznad - + Split Podeli @@ -578,12 +578,12 @@ Izaberi drugi oblik. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Izaberi drugi oblik. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr.ts index fbf022067f..9bcfd5cd19 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sr.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Мрежа дела - + Cross-sections... Попречни пресек... - + Cross-sections Попречни пресек @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Мрежа - + Curve on mesh... Крива на мрежи... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Направи приближну криву на површини мреже. @@ -44,7 +44,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + Мрежа @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Направи пресек од мреже и равни - + Section Пресек @@ -80,7 +80,7 @@ This command only works with a 'mesh' object. Mesh - Mesh + Мрежа @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Опсеци са равни - + Section with plane Пресеци помоћу равни @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Повежи ивице ако је растојање мање од - + Failure Неуспех @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Направи - + Close wire Затвори жицу - + Clear Обриши - + Cancel Откажи - + Wrong mesh picked Изабрана погрешна мрежа - + No point was picked Ниједна тачка није изабрана @@ -486,32 +486,32 @@ A value in the range of 0.2-10. Остави панел отворен - + Gmsh Gmsh - - + + No active document Нема активног документа - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Изабрао си тело које нема крајњи типски облик. Или задај крајњи типски облик или изабери друго тело. - + You have selected a shape without faces. Select a different shape, please. Изабрао си облик без страница. Изабери други облик. - + Select a shape for meshing, first. Прво изаберите облик за мрежу. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Изабери раван - + Please select a plane at which you section the mesh. Изабери раван којом ћете исећи мрежу. @@ -542,27 +542,27 @@ Select a different shape, please. Изабери раван којом ћете исећи мрежу. - + Trim by plane Опсеци помоћу равни - + Select the side you want to keep. Изабери страну коју желите да задржите. - + Below Испод - + Above Изнад - + Split Подели @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sv-SE.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sv-SE.ts index 7a1786b374..ede167a5ce 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sv-SE.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_sv-SE.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart NätDel - + Cross-sections... Tvärsnitt... - + Cross-sections Tvärsnitt @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Nät - + Curve on mesh... Kurva på nät... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Creates an approximated curve on top of a mesh. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Nät - + Create section from mesh and plane Skapa snitt från nät och plan - + Section Sektionering @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Trim with plane - + Section with plane Section with plane @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Connect edges if distance less than - + Failure Misslyckande @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Skapa - + Close wire Stäng tråd - + Clear Rensa - + Cancel Avbryt - + Wrong mesh picked Fel nät valt - + No point was picked Ingen punkt markerades @@ -486,32 +486,32 @@ A value in the range of 0.2-10. Leave panel open - + Gmsh Gmsh - - + + No active document Inget aktivt dokument - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. Markera en form för nät, först. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Markera plan - + Please select a plane at which you section the mesh. Vänligen markera ett plan där du vill snitta nätet. @@ -542,27 +542,27 @@ Select a different shape, please. Vänligen markera ett plan där nätet ska trimmas. - + Trim by plane Trimma med plan - + Select the side you want to keep. Vänligen välj sidan du vill behålla. - + Below Nedanför - + Above Ovanför - + Split Dela @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_tr.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_tr.ts index 61bea86f0d..1b4ccebfaa 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_tr.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_tr.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Metal Örgü Bölümü - + Cross-sections... Kesitler... - + Cross-sections Kesit @@ -22,20 +22,20 @@ CmdMeshPartCurveOnMesh - + Mesh Parçacık - + Curve on mesh... Metal örgü üzerinde eğri... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. - Bir metal örgünün üstünde yaklaşık bir eğri oluşturur. + Bir metal örgünün üstünde yaklaşık bir eğri oluşturur. Bu komut yalnızca bir 'metal örgü' nesnesiyle çalışır. @@ -44,7 +44,7 @@ Bu komut yalnızca bir 'metal örgü' nesnesiyle çalışır. Mesh - Mesh + Parçacık @@ -60,17 +60,17 @@ Bu komut yalnızca bir 'metal örgü' nesnesiyle çalışır. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Örgü ve düzlemden kesit oluştur - + Section Kesişim @@ -97,12 +97,12 @@ Bu komut yalnızca bir 'metal örgü' nesnesiyle çalışır. Command - + Trim with plane Düzlem ile kes - + Section with plane Düzlemli bölüm @@ -170,7 +170,7 @@ Bu komut yalnızca bir 'metal örgü' nesnesiyle çalışır. Mesafe şundan azsa kenarları birleştirin - + Failure Başarısız @@ -178,32 +178,32 @@ Bu komut yalnızca bir 'metal örgü' nesnesiyle çalışır. MeshPartGui::CurveOnMeshHandler - + Create Oluştur - + Close wire Telin Yakını - + Clear Temizle - + Cancel İptal - + Wrong mesh picked Yanlış metal örgü seçildi - + No point was picked Hiçbir nokta seçilmedi @@ -220,7 +220,7 @@ Bu komut yalnızca bir 'metal örgü' nesnesiyle çalışır. Press 'Start', then pick points on the mesh; when enough points have been set, right-click and choose 'Create'. Repeat this process to create more splines. Close this task panel to complete the operation. This command only works with a 'mesh' object, not a regular face or surface. To convert an object to a mesh use the tools of the Mesh Workbench. - "Başlat"a basın, ardından metal örgü üzerindeki noktaları seçin; Yeterli nokta ayarlandığında, sağ tıklayın ve 'Oluştur'u seçin. Daha fazla spline oluşturmak için bu işlemi tekrarlayın. İşlemi tamamlamak için bu görev panelini kapatın. + "Başlat"a basın, ardından metal örgü üzerindeki noktaları seçin; Yeterli nokta ayarlandığında, sağ tıklayın ve 'Oluştur'u seçin. Daha fazla spline oluşturmak için bu işlemi tekrarlayın. İşlemi tamamlamak için bu görev panelini kapatın. Bu komut, normal bir yüz veya yüzeyle değil, yalnızca 'metal örgü' nesnesiyle çalışır. Bir nesneyi metal örgüye dönüştürmek için Metal Örgü Çalışma Tezgahının araçlarını kullanın. @@ -338,7 +338,7 @@ Surface deviation multiplied by the length of the current mesh segment (edge)Mesh segments will be grouped according to the color of the object faces. These groups will be exported for mesh output formats supporting this feature (e.g. the format OBJ). - Metal örgü bölümleri, nesne yüzlerinin rengine göre gruplandırılacaktır. + Metal örgü bölümleri, nesne yüzlerinin rengine göre gruplandırılacaktır. Bu gruplar, bu özelliği destekleyen metal örgü çıktı biçimleri için dışa aktarılacaktır (ör. OBJ biçimi). @@ -427,7 +427,7 @@ En küçük değer 0'dır. If this parameter is smaller, the mesh becomes finer. A value in the range of 0.1-1. - Bu parametre daha küçükse, metal örgü daha ince hale gelir. + Bu parametre daha küçükse, metal örgü daha ince hale gelir. 0.1-1 aralığında bir değer. @@ -483,31 +483,31 @@ A value in the range of 0.2-10. Paneli açık bırak - + Gmsh Gmsh - - + + No active document Etkin belge yok - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. Uçsuz bir gövde seçtiniz. Ya gövdenin ucunu ayarlayın ya da farklı bir şekil seçin lütfen. - + You have selected a shape without faces. Select a different shape, please. Yüzleri olmayan bir şekil seçtiniz. Lütfen farklı bir şekil seçin. - + Select a shape for meshing, first. Önce metal örgü haline getirmek için bir şekil seçiniz. @@ -515,12 +515,12 @@ Lütfen farklı bir şekil seçin. MeshPart_Section - + Select plane Bir düzlem seçin - + Please select a plane at which you section the mesh. Lütfen metal örgüyü bölümlendireceğiniz bir düzlem seçin. @@ -538,27 +538,27 @@ Lütfen farklı bir şekil seçin. Lütfen metal örgüyü kırpacağınız bir düzlem seçin. - + Trim by plane Düzlemden Kırp - + Select the side you want to keep. Tutmak istediğiniz tarafı seçiniz. - + Below Altta - + Above Üstünde - + Split Ayır @@ -574,12 +574,12 @@ Lütfen farklı bir şekil seçin. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -587,12 +587,12 @@ Lütfen farklı bir şekil seçin. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_uk.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_uk.ts index 4d41be9f6e..347afd9cf2 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_uk.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_uk.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Частина Сітки - + Cross-sections... Поперечні перерізи... - + Cross-sections Створює поперечні перерізи @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Сітка - + Curve on mesh... Крива на сітці... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Створює приблизну криву на поверхні сітки. @@ -44,7 +44,7 @@ This command only works with a 'mesh' object. Mesh - Сітка(Меш) + Сітка @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Сітка(Меш) - + Create section from mesh and plane Створити секцію з полігональної сітки і площини - + Section Розріз @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Trim with plane - + Section with plane Section with plane @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Connect edges if distance less than - + Failure Помилка @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Створити - + Close wire Замкнути сітку - + Clear Очистити - + Cancel Скасувати - + Wrong mesh picked Обрана хибна сітка - + No point was picked Жодної точки не вибрано @@ -485,32 +485,32 @@ A value in the range of 0.2-10. Залишити панель відкритою - + Gmsh Gmsh - - + + No active document Немає активного документу - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. Спочатку оберіть форму для злиття. @@ -518,12 +518,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Оберіть площину - + Please select a plane at which you section the mesh. Please select a plane at which you section the mesh. @@ -541,27 +541,27 @@ Select a different shape, please. Оберіть площину за допомогою якої ви будете обрізати сітку. - + Trim by plane Trim by plane - + Select the side you want to keep. Оберіть сторону для збереження. - + Below Знизу - + Above Згори - + Split Розділити @@ -577,12 +577,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -590,12 +590,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_val-ES.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_val-ES.ts index 9545a8e38e..fb63a2a812 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_val-ES.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_val-ES.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart Mallat - + Cross-sections... Seccions... - + Cross-sections Seccions @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Corba en malla... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Creates an approximated curve on top of a mesh. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane Crea una secció a partir d'una malla i un pla - + Section Secció @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Trim with plane - + Section with plane Section with plane @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Connecta les arestes si la distància és menor que - + Failure Fallada @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create Crea - + Close wire Tanca el filferro - + Clear Neteja - + Cancel Cancel·la - + Wrong mesh picked S'ha seleccionat una malla incorrecta - + No point was picked No s'ha seleccionat cap punt. @@ -480,32 +480,32 @@ A value in the range of 0.2-10. Deixa el tauler obert - + Gmsh Gmsh - - + + No active document No hi ha cap document actiu. - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. Seleccioneu primer una forma per al mallat @@ -513,12 +513,12 @@ Select a different shape, please. MeshPart_Section - + Select plane Seleccioneu un pla - + Please select a plane at which you section the mesh. Seleccioneu un pla a partir del qual seccionat la malla @@ -536,27 +536,27 @@ Select a different shape, please. Seleccioneu un pla al qual ajustar la malla - + Trim by plane Retalla per pla - + Select the side you want to keep. Seleccioneu la cara que voleu conservar. - + Below Davall - + Above Damunt - + Split Divideix @@ -572,12 +572,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -585,12 +585,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-CN.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-CN.ts index 838469a428..dad97a0e90 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-CN.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-CN.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart 网格零件 - + Cross-sections... 横截面... - + Cross-sections 横截面 @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh 网格 - + Curve on mesh... 网格上的曲线...... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. 在网格顶上创建一个近似曲线。 @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh 网格 - + Create section from mesh and plane 从网格和平面创建剖面 - + Section 截面 @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane 用平面修剪 - + Section with plane 用平面截断 @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. 如果距离小于,则连接边缘 - + Failure 失败 @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create 创建 - + Close wire 封闭线 - + Clear 清除 - + Cancel 取消 - + Wrong mesh picked 错误的网格选择 - + No point was picked 没有点被选 @@ -486,32 +486,32 @@ A value in the range of 0.2-10. 保持面板打开 - + Gmsh Gmsh - - + + No active document 没有活动文档 - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. 你选择了一个没有尖端的实体。 请设置实体的尖端或选择一个不同的形状。 - + You have selected a shape without faces. Select a different shape, please. 您选择了一个没有面的形状。 请选择不同的形状。 - + Select a shape for meshing, first. 请先选择需要网格化的形状. @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane 选取平面 - + Please select a plane at which you section the mesh. 请选取一个您修剪网格的平面。 @@ -542,27 +542,27 @@ Select a different shape, please. 请选取一个您修剪网格的平面。 - + Trim by plane 平面修剪 - + Select the side you want to keep. 选择要保留的一侧。 - + Below 在下面 - + Above 在上面 - + Split 分割 @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-TW.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-TW.ts index f4b5bbd589..85cbca22a5 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-TW.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_zh-TW.ts @@ -4,17 +4,17 @@ CmdMeshPartCrossSections - + MeshPart 網格零件 - + Cross-sections... 剖面... - + Cross-sections 剖面 @@ -22,17 +22,17 @@ CmdMeshPartCurveOnMesh - + Mesh Mesh - + Curve on mesh... Curve on mesh... - + Creates an approximated curve on top of a mesh. This command only works with a 'mesh' object. Creates an approximated curve on top of a mesh. @@ -60,17 +60,17 @@ This command only works with a 'mesh' object. CmdMeshPartSection - + Mesh Mesh - + Create section from mesh and plane 由網格和平面建立截面 - + Section 剖面 @@ -97,12 +97,12 @@ This command only works with a 'mesh' object. Command - + Trim with plane Trim with plane - + Section with plane Section with plane @@ -170,7 +170,7 @@ This command only works with a 'mesh' object. Connect edges if distance less than - + Failure Failure @@ -178,32 +178,32 @@ This command only works with a 'mesh' object. MeshPartGui::CurveOnMeshHandler - + Create 建立 - + Close wire Close wire - + Clear 清除 - + Cancel 取消 - + Wrong mesh picked Wrong mesh picked - + No point was picked 無選定點 @@ -486,32 +486,32 @@ A value in the range of 0.2-10. Leave panel open - + Gmsh Gmsh - - + + No active document 無可用文件 - + You have selected a body without tip. Either set the tip of the body or select a different shape, please. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - + You have selected a shape without faces. Select a different shape, please. You have selected a shape without faces. Select a different shape, please. - + Select a shape for meshing, first. 請先選擇造型來產生網格 @@ -519,12 +519,12 @@ Select a different shape, please. MeshPart_Section - + Select plane 選取平面 - + Please select a plane at which you section the mesh. Please select a plane at which you section the mesh. @@ -542,27 +542,27 @@ Select a different shape, please. 請選取一個您修剪網格的平面 - + Trim by plane Trim by plane - + Select the side you want to keep. Select the side you want to keep. - + Below Below - + Above Above - + Split Split @@ -578,12 +578,12 @@ Select a different shape, please. MeshPart_CreateFlatMesh - + Unwrap Mesh Unwrap Mesh - + Find a flat representation of a mesh. Find a flat representation of a mesh. @@ -591,12 +591,12 @@ Select a different shape, please. MeshPart_CreateFlatFace - + Unwrap Face Unwrap Face - + Find a flat representation of a face. Find a flat representation of a face. diff --git a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp index 0625bd73c3..c63a35de9e 100644 --- a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp +++ b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.cpp @@ -24,9 +24,9 @@ #include +#include "CurveOnMesh.h" #include "TaskCurveOnMesh.h" #include "ui_TaskCurveOnMesh.h" -#include "CurveOnMesh.h" using namespace MeshPartGui; @@ -38,8 +38,7 @@ CurveOnMeshWidget::CurveOnMeshWidget(Gui::View3DInventor* view, QWidget* parent) , myView(view) { ui->setupUi(this); - connect(ui->startButton, &QPushButton::clicked, - this, &CurveOnMeshWidget::onStartButtonClicked); + connect(ui->startButton, &QPushButton::clicked, this, &CurveOnMeshWidget::onStartButtonClicked); this->setup(); } @@ -61,12 +60,13 @@ void CurveOnMeshWidget::setup() ui->continuity->addItem(QString::fromLatin1("C3"), static_cast(GeomAbs_C3)); ui->continuity->setCurrentIndex(2); - for (int i=0; i<8; i++) - ui->maxDegree->addItem(QString::number(i+1)); + for (int i = 0; i < 8; i++) { + ui->maxDegree->addItem(QString::number(i + 1)); + } ui->maxDegree->setCurrentIndex(4); } -void CurveOnMeshWidget::changeEvent(QEvent *e) +void CurveOnMeshWidget::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -97,9 +97,7 @@ void CurveOnMeshWidget::reject() TaskCurveOnMesh::TaskCurveOnMesh(Gui::View3DInventor* view) { widget = new CurveOnMeshWidget(view); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), - widget->windowTitle(), true, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), true, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.h b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.h index e97769dc7e..1850abb91f 100644 --- a/src/Mod/MeshPart/Gui/TaskCurveOnMesh.h +++ b/src/Mod/MeshPart/Gui/TaskCurveOnMesh.h @@ -29,7 +29,8 @@ #include -namespace Gui { +namespace Gui +{ class View3DInventor; } @@ -39,18 +40,18 @@ namespace MeshPartGui class Ui_TaskCurveOnMesh; class CurveOnMeshHandler; -class CurveOnMeshWidget : public QWidget +class CurveOnMeshWidget: public QWidget { Q_OBJECT public: - explicit CurveOnMeshWidget(Gui::View3DInventor* view, QWidget* parent=nullptr); + explicit CurveOnMeshWidget(Gui::View3DInventor* view, QWidget* parent = nullptr); ~CurveOnMeshWidget() override; void reject(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void setup(); private: @@ -62,7 +63,7 @@ private: QPointer myView; }; -class TaskCurveOnMesh : public Gui::TaskView::TaskDialog +class TaskCurveOnMesh: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -73,13 +74,15 @@ public: bool reject() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Close; } + { + return QDialogButtonBox::Close; + } private: CurveOnMeshWidget* widget; Gui::TaskView::TaskBox* taskbox; }; -} //namespace MeshPartGui +} // namespace MeshPartGui -#endif // MESHPART_GUI_TASKCURVEONMESH_H +#endif // MESHPART_GUI_TASKCURVEONMESH_H diff --git a/src/Mod/MeshPart/Gui/Tessellation.cpp b/src/Mod/MeshPart/Gui/Tessellation.cpp index cc6c04d4d0..effba12445 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.cpp +++ b/src/Mod/MeshPart/Gui/Tessellation.cpp @@ -22,15 +22,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif +#include +#include #include #include #include #include -#include -#include #include #include #include @@ -39,8 +39,8 @@ #include #include #include -#include #include +#include #include #include "Tessellation.h" @@ -52,7 +52,8 @@ using namespace MeshPartGui; /* TRANSLATOR MeshPartGui::Tessellation */ Tessellation::Tessellation(QWidget* parent) - : QWidget(parent), ui(new Ui_Tessellation) + : QWidget(parent) + , ui(new Ui_Tessellation) { ui->setupUi(this); gmsh = new Mesh2ShapeGmsh(this); @@ -60,8 +61,8 @@ Tessellation::Tessellation(QWidget* parent) ui->stackedWidget->addTab(gmsh, tr("Gmsh")); - ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Mesh/Meshing/Standard"); + ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Mesh/Meshing/Standard"); double value = ui->spinSurfaceDeviation->value().getValue(); value = handle->GetFloat("LinearDeflection", value); double angle = ui->spinAngularDeviation->value().getValue(); @@ -79,10 +80,10 @@ Tessellation::Tessellation(QWidget* parent) ui->comboFineness->setCurrentIndex(2); onComboFinenessCurrentIndexChanged(2); -#if !defined (HAVE_MEFISTO) +#if !defined(HAVE_MEFISTO) ui->stackedWidget->setTabEnabled(Mefisto, false); #endif -#if !defined (HAVE_NETGEN) +#if !defined(HAVE_NETGEN) ui->stackedWidget->setTabEnabled(Netgen, false); #endif @@ -101,14 +102,22 @@ Tessellation::~Tessellation() = default; void Tessellation::setupConnections() { connect(gmsh, &Mesh2ShapeGmsh::processed, this, &Tessellation::gmshProcessed); - connect(ui->estimateMaximumEdgeLength, &QPushButton::clicked, - this, &Tessellation::onEstimateMaximumEdgeLengthClicked); - connect(ui->comboFineness, qOverload(&QComboBox::currentIndexChanged), - this, &Tessellation::onComboFinenessCurrentIndexChanged); - connect(ui->checkSecondOrder, &QCheckBox::toggled, - this, &Tessellation::onCheckSecondOrderToggled); - connect(ui->checkQuadDominated, &QCheckBox::toggled, - this, &Tessellation::onCheckQuadDominatedToggled); + connect(ui->estimateMaximumEdgeLength, + &QPushButton::clicked, + this, + &Tessellation::onEstimateMaximumEdgeLengthClicked); + connect(ui->comboFineness, + qOverload(&QComboBox::currentIndexChanged), + this, + &Tessellation::onComboFinenessCurrentIndexChanged); + connect(ui->checkSecondOrder, + &QCheckBox::toggled, + this, + &Tessellation::onCheckSecondOrderToggled); + connect(ui->checkQuadDominated, + &QCheckBox::toggled, + this, + &Tessellation::onCheckQuadDominatedToggled); } void Tessellation::meshingMethod(int id) @@ -130,56 +139,59 @@ void Tessellation::onComboFinenessCurrentIndexChanged(int index) } switch (index) { - case VeryCoarse: - ui->doubleGrading->setValue(0.7); - ui->spinEdgeElements->setValue(0.3); - ui->spinCurvatureElements->setValue(1.0); - break; - case Coarse: - ui->doubleGrading->setValue(0.5); - ui->spinEdgeElements->setValue(0.5); - ui->spinCurvatureElements->setValue(1.5); - break; - case Moderate: - ui->doubleGrading->setValue(0.3); - ui->spinEdgeElements->setValue(1.0); - ui->spinCurvatureElements->setValue(2.0); - break; - case Fine: - ui->doubleGrading->setValue(0.2); - ui->spinEdgeElements->setValue(2.0); - ui->spinCurvatureElements->setValue(3.0); - break; - case VeryFine: - ui->doubleGrading->setValue(0.1); - ui->spinEdgeElements->setValue(3.0); - ui->spinCurvatureElements->setValue(5.0); - break; - default: - break; + case VeryCoarse: + ui->doubleGrading->setValue(0.7); + ui->spinEdgeElements->setValue(0.3); + ui->spinCurvatureElements->setValue(1.0); + break; + case Coarse: + ui->doubleGrading->setValue(0.5); + ui->spinEdgeElements->setValue(0.5); + ui->spinCurvatureElements->setValue(1.5); + break; + case Moderate: + ui->doubleGrading->setValue(0.3); + ui->spinEdgeElements->setValue(1.0); + ui->spinCurvatureElements->setValue(2.0); + break; + case Fine: + ui->doubleGrading->setValue(0.2); + ui->spinEdgeElements->setValue(2.0); + ui->spinCurvatureElements->setValue(3.0); + break; + case VeryFine: + ui->doubleGrading->setValue(0.1); + ui->spinEdgeElements->setValue(3.0); + ui->spinCurvatureElements->setValue(5.0); + break; + default: + break; } } void Tessellation::onCheckSecondOrderToggled(bool on) { - if (on) + if (on) { ui->checkQuadDominated->setChecked(false); + } } void Tessellation::onCheckQuadDominatedToggled(bool on) { - if (on) + if (on) { ui->checkSecondOrder->setChecked(false); + } } void Tessellation::gmshProcessed() { bool doClose = !ui->checkBoxDontQuit->isChecked(); - if (doClose) + if (doClose) { Gui::Control().reject(); + } } -void Tessellation::changeEvent(QEvent *e) +void Tessellation::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { int index = ui->comboFineness->currentIndex(); @@ -202,8 +214,8 @@ void Tessellation::onEstimateMaximumEdgeLengthClicked() } double edgeLen = 0; - for (auto &sel : Gui::Selection().getSelection("*", Gui::ResolveMode::NoResolve)) { - auto shape = Part::Feature::getTopoShape(sel.pObject,sel.SubName); + for (auto& sel : Gui::Selection().getSelection("*", Gui::ResolveMode::NoResolve)) { + auto shape = Part::Feature::getTopoShape(sel.pObject, sel.SubName); if (shape.hasSubShape(TopAbs_FACE)) { Base::BoundBox3d bbox = shape.getBoundBox(); edgeLen = std::max(edgeLen, bbox.LengthX()); @@ -212,7 +224,7 @@ void Tessellation::onEstimateMaximumEdgeLengthClicked() } } - ui->spinMaximumEdgeLength->setValue(edgeLen/10); + ui->spinMaximumEdgeLength->setValue(edgeLen / 10); } bool Tessellation::accept() @@ -234,8 +246,8 @@ bool Tessellation::accept() bool bodyWithNoTip = false; bool partWithNoFace = false; - for (auto &sel : Gui::Selection().getSelection("*", Gui::ResolveMode::NoResolve)) { - auto shape = Part::Feature::getTopoShape(sel.pObject,sel.SubName); + for (auto& sel : Gui::Selection().getSelection("*", Gui::ResolveMode::NoResolve)) { + auto shape = Part::Feature::getTopoShape(sel.pObject, sel.SubName); if (shape.hasSubShape(TopAbs_FACE)) { shapeObjects.emplace_back(sel.pObject, sel.SubName); } @@ -254,12 +266,17 @@ bool Tessellation::accept() if (shapeObjects.empty()) { if (bodyWithNoTip) { - QMessageBox::critical(this, windowTitle(), tr("You have selected a body without tip.\n" - "Either set the tip of the body or select a different shape, please.")); + QMessageBox::critical( + this, + windowTitle(), + tr("You have selected a body without tip.\n" + "Either set the tip of the body or select a different shape, please.")); } else if (partWithNoFace) { - QMessageBox::critical(this, windowTitle(), tr("You have selected a shape without faces.\n" - "Select a different shape, please.")); + QMessageBox::critical(this, + windowTitle(), + tr("You have selected a shape without faces.\n" + "Select a different shape, please.")); } else { QMessageBox::critical(this, windowTitle(), tr("Select a shape for meshing, first.")); @@ -282,7 +299,9 @@ bool Tessellation::accept() } } -void Tessellation::process(int method, App::Document* doc, const std::list& shapeObjects) +void Tessellation::process(int method, + App::Document* doc, + const std::list& shapeObjects) { try { Gui::WaitCursor wc; @@ -290,37 +309,36 @@ void Tessellation::process(int method, App::Document* doc, const std::listopenTransaction("Meshing"); - for (auto &info : shapeObjects) { + for (auto& info : shapeObjects) { QString subname = QString::fromLatin1(info.getSubName().c_str()); QString objname = QString::fromLatin1(info.getObjectName().c_str()); auto obj = info.getObject(); - if (!obj) + if (!obj) { continue; + } auto sobj = obj->getSubObject(info.getSubName().c_str()); - if (!sobj) + if (!sobj) { continue; + } sobj = sobj->getLinkedObject(true); - if (!sobj) + if (!sobj) { continue; + } QString label = QString::fromUtf8(sobj->Label.getValue()); QString param = getMeshingParameters(method, sobj); - QString cmd = QString::fromLatin1( - "__doc__=FreeCAD.getDocument(\"%1\")\n" - "__mesh__=__doc__.addObject(\"Mesh::Feature\",\"Mesh\")\n" - "__part__=__doc__.getObject(\"%2\")\n" - "__shape__=Part.getShape(__part__,\"%3\")\n" - "__mesh__.Mesh=MeshPart.meshFromShape(%4)\n" - "__mesh__.Label=\"%5 (Meshed)\"\n" - "del __doc__, __mesh__, __part__, __shape__\n") - .arg(this->document, - objname, - subname, - param, - label); + QString cmd = + QString::fromLatin1("__doc__=FreeCAD.getDocument(\"%1\")\n" + "__mesh__=__doc__.addObject(\"Mesh::Feature\",\"Mesh\")\n" + "__part__=__doc__.getObject(\"%2\")\n" + "__shape__=Part.getShape(__part__,\"%3\")\n" + "__mesh__.Mesh=MeshPart.meshFromShape(%4)\n" + "__mesh__.Label=\"%5 (Meshed)\"\n" + "del __doc__, __mesh__, __part__, __shape__\n") + .arg(this->document, objname, subname, param, label); Gui::Command::runCommand(Gui::Command::Doc, cmd.toUtf8()); @@ -337,8 +355,8 @@ void Tessellation::process(int method, App::Document* doc, const std::listspinSurfaceDeviation->value().getValue(); handle->SetFloat("LinearDeflection", value); double angle = ui->spinAngularDeviation->value().getValue(); @@ -353,12 +371,12 @@ void Tessellation::setFaceColors(int method, App::Document* doc, App::DocumentOb // if Standard mesher is used and face colors should be applied if (method == Standard) { if (ui->meshShapeColors->isChecked()) { - Gui::ViewProvider* vpm = Gui::Application::Instance->getViewProvider - (doc->getActiveObject()); + Gui::ViewProvider* vpm = + Gui::Application::Instance->getViewProvider(doc->getActiveObject()); MeshGui::ViewProviderMesh* vpmesh = dynamic_cast(vpm); auto svp = Base::freecad_dynamic_cast( - Gui::Application::Instance->getViewProvider(obj)); + Gui::Application::Instance->getViewProvider(obj)); if (vpmesh && svp) { std::vector diff_col = svp->DiffuseColor.getValues(); if (ui->groupsFaceColors->isChecked()) { @@ -374,12 +392,14 @@ std::vector Tessellation::getUniqueColors(const std::vector col_set; - for (const auto& it : colors) + for (const auto& it : colors) { col_set.insert(it.getPackedValue()); + } std::vector unique; - for (const auto& it : col_set) + for (const auto& it : col_set) { unique.emplace_back(it); + } return unique; } @@ -411,14 +431,15 @@ QString Tessellation::getStandardParameters(App::DocumentObject* obj) const "LinearDeflection=%1, " "AngularDeflection=%2, " "Relative=%3") - .arg(devFace) - .arg(devAngle) - .arg(relative ? QString::fromLatin1("True") : QString::fromLatin1("False")); - if (ui->meshShapeColors->isChecked()) + .arg(devFace) + .arg(devAngle) + .arg(relative ? QString::fromLatin1("True") : QString::fromLatin1("False")); + if (ui->meshShapeColors->isChecked()) { param += QString::fromLatin1(",Segments=True"); + } auto svp = Base::freecad_dynamic_cast( - Gui::Application::Instance->getViewProvider(obj)); + Gui::Application::Instance->getViewProvider(obj)); if (ui->groupsFaceColors->isChecked() && svp) { // TODO: currently, we can only retrieve part feature // color. The problem is that if the feature is linked, @@ -431,7 +452,8 @@ QString Tessellation::getStandardParameters(App::DocumentObject* obj) const // // PartGui::ViewProviderPartExt::getShapeColors(). // - param += QString::fromLatin1(",GroupColors=Gui.getDocument('%1').getObject('%2').DiffuseColor") + param += + QString::fromLatin1(",GroupColors=Gui.getDocument('%1').getObject('%2').DiffuseColor") .arg(QString::fromLatin1(obj->getDocument()->getName()), QString::fromLatin1(obj->getNameInDocument())); } @@ -442,8 +464,9 @@ QString Tessellation::getStandardParameters(App::DocumentObject* obj) const QString Tessellation::getMefistoParameters() const { double maxEdge = ui->spinMaximumEdgeLength->value().getValue(); - if (!ui->spinMaximumEdgeLength->isEnabled()) + if (!ui->spinMaximumEdgeLength->isEnabled()) { maxEdge = 0; + } return QString::fromLatin1("Shape=__shape__,MaxLength=%1").arg(maxEdge); } @@ -459,21 +482,22 @@ QString Tessellation::getNetgenParameters() const bool allowquad = ui->checkQuadDominated->isChecked(); if (fineness < 5) { param = QString::fromLatin1("Shape=__shape__," - "Fineness=%1,SecondOrder=%2,Optimize=%3,AllowQuad=%4") - .arg(fineness) - .arg(secondOrder ? 1 : 0) - .arg(optimize ? 1 : 0) - .arg(allowquad ? 1 : 0); + "Fineness=%1,SecondOrder=%2,Optimize=%3,AllowQuad=%4") + .arg(fineness) + .arg(secondOrder ? 1 : 0) + .arg(optimize ? 1 : 0) + .arg(allowquad ? 1 : 0); } else { param = QString::fromLatin1("Shape=__shape__," - "GrowthRate=%1,SegPerEdge=%2,SegPerRadius=%3,SecondOrder=%4,Optimize=%5,AllowQuad=%6") - .arg(growthRate) - .arg(nbSegPerEdge) - .arg(nbSegPerRadius) - .arg(secondOrder ? 1 : 0) - .arg(optimize ? 1 : 0) - .arg(allowquad ? 1 : 0); + "GrowthRate=%1,SegPerEdge=%2,SegPerRadius=%3,SecondOrder=%4," + "Optimize=%5,AllowQuad=%6") + .arg(growthRate) + .arg(nbSegPerEdge) + .arg(nbSegPerRadius) + .arg(secondOrder ? 1 : 0) + .arg(optimize ? 1 : 0) + .arg(allowquad ? 1 : 0); } return param; @@ -481,7 +505,8 @@ QString Tessellation::getNetgenParameters() const // --------------------------------------- -class Mesh2ShapeGmsh::Private { +class Mesh2ShapeGmsh::Private +{ public: std::string label; std::list shapes; @@ -492,8 +517,8 @@ public: }; Mesh2ShapeGmsh::Mesh2ShapeGmsh(QWidget* parent, Qt::WindowFlags fl) - : GmshWidget(parent, fl) - , d(new Private()) + : GmshWidget(parent, fl) + , d(new Private()) { d->cadFile = App::Application::getTempFileName() + "mesh.brep"; d->stlFile = App::Application::getTempFileName() + "mesh.stl"; @@ -526,40 +551,46 @@ bool Mesh2ShapeGmsh::writeProject(QString& inpFile, QString& outFile) // Parameters int algorithm = meshingAlgorithm(); double maxSize = getMaxSize(); - if (maxSize == 0.0) + if (maxSize == 0.0) { maxSize = 1.0e22; + } double minSize = getMinSize(); // Gmsh geo file Base::FileInfo geo(d->geoFile); Base::ofstream geoOut(geo, std::ios::out); geoOut << "// geo file for meshing with Gmsh meshing software created by FreeCAD\n" - << "// open brep geometry\n" - << "Merge \"" << d->cadFile << "\";\n\n" - << "// Characteristic Length\n" - << "// no boundary layer settings for this mesh\n" - << "// min, max Characteristic Length\n" - << "Mesh.CharacteristicLengthMax = " << maxSize << ";\n" - << "Mesh.CharacteristicLengthMin = " << minSize << ";\n\n" - << "// optimize the mesh\n" - << "Mesh.Optimize = 1;\n" - << "Mesh.OptimizeNetgen = 0;\n" - << "// High-order meshes optimization (0=none, 1=optimization, 2=elastic+optimization, 3=elastic, 4=fast curving)\n" - << "Mesh.HighOrderOptimize = 0;\n\n" - << "// mesh order\n" - << "Mesh.ElementOrder = 2;\n" - << "// Second order nodes are created by linear interpolation instead by curvilinear\n" - << "Mesh.SecondOrderLinear = 1;\n\n" - << "// mesh algorithm, only a few algorithms are usable with 3D boundary layer generation\n" - << "// 2D mesh algorithm (1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal, 7=BAMG, 8=DelQuad, 9=Packing of Parallelograms)\n" - << "Mesh.Algorithm = " << algorithm << ";\n" - << "// 3D mesh algorithm (1=Delaunay, 2=New Delaunay, 4=Frontal, 7=MMG3D, 9=R-tree, 10=HTX)\n" - << "Mesh.Algorithm3D = 1;\n\n" - << "// meshing\n" - << "// set geometrical tolerance (also used for merging nodes)\n" - << "Geometry.Tolerance = 1e-06;\n" - << "Mesh 2;\n" - << "Coherence Mesh; // Remove duplicate vertices\n"; + << "// open brep geometry\n" + << "Merge \"" << d->cadFile << "\";\n\n" + << "// Characteristic Length\n" + << "// no boundary layer settings for this mesh\n" + << "// min, max Characteristic Length\n" + << "Mesh.CharacteristicLengthMax = " << maxSize << ";\n" + << "Mesh.CharacteristicLengthMin = " << minSize << ";\n\n" + << "// optimize the mesh\n" + << "Mesh.Optimize = 1;\n" + << "Mesh.OptimizeNetgen = 0;\n" + << "// High-order meshes optimization (0=none, 1=optimization, " + "2=elastic+optimization, 3=elastic, 4=fast curving)\n" + << "Mesh.HighOrderOptimize = 0;\n\n" + << "// mesh order\n" + << "Mesh.ElementOrder = 2;\n" + << "// Second order nodes are created by linear interpolation instead by " + "curvilinear\n" + << "Mesh.SecondOrderLinear = 1;\n\n" + << "// mesh algorithm, only a few algorithms are usable with 3D boundary layer " + "generation\n" + << "// 2D mesh algorithm (1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal, " + "7=BAMG, 8=DelQuad, 9=Packing of Parallelograms)\n" + << "Mesh.Algorithm = " << algorithm << ";\n" + << "// 3D mesh algorithm (1=Delaunay, 2=New Delaunay, 4=Frontal, 7=MMG3D, " + "9=R-tree, 10=HTX)\n" + << "Mesh.Algorithm3D = 1;\n\n" + << "// meshing\n" + << "// set geometrical tolerance (also used for merging nodes)\n" + << "Geometry.Tolerance = 1e-06;\n" + << "Mesh 2;\n" + << "Coherence Mesh; // Remove duplicate vertices\n"; geoOut.close(); inpFile = QString::fromUtf8(d->geoFile.c_str()); @@ -570,8 +601,9 @@ bool Mesh2ShapeGmsh::writeProject(QString& inpFile, QString& outFile) } else { App::Document* doc = d->doc.getDocument(); - if (doc) + if (doc) { doc->commitTransaction(); + } Q_EMIT processed(); } @@ -582,8 +614,9 @@ bool Mesh2ShapeGmsh::writeProject(QString& inpFile, QString& outFile) bool Mesh2ShapeGmsh::loadOutput() { App::Document* doc = d->doc.getDocument(); - if (!doc) + if (!doc) { return false; + } // Now read-in the mesh Base::FileInfo stl(d->stlFile); @@ -613,20 +646,20 @@ bool Mesh2ShapeGmsh::loadOutput() TaskTessellation::TaskTessellation() { widget = new Tessellation(); - Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox( - QPixmap()/*Gui::BitmapFactory().pixmap("MeshPart_Mesher")*/, - widget->windowTitle(), true, nullptr); + Gui::TaskView::TaskBox* taskbox = + new Gui::TaskView::TaskBox(QPixmap() /*Gui::BitmapFactory().pixmap("MeshPart_Mesher")*/, + widget->windowTitle(), + true, + nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } void TaskTessellation::open() -{ -} +{} void TaskTessellation::clicked(int) -{ -} +{} bool TaskTessellation::accept() { diff --git a/src/Mod/MeshPart/Gui/Tessellation.h b/src/Mod/MeshPart/Gui/Tessellation.h index ccf1df7ec9..991850dd10 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.h +++ b/src/Mod/MeshPart/Gui/Tessellation.h @@ -23,25 +23,27 @@ #ifndef MESHPARTGUI_TESSELLATION_H #define MESHPARTGUI_TESSELLATION_H -#include #include +#include #include #include #include -namespace App { +namespace App +{ class Document; class SubObjectT; -} -namespace MeshPartGui { +} // namespace App +namespace MeshPartGui +{ /** * Non-modal dialog to mesh a shape. * @author Werner Mayer */ -class Mesh2ShapeGmsh : public MeshGui::GmshWidget +class Mesh2ShapeGmsh: public MeshGui::GmshWidget { Q_OBJECT @@ -64,18 +66,20 @@ private: }; class Ui_Tessellation; -class Tessellation : public QWidget +class Tessellation: public QWidget { Q_OBJECT - enum { + enum + { Standard, Mefisto, Netgen, Gmsh }; - enum { + enum + { VeryCoarse = 0, Coarse = 1, Moderate = 2, @@ -89,7 +93,7 @@ public: bool accept(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void process(int method, App::Document* doc, const std::list&); void saveParameters(int method); void setFaceColors(int method, App::Document* doc, App::DocumentObject* obj); @@ -114,7 +118,7 @@ private: std::unique_ptr ui; }; -class TaskTessellation : public Gui::TaskView::TaskDialog +class TaskTessellation: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -128,12 +132,14 @@ public: bool reject() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: Tessellation* widget; }; -} // namespace MeshPartGui +} // namespace MeshPartGui -#endif // MESHPARTGUI_TESSELLATION_H +#endif // MESHPARTGUI_TESSELLATION_H diff --git a/src/Mod/MeshPart/Gui/Workbench.cpp b/src/Mod/MeshPart/Gui/Workbench.cpp index b5113be32a..837fe73416 100644 --- a/src/Mod/MeshPart/Gui/Workbench.cpp +++ b/src/Mod/MeshPart/Gui/Workbench.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -32,7 +32,7 @@ using namespace MeshPartGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "MeshPart"); #endif @@ -49,7 +49,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const Gui::ToolBarItem* part = new Gui::ToolBarItem(root); part->setCommand("MeshPart"); *part << "MeshPart_Mesher"; - return root; + return root; } Gui::ToolBarItem* Workbench::setupCommandBars() const @@ -58,4 +58,3 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const Gui::ToolBarItem* root = new Gui::ToolBarItem; return root; } - diff --git a/src/Mod/MeshPart/Gui/Workbench.h b/src/Mod/MeshPart/Gui/Workbench.h index 78d9a49c28..7d586719fa 100644 --- a/src/Mod/MeshPart/Gui/Workbench.h +++ b/src/Mod/MeshPart/Gui/Workbench.h @@ -26,25 +26,26 @@ #include -namespace MeshPartGui { +namespace MeshPartGui +{ /** * @author Werner Mayer */ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - Workbench(); - ~Workbench() override; + Workbench(); + ~Workbench() override; protected: - Gui::ToolBarItem* setupToolBars() const override; - Gui::ToolBarItem* setupCommandBars() const override; + Gui::ToolBarItem* setupToolBars() const override; + Gui::ToolBarItem* setupCommandBars() const override; }; -} // namespace MeshPartGui +} // namespace MeshPartGui -#endif // MESHPARTGUI_WORKBENCH_H +#endif // MESHPARTGUI_WORKBENCH_H diff --git a/src/Mod/MeshPart/Init.py b/src/Mod/MeshPart/Init.py index dd8dea3aee..d6eb27fe80 100644 --- a/src/Mod/MeshPart/Init.py +++ b/src/Mod/MeshPart/Init.py @@ -1,25 +1,25 @@ # FreeCAD init script of the MeshPart module # (c) 2001 Juergen Riegel -#*************************************************************************** -#* Copyright (c) 2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ diff --git a/src/Mod/MeshPart/InitGui.py b/src/Mod/MeshPart/InitGui.py index 17d0102f1f..c4cea6af20 100644 --- a/src/Mod/MeshPart/InitGui.py +++ b/src/Mod/MeshPart/InitGui.py @@ -5,31 +5,31 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -#*************************************************************************** -#* Copyright (c) 2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ -class MeshPartWorkbench ( Workbench ): +class MeshPartWorkbench(Workbench): "MeshPart workbench object" Icon = """ /* XPM */ @@ -58,14 +58,13 @@ class MeshPartWorkbench ( Workbench ): MenuText = "MeshPart" ToolTip = "MeshPart workbench" - def Initialize(self): # load the module import MeshPartGui import MeshPart - def GetClassName(self): return "MeshPartGui::Workbench" + # Gui.addWorkbench(MeshPartWorkbench()) diff --git a/src/Mod/MeshPart/MeshPartGlobal.h b/src/Mod/MeshPart/MeshPartGlobal.h index 38af3fd22a..1e4d3b22ca 100644 --- a/src/Mod/MeshPart/MeshPartGlobal.h +++ b/src/Mod/MeshPart/MeshPartGlobal.h @@ -29,19 +29,19 @@ // MeshPart #ifndef MeshPartExport #ifdef MeshPart_EXPORTS -# define MeshPartExport FREECAD_DECL_EXPORT +#define MeshPartExport FREECAD_DECL_EXPORT #else -# define MeshPartExport FREECAD_DECL_IMPORT +#define MeshPartExport FREECAD_DECL_IMPORT #endif #endif // MeshPartGui #ifndef MeshPartGuiExport #ifdef MeshPartGui_EXPORTS -# define MeshPartGuiExport FREECAD_DECL_EXPORT +#define MeshPartGuiExport FREECAD_DECL_EXPORT #else -# define MeshPartGuiExport FREECAD_DECL_IMPORT +#define MeshPartGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //MESHPART_GLOBAL_H +#endif // MESHPART_GLOBAL_H diff --git a/src/Mod/MeshPart/meshpart.dox b/src/Mod/MeshPart/meshpart.dox index 37340f3950..78f968f938 100644 --- a/src/Mod/MeshPart/meshpart.dox +++ b/src/Mod/MeshPart/meshpart.dox @@ -2,4 +2,3 @@ * \ingroup CWORKBENCHES * \brief Part to Mesh (and vice-versa) conversion tools */ - diff --git a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.qm b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.qm index 01c63643c7..683d1aafc2 100644 Binary files a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.qm and b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.qm differ diff --git a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.ts b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.ts index 4bbbddeef8..a05d244cdf 100644 --- a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.ts +++ b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_el.ts @@ -107,17 +107,17 @@ Maximum fragment size - Maximum fragment size + Μέγιστο μέγεθος τεμαχίου angle (fa) - angle (fa) + γωνία (fa) Convexity - Convexity + Κυρτότητα @@ -168,33 +168,33 @@ It looks like you may be using a Snap version of OpenSCAD. - It looks like you may be using a Snap version of OpenSCAD. + Φαίνεται ότι μπορεί να χρησιμοποιείτε μια Snap έκδοση του OpenSCAD. If OpenSCAD execution fails to load the temporary file, use FreeCAD's OpenSCAD Workbench Preferences to change the transfer mechanism. - If OpenSCAD execution fails to load the temporary file, use FreeCAD's OpenSCAD Workbench Preferences to change the transfer mechanism. + Εάν η εκτέλεση του OpenSCAD αποτύχει να φορτώσει το προσωρινό αρχείο, χρησιμοποιήστε τις Προτιμήσεις OpenSCAD του FreeCAD για να αλλάξετε τον μηχανισμό μεταφοράς. It looks like you may be using a sandboxed version of FreeCAD. - It looks like you may be using a sandboxed version of FreeCAD. + Φαίνεται ότι μπορεί να χρησιμοποιείτε μια sandboxed έκδοση του FreeCAD. Unable to explode %s - Unable to explode %s + Αδυναμία κατακερματισμού %s Convert Edges to Faces - Convert Edges to Faces + Μετατροπή Ακμών σε Όψεις Please select 3 objects first - Please select 3 objects first + Παρακαλώ επιλέξτε πρώτα 3 αντικείμενα @@ -226,7 +226,7 @@ Clear code - Clear code + Εκκαθάριση κώδικα @@ -236,68 +236,68 @@ Save... - Save... + Αποθήκευση... as Mesh - as Mesh + ως Πλέγμα Add OpenSCAD Element - Add OpenSCAD Element + Προσθήκη Στοιχείου OpenSCAD Open file - Open file + Άνοιγμα αρχείου OpenSCAD Files - OpenSCAD Files + Αρχεία OpenSCAD Save file - Save file + Αποθήκευση αρχείου Perform - Perform + Εκτέλεση Mesh Boolean - Mesh Boolean + Δημιουργία Πλέγματος με τη χρήση Λειτουργιών Boole Minkowski sum - Minkowski sum + Άθροισμα Minkowski OpenSCAD file contains both 2D and 3D shapes. That is not supported in this importer, all shapes must have the same dimensionality. - OpenSCAD file contains both 2D and 3D shapes. That is not supported in this importer, all shapes must have the same dimensionality. + Το αρχείο OpenSCAD περιέχει δύο σχήματα 2D και 3D. Αυτό δεν υποστηρίζεται σε αυτόν τον εισαγωγέα, όλα τα σχήματα πρέπει να έχουν την ίδια διάσταση. Error: either all shapes must be 2D or all shapes must be 3D - Error: either all shapes must be 2D or all shapes must be 3D + Σφάλμα: όλα τα σχήματα πρέπει να είναι 2D είτε 3D Unsupported Function - Unsupported Function + Μη υποστηριζόμενη λειτουργία @@ -311,12 +311,12 @@ Explode Group - Explode Group + Ομάδα Κατακερματισμού Remove fusion, apply placement to children, and color randomly - Remove fusion, apply placement to children, and color randomly + Αναίρεση συγχώνευσης, εφαρμογή τοποθέτησης στα θυγατρικά στοιχεία, και τυχαίος χρωματισμός @@ -324,12 +324,12 @@ Color Shapes - Color Shapes + Χρωματισμός Σχημάτων Color Shapes by validity and type - Color Shapes by validity and type + Χρωματισμός Σχημάτων με βάση την εγκυρότητα και τον τύπο τους @@ -337,7 +337,7 @@ Convert Edges To Faces - Convert Edges To Faces + Μετατροπή Ακμών σε Όψεις @@ -345,12 +345,12 @@ Refine Shape Feature - Refine Shape Feature + Χαρακτηριστικό Τελειοποίησης Σχήματος Create Refine Shape Feature - Create Refine Shape Feature + Δημιουργία Χαρακτηριστικού Τελειοποίησης Σχήματος @@ -358,12 +358,12 @@ Mirror Mesh Feature... - Mirror Mesh Feature... + Χαρακτηριστικό πλέγματος καθρέφτη... Create Mirror Mesh Feature - Create Mirror Mesh Feature + Δημιουργία Χαρακτηριστικού Καθρέφτη Πλέγματος @@ -371,12 +371,12 @@ Scale Mesh Feature... - Scale Mesh Feature... + Αλλαγή Μεγέθους Χαρακτηριστικού Πλέγματος... Create Scale Mesh Feature - Create Scale Mesh Feature + Δημιουργία Κλίμακας Χαρακτηριστικού Πλέγματος @@ -384,12 +384,12 @@ Resize Mesh Feature... - Resize Mesh Feature... + Αλλαγή Μεγέθους Χαρακτηριστικού Πλέγματος... Create Resize Mesh Feature - Create Resize Mesh Feature + Δημιουργία Χαρακτηριστικού Καθρέφτη Πλέγματος @@ -397,12 +397,12 @@ Increase Tolerance Feature - Increase Tolerance Feature + Αύξησης Ανοχής Create Feature that allows increasing the tolerance - Create Feature that allows increasing the tolerance + Δημιουργήστε χαρακτηριστικό που επιτρέπει την αύξηση της ανοχής @@ -410,12 +410,12 @@ Expand Placements - Expand Placements + Επέκταση Τοποθετήσεων Expand all placements downwards in the Tree view - Expand all placements downwards in the Tree view + Ανάπτυξη όλων των τοποθετήσεων προς τα κάτω στην προβολή Δέντρου @@ -423,12 +423,13 @@ Replace Object - Replace Object + Αντικατάσταση Αντικειμένου Replace an object in the Tree view. Please select old, new, and parent object - Replace an object in the Tree view. Please select old, new, and parent object + Αντικαταστήστε ένα αντικείμενο στην προβολή δέντρου. Επιλέξτε παλιό, νέο, +και το μητρικό αντικείμενο @@ -436,12 +437,12 @@ Remove Objects and their Children - Remove Objects and their Children + Αφαιρέστε Αντικείμενα και τα Θυγατρικά τους Στοιχεία Removes the selected objects and all children that are not referenced from other objects - Removes the selected objects and all children that are not referenced from other objects + Αφαιρεί τα επιλεγμένα αντικείμενα και όλα τα θυγατρικά στοιχεία που δεν αναφέρονται από άλλα αντικείμενα @@ -449,12 +450,12 @@ Add OpenSCAD Element... - Add OpenSCAD Element... + Προσθήκη στοιχείου OpenSCAD... Add an OpenSCAD element by entering OpenSCAD code and executing the OpenSCAD binary - Add an OpenSCAD element by entering OpenSCAD code and executing the OpenSCAD binary + Προσθέστε ένα στοιχείο OpenSCAD εισάγοντας κώδικα OpenSCAD και εκτελώντας το OpenSCAD @@ -462,12 +463,12 @@ Mesh Boolean... - Mesh Boolean... + Δημιουργία Πλέγματος με τη χρήση Λειτουργιών Boole... Export objects as meshes and use OpenSCAD to perform a boolean operation - Export objects as meshes and use OpenSCAD to perform a boolean operation + Εξαγάγετε αντικείμενα ως πλέγματα και χρησιμοποιήστε το OpenSCAD για να εκτελέσετε μια λειτουργία Boolean @@ -480,7 +481,7 @@ Use OpenSCAD to create a hull - Use OpenSCAD to create a hull + Χρησιμοποιήστε το OpenSCAD για να δημιουργήσετε ένα κύτος @@ -488,12 +489,12 @@ OpenSCAD Tools - OpenSCAD Tools + Εργαλεία OpenSCAD Frequently-used Part WB tools - Frequently-used Part WB tools + Συχνά χρησιμοποιούμενα εργαλεία μέρος WB @@ -501,12 +502,12 @@ Minkowski sum - Minkowski sum + Άθροισμα Minkowski Use OpenSCAD to create a Minkowski sum - Use OpenSCAD to create a Minkowski sum + Χρησιμοποιήστε το OpenSCAD για να δημιουργήσετε ένα ποσό Minkowski diff --git a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.qm b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.qm index 7296628f8e..0d23c72600 100644 Binary files a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.qm and b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.qm differ diff --git a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.ts b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.ts index 7fc73b929d..087ca6b472 100644 --- a/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.ts +++ b/src/Mod/OpenSCAD/Resources/translations/OpenSCAD_ja.ts @@ -253,7 +253,7 @@ Open file - Open file + ファイルを開く @@ -264,7 +264,7 @@ Save file - Save file + ファイルを保存 diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index c4db9845ab..de78cddefe 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -66,6 +66,7 @@ #include "FeatureChamfer.h" #include "FeatureCompound.h" #include "FeatureExtrusion.h" +#include "FeatureScale.h" #include "FeatureFace.h" #include "FeatureFillet.h" #include "FeatureGeometrySet.h" @@ -440,6 +441,7 @@ PyMOD_INIT_FUNC(Part) Part::Compound ::init(); Part::Compound2 ::init(); Part::Extrusion ::init(); + Part::Scale ::init(); Part::Revolution ::init(); Part::Mirroring ::init(); Part::ImportStep ::init(); diff --git a/src/Mod/Part/App/CMakeLists.txt b/src/Mod/Part/App/CMakeLists.txt index 65dbd06f56..874ab6ccb0 100644 --- a/src/Mod/Part/App/CMakeLists.txt +++ b/src/Mod/Part/App/CMakeLists.txt @@ -10,7 +10,6 @@ endif(FREETYPE_FOUND) include_directories( ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}/src ${CMAKE_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} @@ -189,6 +188,8 @@ SET(Features_SRCS FeatureCompound.h FeatureExtrusion.cpp FeatureExtrusion.h + FeatureScale.cpp + FeatureScale.h FeatureFace.cpp FeatureFace.h FeatureFillet.cpp diff --git a/src/Mod/Part/App/FeatureScale.cpp b/src/Mod/Part/App/FeatureScale.cpp new file mode 100644 index 0000000000..d29e8342c1 --- /dev/null +++ b/src/Mod/Part/App/FeatureScale.cpp @@ -0,0 +1,162 @@ +/*************************************************************************** + * Copyright (c) 2023 Wanderer Fan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#include "PreCompiled.h" +#ifndef _PreComp_ +#include +#include +#include +#include +#include +#include +#include +#endif + +#include + +#include "FeatureScale.h" + +using namespace Part; + +PROPERTY_SOURCE(Part::Scale, Part::Feature) + +Scale::Scale() +{ + ADD_PROPERTY_TYPE(Base, (nullptr), "Scale", App::Prop_None, "Shape to scale"); + ADD_PROPERTY_TYPE(Uniform, (true), "Scale", App::Prop_None, "If true, scale equally in all directions"); + ADD_PROPERTY_TYPE(UniformScale, (1.0), "Scale", App::Prop_None, "Uniform scale factor - 1.0 means no scaling"); + ADD_PROPERTY_TYPE(XScale, (1.0), "Scale", App::Prop_None, "Scale factor in X direction - 1.0 means no scaling"); + ADD_PROPERTY_TYPE(YScale, (1.0), "Scale", App::Prop_None, "Scale factor in Y direction - 1.0 means no scaling"); + ADD_PROPERTY_TYPE(ZScale, (1.0), "Scale", App::Prop_None, "Scale factor in Z direction - 1.0 means no scaling"); +} + +short Scale::mustExecute() const +{ + if (Base.isTouched() || + Uniform.isTouched() || + UniformScale.isTouched() || + XScale.isTouched() || + YScale.isTouched() || + ZScale.isTouched()) { + return 1; + } + return 0; +} + +Scale::ScaleParameters Scale::computeFinalParameters() +{ + Scale::ScaleParameters result; + result.uniform = Uniform.getValue(); + result.uniformScale = UniformScale.getValue(); + result.XScale = XScale.getValue(); + result.YScale = YScale.getValue(); + result.ZScale = ZScale.getValue(); + + return result; +} + +TopoShape Scale::scaleShape(const TopoShape& source, const Scale::ScaleParameters& params) +{ + TopoShape result; + + if (params.uniform) { + result = uniformScale(source, params.uniformScale); + return result; + } + + return nonuniformScale(source, params); +} + +TopoShape Scale::uniformScale(const TopoShape& source, const double& factor) +{ +// Base::Console().Message("FS::uniformScale()\n"); + TopoDS_Shape transShape; + TopoShape transTopo; + try { + gp_Trsf scaleTransform; + scaleTransform.SetScale(gp_Pnt(0, 0, 0), factor); + + BRepBuilderAPI_Transform mkTrf(source.getShape(), scaleTransform); + transShape = mkTrf.Shape(); + } + catch (...) { + return transTopo; + } + transTopo.setShape(transShape); + return transTopo; +} + +TopoShape Scale::nonuniformScale(const TopoShape& source, const Scale::ScaleParameters& params) +{ +// Base::Console().Message("FS::nonuniformScale()\n"); + Base::Matrix4D matScale; + matScale.scale(params.XScale, params.YScale, params.ZScale); + + // copy the FreeCAD matrix cell values to an OCC matrix + gp_GTrsf mat; + mat.SetValue(1,1,matScale[0][0]); + mat.SetValue(2,1,matScale[1][0]); + mat.SetValue(3,1,matScale[2][0]); + mat.SetValue(1,2,matScale[0][1]); + mat.SetValue(2,2,matScale[1][1]); + mat.SetValue(3,2,matScale[2][1]); + mat.SetValue(1,3,matScale[0][2]); + mat.SetValue(2,3,matScale[1][2]); + mat.SetValue(3,3,matScale[2][2]); + mat.SetValue(1,4,matScale[0][3]); + mat.SetValue(2,4,matScale[1][3]); + mat.SetValue(3,4,matScale[2][3]); + + // this copy step seems to eliminate Part.OCCError: gp_GTrsf::Trsf() - non-orthogonal GTrsf + // which may to be related to the tessellation of the input shape. See Github issue #9651 + // for more detail. + BRepBuilderAPI_Copy copier(source.getShape()); + TopoShape transTopo; + try { + BRepBuilderAPI_GTransform mkTrf(copier.Shape(), mat, true); + transTopo.setShape(mkTrf.Shape()); + } + catch (...) { + Base::Console().Warning("FeatureScale failed on nonuniform scale\n"); + return transTopo; + } + return transTopo; +} + +App::DocumentObjectExecReturn* Scale::execute() +{ +// Base::Console().Message("FS::execute()\n"); + App::DocumentObject* link = Base.getValue(); + if (!link) + return new App::DocumentObjectExecReturn("No object linked"); + + try { + Scale::ScaleParameters params = computeFinalParameters(); + TopoShape result = scaleShape(Feature::getShape(link), params); + this->Shape.setValue(result); + return App::DocumentObject::StdReturn; + } + catch (Standard_Failure& e) { + return new App::DocumentObjectExecReturn(e.GetMessageString()); + } +} + diff --git a/src/Mod/Part/App/FeatureScale.h b/src/Mod/Part/App/FeatureScale.h new file mode 100644 index 0000000000..bf0a547fa4 --- /dev/null +++ b/src/Mod/Part/App/FeatureScale.h @@ -0,0 +1,89 @@ +/*************************************************************************** + * Copyright (c) 2023 Wanderer Fan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#ifndef PART_FEATURESCALE_H +#define PART_FEATURESCALE_H + +#include +#include + +#include "FaceMakerCheese.h" +#include "PartFeature.h" + + +namespace Part +{ + +class PartExport Scale : public Part::Feature +{ + PROPERTY_HEADER_WITH_OVERRIDE(Part::Scale); + +public: + Scale(); + + App::PropertyLink Base; + App::PropertyBool Uniform; + App::PropertyFloat UniformScale; + App::PropertyFloat XScale; + App::PropertyFloat YScale; + App::PropertyFloat ZScale; + + /** + * @brief The ScaleParameters struct is supposed to be filled with final + * scale parameters and be passed to scaleShape. + */ + struct ScaleParameters { + bool uniform{true}; + double uniformScale{1.0}; + double XScale{1.0}; + double YScale{1.0}; + double ZScale{1.0}; + }; + + /** @name methods override feature */ + //@{ + /// recalculate the feature + App::DocumentObjectExecReturn *execute() override; + short mustExecute() const override; + /// returns the type name of the view provider + const char* getViewProviderName() const override { + return "PartGui::ViewProviderScale"; + } + //@} + Scale::ScaleParameters computeFinalParameters(); + + /** + * @brief scaleShape powers the extrusion feature. + * @param source: the shape to be scaled + * @param params: scale parameters + * @return result of scaling + */ + static TopoShape scaleShape(const TopoShape& source, const ScaleParameters& params); + static TopoShape uniformScale(const TopoShape& source, const double& factor); + static TopoShape nonuniformScale(const TopoShape& source, const Scale::ScaleParameters& params); +}; + +} //namespace Part + + +#endif // PART_FEATURESCALE_H + diff --git a/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp b/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp index 1f473eef0e..5d6b574b62 100644 --- a/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp +++ b/src/Mod/Part/App/Geom2d/BSplineCurve2dPyImp.cpp @@ -742,11 +742,11 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds) "ParamType", "Parameters", "LengthWeight", "CurvatureWeight", "TorsionWeight", nullptr}; - if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|isdisOddd",kwds_interp, - &obj, °Max, - &continuity, &tol3d, °Min, - &parType, &par, - &weight1, &weight2, &weight3)) { + if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|isdisOddd",kwds_interp, + &obj, °Max, + &continuity, &tol3d, °Min, + &parType, &par, + &weight1, &weight2, &weight3)) { return nullptr; } @@ -920,11 +920,11 @@ PyObject* BSplineCurve2dPy::interpolate(PyObject *args, PyObject *kwds) "FinalTangent", "Tangents", "TangentFlags", "Parameters", nullptr}; - if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|O!dO!O!OOO",kwds_interp, - &obj, &PyBool_Type, &periodic, &tol3d, - Base::Vector2dPy::type_object(), &t1, - Base::Vector2dPy::type_object(), &t2, - &ts, &fl, &par)) { + if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O|O!dO!O!OOO",kwds_interp, + &obj, &PyBool_Type, &periodic, &tol3d, + Base::Vector2dPy::type_object(), &t1, + Base::Vector2dPy::type_object(), &t2, + &ts, &fl, &par)) { return nullptr; } diff --git a/src/Mod/Part/App/GeometryCurvePyImp.cpp b/src/Mod/Part/App/GeometryCurvePyImp.cpp index edfb593d48..ba3f1e8696 100644 --- a/src/Mod/Part/App/GeometryCurvePyImp.cpp +++ b/src/Mod/Part/App/GeometryCurvePyImp.cpp @@ -562,8 +562,8 @@ PyObject* GeometryCurvePy::projectPoint(PyObject *args, PyObject* kwds) PyObject *v; const char *meth = "NearestPoint"; static const std::array kwlist{"Point", "Method", nullptr}; - if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|s", kwlist, - &Base::VectorPy::Type, &v, &meth)) { + if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|s", kwlist, + &Base::VectorPy::Type, &v, &meth)) { return nullptr; } diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 8705cc50d3..e6e63a0840 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -1325,7 +1325,7 @@ unsigned int TopoShape::getMemSize () const if (shape.IsNull()) continue; - // add the size of the underlying geomtric data + // add the size of the underlying geometric data Handle(TopoDS_TShape) tshape = shape.TShape(); memsize += tshape->DynamicType()->Size(); diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index 6077cc884f..fbaef82d4b 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -61,6 +61,7 @@ #include "ViewProviderEllipseParametric.h" #include "ViewProviderExt.h" #include "ViewProviderExtrusion.h" +#include "ViewProviderScale.h" #include "ViewProviderHelixParametric.h" #include "ViewProviderPrimitive.h" #include "ViewProviderPython.h" @@ -171,6 +172,7 @@ PyMOD_INIT_FUNC(PartGui) PartGui::ViewProviderImport ::init(); PartGui::ViewProviderCurveNet ::init(); PartGui::ViewProviderExtrusion ::init(); + PartGui::ViewProviderScale ::init(); PartGui::ViewProvider2DObject ::init(); PartGui::ViewProvider2DObjectPython ::init(); PartGui::ViewProvider2DObjectGrid ::init(); diff --git a/src/Mod/Part/Gui/CMakeLists.txt b/src/Mod/Part/Gui/CMakeLists.txt index 9167357d17..75c3206929 100644 --- a/src/Mod/Part/Gui/CMakeLists.txt +++ b/src/Mod/Part/Gui/CMakeLists.txt @@ -49,6 +49,7 @@ set(PartGui_UIC_SRCS DlgExportStep.ui DlgExportHeaderStep.ui DlgExtrusion.ui + DlgScale.ui DlgImportStep.ui DlgFilletEdges.ui DlgImportExportIges.ui @@ -101,6 +102,9 @@ SET(PartGui_SRCS DlgExtrusion.cpp DlgExtrusion.h DlgExtrusion.ui + DlgScale.cpp + DlgScale.h + DlgScale.ui DlgFilletEdges.cpp DlgFilletEdges.h DlgFilletEdges.ui @@ -204,6 +208,8 @@ SET(PartGui_SRCS ViewProviderImport.h ViewProviderExtrusion.cpp ViewProviderExtrusion.h + ViewProviderScale.cpp + ViewProviderScale.h ViewProvider2DObject.cpp ViewProvider2DObject.h ViewProviderMirror.cpp diff --git a/src/Mod/Part/Gui/Command.cpp b/src/Mod/Part/Gui/Command.cpp index 128215678e..4b378d9748 100644 --- a/src/Mod/Part/Gui/Command.cpp +++ b/src/Mod/Part/Gui/Command.cpp @@ -55,6 +55,7 @@ #include "CrossSections.h" #include "DlgBooleanOperation.h" #include "DlgExtrusion.h" +#include "DlgScale.h" #include "DlgFilletEdges.h" #include "DlgPrimitives.h" #include "DlgProjectionOnSurface.h" @@ -1293,6 +1294,35 @@ bool CmdPartExtrude::isActive() return (hasActiveDocument() && !Gui::Control().activeDialog()); } +//=========================================================================== +// Part_Scale +//=========================================================================== +DEF_STD_CMD_A(CmdPartScale) + +CmdPartScale::CmdPartScale() + :Command("Part_Scale") +{ + sAppModule = "Part"; + sGroup = QT_TR_NOOP("Part"); + sMenuText = QT_TR_NOOP("Scale..."); + sToolTipText = QT_TR_NOOP("Scale a selected shape"); + sWhatsThis = "Part_Scale"; + sStatusTip = sToolTipText; + sPixmap = "Part_Scale"; +} + +void CmdPartScale::activated(int iMsg) +{ + Q_UNUSED(iMsg); + + Gui::Control().showDialog(new PartGui::TaskScale()); +} + +bool CmdPartScale::isActive() +{ + return (hasActiveDocument() && !Gui::Control().activeDialog()); +} + //=========================================================================== // Part_MakeFace //=========================================================================== @@ -2424,6 +2454,7 @@ void CreatePartCommands() rcCmdMgr.addCommand(new CmdPartReverseShape()); rcCmdMgr.addCommand(new CmdPartBoolean()); rcCmdMgr.addCommand(new CmdPartExtrude()); + rcCmdMgr.addCommand(new CmdPartScale()); rcCmdMgr.addCommand(new CmdPartMakeFace()); rcCmdMgr.addCommand(new CmdPartMirror()); rcCmdMgr.addCommand(new CmdPartRevolve()); diff --git a/src/Mod/Part/Gui/DlgScale.cpp b/src/Mod/Part/Gui/DlgScale.cpp new file mode 100644 index 0000000000..3666740351 --- /dev/null +++ b/src/Mod/Part/Gui/DlgScale.cpp @@ -0,0 +1,363 @@ +/*************************************************************************** + * Copyright (c) 2023 Wanderer Fan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#include "PreCompiled.h" +#ifndef _PreComp_ +# include +# include +# include +# include +# include +# include +# include +# include +# include +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ui_DlgScale.h" +#include "DlgScale.h" + + +FC_LOG_LEVEL_INIT("Part",true,true) + +using namespace PartGui; + +DlgScale::DlgScale(QWidget* parent, Qt::WindowFlags fl) + : QDialog(parent, fl), ui(new Ui_DlgScale) +{ + ui->setupUi(this); + setupConnections(); + + ui->dsbUniformScale->setDecimals(Base::UnitsApi::getDecimals()); + ui->dsbXScale->setDecimals(Base::UnitsApi::getDecimals()); + ui->dsbYScale->setDecimals(Base::UnitsApi::getDecimals()); + ui->dsbZScale->setDecimals(Base::UnitsApi::getDecimals()); + findShapes(); + + // this will mark as selected all the items in treeWidget that are selected in the document + Gui::ItemViewSelection sel(ui->treeWidget); + sel.applyFrom(Gui::Selection().getObjectsOfType(Part::Feature::getClassTypeId())); + sel.applyFrom(Gui::Selection().getObjectsOfType(App::Link::getClassTypeId())); + sel.applyFrom(Gui::Selection().getObjectsOfType(App::Part::getClassTypeId())); +} + +void DlgScale::setupConnections() +{ + connect(ui->rbUniform, &QRadioButton::toggled, + this, &DlgScale::onUniformScaleToggled); +} + +void DlgScale::changeEvent(QEvent *e) +{ + if (e->type() == QEvent::LanguageChange) { + ui->retranslateUi(this); + } + QDialog::changeEvent(e); +} + +void DlgScale::onUniformScaleToggled(bool state) +{ +// Base::Console().Message("DS::onUniformScaleToggled()\n"); + if (state) { + // this is uniform scaling, so hide the non-uniform input fields + ui->dsbUniformScale->setEnabled(true); + ui->dsbXScale->setEnabled(false); + ui->dsbYScale->setEnabled(false); + ui->dsbZScale->setEnabled(false); + } else { + // this is non-uniform scaling, so hide the uniform input fields + ui->dsbUniformScale->setEnabled(false); + ui->dsbXScale->setEnabled(true); + ui->dsbYScale->setEnabled(true); + ui->dsbZScale->setEnabled(true); + } +} + +//! find all the scalable objects in the active document and load them into the +//! list widget +void DlgScale::findShapes() +{ +// Base::Console().Message("DS::findShapes()\n"); + App::Document* activeDoc = App::GetApplication().getActiveDocument(); + if (!activeDoc) + return; + Gui::Document* activeGui = Gui::Application::Instance->getDocument(activeDoc); + m_document = activeDoc->getName(); + m_label = activeDoc->Label.getValue(); + + std::vector objs = activeDoc->getObjectsOfType(); + + for (auto obj : objs) { + Part::TopoShape topoShape = Part::Feature::getTopoShape(obj); + if (topoShape.isNull()) { + continue; + } + TopoDS_Shape shape = topoShape.getShape(); + if (shape.IsNull()) continue; + if (canScale(shape)) { + QTreeWidgetItem* item = new QTreeWidgetItem(ui->treeWidget); + item->setText(0, QString::fromUtf8(obj->Label.getValue())); + item->setData(0, Qt::UserRole, QString::fromLatin1(obj->getNameInDocument())); + Gui::ViewProvider* vp = activeGui->getViewProvider(obj); + if (vp) + item->setIcon(0, vp->getIcon()); + } + } +} + +//! return true if shape can be scaled. +bool DlgScale::canScale(const TopoDS_Shape& shape) const +{ + if (shape.IsNull()) { + return false; + } + // if the shape is a solid or a compound containing shapes, then we can scale it + TopAbs_ShapeEnum type = shape.ShapeType(); + + if (type == TopAbs_VERTEX) { + return false; + } + + if (type == TopAbs_COMPOUND || + type == TopAbs_COMPSOLID) { + TopExp_Explorer xp; + xp.Init(shape, TopAbs_EDGE); + for ( ; xp.More() ; xp.Next()) { + // there is at least 1 edge inside the compound, so as long as it isn't null, + // we can scale this shape. We can stop looking as soon as we find a non-null + // edge. + if (!xp.Current().IsNull()) { + // found a non-null edge + return true; + } + } + // did not find a non-null shape + return false; + } else { + // not a Vertex, Compound or CompSolid, must be one of Edge, Wire, Face, Shell or + // Solid, all of which we can scale. + return true; + } + + return false; +} + +void DlgScale::accept() +{ +// Base::Console().Message("DS::accept()\n"); + try{ + apply(); + QDialog::accept(); + } catch (Base::AbortException&){ + Base::Console().Message("DS::accept - apply failed!\n"); + }; +} + +// create a FeatureScale for each scalable object +void DlgScale::apply() +{ +// Base::Console().Message("DS::apply()\n"); + try{ + if (!validate()) { + QMessageBox::critical(this, windowTitle(), + tr("No scalable shapes selected")); + return; + } + + Gui::WaitCursor wc; + App::Document* activeDoc = App::GetApplication().getDocument(m_document.c_str()); + if (!activeDoc) { + QMessageBox::critical(this, windowTitle(), + tr("The document '%1' doesn't exist.").arg(QString::fromUtf8(m_label.c_str()))); + return; + } + activeDoc->openTransaction("Scale"); + + Base::Reference hGrp = App::GetApplication().GetUserParameter() + .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part"); + bool addBaseName = hGrp->GetBool("AddBaseObjectName", false); + + std::vector objects = this->getShapesToScale(); + for (App::DocumentObject* sourceObj: objects) { + assert(sourceObj); + + if (Part::Feature::getTopoShape(sourceObj).isNull()){ + FC_ERR("Object " << sourceObj->getFullName() + << " is not Part object (has no OCC shape). Can't scale it."); + continue; + } + + std::string name; + name = sourceObj->getDocument()->getUniqueObjectName("Scale").c_str(); + if (addBaseName) { + //FIXME: implement + //QString baseName = QString::fromLatin1("Scale_%1").arg(sourceObjectName); + //label = QString::fromLatin1("%1_Scale").arg((*it)->text(0)); + } + + FCMD_OBJ_DOC_CMD(sourceObj,"addObject('Part::Scale','" << name << "')"); + auto newObj = sourceObj->getDocument()->getObject(name.c_str()); + + this->writeParametersToFeature(*newObj, sourceObj); + + Gui::Command::copyVisual(newObj, "ShapeColor", sourceObj); + Gui::Command::copyVisual(newObj, "LineColor", sourceObj); + Gui::Command::copyVisual(newObj, "PointColor", sourceObj); + + FCMD_OBJ_HIDE(sourceObj); + } + + activeDoc->commitTransaction(); + Gui::Command::updateActive(); + } + catch (Base::AbortException&){ + throw; + } + catch (Base::Exception &err){ + QMessageBox::critical(this, + windowTitle(), + tr("Creating Scale failed.\n%1") + .arg(QCoreApplication::translate("Exception", err.what()))); + return; + } + catch(...) { + QMessageBox::critical(this, windowTitle(), + tr("Creating Scale failed.\n%1").arg(QString::fromUtf8("Unknown error"))); + return; + } +} + +void DlgScale::reject() +{ + QDialog::reject(); +} + +//! retrieve the document objects associated with the selected items in the list +//! widget +std::vector DlgScale::getShapesToScale() const +{ +// Base::Console().Message("DS::getShapesToScale()\n"); + QList items = ui->treeWidget->selectedItems(); + App::Document* doc = App::GetApplication().getDocument(m_document.c_str()); + if (!doc) + throw Base::RuntimeError("Document lost"); + + std::vector objects; + for (auto item : items) { + App::DocumentObject* obj = doc->getObject(item->data(0, Qt::UserRole).toString().toLatin1()); + if (!obj) + throw Base::RuntimeError("Object not found"); + objects.push_back(obj); + } + return objects; +} + +//! return true if at least one item in the list widget corresponds to an +//! available document object in the document +bool DlgScale::validate() +{ + QList items = ui->treeWidget->selectedItems(); + App::Document* doc = App::GetApplication().getDocument(m_document.c_str()); + if (!doc) + throw Base::RuntimeError("Document lost"); + + std::vector objects; + for (auto item : items) { + App::DocumentObject* obj = doc->getObject(item->data(0, Qt::UserRole).toString().toLatin1()); + if (!obj) + throw Base::RuntimeError("Object not found"); + objects.push_back(obj); + } + return !objects.empty(); +} + +//! update a FeatureScale with the parameters from the UI +void DlgScale::writeParametersToFeature(App::DocumentObject &feature, App::DocumentObject* base) const +{ +// Base::Console().Message("DS::writeParametersToFeature()\n"); + Gui::Command::doCommand(Gui::Command::Doc,"f = App.getDocument('%s').getObject('%s')", feature.getDocument()->getName(), feature.getNameInDocument()); + + if (!base) { + return; + } + + Gui::Command::doCommand(Gui::Command::Doc,"f.Base = App.getDocument('%s').getObject('%s')", base->getDocument()->getName(), base->getNameInDocument()); + + Gui::Command::doCommand(Gui::Command::Doc,"f.Uniform = %s", ui->rbUniform->isChecked() ? "True" : "False"); + Gui::Command::doCommand(Gui::Command::Doc,"f.UniformScale = %.7f", ui->dsbUniformScale->value()); + Gui::Command::doCommand(Gui::Command::Doc,"f.XScale = %.7f", ui->dsbXScale->value()); + Gui::Command::doCommand(Gui::Command::Doc,"f.YScale = %.7f", ui->dsbYScale->value()); + Gui::Command::doCommand(Gui::Command::Doc,"f.ZScale = %.7f", ui->dsbZScale->value()); +} + +// --------------------------------------- + +TaskScale::TaskScale() +{ + widget = new DlgScale(); + taskbox = new Gui::TaskView::TaskBox( + Gui::BitmapFactory().pixmap("Part_Scale"), + widget->windowTitle(), true, nullptr); + taskbox->groupLayout()->addWidget(widget); + Content.push_back(taskbox); +} + +bool TaskScale::accept() +{ + widget->accept(); + return (widget->result() == QDialog::Accepted); +} + +bool TaskScale::reject() +{ + widget->reject(); + return true; +} + +void TaskScale::clicked(int id) +{ + if (id == QDialogButtonBox::Apply) { + try{ + widget->apply(); + } catch (Base::AbortException&){ + + }; + } +} + +#include "moc_DlgScale.cpp" diff --git a/src/Mod/Part/Gui/DlgScale.h b/src/Mod/Part/Gui/DlgScale.h new file mode 100644 index 0000000000..3dc1962c36 --- /dev/null +++ b/src/Mod/Part/Gui/DlgScale.h @@ -0,0 +1,94 @@ +/*************************************************************************** + * Copyright (c) 2023 Wanderer Fan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#ifndef PARTGUI_DLGSCALE_H +#define PARTGUI_DLGSCALE_H + +#include +#include + +#include +#include +#include + +class TopoDS_Shape; + +namespace PartGui { + +class Ui_DlgScale; +class DlgScale : public QDialog +{ + Q_OBJECT + +public: + DlgScale(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); + ~DlgScale() = default; + void accept() override; + void apply(); + void reject() override; + + std::vector getShapesToScale() const; + + bool validate(); + + void writeParametersToFeature(App::DocumentObject& feature, App::DocumentObject* base) const; + +protected: + void findShapes(); + bool canScale(const TopoDS_Shape&) const; + void changeEvent(QEvent *e) override; + +private: + void setupConnections(); + void onUniformScaleToggled(bool on); + +private: + ///returns link to any of selected source shapes. Throws if nothing is selected for scaling. + App::DocumentObject& getShapeToScale() const; + + std::unique_ptr ui; + std::string m_document, m_label; +}; + +class TaskScale : public Gui::TaskView::TaskDialog +{ + Q_OBJECT + +public: + TaskScale(); + +public: + bool accept() override; + bool reject() override; + void clicked(int) override; + + QDialogButtonBox::StandardButtons getStandardButtons() const override + { return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Close; } + +private: + DlgScale* widget; + Gui::TaskView::TaskBox* taskbox; +}; + +} // namespace PartGui + +#endif // PARTGUI_DLGSCALE_H diff --git a/src/Mod/Part/Gui/DlgScale.ui b/src/Mod/Part/Gui/DlgScale.ui new file mode 100644 index 0000000000..b32e9d0988 --- /dev/null +++ b/src/Mod/Part/Gui/DlgScale.ui @@ -0,0 +1,231 @@ + + + PartGui::DlgScale + + + + 0 + 0 + 319 + 360 + + + + Scale + + + + + + + + X Factor + + + + + + + Factor + + + + + + + false + + + + 0 + 0 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4 + + + -2147480000.000000000000000 + + + 2147480000.000000000000000 + + + 1.000000000000000 + + + + + + + Z Factor + + + + + + + Scale the object by a single factor in all directions. + + + Uniform Scaling + + + true + + + + + + + false + + + + 0 + 0 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4 + + + -2147480000.000000000000000 + + + 2147480000.000000000000000 + + + 1.000000000000000 + + + + + + + Y Factor + + + + + + + Specify a different scale factor for each cardinal direction. + + + Non-Uniform Scaling + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 4 + + + -2147480000.000000000000000 + + + 2147480000.000000000000000 + + + 1.000000000000000 + + + + + + + false + + + + 0 + 0 + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + false + + + 4 + + + -2147480000.000000000000000 + + + 2147480000.000000000000000 + + + 1.000000000000000 + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + Select shape(s) that should be scaled + + + + Shape + + + + + + + + false + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + diff --git a/src/Mod/Part/Gui/Resources/Part.qrc b/src/Mod/Part/Gui/Resources/Part.qrc index 21ddc8ff45..8ac1e588c5 100644 --- a/src/Mod/Part/Gui/Resources/Part.qrc +++ b/src/Mod/Part/Gui/Resources/Part.qrc @@ -65,6 +65,7 @@ icons/tools/Part_ColorFace.svg icons/tools/Part_Element_Copy.svg icons/tools/Part_Extrude.svg + icons/tools/Part_Scale.svg icons/tools/Part_Fillet.svg icons/tools/Part_Loft.svg icons/tools/Part_MakeFace.svg diff --git a/src/Mod/Part/Gui/Resources/icons/tools/Part_Scale.svg b/src/Mod/Part/Gui/Resources/icons/tools/Part_Scale.svg new file mode 100644 index 0000000000..d0d4070403 --- /dev/null +++ b/src/Mod/Part/Gui/Resources/icons/tools/Part_Scale.svg @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Mon Oct 10 13:44:52 2011 +0000 + + + [wmayer] + + + + + FreeCAD LGPL2+ + + + + + FreeCAD + + + FreeCAD/src/Mod/Draft/Resources/icons/Draft_Scale.svg + http://www.freecad.org/wiki/index.php?title=Artwork + + + [agryson] Alexander Gryson + + + + + square + arrow + dotted line + + + + A small square in the bottom left corner of a large dotted box with an arrow pointing from the top left corner of the inner box to the top left corner of the outer box + + + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part.ts b/src/Mod/Part/Gui/Resources/translations/Part.ts index 036347af48..7c5e37e36a 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part - - - + + + Box selection @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part - + Check Geometry - + Analyzes Geometry For Errors @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part - + Color per face - + Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part - + Measure Angular - + Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part - + Clear All - + Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part - + Measure Linear - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1257,17 +1257,17 @@ between two vertices of them. CmdMeasureRefresh - + Part - + Refresh - + Recalculate the dimensions if the measured points have moved. @@ -1276,17 +1276,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part - + Toggle 3D - + Toggle on and off all direct dimensions, including angular. @@ -1295,17 +1295,17 @@ including angular. CmdMeasureToggleAll - + Part - + Toggle All - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. @@ -1314,17 +1314,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part - + Toggle Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1334,17 +1334,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part - + Boolean... - + Run a boolean operation with two shapes selected @@ -1372,17 +1372,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part - + Box fix 1 - + Create a box solid without dialog @@ -1390,17 +1390,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part - + Box fix 2 - + Create a box solid without dialog @@ -1408,17 +1408,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part - + Shape builder... - + Advanced utility to create shapes @@ -1426,17 +1426,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part - + Chamfer... - + Chamfer the selected edges of a shape @@ -1444,17 +1444,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part - + Intersection - + Make an intersection of two shapes @@ -1462,17 +1462,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part - + Compound tools - + Compound tools: working with lists of shapes. @@ -1480,17 +1480,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part - + Join objects... - + Join walled objects @@ -1498,17 +1498,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part - + Offset: - + Tools to offset shapes (construct parallel shapes) @@ -1516,17 +1516,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part - + Split objects... - + Shape splitting and Compsolid creation tools. @@ -1534,17 +1534,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part - + Make compound - + Make a compound of several shapes @@ -1572,17 +1572,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part - + Cross-sections... - + Cross-sections @@ -1590,17 +1590,17 @@ into its X, Y, and Z components. CmdPartCut - + Part - + Cut - + Make a cut of two shapes @@ -1664,17 +1664,17 @@ into its X, Y, and Z components. CmdPartExport - + Part - + Export CAD... - + Exports to a CAD file @@ -1682,17 +1682,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part - + Extrude... - + Extrude a selected sketch @@ -1700,17 +1700,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part - + Fillet... - + Fillet the selected edges of a shape @@ -1718,17 +1718,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part - + Union - + Make a union of several shapes @@ -1736,17 +1736,17 @@ into its X, Y, and Z components. CmdPartImport - + Part - + Import CAD... - + Imports a CAD file @@ -1754,17 +1754,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part - + Import curve network... - + Import a curve network @@ -1772,17 +1772,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part - + Loft... - + Utility to loft @@ -1790,17 +1790,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part - + Make face from wires - + Make face from set of wires (e.g. from a sketch) @@ -1808,17 +1808,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part - + Convert to solid - + Create solid from a shell or compound @@ -1826,17 +1826,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part - + Mirroring... - + Mirroring a selected shape @@ -1844,17 +1844,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part - + 3D Offset... - + Utility to offset in 3D @@ -1862,17 +1862,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part - + 2D Offset... - + Utility to offset planar shapes @@ -1880,17 +1880,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part - + Pick curve network - + Pick a curve network @@ -1916,17 +1916,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part - + Create primitives... - + Creation of parametrized geometric primitives @@ -1934,17 +1934,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part - + Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1973,17 +1973,17 @@ of projection. CmdPartReverseShape - + Part - + Reverse shapes - + Reverse orientation of shapes @@ -1991,17 +1991,17 @@ of projection. CmdPartRevolve - + Part - + Revolve... - + Revolve a selected shape @@ -2009,17 +2009,17 @@ of projection. CmdPartRuledSurface - + Part - + Create ruled surface - + Create a ruled surface from either two Edges or two wires @@ -2027,17 +2027,17 @@ of projection. CmdPartSection - + Part - + Section - + Make a section of two shapes @@ -2045,12 +2045,12 @@ of projection. CmdPartSectionCut - + Persistent section cut - + Creates a persistent section cut of visible part objects @@ -2132,17 +2132,17 @@ of projection. CmdPartSweep - + Part - + Sweep... - + Utility to sweep @@ -2150,27 +2150,27 @@ of projection. CmdPartThickness - + Part - + Thickness... - + Utility to apply a thickness - + Wrong selection - + Selected shape is not a solid @@ -2216,73 +2216,73 @@ of projection. Command - - + + Part Box Create - + Part Cut - + Common - + Fusion - + Compound - + Section - + Import Part - + Part Import Curve Net - + Reverse - + Make face - + Make Offset - + Make 2D Offset - + Make Thickness - + Create ruled surface @@ -2365,11 +2365,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - - Selection accepted @@ -5654,82 +5649,82 @@ in the 3D view for the sweep path. - + Part and Part Design workbench - - + + Part/Part Design - - + + Import-Export - - - - - - + + + + + + Wrong selection - - + + Select two shapes please. - - - - - Non-solids selected - - + Non-solids selected + + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. - + Select one shape or more, please. - + All CAD Files - + All Files - + You have to select either two edges or two wires. @@ -6688,4 +6683,97 @@ A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + + + + + X Factor + + + + + Factor + + + + + Z Factor + + + + + Scale the object by a single factor in all directions. + + + + + Uniform Scaling + + + + + Y Factor + + + + + Specify a different scale factor for each cardinal direction. + + + + + Non-Uniform Scaling + + + + + Select shape(s) that should be scaled + + + + + Shape + + + + + No scalable shapes selected + + + + + The document '%1' doesn't exist. + + + + + + Creating Scale failed. +%1 + + + + + CmdPartScale + + + Part + + + + + Scale... + + + + + Scale a selected shape + + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_be.ts b/src/Mod/Part/Gui/Resources/translations/Part_be.ts index 24f02f1c8b..b9943c8cf2 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_be.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_be.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Дэталь - - - + + + Box selection Вылучыць вобласць @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Дэталь - + Check Geometry Праверыць Геаметрыю - + Analyzes Geometry For Errors Даследуе геаметрыю на памылкі @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Дэталь - + Color per face Колер грані - + Set the color of each individual face of the selected object. Задаць колер кожнай асобнай грані абранага аб'екту. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Дэталь - + Measure Angular Вымярэнне вугла - + Measure the angle between two edges. Вымераць вугал паміж дзвюма рэбрамі. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Дэталь - + Clear All Ачысціць усё - + Clear all dimensions from the screen. Ачысціць усе вымярэнні з экрану. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Дэталь - + Measure Linear Вымярэнне лініі - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Дэталь - + Refresh Абнавіць - + Recalculate the dimensions if the measured points have moved. Пералічыце вымярэнні, @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Дэталь - + Toggle 3D Пераключыць трохмернае прадстаўленне - + Toggle on and off all direct dimensions, including angular. Уключае і выключае ўсе прамыя вымярэнні, у тым ліку вуглавыя. @@ -1298,17 +1298,17 @@ including angular. CmdMeasureToggleAll - + Part Дэталь - + Toggle All Пераключыць усё - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Уключае і выключае ўсе бачныя ў дадзены момант вымярэнні: @@ -1318,17 +1318,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Дэталь - + Toggle Delta Пераключыць рэжым дэльты - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1339,17 +1339,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Дэталь - + Boolean... Лагічная аперацыя... - + Run a boolean operation with two shapes selected Запусціць лагічную аперацыю з дзвюма абранымі фігурамі @@ -1377,17 +1377,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Дэталь - + Box fix 1 Выпраўленне паралелепіпеда 1 - + Create a box solid without dialog Стварыць суцэльны паралелепіпед без дыялогавага акна @@ -1395,17 +1395,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Дэталь - + Box fix 2 Выпраўленне паралелепіпеда 1 - + Create a box solid without dialog Стварыць суцэльны паралелепіпед без дыялогавага акна @@ -1413,17 +1413,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Дэталь - + Shape builder... Будаўнік фігур... - + Advanced utility to create shapes Пашыраныя службовыя інструменты для стварэння фігур @@ -1431,17 +1431,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Дэталь - + Chamfer... Фаска... - + Chamfer the selected edges of a shape Фаска на абраных рэбрах фігуры @@ -1449,17 +1449,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Дэталь - + Intersection Перасячэнне - + Make an intersection of two shapes Зрабіць скрыжаванне дзвюх фігур @@ -1467,17 +1467,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Дэталь - + Compound tools Інструмент злучэння - + Compound tools: working with lists of shapes. Інструмент злучэння: праца з спісам фігур. @@ -1485,17 +1485,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Дэталь - + Join objects... Аб'яднаць аб'екты... - + Join walled objects Злучыць аб'екты сцяны @@ -1503,17 +1503,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Дэталь - + Offset: Зрушэнне: - + Tools to offset shapes (construct parallel shapes) Інструменты для зрушэння фігур (пабудовы паралельных фігур) @@ -1521,17 +1521,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Дэталь - + Split objects... Падзяліць аб'екты... - + Shape splitting and Compsolid creation tools. Інструменты для падзелу фігур і стварэння складаных цел. @@ -1539,17 +1539,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Дэталь - + Make compound Зрабіць злучэнне - + Make a compound of several shapes Зрабіць злучэнне з некалькіх фігур @@ -1577,17 +1577,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Дэталь - + Cross-sections... Папярочныя перасекі... - + Cross-sections Папярочныя перасекі @@ -1595,17 +1595,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Дэталь - + Cut Разрэзаць - + Make a cut of two shapes Зрабіце разрэз з дзвюх фігур @@ -1669,17 +1669,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Дэталь - + Export CAD... Экспартаваць у CAD... - + Exports to a CAD file Экспартаваць у файл CAD @@ -1687,17 +1687,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Дэталь - + Extrude... Выдушыць... - + Extrude a selected sketch Выдушыць абраны эскіз @@ -1705,17 +1705,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Дэталь - + Fillet... Акругленне... - + Fillet the selected edges of a shape Акругліць абраныя рэбры ў фігуры @@ -1723,17 +1723,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Дэталь - + Union Аб'яднанне - + Make a union of several shapes Зрабіць аб'яднанне некалькі фігур @@ -1741,17 +1741,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Дэталь - + Import CAD... Імпартаваць з CAD... - + Imports a CAD file Імпартаваць файл CAD @@ -1759,17 +1759,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Дэталь - + Import curve network... Імпартаваць сетку крывых... - + Import a curve network Імпартаваць сетку крывых @@ -1777,17 +1777,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Дэталь - + Loft... Профіль... - + Utility to loft Службовыя інструменты для профілю @@ -1795,17 +1795,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Дэталь - + Make face from wires Зрабіць грань з ломаных ліній - + Make face from set of wires (e.g. from a sketch) Зрабіць грань з набору ломаных ліній (напрыклад з эскізу) @@ -1813,17 +1813,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Дэталь - + Convert to solid Пераўтварыць у суцэльнае цела - + Create solid from a shell or compound Стварыць суцэльнае цела з абалонкі ці злучэння @@ -1831,17 +1831,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Дэталь - + Mirroring... Сіметрыя... - + Mirroring a selected shape Сіметрычнае пераўтварэнне абранай фігуры @@ -1849,17 +1849,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Дэталь - + 3D Offset... Трохмернае зрушэнне... - + Utility to offset in 3D Службовыя інструменты зрушэння ў трохмернай прасторы @@ -1867,17 +1867,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Дэталь - + 2D Offset... Дзвюхмернае зрушэнне... - + Utility to offset planar shapes Службовыя інструменты зрушэння плоскіх фігур @@ -1885,17 +1885,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Дэталь - + Pick curve network Выбар сеткі крывых - + Pick a curve network Выбар сеткі крывых @@ -1921,17 +1921,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Дэталь - + Create primitives... Стварыць першасныя целы... - + Creation of parametrized geometric primitives Стварэнне параметрызаваных геаметрычных першасных цел @@ -1939,17 +1939,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Дэталь - + Create projection on surface... Стварыць праекцыю на паверхні... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1981,17 +1981,17 @@ of projection. CmdPartReverseShape - + Part Дэталь - + Reverse shapes Перавярнуць фігуры - + Reverse orientation of shapes Адваротная арыентацыя фігур @@ -1999,17 +1999,17 @@ of projection. CmdPartRevolve - + Part Дэталь - + Revolve... Вярчэнне... - + Revolve a selected shape Вярчэнне абранай фігуры @@ -2017,17 +2017,17 @@ of projection. CmdPartRuledSurface - + Part Дэталь - + Create ruled surface Стварыць лінейную паверхню - + Create a ruled surface from either two Edges or two wires Стварыць лінейную паверхню з дзвюх рэбраў ці з дзвюх ломаных ліній @@ -2035,17 +2035,17 @@ of projection. CmdPartSection - + Part Дэталь - + Section Перасек - + Make a section of two shapes Зрабіць перасек з дзвюх фігур @@ -2053,12 +2053,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Сталы разрэз перасеку - + Creates a persistent section cut of visible part objects Стварыць сталы разрэз перасеку з аб'ектаў бачнай дэталі @@ -2140,17 +2140,17 @@ of projection. CmdPartSweep - + Part Дэталь - + Sweep... Выцягнуць... - + Utility to sweep Службовыя інструменты выцягвання па траекторыі @@ -2158,27 +2158,27 @@ of projection. CmdPartThickness - + Part Дэталь - + Thickness... Таўшчыня... - + Utility to apply a thickness Службовыя інструменты для надання таўшчыні - + Wrong selection Няправільны выбар - + Selected shape is not a solid Абраная фігура не суцэльная @@ -2224,73 +2224,73 @@ of projection. Command - - + + Part Box Create Стварэнне Дэталі навакольнага куба - + Part Cut Разрэзаць дэталь - + Common Перасек - + Fusion Зліццё - + Compound Злучэнне - + Section Перасек - + Import Part Імпартаваць дэталь - + Part Import Curve Net Імпартаваць у дэталь сетку крывых - + Reverse Перавярнуць - + Make face Зрабіць грань - + Make Offset Зрабіць зрушэнне - + Make 2D Offset Зрабіць дзвюхмернае зрушэнне - + Make Thickness Зрабіць таўшчыню - + Create ruled surface Стварыць лінейную паверхню @@ -2373,11 +2373,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Форма - Selection accepted @@ -5646,7 +5641,7 @@ in the 3D view for the sweep path. Input error - Input error + Памылка ўводу @@ -5703,83 +5698,83 @@ in the 3D view for the sweep path. Змяніць %1 - + Part and Part Design workbench Варштаты Дэталь і Праектаванне дэталі - - + + Part/Part Design Дэталь/Праектаванне дэталі - - + + Import-Export Імпарт-Экспарт - - - - - - + + + + + + Wrong selection Няправільны выбар - - + + Select two shapes please. Абярыце, калі ласка, дзве фігуры. - - - - - Non-solids selected - Абраны несуцэльныя целы - + Non-solids selected + Абраны несуцэльныя целы + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Выкарыстанне несуцэльных цел для лагічных аперацый можа прывесці да нечаканых вынікаў. Ці хочаце вы працягнуць? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Абярыце, калі ласка, дзве фігуры ці болей. Альбо абярыце адно злучэнне, якое змяшчае дзве ці болей фігуры, каб вылічыць агульнае паміж імі. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Абярыце, калі ласка, дзве фігуры ці болей. Альбо абярыце адно злучэнне, якое змяшчае дзве ці болей фігуры, каб аб'яднаць іх. - + Select one shape or more, please. Абярыце, калі ласка, адну фігуру ці болей. - + All CAD Files Усе файлы CAD - + All Files Усе файлы - + You have to select either two edges or two wires. Вы павінны абраць два рабра альбо дзве ломаныя лініі. @@ -6752,4 +6747,98 @@ A 'Compound Filter' can be used to extract the remaining pieces. Каб здабыць пакінутыя кавалачкі, можна ўжыць 'Фільтр злучаных фігур'. + + PartGui::DlgScale + + + Scale + Маштаб + + + + X Factor + X Factor + + + + Factor + Каэфіцыент + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Фігура + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Дэталь + + + + Scale... + Маштаб... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ca.ts b/src/Mod/Part/Gui/Resources/translations/Part_ca.ts index d0188d7906..8b2e75d29e 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ca.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ca.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Peça - - - + + + Box selection Quadre de selecció @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Peça - + Check Geometry Comprovar la geometria - + Analyzes Geometry For Errors Busca errors de geometria @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Peça - + Color per face Color per cara - + Set the color of each individual face of the selected object. Estableix el color de cada cara individual de l'objecte seleccionat. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Peça - + Measure Angular Mesura Angular - + Measure the angle between two edges. Mesura l'angle entre dues vores. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Peça - + Clear All Neteja Tot - + Clear all dimensions from the screen. Esborra totes les dimensions de la pantalla. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Peça - + Measure Linear Mesura Lineal - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ entre dos vèrtexs d'ells. CmdMeasureRefresh - + Part Peça - + Refresh Actualitza - + Recalculate the dimensions if the measured points have moved. Torna a calcular les dimensions @@ -1279,17 +1279,17 @@ si els punts mesurats s'han mogut. CmdMeasureToggle3d - + Part Peça - + Toggle 3D Alterna 3D - + Toggle on and off all direct dimensions, including angular. Activa i desactiva totes les dimensions directes, @@ -1299,17 +1299,17 @@ inclòs angular. CmdMeasureToggleAll - + Part Peça - + Toggle All Canviar tot - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Activa i desactiva totes les dimensions visibles actualment, @@ -1319,17 +1319,17 @@ directe, ortogonal i angular. CmdMeasureToggleDelta - + Part Peça - + Toggle Delta Cambia a Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ en els seus components X, Y i Z. CmdPartBoolean - + Part Peça - + Boolean... Booleà... - + Run a boolean operation with two shapes selected Fer operació booleana amb dues formes seleccionats @@ -1379,17 +1379,17 @@ en els seus components X, Y i Z. CmdPartBox2 - + Part Peça - + Box fix 1 Fixar quadre 1 - + Create a box solid without dialog Crea sòlid sense diàleg @@ -1397,17 +1397,17 @@ en els seus components X, Y i Z. CmdPartBox3 - + Part Peça - + Box fix 2 Fixar caixa 2 - + Create a box solid without dialog Crea sòlid sense diàleg @@ -1415,17 +1415,17 @@ en els seus components X, Y i Z. CmdPartBuilder - + Part Peça - + Shape builder... Construïr forma... - + Advanced utility to create shapes Utilitat avançada per crear formes @@ -1433,17 +1433,17 @@ en els seus components X, Y i Z. CmdPartChamfer - + Part Peça - + Chamfer... Xamfrà... - + Chamfer the selected edges of a shape Crea un xamfrà a les vores seleccionades @@ -1451,17 +1451,17 @@ en els seus components X, Y i Z. CmdPartCommon - + Part Peça - + Intersection Intersecció - + Make an intersection of two shapes Fer una intersecció de dues formes @@ -1469,17 +1469,17 @@ en els seus components X, Y i Z. CmdPartCompCompoundTools - + Part Peça - + Compound tools Eïnes compostes - + Compound tools: working with lists of shapes. Eines compostes: treballant amb llistes de formes. @@ -1487,17 +1487,17 @@ en els seus components X, Y i Z. CmdPartCompJoinFeatures - + Part Peça - + Join objects... Unir objectes... - + Join walled objects Unir-se als objectes @@ -1505,17 +1505,17 @@ en els seus components X, Y i Z. CmdPartCompOffset - + Part Peça - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Eines per compensar les formes (construir formes paral·leles) @@ -1523,17 +1523,17 @@ en els seus components X, Y i Z. CmdPartCompSplitFeatures - + Part Peça - + Split objects... Divisió d'objectes... - + Shape splitting and Compsolid creation tools. Eines de separació de formes i de creació de Compsolid. @@ -1541,17 +1541,17 @@ en els seus components X, Y i Z. CmdPartCompound - + Part Peça - + Make compound Fer composicio - + Make a compound of several shapes Unir diverses formes @@ -1579,17 +1579,17 @@ en els seus components X, Y i Z. CmdPartCrossSections - + Part Peça - + Cross-sections... Interseccions... - + Cross-sections Interseccions @@ -1597,17 +1597,17 @@ en els seus components X, Y i Z. CmdPartCut - + Part Peça - + Cut Talla - + Make a cut of two shapes Talla per fer dues formes @@ -1671,17 +1671,17 @@ en els seus components X, Y i Z. CmdPartExport - + Part Peça - + Export CAD... Exportar CAD... - + Exports to a CAD file Exporta a fitxer CAD @@ -1689,17 +1689,17 @@ en els seus components X, Y i Z. CmdPartExtrude - + Part Peça - + Extrude... Extrusió... - + Extrude a selected sketch Extrudeix el croquis seleccionat @@ -1707,17 +1707,17 @@ en els seus components X, Y i Z. CmdPartFillet - + Part Peça - + Fillet... Arrodoniment... - + Fillet the selected edges of a shape Arrodonir les arestes seleccionades @@ -1725,17 +1725,17 @@ en els seus components X, Y i Z. CmdPartFuse - + Part Peça - + Union Unió - + Make a union of several shapes Unir diverses formes @@ -1743,17 +1743,17 @@ en els seus components X, Y i Z. CmdPartImport - + Part Peça - + Import CAD... Importar CAD... - + Imports a CAD file Importa un fitxer CAD @@ -1761,17 +1761,17 @@ en els seus components X, Y i Z. CmdPartImportCurveNet - + Part Peça - + Import curve network... Importar xarxa de corbes... - + Import a curve network Importar una xarxa de corbes @@ -1779,17 +1779,17 @@ en els seus components X, Y i Z. CmdPartLoft - + Part Peça - + Loft... Loft. Recobriment... - + Utility to loft Utilitats de projecció @@ -1797,17 +1797,17 @@ en els seus components X, Y i Z. CmdPartMakeFace - + Part Peça - + Make face from wires Fer cara de malla - + Make face from set of wires (e.g. from a sketch) Crea una cara a partir d'un conjunt de filferro (p ex. d'un esbós) @@ -1815,17 +1815,17 @@ en els seus components X, Y i Z. CmdPartMakeSolid - + Part Peça - + Convert to solid Convertir a sòlid - + Create solid from a shell or compound Crea un sòlid a partir d'un entorn o compost @@ -1833,17 +1833,17 @@ en els seus components X, Y i Z. CmdPartMirror - + Part Peça - + Mirroring... Duplicant... - + Mirroring a selected shape Duplica Forma seleccionada @@ -1851,17 +1851,17 @@ en els seus components X, Y i Z. CmdPartOffset - + Part Peça - + 3D Offset... Offset 3D... - + Utility to offset in 3D Utilitat per a Offset ò separar en 3D @@ -1869,17 +1869,17 @@ en els seus components X, Y i Z. CmdPartOffset2D - + Part Peça - + 2D Offset... 2D Offset... ( Compensació)... - + Utility to offset planar shapes Utilitat per a separar les formes d'un pla @@ -1887,17 +1887,17 @@ en els seus components X, Y i Z. CmdPartPickCurveNet - + Part Peça - + Pick curve network Esculli xarxa de corbes - + Pick a curve network Trieu una xarxa de corbes @@ -1923,17 +1923,17 @@ en els seus components X, Y i Z. CmdPartPrimitives - + Part Peça - + Create primitives... Crea primitives... - + Creation of parametrized geometric primitives Crea primitives parametritzades @@ -1941,17 +1941,17 @@ en els seus components X, Y i Z. CmdPartProjectionOnSurface - + Part Peça - + Create projection on surface... Crea projecció a la superfície... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ de projecció. CmdPartReverseShape - + Part Peça - + Reverse shapes Formes inverses - + Reverse orientation of shapes Invertir Orientació formes @@ -2001,17 +2001,17 @@ de projecció. CmdPartRevolve - + Part Peça - + Revolve... Revolucionar... - + Revolve a selected shape Girar forma seleccionada @@ -2019,17 +2019,17 @@ de projecció. CmdPartRuledSurface - + Part Peça - + Create ruled surface Crea una superfície reglada - + Create a ruled surface from either two Edges or two wires Crear una superfície reglada ja sigui de dos vores o dos filferros @@ -2037,17 +2037,17 @@ de projecció. CmdPartSection - + Part Peça - + Section Secció - + Make a section of two shapes Fer una secció de dues formes @@ -2055,12 +2055,12 @@ de projecció. CmdPartSectionCut - + Persistent section cut Tall de secció persistent - + Creates a persistent section cut of visible part objects Crea un tall de secció persistent d'objectes de part visibles @@ -2142,17 +2142,17 @@ de projecció. CmdPartSweep - + Part Peça - + Sweep... Escombrat... - + Utility to sweep Utilitat per escombrar @@ -2160,27 +2160,27 @@ de projecció. CmdPartThickness - + Part Peça - + Thickness... Espessor... - + Utility to apply a thickness Utilitat per aplicar un gruix - + Wrong selection Selecció incorrecta - + Selected shape is not a solid La forma seleccionada no és un sòlid @@ -2226,73 +2226,73 @@ de projecció. Command - - + + Part Box Create Creació peça de caixa - + Part Cut Part de tall - + Common Comú - + Fusion Fusion - + Compound Composició - + Section Secció - + Import Part Importar Part - + Part Import Curve Net Importar Curva Net de Peça - + Reverse Revers - + Make face Fer cara - + Make Offset Desplassar, Ofsset - + Make 2D Offset Desplassar 2D - + Make Thickness Donar Gruix - + Create ruled surface Crea una superfície reglada @@ -2375,11 +2375,6 @@ de projecció. PartDesignGui::TaskDatumParameters - - - Form - Forma - Selection accepted @@ -5695,83 +5690,83 @@ in the 3D view for the sweep path. Editar %1 - + Part and Part Design workbench Banc de treball Peça i disseny de peces (Part i Part design) - - + + Part/Part Design Peça/Disseny de peces - - + + Import-Export Importació-exportació - - - - - - + + + + + + Wrong selection Selecció incorrecta - - + + Select two shapes please. Seleccioneu dos formes si vos plau. - - - - - Non-solids selected - S' han seleccionat objectes no sòlids - + Non-solids selected + S' han seleccionat objectes no sòlids + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Usar objectes no sòlids per operacions booleanes pot causar resultats inesperats. ¿Vols continuar? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Seleccionar dues formes o més, si us plau. O bé, seleccioneu un compost que conté dues o més formes de calcular comú entre. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Seleccionar dues formes o més, si us plau. O bé, seleccioneu un compost que conté dues o més formes per ser fusionats. - + Select one shape or more, please. Seleccioneu una forma o més, si us plau. - + All CAD Files Tots els arxius de CAD - + All Files Tots els fitxers - + You have to select either two edges or two wires. Heu de seleccionar dues vores o dos fils. @@ -6743,4 +6738,98 @@ Això significa que s'eliminaran els volums superposats de les formes. Es pot utilitzar un "Filtre compost" per extreure les peces restants. + + PartGui::DlgScale + + + Scale + Escala + + + + X Factor + X Factor + + + + Factor + Factor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Peça + + + + Scale... + Escala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_cs.ts b/src/Mod/Part/Gui/Resources/translations/Part_cs.ts index 72a2dc4bf5..2d3df98bcd 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_cs.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_cs.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Díl - - - + + + Box selection Okno výběru @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Díl - + Check Geometry Zkontrolovat geometrii - + Analyzes Geometry For Errors Analyzuje chyby geometrie @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Díl - + Color per face Barva podle povrchu - + Set the color of each individual face of the selected object. Nastavte barvu každé jednotlivé plochy vybraného objektu. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Díl - + Measure Angular Měření úhlu - + Measure the angle between two edges. Změřte úhel mezi dvěma hranami. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Díl - + Clear All Vyčistit vše - + Clear all dimensions from the screen. Vymažte všechny rozměry z obrazovky. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Díl - + Measure Linear Měření vzdálenosti - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ mezi jejich dvěma vrcholy. CmdMeasureRefresh - + Part Díl - + Refresh Aktualizovat - + Recalculate the dimensions if the measured points have moved. Přepočítejte rozměry @@ -1279,17 +1279,17 @@ jestli se měřené body posunuly. CmdMeasureToggle3d - + Part Díl - + Toggle 3D Přepnout 3D - + Toggle on and off all direct dimensions, including angular. Zapnout a vypnout všechny přímé dimenze, @@ -1299,17 +1299,17 @@ včetně úhlových. CmdMeasureToggleAll - + Part Díl - + Toggle All Přepnout vše - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Zapnout a vypnout všechny aktuálně viditelné rozměry, @@ -1319,17 +1319,17 @@ přímé, ortogonální a úhlové. CmdMeasureToggleDelta - + Part Díl - + Toggle Delta Přepnout rozdíl - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ na jeho složky X, Y a Z. CmdPartBoolean - + Part Díl - + Boolean... Booleovský... - + Run a boolean operation with two shapes selected Provede booleovskou operaci se dvěmi vybranými obrazci @@ -1379,17 +1379,17 @@ na jeho složky X, Y a Z. CmdPartBox2 - + Part Díl - + Box fix 1 Box fix 1 - + Create a box solid without dialog Vytvoř kvádrovité těleso bez dotazů @@ -1397,17 +1397,17 @@ na jeho složky X, Y a Z. CmdPartBox3 - + Part Díl - + Box fix 2 Box fix 2 - + Create a box solid without dialog Vytvoř kvádrovité těleso bez dotazů @@ -1415,17 +1415,17 @@ na jeho složky X, Y a Z. CmdPartBuilder - + Part Díl - + Shape builder... Tvůrce útvarů... - + Advanced utility to create shapes Rozšířené nástroje pro tvorbu útvarů @@ -1433,17 +1433,17 @@ na jeho složky X, Y a Z. CmdPartChamfer - + Part Díl - + Chamfer... Sražení... - + Chamfer the selected edges of a shape Srazí vybrané hrany útvaru @@ -1451,17 +1451,17 @@ na jeho složky X, Y a Z. CmdPartCommon - + Part Díl - + Intersection Průnik - + Make an intersection of two shapes Vytvoří průnik dvou útvarů @@ -1469,17 +1469,17 @@ na jeho složky X, Y a Z. CmdPartCompCompoundTools - + Part Díl - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Nástroje složeniny: práce se seznamem tvarů. @@ -1487,17 +1487,17 @@ na jeho složky X, Y a Z. CmdPartCompJoinFeatures - + Part Díl - + Join objects... Spojit objekty... - + Join walled objects Spojit stěnové objekty @@ -1505,17 +1505,17 @@ na jeho složky X, Y a Z. CmdPartCompOffset - + Part Díl - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Nástroje pro odsazení tvarů (vytvoří rovnobětné tvary) @@ -1523,17 +1523,17 @@ na jeho složky X, Y a Z. CmdPartCompSplitFeatures - + Part Díl - + Split objects... Rozdělit objekty... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ na jeho složky X, Y a Z. CmdPartCompound - + Part Díl - + Make compound Vytvoří celek - + Make a compound of several shapes Vytvoří celek několika tvarů @@ -1579,17 +1579,17 @@ na jeho složky X, Y a Z. CmdPartCrossSections - + Part Díl - + Cross-sections... Řezy... - + Cross-sections Řezy @@ -1597,17 +1597,17 @@ na jeho složky X, Y a Z. CmdPartCut - + Part Díl - + Cut Řezat - + Make a cut of two shapes Provede ořezání dvou útvarů @@ -1671,17 +1671,17 @@ na jeho složky X, Y a Z. CmdPartExport - + Part Díl - + Export CAD... Export CAD... - + Exports to a CAD file Exporty do CAD souboru @@ -1689,17 +1689,17 @@ na jeho složky X, Y a Z. CmdPartExtrude - + Part Díl - + Extrude... Vysunutí... - + Extrude a selected sketch Vysune vybraný náčrt @@ -1707,17 +1707,17 @@ na jeho složky X, Y a Z. CmdPartFillet - + Part Díl - + Fillet... Zaoblení... - + Fillet the selected edges of a shape Zaoblí vybrané hrany tvaru @@ -1725,17 +1725,17 @@ na jeho složky X, Y a Z. CmdPartFuse - + Part Díl - + Union Sjednocení - + Make a union of several shapes Provede sjednocení několika útvarů @@ -1743,17 +1743,17 @@ na jeho složky X, Y a Z. CmdPartImport - + Part Díl - + Import CAD... Import CAD... - + Imports a CAD file Import CAD souboru @@ -1761,17 +1761,17 @@ na jeho složky X, Y a Z. CmdPartImportCurveNet - + Part Díl - + Import curve network... Imort křivkové sítě... - + Import a curve network Imort křivkové sítě @@ -1779,17 +1779,17 @@ na jeho složky X, Y a Z. CmdPartLoft - + Part Díl - + Loft... Profilování... - + Utility to loft Nástroj profilování @@ -1797,17 +1797,17 @@ na jeho složky X, Y a Z. CmdPartMakeFace - + Part Díl - + Make face from wires Vytvořit plochu z drátů - + Make face from set of wires (e.g. from a sketch) Vytvořit plochu z množiny drátů (např. z náčrtu) @@ -1815,17 +1815,17 @@ na jeho složky X, Y a Z. CmdPartMakeSolid - + Part Díl - + Convert to solid Převede na těleso - + Create solid from a shell or compound Vytvoří těleso ze skořepiny nebo ze složeniny @@ -1833,17 +1833,17 @@ na jeho složky X, Y a Z. CmdPartMirror - + Part Díl - + Mirroring... Zrcadlení... - + Mirroring a selected shape Zrcadlení vybraného útvaru @@ -1851,17 +1851,17 @@ na jeho složky X, Y a Z. CmdPartOffset - + Part Díl - + 3D Offset... 3D odsazení... - + Utility to offset in 3D Nástroj odsazení ve 3D @@ -1869,17 +1869,17 @@ na jeho složky X, Y a Z. CmdPartOffset2D - + Part Díl - + 2D Offset... 2D odsazení... - + Utility to offset planar shapes Nástroj pro odsazení rovinných tvarů @@ -1887,17 +1887,17 @@ na jeho složky X, Y a Z. CmdPartPickCurveNet - + Part Díl - + Pick curve network Vybrat křivkové sítě - + Pick a curve network Vybrat křivkovou síť @@ -1923,17 +1923,17 @@ na jeho složky X, Y a Z. CmdPartPrimitives - + Part Díl - + Create primitives... Vytvoř primitiv... - + Creation of parametrized geometric primitives Vytvoření parametrizovaného primitivu @@ -1941,17 +1941,17 @@ na jeho složky X, Y a Z. CmdPartProjectionOnSurface - + Part Díl - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part Díl - + Reverse shapes Obrátí útvary - + Reverse orientation of shapes Obrátí orientaci útvaů @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part Díl - + Revolve... Orotování... - + Revolve a selected shape Orotuje vybraný útvar @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part Díl - + Create ruled surface Vytvoří přímkovou plochu - + Create a ruled surface from either two Edges or two wires Vytvoří plochu ze dvou okrajů nebo drátů @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part Díl - + Section Výběr - + Make a section of two shapes Vyber dva obrazce @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part Díl - + Sweep... Tažení... - + Utility to sweep Nástroj tažení @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part Díl - + Thickness... Tloušťka... - + Utility to apply a thickness Nástroj vytvoření skořepiny - + Wrong selection Neplatný výběr - + Selected shape is not a solid Vybraný tvar není těleso @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Průnik - + Fusion Fusion - + Compound Směs - + Section Výběr - + Import Part Importovat část - + Part Import Curve Net Part Import Curve Net - + Reverse Obrátit - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Vytvoří přímkovou plochu @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Návrh - Selection accepted @@ -5710,83 +5705,83 @@ in the 3D view for the sweep path. Upravit %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Import-Export - - - - - - + + + + + + Wrong selection Neplatný výběr - - + + Select two shapes please. Vyber dva útvary prosím. - - - - - Non-solids selected - Vybraný útvar není oběmový - + Non-solids selected + Vybraný útvar není oběmový + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Neobjemové útvary při boolovských operacích mohou vést k neočekávaným výsledkům. Chcete pokračovat? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Vyberte prosím dva tvary nebo více. Nebo vyberte jednu složeninu složenou ze dvou nebo více tvarů pro výpočet společného mezi nimi. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Vyberte prosím dva tvary nebo více. Nebo vyberte jednu složeninu složenou ze dvou nebo více tvarů ke sloučení. - + Select one shape or more, please. Vyberte prosím jeden nebo více tvarů. - + All CAD Files Všechny CAD soubory - + All Files Všechny soubory - + You have to select either two edges or two wires. Nejsou vybrané ani dvě hrany nebo dva dráty. @@ -6759,4 +6754,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Změna velikosti + + + + X Factor + X Factor + + + + Factor + měřítko + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Útvar + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Díl + + + + Scale... + Měřítko... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_de.ts b/src/Mod/Part/Gui/Resources/translations/Part_de.ts index 9a0dab3502..c298e3ed21 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_de.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_de.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Formteil - - - + + + Box selection Rechteckauswahl @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Formteil - + Check Geometry Geometrie überprüfen - + Analyzes Geometry For Errors Untersuche Geometrie auf Fehler @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Formteil - + Color per face Farbe pro Fläche - + Set the color of each individual face of the selected object. Die Farbe jeder einzelnen Fläche des ausgewählten Objekts festlegen. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Formteil - + Measure Angular Winkel messen - + Measure the angle between two edges. Den Winkel zwischen zwei Kanten messen. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Formteil - + Clear All Alles löschen - + Clear all dimensions from the screen. Alle Maße vom Bildschirm entfernen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Formteil - + Measure Linear Linear messen - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ zwischen zwei ihrer Knotenpunkte gemessen. CmdMeasureRefresh - + Part Formteil - + Refresh Aktualisieren - + Recalculate the dimensions if the measured points have moved. Die Maße neu berechnen, wenn sich die gemessenen Punkte bewegt haben. @@ -1278,17 +1278,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Formteil - + Toggle 3D 3D umschalten - + Toggle on and off all direct dimensions, including angular. Schaltet alle direkten Maße ein bzw. aus, @@ -1298,17 +1298,17 @@ Winkelmaße eingeschlossen. CmdMeasureToggleAll - + Part Formteil - + Toggle All Alle umschalten - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Alle derzeit sichtbaren Maße ein- bzw. ausschalten, @@ -1318,17 +1318,17 @@ direkte, rechtwinklige und Winkelmaße. CmdMeasureToggleDelta - + Part Formteil - + Toggle Delta Delta umschalten - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1340,17 +1340,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartBoolean - + Part Formteil - + Boolean... Boolesche Operation... - + Run a boolean operation with two shapes selected Eine boolesche Operation mit zwei ausgewählten Formen durchführen @@ -1378,17 +1378,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartBox2 - + Part Formteil - + Box fix 1 Box fix 1 - + Create a box solid without dialog Erstellt einen Quader ohne Dialog @@ -1396,17 +1396,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartBox3 - + Part Formteil - + Box fix 2 Box fix 2 - + Create a box solid without dialog Erstellt einen Quader ohne Dialog @@ -1414,17 +1414,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartBuilder - + Part Formteil - + Shape builder... Form-Generator... - + Advanced utility to create shapes Erweitertes Dienstprogramm um Formen zu erstellen @@ -1432,17 +1432,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartChamfer - + Part Formteil - + Chamfer... Anfasen ... - + Chamfer the selected edges of a shape Die gewählten Kanten einer Form anfasen @@ -1450,17 +1450,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCommon - + Part Formteil - + Intersection Schnittstelle - + Make an intersection of two shapes Schnitt aus zwei Formen @@ -1468,17 +1468,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCompCompoundTools - + Part Formteil - + Compound tools Verbundwerkzeuge - + Compound tools: working with lists of shapes. Verbund Werkzeuge: Arbeiten mit Listen von Formen. @@ -1486,17 +1486,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCompJoinFeatures - + Part Formteil - + Join objects... Objekte verbinden... - + Join walled objects Verbinden von Wandungen @@ -1504,17 +1504,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCompOffset - + Part Formteil - + Offset: Versatz: - + Tools to offset shapes (construct parallel shapes) Werkzeuge für Versatz von Formen (parallele Formen konstruieren) @@ -1522,17 +1522,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCompSplitFeatures - + Part Formteil - + Split objects... Objekte aufteilen... - + Shape splitting and Compsolid creation tools. Werkzeuge zum Teilen von Formen und zur Erstellung von Verbundkörpern. @@ -1540,17 +1540,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCompound - + Part Formteil - + Make compound Erzeuge Verbund - + Make a compound of several shapes Erzeuge einen Verbund aus mehreren Formen @@ -1578,17 +1578,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCrossSections - + Part Formteil - + Cross-sections... Schnitte... - + Cross-sections Schnitte @@ -1596,17 +1596,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartCut - + Part Formteil - + Cut Differenz - + Make a cut of two shapes Schneidet zwei Formen @@ -1670,17 +1670,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartExport - + Part Part - + Export CAD... CAD exportieren... - + Exports to a CAD file In CAD-Datei exportieren @@ -1688,17 +1688,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartExtrude - + Part Formteil - + Extrude... Extrudieren... - + Extrude a selected sketch Extrudieren einer ausgewählten Skizze @@ -1706,17 +1706,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartFillet - + Part Formteil - + Fillet... Abrunden... - + Fillet the selected edges of a shape Die ausgewählten Kanten einer Form abrunden @@ -1724,17 +1724,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartFuse - + Part Formteil - + Union Vereinigung - + Make a union of several shapes Vereinigt mehrere Formen @@ -1742,17 +1742,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartImport - + Part Formteil - + Import CAD... CAD importieren ... - + Imports a CAD file Importiert eine CAD-Datei @@ -1760,17 +1760,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartImportCurveNet - + Part Formteil - + Import curve network... Kurvennetzwerk importieren... - + Import a curve network Ein Kurvennetzwerk importieren @@ -1778,17 +1778,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartLoft - + Part Formteil - + Loft... Ausformung... - + Utility to loft Ausformungs-Werkzeug @@ -1796,17 +1796,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartMakeFace - + Part Formteil - + Make face from wires Fläche aus Kantenzug erstellen - + Make face from set of wires (e.g. from a sketch) Erstellt eine Fläche aus einem Kantenzug (z.B. aus einer Skizze) @@ -1814,17 +1814,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartMakeSolid - + Part Formteil - + Convert to solid In Festkörper umwandeln - + Create solid from a shell or compound Festkörper aus Hülle oder Flächenverbund erzeugen @@ -1832,17 +1832,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartMirror - + Part Formteil - + Mirroring... Spiegelung... - + Mirroring a selected shape Spiegelung einer ausgewählten Form @@ -1850,17 +1850,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartOffset - + Part Formteil - + 3D Offset... 3D-Versatz... - + Utility to offset in 3D Werkzeug für Versatz @@ -1868,17 +1868,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartOffset2D - + Part Formteil - + 2D Offset... 2D-Versatz... - + Utility to offset planar shapes Werkzeug zum Versetzen von ebenen Formen @@ -1886,17 +1886,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartPickCurveNet - + Part Formteil - + Pick curve network Kurvennetzwerk auswählen - + Pick a curve network Ein Kurvennetzwerk auswählen @@ -1922,17 +1922,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartPrimitives - + Part Formteil - + Create primitives... Grundkörper erstellen... - + Creation of parametrized geometric primitives Erstellung von parametrisierten geometrischen Grundkörpern @@ -1940,17 +1940,17 @@ X-, Y- und Z-Komponenten zerlegt wird. CmdPartProjectionOnSurface - + Part Formteil - + Create projection on surface... Projektion auf Oberfläche erstellen... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1982,17 +1982,17 @@ der Projektion. CmdPartReverseShape - + Part Formteil - + Reverse shapes Formen umkehren - + Reverse orientation of shapes Orientierung von Formen umkehren @@ -2000,17 +2000,17 @@ der Projektion. CmdPartRevolve - + Part Formteil - + Revolve... Drehen... - + Revolve a selected shape Drehen einer ausgewählten Form @@ -2018,17 +2018,17 @@ der Projektion. CmdPartRuledSurface - + Part Formteil - + Create ruled surface Regelfläche erzeugen - + Create a ruled surface from either two Edges or two wires Erstelle eine Regelfläche aus zwei Kanten oder zwei Kantenzügen @@ -2036,17 +2036,17 @@ der Projektion. CmdPartSection - + Part Formteil - + Section Schnittkurve - + Make a section of two shapes Schnitt von zwei Formen erzeugen @@ -2054,12 +2054,12 @@ der Projektion. CmdPartSectionCut - + Persistent section cut Dauerhafte Schnittdarstellung - + Creates a persistent section cut of visible part objects Erstellt eine dauerhafte Schnittdarstellung von sichtbaren Bauteilobjekten @@ -2141,17 +2141,17 @@ der Projektion. CmdPartSweep - + Part Formteil - + Sweep... Sweep... - + Utility to sweep Sweep-Werkzeug @@ -2159,27 +2159,27 @@ der Projektion. CmdPartThickness - + Part Formteil - + Thickness... Dicke... - + Utility to apply a thickness Werkzeug zum Aufdicken - + Wrong selection Falsche Auswahl - + Selected shape is not a solid Gewählte Form ist kein Volumenkörper @@ -2225,73 +2225,73 @@ der Projektion. Command - - + + Part Box Create Teilbox erstellen - + Part Cut Teilschnitt - + Common Schnitt - + Fusion Vereinigung - + Compound Verbund - + Section Schnittkurve - + Import Part Teil importieren - + Part Import Curve Net Teile-Import als Netz-Kurven - + Reverse Umkehren - + Make face Fläche erstellen - + Make Offset Versatzflächen erstellen - + Make 2D Offset 2D-Versatzkonturen erstellen - + Make Thickness Wandstärke anwenden - + Create ruled surface Regelfläche erzeugen @@ -2374,11 +2374,6 @@ der Projektion. PartDesignGui::TaskDatumParameters - - - Form - Form - Selection accepted @@ -5434,7 +5429,7 @@ indem Sie ein Auswahlrechteck in der 3D-Ansicht aufziehen Offset - Versetzen + Versatz @@ -5699,82 +5694,82 @@ für den Austragungspfad in der 3D-Ansicht auswählen. %1 bearbeiten - + Part and Part Design workbench Arbeitsbereich für Bauteile und deren Konstruktion - - + + Part/Part Design Part/Part Design - - + + Import-Export Import / Export - - - - - - + + + + + + Wrong selection Falsche Auswahl - - + + Select two shapes please. Wählen Sie bitte zwei Formen. - - - - - Non-solids selected - Kein Festkörper ausgewählt - + Non-solids selected + Kein Festkörper ausgewählt + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Die Verwendung von Nicht-Festkörpern für boolesche Operationen kann zu unerwarteten Ergebnissen führen. Möchten Sie fortfahren? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Bitte zwei oder mehr Formen selektieren. Alternativ einen Verbund von zwei oder mehr Formen selektieren um Schnitt zu berechnen. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Bitte zwei oder mehr Formen auswählen. Oder einen Verbund auswählen, der zwei oder mehr Formen enthält, die verbunden werden sollen. - + Select one shape or more, please. Bitte wählen Sie mindestens eine Form. - + All CAD Files Alle CAD-Dateien - + All Files Alle Dateien - + You have to select either two edges or two wires. Wählen Sie entweder zwei Kanten oder zwei Kantenzüge aus. @@ -6746,4 +6741,98 @@ Das bedeutet, dass die sich überschneidenden Volumen der Formen entfernt werden Ein 'Verbundfilter' kann verwendet werden, um die restlichen Stücke zu extrahieren. + + PartGui::DlgScale + + + Scale + Skalieren + + + + X Factor + X Factor + + + + Factor + Faktor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Form + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + Das Dokument '%1' existiert nicht. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Formteil + + + + Scale... + Skalieren... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_el.ts b/src/Mod/Part/Gui/Resources/translations/Part_el.ts index bd3f0be007..5af9e9705a 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_el.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_el.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Εξάρτημα - - - + + + Box selection Επιλογή με τη χρήση πλαισίου @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Εξάρτημα - + Check Geometry Έλεγχος Γεωμετρίας - + Analyzes Geometry For Errors Αναλύει την Γεωμετρία Για τον Εντοπισμό Σφαλμάτων @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Εξάρτημα - + Color per face Χρώμα ανά όψη - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Εξάρτημα - + Measure Angular Μέτρηση Γωνίας - + Measure the angle between two edges. Μετρήστε τη γωνία μεταξύ δύο ακμών. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Εξάρτημα - + Clear All Εκκαθάριση όλων - + Clear all dimensions from the screen. Καθαρισμός όλων των διαστάσεων από την οθόνη. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Εξάρτημα - + Measure Linear Μέτρηση απόστασης - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Εξάρτημα - + Refresh Ανανέωση - + Recalculate the dimensions if the measured points have moved. Επανυπολογισμός των διαστάσεων @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Εξάρτημα - + Toggle 3D Εναλλαγή 3D - + Toggle on and off all direct dimensions, including angular. Ενεργοποιήστε και απενεργοποιήστε όλες τις άμεσες διαστάσεις, συμπεριλαμβανομένων και των γωνιακών. @@ -1298,17 +1298,17 @@ including angular. CmdMeasureToggleAll - + Part Εξάρτημα - + Toggle All Εναλλαγή Όλων - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Ενεργοποιήστε και απενεργοποιήστε όλες τις ορατές προς το παρόν διαστάσεις, άμεσες, ορθογώνιες και γωνιακές. @@ -1317,17 +1317,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Εξάρτημα - + Toggle Delta Εναλλαγή εμφάνισης/απόκρυψης μετρήσεων Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1338,17 +1338,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Εξάρτημα - + Boolean... Χρήση Λειτουργιών Boole... - + Run a boolean operation with two shapes selected Εκτέλεση μιας πράξης Άλγεβρας Boole με δύο επιλεγμένα σχήματα @@ -1376,17 +1376,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Εξάρτημα - + Box fix 1 Box fix 1 - + Create a box solid without dialog Δημιουργήστε ένα στερεό πλαίσιο χωρίς παράθυρο διαλόγου @@ -1394,17 +1394,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Εξάρτημα - + Box fix 2 Box fix 2 - + Create a box solid without dialog Δημιουργήστε ένα στερεό πλαίσιο χωρίς παράθυρο διαλόγου @@ -1412,17 +1412,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Εξάρτημα - + Shape builder... Πρόγραμμα Κατασκευής Σχημάτων... - + Advanced utility to create shapes Προχωρημένη βοηθητική εφαρμογή για τη δημιουργία σχημάτων @@ -1430,17 +1430,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Εξάρτημα - + Chamfer... Λοξότμηση... - + Chamfer the selected edges of a shape Λοξότμηση των επιλεγμένων ακμών ενός σχήματος @@ -1448,17 +1448,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Εξάρτημα - + Intersection Σημείο τομής - + Make an intersection of two shapes Δημιουργήστε μια τομή δύο σχημάτων @@ -1466,17 +1466,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Εξάρτημα - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Compound tools: working with lists of shapes. @@ -1484,17 +1484,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Εξάρτημα - + Join objects... Ένωση αντικειμένων... - + Join walled objects Ένωση περιτειχισμένων αντικειμένων @@ -1502,17 +1502,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Εξάρτημα - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Εργαλεία μετατόπισης σχημάτων (κατασκευή παράλληλων σχημάτων) @@ -1520,17 +1520,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Εξάρτημα - + Split objects... Διαίρεση αντικειμένων... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1538,17 +1538,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Εξάρτημα - + Make compound Δημιουργία σύνθετου σχήματος - + Make a compound of several shapes Δημιουργία ενός σύνθετου σχήματος από διάφορα σχήματα @@ -1576,17 +1576,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Εξάρτημα - + Cross-sections... Ορθογώνιες διατομές... - + Cross-sections Ορθογώνιες διατομές @@ -1594,17 +1594,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Εξάρτημα - + Cut Περικοπή - + Make a cut of two shapes Περικοπή δύο σχημάτων @@ -1668,17 +1668,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Εξάρτημα - + Export CAD... Εξαγωγή Αρχείου CAD... - + Exports to a CAD file Πραγματοποιεί εξαγωγή σε ένα αρχείο CAD @@ -1686,17 +1686,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Εξάρτημα - + Extrude... Επέκταση... - + Extrude a selected sketch Επέκταση ενός επιλεγμένου σκαριφήματος @@ -1704,17 +1704,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Εξάρτημα - + Fillet... Στρογγύλεμα... - + Fillet the selected edges of a shape Στρογγύλεμα των επιλεγμένων ακμών ενός σχήματος @@ -1722,17 +1722,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Εξάρτημα - + Union Ένωση - + Make a union of several shapes Δημιουργήστε μια ένωση διαφόρων σχημάτων @@ -1740,17 +1740,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Εξάρτημα - + Import CAD... Εισαγωγή CAD... - + Imports a CAD file Πραγματοποιεί εισαγωγή ενός αρχείου CAD @@ -1758,17 +1758,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Εξάρτημα - + Import curve network... Εισαγωγή δικτύου καμπύλων... - + Import a curve network Εισαγωγή ενός δικτύου καμπύλων @@ -1776,17 +1776,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Εξάρτημα - + Loft... Παρεμβολή ορθογώνιων διατομών... - + Utility to loft Βοηθητική εφαρμογή για την παρεμβολή ορθογώνιων διατομών @@ -1794,17 +1794,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Εξάρτημα - + Make face from wires Δημιουργία όψης από σύρματα - + Make face from set of wires (e.g. from a sketch) Make face from set of wires (e.g. from a sketch) @@ -1812,17 +1812,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Εξάρτημα - + Convert to solid Μετατροπή σε στέρεο - + Create solid from a shell or compound Δημιουργία στέρεου από ένα κέλυφος ή σύνθετο σχήμα @@ -1830,17 +1830,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Εξάρτημα - + Mirroring... Κατοπτρισμός... - + Mirroring a selected shape Κατοπτρισμός ενός επιλεγμένου σχήματος @@ -1848,17 +1848,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Εξάρτημα - + 3D Offset... Μετατόπιση στον Τρισδιάστατο Χώρο... - + Utility to offset in 3D Utility to offset in 3D @@ -1866,17 +1866,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Εξάρτημα - + 2D Offset... Μετατόπιση στον Δισδιάστατο Χώρο... - + Utility to offset planar shapes Utility to offset planar shapes @@ -1884,17 +1884,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Εξάρτημα - + Pick curve network Διαλέξτε δίκτυο καμπύλων - + Pick a curve network Διαλέξτε ένα δίκτυο καμπύλων @@ -1920,17 +1920,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Εξάρτημα - + Create primitives... Δημιουργία θεμελιακών στοιχείων... - + Creation of parametrized geometric primitives Δημιουργία παραμετροποιημένων γεωμετρικών θεμελιακών στοιχείων @@ -1938,17 +1938,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Εξάρτημα - + Create projection on surface... Δημιουργία προβολής στην επιφάνεια... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1980,17 +1980,17 @@ of projection. CmdPartReverseShape - + Part Εξάρτημα - + Reverse shapes Αντιστροφή σχημάτων - + Reverse orientation of shapes Αντίστροφη προσανατολισμού των σχημάτων @@ -1998,17 +1998,17 @@ of projection. CmdPartRevolve - + Part Εξάρτημα - + Revolve... Περιφορά... - + Revolve a selected shape Περιφορά ενός επιλεγμένου σχήματος @@ -2016,17 +2016,17 @@ of projection. CmdPartRuledSurface - + Part Εξάρτημα - + Create ruled surface Δημιουργήστε ευθειογενή επιφάνεια - + Create a ruled surface from either two Edges or two wires Δημιουργήσετε μια ευθειογενή επιφάνεια από δύο Ακμές ή από δύο σύρματα @@ -2034,17 +2034,17 @@ of projection. CmdPartSection - + Part Εξάρτημα - + Section Τομή - + Make a section of two shapes Δημιουργία μιας τομής δύο σχημάτων @@ -2052,12 +2052,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Μόνιμη κοπή τομής - + Creates a persistent section cut of visible part objects Δημιουργεί μια μόνιμη τομή αντικειμένων ορατών τμημάτων @@ -2139,17 +2139,17 @@ of projection. CmdPartSweep - + Part Εξάρτημα - + Sweep... Σάρωση... - + Utility to sweep Βοηθητική εφαρμογή για την σάρωση @@ -2157,27 +2157,27 @@ of projection. CmdPartThickness - + Part Εξάρτημα - + Thickness... Πάχος... - + Utility to apply a thickness Βοηθητική εφαρμογή για την πρόσδοση πάχους - + Wrong selection Λάθος επιλογή - + Selected shape is not a solid Το επιλεγμένο σχήμα δεν είναι στερεό @@ -2223,73 +2223,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Τομή - + Fusion Fusion - + Compound Σύνθετο - + Section Τομή - + Import Part Import Part - + Part Import Curve Net Part Import Curve Net - + Reverse Αντιστροφή - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Δημιουργήστε ευθειογενή επιφάνεια @@ -2372,11 +2372,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Μορφή - Selection accepted @@ -4378,10 +4373,7 @@ during file reading (slower but higher details). If not checked, it depends on the option "Backlight color" (preferences section Display -> 3D View); either the backlight color will be used or black. - Bottom side of surface will be rendered the same way than top. -If not checked, it depends on the option "Backlight color" -(preferences section Display -> 3D View); either the backlight color -will be used or black. + Η κάτω πλευρά της επιφάνειας θα αποδοθεί με τον ίδιο τρόπο από την κορυφή. Εάν δεν είναι επιλεγμένο, εξαρτάται από την επιλογή "Χρώμα οπίσθιου φωτισμού" (ενότητα προτιμήσεων Εμφάνιση -> Προβολή 3D). θα χρησιμοποιηθεί είτε το χρώμα του οπίσθιου φωτισμού είτε το μαύρο. @@ -5706,51 +5698,51 @@ in the 3D view for the sweep path. Επεξεργασία %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Εισαγωγή-Εξαγωγή - - - - - - + + + + + + Wrong selection Λάθος επιλογή - - + + Select two shapes please. Επιλέξτε δύο σχήματα παρακαλώ. - - - - - Non-solids selected - Επιλέχτηκαν μη στερεά - + Non-solids selected + Επιλέχτηκαν μη στερεά + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Η χρήση μη στερεών για πράξεις άλγεβρας Boole ενδέχεται να οδηγήσει σε απρόσμενα αποτελέσματα. @@ -5758,32 +5750,32 @@ Do you want to continue? Θέλετε να συνεχίσετε; - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Επιλέξτε δύο ή περισσότερα σχήματα, παρακαλώ. Ή επιλέξτε ένα σύνθετο σχήμα που να περιέχει δύο ή περισσότερα σχήματα για να υπολογίσετε την τομή τους. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Επιλέξτε δύο ή περισσότερα σχήματα, παρακαλώ. Ή επιλέξτε ένα σύνθετο σχήμα που να περιέχει δύο ή περισσότερα σχήματα προς συγχώνευση. - + Select one shape or more, please. Επιλέξτε ένα ή περισσότερα σχήματα, παρακαλώ. - + All CAD Files Όλα τα Αρχεία CAD - + All Files Όλα τα Αρχεία - + You have to select either two edges or two wires. Θα πρέπει να επιλέξετε είτε δύο ακμές είτε δύο σύρματα. @@ -6661,7 +6653,7 @@ It will create a 'Compound Filter' for each shape. Is closed - Is closed + Είναι κλειστό @@ -6756,4 +6748,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Κλίμακα + + + + X Factor + X Factor + + + + Factor + Παράγοντας + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Σχήμα + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Εξάρτημα + + + + Scale... + Κλιμακοποίηση... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts b/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts index 3ed8025845..d6a151317f 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts @@ -1151,14 +1151,14 @@ Posición. Funciona en objetos con ubicaciones y aristas de elipse/parábola/hip CmdBoxSelection - + Part Pieza - - - + + + Box selection Cuadro de selección @@ -1166,17 +1166,17 @@ Posición. Funciona en objetos con ubicaciones y aristas de elipse/parábola/hip CmdCheckGeometry - + Part Pieza - + Check Geometry Comprobar geometría - + Analyzes Geometry For Errors Analiza la Geometría en busca de Errores @@ -1184,17 +1184,17 @@ Posición. Funciona en objetos con ubicaciones y aristas de elipse/parábola/hip CmdColorPerFace - + Part Pieza - + Color per face Color por cara - + Set the color of each individual face of the selected object. Establece el color de cada cara individual del objeto seleccionado. @@ -1202,17 +1202,17 @@ Posición. Funciona en objetos con ubicaciones y aristas de elipse/parábola/hip CmdMeasureAngular - + Part Pieza - + Measure Angular Medida Angular - + Measure the angle between two edges. Mide el ángulo entre dos bordes. @@ -1220,17 +1220,17 @@ Posición. Funciona en objetos con ubicaciones y aristas de elipse/parábola/hip CmdMeasureClearAll - + Part Pieza - + Clear All Limpiar todo - + Clear all dimensions from the screen. Borra todas las cotas de la pantalla. @@ -1238,17 +1238,17 @@ Posición. Funciona en objetos con ubicaciones y aristas de elipse/parábola/hip CmdMeasureLinear - + Part Pieza - + Measure Linear Medida lineal - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1260,17 +1260,17 @@ entre dos vértices de ellos. CmdMeasureRefresh - + Part Pieza - + Refresh Actualizar - + Recalculate the dimensions if the measured points have moved. Recalcula las cotas @@ -1280,17 +1280,17 @@ si los puntos medidos se han movido. CmdMeasureToggle3d - + Part Pieza - + Toggle 3D Mostrar/Ocultar Medidas 3D - + Toggle on and off all direct dimensions, including angular. Activa y desactiva todas las cotas directas, @@ -1300,17 +1300,17 @@ incluso las angulares. CmdMeasureToggleAll - + Part Pieza - + Toggle All Mostrar/Ocultar Todo - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Activa y desactiva todas las cotas visibles actualmente, @@ -1320,17 +1320,17 @@ directas, ortogonales y angulares. CmdMeasureToggleDelta - + Part Pieza - + Toggle Delta Mostrar/Ocultar Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1342,17 +1342,17 @@ en sus componentes X, Y y Z. CmdPartBoolean - + Part Pieza - + Boolean... Booleana... - + Run a boolean operation with two shapes selected Ejecuta una operación booleana con dos formas seleccionadas @@ -1380,17 +1380,17 @@ en sus componentes X, Y y Z. CmdPartBox2 - + Part Pieza - + Box fix 1 Caja fija 1 - + Create a box solid without dialog Crear una caja sólida sin diálogo @@ -1398,17 +1398,17 @@ en sus componentes X, Y y Z. CmdPartBox3 - + Part Pieza - + Box fix 2 Caja fija 2 - + Create a box solid without dialog Crear una caja sólida sin diálogo @@ -1416,17 +1416,17 @@ en sus componentes X, Y y Z. CmdPartBuilder - + Part Pieza - + Shape builder... Constructor de formas... - + Advanced utility to create shapes Utilidad avanzada para crear formas @@ -1434,17 +1434,17 @@ en sus componentes X, Y y Z. CmdPartChamfer - + Part Pieza - + Chamfer... Biselar... - + Chamfer the selected edges of a shape Bisela las aristas seleccionadas de una forma @@ -1452,17 +1452,17 @@ en sus componentes X, Y y Z. CmdPartCommon - + Part Pieza - + Intersection Intersección - + Make an intersection of two shapes Hacer una intersección de dos formas @@ -1470,17 +1470,17 @@ en sus componentes X, Y y Z. CmdPartCompCompoundTools - + Part Pieza - + Compound tools Herramientas compuestas - + Compound tools: working with lists of shapes. Herramientas de compuestos: trabajando con listas de formas. @@ -1488,17 +1488,17 @@ en sus componentes X, Y y Z. CmdPartCompJoinFeatures - + Part Pieza - + Join objects... Juntar objetos... - + Join walled objects Juntar objetos amurallados @@ -1506,17 +1506,17 @@ en sus componentes X, Y y Z. CmdPartCompOffset - + Part Pieza - + Offset: Desplazamiento: - + Tools to offset shapes (construct parallel shapes) Herramientas para desfasar formas (construir formas paralelas) @@ -1524,17 +1524,17 @@ en sus componentes X, Y y Z. CmdPartCompSplitFeatures - + Part Pieza - + Split objects... Separa objetos... - + Shape splitting and Compsolid creation tools. Herramientas de división de formas y creación Compsolid. @@ -1542,17 +1542,17 @@ en sus componentes X, Y y Z. CmdPartCompound - + Part Pieza - + Make compound Crear compuesto - + Make a compound of several shapes Crear compuesto de varias formas @@ -1580,17 +1580,17 @@ en sus componentes X, Y y Z. CmdPartCrossSections - + Part Pieza - + Cross-sections... Cortes transversales... - + Cross-sections Cortes transversales @@ -1598,17 +1598,17 @@ en sus componentes X, Y y Z. CmdPartCut - + Part Pieza - + Cut Cortar - + Make a cut of two shapes Hacer un corte de dos formas @@ -1672,17 +1672,17 @@ en sus componentes X, Y y Z. CmdPartExport - + Part Pieza - + Export CAD... Exportar CAD... - + Exports to a CAD file Exporta a un archivo CAD @@ -1690,17 +1690,17 @@ en sus componentes X, Y y Z. CmdPartExtrude - + Part Pieza - + Extrude... Extruir... - + Extrude a selected sketch Extruye el croquis seleccionado @@ -1708,17 +1708,17 @@ en sus componentes X, Y y Z. CmdPartFillet - + Part Pieza - + Fillet... Redondear... - + Fillet the selected edges of a shape Redondea las aristas seleccionadas de una forma @@ -1726,17 +1726,17 @@ en sus componentes X, Y y Z. CmdPartFuse - + Part Pieza - + Union Unión - + Make a union of several shapes Unión de varias formas @@ -1744,17 +1744,17 @@ en sus componentes X, Y y Z. CmdPartImport - + Part Pieza - + Import CAD... Importar CAD... - + Imports a CAD file Importa un archivo de CAD @@ -1762,17 +1762,17 @@ en sus componentes X, Y y Z. CmdPartImportCurveNet - + Part Pieza - + Import curve network... Importa red de curvas... - + Import a curve network Importa una red de curvas @@ -1780,17 +1780,17 @@ en sus componentes X, Y y Z. CmdPartLoft - + Part Pieza - + Loft... Puente... - + Utility to loft Crear puente @@ -1798,17 +1798,17 @@ en sus componentes X, Y y Z. CmdPartMakeFace - + Part Pieza - + Make face from wires Crear cara a partir de alambres - + Make face from set of wires (e.g. from a sketch) Hacer la cara del conjunto de cables (por ejemplo, desde un croquis) @@ -1816,17 +1816,17 @@ en sus componentes X, Y y Z. CmdPartMakeSolid - + Part Pieza - + Convert to solid Convertir a sólido - + Create solid from a shell or compound Crear sólido a partir de una carcasa o compuesto @@ -1834,17 +1834,17 @@ en sus componentes X, Y y Z. CmdPartMirror - + Part Pieza - + Mirroring... Simetrizar... - + Mirroring a selected shape Simetría de una forma seleccionada @@ -1852,17 +1852,17 @@ en sus componentes X, Y y Z. CmdPartOffset - + Part Pieza - + 3D Offset... Desfase 3D... - + Utility to offset in 3D Utilidad para desfasar en 3D @@ -1870,17 +1870,17 @@ en sus componentes X, Y y Z. CmdPartOffset2D - + Part Pieza - + 2D Offset... Desfase 2D... - + Utility to offset planar shapes Utilidad para desfasar formas planas @@ -1888,17 +1888,17 @@ en sus componentes X, Y y Z. CmdPartPickCurveNet - + Part Pieza - + Pick curve network Seleccionar red de curvas - + Pick a curve network Seleccionar una red de curvas @@ -1924,17 +1924,17 @@ en sus componentes X, Y y Z. CmdPartPrimitives - + Part Pieza - + Create primitives... Crear primitivas... - + Creation of parametrized geometric primitives Creación de primitivas geométricas parametrizadas @@ -1942,17 +1942,17 @@ en sus componentes X, Y y Z. CmdPartProjectionOnSurface - + Part Pieza - + Create projection on surface... Crea proyección en superficie... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1984,17 +1984,17 @@ de proyección. CmdPartReverseShape - + Part Pieza - + Reverse shapes Invertir formas - + Reverse orientation of shapes Invierte las normales de todas las caras de los objetos seleccionados @@ -2002,17 +2002,17 @@ de proyección. CmdPartRevolve - + Part Pieza - + Revolve... Revolución... - + Revolve a selected shape Revoluciona una forma seleccionada @@ -2020,17 +2020,17 @@ de proyección. CmdPartRuledSurface - + Part Pieza - + Create ruled surface Crear superficie reglada - + Create a ruled surface from either two Edges or two wires Crear superficie reglada a partir de dos aristas o dos alambres @@ -2038,17 +2038,17 @@ de proyección. CmdPartSection - + Part Pieza - + Section Corte - + Make a section of two shapes Hacer un corte de dos formas @@ -2056,12 +2056,12 @@ de proyección. CmdPartSectionCut - + Persistent section cut Corte de sección persistente - + Creates a persistent section cut of visible part objects Crea un corte de sección persistente de objetos de piezas visibles @@ -2143,17 +2143,17 @@ de proyección. CmdPartSweep - + Part Pieza - + Sweep... Barrido... - + Utility to sweep Crear barrido @@ -2161,27 +2161,27 @@ de proyección. CmdPartThickness - + Part Pieza - + Thickness... Espesor... - + Utility to apply a thickness Aplicar un espesor - + Wrong selection Selección Incorrecta - + Selected shape is not a solid La forma seleccionada no es sólida @@ -2227,73 +2227,73 @@ de proyección. Command - - + + Part Box Create Crear Caja - + Part Cut Corte - + Common Intersección - + Fusion Fusión - + Compound Compuesto - + Section Corte - + Import Part Importar Parte - + Part Import Curve Net Importar Curva Net de Pieza - + Reverse Invertir - + Make face Hacer cara - + Make Offset Desplazar - + Make 2D Offset Desplazar 2D - + Make Thickness Dar espesor - + Create ruled surface Crear superficie reglada @@ -2376,11 +2376,6 @@ de proyección. PartDesignGui::TaskDatumParameters - - - Form - Forma - Selection accepted @@ -5707,83 +5702,83 @@ in the 3D view for the sweep path. Editar %1 - + Part and Part Design workbench Piezas y banco de trabajo de diseño de piezas - - + + Part/Part Design Diseño de parte/parte - - + + Import-Export Importar-Exportar - - - - - - + + + + + + Wrong selection Selección Incorrecta - - + + Select two shapes please. Por favor, seleccione dos formas. - - - - - Non-solids selected - Se han seleccionado objetos no sólidos - + Non-solids selected + Se han seleccionado objetos no sólidos + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Usar objetos no sólidos para operaciones booleanas puede causar resultados inesperados. ¿Quieres continuar? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Seleccione dos o más formas, por favor. O bien, seleccione un compuesto que contiene dos o más formas para calcular el común entre ellas. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Seleccione dos formas o más, por favor. O bien, seleccione un compuesto que contiene dos o más formas para ser fusionado. - + Select one shape or more, please. Seleccione una o más formas, por favor. - + All CAD Files Todos los archivos CAD - + All Files Todos los Archivos - + You have to select either two edges or two wires. Debe seleccionar dos aristas o dos alambres. @@ -6756,4 +6751,98 @@ Esto significa que los volúmenes superpuestos de las figuras se eliminarán. Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes. + + PartGui::DlgScale + + + Scale + Escala + + + + X Factor + X Factor + + + + Factor + Factor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Pieza + + + + Scale... + Escala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts b/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts index 5dc4e2f3c7..c7c2c5cef6 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts @@ -1151,14 +1151,14 @@ Posición. Funciona en objetos con ubicaciones y bordes de elipse / parábola / CmdBoxSelection - + Part Pieza - - - + + + Box selection Cuadro de selección @@ -1166,17 +1166,17 @@ Posición. Funciona en objetos con ubicaciones y bordes de elipse / parábola / CmdCheckGeometry - + Part Pieza - + Check Geometry Verificar geometría - + Analyzes Geometry For Errors Analiza la Geometría en busca de Errores @@ -1184,17 +1184,17 @@ Posición. Funciona en objetos con ubicaciones y bordes de elipse / parábola / CmdColorPerFace - + Part Pieza - + Color per face Color por cara - + Set the color of each individual face of the selected object. Establece el color de cada cara individual del objeto seleccionado. @@ -1202,17 +1202,17 @@ Posición. Funciona en objetos con ubicaciones y bordes de elipse / parábola / CmdMeasureAngular - + Part Pieza - + Measure Angular Medida Angular - + Measure the angle between two edges. Mide el ángulo entre dos bordes. @@ -1220,17 +1220,17 @@ Posición. Funciona en objetos con ubicaciones y bordes de elipse / parábola / CmdMeasureClearAll - + Part Pieza - + Clear All Borrar todo - + Clear all dimensions from the screen. Borra todas las cotas de la pantalla. @@ -1238,17 +1238,17 @@ Posición. Funciona en objetos con ubicaciones y bordes de elipse / parábola / CmdMeasureLinear - + Part Pieza - + Measure Linear Medida lineal - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1260,17 +1260,17 @@ entre dos vértices de ellos. CmdMeasureRefresh - + Part Pieza - + Refresh Actualizar pantalla - + Recalculate the dimensions if the measured points have moved. Recalcula las cotas @@ -1280,17 +1280,17 @@ si los puntos medidos se han movido. CmdMeasureToggle3d - + Part Pieza - + Toggle 3D Alterna 3D - + Toggle on and off all direct dimensions, including angular. Activa y desactiva todas las cotas directas, @@ -1300,17 +1300,17 @@ incluso las angulares. CmdMeasureToggleAll - + Part Pieza - + Toggle All Cambiar Todo - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Activa y desactiva todas las cotas visibles actualmente, @@ -1320,17 +1320,17 @@ directas, ortogonales y angulares. CmdMeasureToggleDelta - + Part Pieza - + Toggle Delta Activar Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1342,17 +1342,17 @@ en sus componentes X, Y y Z. CmdPartBoolean - + Part Pieza - + Boolean... Booleano... - + Run a boolean operation with two shapes selected Ejecuta una operación booleana con dos formas seleccionadas @@ -1380,17 +1380,17 @@ en sus componentes X, Y y Z. CmdPartBox2 - + Part Pieza - + Box fix 1 Fijar prisma 1 - + Create a box solid without dialog Crear un cuadro sólido sin diálogo @@ -1398,17 +1398,17 @@ en sus componentes X, Y y Z. CmdPartBox3 - + Part Pieza - + Box fix 2 Fijar prisma 2 - + Create a box solid without dialog Crear un cuadro sólido sin diálogo @@ -1416,17 +1416,17 @@ en sus componentes X, Y y Z. CmdPartBuilder - + Part Pieza - + Shape builder... Generador de forma... - + Advanced utility to create shapes Utilidad avanzada para crear formas @@ -1434,17 +1434,17 @@ en sus componentes X, Y y Z. CmdPartChamfer - + Part Pieza - + Chamfer... Chaflán... - + Chamfer the selected edges of a shape Crear chaflán para el borde seleccionado @@ -1452,17 +1452,17 @@ en sus componentes X, Y y Z. CmdPartCommon - + Part Pieza - + Intersection Intersección - + Make an intersection of two shapes Hacer una intersección de dos formas @@ -1470,17 +1470,17 @@ en sus componentes X, Y y Z. CmdPartCompCompoundTools - + Part Pieza - + Compound tools Herramientas compuestas - + Compound tools: working with lists of shapes. Herramientas compuestas: trabajando con listas de formas. @@ -1488,17 +1488,17 @@ en sus componentes X, Y y Z. CmdPartCompJoinFeatures - + Part Pieza - + Join objects... Unir objetos... - + Join walled objects Une objetos amurallados @@ -1506,17 +1506,17 @@ en sus componentes X, Y y Z. CmdPartCompOffset - + Part Pieza - + Offset: Desplazamiento: - + Tools to offset shapes (construct parallel shapes) Herramientas para separación de formas (construir formas paralelas) @@ -1524,17 +1524,17 @@ en sus componentes X, Y y Z. CmdPartCompSplitFeatures - + Part Pieza - + Split objects... Partir objetos... - + Shape splitting and Compsolid creation tools. Herramientas de división de formas y creación Compsolid. @@ -1542,17 +1542,17 @@ en sus componentes X, Y y Z. CmdPartCompound - + Part Pieza - + Make compound Crear cuerpo compuesto - + Make a compound of several shapes Crear composición desde varias formas @@ -1580,17 +1580,17 @@ en sus componentes X, Y y Z. CmdPartCrossSections - + Part Pieza - + Cross-sections... Cortes transversales... - + Cross-sections Cortes transversales @@ -1598,17 +1598,17 @@ en sus componentes X, Y y Z. CmdPartCut - + Part Pieza - + Cut Cortar - + Make a cut of two shapes Hacer un corte de dos formas @@ -1672,17 +1672,17 @@ en sus componentes X, Y y Z. CmdPartExport - + Part Pieza - + Export CAD... Exportar CAD... - + Exports to a CAD file Exporta a un archivo CAD @@ -1690,17 +1690,17 @@ en sus componentes X, Y y Z. CmdPartExtrude - + Part Pieza - + Extrude... Extruir... - + Extrude a selected sketch Extruye el croquis seleccionado @@ -1708,17 +1708,17 @@ en sus componentes X, Y y Z. CmdPartFillet - + Part Pieza - + Fillet... Redondeo... - + Fillet the selected edges of a shape Redondea las aristas seleccionadas de una forma @@ -1726,17 +1726,17 @@ en sus componentes X, Y y Z. CmdPartFuse - + Part Pieza - + Union Unión - + Make a union of several shapes Hacer una unión de varias formas @@ -1744,17 +1744,17 @@ en sus componentes X, Y y Z. CmdPartImport - + Part Pieza - + Import CAD... Importar CAD... - + Imports a CAD file Importa un archivo de CAD @@ -1762,17 +1762,17 @@ en sus componentes X, Y y Z. CmdPartImportCurveNet - + Part Pieza - + Import curve network... Importa red de curvas... - + Import a curve network Importa una red de curvas @@ -1780,17 +1780,17 @@ en sus componentes X, Y y Z. CmdPartLoft - + Part Pieza - + Loft... Proyección... - + Utility to loft Crear proyección @@ -1798,17 +1798,17 @@ en sus componentes X, Y y Z. CmdPartMakeFace - + Part Pieza - + Make face from wires Crear cara a partir de alambres - + Make face from set of wires (e.g. from a sketch) Hacer cara del conjunto de alambres (por ejemplo, desde un croquis) @@ -1816,17 +1816,17 @@ en sus componentes X, Y y Z. CmdPartMakeSolid - + Part Pieza - + Convert to solid Convertir a sólido - + Create solid from a shell or compound Crear sólido desde un cascarón o un compuesto @@ -1834,17 +1834,17 @@ en sus componentes X, Y y Z. CmdPartMirror - + Part Pieza - + Mirroring... Reflejar... - + Mirroring a selected shape Reflejar una forma seleccionada @@ -1852,17 +1852,17 @@ en sus componentes X, Y y Z. CmdPartOffset - + Part Pieza - + 3D Offset... Desplazamiento 3D... - + Utility to offset in 3D Utilidad para desplazamiento en 3D @@ -1870,17 +1870,17 @@ en sus componentes X, Y y Z. CmdPartOffset2D - + Part Pieza - + 2D Offset... Desplazamiento 2D... - + Utility to offset planar shapes Utilidad para equidistancia de formas planares @@ -1888,17 +1888,17 @@ en sus componentes X, Y y Z. CmdPartPickCurveNet - + Part Pieza - + Pick curve network Designa una red de curvas - + Pick a curve network Designa una red de curvas @@ -1924,17 +1924,17 @@ en sus componentes X, Y y Z. CmdPartPrimitives - + Part Pieza - + Create primitives... Crear primitivas... - + Creation of parametrized geometric primitives Creación de primitivas geométricas paramétricas @@ -1942,17 +1942,17 @@ en sus componentes X, Y y Z. CmdPartProjectionOnSurface - + Part Pieza - + Create projection on surface... Crea proyección en superficie... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1984,17 +1984,17 @@ de proyección. CmdPartReverseShape - + Part Pieza - + Reverse shapes Invertir formas - + Reverse orientation of shapes Invertir la orientación de las formas @@ -2002,17 +2002,17 @@ de proyección. CmdPartRevolve - + Part Pieza - + Revolve... Girar... - + Revolve a selected shape Girar una forma seleccionada @@ -2020,17 +2020,17 @@ de proyección. CmdPartRuledSurface - + Part Pieza - + Create ruled surface Crear superficie reglada - + Create a ruled surface from either two Edges or two wires Crear superficie reglada desde dos aristas o dos alambres @@ -2038,17 +2038,17 @@ de proyección. CmdPartSection - + Part Pieza - + Section Sección - + Make a section of two shapes Hacer una sección de dos formas @@ -2056,12 +2056,12 @@ de proyección. CmdPartSectionCut - + Persistent section cut Corte de sección persistente - + Creates a persistent section cut of visible part objects Crea un corte de sección persistente de objetos de piezas visibles @@ -2143,17 +2143,17 @@ de proyección. CmdPartSweep - + Part Pieza - + Sweep... Barrido... - + Utility to sweep Crear barrido @@ -2161,27 +2161,27 @@ de proyección. CmdPartThickness - + Part Pieza - + Thickness... Espesor... - + Utility to apply a thickness Utilidad para aplicar un espesor - + Wrong selection Selección incorrecta - + Selected shape is not a solid La forma seleccionada no es un sólido @@ -2227,73 +2227,73 @@ de proyección. Command - - + + Part Box Create Crear Caja - + Part Cut Corte - + Common Común - + Fusion Fusión - + Compound Compuesto - + Section Sección - + Import Part Importar Parte - + Part Import Curve Net Importar Curva Net de Pieza - + Reverse Invertir - + Make face Hacer cara - + Make Offset Desplazar - + Make 2D Offset Desplazar 2D - + Make Thickness Dar espesor - + Create ruled surface Crear superficie reglada @@ -2376,11 +2376,6 @@ de proyección. PartDesignGui::TaskDatumParameters - - - Form - Formulario - Selection accepted @@ -5702,83 +5697,83 @@ in the 3D view for the sweep path. Editar %1 - + Part and Part Design workbench Piezas y banco de trabajo de diseño de piezas - - + + Part/Part Design Diseño de parte/parte - - + + Import-Export Importar/Exportar - - - - - - + + + + + + Wrong selection Selección incorrecta - - + + Select two shapes please. Seleccione dos formas por favor. - - - - - Non-solids selected - Se han seleccionado objetos no sólidos - + Non-solids selected + Se han seleccionado objetos no sólidos + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Usar objetos no sólidos para operaciones booleanas puede causar resultados inesperados. ¿Quieres continuar? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Seleccione dos o más formas, por favor. O bien, seleccione un compuesto que contiene dos o más formas para calcular el común entre ellas. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Seleccione dos formas o más, por favor. O bien, seleccione un compuesto que contiene dos o más formas para ser fusionado. - + Select one shape or more, please. Seleccione una o más formas, por favor. - + All CAD Files Todos los archivos CAD - + All Files Todos los Archivos - + You have to select either two edges or two wires. Tiene que seleccionar dos aristas o dos alambres. @@ -6751,4 +6746,98 @@ Esto significa que los volúmenes superpuestos de las figuras se eliminarán. Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes. + + PartGui::DlgScale + + + Scale + Escalar + + + + X Factor + X Factor + + + + Factor + Factor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Pieza + + + + Scale... + Escala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_eu.ts b/src/Mod/Part/Gui/Resources/translations/Part_eu.ts index a28518816d..a744132ff2 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_eu.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_eu.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Pieza - - - + + + Box selection Kutxa bidezko hautapena @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Pieza - + Check Geometry Egiaztatu geometria - + Analyzes Geometry For Errors Geometria analizatzen du errore bila @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Pieza - + Color per face Kolorea aurpegi bakoitzeko - + Set the color of each individual face of the selected object. Ezarri hautatutako objektuaren banakako aurpegi bakoitzaren kolorea. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Pieza - + Measure Angular Neurketa angeluarra - + Measure the angle between two edges. Neurtu bi ertzen arteko angelua. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Pieza - + Clear All Garbitu dena - + Clear all dimensions from the screen. Garbitu pantailako kota guztiak. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Pieza - + Measure Linear Neurketa lineala - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ bi erpinen artean neurtuko da. CmdMeasureRefresh - + Part Pieza - + Refresh Freskatu - + Recalculate the dimensions if the measured points have moved. Kalkulatu kotak berriro neurtutako @@ -1279,17 +1279,17 @@ puntuak lekuz aldatu badira. CmdMeasureToggle3d - + Part Pieza - + Toggle 3D Txandakatu 3Da - + Toggle on and off all direct dimensions, including angular. Aktibatu/desaktibatu kota zuzen guztiak, @@ -1299,17 +1299,17 @@ baita angeluarra ere. CmdMeasureToggleAll - + Part Pieza - + Toggle All Txandakatu denak - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Aktibatu/desaktibatu ikusgai dauden kota guztiak: @@ -1319,17 +1319,17 @@ zuzenak, ortogonalak eta angeluarrak. CmdMeasureToggleDelta - + Part Pieza - + Toggle Delta Txandakatu delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ X, Y eta Z osagaietan. CmdPartBoolean - + Part Pieza - + Boolean... Boolearra... - + Run a boolean operation with two shapes selected Exekutatu eragiketa boolear bat hautatutako bi formarekin @@ -1379,17 +1379,17 @@ X, Y eta Z osagaietan. CmdPartBox2 - + Part Pieza - + Box fix 1 Kutxa finkoa 1 - + Create a box solid without dialog Sortu solido-kutza bat elkarrizketa-koadrorik gabe @@ -1397,17 +1397,17 @@ X, Y eta Z osagaietan. CmdPartBox3 - + Part Pieza - + Box fix 2 Kutxa finkoa 2 - + Create a box solid without dialog Sortu solido-kutza bat elkarrizketa-koadrorik gabe @@ -1415,17 +1415,17 @@ X, Y eta Z osagaietan. CmdPartBuilder - + Part Pieza - + Shape builder... Formen eraikitzailea... - + Advanced utility to create shapes Formak sortzeko utilitate aurreratua @@ -1433,17 +1433,17 @@ X, Y eta Z osagaietan. CmdPartChamfer - + Part Pieza - + Chamfer... Alaka... - + Chamfer the selected edges of a shape Alakatu forma batean hautatutako ertzak @@ -1451,17 +1451,17 @@ X, Y eta Z osagaietan. CmdPartCommon - + Part Pieza - + Intersection Ebakidura - + Make an intersection of two shapes Egin bi formaren ebakidura @@ -1469,17 +1469,17 @@ X, Y eta Z osagaietan. CmdPartCompCompoundTools - + Part Pieza - + Compound tools Konposatuen tresnak - + Compound tools: working with lists of shapes. Konposatuen tresnak: formen zerrendekin lan egitea. @@ -1487,17 +1487,17 @@ X, Y eta Z osagaietan. CmdPartCompJoinFeatures - + Part Pieza - + Join objects... Elkartu objektuak... - + Join walled objects Elkartu pareta osatzen duten objektuak @@ -1505,17 +1505,17 @@ X, Y eta Z osagaietan. CmdPartCompOffset - + Part Pieza - + Offset: Desplazamendua: - + Tools to offset shapes (construct parallel shapes) Formak desplazatzeko tresnak (forma paraleloak eraikitzeko) @@ -1523,17 +1523,17 @@ X, Y eta Z osagaietan. CmdPartCompSplitFeatures - + Part Pieza - + Split objects... Zatitu objektuak... - + Shape splitting and Compsolid creation tools. Formak zatitzeko eta konposatu solidoak sortzeko tresnak. @@ -1541,17 +1541,17 @@ X, Y eta Z osagaietan. CmdPartCompound - + Part Pieza - + Make compound Egin konposatua - + Make a compound of several shapes Egin hainbat formen konposatu bat @@ -1579,17 +1579,17 @@ X, Y eta Z osagaietan. CmdPartCrossSections - + Part Pieza - + Cross-sections... Zeharkako sekzioak... - + Cross-sections Zeharkako sekzioak @@ -1597,17 +1597,17 @@ X, Y eta Z osagaietan. CmdPartCut - + Part Pieza - + Cut Moztu - + Make a cut of two shapes Egin bi formaren mozketa bat @@ -1671,17 +1671,17 @@ X, Y eta Z osagaietan. CmdPartExport - + Part Pieza - + Export CAD... Esportatu CADa... - + Exports to a CAD file CAD fitxategi batera esportatzen du @@ -1689,17 +1689,17 @@ X, Y eta Z osagaietan. CmdPartExtrude - + Part Pieza - + Extrude... Estruitu... - + Extrude a selected sketch Estruitu hautatutako krokis bat @@ -1707,17 +1707,17 @@ X, Y eta Z osagaietan. CmdPartFillet - + Part Pieza - + Fillet... Biribildu... - + Fillet the selected edges of a shape Biribildu forma batean hautatutako ertzak @@ -1725,17 +1725,17 @@ X, Y eta Z osagaietan. CmdPartFuse - + Part Pieza - + Union Batuketa - + Make a union of several shapes Batu hainbat forma @@ -1743,17 +1743,17 @@ X, Y eta Z osagaietan. CmdPartImport - + Part Pieza - + Import CAD... Inportatu CADa... - + Imports a CAD file CAD fitxategi bat inportatzen du @@ -1761,17 +1761,17 @@ X, Y eta Z osagaietan. CmdPartImportCurveNet - + Part Pieza - + Import curve network... Inportatu kurba-sare bat... - + Import a curve network Inportatu kurba-sare bat @@ -1779,17 +1779,17 @@ X, Y eta Z osagaietan. CmdPartLoft - + Part Pieza - + Loft... Jaurti... - + Utility to loft Jaurtitzeko utilitatea @@ -1797,17 +1797,17 @@ X, Y eta Z osagaietan. CmdPartMakeFace - + Part Pieza - + Make face from wires Sortu aurpegia alanbreetatik - + Make face from set of wires (e.g. from a sketch) Sortu aurpegia alanbreen multzo batetik (adibidez krokis batetik) @@ -1815,17 +1815,17 @@ X, Y eta Z osagaietan. CmdPartMakeSolid - + Part Pieza - + Convert to solid Bihurtu solido - + Create solid from a shell or compound Sortu solidoa oskol batetik edo konposatu batetik @@ -1833,17 +1833,17 @@ X, Y eta Z osagaietan. CmdPartMirror - + Part Pieza - + Mirroring... Ispilatzen... - + Mirroring a selected shape Hautatutako forma bat ispilatzen @@ -1851,17 +1851,17 @@ X, Y eta Z osagaietan. CmdPartOffset - + Part Pieza - + 3D Offset... 3D desplazamendua... - + Utility to offset in 3D 3Dn desplazatzeko utilitatea @@ -1869,17 +1869,17 @@ X, Y eta Z osagaietan. CmdPartOffset2D - + Part Pieza - + 2D Offset... 2D desplazamendua... - + Utility to offset planar shapes Forma planarra desplazatzeko utilitatea @@ -1887,17 +1887,17 @@ X, Y eta Z osagaietan. CmdPartPickCurveNet - + Part Pieza - + Pick curve network Aukeratu kurba-sarea - + Pick a curve network Aukeratu kurba-sare bat @@ -1923,17 +1923,17 @@ X, Y eta Z osagaietan. CmdPartPrimitives - + Part Pieza - + Create primitives... Sortu jatorrizkoak... - + Creation of parametrized geometric primitives Jatorrizko geometriko parametrizatuen sorrera @@ -1941,17 +1941,17 @@ X, Y eta Z osagaietan. CmdPartProjectionOnSurface - + Part Pieza - + Create projection on surface... Sortu proiekzioa gainazalean... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ zehazten du. CmdPartReverseShape - + Part Pieza - + Reverse shapes Alderantzikatu formak - + Reverse orientation of shapes Alderantzikatu formen orientazioa @@ -2001,17 +2001,17 @@ zehazten du. CmdPartRevolve - + Part Pieza - + Revolve... Erreboluzionatu... - + Revolve a selected shape Erreboluzionatu hautatutako forma bat @@ -2019,17 +2019,17 @@ zehazten du. CmdPartRuledSurface - + Part Pieza - + Create ruled surface Sortu gainazal erregelatua - + Create a ruled surface from either two Edges or two wires Sortu gainazal erregelatua bi ertz edo bi alanbre erabiliz @@ -2037,17 +2037,17 @@ zehazten du. CmdPartSection - + Part Pieza - + Section Sekzioa - + Make a section of two shapes Egin bi formaren sekzio bat @@ -2055,12 +2055,12 @@ zehazten du. CmdPartSectionCut - + Persistent section cut Sekzio-mozte iraunkorra - + Creates a persistent section cut of visible part objects Sekzio-mozte iraunkorra sortzen du ikusgai dauden pieza-objektuetan @@ -2142,17 +2142,17 @@ zehazten du. CmdPartSweep - + Part Pieza - + Sweep... Ekortu... - + Utility to sweep Ekortzeko utilitatea @@ -2160,27 +2160,27 @@ zehazten du. CmdPartThickness - + Part Pieza - + Thickness... Lodiera... - + Utility to apply a thickness Lodiera aplikatzeko utilitatea - + Wrong selection Hautapen okerra - + Selected shape is not a solid Hautatutako forma ez da solidoa @@ -2226,73 +2226,73 @@ zehazten du. Command - - + + Part Box Create Pieza-koadroaren sorrera - + Part Cut Piezaren mozketa - + Common Komuna - + Fusion Fusioa - + Compound Konposatua - + Section Sekzioa - + Import Part Inportatu pieza - + Part Import Curve Net Piezaren kurba-sarearen inportazioa - + Reverse Alderantzizkatu - + Make face Sortu aurpegia - + Make Offset Sortu desplazamendua - + Make 2D Offset Sortu 2D desplazamendua - + Make Thickness Sortu lodiera - + Create ruled surface Sortu gainazal erregelatua @@ -2375,11 +2375,6 @@ zehazten du. PartDesignGui::TaskDatumParameters - - - Form - Inprimakia - Selection accepted @@ -5707,82 +5702,82 @@ in the 3D view for the sweep path. Editatu %1 - + Part and Part Design workbench Piezen eta pieza-diseinuaren lan-mahaia - - + + Part/Part Design Pieza/Piezen diseinua - - + + Import-Export Inportatu-Esportatu - - - - - - + + + + + + Wrong selection Hautapen okerra - - + + Select two shapes please. Hautatu bi forma. - - - - - Non-solids selected - Solidoak ez direnak hautatu dira - + Non-solids selected + Solidoak ez direnak hautatu dira + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Solidoak ez diren objektuak eragiketa boolearretan erabiltzeak espero ez diren emaitzak eman ditzake. Jarraitu nahi duzu? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Hautatu bi forma edo gehiago. Edo hautatu bi forma edo gehiago dituen konposatu bat, bien arteko zati komuna kalkulatzeko. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Hautatu bi forma edo gehiago, Edo hautatu bi forma edo gehiago dituen konposatu bat, fusionatuak izan daitezen. - + Select one shape or more, please. Hautatu forma bat edo gehiago. - + All CAD Files CAD fitxategi guztiak - + All Files Fitxategi guztiak - + You have to select either two edges or two wires. Bi ertz edo bi alanbre hautatu behar dituzu. @@ -6754,4 +6749,98 @@ Horrek esan nahi du gainjarrita dauden formen bolumenak kendu egingo direla. 'Konposatu-iragazki' bat erabili daiteke gainerako piezak erauzteko. + + PartGui::DlgScale + + + Scale + Eskala + + + + X Factor + X Factor + + + + Factor + Faktorea + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + %1' dokumentua ez da existitzen. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Pieza + + + + Scale... + Eskala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_fi.ts b/src/Mod/Part/Gui/Resources/translations/Part_fi.ts index aa90823430..cd9889bd11 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_fi.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_fi.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Osa - - - + + + Box selection Laatikon valinta @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Osa - + Check Geometry Tarkista geometria - + Analyzes Geometry For Errors Etsi geometrian virheet @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Osa - + Color per face Väri per tahko - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Osa - + Measure Angular Mittaa kulma - + Measure the angle between two edges. Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Osa - + Clear All Tyhjennä kaikki - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Osa - + Measure Linear Mittaa lineaarisesti - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Osa - + Refresh Päivitä - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Osa - + Toggle 3D Toggle 3D - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part Osa - + Toggle All Vaihda kaikki - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Osa - + Toggle Delta Vaihda Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Osa - + Boolean... Boolen operaatio... - + Run a boolean operation with two shapes selected Suorita Boolen operaatio kahdella valitulla muodolla @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Osa - + Box fix 1 Laatikon 1 kiinnitys - + Create a box solid without dialog Luo suorakulmainen kiintomuoto-särmiö ilman valintaikkunaa @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Osa - + Box fix 2 Laatikon 2 kiinnitys - + Create a box solid without dialog Luo suorakulmainen kiintomuoto-särmiö ilman valintaikkunaa @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Osa - + Shape builder... Rakenna muoto... - + Advanced utility to create shapes Lisäasetukset muotojen luomisen apuohjelmalle @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Osa - + Chamfer... Viistä... - + Chamfer the selected edges of a shape Viiste valittuihin muotoihin reunoista @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Osa - + Intersection Leikkaus - + Make an intersection of two shapes Tee kahden muodon leikkauspisteet @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Osa - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Yhdistelmämuotojen työkalut: muotolistojen käsitteleminen. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Osa - + Join objects... Yhdistä objektit... - + Join walled objects Liitä seinäkohteisiin @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Osa - + Offset: Siirtymä: - + Tools to offset shapes (construct parallel shapes) Työkalut kompensoimaan muotoja (rakenna rinnakkaisia muotoja) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Osa - + Split objects... Jaa objektit... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Osa - + Make compound Tee yhdistelmämuoto - + Make a compound of several shapes Tee yhdistelmämuoto useasta muodosta @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Osa - + Cross-sections... Poikkileikkaukset... - + Cross-sections Poikkileikkaukset @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Osa - + Cut Leikkaa - + Make a cut of two shapes Tee kahden muodon leikkaus @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Osa - + Export CAD... Vie CAD... - + Exports to a CAD file CAD-tiedoston vienti @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Osa - + Extrude... Pursota... - + Extrude a selected sketch Pursota valittu luonnos @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Osa - + Fillet... Pyöristys... - + Fillet the selected edges of a shape Pyöristä muodon valitut särmät @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Osa - + Union Unioni - + Make a union of several shapes Tee unioni (yhdiste) useista muodoista @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Osa - + Import CAD... Tuo CAD... - + Imports a CAD file Tuo CAD-tiedoston @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Osa - + Import curve network... Tuo käyrä-verkko... - + Import a curve network Tuo käyrä-verkko @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Osa - + Loft... Profiilivenytys... - + Utility to loft Apuohjelma profiilivenytykseen @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Osa - + Make face from wires Tee pintatahko langoista - + Make face from set of wires (e.g. from a sketch) Tee pintatahko lankojen kokoelmasta (esim. luonnoksesta) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Osa - + Convert to solid Muunna kiintomuodoksi - + Create solid from a shell or compound Luo kiintomuoto kuoresta tai yhdistelmämuodosta @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Osa - + Mirroring... Peilaus... - + Mirroring a selected shape Valitun muodon peilaus @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Osa - + 3D Offset... 3D-siirtymä... - + Utility to offset in 3D Apuohjelma 3D-siirtymän määrittämiseen @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Osa - + 2D Offset... 2D-siirtymä... - + Utility to offset planar shapes Työkalu tasomuotojen siirtymään @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Osa - + Pick curve network Valitse käyrä-verkko - + Pick a curve network Valitse käyrä-verkko @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Osa - + Create primitives... Luo primitiivit... - + Creation of parametrized geometric primitives Parametrisoitujen geometristen primitiivien luonti @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Osa - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part Osa - + Reverse shapes Käänteiset muodot - + Reverse orientation of shapes Käännä muotojen suunta @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part Osa - + Revolve... Pyöräytä... - + Revolve a selected shape Valitun muodon pyöräytys @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part Osa - + Create ruled surface Luo pyyhkäisypinta (viivotinpinta) - + Create a ruled surface from either two Edges or two wires Luo pyyhkäisypinta (viivotinpinta) joko kahdesta reunasta tai kahdesta langasta @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part Osa - + Section Leikkaus - + Make a section of two shapes Tee osa kahdesta muodosta @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part Osa - + Sweep... Pyyhkäise... - + Utility to sweep Pyyhkäisijä @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part Osa - + Thickness... Paksuus... - + Utility to apply a thickness Apuohjelma jolla paksuuden voi määrätä - + Wrong selection Virheellinen valinta - + Selected shape is not a solid Valittu muoto ei ole kiintomuoto @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Yhteinen - + Fusion Fusion - + Compound Yhdistelmämuoto - + Section Leikkaus - + Import Part Import Part - + Part Import Curve Net Part Import Curve Net - + Reverse Käänteinen - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Luo pyyhkäisypinta (viivotinpinta) @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Lomake - Selection accepted @@ -5711,83 +5706,83 @@ reuna tai lanka, jota pitkin reitin pyyhkäisy tehdään. Muokkaa %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Tuo/Vie - - - - - - + + + + + + Wrong selection Virheellinen valinta - - + + Select two shapes please. Valitse kaksi muotoa. - - - - - Non-solids selected - Muut kuin kiintomuodot valittu - + Non-solids selected + Muut kuin kiintomuodot valittu + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Muiden kuin kiintomuotojen käyttö voi aiheuttaa odottamattomia tuloksia Boolen operaatioita käytettäessä. Haluatko jatkaa? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Valitse vähintään kaksi muotoa. Tai valitse yksi yhdistelmämuoto, joka sisältää vähintään kaksi muotoa, jotta voidaan laskea niiden välinen leikkaus. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Valitse vähintään kaksi muotoa. Tai valitse yksi yhdistelmämuoto, joka sisältää vähintään kaksi muotoa, jotta voidaan liittää ne yhteen. - + Select one shape or more, please. Valitse yksi tai useampia muotoja. - + All CAD Files Kaikki CAD-tiedostot - + All Files Kaikki tiedostot - + You have to select either two edges or two wires. Voit valita vain kaksi reunaa tai kaksi lankaa. @@ -6760,4 +6755,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Mittakaava + + + + X Factor + X Factor + + + + Factor + Tekijä + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Muoto + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Osa + + + + Scale... + Skaalaa... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_fr.ts b/src/Mod/Part/Gui/Resources/translations/Part_fr.ts index 5ca4c12c22..8fd3fdd701 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_fr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_fr.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Pièce - - - + + + Box selection Sélectionner par une boîte @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part - Pièce + Part - + Check Geometry Vérifier la géométrie - + Analyzes Geometry For Errors Analyse la géométrie @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Part - + Color per face Couleur par face - + Set the color of each individual face of the selected object. Définir la couleur de chaque face de l’objet sélectionné. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Part - + Measure Angular Mesure angulaire - + Measure the angle between two edges. Mesurer l'angle entre deux arêtes. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Part - + Clear All Tout effacer - + Clear all dimensions from the screen. Effacer toutes les cotes à l’écran. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Part - + Measure Linear Mesure linéaire - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ cela mesurera entre deux de leurs sommets. CmdMeasureRefresh - + Part Part - + Refresh Actualiser - + Recalculate the dimensions if the measured points have moved. Recalculer les cotes @@ -1279,17 +1279,17 @@ si les points mesurés ont été déplacés. CmdMeasureToggle3d - + Part Part - + Toggle 3D Basculer en 3D - + Toggle on and off all direct dimensions, including angular. Basculer toutes les cotes directes, @@ -1299,17 +1299,17 @@ y compris angulaire. CmdMeasureToggleAll - + Part Part - + Toggle All Tout basculer - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Basculer toutes les cotes actuellement visibles, @@ -1319,17 +1319,17 @@ directes, orthogonales et angulaires. CmdMeasureToggleDelta - + Part Part - + Toggle Delta Basculer en mode delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ décomposée en ses composantes X, Y et Z. CmdPartBoolean - + Part Part - + Boolean... Opération booléenne... - + Run a boolean operation with two shapes selected Exécuter une opération booléenne sur deux formes sélectionnées @@ -1361,7 +1361,7 @@ décomposée en ses composantes X, Y et Z. Part - Part + Pièce @@ -1379,17 +1379,17 @@ décomposée en ses composantes X, Y et Z. CmdPartBox2 - + Part Part - + Box fix 1 Boîte correctif 1 - + Create a box solid without dialog Créer une boîte solide sans boîte de dialogue @@ -1397,17 +1397,17 @@ décomposée en ses composantes X, Y et Z. CmdPartBox3 - + Part Part - + Box fix 2 Boîte correctif 2 - + Create a box solid without dialog Créer une boîte solide sans boîte de dialogue @@ -1415,17 +1415,17 @@ décomposée en ses composantes X, Y et Z. CmdPartBuilder - + Part Part - + Shape builder... Générateur de forme... - + Advanced utility to create shapes Utilitaire avancé de création de formes @@ -1433,17 +1433,17 @@ décomposée en ses composantes X, Y et Z. CmdPartChamfer - + Part Part - + Chamfer... Chanfrein... - + Chamfer the selected edges of a shape Chanfreiner les arêtes sélectionnées d'une forme @@ -1451,17 +1451,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCommon - + Part Part - + Intersection Intersection - + Make an intersection of two shapes Exécuter une intersection entre deux formes @@ -1469,17 +1469,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCompCompoundTools - + Part Part - + Compound tools Outils pour des composés - + Compound tools: working with lists of shapes. Outils pour des composés : travailler avec des listes de formes. @@ -1487,17 +1487,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCompJoinFeatures - + Part Part - + Join objects... Joindre les objets... - + Join walled objects Joindre les objets à paroi @@ -1505,17 +1505,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCompOffset - + Part Part - + Offset: Décalage : - + Tools to offset shapes (construct parallel shapes) Outils pour décaler des formes (construire des formes parallèles) @@ -1523,17 +1523,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCompSplitFeatures - + Part Part - + Split objects... Éclater des objets... - + Shape splitting and Compsolid creation tools. Outils pour éclater des formes et créer des composés. @@ -1541,17 +1541,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCompound - + Part Part - + Make compound Créer un composé - + Make a compound of several shapes Créer un composé à partir de plusieurs formes @@ -1579,17 +1579,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCrossSections - + Part Part - + Cross-sections... Coupes... - + Cross-sections Coupes @@ -1597,17 +1597,17 @@ décomposée en ses composantes X, Y et Z. CmdPartCut - + Part Part - + Cut Soustraction - + Make a cut of two shapes Exécuter une soustraction sur deux formes @@ -1671,17 +1671,17 @@ décomposée en ses composantes X, Y et Z. CmdPartExport - + Part Part - + Export CAD... Exporter un fichier de CAO... - + Exports to a CAD file Exporte vers un fichier dans un format de CAO @@ -1689,17 +1689,17 @@ décomposée en ses composantes X, Y et Z. CmdPartExtrude - + Part Part - + Extrude... Extrusion... - + Extrude a selected sketch Extrusion d'une esquisse sélectionnée @@ -1707,17 +1707,17 @@ décomposée en ses composantes X, Y et Z. CmdPartFillet - + Part Part - + Fillet... Congé... - + Fillet the selected edges of a shape Créer un congé sur les arêtes sélectionnées d'une forme @@ -1725,17 +1725,17 @@ décomposée en ses composantes X, Y et Z. CmdPartFuse - + Part Part - + Union Union - + Make a union of several shapes Exécuter l'union de plusieurs formes @@ -1743,17 +1743,17 @@ décomposée en ses composantes X, Y et Z. CmdPartImport - + Part Part - + Import CAD... Importation CAO... - + Imports a CAD file Importe un fichier CAO @@ -1761,17 +1761,17 @@ décomposée en ses composantes X, Y et Z. CmdPartImportCurveNet - + Part Part - + Import curve network... Importer réseau de courbes... - + Import a curve network Importer un réseau de courbes @@ -1779,17 +1779,17 @@ décomposée en ses composantes X, Y et Z. CmdPartLoft - + Part Part - + Loft... Lissage... - + Utility to loft Lissage d'une série de profils @@ -1797,17 +1797,17 @@ décomposée en ses composantes X, Y et Z. CmdPartMakeFace - + Part Part - + Make face from wires Créer une face à partir de polylignes - + Make face from set of wires (e.g. from a sketch) Créer une face à partir d'un ensemble de polylignes (par exemple, à partir d’une esquisse) @@ -1815,17 +1815,17 @@ décomposée en ses composantes X, Y et Z. CmdPartMakeSolid - + Part Part - + Convert to solid Convertir en solide - + Create solid from a shell or compound Créer un solide à partir d'une coque ou d'un composé @@ -1833,17 +1833,17 @@ décomposée en ses composantes X, Y et Z. CmdPartMirror - + Part Part - + Mirroring... Mise en miroir... - + Mirroring a selected shape Mise en miroir de la forme sélectionnée @@ -1851,17 +1851,17 @@ décomposée en ses composantes X, Y et Z. CmdPartOffset - + Part Part - + 3D Offset... Décalage 3D... - + Utility to offset in 3D Utilitaire pour décaler en 3D @@ -1869,17 +1869,17 @@ décomposée en ses composantes X, Y et Z. CmdPartOffset2D - + Part Part - + 2D Offset... Décalage 2D... - + Utility to offset planar shapes Utilitaire pour décaler des formes planaires @@ -1887,17 +1887,17 @@ décomposée en ses composantes X, Y et Z. CmdPartPickCurveNet - + Part Part - + Pick curve network Choisir un réseau de courbes - + Pick a curve network Choisir un réseau de courbes @@ -1923,17 +1923,17 @@ décomposée en ses composantes X, Y et Z. CmdPartPrimitives - + Part Part - + Create primitives... Créer des primitives... - + Creation of parametrized geometric primitives Créer des primitives géométriques paramétrées @@ -1941,17 +1941,17 @@ décomposée en ses composantes X, Y et Z. CmdPartProjectionOnSurface - + Part Part - + Create projection on surface... Créer une projection sur une surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1982,17 +1982,17 @@ La vue caméra détermine la direction de la projection. CmdPartReverseShape - + Part Part - + Reverse shapes Inverser les formes - + Reverse orientation of shapes Inverser l'orientation des formes @@ -2000,17 +2000,17 @@ La vue caméra détermine la direction de la projection. CmdPartRevolve - + Part Part - + Revolve... Révolution... - + Revolve a selected shape Appliquer une révolution à une forme sélectionnée @@ -2018,17 +2018,17 @@ La vue caméra détermine la direction de la projection. CmdPartRuledSurface - + Part Part - + Create ruled surface Créer une surface réglée - + Create a ruled surface from either two Edges or two wires Créer une surface réglée depuis deux arêtes ou deux fils @@ -2036,17 +2036,17 @@ La vue caméra détermine la direction de la projection. CmdPartSection - + Part Part - + Section Section - + Make a section of two shapes Faire une section de deux formes @@ -2054,12 +2054,12 @@ La vue caméra détermine la direction de la projection. CmdPartSectionCut - + Persistent section cut Coupe persistante - + Creates a persistent section cut of visible part objects Crée une coupe persistante des objets de la partie visible @@ -2141,17 +2141,17 @@ La vue caméra détermine la direction de la projection. CmdPartSweep - + Part Part - + Sweep... Balayage... - + Utility to sweep Balayage d'une ou plusieurs section le long d'un chemin @@ -2159,27 +2159,27 @@ La vue caméra détermine la direction de la projection. CmdPartThickness - + Part Part - + Thickness... Évidement... - + Utility to apply a thickness Évidement d'un solide sélectionné - + Wrong selection Sélection invalide - + Selected shape is not a solid La forme sélectionnée n'est pas un solide @@ -2225,73 +2225,73 @@ La vue caméra détermine la direction de la projection. Command - - + + Part Box Create Créer un Part cube - + Part Cut Part Soustraction - + Common Intersection - + Fusion Fusion - + Compound Composé - + Section Section - + Import Part Importer une pièce - + Part Import Curve Net Part Réseau de courbe d'importation - + Reverse Inverser - + Make face Réaliser une face - + Make Offset Créer un décalage - + Make 2D Offset Créer un décalage 2D - + Make Thickness Créer une épaisseur - + Create ruled surface Créer une surface réglée @@ -2374,11 +2374,6 @@ La vue caméra détermine la direction de la projection. PartDesignGui::TaskDatumParameters - - - Form - Forme - Selection accepted @@ -3280,7 +3275,7 @@ Please check one or more edge entities first. Import - Importation + Importer @@ -3473,12 +3468,12 @@ during file reading (slower but higher details). Radius: - Rayon : + Rayon : Height: - Hauteur : + Hauteur : @@ -3668,7 +3663,7 @@ during file reading (slower but higher details). Radius: - Rayon : + Rayon : @@ -3957,17 +3952,17 @@ during file reading (slower but higher details). X: - X : + X : Y: - Y : + Y : Z: - Z : + Z : @@ -4047,7 +4042,7 @@ during file reading (slower but higher details). Angle: - Angle : + Angle : @@ -5428,7 +5423,7 @@ en traçant un rectangle de sélection dans la vue 3D Create solid - Créer un solide + Créer le solide @@ -5590,7 +5585,7 @@ en traçant un rectangle de sélection dans la vue 3D Create solid - Créer le solide + Créer un solide @@ -5629,7 +5624,7 @@ in the 3D view for the sweep path. Height: - Hauteur : + Hauteur : @@ -5711,83 +5706,83 @@ in the 3D view for the sweep path. Éditer %1 - + Part and Part Design workbench Ateliers Part et Part Design - - + + Part/Part Design Part/Part Design - - + + Import-Export Importer/Exporter - - - - - - + + + + + + Wrong selection Sélection incorrecte - - + + Select two shapes please. Veuillez sélectionner deux formes. - - - - - Non-solids selected - Formes non-pleines sélectionnées - + Non-solids selected + Formes non-pleines sélectionnées + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? L'utilisation de formes non-pleines pour les opérations booléennes peut entraîner des résultats indésirables. Voulez-vous continuer ? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Sélectionnez deux formes ou plus, ou bien, sélectionnez un composé contenant deux formes ou plus pour calculer leur intersection. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Sélectionnez deux formes ou plus, ou bien, sélectionnez un composé contenant deux formes ou plus pour calculer leur union. - + Select one shape or more, please. Veuillez sélectionner au moins une forme. - + All CAD Files Tous les fichiers CAO - + All Files Tous les fichiers - + You have to select either two edges or two wires. Vous devez sélectionner deux arêtes ou deux fils. @@ -6364,7 +6359,7 @@ Voulez-vous continuer ? Bad selection - Mauvaise sélection + Sélection non valide @@ -6447,7 +6442,7 @@ Cela créera un "filtre composé" pour chaque forme. Bad selection - Sélection non valide + Mauvaise sélection @@ -6755,4 +6750,98 @@ Cela signifie que les volumes superposés des formes seront supprimés. Un "filtre composé" peut être utilisé pour extraire les morceaux restants. + + PartGui::DlgScale + + + Scale + Échelle + + + + X Factor + X Factor + + + + Factor + Facteur + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forme + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + Document « %1 » inexistant. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Pièce + + + + Scale... + Mettre à l'échelle... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_gl.ts b/src/Mod/Part/Gui/Resources/translations/Part_gl.ts index 0f73c729d7..86ceff886f 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_gl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_gl.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Peza - - - + + + Box selection Caixa de selección @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Peza - + Check Geometry Verificar a xeometría - + Analyzes Geometry For Errors Analiza a xeometría na procura de erros @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Peza - + Color per face Cor por face - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Peza - + Measure Angular Medida Angular - + Measure the angle between two edges. Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Peza - + Clear All Limpar todo - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Peza - + Measure Linear Medida linear - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Peza - + Refresh Refrescar - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Peza - + Toggle 3D Toggle 3D - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part Peza - + Toggle All Alternar todos - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Peza - + Toggle Delta Cambiar a Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Peza - + Boolean... Booleano... - + Run a boolean operation with two shapes selected Executa unha operación booleana con dúas formas escolmadas @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Peza - + Box fix 1 Fixación 1 da caixa - + Create a box solid without dialog Crear unha caixa sólida sen diálogo @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Peza - + Box fix 2 Fixación 2 da caixa - + Create a box solid without dialog Crear unha caixa sólida sen diálogo @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Peza - + Shape builder... Construtor de formas... - + Advanced utility to create shapes Utilidade avanzada para facer formas @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Peza - + Chamfer... Chafrán... - + Chamfer the selected edges of a shape Facer chafrán nos bordos escolmados dunha forma @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Peza - + Intersection Intersección - + Make an intersection of two shapes Facer unha intersección de dúas formas @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Peza - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Ferramentas compostas: traballando con listas de formas. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Peza - + Join objects... Xuntar obxectos... - + Join walled objects Xuntar obxectos murados @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Peza - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Ferramentas para desprazar formas (constrúe formas paralelas) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Peza - + Split objects... Dividir obxectos... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Peza - + Make compound Facer composto - + Make a compound of several shapes Fai un composto a partir de varias formas @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Peza - + Cross-sections... Cortes transversais... - + Cross-sections Cortes transversais @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Peza - + Cut Tallar - + Make a cut of two shapes Facer un corte a dúas formas @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Peza - + Export CAD... Exportar CAD... - + Exports to a CAD file Exporta para un ficheiro CAD @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Peza - + Extrude... Extrudir... - + Extrude a selected sketch Extrude un esbozo escolmado @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Peza - + Fillet... Chafrán arredondado... - + Fillet the selected edges of a shape Fai un chafrán arredondado dos bordos escolmados dunha forma @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Peza - + Union Unión - + Make a union of several shapes Facer unha unión de varias formas @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Peza - + Import CAD... Importar CAD... - + Imports a CAD file Importar un ficheiro CAD @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Peza - + Import curve network... Importar rede de curvas... - + Import a curve network Importar unha rede de curvas @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Peza - + Loft... Alzamento... - + Utility to loft Utilidade para alzamento @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Peza - + Make face from wires Facer face a partir de arames - + Make face from set of wires (e.g. from a sketch) Facer face dende xogo de arames (e.x. dende un esbozo) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Peza - + Convert to solid Converter a sólido - + Create solid from a shell or compound Crear sólidos a partir dunha carcasa ou composto @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Peza - + Mirroring... Espello... - + Mirroring a selected shape Imaxe espello dunha forma escolmada @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Peza - + 3D Offset... Desprazamento 3D... - + Utility to offset in 3D Utilidade a desprazamento en 3D @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Peza - + 2D Offset... Desprazamento 2D... - + Utility to offset planar shapes Utilidade a formas chan desprazadas @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Peza - + Pick curve network Escolmar rede de curvas - + Pick a curve network Escolmar unha rede de curvas @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Peza - + Create primitives... Crear primitivas... - + Creation of parametrized geometric primitives Creación de primitivas xeométricas paramétricas @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Peza - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part Peza - + Reverse shapes Inverter formas - + Reverse orientation of shapes Inverte a orientación das formas @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part Peza - + Revolve... Virar... - + Revolve a selected shape Vira unha forma escolmada @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part Peza - + Create ruled surface Crear superficie chaira - + Create a ruled surface from either two Edges or two wires Crea unha superficie chaira a partir de dúas arestas ou dous arames @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part Peza - + Section Sección - + Make a section of two shapes Facer unha sección de dúas formas @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part Peza - + Sweep... Varrer... - + Utility to sweep Utilidade para varrer @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part Peza - + Thickness... Grosor... - + Utility to apply a thickness Utilidade para aplicar un grosor - + Wrong selection Escolma errada - + Selected shape is not a solid A forma escolmada non é un sólido @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Común - + Fusion Fusión - + Compound Composto - + Section Sección - + Import Part Import Part - + Part Import Curve Net Part Import Curve Net - + Reverse Inverter - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Crear superficie chaira @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Formulario - Selection accepted @@ -5702,82 +5697,82 @@ in the 3D view for the sweep path. Editar %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Importar-Exportar - - - - - - + + + + + + Wrong selection Escolma errada - - + + Select two shapes please. Escolme dúas formas por favor. - - - - - Non-solids selected - Escolléronse non-sólidos - + Non-solids selected + Escolléronse non-sólidos + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? O uso de non-sólidos para operacións booleanas pode levar a resultados inesperados. Quere seguir? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Escolme dúas ou máis formas, por favor. Ou, escolla un composto que conteña dúas ou máis formas para calcular a parte común entre elas. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Escolme dúas ou máis formas, por favor. Ou, escolla un composto que conteña dúas ou máis formas para seren fundidas. - + Select one shape or more, please. Escolme unha forma ou máis, por favor. - + All CAD Files Tódolos ficheiros CAD - + All Files Tódolos ficheiros - + You have to select either two edges or two wires. Ten que escolmar tamén dúas arestas ou dous arames. @@ -6750,4 +6745,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Escala + + + + X Factor + X Factor + + + + Factor + Factor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Peza + + + + Scale... + Escala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_hr.ts b/src/Mod/Part/Gui/Resources/translations/Part_hr.ts index b6290b03e5..e704c69b94 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_hr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_hr.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Geometrijsko tijelo - - - + + + Box selection Pravokutno odabiranje @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Geometrijsko tijelo - + Check Geometry Provjeri geometriju - + Analyzes Geometry For Errors Analiziranje geometrije radi grešaka @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Geometrijsko tijelo - + Color per face Boja po površini - + Set the color of each individual face of the selected object. Postavite boju svakog pojedinačnog lica odabranog objekta. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Geometrijsko tijelo - + Measure Angular Mjerenje kuta - + Measure the angle between two edges. Izmjerite kut između dva ruba. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Geometrijsko tijelo - + Clear All Obriši sve - + Clear all dimensions from the screen. Izbriši sve dimenzije sa zaslona. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Geometrijsko tijelo - + Measure Linear Mjerno ravnalo - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1260,17 +1260,17 @@ između dva njihova vrha. CmdMeasureRefresh - + Part Geometrijsko tijelo - + Refresh Osvježi - + Recalculate the dimensions if the measured points have moved. Ponovno izračunajte dimenzije @@ -1280,17 +1280,17 @@ ako su se mjerene točke pomaknule. CmdMeasureToggle3d - + Part Geometrijsko tijelo - + Toggle 3D Uključi/Isključi 3D - + Toggle on and off all direct dimensions, including angular. Uklj/isklj sve izravne dimenzije uključujući kutne. @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part Geometrijsko tijelo - + Toggle All Uključi/Isključi sve - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Uklj/isklj sve trenutno vidljive dimenzije, @@ -1319,17 +1319,17 @@ izravne, ortogonalne i kutne. CmdMeasureToggleDelta - + Part Geometrijsko tijelo - + Toggle Delta Uključi/isključi Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ na njihove X, Y ,Z komponente. CmdPartBoolean - + Part Geometrijsko tijelo - + Boolean... Booleova ... - + Run a boolean operation with two shapes selected Izvrši booleovu operaciju sa odabrana dva oblika @@ -1379,17 +1379,17 @@ na njihove X, Y ,Z komponente. CmdPartBox2 - + Part Geometrijsko tijelo - + Box fix 1 Blok popravak 1 - + Create a box solid without dialog Napravi kvadar bez dijaloga @@ -1397,17 +1397,17 @@ na njihove X, Y ,Z komponente. CmdPartBox3 - + Part Geometrijsko tijelo - + Box fix 2 Blok popravak 2 - + Create a box solid without dialog Napravi kvadar bez dijaloga @@ -1415,17 +1415,17 @@ na njihove X, Y ,Z komponente. CmdPartBuilder - + Part Geometrijsko tijelo - + Shape builder... Graditelj oblika ... - + Advanced utility to create shapes Napredni alat za izradu oblika @@ -1433,17 +1433,17 @@ na njihove X, Y ,Z komponente. CmdPartChamfer - + Part Geometrijsko tijelo - + Chamfer... Zarubi... - + Chamfer the selected edges of a shape Zarubi odabrane rubove, površine ili tijela @@ -1451,17 +1451,17 @@ na njihove X, Y ,Z komponente. CmdPartCommon - + Part Geometrijsko tijelo - + Intersection Presjek - + Make an intersection of two shapes Napravite presjek dva oblika @@ -1469,17 +1469,17 @@ na njihove X, Y ,Z komponente. CmdPartCompCompoundTools - + Part Geometrijsko tijelo - + Compound tools Alati složenih materijala - + Compound tools: working with lists of shapes. Alati složenih materijala: rad s listama oblika. @@ -1487,17 +1487,17 @@ na njihove X, Y ,Z komponente. CmdPartCompJoinFeatures - + Part Geometrijsko tijelo - + Join objects... Pridruži objekte... - + Join walled objects Pridruži zatvorene objekte @@ -1505,17 +1505,17 @@ na njihove X, Y ,Z komponente. CmdPartCompOffset - + Part Geometrijsko tijelo - + Offset: Odmak: - + Tools to offset shapes (construct parallel shapes) Alati za pomak oblika (izgradnju paralelnih oblika) @@ -1523,17 +1523,17 @@ na njihove X, Y ,Z komponente. CmdPartCompSplitFeatures - + Part Geometrijsko tijelo - + Split objects... Razdjeli objekte... - + Shape splitting and Compsolid creation tools. Alati za cijepanje Oblika i Compsolid-a. @@ -1541,17 +1541,17 @@ na njihove X, Y ,Z komponente. CmdPartCompound - + Part Geometrijsko tijelo - + Make compound Napravite spoj - + Make a compound of several shapes Napravite spoj nekoliko oblika @@ -1579,17 +1579,17 @@ na njihove X, Y ,Z komponente. CmdPartCrossSections - + Part Geometrijsko tijelo - + Cross-sections... Presjeci... - + Cross-sections Presjeci @@ -1597,17 +1597,17 @@ na njihove X, Y ,Z komponente. CmdPartCut - + Part Geometrijsko tijelo - + Cut Isječak - + Make a cut of two shapes Napravi izrez dva oblika @@ -1671,17 +1671,17 @@ na njihove X, Y ,Z komponente. CmdPartExport - + Part Geometrijsko tijelo - + Export CAD... Izvezi CAD ... - + Exports to a CAD file Izvoz u CAD datoteku @@ -1689,17 +1689,17 @@ na njihove X, Y ,Z komponente. CmdPartExtrude - + Part Geometrijsko tijelo - + Extrude... Izvuci ... - + Extrude a selected sketch Izvuci odabranu skicu @@ -1707,17 +1707,17 @@ na njihove X, Y ,Z komponente. CmdPartFillet - + Part Geometrijsko tijelo - + Fillet... Zaobli ... - + Fillet the selected edges of a shape Zaobli odabrane rubove oblika @@ -1725,17 +1725,17 @@ na njihove X, Y ,Z komponente. CmdPartFuse - + Part Geometrijsko tijelo - + Union Unija - + Make a union of several shapes Napravi uniju nekoliko oblika @@ -1743,17 +1743,17 @@ na njihove X, Y ,Z komponente. CmdPartImport - + Part Geometrijsko tijelo - + Import CAD... Učitaj CAD ... - + Imports a CAD file Učitaj CAD datoteku @@ -1761,17 +1761,17 @@ na njihove X, Y ,Z komponente. CmdPartImportCurveNet - + Part Geometrijsko tijelo - + Import curve network... Uvoz krivulje mreže... - + Import a curve network Uvoz krivulje mreže @@ -1779,17 +1779,17 @@ na njihove X, Y ,Z komponente. CmdPartLoft - + Part Geometrijsko tijelo - + Loft... Tuba... - + Utility to loft Alat za loft @@ -1797,17 +1797,17 @@ na njihove X, Y ,Z komponente. CmdPartMakeFace - + Part Geometrijsko tijelo - + Make face from wires Stvori naličje od žice - + Make face from set of wires (e.g. from a sketch) Maknuti lice od skupa žica (npr. iz skice) @@ -1815,17 +1815,17 @@ na njihove X, Y ,Z komponente. CmdPartMakeSolid - + Part Geometrijsko tijelo - + Convert to solid Pretvori u čvrsto tijelo - + Create solid from a shell or compound Napravi tijelo tijela iz ljuske ili skupine @@ -1833,17 +1833,17 @@ na njihove X, Y ,Z komponente. CmdPartMirror - + Part Geometrijsko tijelo - + Mirroring... Zrcaljenje ... - + Mirroring a selected shape Zrcaljenje odabranog oblika @@ -1851,17 +1851,17 @@ na njihove X, Y ,Z komponente. CmdPartOffset - + Part Geometrijsko tijelo - + 3D Offset... 3D Pomak... - + Utility to offset in 3D Korisni programi za pomak u 3D @@ -1869,17 +1869,17 @@ na njihove X, Y ,Z komponente. CmdPartOffset2D - + Part Geometrijsko tijelo - + 2D Offset... 2D Pomak... - + Utility to offset planar shapes Korisni programi za pomak planarnih oblika @@ -1887,17 +1887,17 @@ na njihove X, Y ,Z komponente. CmdPartPickCurveNet - + Part Geometrijsko tijelo - + Pick curve network Odaberite krivulju mreža - + Pick a curve network Odaberite krivulju mreža @@ -1923,17 +1923,17 @@ na njihove X, Y ,Z komponente. CmdPartPrimitives - + Part Geometrijsko tijelo - + Create primitives... Napravi primitivna tijela... - + Creation of parametrized geometric primitives Stvaranje parametriziranih geometrijskih primitiva @@ -1941,19 +1941,19 @@ na njihove X, Y ,Z komponente. CmdPartProjectionOnSurface - + Part Geometrijsko tijelo - + Create projection on surface... Napravite projekciju na površini... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1985,17 +1985,17 @@ projekcije. CmdPartReverseShape - + Part Geometrijsko tijelo - + Reverse shapes Zamijeni oblike - + Reverse orientation of shapes Obrnutia orijentacija oblika @@ -2003,17 +2003,17 @@ projekcije. CmdPartRevolve - + Part Geometrijsko tijelo - + Revolve... Zakreni... - + Revolve a selected shape Zakreće odabrani oblik @@ -2021,17 +2021,17 @@ projekcije. CmdPartRuledSurface - + Part Geometrijsko tijelo - + Create ruled surface Napravi glavnu površinu - + Create a ruled surface from either two Edges or two wires Izradi pravilnu površinu iz dva ruba ili dvije žice @@ -2039,17 +2039,17 @@ projekcije. CmdPartSection - + Part Geometrijsko tijelo - + Section Odsječak - + Make a section of two shapes Napravi sekciju dva oblika @@ -2057,12 +2057,12 @@ projekcije. CmdPartSectionCut - + Persistent section cut Trajni rez presjeka - + Creates a persistent section cut of visible part objects Stvara trajni rez presjeka vidljivih dijelova objekata @@ -2146,17 +2146,17 @@ projekcije. CmdPartSweep - + Part Geometrijsko tijelo - + Sweep... Zamah... - + Utility to sweep Alat za zamah @@ -2164,27 +2164,27 @@ projekcije. CmdPartThickness - + Part Geometrijsko tijelo - + Thickness... Debljina... - + Utility to apply a thickness Alat za postavljanje debljine - + Wrong selection Pogrešan odabir - + Selected shape is not a solid Odabrani oblik nije tijelo @@ -2230,73 +2230,73 @@ projekcije. Command - - + + Part Box Create Stvori kutiju dijela - + Part Cut Rezanje djela - + Common Zajedničko - + Fusion Spajanje - + Compound Spoj - + Section Odsječak - + Import Part Uvezi dio - + Part Import Curve Net Net krivulja uvoza dijela - + Reverse Obrnuto - + Make face Napravi lice - + Make Offset Napravi pomak - + Make 2D Offset Napravi 2D pomak - + Make Thickness Napravi debljinu - + Create ruled surface Napravi glavnu površinu @@ -2379,11 +2379,6 @@ projekcije. PartDesignGui::TaskDatumParameters - - - Form - Obrazac - Selection accepted @@ -5729,82 +5724,82 @@ u 3D pogledu kao putanju za zamah. Uređivanje %1 - + Part and Part Design workbench Radni stol Djelovi i Izrada djelova - - + + Part/Part Design Djelovi/Izrada djelova - - + + Import-Export Uvoz / izvoz - - - - - - + + + + + + Wrong selection Pogrešan odabir - - + + Select two shapes please. Molim odaberite dva oblika. - - - - - Non-solids selected - Ne-čvrsto tijelo odabrano - + Non-solids selected + Ne-čvrsto tijelo odabrano + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Korištenje ne-čvrstih tijela za Booleove operacije može dovesti do neočekivanih rezultata. Želite li nastaviti? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Odaberite dva oblika ili više oblika, ili odaberite jedan spojeni dio koji sadrži dva ili više oblika od kojih se izračuna presjek između njih. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Odaberite dva oblika ili više oblika, ili odaberite jedan spojeni dio koji sadrži dva ili više oblika koji če se spojiti. - + Select one shape or more, please. Odaberite jedan ili više oblika. - + All CAD Files Sve CAD datoteke - + All Files Sve datoteke - + You have to select either two edges or two wires. Trebate odabrati bilo dvije oštrice ili dvije žice. @@ -6799,4 +6794,98 @@ To znači da će se ukloniti preklapajući volumeni oblika. 'Složeni filtar' može se koristiti za izdvajanje preostalih dijelova. + + PartGui::DlgScale + + + Scale + Skaliraj + + + + X Factor + X Factor + + + + Factor + Faktor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Oblik + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Geometrijsko tijelo + + + + Scale... + Skalirajte... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_hu.ts b/src/Mod/Part/Gui/Resources/translations/Part_hu.ts index 29aa3d8115..c96b906ff3 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_hu.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_hu.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Alkatrész - - - + + + Box selection Négyzet kiválasztás @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Alkatrész - + Check Geometry Geometria ellenőrzése - + Analyzes Geometry For Errors Geometria hiba analízis @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Alkatrész - + Color per face Felületenkénti szín - + Set the color of each individual face of the selected object. Állítsa be a kijelölt tárgy összes falának színét. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Alkatrész - + Measure Angular Hosszirányú méretezés - + Measure the angle between two edges. Mérje meg a két él közötti szöget. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Alkatrész - + Clear All Minden törlése - + Clear all dimensions from the screen. Törölje az összes méretet a képernyőről. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Alkatrész - + Measure Linear Egyenes méretezés - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ a mérést a két csúcs között kell végezni. CmdMeasureRefresh - + Part Alkatrész - + Refresh Frissítés - + Recalculate the dimensions if the measured points have moved. A mérési pontok mozgatásakor @@ -1279,17 +1279,17 @@ számítsa újra a méreteket. CmdMeasureToggle3d - + Part Alkatrész - + Toggle 3D 3D kapcsolása - + Toggle on and off all direct dimensions, including angular. Kapcsolja ki és tiltsa le az összes közvetlen méretet, @@ -1299,17 +1299,17 @@ beleértve a szöget. CmdMeasureToggleAll - + Part Alkatrész - + Toggle All Mindegyiket kapcsolja - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Kapcsolja ki és be az összes jelenleg látható méretezést, @@ -1319,17 +1319,17 @@ közvetlent, merőlegest és szögest. CmdMeasureToggleDelta - + Part Alkatrész - + Toggle Delta Delta ki-/ bekapcsolása - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ X, Y és Z komponenseire. CmdPartBoolean - + Part Alkatrész - + Boolean... Logikai... - + Run a boolean operation with two shapes selected Logikai művelet végrehajtása a két kijelölt alakzaton @@ -1379,17 +1379,17 @@ X, Y és Z komponenseire. CmdPartBox2 - + Part Alkatrész - + Box fix 1 Rögzített doboz 1 - + Create a box solid without dialog Hozzon létre egy doboz szilárd testet párbeszéd nélkül @@ -1397,17 +1397,17 @@ X, Y és Z komponenseire. CmdPartBox3 - + Part Alkatrész - + Box fix 2 Rögzített doboz 2 - + Create a box solid without dialog Hozzon létre egy doboz szilárd testet párbeszéd nélkül @@ -1415,17 +1415,17 @@ X, Y és Z komponenseire. CmdPartBuilder - + Part Alkatrész - + Shape builder... Alak építő ... - + Advanced utility to create shapes Forma létrehozó fejlett eszköz @@ -1433,17 +1433,17 @@ X, Y és Z komponenseire. CmdPartChamfer - + Part Alkatrész - + Chamfer... Letörés... - + Chamfer the selected edges of a shape Az alakzat kijelölt éleinek letörése @@ -1451,17 +1451,17 @@ X, Y és Z komponenseire. CmdPartCommon - + Part Alkatrész - + Intersection Metszet - + Make an intersection of two shapes Készíts egy metszetet két alakzattal @@ -1469,17 +1469,17 @@ X, Y és Z komponenseire. CmdPartCompCompoundTools - + Part Alkatrész - + Compound tools Kapcsolati eszközök - + Compound tools: working with lists of shapes. Egyesítő eszközök: munka az alakzatok listáival. @@ -1487,17 +1487,17 @@ X, Y és Z komponenseire. CmdPartCompJoinFeatures - + Part Alkatrész - + Join objects... Objektumok csatlakoztatása... - + Join walled objects Fallal határolt objektumok csatlakoztatása @@ -1505,17 +1505,17 @@ X, Y és Z komponenseire. CmdPartCompOffset - + Part Alkatrész - + Offset: Eltolás: - + Tools to offset shapes (construct parallel shapes) Eszközök az alakzatok eltolásához (párhuzamos alakzatokat épít) @@ -1523,17 +1523,17 @@ X, Y és Z komponenseire. CmdPartCompSplitFeatures - + Part Alkatrész - + Split objects... Objektumok felosztása... - + Shape splitting and Compsolid creation tools. Szerszámok a formák felosztásához és az összetett testek létrehozásához. @@ -1541,17 +1541,17 @@ X, Y és Z komponenseire. CmdPartCompound - + Part Alkatrész - + Make compound Összetett létrehozása - + Make a compound of several shapes Több alakzat összetettjének létrehozása @@ -1579,17 +1579,17 @@ X, Y és Z komponenseire. CmdPartCrossSections - + Part Alkatrész - + Cross-sections... Keresztmetszet... - + Cross-sections Keresztmetszet @@ -1597,17 +1597,17 @@ X, Y és Z komponenseire. CmdPartCut - + Part Alkatrész - + Cut Kivágás - + Make a cut of two shapes Készíts egy kivágást két alakzattal @@ -1671,17 +1671,17 @@ X, Y és Z komponenseire. CmdPartExport - + Part Alkatrész - + Export CAD... Export CAD ... - + Exports to a CAD file CAD fájlok exportálása @@ -1689,17 +1689,17 @@ X, Y és Z komponenseire. CmdPartExtrude - + Part Alkatrész - + Extrude... Kihúzás... - + Extrude a selected sketch Kiválasztott vázlat kihúzása @@ -1707,17 +1707,17 @@ X, Y és Z komponenseire. CmdPartFillet - + Part Alkatrész - + Fillet... Lekerekítés... - + Fillet the selected edges of a shape Egy alakzat kiválasztott éleinek lekerekítése @@ -1725,17 +1725,17 @@ X, Y és Z komponenseire. CmdPartFuse - + Part Alkatrész - + Union Egyesítés - + Make a union of several shapes Készíts egy egyesítést több alakzattal @@ -1743,17 +1743,17 @@ X, Y és Z komponenseire. CmdPartImport - + Part Alkatrész - + Import CAD... CAD import... - + Imports a CAD file CAD-fájl importálása @@ -1761,17 +1761,17 @@ X, Y és Z komponenseire. CmdPartImportCurveNet - + Part Alkatrész - + Import curve network... Görbe hálózat importálás... - + Import a curve network Görbe hálózat importálása @@ -1779,17 +1779,17 @@ X, Y és Z komponenseire. CmdPartLoft - + Part Alkatrész - + Loft... Szint ... - + Utility to loft Elágazás segédprogram @@ -1797,17 +1797,17 @@ X, Y és Z komponenseire. CmdPartMakeFace - + Part Alkatrész - + Make face from wires Felület létrehozás hálóból - + Make face from set of wires (e.g. from a sketch) Felület létrehozás meghatározott hálókból (pl. egy vázlatból) @@ -1815,17 +1815,17 @@ X, Y és Z komponenseire. CmdPartMakeSolid - + Part Alkatrész - + Convert to solid Konvertálás szilárd testté - + Create solid from a shell or compound Hozzon létre egy alakzatot szilárd héjból vagy összetettből @@ -1833,17 +1833,17 @@ X, Y és Z komponenseire. CmdPartMirror - + Part Alkatrész - + Mirroring... Tükrözés... - + Mirroring a selected shape A kijelölt alakzat tükrözése @@ -1851,17 +1851,17 @@ X, Y és Z komponenseire. CmdPartOffset - + Part Alkatrész - + 3D Offset... 3D eltolás... - + Utility to offset in 3D Segéd a 3D eltolás alkalmazásához @@ -1869,17 +1869,17 @@ X, Y és Z komponenseire. CmdPartOffset2D - + Part Alkatrész - + 2D Offset... 2D eltolás... - + Utility to offset planar shapes Segéd a síkbeli eltolás alkalmazásához @@ -1887,17 +1887,17 @@ X, Y és Z komponenseire. CmdPartPickCurveNet - + Part Alkatrész - + Pick curve network Válasszon görbét - + Pick a curve network Válasszon egy görbét @@ -1923,17 +1923,17 @@ X, Y és Z komponenseire. CmdPartPrimitives - + Part Alkatrész - + Create primitives... Alaptestek létrehozása... - + Creation of parametrized geometric primitives Paraméteres geometriai alaptestek létrehozása @@ -1941,17 +1941,17 @@ X, Y és Z komponenseire. CmdPartProjectionOnSurface - + Part Alkatrész - + Create projection on surface... Kivetítés létrehozása a felületen... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ irányát. CmdPartReverseShape - + Part Alkatrész - + Reverse shapes Fordított alakzat - + Reverse orientation of shapes Alakzat irányának megfordítása @@ -2001,17 +2001,17 @@ irányát. CmdPartRevolve - + Part Alkatrész - + Revolve... Körmetszés... - + Revolve a selected shape Kijelölt alakzat körmetszése @@ -2019,17 +2019,17 @@ irányát. CmdPartRuledSurface - + Part Alkatrész - + Create ruled surface Zárható felület létrehozása - + Create a ruled surface from either two Edges or two wires Vonalazott felület létrehozása két élből vagy két dróthálóból @@ -2037,17 +2037,17 @@ irányát. CmdPartSection - + Part Alkatrész - + Section Szakasz - + Make a section of two shapes Szakasz készítése két alakzattal @@ -2055,12 +2055,12 @@ irányát. CmdPartSectionCut - + Persistent section cut Állandó szakaszkivágás - + Creates a persistent section cut of visible part objects Állandó szakaszkivágást hoz létre látható alkatrész tárgyból @@ -2142,17 +2142,17 @@ irányát. CmdPartSweep - + Part Alkatrész - + Sweep... Húzás... - + Utility to sweep Segédprogram a húzáshoz @@ -2160,27 +2160,27 @@ irányát. CmdPartThickness - + Part Alkatrész - + Thickness... Vastagság... - + Utility to apply a thickness Segéd a vastagságok alkalmazásához - + Wrong selection Rossz kijelölés - + Selected shape is not a solid A kijelölt alakzat nem szilárd test @@ -2226,73 +2226,73 @@ irányát. Command - - + + Part Box Create Párhuzamos alkatrész létrehozása - + Part Cut Rész szakasz - + Common Közös - + Fusion Kapcsolat - + Compound Összetétel - + Section Szakasz - + Import Part Alkatrész importálása - + Part Import Curve Net Ívelt hálórész importálása - + Reverse Fordított - + Make face Felület létrehozása - + Make Offset Eltolás - + Make 2D Offset 2D eltolás létrehozása - + Make Thickness Vastagság létrehozása - + Create ruled surface Zárható felület létrehozása @@ -2375,11 +2375,6 @@ irányát. PartDesignGui::TaskDatumParameters - - - Form - Űrlap - Selection accepted @@ -4053,7 +4048,7 @@ a fájl olvasása közben (lassabb, de pontosabb). Angle: - Dőlésszög: + Szög: @@ -5705,82 +5700,82 @@ in the 3D view for the sweep path. %1 szerkesztése - + Part and Part Design workbench Alkatrész és Alkatrész tervezési munkafelület - - + + Part/Part Design Alaktrész/Alkatrész tervezés - - + + Import-Export Importálás-Exportálás - - - - - - + + + + + + Wrong selection Rossz kijelölés - - + + Select two shapes please. Két alakzatot jelöljön ki. - - - - - Non-solids selected - Nem szilárdtest a kiválasztott - + Non-solids selected + Nem szilárdtest a kiválasztott + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Logikai műveletekben a nem szilárdtestek használata nem várt eredményekhez vezethet. Folytatni szeretné? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Kérjük válasszon két vagy több alakzatot. Vagy válasszon két vagy több alakzatból állót, melynek összeolvadása számolható. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Kérjük válasszon két vagy több alakzatot. Vagy válasszon két vagy több alakzatból állót, melyet összeolvaszt. - + Select one shape or more, please. Kérem, válasszon egy vagy több alakzatot. - + All CAD Files Minden CAD fájl - + All Files Összes fájl - + You have to select either two edges or two wires. Választani kell két élet, vagy két dróthálót. @@ -6751,4 +6746,98 @@ Ez azt jelenti, hogy az alakzatok egymást átfedő formái törlődnek. A fennmaradó darabok kivonására az 'összetevő szűrő' használható. + + PartGui::DlgScale + + + Scale + Méretezés + + + + X Factor + X Factor + + + + Factor + Tényező + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Alakzat + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + A '%1' dokumentum nem létezik. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Alkatrész + + + + Scale... + Lépték... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_id.ts b/src/Mod/Part/Gui/Resources/translations/Part_id.ts index 1a816e441c..d3c992974d 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_id.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_id.ts @@ -1261,14 +1261,14 @@ Of course this example is not real (first for all fuel tanks cannot be placed in CmdBoxSelection - + Part Bagian - - - + + + Box selection Pemilihan kotak @@ -1276,17 +1276,17 @@ Of course this example is not real (first for all fuel tanks cannot be placed in CmdCheckGeometry - + Part Bagian - + Check Geometry Periksa Geometri - + Analyzes Geometry For Errors Analisis Geometri Untuk Kesalahan @@ -1294,17 +1294,17 @@ Of course this example is not real (first for all fuel tanks cannot be placed in CmdColorPerFace - + Part Bagian - + Color per face Warna per wajah - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1312,17 +1312,17 @@ Of course this example is not real (first for all fuel tanks cannot be placed in CmdMeasureAngular - + Part Bagian - + Measure Angular Ukur Sudut - + Measure the angle between two edges. Measure the angle between two edges. @@ -1330,17 +1330,17 @@ Of course this example is not real (first for all fuel tanks cannot be placed in CmdMeasureClearAll - + Part Bagian - + Clear All Bersihkan semua - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1348,17 +1348,17 @@ Of course this example is not real (first for all fuel tanks cannot be placed in CmdMeasureLinear - + Part Bagian - + Measure Linear Ukur Linear - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1370,17 +1370,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Bagian - + Refresh Menyegarkan - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1390,17 +1390,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Bagian - + Toggle 3D Toggle 3D - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1410,17 +1410,17 @@ including angular. CmdMeasureToggleAll - + Part Bagian - + Toggle All Toggle All - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1430,17 +1430,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Bagian - + Toggle Delta Toggle Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1452,17 +1452,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Bagian - + Boolean... Boolean... - + Run a boolean operation with two shapes selected Menjalankan operasi boolean dengan dua bentuk yang dipilih @@ -1490,17 +1490,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Bagian - + Box fix 1 Memperbaiki kotak 1 - + Create a box solid without dialog Membuat kotak padat tanpa dialog @@ -1508,17 +1508,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Bagian - + Box fix 2 Kotak memperbaiki 2 - + Create a box solid without dialog Membuat kotak padat tanpa dialog @@ -1526,17 +1526,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Bagian - + Shape builder... Bentuk pembangun... - + Advanced utility to create shapes Utilitas lanjutan untuk membuat bentuk @@ -1544,17 +1544,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Bagian - + Chamfer... Chamfer... - + Chamfer the selected edges of a shape Talang tepi yang dipilih dari bentuk @@ -1562,17 +1562,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Bagian - + Intersection Persimpangan - + Make an intersection of two shapes Buat persimpangan dua bentuk @@ -1580,17 +1580,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Bagian - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Compound tools: working with lists of shapes. @@ -1598,17 +1598,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Bagian - + Join objects... Bergabunglah dengan objek... - + Join walled objects Bergabunglah dengan benda-benda bertembok @@ -1616,17 +1616,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Bagian - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Alat untuk mengimbangi bentuk (membangun bentuk paralel) @@ -1634,17 +1634,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Bagian - + Split objects... Membagi objek... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1652,17 +1652,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Bagian - + Make compound Buat senyawa - + Make a compound of several shapes Buatlah senyawa dari beberapa bentuk @@ -1690,17 +1690,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Bagian - + Cross-sections... Persimpangan... - + Cross-sections Persimpangan @@ -1708,17 +1708,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Bagian - + Cut Memotong - + Make a cut of two shapes Buat potongan dua bentuk @@ -1782,17 +1782,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Bagian - + Export CAD... Ekspor CAD... - + Exports to a CAD file Ekspor ke file CAD @@ -1800,17 +1800,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Bagian - + Extrude... Mengusir... - + Extrude a selected sketch Ekstrusi sketsa yang dipilih @@ -1818,17 +1818,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Bagian - + Fillet... Fillet... - + Fillet the selected edges of a shape Fillet tepi tepi yang dipilih @@ -1836,17 +1836,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Bagian - + Union Persatuan - + Make a union of several shapes Buat penyatuan beberapa bentuk @@ -1854,17 +1854,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Bagian - + Import CAD... Impor CAD... - + Imports a CAD file Impor file CAD @@ -1872,17 +1872,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Bagian - + Import curve network... Impor jaringan kurva... - + Import a curve network Impor jaringan kurva @@ -1890,17 +1890,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Bagian - + Loft... Loteng... - + Utility to loft Utilitas untuk loteng @@ -1908,17 +1908,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Bagian - + Make face from wires Buat wajah dari kabel - + Make face from set of wires (e.g. from a sketch) Make face from set of wires (e.g. from a sketch) @@ -1926,17 +1926,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Bagian - + Convert to solid Konversikan ke solid - + Create solid from a shell or compound Buat padat dari cangkang atau majemuk @@ -1944,17 +1944,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Bagian - + Mirroring... Cermin... - + Mirroring a selected shape Cermin bentuk yang dipilih @@ -1962,17 +1962,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Bagian - + 3D Offset... 3D Offset... - + Utility to offset in 3D Utility to offset in 3D @@ -1980,17 +1980,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Bagian - + 2D Offset... 2D Offset... - + Utility to offset planar shapes Utility to offset planar shapes @@ -1998,17 +1998,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Bagian - + Pick curve network Pilih jaringan kurva - + Pick a curve network Pilih jaringan kurva @@ -2034,17 +2034,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Bagian - + Create primitives... Buat primitif... - + Creation of parametrized geometric primitives Pembuatan parametrik geometris primitif @@ -2052,17 +2052,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Bagian - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -2094,17 +2094,17 @@ of projection. CmdPartReverseShape - + Part Bagian - + Reverse shapes Bentuk terbalik - + Reverse orientation of shapes Orientasi terbalik bentuknya @@ -2112,17 +2112,17 @@ of projection. CmdPartRevolve - + Part Bagian - + Revolve... Berputar... - + Revolve a selected shape Putar bentuk yang dipilih @@ -2130,17 +2130,17 @@ of projection. CmdPartRuledSurface - + Part Bagian - + Create ruled surface Buat permukaan yang diperintah - + Create a ruled surface from either two Edges or two wires Menciptakan permukaan memerintah dari dua sisi atau dua kabel @@ -2148,17 +2148,17 @@ of projection. CmdPartSection - + Part Bagian - + Section Bagian - + Make a section of two shapes Membuat bagian dari dua bentuk @@ -2166,12 +2166,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2253,17 +2253,17 @@ of projection. CmdPartSweep - + Part Bagian - + Sweep... Menyapu... - + Utility to sweep Utilitas untuk menyapu @@ -2271,27 +2271,27 @@ of projection. CmdPartThickness - + Part Bagian - + Thickness... Ketebalan... - + Utility to apply a thickness Utilitas untuk menerapkan ketebalan - + Wrong selection Pilihan salah - + Selected shape is not a solid Bentuk yang dipilih memang tidak padat @@ -2337,73 +2337,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Umum - + Fusion Fusion - + Compound Senyawa - + Section Bagian - + Import Part Import Part - + Part Import Curve Net Part Import Curve Net - + Reverse Membalikkan - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Buat permukaan yang diperintah @@ -2486,11 +2486,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Bentuk - Selection accepted @@ -5819,82 +5814,82 @@ di 3D pandangan untuk menyapu jalan. Edit %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Ekspor Impor - - - - - - + + + + + + Wrong selection Pilihan salah - - + + Select two shapes please. Pilih dua bentuk. - - - - - Non-solids selected - Non-padat dipilih - + Non-solids selected + Non-padat dipilih + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Penggunaan non-padatan untuk operasi boolean dapat menyebabkan hasil yang tidak diharapkan. Apakah Anda ingin melanjutkan? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Pilih dua bentuk atau lebih, silakan. Atau, pilih satu senyawa yang mengandung dua atau lebih bentuk untuk menghitung umum di antaranya. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Pilih dua bentuk atau lebih, silakan. Atau, pilih satu senyawa yang mengandung dua atau lebih bentuk yang akan disatukan. - + Select one shape or more, please. Pilih satu bentuk atau lebih, silakan. - + All CAD Files Semua File CAD - + All Files Semua data - + You have to select either two edges or two wires. Anda harus memilih dua sisi atau dua kabel. @@ -6867,4 +6862,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Skala + + + + X Factor + X Factor + + + + Factor + Faktor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Bentuk + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Bagian + + + + Scale... + Skala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_it.ts b/src/Mod/Part/Gui/Resources/translations/Part_it.ts index e939959ef4..4cf7842edc 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_it.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_it.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Parte - - - + + + Box selection Box di selezione @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Parte - + Check Geometry Controlla la geometria - + Analyzes Geometry For Errors Analizza la geometria alla ricerca di errori @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Parte - + Color per face Colore per faccia - + Set the color of each individual face of the selected object. Imposta il colore di ogni singola faccia dell'oggetto selezionato. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Parte - + Measure Angular Misura angolare - + Measure the angle between two edges. Misura l'angolo tra due bordi. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Parte - + Clear All Cancella tutto - + Clear all dimensions from the screen. Cancella tutte le quotature dallo schermo. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Parte - + Measure Linear Misura lineare - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ tra due vertici. CmdMeasureRefresh - + Part Parte - + Refresh Aggiorna - + Recalculate the dimensions if the measured points have moved. Ricalcolare le quotature @@ -1279,17 +1279,17 @@ se i punti misurati si sono spostati. CmdMeasureToggle3d - + Part Parte - + Toggle 3D Attiva/disattiva 3D - + Toggle on and off all direct dimensions, including angular. Attiva/disattiva tutte le quotature dirette, @@ -1299,17 +1299,17 @@ compreso l'angolare. CmdMeasureToggleAll - + Part Parte - + Toggle All Attiva/disattiva tutte le misure - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Attiva/disattiva tutte le quotature attualmente visibili, @@ -1319,17 +1319,17 @@ dirette, ortogonali e angolari. CmdMeasureToggleDelta - + Part Parte - + Toggle Delta Attiva/disattiva Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ nei suoi componenti X, Y e Z. CmdPartBoolean - + Part Parte - + Boolean... Operazione booleana... - + Run a boolean operation with two shapes selected Esegue un'operazione booleana tra le due forme selezionate @@ -1379,17 +1379,17 @@ nei suoi componenti X, Y e Z. CmdPartBox2 - + Part Parte - + Box fix 1 Fissa prisma 1 - + Create a box solid without dialog Crea una prisma solido senza finestra di dialogo @@ -1397,17 +1397,17 @@ nei suoi componenti X, Y e Z. CmdPartBox3 - + Part Parte - + Box fix 2 Fissa prisma 2 - + Create a box solid without dialog Crea una prisma solido senza finestra di dialogo @@ -1415,17 +1415,17 @@ nei suoi componenti X, Y e Z. CmdPartBuilder - + Part Parte - + Shape builder... Genera una forma... - + Advanced utility to create shapes Utilità avanzate per creare forme @@ -1433,17 +1433,17 @@ nei suoi componenti X, Y e Z. CmdPartChamfer - + Part Parte - + Chamfer... Smussa... - + Chamfer the selected edges of a shape Smussa gli spigoli selezionati di una forma @@ -1451,17 +1451,17 @@ nei suoi componenti X, Y e Z. CmdPartCommon - + Part Parte - + Intersection Intersezione - + Make an intersection of two shapes Esegue un'intersezione di due forme @@ -1469,17 +1469,17 @@ nei suoi componenti X, Y e Z. CmdPartCompCompoundTools - + Part Parte - + Compound tools Strumenti per solidi composti - + Compound tools: working with lists of shapes. Strumenti per composti: funzionano con liste di forme. @@ -1487,17 +1487,17 @@ nei suoi componenti X, Y e Z. CmdPartCompJoinFeatures - + Part Parte - + Join objects... Congiungi gli oggetti... - + Join walled objects Congiungi oggetti cavi @@ -1505,17 +1505,17 @@ nei suoi componenti X, Y e Z. CmdPartCompOffset - + Part Parte - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Strumenti per creare offset delle forme (costruire forme parallele) @@ -1523,17 +1523,17 @@ nei suoi componenti X, Y e Z. CmdPartCompSplitFeatures - + Part Parte - + Split objects... Dividere gli oggetti... - + Shape splitting and Compsolid creation tools. Strumenti di taglio della forma e creazione solidi composti. @@ -1541,17 +1541,17 @@ nei suoi componenti X, Y e Z. CmdPartCompound - + Part Parte - + Make compound Crea un composto - + Make a compound of several shapes Crea un composto di diverse forme @@ -1579,17 +1579,17 @@ nei suoi componenti X, Y e Z. CmdPartCrossSections - + Part Parte - + Cross-sections... Sezioni... - + Cross-sections Sezioni @@ -1597,17 +1597,17 @@ nei suoi componenti X, Y e Z. CmdPartCut - + Part Parte - + Cut Taglio - + Make a cut of two shapes Esegue un taglio di due forme @@ -1671,17 +1671,17 @@ nei suoi componenti X, Y e Z. CmdPartExport - + Part Parte - + Export CAD... Esporta CAD... - + Exports to a CAD file Esportazione in un file CAD @@ -1689,17 +1689,17 @@ nei suoi componenti X, Y e Z. CmdPartExtrude - + Part Parte - + Extrude... Estrudi... - + Extrude a selected sketch Estrude lo sketch selezionato @@ -1707,17 +1707,17 @@ nei suoi componenti X, Y e Z. CmdPartFillet - + Part Parte - + Fillet... Raccorda... - + Fillet the selected edges of a shape Raccorda gli spigoli selezionati in una forma @@ -1725,17 +1725,17 @@ nei suoi componenti X, Y e Z. CmdPartFuse - + Part Parte - + Union Unione - + Make a union of several shapes Esegue un'unione di varie forme @@ -1743,17 +1743,17 @@ nei suoi componenti X, Y e Z. CmdPartImport - + Part Parte - + Import CAD... Importa CAD... - + Imports a CAD file Importa un file CAD @@ -1761,17 +1761,17 @@ nei suoi componenti X, Y e Z. CmdPartImportCurveNet - + Part Parte - + Import curve network... Importa una rete di curve... - + Import a curve network Importa una rete di curve @@ -1779,17 +1779,17 @@ nei suoi componenti X, Y e Z. CmdPartLoft - + Part Parte - + Loft... Loft... - + Utility to loft Utilità per loft @@ -1797,17 +1797,17 @@ nei suoi componenti X, Y e Z. CmdPartMakeFace - + Part Parte - + Make face from wires Crea faccia da wire - + Make face from set of wires (e.g. from a sketch) Crea una faccia da una serie di contorni (ad esempio da uno schizzo) @@ -1815,17 +1815,17 @@ nei suoi componenti X, Y e Z. CmdPartMakeSolid - + Part Parte - + Convert to solid Converti in solido - + Create solid from a shell or compound Crea solido da un guscio o un composto @@ -1833,17 +1833,17 @@ nei suoi componenti X, Y e Z. CmdPartMirror - + Part Parte - + Mirroring... Specchia... - + Mirroring a selected shape Specchia una forma selezionata @@ -1851,17 +1851,17 @@ nei suoi componenti X, Y e Z. CmdPartOffset - + Part Parte - + 3D Offset... Offset 3D... - + Utility to offset in 3D Utilità di offset in 3D @@ -1869,17 +1869,17 @@ nei suoi componenti X, Y e Z. CmdPartOffset2D - + Part Parte - + 2D Offset... Offset 2D... - + Utility to offset planar shapes Utilità per offset di forme planari @@ -1887,17 +1887,17 @@ nei suoi componenti X, Y e Z. CmdPartPickCurveNet - + Part Parte - + Pick curve network Specifica rete di curve - + Pick a curve network Specifica una rete di curve @@ -1923,17 +1923,17 @@ nei suoi componenti X, Y e Z. CmdPartPrimitives - + Part Parte - + Create primitives... Crea primitive... - + Creation of parametrized geometric primitives Crea primitive geometriche parametriche @@ -1941,17 +1941,17 @@ nei suoi componenti X, Y e Z. CmdPartProjectionOnSurface - + Part Parte - + Create projection on surface... Crea proiezione su superficie... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ della proiezione. CmdPartReverseShape - + Part Parte - + Reverse shapes Inverti forme - + Reverse orientation of shapes Inverte l'orientamento delle forme @@ -2001,17 +2001,17 @@ della proiezione. CmdPartRevolve - + Part Parte - + Revolve... Rivoluziona... - + Revolve a selected shape Rivoluziona una forma selezionata @@ -2019,17 +2019,17 @@ della proiezione. CmdPartRuledSurface - + Part Parte - + Create ruled surface Crea superficie rigata - + Create a ruled surface from either two Edges or two wires Crea una superficie rigata tra due spigoli o due polilinee, cioè una superficie di tipo mesh a maglie poligonali @@ -2037,17 +2037,17 @@ della proiezione. CmdPartSection - + Part Parte - + Section Seziona - + Make a section of two shapes Esegue una sezione di due forme @@ -2055,12 +2055,12 @@ della proiezione. CmdPartSectionCut - + Persistent section cut Taglio sezione persistente - + Creates a persistent section cut of visible part objects Crea una sezione persistente di oggetti di Parti visibili @@ -2142,17 +2142,17 @@ della proiezione. CmdPartSweep - + Part Parte - + Sweep... Sweep... - + Utility to sweep Utilità per lo sweep @@ -2160,27 +2160,27 @@ della proiezione. CmdPartThickness - + Part Parte - + Thickness... Spessore... - + Utility to apply a thickness Utilità di applicazione spessore - + Wrong selection Selezione errata - + Selected shape is not a solid La forma selezionata non è un solido @@ -2226,73 +2226,73 @@ della proiezione. Command - - + + Part Box Create Crea una parte parallelepipedo - + Part Cut Taglia Parte - + Common Comune - + Fusion Fusione - + Compound Composto - + Section Seziona - + Import Part Importa Parte - + Part Import Curve Net Importa Parte Curve Net - + Reverse Inverti - + Make face Crea faccia - + Make Offset Fai un offset - + Make 2D Offset Fai un offset 2D - + Make Thickness Rendi spessore - + Create ruled surface Crea superficie rigata @@ -2375,11 +2375,6 @@ della proiezione. PartDesignGui::TaskDatumParameters - - - Form - Modulo - Selection accepted @@ -5705,82 +5700,82 @@ in the 3D view for the sweep path. Edita %1 - + Part and Part Design workbench Ambiente di lavoro Part e Part Design - - + + Part/Part Design Part/Part Design - - + + Import-Export Importa/Esporta - - - - - - + + + + + + Wrong selection Selezione sbagliata - - + + Select two shapes please. Selezionare due forme. - - - - - Non-solids selected - Forme selezionate non solide - + Non-solids selected + Forme selezionate non solide + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? L'uso di forme non solide per operazioni booleane può portare a risultati imprevisti. Si desidera continuare? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Selezionare due o più forme. In alternativa, è possibile selezionare un composto contenente due o più forme per calcolare la loro parte comune. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Selezionare due o più forme. In alternativa, è possibile selezionare un composto contenente due o più forme da fondere. - + Select one shape or more, please. Selezionare una o più forme, per favore. - + All CAD Files Tutti i file CAD - + All Files Tutti i file - + You have to select either two edges or two wires. È necessario selezionare due spigoli o due polilinee. @@ -6753,4 +6748,98 @@ Questo significa che i volumi sovrapposti delle forme saranno rimossi. Un 'Composto Filtro' può essere usato per estrarre i pezzi rimanenti. + + PartGui::DlgScale + + + Scale + Scala + + + + X Factor + X Factor + + + + Factor + Fattore + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + Il documento '%1' non esiste. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Parte + + + + Scale... + Scala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ja.ts b/src/Mod/Part/Gui/Resources/translations/Part_ja.ts index e762ae5450..7e05985a0a 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ja.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ja.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part 部品 - - - + + + Box selection 矩形選択 @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part 部品 - + Check Geometry 幾何形状のチェック - + Analyzes Geometry For Errors 形状に欠陥がないか分析 @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part 部品 - + Color per face 面ごとの色 - + Set the color of each individual face of the selected object. 選択したオブジェクトの個々の面の色を設定します。 @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part 部品 - + Measure Angular 角度計測 - + Measure the angle between two edges. 2 つのエッジ間の角度を測定します。 @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part 部品 - + Clear All 全てクリア - + Clear all dimensions from the screen. スクリーンからすべての寸法をクリアします。 @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part 部品 - + Measure Linear 距離計測 - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part 部品 - + Refresh 更新 - + Recalculate the dimensions if the measured points have moved. 測定点が移動した場合、寸法 @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part 部品 - + Toggle 3D 3D の切り替え - + Toggle on and off all direct dimensions, including angular. 角度を含む @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part 部品 - + Toggle All 表示の切り替え - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. 現在表示されているすべての寸法、 @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part 部品 - + Toggle Delta デルタ(表示のオンオフ) - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part 部品 - + Boolean... ブーリアン演算... - + Run a boolean operation with two shapes selected 選択された二つの図形のブーリアン演算を実行 @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part 部品 - + Box fix 1 ボックス固定1 - + Create a box solid without dialog ボックスのソリッドをダイアログ無しで作成 @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part 部品 - + Box fix 2 ボックス固定2 - + Create a box solid without dialog ボックスのソリッドをダイアログ無しで作成 @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part 部品 - + Shape builder... シェイプビルダー... - + Advanced utility to create shapes 高度な図形作成ユーティリティ @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part 部品 - + Chamfer... 面取り... - + Chamfer the selected edges of a shape 形状の選択されたエッジを面取り @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part 部品 - + Intersection 共通集合 - + Make an intersection of two shapes 二つの図形の共通集合を作成 @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part 部品 - + Compound tools 複合ツール - + Compound tools: working with lists of shapes. コンパウンド・ツール:シェイプのリストを使って作業 @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part 部品 - + Join objects... オブジェクトの接合... - + Join walled objects 壁に囲まれたオブジェクトを結合 @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part 部品 - + Offset: オフセット: - + Tools to offset shapes (construct parallel shapes) シェイプオフセット用ツール(平行なシェイプを作成) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part 部品 - + Split objects... オブジェクトの分割... - + Shape splitting and Compsolid creation tools. シェイプ分割と複合ソリッド作成のツール @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part 部品 - + Make compound コンパウンドを作成 - + Make a compound of several shapes 複数のシェイプからコンパウンドを作成 @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part 部品 - + Cross-sections... 断面... - + Cross-sections 断面 @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part 部品 - + Cut 切り取り - + Make a cut of two shapes 2つの図形から減算結果を作成 @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part 部品 - + Export CAD... パートをエクスポート... - + Exports to a CAD file CADファイルにエクスポート @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part 部品 - + Extrude... 押し出し... - + Extrude a selected sketch 選択したスケッチを押し出し @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part 部品 - + Fillet... フィレット... - + Fillet the selected edges of a shape 選択した図形のエッジをフィレット @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part 部品 - + Union 結合 - + Make a union of several shapes 複数の形状の和集合を作成 @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part 部品 - + Import CAD... CADをインポート... - + Imports a CAD file CADファイルをインポート @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part 部品 - + Import curve network... 曲線ネットワークをインポート... - + Import a curve network 曲線ネットワークをインポート @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part 部品 - + Loft... ロフト... - + Utility to loft ロフトユーティリティ @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part 部品 - + Make face from wires ワイヤーから面を作成 - + Make face from set of wires (e.g. from a sketch) ワイヤーの組みから面を作成(例:スケッチから) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part 部品 - + Convert to solid ソリッドに変換 - + Create solid from a shell or compound シェルまたはコンパウンドからソリッドを作成 @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part 部品 - + Mirroring... ミラーリング... - + Mirroring a selected shape 選択した図形をミラーリング @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part 部品 - + 3D Offset... 3Dオフセット... - + Utility to offset in 3D 3次元用オフセットユーティリティ @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part 部品 - + 2D Offset... 2Dオフセット... - + Utility to offset planar shapes 平面形状用オフセットユーティリティ @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part 部品 - + Pick curve network 曲線ネットワークをピック - + Pick a curve network 曲線ネットワークをピック @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part 部品 - + Create primitives... プリミティブを作成... - + Creation of parametrized geometric primitives パラメトリックな幾何プリミティブを作成 @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part 部品 - + Create projection on surface... 表面に投影を作成... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part 部品 - + Reverse shapes 図形を反転 - + Reverse orientation of shapes 図形の方向を反転します。 @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part 部品 - + Revolve... 回転... - + Revolve a selected shape 選択した図形を回転 @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part 部品 - + Create ruled surface 線織面を作成 - + Create a ruled surface from either two Edges or two wires 2 本の稜線または 2 本のワイヤから線織面を作成 @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part 部品 - + Section セクション - + Make a section of two shapes 2つの形状の横断面を作成 @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut 永続的な断面カット - + Creates a persistent section cut of visible part objects 表示されているパートオブジェクトの永続的な断面カットを作成 @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part 部品 - + Sweep... スイープ... - + Utility to sweep スイープユーティリティ @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part 部品 - + Thickness... 厚み... - + Utility to apply a thickness 厚み適用ユーティリティ - + Wrong selection 誤った選択 - + Selected shape is not a solid 選択した図形はソリッドではありません @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create 部品ボックス作成 - + Part Cut 部品切断 - + Common 共通部分 - + Fusion 融合 - + Compound コンパウンド - + Section セクション - + Import Part 部品をインポート - + Part Import Curve Net Part Import Curve Net - + Reverse 反転 - + Make face 面を作成 - + Make Offset オフセットを作成 - + Make 2D Offset 2D オフセットを作成 - + Make Thickness 厚みを作成 - + Create ruled surface 線織面を作成 @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - フォーム - Selection accepted @@ -5691,82 +5686,82 @@ in the 3D view for the sweep path. %1を編集 - + Part and Part Design workbench パートとパートデザインのワークベンチ - - + + Part/Part Design Part/Part Design - - + + Import-Export インポート/エクスポート - - - - - - + + + + + + Wrong selection 誤った選択 - - + + Select two shapes please. 2つの図形を選択してください。 - - - - - Non-solids selected - 非ソリッドが選択されています - + Non-solids selected + 非ソリッドが選択されています + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? 非ソリッドをブーリアン演算に用いると、予期しない結果を引き起こす可能性があります。続行しますか? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. 複数のシェイプ、または共通部分を計算する複数のシェイプが入ったコンパウンドを1つ選択してください。 - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. 複数のシェイプ、または結合する複数のシェイプが入ったコンパウンドを1つ選択してください。 - + Select one shape or more, please. シェイプを 1 つ以上を選択してください。 - + All CAD Files 全てのCADファイル - + All Files すべてのファイル - + You have to select either two edges or two wires. 2 つのエッジまたは 2 本のワイヤを選択する必要があります。 @@ -6734,4 +6729,98 @@ A 'Compound Filter' can be used to extract the remaining pieces. 残った断片を取り出すには「コンパウンド・フィルター」を使用します。 + + PartGui::DlgScale + + + Scale + 尺度 + + + + X Factor + X Factor + + + + Factor + 係数 + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + シェイプ + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + 部品 + + + + Scale... + 拡大縮小... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ka.ts b/src/Mod/Part/Gui/Resources/translations/Part_ka.ts index f3dc307594..2e84f2f913 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ka.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ka.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part ნაწილი - - - + + + Box selection ყუთის არჩევანი @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part ნაწილი - + Check Geometry გეომეტრიის შემოწმება - + Analyzes Geometry For Errors გეომეტრის ანალიზი შეცდომების გამოსავლენად @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part ნაწილი - + Color per face თითოეული ზედაპირის ფერი - + Set the color of each individual face of the selected object. მონიშნული ობიექტის ყველა ინდივიდუალური ზედაპირის ფერის დაყენება. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part ნაწილი - + Measure Angular კუთხის გაზომვა - + Measure the angle between two edges. ორ წიბოს შუა კუთხის გაზომვა. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part ნაწილი - + Clear All ყველაფრის გასუფთავება - + Clear all dimensions from the screen. ყველა ზომის გაქრობა ეკრანიდან. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part ნაწილი - + Measure Linear სიგრძის გაზომვა - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part ნაწილი - + Refresh განახლება - + Recalculate the dimensions if the measured points have moved. გაზომილი წერტილების გადაადგილების @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part ნაწილი - + Toggle 3D 3D-ის ჩართ/გამორთ - + Toggle on and off all direct dimensions, including angular. ყველა პირდაპირი ზომის ჩვენების, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part ნაწილი - + Toggle All ყველას ჩართ/გამორთ - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. ყველა მიმდინარე ხილული ზომების, პირდაპირის, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part ნაწილი - + Toggle Delta დელტას ჩართ/გამორთ - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part ნაწილი - + Boolean... ბულევური ოპერაციები... - + Run a boolean operation with two shapes selected ბულევური ოპერაცია ორი მონიშნული მონახაზით @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part ნაწილი - + Box fix 1 ველის გასწორება 1 - + Create a box solid without dialog შემომსაზღვრელი ჩარჩოს მყარი სხეულის შექმნა ფანჯრის გარეშე @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part ნაწილი - + Box fix 2 ველის გასწორება 2 - + Create a box solid without dialog შემომსაზღვრელი ჩარჩოს მყარი სხეულის შექმნა ფანჯრის გარეშე @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part ნაწილი - + Shape builder... მოხაზულობის ამწყობი... - + Advanced utility to create shapes ფორმების შესაქმნელი დამატებითი იარაღი @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part ნაწილი - + Chamfer... კუთხის ნაზოლი... - + Chamfer the selected edges of a shape მოხაზულობის მონიშნული წიბოების ნაზოლი @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part ნაწილი - + Intersection კვეთა - + Make an intersection of two shapes ორი მონახაზის ერთმანეთზე კვეთის შექმნა @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part ნაწილი - + Compound tools გადაბმის ხელსაწყოები - + Compound tools: working with lists of shapes. გადაბმების ხელსაწყოები: მოხაზულობების სიებთან მუშაობა. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part ნაწილი - + Join objects... ობიექტების შეერთება... - + Join walled objects კედლის ობიექტების შეერთება @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part ნაწილი - + Offset: წანაცვლება: - + Tools to offset shapes (construct parallel shapes) მოხაზულობის წანაცვლების ხელსაწყოები (პარალელური მოხაზულობების შექმნა) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part ნაწილი - + Split objects... ობიექტების დაყოფა... - + Shape splitting and Compsolid creation tools. ფორმების გაყოფისა და კომპლექსური მყარი სხეულების შექმნის ხელსაწყო. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part ნაწილი - + Make compound შეერთება - + Make a compound of several shapes რამდენიმე მოხაზულობისგან გადაბმის შექმნა @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part ნაწილი - + Cross-sections... განივი-გადანაჭრები... - + Cross-sections განივი-გადანაჭრები @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part ნაწილი - + Cut ამოჭრა - + Make a cut of two shapes ორი მონახაზის ჭრის შექმნა @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part ნაწილი - + Export CAD... CAD-ში გატანა... - + Exports to a CAD file CAD ფაილში გატანა @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part ნაწილი - + Extrude... გამოწნევით დაყალიბება... - + Extrude a selected sketch მონიშნული ესკიზის გამოწნევა @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part ნაწილი - + Fillet... მომრგვალება... - + Fillet the selected edges of a shape მოხაზულობის მონიშნული წიბოების მომრგვალება @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part ნაწილი - + Union გაერთიანება - + Make a union of several shapes რამდენიმე მოხაზულობისგან კავშირის შექმნა @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part ნაწილი - + Import CAD... CAD-ის შემოტანა... - + Imports a CAD file CAD ფაილის შემოტანა @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part ნაწილი - + Import curve network... რკალების ქსელის შემოტანა... - + Import a curve network მრუდების ქსელის შემოტანა @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part ნაწილი - + Loft... სხვენი... - + Utility to loft სხვენის ხელსაწყო @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part ნაწილი - + Make face from wires ზედაპირის პოლიხაზებისგან შექმნა - + Make face from set of wires (e.g. from a sketch) პოლიხაზების ნაკრებისგან ზედაპირის შექმნა (მაგ. ესკიზიდან) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part ნაწილი - + Convert to solid მყარ სხეულად გარდაქმნა - + Create solid from a shell or compound გარსის ან გადაბმისგან მყარი სხეულის შექმნა @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part ნაწილი - + Mirroring... სარკისებური ასლი... - + Mirroring a selected shape მონიშნული მოხაზულობის ასლის გადაღება @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part ნაწილი - + 3D Offset... 3D წანაცვლება... - + Utility to offset in 3D 3D-ში წანაცვლების იარაღი @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part ნაწილი - + 2D Offset... 2D წანაცვლება... - + Utility to offset planar shapes ბრტყელი მოხაზულობების წანაცვლების ხელსაწყო @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part ნაწილი - + Pick curve network აირჩიეთ მრუდების ქსელი - + Pick a curve network აირჩიეთ რკალების ქსელი @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part ნაწილი - + Create primitives... პრიმიტივების შექმნა... - + Creation of parametrized geometric primitives პარამეტრიზებული გეომეტრიული პრიმიტივების შექმნა @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part ნაწილი - + Create projection on surface... ზედაპირზე პროექციის შექმნა... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1982,17 +1982,17 @@ of projection. CmdPartReverseShape - + Part ნაწილი - + Reverse shapes მონახაზების რევერსი - + Reverse orientation of shapes მონახაზების ორიენტაციის შებრუნება @@ -2000,17 +2000,17 @@ of projection. CmdPartRevolve - + Part ნაწილი - + Revolve... ტრიალი... - + Revolve a selected shape მონიშნული მონახაზის ბრუნვა @@ -2018,17 +2018,17 @@ of projection. CmdPartRuledSurface - + Part ნაწილი - + Create ruled surface დახაზული ზედაპირის შექმნა - + Create a ruled surface from either two Edges or two wires 2 წიბოსგან ან პოლიხაზისგან დახაზული ზედაპირის შექმნა @@ -2036,17 +2036,17 @@ of projection. CmdPartSection - + Part ნაწილი - + Section ჭრილი - + Make a section of two shapes ორი მონახაზის კვეთის შექმნა @@ -2054,12 +2054,12 @@ of projection. CmdPartSectionCut - + Persistent section cut მუდმივი კვეთა - + Creates a persistent section cut of visible part objects ხილული ნაწილი ობიექტების მუდმივი კვეთის შექმნა @@ -2141,17 +2141,17 @@ of projection. CmdPartSweep - + Part ნაწილი - + Sweep... შლილი... - + Utility to sweep შლილის ხელსაწყო @@ -2159,27 +2159,27 @@ of projection. CmdPartThickness - + Part ნაწილი - + Thickness... სისქე... - + Utility to apply a thickness სისქის შეცვლის ხელსაწყო - + Wrong selection არასწორი არჩევანი - + Selected shape is not a solid მონიშნული მონახაზი მყარი სხეული არაა @@ -2225,73 +2225,73 @@ of projection. Command - - + + Part Box Create პარალელეპიპედის ნაწილის შექმნა - + Part Cut ნაწილის ჭრილი - + Common ჩვეულებრივი - + Fusion შერწყმა - + Compound გადაბმა - + Section ჭრილი - + Import Part ნაწილის შემოტანა - + Part Import Curve Net Part-ში მრუდების ქსელის შემოტანა - + Reverse რევერსი - + Make face ზედაპირის შექმნა - + Make Offset წანაცვლების შექმნა - + Make 2D Offset 2D წანაცვლების შექმნა - + Make Thickness სისქის შექმნა - + Create ruled surface დახაზული ზედაპირის შექმნა @@ -2374,11 +2374,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - ფორმა - Selection accepted @@ -2997,7 +2992,7 @@ If both lengths are zero, magnitude of direction is used. Shape - მოხაზულობა + ფიგურა @@ -5078,7 +5073,7 @@ of object being attached. Selecting... - არჩევა... + მონიშვნა... @@ -5405,7 +5400,7 @@ by dragging a selection rectangle in the 3D view Box selection - ყუთის არჩევანი + არეალის მონიშვნა @@ -5645,7 +5640,7 @@ in the 3D view for the sweep path. Input error - Input error + შეყვანის შეცდომა @@ -5702,83 +5697,83 @@ in the 3D view for the sweep path. %1-ის ჩასწორება - + Part and Part Design workbench ნაწილისა და ნაწილის დიზაინის სამუშაო მაგიდა - - + + Part/Part Design ნაწილი/ნაწილის დიზაინი - - + + Import-Export შეტანა-გატანა - - - - - - + + + + + + Wrong selection არასწორი მონიშნული - - + + Select two shapes please. გთხოვ, აირჩიოთ ორი ფიგურა. - - - - - Non-solids selected - მონიშნული არა-მყარი სხეულია - + Non-solids selected + მონიშნული არა-მყარი სხეულია + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? ბულევურ ოპერაციებში არა-მყარი სხეულების გამოყენებამ შეიძლება მოულოდნელი შედეგები გამოიღოს. გნებავთ გავაგრძელო? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. კვეთის გამოსათვლელად აირჩიეთ ორი მოხაზულობა ან აირჩიეთ ერთი გადაბმა, რომელიც ორ ან მეტ მოხაზულობას შეიცავს. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. მონიშნეთ ორი ან მეტი მოხაზულობა, ან აირჩიეთ ერთი გადაბმა, რომელიც ორ ან მეტ მოხაზულობას შეიცავს, მათ შესარწყმელად. - + Select one shape or more, please. მონიშნეთ ერთი ან მეტი მონახაზი, გეთაყვა. - + All CAD Files ყველა CAD ფაილი - + All Files ყველა ფაილი - + You have to select either two edges or two wires. უნდა აირჩიოთ ორი წიბო ან ორი პოლიხაზი. @@ -5834,7 +5829,7 @@ Do you want to continue? Shape - ფიგურა + მოხაზულობა @@ -6234,7 +6229,7 @@ Do you want to continue? Measure - საზომი + გაზომვა @@ -6344,7 +6339,7 @@ Do you want to continue? Click 'Continue' to create the feature anyway, or 'Abort' to cancel. - დააწექით "გაგრძელებას" თვისების მაინც შესაქმნელად, ან "შეწყვეტას", გაუქმებისთვის. + დააწექით "გაგრძელება"-ს თვისების მაინც შესაქმნელად, ან "შეწყვეტა"-ს, გაუქმებისთვის. @@ -6415,7 +6410,7 @@ for collision or distance filtering. Click 'Continue' to create the feature anyway, or 'Abort' to cancel. - დააწექით "გაგრძელება"-ს თვისების მაინც შესაქმნელად, ან "შეწყვეტა"-ს, გაუქმებისთვის. + დააწექით "გაგრძელებას" თვისების მაინც შესაქმნელად, ან "შეწყვეტას", გაუქმებისთვის. @@ -6515,7 +6510,7 @@ It will create a 'Compound Filter' for each shape. Selecting... - მონიშვნა... + არჩევა... @@ -6646,7 +6641,7 @@ It will create a 'Compound Filter' for each shape. Continuity - გაგრძელება + უწყვეტობა @@ -6751,4 +6746,98 @@ A 'Compound Filter' can be used to extract the remaining pieces. დარჩენილი ნაწილების მისაღებად შეგიძლიათ 'გადაბმის ფილტრი' გამოიყენოთ. + + PartGui::DlgScale + + + Scale + მასშტაბირება + + + + X Factor + X Factor + + + + Factor + ფაქტორი + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + ფიგურა + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + ნაწილი + + + + Scale... + მასშტაბირება... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ko.ts b/src/Mod/Part/Gui/Resources/translations/Part_ko.ts index ceb09019b1..372169da70 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ko.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ko.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part 부품 - - - + + + Box selection 박스 선택항목 @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part 부품 - + Check Geometry Check Geometry - + Analyzes Geometry For Errors 오류에 대 한 형상 분석 @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part 부품 - + Color per face 면 당 색상 - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part 부품 - + Measure Angular 각도 측정 - + Measure the angle between two edges. Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part 부품 - + Clear All 모두 지우기 - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part 부품 - + Measure Linear 선형 측정 - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part 부품 - + Refresh 새로 고침 - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part 부품 - + Toggle 3D Toggle 3D - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part 부품 - + Toggle All 모두 반전 - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part 부품 - + Toggle Delta 델타 전환 - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part 부품 - + Boolean... 부울... - + Run a boolean operation with two shapes selected 부울 작업을 실행 하는 두 셰이프 선택 @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part 부품 - + Box fix 1 상자 고정 1 - + Create a box solid without dialog 주석없이 솔리드 상자 생성 @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part 부품 - + Box fix 2 상자 고정 2 - + Create a box solid without dialog 주석없이 솔리드 상자 생성 @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part 부품 - + Shape builder... 모양 작성기... - + Advanced utility to create shapes 도형을 만들 고급 유틸리티 @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part 부품 - + Chamfer... Chamfer... - + Chamfer the selected edges of a shape 선택된 모서리에 챔퍼 @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part 부품 - + Intersection 교집합 - + Make an intersection of two shapes 두 도형 교차 시키기 @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part 부품 - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Compound tools: working with lists of shapes. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part 부품 - + Join objects... 물체 연결... - + Join walled objects 둘러쌓인 물체 연결 @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part 부품 - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Tools to offset shapes (construct parallel shapes) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part 부품 - + Split objects... Split objects... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part 부품 - + Make compound 하나로 합치기 - + Make a compound of several shapes 여러 모양을 하나로 합치기 @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part 부품 - + Cross-sections... 횡단면... - + Cross-sections 횡단면 @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part 부품 - + Cut 자르기 - + Make a cut of two shapes 두 셰이프 자르기 @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part 부품 - + Export CAD... CAD 데이터 내보내기... - + Exports to a CAD file CAD 파일로 내보내기 @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part 부품 - + Extrude... 돌출... - + Extrude a selected sketch 선택한 스케치 돌출 @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part 부품 - + Fillet... 필렛... - + Fillet the selected edges of a shape 선택된 모서리에 필렛 주시 @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part 부품 - + Union 결합체 - + Make a union of several shapes 여러 모양의 결합 만들기 @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part 부품 - + Import CAD... CAD 가져오기... - + Imports a CAD file CAD 파일 가져오기 @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part 부품 - + Import curve network... 곡선 네트워크 가져오기... - + Import a curve network 곡선 네트워크 가져오기 @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part 부품 - + Loft... 로프트... - + Utility to loft 로프트 도구 @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part 부품 - + Make face from wires Make face from wires - + Make face from set of wires (e.g. from a sketch) Make face from set of wires (e.g. from a sketch) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part 부품 - + Convert to solid 솔리드로 변환 - + Create solid from a shell or compound 쉘이나 복합체를 이용하여 솔리드 생성 @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part 부품 - + Mirroring... 미러링... - + Mirroring a selected shape 선택된 모양 미러링 @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part 부품 - + 3D Offset... 3D Offset... - + Utility to offset in 3D Utility to offset in 3D @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part 부품 - + 2D Offset... 2D Offset... - + Utility to offset planar shapes Utility to offset planar shapes @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part 부품 - + Pick curve network 곡선 네트워크 선택 - + Pick a curve network 곡선 네트워크 선택 @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part 부품 - + Create primitives... 프리미티브 생성... - + Creation of parametrized geometric primitives 치수가 정해진 기하 프리미티브 생성 @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part 부품 - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part 부품 - + Reverse shapes 모양 반전 - + Reverse orientation of shapes 모형 방향 반전 @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part 부품 - + Revolve... 회전... - + Revolve a selected shape 선택된 모양 회전 @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part 부품 - + Create ruled surface 선직면 생성 - + Create a ruled surface from either two Edges or two wires 두 모서리 혹은 두 와이어(로프)를 이용하여 선직면 생성 @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part 부품 - + Section 단면 - + Make a section of two shapes 두 모양의 절단면 생성 @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part 부품 - + Sweep... 스윕... - + Utility to sweep 스윕을 위한 도구 @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part 부품 - + Thickness... 두께... - + Utility to apply a thickness 두께 적용을 위한 도구 - + Wrong selection 잘못 된 선택 - + Selected shape is not a solid 선택된 모양은 고체가 아닙니다 @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common 공통(교집합) - + Fusion Fusion - + Compound 복합체 - + Section 단면 - + Import Part Import Part - + Part Import Curve Net Part Import Curve Net - + Reverse 반대로 - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface 선직면 생성 @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - 양식 - Selection accepted @@ -5708,82 +5703,82 @@ in the 3D view for the sweep path. Edit %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export 가져오기 내보내기 - - - - - - + + + + + + Wrong selection 잘못 된 선택 - - + + Select two shapes please. 두 개의 셰이프를 선택 해 주세요 - - - - - Non-solids selected - 비-솔리드 선택 - + Non-solids selected + 비-솔리드 선택 + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? 부울 작업 비-솔리드를 사용 하 여 예기치 않은 결과가 발생할 수 있습니다. 계속 하 시겠습니까? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. - + Select one shape or more, please. 셰이프를 하나 이상 선택하세요. - + All CAD Files All CAD Files - + All Files 모든 파일 - + You have to select either two edges or two wires. 두 개의 모서리 또는 두 개의 와이어를 선택 해야 합니다. @@ -6756,4 +6751,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + 크기 + + + + X Factor + X Factor + + + + Factor + 비율 + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + 셰이프 + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + 부품 + + + + Scale... + Scale... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_nl.ts b/src/Mod/Part/Gui/Resources/translations/Part_nl.ts index 9cb1e504f0..dabe25b2ba 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_nl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_nl.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Onderdeel - - - + + + Box selection Rechthoekselectie @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Onderdeel - + Check Geometry Geometrie nakijken - + Analyzes Geometry For Errors Analiseert Geometrie Voor Fouten @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Onderdeel - + Color per face Kleur per vlak - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Onderdeel - + Measure Angular Hoek meten - + Measure the angle between two edges. Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Onderdeel - + Clear All Alles wissen - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Onderdeel - + Measure Linear Lineair meten - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Onderdeel - + Refresh Vernieuwen - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Onderdeel - + Toggle 3D 3D aan/uit - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part Onderdeel - + Toggle All Alles omschakelen - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Onderdeel - + Toggle Delta Schakel Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Onderdeel - + Boolean... Boolean... - + Run a boolean operation with two shapes selected Een Booleaanse bewerking uitvoeren met twee geselecteerde vormen @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Onderdeel - + Box fix 1 Blok positie 1 - + Create a box solid without dialog Een balkvorm maken zonder dialoogvenster @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Onderdeel - + Box fix 2 Blok positie 2 - + Create a box solid without dialog Een balkvorm maken zonder dialoogvenster @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Onderdeel - + Shape builder... Vormbouwer... - + Advanced utility to create shapes Geavanceerd werktuig om vormen te maken @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Onderdeel - + Chamfer... Afschuining ... - + Chamfer the selected edges of a shape Afschuining van de geselecteerde randen van een vorm @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Onderdeel - + Intersection Snijpunt - + Make an intersection of two shapes Een doorsnede van twee vormen maken @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Onderdeel - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Samenstellingsgereedschappen: werken met lijsten van vormen. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Onderdeel - + Join objects... Objecten samenvoegen... - + Join walled objects Objecten met wanden toevoegen @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Onderdeel - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Gereedschap om vormen te verschuiven (bouw parallelle vormen) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Onderdeel - + Split objects... Objecten splitsen... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Onderdeel - + Make compound Samenstelling maken - + Make a compound of several shapes Maak een samenstelling van meerdere vormen @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Onderdeel - + Cross-sections... Dwarsdoorsneden... - + Cross-sections Dwarsdoorsneden @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Onderdeel - + Cut Snijden - + Make a cut of two shapes Maak een doorsnede van twee vormen @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Onderdeel - + Export CAD... Exporteer CAD... - + Exports to a CAD file Uitvoer naar een CAD-bestand @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Onderdeel - + Extrude... Uitrekken... - + Extrude a selected sketch Een geselecteerde schets extruderen @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Onderdeel - + Fillet... Afronden... - + Fillet the selected edges of a shape Rond de geselecteerde randen van een vorm af @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Onderdeel - + Union Verbinden - + Make a union of several shapes Verenig verschillende vormen @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Onderdeel - + Import CAD... Import CAD... - + Imports a CAD file Importeert een CAD-bestand @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Onderdeel - + Import curve network... Importeer een gekromd raster... - + Import a curve network Importeer een gekromd raster @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Onderdeel - + Loft... Loft... - + Utility to loft Gereedschap voor loft @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Onderdeel - + Make face from wires Maak vlak vanuit draden - + Make face from set of wires (e.g. from a sketch) Maak een vlak vanuit een draadset (bijv. vanuit een schets) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Onderdeel - + Convert to solid Converteren naar volumemodel - + Create solid from a shell or compound Volumemodel vanuit een schil of samengestelde deel maken @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Onderdeel - + Mirroring... Spiegelen... - + Mirroring a selected shape Spiegelen van een geselecteerde vorm @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Onderdeel - + 3D Offset... 3D-verschuiving... - + Utility to offset in 3D Gereedschap om te verschuiven in 3D @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Onderdeel - + 2D Offset... 2D-verschuiving... - + Utility to offset planar shapes Gereedschap om planaire vormen te verschuiven @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Onderdeel - + Pick curve network Kies een gekromd raster - + Pick a curve network Kies een gekromd raster @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Onderdeel - + Create primitives... Basisvormen aanmaken... - + Creation of parametrized geometric primitives Geparametriseerde geometrische basisvormen maken @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Onderdeel - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part Onderdeel - + Reverse shapes Omkeren van vormen - + Reverse orientation of shapes Omgekeerde oriëntatie van vormen @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part Onderdeel - + Revolve... Wentelen... - + Revolve a selected shape Een geselecteerde vorm wentelen @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part Onderdeel - + Create ruled surface Maak een geregeerd oppervlak aan - + Create a ruled surface from either two Edges or two wires Maak een geregeerd oppervlak vanuit twee randen of twee draden @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part Onderdeel - + Section Deel - + Make a section of two shapes Een doorsnede van twee vormen maken @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part Onderdeel - + Sweep... Sweep... - + Utility to sweep Sweepgereedschap @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part Onderdeel - + Thickness... Dikte... - + Utility to apply a thickness Hulpprogramma voor aanbrengen van een dikte - + Wrong selection Verkeerde selectie - + Selected shape is not a solid Geselecteerde vorm is geen volumemodel @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Gemeenschappelijk - + Fusion Fusie - + Compound Samenstelling - + Section Deel - + Import Part Onderdeel importeren - + Part Import Curve Net Part Import Curve Net - + Reverse Omdraaien - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Maak een geregeerd oppervlak aan @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Vorm - Selection accepted @@ -5710,83 +5705,83 @@ in de 3D-weergave voor het veegpad. Bewerken %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Importeren-Exporteren - - - - - - + + + + + + Wrong selection Verkeerde selectie - - + + Select two shapes please. Selecteer twee vormen alstublieft. - - - - - Non-solids selected - Non-volumemodel geselecteerd - + Non-solids selected + Non-volumemodel geselecteerd + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Het gebruik van non-volumemodellen voor booleaanse bewerkingen kan onverwachte resultaten opleveren. Wilt u doorgaan? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Gelieve twee of meer vormen te kiezen. Of, selecteer één samenstelling met twee of meer vormen om gemeenschappelijke tussen de twee of meer vormen te berekenen. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Gelieve twee of meer vormen te kiezen. Of, selecteer één samenstelling met twee of meer vormen die samengevoegd moeten worden. - + Select one shape or more, please. Selecteer een of meer vormen, Alstublieft. - + All CAD Files Alle CAD bestanden - + All Files Alle bestanden - + You have to select either two edges or two wires. Je moet of twee randen of twee draden selecteren. @@ -6759,4 +6754,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Schalen + + + + X Factor + X Factor + + + + Factor + Factor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Vorm + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Onderdeel + + + + Scale... + Schaal... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_pl.ts b/src/Mod/Part/Gui/Resources/translations/Part_pl.ts index a6b87b297a..57a80b89c1 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_pl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_pl.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Część - - - + + + Box selection Zaznacz obszarem @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Część - + Check Geometry Sprawdź geometrię - + Analyzes Geometry For Errors Analizuje geometrię pod kątem błędów @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Część - + Color per face Kolor dla ściany - + Set the color of each individual face of the selected object. Ustaw kolor dla każdej ściany wybranego obiektu. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Część - + Measure Angular Pomiar kątowy - + Measure the angle between two edges. Zmierz kąt między dwoma krawędziami. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Część - + Clear All Usuń widoczne pomiary - + Clear all dimensions from the screen. Wyczyść z ekranu wszystkie wymiary. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Część - + Measure Linear Pomiar liniowy - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ pomiędzy dwoma ich wierzchołkami. CmdMeasureRefresh - + Part Część - + Refresh Odśwież pomiary - + Recalculate the dimensions if the measured points have moved. Przelicz wymiary @@ -1279,17 +1279,17 @@ w przypadku przesunięcia punktów pomiarowych. CmdMeasureToggle3d - + Part Część - + Toggle 3D Włącz / wyłącz widok pomiarów 3D - + Toggle on and off all direct dimensions, including angular. Włącza i wyłącza wszystkie pomiary bezpośrednie, @@ -1299,17 +1299,17 @@ w tym kątowe. CmdMeasureToggleAll - + Part Część - + Toggle All Przełącz widoczność pomiarów - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Włącza i wyłącza wszystkie aktualnie widoczne pomiary, @@ -1319,17 +1319,17 @@ bezpośrednie, ortogonalne i kątowe. CmdMeasureToggleDelta - + Part Część - + Toggle Delta Włącz / wyłącz widok pomiarów przyrostowych - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ na jego składowe X, Y i Z. CmdPartBoolean - + Part Część - + Boolean... Operacja logiczna ... - + Run a boolean operation with two shapes selected Uruchom operację logiczną z dwoma wybranymi kształtami @@ -1379,17 +1379,17 @@ na jego składowe X, Y i Z. CmdPartBox2 - + Part Część - + Box fix 1 Pole poprawki 1 - + Create a box solid without dialog Utwórz prostopadłościan bez użycia okna dialogowego @@ -1397,17 +1397,17 @@ na jego składowe X, Y i Z. CmdPartBox3 - + Part Część - + Box fix 2 Pole poprawki 2 - + Create a box solid without dialog Utwórz prostopadłościan bez użycia okna dialogowego @@ -1415,17 +1415,17 @@ na jego składowe X, Y i Z. CmdPartBuilder - + Part Część - + Shape builder... Konstruktor kształtu ... - + Advanced utility to create shapes Zaawansowane narzędzie do tworzenia kształtów @@ -1433,17 +1433,17 @@ na jego składowe X, Y i Z. CmdPartChamfer - + Part Część - + Chamfer... Sfazowanie ... - + Chamfer the selected edges of a shape Fazuj wybrane krawędzie obiektu @@ -1451,17 +1451,17 @@ na jego składowe X, Y i Z. CmdPartCommon - + Part Część - + Intersection Przecięcie - + Make an intersection of two shapes Utwórz przecięcie dwóch kształtów @@ -1469,17 +1469,17 @@ na jego składowe X, Y i Z. CmdPartCompCompoundTools - + Part Część - + Compound tools Narzędzia złożeń - + Compound tools: working with lists of shapes. Narzędzia złożeń: praca z listami kształtów. @@ -1487,17 +1487,17 @@ na jego składowe X, Y i Z. CmdPartCompJoinFeatures - + Part Część - + Join objects... Połącz obiekty ... - + Join walled objects Połącz wygrodzone obiekty @@ -1505,17 +1505,17 @@ na jego składowe X, Y i Z. CmdPartCompOffset - + Part Część - + Offset: Odsunięcie: - + Tools to offset shapes (construct parallel shapes) Narzędzia do odsuwania kształtów (konstrukcja równoległych kształtów) @@ -1523,17 +1523,17 @@ na jego składowe X, Y i Z. CmdPartCompSplitFeatures - + Part Część - + Split objects... Podziel obiekty ... - + Shape splitting and Compsolid creation tools. Narzędzia do dzielenia kształtu i tworzenia brył zespolonych. @@ -1541,17 +1541,17 @@ na jego składowe X, Y i Z. CmdPartCompound - + Part Część - + Make compound Utwórz kształt złożony - + Make a compound of several shapes Stwórz złożenie z kilku kształtów @@ -1579,17 +1579,17 @@ na jego składowe X, Y i Z. CmdPartCrossSections - + Part Część - + Cross-sections... Przekrój poprzeczny ... - + Cross-sections Przekrój poprzeczny @@ -1597,17 +1597,17 @@ na jego składowe X, Y i Z. CmdPartCut - + Part Część - + Cut Wytnij - + Make a cut of two shapes Utwórz różnicę dwóch obiektów @@ -1671,17 +1671,17 @@ na jego składowe X, Y i Z. CmdPartExport - + Part Część - + Export CAD... Eksport projektu do CAD ... - + Exports to a CAD file Eksport do pliku CAD @@ -1689,17 +1689,17 @@ na jego składowe X, Y i Z. CmdPartExtrude - + Part Część - + Extrude... Wyciągnięcie ... - + Extrude a selected sketch Wyciągnij wybrany szkic @@ -1707,17 +1707,17 @@ na jego składowe X, Y i Z. CmdPartFillet - + Part Część - + Fillet... Zaokrąglenie ... - + Fillet the selected edges of a shape Zaokrąglij wybrane krawędzie obiektu @@ -1725,17 +1725,17 @@ na jego składowe X, Y i Z. CmdPartFuse - + Part Część - + Union Połączenie - + Make a union of several shapes Utwórz połączenie kilku kształtów @@ -1743,17 +1743,17 @@ na jego składowe X, Y i Z. CmdPartImport - + Part Część - + Import CAD... Import projektu CAD ... - + Imports a CAD file Importuje plik CAD @@ -1761,17 +1761,17 @@ na jego składowe X, Y i Z. CmdPartImportCurveNet - + Part Część - + Import curve network... Importuj sieć krzywych ... - + Import a curve network Importuj sieć krzywych @@ -1779,17 +1779,17 @@ na jego składowe X, Y i Z. CmdPartLoft - + Part Część - + Loft... Wyciągnięcie przez profile ... - + Utility to loft Narzędzie wyciągnięcia po profilach @@ -1797,17 +1797,17 @@ na jego składowe X, Y i Z. CmdPartMakeFace - + Part Część - + Make face from wires Utwórz ścianę z polilinii - + Make face from set of wires (e.g. from a sketch) Stwórz ścianę z zestawu polilinii (np. ze szkicu) @@ -1815,17 +1815,17 @@ na jego składowe X, Y i Z. CmdPartMakeSolid - + Part Część - + Convert to solid Przekształć na bryłę - + Create solid from a shell or compound Stwórz bryłę z powłoki lub złożenia @@ -1833,17 +1833,17 @@ na jego składowe X, Y i Z. CmdPartMirror - + Part Część - + Mirroring... Odbicie lustrzane ... - + Mirroring a selected shape Utwórz odbicie lustrzane wybranego kształtu @@ -1851,17 +1851,17 @@ na jego składowe X, Y i Z. CmdPartOffset - + Part Część - + 3D Offset... Odsunięcie 3D ... - + Utility to offset in 3D Narzędzie tworzące odsunięcie w przestrzeni 3D @@ -1869,17 +1869,17 @@ na jego składowe X, Y i Z. CmdPartOffset2D - + Part Część - + 2D Offset... Odsunięcie 2D ... - + Utility to offset planar shapes Narzędzie do odsuwania płaskich kształtów @@ -1887,17 +1887,17 @@ na jego składowe X, Y i Z. CmdPartPickCurveNet - + Part Część - + Pick curve network Wybierz sieć krzywych - + Pick a curve network Wybierz sieć krzywych @@ -1923,17 +1923,17 @@ na jego składowe X, Y i Z. CmdPartPrimitives - + Part Część - + Create primitives... Utwórz geometrie pierwotne ... - + Creation of parametrized geometric primitives Tworzenie pierwotnych brył parametrycznych @@ -1941,17 +1941,17 @@ na jego składowe X, Y i Z. CmdPartProjectionOnSurface - + Part Część - + Create projection on surface... Utwórz rzut na powierzchni ... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1982,17 +1982,17 @@ Ujęcie widoku określa kierunek rzutowania. CmdPartReverseShape - + Part Część - + Reverse shapes Odwróć kształty - + Reverse orientation of shapes Odwróć orientację kształtów @@ -2000,17 +2000,17 @@ Ujęcie widoku określa kierunek rzutowania. CmdPartRevolve - + Part Część - + Revolve... Obrót... - + Revolve a selected shape Wyciągnij przez obrót wybrany kształt @@ -2018,17 +2018,17 @@ Ujęcie widoku określa kierunek rzutowania. CmdPartRuledSurface - + Part Część - + Create ruled surface Utwórz powierzchnię prostokreślną - + Create a ruled surface from either two Edges or two wires Utwórz powierzchnię prostokreślną z krawędzi lub polilinii @@ -2036,17 +2036,17 @@ Ujęcie widoku określa kierunek rzutowania. CmdPartSection - + Part Część - + Section Przecięcie - + Make a section of two shapes Utwórz część wspólną z dwóch kształtów @@ -2054,12 +2054,12 @@ Ujęcie widoku określa kierunek rzutowania. CmdPartSectionCut - + Persistent section cut Wycinek przekroju - + Creates a persistent section cut of visible part objects Tworzy trwałą reprezentację przekroju widocznych obiektów części @@ -2141,17 +2141,17 @@ Ujęcie widoku określa kierunek rzutowania. CmdPartSweep - + Part Część - + Sweep... Wyciągnięcie po ścieżce ... - + Utility to sweep Narzędzie do wyciągnięcia po ścieżce @@ -2159,27 +2159,27 @@ Ujęcie widoku określa kierunek rzutowania. CmdPartThickness - + Part Część - + Thickness... Grubość ... - + Utility to apply a thickness Narzędzie do nadawania grubości - + Wrong selection Niewłaściwy wybór - + Selected shape is not a solid Zaznaczony kształt nie jest bryłą @@ -2225,73 +2225,73 @@ Ujęcie widoku określa kierunek rzutowania. Command - - + + Part Box Create Utwórz prostopadłościan środowiska Część - + Part Cut Częściowe cięcie - + Common Część wspólna - + Fusion Łączenie - + Compound Złożenie - + Section - Przecięcie + Przekrój - + Import Part Importuj część - + Part Import Curve Net Importuj sieć krzywych w środowisku Część - + Reverse Odwróć - + Make face Utwórz ścianę - + Make Offset Dokonaj odsunięcia - + Make 2D Offset Wykonaj odsunięcie 2D - + Make Thickness Stwórz grubość - + Create ruled surface Utwórz powierzchnię prostokreślną @@ -2374,11 +2374,6 @@ Ujęcie widoku określa kierunek rzutowania. PartDesignGui::TaskDatumParameters - - - Form - Formularz - Selection accepted @@ -2561,7 +2556,7 @@ Uwaga: Położenie jest wyrażone w przestrzeni lokalnej dołączanego obiektu.< Section - Przekrój + Przecięcie @@ -5708,83 +5703,83 @@ in the 3D view for the sweep path. Edytuj %1 - + Part and Part Design workbench Środowisko pracy Część i Projekt Części - - + + Part/Part Design Część / Projekt Części - - + + Import-Export Import-Eksport - - - - - - + + + + + + Wrong selection Nieprawidłowy wybór - - + + Select two shapes please. Proszę wybrać dwa kształty. - - - - - Non-solids selected - Zaznaczone obiekty nie są bryłami - + Non-solids selected + Zaznaczone obiekty nie są bryłami + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Użycie obiektów nie będących bryłami, do przeprowadzenia operacji logicznych, może doprowadzić do nieoczekiwanych rezultatów. Czy chcesz kontynuować? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Wybierz dwa lub więcej kształtów. Lub wybierz jedno złożenie z dwóch lub więcej kształtów, aby obliczyć ich część wspólną. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Wybierz dwa lub więcej kształtów, proszę. Lub, wybierz jedno złożenie zawierające dwa lub więcej kształtów, które mają być połączone. - + Select one shape or more, please. Proszę wybierać jeden lub więcej kształtów. - + All CAD Files Wszystkie pliki CAD - + All Files Wszystkie pliki - + You have to select either two edges or two wires. Należy wybrać dwie krawędzie lub dwie polilinie. @@ -6361,7 +6356,7 @@ Do you want to continue? Bad selection - Nieprawidłowy wybór + Błędny wybór @@ -6413,7 +6408,7 @@ do filtrowania według kolizji lub odległości. Bad selection - Błędny wybór + Nieprawidłowy wybór @@ -6759,4 +6754,98 @@ Oznacza to, że nakładające się na siebie objętości kształtów zostaną us "Filtr złożeń" może być użyty do wydobycia pozostałych części. + + PartGui::DlgScale + + + Scale + Skala + + + + X Factor + X Factor + + + + Factor + Współczynnik + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Kształt + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + Dokument "%1" nie istnieje. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Część + + + + Scale... + Skaluj ... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts b/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts index 71d3c40439..5a459ee301 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Part - - - + + + Box selection Caixa de seleção @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Part - + Check Geometry Verificar a geometria - + Analyzes Geometry For Errors Procura erros na geometria @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Part - + Color per face Cor por face - + Set the color of each individual face of the selected object. Defina uma cor para cada face do objeto selecionado. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Part - + Measure Angular Medida angular - + Measure the angle between two edges. Mede o ângulo entre duas arestas. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Part - + Clear All Limpar tudo - + Clear all dimensions from the screen. Apaga todas as dimensões que aparecem na tela. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Part - + Measure Linear Medida linear - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ entre seus dois vértices. CmdMeasureRefresh - + Part Part - + Refresh Atualizar - + Recalculate the dimensions if the measured points have moved. Recalcula as dimensões @@ -1279,17 +1279,17 @@ quando os pontos de medição se moverem. CmdMeasureToggle3d - + Part Part - + Toggle 3D Alternar 3D - + Toggle on and off all direct dimensions, including angular. Exibe ou oculta todas as dimensões diretas, incluindo as angulares. @@ -1298,17 +1298,17 @@ including angular. CmdMeasureToggleAll - + Part Part - + Toggle All Alternar todos - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Exibe ou oculta todas as dimensões atualmente visíveis: diretas, ortogonais e angulares. @@ -1317,17 +1317,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Part - + Toggle Delta Alternar delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1337,17 +1337,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Part - + Boolean... Booleano... - + Run a boolean operation with two shapes selected Executar uma operação booleana com duas formas selecionadas @@ -1375,17 +1375,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Part - + Box fix 1 Correção de caixa 1 - + Create a box solid without dialog Criar uma caixa sólida sem diálogo @@ -1393,17 +1393,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Part - + Box fix 2 Correção de caixa 2 - + Create a box solid without dialog Criar uma caixa sólida sem diálogo @@ -1411,17 +1411,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Part - + Shape builder... Construtor de forma... - + Advanced utility to create shapes Utilitário avançado para criar formas @@ -1429,17 +1429,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Part - + Chamfer... Chanfro... - + Chamfer the selected edges of a shape Chanfra as arestas selecionadas de uma forma @@ -1447,17 +1447,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Part - + Intersection Intersecção - + Make an intersection of two shapes Fazer uma interseção entre duas formas @@ -1465,17 +1465,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Part - + Compound tools Ferramentas para criação de Composições - + Compound tools: working with lists of shapes. Ferramentas de Compostos: trabalhando com listas de formas. @@ -1483,17 +1483,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Part - + Join objects... Juntar objetos... - + Join walled objects Unir objetos murados @@ -1501,17 +1501,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Part - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Ferramentas para deslocamento de formas (constrói faces paralelas) @@ -1519,17 +1519,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Part - + Split objects... Separar objetos... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1537,17 +1537,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Part - + Make compound Criar um composto - + Make a compound of several shapes Cria um composto a partir de várias formas @@ -1575,17 +1575,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Part - + Cross-sections... Secções transversais... - + Cross-sections Secções transversais @@ -1593,17 +1593,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Part - + Cut Recortar - + Make a cut of two shapes Fazer um recorte entre duas formas @@ -1667,17 +1667,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Part - + Export CAD... Exportar CAD ... - + Exports to a CAD file Exporta para um arquivo CAD @@ -1685,17 +1685,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Part - + Extrude... Extrusão... - + Extrude a selected sketch Extrusão de um esboço selecionado @@ -1703,17 +1703,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Part - + Fillet... Filete... - + Fillet the selected edges of a shape Criar um filete nas arestas selecionadas de uma forma @@ -1721,17 +1721,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Part - + Union União - + Make a union of several shapes Fazer uma união com várias formas @@ -1739,17 +1739,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Part - + Import CAD... Importar CAD... - + Imports a CAD file Importar um arquivo CAD @@ -1757,17 +1757,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Part - + Import curve network... Importar uma rede de curvas... - + Import a curve network Importar uma rede de curvas @@ -1775,17 +1775,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Part - + Loft... Loft... - + Utility to loft Utilitário de loft @@ -1793,17 +1793,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Part - + Make face from wires Fazer face a partir de arames - + Make face from set of wires (e.g. from a sketch) Criar uma face a partir de um conjunto de arames (p. ex. de um esboço) @@ -1811,17 +1811,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Part - + Convert to solid Converter em sólido - + Create solid from a shell or compound Criar sólidos a partir de uma casca ou composto @@ -1829,17 +1829,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Part - + Mirroring... Espelho... - + Mirroring a selected shape Espelhar uma forma selecionada @@ -1847,17 +1847,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Part - + 3D Offset... Deslocamento 3D... - + Utility to offset in 3D Utilitário para offset em 3D @@ -1865,17 +1865,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Part - + 2D Offset... Deslocamento 2D... - + Utility to offset planar shapes Utilidade para fazer offsets de formas planas @@ -1883,17 +1883,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Part - + Pick curve network Selecione uma rede de curvas - + Pick a curve network Selecione uma rede de curvas @@ -1919,17 +1919,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Part - + Create primitives... Criar primitivas... - + Creation of parametrized geometric primitives Criação de primitivas geométricas paramétricas @@ -1937,17 +1937,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Part - + Create projection on surface... Criar projeção na superfície... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1976,17 +1976,17 @@ of projection. CmdPartReverseShape - + Part Part - + Reverse shapes Inverter formas - + Reverse orientation of shapes Inverter a orientação de formas @@ -1994,17 +1994,17 @@ of projection. CmdPartRevolve - + Part Part - + Revolve... Revolver... - + Revolve a selected shape Revolve uma forma selecionada @@ -2012,17 +2012,17 @@ of projection. CmdPartRuledSurface - + Part Part - + Create ruled surface Criar superfície regrada - + Create a ruled surface from either two Edges or two wires Criar uma superfície regrada a partir de duas arestas ou dois arames @@ -2030,17 +2030,17 @@ of projection. CmdPartSection - + Part Part - + Section Seção - + Make a section of two shapes Fazer uma seção com duas formas @@ -2048,12 +2048,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2135,17 +2135,17 @@ of projection. CmdPartSweep - + Part Part - + Sweep... Varra... - + Utility to sweep Utilitário de varredura @@ -2153,27 +2153,27 @@ of projection. CmdPartThickness - + Part Part - + Thickness... Espessura... - + Utility to apply a thickness Utilitário para aplicar uma espessura - + Wrong selection Seleção errada - + Selected shape is not a solid A forma selecionada não é um sólido @@ -2219,73 +2219,73 @@ of projection. Command - - + + Part Box Create Criar caixa de peças - + Part Cut Recorte da peça - + Common Comum - + Fusion Fusão - + Compound Composto - + Section Seção - + Import Part Importar Parte - + Part Import Curve Net Peça formada por rede de curvas importadas - + Reverse Inverter - + Make face Criar face - + Make Offset Criar offset - + Make 2D Offset Criar offset 2D - + Make Thickness Criar espessura - + Create ruled surface Criar superfície regrada @@ -2368,11 +2368,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Formulário - Selection accepted @@ -5689,83 +5684,83 @@ in the 3D view for the sweep path. Editar %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Importação e exportação - - - - - - + + + + + + Wrong selection Seleção errada - - + + Select two shapes please. Selecione duas formas, por favor. - - - - - Non-solids selected - Não-sólidos selecionados - + Non-solids selected + Não-sólidos selecionados + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? O uso de não-sólidos para operações booleanas pode levar a resultados inesperados. Deseja continuar? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Selecione duas formas, ou mais, por favor. Ou selecione um composto contendo duas ou mais formas para calcular a parte comum entre elas. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Selecione duas formas, ou mais, por favor. Ou selecione um composto contendo duas ou mais formas para serem fundidas. - + Select one shape or more, please. Selecione uma forma ou mais, por favor. - + All CAD Files Todos os arquivos de CAD - + All Files Todos os Arquivos - + You have to select either two edges or two wires. Você deve selecionar duas arestas ou dois cabos. @@ -6738,4 +6733,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Escalar + + + + X Factor + X Factor + + + + Factor + Fator + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + O documento '%1' não existe. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Part + + + + Scale... + Escala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts b/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts index ecc94666ff..e03e4e4617 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Parte - - - + + + Box selection Caixa de seleção @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Parte - + Check Geometry Verificar a geometria - + Analyzes Geometry For Errors Analiza Erros Geométricos @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Parte - + Color per face Cor por face - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Parte - + Measure Angular Medição Angular - + Measure the angle between two edges. Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Parte - + Clear All Limpar tudo - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Parte - + Measure Linear Medição Linear - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Parte - + Refresh Atualizar - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Parte - + Toggle 3D Toggle 3D - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part Parte - + Toggle All Ativar/Desativar todos - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Parte - + Toggle Delta Liga/desliga Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Parte - + Boolean... Booliano ... - + Run a boolean operation with two shapes selected Executar uma operação Booleana com duas formas selecionadas @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Parte - + Box fix 1 Reparo de caixa 1 - + Create a box solid without dialog Criar uma caixa sólida sem janela @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Parte - + Box fix 2 Reparo de caixa 2 - + Create a box solid without dialog Criar uma caixa sólida sem janela @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Parte - + Shape builder... Construtor de Formas... - + Advanced utility to create shapes Utilitário avançado para criar formas @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Parte - + Chamfer... Chanfro... - + Chamfer the selected edges of a shape Chanfra as arestas selecionadas de uma forma @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Parte - + Intersection Interseção - + Make an intersection of two shapes Criar uma interseção de duas formas @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Parte - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Ferramentas de composto: trabalhando com listas de formas. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Parte - + Join objects... Juntar objetos... - + Join walled objects Juntar objetos de parede @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Parte - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Ferramentas para deslocamento de formas (constrói faces paralelas) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Parte - + Split objects... Separar objetos... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Parte - + Make compound Fazer composto - + Make a compound of several shapes Fazer composto de várias formas @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Parte - + Cross-sections... Perfis transversais ... - + Cross-sections Perfis transversais @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Parte - + Cut Cortar - + Make a cut of two shapes Efetuar um corte de duas formas @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Parte - + Export CAD... Exportar CAD ... - + Exports to a CAD file Exporta para um ficheiro CAD @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Parte - + Extrude... Extrusão ... - + Extrude a selected sketch Extrusão de um esboço selecionado @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Parte - + Fillet... Boleado (fillet)... - + Fillet the selected edges of a shape Criar Boleado (fillet) nas arestas selecionadas de uma forma @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Parte - + Union União - + Make a union of several shapes Criar uma união de várias formas @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Parte - + Import CAD... Importar CAD... - + Imports a CAD file Importa um arquivo de CAD @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Parte - + Import curve network... Importar uma rede de curvas... - + Import a curve network Importar uma rede de curvas @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Parte - + Loft... Loft... - + Utility to loft Utilitário para arrastar @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Parte - + Make face from wires Fazer face a partir de traços - + Make face from set of wires (e.g. from a sketch) Faz face de um conjunto de traços (por exemplo, de um esboço) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Parte - + Convert to solid Converter para sólido - + Create solid from a shell or compound Criar sólidos a partir de um shell ou composto @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Parte - + Mirroring... Espelhamento... - + Mirroring a selected shape Espelhamento de uma forma selecionada @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Parte - + 3D Offset... Deslocamento 3D... - + Utility to offset in 3D Ferramenta para deslocamento em 3D @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Parte - + 2D Offset... Deslocamento 2D... - + Utility to offset planar shapes Ferramenta para deslocamento de formas planas @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Parte - + Pick curve network Selecionar rede de curvas - + Pick a curve network Selecionar uma rede de curvas @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Parte - + Create primitives... Criar primitivos... - + Creation of parametrized geometric primitives Criação de primitivos geométricos parametrizados @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Parte - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part Parte - + Reverse shapes Reverter formas - + Reverse orientation of shapes Inverter a orientação das formas @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part Parte - + Revolve... Revolver... - + Revolve a selected shape Revolver a forma selecionada @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part Parte - + Create ruled surface Criar superfície regrada - + Create a ruled surface from either two Edges or two wires Criar uma superfície regrada a partir de duas arestas ou dois traços @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part Parte - + Section Secção - + Make a section of two shapes Selecionar duas formas @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part Parte - + Sweep... Varrer... - + Utility to sweep Utilitário para varrer @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part Parte - + Thickness... Espessura ... - + Utility to apply a thickness Utilitário para aplicar uma espessura - + Wrong selection Seleção errada - + Selected shape is not a solid A forma selecionada não é um sólida @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Comum - + Fusion Fusion - + Compound Composto - + Section Secção - + Import Part Import Part - + Part Import Curve Net Part Import Curve Net - + Reverse Inverter - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Criar superfície regrada @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Formulário - Selection accepted @@ -5702,82 +5697,82 @@ in the 3D view for the sweep path. Edite %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Importar/Exportar - - - - - - + + + + + + Wrong selection Seleção errada - - + + Select two shapes please. Por favor, selecione duas formas. - - - - - Non-solids selected - Não-sólidos selecionados - + Non-solids selected + Não-sólidos selecionados + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? O uso de não-sólidos para operações booleanas pode levar a resultados inesperados. Deseja continuar? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Selecione duas formas, ou mais, por favor. Ou selecione um composto contendo duas ou mais formas para calcular a parte comum entre elas. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Selecione duas formas, ou mais, por favor. Ou selecione um composto contendo duas ou mais formas para serem fundidas. - + Select one shape or more, please. Selecione uma forma ou mais, por favor. - + All CAD Files Todos os ficheiros CAD - + All Files Todos os Ficheiros - + You have to select either two edges or two wires. Tem que selecionar duas arestas ou dois traços. @@ -6750,4 +6745,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Escala + + + + X Factor + X Factor + + + + Factor + Fator + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Parte + + + + Scale... + Escala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ro.ts b/src/Mod/Part/Gui/Resources/translations/Part_ro.ts index 6c0391d939..5f002bb28d 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ro.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ro.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Componentă - - - + + + Box selection Selectare cu dreptunghi @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Componentă - + Check Geometry Verifica geometria - + Analyzes Geometry For Errors Analizeaza geometria pentru erori @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Componentă - + Color per face Culoare pe fata - + Set the color of each individual face of the selected object. Setați culoarea fiecărei fețe individuale a obiectului selectat. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Componentă - + Measure Angular Măsură unghiulară - + Measure the angle between two edges. Măsuraţi unghiul dintre două margini. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Componentă - + Clear All Ștergere toate - + Clear all dimensions from the screen. Ştergeţi toate dimensiunile de pe ecran. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Componentă - + Measure Linear Mesura lineară - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ dacă marginile sau fețele sunt alese, va măsura CmdMeasureRefresh - + Part Componentă - + Refresh Reîmprospătare - + Recalculate the dimensions if the measured points have moved. Recalculează dimensiunile @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Componentă - + Toggle 3D Comutați 3D - + Toggle on and off all direct dimensions, including angular. Comută pe și dezactivează toate dimensiunile directe, @@ -1299,17 +1299,17 @@ inclusiv angular. CmdMeasureToggleAll - + Part Componentă - + Toggle All Activează/dezactivează toate - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Comută pe și dezactivează toate dimensiunile vizibile, @@ -1319,17 +1319,17 @@ directe, ortogonale și angulare. CmdMeasureToggleDelta - + Part Componentă - + Toggle Delta Activează/dezactivează Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Componentă - + Boolean... Boolean... - + Run a boolean operation with two shapes selected Executaţi o operaţiune de booleană cu două forme selectate @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Componentă - + Box fix 1 Caseta fiza 1 - + Create a box solid without dialog Creaza o caseta solida fara dialog @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Componentă - + Box fix 2 Caseta fiza 2 - + Create a box solid without dialog Creaza o caseta solida fara dialog @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Componentă - + Shape builder... Constructor de forme... - + Advanced utility to create shapes Utilitar avansat pentru constructia de forme @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Componentă - + Chamfer... Teșitură... - + Chamfer the selected edges of a shape Definiţi teşirea muchiilor selectate ale formei @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Componentă - + Intersection Intersecţie - + Make an intersection of two shapes Creaza intersectia a doua forme @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Componentă - + Compound tools Unelte compuse - + Compound tools: working with lists of shapes. Instrumente de compunere: lucrul cu liste de forme. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Componentă - + Join objects... Unește obiectele... - + Join walled objects Unirea obiectelor tip perete @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Componentă - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Instrumente pentru a compensa formele (construește forme paralele) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Componentă - + Split objects... Obiecte explodate... - + Shape splitting and Compsolid creation tools. Forma divizată și instrumente Compsolid. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Componentă - + Make compound Creați un compus - + Make a compound of several shapes Face un compus din mai multe forme @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Componentă - + Cross-sections... Sectiune transversala... - + Cross-sections Sectiune transversala @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Componentă - + Cut Scădere - + Make a cut of two shapes Creaza o decupare din doua forme @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Componentă - + Export CAD... Exporta CAD... - + Exports to a CAD file Exporta un CAD intr-un fisier @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Componentă - + Extrude... Extrudare... - + Extrude a selected sketch Extrudați o schiță selectată @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Componentă - + Fillet... Rotunjire... - + Fillet the selected edges of a shape Rotunjiți marginile selectate ale unei forme @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Componentă - + Union Reuniune - + Make a union of several shapes Creaza uniunea mai multor forme @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Componentă - + Import CAD... Import CAD... - + Imports a CAD file Importați un fişier CAD @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Componentă - + Import curve network... Import o rețea de curbe... - + Import a curve network Importați o rețea de curbe @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Componentă - + Loft... Pod... - + Utility to loft Utilitar pentru unire @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Componentă - + Make face from wires Crează o fațetă plecănd de la două fire - + Make face from set of wires (e.g. from a sketch) Part_MakeFace : Creează o fațetă plecând de la un ansamblu de fire (de exemplul, plecând de la schiță) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Componentă - + Convert to solid Converteste in solid - + Create solid from a shell or compound Creaza un solid din carcasa sau component @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Componentă - + Mirroring... Oglindire... - + Mirroring a selected shape Copiaza in oglinda forma selectata @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Componentă - + 3D Offset... Decalaj 3D... - + Utility to offset in 3D Utility to offset in 3D Inchideti utilizarea 3D @@ -1870,17 +1870,17 @@ Inchideti utilizarea 3D CmdPartOffset2D - + Part Componentă - + 2D Offset... Decalaj 2D... - + Utility to offset planar shapes Utilitara pentru decalarea formelor planare @@ -1888,17 +1888,17 @@ Inchideti utilizarea 3D CmdPartPickCurveNet - + Part Componentă - + Pick curve network Alegeți reţeaua de curbe - + Pick a curve network Alegeți o reţea de curbe @@ -1924,17 +1924,17 @@ Inchideti utilizarea 3D CmdPartPrimitives - + Part Componentă - + Create primitives... Creaţi primitive... - + Creation of parametrized geometric primitives Crearea de pprimitive geometrice parametrizate @@ -1942,17 +1942,17 @@ Inchideti utilizarea 3D CmdPartProjectionOnSurface - + Part Componentă - + Create projection on surface... Creați proiecția pe suprafață... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1984,17 +1984,17 @@ de proiecție. CmdPartReverseShape - + Part Componentă - + Reverse shapes Inverseaza forma - + Reverse orientation of shapes Inverseaza orientarea formei @@ -2002,17 +2002,17 @@ de proiecție. CmdPartRevolve - + Part Componentă - + Revolve... Roteste... - + Revolve a selected shape Roteste forma selectata @@ -2020,17 +2020,17 @@ de proiecție. CmdPartRuledSurface - + Part Componentă - + Create ruled surface Creaza suprafata dreapta - + Create a ruled surface from either two Edges or two wires Creaţi o suprafaţă riglată din două margini sau două fire @@ -2038,17 +2038,17 @@ de proiecție. CmdPartSection - + Part Componentă - + Section Secţiune - + Make a section of two shapes Creaza o sectiune a doua forme @@ -2056,12 +2056,12 @@ de proiecție. CmdPartSectionCut - + Persistent section cut Secţiune tăietură persistentă - + Creates a persistent section cut of visible part objects Creează o tăietură de secţiune persistentă a obiectelor din partea vizibilă @@ -2143,17 +2143,17 @@ de proiecție. CmdPartSweep - + Part Componentă - + Sweep... Matura... - + Utility to sweep Utilitate pentru maturare @@ -2161,27 +2161,27 @@ de proiecție. CmdPartThickness - + Part Componentă - + Thickness... Grosime... - + Utility to apply a thickness Utilitate pentru a aplica o grosime - + Wrong selection Selecţie greşită - + Selected shape is not a solid Forma selectata nu este un solid @@ -2227,73 +2227,73 @@ de proiecție. Command - - + + Part Box Create Crează caseta de piese - + Part Cut Taie partea - + Common Intersecție - + Fusion Fuziune - + Compound Compus - + Section Secţiune - + Import Part Importă capitol - + Part Import Curve Net Importă Part Curve Net - + Reverse Invers - + Make face Fașa planului - + Make Offset Realizați Offset - + Make 2D Offset Realizați Offset 2D - + Make Thickness Faceți grosime - + Create ruled surface Creaza suprafata dreapta @@ -2376,11 +2376,6 @@ de proiecție. PartDesignGui::TaskDatumParameters - - - Form - Formular - Selection accepted @@ -5708,82 +5703,82 @@ in vizualizarea 3D pentru calea maturarii. Editare %1 - + Part and Part Design workbench Masă de lucru pentru proiectarea pieselor și părților - - + + Part/Part Design Design componentă/capitol - - + + Import-Export Import/Export - - - - - - + + + + + + Wrong selection Selecţie greşită - - + + Select two shapes please. Selectati doua forme. - - - - - Non-solids selected - Forme non pline selecționate - + Non-solids selected + Forme non pline selecționate + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Utilizarea formelor non pline pentru operațiuni booleene poate duce la rezulta imprevizibile Vreți să continuați? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Selecționați cel puțin două forme. Sau selectați un ansamblu de două sau mai multe forme pentru a calcula intersecția. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Selecționați cel puțin două forme, vă rog. Sau selectați un ansamblu de două sau mai multe forme pentru a calcula fuziunea. - + Select one shape or more, please. Selectați una sau mai multe forme, vă rog. - + All CAD Files Toate fişierele CAD - + All Files Toate fișierele - + You have to select either two edges or two wires. Trebuiesc selectate doua margini sau doua polilinii. @@ -6756,4 +6751,98 @@ Acest lucru înseamnă că volumele de forme care se suprapun vor fi șterse. Un "Filtru combinat" poate fi folosit pentru a extrage piesele rămase. + + PartGui::DlgScale + + + Scale + Scalare + + + + X Factor + X Factor + + + + Factor + Factor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Componentă + + + + Scale... + Scară... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ru.ts b/src/Mod/Part/Gui/Resources/translations/Part_ru.ts index d5a85350d7..c26e119a05 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ru.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ru.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Деталь - - - + + + Box selection Выделить область @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Деталь - + Check Geometry Проверка геометрии - + Analyzes Geometry For Errors Проверить геометрию на ошибки @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Деталь - + Color per face Цвет поверхности - + Set the color of each individual face of the selected object. Установить цвет каждой отдельной грани выбранного объекта. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Деталь - + Measure Angular Измерить угол - + Measure the angle between two edges. Измеряет угол между двумя гранями. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Деталь - + Clear All Очистить всё - + Clear all dimensions from the screen. Удалить все размеры с экрана. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Деталь - + Measure Linear Измерить длину - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Деталь - + Refresh Обновить - + Recalculate the dimensions if the measured points have moved. Пересчитать размеры если точки измерения переместились. @@ -1278,17 +1278,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Деталь - + Toggle 3D Переключить 3D - + Toggle on and off all direct dimensions, including angular. Вкл/выкл все прямые размеры, @@ -1298,17 +1298,17 @@ including angular. CmdMeasureToggleAll - + Part Деталь - + Toggle All Переключить всё - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Включить и выключить все видимые размеры, @@ -1318,17 +1318,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Деталь - + Toggle Delta Переключить Дельту - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1340,17 +1340,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Деталь - + Boolean... Булевы операции... - + Run a boolean operation with two shapes selected Булева операция с двумя выбранными формами @@ -1378,17 +1378,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Деталь - + Box fix 1 Поле исправление 1 - + Create a box solid without dialog Создать твердотельный параллелепипед без диалога @@ -1396,17 +1396,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Деталь - + Box fix 2 Поле исправление 2 - + Create a box solid without dialog Создать твердотельный параллелепипед без диалога @@ -1414,17 +1414,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Деталь - + Shape builder... Построитель форм... - + Advanced utility to create shapes Дополнительная утилита для создания форм @@ -1432,17 +1432,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Деталь - + Chamfer... Фаска... - + Chamfer the selected edges of a shape Добавить фаску на выбранные ребра фигуры @@ -1450,17 +1450,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Деталь - + Intersection Пересечение - + Make an intersection of two shapes Создать пересечение двух форм @@ -1468,17 +1468,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Деталь - + Compound tools Составные инструменты - + Compound tools: working with lists of shapes. Инструменты соединений: работа со списками форм. @@ -1486,17 +1486,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Деталь - + Join objects... Объединить объекты... - + Join walled objects Соединить стеновые объекты @@ -1504,17 +1504,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Деталь - + Offset: Смещение: - + Tools to offset shapes (construct parallel shapes) Инструмент смещения форм (конструирует параллельные формы) @@ -1522,17 +1522,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Деталь - + Split objects... Разделить объекты... - + Shape splitting and Compsolid creation tools. Инструменты для разделения форм и создания коплексных твердых тел. @@ -1540,17 +1540,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Деталь - + Make compound Создать соединение - + Make a compound of several shapes Создать соединение из нескольких форм @@ -1578,17 +1578,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Деталь - + Cross-sections... Поперечные сечения... - + Cross-sections Поперечные сечения @@ -1596,17 +1596,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Деталь - + Cut Обрезать - + Make a cut of two shapes Обрезать две фигуры @@ -1670,17 +1670,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Деталь - + Export CAD... Экспорт в CAD ... - + Exports to a CAD file Экспорт в файл CAD @@ -1688,17 +1688,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Деталь - + Extrude... Выдавить... - + Extrude a selected sketch Выдавить выбранный эскиз @@ -1706,17 +1706,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Деталь - + Fillet... Скругление... - + Fillet the selected edges of a shape Cкругление выбранного края формы @@ -1724,17 +1724,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Деталь - + Union Объединение - + Make a union of several shapes Создать объединение нескольких фигур @@ -1742,17 +1742,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Деталь - + Import CAD... Импорт CAD... - + Imports a CAD file Импортировать CAD-файл @@ -1760,17 +1760,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Деталь - + Import curve network... Импортировать полигональную сетку кривых... - + Import a curve network Импортировать полигональную сетку кривых @@ -1778,17 +1778,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Деталь - + Loft... Профиль... - + Utility to loft Утилита для профиля @@ -1796,17 +1796,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Деталь - + Make face from wires Создать грань из ломаных - + Make face from set of wires (e.g. from a sketch) Создать грань на основе набора ломаных линий (например из эскиза) @@ -1814,17 +1814,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Деталь - + Convert to solid Преобразовать в твёрдое тело - + Create solid from a shell or compound Создание твердотельного объекта из оболочки или соединения @@ -1832,17 +1832,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Деталь - + Mirroring... Зеркальное отражение... - + Mirroring a selected shape Зеркальное отражение выбранной фигуры @@ -1850,17 +1850,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Деталь - + 3D Offset... Смещение 3D... - + Utility to offset in 3D Утилита смещения в 3D @@ -1868,17 +1868,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Деталь - + 2D Offset... 2D смещение... - + Utility to offset planar shapes Утилита смещения плоских фигур @@ -1886,17 +1886,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Деталь - + Pick curve network Выберите полигональную сетку кривых - + Pick a curve network Выберите полигональную сетку кривых @@ -1922,17 +1922,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Деталь - + Create primitives... Создать примитивы... - + Creation of parametrized geometric primitives Создание параметризованных геометрических примитивов @@ -1940,17 +1940,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Деталь - + Create projection on surface... Создать проекцию на поверхность... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1982,17 +1982,17 @@ of projection. CmdPartReverseShape - + Part Деталь - + Reverse shapes Обратить нормали формы - + Reverse orientation of shapes Обращает (в обратную стороны) все нормали формы @@ -2000,17 +2000,17 @@ of projection. CmdPartRevolve - + Part Деталь - + Revolve... Вращать... - + Revolve a selected shape Вращать выбранную фигуру @@ -2018,17 +2018,17 @@ of projection. CmdPartRuledSurface - + Part Деталь - + Create ruled surface Создать линейчатую ​​поверхность - + Create a ruled surface from either two Edges or two wires Создать линейчатую поверхность из двух ребер или двух ломанных @@ -2036,17 +2036,17 @@ of projection. CmdPartSection - + Part Деталь - + Section Разделить - + Make a section of two shapes Сделать сечение из двух фигур @@ -2054,12 +2054,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Постоянное сечение - + Creates a persistent section cut of visible part objects Создает постоянное сечение видимых объектов детали @@ -2141,17 +2141,17 @@ of projection. CmdPartSweep - + Part Деталь - + Sweep... Профиль по траектории - + Utility to sweep Утилита построения профиля по траектории @@ -2159,27 +2159,27 @@ of projection. CmdPartThickness - + Part Деталь - + Thickness... Толщина... - + Utility to apply a thickness Утилита смены толщины - + Wrong selection Неправильный выбор - + Selected shape is not a solid Выбранная фигура не является твердотельным объектом @@ -2225,74 +2225,74 @@ of projection. Command - - + + Part Box Create Создание блока деталей - + Part Cut Вырез по детали - + Common Общее - + Fusion Слияние - + Compound Соединить Группировка - + Section - Разделить + Разрез (Сечение) - + Import Part Импорт детали - + Part Import Curve Net Сеть импортированных кривых детали - + Reverse Развернуть - + Make face Сделать грань - + Make Offset Создать Смещение - + Make 2D Offset Сделать смещение 2D - + Make Thickness Создать Толщину - + Create ruled surface Создать линейчатую ​​поверхность @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Форма - Selection accepted @@ -2562,7 +2557,7 @@ Note: The placement is expressed in local space of object being attached. Section - Разрез (Сечение) + Разделить @@ -2999,7 +2994,7 @@ If both lengths are zero, magnitude of direction is used. Shape - Фигура + Фигура(ы) @@ -3283,7 +3278,7 @@ Please check one or more edge entities first. Import - Импорт + импорт @@ -5418,7 +5413,7 @@ by dragging a selection rectangle in the 3D view Loft - Чердак (под крышей) + Профиль @@ -5706,82 +5701,82 @@ in the 3D view for the sweep path. Редактировать %1 - + Part and Part Design workbench Верстак Part и Part Design - - + + Part/Part Design Part/Part Design - - + + Import-Export Импорт/экспорт - - - - - - + + + + + + Wrong selection Неправильный выбор - - + + Select two shapes please. Выберите две фигуры пожалуйста. - - - - - Non-solids selected - Выбраны не твердотельные объекты - + Non-solids selected + Выбраны не твердотельные объекты + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Использование не твердых тел для булевых операций может привести к непредвиденным результатам. Вы хотите продолжить? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Пожалуйста выберите две или более фигуры. Или выберите соединение, также содержащее две или более фигуры, для вычисления пересечения между ними. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Пожалуйста выберите две или более фигуры. Или выберите соединение, также содержащее две или более фигуры, для операции слияния. - + Select one shape or more, please. Выберите одну или более фигур. - + All CAD Files Все CAD файлы - + All Files Все файлы - + You have to select either two edges or two wires. Вы должны выбрать два ребра или две линии. @@ -5838,7 +5833,7 @@ Do you want to continue? Shape - Фигура(ы) + Фигура @@ -6238,7 +6233,7 @@ Do you want to continue? Measure - Измерить + Измерения @@ -6760,4 +6755,98 @@ A 'Compound Filter' can be used to extract the remaining pieces. 11 0. + + PartGui::DlgScale + + + Scale + Масштаб + + + + X Factor + X Factor + + + + Factor + Фактор + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Фигура(ы) + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Деталь + + + + Scale... + Масштаб... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sl.ts b/src/Mod/Part/Gui/Resources/translations/Part_sl.ts index cd3ca71bf5..fc58132502 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sl.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Del - - - + + + Box selection Izbirni kvader @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Del - + Check Geometry Preveri Geometrijo - + Analyzes Geometry For Errors Preišče, ali ima geometrija napako @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Del - + Color per face Barva na ploskev - + Set the color of each individual face of the selected object. Določi barvo vsaki posamezni ploskvi izbranega predmeta. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Del - + Measure Angular Izmeri kot - + Measure the angle between two edges. Izmeri kót med robovoma. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Del - + Clear All Počisti vse - + Clear all dimensions from the screen. Izbriši vse kote na zaslonu. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Del - + Measure Linear Izmeri razdaljo - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ izmerjena razdalje med njihovima ogliščema. CmdMeasureRefresh - + Part Del - + Refresh Osveži - + Recalculate the dimensions if the measured points have moved. Ponovno preračunaj razdalje, @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Del - + Toggle 3D Preklopi 3D - + Toggle on and off all direct dimensions, including angular. Vključi oz. izključi vse neposredne kote @@ -1299,17 +1299,17 @@ skupaj s kotnimi kotami. CmdMeasureToggleAll - + Part Del - + Toggle All Preklopi vse - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Vklopi oz. izklopi vse trenutno vidne kote: @@ -1319,17 +1319,17 @@ neposredne, pravokotne in kotne. CmdMeasureToggleDelta - + Part Del - + Toggle Delta Preklopi razliko - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ na svoje X, Y in Z komponente. CmdPartBoolean - + Part Del - + Boolean... Logična operacija … - + Run a boolean operation with two shapes selected Zaženi logično operacijo z dvema izbranima oblikama @@ -1379,17 +1379,17 @@ na svoje X, Y in Z komponente. CmdPartBox2 - + Part Del - + Box fix 1 1. pritrjen kvader - + Create a box solid without dialog Ustvari kvader brez opravilnega okna @@ -1397,17 +1397,17 @@ na svoje X, Y in Z komponente. CmdPartBox3 - + Part Del - + Box fix 2 2. pritrjen kvader - + Create a box solid without dialog Ustvari kvader brez opravilnega okna @@ -1415,17 +1415,17 @@ na svoje X, Y in Z komponente. CmdPartBuilder - + Part Del - + Shape builder... Graditelj oblik … - + Advanced utility to create shapes Napreden pripomoček za ustvarjanje oblik @@ -1433,17 +1433,17 @@ na svoje X, Y in Z komponente. CmdPartChamfer - + Part Del - + Chamfer... Prisekaj ... - + Chamfer the selected edges of a shape Prisekaj izbrane robove oblike @@ -1451,17 +1451,17 @@ na svoje X, Y in Z komponente. CmdPartCommon - + Part Del - + Intersection Sečišče - + Make an intersection of two shapes Naredi presek dveh oblik @@ -1469,17 +1469,17 @@ na svoje X, Y in Z komponente. CmdPartCompCompoundTools - + Part Del - + Compound tools Orodja za sestave - + Compound tools: working with lists of shapes. Orodja za sestave: delo s seznami oblik. @@ -1487,17 +1487,17 @@ na svoje X, Y in Z komponente. CmdPartCompJoinFeatures - + Part Del - + Join objects... Spoji predmete … - + Join walled objects Spoji stenaste predmete @@ -1505,17 +1505,17 @@ na svoje X, Y in Z komponente. CmdPartCompOffset - + Part Del - + Offset: Odmik: - + Tools to offset shapes (construct parallel shapes) Orodja za odmikanje oblik (tvorjenje vzporednih oblik) @@ -1523,17 +1523,17 @@ na svoje X, Y in Z komponente. CmdPartCompSplitFeatures - + Part Del - + Split objects... Razcepi predmete ... - + Shape splitting and Compsolid creation tools. Orodja za razdvajanje oblik in ustvarjanje telesij. @@ -1541,17 +1541,17 @@ na svoje X, Y in Z komponente. CmdPartCompound - + Part Del - + Make compound Ustvari sestav - + Make a compound of several shapes Ustvari sestav iz več oblik @@ -1579,17 +1579,17 @@ na svoje X, Y in Z komponente. CmdPartCrossSections - + Part Del - + Cross-sections... Prečni prerezi … - + Cross-sections Prečni prerezi @@ -1597,17 +1597,17 @@ na svoje X, Y in Z komponente. CmdPartCut - + Part Del - + Cut Izreži - + Make a cut of two shapes Ustvari izrez iz dveh oblik @@ -1671,17 +1671,17 @@ na svoje X, Y in Z komponente. CmdPartExport - + Part Del - + Export CAD... Izvozi CAD... - + Exports to a CAD file Izvoz v datoteko CAD @@ -1689,17 +1689,17 @@ na svoje X, Y in Z komponente. CmdPartExtrude - + Part Del - + Extrude... Izrini … - + Extrude a selected sketch Izrini izbrani očrt @@ -1707,17 +1707,17 @@ na svoje X, Y in Z komponente. CmdPartFillet - + Part Del - + Fillet... Zaokrožitev … - + Fillet the selected edges of a shape Zaokroži izbrane robove oblike @@ -1725,17 +1725,17 @@ na svoje X, Y in Z komponente. CmdPartFuse - + Part Del - + Union Seštevek - + Make a union of several shapes Ustvari seštevek večih oblik @@ -1743,17 +1743,17 @@ na svoje X, Y in Z komponente. CmdPartImport - + Part Del - + Import CAD... Uvoz CAD... - + Imports a CAD file Uvoz datoteke CAD @@ -1761,17 +1761,17 @@ na svoje X, Y in Z komponente. CmdPartImportCurveNet - + Part Del - + Import curve network... Uvoz omrežja krivulj... - + Import a curve network Uvoz omrežja krivulj @@ -1779,17 +1779,17 @@ na svoje X, Y in Z komponente. CmdPartLoft - + Part Del - + Loft... Navleci … - + Utility to loft Pripomoček za navlačenje @@ -1797,17 +1797,17 @@ na svoje X, Y in Z komponente. CmdPartMakeFace - + Part Del - + Make face from wires Ustvari ploskev iz črtovja - + Make face from set of wires (e.g. from a sketch) Naredi ploskev iz nabora črtovij (npr. iz očrta) @@ -1815,17 +1815,17 @@ na svoje X, Y in Z komponente. CmdPartMakeSolid - + Part Del - + Convert to solid Pretvori v telo - + Create solid from a shell or compound Ustvari telo iz lupine ali sestava @@ -1833,17 +1833,17 @@ na svoje X, Y in Z komponente. CmdPartMirror - + Part Del - + Mirroring... Zrcaljenje... - + Mirroring a selected shape Zrcaljenje izbrane oblike @@ -1851,17 +1851,17 @@ na svoje X, Y in Z komponente. CmdPartOffset - + Part Del - + 3D Offset... 3D odmik... - + Utility to offset in 3D Pripomoček za odmik v 3D @@ -1869,17 +1869,17 @@ na svoje X, Y in Z komponente. CmdPartOffset2D - + Part Del - + 2D Offset... 2D odmik... - + Utility to offset planar shapes Pripomoček za odmikanje ravninskih oblik @@ -1887,17 +1887,17 @@ na svoje X, Y in Z komponente. CmdPartPickCurveNet - + Part Del - + Pick curve network Izberite omrežje krivulj - + Pick a curve network Izberite omrežje krivulj @@ -1923,17 +1923,17 @@ na svoje X, Y in Z komponente. CmdPartPrimitives - + Part Del - + Create primitives... Ustvari osnovne oblike … - + Creation of parametrized geometric primitives Ustvarjanje parametriziranih osnovnih geometrijskih oblik @@ -1941,17 +1941,17 @@ na svoje X, Y in Z komponente. CmdPartProjectionOnSurface - + Part Del - + Create projection on surface... Naredi preslikavo na površje ... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ pogleda kamere. CmdPartReverseShape - + Part Del - + Reverse shapes Obrni oblike - + Reverse orientation of shapes Obrni usmerjenost oblik @@ -2001,17 +2001,17 @@ pogleda kamere. CmdPartRevolve - + Part Del - + Revolve... Zvrti … - + Revolve a selected shape Zvrti izbrano obliko @@ -2019,17 +2019,17 @@ pogleda kamere. CmdPartRuledSurface - + Part Del - + Create ruled surface Ustvari premonosno ploskev - + Create a ruled surface from either two Edges or two wires Ustvari premonosno ploskev iz dveh robov ali dveh črtovij @@ -2037,17 +2037,17 @@ pogleda kamere. CmdPartSection - + Part Del - + Section Presek - + Make a section of two shapes Ustvari presek dveh oblik @@ -2055,12 +2055,12 @@ pogleda kamere. CmdPartSectionCut - + Persistent section cut Trajajoči prerez - + Creates a persistent section cut of visible part objects Ustvari trajni prerez skozi vidne dele @@ -2142,17 +2142,17 @@ pogleda kamere. CmdPartSweep - + Part Del - + Sweep... Vzdolži... - + Utility to sweep Pripomoček za vzdolženje @@ -2160,27 +2160,27 @@ pogleda kamere. CmdPartThickness - + Part Del - + Thickness... Debelina... - + Utility to apply a thickness Orodje za dodajanje debeline - + Wrong selection Napačna izbira - + Selected shape is not a solid Izbrana oblika ni telo @@ -2226,73 +2226,73 @@ pogleda kamere. Command - - + + Part Box Create Ustvari kvader v okolju Del - + Part Cut Rezanje dela - + Common Presek - + Fusion Spojitev - + Compound Sestav - + Section Presek - + Import Part Uvoz dela - + Part Import Curve Net Uvoz dela kot krivuljna mreža - + Reverse Obrni - + Make face Ustvari ploskev - + Make Offset Naredi odmik - + Make 2D Offset Naredi 2D odmik - + Make Thickness Dodaj debelino - + Create ruled surface Ustvari premonosno ploskev @@ -2375,11 +2375,6 @@ pogleda kamere. PartDesignGui::TaskDatumParameters - - - Form - Oblika - Selection accepted @@ -3000,7 +2995,7 @@ If both lengths are zero, magnitude of direction is used. Shape - Oblika + Oblika(e) @@ -5712,83 +5707,83 @@ in the 3D view for the sweep path. Uredi %1 - + Part and Part Design workbench Delovno okolje Del (Part) in Snovalnik delov (Part design) - - + + Part/Part Design Del (Part)/Snovalnik delov (Part design) - - + + Import-Export Uvoz - Izvoz - - - - - - + + + + + + Wrong selection Napačen izbor - - + + Select two shapes please. Izberite dve obliki. - - - - - Non-solids selected - Izbrani netelesni predmeti - + Non-solids selected + Izbrani netelesni predmeti + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Uporaba netelesnih predmetov za logične operacije lahko privede do nepričakovanih rezultatov. Ali želite nadaljevati? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Izberite dve ali več oblik, oz. izberite en sestav, ki vsebuje dve ali več oblik za izračun preseka. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Izberite dve ali več oblik, oz. izberite en sestav, ki vsebuje dve ali več oblik za zlitje. - + Select one shape or more, please. Izberite eno ali več oblik. - + All CAD Files Vse datoteke CAD - + All Files Vse datoteke - + You have to select either two edges or two wires. Izbrati morate ali dva robova ali dve črtovji. @@ -5844,7 +5839,7 @@ Ali želite nadaljevati? Shape - Oblika(e) + Oblika @@ -6484,7 +6479,7 @@ Za vsako obliko bo ustvarjeno "Sito sestava". Continue - Nadaljuj + Naprej @@ -6760,4 +6755,98 @@ To pomeni, da bodo prekrivajoči deli oblik odstranjeni. Ostale dele lahko izvelečet s "sitom sestava". + + PartGui::DlgScale + + + Scale + Povečava + + + + X Factor + X Factor + + + + Factor + Količnik + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Oblika(e) + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Del + + + + Scale... + Povečava... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts b/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts index b9e63a4779..0ad39d6b6d 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Part - - - + + + Box selection Pravougaoni izbor @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Part - + Check Geometry Proveri Geometriju - + Analyzes Geometry For Errors Analizira geometriju u potrazi za greškama @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Part - + Color per face Boja stranice - + Set the color of each individual face of the selected object. Ofarbaj pojedinačne stranice izabranog objekta. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Part - + Measure Angular Izmeri ugao - + Measure the angle between two edges. Izmeri ugao između dve ivice. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Part - + Clear All Obriši sve - + Clear all dimensions from the screen. Obriši sve mere sa ekrana. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Part - + Measure Linear Izmeri dužinu - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ ako su izabrane ivice ili stranice, merenje će biti CmdMeasureRefresh - + Part Part - + Refresh Osveži - + Recalculate the dimensions if the measured points have moved. Ponovo izračunajte dimenzije @@ -1279,17 +1279,17 @@ ako su se izmerene pomerene. CmdMeasureToggle3d - + Part Part - + Toggle 3D Sakrij/Prikaži 3D - + Toggle on and off all direct dimensions, including angular. Sakrij ili prikaži sve direktne kote rastojanja i uglova. @@ -1298,17 +1298,17 @@ including angular. CmdMeasureToggleAll - + Part Part - + Toggle All Sakrij/Prikaži sve - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Sakrij/Prikaži sve trenutno vidljive dimenzije, @@ -1318,17 +1318,17 @@ direktne, ortogonalne i ugaone. CmdMeasureToggleDelta - + Part Part - + Toggle Delta Sakrij/Prikaži Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1339,17 +1339,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartBoolean - + Part Part - + Boolean... Bulova... - + Run a boolean operation with two shapes selected Izvrši Bulovu operaciju ca dva izabrana oblika @@ -1377,17 +1377,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartBox2 - + Part Part - + Box fix 1 Blok popravka 1 - + Create a box solid without dialog Napravi kutijasto puno telo bez dijaloga @@ -1395,17 +1395,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartBox3 - + Part Part - + Box fix 2 Blok popravka 2 - + Create a box solid without dialog Napravi kutijasto puno telo bez dijaloga @@ -1413,17 +1413,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartBuilder - + Part Part - + Shape builder... Graditelj oblika... - + Advanced utility to create shapes Napredna alatka za pravljenje oblika @@ -1431,17 +1431,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartChamfer - + Part Part - + Chamfer... Obori ivice... - + Chamfer the selected edges of a shape Obori izabrane ivice oblika @@ -1449,17 +1449,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCommon - + Part Part - + Intersection Presek - + Make an intersection of two shapes Napravi presek dva oblika @@ -1467,17 +1467,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCompCompoundTools - + Part Part - + Compound tools Alatke za sastavljanje - + Compound tools: working with lists of shapes. Alatke za sastavljanje: rade sa listama oblika. @@ -1485,17 +1485,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCompJoinFeatures - + Part Part - + Join objects... Spoji objekte... - + Join walled objects Spoji objekte sa zidovima @@ -1503,17 +1503,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCompOffset - + Part Part - + Offset: Odmak: - + Tools to offset shapes (construct parallel shapes) Alati za odmicanje oblika (konstruisanje paralelnih oblika) @@ -1521,17 +1521,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCompSplitFeatures - + Part Part - + Split objects... Podeli objekte... - + Shape splitting and Compsolid creation tools. Alati za podelu objekata i pravljenje sastavljenih objekata. @@ -1539,17 +1539,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCompound - + Part Part - + Make compound Napravi sastavljeni objekat - + Make a compound of several shapes Napravi sastavljeni objekat od nekoliko oblika @@ -1577,17 +1577,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCrossSections - + Part Part - + Cross-sections... Poprečni presek... - + Cross-sections Poprečni presek @@ -1595,17 +1595,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartCut - + Part Part - + Cut Isecanje - + Make a cut of two shapes Isecite jedan oblik sa drugim @@ -1669,17 +1669,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartExport - + Part Part - + Export CAD... Izvezi CAD... - + Exports to a CAD file Izvozi u CAD datoteku @@ -1687,17 +1687,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartExtrude - + Part Part - + Extrude... Izvlačenje... - + Extrude a selected sketch Izvuci izabranu skicu @@ -1705,17 +1705,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartFillet - + Part Part - + Fillet... Zaobljenje... - + Fillet the selected edges of a shape Zaobli izabrane ivice oblika @@ -1723,17 +1723,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartFuse - + Part Part - + Union Unija - + Make a union of several shapes Napravi uniju od više oblika @@ -1741,17 +1741,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartImport - + Part Part - + Import CAD... Uvezi CAD... - + Imports a CAD file Uvozi CAD datoteku @@ -1759,17 +1759,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartImportCurveNet - + Part Part - + Import curve network... Uvezi mrežu krivih... - + Import a curve network Uvezi mrežu krivih @@ -1777,17 +1777,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartLoft - + Part Part - + Loft... Kroz preseke... - + Utility to loft Napravi oblik pomoću dva preseka @@ -1795,17 +1795,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartMakeFace - + Part Part - + Make face from wires Napravi stranicu od žice - + Make face from set of wires (e.g. from a sketch) Napravi stranicu od skupa žica (npr. od skice) @@ -1813,17 +1813,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartMakeSolid - + Part Part - + Convert to solid Pretvori u puno telo - + Create solid from a shell or compound Napravi puno telo od ljuske ili sastavljenog objekta @@ -1831,17 +1831,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartMirror - + Part Part - + Mirroring... Simetrično preslikavanje... - + Mirroring a selected shape Simetrično preslikaj izabrani oblika @@ -1849,17 +1849,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartOffset - + Part Part - + 3D Offset... 3D odmak... - + Utility to offset in 3D Alatka za 3D odmicanje @@ -1867,17 +1867,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartOffset2D - + Part Part - + 2D Offset... 2D odmak... - + Utility to offset planar shapes Alatka za odmicanje ravanskih oblika @@ -1885,17 +1885,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartPickCurveNet - + Part Part - + Pick curve network Izaberi mrežu krivih - + Pick a curve network Izaberi mrežu krivih @@ -1921,17 +1921,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartPrimitives - + Part Part - + Create primitives... Napravi primitive... - + Creation of parametrized geometric primitives Pravljenje parametarskih geometrijskih primitiva @@ -1939,17 +1939,17 @@ t. j. X, Y i Z komponente direktnih kota. CmdPartProjectionOnSurface - + Part Part - + Create projection on surface... Projekcija na površinu... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1981,17 +1981,17 @@ projekcije. CmdPartReverseShape - + Part Part - + Reverse shapes Okreni oblik - + Reverse orientation of shapes Okreni orijentaciju oblika @@ -1999,17 +1999,17 @@ projekcije. CmdPartRevolve - + Part Part - + Revolve... Rotacija... - + Revolve a selected shape Rotiraj izabrani oblik @@ -2017,17 +2017,17 @@ projekcije. CmdPartRuledSurface - + Part Part - + Create ruled surface Ravna površina - + Create a ruled surface from either two Edges or two wires Napravi ravnu površinu ili od dve ivice ili od dve žice @@ -2035,17 +2035,17 @@ projekcije. CmdPartSection - + Part Part - + Section Presek - + Make a section of two shapes Napravi presek dva oblika @@ -2053,12 +2053,12 @@ projekcije. CmdPartSectionCut - + Persistent section cut Iseci presek - + Creates a persistent section cut of visible part objects Iseci trajni presek od vidljivih objekata @@ -2140,17 +2140,17 @@ projekcije. CmdPartSweep - + Part Part - + Sweep... Po putanji... - + Utility to sweep Napravi oblik izvlačenjem preseka po putanji @@ -2158,27 +2158,27 @@ projekcije. CmdPartThickness - + Part Part - + Thickness... Debljina... - + Utility to apply a thickness Napravi oblik dodavanjem debljine - + Wrong selection Pogrešan izbor - + Selected shape is not a solid Izabrani oblik nije puno telo @@ -2224,73 +2224,73 @@ projekcije. Command - - + + Part Box Create Napravi kutiju - + Part Cut Part isecanje - + Common Presek - + Fusion Unija - + Compound Sastavljeni objekat - + Section Presek - + Import Part Uvezi deo - + Part Import Curve Net Part Import Curve Net - + Reverse Obrnuto - + Make face Napravi stranicu - + Make Offset Napravi odmak - + Make 2D Offset Napravi 2D odmak - + Make Thickness Napravi debljinu - + Create ruled surface Ravna površina @@ -2373,11 +2373,6 @@ projekcije. PartDesignGui::TaskDatumParameters - - - Form - Obrazac - Selection accepted @@ -5706,83 +5701,83 @@ in the 3D view for the sweep path. Uredi %1 - + Part and Part Design workbench Part i Part Design radno okruženje - - + + Part/Part Design Part/Part Design - - + + Import-Export Uvoz/Izvoz - - - - - - + + + + + + Wrong selection Pogrešan izbor - - + + Select two shapes please. Izaberi dva oblika. - - - - - Non-solids selected - Izabran je objekat koji nije puno telo - + Non-solids selected + Izabran je objekat koji nije puno telo + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Upotreba objekata koja nisu puna tela za Bulove operacije može dovesti do neočekivanih rezultata. Da li želiš da nastaviš? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Za određivanje preklopa izaberi dva ili više oblika, izaberi jedno sastavljeno telo koje sadrži dva ili više oblika. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Za uniju izaberi dva ili više oblika, izaberi jedno sastavljeno telo koje sadrži dva ili više oblika. - + Select one shape or more, please. Izaberi jedan ili više oblika. - + All CAD Files Sve CAD datoteke - + All Files Sve datoteke - + You have to select either two edges or two wires. Morate izabrati ili dve ivice ili dve žice. @@ -6755,4 +6750,98 @@ Ova bulova logička operacija uklanja sve delove objekata koji se preklapaju. 'Filter sastavljanja' se može koristiti za izdvajanje preostalih delova. + + PartGui::DlgScale + + + Scale + Razmera + + + + X Factor + X Factor + + + + Factor + Koeficijent + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Oblik + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Part + + + + Scale... + Razmera... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sr.ts b/src/Mod/Part/Gui/Resources/translations/Part_sr.ts index bf05c1c30a..81b0f0bb34 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sr.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Part - - - + + + Box selection Правоугаони избор @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Part - + Check Geometry Провери Геометрију - + Analyzes Geometry For Errors Анализира геометрију у потрази за грешкама @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Part - + Color per face Боја странице - + Set the color of each individual face of the selected object. Офарбај појединачне странице изабраног објекта. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Part - + Measure Angular Измери угао - + Measure the angle between two edges. Измери угао између две ивице. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Part - + Clear All Обриши све - + Clear all dimensions from the screen. Обриши све мере са екрана. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Part - + Measure Linear Измери дужину - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Part - + Refresh Оcвежи - + Recalculate the dimensions if the measured points have moved. Поново израчунајте димензије @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Part - + Toggle 3D Сакриј/Прикажи 3Д - + Toggle on and off all direct dimensions, including angular. Сакриј или прикажи све директне коте растојања и углова. @@ -1298,17 +1298,17 @@ including angular. CmdMeasureToggleAll - + Part Part - + Toggle All Сакриј/Прикажи све - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Сакриј/Прикажи све тренутно видљиве димензије, @@ -1318,17 +1318,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Part - + Toggle Delta Сакриј/Прикажи Делта - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1339,17 +1339,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Part - + Boolean... Булова... - + Run a boolean operation with two shapes selected Изврши Булову операцију cа два одабрана облика @@ -1377,17 +1377,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Part - + Box fix 1 Блок поправка 1 - + Create a box solid without dialog Направи кутијасто пуно тело без дијалога @@ -1395,17 +1395,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Part - + Box fix 2 Блок поправка 2 - + Create a box solid without dialog Направи кутијасто пуно тело без дијалога @@ -1413,17 +1413,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Part - + Shape builder... Градитељ облика... - + Advanced utility to create shapes Напредна алатка за прављење облика @@ -1431,17 +1431,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Part - + Chamfer... Обори ивице... - + Chamfer the selected edges of a shape Обори изабране ивице облика @@ -1449,17 +1449,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Part - + Intersection Пресек - + Make an intersection of two shapes Направи преcек два облика @@ -1467,17 +1467,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Part - + Compound tools Алатке за састављање - + Compound tools: working with lists of shapes. Алатке за састављање: раде са листама облика. @@ -1485,17 +1485,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Part - + Join objects... Споји објекте... - + Join walled objects Споји објекте са зидовима @@ -1503,17 +1503,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Part - + Offset: Одмак: - + Tools to offset shapes (construct parallel shapes) Алати за одмицање облика (конструисање паралелних облика) @@ -1521,17 +1521,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Part - + Split objects... Подели објекте... - + Shape splitting and Compsolid creation tools. Алати за поделу објеката и прављење састављених објеката. @@ -1539,17 +1539,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Part - + Make compound Направи састављени објекат - + Make a compound of several shapes Направи састављени објекат од неколико облика @@ -1577,17 +1577,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Part - + Cross-sections... Попречни пресек... - + Cross-sections Попречни пресек @@ -1595,17 +1595,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Part - + Cut Исецање - + Make a cut of two shapes Исеци један облик са другим @@ -1669,17 +1669,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Part - + Export CAD... Извези CAD... - + Exports to a CAD file Извози у CAD датотеку @@ -1687,17 +1687,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Part - + Extrude... Извлачење... - + Extrude a selected sketch Извуците изабрану скицу @@ -1705,17 +1705,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Part - + Fillet... Заобљење... - + Fillet the selected edges of a shape Заобли изабране ивице облика @@ -1723,17 +1723,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Part - + Union Унија - + Make a union of several shapes Направи унију од више облика @@ -1741,17 +1741,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Part - + Import CAD... Увези CAD... - + Imports a CAD file Увози CAD датотеку @@ -1759,17 +1759,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Part - + Import curve network... Увези мрежу кривих... - + Import a curve network Увези мрежу кривих @@ -1777,17 +1777,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Part - + Loft... Кроз пресеке... - + Utility to loft Направи облик помоћу два пресека @@ -1795,17 +1795,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Part - + Make face from wires Направи страницу од жице - + Make face from set of wires (e.g. from a sketch) Направи страницу од скупа жица (нпр. од скице) @@ -1813,17 +1813,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Part - + Convert to solid Претвори у пуно тело - + Create solid from a shell or compound Направи пуно тело од љуске или састављеног објекта @@ -1831,17 +1831,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Part - + Mirroring... Симетрично пресликавање... - + Mirroring a selected shape Симетрично пресликај изабрани облик @@ -1849,17 +1849,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Part - + 3D Offset... 3Д одмак... - + Utility to offset in 3D Алатка за 3Д одмицање @@ -1867,17 +1867,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Part - + 2D Offset... 2D одмак... - + Utility to offset planar shapes Алатка за одмицање раванских облика @@ -1885,17 +1885,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Part - + Pick curve network Изабери мрежу кривих - + Pick a curve network Изабери мрежу кривих @@ -1921,17 +1921,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Part - + Create primitives... Направи примитиве... - + Creation of parametrized geometric primitives Прављење параметарcких геометријcких примитива @@ -1939,17 +1939,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Part - + Create projection on surface... Пројекција на површину... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1981,17 +1981,17 @@ of projection. CmdPartReverseShape - + Part Part - + Reverse shapes Окрени облик - + Reverse orientation of shapes Окрени оријентацију облика @@ -1999,17 +1999,17 @@ of projection. CmdPartRevolve - + Part Part - + Revolve... Ротација... - + Revolve a selected shape Ротирај изабрани облик @@ -2017,17 +2017,17 @@ of projection. CmdPartRuledSurface - + Part Part - + Create ruled surface Равна површина - + Create a ruled surface from either two Edges or two wires Направи равну површину или од две ивице или од две жице @@ -2035,17 +2035,17 @@ of projection. CmdPartSection - + Part Part - + Section Пресек - + Make a section of two shapes Направи пресек два облика @@ -2053,12 +2053,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Исеци пресек - + Creates a persistent section cut of visible part objects Исеци трајни пресек од видљивих објеката @@ -2140,17 +2140,17 @@ of projection. CmdPartSweep - + Part Part - + Sweep... По путањи... - + Utility to sweep Направи облик извлачењем пресека по путањи @@ -2158,27 +2158,27 @@ of projection. CmdPartThickness - + Part Part - + Thickness... Дебљина... - + Utility to apply a thickness Направи облик додавањем дебљине - + Wrong selection Погрешан избор - + Selected shape is not a solid Изабрани облик није пуно тело @@ -2224,73 +2224,73 @@ of projection. Command - - + + Part Box Create Направи кутију - + Part Cut Part исецање - + Common Пресек - + Fusion Унија - + Compound Састављени објекат - + Section Пресек - + Import Part Увези део - + Part Import Curve Net Part Import Curve Net - + Reverse Обрнуто - + Make face Направи страницу - + Make Offset Направи одмак - + Make 2D Offset Направи 2D одмак - + Make Thickness Направи дебљину - + Create ruled surface Равна површина @@ -2373,11 +2373,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Образац - Selection accepted @@ -5705,83 +5700,83 @@ in the 3D view for the sweep path. Уреди %1 - + Part and Part Design workbench Part и Part Design радно окружење - - + + Part/Part Design Part/Part Design - - + + Import-Export Увоз/извоз - - - - - - + + + + + + Wrong selection Погрешан избор - - + + Select two shapes please. Изабери два облика. - - - - - Non-solids selected - Изабран је објекат који није пуно тело - + Non-solids selected + Изабран је објекат који није пуно тело + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Употреба објеката која нису пуна тела за Булове операције може довести до неочекиваних резултата. Да ли желиш да наставиш? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. За одређивање преклопа изабери два или више облика, изабери једно састављено тело које садржи два или више облика. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. За унију изабери два или више облика, изабери једно састављено тело које садржи два или више облика. - + Select one shape or more, please. Изабери један или више облика. - + All CAD Files Све CAD датотеке - + All Files Све датотеке - + You have to select either two edges or two wires. Морате изабрати или две ивице или две жице. @@ -6754,4 +6749,98 @@ A 'Compound Filter' can be used to extract the remaining pieces. 'Филтер састављања' се може користити за издвајање преосталих делова. + + PartGui::DlgScale + + + Scale + Размера + + + + X Factor + X Factor + + + + Factor + Коефицијент + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Облик + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Part + + + + Scale... + Размера... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts b/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts index b60282e0be..12e1c815e1 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Detalj - - - + + + Box selection Lådmarkering @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Detalj - + Check Geometry Kontrollera geometri - + Analyzes Geometry For Errors Analyserar geometri efter fel @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Detalj - + Color per face Färg per yta - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Detalj - + Measure Angular Mät vinkel - + Measure the angle between two edges. Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Detalj - + Clear All Rensa allt - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Detalj - + Measure Linear Mät linjärt - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Detalj - + Refresh Uppdatera - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Detalj - + Toggle 3D Växla 3D - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part Detalj - + Toggle All Växla alla - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Detalj - + Toggle Delta Växla delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Detalj - + Boolean... Boolesk... - + Run a boolean operation with two shapes selected Kör en boolesk operation med två valda former @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Detalj - + Box fix 1 Kub fix 1 - + Create a box solid without dialog Skapa en lådsolid utan dialogruta @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Detalj - + Box fix 2 Kub fix 2 - + Create a box solid without dialog Skapa en lådsolid utan dialogruta @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Detalj - + Shape builder... form byggare ... - + Advanced utility to create shapes Avancerade verktyg för att skapa former @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Detalj - + Chamfer... Avfasning... - + Chamfer the selected edges of a shape Fasa av de markerade kanterna på en form @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Detalj - + Intersection Skärning - + Make an intersection of two shapes Gör en skärning mellan två former @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Detalj - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Kompositionsverktyg: arbeta med formlistor. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Detalj - + Join objects... Sammanfoga objekt... - + Join walled objects Sammanfoga objekt med väggar @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Detalj - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Verktyg för att förskjuta former (konstruera parallella former) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Detalj - + Split objects... Dela objekt... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Detalj - + Make compound Skapa komposition - + Make a compound of several shapes Skapa en komposition av flera former @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Detalj - + Cross-sections... Tvärsnitt... - + Cross-sections Tvärsnitt @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Detalj - + Cut Klipp - + Make a cut of two shapes Gör ett klipp med två former @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Detalj - + Export CAD... Exportera CAD ... - + Exports to a CAD file Exporterar till en CAD-fil @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Detalj - + Extrude... Extrudera... - + Extrude a selected sketch Extrudera en vald skiss @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Detalj - + Fillet... Fasning... - + Fillet the selected edges of a shape Fasa av de valda kanterna på en form @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Detalj - + Union Förening - + Make a union of several shapes Gör en förening av flera former @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Detalj - + Import CAD... Importera CAD... - + Imports a CAD file Importerar en CAD-fil @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Detalj - + Import curve network... Importera kurvnät... - + Import a curve network Importera ett kurvnät @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Detalj - + Loft... Loft ... - + Utility to loft Verktyg för svepning @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Detalj - + Make face from wires Skapa yta från trådar - + Make face from set of wires (e.g. from a sketch) Skapa yta från från en uppsättning trådar (t.ex. från en skiss) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Detalj - + Convert to solid Konvertera till solid - + Create solid from a shell or compound Skapa en solid från ett skal eller en sammansättning @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Detalj - + Mirroring... Spegling... - + Mirroring a selected shape Spegling av en markerad form @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Detalj - + 3D Offset... 3D-förskjutning... - + Utility to offset in 3D Verktyg för att göra en förskjutning i 3D @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Detalj - + 2D Offset... 2D-förskjutning... - + Utility to offset planar shapes Verktyg för att göra en förskjutning av planära former @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Detalj - + Pick curve network Välj kurvnät - + Pick a curve network Välj ett kurvnät @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Detalj - + Create primitives... Skapa primitiver... - + Creation of parametrized geometric primitives Skapa parametriserade geometriska primitiver @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Detalj - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part Detalj - + Reverse shapes Omvända former - + Reverse orientation of shapes Omvänd orientering av former @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part Detalj - + Revolve... Rotera... - + Revolve a selected shape Rotera en vald form @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part Detalj - + Create ruled surface Skapa styrd yta - + Create a ruled surface from either two Edges or two wires Skapa en linjebyggd yta från antingen två kanter eller två trådar @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part Detalj - + Section Sektionering - + Make a section of two shapes Gör ett tvärsnitt av två former @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part Detalj - + Sweep... Svep... - + Utility to sweep Verktyg för svepning @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part Detalj - + Thickness... Tjocklek... - + Utility to apply a thickness Verktyg för att tillämpa en tjocklek - + Wrong selection Fel val - + Selected shape is not a solid Markerad form är inte en solid @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Gemensam - + Fusion Fusion - + Compound Förening - + Section Sektionering - + Import Part Importera rapportvy - + Part Import Curve Net Part Import Curve Net - + Reverse Omvänd - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Skapa tjocklek - + Create ruled surface Skapa styrd yta @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Form - Selection accepted @@ -5709,83 +5704,83 @@ in the 3D view for the sweep path. Redigera %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Importera/Exportera - - - - - - + + + + + + Wrong selection Fel val - - + + Select two shapes please. Välj två former. - - - - - Non-solids selected - Icke-solider markerade - + Non-solids selected + Icke-solider markerade + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Användandet av icke-solider för booleska operationer kan leda till oväntade resultat. Vill du fortsätta? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Vänligen markera två eller fler former. Eller välj en komposition som innehåller minst två former att beräkna korsning emellan. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Vänligen markera två eller fler former. Eller välj en komposition som innehåller minst två former att förena. - + Select one shape or more, please. Vänligen välj en eller fler former. - + All CAD Files Alla CAD-filer - + All Files - Alla Filer + Alla filer - + You have to select either two edges or two wires. Du måste antingen välja två kanter eller två trådar. @@ -6758,4 +6753,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Skala + + + + X Factor + X Factor + + + + Factor + Faktor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Form + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + Dokumentet "%1" finns inte. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Detalj + + + + Scale... + Skala... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_tr.ts b/src/Mod/Part/Gui/Resources/translations/Part_tr.ts index cc8e2c79dd..2a4dca115c 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_tr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_tr.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Parça - - - + + + Box selection Seçim kutusu @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Parça - + Check Geometry Geometriyi Kontrol Edin - + Analyzes Geometry For Errors Hatalar için Geometriyi Analiz Ediyor @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Parça - + Color per face Yüzey rengi - + Set the color of each individual face of the selected object. Seçili nesnenin her bir ayrı yüzünün rengini ayarla. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Parça - + Measure Angular Açısal Ölçüm - + Measure the angle between two edges. İki kenar arasındaki açıyı ölçün. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Parça - + Clear All Hepsini temizle - + Clear all dimensions from the screen. Tüm ölçüleri ekrandan temizle. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Parça - + Measure Linear Doğrusal Olarak Ölç - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ iki köşe noktası arası ölçülecektir. CmdMeasureRefresh - + Part Parça - + Refresh Yenile - + Recalculate the dimensions if the measured points have moved. Ölçülen noktalar taşınmışsa @@ -1279,17 +1279,17 @@ boyutları yeniden hesapla. CmdMeasureToggle3d - + Part Parça - + Toggle 3D 3B'ye geçiş yap - + Toggle on and off all direct dimensions, including angular. Yüzeye dik durmdaki tüm boyutları açıp kapatın, @@ -1299,17 +1299,17 @@ açısal dahil. CmdMeasureToggleAll - + Part Parça - + Toggle All Tümünü Aç / Kapat - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Şu anda görünür olan tüm dik, ortogonal ve açısal boyutları açıp kapatın. @@ -1318,17 +1318,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Parça - + Toggle Delta Delta'ya Geçiş Yap - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1338,17 +1338,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Parça - + Boolean... Mantıksal... - + Run a boolean operation with two shapes selected Seçilen iki şekille bir mantıksal işlem çalıştırın @@ -1376,17 +1376,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Parça - + Box fix 1 Sabit kutu 1 - + Create a box solid without dialog Diyalog olmadan katı bir kutu oluştur @@ -1394,17 +1394,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Parça - + Box fix 2 Sabit kutu 2 - + Create a box solid without dialog Diyalog olmadan katı bir kutu oluştur @@ -1412,17 +1412,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Parça - + Shape builder... Şekil oluşturucu... - + Advanced utility to create shapes Şekiller oluşturmak için gelişmiş yardımcı program @@ -1430,17 +1430,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Parça - + Chamfer... Pah... - + Chamfer the selected edges of a shape Şeklin seçilen kenarlarına pah kır @@ -1448,17 +1448,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Parça - + Intersection Kesişim - + Make an intersection of two shapes İki şeklin kesişimini oluştur @@ -1466,17 +1466,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Parça - + Compound tools Birleşik araçları - + Compound tools: working with lists of shapes. Bileşik araçlar: şekil listeleriyle çalışma. @@ -1484,17 +1484,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Parça - + Join objects... Nesnelere katıl... - + Join walled objects Duvarlı nesnelere katıl @@ -1502,17 +1502,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Parça - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Şekilleri dengelemek için kullanılan araçlar (paralel şekiller oluşturun) @@ -1520,17 +1520,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Parça - + Split objects... Nesneleri böl... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1538,17 +1538,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Parça - + Make compound Bileşik yap - + Make a compound of several shapes Birkaç şekilden oluşan bir bileşik yapın @@ -1576,17 +1576,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Parça - + Cross-sections... Kesitler... - + Cross-sections Kesit @@ -1594,17 +1594,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Parça - + Cut Kes - + Make a cut of two shapes İki şeklin kesimini oluştur @@ -1668,17 +1668,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Parça - + Export CAD... CAD'ı dışarı aktar... - + Exports to a CAD file Bir CAD dosyasına aktarır @@ -1686,17 +1686,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Parça - + Extrude... Uzat... - + Extrude a selected sketch Seçili bir eskize kalınlık ver @@ -1704,17 +1704,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Parça - + Fillet... Dolgula... - + Fillet the selected edges of a shape Bir şeklin seçili kenarlarını dolgulayın @@ -1722,17 +1722,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Parça - + Union Birleştir - + Make a union of several shapes Çeşitli şekillerin birleşimini oluştur @@ -1740,17 +1740,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Parça - + Import CAD... CAD'i içeri aktar... - + Imports a CAD file Bir CAD dosyasını içeri aktarır @@ -1758,17 +1758,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Parça - + Import curve network... Eğri ağı içeri aktar... - + Import a curve network Eğri bir ağı içeri aktar @@ -1776,17 +1776,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Parça - + Loft... Çatıla... - + Utility to loft Çatılama için Yardımcı araçlar @@ -1794,17 +1794,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Parça - + Make face from wires Tellerden yüzey yap - + Make face from set of wires (e.g. from a sketch) Kablo kümelerinden yüzey oluştur (örneğin bir taslaktan) @@ -1812,17 +1812,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Parça - + Convert to solid Katı hale dönüştür - + Create solid from a shell or compound Bir kabuk veya bileşkeden katı cisim oluştur @@ -1830,17 +1830,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Parça - + Mirroring... Aynala... - + Mirroring a selected shape Seçili bir şekli aynala @@ -1848,17 +1848,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Parça - + 3D Offset... 3D Ofset... - + Utility to offset in 3D 3D konumlandırma için yardımcı araçlar @@ -1866,17 +1866,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Parça - + 2D Offset... 2D Ofset... - + Utility to offset planar shapes Düzlemsel şekilleri konumlandırmak için yardımcı araçlar @@ -1884,17 +1884,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Parça - + Pick curve network Eğri ağı seç - + Pick a curve network Bir eğri ağı seç @@ -1920,17 +1920,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Parça - + Create primitives... Temel öğeleri oluştur... - + Creation of parametrized geometric primitives Değişkenlerle tanımlanmış geometrik temel öğelerin oluşumu @@ -1938,17 +1938,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Parça - + Create projection on surface... Yüzeyde izdüşüm oluşturun... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1978,17 +1978,17 @@ Kamera görünümü, izdüşüm yönünü belirler. CmdPartReverseShape - + Part Parça - + Reverse shapes Şekilleri ters çevir - + Reverse orientation of shapes Şekillerin dizilimini ters çevir @@ -1996,17 +1996,17 @@ Kamera görünümü, izdüşüm yönünü belirler. CmdPartRevolve - + Part Parça - + Revolve... Döndür... - + Revolve a selected shape Seçili bir şekli döndür @@ -2014,17 +2014,17 @@ Kamera görünümü, izdüşüm yönünü belirler. CmdPartRuledSurface - + Part Parça - + Create ruled surface Düzenli yüzey oluştur - + Create a ruled surface from either two Edges or two wires İki Kenardan veya iki telden bir çizgili yüzey oluşturun @@ -2032,17 +2032,17 @@ Kamera görünümü, izdüşüm yönünü belirler. CmdPartSection - + Part Parça - + Section Kesişim - + Make a section of two shapes İki şeklin kesişimini oluştur @@ -2050,12 +2050,12 @@ Kamera görünümü, izdüşüm yönünü belirler. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2137,17 +2137,17 @@ Kamera görünümü, izdüşüm yönünü belirler. CmdPartSweep - + Part Parça - + Sweep... Süpür... - + Utility to sweep Süpürme yardımı @@ -2155,27 +2155,27 @@ Kamera görünümü, izdüşüm yönünü belirler. CmdPartThickness - + Part Parça - + Thickness... Kalınlık... - + Utility to apply a thickness Kalınlığı uygulamada yarar - + Wrong selection Yanlış seçim - + Selected shape is not a solid Seçilen şekil katı değil @@ -2221,73 +2221,73 @@ Kamera görünümü, izdüşüm yönünü belirler. Command - - + + Part Box Create Parça Kutusu Oluştur - + Part Cut Parça Kesme - + Common Ortak - + Fusion Kaynaşma - + Compound Bileşik - + Section Kesişim - + Import Part Parça İçe Aktar - + Part Import Curve Net Yerleştirilen Eğri Parçasının Neti - + Reverse Ters çevir - + Make face Yüz yapın - + Make Offset Öteleme Yap - + Make 2D Offset 2B Öteleme Yap - + Make Thickness Kalınlık Ver - + Create ruled surface Düzenli yüzey oluştur @@ -2370,11 +2370,6 @@ Kamera görünümü, izdüşüm yönünü belirler. PartDesignGui::TaskDatumParameters - - - Form - Şekil: - Selection accepted @@ -5688,83 +5683,83 @@ bir veya daha fazla profil seçin ilave kenar veya tel seçin. %1'i düzenle - + Part and Part Design workbench Part and Part Design Çalışma Tezgahı - - + + Part/Part Design Part/Part Design - - + + Import-Export İçe-Dışa Aktar - - - - - - + + + + + + Wrong selection Yanlış seçim - - + + Select two shapes please. İki şekli seçin lütfen. - - - - - Non-solids selected - Katılar seçilmedi - + Non-solids selected + Katılar seçilmedi + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Boole işlemleri için katı olmayanların kullanılması beklenmedik sonuçlara neden olabilir. Devam etmek istiyor musun? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. İki şekil seçin veya daha fazla, lütfen. Veya ortak arasında hesaplamak için iki veya daha fazla şekil içeren bir bileşik seçin. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. İki şekil seçin veya daha fazla, lütfen. Veya kaynaştırılacak iki veya daha fazla şekil içeren bir bileşik seçin. - + Select one shape or more, please. Bir şekil seçin veya daha fazla, lütfen. - + All CAD Files Tüm CAD Dosyaları - + All Files Tüm Dosyalar - + You have to select either two edges or two wires. İki kenarı veya iki çizgiyi seçtiniz. @@ -6737,4 +6732,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Ölçek + + + + X Factor + X Factor + + + + Factor + Faktör + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Şekil + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Parça + + + + Scale... + Ölçeklendir... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_uk.ts b/src/Mod/Part/Gui/Resources/translations/Part_uk.ts index 760de5f8c1..6d8ba222e4 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_uk.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_uk.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Деталь - - - + + + Box selection Виділити область @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Деталь - + Check Geometry Перевірка геометрії - + Analyzes Geometry For Errors Аналізує геометрію на наявність помилок @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Деталь - + Color per face Колір для грані - + Set the color of each individual face of the selected object. Встановлює колір кожної окремої грані виділеного обʼєкту. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Деталь - + Measure Angular Виміряти кут - + Measure the angle between two edges. Виміряє кут між двома ребрами. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Деталь - + Clear All Очистити все - + Clear all dimensions from the screen. Очищує всі розміри на екрані. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Деталь - + Measure Linear Виміряти відстань - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Деталь - + Refresh Оновити - + Recalculate the dimensions if the measured points have moved. Перераховує розміри, якщо точки вимірювання перемістилися. @@ -1278,17 +1278,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Деталь - + Toggle 3D Перемкнути 3D виміри - + Toggle on and off all direct dimensions, including angular. Показує чи приховує всі прямі розміри, @@ -1298,17 +1298,17 @@ including angular. CmdMeasureToggleAll - + Part Деталь - + Toggle All Перемкнути всі - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Показує чи приховує всі видимі на цей момент розміри, @@ -1318,17 +1318,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Деталь - + Toggle Delta Перемкнути Режим Дельти - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1340,17 +1340,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Деталь - + Boolean... Логічна Операція... - + Run a boolean operation with two shapes selected Виконує логічну операцію з двома виділеними фігурами @@ -1378,17 +1378,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Деталь - + Box fix 1 Поле поправки 1 - + Create a box solid without dialog Створює суцільний паралелепіпед без вводу параметрів @@ -1396,17 +1396,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Деталь - + Box fix 2 Поле поправки 2 - + Create a box solid without dialog Створює суцільний паралелепіпед без вводу параметрів @@ -1414,17 +1414,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Деталь - + Shape builder... Побудова фігур... - + Advanced utility to create shapes Додаткові утиліти для створення фігур @@ -1432,17 +1432,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Деталь - + Chamfer... Фаска... - + Chamfer the selected edges of a shape Створює фаску на виділених ребрах фігури @@ -1450,17 +1450,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Деталь - + Intersection Перетин - + Make an intersection of two shapes Створює перетин двох фігур @@ -1468,17 +1468,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Деталь - + Compound tools Інструменти складання - + Compound tools: working with lists of shapes. Інструменти складання: робота зі списками фігур. @@ -1486,17 +1486,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Деталь - + Join objects... Зʼєднати обʼєкти... - + Join walled objects Об’єднує огороджені об’єкти @@ -1504,17 +1504,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Деталь - + Offset: Зсув: - + Tools to offset shapes (construct parallel shapes) Інструменти для зсуву фігур (побудова паралельних фігур) @@ -1522,17 +1522,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Деталь - + Split objects... Розділити обʼєкти... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1540,17 +1540,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Деталь - + Make compound Поєднати фігури - + Make a compound of several shapes Поєднує декілька фігур @@ -1578,17 +1578,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Деталь - + Cross-sections... Поперечні перерізи... - + Cross-sections Створює поперечні перерізи @@ -1596,17 +1596,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Деталь - + Cut Вирізати - + Make a cut of two shapes Створює виріз двох фігур @@ -1670,17 +1670,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Деталь - + Export CAD... Експортувати CAD... - + Exports to a CAD file Експортує до CAD файлу @@ -1688,17 +1688,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Деталь - + Extrude... Видавлювання... - + Extrude a selected sketch Видавлювання виділеного ескізу @@ -1706,17 +1706,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Деталь - + Fillet... Заокруглення... - + Fillet the selected edges of a shape Створює заокруглення виділених ребер фігури @@ -1724,17 +1724,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Деталь - + Union Об’єднання - + Make a union of several shapes Об’єднує декілька фігур @@ -1742,17 +1742,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Деталь - + Import CAD... Імпорт CAD ... - + Imports a CAD file Імпортує CAD файл @@ -1760,17 +1760,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Деталь - + Import curve network... Імпортувати мережу кривої... - + Import a curve network Імпортує мережу кривої @@ -1778,17 +1778,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Деталь - + Loft... Лофт... - + Utility to loft Утиліта для лофту @@ -1796,17 +1796,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Деталь - + Make face from wires Зробити грань з поліліній - + Make face from set of wires (e.g. from a sketch) Створює грань з набору полілінй (наприклад, з ескізу) @@ -1814,17 +1814,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Деталь - + Convert to solid Перетворити у тверде тіло - + Create solid from a shell or compound Створює суцільне тіло з оболонки чи складових @@ -1832,17 +1832,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Деталь - + Mirroring... Зеркальне Зображення... - + Mirroring a selected shape Створю дзеркальне зображення виділеної фігури @@ -1850,17 +1850,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Деталь - + 3D Offset... 3D зсув... - + Utility to offset in 3D Утиліта для зсуву в 3D @@ -1868,17 +1868,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Деталь - + 2D Offset... 2D зсув... - + Utility to offset planar shapes Утиліта для зсуву плоских фігур @@ -1886,17 +1886,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Деталь - + Pick curve network Вибрати мережу кривих - + Pick a curve network Вибирає мережу кривих @@ -1922,17 +1922,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Деталь - + Create primitives... Створити примітиві... - + Creation of parametrized geometric primitives Створює параметризовані геометричні примітиви @@ -1940,17 +1940,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Деталь - + Create projection on surface... Створити проекцію на поверхню... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1979,17 +1979,17 @@ of projection. CmdPartReverseShape - + Part Деталь - + Reverse shapes Зворотня орієнтація фігури - + Reverse orientation of shapes Створює зворотню орієнтацію фігури @@ -1997,17 +1997,17 @@ of projection. CmdPartRevolve - + Part Деталь - + Revolve... Обертати... - + Revolve a selected shape Обертає виділену фігуру @@ -2015,17 +2015,17 @@ of projection. CmdPartRuledSurface - + Part Деталь - + Create ruled surface Створити прямокутну поверхню - + Create a ruled surface from either two Edges or two wires Створює прямокутну поверхню з двох ребер або двох поліліній @@ -2033,17 +2033,17 @@ of projection. CmdPartSection - + Part Деталь - + Section Розріз - + Make a section of two shapes Створює розріз двох фігур @@ -2051,12 +2051,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Постійний розріз секції - + Creates a persistent section cut of visible part objects Створює постійний розріз видимих ​​об'єктів деталі @@ -2138,17 +2138,17 @@ of projection. CmdPartSweep - + Part Деталь - + Sweep... Розгортка... - + Utility to sweep Утиліта для розгортки @@ -2156,27 +2156,27 @@ of projection. CmdPartThickness - + Part Деталь - + Thickness... Товщина... - + Utility to apply a thickness Утиліта для застосування товщини - + Wrong selection Невірний вибір - + Selected shape is not a solid Обрана фігура не є суцільним тілом @@ -2222,73 +2222,73 @@ of projection. Command - - + + Part Box Create Створити Деталь-Куб - + Part Cut Вирізати Деталь - + Common Перетин - + Fusion Об'єднання - + Compound З'єднання - + Section Розріз - + Import Part Імпортувати Деталь - + Part Import Curve Net Імпорт в Деталь Мережі Кривої - + Reverse Зворотній напрямок - + Make face Зробити грань - + Make Offset Створити зсув - + Make 2D Offset Створює 2D зсув - + Make Thickness Зробити Товщину - + Create ruled surface Створити прямокутну поверхню @@ -2371,11 +2371,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Форма - Selection accepted @@ -5713,82 +5708,82 @@ in the 3D view for the sweep path. Редагувати %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Імпорт-експорт - - - - - - + + + + + + Wrong selection Невірний вибір - - + + Select two shapes please. Виберіть дві форми, будь ласка. - - - - - Non-solids selected - Обрано не суцільні тіла - + Non-solids selected + Обрано не суцільні тіла + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? Застосування логічних операцій до не суцільних тіл може призвести до неочікуваних результатів. Бажаєте продовжити? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Будь ласка, виберіть дві або більше фігур. Або виділіть зʼєднання, яке також містить дві або більше фігур, для обчислення перетину між ними. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Будь ласка, виберіть дві або більше фігур. Або виділіть зʼєднання, що містить дві або більше фігур, для операції злиття. - + Select one shape or more, please. Виберіть одну або більше фігур. - + All CAD Files Всі CAD файли - + All Files Всі файли - + You have to select either two edges or two wires. Ви повинні вибрати або дві грані або дві струни. @@ -6761,4 +6756,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Масштабування + + + + X Factor + X Factor + + + + Factor + Коефіцієнт + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Форма + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Деталь + + + + Scale... + Масштаб... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts b/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts index 4c82cff0eb..9b9ee3252f 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part Peça - - - + + + Box selection Quadre de selecció @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part Peça - + Check Geometry Comprova la geometria - + Analyzes Geometry For Errors Busca errors de geometria @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part Peça - + Color per face Color per cara - + Set the color of each individual face of the selected object. Set the color of each individual face of the selected object. @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part Peça - + Measure Angular Mesura angular - + Measure the angle between two edges. Measure the angle between two edges. @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part Peça - + Clear All Neteja-ho tot - + Clear all dimensions from the screen. Clear all dimensions from the screen. @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part Peça - + Measure Linear Mesura lineal - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1259,17 +1259,17 @@ between two vertices of them. CmdMeasureRefresh - + Part Peça - + Refresh Actualitza - + Recalculate the dimensions if the measured points have moved. Recalculate the dimensions @@ -1279,17 +1279,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part Peça - + Toggle 3D Toggle 3D - + Toggle on and off all direct dimensions, including angular. Toggle on and off all direct dimensions, @@ -1299,17 +1299,17 @@ including angular. CmdMeasureToggleAll - + Part Peça - + Toggle All Commuta-ho tot - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. Toggle on and off all currently visible dimensions, @@ -1319,17 +1319,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part Peça - + Toggle Delta Commuta Delta - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1341,17 +1341,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part Peça - + Boolean... Booleà... - + Run a boolean operation with two shapes selected Executa una operació booleana amb dues formes seleccionades @@ -1379,17 +1379,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part Peça - + Box fix 1 Fixa el quadre 1 - + Create a box solid without dialog Crea una caixa sòlida sense diàleg @@ -1397,17 +1397,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part Peça - + Box fix 2 Fixa el quadre 2 - + Create a box solid without dialog Crea una caixa sòlida sense diàleg @@ -1415,17 +1415,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part Peça - + Shape builder... Generador de formes... - + Advanced utility to create shapes Utilitat avançada per a crear formes @@ -1433,17 +1433,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part Peça - + Chamfer... Xamfrà... - + Chamfer the selected edges of a shape Crea un xamfrà per a les vores seleccionades @@ -1451,17 +1451,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part Peça - + Intersection Intersecció - + Make an intersection of two shapes Crea una intersecció entre dues formes @@ -1469,17 +1469,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part Peça - + Compound tools Compound tools - + Compound tools: working with lists of shapes. Eines compostes: treballa amb llistes de formes. @@ -1487,17 +1487,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part Peça - + Join objects... Uneix objectes... - + Join walled objects Uneix objectes que tenen paret @@ -1505,17 +1505,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part Peça - + Offset: Offset: - + Tools to offset shapes (construct parallel shapes) Eines per a desplaçar formes (construeix formes paral·leles) @@ -1523,17 +1523,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part Peça - + Split objects... Divisió d'objectes... - + Shape splitting and Compsolid creation tools. Shape splitting and Compsolid creation tools. @@ -1541,17 +1541,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part Peça - + Make compound Crea un compost - + Make a compound of several shapes Crea un compost a partir de diverses formes @@ -1579,17 +1579,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part Peça - + Cross-sections... Seccions... - + Cross-sections Seccions @@ -1597,17 +1597,17 @@ into its X, Y, and Z components. CmdPartCut - + Part Peça - + Cut Retalla - + Make a cut of two shapes Talla per a fer dues formes @@ -1671,17 +1671,17 @@ into its X, Y, and Z components. CmdPartExport - + Part Peça - + Export CAD... Exporta a CAD... - + Exports to a CAD file Exporta a un fitxer de CAD @@ -1689,17 +1689,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part Peça - + Extrude... Extrusió... - + Extrude a selected sketch Extrusió d'un esbós seleccionat @@ -1707,17 +1707,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part Peça - + Fillet... Arredoniment... - + Fillet the selected edges of a shape Arredoneix les arestes seleccionades d'una forma @@ -1725,17 +1725,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part Peça - + Union Unió - + Make a union of several shapes Uneix diverses formes @@ -1743,17 +1743,17 @@ into its X, Y, and Z components. CmdPartImport - + Part Peça - + Import CAD... Importa CAD... - + Imports a CAD file Importa un fitxer de CAD @@ -1761,17 +1761,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part Peça - + Import curve network... Importa una xarxa de corbes... - + Import a curve network Importa una xarxa de corbes @@ -1779,17 +1779,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part Peça - + Loft... Projecció... - + Utility to loft Utilitats de projecció @@ -1797,17 +1797,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part Peça - + Make face from wires Crea una cara a partir de fils - + Make face from set of wires (e.g. from a sketch) Crea una cara a partir d'un conjunt de filferros (p ex. d'un esbós) @@ -1815,17 +1815,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part Peça - + Convert to solid Converteix a sòlid - + Create solid from a shell or compound Crea un sòlid a partir d'una closca o compost @@ -1833,17 +1833,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part Peça - + Mirroring... S'està duplicant... - + Mirroring a selected shape Duplicació d'una forma seleccionada @@ -1851,17 +1851,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part Peça - + 3D Offset... Desplaçament 3D... - + Utility to offset in 3D Utilitat per a separar en 3D @@ -1869,17 +1869,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part Peça - + 2D Offset... Desplaçament 2D... - + Utility to offset planar shapes Utilitat per a separar les formes d'un pla @@ -1887,17 +1887,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part Peça - + Pick curve network Tria una xarxa de corbes - + Pick a curve network Tria una xarxa de corbes @@ -1923,17 +1923,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part Peça - + Create primitives... Crea primitives... - + Creation of parametrized geometric primitives Creació de primitives geomètriques parametritzades @@ -1941,17 +1941,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part Peça - + Create projection on surface... Create projection on surface... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1983,17 +1983,17 @@ of projection. CmdPartReverseShape - + Part Peça - + Reverse shapes Inverteix les formes - + Reverse orientation of shapes Inverteix l'orientació de les formes @@ -2001,17 +2001,17 @@ of projection. CmdPartRevolve - + Part Peça - + Revolve... Gira... - + Revolve a selected shape Gira una forma seleccionada @@ -2019,17 +2019,17 @@ of projection. CmdPartRuledSurface - + Part Peça - + Create ruled surface Crea una superfície reglada - + Create a ruled surface from either two Edges or two wires Crea una superfície reglada ja siga a partir de dues arestes o dos filferros @@ -2037,17 +2037,17 @@ of projection. CmdPartSection - + Part Peça - + Section Secció - + Make a section of two shapes Crea una secció de dues formes @@ -2055,12 +2055,12 @@ of projection. CmdPartSectionCut - + Persistent section cut Persistent section cut - + Creates a persistent section cut of visible part objects Creates a persistent section cut of visible part objects @@ -2142,17 +2142,17 @@ of projection. CmdPartSweep - + Part Peça - + Sweep... Escombratge... - + Utility to sweep Utilitat d'escombratge @@ -2160,27 +2160,27 @@ of projection. CmdPartThickness - + Part Peça - + Thickness... Gruix... - + Utility to apply a thickness Utilitat per a aplicar un gruix - + Wrong selection Selecció incorrecta - + Selected shape is not a solid La forma seleccionada no és un sòlid. @@ -2226,73 +2226,73 @@ of projection. Command - - + + Part Box Create Part Box Create - + Part Cut Part Cut - + Common Comú - + Fusion Fusion - + Compound Compost - + Section Secció - + Import Part Import Part - + Part Import Curve Net Part Import Curve Net - + Reverse Inverteix - + Make face Make face - + Make Offset Make Offset - + Make 2D Offset Make 2D Offset - + Make Thickness Make Thickness - + Create ruled surface Crea una superfície reglada @@ -2375,11 +2375,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - Forma - Selection accepted @@ -5702,82 +5697,82 @@ in the 3D view for the sweep path. Edita %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Importació-exportació - - - - - - + + + + + + Wrong selection Selecció incorrecta - - + + Select two shapes please. Seleccioneu dues formes - - - - - Non-solids selected - S'han seleccionat objectes no sòlids. - + Non-solids selected + S'han seleccionat objectes no sòlids. + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? L'ús d'objectes no sòlids per a operacions booleanes pot causar resultats inesperats. Voleu continuar? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. Seleccioneu dues formes o més. O bé, seleccioneu un compost que conté dues o més formes per a calcular la part comuna entre aquestes. - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. Seleccioneu dues formes o més. O bé, seleccioneu un compost que conté dues o més formes per a fusionar-les. - + Select one shape or more, please. Seleccioneu una forma o més - + All CAD Files Tots els fitxers de CAD - + All Files Tots els fitxers - + You have to select either two edges or two wires. Heu de seleccionar dues arestes o dos fils. @@ -6750,4 +6745,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + Redimensiona + + + + X Factor + X Factor + + + + Factor + Factor + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + Forma + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + Peça + + + + Scale... + Redimensiona... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts b/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts index 0cd386fffc..797b9017c0 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part 零件 - - - + + + Box selection 框选 @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part 零件 - + Check Geometry 检查几何 - + Analyzes Geometry For Errors 分析几何错误 @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part 零件 - + Color per face 逐面着色 - + Set the color of each individual face of the selected object. 设置选中对象的每个面的颜色。 @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part 零件 - + Measure Angular 角度测量 - + Measure the angle between two edges. 测量两个边之间的角度。 @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part 零件 - + Clear All 清除所有 - + Clear all dimensions from the screen. 清除屏幕上的所有尺寸。 @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part 零件 - + Measure Linear 线性测量 - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1258,17 +1258,17 @@ between two vertices of them. CmdMeasureRefresh - + Part 零件 - + Refresh 刷新 - + Recalculate the dimensions if the measured points have moved. 如果测量点移动,则重新计算尺寸。 @@ -1277,17 +1277,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part 零件 - + Toggle 3D 切换3D - + Toggle on and off all direct dimensions, including angular. 切换显示或关闭所有直接尺寸, @@ -1297,17 +1297,17 @@ including angular. CmdMeasureToggleAll - + Part 零件 - + Toggle All 切换所有 - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. 切换显示或关闭所有当前可见尺寸, @@ -1317,17 +1317,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part 零件 - + Toggle Delta 切换增量 - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1338,17 +1338,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part 零件 - + Boolean... 布尔运算... - + Run a boolean operation with two shapes selected 对所选的两个形状进行布尔运算 @@ -1376,17 +1376,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part 零件 - + Box fix 1 立方体固定 1 - + Create a box solid without dialog 无对话框模式创建立方体 @@ -1394,17 +1394,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part 零件 - + Box fix 2 立方体固定 2 - + Create a box solid without dialog 无对话框模式创建立方体 @@ -1412,17 +1412,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part 零件 - + Shape builder... 形体构建器... - + Advanced utility to create shapes 创建形体高级工具 @@ -1430,17 +1430,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part 零件 - + Chamfer... 倒角... - + Chamfer the selected edges of a shape 给所选形状的边缘倒角 @@ -1448,17 +1448,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part 零件 - + Intersection 交集 - + Make an intersection of two shapes 两形体求交集 @@ -1466,17 +1466,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part 零件 - + Compound tools 复合体工具 - + Compound tools: working with lists of shapes. 复合工具:使用形状列表。 @@ -1484,17 +1484,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part 零件 - + Join objects... 合并目标 - + Join walled objects 组合墙面物件 @@ -1502,17 +1502,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part 零件 - + Offset: 偏移: - + Tools to offset shapes (construct parallel shapes) 用于偏移形状的工具 (构造并行形状) @@ -1520,17 +1520,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part 零件 - + Split objects... 拆分目标 - + Shape splitting and Compsolid creation tools. 形状分割和复合体(Compsolid)创建工具。 @@ -1538,17 +1538,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part 零件 - + Make compound 组合 - + Make a compound of several shapes 组合多个造型 @@ -1576,17 +1576,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part 零件 - + Cross-sections... 横截面... - + Cross-sections 横截面 @@ -1594,17 +1594,17 @@ into its X, Y, and Z components. CmdPartCut - + Part 零件 - + Cut 剪切 - + Make a cut of two shapes 两形体求差集 @@ -1668,17 +1668,17 @@ into its X, Y, and Z components. CmdPartExport - + Part 零件 - + Export CAD... 导出CAD... - + Exports to a CAD file 导出至CAD文件 @@ -1686,17 +1686,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part 零件 - + Extrude... 拉伸... - + Extrude a selected sketch 拉伸选定的草图 @@ -1704,17 +1704,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part 零件 - + Fillet... 圆角... - + Fillet the selected edges of a shape 给选定形体的边倒圆角 @@ -1722,17 +1722,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part 零件 - + Union 并集 - + Make a union of several shapes 多形体求合集 @@ -1740,17 +1740,17 @@ into its X, Y, and Z components. CmdPartImport - + Part 零件 - + Import CAD... 导入CAD文件 ... - + Imports a CAD file 导入CAD文件 @@ -1758,17 +1758,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part 零件 - + Import curve network... 导入曲线网络... - + Import a curve network 导入曲线网络 @@ -1776,17 +1776,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part 零件 - + Loft... 放样... - + Utility to loft 放样工具 @@ -1794,17 +1794,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part 零件 - + Make face from wires 用线生成面 - + Make face from set of wires (e.g. from a sketch) 从一组线做面(如草图) @@ -1812,17 +1812,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part 零件 - + Convert to solid 转化成实体 - + Create solid from a shell or compound 从命令行或程序集创建实体 @@ -1830,17 +1830,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part 零件 - + Mirroring... 镜像... - + Mirroring a selected shape 镜像选定的形状 @@ -1848,17 +1848,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part 零件 - + 3D Offset... 3D偏移量... - + Utility to offset in 3D 3D 偏移工具 @@ -1866,17 +1866,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part 零件 - + 2D Offset... 2D偏移量... - + Utility to offset planar shapes 偏移平面形状的工具 @@ -1884,17 +1884,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part 零件 - + Pick curve network 选择曲线网络 - + Pick a curve network 选择曲线网络 @@ -1920,17 +1920,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part 零件 - + Create primitives... 创建图元... - + Creation of parametrized geometric primitives 创建参数化的几何图元 @@ -1938,17 +1938,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part 零件 - + Create projection on surface... 在表面创建投影... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1979,17 +1979,17 @@ of projection. CmdPartReverseShape - + Part 零件 - + Reverse shapes 形状翻转 - + Reverse orientation of shapes 翻转形状 @@ -1997,17 +1997,17 @@ of projection. CmdPartRevolve - + Part 零件 - + Revolve... 旋转... - + Revolve a selected shape 旋转所选的形状 @@ -2015,17 +2015,17 @@ of projection. CmdPartRuledSurface - + Part 零件 - + Create ruled surface 创建直纹曲面 - + Create a ruled surface from either two Edges or two wires 从两条边或两条线创建一个直纹面 @@ -2033,17 +2033,17 @@ of projection. CmdPartSection - + Part 零件 - + Section 截面 - + Make a section of two shapes 创建两形体的交线 @@ -2051,12 +2051,12 @@ of projection. CmdPartSectionCut - + Persistent section cut 永久截面切割 - + Creates a persistent section cut of visible part objects 创建可视零件对象的永久截面切割 @@ -2138,17 +2138,17 @@ of projection. CmdPartSweep - + Part 零件 - + Sweep... 扫掠... - + Utility to sweep 扫掠程序 @@ -2156,27 +2156,27 @@ of projection. CmdPartThickness - + Part 零件 - + Thickness... 厚度... - + Utility to apply a thickness 抽壳程序 - + Wrong selection 选择错误 - + Selected shape is not a solid 所选形体并非实体 @@ -2222,73 +2222,73 @@ of projection. Command - - + + Part Box Create 零件 立方体 创建 - + Part Cut 零件 切割 - + Common 交集 - + Fusion 融合 - + Compound 组合 - + Section 截面 - + Import Part 导入部件 - + Part Import Curve Net 零件 导入 曲线 网线 - + Reverse 反转 - + Make face 造面 - + Make Offset 创造偏移 - + Make 2D Offset 设置二维偏移 - + Make Thickness 创造壁厚 - + Create ruled surface 创建直纹曲面 @@ -2371,11 +2371,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - 窗体 - Selection accepted @@ -5700,82 +5695,82 @@ in the 3D view for the sweep path. 编辑 %1 - + Part and Part Design workbench Part and Part Design workbench - - + + Part/Part Design Part/Part Design - - + + Import-Export Import-Export - - - - - - + + + + + + Wrong selection 选择错误 - - + + Select two shapes please. 请选择两个形状. - - - - - Non-solids selected - 没有实体被选中 - + Non-solids selected + 没有实体被选中 + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? 非实体布尔运算可能导致意外的结果。你想要继续吗? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. 请选择两个或多个形状。或者, 选择一个包含两个或多个要计算公用的形状的组合。 - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. 请选择两个或多个形状。或者, 选择一个包含两个或多个要计算公用的形状的组合。 - + Select one shape or more, please. 请选择一个或多个形状。 - + All CAD Files 所有CAD 文档 - + All Files 所有文件 - + You have to select either two edges or two wires. 你必须选择二条边或者二个线框. @@ -6748,4 +6743,98 @@ This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. + + PartGui::DlgScale + + + Scale + 缩放 + + + + X Factor + X Factor + + + + Factor + 缩放因子 + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + 形状 + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + 文件 '%1' 不存在. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + 零件 + + + + Scale... + 缩放... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts b/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts index e37e69d7a0..44732df9fd 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts @@ -1150,14 +1150,14 @@ CmdBoxSelection - + Part 零件 - - - + + + Box selection 拉框選擇 @@ -1165,17 +1165,17 @@ CmdCheckGeometry - + Part 零件 - + Check Geometry 檢查幾何 - + Analyzes Geometry For Errors 分析幾何錯誤 @@ -1183,17 +1183,17 @@ CmdColorPerFace - + Part 零件 - + Color per face 對每面上色 - + Set the color of each individual face of the selected object. 設定選取物件每個個別面的顏色。 @@ -1201,17 +1201,17 @@ CmdMeasureAngular - + Part 零件 - + Measure Angular 角度量測 - + Measure the angle between two edges. 量測兩邊的夾角。 @@ -1219,17 +1219,17 @@ CmdMeasureClearAll - + Part 零件 - + Clear All 全部清除 - + Clear all dimensions from the screen. 從畫面上清除所有尺寸 @@ -1237,17 +1237,17 @@ CmdMeasureLinear - + Part 零件 - + Measure Linear 線性量測 - + Measure the linear distance between two points; if edges or faces are picked, it will measure between two vertices of them. @@ -1258,17 +1258,17 @@ between two vertices of them. CmdMeasureRefresh - + Part 零件 - + Refresh 重新運算 - + Recalculate the dimensions if the measured points have moved. 如果測量點移動就重新計算尺寸。 @@ -1277,17 +1277,17 @@ if the measured points have moved. CmdMeasureToggle3d - + Part 零件 - + Toggle 3D 切換 3D - + Toggle on and off all direct dimensions, including angular. 切換開啟或關閉所有直接尺寸,包括角度尺寸。 @@ -1296,17 +1296,17 @@ including angular. CmdMeasureToggleAll - + Part 零件 - + Toggle All 切換全部 - + Toggle on and off all currently visible dimensions, direct, orthogonal, and angular. 切換開啟或關閉所有目前可見的尺寸,包括直接尺寸、正交尺寸和角度尺寸。 @@ -1315,17 +1315,17 @@ direct, orthogonal, and angular. CmdMeasureToggleDelta - + Part 零件 - + Toggle Delta 是否採用外部路徑 - + Toggle on and off all orthogonal dimensions, meaning that a direct dimension will be decomposed into its X, Y, and Z components. @@ -1335,17 +1335,17 @@ into its X, Y, and Z components. CmdPartBoolean - + Part 零件 - + Boolean... 布林運算... - + Run a boolean operation with two shapes selected 將選定之兩個零件進行布林運算 @@ -1373,17 +1373,17 @@ into its X, Y, and Z components. CmdPartBox2 - + Part 零件 - + Box fix 1 固定框1 - + Create a box solid without dialog 建立一不具對話框之盒型實體 @@ -1391,17 +1391,17 @@ into its X, Y, and Z components. CmdPartBox3 - + Part 零件 - + Box fix 2 固定框2 - + Create a box solid without dialog 建立一不具對話框之盒型實體 @@ -1409,17 +1409,17 @@ into its X, Y, and Z components. CmdPartBuilder - + Part 零件 - + Shape builder... 造型產生器... - + Advanced utility to create shapes 進階圖形建立功能 @@ -1427,17 +1427,17 @@ into its X, Y, and Z components. CmdPartChamfer - + Part 零件 - + Chamfer... 倒角... - + Chamfer the selected edges of a shape 所選造型邊進行倒角 @@ -1445,17 +1445,17 @@ into its X, Y, and Z components. CmdPartCommon - + Part 零件 - + Intersection 交集 - + Make an intersection of two shapes 產生兩造型之交集 @@ -1463,17 +1463,17 @@ into its X, Y, and Z components. CmdPartCompCompoundTools - + Part 零件 - + Compound tools 組件工具 - + Compound tools: working with lists of shapes. 組件工具:使用形狀列表進行操作。 @@ -1481,17 +1481,17 @@ into its X, Y, and Z components. CmdPartCompJoinFeatures - + Part 零件 - + Join objects... 組合物件... - + Join walled objects 組合牆面物件 @@ -1499,17 +1499,17 @@ into its X, Y, and Z components. CmdPartCompOffset - + Part 零件 - + Offset: - Offset: + 偏移: - + Tools to offset shapes (construct parallel shapes) 用於偏移形狀(構建平行形狀)的工具 @@ -1517,17 +1517,17 @@ into its X, Y, and Z components. CmdPartCompSplitFeatures - + Part 零件 - + Split objects... 分割物件... - + Shape splitting and Compsolid creation tools. 形狀分割和組合實體創建工具 @@ -1535,17 +1535,17 @@ into its X, Y, and Z components. CmdPartCompound - + Part 零件 - + Make compound 組合 - + Make a compound of several shapes 組合數個造型 @@ -1573,17 +1573,17 @@ into its X, Y, and Z components. CmdPartCrossSections - + Part 零件 - + Cross-sections... 剖面... - + Cross-sections 剖面 @@ -1591,17 +1591,17 @@ into its X, Y, and Z components. CmdPartCut - + Part 零件 - + Cut 切割 - + Make a cut of two shapes 對兩造型做切割 @@ -1665,17 +1665,17 @@ into its X, Y, and Z components. CmdPartExport - + Part 零件 - + Export CAD... 匯出CAD... - + Exports to a CAD file 匯出為CAD檔 @@ -1683,17 +1683,17 @@ into its X, Y, and Z components. CmdPartExtrude - + Part 零件 - + Extrude... 拉伸... - + Extrude a selected sketch 拉伸選定之圖形 @@ -1701,17 +1701,17 @@ into its X, Y, and Z components. CmdPartFillet - + Part 零件 - + Fillet... 圓角... - + Fillet the selected edges of a shape 將選定之圖形邊倒圓角 @@ -1719,17 +1719,17 @@ into its X, Y, and Z components. CmdPartFuse - + Part 零件 - + Union 聯集 - + Make a union of several shapes 對多個造型做聯集 @@ -1737,17 +1737,17 @@ into its X, Y, and Z components. CmdPartImport - + Part 零件 - + Import CAD... 匯入CAD... - + Imports a CAD file 匯入CAD檔 @@ -1755,17 +1755,17 @@ into its X, Y, and Z components. CmdPartImportCurveNet - + Part 零件 - + Import curve network... 匯入曲線網... - + Import a curve network 匯入曲線網 @@ -1773,17 +1773,17 @@ into its X, Y, and Z components. CmdPartLoft - + Part 零件 - + Loft... 斷面混成... - + Utility to loft 斷面混成工具 @@ -1791,17 +1791,17 @@ into its X, Y, and Z components. CmdPartMakeFace - + Part 零件 - + Make face from wires 從線條建立面 - + Make face from set of wires (e.g. from a sketch) 從一組線條建立面 (例如:從草圖) @@ -1809,17 +1809,17 @@ into its X, Y, and Z components. CmdPartMakeSolid - + Part 零件 - + Convert to solid 轉換為實體 - + Create solid from a shell or compound 由殼或組件建立實體 @@ -1827,17 +1827,17 @@ into its X, Y, and Z components. CmdPartMirror - + Part 零件 - + Mirroring... 鏡射... - + Mirroring a selected shape 對選定造型產生鏡射 @@ -1845,17 +1845,17 @@ into its X, Y, and Z components. CmdPartOffset - + Part 零件 - + 3D Offset... 3D 偏移量... - + Utility to offset in 3D 用來作三維偏移的工具 @@ -1863,17 +1863,17 @@ into its X, Y, and Z components. CmdPartOffset2D - + Part 零件 - + 2D Offset... 2D 偏移量... - + Utility to offset planar shapes 偏移平面形狀的工具 @@ -1881,17 +1881,17 @@ into its X, Y, and Z components. CmdPartPickCurveNet - + Part 零件 - + Pick curve network 選取曲線網 - + Pick a curve network 選取一個曲線網 @@ -1917,17 +1917,17 @@ into its X, Y, and Z components. CmdPartPrimitives - + Part 零件 - + Create primitives... 建立基礎物件... - + Creation of parametrized geometric primitives 建立參數化幾何基礎物件 @@ -1935,17 +1935,17 @@ into its X, Y, and Z components. CmdPartProjectionOnSurface - + Part 零件 - + Create projection on surface... 在表面建立投影... - + Project edges, wires, or faces of one object onto a face of another object. The camera view determines the direction @@ -1975,17 +1975,17 @@ of projection. CmdPartReverseShape - + Part 零件 - + Reverse shapes 反向造型 - + Reverse orientation of shapes 顛導造型之方向 @@ -1993,17 +1993,17 @@ of projection. CmdPartRevolve - + Part 零件 - + Revolve... 旋轉...... - + Revolve a selected shape 旋轉所選的造型 @@ -2011,17 +2011,17 @@ of projection. CmdPartRuledSurface - + Part 零件 - + Create ruled surface 建立直紋曲面 - + Create a ruled surface from either two Edges or two wires 由兩個邊或線建立直紋面 @@ -2029,17 +2029,17 @@ of projection. CmdPartSection - + Part 零件 - + Section 剖面 - + Make a section of two shapes 對兩造型做切面 @@ -2047,12 +2047,12 @@ of projection. CmdPartSectionCut - + Persistent section cut 永久剖面切割 - + Creates a persistent section cut of visible part objects 建立可見部分物件的永久剖面切割 @@ -2134,17 +2134,17 @@ of projection. CmdPartSweep - + Part 零件 - + Sweep... 掃掠... - + Utility to sweep 掃掠功能 @@ -2152,27 +2152,27 @@ of projection. CmdPartThickness - + Part 零件 - + Thickness... 厚度... - + Utility to apply a thickness 薄殼功能 - + Wrong selection 錯誤的選取 - + Selected shape is not a solid 所選之造型非實體 @@ -2218,73 +2218,73 @@ of projection. Command - - + + Part Box Create 建立盒子零件 - + Part Cut 零件切割 - + Common 交集實體 - + Fusion 融合 - + Compound 複合 - + Section 剖面 - + Import Part 匯入零件 - + Part Import Curve Net 零件匯入曲線網 - + Reverse 反向 - + Make face 建立面 - + Make Offset 建立偏移 - + Make 2D Offset 建立 2D 偏移 - + Make Thickness 建立厚度 - + Create ruled surface 建立直紋曲面 @@ -2367,11 +2367,6 @@ of projection. PartDesignGui::TaskDatumParameters - - - Form - 格式 - Selection accepted @@ -2936,7 +2931,7 @@ If both lengths are zero, magnitude of direction is used. No shapes selected for extrusion. Select some, first. - 沒有選擇任何形狀進行拉伸。請先選擇一些形狀。 + 沒有選擇任何造型進行拉伸。請先選擇一些造型。 @@ -2961,7 +2956,7 @@ If both lengths are zero, magnitude of direction is used. Can't determine normal vector of shape to be extruded. Please use other mode. (%1) - 無法確定要被拉伸的形狀的法向量。請使用其他模式。 + 無法確定要被拉伸造型的法向量。請使用其他模式。 (%1) @@ -3348,7 +3343,7 @@ during file reading (slower but higher details). Single document - Single document + 單一文件 @@ -3862,7 +3857,7 @@ during file reading (slower but higher details). Vertex - Vertex + 頂點 @@ -3913,7 +3908,7 @@ during file reading (slower but higher details). Show all - Show all + 顯示全部 @@ -4130,7 +4125,7 @@ during file reading (slower but higher details). <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Tessellation</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Defines the maximum deviation of the tessellated mesh to the surface. The smaller the value is the slower the render speed which results in increased detail/resolution.</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Tessellation</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Defines the maximum deviation of the tessellated mesh to the surface. The smaller the value is the slower the render speed which results in increased detail/resolution.</span></p></body></html> + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">鑲嵌</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">定義了網格的最大偏差與表面之間的差異。數值越小,算繪速度越慢,但會產生更高的細節和解析度。</span></p></body></html> @@ -4264,7 +4259,7 @@ during file reading (slower but higher details). Shape color - Shape color + 造型顏色 @@ -4806,12 +4801,12 @@ only created cuts will be visible Shape from mesh - 由網格所構成之形狀 + 由網格所構成之造型 Sew shape - 連接形狀 + 縫合圖形 @@ -5052,7 +5047,7 @@ of object being attached. Vertex - Vertex + 頂點 @@ -5675,83 +5670,83 @@ in the 3D view for the sweep path. 編輯 %1 - + Part and Part Design workbench Part 與 Part Design 工作台 - - + + Part/Part Design Part/Part Design - - + + Import-Export 匯入-匯出 - - - - - - + + + + + + Wrong selection 錯誤的選取 - - + + Select two shapes please. 請選擇兩個造型 - - - - - Non-solids selected - 選取非實體 - + Non-solids selected + 選取非實體 + + + + + The use of non-solids for boolean operations may lead to unexpected results. Do you want to continue? 對非實體進行布林運算可能導致非預期結果 您想要繼續嗎? - + Select two shapes or more, please. Or, select one compound containing two or more shapes to compute common between. 請選擇兩個或更多形狀,或者選擇一個包含兩個或更多形狀的組件以計算它們的共同部分。 - + Select two shapes or more, please. Or, select one compound containing two or more shapes to be fused. 請選擇兩個或更多形狀,或者選擇一個包含兩個或更多形狀的組件以進行融合。 - + Select one shape or more, please. 請選擇一個或更多的造型 - + All CAD Files 所有 CAD 檔 - + All Files 所有檔案 - + You have to select either two edges or two wires. 您必須選擇兩個邊或兩條線 @@ -5777,7 +5772,7 @@ Do you want to continue? Vertex - Vertex + 頂點 @@ -6192,7 +6187,7 @@ Do you want to continue? Split - Split + 分割 @@ -6246,7 +6241,7 @@ Do you want to continue? Continue - Continue + 繼續 @@ -6336,7 +6331,7 @@ Do you want to continue? Continue - Continue + 繼續 @@ -6444,7 +6439,7 @@ It will create a 'Compound Filter' for each shape. Continue - Continue + 繼續 @@ -6536,22 +6531,22 @@ It will create a 'Compound Filter' for each shape. Shape type - 形狀類型 + 造型種類 Vertices - Vertices + 頂點 Edges - Edges + Wires - Wires + @@ -6586,7 +6581,7 @@ It will create a 'Compound Filter' for each shape. Area - Area + 面積 @@ -6711,4 +6706,98 @@ A 'Compound Filter' can be used to extract the remaining pieces. 對於兩個或多個選定的物件,或者組件中的形狀,執行「互斥或」布林運算。這意味著形狀之間重疊的區域將被移除。可以使用「組件過濾器」來提取剩餘的部分。 + + PartGui::DlgScale + + + Scale + 縮放 + + + + X Factor + X Factor + + + + Factor + 比例因子 + + + + Z Factor + Z Factor + + + + Scale the object by a single factor in all directions. + Scale the object by a single factor in all directions. + + + + Uniform Scaling + Uniform Scaling + + + + Y Factor + Y Factor + + + + Specify a different scale factor for each cardinal direction. + Specify a different scale factor for each cardinal direction. + + + + Non-Uniform Scaling + Non-Uniform Scaling + + + + Select shape(s) that should be scaled + Select shape(s) that should be scaled + + + + Shape + 造型 + + + + No scalable shapes selected + No scalable shapes selected + + + + The document '%1' doesn't exist. + The document '%1' doesn't exist. + + + + + Creating Scale failed. +%1 + Creating Scale failed. +%1 + + + + CmdPartScale + + + Part + 零件 + + + + Scale... + 比例... + + + + Scale a selected shape + Scale a selected shape + + diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp index 4e842e49e7..4599219825 100644 --- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp +++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp @@ -1363,7 +1363,7 @@ Standard_Boolean BOPProgressIndicator::Show (const Standard_Boolean theForce) else { Handle(TCollection_HAsciiString) aName = GetScope(1).GetName(); //current step if (!aName.IsNull()) - myProgress->setLabelText (QString::fromLatin1(aName->ToCString())); + myProgress->setLabelText (QString::fromUtf8(aName->ToCString())); } return Standard_True; @@ -1373,7 +1373,7 @@ void BOPProgressIndicator::Show (const Message_ProgressScope& theScope, const Standard_Boolean isForce) { Standard_CString aName = theScope.Name(); //current step - myProgress->setLabelText (QString::fromLatin1(aName)); + myProgress->setLabelText (QString::fromUtf8(aName)); if (isForce) { myProgress->show(); diff --git a/src/Mod/Part/Gui/ViewProviderScale.cpp b/src/Mod/Part/Gui/ViewProviderScale.cpp new file mode 100644 index 0000000000..fe0bb05ebc --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderScale.cpp @@ -0,0 +1,47 @@ +/*************************************************************************** + * Copyright (c) 2023 Wanderer Fan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#include "PreCompiled.h" + +#include "ViewProviderScale.h" +#include + + +using namespace PartGui; + +PROPERTY_SOURCE(PartGui::ViewProviderScale,PartGui::ViewProviderPart) + +ViewProviderScale::ViewProviderScale() +{ + sPixmap = "Part_Scale.svg"; +} + +ViewProviderScale::~ViewProviderScale() = default; + +std::vector ViewProviderScale::claimChildren()const +{ + std::vector temp; + temp.push_back(static_cast(getObject())->Base.getValue()); + + return temp; +} diff --git a/src/Mod/Part/Gui/ViewProviderScale.h b/src/Mod/Part/Gui/ViewProviderScale.h new file mode 100644 index 0000000000..84261ab07b --- /dev/null +++ b/src/Mod/Part/Gui/ViewProviderScale.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (c) 2023 Wanderer Fan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + + +#ifndef PARTGUI_VIEWPROVIDERSCALE_H +#define PARTGUI_VIEWPROVIDERSCALE_H + +#include "ViewProvider.h" + + +namespace PartGui { + +class PartGuiExport ViewProviderScale : public ViewProviderPart +{ + PROPERTY_HEADER_WITH_OVERRIDE(PartGui::ViewProviderScale); + +public: + /// constructor + ViewProviderScale(); + /// destructor + ~ViewProviderScale() override; + + /// grouping handling + std::vector claimChildren() const override; +}; + +} // namespace PartGui + + +#endif // PARTGUI_VIEWPROVIDERSCALE_H diff --git a/src/Mod/Part/Gui/Workbench.cpp b/src/Mod/Part/Gui/Workbench.cpp index 27abd8a302..ee7d9e8790 100644 --- a/src/Mod/Part/Gui/Workbench.cpp +++ b/src/Mod/Part/Gui/Workbench.cpp @@ -124,6 +124,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Part_Extrude" << "Part_Revolve" << "Part_Mirror" + << "Part_Scale" << "Part_Fillet" << "Part_Chamfer" << "Part_MakeFace" @@ -183,6 +184,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const *tool << "Part_Extrude" << "Part_Revolve" << "Part_Mirror" + << "Part_Scale" << "Part_Fillet" << "Part_Chamfer" << "Part_MakeFace" diff --git a/src/Mod/Part/TestPartApp.py b/src/Mod/Part/TestPartApp.py index 55e91375b2..ed70bbdbde 100644 --- a/src/Mod/Part/TestPartApp.py +++ b/src/Mod/Part/TestPartApp.py @@ -871,3 +871,20 @@ class PartBOPTestContainer(unittest.TestCase): def tearDown(self): FreeCAD.closeDocument(self.Doc.Name) + +class BSplineCurve2d(unittest.TestCase): + def setUp(self): + vec2 = FreeCAD.Base.Vector2d + self.pts = [vec2(0, 0), vec2(1, 0)] + self.bs = Part.Geom2d.BSplineCurve2d() + + def testInterpolate(self): + self.bs.interpolate(Points=self.pts) + + def testApproximate(self): + self.bs.approximate(Points=self.pts) + +class GeometryCurve(unittest.TestCase): + def testProject(self): + line = Part.Line() + line.projectPoint(FreeCAD.Vector()) diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign.ts index 785d4b3232..44b7249e62 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign.ts @@ -1403,11 +1403,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - - Add body @@ -1491,11 +1486,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - - Click button to enter selection mode, @@ -1614,11 +1604,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - - Click button to enter selection mode, @@ -1733,11 +1718,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - - Allow used features @@ -1826,11 +1806,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - - Click button to enter selection mode, @@ -1867,11 +1842,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - - Status: @@ -2080,11 +2050,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - - Add feature @@ -2159,11 +2124,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - - Ruled surface @@ -2217,11 +2177,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - - Add feature @@ -2265,11 +2220,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - - Add feature @@ -2391,11 +2341,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - - Type @@ -2548,11 +2493,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - - Orientation mode @@ -2641,11 +2581,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - - Profile @@ -2716,11 +2651,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - - Transform mode @@ -2807,11 +2737,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - - Add feature @@ -2898,11 +2823,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - - Axis: @@ -2970,11 +2890,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - - Add feature @@ -3013,11 +2928,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - - Object @@ -3054,11 +2964,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - - Click button to enter selection mode, @@ -4238,11 +4143,6 @@ Although you will be able to migrate any moment later with 'Part Design -&g TaskHole - - - Form - - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_be.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_be.ts index 94e714c6d8..7c593a7ac3 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_be.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_be.ts @@ -1413,11 +1413,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Форма - Add body @@ -1501,11 +1496,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Форма - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Форма - Click button to enter selection mode, @@ -1682,12 +1667,12 @@ click again to end selection Preview - Папярэдні прагляд + Папярэдні выгляд Select - Абраць + Select @@ -1747,11 +1732,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Форма - Allow used features @@ -1840,11 +1820,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Форма - Click button to enter selection mode, @@ -1883,11 +1858,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Форма - Status: @@ -1943,7 +1913,7 @@ click again to end selection Select reference... - Select reference... + Абраць апорны элемент... @@ -2096,11 +2066,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Форма - Add feature @@ -2134,7 +2099,7 @@ click again to end selection Overall Length - Overall Length + Агульная даўжыня @@ -2175,11 +2140,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Форма - Ruled surface @@ -2233,11 +2193,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Форма - Add feature @@ -2281,11 +2236,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Форма - Add feature @@ -2407,11 +2357,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Форма - Type @@ -2531,7 +2476,7 @@ measured along the specified direction Reversed - Reversed + Наадварот @@ -2567,11 +2512,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Форма - Orientation mode @@ -2660,11 +2600,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Форма - Profile @@ -2735,11 +2670,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Форма - Transform mode @@ -2826,11 +2756,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Форма - Add feature @@ -2864,12 +2789,12 @@ measured along the specified direction Overall Angle - Overall Angle + Агульны вугал Offset Angle - Offset Angle + Вугал зрушэння @@ -2917,11 +2842,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Форма - Axis: @@ -2948,12 +2868,12 @@ measured along the specified direction Horizontal sketch axis - Horizontal sketch axis + Гарызантальная вось эскізу Vertical sketch axis - Vertical sketch axis + Вертыкальная вось эскізу @@ -2989,11 +2909,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Форма - Add feature @@ -3032,11 +2947,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Форма - Object @@ -3073,11 +2983,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Форма - Click button to enter selection mode, @@ -3088,7 +2993,7 @@ click again to end selection Select - Select + Абраць @@ -3163,7 +3068,7 @@ click again to end selection Normal sketch axis - Normal sketch axis + Вектар нармалі восі эскізу @@ -4270,11 +4175,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Форма - Position @@ -4659,7 +4559,7 @@ over 90: larger hole radius at the bottom Reversed - Наадварот + Адваротны diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ca.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ca.ts index 12acda3c51..d4c7731e53 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ca.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ca.ts @@ -1412,11 +1412,6 @@ Si el valor és zero, serà igual al Radi2 PartDesignGui::TaskBooleanParameters - - - Form - Forma - Add body @@ -1500,11 +1495,6 @@ Si el valor és zero, serà igual al Radi2 PartDesignGui::TaskChamferParameters - - - Form - Forma - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskDraftParameters - - - Form - Forma - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskFeaturePick - - - Form - Forma - Allow used features @@ -1841,11 +1821,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskFilletParameters - - - Form - Forma - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskHelixParameters - - - Form - Forma - Status: @@ -2098,11 +2068,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskLinearPatternParameters - - - Form - Forma - Add feature @@ -2177,11 +2142,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskLoftParameters - - - Form - Forma - Ruled surface @@ -2235,11 +2195,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskMirroredParameters - - - Form - Forma - Add feature @@ -2283,11 +2238,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskMultiTransformParameters - - - Form - Forma - Add feature @@ -2409,11 +2359,6 @@ clica altre cop per finalitzar la selecció PartDesignGui::TaskPadPocketParameters - - - Form - Forma - Type @@ -2569,11 +2514,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskPipeOrientation - - - Form - Forma - Orientation mode @@ -2662,11 +2602,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskPipeParameters - - - Form - Forma - Profile @@ -2737,11 +2672,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskPipeScaling - - - Form - Forma - Transform mode @@ -2828,11 +2758,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskPolarPatternParameters - - - Form - Forma - Add feature @@ -2919,11 +2844,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskRevolutionParameters - - - Form - Forma - Axis: @@ -2991,11 +2911,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskScaledParameters - - - Form - Forma - Add feature @@ -3034,11 +2949,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskShapeBinder - - - Form - Forma - Object @@ -3075,11 +2985,6 @@ mesurada al llarg de la direcció especificada PartDesignGui::TaskThicknessParameters - - - Form - Forma - Click button to enter selection mode, @@ -4270,11 +4175,6 @@ Tot i que podreu migrar en qualsevol moment més tard amb 'Disseny de peces -> TaskHole - - - Form - Forma - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts index 9583c4d720..39bff485dc 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts @@ -1412,11 +1412,6 @@ Je-li nulový, rovná se Poloměr2 PartDesignGui::TaskBooleanParameters - - - Form - Návrh - Add body @@ -1500,11 +1495,6 @@ Je-li nulový, rovná se Poloměr2 PartDesignGui::TaskChamferParameters - - - Form - Návrh - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskDraftParameters - - - Form - Návrh - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskFeaturePick - - - Form - Návrh - Allow used features @@ -1841,11 +1821,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskFilletParameters - - - Form - Návrh - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskHelixParameters - - - Form - Návrh - Status: @@ -2098,11 +2068,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskLinearPatternParameters - - - Form - Návrh - Add feature @@ -2177,11 +2142,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskLoftParameters - - - Form - Návrh - Ruled surface @@ -2235,11 +2195,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskMirroredParameters - - - Form - Návrh - Add feature @@ -2283,11 +2238,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskMultiTransformParameters - - - Form - Návrh - Add feature @@ -2409,11 +2359,6 @@ klikněte znovu pro ukončení výběru PartDesignGui::TaskPadPocketParameters - - - Form - Návrh - Type @@ -2569,11 +2514,6 @@ měřena ve stanoveném směru PartDesignGui::TaskPipeOrientation - - - Form - Návrh - Orientation mode @@ -2662,11 +2602,6 @@ měřena ve stanoveném směru PartDesignGui::TaskPipeParameters - - - Form - Návrh - Profile @@ -2737,11 +2672,6 @@ měřena ve stanoveném směru PartDesignGui::TaskPipeScaling - - - Form - Návrh - Transform mode @@ -2828,11 +2758,6 @@ měřena ve stanoveném směru PartDesignGui::TaskPolarPatternParameters - - - Form - Návrh - Add feature @@ -2919,11 +2844,6 @@ měřena ve stanoveném směru PartDesignGui::TaskRevolutionParameters - - - Form - Návrh - Axis: @@ -2991,11 +2911,6 @@ měřena ve stanoveném směru PartDesignGui::TaskScaledParameters - - - Form - Návrh - Add feature @@ -3034,11 +2949,6 @@ měřena ve stanoveném směru PartDesignGui::TaskShapeBinder - - - Form - Návrh - Object @@ -3075,11 +2985,6 @@ měřena ve stanoveném směru PartDesignGui::TaskThicknessParameters - - - Form - Návrh - Click button to enter selection mode, @@ -4273,11 +4178,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Návrh - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts index b8f7ef5c12..cd1b5632ab 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts @@ -1411,11 +1411,6 @@ Wenn Null, ist er gleich Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Form - Add body @@ -1499,11 +1494,6 @@ Wenn Null, ist er gleich Radius2 PartDesignGui::TaskChamferParameters - - - Form - Form - Click button to enter selection mode, @@ -1625,17 +1615,12 @@ Nochmaliges Klicken beendet den Auswahl-Modus. PartDesignGui::TaskDraftParameters - - - Form - Form - Click button to enter selection mode, click again to end selection - Klicken Sie auf den Button um in den Auswahl-Modus zu gelangen. -Nochmaliges Klicken beendet den Auswahl-Modus. + Klicken Sie auf die Schaltfläche, um den Auswahlmodus zu betreten, +erneut klicken um die Auswahl zu beenden @@ -1702,7 +1687,7 @@ Nochmaliges Klicken beendet den Auswahl-Modus. Remove - Löschen + Entfernen @@ -1747,11 +1732,6 @@ Nochmaliges Klicken beendet den Auswahl-Modus. PartDesignGui::TaskFeaturePick - - - Form - Form - Allow used features @@ -1840,11 +1820,6 @@ Nochmaliges Klicken beendet den Auswahl-Modus. PartDesignGui::TaskFilletParameters - - - Form - Form - Click button to enter selection mode, @@ -1884,11 +1859,6 @@ erneut klicken um die Auswahl zu beenden PartDesignGui::TaskHelixParameters - - - Form - Form - Status: @@ -2097,11 +2067,6 @@ erneut klicken um die Auswahl zu beenden PartDesignGui::TaskLinearPatternParameters - - - Form - Form - Add feature @@ -2135,7 +2100,7 @@ erneut klicken um die Auswahl zu beenden Overall Length - Overall Length + Gesamtlänge @@ -2161,7 +2126,7 @@ erneut klicken um die Auswahl zu beenden Update view - Ansicht aktualisieren + Ansicht aktualisieren @@ -2176,11 +2141,6 @@ erneut klicken um die Auswahl zu beenden PartDesignGui::TaskLoftParameters - - - Form - Form - Ruled surface @@ -2219,7 +2179,7 @@ erneut klicken um die Auswahl zu beenden Update view - Ansicht aktualisieren + Ansicht aktualisieren @@ -2234,11 +2194,6 @@ erneut klicken um die Auswahl zu beenden PartDesignGui::TaskMirroredParameters - - - Form - Form - Add feature @@ -2282,11 +2237,6 @@ erneut klicken um die Auswahl zu beenden PartDesignGui::TaskMultiTransformParameters - - - Form - Form - Add feature @@ -2383,7 +2333,7 @@ erneut klicken um die Auswahl zu beenden Dimension - Abmessung + Höhe (Länge) @@ -2408,11 +2358,6 @@ erneut klicken um die Auswahl zu beenden PartDesignGui::TaskPadPocketParameters - - - Form - Form - Type @@ -2421,7 +2366,7 @@ erneut klicken um die Auswahl zu beenden Dimension - Abmessung + Tiefe (Länge) @@ -2563,16 +2508,11 @@ entlang der angegebenen Richtung gemessen Update view - Ansicht aktualisieren + Ansicht aktualisieren PartDesignGui::TaskPipeOrientation - - - Form - Form - Orientation mode @@ -2661,11 +2601,6 @@ entlang der angegebenen Richtung gemessen PartDesignGui::TaskPipeParameters - - - Form - Form - Profile @@ -2736,11 +2671,6 @@ entlang der angegebenen Richtung gemessen PartDesignGui::TaskPipeScaling - - - Form - Form - Transform mode @@ -2802,7 +2732,7 @@ entlang der angegebenen Richtung gemessen Dimension - Abmessung + Tiefenmaß @@ -2827,11 +2757,6 @@ entlang der angegebenen Richtung gemessen PartDesignGui::TaskPolarPatternParameters - - - Form - Form - Add feature @@ -2855,7 +2780,7 @@ entlang der angegebenen Richtung gemessen Reverse direction - Richtung umkehren + Umgekehrte Richtung @@ -2865,12 +2790,12 @@ entlang der angegebenen Richtung gemessen Overall Angle - Overall Angle + Gesamtwinkel Offset Angle - Offset Angle + Versatzwinkel @@ -2918,11 +2843,6 @@ entlang der angegebenen Richtung gemessen PartDesignGui::TaskRevolutionParameters - - - Form - Form - Axis: @@ -2932,7 +2852,7 @@ entlang der angegebenen Richtung gemessen Base X axis - Basis X-Achse + Basis-X-Achse @@ -2944,7 +2864,7 @@ entlang der angegebenen Richtung gemessen Base Z axis - Basis Z-Achse + Basis-Z-Achse @@ -2990,11 +2910,6 @@ entlang der angegebenen Richtung gemessen PartDesignGui::TaskScaledParameters - - - Form - Form - Add feature @@ -3023,7 +2938,7 @@ entlang der angegebenen Richtung gemessen Update view - Ansicht aktualisieren + Ansicht aktualisieren @@ -3033,11 +2948,6 @@ entlang der angegebenen Richtung gemessen PartDesignGui::TaskShapeBinder - - - Form - Form - Object @@ -3074,22 +2984,17 @@ entlang der angegebenen Richtung gemessen PartDesignGui::TaskThicknessParameters - - - Form - Form - Click button to enter selection mode, click again to end selection - Klicken Sie auf die Schaltfläche, um den Auswahlmodus zu betreten, -erneut klicken um die Auswahl zu beenden + Klicken Sie auf den Button um in den Auswahl-Modus zu gelangen. +Nochmaliges Klicken beendet den Auswahl-Modus. Select - Auswählen + Wähle @@ -3186,7 +3091,7 @@ erneut klicken um die Auswahl zu beenden Base X axis - Basis-X-Achse + Basis X-Achse @@ -3196,7 +3101,7 @@ erneut klicken um die Auswahl zu beenden Base Z axis - Basis-Z-Achse + Basis Z-Achse @@ -4271,11 +4176,6 @@ Du kannst die Teile später jederzeit mit 'Part Design -> Migrieren...' migri TaskHole - - - Form - Form - Position @@ -4545,7 +4445,7 @@ Nur für Bohrungen ohne Gewinde verfügbar Dimension - Abmessung + Tiefenmaß diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_el.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_el.ts index dc0d2b0813..1b52b3af54 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_el.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_el.ts @@ -1411,11 +1411,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Μορφή - Add body @@ -1499,11 +1494,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Μορφή - Click button to enter selection mode, @@ -1625,11 +1615,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Μορφή - Click button to enter selection mode, @@ -1747,11 +1732,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Μορφή - Allow used features @@ -1840,11 +1820,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Μορφή - Click button to enter selection mode, @@ -1884,11 +1859,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Μορφή - Status: @@ -2097,11 +2067,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Μορφή - Add feature @@ -2176,11 +2141,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Μορφή - Ruled surface @@ -2234,11 +2194,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Μορφή - Add feature @@ -2282,11 +2237,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Μορφή - Add feature @@ -2408,11 +2358,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Μορφή - Type @@ -2568,11 +2513,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Μορφή - Orientation mode @@ -2661,11 +2601,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Μορφή - Profile @@ -2736,11 +2671,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Μορφή - Transform mode @@ -2827,11 +2757,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Μορφή - Add feature @@ -2918,11 +2843,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Μορφή - Axis: @@ -2990,11 +2910,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Μορφή - Add feature @@ -3033,11 +2948,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Μορφή - Object @@ -3074,11 +2984,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Μορφή - Click button to enter selection mode, @@ -4272,11 +4177,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Μορφή - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-AR.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-AR.ts index 08204fbf82..3b79522ddf 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-AR.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-AR.ts @@ -1412,11 +1412,6 @@ Si es cero, es igual a Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Forma - Add body @@ -1500,11 +1495,6 @@ Si es cero, es igual a Radius2 PartDesignGui::TaskChamferParameters - - - Form - Forma - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskDraftParameters - - - Form - Forma - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskFeaturePick - - - Form - Forma - Allow used features @@ -1841,11 +1821,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskFilletParameters - - - Form - Forma - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskHelixParameters - - - Form - Forma - Status: @@ -2098,11 +2068,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskLinearPatternParameters - - - Form - Forma - Add feature @@ -2177,11 +2142,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskLoftParameters - - - Form - Forma - Ruled surface @@ -2235,11 +2195,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskMirroredParameters - - - Form - Forma - Add feature @@ -2283,11 +2238,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskMultiTransformParameters - - - Form - Forma - Add feature @@ -2409,11 +2359,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskPadPocketParameters - - - Form - Forma - Type @@ -2568,11 +2513,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Forma - Orientation mode @@ -2661,11 +2601,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Forma - Profile @@ -2736,11 +2671,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Forma - Transform mode @@ -2827,11 +2757,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Forma - Add feature @@ -2870,7 +2795,7 @@ measured along the specified direction Offset Angle - Offset Angle + Ángulo de desplazamiento @@ -2918,11 +2843,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Forma - Axis: @@ -2990,11 +2910,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Forma - Add feature @@ -3033,11 +2948,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Forma - Object @@ -3074,11 +2984,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Forma - Click button to enter selection mode, @@ -4271,11 +4176,6 @@ Aunque podrá migrar en cualquier momento después con 'Part Design -> Migrat TaskHole - - - Form - Forma - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-ES.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-ES.ts index faaa3d338c..40fbeb8ce2 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-ES.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_es-ES.ts @@ -1412,11 +1412,6 @@ Si es cero, es igual a Radio2 PartDesignGui::TaskBooleanParameters - - - Form - Formulario - Add body @@ -1500,11 +1495,6 @@ Si es cero, es igual a Radio2 PartDesignGui::TaskChamferParameters - - - Form - Formulario - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskDraftParameters - - - Form - Formulario - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskFeaturePick - - - Form - Formulario - Allow used features @@ -1841,11 +1821,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskFilletParameters - - - Form - Formulario - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskHelixParameters - - - Form - Formulario - Status: @@ -2098,11 +2068,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskLinearPatternParameters - - - Form - Formulario - Add feature @@ -2177,11 +2142,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskLoftParameters - - - Form - Formulario - Ruled surface @@ -2235,11 +2195,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskMirroredParameters - - - Form - Formulario - Add feature @@ -2283,11 +2238,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskMultiTransformParameters - - - Form - Formulario - Add feature @@ -2409,11 +2359,6 @@ haga clic de nuevo para finalizar la selección PartDesignGui::TaskPadPocketParameters - - - Form - Formulario - Type @@ -2568,11 +2513,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Formulario - Orientation mode @@ -2661,11 +2601,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Formulario - Profile @@ -2736,11 +2671,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Formulario - Transform mode @@ -2827,11 +2757,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Formulario - Add feature @@ -2870,7 +2795,7 @@ measured along the specified direction Offset Angle - Offset Angle + Ángulo de desplazamiento @@ -2918,11 +2843,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Formulario - Axis: @@ -2990,11 +2910,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Formulario - Add feature @@ -3033,11 +2948,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Formulario - Object @@ -3074,11 +2984,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Formulario - Click button to enter selection mode, @@ -4267,11 +4172,6 @@ Aunque podrá migrar en cualquier momento después con 'Part Design -> Migrat TaskHole - - - Form - Formulario - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_eu.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_eu.ts index df67797734..a48ebcadc7 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_eu.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_eu.ts @@ -1411,11 +1411,6 @@ Zero bada, 2. erradioaren berdina da PartDesignGui::TaskBooleanParameters - - - Form - Inprimakia - Add body @@ -1499,11 +1494,6 @@ Zero bada, 2. erradioaren berdina da PartDesignGui::TaskChamferParameters - - - Form - Inprimakia - Click button to enter selection mode, @@ -1625,11 +1615,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskDraftParameters - - - Form - Inprimakia - Click button to enter selection mode, @@ -1747,11 +1732,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskFeaturePick - - - Form - Inprimakia - Allow used features @@ -1840,11 +1820,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskFilletParameters - - - Form - Inprimakia - Click button to enter selection mode, @@ -1884,11 +1859,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskHelixParameters - - - Form - Inprimakia - Status: @@ -2097,11 +2067,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskLinearPatternParameters - - - Form - Inprimakia - Add feature @@ -2135,7 +2100,7 @@ sakatu berriro hautapena amaitzeko Overall Length - Overall Length + Luzera osoa @@ -2176,11 +2141,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskLoftParameters - - - Form - Inprimakia - Ruled surface @@ -2234,11 +2194,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskMirroredParameters - - - Form - Inprimakia - Add feature @@ -2282,11 +2237,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskMultiTransformParameters - - - Form - Inprimakia - Add feature @@ -2408,11 +2358,6 @@ sakatu berriro hautapena amaitzeko PartDesignGui::TaskPadPocketParameters - - - Form - Inprimakia - Type @@ -2568,11 +2513,6 @@ zehaztutako norabidean PartDesignGui::TaskPipeOrientation - - - Form - Inprimakia - Orientation mode @@ -2661,11 +2601,6 @@ zehaztutako norabidean PartDesignGui::TaskPipeParameters - - - Form - Inprimakia - Profile @@ -2736,11 +2671,6 @@ zehaztutako norabidean PartDesignGui::TaskPipeScaling - - - Form - Inprimakia - Transform mode @@ -2827,11 +2757,6 @@ zehaztutako norabidean PartDesignGui::TaskPolarPatternParameters - - - Form - Inprimakia - Add feature @@ -2865,12 +2790,12 @@ zehaztutako norabidean Overall Angle - Overall Angle + Angelu osoa Offset Angle - Offset Angle + Desplazamendu-angelua @@ -2918,11 +2843,6 @@ zehaztutako norabidean PartDesignGui::TaskRevolutionParameters - - - Form - Inprimakia - Axis: @@ -2990,11 +2910,6 @@ zehaztutako norabidean PartDesignGui::TaskScaledParameters - - - Form - Inprimakia - Add feature @@ -3033,11 +2948,6 @@ zehaztutako norabidean PartDesignGui::TaskShapeBinder - - - Form - Inprimakia - Object @@ -3074,11 +2984,6 @@ zehaztutako norabidean PartDesignGui::TaskThicknessParameters - - - Form - Inprimakia - Click button to enter selection mode, @@ -4270,11 +4175,6 @@ Geroago ere egin dezakezu migrazioa, 'Part Design -> Migratu' erabilita. TaskHole - - - Form - Inprimakia - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fi.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fi.ts index fe7258eaab..0d7939b2c8 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fi.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fi.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Lomake - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Lomake - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Lomake - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Lomake - Allow used features @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Lomake - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Lomake - Status: @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Lomake - Add feature @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Lomake - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Lomake - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Lomake - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Lomake - Type @@ -2569,11 +2514,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Lomake - Orientation mode @@ -2662,11 +2602,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Lomake - Profile @@ -2737,11 +2672,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Lomake - Transform mode @@ -2828,11 +2758,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Lomake - Add feature @@ -2919,11 +2844,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Lomake - Axis: @@ -2991,11 +2911,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Lomake - Add feature @@ -3034,11 +2949,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Lomake - Object @@ -3075,11 +2985,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Lomake - Click button to enter selection mode, @@ -4272,11 +4177,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Lomake - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fr.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fr.ts index c371d59876..7ba1944154 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fr.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_fr.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Forme - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Forme - Click button to enter selection mode, @@ -1624,11 +1614,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Forme - Click button to enter selection mode, @@ -1745,11 +1730,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Forme - Allow used features @@ -1838,11 +1818,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Forme - Click button to enter selection mode, @@ -1864,12 +1839,12 @@ click again to end selection Radius: - Rayon : + Rayon : Use All Edges - Utiliser tous les arêtes + Utiliser toutes les arêtes @@ -1881,11 +1856,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Forme - Status: @@ -1976,7 +1946,7 @@ click again to end selection Height: - Hauteur : + Hauteur : @@ -2094,11 +2064,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Forme - Add feature @@ -2132,7 +2097,7 @@ click again to end selection Overall Length - Overall Length + Longueur globale @@ -2173,11 +2138,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Forme - Ruled surface @@ -2231,11 +2191,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Forme - Add feature @@ -2279,11 +2234,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Forme - Add feature @@ -2405,11 +2355,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Forme - Type @@ -2565,11 +2510,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskPipeOrientation - - - Form - Forme - Orientation mode @@ -2658,11 +2598,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskPipeParameters - - - Form - Forme - Profile @@ -2733,11 +2668,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskPipeScaling - - - Form - Forme - Transform mode @@ -2824,11 +2754,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskPolarPatternParameters - - - Form - Forme - Add feature @@ -2862,12 +2787,12 @@ mesurée dans la direction spécifiée Overall Angle - Overall Angle + Angle global Offset Angle - Offset Angle + Angle de décalage @@ -2915,11 +2840,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskRevolutionParameters - - - Form - Forme - Axis: @@ -2962,7 +2882,7 @@ mesurée dans la direction spécifiée Angle: - Angle : + Angle : @@ -2987,11 +2907,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskScaledParameters - - - Form - Forme - Add feature @@ -3030,11 +2945,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskShapeBinder - - - Form - Forme - Object @@ -3071,11 +2981,6 @@ mesurée dans la direction spécifiée PartDesignGui::TaskThicknessParameters - - - Form - Forme - Click button to enter selection mode, @@ -3097,7 +3002,7 @@ click again to end selection Thickness - Evidement + Coque @@ -4259,11 +4164,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Forme - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_gl.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_gl.ts index 0d42bd0db5..1416b7ffbb 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_gl.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_gl.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Formulario - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Formulario - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Formulario - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Formulario - Allow used features @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Formulario - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Formulario - Status: @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Formulario - Add feature @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Formulario - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Formulario - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Formulario - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Formulario - Type @@ -2569,11 +2514,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Formulario - Orientation mode @@ -2662,11 +2602,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Formulario - Profile @@ -2737,11 +2672,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Formulario - Transform mode @@ -2828,11 +2758,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Formulario - Add feature @@ -2919,11 +2844,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Formulario - Axis: @@ -2991,11 +2911,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Formulario - Add feature @@ -3034,11 +2949,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Formulario - Object @@ -3075,11 +2985,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Formulario - Click button to enter selection mode, @@ -4272,11 +4177,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Formulario - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hr.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hr.ts index 9306f6ca8b..ffd36ad025 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hr.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hr.ts @@ -1410,11 +1410,6 @@ Ako je nula, jednak je Polumjeru2 PartDesignGui::TaskBooleanParameters - - - Form - Obrazac - Add body @@ -1498,11 +1493,6 @@ Ako je nula, jednak je Polumjeru2 PartDesignGui::TaskChamferParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -1623,11 +1613,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskDraftParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -1744,11 +1729,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskFeaturePick - - - Form - Obrazac - Allow used features @@ -1837,11 +1817,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskFilletParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -1880,11 +1855,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskHelixParameters - - - Form - Obrazac - Status: @@ -1940,7 +1910,7 @@ kliknite ponovno za završetak odabira Select reference... - Select reference... + Odaberite referencu... @@ -2093,11 +2063,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskLinearPatternParameters - - - Form - Obrazac - Add feature @@ -2172,11 +2137,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskLoftParameters - - - Form - Obrazac - Ruled surface @@ -2230,11 +2190,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskMirroredParameters - - - Form - Obrazac - Add feature @@ -2278,11 +2233,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskMultiTransformParameters - - - Form - Obrazac - Add feature @@ -2406,11 +2356,6 @@ kliknite ponovno za završetak odabira PartDesignGui::TaskPadPocketParameters - - - Form - Obrazac - Type @@ -2566,11 +2511,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskPipeOrientation - - - Form - Obrazac - Orientation mode @@ -2659,11 +2599,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskPipeParameters - - - Form - Obrazac - Profile @@ -2734,11 +2669,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskPipeScaling - - - Form - Obrazac - Transform mode @@ -2827,11 +2757,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskPolarPatternParameters - - - Form - Obrazac - Add feature @@ -2918,11 +2843,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskRevolutionParameters - - - Form - Obrazac - Axis: @@ -2990,11 +2910,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskScaledParameters - - - Form - Obrazac - Add feature @@ -3033,11 +2948,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskShapeBinder - - - Form - Obrazac - Object @@ -3074,11 +2984,6 @@ mjereno duž navedenog smjera PartDesignGui::TaskThicknessParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -3201,7 +3106,7 @@ kliknite ponovno za završetak odabira Select reference... - Odaberite referencu... + Select reference... @@ -4272,11 +4177,6 @@ Iako ćete moći migrirati u bilo svakom trenutku kasnije s 'Dizajn dijela -> TaskHole - - - Form - Obrazac - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hu.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hu.ts index f2b167e4c1..0580c1e3ca 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hu.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_hu.ts @@ -1412,11 +1412,6 @@ Ha zérus, azonos a Radius2-vel (2. sugárral?) PartDesignGui::TaskBooleanParameters - - - Form - Űrlap - Add body @@ -1500,11 +1495,6 @@ Ha zérus, azonos a Radius2-vel (2. sugárral?) PartDesignGui::TaskChamferParameters - - - Form - Űrlap - Click button to enter selection mode, @@ -1625,11 +1615,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Űrlap - Click button to enter selection mode, @@ -1746,11 +1731,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Űrlap - Allow used features @@ -1839,11 +1819,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Űrlap - Click button to enter selection mode, @@ -1882,11 +1857,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Űrlap - Status: @@ -2095,11 +2065,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Űrlap - Add feature @@ -2174,11 +2139,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Űrlap - Ruled surface @@ -2232,11 +2192,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Űrlap - Add feature @@ -2280,11 +2235,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Űrlap - Add feature @@ -2406,11 +2356,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Űrlap - Type @@ -2565,11 +2510,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Űrlap - Orientation mode @@ -2658,11 +2598,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Űrlap - Profile @@ -2733,11 +2668,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Űrlap - Transform mode @@ -2824,11 +2754,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Űrlap - Add feature @@ -2915,11 +2840,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Űrlap - Axis: @@ -2987,11 +2907,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Űrlap - Add feature @@ -3030,11 +2945,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Űrlap - Object @@ -3071,11 +2981,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Űrlap - Click button to enter selection mode, @@ -4266,11 +4171,6 @@ Viszont később is bármikor migrálhat a "Alkatrész Tervezés -> Migrálá TaskHole - - - Form - Űrlap - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_id.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_id.ts index c2c3401325..bc79709a36 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_id.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_id.ts @@ -1412,11 +1412,6 @@ Jika nol, sama dengan Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Bentuk - Add body @@ -1500,11 +1495,6 @@ Jika nol, sama dengan Radius2 PartDesignGui::TaskChamferParameters - - - Form - Bentuk - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskDraftParameters - - - Form - Bentuk - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskFeaturePick - - - Form - Bentuk - Allow used features @@ -1841,11 +1821,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskFilletParameters - - - Form - Bentuk - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskHelixParameters - - - Form - Bentuk - Status: @@ -2098,11 +2068,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskLinearPatternParameters - - - Form - Bentuk - Add feature @@ -2177,11 +2142,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskLoftParameters - - - Form - Bentuk - Ruled surface @@ -2235,11 +2195,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskMirroredParameters - - - Form - Bentuk - Add feature @@ -2283,11 +2238,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskMultiTransformParameters - - - Form - Bentuk - Add feature @@ -2409,11 +2359,6 @@ klik lagi untuk mengakhiri seleksi PartDesignGui::TaskPadPocketParameters - - - Form - Bentuk - Type @@ -2569,11 +2514,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Bentuk - Orientation mode @@ -2662,11 +2602,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Bentuk - Profile @@ -2737,11 +2672,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Bentuk - Transform mode @@ -2828,11 +2758,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Bentuk - Add feature @@ -2919,11 +2844,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Bentuk - Axis: @@ -2991,11 +2911,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Bentuk - Add feature @@ -3034,11 +2949,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Bentuk - Object @@ -3075,11 +2985,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Bentuk - Click button to enter selection mode, @@ -4273,11 +4178,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Bentuk - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_it.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_it.ts index 050eef356c..e71de43cd2 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_it.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_it.ts @@ -1412,11 +1412,6 @@ Se zero, è uguale a Raggio2 PartDesignGui::TaskBooleanParameters - - - Form - Modulo - Add body @@ -1500,11 +1495,6 @@ Se zero, è uguale a Raggio2 PartDesignGui::TaskChamferParameters - - - Form - Modulo - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskDraftParameters - - - Form - Modulo - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskFeaturePick - - - Form - Modulo - Allow used features @@ -1841,11 +1821,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskFilletParameters - - - Form - Modulo - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskHelixParameters - - - Form - Modulo - Status: @@ -2098,11 +2068,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskLinearPatternParameters - - - Form - Modulo - Add feature @@ -2177,11 +2142,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskLoftParameters - - - Form - Modulo - Ruled surface @@ -2235,11 +2195,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskMirroredParameters - - - Form - Modulo - Add feature @@ -2283,11 +2238,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskMultiTransformParameters - - - Form - Modulo - Add feature @@ -2409,11 +2359,6 @@ fare nuovamente clic per terminare la selezione PartDesignGui::TaskPadPocketParameters - - - Form - Modulo - Type @@ -2569,11 +2514,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskPipeOrientation - - - Form - Modulo - Orientation mode @@ -2662,11 +2602,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskPipeParameters - - - Form - Modulo - Profile @@ -2737,11 +2672,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskPipeScaling - - - Form - Modulo - Transform mode @@ -2828,11 +2758,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskPolarPatternParameters - - - Form - Modulo - Add feature @@ -2919,11 +2844,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskRevolutionParameters - - - Form - Modulo - Axis: @@ -2991,11 +2911,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskScaledParameters - - - Form - Modulo - Add feature @@ -3034,11 +2949,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskShapeBinder - - - Form - Modulo - Object @@ -3075,11 +2985,6 @@ misurata lungo la direzione specificata PartDesignGui::TaskThicknessParameters - - - Form - Modulo - Click button to enter selection mode, @@ -4264,11 +4169,6 @@ Comunque si può decidere di migrare in ogni momento con 'Part Design -> Migr TaskHole - - - Form - Modulo - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ja.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ja.ts index f144b9e352..65c2939997 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ja.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ja.ts @@ -1411,11 +1411,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - フォーム - Add body @@ -1499,11 +1494,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - フォーム - Click button to enter selection mode, @@ -1625,11 +1615,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - フォーム - Click button to enter selection mode, @@ -1747,11 +1732,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - フォーム - Allow used features @@ -1840,11 +1820,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - フォーム - Click button to enter selection mode, @@ -1884,11 +1859,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - フォーム - Status: @@ -2097,11 +2067,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - フォーム - Add feature @@ -2176,11 +2141,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - フォーム - Ruled surface @@ -2234,11 +2194,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - フォーム - Add feature @@ -2282,11 +2237,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - フォーム - Add feature @@ -2408,11 +2358,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - フォーム - Type @@ -2567,11 +2512,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - フォーム - Orientation mode @@ -2660,11 +2600,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - フォーム - Profile @@ -2735,11 +2670,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - フォーム - Transform mode @@ -2826,11 +2756,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - フォーム - Add feature @@ -2917,11 +2842,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - フォーム - Axis: @@ -2989,11 +2909,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - フォーム - Add feature @@ -3032,11 +2947,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - フォーム - Object @@ -3073,11 +2983,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - フォーム - Click button to enter selection mode, @@ -4265,15 +4170,10 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - フォーム - Position - Position + 位置 diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ka.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ka.ts index bc3c30763f..7ced76002f 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ka.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ka.ts @@ -148,7 +148,7 @@ so that self intersection is avoided. PartDesign - ნაწილისდიზაინი + ნაწილის დაპროექტება @@ -810,7 +810,7 @@ so that self intersection is avoided. PartDesign - ნაწილის დაპროექტება + ნაწილისდიზაინი @@ -1411,11 +1411,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - ფორმა - Add body @@ -1499,11 +1494,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - ფორმა - Click button to enter selection mode, @@ -1625,11 +1615,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - ფორმა - Click button to enter selection mode, @@ -1747,11 +1732,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - ფორმა - Allow used features @@ -1790,7 +1770,7 @@ click again to end selection Valid - ჭეშმარიტი + სწორი @@ -1840,11 +1820,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - ფორმა - Click button to enter selection mode, @@ -1884,11 +1859,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - ფორმა - Status: @@ -1897,7 +1867,7 @@ click again to end selection Valid - სწორი + ჭეშმარიტი @@ -1944,7 +1914,7 @@ click again to end selection Select reference... - Select reference... + აირჩიეთ მიმართვა... @@ -1974,7 +1944,7 @@ click again to end selection Pitch: - ხმის სიმაღლე: + ტანგაჟი: @@ -2097,11 +2067,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - ფორმა - Add feature @@ -2135,7 +2100,7 @@ click again to end selection Overall Length - Overall Length + სრული სიგრძე @@ -2176,11 +2141,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - ფორმა - Ruled surface @@ -2214,7 +2174,7 @@ click again to end selection List can be reordered by dragging - სიის გადალაგება შეგიძლიათ გადათრევით + სიის გადალაგება გადათრევით შეგიძლიათ @@ -2234,11 +2194,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - ფორმა - Add feature @@ -2247,7 +2202,7 @@ click again to end selection Remove feature - თვისების მოცილება + თვისების წაშლა @@ -2282,11 +2237,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - ფორმა - Add feature @@ -2408,11 +2358,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - ფორმა - Type @@ -2532,7 +2477,7 @@ measured along the specified direction Reversed - Reversed + შებრუნებულია @@ -2568,11 +2513,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - ფორმა - Orientation mode @@ -2661,11 +2601,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - ფორმა - Profile @@ -2736,11 +2671,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - ფორმა - Transform mode @@ -2827,11 +2757,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - ფორმა - Add feature @@ -2845,7 +2770,7 @@ measured along the specified direction List can be reordered by dragging - სიის გადალაგება გადათრევით შეგიძლიათ + სიის გადალაგება შეგიძლიათ გადათრევით @@ -2865,12 +2790,12 @@ measured along the specified direction Overall Angle - Overall Angle + სრული კუთხე Offset Angle - Offset Angle + წანაცვლების კუთხე @@ -2918,11 +2843,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - ფორმა - Axis: @@ -2949,12 +2869,12 @@ measured along the specified direction Horizontal sketch axis - Horizontal sketch axis + თარაზული ესკიზის ღერძი Vertical sketch axis - Vertical sketch axis + შვეული ესკიზის ღერძი @@ -2990,11 +2910,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - ფორმა - Add feature @@ -3003,7 +2918,7 @@ measured along the specified direction Remove feature - თვისების წაშლა + თვისების მოცილება @@ -3033,11 +2948,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - ფორმა - Object @@ -3061,7 +2971,7 @@ measured along the specified direction Remove - წაშლა + მოცილება @@ -3074,11 +2984,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - ფორმა - Click button to enter selection mode, @@ -3089,7 +2994,7 @@ click again to end selection Select - აირჩიეთ + არჩევა @@ -3165,7 +3070,7 @@ click again to end selection Normal sketch axis - Normal sketch axis + ნორმალის ესკიზის ღერძი @@ -3181,7 +3086,7 @@ click again to end selection Construction line %1 - დამხმარე ხაზი %1 + კონსტრუქციის ხაზი %1 @@ -3823,7 +3728,7 @@ This may lead to unexpected results. Construction line %1 - კონსტრუქციის ხაზი %1 + დამხმარე ხაზი %1 @@ -4272,11 +4177,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - ფორმა - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ko.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ko.ts index 67490391df..5d3ffecfc6 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ko.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ko.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - 양식 - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - 양식 - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - 양식 - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - 양식 - Allow used features @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - 양식 - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - 양식 - Status: @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - 양식 - Add feature @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - 양식 - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - 양식 - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - 양식 - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - 양식 - Type @@ -2569,11 +2514,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - 양식 - Orientation mode @@ -2662,11 +2602,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - 양식 - Profile @@ -2737,11 +2672,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - 양식 - Transform mode @@ -2828,11 +2758,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - 양식 - Add feature @@ -2919,11 +2844,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - 양식 - Axis: @@ -2991,11 +2911,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - 양식 - Add feature @@ -3034,11 +2949,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - 양식 - Object @@ -3075,11 +2985,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - 양식 - Click button to enter selection mode, @@ -4273,11 +4178,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - 양식 - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_nl.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_nl.ts index 62078f3938..e34fe5e185 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_nl.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_nl.ts @@ -1410,11 +1410,6 @@ Indien nul, is deze gelijk aan Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Vorm - Add body @@ -1498,11 +1493,6 @@ Indien nul, is deze gelijk aan Radius2 PartDesignGui::TaskChamferParameters - - - Form - Vorm - Click button to enter selection mode, @@ -1624,11 +1614,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskDraftParameters - - - Form - Vorm - Click button to enter selection mode, @@ -1746,11 +1731,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskFeaturePick - - - Form - Vorm - Allow used features @@ -1839,11 +1819,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskFilletParameters - - - Form - Vorm - Click button to enter selection mode, @@ -1883,11 +1858,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskHelixParameters - - - Form - Vorm - Status: @@ -2096,11 +2066,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskLinearPatternParameters - - - Form - Vorm - Add feature @@ -2134,7 +2099,7 @@ klik nogmaals om de selectie te beëindigen Overall Length - Overall Length + Algemene lengte @@ -2175,11 +2140,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskLoftParameters - - - Form - Vorm - Ruled surface @@ -2233,11 +2193,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskMirroredParameters - - - Form - Vorm - Add feature @@ -2281,11 +2236,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskMultiTransformParameters - - - Form - Vorm - Add feature @@ -2407,11 +2357,6 @@ klik nogmaals om de selectie te beëindigen PartDesignGui::TaskPadPocketParameters - - - Form - Vorm - Type @@ -2567,11 +2512,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskPipeOrientation - - - Form - Vorm - Orientation mode @@ -2660,11 +2600,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskPipeParameters - - - Form - Vorm - Profile @@ -2735,11 +2670,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskPipeScaling - - - Form - Vorm - Transform mode @@ -2826,11 +2756,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskPolarPatternParameters - - - Form - Vorm - Add feature @@ -2917,11 +2842,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskRevolutionParameters - - - Form - Vorm - Axis: @@ -2989,11 +2909,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskScaledParameters - - - Form - Vorm - Add feature @@ -3032,11 +2947,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskShapeBinder - - - Form - Vorm - Object @@ -3073,11 +2983,6 @@ gemeten in de opgegeven richting PartDesignGui::TaskThicknessParameters - - - Form - Vorm - Click button to enter selection mode, @@ -4271,11 +4176,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Vorm - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pl.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pl.ts index 55293688d0..adbcd491e6 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pl.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pl.ts @@ -169,7 +169,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Projekt Części + Projekt części @@ -259,7 +259,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Projekt części + Projekt Części @@ -277,7 +277,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Part Design + Projekt części @@ -295,7 +295,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Projekt Części + Part Design @@ -331,7 +331,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Part Design + Projekt Części @@ -349,7 +349,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Projekt Części + Part Design @@ -655,7 +655,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Part Design + Projekt Części @@ -673,7 +673,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Projekt Części + Part Design @@ -813,7 +813,7 @@ wartość Fałsz = uzębienie wewnętrzne PartDesign - Projekt części + Projekt Części @@ -1412,11 +1412,6 @@ Jeśli wartość wynosi zero, jest równa wartości promienia 2 PartDesignGui::TaskBooleanParameters - - - Form - Formularz - Add body @@ -1500,11 +1495,6 @@ Jeśli wartość wynosi zero, jest równa wartości promienia 2 PartDesignGui::TaskChamferParameters - - - Form - Formularz - Click button to enter selection mode, @@ -1626,16 +1616,11 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskDraftParameters - - - Form - Formularz - Click button to enter selection mode, click again to end selection - Kliknij w przycisk, aby przejść do trybu wyboru, + Kliknij, aby przejść do trybu wyboru, kliknij ponownie, aby zakończyć wybór @@ -1748,11 +1733,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskFeaturePick - - - Form - Formularz - Allow used features @@ -1841,11 +1821,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskFilletParameters - - - Form - Formularz - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskHelixParameters - - - Form - Formularz - Status: @@ -1975,7 +1945,7 @@ kliknij ponownie, aby zakończyć wybór Pitch: - Odstęp: + Skok: @@ -2098,11 +2068,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskLinearPatternParameters - - - Form - Formularz - Add feature @@ -2136,7 +2101,7 @@ kliknij ponownie, aby zakończyć wybór Overall Length - Overall Length + Długość całkowita @@ -2177,11 +2142,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskLoftParameters - - - Form - Formularz - Ruled surface @@ -2235,11 +2195,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskMirroredParameters - - - Form - Formularz - Add feature @@ -2283,11 +2238,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskMultiTransformParameters - - - Form - Formularz - Add feature @@ -2409,11 +2359,6 @@ kliknij ponownie, aby zakończyć wybór PartDesignGui::TaskPadPocketParameters - - - Form - Formularz - Type @@ -2464,7 +2409,7 @@ z modelu jako odniesienie Custom direction - Kierunek niestandardowy + Kierunek użytkownika @@ -2533,7 +2478,7 @@ mierzona wzdłuż podanego kierunku Reversed - Odwrócony + Odwrotny @@ -2569,11 +2514,6 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskPipeOrientation - - - Form - Formularz - Orientation mode @@ -2662,11 +2602,6 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskPipeParameters - - - Form - Formularz - Profile @@ -2737,11 +2672,6 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskPipeScaling - - - Form - Formularz - Transform mode @@ -2828,11 +2758,6 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskPolarPatternParameters - - - Form - Formularz - Add feature @@ -2866,12 +2791,12 @@ mierzona wzdłuż podanego kierunku Overall Angle - Overall Angle + Kąt całkowity Offset Angle - Offset Angle + Kąt odsunięcia @@ -2919,11 +2844,6 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskRevolutionParameters - - - Form - Formularz - Axis: @@ -2976,7 +2896,7 @@ mierzona wzdłuż podanego kierunku Reversed - Odwrotny + Odwrócony @@ -2991,11 +2911,6 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskScaledParameters - - - Form - Formularz - Add feature @@ -3034,11 +2949,6 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskShapeBinder - - - Form - Formularz - Object @@ -3075,22 +2985,17 @@ mierzona wzdłuż podanego kierunku PartDesignGui::TaskThicknessParameters - - - Form - Formularz - Click button to enter selection mode, click again to end selection - Kliknij, aby przejść do trybu wyboru, + Kliknij w przycisk, aby przejść do trybu wyboru, kliknij ponownie, aby zakończyć wybór Select - Dodaj + Wybierz @@ -4273,11 +4178,6 @@ Migracja będzie możliwa w każdej chwili za pomocą "Projekt części -> Mi TaskHole - - - Form - Formularz - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-BR.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-BR.ts index a9a78dc5ad..b295dcec78 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-BR.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-BR.ts @@ -1410,11 +1410,6 @@ Se for zero, é igual ao Raio2 PartDesignGui::TaskBooleanParameters - - - Form - Forma - Add body @@ -1498,11 +1493,6 @@ Se for zero, é igual ao Raio2 PartDesignGui::TaskChamferParameters - - - Form - Forma - Click button to enter selection mode, @@ -1624,11 +1614,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskDraftParameters - - - Form - Formulário - Click button to enter selection mode, @@ -1746,11 +1731,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskFeaturePick - - - Form - Formulário - Allow used features @@ -1839,11 +1819,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskFilletParameters - - - Form - Formulário - Click button to enter selection mode, @@ -1871,7 +1846,7 @@ clique novamente para terminar a seleção Use All Edges - Use All Edges + Use todas as arestas @@ -1883,11 +1858,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskHelixParameters - - - Form - Formulário - Status: @@ -2096,11 +2066,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskLinearPatternParameters - - - Form - Formulário - Add feature @@ -2175,11 +2140,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskLoftParameters - - - Form - Formulário - Ruled surface @@ -2233,11 +2193,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskMirroredParameters - - - Form - Formulário - Add feature @@ -2281,11 +2236,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskMultiTransformParameters - - - Form - Formulário - Add feature @@ -2407,11 +2357,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskPadPocketParameters - - - Form - Formulário - Type @@ -2567,11 +2512,6 @@ medido ao longo da direção especificada PartDesignGui::TaskPipeOrientation - - - Form - Formulário - Orientation mode @@ -2660,11 +2600,6 @@ medido ao longo da direção especificada PartDesignGui::TaskPipeParameters - - - Form - Formulário - Profile @@ -2735,11 +2670,6 @@ medido ao longo da direção especificada PartDesignGui::TaskPipeScaling - - - Form - Formulário - Transform mode @@ -2826,11 +2756,6 @@ medido ao longo da direção especificada PartDesignGui::TaskPolarPatternParameters - - - Form - Formulário - Add feature @@ -2917,11 +2842,6 @@ medido ao longo da direção especificada PartDesignGui::TaskRevolutionParameters - - - Form - Formulário - Axis: @@ -2989,11 +2909,6 @@ medido ao longo da direção especificada PartDesignGui::TaskScaledParameters - - - Form - Formulário - Add feature @@ -3032,11 +2947,6 @@ medido ao longo da direção especificada PartDesignGui::TaskShapeBinder - - - Form - Formulário - Object @@ -3073,11 +2983,6 @@ medido ao longo da direção especificada PartDesignGui::TaskThicknessParameters - - - Form - Formulário - Click button to enter selection mode, @@ -4266,11 +4171,6 @@ Embora você possa migrar a qualquer momento mais tarde com 'Part Design -> M TaskHole - - - Form - Formulário - Position @@ -5132,7 +5032,7 @@ Intersecting sketch entities in a sketch are not allowed. Error: unsupported mode - Error: unsupported mode + Erro: modo não suportado diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-PT.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-PT.ts index 2ed8fc2e92..27d8d5d895 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-PT.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_pt-PT.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Formulário - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Formulário - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskDraftParameters - - - Form - Formulário - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskFeaturePick - - - Form - Formulário - Allow used features @@ -1841,11 +1821,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskFilletParameters - - - Form - Formulário - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskHelixParameters - - - Form - Formulário - Status: @@ -2098,11 +2068,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskLinearPatternParameters - - - Form - Formulário - Add feature @@ -2177,11 +2142,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskLoftParameters - - - Form - Formulário - Ruled surface @@ -2235,11 +2195,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskMirroredParameters - - - Form - Formulário - Add feature @@ -2283,11 +2238,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskMultiTransformParameters - - - Form - Formulário - Add feature @@ -2409,11 +2359,6 @@ clique novamente para terminar a seleção PartDesignGui::TaskPadPocketParameters - - - Form - Formulário - Type @@ -2569,11 +2514,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Formulário - Orientation mode @@ -2662,11 +2602,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Formulário - Profile @@ -2737,11 +2672,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Formulário - Transform mode @@ -2828,11 +2758,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Formulário - Add feature @@ -2919,11 +2844,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Formulário - Axis: @@ -2991,11 +2911,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Formulário - Add feature @@ -3034,11 +2949,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Formulário - Object @@ -3075,11 +2985,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Formulário - Click button to enter selection mode, @@ -4266,11 +4171,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Formulário - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ro.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ro.ts index 58717f0eb0..b7f859f610 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ro.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ro.ts @@ -1414,11 +1414,6 @@ Dacă zero, este egală cu Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Formular - Add body @@ -1502,11 +1497,6 @@ Dacă zero, este egală cu Radius2 PartDesignGui::TaskChamferParameters - - - Form - Formular - Click button to enter selection mode, @@ -1628,11 +1618,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskDraftParameters - - - Form - Formular - Click button to enter selection mode, @@ -1750,11 +1735,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskFeaturePick - - - Form - Formular - Allow used features @@ -1843,11 +1823,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskFilletParameters - - - Form - Formular - Click button to enter selection mode, @@ -1887,11 +1862,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskHelixParameters - - - Form - Formular - Status: @@ -2100,11 +2070,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskLinearPatternParameters - - - Form - Formular - Add feature @@ -2179,11 +2144,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskLoftParameters - - - Form - Formular - Ruled surface @@ -2237,11 +2197,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskMirroredParameters - - - Form - Formular - Add feature @@ -2285,11 +2240,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskMultiTransformParameters - - - Form - Formular - Add feature @@ -2411,11 +2361,6 @@ faceți clic din nou pentru a încheia selecția PartDesignGui::TaskPadPocketParameters - - - Form - Formular - Type @@ -2571,11 +2516,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskPipeOrientation - - - Form - Formular - Orientation mode @@ -2664,11 +2604,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskPipeParameters - - - Form - Formular - Profile @@ -2739,11 +2674,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskPipeScaling - - - Form - Formular - Transform mode @@ -2830,11 +2760,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskPolarPatternParameters - - - Form - Formular - Add feature @@ -2921,11 +2846,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskRevolutionParameters - - - Form - Formular - Axis: @@ -2993,11 +2913,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskScaledParameters - - - Form - Formular - Add feature @@ -3036,11 +2951,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskShapeBinder - - - Form - Formular - Object @@ -3077,11 +2987,6 @@ măsurată de-a lungul direcției specificate PartDesignGui::TaskThicknessParameters - - - Form - Formular - Click button to enter selection mode, @@ -4267,11 +4172,6 @@ Deși veți putea migra în orice moment mai târziu cu „Part Design -> Mig TaskHole - - - Form - Formular - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ru.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ru.ts index a3fe522d81..b40046a967 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ru.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_ru.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Форма - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Форма - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Форма - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Форма - Allow used features @@ -1791,7 +1771,7 @@ click again to end selection Valid - Верно + Действительный @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Форма - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Форма - Status: @@ -1898,7 +1868,7 @@ click again to end selection Valid - Действительный + Верно @@ -1945,7 +1915,7 @@ click again to end selection Select reference... - Выбрать ориентир... + Выберите ссылку... @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Форма - Add feature @@ -2136,7 +2101,7 @@ click again to end selection Overall Length - Overall Length + Общая длина @@ -2162,7 +2127,7 @@ click again to end selection Update view - Обновить + Обновить вид @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Форма - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Форма - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Форма - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Форма - Type @@ -2531,7 +2476,7 @@ measured along the specified direction Reversed - В обратную сторону + Реверсивный @@ -2567,11 +2512,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Форма - Orientation mode @@ -2660,11 +2600,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Форма - Profile @@ -2735,11 +2670,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Форма - Transform mode @@ -2826,11 +2756,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Форма - Add feature @@ -2864,12 +2789,12 @@ measured along the specified direction Overall Angle - Overall Angle + Общий угол Offset Angle - Offset Angle + Угол смещения @@ -2917,11 +2842,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Форма - Axis: @@ -2989,11 +2909,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Форма - Add feature @@ -3032,11 +2947,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Форма - Object @@ -3060,7 +2970,7 @@ measured along the specified direction Remove - Убрать + Удалить @@ -3073,11 +2983,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Форма - Click button to enter selection mode, @@ -3201,7 +3106,7 @@ click again to end selection Select reference... - Выберите ссылку... + Выбрать ориентир... @@ -4268,11 +4173,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Форма - Position @@ -4442,7 +4342,7 @@ Note that the calculation can take some time Update view - Обновить вид + Обновить @@ -4658,7 +4558,7 @@ over 90: larger hole radius at the bottom Reversed - Реверсивный + В обратную сторону diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sl.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sl.ts index cf78bcf27b..d79acac627 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sl.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sl.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Oblika - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Oblika - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskDraftParameters - - - Form - Oblika - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskFeaturePick - - - Form - Oblika - Allow used features @@ -1841,11 +1821,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskFilletParameters - - - Form - Oblika - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskHelixParameters - - - Form - Oblika - Status: @@ -1945,7 +1915,7 @@ s ponovnim klikom pa zaključite izbiranje Select reference... - Izberite osnovo … + Izberite sklic ... @@ -2098,11 +2068,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskLinearPatternParameters - - - Form - Oblika - Add feature @@ -2177,11 +2142,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskLoftParameters - - - Form - Oblika - Ruled surface @@ -2235,11 +2195,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskMirroredParameters - - - Form - Oblika - Add feature @@ -2283,11 +2238,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskMultiTransformParameters - - - Form - Oblika - Add feature @@ -2409,11 +2359,6 @@ s ponovnim klikom pa zaključite izbiranje PartDesignGui::TaskPadPocketParameters - - - Form - Oblika - Type @@ -2569,11 +2514,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskPipeOrientation - - - Form - Oblika - Orientation mode @@ -2662,11 +2602,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskPipeParameters - - - Form - Oblika - Profile @@ -2737,11 +2672,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskPipeScaling - - - Form - Oblika - Transform mode @@ -2828,11 +2758,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskPolarPatternParameters - - - Form - Oblika - Add feature @@ -2876,7 +2801,7 @@ merjena vzdolž določene smeri Angle - Kót + Kot @@ -2919,11 +2844,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskRevolutionParameters - - - Form - Oblika - Axis: @@ -2961,7 +2881,7 @@ merjena vzdolž določene smeri Select reference... - Izberite sklic ... + Izberite osnovo … @@ -2991,11 +2911,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskScaledParameters - - - Form - Oblika - Add feature @@ -3034,11 +2949,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskShapeBinder - - - Form - Oblika - Object @@ -3075,11 +2985,6 @@ merjena vzdolž določene smeri PartDesignGui::TaskThicknessParameters - - - Form - Oblika - Click button to enter selection mode, @@ -3090,7 +2995,7 @@ s ponovnim klikom pa zaključite izbiranje Select - Izberi + Izberite @@ -4273,11 +4178,6 @@ Neglede na to je selitev v bodoče z "Snovanje delov -> Preseli" mogoča kada TaskHole - - - Form - Oblika - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr-CS.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr-CS.ts index b84c3a13a4..5c16ca5331 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr-CS.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr-CS.ts @@ -1412,11 +1412,6 @@ nula, onda je jednak poluprečniku 2 PartDesignGui::TaskBooleanParameters - - - Form - Obrazac - Add body @@ -1500,11 +1495,6 @@ nula, onda je jednak poluprečniku 2 PartDesignGui::TaskChamferParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskDraftParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskFeaturePick - - - Form - Obrazac - Allow used features @@ -1841,11 +1821,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskFilletParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskHelixParameters - - - Form - Obrazac - Status: @@ -2098,11 +2068,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskLinearPatternParameters - - - Form - Obrazac - Add feature @@ -2136,7 +2101,7 @@ klikni ponovo da bi završio izbor Overall Length - Overall Length + Ukupna dužina @@ -2177,11 +2142,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskLoftParameters - - - Form - Obrazac - Ruled surface @@ -2235,11 +2195,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskMirroredParameters - - - Form - Obrazac - Add feature @@ -2283,11 +2238,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskMultiTransformParameters - - - Form - Obrazac - Add feature @@ -2409,11 +2359,6 @@ klikni ponovo da bi završio izbor PartDesignGui::TaskPadPocketParameters - - - Form - Obrazac - Type @@ -2569,11 +2514,6 @@ merena duž zadatog pravca PartDesignGui::TaskPipeOrientation - - - Form - Obrazac - Orientation mode @@ -2662,11 +2602,6 @@ merena duž zadatog pravca PartDesignGui::TaskPipeParameters - - - Form - Obrazac - Profile @@ -2737,11 +2672,6 @@ merena duž zadatog pravca PartDesignGui::TaskPipeScaling - - - Form - Obrazac - Transform mode @@ -2828,11 +2758,6 @@ merena duž zadatog pravca PartDesignGui::TaskPolarPatternParameters - - - Form - Obrazac - Add feature @@ -2866,12 +2791,12 @@ merena duž zadatog pravca Overall Angle - Overall Angle + Ukupni ugao Offset Angle - Offset Angle + Ugaoni odmak @@ -2919,11 +2844,6 @@ merena duž zadatog pravca PartDesignGui::TaskRevolutionParameters - - - Form - Obrazac - Axis: @@ -2991,11 +2911,6 @@ merena duž zadatog pravca PartDesignGui::TaskScaledParameters - - - Form - Obrazac - Add feature @@ -3034,11 +2949,6 @@ merena duž zadatog pravca PartDesignGui::TaskShapeBinder - - - Form - Obrazac - Object @@ -3075,11 +2985,6 @@ merena duž zadatog pravca PartDesignGui::TaskThicknessParameters - - - Form - Obrazac - Click button to enter selection mode, @@ -3166,7 +3071,7 @@ klikni ponovo da bi završio izbor Normal sketch axis - Normal sketch axis + Osa upravna na skicu @@ -4273,11 +4178,6 @@ Mada moći ćeš Part Design da migriraš u bilo kom trenutku kasnije pomoću 'P TaskHole - - - Form - Obrazac - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr.ts index 77ba5191d2..664e088946 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sr.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Образац - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Образац - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Образац - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Образац - Allow used features @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Образац - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Образац - Status: @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Образац - Add feature @@ -2136,7 +2101,7 @@ click again to end selection Overall Length - Overall Length + Укупна дужина @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Образац - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Образац - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Образац - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Образац - Type @@ -2569,11 +2514,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Образац - Orientation mode @@ -2662,11 +2602,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Образац - Profile @@ -2737,11 +2672,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Образац - Transform mode @@ -2828,11 +2758,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Образац - Add feature @@ -2866,12 +2791,12 @@ measured along the specified direction Overall Angle - Overall Angle + Укупни угао Offset Angle - Offset Angle + Угаони одмак @@ -2919,11 +2844,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Образац - Axis: @@ -2991,11 +2911,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Образац - Add feature @@ -3034,11 +2949,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Образац - Object @@ -3075,11 +2985,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Образац - Click button to enter selection mode, @@ -4273,11 +4178,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Образац - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sv-SE.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sv-SE.ts index 76d73e4792..5958eb8a5c 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sv-SE.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_sv-SE.ts @@ -1411,11 +1411,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Form - Add body @@ -1499,11 +1494,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Form - Click button to enter selection mode, @@ -1625,11 +1615,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Form - Click button to enter selection mode, @@ -1747,11 +1732,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Form - Allow used features @@ -1840,11 +1820,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Form - Click button to enter selection mode, @@ -1884,11 +1859,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Form - Status: @@ -2097,11 +2067,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Form - Add feature @@ -2176,11 +2141,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Form - Ruled surface @@ -2234,11 +2194,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Form - Add feature @@ -2282,11 +2237,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Form - Add feature @@ -2408,11 +2358,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Form - Type @@ -2568,11 +2513,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Form - Orientation mode @@ -2661,11 +2601,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Form - Profile @@ -2736,11 +2671,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Form - Transform mode @@ -2827,11 +2757,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Form - Add feature @@ -2918,11 +2843,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Form - Axis: @@ -2990,11 +2910,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Form - Add feature @@ -3033,11 +2948,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Form - Object @@ -3074,11 +2984,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Form - Click button to enter selection mode, @@ -4267,11 +4172,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Form - Position @@ -4508,7 +4408,7 @@ Only available for holes without thread Wide - Wide + Bred diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_tr.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_tr.ts index c591162430..00c900a840 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_tr.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_tr.ts @@ -1412,11 +1412,6 @@ Sıfır ise Yarıçap2'ye eşittir PartDesignGui::TaskBooleanParameters - - - Form - Şekil: - Add body @@ -1500,11 +1495,6 @@ Sıfır ise Yarıçap2'ye eşittir PartDesignGui::TaskChamferParameters - - - Form - Şekil: - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskDraftParameters - - - Form - Şekil: - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskFeaturePick - - - Form - Şekil: - Allow used features @@ -1841,11 +1821,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskFilletParameters - - - Form - Şekil: - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskHelixParameters - - - Form - Şekil: - Status: @@ -2098,11 +2068,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskLinearPatternParameters - - - Form - Şekil: - Add feature @@ -2177,11 +2142,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskLoftParameters - - - Form - Şekil: - Ruled surface @@ -2235,11 +2195,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskMirroredParameters - - - Form - Şekil: - Add feature @@ -2283,11 +2238,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskMultiTransformParameters - - - Form - Şekil: - Add feature @@ -2409,11 +2359,6 @@ seçimi bitirmek için tekrar basın PartDesignGui::TaskPadPocketParameters - - - Form - Şekil: - Type @@ -2569,11 +2514,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskPipeOrientation - - - Form - Şekil: - Orientation mode @@ -2662,11 +2602,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskPipeParameters - - - Form - Şekil: - Profile @@ -2737,11 +2672,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskPipeScaling - - - Form - Şekil: - Transform mode @@ -2828,11 +2758,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskPolarPatternParameters - - - Form - Şekil: - Add feature @@ -2919,11 +2844,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskRevolutionParameters - - - Form - Şekil: - Axis: @@ -2991,11 +2911,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskScaledParameters - - - Form - Şekil: - Add feature @@ -3034,11 +2949,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskShapeBinder - - - Form - Şekil: - Object @@ -3075,11 +2985,6 @@ belirlenen yön boyunca ölçülecek PartDesignGui::TaskThicknessParameters - - - Form - Şekil: - Click button to enter selection mode, @@ -4273,11 +4178,6 @@ Buna karşın, daha sonra istediğiniz an 'ParçaTasarımı->Geçiş...' 'Par TaskHole - - - Form - Şekil: - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_uk.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_uk.ts index 40d6cdf1a6..309176eebd 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_uk.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_uk.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Форма - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Форма - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Форма - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Форма - Allow used features @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Форма - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Форма - Status: @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Форма - Add feature @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Форма - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Форма - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Форма - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Форма - Type @@ -2568,11 +2513,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Форма - Orientation mode @@ -2661,11 +2601,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Форма - Profile @@ -2736,11 +2671,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Форма - Transform mode @@ -2827,11 +2757,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Форма - Add feature @@ -2918,11 +2843,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Форма - Axis: @@ -2990,11 +2910,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Форма - Add feature @@ -3033,11 +2948,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Форма - Object @@ -3074,11 +2984,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Форма - Click button to enter selection mode, @@ -4272,11 +4177,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Форма - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_val-ES.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_val-ES.ts index 27d180b05f..9508226eab 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_val-ES.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_val-ES.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - Forma - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - Forma - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - Forma - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - Forma - Allow used features @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - Forma - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - Forma - Status: @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - Forma - Add feature @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - Forma - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - Forma - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - Forma - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - Forma - Type @@ -2569,11 +2514,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - Forma - Orientation mode @@ -2662,11 +2602,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - Forma - Profile @@ -2737,11 +2672,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - Forma - Transform mode @@ -2828,11 +2758,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - Forma - Add feature @@ -2919,11 +2844,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - Forma - Axis: @@ -2991,11 +2911,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - Forma - Add feature @@ -3034,11 +2949,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - Forma - Object @@ -3075,11 +2985,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - Forma - Click button to enter selection mode, @@ -4270,11 +4175,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - Forma - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-CN.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-CN.ts index a4be2f4672..e342b27452 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-CN.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-CN.ts @@ -1412,11 +1412,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - 窗体 - Add body @@ -1500,11 +1495,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - 窗体 - Click button to enter selection mode, @@ -1626,11 +1616,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - 窗体 - Click button to enter selection mode, @@ -1748,11 +1733,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - 窗体 - Allow used features @@ -1841,11 +1821,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - 窗体 - Click button to enter selection mode, @@ -1885,11 +1860,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - 窗体 - Status: @@ -2098,11 +2068,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - 窗体 - Add feature @@ -2177,11 +2142,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - 窗体 - Ruled surface @@ -2235,11 +2195,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - 窗体 - Add feature @@ -2283,11 +2238,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - 窗体 - Add feature @@ -2409,11 +2359,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - 窗体 - Type @@ -2568,11 +2513,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - 窗体 - Orientation mode @@ -2661,11 +2601,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - 窗体 - Profile @@ -2736,11 +2671,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - 窗体 - Transform mode @@ -2827,11 +2757,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - 窗体 - Add feature @@ -2918,11 +2843,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - 窗体 - Axis: @@ -2990,11 +2910,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - 窗体 - Add feature @@ -3033,11 +2948,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - 窗体 - Object @@ -3074,11 +2984,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - 窗体 - Click button to enter selection mode, @@ -4270,11 +4175,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - 窗体 - Position diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts index 625dc93f94..9cebb2c402 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts @@ -1411,11 +1411,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskBooleanParameters - - - Form - 格式 - Add body @@ -1499,11 +1494,6 @@ If zero, it is equal to Radius2 PartDesignGui::TaskChamferParameters - - - Form - 格式 - Click button to enter selection mode, @@ -1624,11 +1614,6 @@ click again to end selection PartDesignGui::TaskDraftParameters - - - Form - 格式 - Click button to enter selection mode, @@ -1744,11 +1729,6 @@ click again to end selection PartDesignGui::TaskFeaturePick - - - Form - 格式 - Allow used features @@ -1837,11 +1817,6 @@ click again to end selection PartDesignGui::TaskFilletParameters - - - Form - 格式 - Click button to enter selection mode, @@ -1880,11 +1855,6 @@ click again to end selection PartDesignGui::TaskHelixParameters - - - Form - 格式 - Status: @@ -2093,11 +2063,6 @@ click again to end selection PartDesignGui::TaskLinearPatternParameters - - - Form - 格式 - Add feature @@ -2172,11 +2137,6 @@ click again to end selection PartDesignGui::TaskLoftParameters - - - Form - 格式 - Ruled surface @@ -2230,11 +2190,6 @@ click again to end selection PartDesignGui::TaskMirroredParameters - - - Form - 格式 - Add feature @@ -2278,11 +2233,6 @@ click again to end selection PartDesignGui::TaskMultiTransformParameters - - - Form - 格式 - Add feature @@ -2404,11 +2354,6 @@ click again to end selection PartDesignGui::TaskPadPocketParameters - - - Form - 格式 - Type @@ -2561,11 +2506,6 @@ measured along the specified direction PartDesignGui::TaskPipeOrientation - - - Form - 格式 - Orientation mode @@ -2654,11 +2594,6 @@ measured along the specified direction PartDesignGui::TaskPipeParameters - - - Form - 格式 - Profile @@ -2729,11 +2664,6 @@ measured along the specified direction PartDesignGui::TaskPipeScaling - - - Form - 格式 - Transform mode @@ -2820,11 +2750,6 @@ measured along the specified direction PartDesignGui::TaskPolarPatternParameters - - - Form - 格式 - Add feature @@ -2911,11 +2836,6 @@ measured along the specified direction PartDesignGui::TaskRevolutionParameters - - - Form - 格式 - Axis: @@ -2983,11 +2903,6 @@ measured along the specified direction PartDesignGui::TaskScaledParameters - - - Form - 格式 - Add feature @@ -3026,11 +2941,6 @@ measured along the specified direction PartDesignGui::TaskShapeBinder - - - Form - 格式 - Object @@ -3067,11 +2977,6 @@ measured along the specified direction PartDesignGui::TaskThicknessParameters - - - Form - 格式 - Click button to enter selection mode, @@ -4262,11 +4167,6 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi TaskHole - - - Form - 格式 - Position diff --git a/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.ui b/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.ui index a17b7559ab..3ed6882fee 100644 --- a/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.ui +++ b/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.ui @@ -154,7 +154,7 @@ 0 - + Offset @@ -185,7 +185,7 @@ - + Occurrences diff --git a/src/Mod/Path/CMakeLists.txt b/src/Mod/Path/CMakeLists.txt index 4e00a938d5..f9c0ae30e7 100644 --- a/src/Mod/Path/CMakeLists.txt +++ b/src/Mod/Path/CMakeLists.txt @@ -95,6 +95,10 @@ SET(PathPythonMainGui_SRCS Path/Main/Gui/JobDlg.py Path/Main/Gui/PreferencesJob.py Path/Main/Gui/Sanity.py + Path/Main/Gui/Sanity_Bulb.svg + Path/Main/Gui/Sanity_Caution.svg + Path/Main/Gui/Sanity_Note.svg + Path/Main/Gui/Sanity_Warning.svg Path/Main/Gui/Simulator.py ) diff --git a/src/Mod/Path/Gui/Resources/translations/Path.ts b/src/Mod/Path/Gui/Resources/translations/Path.ts index 2cfc909e6a..1c3dfe31f0 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path.ts @@ -534,12 +534,6 @@ For stock from the Base object's bounding box it means the extra material i Form - - - - Form - - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_be.ts b/src/Mod/Path/Gui/Resources/translations/Path_be.ts index 8e21f31c2d..9f1c20f24c 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_be.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_be.ts @@ -552,12 +552,6 @@ FreeCAD пастаўляецца з некалькімі прадусталяв Form - - - - Form - Форма - Boundary Body @@ -1494,12 +1488,12 @@ The latter can be used to face of the entire stock area to ensure uniform height Check to skip machining regions that have already been cleared by previous operations - Check to skip machining regions that have already been cleared by previous operations + Праверце, ці не прапускаюцца вобласці апрацоўкі, якія ўжо былі ачышчаны папярэднімі аперацыямі Use Rest Machining - Use Rest Machining + Ужываць механічную апрацоўку @@ -5532,18 +5526,19 @@ For example: Skips machining regions that have already been cleared by previous operations. - Skips machining regions that have already been cleared by previous operations. + Прапускаць вобласці апрацоўкі, якія ўжо былі ачышчаны папярэднімі аперацыямі. The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. - The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. + Вобласці, якія вычышчаныя з дапамогай аперацыі, па адной вобласці на вышыню, захоўваюцца як злучэнне дэталі. +Ужываецца ўнутры для механічнай апрацоўкі дэталяў. Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. - Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. + Птушка, якая паказвае на тое, што вобласці механічнай апрацоўкі ніколі не вылічаліся і павінны быць пералічаныя перад ужываннем. @@ -6921,7 +6916,8 @@ For example: Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... - Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... + Папярэдняя аперацыя %s патрабуецца для механічнай апрацоўкі, але ў ёй няма захаваных метададзеных механічнай апрацоўкі. +Вылічэнні для стварэння метададзеных... diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ca.ts b/src/Mod/Path/Gui/Resources/translations/Path_ca.ts index e6e7efb227..cd5b36ca79 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ca.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ca.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Forma - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_cs.ts b/src/Mod/Path/Gui/Resources/translations/Path_cs.ts index 6e82e3db37..905b97b998 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_cs.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_cs.ts @@ -540,12 +540,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Návrh - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_de.ts b/src/Mod/Path/Gui/Resources/translations/Path_de.ts index abae2fadc2..544c84052f 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_de.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_de.ts @@ -126,7 +126,7 @@ Select Base Models - Selektieren Sie das Basismodell + Basismodelle auswählen @@ -146,7 +146,7 @@ Job Template Export - Auftragsvorlagen-Export + Auftragsvorlage exportieren @@ -545,12 +545,6 @@ Für das Standard Rohmaterial aus dem Begrenzungsrahmen des Basisobjekts bedeute Form - - - - Form - Form - Boundary Body @@ -3643,7 +3637,7 @@ Sollten mehrere Werkzeuge oder Werkzeugformen mit dem gleichen Namen in verschie Add To Job - zum Auftrag hinzufügen + Zum Auftrag hinzufügen @@ -3651,7 +3645,7 @@ Sollten mehrere Werkzeuge oder Werkzeugformen mit dem gleichen Namen in verschie Job Edit - Auftrag editieren + Auftrag bearbeiten @@ -4903,7 +4897,7 @@ Zum Beispiel: Job Cycle Time Estimation - Abschätzung des Durchlaufzeit des Auftrags + Abschätzung der Durchlaufzeit des Auftrags @@ -4923,7 +4917,7 @@ Zum Beispiel: Select the Type of Job - Wählen Sie die Art der Aufgabe + Auftragsart auswählen @@ -6468,7 +6462,7 @@ Zum Beispiel: Creates a Path Job - Erstellt ein Pfad Auftrag + Erstellt einen Path-Auftrag @@ -6576,7 +6570,7 @@ Zum Beispiel: Exports Path Job as a template to be used for other jobs - Exportiert den Path Auftrag als Vorlage, um diese für andere Aufträge zu verwenden + Exportiert einen Path-Auftrag als Vorlage, die für andere Aufträge verwendet werden kann @@ -6613,7 +6607,7 @@ Zum Beispiel: Job Type - Auftragstyp + Auftragsart diff --git a/src/Mod/Path/Gui/Resources/translations/Path_el.ts b/src/Mod/Path/Gui/Resources/translations/Path_el.ts index 38d7b80bc5..fe8a96f8bd 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_el.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_el.ts @@ -136,7 +136,7 @@ 2D - 2D + 2D @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Μορφή - Boundary Body @@ -2050,12 +2044,12 @@ Default: 3 mm Horizontal - Horizontal + Οριζόντια Vertical - Vertical + Κατακόρυφα @@ -2977,7 +2971,7 @@ Should multiple tools or tool shapes with the same name exist in different direc LeadInOut - LeadInOut + Οδηγήστε μέσα/έξω @@ -4182,12 +4176,12 @@ Default: 3 mm Horizontal - Horizontal + Οριζόντια Vertical - Vertical + Κατακόρυφα @@ -6382,7 +6376,7 @@ For example: 2D - 2D + 2D diff --git a/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts b/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts index e407320316..2512fe8377 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts @@ -546,12 +546,6 @@ Para existencias desde la caja delimitadora del objeto Base significa el materia Form - - - - Form - Forma - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts b/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts index 2644c635dd..9dab1a4aa8 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts @@ -546,12 +546,6 @@ Para existencias desde la caja delimitadora del objeto Base significa el materia Form - - - - Form - Formulario - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_eu.ts b/src/Mod/Path/Gui/Resources/translations/Path_eu.ts index 90846b1e1b..952c0b1051 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_eu.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_eu.ts @@ -546,12 +546,6 @@ Oinarri-objektuaren muga-kutxatik eratorritako piezari dagokionez, esan nahi du Form - - - - Form - Inprimakia - Boundary Body @@ -1466,12 +1460,12 @@ Azken aukera pieza gordinaren area osoaren aurpegirako erabili daiteke, hurrengo Check to skip machining regions that have already been cleared by previous operations - Check to skip machining regions that have already been cleared by previous operations + Markatu hau aurreko eragiketekin garbitu diren mekanizazio-eskualdeak saltatzeko Use Rest Machining - Use Rest Machining + Erabili artezketa-mekanizazioa @@ -5495,18 +5489,18 @@ Adibidez: Skips machining regions that have already been cleared by previous operations. - Skips machining regions that have already been cleared by previous operations. + Aurreko eragiketekin garbitu diren mekanizazio-eskualdeak saltatzen ditu. The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. - The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. + Eragiketa honek garbitzen dituen areak, area bana altuera bakoitzeko, konposatu-atal gisa biltegiratua. Barnean erabilia artezketa-mekanizaziorako. Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. - Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. + Artezketa-mekanizazioko eskualdeak inoiz ez direla kalkulatu eta erabiliak izan baino lehen berriro kalkulatu behar direla adierazten duen bandera. @@ -6880,7 +6874,7 @@ Adibidez: Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... - Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... + Aurretik %s eragiketa behar da artezketa-mekanizaziorako, baina ez du artezketa-mekanizazioko metadaturik. Berriro kalkulatzen metadatu horiek sortzeko... diff --git a/src/Mod/Path/Gui/Resources/translations/Path_fi.ts b/src/Mod/Path/Gui/Resources/translations/Path_fi.ts index 781794d1aa..47a92dfec3 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_fi.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_fi.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Lomake - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_fr.ts b/src/Mod/Path/Gui/Resources/translations/Path_fr.ts index a5fdbbf7fb..bdd6c2c8cb 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_fr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_fr.ts @@ -546,12 +546,6 @@ Pour le brut provenant de la boîte englobante de l'objet de base, il s'agit du Form - - - - Form - Forme - Boundary Body @@ -1466,12 +1460,12 @@ Ce dernier peut être utilisé pour surfacer l'ensemble de la zone du brut afin Check to skip machining regions that have already been cleared by previous operations - Check to skip machining regions that have already been cleared by previous operations + Vérifier que les zones d'usinage qui ont déjà été détourées par des opérations précédentes seront ignorées Use Rest Machining - Use Rest Machining + Utiliser l'usinage de finition @@ -5490,18 +5484,18 @@ Par exemple : Skips machining regions that have already been cleared by previous operations. - Skips machining regions that have already been cleared by previous operations. + Sauter les zones d'usinage qui ont déjà été détourées par des opérations précédentes. The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. - The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. + Les zones détourées par cette opération, une zone par hauteur, sont enregistrées comme une pièce composée. Utilisées en interne pour l'usinage de finition. Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. - Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. + Indicateur indiquant que les régions d'usinage de finition n'ont jamais été calculées, et doivent être recalculées avant d'être utilisées. @@ -6875,7 +6869,7 @@ Les valeurs seront converties dans l'unité souhaitée pendant le post-traitemen Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... - Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... + L'opération précédente %s est requise pour l'usinage de finition, mais elle n'a pas de métadonnées d'usinage de finition. Recalculer pour générer ces métadonnées... diff --git a/src/Mod/Path/Gui/Resources/translations/Path_gl.ts b/src/Mod/Path/Gui/Resources/translations/Path_gl.ts index fe6cb1f161..7c45f83322 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_gl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_gl.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Formulario - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_hr.ts b/src/Mod/Path/Gui/Resources/translations/Path_hr.ts index d50623968e..3934710eb6 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_hr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_hr.ts @@ -548,12 +548,6 @@ Za materijal obrade iz graničnog okvira to znači dodatni materijal u svim smje Form - - - - Form - Obrazac - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_hu.ts b/src/Mod/Path/Gui/Resources/translations/Path_hu.ts index 49dd86ac8d..6b363d52fa 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_hu.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_hu.ts @@ -544,12 +544,6 @@ Az alaptárgy kötött dobozából származó készlet minden irányban az extra Form - - - - Form - Űrlap - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_id.ts b/src/Mod/Path/Gui/Resources/translations/Path_id.ts index b5c781ce37..3937c5c342 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_id.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_id.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Bentuk - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_it.ts b/src/Mod/Path/Gui/Resources/translations/Path_it.ts index 7b20330c0d..5d4ca5776c 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_it.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_it.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Modulo - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ja.ts b/src/Mod/Path/Gui/Resources/translations/Path_ja.ts index 9c8d4c9a60..bcd29cfca4 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ja.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ja.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - フォーム - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ka.ts b/src/Mod/Path/Gui/Resources/translations/Path_ka.ts index 07deffb5bd..f7c05ebdd2 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ka.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ka.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - ფორმა - Boundary Body @@ -1466,12 +1460,12 @@ The latter can be used to face of the entire stock area to ensure uniform height Check to skip machining regions that have already been cleared by previous operations - Check to skip machining regions that have already been cleared by previous operations + ჩართეთ იმ რეგიონების გამოსატოვებლად, რომლებიც წინა ოპერაციების მიერ უკვე გასუფთავდა Use Rest Machining - Use Rest Machining + ნარჩენის დამუშავების გამოყენება @@ -5495,18 +5489,18 @@ For example: Skips machining regions that have already been cleared by previous operations. - Skips machining regions that have already been cleared by previous operations. + გამოტოვებს შესაბამის რეგიონებს, რომლებიც წინა ოპერაციების მიერ უკვე გასუფთავდა. The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. - The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. + ფართობები, რომლებიც ამ ოპერაციის მიერ გასუფთავდა, ერთი ფართობი ერთი სიმაღლისთვის, დამახსოვრებულია, როგორც გადაბმული ნაწილი. გამოიყენება ძრავას შიგნით, ნარჩენის დამუშავებისთვის. Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. - Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. + ალამი, რომელიც აღნიშნავს, რომ მორჩენილის დამუშავების რეგიონები არასდროს გამოთვლილა და რომ გამოყენების წინ აუცილებელია მათი გამოთვლა. @@ -6880,7 +6874,7 @@ For example: Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... - Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... + წინა ოპერაცია %s აუცილებელია ნარჩენის დამუშავებისთვის, მაგრამ ნარჩენის დამუშავების დამახსოვრებული მეტამონაცემები არ გააჩნია. მიმდინარეობს გადათვლა ამ მეტამონაცემების გენერაციისთვის... diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ko.ts b/src/Mod/Path/Gui/Resources/translations/Path_ko.ts index 90a3f42a3e..e092d7250a 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ko.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ko.ts @@ -538,12 +538,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - 양식 - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_nl.ts b/src/Mod/Path/Gui/Resources/translations/Path_nl.ts index 162978ef75..a4405321b2 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_nl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_nl.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Vorm - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_pl.ts b/src/Mod/Path/Gui/Resources/translations/Path_pl.ts index 91498bbe6c..6876d53235 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_pl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_pl.ts @@ -550,12 +550,6 @@ Dla nadmiaru materiału podstawowego z ramki otaczającej oznacza to naddatek ma Form - - - - Form - Formularz - Boundary Body @@ -569,7 +563,7 @@ Dla nadmiaru materiału podstawowego z ramki otaczającej oznacza to naddatek ma Create Box - Utwórz pole + Utwórz prostopadłościan @@ -877,7 +871,7 @@ Zresetuje wszystkie bieżące elementy z listy i wypełnia listę wszystkimi okr Final Depth - Ostateczna głębokość + Głębokość końcowa @@ -888,7 +882,7 @@ Zresetuje wszystkie bieżące elementy z listy i wypełnia listę wszystkimi okr Finish Step Down - Zakończ krokiem w dół + Przejście wykończeniowe @@ -918,7 +912,7 @@ Zresetuje wszystkie bieżące elementy z listy i wypełnia listę wszystkimi okr Clearance Height - Wysokość prześwitu + Wysokość wycofania @@ -1002,7 +996,7 @@ Zresetuje wszystkie bieżące elementy z listy i wypełnia listę wszystkimi okr Step Over Percent - Krok dalej procentowo + Zachodzenie przejść @@ -1279,13 +1273,13 @@ Zresetuje wszystkie bieżące elementy z listy i wypełnia listę wszystkimi okr Step over percent - Krok dalej procentowo + Zachodzenie przejść Extra Offset - Przesunięcie dodatkowe + Naddatek @@ -1360,17 +1354,17 @@ Zresetuje wszystkie bieżące elementy z listy i wypełnia listę wszystkimi okr Cut Mode - Tryb skrawania + Sposób obróbki Climb - Podejście + Współbieżnie Conventional - Konwencjonalne + Przeciwbieżnie @@ -1470,12 +1464,12 @@ Ta druga opcja może być użyta do ściany całego obszaru naddatku, aby zapewn Check to skip machining regions that have already been cleared by previous operations - Check to skip machining regions that have already been cleared by previous operations + Sprawdź, czy pominąć obszary obróbki, które zostały już oczyszczone przez poprzednie operacje Use Rest Machining - Use Rest Machining + Użyj obróbki spoczynkowej @@ -1552,7 +1546,7 @@ Ta druga opcja może być użyta do ściany całego obszaru naddatku, aby zapewn Cut Side - Wytnij stronę + Strona obróbki @@ -1889,12 +1883,12 @@ Obrotowy: Skanowanie obrotowe w 4 osiach. Additional offset to the selected bounding box along the X axis. - Dodatkowe przesunięcie względem wybranej ramki otaczającej wzdłuż osi X. + Naddatek względem wybranej ramki otaczającej wzdłuż osi X. Additional offset to the selected bounding box along the Y axis. - Dodatkowe przesunięcie względem wybranej ramki otaczającej wzdłuż osi Y. + Naddatek względem wybranej ramki otaczającej wzdłuż osi Y. @@ -2001,7 +1995,7 @@ Domyślnie: OpToolDiameter Expression set as ClearanceHeight for new operations. Default: "OpStockZMax+SetupSheet.ClearanceHeightOffset" - Wyrażenie ustawione jako Wysokość prześwitu dla nowych operacji. + Wyrażenie ustawione jako Wysokość wycofania dla nowych operacji. Domyślnie: "OpStockZMax+SetupSheet.ClearanceHeightOffset" @@ -2559,12 +2553,12 @@ Jeśli pole pozostanie puste, żaden szablon nie zostanie wstępnie wybrany. Stock - Półwyrób + Przygotówka Create Box - Utwórz sześcian + Utwórz prostopadłościan @@ -3369,7 +3363,7 @@ Should multiple tools or tool shapes with the same name exist in different direc Finish Step Down - Zakończ krok w dół + Przejście wykończeniowe @@ -3384,7 +3378,7 @@ Should multiple tools or tool shapes with the same name exist in different direc Clearance Height - Wysokość prześwitu + Wysokość wycofania @@ -3782,12 +3776,12 @@ FreeCAD has no knowledge of where a particular coordinate system exists within t Stock - Półwyrób + Przygotówka Create Box - Utwórz sześcian + Utwórz prostopadłościan @@ -3946,7 +3940,7 @@ FreeCAD has no knowledge of where a particular coordinate system exists within t Expression set as ClearanceHeight for new operations. Default: "OpStockZMax+SetupSheet.ClearanceHeightOffset" - Wyrażenie ustawione jako Wysokość prześwitu dla nowych operacji. + Wyrażenie ustawione jako Wysokość wycofania dla nowych operacji. Domyślnie: "OpStockZMax+SetupSheet.ClearanceHeightOffset" @@ -5215,7 +5209,7 @@ Na przykład: Final Depth of Tool- lowest value in Z - Ostateczna głębokość narzędzia - najniższa wartość w Z + Głębokość końcowa narzędzia - najniższa wartość w Z @@ -5498,18 +5492,18 @@ Na przykład: Skips machining regions that have already been cleared by previous operations. - Skips machining regions that have already been cleared by previous operations. + Pomija obszary obróbki, które zostały już oczyszczone przez poprzednie operacje. The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. - The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. + Obszary oczyszczone w wyniku tej operacji, po jednym obszarze na wysokość, przechowywane jako część złożona. Używany wewnętrznie do obróbki spoczynkowej. Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. - Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. + Flaga wskazująca, że regiony obróbki spoczynkowej nigdy nie zostały obliczone i muszą zostać ponownie obliczone przed użyciem. @@ -6560,7 +6554,7 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Inspect Path Commands - Przeglądaj polecenia ścieżki + Sprawdź ścieżkę narzędzia @@ -6886,7 +6880,7 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... - Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... + Poprzednia operacja %s jest wymagana do obróbki spoczynkowej, ale nie ma zapisanych metadanych obróbki spoczynkowej. Należy ponownie wykonać obliczenia, aby wygenerować te metadane ... @@ -6899,7 +6893,7 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Flood - Strumień + Zalewowe @@ -7088,12 +7082,12 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Climb - Podejście + Współbieżnie Conventional - Konwencjonalne + Przeciwbieżnie @@ -7448,7 +7442,7 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Stock - Półwyrób + Przygotówka @@ -7473,12 +7467,12 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Conventional - Konwencjonalne + Przeciwbieżnie Climb - Podejście + Współbieżnie @@ -7686,12 +7680,12 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Climb - Podejście + Współbieżnie Conventional - Konwencjonalne + Przeciwbieżnie @@ -7826,12 +7820,12 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Conventional - Konwencjonalne + Przeciwbieżnie Climb - Podejście + Współbieżnie @@ -8146,7 +8140,7 @@ Przerwanie procesu tworzenia Face - Powierzchnia + Planowanie @@ -8172,7 +8166,7 @@ Przerwanie procesu tworzenia Pocket Shape - Kształt kieszeni + Obróbka kieszeni @@ -8230,7 +8224,7 @@ Przerwanie procesu tworzenia Post Process - Przetwarzanie końcowe + Generuj program @@ -8388,12 +8382,12 @@ Przerwanie procesu tworzenia ToolBit Dock - Magazynek narzędzi + Tabela narzędzi Toggle the Toolbit Dock - Przełącz magazynek narzędzi + Przełącza tabelę narzędzi diff --git a/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts b/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts index 025a8e25bd..1d06d3a133 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Formulário - Boundary Body @@ -817,7 +811,7 @@ Reset deletes all current items from the list and fills the list with all circul Edit selected location. - Edit selected location. + Editar local selecionado. diff --git a/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts b/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts index 10280c3b2e..5aa6506bd3 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Formulário - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ro.ts b/src/Mod/Path/Gui/Resources/translations/Path_ro.ts index e5a77c065d..91b9f91050 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ro.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ro.ts @@ -549,12 +549,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Formular - Boundary Body @@ -7057,7 +7051,7 @@ De exemplu: Boundbox - Boundbox + Limite @@ -7442,7 +7436,7 @@ De exemplu: BaseBoundBox - BaseBoundBox + Casetă de BaseBoundBox @@ -7754,7 +7748,7 @@ De exemplu: BaseBoundBox - BaseBoundBox + Casetă de BaseBoundBox diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ru.ts b/src/Mod/Path/Gui/Resources/translations/Path_ru.ts index dee026ce25..e91db576cd 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ru.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ru.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Форма - Boundary Body @@ -1466,12 +1460,12 @@ The latter can be used to face of the entire stock area to ensure uniform height Check to skip machining regions that have already been cleared by previous operations - Check to skip machining regions that have already been cleared by previous operations + Установите этот флажок, чтобы пропустить области обработки, которые уже были очищены предыдущими операциями Use Rest Machining - Use Rest Machining + Используйте доработку @@ -5487,18 +5481,18 @@ For example: Skips machining regions that have already been cleared by previous operations. - Skips machining regions that have already been cleared by previous operations. + Пропускает области обработки, которые уже были очищены предыдущими операциями. The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. - The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. + Области, очищенные в результате этой операции, по одной области на высоту, сохраняются как составная деталь. Используется внутри для остаточной обработки. Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. - Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. + Флаг, указывающий, что остальные области обработки никогда не вычислялись и должны быть пересчитаны перед использованием. @@ -6872,7 +6866,7 @@ For example: Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... - Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... + Предыдущая операция %s необходима для остаточной обработки, но у нее нет сохраненных метаданных остаточной обработки. Повторные вычисления для создания этих метаданных... diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sl.ts b/src/Mod/Path/Gui/Resources/translations/Path_sl.ts index 709104227d..0b47c7ab91 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sl.ts @@ -546,12 +546,6 @@ Pri surovcih z očrtnim kvadrom izhodiščnega predmeta to pomeni dodaten materi Form - - - - Form - Oblika - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts b/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts index 7442953e91..fb9fb04b77 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Obrazac - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sr.ts b/src/Mod/Path/Gui/Resources/translations/Path_sr.ts index 2f53579bf6..a598e4f4ef 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sr.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Образац - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts b/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts index af5207f760..02f545893d 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Form - Boundary Body @@ -6387,7 +6381,7 @@ For example: 2.5D - 2.5D + 2.5D diff --git a/src/Mod/Path/Gui/Resources/translations/Path_tr.ts b/src/Mod/Path/Gui/Resources/translations/Path_tr.ts index e8ed244a7f..b47fbb8eaa 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_tr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_tr.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Şekil: - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_uk.ts b/src/Mod/Path/Gui/Resources/translations/Path_uk.ts index 0920d121bb..4cf5a05cc8 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_uk.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_uk.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Форма - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts b/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts index c736aed519..d0b9d9970e 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - Forma - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts b/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts index 4545701e33..25000b3996 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - 窗体 - Boundary Body diff --git a/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts b/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts index beb7b817a4..f28175bf06 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts @@ -546,12 +546,6 @@ For stock from the Base object's bounding box it means the extra material in all Form - - - - Form - 格式 - Boundary Body diff --git a/src/Mod/Path/Path/Base/Generator/helix.py b/src/Mod/Path/Path/Base/Generator/helix.py index 353840d5a8..bbb06ca084 100644 --- a/src/Mod/Path/Path/Base/Generator/helix.py +++ b/src/Mod/Path/Path/Base/Generator/helix.py @@ -71,6 +71,9 @@ def generate( ) ) + # inner_radius contains not a radius but the value from Extra Offset, which is the distance between the hole radius as designed and the hole radius to be cut. + # hole_radius contains the designed hole radius - inner_radius. + if type(hole_radius) not in [float, int]: raise TypeError("Invalid type for hole radius") @@ -83,13 +86,6 @@ def generate( if type(tool_diameter) not in [float, int]: raise TypeError("tool_diameter must be a float") - if inner_radius > 0 and hole_radius - inner_radius < tool_diameter: - raise ValueError( - "hole_radius - inner_radius = {0} is < tool diameter of {1}".format( - hole_radius - inner_radius, tool_diameter - ) - ) - if not hole_radius * 2 > tool_diameter: raise ValueError( "Cannot helix a hole of diameter {0} with a tool of diameter {1}".format( diff --git a/src/Mod/Path/Path/Main/Gui/Sanity.py b/src/Mod/Path/Path/Main/Gui/Sanity.py index f668906c7e..8e7834634d 100644 --- a/src/Mod/Path/Path/Main/Gui/Sanity.py +++ b/src/Mod/Path/Path/Main/Gui/Sanity.py @@ -35,7 +35,9 @@ import Path import Path.Log from collections import Counter from datetime import datetime +import codecs import os +import time import webbrowser import subprocess from PySide.QtCore import QT_TRANSLATE_NOOP @@ -80,7 +82,7 @@ class CommandPathSanity: if "%M" in filepath: pref = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macro") M = pref.GetString("MacroPath", FreeCAD.getUserAppDataDir()) - filepath = filepath.replace("%M", M+ os.path.sep) + filepath = filepath.replace("%M", M + os.path.sep) # strip out all substitutions related to output splitting for elem in ["%O", "%W", "%T", "%t", "%S"]: @@ -130,16 +132,33 @@ class CommandPathSanity: def Activated(self): # if everything is ok, execute - self.squawkData = {"items": []} + if FreeCAD.GuiUp: + currentCamera = FreeCADGui.ActiveDocument.ActiveView.getCameraType() + if currentCamera != "Perspective": + FreeCADGui.SendMsgToActiveView("PerspectiveCamera") + FreeCADGui.updateGui() + time.sleep(4) + FreeCAD.Console.PrintLog( + "Path - Sanity - Changing to Perspective Camera temporarily\n" + ) + FreeCADGui.addIconPath(":/icons") + self.squawkData = {"items": []} obj = FreeCADGui.Selection.getSelectionEx()[0].Object self.outputpath = self.resolveOutputPath(obj) Path.Log.debug(f"outputstring: {self.outputpath}") data = self.__summarize(obj) html = self.__report(data) if html is not None: - FreeCAD.Console.PrintMessage("HTML report written to {}".format(html)) webbrowser.open(html) + if FreeCAD.GuiUp: + if currentCamera != "Perspective": + FreeCADGui.SendMsgToActiveView("OrthographicCamera") + FreeCADGui.updateGui() + time.sleep(0.5) + FreeCAD.Console.PrintLog( + "Path - Sanity - Changing back to Orthographic Camera\n" + ) def __makePicture(self, obj, imageName): """ @@ -187,6 +206,983 @@ class CommandPathSanity: """ generates an asciidoc file with the report information """ + Title = translate("Path_Sanity", "Setup Report for FreeCAD Job") + ToC = translate("Path_Sanity", "Table of Contents") + PartInfoHeading = translate("Path_Sanity", "Part Information") + RunSumHeading = translate("Path_Sanity", "Run Summary") + RoughStkHeading = translate("Path_Sanity", "Rough Stock") + ToolDataHeading = translate("Path_Sanity", "Tool Data") + OutputHeading = translate("Path_Sanity", "Output") + FixturesHeading = translate("Path_Sanity", "Fixtures") + SquawksHeading = translate("Path_Sanity", "Squawks") + + PartLabel = translate("Path_Sanity", "Base Object(s)") + SequenceLabel = translate("Path_Sanity", "Job Sequence") + DescriptionLabel = translate("Path_Sanity", "Job Description") + JobTypeLabel = translate("Path_Sanity", "Job Type") + CADLabel = translate("Path_Sanity", "CAD File Name") + LastSaveLabel = translate("Path_Sanity", "Last Save Date") + CustomerLabel = translate("Path_Sanity", "Customer") + DesignerLabel = translate("Path_Sanity", "Designer") + + b = data["baseData"] + d = data["designData"] + jobname = d["JobLabel"] + + opLabel = translate("Path_Sanity", "Operation") + zMinLabel = translate("Path_Sanity", "Minimum Z Height") + zMaxLabel = translate("Path_Sanity", "Maximum Z Height") + cycleTimeLabel = translate("Path_Sanity", "Cycle Time") + + coolantLabel = translate("Path_Sanity", "Coolant") + jobTotalLabel = translate("Path_Sanity", "TOTAL JOB") + d = data["toolData"] + toolLabel = translate("Path_Sanity", "Tool Number") + imageCounter = 1 + reportHtmlTemplate = """ + + + + + + Setup Report for FreeCAD Job: Path Special + + + +

+""" + reportHtmlTemplate += Title + ": " + jobname + reportHtmlTemplate += """ +

+

+
+ +

+

+ +""" + reportHtmlTemplate += ToC + reportHtmlTemplate += """ +

+
+
+

+ + +""" + reportHtmlTemplate += PartInfoHeading + reportHtmlTemplate += """ +

+ +

+
+
+ +

+

+ +""" + reportHtmlTemplate += PartInfoHeading + reportHtmlTemplate += """ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ """ + reportHtmlTemplate += PartLabel + reportHtmlTemplate += """ +

+
+ + + + """ + d = data["designData"] + for key, val in b["bases"].items(): + reportHtmlTemplate += """ + + + + """ + reportHtmlTemplate += """ +

+ """ + reportHtmlTemplate += key + reportHtmlTemplate += """ +

+

+ """ + reportHtmlTemplate += val + reportHtmlTemplate += """ +

+
+


+ +

+

+ Base Object(s)

+

+ """ + reportHtmlTemplate += SequenceLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["Sequence"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += JobTypeLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["JobType"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += DescriptionLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["JobDescription"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += CADLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["FileName"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += LastSaveLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["LastModifiedDate"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += CustomerLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["Customer"] + reportHtmlTemplate += """

+
""" + + descriptionLabel = translate("Path_Sanity", "Description") + manufLabel = translate("Path_Sanity", "Manufacturer") + partNumberLabel = translate("Path_Sanity", "Part Number") + urlLabel = translate("Path_Sanity", "URL") + inspectionNotesLabel = translate("Path_Sanity", "Inspection Notes") + opLabel = translate("Path_Sanity", "Operation") + tcLabel = translate("Path_Sanity", "Tool Controller") + feedLabel = translate("Path_Sanity", "Feed Rate") + speedLabel = translate("Path_Sanity", "Spindle Speed") + shapeLabel = translate("Path_Sanity", "Tool Shape") + diameterLabel = translate("Path_Sanity", "Tool Diameter") + + xDimLabel = translate("Path_Sanity", "X Size") + yDimLabel = translate("Path_Sanity", "Y Size") + zDimLabel = translate("Path_Sanity", "Z Size") + materialLabel = translate("Path_Sanity", "Material") + + offsetsLabel = translate("Path_Sanity", "Work Offsets") + orderByLabel = translate("Path_Sanity", "Order By") + datumLabel = translate("Path_Sanity", "Part Datum") + + gcodeFileLabel = translate("Path_Sanity", "G-code File") + lastpostLabel = translate("Path_Sanity", "Last Post Process Date") + stopsLabel = translate("Path_Sanity", "Stops") + programmerLabel = translate("Path_Sanity", "Programmer") + machineLabel = translate("Path_Sanity", "Machine") + postLabel = translate("Path_Sanity", "Postprocessor") + flagsLabel = translate("Path_Sanity", "Post Processor Flags") + fileSizeLabel = translate("Path_Sanity", "File Size (kB)") + lineCountLabel = translate("Path_Sanity", "Line Count") + + noteLabel = translate("Path_Sanity", "Note") + operatorLabel = translate("Path_Sanity", "Operator") + dateLabel = translate("Path_Sanity", "Date") + + d = data["runData"] + reportHtmlTemplate += """ +

+ +""" + reportHtmlTemplate += RunSumHeading + reportHtmlTemplate += """ +

""" + for i in d["items"]: + reportHtmlTemplate += """ + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ """ + reportHtmlTemplate += opLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += zMinLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += zMaxLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += coolantLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += cycleTimeLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += i["opName"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += i["minZ"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += i["maxZ"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += i["coolantMode"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += i["cycleTime"] + reportHtmlTemplate += """ +

+
""" + d = data["stockData"] + reportHtmlTemplate += """ +

+ +""" + reportHtmlTemplate += RoughStkHeading + reportHtmlTemplate += """ +

+ + + + + + + + + + + + + + + + + + + + + + + +

+ """ + reportHtmlTemplate += materialLabel + reportHtmlTemplate += """ +

+

+ """ + reportHtmlTemplate += d["material"] + "

" + reportHtmlTemplate += """ +

+ stock" + imageCounter += 1 + reportHtmlTemplate += """ +

+

+ """ + reportHtmlTemplate += xDimLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["xLen"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += yDimLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["yLen"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += zDimLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["zLen"] + reportHtmlTemplate += """

+
""" + d = data["toolData"] + reportHtmlTemplate += """ +

+ +""" + reportHtmlTemplate += ToolDataHeading + reportHtmlTemplate += """ +

""" + for key, value in d.items(): + reportHtmlTemplate += """ +

" + reportHtmlTemplate += """ + +""" + reportHtmlTemplate += toolLabel + ": T" + key + reportHtmlTemplate += """

""" + reportHtmlTemplate += """ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ """ + reportHtmlTemplate += descriptionLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += value["description"] + reportHtmlTemplate += """ +

+

+ 2" + ) + reportHtmlTemplate += """ +

+

+ """ + reportHtmlTemplate += manufLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += value["manufacturer"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += partNumberLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += value["partNumber"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += urlLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += value["url"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += shapeLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += value["shape"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += inspectionNotesLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += value["inspectionNotes"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += diameterLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += value["diameter"] + imageCounter += 1 + reportHtmlTemplate += """

+
""" + for o in value["ops"]: + reportHtmlTemplate += """ + + + + + + + + + + + + + + + + + + + + + +

+ """ + reportHtmlTemplate += opLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += tcLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += feedLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += speedLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += o["Operation"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += o["ToolController"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += o["Feed"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += o["Speed"] + reportHtmlTemplate += """

+
""" + d = data["outputData"] + reportHtmlTemplate += """ +

+ +""" + reportHtmlTemplate += OutputHeading + " (Gcode)" + reportHtmlTemplate += """ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ """ + reportHtmlTemplate += gcodeFileLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["lastgcodefile"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += lastpostLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["lastpostprocess"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += stopsLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["optionalstops"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += programmerLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["programmer"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += machineLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["machine"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += postLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["postprocessor"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += flagsLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["postprocessorFlags"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += fileSizeLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["filesize"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += lineCountLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["linecount"] + reportHtmlTemplate += """

+
""" + d = data["fixtureData"] + reportHtmlTemplate += """ +

+ +""" + reportHtmlTemplate += FixturesHeading + reportHtmlTemplate += """ +

+ + + + + + + + + + + + + + + + + +

+ """ + reportHtmlTemplate += offsetsLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["fixtures"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += orderByLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += d["orderBy"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += datumLabel + reportHtmlTemplate += """

+

+ origin t

+
""" + d = data["squawkData"] + TIPIcon = FreeCAD.getHomePath() + "Mod/Path/Path/Main/Gui/Sanity_Bulb.svg" + NOTEIcon = FreeCAD.getHomePath() + "Mod/Path/Path/Main/Gui/Sanity_Note.svg" + WARNINGIcon = ( + FreeCAD.getHomePath() + "Mod/Path/Path/Main/Gui/Sanity_Warning.svg" + ) + CAUTIONIcon = FreeCAD.getHomePath() + "Mod/Path/Path/Main/Gui/Sanity_Stop.svg" + + reportHtmlTemplate += """ +

+ +""" + reportHtmlTemplate += SquawksHeading + reportHtmlTemplate += """ +

+ + + + + + + + + + + + """ + for i in d["items"]: + reportHtmlTemplate += """ + + + + + """ + reportHtmlTemplate += """ +

+ """ + reportHtmlTemplate += noteLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += operatorLabel + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += dateLabel + reportHtmlTemplate += """

+
+ + + + +

+ """ + if str(i["squawkType"]) == "TIP": + reportHtmlTemplate += ( + "TIP" + + "

" + + str(i["Note"]) + ) + if str(i["squawkType"]) == "NOTE": + reportHtmlTemplate += ( + "NOTE" + + "

" + + str(i["Note"]) + ) + if str(i["squawkType"]) == "WARNING": + reportHtmlTemplate += ( + "WARNING" + + "

" + + str(i["Note"]) + ) + if str(i["squawkType"]) == "CAUTION": + reportHtmlTemplate += ( + "CAUTION" + + "

" + + str(i["Note"]) + ) + imageCounter += 1 + reportHtmlTemplate += """

+
+

+ """ + reportHtmlTemplate += i["Operator"] + reportHtmlTemplate += """

+

+ """ + reportHtmlTemplate += i["Date"] + reportHtmlTemplate += """

+
+


+ +

+ + +""" reportTemplate = """ = Setup Report for FreeCAD Job: {jobname} @@ -470,23 +1466,18 @@ class CommandPathSanity: reportraw = self.outputpath + data["outputData"]["outputfilename"] + ".asciidoc" reporthtml = self.outputpath + data["outputData"]["outputfilename"] + ".html" - with open(reportraw, "w") as fd: + # Python 3.11 aware + with codecs.open(reportraw, encoding="utf-8", mode="w") as fd: fd.write(report) fd.close() FreeCAD.Console.PrintMessage( "asciidoc file written to {}\n".format(reportraw) ) - try: - result = subprocess.run(["asciidoctor", reportraw, "-o", reporthtml]) - if str(result) == "32512": - msg = "asciidoctor not found. html cannot be generated." - QtGui.QMessageBox.information(None, "Path Sanity", msg) - FreeCAD.Console.PrintMessage(msg) - reporthtml = None - - except Exception as e: - FreeCAD.Console.PrintError(e) + with codecs.open(reporthtml, encoding="utf-8", mode="w") as fd: + fd.write(reportHtmlTemplate) + fd.close() + FreeCAD.Console.PrintMessage("html file written to {}\n".format(reporthtml)) return reporthtml @@ -594,10 +1585,11 @@ class CommandPathSanity: if not hasattr(TC.Tool, "BitBody"): self.squawk( "PathSanity", - "Tool number {} is a legacy tool. Legacy tools not \ - supported by Path-Sanity".format( - TC.ToolNumber - ), + translate( + "Path_Sanity", + "Tool number {} is a legacy tool. Legacy tools not \ + supported by Path-Sanity", + ).format(TC.ToolNumber), squawkType="WARNING", ) continue # skip old-style tools @@ -606,7 +1598,9 @@ class CommandPathSanity: if bitshape not in ["", TC.Tool.BitShape]: self.squawk( "PathSanity", - "Tool number {} used by multiple tools".format(TC.ToolNumber), + translate( + "Path_Sanity", "Tool number {} used by multiple tools" + ).format(TC.ToolNumber), squawkType="CAUTION", ) tooldata["bitShape"] = TC.Tool.BitShape @@ -632,7 +1626,9 @@ class CommandPathSanity: if TC.SpindleSpeed == 0.0: self.squawk( "PathSanity", - "Tool Controller '{}' has no spindlespeed".format(TC.Label), + translate( + "Path_Sanity", "Tool Controller '{}' has no spindlespeed" + ).format(TC.Label), squawkType="WARNING", ) @@ -658,7 +1654,9 @@ class CommandPathSanity: tooldata.setdefault("ops", []) self.squawk( "PathSanity", - "Tool Controller '{}' is not used".format(TC.Label), + translate( + "Path_Sanity", "Tool Controller '{}' is not used" + ).format(TC.Label), squawkType="WARNING", ) @@ -688,7 +1686,6 @@ class CommandPathSanity: data["items"] = [] for op in obj.Operations.Group: - oplabel = op.Label ctime = op.CycleTime if hasattr(op, "CycleTime") else 0.0 cool = op.CoolantMode if hasattr(op, "CoolantMode") else "N/A" @@ -754,7 +1751,7 @@ class CommandPathSanity: if data["material"] == "Not Specified": self.squawk( "PathSanity", - "Consider Specifying the Stock Material", + translate("Path_Sanity", "Consider Specifying the Stock Material"), squawkType="TIP", ) @@ -843,9 +1840,14 @@ class CommandPathSanity: if obj.LastPostProcessOutput == "": data["filesize"] = str(0.0) data["linecount"] = str(0) - self.squawk("PathSanity", "The Job has not been post-processed") + self.squawk( + "PathSanity", + translate("Path_Sanity", "The Job has not been post-processed"), + ) else: - data["filesize"] = str(os.path.getsize(obj.LastPostProcessOutput)/1000) + data["filesize"] = str( + os.path.getsize(obj.LastPostProcessOutput) / 1000 + ) data["linecount"] = str( sum(1 for line in open(obj.LastPostProcessOutput)) ) diff --git a/src/Mod/Path/Path/Main/Gui/Sanity_Bulb.svg b/src/Mod/Path/Path/Main/Gui/Sanity_Bulb.svg new file mode 100644 index 0000000000..91b398732d --- /dev/null +++ b/src/Mod/Path/Path/Main/Gui/Sanity_Bulb.svg @@ -0,0 +1,637 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + Lapo Calamandrei + + + + + + media + stop + playback + video + music + + + + + Jakub Steiner + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Path/Path/Main/Gui/Sanity_Caution.svg b/src/Mod/Path/Path/Main/Gui/Sanity_Caution.svg new file mode 100644 index 0000000000..c649464d32 --- /dev/null +++ b/src/Mod/Path/Path/Main/Gui/Sanity_Caution.svg @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + image/svg+xml + + Path_Stop + 2015-07-04 + http://www.freecad.org/wiki/index.php?title=Artwork + + + FreeCAD + + + FreeCAD/src/Mod/Path/Gui/Resources/icons/Path_Stop.svg + + + FreeCAD LGPL2+ + + + https://www.gnu.org/copyleft/lesser.html + + + [agryson] Alexander Gryson + + + + + + + + + + + + + diff --git a/src/Mod/Path/Path/Main/Gui/Sanity_Note.svg b/src/Mod/Path/Path/Main/Gui/Sanity_Note.svg new file mode 100644 index 0000000000..41944e532f --- /dev/null +++ b/src/Mod/Path/Path/Main/Gui/Sanity_Note.svg @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + 2005-10-15 + + + Andreas Nilsson + + + + + edit + copy + + + + + + Jakub Steiner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Mod/Path/Path/Main/Gui/Sanity_Warning.svg b/src/Mod/Path/Path/Main/Gui/Sanity_Warning.svg new file mode 100644 index 0000000000..866c61a732 --- /dev/null +++ b/src/Mod/Path/Path/Main/Gui/Sanity_Warning.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/src/Mod/Path/PathTests/TestPathHelixGenerator.py b/src/Mod/Path/PathTests/TestPathHelixGenerator.py index 274ea84c89..4444f2a966 100644 --- a/src/Mod/Path/PathTests/TestPathHelixGenerator.py +++ b/src/Mod/Path/PathTests/TestPathHelixGenerator.py @@ -109,17 +109,31 @@ G0 X5.000000 Y5.000000 Z18.000000G0 Z20.000000" args["tool_diameter"] = "5" self.assertRaises(TypeError, generator.generate, **args) + # require tool fit 2: hole diameter not greater than tool diam + # with zero inner radius args = _resetArgs() - # require tool fit 1: radius diff less than tool diam - args["hole_radius"] = 10.0 - args["inner_radius"] = 6.0 + args["hole_radius"] = 2.0 + args["inner_radius"] = 0.0 args["tool_diameter"] = 5.0 self.assertRaises(ValueError, generator.generate, **args) - # require tool fit 2: hole diameter not greater than tool diam - # with zero inner radius - args["hole_radius"] = 2.0 - args["inner_radius"] = 0.0 + # require tool fit: actual hole diameter after taking Extra Offset into account >= tool diameter + # 1. Extra Offset just small enough to leave room for tool should not raise an error + args = _resetArgs() + designed_hole_diameter = 10.0 + extra_offset = 2.49 + args["hole_radius"] = designed_hole_diameter / 2 - extra_offset + args["inner_radius"] = extra_offset + args["tool_diameter"] = 5.0 + result = generator.generate(**args) + self.assertTrue(result) + + # 2. Extra Offset does not leave room for tool, should raise an error + args = _resetArgs() + designed_hole_diameter = 10.0 + extra_offset = 2.50 + args["hole_radius"] = designed_hole_diameter / 2 - extra_offset + args["inner_radius"] = extra_offset args["tool_diameter"] = 5.0 self.assertRaises(ValueError, generator.generate, **args) diff --git a/src/Mod/Plot/Plot.py b/src/Mod/Plot/Plot.py index a57d501814..28b84b818c 100644 --- a/src/Mod/Plot/Plot.py +++ b/src/Mod/Plot/Plot.py @@ -1,23 +1,23 @@ -#*************************************************************************** -#* Copyright (c) 2011, 2012 Jose Luis Cercos Pita * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2011, 2012 Jose Luis Cercos Pita * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import FreeCAD @@ -28,11 +28,12 @@ import sys try: import matplotlib - matplotlib.use('Qt5Agg') + + matplotlib.use("Qt5Agg") # Force matplotlib to use PySide backend by temporarily unloading PyQt - if 'PyQt5.QtCore' in sys.modules: - del sys.modules['PyQt5.QtCore'] + if "PyQt5.QtCore" in sys.modules: + del sys.modules["PyQt5.QtCore"] import matplotlib.pyplot as plt import PyQt5.QtCore else: @@ -43,12 +44,14 @@ try: from matplotlib.figure import Figure except ImportError: - FreeCAD.Console.PrintWarning("The 'matplotlib' Python package was not found. Plot module cannot be loaded\n") + FreeCAD.Console.PrintWarning( + "The 'matplotlib' Python package was not found. Plot module cannot be loaded\n" + ) raise ImportError("matplotlib not installed") def getMainWindow(): - """ Return the FreeCAD main window. """ + """Return the FreeCAD main window.""" toplevel = PySide.QtGui.QApplication.topLevelWidgets() for i in toplevel: if i.metaObject().className() == "Gui::MainWindow": @@ -57,7 +60,7 @@ def getMainWindow(): def getMdiArea(): - """ Return FreeCAD MdiArea. """ + """Return FreeCAD MdiArea.""" mw = getMainWindow() if not mw: return None @@ -69,7 +72,7 @@ def getMdiArea(): def getPlot(): - """ Return the selected Plot document if exist. """ + """Return the selected Plot document if exist.""" # Get active tab mdi = getMdiArea() if not mdi: @@ -85,7 +88,7 @@ def getPlot(): def closePlot(): - """ closePlot(): Close the active plot window. """ + """closePlot(): Close the active plot window.""" # Get active tab mdi = getMdiArea() if not mdi: @@ -193,7 +196,7 @@ def legend(status=True, pos=None, fontsize=None): l = axes.legend(handles, names, bbox_to_anchor=pos) plt.legPos = pos else: - l = axes.legend(handles, names, loc='best') + l = axes.legend(handles, names, loc="best") # Update canvas in order to compute legend data plt.canvas.draw() # Get resultant position @@ -204,7 +207,8 @@ def legend(status=True, pos=None, fontsize=None): fl = l.get_frame() plt.legPos = ( (fl._x + fl._width - fax.x0) / fax.width, - (fl._y + fl._height - fax.y0) / fax.height) + (fl._y + fl._height - fax.y0) / fax.height, + ) # Set fontsize for t in l.get_texts(): t.set_fontsize(plt.legSiz) @@ -269,7 +273,7 @@ def ylabel(string): def axesList(): - """Return the plot axes sets list. """ + """Return the plot axes sets list.""" plt = getPlot() if not plt: return [] @@ -284,7 +288,7 @@ def axes(): return plt.axes -def addNewAxes(rect=None, frameon=True, patchcolor='none'): +def addNewAxes(rect=None, frameon=True, patchcolor="none"): """Add new axes to plot, setting it as the active one. Keyword arguments: @@ -299,10 +303,10 @@ def addNewAxes(rect=None, frameon=True, patchcolor='none'): if rect is None: rect = plt.axes.get_position() ax = fig.add_axes(rect, frameon=frameon) - ax.xaxis.set_ticks_position('bottom') - ax.spines['top'].set_color('none') - ax.yaxis.set_ticks_position('left') - ax.spines['right'].set_color('none') + ax.xaxis.set_ticks_position("bottom") + ax.spines["top"].set_color("none") + ax.yaxis.set_ticks_position("left") + ax.spines["right"].set_color("none") ax.patch.set_facecolor(patchcolor) plt.axesList.append(ax) plt.setActiveAxes(-1) @@ -338,8 +342,7 @@ def save(path, figsize=None, dpi=None): def addNavigationToolbar(): - """Add the matplotlib QT navigation toolbar to the plot. - """ + """Add the matplotlib QT navigation toolbar to the plot.""" plt = getPlot() if not plt: return @@ -353,8 +356,7 @@ def addNavigationToolbar(): def delNavigationToolbar(): - """Remove the matplotlib QT navigation toolbar from the plot. - """ + """Remove the matplotlib QT navigation toolbar from the plot.""" plt = getPlot() if not plt: return @@ -369,7 +371,7 @@ def delNavigationToolbar(): plt.mpl_toolbar = None -class Line(): +class Line: def __init__(self, axes, x, y, name): """Construct a new plot serie. @@ -384,7 +386,7 @@ class Line(): self.y = y self.name = name self.lid = len(axes.lines) - self.line, = axes.plot(x, y) + (self.line,) = axes.plot(x, y) def setp(self, prop, value): """Change a line property value. @@ -405,10 +407,7 @@ class Line(): class Plot(PySide.QtGui.QWidget): - def __init__(self, - winTitle="plot", - parent=None, - flags=PySide.QtCore.Qt.WindowFlags(0)): + def __init__(self, winTitle="plot", parent=None, flags=PySide.QtCore.Qt.WindowFlags(0)): """Construct a new plot widget. Keyword arguments: @@ -425,10 +424,10 @@ class Plot(PySide.QtGui.QWidget): # Get axes self.axes = self.fig.add_subplot(111) self.axesList = [self.axes] - self.axes.xaxis.set_ticks_position('bottom') - self.axes.spines['top'].set_color('none') - self.axes.yaxis.set_ticks_position('left') - self.axes.spines['right'].set_color('none') + self.axes.xaxis.set_ticks_position("bottom") + self.axes.spines["top"].set_color("none") + self.axes.yaxis.set_ticks_position("left") + self.axes.spines["right"].set_color("none") # Add the navigation toolbar by default self.mpl_toolbar = NavigationToolbar(self.canvas, self) # Setup layout @@ -451,7 +450,7 @@ class Plot(PySide.QtGui.QWidget): Keyword arguments: x -- X values y -- Y values - name -- Serie name (for legend). """ + name -- Serie name (for legend).""" l = Line(self.axes, x, y, name) self.series.append(l) # Update window diff --git a/src/Mod/Plot/plot.dox b/src/Mod/Plot/plot.dox index 3deb86cf09..8fe66d6b14 100644 --- a/src/Mod/Plot/plot.dox +++ b/src/Mod/Plot/plot.dox @@ -2,4 +2,3 @@ * \ingroup PYTHONWORKBENCHES * \brief Utilities and tools to draw curves diagrams */ - diff --git a/src/Mod/Points/App/AppPoints.cpp b/src/Mod/Points/App/AppPoints.cpp index 38e8051678..fbdc5c8a57 100644 --- a/src/Mod/Points/App/AppPoints.cpp +++ b/src/Mod/Points/App/AppPoints.cpp @@ -32,13 +32,15 @@ #include "Structured.h" -namespace Points { - extern PyObject* initModule(); +namespace Points +{ +extern PyObject* initModule(); } /* Python entry */ PyMOD_INIT_FUNC(Points) { + // clang-format off PyObject* pointsModule = Points::initModule(); Base::Console().Log("Loading Points module... done\n"); @@ -46,17 +48,18 @@ PyMOD_INIT_FUNC(Points) Base::Interpreter().addType(&Points::PointsPy::Type, pointsModule, "Points"); // add properties - Points::PropertyGreyValue ::init(); - Points::PropertyGreyValueList ::init(); - Points::PropertyNormalList ::init(); - Points::PropertyCurvatureList ::init(); - Points::PropertyPointKernel ::init(); + Points::PropertyGreyValue ::init(); + Points::PropertyGreyValueList ::init(); + Points::PropertyNormalList ::init(); + Points::PropertyCurvatureList ::init(); + Points::PropertyPointKernel ::init(); // add data types - Points::Feature ::init(); - Points::Structured ::init(); - Points::FeatureCustom ::init(); - Points::StructuredCustom ::init(); - Points::FeaturePython ::init(); + Points::Feature ::init(); + Points::Structured ::init(); + Points::FeatureCustom ::init(); + Points::StructuredCustom ::init(); + Points::FeaturePython ::init(); PyMOD_Return(pointsModule); + // clang-format on } diff --git a/src/Mod/Points/App/AppPointsPy.cpp b/src/Mod/Points/App/AppPointsPy.cpp index 3ab0473d7c..c446806219 100644 --- a/src/Mod/Points/App/AppPointsPy.cpp +++ b/src/Mod/Points/App/AppPointsPy.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -31,8 +31,8 @@ #include #include #include -#include #include +#include #include "Points.h" #include "PointsAlgos.h" @@ -41,29 +41,32 @@ #include "Structured.h" -namespace Points { -class Module : public Py::ExtensionModule +namespace Points +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Points") + Module() + : Py::ExtensionModule("Points") { - add_varargs_method("open", &Module::open - ); - add_varargs_method("insert", &Module::importer - ); - add_varargs_method("export", &Module::exporter - ); - add_varargs_method("show", &Module::show, - "show(points,[string]) -- Add the points to the active document or create one if no document exists." - ); - initialize("This module is the Points module."); // register with Python + add_varargs_method("open", &Module::open); + add_varargs_method("insert", &Module::importer); + add_varargs_method("export", &Module::exporter); + add_varargs_method("show", + &Module::show, + "show(points,[string]) -- Add the points to the active document or " + "create one if no document exists."); + initialize("This module is the Points module."); // register with Python } private: std::tuple readE57Settings() const { - Base::Reference hGrp = App::GetApplication().GetUserParameter() - .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Points/E57"); + Base::Reference hGrp = App::GetApplication() + .GetUserParameter() + .GetGroup("BaseApp") + ->GetGroup("Preferences") + ->GetGroup("Mod/Points/E57"); bool useColor = hGrp->GetBool("UseColor", true); bool checkState = hGrp->GetBool("CheckInvalidState", true); double minDistance = hGrp->GetFloat("MinDistance", -1.); @@ -73,8 +76,9 @@ private: Py::Object open(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -83,8 +87,9 @@ private: Base::FileInfo file(EncodedName.c_str()); // extract ending - if (file.extension().empty()) + if (file.extension().empty()) { throw Py::RuntimeError("No file extension"); + } std::unique_ptr reader; if (file.hasExtension("asc")) { @@ -92,7 +97,9 @@ private: } else if (file.hasExtension("e57")) { auto setting = readE57Settings(); - reader = std::make_unique(std::get<0>(setting), std::get<1>(setting), std::get<2>(setting)); + reader = std::make_unique(std::get<0>(setting), + std::get<1>(setting), + std::get<2>(setting)); } else if (file.hasExtension("ply")) { reader = std::make_unique(); @@ -114,13 +121,13 @@ private: if (reader->isStructured()) { pcFeature = new Points::StructuredCustom(); - App::PropertyInteger* width = static_cast - (pcFeature->getPropertyByName("Width")); + App::PropertyInteger* width = + static_cast(pcFeature->getPropertyByName("Width")); if (width) { width->setValue(reader->getWidth()); } - App::PropertyInteger* height = static_cast - (pcFeature->getPropertyByName("Height")); + App::PropertyInteger* height = + static_cast(pcFeature->getPropertyByName("Height")); if (height) { height->setValue(reader->getHeight()); } @@ -132,24 +139,26 @@ private: pcFeature->Points.setValue(reader->getPoints()); // add gray values if (reader->hasIntensities()) { - Points::PropertyGreyValueList* prop = static_cast - (pcFeature->addDynamicProperty("Points::PropertyGreyValueList", "Intensity")); + Points::PropertyGreyValueList* prop = + static_cast( + pcFeature->addDynamicProperty("Points::PropertyGreyValueList", + "Intensity")); if (prop) { prop->setValues(reader->getIntensities()); } } // add colors if (reader->hasColors()) { - App::PropertyColorList* prop = static_cast - (pcFeature->addDynamicProperty("App::PropertyColorList", "Color")); + App::PropertyColorList* prop = static_cast( + pcFeature->addDynamicProperty("App::PropertyColorList", "Color")); if (prop) { prop->setValues(reader->getColors()); } } // add normals if (reader->hasNormals()) { - Points::PropertyNormalList* prop = static_cast - (pcFeature->addDynamicProperty("Points::PropertyNormalList", "Normal")); + Points::PropertyNormalList* prop = static_cast( + pcFeature->addDynamicProperty("Points::PropertyNormalList", "Normal")); if (prop) { prop->setValues(reader->getNormals()); } @@ -189,8 +198,9 @@ private: { char* Name; const char* DocName; - if (!PyArg_ParseTuple(args.ptr(), "ets", "utf-8", &Name, &DocName)) + if (!PyArg_ParseTuple(args.ptr(), "ets", "utf-8", &Name, &DocName)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -199,8 +209,9 @@ private: Base::FileInfo file(EncodedName.c_str()); // extract ending - if (file.extension().empty()) + if (file.extension().empty()) { throw Py::RuntimeError("No file extension"); + } std::unique_ptr reader; if (file.hasExtension("asc")) { @@ -208,7 +219,9 @@ private: } else if (file.hasExtension("e57")) { auto setting = readE57Settings(); - reader = std::make_unique(std::get<0>(setting), std::get<1>(setting), std::get<2>(setting)); + reader = std::make_unique(std::get<0>(setting), + std::get<1>(setting), + std::get<2>(setting)); } else if (file.hasExtension("ply")) { reader = std::make_unique(); @@ -233,13 +246,13 @@ private: if (reader->isStructured()) { pcFeature = new Points::StructuredCustom(); - App::PropertyInteger* width = static_cast - (pcFeature->getPropertyByName("Width")); + App::PropertyInteger* width = + static_cast(pcFeature->getPropertyByName("Width")); if (width) { width->setValue(reader->getWidth()); } - App::PropertyInteger* height = static_cast - (pcFeature->getPropertyByName("Height")); + App::PropertyInteger* height = + static_cast(pcFeature->getPropertyByName("Height")); if (height) { height->setValue(reader->getHeight()); } @@ -251,24 +264,26 @@ private: pcFeature->Points.setValue(reader->getPoints()); // add gray values if (reader->hasIntensities()) { - Points::PropertyGreyValueList* prop = static_cast - (pcFeature->addDynamicProperty("Points::PropertyGreyValueList", "Intensity")); + Points::PropertyGreyValueList* prop = + static_cast( + pcFeature->addDynamicProperty("Points::PropertyGreyValueList", + "Intensity")); if (prop) { prop->setValues(reader->getIntensities()); } } // add colors if (reader->hasColors()) { - App::PropertyColorList* prop = static_cast - (pcFeature->addDynamicProperty("App::PropertyColorList", "Color")); + App::PropertyColorList* prop = static_cast( + pcFeature->addDynamicProperty("App::PropertyColorList", "Color")); if (prop) { prop->setValues(reader->getColors()); } } // add normals if (reader->hasNormals()) { - Points::PropertyNormalList* prop = static_cast - (pcFeature->addDynamicProperty("Points::PropertyNormalList", "Normal")); + Points::PropertyNormalList* prop = static_cast( + pcFeature->addDynamicProperty("Points::PropertyNormalList", "Normal")); if (prop) { prop->setValues(reader->getNormals()); } @@ -280,8 +295,8 @@ private: pcFeature->purgeTouched(); } else { - Points::Feature* pcFeature = static_cast - (pcDoc->addObject("Points::Feature", file.fileNamePure().c_str())); + Points::Feature* pcFeature = static_cast( + pcDoc->addObject("Points::Feature", file.fileNamePure().c_str())); pcFeature->Points.setValue(reader->getPoints()); pcDoc->recomputeFeature(pcFeature); pcFeature->purgeTouched(); @@ -299,8 +314,9 @@ private: PyObject* object; char* Name; - if (!PyArg_ParseTuple(args.ptr(), "Oet", &object, "utf-8", &Name)) + if (!PyArg_ParseTuple(args.ptr(), "Oet", &object, "utf-8", &Name)) { throw Py::Exception(); + } std::string encodedName = std::string(Name); PyMem_Free(Name); @@ -308,15 +324,17 @@ private: Base::FileInfo file(encodedName); // extract ending - if (file.extension().empty()) + if (file.extension().empty()) { throw Py::RuntimeError("No file extension"); + } Py::Sequence list(object); Base::Type pointsId = Base::Type::fromName("Points::Feature"); for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* item = (*it).ptr(); if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) { - App::DocumentObject* obj = static_cast(item)->getDocumentObjectPtr(); + App::DocumentObject* obj = + static_cast(item)->getDocumentObjectPtr(); if (obj->getTypeId().isDerivedFrom(pointsId)) { // get relative placement Points::Feature* fea = static_cast(obj); @@ -338,31 +356,32 @@ private: } // get additional properties if there - App::PropertyInteger* width = dynamic_cast - (fea->getPropertyByName("Width")); + App::PropertyInteger* width = + dynamic_cast(fea->getPropertyByName("Width")); if (width) { writer->setWidth(width->getValue()); } - App::PropertyInteger* height = dynamic_cast - (fea->getPropertyByName("Height")); + App::PropertyInteger* height = + dynamic_cast(fea->getPropertyByName("Height")); if (height) { writer->setHeight(height->getValue()); } // get gray values - Points::PropertyGreyValueList* grey = dynamic_cast - (fea->getPropertyByName("Intensity")); + Points::PropertyGreyValueList* grey = + dynamic_cast( + fea->getPropertyByName("Intensity")); if (grey) { writer->setIntensities(grey->getValues()); } // get colors - App::PropertyColorList* col = dynamic_cast - (fea->getPropertyByName("Color")); + App::PropertyColorList* col = + dynamic_cast(fea->getPropertyByName("Color")); if (col) { writer->setColors(col->getValues()); } // get normals - Points::PropertyNormalList* nor = dynamic_cast - (fea->getPropertyByName("Normal")); + Points::PropertyNormalList* nor = + dynamic_cast(fea->getPropertyByName("Normal")); if (nor) { writer->setNormals(nor->getValues()); } @@ -373,7 +392,8 @@ private: break; } else { - Base::Console().Message("'%s' is not a point object, export will be ignored.\n", obj->Label.getValue()); + Base::Console().Message("'%s' is not a point object, export will be ignored.\n", + obj->Label.getValue()); } } } @@ -385,18 +405,21 @@ private: { PyObject* pcObj; char* name = "Points"; - if (!PyArg_ParseTuple(args.ptr(), "O!|s", &(PointsPy::Type), &pcObj, &name)) + if (!PyArg_ParseTuple(args.ptr(), "O!|s", &(PointsPy::Type), &pcObj, &name)) { throw Py::Exception(); + } try { App::Document* pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + if (!pcDoc) { pcDoc = App::GetApplication().newDocument(); + } PointsPy* pPoints = static_cast(pcObj); - Points::Feature* pcFeature = static_cast(pcDoc->addObject("Points::Feature", name)); + Points::Feature* pcFeature = + static_cast(pcDoc->addObject("Points::Feature", name)); // copy the data pcFeature->Points.setValue(*(pPoints->getPointKernelPtr())); - return Py::asObject(pcFeature->getPyObject()); + return Py::asObject(pcFeature->getPyObject()); } catch (const Base::Exception& e) { throw Py::RuntimeError(e.what()); @@ -411,4 +434,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Points +} // namespace Points diff --git a/src/Mod/Points/App/Points.cpp b/src/Mod/Points/App/Points.cpp index 2ad629226e..731dedb295 100644 --- a/src/Mod/Points/App/Points.cpp +++ b/src/Mod/Points/App/Points.cpp @@ -22,10 +22,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -37,7 +37,7 @@ #ifdef _MSC_VER -# include +#include #endif using namespace Points; @@ -46,16 +46,14 @@ using namespace std; TYPESYSTEM_SOURCE(Points::PointKernel, Data::ComplexGeoData) PointKernel::PointKernel(const PointKernel& pts) - : _Mtrx(pts._Mtrx) - , _Points(pts._Points) -{ - -} + : _Mtrx(pts._Mtrx) + , _Points(pts._Points) +{} std::vector PointKernel::getElementTypes() const { std::vector temp; - //temp.push_back("Segment"); + // temp.push_back("Segment"); return temp; } @@ -67,24 +65,25 @@ unsigned long PointKernel::countSubElements(const char* /*Type*/) const Data::Segment* PointKernel::getSubElement(const char* /*Type*/, unsigned long /*n*/) const { - //unsigned long i = 1; + // unsigned long i = 1; - //if (strcmp(Type,"Segment") == 0) { - // // not implemented - // assert(0); - // return 0; - //} + // if (strcmp(Type,"Segment") == 0) { + // // not implemented + // assert(0); + // return 0; + // } return nullptr; } -void PointKernel::transformGeometry(const Base::Matrix4D &rclMat) +void PointKernel::transformGeometry(const Base::Matrix4D& rclMat) { std::vector& kernel = getBasicPoints(); #ifdef _MSC_VER - // Win32-only at the moment since ppl.h is a Microsoft library. Points is not using Qt so we cannot use QtConcurrent - // We could also rewrite Points to leverage SIMD instructions - // Other option: openMP. But with VC2013 results in high CPU usage even after computation (busy-waits for >100ms) + // Win32-only at the moment since ppl.h is a Microsoft library. Points is not using Qt so we + // cannot use QtConcurrent We could also rewrite Points to leverage SIMD instructions Other + // option: openMP. But with VC2013 results in high CPU usage even after computation (busy-waits + // for >100ms) Concurrency::parallel_for_each(kernel.begin(), kernel.end(), [rclMat](value_type& value) { value = rclMat * value; }); @@ -95,31 +94,34 @@ void PointKernel::transformGeometry(const Base::Matrix4D &rclMat) #endif } -Base::BoundBox3d PointKernel::getBoundBox()const +Base::BoundBox3d PointKernel::getBoundBox() const { Base::BoundBox3d bnd; #ifdef _MSC_VER // Thread-local bounding boxes Concurrency::combinable bbs; - // Cannot use a const_point_iterator here as it is *not* a proper iterator (fails the for_each template) - Concurrency::parallel_for_each(_Points.begin(), _Points.end(), [this, &bbs](const value_type& value) { - Base::Vector3d vertd(value.x, value.y, value.z); - bbs.local().Add(this->_Mtrx * vertd); - }); + // Cannot use a const_point_iterator here as it is *not* a proper iterator (fails the for_each + // template) + Concurrency::parallel_for_each(_Points.begin(), + _Points.end(), + [this, &bbs](const value_type& value) { + Base::Vector3d vertd(value.x, value.y, value.z); + bbs.local().Add(this->_Mtrx * vertd); + }); // Combine each thread-local bounding box in the final bounding box bbs.combine_each([&bnd](const Base::BoundBox3d& lbb) { bnd.Add(lbb); }); #else - for (const auto & it : *this) { + for (const auto& it : *this) { bnd.Add(it); } #endif return bnd; } -void PointKernel::operator = (const PointKernel& Kernel) +void PointKernel::operator=(const PointKernel& Kernel) { if (this != &Kernel) { // copy the mesh structure @@ -128,7 +130,7 @@ void PointKernel::operator = (const PointKernel& Kernel) } } -unsigned int PointKernel::getMemSize () const +unsigned int PointKernel::getMemSize() const { return _Points.size() * sizeof(value_type); } @@ -136,10 +138,8 @@ unsigned int PointKernel::getMemSize () const PointKernel::size_type PointKernel::countValid() const { size_type num = 0; - for (const auto & it : *this) { - if (!(boost::math::isnan(it.x) || - boost::math::isnan(it.y) || - boost::math::isnan(it.z))) { + for (const auto& it : *this) { + if (!(boost::math::isnan(it.x) || boost::math::isnan(it.y) || boost::math::isnan(it.z))) { num++; } } @@ -150,29 +150,26 @@ std::vector PointKernel::getValidPoints() const { std::vector valid; valid.reserve(countValid()); - for (const auto & it : *this) { - if (!(boost::math::isnan(it.x) || - boost::math::isnan(it.y) || - boost::math::isnan(it.z))) { - valid.emplace_back( - static_cast(it.x), - static_cast(it.y), - static_cast(it.z)); + for (const auto& it : *this) { + if (!(boost::math::isnan(it.x) || boost::math::isnan(it.y) || boost::math::isnan(it.z))) { + valid.emplace_back(static_cast(it.x), + static_cast(it.y), + static_cast(it.z)); } } return valid; } -void PointKernel::Save (Base::Writer &writer) const +void PointKernel::Save(Base::Writer& writer) const { if (!writer.isForceXML()) { - writer.Stream() << writer.ind() - << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PointKernel::SaveDocFile (Base::Writer &writer) const +void PointKernel::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); uint32_t uCt = (uint32_t)size(); @@ -183,35 +180,35 @@ void PointKernel::SaveDocFile (Base::Writer &writer) const } } -void PointKernel::Restore(Base::XMLReader &reader) +void PointKernel::Restore(Base::XMLReader& reader) { clear(); reader.readElement("Points"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } if (reader.DocumentSchema > 3) { - std::string Matrix (reader.getAttribute("mtrx") ); + std::string Matrix(reader.getAttribute("mtrx")); _Mtrx.fromString(Matrix); } } -void PointKernel::RestoreDocFile(Base::Reader &reader) +void PointKernel::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); uint32_t uCt = 0; str >> uCt; _Points.resize(uCt); - for (unsigned long i=0; i < uCt; i++) { + for (unsigned long i = 0; i < uCt; i++) { float x; float y; float z; str >> x >> y >> z; - _Points[i].Set(x,y,z); + _Points[i].Set(x, y, z); } } @@ -223,7 +220,7 @@ void PointKernel::save(const char* file) const void PointKernel::load(const char* file) { - PointsAlgos::Load(*this,file); + PointsAlgos::Load(*this, file); } void PointKernel::save(std::ostream& out) const @@ -234,38 +231,39 @@ void PointKernel::save(std::ostream& out) const } } -void PointKernel::getPoints(std::vector &Points, - std::vector &/*Normals*/, - double /*Accuracy*/, uint16_t /*flags*/) const +void PointKernel::getPoints(std::vector& Points, + std::vector& /*Normals*/, + double /*Accuracy*/, + uint16_t /*flags*/) const { unsigned long ctpoints = _Points.size(); Points.reserve(ctpoints); - for (unsigned long i=0; igetPoint(i)); } } // ---------------------------------------------------------------------------- -PointKernel::const_point_iterator::const_point_iterator -(const PointKernel* kernel, std::vector::const_iterator index) - : _kernel(kernel), _p_it(index) +PointKernel::const_point_iterator::const_point_iterator( + const PointKernel* kernel, + std::vector::const_iterator index) + : _kernel(kernel) + , _p_it(index) { - if(_p_it != kernel->_Points.end()) - { + if (_p_it != kernel->_Points.end()) { value_type vertd(_p_it->x, _p_it->y, _p_it->z); this->_point = _kernel->_Mtrx * vertd; } } -PointKernel::const_point_iterator::const_point_iterator -(const PointKernel::const_point_iterator& fi) = default; +PointKernel::const_point_iterator::const_point_iterator( + const PointKernel::const_point_iterator& fi) = default; PointKernel::const_point_iterator::~const_point_iterator() = default; PointKernel::const_point_iterator& -PointKernel::const_point_iterator::operator= -(const PointKernel::const_point_iterator& pi) = default; +PointKernel::const_point_iterator::operator=(const PointKernel::const_point_iterator& pi) = default; void PointKernel::const_point_iterator::dereference() { @@ -273,54 +271,50 @@ void PointKernel::const_point_iterator::dereference() this->_point = _kernel->_Mtrx * vertd; } -const PointKernel::const_point_iterator::value_type& -PointKernel::const_point_iterator::operator*() +const PointKernel::const_point_iterator::value_type& PointKernel::const_point_iterator::operator*() { dereference(); return this->_point; } -const PointKernel::const_point_iterator::value_type* -PointKernel::const_point_iterator::operator->() +const PointKernel::const_point_iterator::value_type* PointKernel::const_point_iterator::operator->() { dereference(); return &(this->_point); } -bool PointKernel::const_point_iterator::operator==(const PointKernel::const_point_iterator& pi) const +bool PointKernel::const_point_iterator::operator==( + const PointKernel::const_point_iterator& pi) const { return (this->_kernel == pi._kernel) && (this->_p_it == pi._p_it); } -bool PointKernel::const_point_iterator::operator!=(const PointKernel::const_point_iterator& pi) const +bool PointKernel::const_point_iterator::operator!=( + const PointKernel::const_point_iterator& pi) const { return !operator==(pi); } -PointKernel::const_point_iterator& -PointKernel::const_point_iterator::operator++() +PointKernel::const_point_iterator& PointKernel::const_point_iterator::operator++() { ++(this->_p_it); return *this; } -PointKernel::const_point_iterator -PointKernel::const_point_iterator::operator++(int) +PointKernel::const_point_iterator PointKernel::const_point_iterator::operator++(int) { PointKernel::const_point_iterator tmp = *this; ++(this->_p_it); return tmp; } -PointKernel::const_point_iterator& -PointKernel::const_point_iterator::operator--() +PointKernel::const_point_iterator& PointKernel::const_point_iterator::operator--() { --(this->_p_it); return *this; } -PointKernel::const_point_iterator -PointKernel::const_point_iterator::operator--(int) +PointKernel::const_point_iterator PointKernel::const_point_iterator::operator--(int) { PointKernel::const_point_iterator tmp = *this; --(this->_p_it); @@ -328,17 +322,17 @@ PointKernel::const_point_iterator::operator--(int) } PointKernel::const_point_iterator -PointKernel::const_point_iterator::operator+ (difference_type off) const +PointKernel::const_point_iterator::operator+(difference_type off) const { PointKernel::const_point_iterator tmp = *this; - return (tmp+=off); + return (tmp += off); } PointKernel::const_point_iterator -PointKernel::const_point_iterator::operator- (difference_type off) const +PointKernel::const_point_iterator::operator-(difference_type off) const { PointKernel::const_point_iterator tmp = *this; - return (tmp-=off); + return (tmp -= off); } PointKernel::const_point_iterator& @@ -356,7 +350,7 @@ PointKernel::const_point_iterator::operator-=(difference_type off) } PointKernel::difference_type -PointKernel::const_point_iterator::operator- (const PointKernel::const_point_iterator& right) const +PointKernel::const_point_iterator::operator-(const PointKernel::const_point_iterator& right) const { return this->_p_it - right._p_it; } diff --git a/src/Mod/Points/App/Points.h b/src/Mod/Points/App/Points.h index 7dcd593339..6f21b76b0a 100644 --- a/src/Mod/Points/App/Points.h +++ b/src/Mod/Points/App/Points.h @@ -24,8 +24,8 @@ #ifndef POINTS_POINT_H #define POINTS_POINT_H -#include #include +#include #include #include @@ -42,7 +42,7 @@ namespace Points /** Point kernel */ -class PointsExport PointKernel : public Data::ComplexGeoData +class PointsExport PointKernel: public Data::ComplexGeoData { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -60,7 +60,7 @@ public: PointKernel(const PointKernel&); ~PointKernel() override = default; - void operator = (const PointKernel&); + void operator=(const PointKernel&); /** @name Subelement management */ //@{ @@ -74,31 +74,46 @@ public: Data::Segment* getSubElement(const char* Type, unsigned long) const override; //@} - inline void setTransform(const Base::Matrix4D& rclTrf) override{_Mtrx = rclTrf;} - inline Base::Matrix4D getTransform() const override{return _Mtrx;} + inline void setTransform(const Base::Matrix4D& rclTrf) override + { + _Mtrx = rclTrf; + } + inline Base::Matrix4D getTransform() const override + { + return _Mtrx; + } std::vector& getBasicPoints() - { return this->_Points; } + { + return this->_Points; + } const std::vector& getBasicPoints() const - { return this->_Points; } + { + return this->_Points; + } void setBasicPoints(const std::vector& pts) - { this->_Points = pts; } + { + this->_Points = pts; + } void swap(std::vector& pts) - { this->_Points.swap(pts); } + { + this->_Points.swap(pts); + } - void getPoints(std::vector &Points, - std::vector &Normals, - double Accuracy, uint16_t flags=0) const override; - void transformGeometry(const Base::Matrix4D &rclMat) override; - Base::BoundBox3d getBoundBox()const override; + void getPoints(std::vector& Points, + std::vector& Normals, + double Accuracy, + uint16_t flags = 0) const override; + void transformGeometry(const Base::Matrix4D& rclMat) override; + Base::BoundBox3d getBoundBox() const override; /** @name I/O */ //@{ // Implemented from Persistence - unsigned int getMemSize () const override; - void Save (Base::Writer &writer) const override; - void SaveDocFile (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; - void RestoreDocFile(Base::Reader &reader) override; + unsigned int getMemSize() const override; + void Save(Base::Writer& writer) const override; + void SaveDocFile(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; + void RestoreDocFile(Base::Reader& reader) override; void save(const char* file) const; void save(std::ostream&) const; void load(const char* file); @@ -111,28 +126,44 @@ private: public: /// number of points stored - size_type size() const {return this->_Points.size();} + size_type size() const + { + return this->_Points.size(); + } size_type countValid() const; std::vector getValidPoints() const; - void resize(size_type n){_Points.resize(n);} - void reserve(size_type n){_Points.reserve(n);} - inline void erase(size_type first, size_type last) { - _Points.erase(_Points.begin()+first,_Points.begin()+last); + void resize(size_type n) + { + _Points.resize(n); + } + void reserve(size_type n) + { + _Points.reserve(n); + } + inline void erase(size_type first, size_type last) + { + _Points.erase(_Points.begin() + first, _Points.begin() + last); } - void clear(){_Points.clear();} + void clear() + { + _Points.clear(); + } /// get the points - inline const Base::Vector3d getPoint(const int idx) const { + inline const Base::Vector3d getPoint(const int idx) const + { return transformPointToOutside(_Points[idx]); } /// set the points - inline void setPoint(const int idx,const Base::Vector3d& point) { + inline void setPoint(const int idx, const Base::Vector3d& point) + { _Points[idx] = transformPointToInside(point); } /// insert the points - inline void push_back(const Base::Vector3d& point) { + inline void push_back(const Base::Vector3d& point) + { _Points.push_back(transformPointToInside(point)); } @@ -157,14 +188,15 @@ public: bool operator==(const const_point_iterator& fi) const; bool operator!=(const const_point_iterator& fi) const; const_point_iterator& operator++(); - const_point_iterator operator++(int); + const_point_iterator operator++(int); const_point_iterator& operator--(); - const_point_iterator operator--(int); - const_point_iterator operator+ (difference_type off) const; - const_point_iterator operator- (difference_type off) const; + const_point_iterator operator--(int); + const_point_iterator operator+(difference_type off) const; + const_point_iterator operator-(difference_type off) const; const_point_iterator& operator+=(difference_type off); const_point_iterator& operator-=(difference_type off); - difference_type operator- (const const_point_iterator& right) const; + difference_type operator-(const const_point_iterator& right) const; + private: void dereference(); const PointKernel* _kernel; @@ -178,17 +210,25 @@ public: /** @name Iterator */ //@{ const_point_iterator begin() const - { return {this, _Points.begin()}; } + { + return {this, _Points.begin()}; + } const_point_iterator end() const - { return {this, _Points.end()}; } + { + return {this, _Points.end()}; + } const_reverse_iterator rbegin() const - { return const_reverse_iterator(end()); } + { + return const_reverse_iterator(end()); + } const_reverse_iterator rend() const - { return const_reverse_iterator(begin()); } + { + return const_reverse_iterator(begin()); + } //@} }; -} // namespace Points +} // namespace Points -#endif // POINTS_POINTPROPERTIES_H +#endif // POINTS_POINTPROPERTIES_H diff --git a/src/Mod/Points/App/PointsAlgos.cpp b/src/Mod/Points/App/PointsAlgos.cpp index 1d04b78691..4d42564668 100644 --- a/src/Mod/Points/App/PointsAlgos.cpp +++ b/src/Mod/Points/App/PointsAlgos.cpp @@ -22,16 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# ifdef FC_OS_LINUX -# include -# endif -# include -# include +#ifdef FC_OS_LINUX +#include +#endif +#include +#include -# include -# include -# include -# include // needed for compilation on some systems +#include +#include +#include // needed for compilation on some systems +#include #endif #include @@ -47,44 +47,49 @@ using namespace Points; -void PointsAlgos::Load(PointKernel &points, const char *FileName) +void PointsAlgos::Load(PointKernel& points, const char* FileName) { Base::FileInfo File(FileName); // checking on the file - if (!File.isReadable()) + if (!File.isReadable()) { throw Base::FileException("File to load not existing or not readable", FileName); + } - if (File.hasExtension("asc")) - LoadAscii(points,FileName); - else + if (File.hasExtension("asc")) { + LoadAscii(points, FileName); + } + else { throw Base::RuntimeError("Unknown ending"); + } } -void PointsAlgos::LoadAscii(PointKernel &points, const char *FileName) +void PointsAlgos::LoadAscii(PointKernel& points, const char* FileName) { boost::regex rx("^\\s*([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); - //boost::regex rx("(\\b[0-9]+\\.([0-9]+\\b)?|\\.[0-9]+\\b)"); - //boost::regex rx("^\\s*(-?[0-9]*)\\.([0-9]+)\\s+(-?[0-9]*)\\.([0-9]+)\\s+(-?[0-9]*)\\.([0-9]+)\\s*$"); + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); + // boost::regex rx("(\\b[0-9]+\\.([0-9]+\\b)?|\\.[0-9]+\\b)"); + // boost::regex + // rx("^\\s*(-?[0-9]*)\\.([0-9]+)\\s+(-?[0-9]*)\\.([0-9]+)\\s+(-?[0-9]*)\\.([0-9]+)\\s*$"); boost::cmatch what; Base::Vector3d pt; - int LineCnt=0; + int LineCnt = 0; std::string line; Base::FileInfo fi(FileName); Base::ifstream tmp_str(fi, std::ios::in); // estimating size - while (std::getline(tmp_str,line)) + while (std::getline(tmp_str, line)) { LineCnt++; + } // resize the PointKernel points.resize(LineCnt); - Base::SequencerLauncher seq( "Loading points...", LineCnt ); + Base::SequencerLauncher seq("Loading points...", LineCnt); // again to the beginning Base::ifstream file(fi, std::ios::in); @@ -98,7 +103,7 @@ void PointsAlgos::LoadAscii(PointKernel &points, const char *FileName) pt.y = std::atof(what[4].first); pt.z = std::atof(what[7].first); - points.setPoint(LineCnt,pt); + points.setPoint(LineCnt, pt); seq.next(); LineCnt++; } @@ -112,8 +117,9 @@ void PointsAlgos::LoadAscii(PointKernel &points, const char *FileName) // now remove the last points from the kernel // Note: first we allocate memory corresponding to the number of lines (points and comments) // and read in the file twice. But then the size of the kernel is too high - if (LineCnt < (int)points.size()) + if (LineCnt < (int)points.size()) { points.erase(LineCnt, points.size()); + } } // ---------------------------------------------------------------------------- @@ -199,8 +205,10 @@ void AscReader::read(const std::string& filename) // ---------------------------------------------------------------------------- -namespace Points { -class Converter { +namespace Points +{ +class Converter +{ public: Converter() = default; virtual ~Converter() = default; @@ -210,13 +218,15 @@ public: Converter(const Converter&) = delete; Converter(Converter&&) = delete; - Converter& operator= (const Converter&) = delete; - Converter& operator= (Converter&&) = delete; + Converter& operator=(const Converter&) = delete; + Converter& operator=(Converter&&) = delete; }; -template -class ConverterT : public Converter { +template +class ConverterT: public Converter +{ public: - std::string toString(double f) const override { + std::string toString(double f) const override + { T c = static_cast(f); std::ostringstream oss; oss.precision(7); @@ -224,22 +234,26 @@ public: oss << c; return oss.str(); } - double toDouble(Base::InputStream& str) const override { + double toDouble(Base::InputStream& str) const override + { T c; str >> c; return static_cast(c); } - int getSizeOf() const override { + int getSizeOf() const override + { return sizeof(T); } }; using ConverterPtr = std::shared_ptr; -class DataStreambuf : public std::streambuf +class DataStreambuf: public std::streambuf { public: - explicit DataStreambuf(const std::vector& data) : _buffer(data) { + explicit DataStreambuf(const std::vector& data) + : _buffer(data) + { _beg = 0; _end = data.size(); _cur = 0; @@ -247,52 +261,64 @@ public: ~DataStreambuf() override = default; protected: - int_type uflow() override { - if (_cur == _end) + int_type uflow() override + { + if (_cur == _end) { return traits_type::eof(); + } return static_cast(_buffer[_cur++]) & 0x000000ff; } - int_type underflow() override { - if (_cur == _end) + int_type underflow() override + { + if (_cur == _end) { return traits_type::eof(); + } return static_cast(_buffer[_cur]) & 0x000000ff; } - int_type pbackfail(int_type ch) override { - if (_cur == _beg || (ch != traits_type::eof() && ch != _buffer[_cur-1])) + int_type pbackfail(int_type ch) override + { + if (_cur == _beg || (ch != traits_type::eof() && ch != _buffer[_cur - 1])) { return traits_type::eof(); + } return static_cast(_buffer[--_cur]) & 0x000000ff; } - std::streamsize showmanyc() override { + std::streamsize showmanyc() override + { return _end - _cur; } pos_type seekoff(std::streambuf::off_type off, - std::ios_base::seekdir way, - std::ios_base::openmode = - std::ios::in | std::ios::out) override { - int p_pos=-1; - if (way == std::ios_base::beg) + std::ios_base::seekdir way, + std::ios_base::openmode = std::ios::in | std::ios::out) override + { + int p_pos = -1; + if (way == std::ios_base::beg) { p_pos = _beg; - else if (way == std::ios_base::end) + } + else if (way == std::ios_base::end) { p_pos = _end; - else if (way == std::ios_base::cur) + } + else if (way == std::ios_base::cur) { p_pos = _cur; + } - if (p_pos > _end) + if (p_pos > _end) { return traits_type::eof(); + } - if (((p_pos + off) > _end) || ((p_pos + off) < _beg)) + if (((p_pos + off) > _end) || ((p_pos + off) < _beg)) { return traits_type::eof(); + } - _cur = p_pos+ off; + _cur = p_pos + off; - return ((p_pos+off) - _beg); + return ((p_pos + off) - _beg); } pos_type seekpos(std::streambuf::pos_type pos, - std::ios_base::openmode which = - std::ios::in | std::ios::out) override { + std::ios_base::openmode which = std::ios::in | std::ios::out) override + { (void)which; return seekoff(pos, std::ios_base::beg); } @@ -308,191 +334,216 @@ private: int _beg, _end, _cur; }; -//Taken from https://github.com/PointCloudLibrary/pcl/blob/master/io/src/lzf.cpp +// Taken from https://github.com/PointCloudLibrary/pcl/blob/master/io/src/lzf.cpp unsigned int -lzfDecompress (const void *const in_data, unsigned int in_len, - void *out_data, unsigned int out_len) +lzfDecompress(const void* const in_data, unsigned int in_len, void* out_data, unsigned int out_len) { - unsigned char const *ip = static_cast (in_data); - unsigned char *op = static_cast (out_data); - unsigned char const *const in_end = ip + in_len; - unsigned char *const out_end = op + out_len; + unsigned char const* ip = static_cast(in_data); + unsigned char* op = static_cast(out_data); + unsigned char const* const in_end = ip + in_len; + unsigned char* const out_end = op + out_len; - do - { - unsigned int ctrl = *ip++; + do { + unsigned int ctrl = *ip++; - // Literal run - if (ctrl < (1 << 5)) - { - ctrl++; + // Literal run + if (ctrl < (1 << 5)) { + ctrl++; - if (op + ctrl > out_end) - { - errno = E2BIG; - return (0); - } + if (op + ctrl > out_end) { + errno = E2BIG; + return (0); + } - // Check for overflow - if (ip + ctrl > in_end) - { - errno = EINVAL; - return (0); - } - switch (ctrl) - { - case 32: *op++ = *ip++; - /* FALLTHRU */ - case 31: *op++ = *ip++; - /* FALLTHRU */ - case 30: *op++ = *ip++; - /* FALLTHRU */ - case 29: *op++ = *ip++; - /* FALLTHRU */ - case 28: *op++ = *ip++; - /* FALLTHRU */ - case 27: *op++ = *ip++; - /* FALLTHRU */ - case 26: *op++ = *ip++; - /* FALLTHRU */ - case 25: *op++ = *ip++; - /* FALLTHRU */ - case 24: *op++ = *ip++; - /* FALLTHRU */ - case 23: *op++ = *ip++; - /* FALLTHRU */ - case 22: *op++ = *ip++; - /* FALLTHRU */ - case 21: *op++ = *ip++; - /* FALLTHRU */ - case 20: *op++ = *ip++; - /* FALLTHRU */ - case 19: *op++ = *ip++; - /* FALLTHRU */ - case 18: *op++ = *ip++; - /* FALLTHRU */ - case 17: *op++ = *ip++; - /* FALLTHRU */ - case 16: *op++ = *ip++; - /* FALLTHRU */ - case 15: *op++ = *ip++; - /* FALLTHRU */ - case 14: *op++ = *ip++; - /* FALLTHRU */ - case 13: *op++ = *ip++; - /* FALLTHRU */ - case 12: *op++ = *ip++; - /* FALLTHRU */ - case 11: *op++ = *ip++; - /* FALLTHRU */ - case 10: *op++ = *ip++; - /* FALLTHRU */ - case 9: *op++ = *ip++; - /* FALLTHRU */ - case 8: *op++ = *ip++; - /* FALLTHRU */ - case 7: *op++ = *ip++; - /* FALLTHRU */ - case 6: *op++ = *ip++; - /* FALLTHRU */ - case 5: *op++ = *ip++; - /* FALLTHRU */ - case 4: *op++ = *ip++; - /* FALLTHRU */ - case 3: *op++ = *ip++; - /* FALLTHRU */ - case 2: *op++ = *ip++; - /* FALLTHRU */ - case 1: *op++ = *ip++; - } - } - // Back reference - else - { - unsigned int len = ctrl >> 5; - - unsigned char *ref = op - ((ctrl & 0x1f) << 8) - 1; - - // Check for overflow - if (ip >= in_end) - { - errno = EINVAL; - return (0); - } - if (len == 7) - { - len += *ip++; - // Check for overflow - if (ip >= in_end) - { - errno = EINVAL; - return (0); + // Check for overflow + if (ip + ctrl > in_end) { + errno = EINVAL; + return (0); + } + switch (ctrl) { + case 32: + *op++ = *ip++; + /* FALLTHRU */ + case 31: + *op++ = *ip++; + /* FALLTHRU */ + case 30: + *op++ = *ip++; + /* FALLTHRU */ + case 29: + *op++ = *ip++; + /* FALLTHRU */ + case 28: + *op++ = *ip++; + /* FALLTHRU */ + case 27: + *op++ = *ip++; + /* FALLTHRU */ + case 26: + *op++ = *ip++; + /* FALLTHRU */ + case 25: + *op++ = *ip++; + /* FALLTHRU */ + case 24: + *op++ = *ip++; + /* FALLTHRU */ + case 23: + *op++ = *ip++; + /* FALLTHRU */ + case 22: + *op++ = *ip++; + /* FALLTHRU */ + case 21: + *op++ = *ip++; + /* FALLTHRU */ + case 20: + *op++ = *ip++; + /* FALLTHRU */ + case 19: + *op++ = *ip++; + /* FALLTHRU */ + case 18: + *op++ = *ip++; + /* FALLTHRU */ + case 17: + *op++ = *ip++; + /* FALLTHRU */ + case 16: + *op++ = *ip++; + /* FALLTHRU */ + case 15: + *op++ = *ip++; + /* FALLTHRU */ + case 14: + *op++ = *ip++; + /* FALLTHRU */ + case 13: + *op++ = *ip++; + /* FALLTHRU */ + case 12: + *op++ = *ip++; + /* FALLTHRU */ + case 11: + *op++ = *ip++; + /* FALLTHRU */ + case 10: + *op++ = *ip++; + /* FALLTHRU */ + case 9: + *op++ = *ip++; + /* FALLTHRU */ + case 8: + *op++ = *ip++; + /* FALLTHRU */ + case 7: + *op++ = *ip++; + /* FALLTHRU */ + case 6: + *op++ = *ip++; + /* FALLTHRU */ + case 5: + *op++ = *ip++; + /* FALLTHRU */ + case 4: + *op++ = *ip++; + /* FALLTHRU */ + case 3: + *op++ = *ip++; + /* FALLTHRU */ + case 2: + *op++ = *ip++; + /* FALLTHRU */ + case 1: + *op++ = *ip++; + } } - } - ref -= *ip++; + // Back reference + else { + unsigned int len = ctrl >> 5; - if (op + len + 2 > out_end) - { - errno = E2BIG; - return (0); - } + unsigned char* ref = op - ((ctrl & 0x1f) << 8) - 1; - if (ref < static_cast (out_data)) - { - errno = EINVAL; - return (0); - } + // Check for overflow + if (ip >= in_end) { + errno = EINVAL; + return (0); + } + if (len == 7) { + len += *ip++; + // Check for overflow + if (ip >= in_end) { + errno = EINVAL; + return (0); + } + } + ref -= *ip++; - switch (len) - { - default: - { - len += 2; + if (op + len + 2 > out_end) { + errno = E2BIG; + return (0); + } - if (op >= ref + len) - { - // Disjunct areas - memcpy (op, ref, len); - op += len; - } - else - { - // Overlapping, use byte by byte copying - do - *op++ = *ref++; - while (--len); - } + if (ref < static_cast(out_data)) { + errno = EINVAL; + return (0); + } - break; + switch (len) { + default: { + len += 2; + + if (op >= ref + len) { + // Disjunct areas + memcpy(op, ref, len); + op += len; + } + else { + // Overlapping, use byte by byte copying + do { + *op++ = *ref++; + } while (--len); + } + + break; + } + case 9: + *op++ = *ref++; + /* FALLTHRU */ + case 8: + *op++ = *ref++; + /* FALLTHRU */ + case 7: + *op++ = *ref++; + /* FALLTHRU */ + case 6: + *op++ = *ref++; + /* FALLTHRU */ + case 5: + *op++ = *ref++; + /* FALLTHRU */ + case 4: + *op++ = *ref++; + /* FALLTHRU */ + case 3: + *op++ = *ref++; + /* FALLTHRU */ + case 2: + *op++ = *ref++; + /* FALLTHRU */ + case 1: + *op++ = *ref++; + /* FALLTHRU */ + case 0: + *op++ = *ref++; // two octets more + *op++ = *ref++; + } } - case 9: *op++ = *ref++; - /* FALLTHRU */ - case 8: *op++ = *ref++; - /* FALLTHRU */ - case 7: *op++ = *ref++; - /* FALLTHRU */ - case 6: *op++ = *ref++; - /* FALLTHRU */ - case 5: *op++ = *ref++; - /* FALLTHRU */ - case 4: *op++ = *ref++; - /* FALLTHRU */ - case 3: *op++ = *ref++; - /* FALLTHRU */ - case 2: *op++ = *ref++; - /* FALLTHRU */ - case 1: *op++ = *ref++; - /* FALLTHRU */ - case 0: *op++ = *ref++; // two octets more - *op++ = *ref++; - } - } - } - while (ip < in_end); + } while (ip < in_end); - return (static_cast (op - static_cast (out_data))); -} + return (static_cast(op - static_cast(out_data))); } +} // namespace Points PlyReader::PlyReader() = default; @@ -529,68 +580,82 @@ void PlyReader::read(const std::string& filename) // x field std::size_t x = max_size; it = std::find(fields.begin(), fields.end(), "x"); - if (it != fields.end()) + if (it != fields.end()) { x = std::distance(fields.begin(), it); + } // y field std::size_t y = max_size; it = std::find(fields.begin(), fields.end(), "y"); - if (it != fields.end()) + if (it != fields.end()) { y = std::distance(fields.begin(), it); + } // z field std::size_t z = max_size; it = std::find(fields.begin(), fields.end(), "z"); - if (it != fields.end()) + if (it != fields.end()) { z = std::distance(fields.begin(), it); + } // normal x field std::size_t normal_x = max_size; it = std::find(fields.begin(), fields.end(), "normal_x"); - if (it == fields.end()) + if (it == fields.end()) { it = std::find(fields.begin(), fields.end(), "nx"); - if (it != fields.end()) + } + if (it != fields.end()) { normal_x = std::distance(fields.begin(), it); + } // normal y field std::size_t normal_y = max_size; it = std::find(fields.begin(), fields.end(), "normal_y"); - if (it == fields.end()) + if (it == fields.end()) { it = std::find(fields.begin(), fields.end(), "ny"); - if (it != fields.end()) + } + if (it != fields.end()) { normal_y = std::distance(fields.begin(), it); + } // normal z field std::size_t normal_z = max_size; it = std::find(fields.begin(), fields.end(), "normal_z"); - if (it == fields.end()) + if (it == fields.end()) { it = std::find(fields.begin(), fields.end(), "nz"); - if (it != fields.end()) + } + if (it != fields.end()) { normal_z = std::distance(fields.begin(), it); + } // intensity field std::size_t greyvalue = max_size; it = std::find(fields.begin(), fields.end(), "intensity"); - if (it != fields.end()) + if (it != fields.end()) { greyvalue = std::distance(fields.begin(), it); + } // rgb(a) field std::size_t red = max_size, green = max_size, blue = max_size, alpha = max_size; it = std::find(fields.begin(), fields.end(), "red"); - if (it != fields.end()) + if (it != fields.end()) { red = std::distance(fields.begin(), it); + } it = std::find(fields.begin(), fields.end(), "green"); - if (it != fields.end()) + if (it != fields.end()) { green = std::distance(fields.begin(), it); + } it = std::find(fields.begin(), fields.end(), "blue"); - if (it != fields.end()) + if (it != fields.end()) { blue = std::distance(fields.begin(), it); + } it = std::find(fields.begin(), fields.end(), "alpha"); - if (it != fields.end()) + if (it != fields.end()) { alpha = std::distance(fields.begin(), it); + } // transfer the data bool hasData = (x != max_size && y != max_size && z != max_size); @@ -600,22 +665,22 @@ void PlyReader::read(const std::string& filename) if (hasData) { points.reserve(numPoints); - for (std::size_t i=0; i(r)/255.0f, - static_cast(g)/255.0f, - static_cast(b)/255.0f, - static_cast(a)/255.0f); + } + colors.emplace_back(static_cast(r) / 255.0f, + static_cast(g) / 255.0f, + static_cast(b) / 255.0f, + static_cast(a) / 255.0f); } } else if (types[red] == "float") { - for (std::size_t i=0; i list; std::size_t numPoints = 0; // a pair of numbers of elements and the total size of the properties - std::vector > count_props; + std::vector> count_props; // read in the first three characters char ply[3]; in.read(ply, 3); in.ignore(1); - if (!in || (ply[0] != 'p') || (ply[1] != 'l') || (ply[2] != 'y')) - throw Base::BadFormatError("Not a ply file"); // wrong header + if (!in || (ply[0] != 'p') || (ply[1] != 'l') || (ply[2] != 'y')) { + throw Base::BadFormatError("Not a ply file"); // wrong header + } while (std::getline(in, line)) { - if (line.empty()) + if (line.empty()) { continue; + } // since the file is loaded in binary mode we may get the CR at the end boost::trim(line); - boost::split(list, line, boost::is_any_of ("\t\r "), boost::token_compress_on); + boost::split(list, line, boost::is_any_of("\t\r "), boost::token_compress_on); std::istringstream str(line); str.imbue(std::locale::classic()); @@ -738,15 +807,15 @@ std::size_t PlyReader::readHeader(std::istream& in, std::list number; if (list[1] == "list") { number.insert(number.end(), list.begin(), list.end()); - number.pop_front(); // property - number.pop_front(); // list + number.pop_front(); // property + number.pop_front(); // list number.pop_back(); } else { number.push_back(list[1]); } - for (const auto & it : number) { + for (const auto& it : number) { int size = 0; if (it == "char" || it == "int8") { size = 1; @@ -793,21 +862,20 @@ std::size_t PlyReader::readHeader(std::istream& in, } } - if (fields.size() != sizes.size() || - fields.size() != types.size()) { + if (fields.size() != sizes.size() || fields.size() != types.size()) { throw Base::BadFormatError(""); } offset = 0; if (format == "ascii") { // just sum up the number of lines to ignore - std::vector >::iterator it; + std::vector>::iterator it; for (it = count_props.begin(); it != count_props.end(); ++it) { offset += it->first; } } else { - std::vector >::iterator it; + std::vector>::iterator it; for (it = count_props.begin(); it != count_props.end(); ++it) { offset += it->first * it->second; } @@ -824,8 +892,9 @@ void PlyReader::readAscii(std::istream& inp, std::size_t offset, Eigen::MatrixXd std::size_t numFields = data.cols(); std::vector list; while (std::getline(inp, line) && row < numPoints) { - if (line.empty()) + if (line.empty()) { continue; + } if (offset > 0) { offset--; @@ -834,7 +903,7 @@ void PlyReader::readAscii(std::istream& inp, std::size_t offset, Eigen::MatrixXd // since the file is loaded in binary mode we may get the CR at the end boost::trim(line); - boost::split(list, line, boost::is_any_of ("\t\r "), boost::token_compress_on); + boost::split(list, line, boost::is_any_of("\t\r "), boost::token_compress_on); std::istringstream str(line); @@ -868,43 +937,55 @@ void PlyReader::readBinary(bool swapByteOrder, ConverterPtr convert_uint32(new ConverterT); std::vector converters; - for (std::size_t j=0; jgetSizeOf(); @@ -917,14 +998,15 @@ void PlyReader::readBinary(bool swapByteOrder, ulCurr = buf->pubseekoff(static_cast(offset), std::ios::cur, std::ios::in); ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in); buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in); - if (ulCurr + neededSize*static_cast(numPoints) > ulSize) + if (ulCurr + neededSize * static_cast(numPoints) > ulSize) { throw Base::BadFormatError("File expects too many elements"); + } } Base::InputStream str(inp); str.setByteOrder(swapByteOrder ? Base::Stream::BigEndian : Base::Stream::LittleEndian); - for (std::size_t i=0; itoDouble(str); data(i, j) = value; } @@ -982,58 +1064,70 @@ void PcdReader::read(const std::string& filename) // x field std::size_t x = max_size; it = std::find(fields.begin(), fields.end(), "x"); - if (it != fields.end()) + if (it != fields.end()) { x = std::distance(fields.begin(), it); + } // y field std::size_t y = max_size; it = std::find(fields.begin(), fields.end(), "y"); - if (it != fields.end()) + if (it != fields.end()) { y = std::distance(fields.begin(), it); + } // z field std::size_t z = max_size; it = std::find(fields.begin(), fields.end(), "z"); - if (it != fields.end()) + if (it != fields.end()) { z = std::distance(fields.begin(), it); + } // normal x field std::size_t normal_x = max_size; it = std::find(fields.begin(), fields.end(), "normal_x"); - if (it == fields.end()) + if (it == fields.end()) { it = std::find(fields.begin(), fields.end(), "nx"); - if (it != fields.end()) + } + if (it != fields.end()) { normal_x = std::distance(fields.begin(), it); + } // normal y field std::size_t normal_y = max_size; it = std::find(fields.begin(), fields.end(), "normal_y"); - if (it == fields.end()) + if (it == fields.end()) { it = std::find(fields.begin(), fields.end(), "ny"); - if (it != fields.end()) + } + if (it != fields.end()) { normal_y = std::distance(fields.begin(), it); + } // normal z field std::size_t normal_z = max_size; it = std::find(fields.begin(), fields.end(), "normal_z"); - if (it == fields.end()) + if (it == fields.end()) { it = std::find(fields.begin(), fields.end(), "nz"); - if (it != fields.end()) + } + if (it != fields.end()) { normal_z = std::distance(fields.begin(), it); + } // intensity field std::size_t greyvalue = max_size; it = std::find(fields.begin(), fields.end(), "intensity"); - if (it != fields.end()) + if (it != fields.end()) { greyvalue = std::distance(fields.begin(), it); + } // rgb(a) field std::size_t rgba = max_size; it = std::find(fields.begin(), fields.end(), "rgb"); - if (it == fields.end()) + if (it == fields.end()) { it = std::find(fields.begin(), fields.end(), "rgba"); - if (it != fields.end()) + } + if (it != fields.end()) { rgba = std::distance(fields.begin(), it); + } // transfer the data bool hasData = (x != max_size && y != max_size && z != max_size); @@ -1043,39 +1137,40 @@ void PcdReader::read(const std::string& filename) if (hasData) { points.reserve(numPoints); - for (std::size_t i=0; i(data(i,rgba)); + for (std::size_t i = 0; i < numPoints; i++) { + uint32_t packed = static_cast(data(i, rgba)); App::Color col; col.setPackedARGB(packed); colors.emplace_back(col); } } else if (types[rgba] == "F") { - static_assert(sizeof(float) == sizeof(uint32_t), "float and uint32_t have different sizes"); - for (std::size_t i=0; i(data(i,rgba)); + static_assert(sizeof(float) == sizeof(uint32_t), + "float and uint32_t have different sizes"); + for (std::size_t i = 0; i < numPoints; i++) { + float f = static_cast(data(i, rgba)); uint32_t packed; std::memcpy(&packed, &f, sizeof(packed)); App::Color col; @@ -1098,12 +1193,13 @@ std::size_t PcdReader::readHeader(std::istream& in, std::size_t points = 0; while (std::getline(in, line)) { - if (line.empty()) + if (line.empty()) { continue; + } // since the file is loaded in binary mode we may get the CR at the end boost::trim(line); - boost::split(list, line, boost::is_any_of ("\t\r "), boost::token_compress_on); + boost::split(list, line, boost::is_any_of("\t\r "), boost::token_compress_on); std::istringstream str(line); str.imbue(std::locale::classic()); @@ -1111,22 +1207,22 @@ std::size_t PcdReader::readHeader(std::istream& in, std::string kw; str >> kw; if (kw == "FIELDS") { - for (std::size_t i=1; i(list[i])); } } else if (kw == "TYPE") { - for (std::size_t i=1; i(this->width); std::size_t h = static_cast(this->height); std::size_t size = w * h; - if (fields.size() != sizes.size() || - fields.size() != types.size() || - fields.size() != counts.size() || - points != size) { + if (fields.size() != sizes.size() || fields.size() != types.size() + || fields.size() != counts.size() || points != size) { throw Base::BadFormatError(""); } @@ -1166,12 +1260,13 @@ void PcdReader::readAscii(std::istream& inp, Eigen::MatrixXd& data) std::size_t numFields = data.cols(); std::vector list; while (std::getline(inp, line) && row < numPoints) { - if (line.empty()) + if (line.empty()) { continue; + } // since the file is loaded in binary mode we may get the CR at the end boost::trim(line); - boost::split(list, line, boost::is_any_of ("\t\r "), boost::token_compress_on); + boost::split(list, line, boost::is_any_of("\t\r "), boost::token_compress_on); std::istringstream str(line); @@ -1204,43 +1299,55 @@ void PcdReader::readBinary(bool transpose, ConverterPtr convert_uint32(new ConverterT); std::vector converters; - for (std::size_t j=0; jgetSizeOf(); @@ -1253,22 +1360,23 @@ void PcdReader::readBinary(bool transpose, ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in); ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in); buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in); - if (ulCurr + neededSize*static_cast(numPoints) > ulSize) + if (ulCurr + neededSize * static_cast(numPoints) > ulSize) { throw Base::BadFormatError("File expects too many elements"); + } } Base::InputStream str(inp); if (transpose) { - for (std::size_t j=0; jtoDouble(str); data(i, j) = value; } } } else { - for (std::size_t i=0; itoDouble(str); data(i, j) = value; } @@ -1278,17 +1386,17 @@ void PcdReader::readBinary(bool transpose, // ---------------------------------------------------------------------------- -namespace { +namespace +{ class E57ReaderImp { public: E57ReaderImp(const std::string& filename, bool color, bool state, double distance) : imfi(filename, "r") - , useColor{color} - , checkState{state} - , minDistance{distance} - { - } + , useColor {color} + , checkState {state} + , minDistance {distance} + {} void read() { @@ -1320,15 +1428,15 @@ public: } private: - void readData3D(const e57::VectorNode& data3D) + void readData3D(const e57::VectorNode& data3D) { for (int child = 0; child < data3D.childCount(); ++child) { e57::StructureNode scan_data(data3D.get(child)); Base::Placement plm; bool hasPlacement = getPlacement(scan_data, plm); - e57::CompressedVectorNode cvn(scan_data.get("points")); - e57::StructureNode prototype(cvn.prototype()); + e57::CompressedVectorNode cvn(scan_data.get("points")); + e57::StructureNode prototype(cvn.prototype()); Proto proto = readProto(prototype); processProto(cvn, proto, hasPlacement, plm); } @@ -1369,26 +1477,16 @@ private: for (int i = 0; i < prototype.childCount(); ++i) { e57::Node node(prototype.get(i)); if ((node.type() == e57::E57_FLOAT) || (node.type() == e57::E57_SCALED_INTEGER)) { - if (readCartesian(node, proto)) { - - } - else if (readNormal(node, proto)) { - - } - else if (readItensity(node, proto)) { - - } + if (readCartesian(node, proto)) {} + else if (readNormal(node, proto)) {} + else if (readItensity(node, proto)) {} else { readOther(node, proto); } } else if (node.type() == e57::E57_INTEGER) { - if (readColor(node, proto)) { - - } - else if (readCartesianInvalidState(node, proto)) { - - } + if (readColor(node, proto)) {} + else if (readCartesianInvalidState(node, proto)) {} else { readOther(node, proto); } @@ -1402,41 +1500,26 @@ private: { if (node.elementName() == "cartesianX") { proto.cnt_xyz++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.xData.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.xData.data(), buf_size, true, true - ); + ); return true; } else if (node.elementName() == "cartesianY") { proto.cnt_xyz++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.yData.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.yData.data(), buf_size, true, true - ); + ); return true; } else if (node.elementName() == "cartesianZ") { proto.cnt_xyz++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.zData.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.zData.data(), buf_size, true, true - ); + ); return true; } @@ -1447,41 +1530,26 @@ private: { if (node.elementName() == "nor:normalX") { proto.cnt_nor++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.xNormal.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.xNormal.data(), buf_size, true, true - ); + ); return true; } else if (node.elementName() == "nor:normalY") { proto.cnt_nor++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.yNormal.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.yNormal.data(), buf_size, true, true - ); + ); return true; } else if (node.elementName() == "nor:normalZ") { proto.cnt_nor++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.zNormal.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.zNormal.data(), buf_size, true, true - ); + ); return true; } @@ -1492,15 +1560,10 @@ private: { if (node.elementName() == "cartesianInvalidState") { proto.inv_state = true; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.state.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.state.data(), buf_size, true, true - ); + ); return true; } @@ -1511,41 +1574,26 @@ private: { if (node.elementName() == "colorRed") { proto.cnt_rgb++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.redData.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.redData.data(), buf_size, true, true - ); + ); return true; } else if (node.elementName() == "colorGreen") { proto.cnt_rgb++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.greenData.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.greenData.data(), buf_size, true, true - ); + ); return true; } else if (node.elementName() == "colorBlue") { proto.cnt_rgb++; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.blueData.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.blueData.data(), buf_size, true, true - ); + ); return true; } @@ -1556,15 +1604,10 @@ private: { if (node.elementName() == "intensity") { proto.inty = true; - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.intensity.data() - , buf_size - , true - , true + proto.sdb + .emplace_back(imfi, node.elementName(), proto.intensity.data(), buf_size, true, true - ); + ); return true; } @@ -1573,18 +1616,15 @@ private: void readOther(const e57::Node& node, Proto& proto) { - proto.sdb.emplace_back( - imfi - , node.elementName() - , proto.nil.data() - , buf_size - , true - , true + proto.sdb.emplace_back(imfi, node.elementName(), proto.nil.data(), buf_size, true, true ); } - void processProto(e57::CompressedVectorNode& cvn, const Proto& proto, bool hasPlacement, const Base::Placement& plm) + void processProto(e57::CompressedVectorNode& cvn, + const Proto& proto, + bool hasPlacement, + const Base::Placement& plm) { if (proto.cnt_xyz != 3) { throw Base::BadFormatError("Missing channels xyz"); @@ -1603,7 +1643,9 @@ private: for (size_t i = 0; i < count; ++i) { filter = false; if (hasState) { - if (proto.state[i] != 0) { filter = true; } + if (proto.state[i] != 0) { + filter = true; + } } pt = getCoord(proto, i, hasPlacement, plm); @@ -1631,7 +1673,8 @@ private: } } - Base::Vector3d getCoord(const Proto& proto, size_t index, bool hasPlacement, const Base::Placement& plm) const + Base::Vector3d + getCoord(const Proto& proto, size_t index, bool hasPlacement, const Base::Placement& plm) const { Base::Vector3d pt; pt.x = proto.xData[index]; @@ -1643,7 +1686,8 @@ private: return pt; } - Base::Vector3f getNormal(const Proto& proto, size_t index, bool hasPlacement, const Base::Rotation& rot) const + Base::Vector3f + getNormal(const Proto& proto, size_t index, bool hasPlacement, const Base::Rotation& rot) const { Base::Vector3f pt; pt.x = proto.xNormal[index]; @@ -1685,7 +1729,7 @@ private: bool getPlacement(const e57::StructureNode& scan_data, Base::Placement& plm) const { - bool hasPlacement{false}; + bool hasPlacement {false}; if (scan_data.isDefined("pose")) { e57::StructureNode pose(scan_data.get("pose")); if (pose.isDefined("rotation")) { @@ -1724,14 +1768,13 @@ private: PointKernel points; std::vector normals; }; -} +} // namespace -E57Reader::E57Reader(bool Color, bool State, double Distance) - : useColor{Color} - , checkState{State} - , minDistance{Distance} -{ -} +E57Reader::E57Reader(bool Color, bool State, double Distance) + : useColor {Color} + , checkState {State} + , minDistance {Distance} +{} void E57Reader::read(const std::string& filename) { @@ -1753,7 +1796,8 @@ void E57Reader::read(const std::string& filename) // ---------------------------------------------------------------------------- -Writer::Writer(const PointKernel& p) : points(p) +Writer::Writer(const PointKernel& p) + : points(p) { width = p.size(); height = 1; @@ -1793,9 +1837,9 @@ void Writer::setPlacement(const Base::Placement& p) // ---------------------------------------------------------------------------- -AscWriter::AscWriter(const PointKernel& p) : Writer(p) -{ -} +AscWriter::AscWriter(const PointKernel& p) + : Writer(p) +{} void AscWriter::write(const std::string& filename) { @@ -1811,9 +1855,9 @@ void AscWriter::write(const std::string& filename) // ---------------------------------------------------------------------------- -PlyWriter::PlyWriter(const PointKernel& p) : Writer(p) -{ -} +PlyWriter::PlyWriter(const PointKernel& p) + : Writer(p) +{} void PlyWriter::write(const std::string& filename) { @@ -1862,55 +1906,54 @@ void PlyWriter::write(const std::string& filename) std::size_t numPoints = points.size(); std::size_t numValid = 0; const std::vector& pts = points.getBasicPoints(); - for (std::size_t i=0; i(pts[i]); placement.multVec(tmp, tmp); - data(i,0) = static_cast(tmp.x); - data(i,1) = static_cast(tmp.y); - data(i,2) = static_cast(tmp.z); + data(i, 0) = static_cast(tmp.x); + data(i, 1) = static_cast(tmp.y); + data(i, 2) = static_cast(tmp.z); } } std::size_t col = 3; if (hasNormals) { int col0 = col; - int col1 = col+1; - int col2 = col+2; + int col1 = col + 1; + int col2 = col + 2; Base::Rotation rot = placement.getRotation(); if (rot.isIdentity()) { - for (std::size_t i=0; i(normals[i]); rot.multVec(tmp, tmp); - data(i,col0) = static_cast(tmp.x); - data(i,col1) = static_cast(tmp.y); - data(i,col2) = static_cast(tmp.z); + data(i, col0) = static_cast(tmp.x); + data(i, col1) = static_cast(tmp.y); + data(i, col2) = static_cast(tmp.z); } } col += 3; @@ -1918,22 +1961,22 @@ void PlyWriter::write(const std::string& filename) if (hasColors) { int col0 = col; - int col1 = col+1; - int col2 = col+2; - int col3 = col+3; - for (std::size_t i=0; itoString(value) << " "; } out << std::endl; @@ -1966,9 +2013,9 @@ void PlyWriter::write(const std::string& filename) // ---------------------------------------------------------------------------- -PcdWriter::PcdWriter(const PointKernel& p) : Writer(p) -{ -} +PcdWriter::PcdWriter(const PointKernel& p) + : Writer(p) +{} void PcdWriter::write(const std::string& filename) { @@ -2024,91 +2071,94 @@ void PcdWriter::write(const std::string& filename) Eigen::MatrixXd data(numPoints, fields.size()); if (placement.isIdentity()) { - for (std::size_t i=0; i(pts[i]); placement.multVec(tmp, tmp); - data(i,0) = static_cast(tmp.x); - data(i,1) = static_cast(tmp.y); - data(i,2) = static_cast(tmp.z); + data(i, 0) = static_cast(tmp.x); + data(i, 1) = static_cast(tmp.y); + data(i, 2) = static_cast(tmp.z); } } std::size_t col = 3; if (hasNormals) { int col0 = col; - int col1 = col+1; - int col2 = col+2; + int col1 = col + 1; + int col2 = col + 2; Base::Rotation rot = placement.getRotation(); if (rot.isIdentity()) { - for (std::size_t i=0; i(normals[i]); rot.multVec(tmp, tmp); - data(i,col0) = static_cast(tmp.x); - data(i,col1) = static_cast(tmp.y); - data(i,col2) = static_cast(tmp.z); + data(i, col0) = static_cast(tmp.x); + data(i, col1) = static_cast(tmp.y); + data(i, col2) = static_cast(tmp.z); } } col += 3; } if (hasColors) { - for (std::size_t i=0; itoString(value) << " "; + } } out << std::endl; } diff --git a/src/Mod/Points/App/PointsAlgos.h b/src/Mod/Points/App/PointsAlgos.h index 0518c67f52..4743d225bf 100644 --- a/src/Mod/Points/App/PointsAlgos.h +++ b/src/Mod/Points/App/PointsAlgos.h @@ -39,10 +39,10 @@ class PointsExport PointsAlgos public: /** Load a point cloud */ - static void Load(PointKernel&, const char *FileName); + static void Load(PointKernel&, const char* FileName); /** Load a point cloud */ - static void LoadAscii(PointKernel&, const char *FileName); + static void LoadAscii(PointKernel&, const char* FileName); }; class Reader @@ -73,51 +73,61 @@ protected: int width, height; }; -class AscReader : public Reader +class AscReader: public Reader { public: AscReader(); void read(const std::string& filename) override; }; -class PlyReader : public Reader +class PlyReader: public Reader { public: PlyReader(); void read(const std::string& filename) override; private: - std::size_t readHeader(std::istream&, std::string& format, std::size_t& offset, - std::vector& fields, std::vector& types, - std::vector& sizes); + std::size_t readHeader(std::istream&, + std::string& format, + std::size_t& offset, + std::vector& fields, + std::vector& types, + std::vector& sizes); void readAscii(std::istream&, std::size_t offset, Eigen::MatrixXd& data); - void readBinary(bool swapByteOrder, std::istream&, std::size_t offset, - const std::vector& types, - const std::vector& sizes, - Eigen::MatrixXd& data); + void readBinary(bool swapByteOrder, + std::istream&, + std::size_t offset, + const std::vector& types, + const std::vector& sizes, + Eigen::MatrixXd& data); }; -class PcdReader : public Reader +class PcdReader: public Reader { public: PcdReader(); void read(const std::string& filename) override; private: - std::size_t readHeader(std::istream&, std::string& format, std::vector& fields, - std::vector& types, std::vector& sizes); + std::size_t readHeader(std::istream&, + std::string& format, + std::vector& fields, + std::vector& types, + std::vector& sizes); void readAscii(std::istream&, Eigen::MatrixXd& data); - void readBinary(bool transpose, std::istream&, - const std::vector& types, - const std::vector& sizes, - Eigen::MatrixXd& data); + void readBinary(bool transpose, + std::istream&, + const std::vector& types, + const std::vector& sizes, + Eigen::MatrixXd& data); }; -class E57Reader : public Reader +class E57Reader: public Reader { public: E57Reader(bool Color, bool State, double Distance); void read(const std::string& filename) override; + protected: bool useColor, checkState; double minDistance; @@ -146,28 +156,28 @@ protected: Base::Placement placement; }; -class AscWriter : public Writer +class AscWriter: public Writer { public: explicit AscWriter(const PointKernel&); void write(const std::string& filename) override; }; -class PlyWriter : public Writer +class PlyWriter: public Writer { public: explicit PlyWriter(const PointKernel&); void write(const std::string& filename) override; }; -class PcdWriter : public Writer +class PcdWriter: public Writer { public: explicit PcdWriter(const PointKernel&); void write(const std::string& filename) override; }; -} // namespace Points +} // namespace Points #endif diff --git a/src/Mod/Points/App/PointsFeature.cpp b/src/Mod/Points/App/PointsFeature.cpp index ffb1ec73bb..3467a29518 100644 --- a/src/Mod/Points/App/PointsFeature.cpp +++ b/src/Mod/Points/App/PointsFeature.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "PointsFeature.h" @@ -47,18 +47,18 @@ short Feature::mustExecute() const return 0; } -App::DocumentObjectExecReturn *Feature::execute() +App::DocumentObjectExecReturn* Feature::execute() { this->Points.touch(); return App::DocumentObject::StdReturn; } -void Feature::Restore(Base::XMLReader &reader) +void Feature::Restore(Base::XMLReader& reader) { GeoFeature::Restore(reader); } -void Feature::RestoreDocFile(Base::Reader &reader) +void Feature::RestoreDocFile(Base::Reader& reader) { // This gets only invoked if a points file has been added from Restore() Points.RestoreDocFile(reader); @@ -75,8 +75,9 @@ void Feature::onChanged(const App::Property* prop) try { Base::Placement p; p.fromMatrix(this->Points.getTransform()); - if (p != this->Placement.getValue()) + if (p != this->Placement.getValue()) { this->Placement.setValue(p); + } } catch (const Base::ValueError&) { } @@ -87,26 +88,29 @@ void Feature::onChanged(const App::Property* prop) // --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Points::FeatureCustom, Points::Feature) /// @endcond // explicit template instantiation template class PointsExport FeatureCustomT; -} +} // namespace App // --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Points::FeaturePython, Points::Feature) -template<> const char* Points::FeaturePython::getViewProviderName() const { +template<> +const char* Points::FeaturePython::getViewProviderName() const +{ return "PointsGui::ViewProviderPython"; } /// @endcond // explicit template instantiation template class PointsExport FeaturePythonT; -} - +} // namespace App diff --git a/src/Mod/Points/App/PointsFeature.h b/src/Mod/Points/App/PointsFeature.h index 3ccc82ffa0..f271c3621f 100644 --- a/src/Mod/Points/App/PointsFeature.h +++ b/src/Mod/Points/App/PointsFeature.h @@ -23,20 +23,22 @@ #ifndef POINTS_FEATURE_H #define POINTS_FEATURE_H -#include // must be first include #include #include +#include // must be first include #include #include "Points.h" #include "PropertyPointKernel.h" -namespace Base{ +namespace Base +{ class Writer; } -namespace App{ +namespace App +{ class Color; } @@ -48,7 +50,7 @@ class PointsFeaturePy; /** Base class of all Points feature classes in FreeCAD. * This class holds an PointsKernel object. */ -class PointsExport Feature : public App::GeoFeature +class PointsExport Feature: public App::GeoFeature { PROPERTY_HEADER_WITH_OVERRIDE(Points::Feature); @@ -58,19 +60,22 @@ public: /** @name methods override Feature */ //@{ - void Restore(Base::XMLReader &reader) override; - void RestoreDocFile(Base::Reader &reader) override; + void Restore(Base::XMLReader& reader) override; + void RestoreDocFile(Base::Reader& reader) override; short mustExecute() const override; /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "PointsGui::ViewProviderScattered"; } - const App::PropertyComplexGeoData* getPropertyOfGeometry() const override { + const App::PropertyComplexGeoData* getPropertyOfGeometry() const override + { return &Points; } + protected: void onChanged(const App::Property* prop) override; //@} @@ -82,7 +87,7 @@ public: using FeatureCustom = App::FeatureCustomT; using FeaturePython = App::FeaturePythonT; -} //namespace Points +} // namespace Points #endif diff --git a/src/Mod/Points/App/PointsGrid.cpp b/src/Mod/Points/App/PointsGrid.cpp index 0f624efda4..1a463cc72a 100644 --- a/src/Mod/Points/App/PointsGrid.cpp +++ b/src/Mod/Points/App/PointsGrid.cpp @@ -27,284 +27,347 @@ using namespace Points; -PointsGrid::PointsGrid (const PointKernel &rclM) -: _pclPoints(&rclM), - _ulCtElements(0), - _ulCtGridsX(0), _ulCtGridsY(0), _ulCtGridsZ(0), - _fGridLenX(0.0f), _fGridLenY(0.0f), _fGridLenZ(0.0f), - _fMinX(0.0f), _fMinY(0.0f), _fMinZ(0.0f) +PointsGrid::PointsGrid(const PointKernel& rclM) + : _pclPoints(&rclM) + , _ulCtElements(0) + , _ulCtGridsX(0) + , _ulCtGridsY(0) + , _ulCtGridsZ(0) + , _fGridLenX(0.0f) + , _fGridLenY(0.0f) + , _fGridLenZ(0.0f) + , _fMinX(0.0f) + , _fMinY(0.0f) + , _fMinZ(0.0f) { - RebuildGrid(); + RebuildGrid(); } -PointsGrid::PointsGrid () -: _pclPoints(nullptr), - _ulCtElements(0), - _ulCtGridsX(POINTS_CT_GRID), _ulCtGridsY(POINTS_CT_GRID), _ulCtGridsZ(POINTS_CT_GRID), - _fGridLenX(0.0f), _fGridLenY(0.0f), _fGridLenZ(0.0f), - _fMinX(0.0f), _fMinY(0.0f), _fMinZ(0.0f) +PointsGrid::PointsGrid() + : _pclPoints(nullptr) + , _ulCtElements(0) + , _ulCtGridsX(POINTS_CT_GRID) + , _ulCtGridsY(POINTS_CT_GRID) + , _ulCtGridsZ(POINTS_CT_GRID) + , _fGridLenX(0.0f) + , _fGridLenY(0.0f) + , _fGridLenZ(0.0f) + , _fMinX(0.0f) + , _fMinY(0.0f) + , _fMinZ(0.0f) +{} + +PointsGrid::PointsGrid(const PointKernel& rclM, + unsigned long ulX, + unsigned long ulY, + unsigned long ulZ) + : _pclPoints(&rclM) + , _ulCtElements(0) + , _ulCtGridsX(0) + , _ulCtGridsY(0) + , _ulCtGridsZ(0) + , _fGridLenX(0.0f) + , _fGridLenY(0.0f) + , _fGridLenZ(0.0f) + , _fMinX(0.0f) + , _fMinY(0.0f) + , _fMinZ(0.0f) { + Rebuild(ulX, ulY, ulZ); } -PointsGrid::PointsGrid (const PointKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ) -: _pclPoints(&rclM), - _ulCtElements(0), - _ulCtGridsX(0), _ulCtGridsY(0), _ulCtGridsZ(0), - _fGridLenX(0.0f), _fGridLenY(0.0f), _fGridLenZ(0.0f), - _fMinX(0.0f), _fMinY(0.0f), _fMinZ(0.0f) +PointsGrid::PointsGrid(const PointKernel& rclM, int iCtGridPerAxis) + : _pclPoints(&rclM) + , _ulCtElements(0) + , _ulCtGridsX(0) + , _ulCtGridsY(0) + , _ulCtGridsZ(0) + , _fGridLenX(0.0f) + , _fGridLenY(0.0f) + , _fGridLenZ(0.0f) + , _fMinX(0.0f) + , _fMinY(0.0f) + , _fMinZ(0.0f) { - Rebuild(ulX, ulY, ulZ); + Rebuild(iCtGridPerAxis); } -PointsGrid::PointsGrid (const PointKernel &rclM, int iCtGridPerAxis) -: _pclPoints(&rclM), - _ulCtElements(0), - _ulCtGridsX(0), _ulCtGridsY(0), _ulCtGridsZ(0), - _fGridLenX(0.0f), _fGridLenY(0.0f), _fGridLenZ(0.0f), - _fMinX(0.0f), _fMinY(0.0f), _fMinZ(0.0f) +PointsGrid::PointsGrid(const PointKernel& rclM, double fGridLen) + : _pclPoints(&rclM) + , _ulCtElements(0) + , _ulCtGridsX(0) + , _ulCtGridsY(0) + , _ulCtGridsZ(0) + , _fGridLenX(0.0f) + , _fGridLenY(0.0f) + , _fGridLenZ(0.0f) + , _fMinX(0.0f) + , _fMinY(0.0f) + , _fMinZ(0.0f) { - Rebuild(iCtGridPerAxis); + Base::BoundBox3d clBBPts; // = _pclPoints->GetBoundBox(); + for (const auto& pnt : *_pclPoints) { + clBBPts.Add(pnt); + } + Rebuild(std::max((unsigned long)(clBBPts.LengthX() / fGridLen), 1), + std::max((unsigned long)(clBBPts.LengthY() / fGridLen), 1), + std::max((unsigned long)(clBBPts.LengthZ() / fGridLen), 1)); } -PointsGrid::PointsGrid (const PointKernel &rclM, double fGridLen) -: _pclPoints(&rclM), - _ulCtElements(0), - _ulCtGridsX(0), _ulCtGridsY(0), _ulCtGridsZ(0), - _fGridLenX(0.0f), _fGridLenY(0.0f), _fGridLenZ(0.0f), - _fMinX(0.0f), _fMinY(0.0f), _fMinZ(0.0f) +void PointsGrid::Attach(const PointKernel& rclM) { - Base::BoundBox3d clBBPts;// = _pclPoints->GetBoundBox(); - for (const auto & pnt : *_pclPoints) - clBBPts.Add(pnt); - Rebuild(std::max((unsigned long)(clBBPts.LengthX() / fGridLen), 1), - std::max((unsigned long)(clBBPts.LengthY() / fGridLen), 1), - std::max((unsigned long)(clBBPts.LengthZ() / fGridLen), 1)); + _pclPoints = &rclM; + RebuildGrid(); } -void PointsGrid::Attach (const PointKernel &rclM) +void PointsGrid::Clear() { - _pclPoints = &rclM; - RebuildGrid(); + _aulGrid.clear(); + _pclPoints = nullptr; } -void PointsGrid::Clear () +void PointsGrid::Rebuild(unsigned long ulX, unsigned long ulY, unsigned long ulZ) { - _aulGrid.clear(); - _pclPoints = nullptr; + _ulCtGridsX = ulX; + _ulCtGridsY = ulY; + _ulCtGridsZ = ulZ; + _ulCtElements = HasElements(); + RebuildGrid(); } -void PointsGrid::Rebuild (unsigned long ulX, unsigned long ulY, unsigned long ulZ) +void PointsGrid::Rebuild(unsigned long ulPerGrid, unsigned long ulMaxGrid) { - _ulCtGridsX = ulX; - _ulCtGridsY = ulY; - _ulCtGridsZ = ulZ; - _ulCtElements = HasElements(); - RebuildGrid(); + _ulCtElements = HasElements(); + CalculateGridLength(ulPerGrid, ulMaxGrid); + RebuildGrid(); } -void PointsGrid::Rebuild (unsigned long ulPerGrid, unsigned long ulMaxGrid) +void PointsGrid::Rebuild(int iCtGridPerAxis) { - _ulCtElements = HasElements(); - CalculateGridLength(ulPerGrid, ulMaxGrid); - RebuildGrid(); + _ulCtElements = HasElements(); + CalculateGridLength(iCtGridPerAxis); + RebuildGrid(); } -void PointsGrid::Rebuild (int iCtGridPerAxis) +void PointsGrid::InitGrid() { - _ulCtElements = HasElements(); - CalculateGridLength(iCtGridPerAxis); - RebuildGrid(); -} + assert(_pclPoints); -void PointsGrid::InitGrid () -{ - assert(_pclPoints); + unsigned long i, j; - unsigned long i, j; - - // Calculate grid lengths if not initialized - // - if ((_ulCtGridsX == 0) || (_ulCtGridsY == 0) || (_ulCtGridsZ == 0)) - CalculateGridLength(POINTS_CT_GRID, POINTS_MAX_GRIDS); - - // Determine the grid length and offset - // - { - Base::BoundBox3d clBBPts;// = _pclPoints->GetBoundBox(); - for (const auto & pnt : *_pclPoints) - clBBPts.Add(pnt); - - double fLengthX = clBBPts.LengthX(); - double fLengthY = clBBPts.LengthY(); - double fLengthZ = clBBPts.LengthZ(); - - { - // Offset fGridLen/2 + // Calculate grid lengths if not initialized // - unsigned long num = _ulCtGridsX; - if (num == 0) - num = 1; - _fGridLenX = (1.0f + fLengthX) / double(num); - _fMinX = clBBPts.MinX - 0.5f; - } - - { - unsigned long num = _ulCtGridsY; - if (num == 0) - num = 1; - _fGridLenY = (1.0f + fLengthY) / double(num); - _fMinY = clBBPts.MinY - 0.5f; - } - - { - unsigned long num = _ulCtGridsZ; - if (num == 0) - num = 1; - _fGridLenZ = (1.0f + fLengthZ) / double(num); - _fMinZ = clBBPts.MinZ - 0.5f; - } - } - - // Create data structure - _aulGrid.clear(); - _aulGrid.resize(_ulCtGridsX); - for (i = 0; i < _ulCtGridsX; i++) - { - _aulGrid[i].resize(_ulCtGridsY); - for (j = 0; j < _ulCtGridsY; j++) - _aulGrid[i][j].resize(_ulCtGridsZ); - } -} - -unsigned long PointsGrid::InSide (const Base::BoundBox3d &rclBB, std::vector &raulElements, bool bDelDoubles) const -{ - unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - - raulElements.clear(); - - // Grid boxes for a more detailed selection - Position(Base::Vector3d(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); - Position(Base::Vector3d(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); - - for (i = ulMinX; i <= ulMaxX; i++) - { - for (j = ulMinY; j <= ulMaxY; j++) - { - for (k = ulMinZ; k <= ulMaxZ; k++) - { - raulElements.insert(raulElements.end(), _aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); - } + if ((_ulCtGridsX == 0) || (_ulCtGridsY == 0) || (_ulCtGridsZ == 0)) { + CalculateGridLength(POINTS_CT_GRID, POINTS_MAX_GRIDS); } - } - if (bDelDoubles) - { - // remove duplicate mentions - std::sort(raulElements.begin(), raulElements.end()); - raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), raulElements.end()); - } - - return raulElements.size(); -} - -unsigned long PointsGrid::InSide (const Base::BoundBox3d &rclBB, std::vector &raulElements, const Base::Vector3d &rclOrg, double fMaxDist, bool bDelDoubles) const -{ - unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - double fGridDiag = GetBoundBox(0, 0, 0).CalcDiagonalLength(); - double fMinDistP2 = (fGridDiag * fGridDiag) + (fMaxDist * fMaxDist); - - raulElements.clear(); - - // Grid boxes for a more detailed selection - Position(Base::Vector3d(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); - Position(Base::Vector3d(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); - - for (i = ulMinX; i <= ulMaxX; i++) - { - for (j = ulMinY; j <= ulMaxY; j++) + // Determine the grid length and offset + // { - for (k = ulMinZ; k <= ulMaxZ; k++) - { - if (Base::DistanceP2(GetBoundBox(i, j, k).GetCenter(), rclOrg) < fMinDistP2) - raulElements.insert(raulElements.end(), _aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); - } + Base::BoundBox3d clBBPts; // = _pclPoints->GetBoundBox(); + for (const auto& pnt : *_pclPoints) { + clBBPts.Add(pnt); + } + + double fLengthX = clBBPts.LengthX(); + double fLengthY = clBBPts.LengthY(); + double fLengthZ = clBBPts.LengthZ(); + + { + // Offset fGridLen/2 + // + unsigned long num = _ulCtGridsX; + if (num == 0) { + num = 1; + } + _fGridLenX = (1.0f + fLengthX) / double(num); + _fMinX = clBBPts.MinX - 0.5f; + } + + { + unsigned long num = _ulCtGridsY; + if (num == 0) { + num = 1; + } + _fGridLenY = (1.0f + fLengthY) / double(num); + _fMinY = clBBPts.MinY - 0.5f; + } + + { + unsigned long num = _ulCtGridsZ; + if (num == 0) { + num = 1; + } + _fGridLenZ = (1.0f + fLengthZ) / double(num); + _fMinZ = clBBPts.MinZ - 0.5f; + } } - } - if (bDelDoubles) - { - // remove duplicate mentions - std::sort(raulElements.begin(), raulElements.end()); - raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), raulElements.end()); - } - - return raulElements.size(); -} - -unsigned long PointsGrid::InSide (const Base::BoundBox3d &rclBB, std::set &raulElements) const -{ - unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - - raulElements.clear(); - - // Grid boxes for a more detailed selection - Position(Base::Vector3d(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); - Position(Base::Vector3d(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); - - for (i = ulMinX; i <= ulMaxX; i++) - { - for (j = ulMinY; j <= ulMaxY; j++) - { - for (k = ulMinZ; k <= ulMaxZ; k++) - { - raulElements.insert(_aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); - } + // Create data structure + _aulGrid.clear(); + _aulGrid.resize(_ulCtGridsX); + for (i = 0; i < _ulCtGridsX; i++) { + _aulGrid[i].resize(_ulCtGridsY); + for (j = 0; j < _ulCtGridsY; j++) { + _aulGrid[i][j].resize(_ulCtGridsZ); + } } - } - - return raulElements.size(); } -void PointsGrid::Position (const Base::Vector3d &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const +unsigned long PointsGrid::InSide(const Base::BoundBox3d& rclBB, + std::vector& raulElements, + bool bDelDoubles) const { - if (rclPoint.x <= _fMinX) - rulX = 0; - else - rulX = std::min((unsigned long)((rclPoint.x - _fMinX) / _fGridLenX), _ulCtGridsX - 1); + unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - if (rclPoint.y <= _fMinY) - rulY = 0; - else - rulY = std::min((unsigned long)((rclPoint.y - _fMinY) / _fGridLenY), _ulCtGridsY - 1); + raulElements.clear(); - if (rclPoint.z <= _fMinZ) - rulZ = 0; - else - rulZ = std::min((unsigned long)((rclPoint.z - _fMinZ) / _fGridLenZ), _ulCtGridsZ - 1); + // Grid boxes for a more detailed selection + Position(Base::Vector3d(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); + Position(Base::Vector3d(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); + + for (i = ulMinX; i <= ulMaxX; i++) { + for (j = ulMinY; j <= ulMaxY; j++) { + for (k = ulMinZ; k <= ulMaxZ; k++) { + raulElements.insert(raulElements.end(), + _aulGrid[i][j][k].begin(), + _aulGrid[i][j][k].end()); + } + } + } + + if (bDelDoubles) { + // remove duplicate mentions + std::sort(raulElements.begin(), raulElements.end()); + raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), + raulElements.end()); + } + + return raulElements.size(); } -void PointsGrid::CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMaxGrids) +unsigned long PointsGrid::InSide(const Base::BoundBox3d& rclBB, + std::vector& raulElements, + const Base::Vector3d& rclOrg, + double fMaxDist, + bool bDelDoubles) const +{ + unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; + double fGridDiag = GetBoundBox(0, 0, 0).CalcDiagonalLength(); + double fMinDistP2 = (fGridDiag * fGridDiag) + (fMaxDist * fMaxDist); + + raulElements.clear(); + + // Grid boxes for a more detailed selection + Position(Base::Vector3d(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); + Position(Base::Vector3d(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); + + for (i = ulMinX; i <= ulMaxX; i++) { + for (j = ulMinY; j <= ulMaxY; j++) { + for (k = ulMinZ; k <= ulMaxZ; k++) { + if (Base::DistanceP2(GetBoundBox(i, j, k).GetCenter(), rclOrg) < fMinDistP2) { + raulElements.insert(raulElements.end(), + _aulGrid[i][j][k].begin(), + _aulGrid[i][j][k].end()); + } + } + } + } + + if (bDelDoubles) { + // remove duplicate mentions + std::sort(raulElements.begin(), raulElements.end()); + raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), + raulElements.end()); + } + + return raulElements.size(); +} + +unsigned long PointsGrid::InSide(const Base::BoundBox3d& rclBB, + std::set& raulElements) const +{ + unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; + + raulElements.clear(); + + // Grid boxes for a more detailed selection + Position(Base::Vector3d(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); + Position(Base::Vector3d(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); + + for (i = ulMinX; i <= ulMaxX; i++) { + for (j = ulMinY; j <= ulMaxY; j++) { + for (k = ulMinZ; k <= ulMaxZ; k++) { + raulElements.insert(_aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); + } + } + } + + return raulElements.size(); +} + +void PointsGrid::Position(const Base::Vector3d& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const +{ + if (rclPoint.x <= _fMinX) { + rulX = 0; + } + else { + rulX = std::min((unsigned long)((rclPoint.x - _fMinX) / _fGridLenX), + _ulCtGridsX - 1); + } + + if (rclPoint.y <= _fMinY) { + rulY = 0; + } + else { + rulY = std::min((unsigned long)((rclPoint.y - _fMinY) / _fGridLenY), + _ulCtGridsY - 1); + } + + if (rclPoint.z <= _fMinZ) { + rulZ = 0; + } + else { + rulZ = std::min((unsigned long)((rclPoint.z - _fMinZ) / _fGridLenZ), + _ulCtGridsZ - 1); + } +} + +void PointsGrid::CalculateGridLength(unsigned long ulCtGrid, unsigned long ulMaxGrids) { // Calculate grid lengths or number of grids per dimension // There should be about 10 (?!?!) facets per grid // or max grids should not exceed 10000 - Base::BoundBox3d clBBPtsEnlarged;// = _pclPoints->GetBoundBox(); - for (const auto & pnt : *_pclPoints) + Base::BoundBox3d clBBPtsEnlarged; // = _pclPoints->GetBoundBox(); + for (const auto& pnt : *_pclPoints) { clBBPtsEnlarged.Add(pnt); + } double fVolElem; - if (_ulCtElements > (ulMaxGrids * ulCtGrid)) - fVolElem = (clBBPtsEnlarged.LengthX() * clBBPtsEnlarged.LengthY() * clBBPtsEnlarged.LengthZ()) / float(ulMaxGrids * ulCtGrid); - else - fVolElem = (clBBPtsEnlarged.LengthX() * clBBPtsEnlarged.LengthY() * clBBPtsEnlarged.LengthZ()) / float(_ulCtElements); + if (_ulCtElements > (ulMaxGrids * ulCtGrid)) { + fVolElem = + (clBBPtsEnlarged.LengthX() * clBBPtsEnlarged.LengthY() * clBBPtsEnlarged.LengthZ()) + / float(ulMaxGrids * ulCtGrid); + } + else { + fVolElem = + (clBBPtsEnlarged.LengthX() * clBBPtsEnlarged.LengthY() * clBBPtsEnlarged.LengthZ()) + / float(_ulCtElements); + } - double fVol = fVolElem * float(ulCtGrid); - double fGridLen = float(pow((float)fVol,(float) 1.0f / 3.0f)); + double fVol = fVolElem * float(ulCtGrid); + double fGridLen = float(pow((float)fVol, (float)1.0f / 3.0f)); if (fGridLen > 0) { - _ulCtGridsX = std::max((unsigned long)(clBBPtsEnlarged.LengthX() / fGridLen), 1); - _ulCtGridsY = std::max((unsigned long)(clBBPtsEnlarged.LengthY() / fGridLen), 1); - _ulCtGridsZ = std::max((unsigned long)(clBBPtsEnlarged.LengthZ() / fGridLen), 1); + _ulCtGridsX = + std::max((unsigned long)(clBBPtsEnlarged.LengthX() / fGridLen), 1); + _ulCtGridsY = + std::max((unsigned long)(clBBPtsEnlarged.LengthY() / fGridLen), 1); + _ulCtGridsZ = + std::max((unsigned long)(clBBPtsEnlarged.LengthZ() / fGridLen), 1); } else { // Degenerated grid @@ -314,511 +377,535 @@ void PointsGrid::CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMa } } -void PointsGrid::CalculateGridLength (int iCtGridPerAxis) +void PointsGrid::CalculateGridLength(int iCtGridPerAxis) { - if (iCtGridPerAxis<=0) - { - CalculateGridLength(POINTS_CT_GRID, POINTS_MAX_GRIDS); - return; - } - - // Calculate grid lengths or number of grids per dimension - // There should be about 10 (?!?!) facets per grid - // or max grids should not exceed 10000 - Base::BoundBox3d clBBPts;// = _pclPoints->GetBoundBox(); - for (const auto & pnt : *_pclPoints) - clBBPts.Add(pnt); - - double fLenghtX = clBBPts.LengthX(); - double fLenghtY = clBBPts.LengthY(); - double fLenghtZ = clBBPts.LengthZ(); - - double fLenghtD = clBBPts.CalcDiagonalLength(); - - double fLengthTol = 0.05f * fLenghtD; - - bool bLenghtXisZero = (fLenghtX <= fLengthTol); - bool bLenghtYisZero = (fLenghtY <= fLengthTol); - bool bLenghtZisZero = (fLenghtZ <= fLengthTol); - - int iFlag = 0; - - int iMaxGrids = 1; - - if (bLenghtXisZero) - iFlag += 1; - else - iMaxGrids *= iCtGridPerAxis; - - if (bLenghtYisZero) - iFlag += 2; - else - iMaxGrids *= iCtGridPerAxis; - - if (bLenghtZisZero) - iFlag += 4; - else - iMaxGrids *= iCtGridPerAxis; - - unsigned long ulGridsFacets = 10; - - double fFactorVolumen = 40.0; - double fFactorArea = 10.0; - - switch (iFlag) - { - case 0: - { - double fVolumen = fLenghtX * fLenghtY * fLenghtZ; - - double fVolumenGrid = (fVolumen * ulGridsFacets) / (fFactorVolumen * _ulCtElements); - - if ((fVolumenGrid * iMaxGrids) < fVolumen) - fVolumenGrid = fVolumen / (float)iMaxGrids; - - double fLengthGrid = float(pow((float)fVolumenGrid,(float) 1.0f / 3.0f)); - - _ulCtGridsX = std::max((unsigned long)(fLenghtX / fLengthGrid), 1); - _ulCtGridsY = std::max((unsigned long)(fLenghtY / fLengthGrid), 1); - _ulCtGridsZ = std::max((unsigned long)(fLenghtZ / fLengthGrid), 1); - - } break; - case 1: - { - _ulCtGridsX = 1; // bLenghtXisZero - - double fArea = fLenghtY * fLenghtZ; - - double fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); - - if ((fAreaGrid * iMaxGrids) < fArea) - fAreaGrid = fArea / (double)iMaxGrids; - - double fLengthGrid = double(sqrt(fAreaGrid)); - - _ulCtGridsY = std::max((unsigned long)(fLenghtY / fLengthGrid), 1); - _ulCtGridsZ = std::max((unsigned long)(fLenghtZ / fLengthGrid), 1); - } break; - case 2: - { - _ulCtGridsY = 1; // bLenghtYisZero - - double fArea = fLenghtX * fLenghtZ; - - double fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); - - if ((fAreaGrid * iMaxGrids) < fArea) - fAreaGrid = fArea / (double)iMaxGrids; - - double fLengthGrid = double(sqrt(fAreaGrid)); - - _ulCtGridsX = std::max((unsigned long)(fLenghtX / fLengthGrid), 1); - _ulCtGridsZ = std::max((unsigned long)(fLenghtZ / fLengthGrid), 1); - } break; - case 3: - { - _ulCtGridsX = 1; // bLenghtXisZero - _ulCtGridsY = 1; // bLenghtYisZero - _ulCtGridsZ = iMaxGrids; // bLenghtYisZero - } break; - case 4: - { - _ulCtGridsZ = 1; // bLenghtZisZero - - double fArea = fLenghtX * fLenghtY; - - double fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); - - if ((fAreaGrid * iMaxGrids) < fArea) - fAreaGrid = fArea / (float)iMaxGrids; - - double fLengthGrid = double(sqrt(fAreaGrid)); - - _ulCtGridsX = std::max((unsigned long)(fLenghtX / fLengthGrid), 1); - _ulCtGridsY = std::max((unsigned long)(fLenghtY / fLengthGrid), 1); - } break; - case 5: - { - _ulCtGridsX = 1; // bLenghtXisZero - _ulCtGridsZ = 1; // bLenghtZisZero - _ulCtGridsY = iMaxGrids; // bLenghtYisZero - } break; - case 6: - { - _ulCtGridsY = 1; // bLenghtYisZero - _ulCtGridsZ = 1; // bLenghtZisZero - _ulCtGridsX = iMaxGrids; // bLenghtYisZero - } break; - case 7: - { - _ulCtGridsX = iMaxGrids; // bLenghtXisZero - _ulCtGridsY = iMaxGrids; // bLenghtYisZero - _ulCtGridsZ = iMaxGrids; // bLenghtZisZero - } break; - } -} - -void PointsGrid::SearchNearestFromPoint (const Base::Vector3d &rclPt, std::set &raclInd) const -{ - raclInd.clear(); - Base::BoundBox3d clBB = GetBoundBox(); - - if (clBB.IsInBox(rclPt)) - { // Point lies within - unsigned long ulX, ulY, ulZ; - Position(rclPt, ulX, ulY, ulZ); - //int nX = ulX, nY = ulY, nZ = ulZ; - unsigned long ulLevel = 0; - while (raclInd.empty()) - GetHull(ulX, ulY, ulZ, ulLevel++, raclInd); - GetHull(ulX, ulY, ulZ, ulLevel, raclInd); - } - else - { // Point outside - Base::BoundBox3d::SIDE tSide = clBB.GetSideFromRay(rclPt, clBB.GetCenter() - rclPt); - switch (tSide) - { - case Base::BoundBox3d::RIGHT: - { - int nX = 0; - while (raclInd.empty()) - { - for (unsigned long i = 0; i < _ulCtGridsY; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); - } - nX++; - } - break; - } - case Base::BoundBox3d::LEFT: - { - int nX = _ulCtGridsX - 1; - while (raclInd.empty()) - { - for (unsigned long i = 0; i < _ulCtGridsY; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); - } - nX++; - } - break; - } - case Base::BoundBox3d::TOP: - { - int nY = 0; - while (raclInd.empty()) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); - } - nY++; - } - break; - } - case Base::BoundBox3d::BOTTOM: - { - int nY = _ulCtGridsY - 1; - while (raclInd.empty()) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); - } - nY--; - } - break; - } - case Base::BoundBox3d::BACK: - { - int nZ = 0; - while (raclInd.empty()) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsY; j++) - raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); - } - nZ++; - } - break; - } - case Base::BoundBox3d::FRONT: - { - int nZ = _ulCtGridsZ - 1; - while (raclInd.empty()) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsY; j++) - raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); - } - nZ--; - } - break; - } - - default: - break; + if (iCtGridPerAxis <= 0) { + CalculateGridLength(POINTS_CT_GRID, POINTS_MAX_GRIDS); + return; + } + + // Calculate grid lengths or number of grids per dimension + // There should be about 10 (?!?!) facets per grid + // or max grids should not exceed 10000 + Base::BoundBox3d clBBPts; // = _pclPoints->GetBoundBox(); + for (const auto& pnt : *_pclPoints) { + clBBPts.Add(pnt); + } + + double fLenghtX = clBBPts.LengthX(); + double fLenghtY = clBBPts.LengthY(); + double fLenghtZ = clBBPts.LengthZ(); + + double fLenghtD = clBBPts.CalcDiagonalLength(); + + double fLengthTol = 0.05f * fLenghtD; + + bool bLenghtXisZero = (fLenghtX <= fLengthTol); + bool bLenghtYisZero = (fLenghtY <= fLengthTol); + bool bLenghtZisZero = (fLenghtZ <= fLengthTol); + + int iFlag = 0; + + int iMaxGrids = 1; + + if (bLenghtXisZero) { + iFlag += 1; + } + else { + iMaxGrids *= iCtGridPerAxis; + } + + if (bLenghtYisZero) { + iFlag += 2; + } + else { + iMaxGrids *= iCtGridPerAxis; + } + + if (bLenghtZisZero) { + iFlag += 4; + } + else { + iMaxGrids *= iCtGridPerAxis; + } + + unsigned long ulGridsFacets = 10; + + double fFactorVolumen = 40.0; + double fFactorArea = 10.0; + + switch (iFlag) { + case 0: { + double fVolumen = fLenghtX * fLenghtY * fLenghtZ; + + double fVolumenGrid = (fVolumen * ulGridsFacets) / (fFactorVolumen * _ulCtElements); + + if ((fVolumenGrid * iMaxGrids) < fVolumen) { + fVolumenGrid = fVolumen / (float)iMaxGrids; + } + + double fLengthGrid = float(pow((float)fVolumenGrid, (float)1.0f / 3.0f)); + + _ulCtGridsX = std::max((unsigned long)(fLenghtX / fLengthGrid), 1); + _ulCtGridsY = std::max((unsigned long)(fLenghtY / fLengthGrid), 1); + _ulCtGridsZ = std::max((unsigned long)(fLenghtZ / fLengthGrid), 1); + + } break; + case 1: { + _ulCtGridsX = 1; // bLenghtXisZero + + double fArea = fLenghtY * fLenghtZ; + + double fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); + + if ((fAreaGrid * iMaxGrids) < fArea) { + fAreaGrid = fArea / (double)iMaxGrids; + } + + double fLengthGrid = double(sqrt(fAreaGrid)); + + _ulCtGridsY = std::max((unsigned long)(fLenghtY / fLengthGrid), 1); + _ulCtGridsZ = std::max((unsigned long)(fLenghtZ / fLengthGrid), 1); + } break; + case 2: { + _ulCtGridsY = 1; // bLenghtYisZero + + double fArea = fLenghtX * fLenghtZ; + + double fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); + + if ((fAreaGrid * iMaxGrids) < fArea) { + fAreaGrid = fArea / (double)iMaxGrids; + } + + double fLengthGrid = double(sqrt(fAreaGrid)); + + _ulCtGridsX = std::max((unsigned long)(fLenghtX / fLengthGrid), 1); + _ulCtGridsZ = std::max((unsigned long)(fLenghtZ / fLengthGrid), 1); + } break; + case 3: { + _ulCtGridsX = 1; // bLenghtXisZero + _ulCtGridsY = 1; // bLenghtYisZero + _ulCtGridsZ = iMaxGrids; // bLenghtYisZero + } break; + case 4: { + _ulCtGridsZ = 1; // bLenghtZisZero + + double fArea = fLenghtX * fLenghtY; + + double fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); + + if ((fAreaGrid * iMaxGrids) < fArea) { + fAreaGrid = fArea / (float)iMaxGrids; + } + + double fLengthGrid = double(sqrt(fAreaGrid)); + + _ulCtGridsX = std::max((unsigned long)(fLenghtX / fLengthGrid), 1); + _ulCtGridsY = std::max((unsigned long)(fLenghtY / fLengthGrid), 1); + } break; + case 5: { + _ulCtGridsX = 1; // bLenghtXisZero + _ulCtGridsZ = 1; // bLenghtZisZero + _ulCtGridsY = iMaxGrids; // bLenghtYisZero + } break; + case 6: { + _ulCtGridsY = 1; // bLenghtYisZero + _ulCtGridsZ = 1; // bLenghtZisZero + _ulCtGridsX = iMaxGrids; // bLenghtYisZero + } break; + case 7: { + _ulCtGridsX = iMaxGrids; // bLenghtXisZero + _ulCtGridsY = iMaxGrids; // bLenghtYisZero + _ulCtGridsZ = iMaxGrids; // bLenghtZisZero + } break; } - } } -void PointsGrid::GetHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, - unsigned long ulDistance, std::set &raclInd) const +void PointsGrid::SearchNearestFromPoint(const Base::Vector3d& rclPt, + std::set& raclInd) const { - int nX1 = std::max(0, int(ulX) - int(ulDistance)); - int nY1 = std::max(0, int(ulY) - int(ulDistance)); - int nZ1 = std::max(0, int(ulZ) - int(ulDistance)); - int nX2 = std::min(int(_ulCtGridsX) - 1, int(ulX) + int(ulDistance)); - int nY2 = std::min(int(_ulCtGridsY) - 1, int(ulY) + int(ulDistance)); - int nZ2 = std::min(int(_ulCtGridsZ) - 1, int(ulZ) + int(ulDistance)); + raclInd.clear(); + Base::BoundBox3d clBB = GetBoundBox(); - int i, j; + if (clBB.IsInBox(rclPt)) { // Point lies within + unsigned long ulX, ulY, ulZ; + Position(rclPt, ulX, ulY, ulZ); + // int nX = ulX, nY = ulY, nZ = ulZ; + unsigned long ulLevel = 0; + while (raclInd.empty()) { + GetHull(ulX, ulY, ulZ, ulLevel++, raclInd); + } + GetHull(ulX, ulY, ulZ, ulLevel, raclInd); + } + else { // Point outside + Base::BoundBox3d::SIDE tSide = clBB.GetSideFromRay(rclPt, clBB.GetCenter() - rclPt); + switch (tSide) { + case Base::BoundBox3d::RIGHT: { + int nX = 0; + while (raclInd.empty()) { + for (unsigned long i = 0; i < _ulCtGridsY; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); + } + } + nX++; + } + break; + } + case Base::BoundBox3d::LEFT: { + int nX = _ulCtGridsX - 1; + while (raclInd.empty()) { + for (unsigned long i = 0; i < _ulCtGridsY; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); + } + } + nX++; + } + break; + } + case Base::BoundBox3d::TOP: { + int nY = 0; + while (raclInd.empty()) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); + } + } + nY++; + } + break; + } + case Base::BoundBox3d::BOTTOM: { + int nY = _ulCtGridsY - 1; + while (raclInd.empty()) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); + } + } + nY--; + } + break; + } + case Base::BoundBox3d::BACK: { + int nZ = 0; + while (raclInd.empty()) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsY; j++) { + raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); + } + } + nZ++; + } + break; + } + case Base::BoundBox3d::FRONT: { + int nZ = _ulCtGridsZ - 1; + while (raclInd.empty()) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsY; j++) { + raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); + } + } + nZ--; + } + break; + } - // top plane - for (i = nX1; i <= nX2; i++) - { - for (j = nY1; j <= nY2; j++) - GetElements(i, j, nZ1, raclInd); - } - // bottom plane - for (i = nX1; i <= nX2; i++) - { - for (j = nY1; j <= nY2; j++) - GetElements(i, j, nZ2, raclInd); - } - // left plane - for (i = nY1; i <= nY2; i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - GetElements(nX1, i, j, raclInd); - } - // right plane - for (i = nY1; i <= nY2; i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - GetElements(nX2, i, j, raclInd); - } - // front plane - for (i = (nX1+1); i <= (nX2-1); i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - GetElements(i, nY1, j, raclInd); - } - // back plane - for (i = (nX1+1); i <= (nX2-1); i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - GetElements(i, nY2, j, raclInd); - } + default: + break; + } + } } -unsigned long PointsGrid::GetElements (unsigned long ulX, unsigned long ulY, unsigned long ulZ, - std::set &raclInd) const +void PointsGrid::GetHull(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + unsigned long ulDistance, + std::set& raclInd) const { - const std::set &rclSet = _aulGrid[ulX][ulY][ulZ]; - if (!rclSet.empty()) - { - raclInd.insert(rclSet.begin(), rclSet.end()); - return rclSet.size(); - } + int nX1 = std::max(0, int(ulX) - int(ulDistance)); + int nY1 = std::max(0, int(ulY) - int(ulDistance)); + int nZ1 = std::max(0, int(ulZ) - int(ulDistance)); + int nX2 = std::min(int(_ulCtGridsX) - 1, int(ulX) + int(ulDistance)); + int nY2 = std::min(int(_ulCtGridsY) - 1, int(ulY) + int(ulDistance)); + int nZ2 = std::min(int(_ulCtGridsZ) - 1, int(ulZ) + int(ulDistance)); - return 0; + int i, j; + + // top plane + for (i = nX1; i <= nX2; i++) { + for (j = nY1; j <= nY2; j++) { + GetElements(i, j, nZ1, raclInd); + } + } + // bottom plane + for (i = nX1; i <= nX2; i++) { + for (j = nY1; j <= nY2; j++) { + GetElements(i, j, nZ2, raclInd); + } + } + // left plane + for (i = nY1; i <= nY2; i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(nX1, i, j, raclInd); + } + } + // right plane + for (i = nY1; i <= nY2; i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(nX2, i, j, raclInd); + } + } + // front plane + for (i = (nX1 + 1); i <= (nX2 - 1); i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(i, nY1, j, raclInd); + } + } + // back plane + for (i = (nX1 + 1); i <= (nX2 - 1); i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(i, nY2, j, raclInd); + } + } } -void PointsGrid::AddPoint (const Base::Vector3d &rclPt, unsigned long ulPtIndex, float /*fEpsilon*/) +unsigned long PointsGrid::GetElements(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + std::set& raclInd) const { - unsigned long ulX, ulY, ulZ; - Pos(Base::Vector3d(rclPt.x, rclPt.y, rclPt.z), ulX, ulY, ulZ); - if ( (ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ) ) - _aulGrid[ulX][ulY][ulZ].insert(ulPtIndex); + const std::set& rclSet = _aulGrid[ulX][ulY][ulZ]; + if (!rclSet.empty()) { + raclInd.insert(rclSet.begin(), rclSet.end()); + return rclSet.size(); + } + + return 0; } -void PointsGrid::Validate (const PointKernel &rclPoints) +void PointsGrid::AddPoint(const Base::Vector3d& rclPt, unsigned long ulPtIndex, float /*fEpsilon*/) { - if (_pclPoints != &rclPoints) - Attach(rclPoints); - else if (rclPoints.size() != _ulCtElements) - RebuildGrid(); + unsigned long ulX, ulY, ulZ; + Pos(Base::Vector3d(rclPt.x, rclPt.y, rclPt.z), ulX, ulY, ulZ); + if ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)) { + _aulGrid[ulX][ulY][ulZ].insert(ulPtIndex); + } } -void PointsGrid::Validate () +void PointsGrid::Validate(const PointKernel& rclPoints) { - if (!_pclPoints) - return; + if (_pclPoints != &rclPoints) { + Attach(rclPoints); + } + else if (rclPoints.size() != _ulCtElements) { + RebuildGrid(); + } +} - if (_pclPoints->size() != _ulCtElements) - RebuildGrid(); +void PointsGrid::Validate() +{ + if (!_pclPoints) { + return; + } + + if (_pclPoints->size() != _ulCtElements) { + RebuildGrid(); + } } bool PointsGrid::Verify() const { - if ( !_pclPoints ) - return false; // no point cloud attached - if (_pclPoints->size() != _ulCtElements) - return false; // not up-to-date - - PointsGridIterator it(*this); - for ( it.Init(); it.More(); it.Next() ) - { - std::vector aulElements; - it.GetElements( aulElements ); - for (unsigned long element : aulElements) - { - const Base::Vector3d& cP = _pclPoints->getPoint(element); - if (!it.GetBoundBox().IsInBox(cP)) - return false; // point doesn't lie inside the grid element + if (!_pclPoints) { + return false; // no point cloud attached + } + if (_pclPoints->size() != _ulCtElements) { + return false; // not up-to-date } - } - return true; + PointsGridIterator it(*this); + for (it.Init(); it.More(); it.Next()) { + std::vector aulElements; + it.GetElements(aulElements); + for (unsigned long element : aulElements) { + const Base::Vector3d& cP = _pclPoints->getPoint(element); + if (!it.GetBoundBox().IsInBox(cP)) { + return false; // point doesn't lie inside the grid element + } + } + } + + return true; } -void PointsGrid::RebuildGrid () +void PointsGrid::RebuildGrid() { - _ulCtElements = _pclPoints->size(); + _ulCtElements = _pclPoints->size(); - InitGrid(); + InitGrid(); - // Fill data structure + // Fill data structure - unsigned long i = 0; - for (const auto & pnt : *_pclPoints) - { - AddPoint(pnt, i++); - } + unsigned long i = 0; + for (const auto& pnt : *_pclPoints) { + AddPoint(pnt, i++); + } } -void PointsGrid::Pos (const Base::Vector3d &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const +void PointsGrid::Pos(const Base::Vector3d& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const { - rulX = (unsigned long)((rclPoint.x - _fMinX) / _fGridLenX); - rulY = (unsigned long)((rclPoint.y - _fMinY) / _fGridLenY); - rulZ = (unsigned long)((rclPoint.z - _fMinZ) / _fGridLenZ); + rulX = (unsigned long)((rclPoint.x - _fMinX) / _fGridLenX); + rulY = (unsigned long)((rclPoint.y - _fMinY) / _fGridLenY); + rulZ = (unsigned long)((rclPoint.z - _fMinZ) / _fGridLenZ); } -unsigned long PointsGrid::FindElements (const Base::Vector3d &rclPoint, std::set& aulElements) const +unsigned long PointsGrid::FindElements(const Base::Vector3d& rclPoint, + std::set& aulElements) const { - unsigned long ulX, ulY, ulZ; - Pos(rclPoint, ulX, ulY, ulZ); + unsigned long ulX, ulY, ulZ; + Pos(rclPoint, ulX, ulY, ulZ); - // check if the given point is inside the grid structure - if ( (ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ) ) - { - return GetElements(ulX, ulY, ulZ, aulElements); - } + // check if the given point is inside the grid structure + if ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)) { + return GetElements(ulX, ulY, ulZ, aulElements); + } - return 0; + return 0; } // ---------------------------------------------------------------- -PointsGridIterator::PointsGridIterator (const PointsGrid &rclG) -: _rclGrid(rclG), - _clPt(0.0f, 0.0f, 0.0f), _clDir(0.0f, 0.0f, 0.0f) +PointsGridIterator::PointsGridIterator(const PointsGrid& rclG) + : _rclGrid(rclG) + , _clPt(0.0f, 0.0f, 0.0f) + , _clDir(0.0f, 0.0f, 0.0f) +{} + +bool PointsGridIterator::InitOnRay(const Base::Vector3d& rclPt, + const Base::Vector3d& rclDir, + float fMaxSearchArea, + std::vector& raulElements) { + bool ret = InitOnRay(rclPt, rclDir, raulElements); + _fMaxSearchArea = fMaxSearchArea; + return ret; } -bool PointsGridIterator::InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, float fMaxSearchArea, - std::vector &raulElements) +bool PointsGridIterator::InitOnRay(const Base::Vector3d& rclPt, + const Base::Vector3d& rclDir, + std::vector& raulElements) { - bool ret = InitOnRay (rclPt, rclDir, raulElements); - _fMaxSearchArea = fMaxSearchArea; - return ret; -} + // needed in NextOnRay() to avoid an infinite loop + _cSearchPositions.clear(); -bool PointsGridIterator::InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, - std::vector &raulElements) -{ - // needed in NextOnRay() to avoid an infinite loop - _cSearchPositions.clear(); + _fMaxSearchArea = FLOAT_MAX; - _fMaxSearchArea = FLOAT_MAX; + raulElements.clear(); - raulElements.clear(); + _clPt = rclPt; + _clDir = rclDir; + _bValidRay = false; - _clPt = rclPt; - _clDir = rclDir; - _bValidRay = false; - - // point lies within global BB - if (_rclGrid.GetBoundBox().IsInBox(rclPt)) - { // determine the voxel by the starting point - _rclGrid.Position(rclPt, _ulX, _ulY, _ulZ); - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - _bValidRay = true; - } - else - { // StartPoint outside - Base::Vector3d cP0, cP1; - if (_rclGrid.GetBoundBox().IntersectWithLine(rclPt, rclDir, cP0, cP1)) - { // determine the next point - if ((cP0 - rclPt).Length() < (cP1 - rclPt).Length()) - _rclGrid.Position(cP0, _ulX, _ulY, _ulZ); - else - _rclGrid.Position(cP1, _ulX, _ulY, _ulZ); - - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - _bValidRay = true; + // point lies within global BB + if (_rclGrid.GetBoundBox().IsInBox(rclPt)) { // determine the voxel by the starting point + _rclGrid.Position(rclPt, _ulX, _ulY, _ulZ); + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + _bValidRay = true; } - } + else { // StartPoint outside + Base::Vector3d cP0, cP1; + if (_rclGrid.GetBoundBox().IntersectWithLine(rclPt, + rclDir, + cP0, + cP1)) { // determine the next point + if ((cP0 - rclPt).Length() < (cP1 - rclPt).Length()) { + _rclGrid.Position(cP0, _ulX, _ulY, _ulZ); + } + else { + _rclGrid.Position(cP1, _ulX, _ulY, _ulZ); + } - return _bValidRay; -} - -bool PointsGridIterator::NextOnRay (std::vector &raulElements) -{ - if (!_bValidRay) - return false; // not initialized or beam exited - - raulElements.clear(); - - Base::Vector3d clIntersectPoint; - - // Look for the next adjacent BB on the search beam - Base::BoundBox3d::SIDE tSide = _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ).GetSideFromRay(_clPt, _clDir, clIntersectPoint); - - // Search area - // - if ((_clPt-clIntersectPoint).Length() > _fMaxSearchArea) - { - _bValidRay = false; - } - else - { - switch (tSide) - { - case Base::BoundBox3d::LEFT: _ulX--; break; - case Base::BoundBox3d::RIGHT: _ulX++; break; - case Base::BoundBox3d::BOTTOM: _ulY--; break; - case Base::BoundBox3d::TOP: _ulY++; break; - case Base::BoundBox3d::FRONT: _ulZ--; break; - case Base::BoundBox3d::BACK: _ulZ++; break; - - default: - case Base::BoundBox3d::INVALID: - _bValidRay = false; - break; + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + _bValidRay = true; + } } - GridElement pos(_ulX, _ulY, _ulZ); - if ( _cSearchPositions.find( pos ) != _cSearchPositions.end() ) - _bValidRay = false; // grid element already visited => result from GetSideFromRay invalid - } - - if (_bValidRay && _rclGrid.CheckPos(_ulX, _ulY, _ulZ)) - { - GridElement pos(_ulX, _ulY, _ulZ); _cSearchPositions.insert(pos); - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - } - else { - _bValidRay = false; // ray exited - } - - return _bValidRay; + return _bValidRay; +} + +bool PointsGridIterator::NextOnRay(std::vector& raulElements) +{ + if (!_bValidRay) { + return false; // not initialized or beam exited + } + + raulElements.clear(); + + Base::Vector3d clIntersectPoint; + + // Look for the next adjacent BB on the search beam + Base::BoundBox3d::SIDE tSide = + _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ).GetSideFromRay(_clPt, _clDir, clIntersectPoint); + + // Search area + // + if ((_clPt - clIntersectPoint).Length() > _fMaxSearchArea) { + _bValidRay = false; + } + else { + switch (tSide) { + case Base::BoundBox3d::LEFT: + _ulX--; + break; + case Base::BoundBox3d::RIGHT: + _ulX++; + break; + case Base::BoundBox3d::BOTTOM: + _ulY--; + break; + case Base::BoundBox3d::TOP: + _ulY++; + break; + case Base::BoundBox3d::FRONT: + _ulZ--; + break; + case Base::BoundBox3d::BACK: + _ulZ++; + break; + + default: + case Base::BoundBox3d::INVALID: + _bValidRay = false; + break; + } + + GridElement pos(_ulX, _ulY, _ulZ); + if (_cSearchPositions.find(pos) != _cSearchPositions.end()) { + _bValidRay = + false; // grid element already visited => result from GetSideFromRay invalid + } + } + + if (_bValidRay && _rclGrid.CheckPos(_ulX, _ulY, _ulZ)) { + GridElement pos(_ulX, _ulY, _ulZ); + _cSearchPositions.insert(pos); + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + } + else { + _bValidRay = false; // ray exited + } + + return _bValidRay; } diff --git a/src/Mod/Points/App/PointsGrid.h b/src/Mod/Points/App/PointsGrid.h index 56128b7e91..78a6abe4b1 100644 --- a/src/Mod/Points/App/PointsGrid.h +++ b/src/Mod/Points/App/PointsGrid.h @@ -30,141 +30,179 @@ #include "Points.h" -#define POINTS_CT_GRID 256 // Default value for number of elements per grid -#define POINTS_MAX_GRIDS 100000 // Default value for maximum number of grids -#define POINTS_CT_GRID_PER_AXIS 20 -#define PONTSGRID_BBOX_EXTENSION 10.0f +#define POINTS_CT_GRID 256 // Default value for number of elements per grid +#define POINTS_MAX_GRIDS 100000 // Default value for maximum number of grids +#define POINTS_CT_GRID_PER_AXIS 20 +#define PONTSGRID_BBOX_EXTENSION 10.0f -namespace Points { +namespace Points +{ class PointsGrid; /** - * The PointsGrid allows to divide a global point cloud into smaller regions of elements depending on the resolution of the grid. - * All grid elements in the grid structure have the same size. + * The PointsGrid allows to divide a global point cloud into smaller regions of elements depending + * on the resolution of the grid. All grid elements in the grid structure have the same size. * - * Grids can be used within algorithms to avoid to iterate through all elements, so grids can speed up algorithms dramatically. + * Grids can be used within algorithms to avoid to iterate through all elements, so grids can speed + * up algorithms dramatically. * @author Werner Mayer */ class PointsExport PointsGrid { public: - /** @name Construction */ - //@{ - /// Construction - explicit PointsGrid (const PointKernel &rclM); - /// Construction - PointsGrid (); - /// Construction - PointsGrid (const PointKernel &rclM, int iCtGridPerAxis); - /// Construction - PointsGrid (const PointKernel &rclM, double fGridLen); - /// Construction - PointsGrid (const PointKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ); - /// Destruction - virtual ~PointsGrid () = default; - //@} + /** @name Construction */ + //@{ + /// Construction + explicit PointsGrid(const PointKernel& rclM); + /// Construction + PointsGrid(); + /// Construction + PointsGrid(const PointKernel& rclM, int iCtGridPerAxis); + /// Construction + PointsGrid(const PointKernel& rclM, double fGridLen); + /// Construction + PointsGrid(const PointKernel& rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ); + /// Destruction + virtual ~PointsGrid() = default; + //@} public: - /** Attaches the point kernel to this grid, an already attached point cloud gets detached. The grid gets rebuilt - * automatically. */ - virtual void Attach (const PointKernel &rclM); - /** Rebuilds the grid structure. */ - virtual void Rebuild (unsigned long ulPerGrid = POINTS_CT_GRID, unsigned long ulMaxGrid = POINTS_MAX_GRIDS); - /** Rebuilds the grid structure. */ - virtual void Rebuild (int iCtGridPerAxis = POINTS_CT_GRID_PER_AXIS); - /** Rebuilds the grid structure. */ - virtual void Rebuild (unsigned long ulX, unsigned long ulY, unsigned long ulZ); + /** Attaches the point kernel to this grid, an already attached point cloud gets detached. The + * grid gets rebuilt automatically. */ + virtual void Attach(const PointKernel& rclM); + /** Rebuilds the grid structure. */ + virtual void Rebuild(unsigned long ulPerGrid = POINTS_CT_GRID, + unsigned long ulMaxGrid = POINTS_MAX_GRIDS); + /** Rebuilds the grid structure. */ + virtual void Rebuild(int iCtGridPerAxis = POINTS_CT_GRID_PER_AXIS); + /** Rebuilds the grid structure. */ + virtual void Rebuild(unsigned long ulX, unsigned long ulY, unsigned long ulZ); - /** @name Search */ - //@{ - /** Searches for elements lying in the intersection area of the grid and the bounding box. */ - virtual unsigned long InSide (const Base::BoundBox3d &rclBB, std::vector &raulElements, bool bDelDoubles = true) const; - /** Searches for elements lying in the intersection area of the grid and the bounding box. */ - virtual unsigned long InSide (const Base::BoundBox3d &rclBB, std::set &raulElementss) const; - /** Searches for elements lying in the intersection area of the grid and the bounding box. */ - virtual unsigned long InSide (const Base::BoundBox3d &rclBB, std::vector &raulElements, - const Base::Vector3d &rclOrg, double fMaxDist, bool bDelDoubles = true) const; - /** Searches for the nearest grids that contain elements from a point, the result are grid indices. */ - void SearchNearestFromPoint (const Base::Vector3d &rclPt, std::set &rclInd) const; - //@} + /** @name Search */ + //@{ + /** Searches for elements lying in the intersection area of the grid and the bounding box. */ + virtual unsigned long InSide(const Base::BoundBox3d& rclBB, + std::vector& raulElements, + bool bDelDoubles = true) const; + /** Searches for elements lying in the intersection area of the grid and the bounding box. */ + virtual unsigned long InSide(const Base::BoundBox3d& rclBB, + std::set& raulElementss) const; + /** Searches for elements lying in the intersection area of the grid and the bounding box. */ + virtual unsigned long InSide(const Base::BoundBox3d& rclBB, + std::vector& raulElements, + const Base::Vector3d& rclOrg, + double fMaxDist, + bool bDelDoubles = true) const; + /** Searches for the nearest grids that contain elements from a point, the result are grid + * indices. */ + void SearchNearestFromPoint(const Base::Vector3d& rclPt, std::set& rclInd) const; + //@} - /** Returns the lengths of the grid elements in x,y and z direction. */ - virtual void GetGridLengths (double &rfLenX, double &rfLenY, double &rfLenZ) const - { rfLenX = _fGridLenX; rfLenY = _fGridLenY; rfLenZ = _fGridLenZ; } - /** Returns the number of grid elements in x,y and z direction. */ - virtual void GetCtGrids (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const - { rulX = _ulCtGridsX; rulY = _ulCtGridsY; rulZ = _ulCtGridsZ; } + /** Returns the lengths of the grid elements in x,y and z direction. */ + virtual void GetGridLengths(double& rfLenX, double& rfLenY, double& rfLenZ) const + { + rfLenX = _fGridLenX; + rfLenY = _fGridLenY; + rfLenZ = _fGridLenZ; + } + /** Returns the number of grid elements in x,y and z direction. */ + virtual void GetCtGrids(unsigned long& rulX, unsigned long& rulY, unsigned long& rulZ) const + { + rulX = _ulCtGridsX; + rulY = _ulCtGridsY; + rulZ = _ulCtGridsZ; + } - /** @name Boundings */ - //@{ - /** Returns the bounding box of a given grid element. */ - inline Base::BoundBox3d GetBoundBox (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; - /** Returns the bounding box of the whole. */ - inline Base::BoundBox3d GetBoundBox () const; - //@} - /** Returns the number of elements in a given grid. */ - unsigned long GetCtElements(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const - { return _aulGrid[ulX][ulY][ulZ].size(); } - /** Finds all points that lie in the same grid as the point \a rclPoint. */ - unsigned long FindElements(const Base::Vector3d &rclPoint, std::set& aulElements) const; - /** Validates the grid structure and rebuilds it if needed. */ - virtual void Validate (const PointKernel &rclM); - /** Validates the grid structure and rebuilds it if needed. */ - virtual void Validate (); - /** Verifies the grid structure and returns false if inconsistencies are found. */ - virtual bool Verify() const; - /** Returns the indices of the grid this point lies in. If the point is outside the grid then the indices of - * the nearest grid element are taken.*/ - virtual void Position (const Base::Vector3d &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const; - /** Returns the indices of the elements in the given grid. */ - unsigned long GetElements (unsigned long ulX, unsigned long ulY, unsigned long ulZ, std::set &raclInd) const; + /** @name Boundings */ + //@{ + /** Returns the bounding box of a given grid element. */ + inline Base::BoundBox3d + GetBoundBox(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; + /** Returns the bounding box of the whole. */ + inline Base::BoundBox3d GetBoundBox() const; + //@} + /** Returns the number of elements in a given grid. */ + unsigned long GetCtElements(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const + { + return _aulGrid[ulX][ulY][ulZ].size(); + } + /** Finds all points that lie in the same grid as the point \a rclPoint. */ + unsigned long FindElements(const Base::Vector3d& rclPoint, + std::set& aulElements) const; + /** Validates the grid structure and rebuilds it if needed. */ + virtual void Validate(const PointKernel& rclM); + /** Validates the grid structure and rebuilds it if needed. */ + virtual void Validate(); + /** Verifies the grid structure and returns false if inconsistencies are found. */ + virtual bool Verify() const; + /** Returns the indices of the grid this point lies in. If the point is outside the grid then + * the indices of the nearest grid element are taken.*/ + virtual void Position(const Base::Vector3d& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const; + /** Returns the indices of the elements in the given grid. */ + unsigned long GetElements(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + std::set& raclInd) const; protected: - /** Checks if this is a valid grid position. */ - inline bool CheckPos (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; - /** Initializes the size of the internal structure. */ - virtual void InitGrid (); - /** Deletes the grid structure. */ - virtual void Clear (); - /** Calculates the grid length dependent on maximum number of grids. */ - virtual void CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMaxGrids); - /** Calculates the grid length dependent on the number of grids per axis. */ - virtual void CalculateGridLength (int iCtGridPerAxis); - /** Rebuilds the grid structure. */ - virtual void RebuildGrid (); - /** Returns the number of stored elements. */ - unsigned long HasElements () const - { return _pclPoints->size(); } - /** Get the indices of all elements lying in the grids around a given grid with distance \a ulDistance. */ - void GetHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, unsigned long ulDistance, std::set &raclInd) const; + /** Checks if this is a valid grid position. */ + inline bool CheckPos(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; + /** Initializes the size of the internal structure. */ + virtual void InitGrid(); + /** Deletes the grid structure. */ + virtual void Clear(); + /** Calculates the grid length dependent on maximum number of grids. */ + virtual void CalculateGridLength(unsigned long ulCtGrid, unsigned long ulMaxGrids); + /** Calculates the grid length dependent on the number of grids per axis. */ + virtual void CalculateGridLength(int iCtGridPerAxis); + /** Rebuilds the grid structure. */ + virtual void RebuildGrid(); + /** Returns the number of stored elements. */ + unsigned long HasElements() const + { + return _pclPoints->size(); + } + /** Get the indices of all elements lying in the grids around a given grid with distance \a + * ulDistance. */ + void GetHull(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + unsigned long ulDistance, + std::set& raclInd) const; protected: - std::vector > > > _aulGrid; /**< Grid data structure. */ - const PointKernel* _pclPoints; /**< The point kernel. */ - unsigned long _ulCtElements;/**< Number of grid elements for validation issues. */ - unsigned long _ulCtGridsX; /**< Number of grid elements in z. */ - unsigned long _ulCtGridsY; /**< Number of grid elements in z. */ - unsigned long _ulCtGridsZ; /**< Number of grid elements in z. */ - double _fGridLenX; /**< Length of grid elements in x. */ - double _fGridLenY; /**< Length of grid elements in y. */ - double _fGridLenZ; /**< Length of grid elements in z. */ - double _fMinX; /**< Grid null position in x. */ - double _fMinY; /**< Grid null position in y. */ - double _fMinZ; /**< Grid null position in z. */ + std::vector>>> + _aulGrid; /**< Grid data structure. */ + const PointKernel* _pclPoints; /**< The point kernel. */ + unsigned long _ulCtElements; /**< Number of grid elements for validation issues. */ + unsigned long _ulCtGridsX; /**< Number of grid elements in z. */ + unsigned long _ulCtGridsY; /**< Number of grid elements in z. */ + unsigned long _ulCtGridsZ; /**< Number of grid elements in z. */ + double _fGridLenX; /**< Length of grid elements in x. */ + double _fGridLenY; /**< Length of grid elements in y. */ + double _fGridLenZ; /**< Length of grid elements in z. */ + double _fMinX; /**< Grid null position in x. */ + double _fMinY; /**< Grid null position in y. */ + double _fMinZ; /**< Grid null position in z. */ - // friends - friend class PointsGridIterator; - friend class PointsGridIteratorStatistic; + // friends + friend class PointsGridIterator; + friend class PointsGridIteratorStatistic; public: - protected: - /** Adds a new point element to the grid structure. \a rclPt is the geometric point and \a ulPtIndex - * the corresponding index in the point kernel. */ - void AddPoint (const Base::Vector3d &rclPt, unsigned long ulPtIndex, float fEpsilon = 0.0f); - /** Returns the grid numbers to the given point \a rclPoint. */ - void Pos(const Base::Vector3d &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const; + /** Adds a new point element to the grid structure. \a rclPt is the geometric point and \a + * ulPtIndex the corresponding index in the point kernel. */ + void AddPoint(const Base::Vector3d& rclPt, unsigned long ulPtIndex, float fEpsilon = 0.0f); + /** Returns the grid numbers to the given point \a rclPoint. */ + void Pos(const Base::Vector3d& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const; }; /** @@ -174,99 +212,144 @@ protected: class PointsExport PointsGridIterator { public: - /// Construction - explicit PointsGridIterator (const PointsGrid &rclG); - /** Returns the bounding box of the current grid element. */ - Base::BoundBox3d GetBoundBox () const - { return _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ); } - /** Returns indices of the elements in the current grid. */ - void GetElements (std::vector &raulElements) const - { - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - } - /** @name Iteration */ - //@{ - /** Sets the iterator to the first element*/ - void Init () - { _ulX = _ulY = _ulZ = 0; } - /** Checks if the iterator has not yet reached the end position. */ - bool More () const - { return (_ulZ < _rclGrid._ulCtGridsZ); } - /** Go to the next grid. */ - void Next () - { - if (++_ulX >= (_rclGrid._ulCtGridsX)) _ulX = 0; else return; - if (++_ulY >= (_rclGrid._ulCtGridsY)) { _ulY = 0; _ulZ++; } else return; - } - //@} + /// Construction + explicit PointsGridIterator(const PointsGrid& rclG); + /** Returns the bounding box of the current grid element. */ + Base::BoundBox3d GetBoundBox() const + { + return _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ); + } + /** Returns indices of the elements in the current grid. */ + void GetElements(std::vector& raulElements) const + { + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + } + /** @name Iteration */ + //@{ + /** Sets the iterator to the first element*/ + void Init() + { + _ulX = _ulY = _ulZ = 0; + } + /** Checks if the iterator has not yet reached the end position. */ + bool More() const + { + return (_ulZ < _rclGrid._ulCtGridsZ); + } + /** Go to the next grid. */ + void Next() + { + if (++_ulX >= (_rclGrid._ulCtGridsX)) { + _ulX = 0; + } + else { + return; + } + if (++_ulY >= (_rclGrid._ulCtGridsY)) { + _ulY = 0; + _ulZ++; + } + else { + return; + } + } + //@} - /** @name Tests with rays */ - //@{ - /** Searches for facets around the ray. */ - bool InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, std::vector &raulElements); - /** Searches for facets around the ray. */ - bool InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, float fMaxSearchArea, std::vector &raulElements); - /** Searches for facets around the ray. */ - bool NextOnRay (std::vector &raulElements); - //@} + /** @name Tests with rays */ + //@{ + /** Searches for facets around the ray. */ + bool InitOnRay(const Base::Vector3d& rclPt, + const Base::Vector3d& rclDir, + std::vector& raulElements); + /** Searches for facets around the ray. */ + bool InitOnRay(const Base::Vector3d& rclPt, + const Base::Vector3d& rclDir, + float fMaxSearchArea, + std::vector& raulElements); + /** Searches for facets around the ray. */ + bool NextOnRay(std::vector& raulElements); + //@} - /** Returns the grid number of the current position. */ - void GetGridPos (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const - { rulX = _ulX; rulY = _ulY; rulZ = _ulZ; } + /** Returns the grid number of the current position. */ + void GetGridPos(unsigned long& rulX, unsigned long& rulY, unsigned long& rulZ) const + { + rulX = _ulX; + rulY = _ulY; + rulZ = _ulZ; + } protected: - const PointsGrid& _rclGrid; /**< The point grid. */ - unsigned long _ulX{0}; /**< Number of grids in x. */ - unsigned long _ulY{0}; /**< Number of grids in y. */ - unsigned long _ulZ{0}; /**< Number of grids in z. */ - Base::Vector3d _clPt; /**< Base point of search ray. */ - Base::Vector3d _clDir; /**< Direction of search ray. */ - bool _bValidRay{false}; /**< Search ray ok? */ - float _fMaxSearchArea{FLOAT_MAX}; - /** Checks if a grid position is already visited by NextOnRay(). */ - struct GridElement - { - GridElement( unsigned long x, unsigned long y, unsigned long z) - { this->x = x; this->y = y; this->z = z; } - bool operator < (const GridElement& pos) const + const PointsGrid& _rclGrid; /**< The point grid. */ + unsigned long _ulX {0}; /**< Number of grids in x. */ + unsigned long _ulY {0}; /**< Number of grids in y. */ + unsigned long _ulZ {0}; /**< Number of grids in z. */ + Base::Vector3d _clPt; /**< Base point of search ray. */ + Base::Vector3d _clDir; /**< Direction of search ray. */ + bool _bValidRay {false}; /**< Search ray ok? */ + float _fMaxSearchArea {FLOAT_MAX}; + /** Checks if a grid position is already visited by NextOnRay(). */ + struct GridElement { - if ( x == pos.x) - { if ( y == pos.y) return z < pos.z; else return y < pos.y; } - else - { return x < pos.x; } - } - private: - unsigned long x,y,z; - }; - std::set _cSearchPositions; + GridElement(unsigned long x, unsigned long y, unsigned long z) + { + this->x = x; + this->y = y; + this->z = z; + } + bool operator<(const GridElement& pos) const + { + if (x == pos.x) { + if (y == pos.y) { + return z < pos.z; + } + else { + return y < pos.y; + } + } + else { + return x < pos.x; + } + } + + private: + unsigned long x, y, z; + }; + std::set _cSearchPositions; }; // -------------------------------------------------------------- -inline Base::BoundBox3d PointsGrid::GetBoundBox (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const +inline Base::BoundBox3d +PointsGrid::GetBoundBox(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const { - double fX, fY, fZ; + double fX, fY, fZ; - fX = _fMinX + (double(ulX) * _fGridLenX); - fY = _fMinY + (double(ulY) * _fGridLenY); - fZ = _fMinZ + (double(ulZ) * _fGridLenZ); + fX = _fMinX + (double(ulX) * _fGridLenX); + fY = _fMinY + (double(ulY) * _fGridLenY); + fZ = _fMinZ + (double(ulZ) * _fGridLenZ); - return Base::BoundBox3d(fX, fY, fZ, fX + _fGridLenX, fY + _fGridLenY, fZ + _fGridLenZ); + return Base::BoundBox3d(fX, fY, fZ, fX + _fGridLenX, fY + _fGridLenY, fZ + _fGridLenZ); } -inline Base::BoundBox3d PointsGrid::GetBoundBox () const +inline Base::BoundBox3d PointsGrid::GetBoundBox() const { - return Base::BoundBox3d(_fMinX, _fMinY, _fMinZ, _fMinX + (_fGridLenX * double(_ulCtGridsX)), - _fMinY + (_fGridLenY * double(_ulCtGridsY)), _fMinZ + (_fGridLenZ * double(_ulCtGridsZ))); + return Base::BoundBox3d(_fMinX, + _fMinY, + _fMinZ, + _fMinX + (_fGridLenX * double(_ulCtGridsX)), + _fMinY + (_fGridLenY * double(_ulCtGridsY)), + _fMinZ + (_fGridLenZ * double(_ulCtGridsZ))); } -inline bool PointsGrid::CheckPos (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const +inline bool PointsGrid::CheckPos(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const { - return ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)); + return ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)); } // -------------------------------------------------------------- -} // namespace Points +} // namespace Points -#endif // POINTS_GRID_H +#endif // POINTS_GRID_H diff --git a/src/Mod/Points/App/PointsPy.xml b/src/Mod/Points/App/PointsPy.xml index 5508183d64..bc0393cb12 100644 --- a/src/Mod/Points/App/PointsPy.xml +++ b/src/Mod/Points/App/PointsPy.xml @@ -3,11 +3,11 @@ diff --git a/src/Mod/Points/App/PointsPyImp.cpp b/src/Mod/Points/App/PointsPyImp.cpp index 454ea0267f..16fb08bd0a 100644 --- a/src/Mod/Points/App/PointsPyImp.cpp +++ b/src/Mod/Points/App/PointsPyImp.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -32,8 +32,10 @@ #include "Points.h" // inclusion of the generated files (generated out of PointsPy.xml) +// clang-format off #include "PointsPy.h" #include "PointsPy.cpp" +// clang-format on using namespace Points; @@ -44,7 +46,7 @@ std::string PointsPy::representation() const return {""}; } -PyObject *PointsPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* PointsPy::PyMake(struct _typeobject*, PyObject*, PyObject*) { // create a new instance of PointsPy and the Twin object return new PointsPy(new PointKernel); @@ -53,23 +55,27 @@ PyObject *PointsPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Pyt // constructor method int PointsPy::PyInit(PyObject* args, PyObject* /*kwd*/) { - PyObject *pcObj=nullptr; - if (!PyArg_ParseTuple(args, "|O", &pcObj)) + PyObject* pcObj = nullptr; + if (!PyArg_ParseTuple(args, "|O", &pcObj)) { return -1; + } // if no mesh is given - if (!pcObj) + if (!pcObj) { return 0; + } if (PyObject_TypeCheck(pcObj, &(PointsPy::Type))) { *getPointKernelPtr() = *(static_cast(pcObj)->getPointKernelPtr()); } else if (PyList_Check(pcObj)) { - if (!addPoints(args)) + if (!addPoints(args)) { return -1; + } } else if (PyTuple_Check(pcObj)) { - if (!addPoints(args)) + if (!addPoints(args)) { return -1; + } } else if (PyUnicode_Check(pcObj)) { getPointKernelPtr()->load(PyUnicode_AsUTF8(pcObj)); @@ -82,10 +88,11 @@ int PointsPy::PyInit(PyObject* args, PyObject* /*kwd*/) return 0; } -PyObject* PointsPy::copy(PyObject *args) +PyObject* PointsPy::copy(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } PointKernel* kernel = new PointKernel(); // assign data @@ -93,36 +100,43 @@ PyObject* PointsPy::copy(PyObject *args) return new PointsPy(kernel); } -PyObject* PointsPy::read(PyObject * args) +PyObject* PointsPy::read(PyObject* args) { const char* Name; - if (!PyArg_ParseTuple(args, "s",&Name)) + if (!PyArg_ParseTuple(args, "s", &Name)) { return nullptr; + } - PY_TRY { + PY_TRY + { getPointKernelPtr()->load(Name); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* PointsPy::write(PyObject * args) +PyObject* PointsPy::write(PyObject* args) { const char* Name; - if (!PyArg_ParseTuple(args, "s",&Name)) + if (!PyArg_ParseTuple(args, "s", &Name)) { return nullptr; + } - PY_TRY { + PY_TRY + { getPointKernelPtr()->save(Name); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* PointsPy::writeInventor(PyObject * args) +PyObject* PointsPy::writeInventor(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } std::stringstream result; Base::InventorBuilder builder(result); @@ -130,21 +144,22 @@ PyObject* PointsPy::writeInventor(PyObject * args) std::vector points; PointKernel* kernel = getPointKernelPtr(); points.reserve(kernel->size()); - for (const auto & it : *kernel) { + for (const auto& it : *kernel) { points.push_back(Base::convertTo(it)); } - builder.addNode(Base::Coordinate3Item{points}); - builder.addNode(Base::PointSetItem{}); + builder.addNode(Base::Coordinate3Item {points}); + builder.addNode(Base::PointSetItem {}); builder.endSeparator(); return Py::new_reference_to(Py::String(result.str())); } -PyObject* PointsPy::addPoints(PyObject * args) +PyObject* PointsPy::addPoints(PyObject* args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, "O", &obj)) + PyObject* obj; + if (!PyArg_ParseTuple(args, "O", &obj)) { return nullptr; + } try { Py::Sequence list(obj); @@ -166,20 +181,22 @@ PyObject* PointsPy::addPoints(PyObject * args) } } catch (const Py::Exception&) { - PyErr_SetString(PyExc_TypeError, "either expect\n" - "-- [Vector,...] \n" - "-- [(x,y,z),...]"); + PyErr_SetString(PyExc_TypeError, + "either expect\n" + "-- [Vector,...] \n" + "-- [(x,y,z),...]"); return nullptr; } Py_Return; } -PyObject* PointsPy::fromSegment(PyObject * args) +PyObject* PointsPy::fromSegment(PyObject* args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, "O", &obj)) + PyObject* obj; + if (!PyArg_ParseTuple(args, "O", &obj)) { return nullptr; + } try { const PointKernel* points = getPointKernelPtr(); @@ -189,8 +206,9 @@ PyObject* PointsPy::fromSegment(PyObject * args) int numPoints = static_cast(points->size()); for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { long index = static_cast(Py::Long(*it)); - if (index >= 0 && index < numPoints) + if (index >= 0 && index < numPoints) { pts->push_back(points->getPoint(index)); + } } return new PointsPy(pts.release()); @@ -201,18 +219,21 @@ PyObject* PointsPy::fromSegment(PyObject * args) } } -PyObject* PointsPy::fromValid(PyObject * args) +PyObject* PointsPy::fromValid(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { const PointKernel* points = getPointKernelPtr(); std::unique_ptr pts(new PointKernel()); pts->reserve(points->size()); - for (const auto & point : *points) { - if (!boost::math::isnan(point.x) && !boost::math::isnan(point.y) && !boost::math::isnan(point.z)) + for (const auto& point : *points) { + if (!boost::math::isnan(point.x) && !boost::math::isnan(point.y) + && !boost::math::isnan(point.z)) { pts->push_back(point); + } } return new PointsPy(pts.release()); @@ -232,13 +253,13 @@ Py::List PointsPy::getPoints() const { Py::List PointList; const PointKernel* points = getPointKernelPtr(); - for (const auto & point : *points) { + for (const auto& point : *points) { PointList.append(Py::asObject(new Base::VectorPy(point))); } return PointList; } -PyObject *PointsPy::getCustomAttributes(const char* /*attr*/) const +PyObject* PointsPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } @@ -247,5 +268,3 @@ int PointsPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { return 0; } - - diff --git a/src/Mod/Points/App/PreCompiled.h b/src/Mod/Points/App/PreCompiled.h index 9e42e5ad7a..a3ffa78c8b 100644 --- a/src/Mod/Points/App/PreCompiled.h +++ b/src/Mod/Points/App/PreCompiled.h @@ -27,35 +27,34 @@ // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning( disable : 4181 ) -# pragma warning( disable : 4305 ) -# pragma warning( disable : 4522 ) +#pragma warning(disable : 4181) +#pragma warning(disable : 4305) +#pragma warning(disable : 4522) #endif #ifdef _PreComp_ // standard -# include +#include // STL -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include // boost -# include -# include -# include -# include +#include +#include +#include +#include // Qt -# include +#include -#endif //_PreComp_ +#endif //_PreComp_ #endif - diff --git a/src/Mod/Points/App/Properties.cpp b/src/Mod/Points/App/Properties.cpp index 93408b7363..81d262e397 100644 --- a/src/Mod/Points/App/Properties.cpp +++ b/src/Mod/Points/App/Properties.cpp @@ -22,10 +22,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -35,11 +35,11 @@ #include #include -#include "Properties.h" #include "Points.h" +#include "Properties.h" #ifdef _MSC_VER -# include +#include #endif @@ -49,7 +49,7 @@ using namespace std; TYPESYSTEM_SOURCE(Points::PropertyGreyValue, App::PropertyFloat) TYPESYSTEM_SOURCE(Points::PropertyGreyValueList, App::PropertyLists) TYPESYSTEM_SOURCE(Points::PropertyNormalList, App::PropertyLists) -TYPESYSTEM_SOURCE(Points::PropertyCurvatureList , App::PropertyLists) +TYPESYSTEM_SOURCE(Points::PropertyCurvatureList, App::PropertyLists) PropertyGreyValueList::PropertyGreyValueList() = default; @@ -67,7 +67,7 @@ void PropertyGreyValueList::setValue(float lValue) { aboutToSetValue(); _lValueList.resize(1); - _lValueList[0]=lValue; + _lValueList[0] = lValue; hasSetValue(); } @@ -78,29 +78,30 @@ void PropertyGreyValueList::setValues(const std::vector& values) hasSetValue(); } -PyObject *PropertyGreyValueList::getPyObject() +PyObject* PropertyGreyValueList::getPyObject() { PyObject* list = PyList_New(getSize()); - for (int i = 0;i values; values.resize(nSize); - for (Py_ssize_t i=0; iob_type->tp_name; throw Py::TypeError(error); } - + values[i] = (float)PyFloat_AsDouble(item); } @@ -108,7 +109,7 @@ void PropertyGreyValueList::setPyObject(PyObject *value) } else if (PyFloat_Check(value)) { setValue((float)PyFloat_AsDouble(value)); - } + } else { std::string error = std::string("type must be float or list of float, not "); error += value->ob_type->tp_name; @@ -116,34 +117,35 @@ void PropertyGreyValueList::setPyObject(PyObject *value) } } -void PropertyGreyValueList::Save (Base::Writer &writer) const +void PropertyGreyValueList::Save(Base::Writer& writer) const { if (writer.isForceXML()) { - writer.Stream() << writer.ind() << "" << endl; + writer.Stream() << writer.ind() << "" << endl; writer.incInd(); - for(int i = 0;i" << endl; ; + for (int i = 0; i < getSize(); i++) { + writer.Stream() << writer.ind() << "" << endl; + }; writer.decInd(); - writer.Stream() << writer.ind() <<"" << endl ; + writer.Stream() << writer.ind() << "" << endl; } else { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyGreyValueList::Restore(Base::XMLReader &reader) +void PropertyGreyValueList::Restore(Base::XMLReader& reader) { reader.readElement("FloatList"); - string file (reader.getAttribute("file") ); + string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } } -void PropertyGreyValueList::SaveDocFile (Base::Writer &writer) const +void PropertyGreyValueList::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); uint32_t uCt = (uint32_t)getSize(); @@ -153,38 +155,38 @@ void PropertyGreyValueList::SaveDocFile (Base::Writer &writer) const } } -void PropertyGreyValueList::RestoreDocFile(Base::Reader &reader) +void PropertyGreyValueList::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); - uint32_t uCt=0; + uint32_t uCt = 0; str >> uCt; std::vector values(uCt); - for (float & value : values) { + for (float& value : values) { str >> value; } setValues(values); } -App::Property *PropertyGreyValueList::Copy() const +App::Property* PropertyGreyValueList::Copy() const { - PropertyGreyValueList *p= new PropertyGreyValueList(); + PropertyGreyValueList* p = new PropertyGreyValueList(); p->_lValueList = _lValueList; return p; } -void PropertyGreyValueList::Paste(const App::Property &from) +void PropertyGreyValueList::Paste(const App::Property& from) { aboutToSetValue(); _lValueList = dynamic_cast(from)._lValueList; hasSetValue(); } -unsigned int PropertyGreyValueList::getMemSize () const +unsigned int PropertyGreyValueList::getMemSize() const { return static_cast(_lValueList.size() * sizeof(float)); } -void PropertyGreyValueList::removeIndices( const std::vector& uIndices ) +void PropertyGreyValueList::removeIndices(const std::vector& uIndices) { // We need a sorted array std::vector uSortedInds = uIndices; @@ -192,22 +194,26 @@ void PropertyGreyValueList::removeIndices( const std::vector& uIn const std::vector& rValueList = getValues(); - assert( uSortedInds.size() <= rValueList.size() ); - if ( uSortedInds.size() > rValueList.size() ) + assert(uSortedInds.size() <= rValueList.size()); + if (uSortedInds.size() > rValueList.size()) { return; + } std::vector remainValue; remainValue.reserve(rValueList.size() - uSortedInds.size()); std::vector::iterator pos = uSortedInds.begin(); - for ( std::vector::const_iterator it = rValueList.begin(); it != rValueList.end(); ++it ) { + for (std::vector::const_iterator it = rValueList.begin(); it != rValueList.end(); ++it) { unsigned long index = it - rValueList.begin(); - if (pos == uSortedInds.end()) - remainValue.push_back( *it ); - else if (index != *pos) - remainValue.push_back( *it ); - else + if (pos == uSortedInds.end()) { + remainValue.push_back(*it); + } + else if (index != *pos) { + remainValue.push_back(*it); + } + else { ++pos; + } } setValues(remainValue); @@ -229,7 +235,7 @@ void PropertyNormalList::setValue(const Base::Vector3f& lValue) { aboutToSetValue(); _lValueList.resize(1); - _lValueList[0]=lValue; + _lValueList[0] = lValue; hasSetValue(); } @@ -237,7 +243,7 @@ void PropertyNormalList::setValue(float x, float y, float z) { aboutToSetValue(); _lValueList.resize(1); - _lValueList[0].Set(x,y,z); + _lValueList[0].Set(x, y, z); hasSetValue(); } @@ -248,40 +254,41 @@ void PropertyNormalList::setValues(const std::vector& values) hasSetValue(); } -PyObject *PropertyNormalList::getPyObject() +PyObject* PropertyNormalList::getPyObject() { PyObject* list = PyList_New(getSize()); - for (int i = 0;i values; values.resize(nSize); - for (Py_ssize_t i=0; i(val.getValue()); } setValues(values); } else if (PyObject_TypeCheck(value, &(Base::VectorPy::Type))) { - Base::VectorPy *pcObject = static_cast(value); + Base::VectorPy* pcObject = static_cast(value); Base::Vector3d* val = pcObject->getVectorPtr(); setValue(Base::convertTo(*val)); } else if (PyTuple_Check(value) && PyTuple_Size(value) == 3) { App::PropertyVector val; - val.setPyObject( value ); + val.setPyObject(value); setValue(Base::convertTo(val.getValue())); } else { @@ -291,25 +298,26 @@ void PropertyNormalList::setPyObject(PyObject *value) } } -void PropertyNormalList::Save (Base::Writer &writer) const +void PropertyNormalList::Save(Base::Writer& writer) const { if (!writer.isForceXML()) { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyNormalList::Restore(Base::XMLReader &reader) +void PropertyNormalList::Restore(Base::XMLReader& reader) { reader.readElement("VectorList"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } } -void PropertyNormalList::SaveDocFile (Base::Writer &writer) const +void PropertyNormalList::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); uint32_t uCt = (uint32_t)getSize(); @@ -319,38 +327,38 @@ void PropertyNormalList::SaveDocFile (Base::Writer &writer) const } } -void PropertyNormalList::RestoreDocFile(Base::Reader &reader) +void PropertyNormalList::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); - uint32_t uCt=0; + uint32_t uCt = 0; str >> uCt; std::vector values(uCt); - for (auto & value : values) { + for (auto& value : values) { str >> value.x >> value.y >> value.z; } setValues(values); } -App::Property *PropertyNormalList::Copy() const +App::Property* PropertyNormalList::Copy() const { - PropertyNormalList *p= new PropertyNormalList(); + PropertyNormalList* p = new PropertyNormalList(); p->_lValueList = _lValueList; return p; } -void PropertyNormalList::Paste(const App::Property &from) +void PropertyNormalList::Paste(const App::Property& from) { aboutToSetValue(); _lValueList = dynamic_cast(from)._lValueList; hasSetValue(); } -unsigned int PropertyNormalList::getMemSize () const +unsigned int PropertyNormalList::getMemSize() const { return static_cast(_lValueList.size() * sizeof(Base::Vector3f)); } -void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat) +void PropertyNormalList::transformGeometry(const Base::Matrix4D& mat) { // A normal vector is only a direction with unit length, so we only need to rotate it // (no translations or scaling) @@ -376,9 +384,11 @@ void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat) // Rotate the normal vectors #ifdef _MSC_VER - Concurrency::parallel_for_each(_lValueList.begin(), _lValueList.end(), [rot](Base::Vector3f& value) { - value = rot * value; - }); + Concurrency::parallel_for_each(_lValueList.begin(), + _lValueList.end(), + [rot](Base::Vector3f& value) { + value = rot * value; + }); #else QtConcurrent::blockingMap(_lValueList, [rot](Base::Vector3f& value) { rot.multVec(value, value); @@ -388,7 +398,7 @@ void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat) hasSetValue(); } -void PropertyNormalList::removeIndices( const std::vector& uIndices ) +void PropertyNormalList::removeIndices(const std::vector& uIndices) { // We need a sorted array std::vector uSortedInds = uIndices; @@ -396,22 +406,28 @@ void PropertyNormalList::removeIndices( const std::vector& uIndic const std::vector& rValueList = getValues(); - assert( uSortedInds.size() <= rValueList.size() ); - if ( uSortedInds.size() > rValueList.size() ) + assert(uSortedInds.size() <= rValueList.size()); + if (uSortedInds.size() > rValueList.size()) { return; + } std::vector remainValue; remainValue.reserve(rValueList.size() - uSortedInds.size()); std::vector::iterator pos = uSortedInds.begin(); - for ( std::vector::const_iterator it = rValueList.begin(); it != rValueList.end(); ++it ) { + for (std::vector::const_iterator it = rValueList.begin(); + it != rValueList.end(); + ++it) { unsigned long index = it - rValueList.begin(); - if (pos == uSortedInds.end()) - remainValue.push_back( *it ); - else if (index != *pos) - remainValue.push_back( *it ); - else + if (pos == uSortedInds.end()) { + remainValue.push_back(*it); + } + else if (index != *pos) { + remainValue.push_back(*it); + } + else { ++pos; + } } setValues(remainValue); @@ -423,18 +439,18 @@ void PropertyCurvatureList::setValue(const CurvatureInfo& lValue) { aboutToSetValue(); _lValueList.resize(1); - _lValueList[0]=lValue; + _lValueList[0] = lValue; hasSetValue(); } void PropertyCurvatureList::setValues(const std::vector& lValues) { aboutToSetValue(); - _lValueList=lValues; + _lValueList = lValues; hasSetValue(); } -std::vector PropertyCurvatureList::getCurvature( int mode ) const +std::vector PropertyCurvatureList::getCurvature(int mode) const { const std::vector& fCurvInfo = getValues(); std::vector fValues; @@ -442,42 +458,44 @@ std::vector PropertyCurvatureList::getCurvature( int mode ) const // Mean curvature if (mode == MeanCurvature) { - for (const auto & it : fCurvInfo) { - fValues.push_back( 0.5f*(it.fMaxCurvature+it.fMinCurvature) ); + for (const auto& it : fCurvInfo) { + fValues.push_back(0.5f * (it.fMaxCurvature + it.fMinCurvature)); } } // Gaussian curvature else if (mode == GaussCurvature) { - for (const auto & it : fCurvInfo) { - fValues.push_back( it.fMaxCurvature * it.fMinCurvature ); + for (const auto& it : fCurvInfo) { + fValues.push_back(it.fMaxCurvature * it.fMinCurvature); } } // Maximum curvature else if (mode == MaxCurvature) { - for (const auto & it : fCurvInfo) { - fValues.push_back( it.fMaxCurvature ); + for (const auto& it : fCurvInfo) { + fValues.push_back(it.fMaxCurvature); } } // Minimum curvature else if (mode == MinCurvature) { - for (const auto & it : fCurvInfo) { - fValues.push_back( it.fMinCurvature ); + for (const auto& it : fCurvInfo) { + fValues.push_back(it.fMinCurvature); } } // Absolute curvature else if (mode == AbsCurvature) { - for (const auto & it : fCurvInfo) { - if (fabs(it.fMaxCurvature) > fabs(it.fMinCurvature)) - fValues.push_back( it.fMaxCurvature ); - else - fValues.push_back( it.fMinCurvature ); + for (const auto& it : fCurvInfo) { + if (fabs(it.fMaxCurvature) > fabs(it.fMinCurvature)) { + fValues.push_back(it.fMaxCurvature); + } + else { + fValues.push_back(it.fMinCurvature); + } } } return fValues; } -void PropertyCurvatureList::transformGeometry(const Base::Matrix4D &mat) +void PropertyCurvatureList::transformGeometry(const Base::Matrix4D& mat) { // The principal direction is only a vector with unit length, so we only need to rotate it // (no translations or scaling) @@ -502,7 +520,7 @@ void PropertyCurvatureList::transformGeometry(const Base::Matrix4D &mat) aboutToSetValue(); // Rotate the principal directions - for (int ii=0; ii& uIndices ) +void PropertyCurvatureList::removeIndices(const std::vector& uIndices) { // We need a sorted array std::vector uSortedInds = uIndices; std::sort(uSortedInds.begin(), uSortedInds.end()); - assert( uSortedInds.size() <= _lValueList.size() ); - if ( uSortedInds.size() > _lValueList.size() ) + assert(uSortedInds.size() <= _lValueList.size()); + if (uSortedInds.size() > _lValueList.size()) { return; + } std::vector remainValue; remainValue.reserve(_lValueList.size() - uSortedInds.size()); std::vector::iterator pos = uSortedInds.begin(); - for ( std::vector::const_iterator it = _lValueList.begin(); it != _lValueList.end(); ++it ) { + for (std::vector::const_iterator it = _lValueList.begin(); + it != _lValueList.end(); + ++it) { unsigned long index = it - _lValueList.begin(); - if (pos == uSortedInds.end()) - remainValue.push_back( *it ); - else if (index != *pos) - remainValue.push_back( *it ); - else + if (pos == uSortedInds.end()) { + remainValue.push_back(*it); + } + else if (index != *pos) { + remainValue.push_back(*it); + } + else { ++pos; + } } setValues(remainValue); } -PyObject *PropertyCurvatureList::getPyObject() +PyObject* PropertyCurvatureList::getPyObject() { throw Py::NotImplementedError("Not yet implemented"); } -void PropertyCurvatureList::setPyObject(PyObject *) +void PropertyCurvatureList::setPyObject(PyObject*) { throw Py::NotImplementedError("Not yet implemented"); } -void PropertyCurvatureList::Save (Base::Writer &writer) const +void PropertyCurvatureList::Save(Base::Writer& writer) const { if (!writer.isForceXML()) { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyCurvatureList::Restore(Base::XMLReader &reader) +void PropertyCurvatureList::Restore(Base::XMLReader& reader) { reader.readElement("CurvatureList"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } } -void PropertyCurvatureList::SaveDocFile (Base::Writer &writer) const +void PropertyCurvatureList::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); uint32_t uCt = (uint32_t)getSize(); str << uCt; - if (uCt > 0) - for (const auto & it : _lValueList) { - str << it.fMaxCurvature << it.fMinCurvature; - str << it.cMaxCurvDir.x << it.cMaxCurvDir.y << it.cMaxCurvDir.z; - str << it.cMinCurvDir.x << it.cMinCurvDir.y << it.cMinCurvDir.z; + if (uCt > 0) { + for (const auto& it : _lValueList) { + str << it.fMaxCurvature << it.fMinCurvature; + str << it.cMaxCurvDir.x << it.cMaxCurvDir.y << it.cMaxCurvDir.z; + str << it.cMinCurvDir.x << it.cMinCurvDir.y << it.cMinCurvDir.z; + } } } -void PropertyCurvatureList::RestoreDocFile(Base::Reader &reader) +void PropertyCurvatureList::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); - uint32_t uCt=0; + uint32_t uCt = 0; str >> uCt; std::vector values(uCt); - for (auto & value : values) { + for (auto& value : values) { str >> value.fMaxCurvature >> value.fMinCurvature; str >> value.cMaxCurvDir.x >> value.cMaxCurvDir.y >> value.cMaxCurvDir.z; str >> value.cMinCurvDir.x >> value.cMinCurvDir.y >> value.cMinCurvDir.z; @@ -595,14 +621,14 @@ void PropertyCurvatureList::RestoreDocFile(Base::Reader &reader) setValues(values); } -App::Property *PropertyCurvatureList::Copy() const +App::Property* PropertyCurvatureList::Copy() const { PropertyCurvatureList* prop = new PropertyCurvatureList(); prop->_lValueList = this->_lValueList; return prop; } -void PropertyCurvatureList::Paste(const App::Property &from) +void PropertyCurvatureList::Paste(const App::Property& from) { aboutToSetValue(); const PropertyCurvatureList& prop = dynamic_cast(from); @@ -610,7 +636,7 @@ void PropertyCurvatureList::Paste(const App::Property &from) hasSetValue(); } -unsigned int PropertyCurvatureList::getMemSize () const +unsigned int PropertyCurvatureList::getMemSize() const { return sizeof(CurvatureInfo) * this->_lValueList.size(); } diff --git a/src/Mod/Points/App/Properties.h b/src/Mod/Points/App/Properties.h index be9cc54112..9442e68f6e 100644 --- a/src/Mod/Points/App/Properties.h +++ b/src/Mod/Points/App/Properties.h @@ -38,7 +38,7 @@ namespace Points /** Greyvalue property. */ -class PointsExport PropertyGreyValue : public App::PropertyFloat +class PointsExport PropertyGreyValue: public App::PropertyFloat { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -52,44 +52,47 @@ class PointsExport PropertyGreyValueList: public App::PropertyLists public: PropertyGreyValueList(); - + void setSize(int newSize) override; int getSize() const override; - /** Sets the property + /** Sets the property */ void setValue(float); - + /// index operator - float operator[] (const int idx) const { + float operator[](const int idx) const + { return _lValueList[idx]; } - void set1Value (const int idx, float value) { + void set1Value(const int idx, float value) + { _lValueList[idx] = value; } - void setValues (const std::vector& values); - - const std::vector &getValues() const { + void setValues(const std::vector& values); + + const std::vector& getValues() const + { return _lValueList; } - PyObject *getPyObject() override; - void setPyObject(PyObject *) override; - - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; - - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; - - App::Property *Copy() const override; - void Paste(const App::Property &from) override; - unsigned int getMemSize () const override; + PyObject* getPyObject() override; + void setPyObject(PyObject*) override; + + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; + + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; + + App::Property* Copy() const override; + void Paste(const App::Property& from) override; + unsigned int getMemSize() const override; /** @name Modify */ //@{ - void removeIndices( const std::vector& ); + void removeIndices(const std::vector&); //@} private: @@ -109,38 +112,41 @@ public: void setValue(const Base::Vector3f&); void setValue(float x, float y, float z); - const Base::Vector3f& operator[] (const int idx) const { + const Base::Vector3f& operator[](const int idx) const + { return _lValueList[idx]; } - void set1Value (const int idx, const Base::Vector3f& value) { + void set1Value(const int idx, const Base::Vector3f& value) + { _lValueList[idx] = value; } - void setValues (const std::vector& values); + void setValues(const std::vector& values); - const std::vector &getValues() const { + const std::vector& getValues() const + { return _lValueList; } - PyObject *getPyObject() override; - void setPyObject(PyObject *) override; + PyObject* getPyObject() override; + void setPyObject(PyObject*) override; - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; - App::Property *Copy() const override; - void Paste(const App::Property &from) override; + App::Property* Copy() const override; + void Paste(const App::Property& from) override; - unsigned int getMemSize () const override; + unsigned int getMemSize() const override; /** @name Modify */ //@{ - void transformGeometry(const Base::Matrix4D &rclMat); - void removeIndices( const std::vector& ); + void transformGeometry(const Base::Matrix4D& rclMat); + void removeIndices(const std::vector&); //@} private: @@ -161,70 +167,76 @@ class PointsExport PropertyCurvatureList: public App::PropertyLists TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - enum { - MeanCurvature = 0, /**< Mean curvature */ - GaussCurvature = 1, /**< Gaussian curvature */ - MaxCurvature = 2, /**< Maximum curvature */ - MinCurvature = 3, /**< Minimum curvature */ - AbsCurvature = 4 /**< Absolute curvature */ + enum + { + MeanCurvature = 0, /**< Mean curvature */ + GaussCurvature = 1, /**< Gaussian curvature */ + MaxCurvature = 2, /**< Maximum curvature */ + MinCurvature = 3, /**< Minimum curvature */ + AbsCurvature = 4 /**< Absolute curvature */ }; public: PropertyCurvatureList(); - void setSize(int newSize) override { + void setSize(int newSize) override + { _lValueList.resize(newSize); } - int getSize() const override { + int getSize() const override + { return _lValueList.size(); } void setValue(const CurvatureInfo&); void setValues(const std::vector&); - std::vector getCurvature( int tMode) const; + std::vector getCurvature(int tMode) const; /// index operator - const CurvatureInfo& operator[] (const int idx) const { + const CurvatureInfo& operator[](const int idx) const + { return _lValueList[idx]; } - void set1Value (const int idx, const CurvatureInfo& value) { + void set1Value(const int idx, const CurvatureInfo& value) + { _lValueList[idx] = value; } - const std::vector &getValues() const { + const std::vector& getValues() const + { return _lValueList; } - PyObject *getPyObject() override; - void setPyObject(PyObject *) override; + PyObject* getPyObject() override; + void setPyObject(PyObject*) override; /** @name Save/restore */ //@{ - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; //@} /** @name Undo/Redo */ //@{ /// returns a new copy of the property (mainly for Undo/Redo and transactions) - App::Property *Copy() const override; + App::Property* Copy() const override; /// paste the value from the property (mainly for Undo/Redo and transactions) - void Paste(const App::Property &from) override; - unsigned int getMemSize () const override; + void Paste(const App::Property& from) override; + unsigned int getMemSize() const override; //@} /** @name Modify */ //@{ - void transformGeometry(const Base::Matrix4D &rclMat); - void removeIndices( const std::vector& ); + void transformGeometry(const Base::Matrix4D& rclMat); + void removeIndices(const std::vector&); //@} private: std::vector _lValueList; }; -} // namespace Points +} // namespace Points -#endif // POINTS_POINTPROPERTIES_H +#endif // POINTS_POINTPROPERTIES_H diff --git a/src/Mod/Points/App/PropertyPointKernel.cpp b/src/Mod/Points/App/PropertyPointKernel.cpp index f87eeec0c9..25cb0e4e8e 100644 --- a/src/Mod/Points/App/PropertyPointKernel.cpp +++ b/src/Mod/Points/App/PropertyPointKernel.cpp @@ -23,27 +23,25 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include #include -#include "PropertyPointKernel.h" #include "PointsPy.h" +#include "PropertyPointKernel.h" using namespace Points; -TYPESYSTEM_SOURCE(Points::PropertyPointKernel , App::PropertyComplexGeoData) +TYPESYSTEM_SOURCE(Points::PropertyPointKernel, App::PropertyComplexGeoData) PropertyPointKernel::PropertyPointKernel() : _cPoints(new PointKernel()) -{ - -} +{} void PropertyPointKernel::setValue(const PointKernel& m) { @@ -77,18 +75,18 @@ Base::BoundBox3d PropertyPointKernel::getBoundingBox() const return _cPoints->getBoundBox(); } -PyObject *PropertyPointKernel::getPyObject() +PyObject* PropertyPointKernel::getPyObject() { PointsPy* points = new PointsPy(&*_cPoints); - points->setConst(); // set immutable + points->setConst(); // set immutable return points; } -void PropertyPointKernel::setPyObject(PyObject *value) +void PropertyPointKernel::setPyObject(PyObject* value) { if (PyObject_TypeCheck(value, &(PointsPy::Type))) { - PointsPy *pcObject = static_cast(value); - setValue( *(pcObject->getPointKernelPtr())); + PointsPy* pcObject = static_cast(value); + setValue(*(pcObject->getPointKernelPtr())); } else { std::string error = std::string("type must be 'Points', not "); @@ -97,23 +95,22 @@ void PropertyPointKernel::setPyObject(PyObject *value) } } -void PropertyPointKernel::Save (Base::Writer &writer) const +void PropertyPointKernel::Save(Base::Writer& writer) const { _cPoints->Save(writer); } -void PropertyPointKernel::Restore(Base::XMLReader &reader) +void PropertyPointKernel::Restore(Base::XMLReader& reader) { reader.readElement("Points"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } - if(reader.DocumentSchema > 3) - { - std::string Matrix (reader.getAttribute("mtrx") ); + if (reader.DocumentSchema > 3) { + std::string Matrix(reader.getAttribute("mtrx")); Base::Matrix4D mtrx; mtrx.fromString(Matrix); @@ -123,27 +120,27 @@ void PropertyPointKernel::Restore(Base::XMLReader &reader) } } -void PropertyPointKernel::SaveDocFile (Base::Writer &writer) const +void PropertyPointKernel::SaveDocFile(Base::Writer& writer) const { // does nothing (void)writer; } -void PropertyPointKernel::RestoreDocFile(Base::Reader &reader) +void PropertyPointKernel::RestoreDocFile(Base::Reader& reader) { aboutToSetValue(); _cPoints->RestoreDocFile(reader); hasSetValue(); } -App::Property *PropertyPointKernel::Copy() const +App::Property* PropertyPointKernel::Copy() const { PropertyPointKernel* prop = new PropertyPointKernel(); (*prop->_cPoints) = (*this->_cPoints); return prop; } -void PropertyPointKernel::Paste(const App::Property &from) +void PropertyPointKernel::Paste(const App::Property& from) { aboutToSetValue(); const PropertyPointKernel& prop = dynamic_cast(from); @@ -151,7 +148,7 @@ void PropertyPointKernel::Paste(const App::Property &from) hasSetValue(); } -unsigned int PropertyPointKernel::getMemSize () const +unsigned int PropertyPointKernel::getMemSize() const { return sizeof(Base::Vector3f) * this->_cPoints->size(); } @@ -167,15 +164,16 @@ void PropertyPointKernel::finishEditing() hasSetValue(); } -void PropertyPointKernel::removeIndices( const std::vector& uIndices ) +void PropertyPointKernel::removeIndices(const std::vector& uIndices) { // We need a sorted array std::vector uSortedInds = uIndices; std::sort(uSortedInds.begin(), uSortedInds.end()); - assert( uSortedInds.size() <= _cPoints->size() ); - if ( uSortedInds.size() > _cPoints->size() ) + assert(uSortedInds.size() <= _cPoints->size()); + if (uSortedInds.size() > _cPoints->size()) { return; + } PointKernel kernel; kernel.setTransform(_cPoints->getTransform()); @@ -184,18 +182,21 @@ void PropertyPointKernel::removeIndices( const std::vector& uIndi std::vector::iterator pos = uSortedInds.begin(); unsigned long index = 0; for (PointKernel::const_iterator it = _cPoints->begin(); it != _cPoints->end(); ++it, ++index) { - if (pos == uSortedInds.end()) - kernel.push_back( *it ); - else if (index != *pos) - kernel.push_back( *it ); - else + if (pos == uSortedInds.end()) { + kernel.push_back(*it); + } + else if (index != *pos) { + kernel.push_back(*it); + } + else { ++pos; + } } setValue(kernel); } -void PropertyPointKernel::transformGeometry(const Base::Matrix4D &rclMat) +void PropertyPointKernel::transformGeometry(const Base::Matrix4D& rclMat) { aboutToSetValue(); _cPoints->transformGeometry(rclMat); diff --git a/src/Mod/Points/App/PropertyPointKernel.h b/src/Mod/Points/App/PropertyPointKernel.h index e1f055f768..0708195e54 100644 --- a/src/Mod/Points/App/PropertyPointKernel.h +++ b/src/Mod/Points/App/PropertyPointKernel.h @@ -31,7 +31,7 @@ namespace Points /** The point kernel property */ -class PointsExport PropertyPointKernel : public App::PropertyComplexGeoData +class PointsExport PropertyPointKernel: public App::PropertyComplexGeoData { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -41,9 +41,9 @@ public: /** @name Getter/setter */ //@{ /// Sets the points to the property - void setValue( const PointKernel& m); + void setValue(const PointKernel& m); /// get the points (only const possible!) - const PointKernel &getValue() const; + const PointKernel& getValue() const; const Data::ComplexGeoData* getComplexData() const override; void setTransform(const Base::Matrix4D& rclTrf) override; Base::Matrix4D getTransform() const override; @@ -58,24 +58,24 @@ public: /** @name Python interface */ //@{ PyObject* getPyObject() override; - void setPyObject(PyObject *value) override; + void setPyObject(PyObject* value) override; //@} /** @name Undo/Redo */ //@{ /// returns a new copy of the property (mainly for Undo/Redo and transactions) - App::Property *Copy() const override; + App::Property* Copy() const override; /// paste the value from the property (mainly for Undo/Redo and transactions) - void Paste(const App::Property &from) override; - unsigned int getMemSize () const override; + void Paste(const App::Property& from) override; + unsigned int getMemSize() const override; //@} /** @name Save/restore */ //@{ - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; //@} /** @name Modification */ @@ -83,15 +83,15 @@ public: PointKernel* startEditing(); void finishEditing(); /// Transform the real 3d point kernel - void transformGeometry(const Base::Matrix4D &rclMat) override; - void removeIndices( const std::vector& ); + void transformGeometry(const Base::Matrix4D& rclMat) override; + void removeIndices(const std::vector&); //@} private: Base::Reference _cPoints; }; -} // namespace Points +} // namespace Points -#endif // POINTS_PROPERTYPOINTKERNEL_H +#endif // POINTS_PROPERTYPOINTKERNEL_H diff --git a/src/Mod/Points/App/Structured.cpp b/src/Mod/Points/App/Structured.cpp index 5f7f036831..11cf94091b 100644 --- a/src/Mod/Points/App/Structured.cpp +++ b/src/Mod/Points/App/Structured.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "Structured.h" @@ -62,30 +62,32 @@ PROPERTY_SOURCE(Points::Structured, Points::Feature) Structured::Structured() { -// App::PropertyType type = static_cast(App::Prop_None); + // App::PropertyType type = static_cast(App::Prop_None); App::PropertyType type = static_cast(App::Prop_ReadOnly); - ADD_PROPERTY_TYPE(Width,(1),"Structured points", type, "Width of the image"); - ADD_PROPERTY_TYPE(Height,(1),"Structured points", type, "Height of the image"); - //Width.setStatus(App::Property::ReadOnly, true); - //Height.setStatus(App::Property::ReadOnly, true); + ADD_PROPERTY_TYPE(Width, (1), "Structured points", type, "Width of the image"); + ADD_PROPERTY_TYPE(Height, (1), "Structured points", type, "Height of the image"); + // Width.setStatus(App::Property::ReadOnly, true); + // Height.setStatus(App::Property::ReadOnly, true); } -App::DocumentObjectExecReturn *Structured::execute() +App::DocumentObjectExecReturn* Structured::execute() { std::size_t size = Height.getValue() * Width.getValue(); - if (size != Points.getValue().size()) + if (size != Points.getValue().size()) { throw Base::ValueError("(Width * Height) doesn't match with number of points"); + } this->Points.touch(); return App::DocumentObject::StdReturn; } // --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Points::StructuredCustom, Points::Structured) /// @endcond // explicit template instantiation template class PointsExport FeatureCustomT; -} +} // namespace App diff --git a/src/Mod/Points/App/Structured.h b/src/Mod/Points/App/Structured.h index c388c8b34b..3214e09851 100644 --- a/src/Mod/Points/App/Structured.h +++ b/src/Mod/Points/App/Structured.h @@ -34,7 +34,7 @@ namespace Points and that with respect to their x,y coordinates they are ordered in a grid structure. If a point is marked invalid then one of its coordinates is set to NaN. */ -class PointsExport Structured : public Feature +class PointsExport Structured: public Feature { PROPERTY_HEADER_WITH_OVERRIDE(Points::Structured); @@ -42,15 +42,16 @@ public: /// Constructor Structured(); - App::PropertyInteger Width; /**< The width of the structured cloud. */ + App::PropertyInteger Width; /**< The width of the structured cloud. */ App::PropertyInteger Height; /**< The height of the structured cloud. */ /** @name methods override Feature */ //@{ /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "PointsGui::ViewProviderStructured"; } //@} @@ -58,7 +59,7 @@ public: using StructuredCustom = App::FeatureCustomT; -} //namespace Points +} // namespace Points #endif diff --git a/src/Mod/Points/App/Tools.h b/src/Mod/Points/App/Tools.h index 48be0fd033..c1b80a9105 100644 --- a/src/Mod/Points/App/Tools.h +++ b/src/Mod/Points/App/Tools.h @@ -24,10 +24,11 @@ #ifndef POINTS_TOOLS_H #define POINTS_TOOLS_H -#include #include +#include -namespace Points { +namespace Points +{ template bool copyProperty(App::DocumentObject* target, @@ -39,13 +40,12 @@ bool copyProperty(App::DocumentObject* target, return dynamic_cast(obj->getPropertyByName(propertyName)) != nullptr; })) { - auto target_prop = dynamic_cast - (target->addDynamicProperty(PropertyT::getClassTypeId().getName(), propertyName)); + auto target_prop = dynamic_cast( + target->addDynamicProperty(PropertyT::getClassTypeId().getName(), propertyName)); if (target_prop) { auto values = target_prop->getValues(); for (auto it : source) { - auto source_prop = dynamic_cast - (it->getPropertyByName(propertyName)); + auto source_prop = dynamic_cast(it->getPropertyByName(propertyName)); if (source_prop) { auto source_values = source_prop->getValues(); values.insert(values.end(), source_values.begin(), source_values.end()); @@ -60,6 +60,6 @@ bool copyProperty(App::DocumentObject* target, return false; } -} +} // namespace Points -#endif // POINTS_TOOLS_H +#endif // POINTS_TOOLS_H diff --git a/src/Mod/Points/Gui/AppPointsGui.cpp b/src/Mod/Points/Gui/AppPointsGui.cpp index f2ddcd41b7..0da1eb3f5f 100644 --- a/src/Mod/Points/Gui/AppPointsGui.cpp +++ b/src/Mod/Points/Gui/AppPointsGui.cpp @@ -44,13 +44,15 @@ void loadPointsResource() Gui::Translator::instance()->refresh(); } -namespace PointsGui { -class Module : public Py::ExtensionModule +namespace PointsGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("PointsGui") + Module() + : Py::ExtensionModule("PointsGui") { - initialize("This module is the PointsGui module."); // register with Python + initialize("This module is the PointsGui module."); // register with Python } }; @@ -59,7 +61,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace PointsGui +} // namespace PointsGui /* Python entry */ @@ -74,7 +76,7 @@ PyMOD_INIT_FUNC(PointsGui) try { Base::Interpreter().loadModule("Points"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } @@ -85,14 +87,15 @@ PyMOD_INIT_FUNC(PointsGui) // instantiating the commands CreatePointsCommands(); + // clang-format off PointsGui::ViewProviderPoints ::init(); PointsGui::ViewProviderScattered ::init(); PointsGui::ViewProviderStructured ::init(); PointsGui::ViewProviderPython ::init(); PointsGui::Workbench ::init(); - Gui::ViewProviderBuilder::add( - Points::PropertyPointKernel::getClassTypeId(), - PointsGui::ViewProviderPoints::getClassTypeId()); + // clang-format on + Gui::ViewProviderBuilder::add(Points::PropertyPointKernel::getClassTypeId(), + PointsGui::ViewProviderPoints::getClassTypeId()); // add resources and reloads the translators loadPointsResource(); diff --git a/src/Mod/Points/Gui/Command.cpp b/src/Mod/Points/Gui/Command.cpp index 4525f2ddfd..e57985c32c 100644 --- a/src/Mod/Points/Gui/Command.cpp +++ b/src/Mod/Points/Gui/Command.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include #include @@ -46,8 +46,8 @@ #include #include "../App/PointsFeature.h" -#include "../App/Structured.h" #include "../App/Properties.h" +#include "../App/Structured.h" #include "../App/Tools.h" #include "DlgPointsReadImp.h" @@ -62,34 +62,40 @@ DEF_STD_CMD_A(CmdPointsImport) CmdPointsImport::CmdPointsImport() - : Command("Points_Import") + : Command("Points_Import") { - sAppModule = "Points"; - sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Import points..."); - sToolTipText = QT_TR_NOOP("Imports a point cloud"); - sWhatsThis = "Points_Import"; - sStatusTip = QT_TR_NOOP("Imports a point cloud"); - sPixmap = "Points_Import_Point_cloud"; + sAppModule = "Points"; + sGroup = QT_TR_NOOP("Points"); + sMenuText = QT_TR_NOOP("Import points..."); + sToolTipText = QT_TR_NOOP("Imports a point cloud"); + sWhatsThis = "Points_Import"; + sStatusTip = QT_TR_NOOP("Imports a point cloud"); + sPixmap = "Points_Import_Point_cloud"; } void CmdPointsImport::activated(int iMsg) { Q_UNUSED(iMsg); - QString fn = Gui::FileDialog::getOpenFileName(Gui::getMainWindow(), - QString(), QString(), QString::fromLatin1("%1 (*.asc *.pcd *.ply);;%2 (*.*)") - .arg(QObject::tr("Point formats"), QObject::tr("All Files"))); - if (fn.isEmpty()) + QString fn = Gui::FileDialog::getOpenFileName( + Gui::getMainWindow(), + QString(), + QString(), + QString::fromLatin1("%1 (*.asc *.pcd *.ply);;%2 (*.*)") + .arg(QObject::tr("Point formats"), QObject::tr("All Files"))); + if (fn.isEmpty()) { return; + } if (!fn.isEmpty()) { fn = Base::Tools::escapeEncodeFilename(fn); Gui::Document* doc = getActiveGuiDocument(); openCommand(QT_TRANSLATE_NOOP("Command", "Import points")); addModule(Command::App, "Points"); - doCommand(Command::Doc, "Points.insert(\"%s\", \"%s\")", - fn.toUtf8().data(), doc->getDocument()->getName()); + doCommand(Command::Doc, + "Points.insert(\"%s\", \"%s\")", + fn.toUtf8().data(), + doc->getDocument()->getName()); commitCommand(); updateActive(); @@ -98,24 +104,26 @@ void CmdPointsImport::activated(int iMsg) bool CmdPointsImport::isActive() { - if (getActiveGuiDocument()) + if (getActiveGuiDocument()) { return true; - else + } + else { return false; + } } DEF_STD_CMD_A(CmdPointsExport) CmdPointsExport::CmdPointsExport() - : Command("Points_Export") + : Command("Points_Export") { - sAppModule = "Points"; - sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Export points..."); - sToolTipText = QT_TR_NOOP("Exports a point cloud"); - sWhatsThis = "Points_Export"; - sStatusTip = QT_TR_NOOP("Exports a point cloud"); - sPixmap = "Points_Export_Point_cloud"; + sAppModule = "Points"; + sGroup = QT_TR_NOOP("Points"); + sMenuText = QT_TR_NOOP("Export points..."); + sToolTipText = QT_TR_NOOP("Exports a point cloud"); + sWhatsThis = "Points_Export"; + sStatusTip = QT_TR_NOOP("Exports a point cloud"); + sPixmap = "Points_Export_Point_cloud"; } void CmdPointsExport::activated(int iMsg) @@ -123,18 +131,25 @@ void CmdPointsExport::activated(int iMsg) Q_UNUSED(iMsg); addModule(Command::App, "Points"); - std::vector points = getSelection().getObjectsOfType(Points::Feature::getClassTypeId()); + std::vector points = + getSelection().getObjectsOfType(Points::Feature::getClassTypeId()); for (auto point : points) { - QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), - QString(), QString(), QString::fromLatin1("%1 (*.asc *.pcd *.ply);;%2 (*.*)") - .arg(QObject::tr("Point formats"), QObject::tr("All Files"))); - if (fn.isEmpty()) + QString fn = Gui::FileDialog::getSaveFileName( + Gui::getMainWindow(), + QString(), + QString(), + QString::fromLatin1("%1 (*.asc *.pcd *.ply);;%2 (*.*)") + .arg(QObject::tr("Point formats"), QObject::tr("All Files"))); + if (fn.isEmpty()) { break; + } if (!fn.isEmpty()) { fn = Base::Tools::escapeEncodeFilename(fn); - doCommand(Command::Doc, "Points.export([App.ActiveDocument.%s], \"%s\")", - point->getNameInDocument(), fn.toUtf8().data()); + doCommand(Command::Doc, + "Points.export([App.ActiveDocument.%s], \"%s\")", + point->getNameInDocument(), + fn.toUtf8().data()); } } } @@ -147,15 +162,15 @@ bool CmdPointsExport::isActive() DEF_STD_CMD_A(CmdPointsTransform) CmdPointsTransform::CmdPointsTransform() - :Command("Points_Transform") + : Command("Points_Transform") { - sAppModule = "Points"; - sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Transform Points"); - sToolTipText = QT_TR_NOOP("Test to transform a point cloud"); - sWhatsThis = "Points_Transform"; - sStatusTip = QT_TR_NOOP("Test to transform a point cloud"); - sPixmap = "Test1"; + sAppModule = "Points"; + sGroup = QT_TR_NOOP("Points"); + sMenuText = QT_TR_NOOP("Transform Points"); + sToolTipText = QT_TR_NOOP("Test to transform a point cloud"); + sWhatsThis = "Points_Transform"; + sStatusTip = QT_TR_NOOP("Test to transform a point cloud"); + sPixmap = "Test1"; } void CmdPointsTransform::activated(int iMsg) @@ -167,12 +182,14 @@ void CmdPointsTransform::activated(int iMsg) trans.setRotation(Base::Rotation(Base::Vector3d(0.0, 0.0, 1.0), 1.570796)); openCommand(QT_TRANSLATE_NOOP("Command", "Transform points")); - //std::vector points = getSelection().getObjectsOfType(Points::Feature::getClassTypeId()); - //for (std::vector::const_iterator it = points.begin(); it != points.end(); ++it) { - // Base::Placement p = static_cast(*it)->Placement.getValue(); - // p._rot *= Base::Rotation(Base::Vector3d(0.0, 0.0, 1.0), 1.570796); - // static_cast(*it)->Placement.setValue(p); - //} + // std::vector points = + // getSelection().getObjectsOfType(Points::Feature::getClassTypeId()); for + // (std::vector::const_iterator it = points.begin(); it != points.end(); + // ++it) { + // Base::Placement p = static_cast(*it)->Placement.getValue(); + // p._rot *= Base::Rotation(Base::Vector3d(0.0, 0.0, 1.0), 1.570796); + // static_cast(*it)->Placement.setValue(p); + // } commitCommand(); } @@ -184,15 +201,15 @@ bool CmdPointsTransform::isActive() DEF_STD_CMD_A(CmdPointsConvert) CmdPointsConvert::CmdPointsConvert() - :Command("Points_Convert") + : Command("Points_Convert") { - sAppModule = "Points"; - sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Convert to points..."); - sToolTipText = QT_TR_NOOP("Convert to points"); - sWhatsThis = "Points_Convert"; - sStatusTip = QT_TR_NOOP("Convert to points"); - sPixmap = "Points_Convert"; + sAppModule = "Points"; + sGroup = QT_TR_NOOP("Points"); + sMenuText = QT_TR_NOOP("Convert to points..."); + sToolTipText = QT_TR_NOOP("Convert to points"); + sWhatsThis = "Points_Convert"; + sStatusTip = QT_TR_NOOP("Convert to points"); + sPixmap = "Points_Convert"; } void CmdPointsConvert::activated(int iMsg) @@ -203,13 +220,22 @@ void CmdPointsConvert::activated(int iMsg) int decimals = Base::UnitsApi::getDecimals(); double tolerance_from_decimals = pow(10., -decimals); - double minimal_tolerance = tolerance_from_decimals < STD_OCC_TOLERANCE ? STD_OCC_TOLERANCE : tolerance_from_decimals; + double minimal_tolerance = + tolerance_from_decimals < STD_OCC_TOLERANCE ? STD_OCC_TOLERANCE : tolerance_from_decimals; bool ok; - double tol = QInputDialog::getDouble(Gui::getMainWindow(), QObject::tr("Distance"), - QObject::tr("Enter maximum distance:"), 0.1, minimal_tolerance, 10.0, decimals, &ok, Qt::MSWindowsFixedSizeDialogHint); - if (!ok) + double tol = QInputDialog::getDouble(Gui::getMainWindow(), + QObject::tr("Distance"), + QObject::tr("Enter maximum distance:"), + 0.1, + minimal_tolerance, + 10.0, + decimals, + &ok, + Qt::MSWindowsFixedSizeDialogHint); + if (!ok) { return; + } Gui::WaitCursor wc; openCommand(QT_TRANSLATE_NOOP("Command", "Convert to points")); @@ -231,7 +257,8 @@ void CmdPointsConvert::activated(int iMsg) } Py::Module commands(module, true); - commands.callMemberFunction("make_points_from_geometry", Py::TupleN(list, Py::Float(tol))); + commands.callMemberFunction("make_points_from_geometry", + Py::TupleN(list, Py::Float(tol))); return true; } @@ -240,10 +267,12 @@ void CmdPointsConvert::activated(int iMsg) Base::PyGILStateLocker lock; try { - if (run_python(geoObject, tol)) + if (run_python(geoObject, tol)) { commitCommand(); - else + } + else { abortCommand(); + } } catch (const Py::Exception&) { abortCommand(); @@ -260,23 +289,25 @@ bool CmdPointsConvert::isActive() DEF_STD_CMD_A(CmdPointsPolyCut) CmdPointsPolyCut::CmdPointsPolyCut() - :Command("Points_PolyCut") + : Command("Points_PolyCut") { - sAppModule = "Points"; - sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Cut point cloud"); - sToolTipText = QT_TR_NOOP("Cuts a point cloud with a picked polygon"); - sWhatsThis = "Points_PolyCut"; - sStatusTip = QT_TR_NOOP("Cuts a point cloud with a picked polygon"); - sPixmap = "PolygonPick"; + sAppModule = "Points"; + sGroup = QT_TR_NOOP("Points"); + sMenuText = QT_TR_NOOP("Cut point cloud"); + sToolTipText = QT_TR_NOOP("Cuts a point cloud with a picked polygon"); + sWhatsThis = "Points_PolyCut"; + sStatusTip = QT_TR_NOOP("Cuts a point cloud with a picked polygon"); + sPixmap = "PolygonPick"; } void CmdPointsPolyCut::activated(int iMsg) { Q_UNUSED(iMsg); - std::vector docObj = Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); - for (std::vector::iterator it = docObj.begin(); it != docObj.end(); ++it) { + std::vector docObj = + Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); + for (std::vector::iterator it = docObj.begin(); it != docObj.end(); + ++it) { if (it == docObj.begin()) { Gui::Document* doc = getActiveGuiDocument(); Gui::MDIView* view = doc->getActiveView(); @@ -284,14 +315,15 @@ void CmdPointsPolyCut::activated(int iMsg) Gui::View3DInventorViewer* viewer = ((Gui::View3DInventor*)view)->getViewer(); viewer->setEditing(true); viewer->startSelection(Gui::View3DInventorViewer::Lasso); - viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), PointsGui::ViewProviderPoints::clipPointsCallback); + viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), + PointsGui::ViewProviderPoints::clipPointsCallback); } else { return; } } - Gui::ViewProvider* pVP = getActiveGuiDocument()->getViewProvider( *it ); + Gui::ViewProvider* pVP = getActiveGuiDocument()->getViewProvider(*it); pVP->startEditing(Gui::ViewProvider::Cutting); } } @@ -305,15 +337,15 @@ bool CmdPointsPolyCut::isActive() DEF_STD_CMD_A(CmdPointsMerge) CmdPointsMerge::CmdPointsMerge() - :Command("Points_Merge") + : Command("Points_Merge") { - sAppModule = "Points"; - sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Merge point clouds"); - sToolTipText = QT_TR_NOOP("Merge several point clouds into one"); - sWhatsThis = "Points_Merge"; - sStatusTip = QT_TR_NOOP("Merge several point clouds into one"); - sPixmap = "Points_Merge"; + sAppModule = "Points"; + sGroup = QT_TR_NOOP("Points"); + sMenuText = QT_TR_NOOP("Merge point clouds"); + sToolTipText = QT_TR_NOOP("Merge several point clouds into one"); + sWhatsThis = "Points_Merge"; + sStatusTip = QT_TR_NOOP("Merge several point clouds into one"); + sPixmap = "Points_Merge"; } void CmdPointsMerge::activated(int iMsg) @@ -322,16 +354,18 @@ void CmdPointsMerge::activated(int iMsg) App::Document* doc = App::GetApplication().getActiveDocument(); doc->openTransaction("Merge point clouds"); - Points::Feature* pts = static_cast(doc->addObject("Points::Feature", "Merged Points")); + Points::Feature* pts = + static_cast(doc->addObject("Points::Feature", "Merged Points")); Points::PointKernel* kernel = pts->Points.startEditing(); - std::vector docObj = Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); + std::vector docObj = + Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); for (auto it : docObj) { const Points::PointKernel& k = static_cast(it)->Points.getValue(); std::size_t numPts = kernel->size(); kernel->resize(numPts + k.size()); - for (std::size_t i=0; isetPoint(i+numPts, k.getPoint(i)); + for (std::size_t i = 0; i < k.size(); ++i) { + kernel->setPoint(i + numPts, k.getPoint(i)); } } @@ -349,8 +383,8 @@ void CmdPointsMerge::activated(int iMsg) displayMode = "Intensity"; } - if (auto vp = dynamic_cast - (Gui::Application::Instance->getViewProvider(pts))) { + if (auto vp = dynamic_cast( + Gui::Application::Instance->getViewProvider(pts))) { vp->DisplayMode.setValue(displayMode.c_str()); } @@ -366,15 +400,15 @@ bool CmdPointsMerge::isActive() DEF_STD_CMD_A(CmdPointsStructure) CmdPointsStructure::CmdPointsStructure() - :Command("Points_Structure") + : Command("Points_Structure") { - sAppModule = "Points"; - sGroup = QT_TR_NOOP("Points"); - sMenuText = QT_TR_NOOP("Structured point cloud"); - sToolTipText = QT_TR_NOOP("Convert points to structured point cloud"); - sWhatsThis = "Points_Structure"; - sStatusTip = QT_TR_NOOP("Convert points to structured point cloud"); - sPixmap = "Points_Structure"; + sAppModule = "Points"; + sGroup = QT_TR_NOOP("Points"); + sMenuText = QT_TR_NOOP("Structured point cloud"); + sToolTipText = QT_TR_NOOP("Convert points to structured point cloud"); + sWhatsThis = "Points_Structure"; + sStatusTip = QT_TR_NOOP("Convert points to structured point cloud"); + sPixmap = "Points_Structure"; } void CmdPointsStructure::activated(int iMsg) @@ -384,11 +418,13 @@ void CmdPointsStructure::activated(int iMsg) App::Document* doc = App::GetApplication().getActiveDocument(); doc->openTransaction("Structure point cloud"); - std::vector docObj = Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); + std::vector docObj = + Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); for (auto it : docObj) { std::string name = it->Label.getValue(); name += " (Structured)"; - Points::Structured* output = static_cast(doc->addObject("Points::Structured", name.c_str())); + Points::Structured* output = + static_cast(doc->addObject("Points::Structured", name.c_str())); output->Label.setValue(name); // Already sorted, so just make a copy @@ -399,7 +435,7 @@ void CmdPointsStructure::activated(int iMsg) const Points::PointKernel& k = input->Points.getValue(); kernel->resize(k.size()); - for (std::size_t i=0; isetPoint(i, k.getPoint(i)); } output->Points.finishEditing(); @@ -419,7 +455,7 @@ void CmdPointsStructure::activated(int iMsg) // Count the number of different x or y values to get the size std::set countX, countY; - for (std::size_t i=0; i points and afterwards replace them // with valid point coordinates double nan = std::numeric_limits::quiet_NaN(); - std::vector sortedPoints(width_l * height_l, Base::Vector3d(nan, nan, nan)); + std::vector sortedPoints(width_l * height_l, + Base::Vector3d(nan, nan, nan)); - for (std::size_t i=0; icommandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdPointsImport()); rcCmdMgr.addCommand(new CmdPointsExport()); rcCmdMgr.addCommand(new CmdPointsTransform()); diff --git a/src/Mod/Points/Gui/DlgPointsReadImp.cpp b/src/Mod/Points/Gui/DlgPointsReadImp.cpp index badb36b6ff..1d42bc04b7 100644 --- a/src/Mod/Points/Gui/DlgPointsReadImp.cpp +++ b/src/Mod/Points/Gui/DlgPointsReadImp.cpp @@ -28,12 +28,12 @@ using namespace PointsGui; -DlgPointsReadImp::DlgPointsReadImp(const char *FileName, QWidget* parent, Qt::WindowFlags fl ) - : QDialog( parent, fl ) +DlgPointsReadImp::DlgPointsReadImp(const char* FileName, QWidget* parent, Qt::WindowFlags fl) + : QDialog(parent, fl) , ui(new Ui_DlgPointsRead) { - ui->setupUi(this); - _FileName = FileName; + ui->setupUi(this); + _FileName = FileName; } /* diff --git a/src/Mod/Points/Gui/DlgPointsReadImp.h b/src/Mod/Points/Gui/DlgPointsReadImp.h index 3f8dfc53f5..157fad19f9 100644 --- a/src/Mod/Points/Gui/DlgPointsReadImp.h +++ b/src/Mod/Points/Gui/DlgPointsReadImp.h @@ -23,28 +23,31 @@ #ifndef POINTSGUI_DLGREADPOINTS_H #define POINTSGUI_DLGREADPOINTS_H -#include #include +#include -namespace PointsGui { +namespace PointsGui +{ class Ui_DlgPointsRead; /** The points read dialog */ -class DlgPointsReadImp : public QDialog +class DlgPointsReadImp: public QDialog { - Q_OBJECT + Q_OBJECT public: - explicit DlgPointsReadImp(const char *FileName, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); - ~DlgPointsReadImp() override; + explicit DlgPointsReadImp(const char* FileName, + QWidget* parent = nullptr, + Qt::WindowFlags fl = Qt::WindowFlags()); + ~DlgPointsReadImp() override; private: - std::unique_ptr ui; - std::string _FileName; + std::unique_ptr ui; + std::string _FileName; }; -} // namespace PointsGui +} // namespace PointsGui -#endif // POINTSGUI_DLGREADPOINTS_H +#endif // POINTSGUI_DLGREADPOINTS_H diff --git a/src/Mod/Points/Gui/PreCompiled.h b/src/Mod/Points/Gui/PreCompiled.h index bcfbb39e3c..f04ddc9b8d 100644 --- a/src/Mod/Points/Gui/PreCompiled.h +++ b/src/Mod/Points/Gui/PreCompiled.h @@ -28,30 +28,30 @@ #ifdef _PreComp_ // STL -# include -# include -# include +#include +#include +#include // boost -# include +#include // Qt -# include -# include +#include +#include // Inventor -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif //_PreComp_ -#endif // POINTSGUI_PRECOMPILED_H +#endif // POINTSGUI_PRECOMPILED_H diff --git a/src/Mod/Points/Gui/Resources/translations/Points.ts b/src/Mod/Points/Gui/Resources/translations/Points.ts index 702291d088..7d4c72d20d 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points - + Convert to points... - - + + Convert to points @@ -23,18 +23,18 @@ CmdPointsExport - + Points - + Export points... - - + + Exports a point cloud @@ -61,18 +61,18 @@ CmdPointsMerge - + Points - + Merge point clouds - - + + Merge several point clouds into one @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points - + Cut point cloud - - + + Cuts a point cloud with a picked polygon @@ -99,18 +99,18 @@ CmdPointsStructure - + Points - + Structured point cloud - - + + Convert points to structured point cloud @@ -118,18 +118,18 @@ CmdPointsTransform - + Points - + Transform Points - - + + Test to transform a point cloud @@ -137,23 +137,23 @@ Command - + Import points - + Transform points - + Convert to points - - + + Cut points @@ -291,24 +291,24 @@ QObject - - + + Point formats - - + + All Files - + Distance - + Enter maximum distance: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_be.ts b/src/Mod/Points/Gui/Resources/translations/Points_be.ts index aa97c87dad..d441b23bf8 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_be.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_be.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Кропкі - + Convert to points... Пераўтварыць у кропкі... - - + + Convert to points Пераўтварыць у кропкі @@ -23,18 +23,18 @@ CmdPointsExport - + Points Кропкі - + Export points... Экспарт кропак... - - + + Exports a point cloud Экспарт воблака кропак @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Кропкі - + Merge point clouds Аб'яднаць воблака кропак - - + + Merge several point clouds into one Аб'яднаць некалькі воблакаў кропак у адно @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Кропкі - + Cut point cloud Выразаць воблака кропак - - + + Cuts a point cloud with a picked polygon Выразаць воблака кропак, якое абмежавана абраным шматкутнікам @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Кропкі - + Structured point cloud Воблака структураваных кропак - - + + Convert points to structured point cloud Пераўтварыць кропкі ў воблака структураваных кропак @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Кропкі - + Transform Points Пераўтварэнне Кропак - - + + Test to transform a point cloud Тэст для пераўтварэння воблака кропак @@ -137,23 +137,23 @@ Command - + Import points Імпарт кропак - + Transform points Пераўтварэнне кропак - + Convert to points Пераўтварыць у кропкі - - + + Cut points Выразаць кропкі @@ -280,35 +280,35 @@ Preview - Папярэдні прагляд + Папярэдні выгляд Number of previewed lines: - Колькасць радкоў для папярэдняга прагляду: + Колькасць радкоў для папярэдняга выгляду: QObject - - + + Point formats Фарматы кропкі - - + + All Files Усе файлы - + Distance Адлегласць - + Enter maximum distance: Увядзіце найбольшую адлегласць: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_ca.ts b/src/Mod/Points/Gui/Resources/translations/Points_ca.ts index e8932cf516..c10240af69 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_ca.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_ca.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Punts - + Convert to points... Convertir en punts... - - + + Convert to points Convertir en punts @@ -23,18 +23,18 @@ CmdPointsExport - + Points Punts - + Export points... Exportar punts... - - + + Exports a point cloud Exporta un núvol de punts @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Punts - + Merge point clouds Fusiona els núvols de punts - - + + Merge several point clouds into one Fusiona diversos núvols de punts en un de sol @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Punts - + Cut point cloud Talla un núvol de punts - - + + Cuts a point cloud with a picked polygon Talla un núvol de punts amb un polígon seleccionat @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Punts - + Structured point cloud Núvol de punts estructurats - - + + Convert points to structured point cloud Converteix els punts en un núvol de punts estructurats @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Punts - + Transform Points Transforma els punts - - + + Test to transform a point cloud Prova per a transformar un núvol de punts @@ -137,23 +137,23 @@ Command - + Import points Importa els punts - + Transform points Transforma els punts - + Convert to points Convertir en punts - - + + Cut points Talla els punts @@ -291,24 +291,24 @@ QObject - - + + Point formats Formats de punt - - + + All Files Tots els fitxers - + Distance Distance - + Enter maximum distance: Introduïu la distància màxima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_cs.ts b/src/Mod/Points/Gui/Resources/translations/Points_cs.ts index dccbdfa96c..aeed8108a5 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_cs.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_cs.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Body - + Convert to points... Převést na body... - - + + Convert to points Převést na body @@ -23,18 +23,18 @@ CmdPointsExport - + Points Body - + Export points... Export bodů... - - + + Exports a point cloud Export množiny bodů @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Body - + Merge point clouds Sloučit mračna bodů - - + + Merge several point clouds into one Sloučet několik mračen bodů do jednoho @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Body - + Cut point cloud Ořezat množinu bodů - - + + Cuts a point cloud with a picked polygon Ořezat množinu bodů výběrovým polygonem @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Body - + Structured point cloud Strukturované mračno bodů - - + + Convert points to structured point cloud Převést body na strukturované mračno bodů @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Body - + Transform Points Transfomovat body - - + + Test to transform a point cloud Zkusit transformovat množinu bodů @@ -137,23 +137,23 @@ Command - + Import points Importovat body - + Transform points Transformovat body - + Convert to points Převést na body - - + + Cut points Body řezu @@ -291,24 +291,24 @@ QObject - - + + Point formats Formáty bodů - - + + All Files Všechny soubory - + Distance Vzdálenost - + Enter maximum distance: Zadejte maximální vzdálenost: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_de.ts b/src/Mod/Points/Gui/Resources/translations/Points_de.ts index fd68fbd7bb..1893126d41 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_de.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_de.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Punkte - + Convert to points... In Punkte umwandeln... - - + + Convert to points In Punkte umwandeln @@ -23,18 +23,18 @@ CmdPointsExport - + Points Punkte - + Export points... Punkte exportieren... - - + + Exports a point cloud Exportiert eine Punktwolke @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Punkte - + Merge point clouds Punktwolken zusammenführen - - + + Merge several point clouds into one Fügt mehrere Punktwolken zu einer zusammen @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Punkte - + Cut point cloud Punktwolke schneiden - - + + Cuts a point cloud with a picked polygon Schneiden einer Punktwolke mit einem gewählten Polygon @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Punkte - + Structured point cloud Strukturierte Punktwolke - - + + Convert points to structured point cloud Wandelt Punkte in eine strukturierte Punktwolke um @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Punkte - + Transform Points Punkte transformieren - - + + Test to transform a point cloud Test zur Transformation einer Punktwolke @@ -137,23 +137,23 @@ Command - + Import points Punkte importieren - + Transform points Punkte transformieren - + Convert to points Zu Punkten umwandeln - - + + Cut points Punkte ausschneiden @@ -291,24 +291,24 @@ QObject - - + + Point formats Punkt-Formate - - + + All Files Alle Dateien - + Distance Entfernung - + Enter maximum distance: Maximale Entfernung eingeben: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_el.ts b/src/Mod/Points/Gui/Resources/translations/Points_el.ts index bd03817248..f60840a0f4 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_el.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_el.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Σημεία - + Convert to points... Μετατροπή σε σημεία... - - + + Convert to points Μετατροπή σε σημεία @@ -23,18 +23,18 @@ CmdPointsExport - + Points Σημεία - + Export points... Εξαγωγή σημείων... - - + + Exports a point cloud Πραγματοποιεί εξαγωγή ενός νέφους σημείων @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Σημεία - + Merge point clouds Συγχώνευση νεφών σημείων - - + + Merge several point clouds into one Συγχώνευση διαφόρων νεφών σημείων σε ένα @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Σημεία - + Cut point cloud Περικοπή νέφους σημείων - - + + Cuts a point cloud with a picked polygon Περικόπτει ένα νέφος σημείων με ένα επιλεγμένο πολύγωνο @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Σημεία - + Structured point cloud Structured point cloud - - + + Convert points to structured point cloud Μετατροπή σημείων σε δομημένο σύννεφο σημείων @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Σημεία - + Transform Points Μετατόπιση Σημείων - - + + Test to transform a point cloud Δοκιμή μετατόπισης ενός νέφους σημείων @@ -137,23 +137,23 @@ Command - + Import points Import points - + Transform points Μετατόπιση Σημείων - + Convert to points Μετατροπή σε σημεία - - + + Cut points Cut points @@ -291,24 +291,24 @@ QObject - - + + Point formats Μορφές σημείων - - + + All Files Όλα τα Αρχεία - + Distance - Distance + Απόσταση - + Enter maximum distance: Εισαγωγή μέγιστης απόστασης: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_es-AR.ts b/src/Mod/Points/Gui/Resources/translations/Points_es-AR.ts index fa74622b51..545fd10aa4 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_es-AR.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_es-AR.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Puntos - + Convert to points... Convertir en puntos... - - + + Convert to points Convertir en puntos @@ -23,18 +23,18 @@ CmdPointsExport - + Points Puntos - + Export points... Exportar puntos... - - + + Exports a point cloud Exporta una nube de puntos @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Puntos - + Merge point clouds Combinar nubes de puntos - - + + Merge several point clouds into one Combinar varias nubes de puntos en una @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Puntos - + Cut point cloud Cortar nube de puntos - - + + Cuts a point cloud with a picked polygon Corta una malla con un polígono seleccionado @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Puntos - + Structured point cloud Nube de puntos estructurados - - + + Convert points to structured point cloud Convertir puntos a nube de puntos estructurados @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Puntos - + Transform Points Transformar puntos - - + + Test to transform a point cloud Prueba para transformar una nube de puntos @@ -137,23 +137,23 @@ Command - + Import points Importar puntos - + Transform points Transformar puntos - + Convert to points Convertir en puntos - - + + Cut points Puntos de corte @@ -291,24 +291,24 @@ QObject - - + + Point formats Formatos de punto - - + + All Files Todos los Archivos - + Distance Distancia - + Enter maximum distance: Ingresa la distancia máxima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_es-ES.ts b/src/Mod/Points/Gui/Resources/translations/Points_es-ES.ts index a28201cafb..1151faeb86 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_es-ES.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_es-ES.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Puntos - + Convert to points... Convertir en puntos... - - + + Convert to points Convertir en puntos @@ -23,18 +23,18 @@ CmdPointsExport - + Points Puntos - + Export points... Exportar puntos... - - + + Exports a point cloud exporta una nube de puntos @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Puntos - + Merge point clouds Combinar nube de puntos - - + + Merge several point clouds into one Combinar varias nubes de puntos en una @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Puntos - + Cut point cloud Cortar una nube de puntos - - + + Cuts a point cloud with a picked polygon Corta una nube de puntos con un poligono seleccionado @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Puntos - + Structured point cloud Nube de puntos estructurada - - + + Convert points to structured point cloud Convertir puntos a nube de puntos estructurada @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Puntos - + Transform Points Trasformar puntos - - + + Test to transform a point cloud Test para transformar una nube de puntos @@ -137,23 +137,23 @@ Command - + Import points Importar puntos - + Transform points Transformar puntos - + Convert to points Convertir en puntos - - + + Cut points Recortar puntos @@ -291,24 +291,24 @@ QObject - - + + Point formats Formatos de los puntos - - + + All Files Todos los Archivos - + Distance Distancia - + Enter maximum distance: Pon la distancia máxima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_eu.ts b/src/Mod/Points/Gui/Resources/translations/Points_eu.ts index d40b7e6a01..a21ea350a5 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_eu.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_eu.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Puntuak - + Convert to points... Bihurtu puntuetara... - - + + Convert to points Bihurtu puntuetara @@ -23,18 +23,18 @@ CmdPointsExport - + Points Puntuak - + Export points... Esportatu puntuak... - - + + Exports a point cloud Esportatu puntuen hodei bat @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Puntuak - + Merge point clouds Fusionatu puntuen hodeiak - - + + Merge several point clouds into one Fusionatu puntuen hainbat hodei bakarrean @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Puntuak - + Cut point cloud Moztu puntuen hodeia - - + + Cuts a point cloud with a picked polygon Puntuen hodei bat mozten du hautatutako poligono batekin @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Puntuak - + Structured point cloud Puntu-hodei egituratua - - + + Convert points to structured point cloud Bihurtu puntuak puntu-hodei egituratu @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Puntuak - + Transform Points Transformatu puntuak - - + + Test to transform a point cloud Puntuen hodei bat transformatzeko proba @@ -137,23 +137,23 @@ Command - + Import points Inportatu puntuak - + Transform points Transformatu puntuak - + Convert to points Bihurtu puntuetara - - + + Cut points Moztu puntuak @@ -291,24 +291,24 @@ QObject - - + + Point formats Puntu-formatuak - - + + All Files Fitxategi guztiak - + Distance Distantzia - + Enter maximum distance: Sartu distantzia maximoa: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_fi.ts b/src/Mod/Points/Gui/Resources/translations/Points_fi.ts index fe36e8678d..344c67359b 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_fi.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_fi.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Pisteet - + Convert to points... Muunna pisteiksi... - - + + Convert to points Muunna pisteiksi @@ -23,18 +23,18 @@ CmdPointsExport - + Points Pisteet - + Export points... Vie pisteet... - - + + Exports a point cloud Vie pistepilven @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Pisteet - + Merge point clouds Yhdistä pistepilvet - - + + Merge several point clouds into one Yhdistä useita pistepilviä yhdeksi @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Pisteet - + Cut point cloud Leikkaa pistepilvi - - + + Cuts a point cloud with a picked polygon Leikkaa pistepilven valitun monikulmion kanssa @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Pisteet - + Structured point cloud Strukturoitu pistepilvi - - + + Convert points to structured point cloud Muunna pisteet jäsenneltyyn pistepilveen @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Pisteet - + Transform Points Muunna pisteet - - + + Test to transform a point cloud Testaa pistepilveksi muuntamista @@ -137,23 +137,23 @@ Command - + Import points Tuo pisteet - + Transform points Muuta pisteet - + Convert to points Muunna pisteiksi - - + + Cut points Leikkaa pisteet @@ -291,24 +291,24 @@ QObject - - + + Point formats Pisteen muodot - - + + All Files Kaikki tiedostot - + Distance Etäisyys - + Enter maximum distance: Syötä enimmäisetäisyys: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_fr.ts b/src/Mod/Points/Gui/Resources/translations/Points_fr.ts index 8cd3eb3ff5..b708022680 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_fr.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_fr.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Points - + Convert to points... Convertir en points... - - + + Convert to points Convertir en points @@ -23,18 +23,18 @@ CmdPointsExport - + Points Points - + Export points... Exporter les points... - - + + Exports a point cloud Exporte un nuage de points @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Points - + Merge point clouds Fusionner des nuages de points - - + + Merge several point clouds into one Fusionner plusieurs nuages de points en un seul @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Points - + Cut point cloud Couper un nuage de points - - + + Cuts a point cloud with a picked polygon Coupe un nuage de points à l'aide d'un polygone sélectionné @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Points - + Structured point cloud Nuage structuré de points - - + + Convert points to structured point cloud Convertir les points en nuage structuré de points @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Points - + Transform Points Transformer les points - - + + Test to transform a point cloud Test de transformation d'un nuage de points @@ -137,23 +137,23 @@ Command - + Import points Importer des points - + Transform points Transformer des points - + Convert to points Convertir en points - - + + Cut points Couper des points @@ -291,24 +291,24 @@ QObject - - + + Point formats Formats de points - - + + All Files Tous les fichiers - + Distance Distance - + Enter maximum distance: Entrez la distance maximale : diff --git a/src/Mod/Points/Gui/Resources/translations/Points_gl.ts b/src/Mod/Points/Gui/Resources/translations/Points_gl.ts index de091b929c..9d6cc026df 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_gl.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_gl.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Puntos - + Convert to points... Converter en puntos... - - + + Convert to points Converter en puntos @@ -23,18 +23,18 @@ CmdPointsExport - + Points Puntos - + Export points... Exportar puntos... - - + + Exports a point cloud Exporta a nube de puntos @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Puntos - + Merge point clouds Misturar nube de puntos - - + + Merge several point clouds into one Misturar varias nubes de puntos nunha @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Puntos - + Cut point cloud Cortar nube de puntos - - + + Cuts a point cloud with a picked polygon Corta unha nube de puntos cun polígono escollido @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Puntos - + Structured point cloud Nube de puntos estruturados - - + + Convert points to structured point cloud Converter os puntos nunha nube de puntos estruturados @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Puntos - + Transform Points Transformar puntos - - + + Test to transform a point cloud Test para transformar unha nube de puntos @@ -137,23 +137,23 @@ Command - + Import points Importar puntos - + Transform points Transformar puntos - + Convert to points Converter en puntos - - + + Cut points Puntos de corte @@ -291,24 +291,24 @@ QObject - - + + Point formats Formatos de punto - - + + All Files Tódolos ficheiros - + Distance Distance - + Enter maximum distance: Insira a distancia máxima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_hr.ts b/src/Mod/Points/Gui/Resources/translations/Points_hr.ts index 03b5a7fc80..95c9a4dce9 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_hr.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_hr.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Točke - + Convert to points... Pretvori u točke... - - + + Convert to points Pretvori u točke @@ -23,18 +23,18 @@ CmdPointsExport - + Points Točke - + Export points... Izvezi točke... - - + + Exports a point cloud prenesi pokazni oblak @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Točke - + Merge point clouds Sjedini nakupinu točaka - - + + Merge several point clouds into one Sjedini nekoliko nakupljenih točaka u jednu @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Točke - + Cut point cloud odreži pokazni oblak - - + + Cuts a point cloud with a picked polygon Reže oblak točaka odabranim višekutnikom @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Točke - + Structured point cloud Strukturirani oblak točaka - - + + Convert points to structured point cloud Pretvori točke u strukturirani oblak točaka @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Točke - + Transform Points Promijeni točke - - + + Test to transform a point cloud Test za pretvaranje pokaznog oblaka @@ -137,23 +137,23 @@ Command - + Import points Uvoz točaka - + Transform points Transformacija točaka - + Convert to points Pretvori u točke - - + + Cut points Izreži točke @@ -291,24 +291,24 @@ QObject - - + + Point formats Formati točaka - - + + All Files Sve datoteke - + Distance Udaljenost - + Enter maximum distance: Unesite maksimalnu udaljenost: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_hu.ts b/src/Mod/Points/Gui/Resources/translations/Points_hu.ts index 9c0a3a2bcb..2142702a78 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_hu.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_hu.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Pontok - + Convert to points... Pontokká alakít... - - + + Convert to points Pontokká alakít @@ -23,18 +23,18 @@ CmdPointsExport - + Points Pontok - + Export points... Pontok exportálása... - - + + Exports a point cloud Pontfelhő exportálása @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Pontok - + Merge point clouds Pontfelhő összefűzés - - + + Merge several point clouds into one Több pontfelhő összefésülése egybe @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Pontok - + Cut point cloud Pontfelhő kivágása - - + + Cuts a point cloud with a picked polygon Pontfelhő kivágása egy kiválasztott polygonnal @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Pontok - + Structured point cloud Strukturált pontfelhő - - + + Convert points to structured point cloud Pontok strukturált pontfelhővé alakítása @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Pontok - + Transform Points Pontok átalakítása - - + + Test to transform a point cloud Pontfelhő átalakításának tesztje @@ -137,23 +137,23 @@ Command - + Import points Pontokat importál - + Transform points Pontokat alakít át - + Convert to points Pontokká alakít - - + + Cut points Pontokat csökkent @@ -291,24 +291,24 @@ QObject - - + + Point formats Pont formátumok - - + + All Files Összes fájl - + Distance Távolság - + Enter maximum distance: Maximális távolság beírása: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_id.ts b/src/Mod/Points/Gui/Resources/translations/Points_id.ts index ff78ac4b11..e405c40c99 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_id.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_id.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Poin - + Convert to points... Ubah ke titik... - - + + Convert to points Ubah ke titik @@ -23,18 +23,18 @@ CmdPointsExport - + Points Poin - + Export points... Poin Ekspor... - - + + Exports a point cloud Ekspor titik awan @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Poin - + Merge point clouds Gabungkan titik awan - - + + Merge several point clouds into one Gabungkan beberapa titik awan menjadi satu @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Poin - + Cut point cloud Cut point cloud - - + + Cuts a point cloud with a picked polygon Memotong awan titik dengan sebuah poligon yang dipilih @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Poin - + Structured point cloud Awan titik terstruktur - - + + Convert points to structured point cloud Ubah poin menjadi awan titik terstruktur @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Poin - + Transform Points Transform Points - - + + Test to transform a point cloud Tes untuk mengubah awan titik @@ -137,23 +137,23 @@ Command - + Import points Impor poin - + Transform points Ubah poin - + Convert to points Ubah ke titik - - + + Cut points Potong poin @@ -291,24 +291,24 @@ QObject - - + + Point formats Format titik - - + + All Files Semua data - + Distance Distance - + Enter maximum distance: Masukkan jarak maksimum: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_it.ts b/src/Mod/Points/Gui/Resources/translations/Points_it.ts index 71c1e473d9..36be3ea86c 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_it.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_it.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Punti - + Convert to points... Converti in punti... - - + + Convert to points Converti in punti @@ -23,18 +23,18 @@ CmdPointsExport - + Points Punti - + Export points... Esporta punti... - - + + Exports a point cloud Esporta una nuvola di punti @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Punti - + Merge point clouds Unisci le nuvole di punti - - + + Merge several point clouds into one Unisce più nuvole di punti in una sola @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Punti - + Cut point cloud Taglia nuvola di punti - - + + Cuts a point cloud with a picked polygon Taglia una nuvola di punti con un poligono specificato @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Punti - + Structured point cloud Nuvola di punti strutturata - - + + Convert points to structured point cloud Converte i punti in una nuvola di punti strutturata @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Punti - + Transform Points Trasforma punti - - + + Test to transform a point cloud Test della trasformazione di una nuvola di punti @@ -137,23 +137,23 @@ Command - + Import points Importa punti - + Transform points Trasforma punti - + Convert to points Converti in punti - - + + Cut points Taglia punti @@ -291,24 +291,24 @@ QObject - - + + Point formats Formato dei punti - - + + All Files Tutti i file - + Distance Distanza - + Enter maximum distance: Immettere la distanza massima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_ja.ts b/src/Mod/Points/Gui/Resources/translations/Points_ja.ts index 7996be729f..54144b6b17 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_ja.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_ja.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points 点群 - + Convert to points... 点に変換... - - + + Convert to points 点に変換 @@ -23,18 +23,18 @@ CmdPointsExport - + Points 点群 - + Export points... 点群をエクスポート... - - + + Exports a point cloud 点群をエクスポート @@ -61,18 +61,18 @@ CmdPointsMerge - + Points 点群 - + Merge point clouds 点群のマージ - - + + Merge several point clouds into one 複数の点群をひとつにマージ @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points 点群 - + Cut point cloud 点群をカット - - + + Cuts a point cloud with a picked polygon 点群をピックしたポリゴンでカット @@ -99,18 +99,18 @@ CmdPointsStructure - + Points 点群 - + Structured point cloud 構造化された点群 - - + + Convert points to structured point cloud 点を構造化された点群に変換 @@ -118,18 +118,18 @@ CmdPointsTransform - + Points 点群 - + Transform Points 点群を変換 - - + + Test to transform a point cloud 点群を変換するためのテスト @@ -137,23 +137,23 @@ Command - + Import points 点群をインポート - + Transform points 点群を変換 - + Convert to points 点に変換 - - + + Cut points 点群を切断 @@ -291,24 +291,24 @@ QObject - - + + Point formats 点群の形式 - - + + All Files すべてのファイル - + Distance 距離 - + Enter maximum distance: 最大距離を入力: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_ka.ts b/src/Mod/Points/Gui/Resources/translations/Points_ka.ts index df0e771b18..754bd5e367 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_ka.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_ka.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points წერტილები - + Convert to points... წერტილებად გარდაქნა... - - + + Convert to points წერტილებად გარდაქმნა @@ -23,18 +23,18 @@ CmdPointsExport - + Points წერტილები - + Export points... წერტილების გატანა... - - + + Exports a point cloud წერტილების ღრუბლის გატანა @@ -61,18 +61,18 @@ CmdPointsMerge - + Points წერტილები - + Merge point clouds წერტილების ღრუბლების შერწყმა - - + + Merge several point clouds into one რამდენიმე წერტილის ღრუბლის შერწყმა @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points წერტილები - + Cut point cloud წერტილების ღრუბლის ამოჭრა - - + + Cuts a point cloud with a picked polygon წერტილების ღრუბლის მონიშნული პოლიგონით ამოჭრა @@ -99,18 +99,18 @@ CmdPointsStructure - + Points წერტილები - + Structured point cloud დალაგებული წერტილების ღრუბელი - - + + Convert points to structured point cloud წერტილების დალაგებული წერტილების ღრუბლად გარდაქმნა @@ -118,18 +118,18 @@ CmdPointsTransform - + Points წერტილები - + Transform Points წერტლების გარდაქმნა - - + + Test to transform a point cloud წერტილების ღრუბლად გარდაქმნის ტესტი @@ -137,23 +137,23 @@ Command - + Import points წერტილების შემოტანა - + Transform points წერტლების გარდაქმნა - + Convert to points წერტილებად გარდაქმნა - - + + Cut points წერტილების ამოჭრა @@ -291,24 +291,24 @@ QObject - - + + Point formats წერტილის ფორმატები - - + + All Files ყველა ფაილი - + Distance დაშორება - + Enter maximum distance: შეიყვანეთ მაქსიმალური მანძილი: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_ko.ts b/src/Mod/Points/Gui/Resources/translations/Points_ko.ts index b20424cd72..ae668def78 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_ko.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_ko.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Points - + Convert to points... Convert to points... - - + + Convert to points Convert to points @@ -23,18 +23,18 @@ CmdPointsExport - + Points Points - + Export points... Export points... - - + + Exports a point cloud Exports a point cloud @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Points - + Merge point clouds Merge point clouds - - + + Merge several point clouds into one Merge several point clouds into one @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Points - + Cut point cloud Cut point cloud - - + + Cuts a point cloud with a picked polygon Cuts a point cloud with a picked polygon @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Points - + Structured point cloud Structured point cloud - - + + Convert points to structured point cloud Convert points to structured point cloud @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Points - + Transform Points Transform Points - - + + Test to transform a point cloud Test to transform a point cloud @@ -137,23 +137,23 @@ Command - + Import points Import points - + Transform points Transform points - + Convert to points Convert to points - - + + Cut points Cut points @@ -291,24 +291,24 @@ QObject - - + + Point formats Point formats - - + + All Files 모든 파일 - + Distance Distance - + Enter maximum distance: Enter maximum distance: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_nl.ts b/src/Mod/Points/Gui/Resources/translations/Points_nl.ts index ddd4c61390..298b5319b0 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_nl.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_nl.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Punten - + Convert to points... Converteer naar punten... - - + + Convert to points Converteer naar punten @@ -23,18 +23,18 @@ CmdPointsExport - + Points Punten - + Export points... Exporteer punten... - - + + Exports a point cloud Exporteert een puntenwolk @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Punten - + Merge point clouds Samenvoegen puntwolken - - + + Merge several point clouds into one Verschillende puntwolken samenvoegen @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Punten - + Cut point cloud Snij puntwolk - - + + Cuts a point cloud with a picked polygon Knipt een puntwolk met een geselecteerde veelhoek @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Punten - + Structured point cloud Gestructureerde puntenwolk - - + + Convert points to structured point cloud Punten omzetten naar gestructureerde puntenwolk @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Punten - + Transform Points Transformeer Punten - - + + Test to transform a point cloud Test om een puntwolk te transformeren @@ -137,23 +137,23 @@ Command - + Import points Importeer punten - + Transform points Transformeer punten - + Convert to points Converteer naar punten - - + + Cut points Knip punten @@ -291,24 +291,24 @@ QObject - - + + Point formats Puntformaten - - + + All Files Alle bestanden - + Distance Afstand - + Enter maximum distance: Geef maximale afstand op: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_pl.ts b/src/Mod/Points/Gui/Resources/translations/Points_pl.ts index e1b8063d21..9d412e7dd6 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_pl.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_pl.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Punkty - + Convert to points... Konwertuj na punkty ... - - + + Convert to points Konwertuj na punkty @@ -23,18 +23,18 @@ CmdPointsExport - + Points Tylko punkty - + Export points... Eksport punktów ... - - + + Exports a point cloud Eksportuje chmurę punktów @@ -44,7 +44,7 @@ Points - Tylko punkty + Punkty @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Tylko punkty - + Merge point clouds Scal chmury punktów - - + + Merge several point clouds into one Scal kilka chmur punktów w jedną @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points - Punkty + Tylko punkty - + Cut point cloud Wytnij punkt chmury - - + + Cuts a point cloud with a picked polygon Tnie chmurę punktów za pomocą wskazanego wielokąta @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Punkty - + Structured point cloud Uporządkowana chmura punktów - - + + Convert points to structured point cloud Konwertuj punkty do uporządkowanej chmury punktów @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Punkty - + Transform Points Przekształć Punkty - - + + Test to transform a point cloud Test przekształcenia chmury punktów @@ -137,23 +137,23 @@ Command - + Import points Importuj punkty - + Transform points Przekształć punkty - + Convert to points Konwertuj na punkty - - + + Cut points Wytnij punkty @@ -291,24 +291,24 @@ QObject - - + + Point formats Formaty punktu - - + + All Files Wszystkie pliki - + Distance Odległość - + Enter maximum distance: Największa odległość: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts b/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts index b4bd48dd17..2498b343da 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Pontos - + Convert to points... Converter em pontos... - - + + Convert to points Converter em pontos @@ -23,18 +23,18 @@ CmdPointsExport - + Points Pontos - + Export points... Exportar pontos... - - + + Exports a point cloud Exporta uma nuvem de pontos @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Pontos - + Merge point clouds Mesclar nuvem de pontos - - + + Merge several point clouds into one Mesclar várias pontos nuvens em uma @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Pontos - + Cut point cloud Cortar nuvem de pontos - - + + Cuts a point cloud with a picked polygon Corta uma nuvem de pontos com um polígono traçado @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Pontos - + Structured point cloud Nuvem de ponto estruturada - - + + Convert points to structured point cloud Converte pontos para uma nuvem de ponto estruturada @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Pontos - + Transform Points Transformar pontos - - + + Test to transform a point cloud Teste para transformar uma nuvem de pontos @@ -137,23 +137,23 @@ Command - + Import points Importar pontos - + Transform points Transformar pontos - + Convert to points Converter em pontos - - + + Cut points Recortar pontos @@ -291,24 +291,24 @@ QObject - - + + Point formats Formatos de pontos - - + + All Files Todos os Arquivos - + Distance Distância - + Enter maximum distance: Digite a distância máxima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_pt-PT.ts b/src/Mod/Points/Gui/Resources/translations/Points_pt-PT.ts index d4d97cbaff..e9ab37f5cc 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_pt-PT.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_pt-PT.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Pontos - + Convert to points... Converter para pontos... - - + + Convert to points Converter para pontos @@ -23,18 +23,18 @@ CmdPointsExport - + Points Pontos - + Export points... Exportar Pontos ... - - + + Exports a point cloud Exporta uma nuvem de pontos @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Pontos - + Merge point clouds Combinar nuvem de pontos - - + + Merge several point clouds into one Combinar varias nuvens de pontos numa @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Pontos - + Cut point cloud Cortar nuvem de pontos - - + + Cuts a point cloud with a picked polygon Corta uma nuvem de pontos com um polígono traçado @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Pontos - + Structured point cloud Nuvem de ponto estruturado - - + + Convert points to structured point cloud Converter pontos em nuvem de pontos estruturados @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Pontos - + Transform Points Transformar Pontos - - + + Test to transform a point cloud Teste para transformar uma nuvem de pontos @@ -137,23 +137,23 @@ Command - + Import points Importar pontos - + Transform points Transformar pontos - + Convert to points Converter para pontos - - + + Cut points Cortar pontos @@ -291,24 +291,24 @@ QObject - - + + Point formats Formatos de ponto - - + + All Files Todos os Ficheiros - + Distance Distância - + Enter maximum distance: Insira a distância máxima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_ro.ts b/src/Mod/Points/Gui/Resources/translations/Points_ro.ts index 9ca563d2e3..16824ccbfb 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_ro.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_ro.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Puncte - + Convert to points... Conversia în puncte... - - + + Convert to points Conversia în puncte @@ -23,18 +23,18 @@ CmdPointsExport - + Points Puncte - + Export points... Exportaţi puncte... - - + + Exports a point cloud Exportă un nor de puncte @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Puncte - + Merge point clouds Îmbinare a norilor de puncte - - + + Merge several point clouds into one Îmbina mai mulți nori de punct într-unul singur @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Puncte - + Cut point cloud Decupaţi norul de puncte - - + + Cuts a point cloud with a picked polygon Decupează un nor de puncte cu un poligon ales @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Puncte - + Structured point cloud Nor de puncte structurate - - + + Convert points to structured point cloud Convertește punctele în nor de puncte structurate @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Puncte - + Transform Points Transformaţi Punctele - - + + Test to transform a point cloud Testaţi pentru a transforma un nor de puncte @@ -137,23 +137,23 @@ Command - + Import points Importă puncte - + Transform points Transformă puncte - + Convert to points Conversia în puncte - - + + Cut points Puncte de tăiere @@ -291,24 +291,24 @@ QObject - - + + Point formats Formate de puncte - - + + All Files Toate fișierele - + Distance - Distance + Distanță - + Enter maximum distance: Introduceţi distanţa maximă: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_ru.ts b/src/Mod/Points/Gui/Resources/translations/Points_ru.ts index f8db4fe43e..f8a13f9150 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_ru.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_ru.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Точки - + Convert to points... Преобразовать в точки... - - + + Convert to points Преобразовать в точки @@ -23,18 +23,18 @@ CmdPointsExport - + Points Точки - + Export points... Экспорт точек... - - + + Exports a point cloud Экспорт облака точек @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Точки - + Merge point clouds Слияние облаков точек - - + + Merge several point clouds into one Объединить несколько облаков точек в одно @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Точки - + Cut point cloud Вырезать облако точек - - + + Cuts a point cloud with a picked polygon Вырезать облако точек, ограниченное отмеченным полигоном @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Точки - + Structured point cloud Облако структурированных точек - - + + Convert points to structured point cloud Преобразование точек в облако структурированных точек @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Точки - + Transform Points Преобразование точек - - + + Test to transform a point cloud Тест для преобразования облака точек @@ -137,23 +137,23 @@ Command - + Import points Импортировать точки - + Transform points Преобразовать точки - + Convert to points Преобразовать в точки - - + + Cut points Вырезать точки @@ -291,24 +291,24 @@ QObject - - + + Point formats Форматы точек - - + + All Files Все файлы - + Distance Расстояние - + Enter maximum distance: Введите максимальное расстояние: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_sl.ts b/src/Mod/Points/Gui/Resources/translations/Points_sl.ts index 7c6ced8fd6..f41a4472c5 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_sl.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_sl.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Točke - + Convert to points... Pretvori v točke … - - + + Convert to points Pretvori v točke @@ -23,18 +23,18 @@ CmdPointsExport - + Points Točke - + Export points... Izvozi točke … - - + + Exports a point cloud Izvozi točkovni oblak @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Točke - + Merge point clouds Združi oblake točk - - + + Merge several point clouds into one Združi več oblakov točk v enega @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Točke - + Cut point cloud Izreži točkovni oblak - - + + Cuts a point cloud with a picked polygon Izreži točkovni oblak z izbranim mnogokotnikom @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Točke - + Structured point cloud Urejen oblak točk - - + + Convert points to structured point cloud Spremeni točke v urejen oblak točk @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Točke - + Transform Points Preoblikuj točke - - + + Test to transform a point cloud Preizkusite za preoblikovanje točkovnega oblaka @@ -137,23 +137,23 @@ Command - + Import points Uvozi točke - + Transform points Preoblikuj točke - + Convert to points Pretvori v točke - - + + Cut points Izreži točke @@ -291,24 +291,24 @@ QObject - - + + Point formats Formati točk - - + + All Files Vse datoteke - + Distance Razdalja - + Enter maximum distance: Vnesite največjo razdaljo: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_sr-CS.ts b/src/Mod/Points/Gui/Resources/translations/Points_sr-CS.ts index e8c4bf4bed..18cb2cd18e 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_sr-CS.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_sr-CS.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Tačke - + Convert to points... Pretvori u tačke... - - + + Convert to points Pretvori u tačke @@ -23,18 +23,18 @@ CmdPointsExport - + Points Tačke - + Export points... Izvezi tačke... - - + + Exports a point cloud Izvozi oblak tačaka @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Tačke - + Merge point clouds Objedini oblake tačaka - - + + Merge several point clouds into one Objedini nekoliko oblaka tačaka u jedan @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Tačke - + Cut point cloud Seče oblak tačaka - - + + Cuts a point cloud with a picked polygon Seče oblak tačaka sa izabranim mnogouglom @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Tačke - + Structured point cloud Strukturirani oblak tačaka - - + + Convert points to structured point cloud Pretvori tačke u strukturirani oblak tačaka @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Tačke - + Transform Points Transformiši Tačke - - + + Test to transform a point cloud Test za transformisanje oblaka tačaka @@ -137,23 +137,23 @@ Command - + Import points Uvezi tačke - + Transform points Transformiši tačke - + Convert to points Pretvori u tačke - - + + Cut points Iseci tačke @@ -291,24 +291,24 @@ QObject - - + + Point formats Formati tačke - - + + All Files Sve datoteke - + Distance - Distance + Rastojanje - + Enter maximum distance: Unesi maksimalno rastojanje: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_sr.ts b/src/Mod/Points/Gui/Resources/translations/Points_sr.ts index cb0a5ce600..8288494774 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_sr.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_sr.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Тачке - + Convert to points... Претвори у тачке... - - + + Convert to points Претвори у тачке @@ -23,18 +23,18 @@ CmdPointsExport - + Points Тачке - + Export points... Извези тачке... - - + + Exports a point cloud Извози облак тачака @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Тачке - + Merge point clouds Обједини облак тачака - - + + Merge several point clouds into one Обједини више облака тачака у један @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Тачке - + Cut point cloud Исеци облак тачака - - + + Cuts a point cloud with a picked polygon Сече облак тачака са изабраним многоуглом @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Тачке - + Structured point cloud Структурирани облак тачака - - + + Convert points to structured point cloud Претвори тачке у структурирани облак тачака @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Тачке - + Transform Points Трансформиши Тачке - - + + Test to transform a point cloud Тест за трансформисање облака тачака @@ -137,23 +137,23 @@ Command - + Import points Увези тачке - + Transform points Трансформиши тачке - + Convert to points Претвори у тачке - - + + Cut points Исеци тачке @@ -291,24 +291,24 @@ QObject - - + + Point formats Формати тачке - - + + All Files Све датотеке - + Distance - Distance + Растојање - + Enter maximum distance: Унеси максимално растојање: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_sv-SE.ts b/src/Mod/Points/Gui/Resources/translations/Points_sv-SE.ts index 6917307b89..9d7225ae5c 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_sv-SE.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_sv-SE.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Punkter - + Convert to points... Omvandla till punkter... - - + + Convert to points Omvandla till punkter @@ -23,18 +23,18 @@ CmdPointsExport - + Points Punkter - + Export points... Exportera punkter... - - + + Exports a point cloud Exporterar ett punktmoln @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Punkter - + Merge point clouds Sammanfoga punktmoln - - + + Merge several point clouds into one Sammanfoga flera punktmoln till en @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Punkter - + Cut point cloud Klipp ut punktmoln - - + + Cuts a point cloud with a picked polygon Klipper ut ett punktmoln med en vald polygon @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Punkter - + Structured point cloud Strukturerat punktmoln - - + + Convert points to structured point cloud Konvertera punkter till strukturerat punktmoln @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Punkter - + Transform Points Omvandla punkter - - + + Test to transform a point cloud Testa att omforma ett punktmoln @@ -137,23 +137,23 @@ Command - + Import points Importera punkter - + Transform points Omvandla punkter - + Convert to points Omvandla till punkter - - + + Cut points Klipp ut punkter @@ -291,24 +291,24 @@ QObject - - + + Point formats Punkt-format - - + + All Files Alla filer - + Distance Distans - + Enter maximum distance: Ange maximalt avstånd: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_tr.ts b/src/Mod/Points/Gui/Resources/translations/Points_tr.ts index 392d3e3d53..29de289c8c 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_tr.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_tr.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Noktalar - + Convert to points... Noktalarına dönüştür... - - + + Convert to points Noktalarına dönüştür @@ -23,18 +23,18 @@ CmdPointsExport - + Points Noktalar - + Export points... Noktaları dışarı aktar... - - + + Exports a point cloud Bir nokta bulutunu dışarı aktarır @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Noktalar - + Merge point clouds Nokta bulutlarını birleştir - - + + Merge several point clouds into one Birkaç nokta bulutlarını tek bir tanede birleştir @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Noktalar - + Cut point cloud Nokta bulutunu kes - - + + Cuts a point cloud with a picked polygon Seçili çokgen ile nokta kümesi keser @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Noktalar - + Structured point cloud Yapısal nokta bulutu - - + + Convert points to structured point cloud Noktaları yapılandırılmış nokta bulutuna dönüştürme @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Noktalar - + Transform Points Noktaları dönüştür - - + + Test to transform a point cloud Bir nokta kümesini dönüştürme denemesi @@ -137,23 +137,23 @@ Command - + Import points Noktaları içeri aktar - + Transform points Noktaları dönüştürün - + Convert to points Noktalarına dönüştür - - + + Cut points Noktaları kes @@ -291,24 +291,24 @@ QObject - - + + Point formats Nokta biçimleri - - + + All Files Tüm Dosyalar - + Distance Uzaklık - + Enter maximum distance: Maksimum uzaklığı girin: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_uk.ts b/src/Mod/Points/Gui/Resources/translations/Points_uk.ts index 466f99a61c..ebe786ad42 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_uk.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_uk.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Точки - + Convert to points... Конвертувати в точки... - - + + Convert to points Конвертувати в точки @@ -23,18 +23,18 @@ CmdPointsExport - + Points Точки - + Export points... Експорт точок... - - + + Exports a point cloud Експорт хмари точок @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Точки - + Merge point clouds Об'єднання хмарки точок - - + + Merge several point clouds into one Об'єднати декілька груп точок в одну @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Точки - + Cut point cloud Вирізати хмару точок - - + + Cuts a point cloud with a picked polygon Вирізати точки у виділеній області @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Точки - + Structured point cloud Хмара структурованих точок - - + + Convert points to structured point cloud Конвертувати точки в хмару структурованих точок @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Точки - + Transform Points Перетворення точок - - + + Test to transform a point cloud Випробування для перетворення хмари точок @@ -137,23 +137,23 @@ Command - + Import points Імпортувати точки - + Transform points Трансформувати точки - + Convert to points Конвертувати в точки - - + + Cut points Точки розрізу @@ -291,24 +291,24 @@ QObject - - + + Point formats Формат точок - - + + All Files Всі файли - + Distance Відстань - + Enter maximum distance: Введіть максимальну відстань: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_val-ES.ts b/src/Mod/Points/Gui/Resources/translations/Points_val-ES.ts index 9a3eabfc35..85ea10f07b 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_val-ES.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_val-ES.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points Punts - + Convert to points... Converteix en punts... - - + + Convert to points Converteix en punts @@ -23,18 +23,18 @@ CmdPointsExport - + Points Punts - + Export points... Exporta punts... - - + + Exports a point cloud Exporta un núvol de punts @@ -61,18 +61,18 @@ CmdPointsMerge - + Points Punts - + Merge point clouds Fusiona els núvols de punts - - + + Merge several point clouds into one Fusiona diversos núvols de punts en un de sol @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points Punts - + Cut point cloud Retalla un núvol de punts - - + + Cuts a point cloud with a picked polygon Retalla un núvol de punts amb un polígon seleccionat @@ -99,18 +99,18 @@ CmdPointsStructure - + Points Punts - + Structured point cloud Núvol de punts estructurats - - + + Convert points to structured point cloud Converteix els punts en un núvol de punts estructurats @@ -118,18 +118,18 @@ CmdPointsTransform - + Points Punts - + Transform Points Transforma els punts - - + + Test to transform a point cloud Prova per a transformar un núvol de punts @@ -137,23 +137,23 @@ Command - + Import points Import points - + Transform points Transform points - + Convert to points Converteix en punts - - + + Cut points Cut points @@ -291,24 +291,24 @@ QObject - - + + Point formats Formats de punts - - + + All Files Tots els fitxers - + Distance Distance - + Enter maximum distance: Introduïu la distància màxima: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_zh-CN.ts b/src/Mod/Points/Gui/Resources/translations/Points_zh-CN.ts index c72e9e8431..26a90368e5 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_zh-CN.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_zh-CN.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points - + Convert to points... 将转换为点... - - + + Convert to points 转换为点 @@ -23,18 +23,18 @@ CmdPointsExport - + Points - + Export points... 导出点... - - + + Exports a point cloud 导出点云 @@ -61,18 +61,18 @@ CmdPointsMerge - + Points - + Merge point clouds 合并点云 - - + + Merge several point clouds into one 将几个点云合并为一个 @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points - + Cut point cloud 剪切点云 - - + + Cuts a point cloud with a picked polygon 剪切多边形选择框中的点云 @@ -99,18 +99,18 @@ CmdPointsStructure - + Points - + Structured point cloud 结构化点云 - - + + Convert points to structured point cloud 将点转换为结构化点云 @@ -118,18 +118,18 @@ CmdPointsTransform - + Points - + Transform Points 变换点群 - - + + Test to transform a point cloud 变换点云测试 @@ -137,23 +137,23 @@ Command - + Import points 导入点 - + Transform points 变换点 - + Convert to points 转换为点 - - + + Cut points 剪切点 @@ -291,24 +291,24 @@ QObject - - + + Point formats 点格式 - - + + All Files 所有文件 - + Distance 距离 - + Enter maximum distance: 输入的最大距离: diff --git a/src/Mod/Points/Gui/Resources/translations/Points_zh-TW.ts b/src/Mod/Points/Gui/Resources/translations/Points_zh-TW.ts index fe6c148017..639fa09142 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_zh-TW.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_zh-TW.ts @@ -4,18 +4,18 @@ CmdPointsConvert - + Points - + Convert to points... 轉換為點... - - + + Convert to points 轉換為點 @@ -23,18 +23,18 @@ CmdPointsExport - + Points - + Export points... 匯出點... - - + + Exports a point cloud 匯出點雲 @@ -61,18 +61,18 @@ CmdPointsMerge - + Points - + Merge point clouds Merge point clouds - - + + Merge several point clouds into one Merge several point clouds into one @@ -80,18 +80,18 @@ CmdPointsPolyCut - + Points - + Cut point cloud 切割點雲 - - + + Cuts a point cloud with a picked polygon 由選定之多邊形切割點雲 @@ -99,18 +99,18 @@ CmdPointsStructure - + Points - + Structured point cloud Structured point cloud - - + + Convert points to structured point cloud Convert points to structured point cloud @@ -118,18 +118,18 @@ CmdPointsTransform - + Points - + Transform Points 切換點 - - + + Test to transform a point cloud 測試修改點雲 @@ -137,23 +137,23 @@ Command - + Import points Import points - + Transform points Transform points - + Convert to points 轉換為點 - - + + Cut points Cut points @@ -291,24 +291,24 @@ QObject - - + + Point formats Point formats - - + + All Files 所有檔案 - + Distance 距離 - + Enter maximum distance: 輸入最大距離: diff --git a/src/Mod/Points/Gui/ViewProvider.cpp b/src/Mod/Points/Gui/ViewProvider.cpp index eec2a03c5f..c45d252562 100644 --- a/src/Mod/Points/Gui/ViewProvider.cpp +++ b/src/Mod/Points/Gui/ViewProvider.cpp @@ -22,19 +22,19 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -57,11 +57,11 @@ using namespace Points; PROPERTY_SOURCE_ABSTRACT(PointsGui::ViewProviderPoints, Gui::ViewProviderGeometryObject) -App::PropertyFloatConstraint::Constraints ViewProviderPoints::floatRange = {1.0,64.0,1.0}; +App::PropertyFloatConstraint::Constraints ViewProviderPoints::floatRange = {1.0, 64.0, 1.0}; ViewProviderPoints::ViewProviderPoints() { - static const char *osgroup = "Object Style"; + static const char* osgroup = "Object Style"; ADD_PROPERTY_TYPE(PointSize, (2.0f), osgroup, App::Prop_None, "Set point size"); PointSize.setConstraints(&floatRange); @@ -69,8 +69,9 @@ ViewProviderPoints::ViewProviderPoints() // Create the selection node pcHighlight = Gui::ViewProviderBuilder::createSelection(); pcHighlight->ref(); - if (pcHighlight->selectionMode.getValue() == Gui::SoFCSelection::SEL_OFF) + if (pcHighlight->selectionMode.getValue() == Gui::SoFCSelection::SEL_OFF) { Selectable.setValue(false); + } // BBOX SelectionStyle.setValue(1); @@ -103,8 +104,8 @@ void ViewProviderPoints::onChanged(const App::Property* prop) pcPointStyle->pointSize = PointSize.getValue(); } else if (prop == &SelectionStyle) { - pcHighlight->style = SelectionStyle.getValue() ? Gui::SoFCSelection::BOX - : Gui::SoFCSelection::EMISSIVE; + pcHighlight->style = + SelectionStyle.getValue() ? Gui::SoFCSelection::BOX : Gui::SoFCSelection::EMISSIVE; } else { ViewProviderGeometryObject::onChanged(prop); @@ -118,7 +119,7 @@ void ViewProviderPoints::setVertexColorMode(App::PropertyColorList* pcProperty) pcColorMat->diffuseColor.setNum(val.size()); SbColor* col = pcColorMat->diffuseColor.startEditing(); - std::size_t i=0; + std::size_t i = 0; for (const auto& it : val) { col[i++].setValue(it.r, it.g, it.b); } @@ -133,7 +134,7 @@ void ViewProviderPoints::setVertexGreyvalueMode(Points::PropertyGreyValueList* p pcColorMat->diffuseColor.setNum(val.size()); SbColor* col = pcColorMat->diffuseColor.startEditing(); - std::size_t i=0; + std::size_t i = 0; for (float it : val) { col[i++].setValue(it, it, it); } @@ -148,7 +149,7 @@ void ViewProviderPoints::setVertexNormalMode(Points::PropertyNormalList* pcPrope pcPointsNormal->vector.setNum(val.size()); SbVec3f* norm = pcPointsNormal->vector.startEditing(); - std::size_t i=0; + std::size_t i = 0; for (const auto& it : val) { norm[i++].setValue(it.x, it.y, it.z); } @@ -160,17 +161,20 @@ void ViewProviderPoints::setDisplayMode(const char* ModeName) { int numPoints = pcPointsCoord->point.getNum(); - if (strcmp("Color",ModeName) == 0) { - std::map Map; + if (strcmp("Color", ModeName) == 0) { + std::map Map; pcObject->getPropertyMap(Map); - for (auto & it : Map) { + for (auto& it : Map) { Base::Type type = it.second->getTypeId(); if (type == App::PropertyColorList::getClassTypeId()) { App::PropertyColorList* colors = static_cast(it.second); if (numPoints != colors->getSize()) { #ifdef FC_DEBUG - SoDebugError::postWarning("ViewProviderPoints::setDisplayMode", - "The number of points (%d) doesn't match with the number of colors (%d).", numPoints, colors->getSize()); + SoDebugError::postWarning( + "ViewProviderPoints::setDisplayMode", + "The number of points (%d) doesn't match with the number of colors (%d).", + numPoints, + colors->getSize()); #endif // fallback setDisplayMaskMode("Point"); @@ -183,17 +187,21 @@ void ViewProviderPoints::setDisplayMode(const char* ModeName) } } } - else if (strcmp("Intensity",ModeName) == 0) { - std::map Map; + else if (strcmp("Intensity", ModeName) == 0) { + std::map Map; pcObject->getPropertyMap(Map); for (const auto& it : Map) { Base::Type type = it.second->getTypeId(); if (type == Points::PropertyGreyValueList::getClassTypeId()) { - Points::PropertyGreyValueList* greyValues = static_cast(it.second); + Points::PropertyGreyValueList* greyValues = + static_cast(it.second); if (numPoints != greyValues->getSize()) { #ifdef FC_DEBUG SoDebugError::postWarning("ViewProviderPoints::setDisplayMode", - "The number of points (%d) doesn't match with the number of grey values (%d).", numPoints, greyValues->getSize()); + "The number of points (%d) doesn't match with the " + "number of grey values (%d).", + numPoints, + greyValues->getSize()); #endif // Intensity mode is not possible then set the default () mode instead. setDisplayMaskMode("Point"); @@ -206,17 +214,21 @@ void ViewProviderPoints::setDisplayMode(const char* ModeName) } } } - else if (strcmp("Shaded",ModeName) == 0) { - std::map Map; + else if (strcmp("Shaded", ModeName) == 0) { + std::map Map; pcObject->getPropertyMap(Map); for (const auto& it : Map) { Base::Type type = it.second->getTypeId(); if (type == Points::PropertyNormalList::getClassTypeId()) { - Points::PropertyNormalList* normals = static_cast(it.second); + Points::PropertyNormalList* normals = + static_cast(it.second); if (numPoints != normals->getSize()) { #ifdef FC_DEBUG - SoDebugError::postWarning("ViewProviderPoints::setDisplayMode", - "The number of points (%d) doesn't match with the number of normals (%d).", numPoints, normals->getSize()); + SoDebugError::postWarning( + "ViewProviderPoints::setDisplayMode", + "The number of points (%d) doesn't match with the number of normals (%d).", + numPoints, + normals->getSize()); #endif // fallback setDisplayMaskMode("Point"); @@ -229,7 +241,7 @@ void ViewProviderPoints::setDisplayMode(const char* ModeName) } } } - else if (strcmp("Points",ModeName) == 0) { + else if (strcmp("Points", ModeName) == 0) { setDisplayMaskMode("Point"); } @@ -252,17 +264,21 @@ std::vector ViewProviderPoints::getDisplayModes() const #else if (pcObject) { - std::map Map; + std::map Map; pcObject->getPropertyMap(Map); - for (std::map::iterator it = Map.begin(); it != Map.end(); ++it) { + for (std::map::iterator it = Map.begin(); it != Map.end(); + ++it) { Base::Type type = it->second->getTypeId(); - if (type == Points::PropertyNormalList::getClassTypeId()) + if (type == Points::PropertyNormalList::getClassTypeId()) { StrList.push_back("Shaded"); - else if (type == Points::PropertyGreyValueList::getClassTypeId()) + } + else if (type == Points::PropertyGreyValueList::getClassTypeId()) { StrList.push_back("Intensity"); - else if (type == App::PropertyColorList::getClassTypeId()) + } + else if (type == App::PropertyColorList::getClassTypeId()) { StrList.push_back("Color"); + } } } #endif @@ -272,6 +288,7 @@ std::vector ViewProviderPoints::getDisplayModes() const QIcon ViewProviderPoints::getIcon() const { + // clang-format off static const char * const Points_Feature_xpm[] = { "16 16 4 1", ". c none", @@ -296,38 +313,45 @@ QIcon ViewProviderPoints::getIcon() const "rr.......rr..rr."}; QPixmap px(Points_Feature_xpm); return px; + // clang-format on } bool ViewProviderPoints::setEdit(int ModNum) { - if (ModNum == ViewProvider::Transform) + if (ModNum == ViewProvider::Transform) { return ViewProviderGeometryObject::setEdit(ModNum); - else if (ModNum == ViewProvider::Cutting) + } + else if (ModNum == ViewProvider::Cutting) { return true; + } return false; } void ViewProviderPoints::unsetEdit(int ModNum) { - if (ModNum == ViewProvider::Transform) + if (ModNum == ViewProvider::Transform) { ViewProviderGeometryObject::unsetEdit(ModNum); + } } -void ViewProviderPoints::clipPointsCallback(void *, SoEventCallback * n) +void ViewProviderPoints::clipPointsCallback(void*, SoEventCallback* n) { // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); view->setEditing(false); view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), clipPointsCallback); n->setHandled(); std::vector clPoly = view->getGLPolygon(); - if (clPoly.size() < 3) + if (clPoly.size() < 3) { return; - if (clPoly.front() != clPoly.back()) + } + if (clPoly.front() != clPoly.back()) { clPoly.push_back(clPoly.front()); + } - std::vector views = view->getViewProvidersOfType(ViewProviderPoints::getClassTypeId()); + std::vector views = + view->getViewProvidersOfType(ViewProviderPoints::getClassTypeId()); for (auto it : views) { ViewProviderPoints* that = static_cast(it); if (that->getEditingMode() > -1) { @@ -387,8 +411,8 @@ void ViewProviderScattered::attach(App::DocumentObject* pcObj) } // color shaded ------------------------------------------ - if (std::find(modes.begin(), modes.end(), std::string("Color")) != modes.end() || - std::find(modes.begin(), modes.end(), std::string("Intensity")) != modes.end()) { + if (std::find(modes.begin(), modes.end(), std::string("Color")) != modes.end() + || std::find(modes.begin(), modes.end(), std::string("Intensity")) != modes.end()) { SoGroup* pcColorShadedRoot = new SoGroup(); pcColorShadedRoot->addChild(pcPointStyle); SoMaterialBinding* pcMatBinding = new SoMaterialBinding; @@ -421,12 +445,13 @@ void ViewProviderScattered::updateData(const App::Property* prop) } } -void ViewProviderScattered::cut(const std::vector& picked, Gui::View3DInventorViewer &Viewer) +void ViewProviderScattered::cut(const std::vector& picked, + Gui::View3DInventorViewer& Viewer) { // create the polygon from the picked points Base::Polygon2d cPoly; for (const auto& it : picked) { - cPoly.Add(Base::Vector2d(it[0],it[1])); + cPoly.Add(Base::Vector2d(it[0], it[1])); } // get a reference to the point feature @@ -434,32 +459,36 @@ void ViewProviderScattered::cut(const std::vector& picked, Gui::View3DI const Points::PointKernel& points = fea->Points.getValue(); SoCamera* pCam = Viewer.getSoRenderManager()->getCamera(); - SbViewVolume vol = pCam->getViewVolume(); + SbViewVolume vol = pCam->getViewVolume(); // search for all points inside/outside the polygon std::vector removeIndices; removeIndices.reserve(points.size()); unsigned long index = 0; - for (Points::PointKernel::const_iterator jt = points.begin(); jt != points.end(); ++jt, ++index) { - SbVec3f pt(jt->x,jt->y,jt->z); + for (Points::PointKernel::const_iterator jt = points.begin(); jt != points.end(); + ++jt, ++index) { + SbVec3f pt(jt->x, jt->y, jt->z); // project from 3d to 2d vol.projectToScreen(pt, pt); - if (cPoly.Contains(Base::Vector2d(pt[0],pt[1]))) + if (cPoly.Contains(Base::Vector2d(pt[0], pt[1]))) { removeIndices.push_back(index); + } } - if (removeIndices.empty()) - return; // nothing needs to be done + if (removeIndices.empty()) { + return; // nothing needs to be done + } - //Remove the points from the cloud and open a transaction object for the undo/redo stuff - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Cut points")); + // Remove the points from the cloud and open a transaction object for the undo/redo stuff + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Cut points")); // sets the points outside the polygon to update the Inventor node fea->Points.removeIndices(removeIndices); - std::map Map; + std::map Map; pcObject->getPropertyMap(Map); for (const auto& it : Map) { @@ -471,24 +500,30 @@ void ViewProviderScattered::cut(const std::vector& picked, Gui::View3DI static_cast(it.second)->removeIndices(removeIndices); } else if (type == App::PropertyColorList::getClassTypeId()) { - //static_cast(it->second)->removeIndices(removeIndices); - const std::vector& colors = static_cast(it.second)->getValues(); + // static_cast(it->second)->removeIndices(removeIndices); + const std::vector& colors = + static_cast(it.second)->getValues(); - if (removeIndices.size() > colors.size()) + if (removeIndices.size() > colors.size()) { break; + } std::vector remainValue; remainValue.reserve(colors.size() - removeIndices.size()); std::vector::iterator pos = removeIndices.begin(); - for (std::vector::const_iterator jt = colors.begin(); jt != colors.end(); ++jt) { + for (std::vector::const_iterator jt = colors.begin(); jt != colors.end(); + ++jt) { unsigned long index = jt - colors.begin(); - if (pos == removeIndices.end()) - remainValue.push_back( *jt ); - else if (index != *pos) - remainValue.push_back( *jt ); - else + if (pos == removeIndices.end()) { + remainValue.push_back(*jt); + } + else if (index != *pos) { + remainValue.push_back(*jt); + } + else { ++pos; + } } static_cast(it.second)->setValues(remainValue); @@ -548,8 +583,8 @@ void ViewProviderStructured::attach(App::DocumentObject* pcObj) } // color shaded ------------------------------------------ - if (std::find(modes.begin(), modes.end(), std::string("Color")) != modes.end() || - std::find(modes.begin(), modes.end(), std::string("Intensity")) != modes.end()) { + if (std::find(modes.begin(), modes.end(), std::string("Color")) != modes.end() + || std::find(modes.begin(), modes.end(), std::string("Intensity")) != modes.end()) { SoGroup* pcColorShadedRoot = new SoGroup(); pcColorShadedRoot->addChild(pcPointStyle); SoMaterialBinding* pcMatBinding = new SoMaterialBinding; @@ -573,12 +608,13 @@ void ViewProviderStructured::updateData(const App::Property* prop) } } -void ViewProviderStructured::cut(const std::vector& picked, Gui::View3DInventorViewer &Viewer) +void ViewProviderStructured::cut(const std::vector& picked, + Gui::View3DInventorViewer& Viewer) { // create the polygon from the picked points Base::Polygon2d cPoly; for (const auto& it : picked) { - cPoly.Add(Base::Vector2d(it[0],it[1])); + cPoly.Add(Base::Vector2d(it[0], it[1])); } // get a reference to the point feature @@ -586,7 +622,7 @@ void ViewProviderStructured::cut(const std::vector& picked, Gui::View3D const Points::PointKernel& points = fea->Points.getValue(); SoCamera* pCam = Viewer.getSoRenderManager()->getCamera(); - SbViewVolume vol = pCam->getViewVolume(); + SbViewVolume vol = pCam->getViewVolume(); // search for all points inside/outside the polygon Points::PointKernel newKernel; @@ -594,15 +630,16 @@ void ViewProviderStructured::cut(const std::vector& picked, Gui::View3D bool invalidatePoints = false; double nan = std::numeric_limits::quiet_NaN(); - for (const auto & point : points) { + for (const auto& point : points) { // valid point? Base::Vector3d vec(point); - if (!(boost::math::isnan(point.x) || boost::math::isnan(point.y) || boost::math::isnan(point.z))) { - SbVec3f pt(point.x,point.y,point.z); + if (!(boost::math::isnan(point.x) || boost::math::isnan(point.y) + || boost::math::isnan(point.z))) { + SbVec3f pt(point.x, point.y, point.z); // project from 3d to 2d vol.projectToScreen(pt, pt); - if (cPoly.Contains(Base::Vector2d(pt[0],pt[1]))) { + if (cPoly.Contains(Base::Vector2d(pt[0], pt[1]))) { invalidatePoints = true; vec.Set(nan, nan, nan); } @@ -612,8 +649,9 @@ void ViewProviderStructured::cut(const std::vector& picked, Gui::View3D } if (invalidatePoints) { - //Remove the points from the cloud and open a transaction object for the undo/redo stuff - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Cut points")); + // Remove the points from the cloud and open a transaction object for the undo/redo stuff + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Cut points")); // sets the points outside the polygon to update the Inventor node fea->Points.setValue(newKernel); @@ -626,21 +664,23 @@ void ViewProviderStructured::cut(const std::vector& picked, Gui::View3D // ------------------------------------------------- -namespace Gui { +namespace Gui +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(PointsGui::ViewProviderPython, PointsGui::ViewProviderScattered) /// @endcond // explicit template instantiation template class PointsGuiExport ViewProviderPythonFeatureT; -} +} // namespace Gui // ------------------------------------------------- -void ViewProviderPointsBuilder::buildNodes(const App::Property* prop, std::vector& nodes) const +void ViewProviderPointsBuilder::buildNodes(const App::Property* prop, + std::vector& nodes) const { - SoCoordinate3 *pcPointsCoord=nullptr; - SoPointSet *pcPoints=nullptr; + SoCoordinate3* pcPointsCoord = nullptr; + SoPointSet* pcPoints = nullptr; if (nodes.empty()) { pcPointsCoord = new SoCoordinate3(); @@ -649,28 +689,36 @@ void ViewProviderPointsBuilder::buildNodes(const App::Property* prop, std::vecto nodes.push_back(pcPoints); } else if (nodes.size() == 2) { - if (nodes[0]->getTypeId() == SoCoordinate3::getClassTypeId()) + if (nodes[0]->getTypeId() == SoCoordinate3::getClassTypeId()) { pcPointsCoord = static_cast(nodes[0]); - if (nodes[1]->getTypeId() == SoPointSet::getClassTypeId()) + } + if (nodes[1]->getTypeId() == SoPointSet::getClassTypeId()) { pcPoints = static_cast(nodes[1]); + } } - if (pcPointsCoord && pcPoints) + if (pcPointsCoord && pcPoints) { createPoints(prop, pcPointsCoord, pcPoints); + } } -void ViewProviderPointsBuilder::createPoints(const App::Property* prop, SoCoordinate3* coords, SoPointSet* points) const +void ViewProviderPointsBuilder::createPoints(const App::Property* prop, + SoCoordinate3* coords, + SoPointSet* points) const { - const Points::PropertyPointKernel* prop_points = static_cast(prop); + const Points::PropertyPointKernel* prop_points = + static_cast(prop); const Points::PointKernel& cPts = prop_points->getValue(); coords->point.setNum(cPts.size()); SbVec3f* vec = coords->point.startEditing(); // get all points - std::size_t idx=0; + std::size_t idx = 0; const std::vector& kernel = cPts.getBasicPoints(); - for (std::vector::const_iterator it = kernel.begin(); it != kernel.end(); ++it, idx++) { + for (std::vector::const_iterator it = kernel.begin(); + it != kernel.end(); + ++it, idx++) { vec[idx].setValue(it->x, it->y, it->z); } @@ -678,30 +726,36 @@ void ViewProviderPointsBuilder::createPoints(const App::Property* prop, SoCoordi coords->point.finishEditing(); } -void ViewProviderPointsBuilder::createPoints(const App::Property* prop, SoCoordinate3* coords, SoIndexedPointSet* points) const +void ViewProviderPointsBuilder::createPoints(const App::Property* prop, + SoCoordinate3* coords, + SoIndexedPointSet* points) const { - const Points::PropertyPointKernel* prop_points = static_cast(prop); + const Points::PropertyPointKernel* prop_points = + static_cast(prop); const Points::PointKernel& cPts = prop_points->getValue(); coords->point.setNum(cPts.size()); SbVec3f* vec = coords->point.startEditing(); // get all points - std::size_t idx=0; + std::size_t idx = 0; std::vector indices; indices.reserve(cPts.size()); const std::vector& kernel = cPts.getBasicPoints(); - for (std::vector::const_iterator it = kernel.begin(); it != kernel.end(); ++it, idx++) { + for (std::vector::const_iterator it = kernel.begin(); + it != kernel.end(); + ++it, idx++) { vec[idx].setValue(it->x, it->y, it->z); // valid point? - if (!(boost::math::isnan(it->x) || boost::math::isnan(it->y) || boost::math::isnan(it->z))) { + if (!(boost::math::isnan(it->x) || boost::math::isnan(it->y) + || boost::math::isnan(it->z))) { indices.push_back(idx); } } coords->point.finishEditing(); // get all point indices - idx=0; + idx = 0; points->coordIndex.setNum(indices.size()); int32_t* pos = points->coordIndex.startEditing(); for (int32_t index : indices) { diff --git a/src/Mod/Points/Gui/ViewProvider.h b/src/Mod/Points/Gui/ViewProvider.h index 3ee49e304f..f0991996d3 100644 --- a/src/Mod/Points/Gui/ViewProvider.h +++ b/src/Mod/Points/Gui/ViewProvider.h @@ -39,24 +39,28 @@ class SoCoordinate3; class SoNormal; class SoEventCallback; -namespace App { - class PropertyColorList; +namespace App +{ +class PropertyColorList; } -namespace Gui { - class SoFCSelection; +namespace Gui +{ +class SoFCSelection; } -namespace Points { - class PropertyGreyValueList; - class PropertyNormalList; - class PointKernel; - class Feature; -} +namespace Points +{ +class PropertyGreyValueList; +class PropertyNormalList; +class PointKernel; +class Feature; +} // namespace Points -namespace PointsGui { +namespace PointsGui +{ -class ViewProviderPointsBuilder : public Gui::ViewProviderBuilder +class ViewProviderPointsBuilder: public Gui::ViewProviderBuilder { public: ViewProviderPointsBuilder() = default; @@ -71,7 +75,7 @@ public: * a node representing the point data structure. * @author Werner Mayer */ -class PointsGuiExport ViewProviderPoints : public Gui::ViewProviderGeometryObject +class PointsGuiExport ViewProviderPoints: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(PointsGui::ViewProviderPoints); @@ -93,21 +97,21 @@ public: void unsetEdit(int ModNum) override; public: - static void clipPointsCallback(void * ud, SoEventCallback * n); + static void clipPointsCallback(void* ud, SoEventCallback* n); protected: void onChanged(const App::Property* prop) override; void setVertexColorMode(App::PropertyColorList*); void setVertexGreyvalueMode(Points::PropertyGreyValueList*); void setVertexNormalMode(Points::PropertyNormalList*); - virtual void cut(const std::vector& picked, Gui::View3DInventorViewer &Viewer) = 0; + virtual void cut(const std::vector& picked, Gui::View3DInventorViewer& Viewer) = 0; protected: - Gui::SoFCSelection * pcHighlight; - SoCoordinate3 * pcPointsCoord; - SoMaterial * pcColorMat; - SoNormal * pcPointsNormal; - SoDrawStyle * pcPointStyle; + Gui::SoFCSelection* pcHighlight; + SoCoordinate3* pcPointsCoord; + SoMaterial* pcColorMat; + SoNormal* pcPointsNormal; + SoDrawStyle* pcPointStyle; private: static App::PropertyFloatConstraint::Constraints floatRange; @@ -118,7 +122,7 @@ private: * a node representing the scattered point cloud. * @author Werner Mayer */ -class PointsGuiExport ViewProviderScattered : public ViewProviderPoints +class PointsGuiExport ViewProviderScattered: public ViewProviderPoints { PROPERTY_HEADER_WITH_OVERRIDE(PointsGui::ViewProviderScattered); @@ -130,15 +134,15 @@ public: * Extracts the point data from the feature \a pcFeature and creates * an Inventor node \a SoNode with these data. */ - void attach(App::DocumentObject *) override; + void attach(App::DocumentObject*) override; /// Update the point representation void updateData(const App::Property*) override; protected: - void cut(const std::vector& picked, Gui::View3DInventorViewer &Viewer) override; + void cut(const std::vector& picked, Gui::View3DInventorViewer& Viewer) override; protected: - SoPointSet * pcPoints; + SoPointSet* pcPoints; }; /** @@ -146,7 +150,7 @@ protected: * a node representing the structured points. * @author Werner Mayer */ -class PointsGuiExport ViewProviderStructured : public ViewProviderPoints +class PointsGuiExport ViewProviderStructured: public ViewProviderPoints { PROPERTY_HEADER_WITH_OVERRIDE(PointsGui::ViewProviderStructured); @@ -158,21 +162,20 @@ public: * Extracts the point data from the feature \a pcFeature and creates * an Inventor node \a SoNode with these data. */ - void attach(App::DocumentObject *) override; + void attach(App::DocumentObject*) override; /// Update the point representation void updateData(const App::Property*) override; protected: - void cut(const std::vector& picked, Gui::View3DInventorViewer &Viewer) override; + void cut(const std::vector& picked, Gui::View3DInventorViewer& Viewer) override; protected: - SoIndexedPointSet * pcPoints; + SoIndexedPointSet* pcPoints; }; using ViewProviderPython = Gui::ViewProviderPythonFeatureT; -} // namespace PointsGui +} // namespace PointsGui -#endif // POINTSGUI_VIEWPROVIDERPOINTS_H - +#endif // POINTSGUI_VIEWPROVIDERPOINTS_H diff --git a/src/Mod/Points/Gui/Workbench.cpp b/src/Mod/Points/Gui/Workbench.cpp index cc84a176b1..61b420c97c 100644 --- a/src/Mod/Points/Gui/Workbench.cpp +++ b/src/Mod/Points/Gui/Workbench.cpp @@ -30,7 +30,7 @@ using namespace PointsGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Points tools"); qApp->translate("Workbench", "&Points"); #endif @@ -45,7 +45,7 @@ Workbench::~Workbench() = default; Gui::ToolBarItem* Workbench::setupToolBars() const { Gui::ToolBarItem* root = StdWorkbench::setupToolBars(); - Gui::ToolBarItem* pnt = new Gui::ToolBarItem( root ); + Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root); pnt->setCommand("Points tools"); *pnt << "Points_Import" << "Points_Export" @@ -61,7 +61,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const { // point tools Gui::ToolBarItem* root = new Gui::ToolBarItem; - Gui::ToolBarItem* pnt = new Gui::ToolBarItem( root ); + Gui::ToolBarItem* pnt = new Gui::ToolBarItem(root); pnt->setCommand("Points tools"); *pnt << "Points_Import" << "Points_Export" diff --git a/src/Mod/Points/Gui/Workbench.h b/src/Mod/Points/Gui/Workbench.h index 79628e5142..c373c611e1 100644 --- a/src/Mod/Points/Gui/Workbench.h +++ b/src/Mod/Points/Gui/Workbench.h @@ -27,26 +27,27 @@ #include #include -namespace PointsGui { +namespace PointsGui +{ /** * @author Werner Mayer */ -class PointsGuiExport Workbench : public Gui::StdWorkbench +class PointsGuiExport Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - Workbench(); - ~Workbench() override; + Workbench(); + ~Workbench() override; protected: - Gui::ToolBarItem* setupToolBars() const override; - Gui::ToolBarItem* setupCommandBars() const override; - Gui::MenuItem* setupMenuBar() const override; + Gui::ToolBarItem* setupToolBars() const override; + Gui::ToolBarItem* setupCommandBars() const override; + Gui::MenuItem* setupMenuBar() const override; }; -} // namespace PointsGui +} // namespace PointsGui -#endif // POINTS_WORKBENCH_H +#endif // POINTS_WORKBENCH_H diff --git a/src/Mod/Points/Init.py b/src/Mod/Points/Init.py index c2e0a6f0e2..ea3e1bd2f8 100644 --- a/src/Mod/Points/Init.py +++ b/src/Mod/Points/Init.py @@ -1,28 +1,28 @@ -#*************************************************************************** -#* Copyright (c) 2004,2005 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2004,2005 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # FreeCAD init script of the Points module # Append the open handler -FreeCAD.addImportType("Point formats (*.asc *.pcd *.ply *.e57)","Points") -FreeCAD.addExportType("Point formats (*.asc *.pcd *.ply)","Points") +FreeCAD.addImportType("Point formats (*.asc *.pcd *.ply *.e57)", "Points") +FreeCAD.addExportType("Point formats (*.asc *.pcd *.ply)", "Points") diff --git a/src/Mod/Points/InitGui.py b/src/Mod/Points/InitGui.py index 9bbcf39b0f..c54214f071 100644 --- a/src/Mod/Points/InitGui.py +++ b/src/Mod/Points/InitGui.py @@ -1,25 +1,25 @@ -#*************************************************************************** -#* Copyright (c) 2002,2003 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002,2003 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Points gui init module # @@ -27,17 +27,23 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -class PointsWorkbench ( Workbench ): + +class PointsWorkbench(Workbench): "Points workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Points/Resources/icons/PointsWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Points/Resources/icons/PointsWorkbench.svg" + ) self.__class__.MenuText = "Points" self.__class__.ToolTip = "Points workbench" def Initialize(self): # load the module import PointsGui + def GetClassName(self): return "PointsGui::Workbench" + Gui.addWorkbench(PointsWorkbench()) diff --git a/src/Mod/Points/PointsGlobal.h b/src/Mod/Points/PointsGlobal.h index 5ba83d6b96..7e984ac39d 100644 --- a/src/Mod/Points/PointsGlobal.h +++ b/src/Mod/Points/PointsGlobal.h @@ -29,19 +29,19 @@ // Points #ifndef PointsExport #ifdef Points_EXPORTS -# define PointsExport FREECAD_DECL_EXPORT +#define PointsExport FREECAD_DECL_EXPORT #else -# define PointsExport FREECAD_DECL_IMPORT +#define PointsExport FREECAD_DECL_IMPORT #endif #endif // PointsGui #ifndef PointsGuiExport #ifdef PointsGui_EXPORTS -# define PointsGuiExport FREECAD_DECL_EXPORT +#define PointsGuiExport FREECAD_DECL_EXPORT #else -# define PointsGuiExport FREECAD_DECL_IMPORT +#define PointsGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //POINTS_GLOBAL_H +#endif // POINTS_GLOBAL_H diff --git a/src/Mod/Points/points.dox b/src/Mod/Points/points.dox index ab5649212b..44a1625a75 100644 --- a/src/Mod/Points/points.dox +++ b/src/Mod/Points/points.dox @@ -2,4 +2,3 @@ * \ingroup CWORKBENCHES * \brief Tools to work with point clouds */ - diff --git a/src/Mod/Points/pointscommands/commands.py b/src/Mod/Points/pointscommands/commands.py index 408ed76a40..890cf9e7c4 100644 --- a/src/Mod/Points/pointscommands/commands.py +++ b/src/Mod/Points/pointscommands/commands.py @@ -32,6 +32,7 @@ __url__ = "https://www.freecad.org" import FreeCAD import Points + def make_points_from_geometry(geometries, distance): for geom in geometries: global_plm = geom.getGlobalPlacement() @@ -54,8 +55,10 @@ def make_points_from_geometry(geometries, distance): points.Points = kernel points.Placement = plm - if len(points_and_normals[1]) > 0 and len(points_and_normals[0]) == len(points_and_normals[1]): + if len(points_and_normals[1]) > 0 and len(points_and_normals[0]) == len( + points_and_normals[1] + ): points.addProperty("Points::PropertyNormalList", "Normal") points.Normal = points_and_normals[1] - points.purgeTouched() \ No newline at end of file + points.purgeTouched() diff --git a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp index 4187b016be..61a107583a 100644 --- a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp +++ b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -31,13 +31,13 @@ #include #include #include -#include #include +#include #include #if defined(HAVE_PCL_FILTERS) -# include -# include -# include +#include +#include +#include #endif #include "ApproxSurface.h" @@ -47,7 +47,7 @@ #include "Segmentation.h" #include "SurfaceTriangulation.h" - +// clang-format off /* Dependency of pcl components: common: none @@ -313,9 +313,9 @@ Mesh.show(m) int ksearch=5; double mu=2.5; - static char* kwds_greedy[] = {"Points", "SearchRadius", "Mu", "KSearch", + static const std::array kwds_greedy {"Points", "SearchRadius", "Mu", "KSearch", "Normals", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|diO", kwds_greedy, + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|diO", kwds_greedy, &(Points::PointsPy::Type), &pts, &searchRadius, &mu, &ksearch, &vec)) throw Py::Exception(); @@ -351,9 +351,9 @@ Mesh.show(m) int solverDivide=-1; double samplesPerNode=-1.0; - static char* kwds_poisson[] = {"Points", "KSearch", "OctreeDepth", "SolverDivide", + static const std::array kwds_poisson {"Points", "KSearch", "OctreeDepth", "SolverDivide", "SamplesPerNode", "Normals", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidO", kwds_poisson, + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidO", kwds_poisson, &(Points::PointsPy::Type), &pts, &ksearch, &octreeDepth, &solverDivide, &samplesPerNode, &vec)) throw Py::Exception(); @@ -420,8 +420,8 @@ Mesh.show(m) int width; int height; - static char* kwds_view[] = {"Points", "Width", "Height", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|ii", kwds_view, + static const std::array kwds_view {"Points", "Width", "Height", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|ii", kwds_view, &(Points::PointsPy::Type), &pts, &width, &height)) throw Py::Exception(); @@ -445,8 +445,8 @@ Mesh.show(m) PyObject *vec = 0; int ksearch=5; - static char* kwds_greedy[] = {"Points", "KSearch", "Normals", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy, + static const std::array kwds_greedy {"Points", "KSearch", "Normals", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy, &(Points::PointsPy::Type), &pts, &ksearch, &vec)) throw Py::Exception(); @@ -477,8 +477,8 @@ Mesh.show(m) PyObject *vec = 0; int ksearch=5; - static char* kwds_greedy[] = {"Points", "KSearch", "Normals", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy, + static const std::array kwds_greedy {"Points", "KSearch", "Normals", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy, &(Points::PointsPy::Type), &pts, &ksearch, &vec)) throw Py::Exception(); @@ -527,8 +527,8 @@ Mesh.show(m) PyObject *vec = 0; int ksearch=5; - static char* kwds_greedy[] = {"Points", "KSearch", "Normals", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy, + static const std::array kwds_greedy {"Points", "KSearch", "Normals", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_greedy, &(Points::PointsPy::Type), &pts, &ksearch, &vec)) throw Py::Exception(); @@ -566,9 +566,9 @@ Mesh.show(m) double boundarySmoothness = 0.2; double boundaryWeight = 0.0; - static char* kwds_approx[] = {"Points", "Degree", "Refinement", "Iterations", + static const std::array kwds_approx {"Points", "Degree", "Refinement", "Iterations", "InteriorSmoothness", "InteriorWeight", "BoundarySmoothness", "BoundaryWeight", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidddd", kwds_approx, + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iiidddd", kwds_approx, &(Points::PointsPy::Type), &pts, °ree, &refinement, &iterations, &interiorSmoothness, &interiorWeight, @@ -602,8 +602,8 @@ Mesh.show(m) double voxDimY = 0; double voxDimZ = 0; - static char* kwds_voxel[] = {"Points", "DimX", "DimY", "DimZ", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|dd", kwds_voxel, + static const std::array kwds_voxel {"Points", "DimX", "DimY", "DimZ", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!d|dd", kwds_voxel, &(Points::PointsPy::Type), &pts, &voxDimX, &voxDimY, &voxDimZ)) throw Py::Exception(); @@ -645,8 +645,8 @@ Mesh.show(m) int ksearch=0; double searchRadius=0; - static char* kwds_normals[] = {"Points", "KSearch", "SearchRadius", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|id", kwds_normals, + static const std::array kwds_normals {"Points", "KSearch", "SearchRadius", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|id", kwds_normals, &(Points::PointsPy::Type), &pts, &ksearch, &searchRadius)) throw Py::Exception(); @@ -674,8 +674,8 @@ Mesh.show(m) PyObject *vec = 0; int ksearch=5; - static char* kwds_segment[] = {"Points", "KSearch", "Normals", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_segment, + static const std::array kwds_segment {"Points", "KSearch", "Normals", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|iO", kwds_segment, &(Points::PointsPy::Type), &pts, &ksearch, &vec)) throw Py::Exception(); @@ -714,8 +714,8 @@ Mesh.show(m) PyObject *pts; int ksearch=5; - static char* kwds_segment[] = {"Points", "KSearch", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|i", kwds_segment, + static const std::array kwds_segment {"Points", "KSearch", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|i", kwds_segment, &(Points::PointsPy::Type), &pts, &ksearch)) throw Py::Exception(); @@ -783,8 +783,8 @@ Points.show(np) PyObject *vec = nullptr; const char* sacModelType = nullptr; - static char* kwds_sample[] = {"SacModel", "Points", "Normals", NULL}; - if (!Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "sO!|O", kwds_sample, + static const std::array kwds_sample {"SacModel", "Points", "Normals", NULL}; + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "sO!|O", kwds_sample, &sacModelType, &(Points::PointsPy::Type), &pts, &vec)) throw Py::Exception(); @@ -855,3 +855,4 @@ PyMOD_INIT_FUNC(ReverseEngineering) Base::Console().Log("Loading ReverseEngineering module... done\n"); PyMOD_Return(mod); } +// clang-format on diff --git a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp index 9318dcd89e..1063d35e18 100644 --- a/src/Mod/ReverseEngineering/App/ApproxSurface.cpp +++ b/src/Mod/ReverseEngineering/App/ApproxSurface.cpp @@ -22,14 +22,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -45,28 +45,29 @@ namespace sp = std::placeholders; // SplineBasisfunction SplineBasisfunction::SplineBasisfunction(int iSize) - : _vKnotVector(0,iSize-1) - , _iOrder(1) -{ -} + : _vKnotVector(0, iSize - 1) + , _iOrder(1) +{} SplineBasisfunction::SplineBasisfunction(TColStd_Array1OfReal& vKnots, TColStd_Array1OfInteger& vMults, - int iSize, int iOrder) - : _vKnotVector(0,iSize-1) + int iSize, + int iOrder) + : _vKnotVector(0, iSize - 1) { int sum = 0; - for (int h=vMults.Lower(); h<=vMults.Upper(); h++) + for (int h = vMults.Lower(); h <= vMults.Upper(); h++) { sum += vMults(h); + } if (vKnots.Length() != vMults.Length() || iSize != sum) { // Throw exception Standard_ConstructionError::Raise("BSplineBasis"); } - int k=0; - for (int i=vMults.Lower(); i<=vMults.Upper(); i++) { - for (int j=0; j= _vKnotVector(mid+1)) { - if (fParam < _vKnotVector(mid)) + while (fParam < _vKnotVector(mid) || fParam >= _vKnotVector(mid + 1)) { + if (fParam < _vKnotVector(mid)) { high = mid; - else + } + else { low = mid; - mid = (low+high)/2; + } + mid = (low + high) / 2; } return mid; @@ -156,23 +164,24 @@ int BSplineBasis::FindSpan(double fParam) void BSplineBasis::AllBasisFunctions(double fParam, TColStd_Array1OfReal& vFuncVals) { - if (vFuncVals.Length() != _iOrder) + if (vFuncVals.Length() != _iOrder) { Standard_RangeError::Raise("BSplineBasis"); + } int iIndex = FindSpan(fParam); - TColStd_Array1OfReal zaehler_left(1,_iOrder-1); - TColStd_Array1OfReal zaehler_right(1,_iOrder-1); + TColStd_Array1OfReal zaehler_left(1, _iOrder - 1); + TColStd_Array1OfReal zaehler_right(1, _iOrder - 1); vFuncVals(0) = 1.0; - for (int j=1; j<_iOrder; j++) { - zaehler_left(j) = fParam - _vKnotVector(iIndex+1-j); - zaehler_right(j) = _vKnotVector(iIndex+j) - fParam; + for (int j = 1; j < _iOrder; j++) { + zaehler_left(j) = fParam - _vKnotVector(iIndex + 1 - j); + zaehler_right(j) = _vKnotVector(iIndex + j) - fParam; double saved = 0.0; - for (int r=0; r= _vKnotVector(iIndex+p+1)) { + if (fParam < _vKnotVector(iIndex) || fParam >= _vKnotVector(iIndex + p + 1)) { return BSplineBasis::Zero; } @@ -198,45 +207,50 @@ BSplineBasis::ValueT BSplineBasis::LocalSupport(int iIndex, double fParam) double BSplineBasis::BasisFunction(int iIndex, double fParam) { - int m = _vKnotVector.Length()-1; - int p = _iOrder-1; + int m = _vKnotVector.Length() - 1; + int p = _iOrder - 1; double saved; - TColStd_Array1OfReal N(0,p); + TColStd_Array1OfReal N(0, p); - if ((iIndex == 0 && fParam == _vKnotVector(0)) || - (iIndex == m-p-1 && fParam == _vKnotVector(m))) { + if ((iIndex == 0 && fParam == _vKnotVector(0)) + || (iIndex == m - p - 1 && fParam == _vKnotVector(m))) { return 1.0; } - if (fParam < _vKnotVector(iIndex) || fParam >= _vKnotVector(iIndex+p+1)) { + if (fParam < _vKnotVector(iIndex) || fParam >= _vKnotVector(iIndex + p + 1)) { return 0.0; } - for (int j=0; j<=p; j++) { - if (fParam >= _vKnotVector(iIndex+j) && fParam < _vKnotVector(iIndex+j+1)) + for (int j = 0; j <= p; j++) { + if (fParam >= _vKnotVector(iIndex + j) && fParam < _vKnotVector(iIndex + j + 1)) { N(j) = 1.0; - else + } + else { N(j) = 0.0; + } } - for (int k=1; k<=p; k++) { - if (N(0) == 0.0) + for (int k = 1; k <= p; k++) { + if (N(0) == 0.0) { saved = 0.0; - else - saved = ((fParam - _vKnotVector(iIndex))*N(0)) / (_vKnotVector(iIndex+k) - _vKnotVector(iIndex)); + } + else { + saved = ((fParam - _vKnotVector(iIndex)) * N(0)) + / (_vKnotVector(iIndex + k) - _vKnotVector(iIndex)); + } - for (int j=0; j degrees) are zero + } + // kth derivatives (k> degrees) are zero if (iMax >= _iOrder) { - for (int i=_iOrder; i<=iMaxDer; i++) + for (int i = _iOrder; i <= iMaxDer; i++) { Derivat(i) = 0.0; + } iMax = _iOrder - 1; } TColStd_Array1OfReal ND(0, iMax); - int p = _iOrder-1; - math_Matrix N(0,p,0,p); + int p = _iOrder - 1; + math_Matrix N(0, p, 0, p); double saved; // if value is outside the interval, then function value and all derivatives equal null - if (fParam < _vKnotVector(iIndex) || fParam >= _vKnotVector(iIndex+p+1)) { - for (int k=0; k<=iMax; k++) + if (fParam < _vKnotVector(iIndex) || fParam >= _vKnotVector(iIndex + p + 1)) { + for (int k = 0; k <= iMax; k++) { Derivat(k) = 0.0; + } return; } // Calculate the basis functions of Order 1 - for (int j=0; j<_iOrder; j++) { - if (fParam >= _vKnotVector(iIndex+j) && fParam < _vKnotVector(iIndex+j+1)) - N(j,0) = 1.0; - else - N(j,0) = 0.0; + for (int j = 0; j < _iOrder; j++) { + if (fParam >= _vKnotVector(iIndex + j) && fParam < _vKnotVector(iIndex + j + 1)) { + N(j, 0) = 1.0; + } + else { + N(j, 0) = 0.0; + } } // Calculate a triangular table of the function values - for (int k=1; k<_iOrder; k++) { - if (N(0,k-1) == 0.0) + for (int k = 1; k < _iOrder; k++) { + if (N(0, k - 1) == 0.0) { saved = 0.0; - else - saved = ((fParam - _vKnotVector(iIndex))*N(0,k-1))/(_vKnotVector(iIndex+k)-_vKnotVector(iIndex)); - for (int j=0; jdegrees) are null if (iMax >= _iOrder) { @@ -347,100 +374,108 @@ double BSplineBasis::DerivativeOfBasisFunction(int iIndex, int iMaxDer, double f } TColStd_Array1OfReal ND(0, iMax); - int p = _iOrder-1; - math_Matrix N(0,p,0,p); + int p = _iOrder - 1; + math_Matrix N(0, p, 0, p); double saved; // If value is outside the interval, then function value and derivatives equal null - if (fParam < _vKnotVector(iIndex) || fParam >= _vKnotVector(iIndex+p+1)) { + if (fParam < _vKnotVector(iIndex) || fParam >= _vKnotVector(iIndex + p + 1)) { return 0.0; } // Calculate the basis functions of Order 1 - for (int j=0; j<_iOrder; j++) { - if (fParam >= _vKnotVector(iIndex+j) && fParam < _vKnotVector(iIndex+j+1)) - N(j,0) = 1.0; - else - N(j,0) = 0.0; + for (int j = 0; j < _iOrder; j++) { + if (fParam >= _vKnotVector(iIndex + j) && fParam < _vKnotVector(iIndex + j + 1)) { + N(j, 0) = 1.0; + } + else { + N(j, 0) = 0.0; + } } // Calculate triangular table of function values - for (int k=1; k<_iOrder; k++) { - if (N(0,k-1) == 0.0) + for (int k = 1; k < _iOrder; k++) { + if (N(0, k - 1) == 0.0) { saved = 0.0; - else - saved = ((fParam - _vKnotVector(iIndex))*N(0,k-1))/(_vKnotVector(iIndex+k)-_vKnotVector(iIndex)); + } + else { + saved = ((fParam - _vKnotVector(iIndex)) * N(0, k - 1)) + / (_vKnotVector(iIndex + k) - _vKnotVector(iIndex)); + } - for (int j=0; j fMin) { - for (int i=0; i<=iMax; i++) { - double fParam = 0.5*(vRoots(i)+1)*(fMax-fMin)+fMin; - dIntegral += 0.5*(fMax-fMin)*vWeights(i) * - DerivativeOfBasisFunction(iIdx1, iOrd1, fParam) * - DerivativeOfBasisFunction(iIdx2, iOrd2, fParam); + for (int i = 0; i <= iMax; i++) { + double fParam = 0.5 * (vRoots(i) + 1) * (fMax - fMin) + fMin; + dIntegral += 0.5 * (fMax - fMin) * vWeights(i) + * DerivativeOfBasisFunction(iIdx1, iOrd1, fParam) + * DerivativeOfBasisFunction(iIdx2, iOrd2, fParam); } } } @@ -448,67 +483,111 @@ double BSplineBasis::GetIntegralOfProductOfBSplines(int iIdx1, int iIdx2, int iO return dIntegral; } -void BSplineBasis::GenerateRootsAndWeights(TColStd_Array1OfReal& vRoots, TColStd_Array1OfReal& vWeights) +void BSplineBasis::GenerateRootsAndWeights(TColStd_Array1OfReal& vRoots, + TColStd_Array1OfReal& vWeights) { int iSize = vRoots.Length(); // Zeroing the Legendre-Polynomials and the corresponding weights if (iSize == 1) { - vRoots(0) = 0.0; vWeights(0) = 2.0; + vRoots(0) = 0.0; + vWeights(0) = 2.0; } else if (iSize == 2) { - vRoots(0) = 0.57735; vWeights(0) = 1.0; - vRoots(1) = -vRoots(0); vWeights(1) = vWeights(0); + vRoots(0) = 0.57735; + vWeights(0) = 1.0; + vRoots(1) = -vRoots(0); + vWeights(1) = vWeights(0); } else if (iSize == 4) { - vRoots(0) = 0.33998; vWeights(0) = 0.65214; - vRoots(1) = 0.86113; vWeights(1) = 0.34785; - vRoots(2) = -vRoots(0); vWeights(2) = vWeights(0); - vRoots(3) = -vRoots(1); vWeights(3) = vWeights(1); + vRoots(0) = 0.33998; + vWeights(0) = 0.65214; + vRoots(1) = 0.86113; + vWeights(1) = 0.34785; + vRoots(2) = -vRoots(0); + vWeights(2) = vWeights(0); + vRoots(3) = -vRoots(1); + vWeights(3) = vWeights(1); } else if (iSize == 6) { - vRoots(0) = 0.23861; vWeights(0) = 0.46791; - vRoots(1) = 0.66120; vWeights(1) = 0.36076; - vRoots(2) = 0.93246; vWeights(2) = 0.17132; - vRoots(3) = -vRoots(0); vWeights(3) = vWeights(0); - vRoots(4) = -vRoots(1); vWeights(4) = vWeights(1); - vRoots(5) = -vRoots(2); vWeights(5) = vWeights(2); + vRoots(0) = 0.23861; + vWeights(0) = 0.46791; + vRoots(1) = 0.66120; + vWeights(1) = 0.36076; + vRoots(2) = 0.93246; + vWeights(2) = 0.17132; + vRoots(3) = -vRoots(0); + vWeights(3) = vWeights(0); + vRoots(4) = -vRoots(1); + vWeights(4) = vWeights(1); + vRoots(5) = -vRoots(2); + vWeights(5) = vWeights(2); } else if (iSize == 8) { - vRoots(0) = 0.18343; vWeights(0) = 0.36268; - vRoots(1) = 0.52553; vWeights(1) = 0.31370; - vRoots(2) = 0.79666; vWeights(2) = 0.22238; - vRoots(3) = 0.96028; vWeights(3) = 0.10122; - vRoots(4) = -vRoots(0); vWeights(4) = vWeights(0); - vRoots(5) = -vRoots(1); vWeights(5) = vWeights(1); - vRoots(6) = -vRoots(2); vWeights(6) = vWeights(2); - vRoots(7) = -vRoots(3); vWeights(7) = vWeights(3); + vRoots(0) = 0.18343; + vWeights(0) = 0.36268; + vRoots(1) = 0.52553; + vWeights(1) = 0.31370; + vRoots(2) = 0.79666; + vWeights(2) = 0.22238; + vRoots(3) = 0.96028; + vWeights(3) = 0.10122; + vRoots(4) = -vRoots(0); + vWeights(4) = vWeights(0); + vRoots(5) = -vRoots(1); + vWeights(5) = vWeights(1); + vRoots(6) = -vRoots(2); + vWeights(6) = vWeights(2); + vRoots(7) = -vRoots(3); + vWeights(7) = vWeights(3); } else if (iSize == 10) { - vRoots(0) = 0.14887; vWeights(0) = 0.29552; - vRoots(1) = 0.43339; vWeights(1) = 0.26926; - vRoots(2) = 0.67940; vWeights(2) = 0.21908; - vRoots(3) = 0.86506; vWeights(3) = 0.14945; - vRoots(4) = 0.97390; vWeights(4) = 0.06667; - vRoots(5) = -vRoots(0); vWeights(5) = vWeights(0); - vRoots(6) = -vRoots(1); vWeights(6) = vWeights(1); - vRoots(7) = -vRoots(2); vWeights(7) = vWeights(2); - vRoots(8) = -vRoots(3); vWeights(8) = vWeights(3); - vRoots(9) = -vRoots(4); vWeights(9) = vWeights(4); + vRoots(0) = 0.14887; + vWeights(0) = 0.29552; + vRoots(1) = 0.43339; + vWeights(1) = 0.26926; + vRoots(2) = 0.67940; + vWeights(2) = 0.21908; + vRoots(3) = 0.86506; + vWeights(3) = 0.14945; + vRoots(4) = 0.97390; + vWeights(4) = 0.06667; + vRoots(5) = -vRoots(0); + vWeights(5) = vWeights(0); + vRoots(6) = -vRoots(1); + vWeights(6) = vWeights(1); + vRoots(7) = -vRoots(2); + vWeights(7) = vWeights(2); + vRoots(8) = -vRoots(3); + vWeights(8) = vWeights(3); + vRoots(9) = -vRoots(4); + vWeights(9) = vWeights(4); } else { - vRoots(0) = 0.12523; vWeights(0) = 0.24914; - vRoots(1) = 0.36783; vWeights(1) = 0.23349; - vRoots(2) = 0.58731; vWeights(2) = 0.20316; - vRoots(3) = 0.76990; vWeights(3) = 0.16007; - vRoots(4) = 0.90411; vWeights(4) = 0.10693; - vRoots(5) = 0.98156; vWeights(5) = 0.04717; - vRoots(6) = -vRoots(0); vWeights(6) = vWeights(0); - vRoots(7) = -vRoots(1); vWeights(7) = vWeights(1); - vRoots(8) = -vRoots(2); vWeights(8) = vWeights(2); - vRoots(9) = -vRoots(3); vWeights(9) = vWeights(3); - vRoots(10)= -vRoots(4); vWeights(10)= vWeights(4); - vRoots(11)= -vRoots(5); vWeights(11)= vWeights(5); + vRoots(0) = 0.12523; + vWeights(0) = 0.24914; + vRoots(1) = 0.36783; + vWeights(1) = 0.23349; + vRoots(2) = 0.58731; + vWeights(2) = 0.20316; + vRoots(3) = 0.76990; + vWeights(3) = 0.16007; + vRoots(4) = 0.90411; + vWeights(4) = 0.10693; + vRoots(5) = 0.98156; + vWeights(5) = 0.04717; + vRoots(6) = -vRoots(0); + vWeights(6) = vWeights(0); + vRoots(7) = -vRoots(1); + vWeights(7) = vWeights(1); + vRoots(8) = -vRoots(2); + vWeights(8) = vWeights(2); + vRoots(9) = -vRoots(3); + vWeights(9) = vWeights(3); + vRoots(10) = -vRoots(4); + vWeights(10) = vWeights(4); + vRoots(11) = -vRoots(5); + vWeights(11) = vWeights(5); } } @@ -516,50 +595,60 @@ void BSplineBasis::FindIntegrationArea(int iIdx1, int iIdx2, int& iBegin, int& i { // order by index if (iIdx2 < iIdx1) { - int tmp=iIdx1; + int tmp = iIdx1; iIdx1 = iIdx2; iIdx2 = tmp; } iBegin = iIdx2; - iEnd = iIdx1+_iOrder; - if (iEnd == _vKnotVector.Upper()) + iEnd = iIdx1 + _iOrder; + if (iEnd == _vKnotVector.Upper()) { iEnd -= 1; + } } int BSplineBasis::CalcSize(int r, int s) { - int iMaxDegree = 2*(_iOrder-1)-r-s; + int iMaxDegree = 2 * (_iOrder - 1) - r - s; - if (iMaxDegree < 0) + if (iMaxDegree < 0) { return 0; - else if (iMaxDegree < 4) + } + else if (iMaxDegree < 4) { return 1; - else if (iMaxDegree < 8) + } + else if (iMaxDegree < 8) { return 3; - else if (iMaxDegree < 12) + } + else if (iMaxDegree < 12) { return 5; - else if (iMaxDegree < 16) + } + else if (iMaxDegree < 16) { return 7; - else if (iMaxDegree < 20) + } + else if (iMaxDegree < 20) { return 9; - else + } + else { return 11; + } } /////////////////// ParameterCorrection -ParameterCorrection::ParameterCorrection(unsigned usUOrder, unsigned usVOrder, - unsigned usUCtrlpoints, unsigned usVCtrlpoints) - : _usUOrder(usUOrder) - , _usVOrder(usVOrder) - , _usUCtrlpoints(usUCtrlpoints) - , _usVCtrlpoints(usVCtrlpoints) - , _vCtrlPntsOfSurf(0,usUCtrlpoints-1,0,usVCtrlpoints-1) - , _vUKnots(0,usUCtrlpoints-usUOrder+1) - , _vVKnots(0,usVCtrlpoints-usVOrder+1) - , _vUMults(0,usUCtrlpoints-usUOrder+1) - , _vVMults(0,usVCtrlpoints-usVOrder+1) +ParameterCorrection::ParameterCorrection(unsigned usUOrder, + unsigned usVOrder, + unsigned usUCtrlpoints, + unsigned usVCtrlpoints) + : _usUOrder(usUOrder) + , _usVOrder(usVOrder) + , _usUCtrlpoints(usUCtrlpoints) + , _usVCtrlpoints(usVCtrlpoints) + , _vCtrlPntsOfSurf(0, usUCtrlpoints - 1, 0, usVCtrlpoints - 1) + , _vUKnots(0, usUCtrlpoints - usUOrder + 1) + , _vVKnots(0, usVCtrlpoints - usVOrder + 1) + , _vUMults(0, usUCtrlpoints - usUOrder + 1) + , _vVMults(0, usVCtrlpoints - usVOrder + 1) { _bGetUVDir = false; _bSmoothing = false; @@ -569,7 +658,7 @@ ParameterCorrection::ParameterCorrection(unsigned usUOrder, unsigned usVOrder, void ParameterCorrection::CalcEigenvectors() { MeshCore::PlaneFit planeFit; - for (int i=_pvcPoints->Lower(); i<=_pvcPoints->Upper(); i++) { + for (int i = _pvcPoints->Lower(); i <= _pvcPoints->Upper(); i++) { const gp_Pnt& pnt = (*_pvcPoints)(i); planeFit.AddPoint(Base::Vector3f((float)pnt.X(), (float)pnt.Y(), (float)pnt.Z())); } @@ -583,17 +672,21 @@ void ParameterCorrection::CalcEigenvectors() bool ParameterCorrection::DoInitialParameterCorrection(double fSizeFactor) { // if directions are not given, calculate yourself - if (!_bGetUVDir) + if (!_bGetUVDir) { CalcEigenvectors(); - if (!GetUVParameters(fSizeFactor)) + } + if (!GetUVParameters(fSizeFactor)) { return false; + } if (_bSmoothing) { - if (!SolveWithSmoothing(_fSmoothInfluence)) + if (!SolveWithSmoothing(_fSmoothInfluence)) { return false; + } } else { - if (!SolveWithoutSmoothing()) + if (!SolveWithoutSmoothing()) { return false; + } } return true; @@ -609,9 +702,11 @@ bool ParameterCorrection::GetUVParameters(double fSizeFactor) // Canonical base of R^3 Base::Vector3d b[3]; - b[0]=Base::Vector3d(1.0,0.0,0.0); b[1]=Base::Vector3d(0.0,1.0,0.0);b[2]=Base::Vector3d(0.0,0.0,1.0); + b[0] = Base::Vector3d(1.0, 0.0, 0.0); + b[1] = Base::Vector3d(0.0, 1.0, 0.0); + b[2] = Base::Vector3d(0.0, 0.0, 1.0); // Create a right system from the orthogonal eigenvectors - if ((e[0]%e[1])*e[2] < 0) { + if ((e[0] % e[1]) * e[2] < 0) { Base::Vector3d tmp = e[0]; e[0] = e[1]; e[1] = tmp; @@ -619,9 +714,9 @@ bool ParameterCorrection::GetUVParameters(double fSizeFactor) // Now generate the transpon. Rotation matrix Wm4::Matrix3d clRotMatTrans; - for (int i=0; i<3; i++) { - for (int j=0; j<3; j++) { - clRotMatTrans[i][j] = b[j]*e[i]; + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + clRotMatTrans[i][j] = b[j] * e[i]; } } @@ -630,32 +725,33 @@ bool ParameterCorrection::GetUVParameters(double fSizeFactor) // Calculate the coordinates of the transf. Points and project // these on to the x,y-plane of the new coordinate system - for (int ii=_pvcPoints->Lower(); ii<=_pvcPoints->Upper(); ii++) { + for (int ii = _pvcPoints->Lower(); ii <= _pvcPoints->Upper(); ii++) { const gp_Pnt& pnt = (*_pvcPoints)(ii); Wm4::Vector3d clProjPnt = clRotMatTrans * Wm4::Vector3d(pnt.X(), pnt.Y(), pnt.Z()); vcProjPts.emplace_back(clProjPnt.X(), clProjPnt.Y()); clBBox.Add(Base::Vector2d(clProjPnt.X(), clProjPnt.Y())); } - if ((clBBox.MaxX == clBBox.MinX) || (clBBox.MaxY == clBBox.MinY)) + if ((clBBox.MaxX == clBBox.MinX) || (clBBox.MaxY == clBBox.MinY)) { return false; - double tx = fSizeFactor*clBBox.MinX-(fSizeFactor-1.0)*clBBox.MaxX; - double ty = fSizeFactor*clBBox.MinY-(fSizeFactor-1.0)*clBBox.MaxY; - double fDeltaX = (2*fSizeFactor-1.0)*(clBBox.MaxX - clBBox.MinX); - double fDeltaY = (2*fSizeFactor-1.0)*(clBBox.MaxY - clBBox.MinY); + } + double tx = fSizeFactor * clBBox.MinX - (fSizeFactor - 1.0) * clBBox.MaxX; + double ty = fSizeFactor * clBBox.MinY - (fSizeFactor - 1.0) * clBBox.MaxY; + double fDeltaX = (2 * fSizeFactor - 1.0) * (clBBox.MaxX - clBBox.MinX); + double fDeltaY = (2 * fSizeFactor - 1.0) * (clBBox.MaxY - clBBox.MinY); // Calculate the u,v parameters with u,v from [0,1] _pvcUVParam->Init(gp_Pnt2d(0.0, 0.0)); - int ii=0; + int ii = 0; if (clBBox.MaxX - clBBox.MinX >= clBBox.MaxY - clBBox.MinY) { - for (const auto & pt : vcProjPts) { - (*_pvcUVParam)(ii) = gp_Pnt2d((pt.x-tx)/fDeltaX, (pt.y-ty)/fDeltaY); + for (const auto& pt : vcProjPts) { + (*_pvcUVParam)(ii) = gp_Pnt2d((pt.x - tx) / fDeltaX, (pt.y - ty) / fDeltaY); ii++; } } else { - for (const auto & pt : vcProjPts) { - (*_pvcUVParam)(ii) = gp_Pnt2d((pt.y-ty)/fDeltaY, (pt.x-tx)/fDeltaX); + for (const auto& pt : vcProjPts) { + (*_pvcUVParam)(ii) = gp_Pnt2d((pt.y - ty) / fDeltaY, (pt.x - tx) / fDeltaX); ii++; } } @@ -673,7 +769,9 @@ void ParameterCorrection::SetUV(const Base::Vector3d& clU, const Base::Vector3d& } } -void ParameterCorrection::GetUVW(Base::Vector3d& clU, Base::Vector3d& clV, Base::Vector3d& clW) const +void ParameterCorrection::GetUVW(Base::Vector3d& clU, + Base::Vector3d& clV, + Base::Vector3d& clW) const { clU = _clU; clV = _clV; @@ -683,36 +781,36 @@ void ParameterCorrection::GetUVW(Base::Vector3d& clU, Base::Vector3d& clV, Base: Base::Vector3d ParameterCorrection::GetGravityPoint() const { Standard_Integer ulSize = _pvcPoints->Length(); - double x=0.0, y=0.0, z=0.0; - for (int i=_pvcPoints->Lower(); i<=_pvcPoints->Upper(); i++) { + double x = 0.0, y = 0.0, z = 0.0; + for (int i = _pvcPoints->Lower(); i <= _pvcPoints->Upper(); i++) { const gp_Pnt& pnt = (*_pvcPoints)(i); x += pnt.X(); y += pnt.Y(); z += pnt.Z(); } - return Base::Vector3d(x/ulSize, y/ulSize, z/ulSize); + return Base::Vector3d(x / ulSize, y / ulSize, z / ulSize); } void ParameterCorrection::ProjectControlPointsOnPlane() { Base::Vector3d base = GetGravityPoint(); - for (unsigned j=0;j<_usUCtrlpoints;j++) { - for (unsigned k=0;k<_usVCtrlpoints;k++) { - gp_Pnt pole = _vCtrlPntsOfSurf(j,k); + for (unsigned j = 0; j < _usUCtrlpoints; j++) { + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + gp_Pnt pole = _vCtrlPntsOfSurf(j, k); Base::Vector3d pnt(pole.X(), pole.Y(), pole.Z()); pnt.ProjectToPlane(base, _clW); pole.SetX(pnt.x); pole.SetY(pnt.y); pole.SetZ(pnt.z); - _vCtrlPntsOfSurf(j,k) = pole; + _vCtrlPntsOfSurf(j, k) = pole; } } } Handle(Geom_BSplineSurface) ParameterCorrection::CreateSurface(const TColgp_Array1OfPnt& points, int iIter, - bool bParaCor, + bool bParaCor, double fSizeFactor) { if (_pvcPoints) { @@ -726,10 +824,12 @@ Handle(Geom_BSplineSurface) ParameterCorrection::CreateSurface(const TColgp_Arra *_pvcPoints = points; _pvcUVParam = new TColgp_Array1OfPnt2d(points.Lower(), points.Upper()); - if (_usUCtrlpoints*_usVCtrlpoints > static_cast(_pvcPoints->Length())) - return nullptr; // LGS under-determined - if (!DoInitialParameterCorrection(fSizeFactor)) + if (_usUCtrlpoints * _usVCtrlpoints > static_cast(_pvcPoints->Length())) { + return nullptr; // LGS under-determined + } + if (!DoInitialParameterCorrection(fSizeFactor)) { return nullptr; + } // Generate the approximation plane as a B-spline area if (iIter < 0) { @@ -741,11 +841,17 @@ Handle(Geom_BSplineSurface) ParameterCorrection::CreateSurface(const TColgp_Arra bParaCor = false; } - if (bParaCor) + if (bParaCor) { DoParameterCorrection(iIter); + } - return new Geom_BSplineSurface(_vCtrlPntsOfSurf, _vUKnots, _vVKnots, - _vUMults, _vVMults, _usUOrder-1, _usVOrder-1); + return new Geom_BSplineSurface(_vCtrlPntsOfSurf, + _vUKnots, + _vVKnots, + _vUMults, + _vVMults, + _usUOrder - 1, + _usVOrder - 1); } void ParameterCorrection::EnableSmoothing(bool bSmooth, double fSmoothInfl) @@ -757,19 +863,17 @@ void ParameterCorrection::EnableSmoothing(bool bSmooth, double fSmoothInfl) /////////////////// BSplineParameterCorrection -BSplineParameterCorrection::BSplineParameterCorrection(unsigned usUOrder, unsigned usVOrder, - unsigned usUCtrlpoints, unsigned usVCtrlpoints) - : ParameterCorrection(usUOrder, usVOrder, usUCtrlpoints, usVCtrlpoints) - , _clUSpline(usUCtrlpoints+usUOrder) - , _clVSpline(usVCtrlpoints+usVOrder) - , _clSmoothMatrix(0,usUCtrlpoints*usVCtrlpoints-1, - 0,usUCtrlpoints*usVCtrlpoints-1) - , _clFirstMatrix (0,usUCtrlpoints*usVCtrlpoints-1, - 0,usUCtrlpoints*usVCtrlpoints-1) - , _clSecondMatrix(0,usUCtrlpoints*usVCtrlpoints-1, - 0,usUCtrlpoints*usVCtrlpoints-1) - , _clThirdMatrix (0,usUCtrlpoints*usVCtrlpoints-1, - 0,usUCtrlpoints*usVCtrlpoints-1) +BSplineParameterCorrection::BSplineParameterCorrection(unsigned usUOrder, + unsigned usVOrder, + unsigned usUCtrlpoints, + unsigned usVCtrlpoints) + : ParameterCorrection(usUOrder, usVOrder, usUCtrlpoints, usVCtrlpoints) + , _clUSpline(usUCtrlpoints + usUOrder) + , _clVSpline(usVCtrlpoints + usVOrder) + , _clSmoothMatrix(0, usUCtrlpoints * usVCtrlpoints - 1, 0, usUCtrlpoints * usVCtrlpoints - 1) + , _clFirstMatrix(0, usUCtrlpoints * usVCtrlpoints - 1, 0, usUCtrlpoints * usVCtrlpoints - 1) + , _clSecondMatrix(0, usUCtrlpoints * usVCtrlpoints - 1, 0, usUCtrlpoints * usVCtrlpoints - 1) + , _clThirdMatrix(0, usUCtrlpoints * usVCtrlpoints - 1, 0, usUCtrlpoints * usVCtrlpoints - 1) { Init(); } @@ -777,20 +881,20 @@ BSplineParameterCorrection::BSplineParameterCorrection(unsigned usUOrder, unsign void BSplineParameterCorrection::Init() { // Initializations - _pvcUVParam = nullptr; - _pvcPoints = nullptr; + _pvcUVParam = nullptr; + _pvcPoints = nullptr; _clFirstMatrix.Init(0.0); _clSecondMatrix.Init(0.0); _clThirdMatrix.Init(0.0); _clSmoothMatrix.Init(0.0); /* Calculate the knot vectors */ - unsigned usUMax = _usUCtrlpoints-_usUOrder+1; - unsigned usVMax = _usVCtrlpoints-_usVOrder+1; + unsigned usUMax = _usUCtrlpoints - _usUOrder + 1; + unsigned usVMax = _usVCtrlpoints - _usVOrder + 1; // Knot vector for the CAS.CADE class // u-direction - for (unsigned i=0;i<=usUMax; i++) { + for (unsigned i = 0; i <= usUMax; i++) { _vUKnots(i) = static_cast(i) / static_cast(usUMax); _vUMults(i) = 1; } @@ -799,7 +903,7 @@ void BSplineParameterCorrection::Init() _vUMults(usUMax) = _usUOrder; // v-direction - for (unsigned i=0; i<=usVMax; i++) { + for (unsigned i = 0; i <= usVMax; i++) { _vVKnots(i) = static_cast(i) / static_cast(usVMax); _vVMults(i) = 1; } @@ -816,15 +920,16 @@ void BSplineParameterCorrection::SetUKnots(const std::vector& afKnots) { std::size_t numPoints = static_cast(_usUCtrlpoints); std::size_t order = static_cast(_usUOrder); - if (afKnots.size() != (numPoints + order)) + if (afKnots.size() != (numPoints + order)) { return; + } - unsigned usUMax = _usUCtrlpoints-_usUOrder+1; + unsigned usUMax = _usUCtrlpoints - _usUOrder + 1; // Knot vector for the CAS.CADE class // u-direction - for (unsigned i=1;i& afKnots) { std::size_t numPoints = static_cast(_usVCtrlpoints); std::size_t order = static_cast(_usVOrder); - if (afKnots.size() != (numPoints + order)) + if (afKnots.size() != (numPoints + order)) { return; + } - unsigned usVMax = _usVCtrlpoints-_usVOrder+1; + unsigned usVMax = _usVCtrlpoints - _usVOrder + 1; // Knot vector for the CAS.CADE class // v-direction - for (unsigned i=1; i& afKnots) void BSplineParameterCorrection::DoParameterCorrection(int iIter) { - int i=0; - double fMaxDiff=0.0, fMaxScalar=1.0; + int i = 0; + double fMaxDiff = 0.0, fMaxScalar = 1.0; double fWeight = _fSmoothInfluence; - Base::SequencerLauncher seq("Calc surface...", iIter*_pvcPoints->Length()); + Base::SequencerLauncher seq("Calc surface...", iIter * _pvcPoints->Length()); do { fMaxScalar = 1.0; - fMaxDiff = 0.0; + fMaxDiff = 0.0; Handle(Geom_BSplineSurface) pclBSplineSurf = new Geom_BSplineSurface(_vCtrlPntsOfSurf, - _vUKnots, _vVKnots, _vUMults, _vVMults, _usUOrder-1, _usVOrder-1); + _vUKnots, + _vVKnots, + _vUMults, + _vVMults, + _usUOrder - 1, + _usVOrder - 1); - for (int ii=_pvcPoints->Lower();ii <=_pvcPoints->Upper();ii++) { + for (int ii = _pvcPoints->Lower(); ii <= _pvcPoints->Upper(); ii++) { double fDeltaU, fDeltaV, fU, fV; const gp_Pnt& pnt = (*_pvcPoints)(ii); gp_Vec P(pnt.X(), pnt.Y(), pnt.Z()); @@ -882,25 +993,27 @@ void BSplineParameterCorrection::DoParameterCorrection(int iIter) // Calculate Xu x Xv the normal in X(u,v) gp_Dir clNormal = Xu ^ Xv; - //Check, if X = P - if (!(X.IsEqual(P,0.001,0.001))) { + // Check, if X = P + if (!(X.IsEqual(P, 0.001, 0.001))) { ErrorVec.Normalize(); - if (fabs(clNormal*ErrorVec) < fMaxScalar) - fMaxScalar = fabs(clNormal*ErrorVec); + if (fabs(clNormal * ErrorVec) < fMaxScalar) { + fMaxScalar = fabs(clNormal * ErrorVec); + } } - fDeltaU = ( (P-X) * Xu ) / ( (P-X)*Xuu - Xu*Xu ); - if (fabs(fDeltaU) < Precision::Confusion()) + fDeltaU = ((P - X) * Xu) / ((P - X) * Xuu - Xu * Xu); + if (fabs(fDeltaU) < Precision::Confusion()) { fDeltaU = 0.0; - fDeltaV = ( (P-X) * Xv ) / ( (P-X)*Xvv - Xv*Xv ); - if (fabs(fDeltaV) < Precision::Confusion()) + } + fDeltaV = ((P - X) * Xv) / ((P - X) * Xvv - Xv * Xv); + if (fabs(fDeltaV) < Precision::Confusion()) { fDeltaV = 0.0; + } - //Replace old u/v values with new ones + // Replace old u/v values with new ones fU = uvValue.X() - fDeltaU; fV = uvValue.Y() - fDeltaV; - if (fU <= 1.0 && fU >= 0.0 && - fV <= 1.0 && fV >= 0.0) { + if (fU <= 1.0 && fU >= 0.0 && fV <= 1.0 && fV >= 0.0) { uvValue.SetX(fU); uvValue.SetY(fV); fMaxDiff = std::max(fabs(fDeltaU), fMaxDiff); @@ -919,50 +1032,49 @@ void BSplineParameterCorrection::DoParameterCorrection(int iIter) } i++; - } - while(i Precision::Confusion() && fMaxScalar < 0.99); + } while (i < iIter && fMaxDiff > Precision::Confusion() && fMaxScalar < 0.99); } bool BSplineParameterCorrection::SolveWithoutSmoothing() { unsigned ulSize = _pvcPoints->Length(); - unsigned ulDim = _usUCtrlpoints*_usVCtrlpoints; - math_Matrix M (0, ulSize-1, 0, ulDim-1); - math_Matrix Xx (0, ulDim-1, 0, 0); - math_Matrix Xy (0, ulDim-1, 0, 0); - math_Matrix Xz (0, ulDim-1, 0, 0); - math_Vector bx (0, ulSize-1); - math_Vector by (0, ulSize-1); - math_Vector bz (0, ulSize-1); + unsigned ulDim = _usUCtrlpoints * _usVCtrlpoints; + math_Matrix M(0, ulSize - 1, 0, ulDim - 1); + math_Matrix Xx(0, ulDim - 1, 0, 0); + math_Matrix Xy(0, ulDim - 1, 0, 0); + math_Matrix Xz(0, ulDim - 1, 0, 0); + math_Vector bx(0, ulSize - 1); + math_Vector by(0, ulSize - 1); + math_Vector bz(0, ulSize - 1); // Determining the coefficient matrix of the overdetermined LGS - for (unsigned i=0; i basisU(_usUCtrlpoints); - for (unsigned j=0; j<_usUCtrlpoints; j++) { - basisU[j] = _clUSpline.BasisFunction(j,fU); + for (unsigned j = 0; j < _usUCtrlpoints; j++) { + basisU[j] = _clUSpline.BasisFunction(j, fU); } std::vector basisV(_usVCtrlpoints); - for (unsigned k=0; k<_usVCtrlpoints; k++) { - basisV[k] = _clVSpline.BasisFunction(k,fV); + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + basisV[k] = _clVSpline.BasisFunction(k, fV); } - for (unsigned j=0; j<_usUCtrlpoints; j++) { + for (unsigned j = 0; j < _usUCtrlpoints; j++) { double valueU = basisU[j]; if (valueU == 0.0) { - for (unsigned k=0; k<_usVCtrlpoints; k++) { - M(i,ulIdx) = 0.0; + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + M(i, ulIdx) = 0.0; ulIdx++; } } else { - for (unsigned k=0; k<_usVCtrlpoints; k++) { - M(i,ulIdx) = valueU * basisV[k]; + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + M(i, ulIdx) = valueU * basisV[k]; ulIdx++; } } @@ -970,27 +1082,30 @@ bool BSplineParameterCorrection::SolveWithoutSmoothing() } // Determine the right side - for (int ii=_pvcPoints->Lower(); ii<=_pvcPoints->Upper(); ii++) { + for (int ii = _pvcPoints->Lower(); ii <= _pvcPoints->Upper(); ii++) { const gp_Pnt& pnt = (*_pvcPoints)(ii); - bx(ii) = pnt.X(); by(ii) = pnt.Y(); bz(ii) = pnt.Z(); + bx(ii) = pnt.X(); + by(ii) = pnt.Y(); + bz(ii) = pnt.Z(); } // Solve the over-determined LGS with Householder-Transformation - math_Householder hhX(M,bx); - math_Householder hhY(M,by); - math_Householder hhZ(M,bz); + math_Householder hhX(M, bx); + math_Householder hhY(M, by); + math_Householder hhZ(M, bz); - if (!(hhX.IsDone() && hhY.IsDone() && hhZ.IsDone())) + if (!(hhX.IsDone() && hhY.IsDone() && hhZ.IsDone())) { // LGS could not be solved return false; + } Xx = hhX.AllValues(); Xy = hhY.AllValues(); Xz = hhZ.AllValues(); - unsigned ulIdx=0; - for (unsigned j=0;j<_usUCtrlpoints;j++) { - for (unsigned k=0;k<_usVCtrlpoints;k++) { - _vCtrlPntsOfSurf(j,k) = gp_Pnt(Xx(ulIdx,0),Xy(ulIdx,0),Xz(ulIdx,0)); + unsigned ulIdx = 0; + for (unsigned j = 0; j < _usUCtrlpoints; j++) { + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + _vCtrlPntsOfSurf(j, k) = gp_Pnt(Xx(ulIdx, 0), Xy(ulIdx, 0), Xz(ulIdx, 0)); ulIdx++; } } @@ -998,18 +1113,19 @@ bool BSplineParameterCorrection::SolveWithoutSmoothing() return true; } -namespace Reen { +namespace Reen +{ class ScalarProduct { public: - explicit ScalarProduct(const math_Matrix& mat) : mat(mat) - { - } + explicit ScalarProduct(const math_Matrix& mat) + : mat(mat) + {} std::vector multiply(int col) const { math_Vector vec = mat.Col(col); std::vector out(mat.ColNumber()); - for (int n=mat.LowerCol(); n<=mat.UpperCol(); n++) { + for (int n = mat.LowerCol(); n <= mat.UpperCol(); n++) { out[n] = vec * mat.Col(n); } return out; @@ -1018,51 +1134,51 @@ public: private: const math_Matrix& mat; }; -} +} // namespace Reen bool BSplineParameterCorrection::SolveWithSmoothing(double fWeight) { unsigned ulSize = _pvcPoints->Length(); - unsigned ulDim = _usUCtrlpoints*_usVCtrlpoints; - math_Matrix M (0, ulSize-1, 0, ulDim-1); - math_Vector Xx (0, ulDim-1); - math_Vector Xy (0, ulDim-1); - math_Vector Xz (0, ulDim-1); - math_Vector bx (0, ulSize-1); - math_Vector by (0, ulSize-1); - math_Vector bz (0, ulSize-1); - math_Vector Mbx(0, ulDim-1); - math_Vector Mby(0, ulDim-1); - math_Vector Mbz(0, ulDim-1); + unsigned ulDim = _usUCtrlpoints * _usVCtrlpoints; + math_Matrix M(0, ulSize - 1, 0, ulDim - 1); + math_Vector Xx(0, ulDim - 1); + math_Vector Xy(0, ulDim - 1); + math_Vector Xz(0, ulDim - 1); + math_Vector bx(0, ulSize - 1); + math_Vector by(0, ulSize - 1); + math_Vector bz(0, ulSize - 1); + math_Vector Mbx(0, ulDim - 1); + math_Vector Mby(0, ulDim - 1); + math_Vector Mbz(0, ulDim - 1); // Determining the coefficient matrix of the overdetermined LGS - for (unsigned i=0; i basisU(_usUCtrlpoints); - for (unsigned j=0; j<_usUCtrlpoints; j++) { - basisU[j] = _clUSpline.BasisFunction(j,fU); + for (unsigned j = 0; j < _usUCtrlpoints; j++) { + basisU[j] = _clUSpline.BasisFunction(j, fU); } std::vector basisV(_usVCtrlpoints); - for (unsigned k=0; k<_usVCtrlpoints; k++) { - basisV[k] = _clVSpline.BasisFunction(k,fV); + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + basisV[k] = _clVSpline.BasisFunction(k, fV); } - for (unsigned j=0; j<_usUCtrlpoints; j++) { + for (unsigned j = 0; j < _usUCtrlpoints; j++) { double valueU = basisU[j]; if (valueU == 0.0) { - for (unsigned k=0; k<_usVCtrlpoints; k++) { - M(i,ulIdx) = 0.0; + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + M(i, ulIdx) = 0.0; ulIdx++; } } else { - for (unsigned k=0; k<_usVCtrlpoints; k++) { - M(i,ulIdx) = valueU * basisV[k]; + for (unsigned k = 0; k < _usVCtrlpoints; k++) { + M(i, ulIdx) = valueU * basisV[k]; ulIdx++; } } @@ -1074,41 +1190,45 @@ bool BSplineParameterCorrection::SolveWithSmoothing(double fWeight) #if 0 math_Matrix MTM = M.TMultiply(M); #elif 0 - math_Matrix MTM(0, ulDim-1, 0, ulDim-1); - for (unsigned m=0; m columns(ulDim); std::generate(columns.begin(), columns.end(), Base::iotaGen(0)); ScalarProduct scalar(M); - //NOLINTBEGIN - QFuture< std::vector > future = QtConcurrent::mapped - (columns, std::bind(&ScalarProduct::multiply, &scalar, sp::_1)); - //NOLINTEND - QFutureWatcher< std::vector > watcher; + // NOLINTBEGIN + QFuture> future = + QtConcurrent::mapped(columns, std::bind(&ScalarProduct::multiply, &scalar, sp::_1)); + // NOLINTEND + QFutureWatcher> watcher; watcher.setFuture(future); watcher.waitForFinished(); - math_Matrix MTM(0, ulDim-1, 0, ulDim-1); - int rowIndex=0; - for (const auto & it : future) { - int colIndex=0; - for (std::vector::const_iterator jt = it.begin(); jt != it.end(); ++jt, colIndex++) + math_Matrix MTM(0, ulDim - 1, 0, ulDim - 1); + int rowIndex = 0; + for (const auto& it : future) { + int colIndex = 0; + for (std::vector::const_iterator jt = it.begin(); jt != it.end(); + ++jt, colIndex++) { MTM(rowIndex, colIndex) = *jt; + } rowIndex++; } #endif // Determine the right side - for (int ii=_pvcPoints->Lower(); ii<=_pvcPoints->Upper(); ii++) { + for (int ii = _pvcPoints->Lower(); ii <= _pvcPoints->Upper(); ii++) { const gp_Pnt& pnt = (*_pvcPoints)(ii); - bx(ii) = pnt.X(); by(ii) = pnt.Y(); bz(ii) = pnt.Z(); + bx(ii) = pnt.X(); + by(ii) = pnt.Y(); + bz(ii) = pnt.Z(); } - for (unsigned i=0; i -#include -#include +#include #include #include -#include +#include +#include +#include #include #include #include -namespace Base { +namespace Base +{ class SequencerLauncher; } // TODO: Replace OCC stuff with ublas & co -namespace Reen { +namespace Reen +{ class ReenExport SplineBasisfunction { public: - enum ValueT { + enum ValueT + { Zero = 0, Full, Other @@ -62,7 +65,7 @@ public: * @param vKnots Knot vector * @param iOrder Order (degree + 1) of the basic polynomial */ - explicit SplineBasisfunction(TColStd_Array1OfReal& vKnots, int iOrder=1); + explicit SplineBasisfunction(TColStd_Array1OfReal& vKnots, int iOrder = 1); /** * Constructor @@ -73,7 +76,10 @@ public: * and the sum of the values in @a vMults has to be identical to @a iSize. * @param iOrder Order (degree + 1) of the basic polynomial */ - SplineBasisfunction(TColStd_Array1OfReal& vKnots, TColStd_Array1OfInteger& vMults, int iSize, int iOrder=1); + SplineBasisfunction(TColStd_Array1OfReal& vKnots, + TColStd_Array1OfInteger& vMults, + int iSize, + int iOrder = 1); virtual ~SplineBasisfunction(); @@ -86,7 +92,7 @@ public: * @param fParam Parameter value * @return ValueT */ - virtual ValueT LocalSupport(int iIndex, double fParam)=0; + virtual ValueT LocalSupport(int iIndex, double fParam) = 0; /** * Calculates the function value Nik(t) at the point fParam * (from: Piegl/Tiller 96 The NURBS-Book) @@ -95,7 +101,7 @@ public: * @param fParam Parameter value * @return Function value Nik(t) */ - virtual double BasisFunction(int iIndex, double fParam)=0; + virtual double BasisFunction(int iIndex, double fParam) = 0; /** * Calculates the function values of the first iMaxDer derivatives on the * fParam position (from: Piegl/Tiller 96 The NURBS-Book) @@ -107,28 +113,31 @@ public: * * The list must be sufficiently long for iMaxDer+1 elements. */ - virtual void DerivativesOfBasisFunction(int iIndex, int iMaxDer, double fParam, - TColStd_Array1OfReal& Derivat)=0; + virtual void DerivativesOfBasisFunction(int iIndex, + int iMaxDer, + double fParam, + TColStd_Array1OfReal& Derivat) = 0; /** * Calculates the kth derivative at the point fParam */ - virtual double DerivativeOfBasisFunction(int iIndex, int k, double fParam)=0; + virtual double DerivativeOfBasisFunction(int iIndex, int k, double fParam) = 0; /** * Sets the knot vector and the order. The size of the knot vector has to be exactly as * large as defined in the constructor. */ - virtual void SetKnots(TColStd_Array1OfReal& vKnots, int iOrder=1); + virtual void SetKnots(TColStd_Array1OfReal& vKnots, int iOrder = 1); /** * Sets the knot vector and the order. The knot vector in the form of (Value, Multiplicity) * is passed on. Internally, this is converted into a knot vector in the form of (value, 1). * The size of this new vector has to be exactly as big as specified in the constructor. */ - virtual void SetKnots(TColStd_Array1OfReal& vKnots, TColStd_Array1OfInteger& vMults, int iOrder=1); + virtual void + SetKnots(TColStd_Array1OfReal& vKnots, TColStd_Array1OfInteger& vMults, int iOrder = 1); -protected: //Member +protected: // Member // Knot vector TColStd_Array1OfReal _vKnotVector; @@ -136,10 +145,9 @@ protected: //Member int _iOrder; }; -class ReenExport BSplineBasis : public SplineBasisfunction +class ReenExport BSplineBasis: public SplineBasisfunction { public: - /** * Constructor * @param iSize Length of the knot vector @@ -151,7 +159,7 @@ public: * @param vKnots Knot vector * @param iOrder Order (degree + 1) of the basic polynomial */ - explicit BSplineBasis(TColStd_Array1OfReal& vKnots, int iOrder=1); + explicit BSplineBasis(TColStd_Array1OfReal& vKnots, int iOrder = 1); /** * Constructor @@ -162,7 +170,10 @@ public: * sum of the values in @a vMults has to be identical to @a iSize. * @param iOrder Order (degree + 1) of the basic polynomial */ - BSplineBasis(TColStd_Array1OfReal& vKnots, TColStd_Array1OfInteger& vMults, int iSize, int iOrder=1); + BSplineBasis(TColStd_Array1OfReal& vKnots, + TColStd_Array1OfInteger& vMults, + int iSize, + int iOrder = 1); /** * Specifies the knot index for the parameter value (from: Piegl/Tiller 96 The NURBS-Book) @@ -173,7 +184,7 @@ public: /** * Calculates the function values of the basic functions that do not vanish at fParam. - * It must be ensured that the list for d (= degree of the B-spline) + * It must be ensured that the list for d (= degree of the B-spline) * elements (0, ..., d-1) is sufficient (from: Piegl/Tiller 96 The NURBS-Book) * @param fParam Parameter * @param vFuncVals List of function values @@ -211,8 +222,10 @@ public: * The list must be sufficiently long for iMaxDer+1 elements. * @return List of function values */ - void DerivativesOfBasisFunction(int iIndex, int iMaxDer, double fParam, - TColStd_Array1OfReal& Derivat) override; + void DerivativesOfBasisFunction(int iIndex, + int iMaxDer, + double fParam, + TColStd_Array1OfReal& Derivat) override; /** * Calculates the kth derivative at the point fParam @@ -229,14 +242,14 @@ public: /** * Destructor */ - ~ BSplineBasis() override; + ~BSplineBasis() override; protected: - /** * Calculates the roots of the Legendre-Polynomials and the corresponding weights */ - virtual void GenerateRootsAndWeights(TColStd_Array1OfReal& vAbscissas, TColStd_Array1OfReal& vWeights); + virtual void GenerateRootsAndWeights(TColStd_Array1OfReal& vAbscissas, + TColStd_Array1OfReal& vWeights); /** * Calculates the limits of integration (Indexes of the knots) @@ -255,10 +268,11 @@ class ReenExport ParameterCorrection public: // Constructor - explicit ParameterCorrection(unsigned usUOrder=4, //Order in u-direction (order = degree + 1) - unsigned usVOrder=4, //Order in v-direction - unsigned usUCtrlpoints=6, //Qty. of the control points in the u-direction - unsigned usVCtrlpoints=6); //Qty. of the control points in the v-direction + explicit ParameterCorrection( + unsigned usUOrder = 4, // Order in u-direction (order = degree + 1) + unsigned usVOrder = 4, // Order in v-direction + unsigned usUCtrlpoints = 6, // Qty. of the control points in the u-direction + unsigned usVCtrlpoints = 6); // Qty. of the control points in the v-direction virtual ~ParameterCorrection() { @@ -285,7 +299,7 @@ protected: * The bounding box is calculated from these points, then the u/v parameters for * the points are calculated. */ - virtual bool DoInitialParameterCorrection(double fSizeFactor=0.0f); + virtual bool DoInitialParameterCorrection(double fSizeFactor = 0.0f); /** * Calculates the (u, v) values of the points @@ -295,31 +309,31 @@ protected: /** * Carries out a parameter correction. */ - virtual void DoParameterCorrection(int iIter)=0; + virtual void DoParameterCorrection(int iIter) = 0; /** * Solves system of equations */ - virtual bool SolveWithoutSmoothing()=0; + virtual bool SolveWithoutSmoothing() = 0; /** * Solve a regular system of equations */ - virtual bool SolveWithSmoothing(double fWeight)=0; + virtual bool SolveWithSmoothing(double fWeight) = 0; public: /** * Calculates a B-spline surface from the given points */ virtual Handle(Geom_BSplineSurface) CreateSurface(const TColgp_Array1OfPnt& points, - int iIter, - bool bParaCor, - double fSizeFactor=0.0f); + int iIter, + bool bParaCor, + double fSizeFactor = 0.0f); /** * Setting the u/v directions * The third parameter specifies whether the directions should actually be used. */ - virtual void SetUV(const Base::Vector3d& clU, const Base::Vector3d& clV, bool bUseDir=true); + virtual void SetUV(const Base::Vector3d& clU, const Base::Vector3d& clV, bool bUseDir = true); /** * Returns the u/v/w directions @@ -334,26 +348,26 @@ public: /** * Use smoothing-terms */ - virtual void EnableSmoothing(bool bSmooth=true, double fSmoothInfl=1.0f); + virtual void EnableSmoothing(bool bSmooth = true, double fSmoothInfl = 1.0f); protected: - bool _bGetUVDir; //! Determines whether u/v direction is given - bool _bSmoothing; //! Use smoothing - double _fSmoothInfluence; //! Influence of smoothing - unsigned _usUOrder; //! Order in u-direction - unsigned _usVOrder; //! Order in v-direction - unsigned _usUCtrlpoints; //! Number of control points in the u-direction - unsigned _usVCtrlpoints; //! Number of control points in the v-direction - Base::Vector3d _clU; //! u-direction - Base::Vector3d _clV; //! v-direction - Base::Vector3d _clW; //! w-direction (perpendicular to u & v directions) - TColgp_Array1OfPnt* _pvcPoints{nullptr}; //! Raw data point list - TColgp_Array1OfPnt2d* _pvcUVParam{nullptr}; //! Parameter value for the points in the list - TColgp_Array2OfPnt _vCtrlPntsOfSurf; //! Array of control points - TColStd_Array1OfReal _vUKnots; //! Knot vector of the B-spline surface in the u-direction - TColStd_Array1OfReal _vVKnots; //! Knot vector of the B-spline surface in the v-direction - TColStd_Array1OfInteger _vUMults; //! Multiplicity of the knots in the knot vector - TColStd_Array1OfInteger _vVMults; //! Multiplicity of the knots in the knot vector + bool _bGetUVDir; //! Determines whether u/v direction is given + bool _bSmoothing; //! Use smoothing + double _fSmoothInfluence; //! Influence of smoothing + unsigned _usUOrder; //! Order in u-direction + unsigned _usVOrder; //! Order in v-direction + unsigned _usUCtrlpoints; //! Number of control points in the u-direction + unsigned _usVCtrlpoints; //! Number of control points in the v-direction + Base::Vector3d _clU; //! u-direction + Base::Vector3d _clV; //! v-direction + Base::Vector3d _clW; //! w-direction (perpendicular to u & v directions) + TColgp_Array1OfPnt* _pvcPoints {nullptr}; //! Raw data point list + TColgp_Array1OfPnt2d* _pvcUVParam {nullptr}; //! Parameter value for the points in the list + TColgp_Array2OfPnt _vCtrlPntsOfSurf; //! Array of control points + TColStd_Array1OfReal _vUKnots; //! Knot vector of the B-spline surface in the u-direction + TColStd_Array1OfReal _vVKnots; //! Knot vector of the B-spline surface in the v-direction + TColStd_Array1OfInteger _vUMults; //! Multiplicity of the knots in the knot vector + TColStd_Array1OfInteger _vVMults; //! Multiplicity of the knots in the knot vector }; /////////////////////////////////////////////////////////////////////////////////////////////// @@ -366,14 +380,15 @@ protected: * can be generated. */ -class ReenExport BSplineParameterCorrection : public ParameterCorrection +class ReenExport BSplineParameterCorrection: public ParameterCorrection { public: // Constructor - explicit BSplineParameterCorrection(unsigned usUOrder=4, //Order in u-direction (order = degree + 1) - unsigned usVOrder=4, //Order in the v-direction - unsigned usUCtrlpoints=6, //Qty. of the control points in u-direction - unsigned usVCtrlpoints=6); //Qty. of the control points in v-direction + explicit BSplineParameterCorrection( + unsigned usUOrder = 4, // Order in u-direction (order = degree + 1) + unsigned usVOrder = 4, // Order in the v-direction + unsigned usUCtrlpoints = 6, // Qty. of the control points in u-direction + unsigned usVCtrlpoints = 6); // Qty. of the control points in v-direction ~BSplineParameterCorrection() override = default; @@ -443,13 +458,13 @@ public: /** * Use smoothing-terms */ - void EnableSmoothing(bool bSmooth=true, double fSmoothInfl=1.0f) override; + void EnableSmoothing(bool bSmooth = true, double fSmoothInfl = 1.0f) override; /** * Use smoothing-terms */ - virtual void EnableSmoothing(bool bSmooth, double fSmoothInfl, - double fFirst, double fSec, double fThird); + virtual void + EnableSmoothing(bool bSmooth, double fSmoothInfl, double fFirst, double fSec, double fThird); protected: /** @@ -476,14 +491,14 @@ protected: virtual void CalcThirdSmoothMatrix(Base::SequencerLauncher&); protected: - BSplineBasis _clUSpline; //! B-spline basic function in the u-direction - BSplineBasis _clVSpline; //! B-spline basic function in the v-direction - math_Matrix _clSmoothMatrix; //! Matrix of smoothing functionals - math_Matrix _clFirstMatrix; //! Matrix of the 1st smoothing functionals - math_Matrix _clSecondMatrix; //! Matrix of the 2nd smoothing functionals - math_Matrix _clThirdMatrix; //! Matrix of the 3rd smoothing functionals + BSplineBasis _clUSpline; //! B-spline basic function in the u-direction + BSplineBasis _clVSpline; //! B-spline basic function in the v-direction + math_Matrix _clSmoothMatrix; //! Matrix of smoothing functionals + math_Matrix _clFirstMatrix; //! Matrix of the 1st smoothing functionals + math_Matrix _clSecondMatrix; //! Matrix of the 2nd smoothing functionals + math_Matrix _clThirdMatrix; //! Matrix of the 3rd smoothing functionals }; -} // namespace Reen +} // namespace Reen -#endif // REEN_APPROXSURFACE_H +#endif // REEN_APPROXSURFACE_H diff --git a/src/Mod/ReverseEngineering/App/BSplineFitting.cpp b/src/Mod/ReverseEngineering/App/BSplineFitting.cpp index 6df1ded66d..adc28a89fc 100644 --- a/src/Mod/ReverseEngineering/App/BSplineFitting.cpp +++ b/src/Mod/ReverseEngineering/App/BSplineFitting.cpp @@ -23,13 +23,13 @@ #include "PreCompiled.h" #if defined(HAVE_PCL_OPENNURBS) #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -37,28 +37,27 @@ #include "BSplineFitting.h" #include -#if PCL_VERSION_COMPARE(>=,1,7,0) -# include -# include -# include -# include -# include +#if PCL_VERSION_COMPARE(>=, 1, 7, 0) +#include +#include +#include +#include +#include #endif using namespace Reen; BSplineFitting::BSplineFitting(const std::vector& pts) - : myPoints(pts) - , myIterations(10) - , myOrder(3) - , myRefinement(4) - , myInteriorSmoothness(0.2) - , myInteriorWeight(1.0) - , myBoundarySmoothness(0.2) - , myBoundaryWeight(0.0) -{ -} + : myPoints(pts) + , myIterations(10) + , myOrder(3) + , myRefinement(4) + , myInteriorSmoothness(0.2) + , myInteriorWeight(1.0) + , myBoundarySmoothness(0.2) + , myBoundaryWeight(0.0) +{} void BSplineFitting::setIterations(unsigned value) { @@ -97,11 +96,13 @@ void BSplineFitting::setBoundaryWeight(double value) Handle(Geom_BSplineSurface) BSplineFitting::perform() { -#if PCL_VERSION_COMPARE(>=,1,7,0) +#if PCL_VERSION_COMPARE(>=, 1, 7, 0) pcl::on_nurbs::NurbsDataSurface data; - for (std::vector::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!pcl_isnan (it->x) && !pcl_isnan (it->y) && !pcl_isnan (it->z)) - data.interior.push_back (Eigen::Vector3d (it->x, it->y, it->z)); + for (std::vector::const_iterator it = myPoints.begin(); it != myPoints.end(); + ++it) { + if (!pcl_isnan(it->x) && !pcl_isnan(it->y) && !pcl_isnan(it->z)) { + data.interior.push_back(Eigen::Vector3d(it->x, it->y, it->z)); + } } @@ -115,8 +116,8 @@ Handle(Geom_BSplineSurface) BSplineFitting::perform() params.boundary_weight = myBoundaryWeight; // initialize - ON_NurbsSurface nurbs = pcl::on_nurbs::FittingSurface::initNurbsPCABoundingBox (myOrder, &data); - pcl::on_nurbs::FittingSurface fit (&data, nurbs); + ON_NurbsSurface nurbs = pcl::on_nurbs::FittingSurface::initNurbsPCABoundingBox(myOrder, &data); + pcl::on_nurbs::FittingSurface fit(&data, nurbs); // fit.setQuiet (false); // enable/disable debug output // surface refinement @@ -179,61 +180,74 @@ Handle(Geom_BSplineSurface) BSplineFitting::perform() TColgp_Array2OfPnt poles(1, numUPoles, 1, numVPoles); TColStd_Array2OfReal weights(1, numUPoles, 1, numVPoles); - for (int i=0; i::iterator it = uKnots.find(value); - if (it == uKnots.end()) + if (it == uKnots.end()) { uKnots[value] = 1; - else + } + else { it->second++; + } } - vKnots[fit.m_nurbs.SuperfluousKnot(1,0)] = 1; - vKnots[fit.m_nurbs.SuperfluousKnot(1,1)] = 1; - for (int i=0; i::iterator it = vKnots.find(value); - if (it == vKnots.end()) + if (it == vKnots.end()) { vKnots[value] = 1; - else + } + else { it->second++; + } } - TColStd_Array1OfReal uKnotArray(1,uKnots.size()); - TColStd_Array1OfInteger uMultArray(1,uKnots.size()); + TColStd_Array1OfReal uKnotArray(1, uKnots.size()); + TColStd_Array1OfInteger uMultArray(1, uKnots.size()); int index = 1; - for (std::map::iterator it = uKnots.begin(); it != uKnots.end(); ++it, index++) { + for (std::map::iterator it = uKnots.begin(); it != uKnots.end(); + ++it, index++) { uKnotArray.SetValue(index, it->first); uMultArray.SetValue(index, it->second); } - TColStd_Array1OfReal vKnotArray(1,vKnots.size()); - TColStd_Array1OfInteger vMultArray(1,vKnots.size()); + TColStd_Array1OfReal vKnotArray(1, vKnots.size()); + TColStd_Array1OfInteger vMultArray(1, vKnots.size()); index = 1; - for (std::map::iterator it = vKnots.begin(); it != vKnots.end(); ++it, index++) { + for (std::map::iterator it = vKnots.begin(); it != vKnots.end(); + ++it, index++) { vKnotArray.SetValue(index, it->first); vMultArray.SetValue(index, it->second); } - Handle(Geom_BSplineSurface) spline = new Geom_BSplineSurface(poles,weights, - uKnotArray, vKnotArray, uMultArray, vMultArray, uDegree, vDegree, - uPeriodic, vPeriodic); + Handle(Geom_BSplineSurface) spline = new Geom_BSplineSurface(poles, + weights, + uKnotArray, + vKnotArray, + uMultArray, + vMultArray, + uDegree, + vDegree, + uPeriodic, + vPeriodic); return spline; #else return Handle(Geom_BSplineSurface)(); #endif } -#endif // HAVE_PCL_OPENNURBS +#endif // HAVE_PCL_OPENNURBS diff --git a/src/Mod/ReverseEngineering/App/BSplineFitting.h b/src/Mod/ReverseEngineering/App/BSplineFitting.h index 0dd1f2b740..efa76309ca 100644 --- a/src/Mod/ReverseEngineering/App/BSplineFitting.h +++ b/src/Mod/ReverseEngineering/App/BSplineFitting.h @@ -24,13 +24,14 @@ #define REEN_BSPLINEFITTING_H #if defined(HAVE_PCL_OPENNURBS) -# include +#include -# include -# include +#include +#include -namespace Reen { +namespace Reen +{ class BSplineFitting { @@ -57,8 +58,8 @@ private: double myBoundaryWeight; }; -} +} // namespace Reen -#endif // HAVE_PCL_OPENNURBS +#endif // HAVE_PCL_OPENNURBS -#endif // REEN_BSPLINEFITTING_H +#endif // REEN_BSPLINEFITTING_H diff --git a/src/Mod/ReverseEngineering/App/PreCompiled.h b/src/Mod/ReverseEngineering/App/PreCompiled.h index f600eeed2b..2f11363c4d 100644 --- a/src/Mod/ReverseEngineering/App/PreCompiled.h +++ b/src/Mod/ReverseEngineering/App/PreCompiled.h @@ -26,16 +26,16 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4181) -# pragma warning(disable : 4267) -# pragma warning(disable : 4275) -# pragma warning(disable : 4305) -# pragma warning(disable : 4522) +#pragma warning(disable : 4181) +#pragma warning(disable : 4267) +#pragma warning(disable : 4275) +#pragma warning(disable : 4305) +#pragma warning(disable : 4522) #endif // pcl headers include instead of #ifndef BOOST_BIND_GLOBAL_PLACEHOLDERS -# define BOOST_BIND_GLOBAL_PLACEHOLDERS +#define BOOST_BIND_GLOBAL_PLACEHOLDERS #endif #ifdef _PreComp_ @@ -48,15 +48,15 @@ // OpenCasCade #include -#include -#include #include #include +#include +#include // Qt #include #include #include -#endif // _PreComp_ +#endif // _PreComp_ #endif diff --git a/src/Mod/ReverseEngineering/App/RegionGrowing.cpp b/src/Mod/ReverseEngineering/App/RegionGrowing.cpp index 3c5816a176..1bdcd2cd83 100644 --- a/src/Mod/ReverseEngineering/App/RegionGrowing.cpp +++ b/src/Mod/ReverseEngineering/App/RegionGrowing.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -31,69 +31,71 @@ #if defined(HAVE_PCL_FILTERS) -# include -# include +#include +#include #endif #if defined(HAVE_PCL_SEGMENTATION) -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include using namespace std; using namespace Reen; -using pcl::PointXYZ; -using pcl::PointNormal; using pcl::PointCloud; +using pcl::PointNormal; +using pcl::PointXYZ; -RegionGrowing::RegionGrowing(const Points::PointKernel& pts, std::list >& clusters) - : myPoints(pts) - , myClusters(clusters) -{ -} +RegionGrowing::RegionGrowing(const Points::PointKernel& pts, std::list>& clusters) + : myPoints(pts) + , myClusters(clusters) +{} void RegionGrowing::perform(int ksearch) { - pcl::PointCloud::Ptr cloud (new pcl::PointCloud); + pcl::PointCloud::Ptr cloud(new pcl::PointCloud); cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { cloud->push_back(pcl::PointXYZ(it->x, it->y, it->z)); + } } - //normal estimation + // normal estimation pcl::search::Search::Ptr tree(new pcl::search::KdTree); - pcl::PointCloud ::Ptr normals (new pcl::PointCloud ); + pcl::PointCloud::Ptr normals(new pcl::PointCloud); pcl::NormalEstimation normal_estimator; - normal_estimator.setSearchMethod (tree); - normal_estimator.setInputCloud (cloud); - normal_estimator.setKSearch (ksearch); - normal_estimator.compute (*normals); + normal_estimator.setSearchMethod(tree); + normal_estimator.setInputCloud(cloud); + normal_estimator.setKSearch(ksearch); + normal_estimator.compute(*normals); // pass through - pcl::IndicesPtr indices (new std::vector ); + pcl::IndicesPtr indices(new std::vector); pcl::PassThrough pass; - pass.setInputCloud (cloud); - pass.setFilterFieldName ("z"); - pass.setFilterLimits (0.0, 1.0); - pass.filter (*indices); + pass.setInputCloud(cloud); + pass.setFilterFieldName("z"); + pass.setFilterLimits(0.0, 1.0); + pass.filter(*indices); pcl::RegionGrowing reg; - reg.setMinClusterSize (50); - reg.setMaxClusterSize (1000000); - reg.setSearchMethod (tree); - reg.setNumberOfNeighbours (30); - reg.setInputCloud (cloud); - //reg.setIndices (indices); - reg.setInputNormals (normals); - reg.setSmoothnessThreshold (3.0 / 180.0 * M_PI); - reg.setCurvatureThreshold (1.0); + reg.setMinClusterSize(50); + reg.setMaxClusterSize(1000000); + reg.setSearchMethod(tree); + reg.setNumberOfNeighbours(30); + reg.setInputCloud(cloud); + // reg.setIndices (indices); + reg.setInputNormals(normals); + reg.setSmoothnessThreshold(3.0 / 180.0 * M_PI); + reg.setCurvatureThreshold(1.0); - std::vector clusters; - reg.extract (clusters); + std::vector clusters; + reg.extract(clusters); - for (std::vector::iterator it = clusters.begin (); it != clusters.end (); ++it) { + for (std::vector::iterator it = clusters.begin(); it != clusters.end(); + ++it) { myClusters.push_back(std::vector()); myClusters.back().swap(it->indices); } @@ -101,17 +103,18 @@ void RegionGrowing::perform(int ksearch) void RegionGrowing::perform(const std::vector& myNormals) { - if (myPoints.size() != myNormals.size()) + if (myPoints.size() != myNormals.size()) { throw Base::RuntimeError("Number of points doesn't match with number of normals"); + } - pcl::PointCloud::Ptr cloud (new pcl::PointCloud); + pcl::PointCloud::Ptr cloud(new pcl::PointCloud); cloud->reserve(myPoints.size()); - pcl::PointCloud ::Ptr normals (new pcl::PointCloud ); + pcl::PointCloud::Ptr normals(new pcl::PointCloud); normals->reserve(myNormals.size()); std::size_t num_points = myPoints.size(); const std::vector& points = myPoints.getBasicPoints(); - for (std::size_t index=0; index& myNormals) } pcl::search::Search::Ptr tree(new pcl::search::KdTree); - tree->setInputCloud (cloud); + tree->setInputCloud(cloud); // pass through - pcl::IndicesPtr indices (new std::vector ); + pcl::IndicesPtr indices(new std::vector); pcl::PassThrough pass; - pass.setInputCloud (cloud); - pass.setFilterFieldName ("z"); - pass.setFilterLimits (0.0, 1.0); - pass.filter (*indices); + pass.setInputCloud(cloud); + pass.setFilterFieldName("z"); + pass.setFilterLimits(0.0, 1.0); + pass.filter(*indices); pcl::RegionGrowing reg; - reg.setMinClusterSize (50); - reg.setMaxClusterSize (1000000); - reg.setSearchMethod (tree); - reg.setNumberOfNeighbours (30); - reg.setInputCloud (cloud); - //reg.setIndices (indices); - reg.setInputNormals (normals); - reg.setSmoothnessThreshold (3.0 / 180.0 * M_PI); - reg.setCurvatureThreshold (1.0); + reg.setMinClusterSize(50); + reg.setMaxClusterSize(1000000); + reg.setSearchMethod(tree); + reg.setNumberOfNeighbours(30); + reg.setInputCloud(cloud); + // reg.setIndices (indices); + reg.setInputNormals(normals); + reg.setSmoothnessThreshold(3.0 / 180.0 * M_PI); + reg.setCurvatureThreshold(1.0); - std::vector clusters; - reg.extract (clusters); + std::vector clusters; + reg.extract(clusters); - for (std::vector::iterator it = clusters.begin (); it != clusters.end (); ++it) { + for (std::vector::iterator it = clusters.begin(); it != clusters.end(); + ++it) { myClusters.push_back(std::vector()); myClusters.back().swap(it->indices); } } -#endif // HAVE_PCL_SEGMENTATION - +#endif // HAVE_PCL_SEGMENTATION diff --git a/src/Mod/ReverseEngineering/App/RegionGrowing.h b/src/Mod/ReverseEngineering/App/RegionGrowing.h index f38b92ece7..c4c9cdf0b0 100644 --- a/src/Mod/ReverseEngineering/App/RegionGrowing.h +++ b/src/Mod/ReverseEngineering/App/RegionGrowing.h @@ -29,29 +29,32 @@ #include -namespace Points {class PointKernel;} +namespace Points +{ +class PointKernel; +} -namespace Reen { +namespace Reen +{ class RegionGrowing { public: - RegionGrowing(const Points::PointKernel&, std::list >&); + RegionGrowing(const Points::PointKernel&, std::list>&); /** \brief Set the number of k nearest neighbors to use for the normal estimation. - * \param[in] k the number of k-nearest neighbors - */ + * \param[in] k the number of k-nearest neighbors + */ void perform(int ksearch); /** \brief Pass the normals to the points given in the constructor. - * \param[in] normals the normals to the given points. - */ + * \param[in] normals the normals to the given points. + */ void perform(const std::vector& normals); private: const Points::PointKernel& myPoints; - std::list >& myClusters; + std::list>& myClusters; }; -} // namespace Reen - -#endif // REEN_REGIONGROWING_H +} // namespace Reen +#endif // REEN_REGIONGROWING_H diff --git a/src/Mod/ReverseEngineering/App/SampleConsensus.cpp b/src/Mod/ReverseEngineering/App/SampleConsensus.cpp index 5dcf320ed1..74ba78d981 100644 --- a/src/Mod/ReverseEngineering/App/SampleConsensus.cpp +++ b/src/Mod/ReverseEngineering/App/SampleConsensus.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -32,41 +32,44 @@ #if defined(HAVE_PCL_SAMPLE_CONSENSUS) -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include using namespace std; using namespace Reen; -using pcl::PointXYZ; -using pcl::PointNormal; using pcl::PointCloud; +using pcl::PointNormal; +using pcl::PointXYZ; -SampleConsensus::SampleConsensus(SacModel sac, const Points::PointKernel& pts, const std::vector& nor) - : mySac(sac) - , myPoints(pts) - , myNormals(nor) -{ -} +SampleConsensus::SampleConsensus(SacModel sac, + const Points::PointKernel& pts, + const std::vector& nor) + : mySac(sac) + , myPoints(pts) + , myNormals(nor) +{} double SampleConsensus::perform(std::vector& parameters, std::vector& model) { - pcl::PointCloud::Ptr cloud (new pcl::PointCloud); + pcl::PointCloud::Ptr cloud(new pcl::PointCloud); cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { cloud->push_back(pcl::PointXYZ(it->x, it->y, it->z)); + } } - cloud->width = int (cloud->points.size ()); + cloud->width = int(cloud->points.size()); cloud->height = 1; cloud->is_dense = true; - pcl::PointCloud::Ptr normals (new pcl::PointCloud ()); + pcl::PointCloud::Ptr normals(new pcl::PointCloud()); if (mySac == SACMODEL_CONE || mySac == SACMODEL_CYLINDER) { #if 0 // Create search tree @@ -83,9 +86,13 @@ double SampleConsensus::perform(std::vector& parameters, std::vector n.compute (*normals); #else normals->reserve(myNormals.size()); - for (std::vector::const_iterator it = myNormals.begin(); it != myNormals.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + for (std::vector::const_iterator it = myNormals.begin(); + it != myNormals.end(); + ++it) { + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { normals->push_back(pcl::Normal(it->x, it->y, it->z)); + } } #endif } @@ -93,48 +100,44 @@ double SampleConsensus::perform(std::vector& parameters, std::vector // created RandomSampleConsensus object and compute the appropriated model pcl::SampleConsensusModel::Ptr model_p; switch (mySac) { - case SACMODEL_PLANE: - { - model_p.reset(new pcl::SampleConsensusModelPlane (cloud)); - break; - } - case SACMODEL_SPHERE: - { - model_p.reset(new pcl::SampleConsensusModelSphere (cloud)); - break; - } - case SACMODEL_CONE: - { - pcl::SampleConsensusModelCone::Ptr model_c - (new pcl::SampleConsensusModelCone (cloud)); - model_c->setInputNormals(normals); - model_p = model_c; - break; - } - case SACMODEL_CYLINDER: - { - pcl::SampleConsensusModelCylinder::Ptr model_c - (new pcl::SampleConsensusModelCylinder (cloud)); - model_c->setInputNormals(normals); - model_p = model_c; - break; - } - default: - throw Base::RuntimeError("Unsupported SAC model"); + case SACMODEL_PLANE: { + model_p.reset(new pcl::SampleConsensusModelPlane(cloud)); + break; + } + case SACMODEL_SPHERE: { + model_p.reset(new pcl::SampleConsensusModelSphere(cloud)); + break; + } + case SACMODEL_CONE: { + pcl::SampleConsensusModelCone::Ptr model_c( + new pcl::SampleConsensusModelCone(cloud)); + model_c->setInputNormals(normals); + model_p = model_c; + break; + } + case SACMODEL_CYLINDER: { + pcl::SampleConsensusModelCylinder::Ptr model_c( + new pcl::SampleConsensusModelCylinder(cloud)); + model_c->setInputNormals(normals); + model_p = model_c; + break; + } + default: + throw Base::RuntimeError("Unsupported SAC model"); } - pcl::RandomSampleConsensus ransac (model_p); - ransac.setDistanceThreshold (.01); + pcl::RandomSampleConsensus ransac(model_p); + ransac.setDistanceThreshold(.01); ransac.computeModel(); ransac.getInliers(model); - //ransac.getModel (model); + // ransac.getModel (model); Eigen::VectorXf model_p_coefficients; - ransac.getModelCoefficients (model_p_coefficients); - for (int i=0; i -namespace Points {class PointKernel;} +namespace Points +{ +class PointKernel; +} -namespace Reen { +namespace Reen +{ class SampleConsensus { public: enum SacModel { - SACMODEL_PLANE, - SACMODEL_LINE, - SACMODEL_CIRCLE2D, - SACMODEL_CIRCLE3D, - SACMODEL_SPHERE, - SACMODEL_CYLINDER, - SACMODEL_CONE, - SACMODEL_TORUS, + SACMODEL_PLANE, + SACMODEL_LINE, + SACMODEL_CIRCLE2D, + SACMODEL_CIRCLE3D, + SACMODEL_SPHERE, + SACMODEL_CYLINDER, + SACMODEL_CONE, + SACMODEL_TORUS, }; SampleConsensus(SacModel sac, const Points::PointKernel&, const std::vector&); double perform(std::vector& parameters, std::vector& model); @@ -55,7 +59,6 @@ private: const std::vector& myNormals; }; -} // namespace Reen - -#endif // REEN_SAMPLECONSENSUS_H +} // namespace Reen +#endif // REEN_SAMPLECONSENSUS_H diff --git a/src/Mod/ReverseEngineering/App/Segmentation.cpp b/src/Mod/ReverseEngineering/App/Segmentation.cpp index 4f25a9344e..78368dfe59 100644 --- a/src/Mod/ReverseEngineering/App/Segmentation.cpp +++ b/src/Mod/ReverseEngineering/App/Segmentation.cpp @@ -28,38 +28,37 @@ #if defined(HAVE_PCL_FILTERS) -# include -# include -# include +#include +#include +#include #endif #if defined(HAVE_PCL_SAMPLE_CONSENSUS) -# include -# include +#include +#include #endif #if defined(HAVE_PCL_SEGMENTATION) -# include -# include -# include -# include +#include +#include +#include +#include #endif using namespace std; using namespace Reen; #if defined(HAVE_PCL_FILTERS) -using pcl::PointXYZ; -using pcl::PointNormal; using pcl::PointCloud; +using pcl::PointNormal; +using pcl::PointXYZ; #endif #if defined(HAVE_PCL_SEGMENTATION) -Segmentation::Segmentation(const Points::PointKernel& pts, std::list >& clusters) - : myPoints(pts) - , myClusters(clusters) -{ -} +Segmentation::Segmentation(const Points::PointKernel& pts, std::list>& clusters) + : myPoints(pts) + , myClusters(clusters) +{} void Segmentation::perform(int ksearch) { @@ -69,16 +68,18 @@ void Segmentation::perform(int ksearch) pcl::SACSegmentationFromNormals seg; pcl::ExtractIndices extract; pcl::ExtractIndices extract_normals; - pcl::search::KdTree::Ptr tree (new pcl::search::KdTree ()); + pcl::search::KdTree::Ptr tree(new pcl::search::KdTree()); // Datasets - pcl::PointCloud::Ptr cloud (new pcl::PointCloud); - pcl::PointCloud::Ptr cloud_filtered (new pcl::PointCloud); - pcl::PointCloud::Ptr cloud_normals (new pcl::PointCloud); - pcl::PointCloud::Ptr cloud_filtered2 (new pcl::PointCloud); - pcl::PointCloud::Ptr cloud_normals2 (new pcl::PointCloud); - pcl::ModelCoefficients::Ptr coefficients_plane (new pcl::ModelCoefficients), coefficients_cylinder (new pcl::ModelCoefficients); - pcl::PointIndices::Ptr inliers_plane (new pcl::PointIndices), inliers_cylinder (new pcl::PointIndices); + pcl::PointCloud::Ptr cloud(new pcl::PointCloud); + pcl::PointCloud::Ptr cloud_filtered(new pcl::PointCloud); + pcl::PointCloud::Ptr cloud_normals(new pcl::PointCloud); + pcl::PointCloud::Ptr cloud_filtered2(new pcl::PointCloud); + pcl::PointCloud::Ptr cloud_normals2(new pcl::PointCloud); + pcl::ModelCoefficients::Ptr coefficients_plane(new pcl::ModelCoefficients), + coefficients_cylinder(new pcl::ModelCoefficients); + pcl::PointIndices::Ptr inliers_plane(new pcl::PointIndices), + inliers_cylinder(new pcl::PointIndices); // Copy the points cloud->reserve(myPoints.size()); @@ -86,97 +87,96 @@ void Segmentation::perform(int ksearch) cloud->push_back(pcl::PointXYZ(it->x, it->y, it->z)); } - cloud->width = int (cloud->points.size ()); + cloud->width = int(cloud->points.size()); cloud->height = 1; // Build a passthrough filter to remove spurious NaNs - pass.setInputCloud (cloud); - pass.setFilterFieldName ("z"); - pass.setFilterLimits (0, 1.5); - pass.filter (*cloud_filtered); + pass.setInputCloud(cloud); + pass.setFilterFieldName("z"); + pass.setFilterLimits(0, 1.5); + pass.filter(*cloud_filtered); // Estimate point normals - ne.setSearchMethod (tree); - ne.setInputCloud (cloud_filtered); - ne.setKSearch (ksearch); - ne.compute (*cloud_normals); + ne.setSearchMethod(tree); + ne.setInputCloud(cloud_filtered); + ne.setKSearch(ksearch); + ne.compute(*cloud_normals); // Create the segmentation object for the planar model and set all the parameters - seg.setOptimizeCoefficients (true); - seg.setModelType (pcl::SACMODEL_NORMAL_PLANE); - seg.setNormalDistanceWeight (0.1); - seg.setMethodType (pcl::SAC_RANSAC); - seg.setMaxIterations (100); - seg.setDistanceThreshold (0.03); - seg.setInputCloud (cloud_filtered); - seg.setInputNormals (cloud_normals); + seg.setOptimizeCoefficients(true); + seg.setModelType(pcl::SACMODEL_NORMAL_PLANE); + seg.setNormalDistanceWeight(0.1); + seg.setMethodType(pcl::SAC_RANSAC); + seg.setMaxIterations(100); + seg.setDistanceThreshold(0.03); + seg.setInputCloud(cloud_filtered); + seg.setInputNormals(cloud_normals); // Obtain the plane inliers and coefficients - seg.segment (*inliers_plane, *coefficients_plane); + seg.segment(*inliers_plane, *coefficients_plane); myClusters.push_back(inliers_plane->indices); // Extract the planar inliers from the input cloud - extract.setInputCloud (cloud_filtered); - extract.setIndices (inliers_plane); - extract.setNegative (false); + extract.setInputCloud(cloud_filtered); + extract.setIndices(inliers_plane); + extract.setNegative(false); // Write the planar inliers to disk - pcl::PointCloud::Ptr cloud_plane (new pcl::PointCloud ()); - extract.filter (*cloud_plane); + pcl::PointCloud::Ptr cloud_plane(new pcl::PointCloud()); + extract.filter(*cloud_plane); // Remove the planar inliers, extract the rest - extract.setNegative (true); - extract.filter (*cloud_filtered2); - extract_normals.setNegative (true); - extract_normals.setInputCloud (cloud_normals); - extract_normals.setIndices (inliers_plane); - extract_normals.filter (*cloud_normals2); + extract.setNegative(true); + extract.filter(*cloud_filtered2); + extract_normals.setNegative(true); + extract_normals.setInputCloud(cloud_normals); + extract_normals.setIndices(inliers_plane); + extract_normals.filter(*cloud_normals2); // Create the segmentation object for cylinder segmentation and set all the parameters - seg.setOptimizeCoefficients (true); - seg.setModelType (pcl::SACMODEL_CYLINDER); - seg.setNormalDistanceWeight (0.1); - seg.setMethodType (pcl::SAC_RANSAC); - seg.setMaxIterations (10000); - seg.setDistanceThreshold (0.05); - seg.setRadiusLimits (0, 0.1); - seg.setInputCloud (cloud_filtered2); - seg.setInputNormals (cloud_normals2); + seg.setOptimizeCoefficients(true); + seg.setModelType(pcl::SACMODEL_CYLINDER); + seg.setNormalDistanceWeight(0.1); + seg.setMethodType(pcl::SAC_RANSAC); + seg.setMaxIterations(10000); + seg.setDistanceThreshold(0.05); + seg.setRadiusLimits(0, 0.1); + seg.setInputCloud(cloud_filtered2); + seg.setInputNormals(cloud_normals2); // Obtain the cylinder inliers and coefficients - seg.segment (*inliers_cylinder, *coefficients_cylinder); + seg.segment(*inliers_cylinder, *coefficients_cylinder); myClusters.push_back(inliers_cylinder->indices); // Write the cylinder inliers to disk - extract.setInputCloud (cloud_filtered2); - extract.setIndices (inliers_cylinder); - extract.setNegative (false); - pcl::PointCloud::Ptr cloud_cylinder (new pcl::PointCloud ()); - extract.filter (*cloud_cylinder); + extract.setInputCloud(cloud_filtered2); + extract.setIndices(inliers_cylinder); + extract.setNegative(false); + pcl::PointCloud::Ptr cloud_cylinder(new pcl::PointCloud()); + extract.filter(*cloud_cylinder); } -#endif // HAVE_PCL_SEGMENTATION +#endif // HAVE_PCL_SEGMENTATION // ---------------------------------------------------------------------------- -#if defined (HAVE_PCL_FILTERS) +#if defined(HAVE_PCL_FILTERS) NormalEstimation::NormalEstimation(const Points::PointKernel& pts) - : myPoints(pts) - , kSearch(0) - , searchRadius(0) -{ -} + : myPoints(pts) + , kSearch(0) + , searchRadius(0) +{} void NormalEstimation::perform(std::vector& normals) { // Copy the points - pcl::PointCloud::Ptr cloud (new pcl::PointCloud); + pcl::PointCloud::Ptr cloud(new pcl::PointCloud); cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { cloud->push_back(pcl::PointXYZ(it->x, it->y, it->z)); } - cloud->width = int (cloud->points.size ()); + cloud->width = int(cloud->points.size()); cloud->height = 1; #if 0 @@ -190,22 +190,26 @@ void NormalEstimation::perform(std::vector& normals) #endif // Estimate point normals - pcl::PointCloud::Ptr cloud_normals (new pcl::PointCloud); - pcl::search::KdTree::Ptr tree (new pcl::search::KdTree ()); + pcl::PointCloud::Ptr cloud_normals(new pcl::PointCloud); + pcl::search::KdTree::Ptr tree(new pcl::search::KdTree()); pcl::NormalEstimation ne; - ne.setSearchMethod (tree); - //ne.setInputCloud (cloud_filtered); - ne.setInputCloud (cloud); - if (kSearch > 0) - ne.setKSearch (kSearch); - if (searchRadius > 0) - ne.setRadiusSearch (searchRadius); - ne.compute (*cloud_normals); + ne.setSearchMethod(tree); + // ne.setInputCloud (cloud_filtered); + ne.setInputCloud(cloud); + if (kSearch > 0) { + ne.setKSearch(kSearch); + } + if (searchRadius > 0) { + ne.setRadiusSearch(searchRadius); + } + ne.compute(*cloud_normals); normals.reserve(cloud_normals->size()); - for (pcl::PointCloud::const_iterator it = cloud_normals->begin(); it != cloud_normals->end(); ++it) { + for (pcl::PointCloud::const_iterator it = cloud_normals->begin(); + it != cloud_normals->end(); + ++it) { normals.push_back(Base::Vector3d(it->normal_x, it->normal_y, it->normal_z)); } } -#endif // HAVE_PCL_FILTERS +#endif // HAVE_PCL_FILTERS diff --git a/src/Mod/ReverseEngineering/App/Segmentation.h b/src/Mod/ReverseEngineering/App/Segmentation.h index 94137e2357..1c884f890b 100644 --- a/src/Mod/ReverseEngineering/App/Segmentation.h +++ b/src/Mod/ReverseEngineering/App/Segmentation.h @@ -29,22 +29,26 @@ #include -namespace Points {class PointKernel;} +namespace Points +{ +class PointKernel; +} -namespace Reen { +namespace Reen +{ class Segmentation { public: - Segmentation(const Points::PointKernel&, std::list >& clusters); + Segmentation(const Points::PointKernel&, std::list>& clusters); /** \brief Set the number of k nearest neighbors to use for the normal estimation. - * \param[in] k the number of k-nearest neighbors - */ + * \param[in] k the number of k-nearest neighbors + */ void perform(int ksearch); private: const Points::PointKernel& myPoints; - std::list >& myClusters; + std::list>& myClusters; }; class NormalEstimation @@ -52,24 +56,25 @@ class NormalEstimation public: explicit NormalEstimation(const Points::PointKernel&); /** \brief Set the number of k nearest neighbors to use for the feature estimation. - * \param[in] k the number of k-nearest neighbors - */ - inline void - setKSearch (int k) { kSearch = k; } + * \param[in] k the number of k-nearest neighbors + */ + inline void setKSearch(int k) + { + kSearch = k; + } - /** \brief Set the sphere radius that is to be used for determining the nearest neighbors used for the feature - * estimation. - * \param[in] radius the sphere radius used as the maximum distance to consider a point a neighbor - */ - inline void - setSearchRadius (double radius) + /** \brief Set the sphere radius that is to be used for determining the nearest neighbors used + * for the feature estimation. \param[in] radius the sphere radius used as the maximum distance + * to consider a point a neighbor + */ + inline void setSearchRadius(double radius) { searchRadius = radius; } /** \brief Perform the normal estimation. - * \param[out] the estimated normals - */ + * \param[out] the estimated normals + */ void perform(std::vector& normals); private: @@ -78,7 +83,6 @@ private: double searchRadius; }; -} // namespace Reen - -#endif // REEN_SEGMENTATION_H +} // namespace Reen +#endif // REEN_SEGMENTATION_H diff --git a/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp b/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp index 4baaa5c870..220b1207d5 100644 --- a/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp +++ b/src/Mod/ReverseEngineering/App/SurfaceTriangulation.cpp @@ -23,36 +23,36 @@ #include "PreCompiled.h" #include -#include -#include #include #include #include +#include +#include #include "SurfaceTriangulation.h" // http://svn.pointclouds.org/pcl/tags/pcl-1.5.1/test/ #if defined(HAVE_PCL_SURFACE) -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #ifndef PCL_REVISION_VERSION -# define PCL_REVISION_VERSION 0 +#define PCL_REVISION_VERSION 0 #endif using namespace pcl; @@ -64,84 +64,86 @@ using namespace Reen; // http://www.ics.uci.edu/~gopi/PAPERS/Euro00.pdf // http://www.ics.uci.edu/~gopi/PAPERS/CGMV.pdf SurfaceTriangulation::SurfaceTriangulation(const Points::PointKernel& pts, Mesh::MeshObject& mesh) - : myPoints(pts) - , myMesh(mesh) - , mu(0) - , searchRadius(0) -{ -} + : myPoints(pts) + , myMesh(mesh) + , mu(0) + , searchRadius(0) +{} void SurfaceTriangulation::perform(int ksearch) { - PointCloud::Ptr cloud (new PointCloud); - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud(new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; search::KdTree::Ptr tree2; cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { cloud->push_back(PointXYZ(it->x, it->y, it->z)); + } } // Create search tree - tree.reset (new search::KdTree (false)); - tree->setInputCloud (cloud); + tree.reset(new search::KdTree(false)); + tree->setInputCloud(cloud); // Normal estimation NormalEstimation n; - PointCloud::Ptr normals (new PointCloud ()); - n.setInputCloud (cloud); - //n.setIndices (indices[B); - n.setSearchMethod (tree); - n.setKSearch (ksearch); - n.compute (*normals); + PointCloud::Ptr normals(new PointCloud()); + n.setInputCloud(cloud); + // n.setIndices (indices[B); + n.setSearchMethod(tree); + n.setKSearch(ksearch); + n.compute(*normals); // Concatenate XYZ and normal information - pcl::concatenateFields (*cloud, *normals, *cloud_with_normals); + pcl::concatenateFields(*cloud, *normals, *cloud_with_normals); // Create search tree - tree2.reset (new search::KdTree); - tree2->setInputCloud (cloud_with_normals); + tree2.reset(new search::KdTree); + tree2->setInputCloud(cloud_with_normals); // Init objects GreedyProjectionTriangulation gp3; // Set parameters - gp3.setInputCloud (cloud_with_normals); - gp3.setSearchMethod (tree2); - gp3.setSearchRadius (searchRadius); - gp3.setMu (mu); - gp3.setMaximumNearestNeighbors (100); - gp3.setMaximumSurfaceAngle(M_PI/4); // 45 degrees - gp3.setMinimumAngle(M_PI/18); // 10 degrees - gp3.setMaximumAngle(2*M_PI/3); // 120 degrees + gp3.setInputCloud(cloud_with_normals); + gp3.setSearchMethod(tree2); + gp3.setSearchRadius(searchRadius); + gp3.setMu(mu); + gp3.setMaximumNearestNeighbors(100); + gp3.setMaximumSurfaceAngle(M_PI / 4); // 45 degrees + gp3.setMinimumAngle(M_PI / 18); // 10 degrees + gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees gp3.setNormalConsistency(false); gp3.setConsistentVertexOrdering(true); // Reconstruct PolygonMesh mesh; - gp3.reconstruct (mesh); + gp3.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); // Additional vertex information - //std::vector parts = gp3.getPartIDs(); - //std::vector states = gp3.getPointStates(); + // std::vector parts = gp3.getPartIDs(); + // std::vector states = gp3.getPointStates(); } void SurfaceTriangulation::perform(const std::vector& normals) { - if (myPoints.size() != normals.size()) + if (myPoints.size() != normals.size()) { throw Base::RuntimeError("Number of points doesn't match with number of normals"); + } - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; cloud_with_normals->reserve(myPoints.size()); std::size_t num_points = myPoints.size(); const std::vector& points = myPoints.getBasicPoints(); - for (std::size_t index=0; index& normals) } // Create search tree - tree.reset (new search::KdTree); - tree->setInputCloud (cloud_with_normals); + tree.reset(new search::KdTree); + tree->setInputCloud(cloud_with_normals); // Init objects GreedyProjectionTriangulation gp3; // Set parameters - gp3.setInputCloud (cloud_with_normals); - gp3.setSearchMethod (tree); - gp3.setSearchRadius (searchRadius); - gp3.setMu (mu); - gp3.setMaximumNearestNeighbors (100); - gp3.setMaximumSurfaceAngle(M_PI/4); // 45 degrees - gp3.setMinimumAngle(M_PI/18); // 10 degrees - gp3.setMaximumAngle(2*M_PI/3); // 120 degrees + gp3.setInputCloud(cloud_with_normals); + gp3.setSearchMethod(tree); + gp3.setSearchRadius(searchRadius); + gp3.setMu(mu); + gp3.setMaximumNearestNeighbors(100); + gp3.setMaximumSurfaceAngle(M_PI / 4); // 45 degrees + gp3.setMinimumAngle(M_PI / 18); // 10 degrees + gp3.setMaximumAngle(2 * M_PI / 3); // 120 degrees gp3.setNormalConsistency(true); gp3.setConsistentVertexOrdering(true); // Reconstruct PolygonMesh mesh; - gp3.reconstruct (mesh); + gp3.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); // Additional vertex information - //std::vector parts = gp3.getPartIDs(); - //std::vector states = gp3.getPointStates(); + // std::vector parts = gp3.getPartIDs(); + // std::vector states = gp3.getPointStates(); } // ---------------------------------------------------------------------------- @@ -191,79 +193,84 @@ void SurfaceTriangulation::perform(const std::vector& normals) // See // http://www.cs.jhu.edu/~misha/Code/PoissonRecon/Version8.0/ PoissonReconstruction::PoissonReconstruction(const Points::PointKernel& pts, Mesh::MeshObject& mesh) - : myPoints(pts) - , myMesh(mesh) - , depth(-1) - , solverDivide(-1) - , samplesPerNode(-1.0f) -{ -} + : myPoints(pts) + , myMesh(mesh) + , depth(-1) + , solverDivide(-1) + , samplesPerNode(-1.0f) +{} void PoissonReconstruction::perform(int ksearch) { - PointCloud::Ptr cloud (new PointCloud); - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud(new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; search::KdTree::Ptr tree2; cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { cloud->push_back(PointXYZ(it->x, it->y, it->z)); + } } // Create search tree - tree.reset (new search::KdTree (false)); - tree->setInputCloud (cloud); + tree.reset(new search::KdTree(false)); + tree->setInputCloud(cloud); // Normal estimation NormalEstimation n; - PointCloud::Ptr normals (new PointCloud ()); - n.setInputCloud (cloud); - //n.setIndices (indices[B); - n.setSearchMethod (tree); - n.setKSearch (ksearch); - n.compute (*normals); + PointCloud::Ptr normals(new PointCloud()); + n.setInputCloud(cloud); + // n.setIndices (indices[B); + n.setSearchMethod(tree); + n.setKSearch(ksearch); + n.compute(*normals); // Concatenate XYZ and normal information - pcl::concatenateFields (*cloud, *normals, *cloud_with_normals); + pcl::concatenateFields(*cloud, *normals, *cloud_with_normals); // Create search tree - tree2.reset (new search::KdTree); - tree2->setInputCloud (cloud_with_normals); + tree2.reset(new search::KdTree); + tree2->setInputCloud(cloud_with_normals); // Init objects Poisson poisson; // Set parameters - poisson.setInputCloud (cloud_with_normals); - poisson.setSearchMethod (tree2); - if (depth >= 1) + poisson.setInputCloud(cloud_with_normals); + poisson.setSearchMethod(tree2); + if (depth >= 1) { poisson.setDepth(depth); - if (solverDivide >= 1) + } + if (solverDivide >= 1) { poisson.setSolverDivide(solverDivide); - if (samplesPerNode >= 1.0f) + } + if (samplesPerNode >= 1.0f) { poisson.setSamplesPerNode(samplesPerNode); + } // Reconstruct PolygonMesh mesh; - poisson.reconstruct (mesh); + poisson.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } void PoissonReconstruction::perform(const std::vector& normals) { - if (myPoints.size() != normals.size()) + if (myPoints.size() != normals.size()) { throw Base::RuntimeError("Number of points doesn't match with number of normals"); + } - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; cloud_with_normals->reserve(myPoints.size()); std::size_t num_points = myPoints.size(); const std::vector& points = myPoints.getBasicPoints(); - for (std::size_t index=0; index& normals) } // Create search tree - tree.reset (new search::KdTree); - tree->setInputCloud (cloud_with_normals); + tree.reset(new search::KdTree); + tree->setInputCloud(cloud_with_normals); // Init objects Poisson poisson; // Set parameters - poisson.setInputCloud (cloud_with_normals); - poisson.setSearchMethod (tree); - if (depth >= 1) + poisson.setInputCloud(cloud_with_normals); + poisson.setSearchMethod(tree); + if (depth >= 1) { poisson.setDepth(depth); - if (solverDivide >= 1) + } + if (solverDivide >= 1) { poisson.setSolverDivide(solverDivide); - if (samplesPerNode >= 1.0f) + } + if (samplesPerNode >= 1.0f) { poisson.setSamplesPerNode(samplesPerNode); + } // Reconstruct PolygonMesh mesh; - poisson.reconstruct (mesh); + poisson.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } @@ -305,43 +315,44 @@ void PoissonReconstruction::perform(const std::vector& normals) // ---------------------------------------------------------------------------- GridReconstruction::GridReconstruction(const Points::PointKernel& pts, Mesh::MeshObject& mesh) - : myPoints(pts) - , myMesh(mesh) -{ -} + : myPoints(pts) + , myMesh(mesh) +{} void GridReconstruction::perform(int ksearch) { - PointCloud::Ptr cloud (new PointCloud); - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud(new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; search::KdTree::Ptr tree2; cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { cloud->push_back(PointXYZ(it->x, it->y, it->z)); + } } // Create search tree - tree.reset (new search::KdTree (false)); - tree->setInputCloud (cloud); + tree.reset(new search::KdTree(false)); + tree->setInputCloud(cloud); // Normal estimation NormalEstimation n; - PointCloud::Ptr normals (new PointCloud ()); - n.setInputCloud (cloud); - //n.setIndices (indices[B); - n.setSearchMethod (tree); - n.setKSearch (ksearch); - n.compute (*normals); + PointCloud::Ptr normals(new PointCloud()); + n.setInputCloud(cloud); + // n.setIndices (indices[B); + n.setSearchMethod(tree); + n.setKSearch(ksearch); + n.compute(*normals); // Concatenate XYZ and normal information - pcl::concatenateFields (*cloud, *normals, *cloud_with_normals); + pcl::concatenateFields(*cloud, *normals, *cloud_with_normals); // Create search tree - tree2.reset (new search::KdTree); - tree2->setInputCloud (cloud_with_normals); + tree2.reset(new search::KdTree); + tree2->setInputCloud(cloud_with_normals); // Init objects GridProjection grid; @@ -351,28 +362,29 @@ void GridReconstruction::perform(int ksearch) grid.setPaddingSize(3); grid.setNearestNeighborNum(100); grid.setMaxBinarySearchLevel(10); - grid.setInputCloud (cloud_with_normals); - grid.setSearchMethod (tree2); + grid.setInputCloud(cloud_with_normals); + grid.setSearchMethod(tree2); // Reconstruct PolygonMesh mesh; - grid.reconstruct (mesh); + grid.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } void GridReconstruction::perform(const std::vector& normals) { - if (myPoints.size() != normals.size()) + if (myPoints.size() != normals.size()) { throw Base::RuntimeError("Number of points doesn't match with number of normals"); + } - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; cloud_with_normals->reserve(myPoints.size()); std::size_t num_points = myPoints.size(); const std::vector& points = myPoints.getBasicPoints(); - for (std::size_t index=0; index& normals) } // Create search tree - tree.reset (new search::KdTree); - tree->setInputCloud (cloud_with_normals); + tree.reset(new search::KdTree); + tree->setInputCloud(cloud_with_normals); // Init objects GridProjection grid; @@ -399,36 +411,39 @@ void GridReconstruction::perform(const std::vector& normals) grid.setPaddingSize(3); grid.setNearestNeighborNum(100); grid.setMaxBinarySearchLevel(10); - grid.setInputCloud (cloud_with_normals); - grid.setSearchMethod (tree); + grid.setInputCloud(cloud_with_normals); + grid.setSearchMethod(tree); // Reconstruct PolygonMesh mesh; - grid.reconstruct (mesh); + grid.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } // ---------------------------------------------------------------------------- -ImageTriangulation::ImageTriangulation(int width, int height, const Points::PointKernel& pts, Mesh::MeshObject& mesh) - : width(width) - , height(height) - , myPoints(pts) - , myMesh(mesh) -{ -} +ImageTriangulation::ImageTriangulation(int width, + int height, + const Points::PointKernel& pts, + Mesh::MeshObject& mesh) + : width(width) + , height(height) + , myPoints(pts) + , myMesh(mesh) +{} void ImageTriangulation::perform() { - if (myPoints.size() != static_cast(width * height)) + if (myPoints.size() != static_cast(width * height)) { throw Base::RuntimeError("Number of points doesn't match with given width and height"); + } - //construct dataset - pcl::PointCloud::Ptr cloud_organized (new pcl::PointCloud ()); + // construct dataset + pcl::PointCloud::Ptr cloud_organized(new pcl::PointCloud()); cloud_organized->width = width; cloud_organized->height = height; - cloud_organized->points.resize (cloud_organized->width * cloud_organized->height); + cloud_organized->points.resize(cloud_organized->width * cloud_organized->height); const std::vector& points = myPoints.getBasicPoints(); @@ -446,16 +461,16 @@ void ImageTriangulation::perform() OrganizedFastMesh ofm; // Set parameters - ofm.setInputCloud (cloud_organized); + ofm.setInputCloud(cloud_organized); // This parameter is not yet implemented (pcl 1.7) - ofm.setMaxEdgeLength (1.5); - ofm.setTrianglePixelSize (1); - ofm.setTriangulationType (OrganizedFastMesh::TRIANGLE_ADAPTIVE_CUT); + ofm.setMaxEdgeLength(1.5); + ofm.setTrianglePixelSize(1); + ofm.setTriangulationType(OrganizedFastMesh::TRIANGLE_ADAPTIVE_CUT); ofm.storeShadowedFaces(true); // Reconstruct PolygonMesh mesh; - ofm.reconstruct (mesh); + ofm.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); @@ -466,7 +481,7 @@ void ImageTriangulation::perform() MeshCore::MeshAlgorithm meshAlg(kernel); meshAlg.SetPointFlag(MeshCore::MeshPoint::INVALID); std::vector validPoints; - validPoints.reserve(face.size()*3); + validPoints.reserve(face.size() * 3); for (MeshCore::MeshFacetArray::_TConstIterator it = face.begin(); it != face.end(); ++it) { validPoints.push_back(it->_aulPoints[0]); validPoints.push_back(it->_aulPoints[1]); @@ -491,75 +506,77 @@ void ImageTriangulation::perform() // ---------------------------------------------------------------------------- Reen::MarchingCubesRBF::MarchingCubesRBF(const Points::PointKernel& pts, Mesh::MeshObject& mesh) - : myPoints(pts) - , myMesh(mesh) -{ -} + : myPoints(pts) + , myMesh(mesh) +{} void Reen::MarchingCubesRBF::perform(int ksearch) { - PointCloud::Ptr cloud (new PointCloud); - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud(new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; search::KdTree::Ptr tree2; cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { cloud->push_back(PointXYZ(it->x, it->y, it->z)); + } } // Create search tree - tree.reset (new search::KdTree (false)); - tree->setInputCloud (cloud); + tree.reset(new search::KdTree(false)); + tree->setInputCloud(cloud); // Normal estimation NormalEstimation n; - PointCloud::Ptr normals (new PointCloud ()); - n.setInputCloud (cloud); - //n.setIndices (indices[B); - n.setSearchMethod (tree); - n.setKSearch (ksearch); - n.compute (*normals); + PointCloud::Ptr normals(new PointCloud()); + n.setInputCloud(cloud); + // n.setIndices (indices[B); + n.setSearchMethod(tree); + n.setKSearch(ksearch); + n.compute(*normals); // Concatenate XYZ and normal information - pcl::concatenateFields (*cloud, *normals, *cloud_with_normals); + pcl::concatenateFields(*cloud, *normals, *cloud_with_normals); // Create search tree - tree2.reset (new search::KdTree); - tree2->setInputCloud (cloud_with_normals); + tree2.reset(new search::KdTree); + tree2->setInputCloud(cloud_with_normals); // Init objects pcl::MarchingCubesRBF rbf; // Set parameters - rbf.setIsoLevel (0); - rbf.setGridResolution (60, 60, 60); - rbf.setPercentageExtendGrid (0.1f); - rbf.setOffSurfaceDisplacement (0.02f); + rbf.setIsoLevel(0); + rbf.setGridResolution(60, 60, 60); + rbf.setPercentageExtendGrid(0.1f); + rbf.setOffSurfaceDisplacement(0.02f); - rbf.setInputCloud (cloud_with_normals); - rbf.setSearchMethod (tree2); + rbf.setInputCloud(cloud_with_normals); + rbf.setSearchMethod(tree2); // Reconstruct PolygonMesh mesh; - rbf.reconstruct (mesh); + rbf.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } void Reen::MarchingCubesRBF::perform(const std::vector& normals) { - if (myPoints.size() != normals.size()) + if (myPoints.size() != normals.size()) { throw Base::RuntimeError("Number of points doesn't match with number of normals"); + } - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; cloud_with_normals->reserve(myPoints.size()); std::size_t num_points = myPoints.size(); const std::vector& points = myPoints.getBasicPoints(); - for (std::size_t index=0; index& normals) } // Create search tree - tree.reset (new search::KdTree); - tree->setInputCloud (cloud_with_normals); + tree.reset(new search::KdTree); + tree->setInputCloud(cloud_with_normals); // Init objects pcl::MarchingCubesRBF rbf; // Set parameters - rbf.setIsoLevel (0); - rbf.setGridResolution (60, 60, 60); - rbf.setPercentageExtendGrid (0.1f); - rbf.setOffSurfaceDisplacement (0.02f); + rbf.setIsoLevel(0); + rbf.setGridResolution(60, 60, 60); + rbf.setPercentageExtendGrid(0.1f); + rbf.setOffSurfaceDisplacement(0.02f); - rbf.setInputCloud (cloud_with_normals); - rbf.setSearchMethod (tree); + rbf.setInputCloud(cloud_with_normals); + rbf.setSearchMethod(tree); // Reconstruct PolygonMesh mesh; - rbf.reconstruct (mesh); + rbf.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } @@ -601,74 +618,76 @@ void Reen::MarchingCubesRBF::perform(const std::vector& normals) // ---------------------------------------------------------------------------- Reen::MarchingCubesHoppe::MarchingCubesHoppe(const Points::PointKernel& pts, Mesh::MeshObject& mesh) - : myPoints(pts) - , myMesh(mesh) -{ -} + : myPoints(pts) + , myMesh(mesh) +{} void Reen::MarchingCubesHoppe::perform(int ksearch) { - PointCloud::Ptr cloud (new PointCloud); - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud(new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; search::KdTree::Ptr tree2; cloud->reserve(myPoints.size()); for (Points::PointKernel::const_iterator it = myPoints.begin(); it != myPoints.end(); ++it) { - if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) && !boost::math::isnan(it->z)) + if (!boost::math::isnan(it->x) && !boost::math::isnan(it->y) + && !boost::math::isnan(it->z)) { cloud->push_back(PointXYZ(it->x, it->y, it->z)); + } } // Create search tree - tree.reset (new search::KdTree (false)); - tree->setInputCloud (cloud); + tree.reset(new search::KdTree(false)); + tree->setInputCloud(cloud); // Normal estimation NormalEstimation n; - PointCloud::Ptr normals (new PointCloud ()); - n.setInputCloud (cloud); - //n.setIndices (indices[B); - n.setSearchMethod (tree); - n.setKSearch (ksearch); - n.compute (*normals); + PointCloud::Ptr normals(new PointCloud()); + n.setInputCloud(cloud); + // n.setIndices (indices[B); + n.setSearchMethod(tree); + n.setKSearch(ksearch); + n.compute(*normals); // Concatenate XYZ and normal information - pcl::concatenateFields (*cloud, *normals, *cloud_with_normals); + pcl::concatenateFields(*cloud, *normals, *cloud_with_normals); // Create search tree - tree2.reset (new search::KdTree); - tree2->setInputCloud (cloud_with_normals); + tree2.reset(new search::KdTree); + tree2->setInputCloud(cloud_with_normals); // Init objects pcl::MarchingCubesHoppe hoppe; // Set parameters - hoppe.setIsoLevel (0); - hoppe.setGridResolution (60, 60, 60); - hoppe.setPercentageExtendGrid (0.1f); + hoppe.setIsoLevel(0); + hoppe.setGridResolution(60, 60, 60); + hoppe.setPercentageExtendGrid(0.1f); - hoppe.setInputCloud (cloud_with_normals); - hoppe.setSearchMethod (tree2); + hoppe.setInputCloud(cloud_with_normals); + hoppe.setSearchMethod(tree2); // Reconstruct PolygonMesh mesh; - hoppe.reconstruct (mesh); + hoppe.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } void Reen::MarchingCubesHoppe::perform(const std::vector& normals) { - if (myPoints.size() != normals.size()) + if (myPoints.size() != normals.size()) { throw Base::RuntimeError("Number of points doesn't match with number of normals"); + } - PointCloud::Ptr cloud_with_normals (new PointCloud); + PointCloud::Ptr cloud_with_normals(new PointCloud); search::KdTree::Ptr tree; cloud_with_normals->reserve(myPoints.size()); std::size_t num_points = myPoints.size(); const std::vector& points = myPoints.getBasicPoints(); - for (std::size_t index=0; index& normal } // Create search tree - tree.reset (new search::KdTree); - tree->setInputCloud (cloud_with_normals); + tree.reset(new search::KdTree); + tree->setInputCloud(cloud_with_normals); // Init objects pcl::MarchingCubesHoppe hoppe; // Set parameters - hoppe.setIsoLevel (0); - hoppe.setGridResolution (60, 60, 60); - hoppe.setPercentageExtendGrid (0.1f); + hoppe.setIsoLevel(0); + hoppe.setGridResolution(60, 60, 60); + hoppe.setPercentageExtendGrid(0.1f); - hoppe.setInputCloud (cloud_with_normals); - hoppe.setSearchMethod (tree); + hoppe.setInputCloud(cloud_with_normals); + hoppe.setSearchMethod(tree); // Reconstruct PolygonMesh mesh; - hoppe.reconstruct (mesh); + hoppe.reconstruct(mesh); MeshConversion::convert(mesh, myMesh); } @@ -711,10 +730,10 @@ void Reen::MarchingCubesHoppe::perform(const std::vector& normal void MeshConversion::convert(const pcl::PolygonMesh& pclMesh, Mesh::MeshObject& meshObject) { // number of points - size_t nr_points = pclMesh.cloud.width * pclMesh.cloud.height; - size_t point_size = pclMesh.cloud.data.size () / nr_points; + size_t nr_points = pclMesh.cloud.width * pclMesh.cloud.height; + size_t point_size = pclMesh.cloud.data.size() / nr_points; // number of faces for header - size_t nr_faces = pclMesh.polygons.size (); + size_t nr_faces = pclMesh.polygons.size(); MeshCore::MeshPointArray points; points.reserve(nr_points); @@ -729,17 +748,20 @@ void MeshConversion::convert(const pcl::PolygonMesh& pclMesh, Mesh::MeshObject& int c = 0; // adding vertex if ((pclMesh.cloud.fields[d].datatype == -#if PCL_VERSION_COMPARE(>,1,6,0) - pcl::PCLPointField::FLOAT32) && +#if PCL_VERSION_COMPARE(>, 1, 6, 0) + pcl::PCLPointField::FLOAT32) + && #else - sensor_msgs::PointField::FLOAT32) && + sensor_msgs::PointField::FLOAT32) + && #endif - (pclMesh.cloud.fields[d].name == "x" || - pclMesh.cloud.fields[d].name == "y" || - pclMesh.cloud.fields[d].name == "z")) - { + (pclMesh.cloud.fields[d].name == "x" || pclMesh.cloud.fields[d].name == "y" + || pclMesh.cloud.fields[d].name == "z")) { float value; - memcpy (&value, &pclMesh.cloud.data[i * point_size + pclMesh.cloud.fields[d].offset + c * sizeof (float)], sizeof (float)); + memcpy(&value, + &pclMesh.cloud.data[i * point_size + pclMesh.cloud.fields[d].offset + + c * sizeof(float)], + sizeof(float)); vertex[xyz] = value; if (++xyz == 3) { points.push_back(vertex); @@ -763,4 +785,4 @@ void MeshConversion::convert(const pcl::PolygonMesh& pclMesh, Mesh::MeshObject& meshObject.harmonizeNormals(); } -#endif // HAVE_PCL_SURFACE +#endif // HAVE_PCL_SURFACE diff --git a/src/Mod/ReverseEngineering/App/SurfaceTriangulation.h b/src/Mod/ReverseEngineering/App/SurfaceTriangulation.h index 3041d72ab5..78f87fa108 100644 --- a/src/Mod/ReverseEngineering/App/SurfaceTriangulation.h +++ b/src/Mod/ReverseEngineering/App/SurfaceTriangulation.h @@ -28,11 +28,21 @@ #include -namespace Points {class PointKernel;} -namespace Mesh {class MeshObject;} -namespace pcl {struct PolygonMesh;} +namespace Points +{ +class PointKernel; +} +namespace Mesh +{ +class MeshObject; +} +namespace pcl +{ +struct PolygonMesh; +} -namespace Reen { +namespace Reen +{ class MeshConversion { @@ -45,27 +55,31 @@ class SurfaceTriangulation public: SurfaceTriangulation(const Points::PointKernel&, Mesh::MeshObject&); /** \brief Set the number of k nearest neighbors to use for the normal estimation. - * \param[in] k the number of k-nearest neighbors - */ + * \param[in] k the number of k-nearest neighbors + */ void perform(int ksearch); /** \brief Pass the normals to the points given in the constructor. - * \param[in] normals the normals to the given points. - */ + * \param[in] normals the normals to the given points. + */ void perform(const std::vector& normals); - /** \brief Set the multiplier of the nearest neighbor distance to obtain the final search radius for each point - * (this will make the algorithm adapt to different point densities in the cloud). - * \param[in] mu the multiplier - */ - inline void - setMu (double mu) { this->mu = mu; } + /** \brief Set the multiplier of the nearest neighbor distance to obtain the final search radius + * for each point (this will make the algorithm adapt to different point densities in the + * cloud). \param[in] mu the multiplier + */ + inline void setMu(double mu) + { + this->mu = mu; + } - /** \brief Set the sphere radius that is to be used for determining the k-nearest neighbors used for triangulating. - * \param[in] radius the sphere radius that is to contain all k-nearest neighbors - * \note This distance limits the maximum edge length! - */ - inline void - setSearchRadius (double radius) { this->searchRadius = radius; } + /** \brief Set the sphere radius that is to be used for determining the k-nearest neighbors used + * for triangulating. \param[in] radius the sphere radius that is to contain all k-nearest + * neighbors \note This distance limits the maximum edge length! + */ + inline void setSearchRadius(double radius) + { + this->searchRadius = radius; + } private: const Points::PointKernel& myPoints; @@ -79,40 +93,46 @@ class PoissonReconstruction public: PoissonReconstruction(const Points::PointKernel&, Mesh::MeshObject&); /** \brief Set the number of k nearest neighbors to use for the normal estimation. - * \param[in] k the number of k-nearest neighbors - */ - void perform(int ksearch=5); + * \param[in] k the number of k-nearest neighbors + */ + void perform(int ksearch = 5); /** \brief Pass the normals to the points given in the constructor. - * \param[in] normals the normals to the given points. - */ + * \param[in] normals the normals to the given points. + */ void perform(const std::vector& normals); /** \brief Set the maximum depth of the tree that will be used for surface reconstruction. - * \note Running at depth d corresponds to solving on a voxel grid whose resolution is no larger than - * 2^d x 2^d x 2^d. Note that since the reconstructor adapts the octree to the sampling density, the specified - * reconstruction depth is only an upper bound. - * \param[in] depth the depth parameter - */ - inline void - setDepth (int depth) { this->depth = depth; } + * \note Running at depth d corresponds to solving on a voxel grid whose resolution is no larger + * than 2^d x 2^d x 2^d. Note that since the reconstructor adapts the octree to the sampling + * density, the specified reconstruction depth is only an upper bound. \param[in] depth the + * depth parameter + */ + inline void setDepth(int depth) + { + this->depth = depth; + } - /** \brief Set the depth at which a block Gauss-Seidel solver is used to solve the Laplacian equation - * \note Using this parameter helps reduce the memory overhead at the cost of a small increase in - * reconstruction time. (In practice, we have found that for reconstructions of depth 9 or higher a subdivide - * depth of 7 or 8 can greatly reduce the memory usage.) - * \param[in] solver_divide the given parameter value - */ - inline void - setSolverDivide (int solverDivide) { this->solverDivide = solverDivide; } + /** \brief Set the depth at which a block Gauss-Seidel solver is used to solve the Laplacian + * equation \note Using this parameter helps reduce the memory overhead at the cost of a small + * increase in reconstruction time. (In practice, we have found that for reconstructions of + * depth 9 or higher a subdivide depth of 7 or 8 can greatly reduce the memory usage.) + * \param[in] solver_divide the given parameter value + */ + inline void setSolverDivide(int solverDivide) + { + this->solverDivide = solverDivide; + } - /** \brief Set the minimum number of sample points that should fall within an octree node as the octree - * construction is adapted to sampling density - * \note For noise-free samples, small values in the range [1.0 - 5.0] can be used. For more noisy samples, - * larger values in the range [15.0 - 20.0] may be needed to provide a smoother, noise-reduced, reconstruction. - * \param[in] samples_per_node the given parameter value - */ - inline void - setSamplesPerNode(float samplesPerNode) { this->samplesPerNode = samplesPerNode; } + /** \brief Set the minimum number of sample points that should fall within an octree node as the + * octree construction is adapted to sampling density \note For noise-free samples, small values + * in the range [1.0 - 5.0] can be used. For more noisy samples, larger values in the range + * [15.0 - 20.0] may be needed to provide a smoother, noise-reduced, reconstruction. \param[in] + * samples_per_node the given parameter value + */ + inline void setSamplesPerNode(float samplesPerNode) + { + this->samplesPerNode = samplesPerNode; + } private: const Points::PointKernel& myPoints; @@ -127,12 +147,12 @@ class GridReconstruction public: GridReconstruction(const Points::PointKernel&, Mesh::MeshObject&); /** \brief Set the number of k nearest neighbors to use for the normal estimation. - * \param[in] k the number of k-nearest neighbors - */ - void perform(int ksearch=5); + * \param[in] k the number of k-nearest neighbors + */ + void perform(int ksearch = 5); /** \brief Pass the normals to the points given in the constructor. - * \param[in] normals the normals to the given points. - */ + * \param[in] normals the normals to the given points. + */ void perform(const std::vector& normals); private: @@ -157,12 +177,12 @@ class MarchingCubesRBF public: MarchingCubesRBF(const Points::PointKernel&, Mesh::MeshObject&); /** \brief Set the number of k nearest neighbors to use for the normal estimation. - * \param[in] k the number of k-nearest neighbors - */ - void perform(int ksearch=5); + * \param[in] k the number of k-nearest neighbors + */ + void perform(int ksearch = 5); /** \brief Pass the normals to the points given in the constructor. - * \param[in] normals the normals to the given points. - */ + * \param[in] normals the normals to the given points. + */ void perform(const std::vector& normals); private: @@ -175,12 +195,12 @@ class MarchingCubesHoppe public: MarchingCubesHoppe(const Points::PointKernel&, Mesh::MeshObject&); /** \brief Set the number of k nearest neighbors to use for the normal estimation. - * \param[in] k the number of k-nearest neighbors - */ - void perform(int ksearch=5); + * \param[in] k the number of k-nearest neighbors + */ + void perform(int ksearch = 5); /** \brief Pass the normals to the points given in the constructor. - * \param[in] normals the normals to the given points. - */ + * \param[in] normals the normals to the given points. + */ void perform(const std::vector& normals); private: @@ -188,7 +208,6 @@ private: Mesh::MeshObject& myMesh; }; -} // namespace Reen - -#endif // REEN_SURFACETRIANGULATION_H +} // namespace Reen +#endif // REEN_SURFACETRIANGULATION_H diff --git a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp index aa4b73f7eb..f89ba6ee71 100644 --- a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp +++ b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp @@ -42,13 +42,15 @@ void loadReverseEngineeringResource() Gui::Translator::instance()->refresh(); } -namespace ReverseEngineeringGui { -class Module : public Py::ExtensionModule +namespace ReverseEngineeringGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("ReverseEngineeringGui") + Module() + : Py::ExtensionModule("ReverseEngineeringGui") { - initialize("This module is the ReverseEngineeringGui module."); // register with Python + initialize("This module is the ReverseEngineeringGui module."); // register with Python } private: @@ -59,7 +61,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace ReverseEngineeringGui +} // namespace ReverseEngineeringGui /* Python entry */ @@ -74,7 +76,7 @@ PyMOD_INIT_FUNC(ReverseEngineeringGui) try { Base::Interpreter().loadModule("MeshGui"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } @@ -86,7 +88,7 @@ PyMOD_INIT_FUNC(ReverseEngineeringGui) CreateReverseEngineeringCommands(); ReverseEngineeringGui::Workbench::init(); - // add resources and reloads the translators + // add resources and reloads the translators loadReverseEngineeringResource(); PyMOD_Return(mod); } diff --git a/src/Mod/ReverseEngineering/Gui/Command.cpp b/src/Mod/ReverseEngineering/Gui/Command.cpp index 738e8d7934..b4cacdcd97 100644 --- a/src/Mod/ReverseEngineering/Gui/Command.cpp +++ b/src/Mod/ReverseEngineering/Gui/Command.cpp @@ -22,13 +22,13 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include +#include +#include +#include #endif #include @@ -41,15 +41,15 @@ #include #include #include +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include #include "FitBSplineSurface.h" #include "Poisson.h" @@ -62,27 +62,29 @@ using namespace std; DEF_STD_CMD_A(CmdApproxSurface) CmdApproxSurface::CmdApproxSurface() - : Command("Reen_ApproxSurface") + : Command("Reen_ApproxSurface") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Approximate B-spline surface..."); - sToolTipText = QT_TR_NOOP("Approximate a B-spline surface"); - sWhatsThis = "Reen_ApproxSurface"; - sStatusTip = sToolTipText; - sPixmap = "actions/FitSurface"; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Approximate B-spline surface..."); + sToolTipText = QT_TR_NOOP("Approximate a B-spline surface"); + sWhatsThis = "Reen_ApproxSurface"; + sStatusTip = sToolTipText; + sPixmap = "actions/FitSurface"; } void CmdApproxSurface::activated(int) { App::DocumentObjectT objT; - std::vector obj = Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId()); - if (obj.size() != 1 || !(obj.at(0)->isDerivedFrom(Points::Feature::getClassTypeId()) || - obj.at(0)->isDerivedFrom(Mesh::Feature::getClassTypeId()))) { - QMessageBox::warning(Gui::getMainWindow(), + std::vector obj = + Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId()); + if (obj.size() != 1 + || !(obj.at(0)->isDerivedFrom(Points::Feature::getClassTypeId()) + || obj.at(0)->isDerivedFrom(Mesh::Feature::getClassTypeId()))) { + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("Reen_ApproxSurface", "Wrong selection"), - qApp->translate("Reen_ApproxSurface", "Please select a point cloud or mesh.") - ); + qApp->translate("Reen_ApproxSurface", "Please select a point cloud or mesh.")); return; } @@ -98,14 +100,14 @@ bool CmdApproxSurface::isActive() DEF_STD_CMD_A(CmdApproxPlane) CmdApproxPlane::CmdApproxPlane() - : Command("Reen_ApproxPlane") + : Command("Reen_ApproxPlane") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Plane..."); - sToolTipText = QT_TR_NOOP("Approximate a plane"); - sWhatsThis = "Reen_ApproxPlane"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Plane..."); + sToolTipText = QT_TR_NOOP("Approximate a plane"); + sWhatsThis = "Reen_ApproxPlane"; + sStatusTip = sToolTipText; } void CmdApproxPlane::activated(int) @@ -119,26 +121,29 @@ void CmdApproxPlane::activated(int) it->getPropertyList(List); for (const auto& jt : List) { if (jt->getTypeId().isDerivedFrom(App::PropertyComplexGeoData::getClassTypeId())) { - const Data::ComplexGeoData* data = static_cast(jt)->getComplexData(); + const Data::ComplexGeoData* data = + static_cast(jt)->getComplexData(); if (data) { data->getPoints(aPoints, aNormals, 0.01f); - if (!aPoints.empty()) + if (!aPoints.empty()) { break; + } } } } if (!aPoints.empty()) { // get a reference normal for the plane fit - Base::Vector3f refNormal(0,0,0); + Base::Vector3f refNormal(0, 0, 0); if (!aNormals.empty()) { refNormal = Base::convertTo(aNormals.front()); } std::vector aData; aData.reserve(aPoints.size()); - for (const auto& jt : aPoints) + for (const auto& jt : aPoints) { aData.push_back(Base::toVector(jt)); + } MeshCore::PlaneFit fit; fit.AddPoints(aData); float sigma = fit.Fit(); @@ -168,7 +173,9 @@ void CmdApproxPlane::activated(int) double q0, q1, q2, q3; pm.getRotation().getValue(q0, q1, q2, q3); - Base::Console().Log("RMS value for plane fit with %lu points: %.4f\n", aData.size(), sigma); + Base::Console().Log("RMS value for plane fit with %lu points: %.4f\n", + aData.size(), + sigma); Base::Console().Log(" Plane base(%.4f, %.4f, %.4f)\n", base.x, base.y, base.z); Base::Console().Log(" Plane normal(%.4f, %.4f, %.4f)\n", norm.x, norm.y, norm.z); @@ -179,7 +186,8 @@ void CmdApproxPlane::activated(int) str << "App.ActiveDocument.ActiveObject.Width = " << width << std::endl; str << "App.ActiveDocument.ActiveObject.Placement = Base.Placement(" << "Base.Vector(" << base.x << "," << base.y << "," << base.z << ")," - << "Base.Rotation(" << q0 << "," << q1 << "," << q2 << "," << q3 << "))" << std::endl; + << "Base.Rotation(" << q0 << "," << q1 << "," << q2 << "," << q3 << "))" + << std::endl; openCommand(QT_TRANSLATE_NOOP("Command", "Fit plane")); runCommand(Gui::Command::Doc, str.str().c_str()); @@ -191,22 +199,23 @@ void CmdApproxPlane::activated(int) bool CmdApproxPlane::isActive() { - if (getSelection().countObjectsOfType(App::GeoFeature::getClassTypeId()) == 1) + if (getSelection().countObjectsOfType(App::GeoFeature::getClassTypeId()) == 1) { return true; + } return false; } DEF_STD_CMD_A(CmdApproxCylinder) CmdApproxCylinder::CmdApproxCylinder() - : Command("Reen_ApproxCylinder") + : Command("Reen_ApproxCylinder") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Cylinder"); - sToolTipText = QT_TR_NOOP("Approximate a cylinder"); - sWhatsThis = "Reen_ApproxCylinder"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Cylinder"); + sToolTipText = QT_TR_NOOP("Approximate a cylinder"); + sWhatsThis = "Reen_ApproxCylinder"; + sStatusTip = sToolTipText; } void CmdApproxCylinder::activated(int) @@ -235,7 +244,7 @@ void CmdApproxCylinder::activated(int) float height = Base::Distance(base, top); Base::Rotation rot; - rot.setValue(Base::Vector3d(0,0,1), Base::convertTo(fit.GetAxis())); + rot.setValue(Base::Vector3d(0, 0, 1), Base::convertTo(fit.GetAxis())); double q0, q1, q2, q3; rot.getValue(q0, q1, q2, q3); @@ -246,7 +255,8 @@ void CmdApproxCylinder::activated(int) str << "App.ActiveDocument.ActiveObject.Height = " << height << std::endl; str << "App.ActiveDocument.ActiveObject.Placement = Base.Placement(" << "Base.Vector(" << base.x << "," << base.y << "," << base.z << ")," - << "Base.Rotation(" << q0 << "," << q1 << "," << q2 << "," << q3 << "))" << std::endl; + << "Base.Rotation(" << q0 << "," << q1 << "," << q2 << "," << q3 << "))" + << std::endl; runCommand(Gui::Command::Doc, str.str().c_str()); } @@ -257,22 +267,23 @@ void CmdApproxCylinder::activated(int) bool CmdApproxCylinder::isActive() { - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) { return true; + } return false; } DEF_STD_CMD_A(CmdApproxSphere) CmdApproxSphere::CmdApproxSphere() - : Command("Reen_ApproxSphere") + : Command("Reen_ApproxSphere") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Sphere"); - sToolTipText = QT_TR_NOOP("Approximate a sphere"); - sWhatsThis = "Reen_ApproxSphere"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Sphere"); + sToolTipText = QT_TR_NOOP("Approximate a sphere"); + sWhatsThis = "Reen_ApproxSphere"; + sStatusTip = sToolTipText; } void CmdApproxSphere::activated(int) @@ -304,22 +315,23 @@ void CmdApproxSphere::activated(int) bool CmdApproxSphere::isActive() { - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) { return true; + } return false; } DEF_STD_CMD_A(CmdApproxPolynomial) CmdApproxPolynomial::CmdApproxPolynomial() - : Command("Reen_ApproxPolynomial") + : Command("Reen_ApproxPolynomial") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Polynomial surface"); - sToolTipText = QT_TR_NOOP("Approximate a polynomial surface"); - sWhatsThis = "Reen_ApproxPolynomial"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Polynomial surface"); + sToolTipText = QT_TR_NOOP("Approximate a polynomial surface"); + sWhatsThis = "Reen_ApproxPolynomial"; + sStatusTip = sToolTipText; } void CmdApproxPolynomial::activated(int) @@ -334,7 +346,8 @@ void CmdApproxPolynomial::activated(int) fit.AddPoints(kernel.GetPoints()); if (fit.Fit() < FLOAT_MAX) { Base::BoundBox3f bbox = fit.GetBoundings(); - std::vector poles = fit.toBezier(bbox.MinX, bbox.MaxX, bbox.MinY, bbox.MaxY); + std::vector poles = + fit.toBezier(bbox.MinX, bbox.MaxX, bbox.MinY, bbox.MaxY); fit.Transform(poles); TColgp_Array2OfPnt grid(1, 3, 1, 3); @@ -349,7 +362,8 @@ void CmdApproxPolynomial::activated(int) grid.SetValue(3, 3, Base::convertTo(poles.at(8))); Handle(Geom_BezierSurface) bezier(new Geom_BezierSurface(grid)); - Part::Feature* part = static_cast(doc->addObject("Part::Spline", "Bezier")); + Part::Feature* part = + static_cast(doc->addObject("Part::Spline", "Bezier")); part->Shape.setValue(Part::GeomBezierSurface(bezier).toShape()); } } @@ -359,22 +373,23 @@ void CmdApproxPolynomial::activated(int) bool CmdApproxPolynomial::isActive() { - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) { return true; + } return false; } DEF_STD_CMD_A(CmdSegmentation) CmdSegmentation::CmdSegmentation() - : Command("Reen_Segmentation") + : Command("Reen_Segmentation") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Mesh segmentation..."); - sToolTipText = QT_TR_NOOP("Create mesh segments"); - sWhatsThis = "Reen_Segmentation"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Mesh segmentation..."); + sToolTipText = QT_TR_NOOP("Create mesh segments"); + sWhatsThis = "Reen_Segmentation"; + sStatusTip = sToolTipText; } void CmdSegmentation::activated(int) @@ -390,23 +405,23 @@ void CmdSegmentation::activated(int) bool CmdSegmentation::isActive() { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; - return Gui::Selection().countObjectsOfType - (Mesh::Feature::getClassTypeId()) == 1; + } + return Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 1; } DEF_STD_CMD_A(CmdSegmentationManual) CmdSegmentationManual::CmdSegmentationManual() - : Command("Reen_SegmentationManual") + : Command("Reen_SegmentationManual") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Manual segmentation..."); - sToolTipText = QT_TR_NOOP("Create mesh segments manually"); - sWhatsThis = "Reen_SegmentationManual"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Manual segmentation..."); + sToolTipText = QT_TR_NOOP("Create mesh segments manually"); + sWhatsThis = "Reen_SegmentationManual"; + sStatusTip = sToolTipText; } void CmdSegmentationManual::activated(int) @@ -420,22 +435,23 @@ void CmdSegmentationManual::activated(int) bool CmdSegmentationManual::isActive() { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; + } return hasActiveDocument(); } DEF_STD_CMD_A(CmdSegmentationFromComponents) CmdSegmentationFromComponents::CmdSegmentationFromComponents() - : Command("Reen_SegmentationFromComponents") + : Command("Reen_SegmentationFromComponents") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("From components"); - sToolTipText = QT_TR_NOOP("Create mesh segments from components"); - sWhatsThis = "Reen_SegmentationFromComponents"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("From components"); + sToolTipText = QT_TR_NOOP("Create mesh segments from components"); + sWhatsThis = "Reen_SegmentationFromComponents"; + sStatusTip = sToolTipText; } void CmdSegmentationFromComponents::activated(int) @@ -447,17 +463,18 @@ void CmdSegmentationFromComponents::activated(int) for (auto it : sel) { std::string internalname = "Segments_"; internalname += it->getNameInDocument(); - App::DocumentObjectGroup* group = static_cast(doc->addObject - ("App::DocumentObjectGroup", internalname.c_str())); + App::DocumentObjectGroup* group = static_cast( + doc->addObject("App::DocumentObjectGroup", internalname.c_str())); std::string labelname = "Segments "; labelname += it->Label.getValue(); group->Label.setValue(labelname); const Mesh::MeshObject& mesh = it->Mesh.getValue(); - std::vector > comps = mesh.getComponents(); + std::vector> comps = mesh.getComponents(); for (const auto& jt : comps) { std::unique_ptr segment(mesh.meshFromSegment(jt)); - Mesh::Feature* feaSegm = static_cast(group->addObject("Mesh::Feature", "Segment")); + Mesh::Feature* feaSegm = + static_cast(group->addObject("Mesh::Feature", "Segment")); Mesh::MeshObject* feaMesh = feaSegm->Mesh.startEditing(); feaMesh->swap(*segment); feaSegm->Mesh.finishEditing(); @@ -470,22 +487,23 @@ void CmdSegmentationFromComponents::activated(int) bool CmdSegmentationFromComponents::isActive() { - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) { return true; + } return false; } DEF_STD_CMD_A(CmdMeshBoundary) CmdMeshBoundary::CmdMeshBoundary() - : Command("Reen_MeshBoundary") + : Command("Reen_MeshBoundary") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Wire from mesh boundary..."); - sToolTipText = QT_TR_NOOP("Create wire from mesh boundaries"); - sWhatsThis = "Reen_Segmentation"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Wire from mesh boundary..."); + sToolTipText = QT_TR_NOOP("Create wire from mesh boundaries"); + sWhatsThis = "Reen_Segmentation"; + sStatusTip = sToolTipText; } void CmdMeshBoundary::activated(int) @@ -495,7 +513,7 @@ void CmdMeshBoundary::activated(int) document->openTransaction("Wire from mesh"); for (auto it : objs) { const Mesh::MeshObject& mesh = it->Mesh.getValue(); - std::list > bounds; + std::list> bounds; MeshCore::MeshAlgorithm algo(mesh.getKernel()); algo.GetMeshBorders(bounds); @@ -509,7 +527,7 @@ void CmdMeshBoundary::activated(int) for (const auto& bt : bounds) { BRepBuilderAPI_MakePolygon mkPoly; for (auto it = bt.rbegin(); it != bt.rend(); ++it) { - mkPoly.Add(gp_Pnt(it->x,it->y,it->z)); + mkPoly.Add(gp_Pnt(it->x, it->y, it->z)); } if (mkPoly.IsDone()) { builder.Add(compound, mkPoly.Wire()); @@ -524,11 +542,13 @@ void CmdMeshBoundary::activated(int) } if (!shape.IsNull()) { - Part::Feature* shapeFea = static_cast(document->addObject("Part::Feature", "Face from mesh")); + Part::Feature* shapeFea = + static_cast(document->addObject("Part::Feature", "Face from mesh")); shapeFea->Shape.setValue(shape); } else { - Part::Feature* shapeFea = static_cast(document->addObject("Part::Feature", "Wire from mesh")); + Part::Feature* shapeFea = + static_cast(document->addObject("Part::Feature", "Wire from mesh")); shapeFea->Shape.setValue(compound); } } @@ -537,32 +557,32 @@ void CmdMeshBoundary::activated(int) bool CmdMeshBoundary::isActive() { - return Gui::Selection().countObjectsOfType - (Mesh::Feature::getClassTypeId()) > 0; + return Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0; } DEF_STD_CMD_A(CmdPoissonReconstruction) CmdPoissonReconstruction::CmdPoissonReconstruction() - : Command("Reen_PoissonReconstruction") + : Command("Reen_PoissonReconstruction") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Poisson..."); - sToolTipText = QT_TR_NOOP("Poisson surface reconstruction"); - sWhatsThis = "Reen_PoissonReconstruction"; - sStatusTip = sToolTipText; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Poisson..."); + sToolTipText = QT_TR_NOOP("Poisson surface reconstruction"); + sWhatsThis = "Reen_PoissonReconstruction"; + sStatusTip = sToolTipText; } void CmdPoissonReconstruction::activated(int) { App::DocumentObjectT objT; - std::vector obj = Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); + std::vector obj = + Gui::Selection().getObjectsOfType(Points::Feature::getClassTypeId()); if (obj.size() != 1) { - QMessageBox::warning(Gui::getMainWindow(), + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("Reen_ApproxSurface", "Wrong selection"), - qApp->translate("Reen_ApproxSurface", "Please select a single point cloud.") - ); + qApp->translate("Reen_ApproxSurface", "Please select a single point cloud.")); return; } @@ -578,33 +598,34 @@ bool CmdPoissonReconstruction::isActive() DEF_STD_CMD_A(CmdViewTriangulation) CmdViewTriangulation::CmdViewTriangulation() - : Command("Reen_ViewTriangulation") + : Command("Reen_ViewTriangulation") { - sAppModule = "Reen"; - sGroup = QT_TR_NOOP("Reverse Engineering"); - sMenuText = QT_TR_NOOP("Structured point clouds"); - sToolTipText = QT_TR_NOOP("Triangulation of structured point clouds"); - sStatusTip = QT_TR_NOOP("Triangulation of structured point clouds"); - sWhatsThis = "Reen_ViewTriangulation"; + sAppModule = "Reen"; + sGroup = QT_TR_NOOP("Reverse Engineering"); + sMenuText = QT_TR_NOOP("Structured point clouds"); + sToolTipText = QT_TR_NOOP("Triangulation of structured point clouds"); + sStatusTip = QT_TR_NOOP("Triangulation of structured point clouds"); + sWhatsThis = "Reen_ViewTriangulation"; } void CmdViewTriangulation::activated(int) { - std::vector obj = Gui::Selection().getObjectsOfType(Points::Structured::getClassTypeId()); - addModule(App,"ReverseEngineering"); + std::vector obj = + Gui::Selection().getObjectsOfType(Points::Structured::getClassTypeId()); + addModule(App, "ReverseEngineering"); openCommand(QT_TRANSLATE_NOOP("Command", "View triangulation")); try { - for (const auto & it : obj) { + for (const auto& it : obj) { App::DocumentObjectT objT(it); QString document = QString::fromStdString(objT.getDocumentPython()); QString object = QString::fromStdString(objT.getObjectPython()); - QString command = QString::fromLatin1("%1.addObject('Mesh::Feature', 'View mesh').Mesh = ReverseEngineering.viewTriangulation(" - "Points=%2.Points," - "Width=%2.Width," - "Height=%2.Height)" - ) - .arg(document, object); + QString command = QString::fromLatin1("%1.addObject('Mesh::Feature', 'View mesh').Mesh " + "= ReverseEngineering.viewTriangulation(" + "Points=%2.Points," + "Width=%2.Width," + "Height=%2.Height)") + .arg(document, object); runCommand(Doc, command.toLatin1()); } @@ -614,20 +635,19 @@ void CmdViewTriangulation::activated(int) catch (const Base::Exception& e) { abortCommand(); QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("Reen_ViewTriangulation", "View triangulation failed"), - QString::fromLatin1(e.what()) - ); + qApp->translate("Reen_ViewTriangulation", "View triangulation failed"), + QString::fromLatin1(e.what())); } } bool CmdViewTriangulation::isActive() { - return (Gui::Selection().countObjectsOfType(Points::Structured::getClassTypeId()) > 0); + return (Gui::Selection().countObjectsOfType(Points::Structured::getClassTypeId()) > 0); } void CreateReverseEngineeringCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdApproxSurface()); rcCmdMgr.addCommand(new CmdApproxPlane()); rcCmdMgr.addCommand(new CmdApproxCylinder()); diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp index 99e09e5dbe..37a9b3ffed 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -37,8 +37,8 @@ #include #include -#include "ui_FitBSplineSurface.h" #include "FitBSplineSurface.h" +#include "ui_FitBSplineSurface.h" using namespace ReenGui; @@ -55,12 +55,14 @@ public: /* TRANSLATOR ReenGui::FitBSplineSurfaceWidget */ FitBSplineSurfaceWidget::FitBSplineSurfaceWidget(const App::DocumentObjectT& obj, QWidget* parent) - : d(new Private()) + : d(new Private()) { Q_UNUSED(parent); d->ui.setupUi(this); - connect(d->ui.makePlacement, &QPushButton::clicked, - this, &FitBSplineSurfaceWidget::onMakePlacementClicked); + connect(d->ui.makePlacement, + &QPushButton::clicked, + this, + &FitBSplineSurfaceWidget::onMakePlacementClicked); d->obj = obj; restoreSettings(); } @@ -112,9 +114,12 @@ void FitBSplineSurfaceWidget::onMakePlacementClicked() geom->getComplexData()->getPoints(points, normals, 0.001); std::vector data; - std::transform(points.begin(), points.end(), std::back_inserter(data), [](const Base::Vector3d& v) { - return Base::convertTo(v); - }); + std::transform(points.begin(), + points.end(), + std::back_inserter(data), + [](const Base::Vector3d& v) { + return Base::convertTo(v); + }); MeshCore::PlaneFit fit; fit.AddPoints(data); if (fit.Fit() < FLOAT_MAX) { @@ -130,20 +135,21 @@ void FitBSplineSurfaceWidget::onMakePlacementClicked() double q0, q1, q2, q3; pm.getRotation().getValue(q0, q1, q2, q3); - QString argument = QString::fromLatin1("Base.Placement(Base.Vector(%1, %2, %3), Base.Rotation(%4, %5, %6, %7))") - .arg(base.x) - .arg(base.y) - .arg(base.z) - .arg(q0) - .arg(q1) - .arg(q2) - .arg(q3); + QString argument = QString::fromLatin1("Base.Placement(Base.Vector(%1, %2, " + "%3), Base.Rotation(%4, %5, %6, %7))") + .arg(base.x) + .arg(base.y) + .arg(base.z) + .arg(q0) + .arg(q1) + .arg(q2) + .arg(q3); QString document = QString::fromStdString(d->obj.getDocumentPython()); QString command = QString::fromLatin1( - R"(%1.addObject("App::Placement", "Placement").Placement = %2)" - ).arg(document, argument); + R"(%1.addObject("App::Placement", "Placement").Placement = %2)") + .arg(document, argument); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Placement")); Gui::Command::runCommand(Gui::Command::Doc, "from FreeCAD import Base"); @@ -166,54 +172,59 @@ bool FitBSplineSurfaceWidget::accept() QString document = QString::fromStdString(d->obj.getDocumentPython()); QString object = QString::fromStdString(d->obj.getObjectPython()); - QString argument = QString::fromLatin1( - "Points=getattr(%1, %1.getPropertyNameOfGeometry()), " - "UDegree=%2, VDegree=%3, " - "NbUPoles=%4, NbVPoles=%5, " - "Smooth=%6, " - "Weight=%7, " - "Grad=%8, " - "Bend=%9, " - "Curv=%10, " - "Iterations=%11, " - "PatchFactor=%12, " - "Correction=True" - ) - .arg(object) - .arg(d->ui.degreeU->value()) - .arg(d->ui.degreeV->value()) - .arg(d->ui.polesU->value()) - .arg(d->ui.polesV->value()) - .arg(d->ui.groupBoxSmooth->isChecked() ? QLatin1String("True") : QLatin1String("False")) - .arg(d->ui.totalWeight->value()) - .arg(d->ui.gradient->value()) - .arg(d->ui.bending->value()) - .arg(d->ui.curvature->value()) - .arg(d->ui.iterations->value()) - .arg(d->ui.sizeFactor->value()) - ; + QString argument = + QString::fromLatin1("Points=getattr(%1, %1.getPropertyNameOfGeometry()), " + "UDegree=%2, VDegree=%3, " + "NbUPoles=%4, NbVPoles=%5, " + "Smooth=%6, " + "Weight=%7, " + "Grad=%8, " + "Bend=%9, " + "Curv=%10, " + "Iterations=%11, " + "PatchFactor=%12, " + "Correction=True") + .arg(object) + .arg(d->ui.degreeU->value()) + .arg(d->ui.degreeV->value()) + .arg(d->ui.polesU->value()) + .arg(d->ui.polesV->value()) + .arg(d->ui.groupBoxSmooth->isChecked() ? QLatin1String("True") + : QLatin1String("False")) + .arg(d->ui.totalWeight->value()) + .arg(d->ui.gradient->value()) + .arg(d->ui.bending->value()) + .arg(d->ui.curvature->value()) + .arg(d->ui.iterations->value()) + .arg(d->ui.sizeFactor->value()); if (d->ui.uvdir->isChecked()) { - std::vector selection = Gui::Selection().getObjectsOfType(); + std::vector selection = + Gui::Selection().getObjectsOfType(); if (selection.size() != 1) { - QMessageBox::warning(this, + QMessageBox::warning( + this, tr("Wrong selection"), - tr("Please select a single placement object to get local orientation.") - ); + tr("Please select a single placement object to get local orientation.")); return false; } Base::Rotation rot = selection.front()->GeoFeature::Placement.getValue().getRotation(); - Base::Vector3d u(1,0,0); - Base::Vector3d v(0,1,0); + Base::Vector3d u(1, 0, 0); + Base::Vector3d v(0, 1, 0); rot.multVec(u, u); rot.multVec(v, v); - argument += QString::fromLatin1(", UVDirs=(FreeCAD.Vector(%1,%2,%3), FreeCAD.Vector(%4,%5,%6))") - .arg(u.x).arg(u.y).arg(u.z).arg(v.x).arg(v.y).arg(v.z); + argument += + QString::fromLatin1(", UVDirs=(FreeCAD.Vector(%1,%2,%3), FreeCAD.Vector(%4,%5,%6))") + .arg(u.x) + .arg(u.y) + .arg(u.z) + .arg(v.x) + .arg(v.y) + .arg(v.z); } QString command = QString::fromLatin1("%1.addObject(\"Part::Spline\", \"Spline\").Shape = " - "ReverseEngineering.approxSurface(%2).toShape()") - .arg(document, argument) - ; + "ReverseEngineering.approxSurface(%2).toShape()") + .arg(document, argument); Gui::WaitCursor wc; Gui::Command::addModule(Gui::Command::App, "ReverseEngineering"); @@ -231,7 +242,7 @@ bool FitBSplineSurfaceWidget::accept() return true; } -void FitBSplineSurfaceWidget::changeEvent(QEvent *e) +void FitBSplineSurfaceWidget::changeEvent(QEvent* e) { QWidget::changeEvent(e); if (e->type() == QEvent::LanguageChange) { @@ -245,16 +256,16 @@ void FitBSplineSurfaceWidget::changeEvent(QEvent *e) TaskFitBSplineSurface::TaskFitBSplineSurface(const App::DocumentObjectT& obj) { widget = new FitBSplineSurfaceWidget(obj); - taskbox = new Gui::TaskView::TaskBox( - Gui::BitmapFactory().pixmap("actions/FitSurface"), - widget->windowTitle(), true, nullptr); + taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/FitSurface"), + widget->windowTitle(), + true, + nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } void TaskFitBSplineSurface::open() -{ -} +{} bool TaskFitBSplineSurface::accept() { diff --git a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.h b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.h index a7005acdcd..48e8900768 100644 --- a/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.h +++ b/src/Mod/ReverseEngineering/Gui/FitBSplineSurface.h @@ -27,9 +27,10 @@ #include -namespace ReenGui { +namespace ReenGui +{ -class FitBSplineSurfaceWidget : public QWidget +class FitBSplineSurfaceWidget: public QWidget { Q_OBJECT @@ -42,7 +43,7 @@ public: private: void restoreSettings(); void saveSettings(); - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: void onMakePlacementClicked(); @@ -52,7 +53,7 @@ private: Private* d; }; -class TaskFitBSplineSurface : public Gui::TaskView::TaskDialog +class TaskFitBSplineSurface: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -64,13 +65,15 @@ public: bool accept() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: FitBSplineSurfaceWidget* widget; Gui::TaskView::TaskBox* taskbox; }; -} //namespace ReenGui +} // namespace ReenGui -#endif // REENGUI_FITBSPLINESURFACE_H +#endif // REENGUI_FITBSPLINESURFACE_H diff --git a/src/Mod/ReverseEngineering/Gui/Poisson.cpp b/src/Mod/ReverseEngineering/Gui/Poisson.cpp index ac8f565561..b845bd6dad 100644 --- a/src/Mod/ReverseEngineering/Gui/Poisson.cpp +++ b/src/Mod/ReverseEngineering/Gui/Poisson.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -30,8 +30,8 @@ #include #include -#include "ui_Poisson.h" #include "Poisson.h" +#include "ui_Poisson.h" using namespace ReenGui; @@ -48,7 +48,7 @@ public: /* TRANSLATOR ReenGui::PoissonWidget */ PoissonWidget::PoissonWidget(const App::DocumentObjectT& obj, QWidget* parent) - : d(new Private()) + : d(new Private()) { Q_UNUSED(parent); d->ui.setupUi(this); @@ -66,21 +66,17 @@ bool PoissonWidget::accept() QString document = QString::fromStdString(d->obj.getDocumentPython()); QString object = QString::fromStdString(d->obj.getObjectPython()); - QString argument = QString::fromLatin1( - "Points=%1.Points, " - "OctreeDepth=%2, " - "SolverDivide=%3, " - "SamplesPerNode=%4" - ) - .arg(object) - .arg(d->ui.octreeDepth->value()) - .arg(d->ui.solverDivide->value()) - .arg(d->ui.samplesPerNode->value()) - ; + QString argument = QString::fromLatin1("Points=%1.Points, " + "OctreeDepth=%2, " + "SolverDivide=%3, " + "SamplesPerNode=%4") + .arg(object) + .arg(d->ui.octreeDepth->value()) + .arg(d->ui.solverDivide->value()) + .arg(d->ui.samplesPerNode->value()); QString command = QString::fromLatin1("%1.addObject(\"Mesh::Feature\", \"Poisson\").Mesh = " - "ReverseEngineering.poissonReconstruction(%2)") - .arg(document, argument) - ; + "ReverseEngineering.poissonReconstruction(%2)") + .arg(document, argument); Gui::WaitCursor wc; Gui::Command::addModule(Gui::Command::App, "ReverseEngineering"); @@ -98,7 +94,7 @@ bool PoissonWidget::accept() return true; } -void PoissonWidget::changeEvent(QEvent *e) +void PoissonWidget::changeEvent(QEvent* e) { QWidget::changeEvent(e); if (e->type() == QEvent::LanguageChange) { @@ -112,9 +108,10 @@ void PoissonWidget::changeEvent(QEvent *e) TaskPoisson::TaskPoisson(const App::DocumentObjectT& obj) { widget = new PoissonWidget(obj); - taskbox = new Gui::TaskView::TaskBox( - Gui::BitmapFactory().pixmap("actions/FitSurface"), - widget->windowTitle(), true, nullptr); + taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/FitSurface"), + widget->windowTitle(), + true, + nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } @@ -122,8 +119,7 @@ TaskPoisson::TaskPoisson(const App::DocumentObjectT& obj) TaskPoisson::~TaskPoisson() = default; void TaskPoisson::open() -{ -} +{} bool TaskPoisson::accept() { diff --git a/src/Mod/ReverseEngineering/Gui/Poisson.h b/src/Mod/ReverseEngineering/Gui/Poisson.h index 392e765ee1..2ff6472dda 100644 --- a/src/Mod/ReverseEngineering/Gui/Poisson.h +++ b/src/Mod/ReverseEngineering/Gui/Poisson.h @@ -27,9 +27,10 @@ #include -namespace ReenGui { +namespace ReenGui +{ -class PoissonWidget : public QWidget +class PoissonWidget: public QWidget { Q_OBJECT @@ -40,14 +41,14 @@ public: bool accept(); private: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: class Private; Private* d; }; -class TaskPoisson : public Gui::TaskView::TaskDialog +class TaskPoisson: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -60,13 +61,15 @@ public: bool accept() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: PoissonWidget* widget; Gui::TaskView::TaskBox* taskbox; }; -} //namespace ReenGui +} // namespace ReenGui -#endif // REENGUI_POISSON_H +#endif // REENGUI_POISSON_H diff --git a/src/Mod/ReverseEngineering/Gui/PreCompiled.h b/src/Mod/ReverseEngineering/Gui/PreCompiled.h index a499a96b1d..8711639d49 100644 --- a/src/Mod/ReverseEngineering/Gui/PreCompiled.h +++ b/src/Mod/ReverseEngineering/Gui/PreCompiled.h @@ -26,11 +26,11 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4181) -# pragma warning(disable : 4267) -# pragma warning(disable : 4275) -# pragma warning(disable : 4305) -# pragma warning(disable : 4522) +#pragma warning(disable : 4181) +#pragma warning(disable : 4267) +#pragma warning(disable : 4275) +#pragma warning(disable : 4305) +#pragma warning(disable : 4522) #endif #ifdef _PreComp_ @@ -40,10 +40,10 @@ #include // OpenCasCade -#include #include -#include +#include #include +#include #include #include #include @@ -53,6 +53,6 @@ #include #include -#endif //_PreComp_ +#endif //_PreComp_ -#endif // __PRECOMPILED_GUI__ +#endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering.ts index 4199c3cd6a..799b991de6 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering - + Cylinder - + Approximate a cylinder @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering - + Plane... - + Approximate a plane @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering - + Polynomial surface - + Approximate a polynomial surface @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering - + Sphere - + Approximate a sphere @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering - + Wire from mesh boundary... - + Create wire from mesh boundaries @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering - + Poisson... - + Poisson surface reconstruction @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering - + Mesh segmentation... - + Create mesh segments @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering - + From components - + Create mesh segments from components @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering - + Manual segmentation... - + Create mesh segments manually @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering - + Structured point clouds - - + + Triangulation of structured point clouds @@ -203,47 +203,47 @@ Command - + Fit plane - + Fit cylinder - + Fit sphere - + Fit polynomial surface - + View triangulation - + Placement - + Fit B-Spline - + Poisson reconstruction - + Segmentation @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error - + Wrong selection - + Please select a single placement object to get local orientation. @@ -375,7 +375,7 @@ - + Input error @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection - + Please select a point cloud or mesh. - + Please select a single point cloud. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_be.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_be.ts index 0be901b024..73480b3ec2 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_be.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_be.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Зваротны інжынірынг - + Cylinder Цыліндр - + Approximate a cylinder Прыблізна цыліндр @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Зваротны інжынірынг - + Plane... Плоскасць... - + Approximate a plane Прыблізна плоскасць @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Зваротны інжынірынг - + Polynomial surface Паліномная паверхня - + Approximate a polynomial surface Прыблізна паліномная паверхня @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Зваротны інжынірынг - + Sphere Сфера - + Approximate a sphere Прыблізна сфера @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Зваротны інжынірынг - + Wire from mesh boundary... Ломаная лінія з мяжы паліганальнай сеткі... - + Create wire from mesh boundaries Стварыць ломаную лінія з мяжы паліганальнай сеткі @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Зваротны інжынірынг - + Poisson... Размеркаванне Пуасона... - + Poisson surface reconstruction Рэканструкцыя паверхні Пуансона @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Зваротны інжынірынг - + Mesh segmentation... Сегментацыя паліганальнай сеткі... - + Create mesh segments Стварыць адрэзкі паліганальнай сеткі @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Зваротны інжынірынг - + From components З кампанентаў - + Create mesh segments from components Стварыць сегменты паліганальнай сеткі з кампанентаў @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Зваротны інжынірынг - + Manual segmentation... Ручная сегментацыя... - + Create mesh segments manually Стварыць сегменты паліганальнай сеткі ўручную @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Зваротны інжынірынг - + Structured point clouds Воблакі структураваных кропак - - + + Triangulation of structured point clouds Трыянгуляцыя воблакаў структураваных кропак @@ -203,47 +203,47 @@ Command - + Fit plane Запоўніць плоскасць - + Fit cylinder Запоўніць цыліндр - + Fit sphere Запоўніць сферу - + Fit polynomial surface Запоўніць паліномную паверхню - + View triangulation Выгляд трыянгуляцыі - + Placement Размясціць - + Fit B-Spline Запоўніць B-сплайн - + Poisson reconstruction Рэканструкцыя Пуансона - + Segmentation Сегментацыя @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Памылка ўводу - + Wrong selection Няправільны выбар - + Please select a single placement object to get local orientation. Калі ласка, абярыце адзін аб'ект размяшчэння, каб атрымаць лакальную арыентацыю. @@ -375,7 +375,7 @@ Узораў на вузел
- + Input error Памылка ўводу @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Няправільны выбар - + Please select a point cloud or mesh. Калі ласка, абярыце воблака кропак ці паліганальную сетку. - + Please select a single point cloud. Калі ласка, абярыце адно воблака кропак. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Прагляд трыянгуляцыі не атрымаўся @@ -500,7 +500,7 @@ Plane - Плоскасьць + Плоскасць @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Стварыць diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ca.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ca.ts index cabec838df..48f2244920 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ca.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ca.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Enginyeria Inversa - + Cylinder Cilindre - + Approximate a cylinder Aproxima un cilindre @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Enginyeria Inversa - + Plane... Pla... - + Approximate a plane Aproximar-se a un pla @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Enginyeria Inversa - + Polynomial surface Superfície polinomial - + Approximate a polynomial surface Aproxima una superfície polinomial @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Enginyeria Inversa - + Sphere Esfera - + Approximate a sphere Aproxima una esfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Enginyeria Inversa - + Wire from mesh boundary... Filferro des del límit de la malla... - + Create wire from mesh boundaries Crea un filferro des dels límits de la malla @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Enginyeria Inversa - + Poisson... Poisson... - + Poisson surface reconstruction Reconstrucció de superfícies de Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Enginyeria Inversa - + Mesh segmentation... Segmentació de la malla... - + Create mesh segments Crea segments de malla @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Enginyeria Inversa - + From components Des dels components - + Create mesh segments from components Crea segments de malla a partir dels components @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Enginyeria Inversa - + Manual segmentation... Segmentació manual... - + Create mesh segments manually Crea segments de malla manualment @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Enginyeria Inversa - + Structured point clouds Núvols de punts estructurat - - + + Triangulation of structured point clouds Triangulació de núvols de punts estructurat @@ -203,47 +203,47 @@ Command - + Fit plane Ajustar pla - + Fit cylinder Ajustar cilindre - + Fit sphere Ajustar esfera - + Fit polynomial surface Ajustar superfície polinomial - + View triangulation Visualitza la triangulació - + Placement Posició - + Fit B-Spline Ajustar B-Spline - + Poisson reconstruction Reconstrucció amb Poisson - + Segmentation Segmentació @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Error d'entrada - + Wrong selection Selecció incorrecta - + Please select a single placement object to get local orientation. Seleccioneu un sol objecte de posició per a obtindre l'orientació local. @@ -375,7 +375,7 @@ Mostres per node - + Input error Error d'entrada @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Selecció incorrecta - + Please select a point cloud or mesh. Selecciona un núvol de punts o una malla. - + Please select a single point cloud. Seleccioneu un sol punt del núvol. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Ha fallat la vista de triangulació @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Crea diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_cs.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_cs.ts index 93be9f40ef..952d87c87f 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_cs.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_cs.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Reverzní Inženýrství - + Cylinder Válec - + Approximate a cylinder Aproximuj válec @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Reverzní Inženýrství - + Plane... Rovina... - + Approximate a plane Aproximuj rovinu @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Reverzní Inženýrství - + Polynomial surface Polynomický povrch - + Approximate a polynomial surface Aproximuj polynomický povrch @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Reverzní Inženýrství - + Sphere Koule - + Approximate a sphere Přibližná koule @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Reverzní Inženýrství - + Wire from mesh boundary... Drát z hranice sítě... - + Create wire from mesh boundaries Vytvořit drát z hranic sítě @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Reverzní Inženýrství - + Poisson... Poisson... - + Poisson surface reconstruction Rekonstrukce Poissonovy plochy @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Reverzní Inženýrství - + Mesh segmentation... Segmentace sítě... - + Create mesh segments Vytvoření segmentů sítě @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Reverzní Inženýrství - + From components Z komponentů - + Create mesh segments from components Vytvořit segmenty sítí ze složek @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Reverzní Inženýrství - + Manual segmentation... Ruční segmentace... - + Create mesh segments manually Vytvořit ručně segmenty sítě @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Reverzní Inženýrství - + Structured point clouds Strukturovaná množina bodů - - + + Triangulation of structured point clouds Triangulace strukturovaných množin bodů @@ -203,47 +203,47 @@ Command - + Fit plane Přizpůsobit rovinu - + Fit cylinder Přizpůsobit válec - + Fit sphere Přizpůsobit kouli - + Fit polynomial surface Přizpůsobit polynomní povrch - + View triangulation Zobrazit triangulaci - + Placement Umístění - + Fit B-Spline Přizpůsobit B-splajn - + Poisson reconstruction Poissonova rekonstrukce - + Segmentation Segmentace @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Chyba zadání - + Wrong selection Neplatný výběr - + Please select a single placement object to get local orientation. Vyberte prosím jedno umístění objektu pro lokální orientaci. @@ -375,7 +375,7 @@ Vzorků na uzel
- + Input error Chyba zadání @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Neplatný výběr - + Please select a point cloud or mesh. Prosím vyberte množinu bodů nebo síť. - + Please select a single point cloud. Vyberte prosím jednu množinu bodů. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Zobrazení triangulace selhalo @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Vytvořit diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts index 31a34eca87..bc7f654706 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Rückführung - + Cylinder Zylinder - + Approximate a cylinder Einen Zylinder annähern @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Rückführung - + Plane... Ebene... - + Approximate a plane Approximieren einer Ebene @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Rückführung - + Polynomial surface Polynomfläche - + Approximate a polynomial surface Eine Polynomfläche annähern @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Rückführung - + Sphere Kugel - + Approximate a sphere Eine Kugel annähern @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Rückführung - + Wire from mesh boundary... Draht von Netzgrenze... - + Create wire from mesh boundaries Erstelle Kantenzug aus Netzbegrenzungen @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Rückführung - + Poisson... Poisson... - + Poisson surface reconstruction Poisson-Oberflächenrekonstruktion @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Rückführung - + Mesh segmentation... Netz-Segmentierung... - + Create mesh segments Netz-Segmente erstellen @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Rückführung - + From components Aus Komponenten - + Create mesh segments from components Erstelle Netzsegmente aus Komponenten @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Rückführung - + Manual segmentation... Manuelle Segmentierung... - + Create mesh segments manually Netzsegmente manuell erstellen @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Rückführung - + Structured point clouds Geordnete Punktwolken - - + + Triangulation of structured point clouds Triangulation von geordneten Punktwolken @@ -203,47 +203,47 @@ Command - + Fit plane Ebene einpassen - + Fit cylinder Zylinder einpassen - + Fit sphere Kugel einpassen - + Fit polynomial surface Polynomfläche einpassen - + View triangulation Triangulation anzeigen - + Placement Positionierung - + Fit B-Spline B-Spline einpassen - + Poisson reconstruction Poisson-Rekonstruktion - + Segmentation Segmentierung @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Eingabefehler - + Wrong selection Falsche Auswahl - + Please select a single placement object to get local orientation. Bitte ein einzelnes Placement-Objekt zur lokalen Orientierung wählen. @@ -375,7 +375,7 @@ Samples pro Knoten
- + Input error Eingabefehler @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Falsche Auswahl - + Please select a point cloud or mesh. Bitte wählen Sie eine Punktwolke oder ein Netz. - + Please select a single point cloud. Bitte eine einzelne Punktewolke auswählen. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Ansichts-Triangulation fehlgeschlagen @@ -500,7 +500,7 @@ Plane - Fläche + Ebene @@ -521,7 +521,7 @@ Minimum number of faces - Minimale Anzahl von Flächen + Minimale Anzahl von Dreiecken @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Erstellen diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_el.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_el.ts index f87681a0ca..cf7bd2c2e2 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_el.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_el.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Αντίστροφη Μηχανική - + Cylinder Κύλινδρος - + Approximate a cylinder Approximate a cylinder @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Αντίστροφη Μηχανική - + Plane... Επίπεδο... - + Approximate a plane Προσέγγιση ενός επιπέδου @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Αντίστροφη Μηχανική - + Polynomial surface Polynomial surface - + Approximate a polynomial surface Approximate a polynomial surface @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Αντίστροφη Μηχανική - + Sphere Σφαίρα - + Approximate a sphere Approximate a sphere @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Αντίστροφη Μηχανική - + Wire from mesh boundary... Wire from mesh boundary... - + Create wire from mesh boundaries Create wire from mesh boundaries @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Αντίστροφη Μηχανική - + Poisson... Poisson... - + Poisson surface reconstruction Ανακατασκευή επιφάνειας Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Αντίστροφη Μηχανική - + Mesh segmentation... Mesh segmentation... - + Create mesh segments Δημιουργήστε τμήματα πλέγματος @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Αντίστροφη Μηχανική - + From components From components - + Create mesh segments from components Create mesh segments from components @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Αντίστροφη Μηχανική - + Manual segmentation... Manual segmentation... - + Create mesh segments manually Create mesh segments manually @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Αντίστροφη Μηχανική - + Structured point clouds Δομημένα νέφη σημείων - - + + Triangulation of structured point clouds Τριγωνισμός των δομημένων νεφών σημείων @@ -203,47 +203,47 @@ Command - + Fit plane Εφαρμογή επιπέδου - + Fit cylinder Εφαρμογή κυλίνδρου - + Fit sphere Εφαρμογή σφαίρας - + Fit polynomial surface Εφαρμόγη πολυωνυμικής επιφάνειας - + View triangulation Προβολή τριγωνισμού - + Placement Τοποθέτηση - + Fit B-Spline Προσαρμογή B-Spline - + Poisson reconstruction Ανακατασκευή Poisson - + Segmentation Κατάτμηση @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Σφάλμα εισαγωγής - + Wrong selection Λάθος επιλογή - + Please select a single placement object to get local orientation. Παρακαλώ επιλέξτε ένα αντικείμενο τοποθέτησης για να έχετε τον τοπικό προσανατολισμό. @@ -375,7 +375,7 @@ Δείγματα ανά κόμβο - + Input error Σφάλμα εισαγωγής @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Λάθος επιλογή - + Please select a point cloud or mesh. Παρακαλώ επιλέξτε ένα σημείο σύννεφο ή πλέγμα. - + Please select a single point cloud. Παρακαλώ επιλέξτε ένα νέφος σημείων. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Η προβολή τριγωνισμού απέτυχε @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Δημιουργήστε diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-AR.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-AR.ts index c783fecaef..4699bf7627 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-AR.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-AR.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Ingeniería Inversa - + Cylinder Cilindro - + Approximate a cylinder Aproximar un cilindro @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Ingeniería Inversa - + Plane... Plano... - + Approximate a plane Aproximar un plano @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Ingeniería Inversa - + Polynomial surface Superficie polinómica - + Approximate a polynomial surface Aproximar una superficie polinómica @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Ingeniería Inversa - + Sphere Esfera - + Approximate a sphere Aproximar una esfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Ingeniería Inversa - + Wire from mesh boundary... Alambre desde el límite de la malla... - + Create wire from mesh boundaries Crear alambre a partir de límites de malla @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Ingeniería Inversa - + Poisson... Poisson... - + Poisson surface reconstruction Reconstrucción de superficie Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Ingeniería Inversa - + Mesh segmentation... Segmentación de malla... - + Create mesh segments Crear segmentos de malla @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Ingeniería Inversa - + From components De componentes - + Create mesh segments from components Crear segmentos de malla a partir de componentes @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Ingeniería Inversa - + Manual segmentation... Segmentación manual... - + Create mesh segments manually Crear segmentos de malla manualmente @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Ingeniería Inversa - + Structured point clouds Nubes de puntos estructurados - - + + Triangulation of structured point clouds Triangulación de nubes de puntos estructurados @@ -203,47 +203,47 @@ Command - + Fit plane Ajustar plano - + Fit cylinder Ajustar cilindro - + Fit sphere Ajustar esfera - + Fit polynomial surface Ajustar superficie polinomial - + View triangulation Ver triangulación - + Placement Ubicación - + Fit B-Spline Ajustar B-Spline - + Poisson reconstruction Reconstrucción de Poisson - + Segmentation Segmentación @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Error de entrada - + Wrong selection Selección Incorrecta - + Please select a single placement object to get local orientation. Por favor, seleccione un solo objeto de colocación para obtener orientación local. @@ -375,7 +375,7 @@ Muestras por nodo
- + Input error Error de entrada @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Selección Incorrecta - + Please select a point cloud or mesh. Por favor, seleccione una nube o malla de puntos. - + Please select a single point cloud. Seleccione una nube de puntos única. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Ver triangulación fallida @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Crear diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-ES.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-ES.ts index c2254d1878..eb37d0d0f6 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-ES.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_es-ES.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Ingeniería Inversa - + Cylinder Cilindro - + Approximate a cylinder Aproximar un cilindro @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Ingeniería Inversa - + Plane... Plano... - + Approximate a plane Aproximar un plano @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Ingeniería Inversa - + Polynomial surface Superficie polinomial - + Approximate a polynomial surface Aproximar una superficie polinomial @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Ingeniería Inversa - + Sphere Esfera - + Approximate a sphere Aproximar a una esfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Ingeniería Inversa - + Wire from mesh boundary... Alambre desde límite de la malla... - + Create wire from mesh boundaries Crear alambre a partir de límites de malla @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Ingeniería Inversa - + Poisson... Poisson - + Poisson surface reconstruction Reconstrucción de superficie Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Ingeniería Inversa - + Mesh segmentation... Segmentación de malla... - + Create mesh segments Crear segmentos de la malla @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Ingeniería Inversa - + From components De componentes - + Create mesh segments from components Crear segmentos de malla a partir de componentes @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Ingeniería Inversa - + Manual segmentation... Segmentación manual... - + Create mesh segments manually Crear segmentos de malla manualmente @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Ingeniería Inversa - + Structured point clouds Nubes de puntos estructurados - - + + Triangulation of structured point clouds Triangulación de nubes de puntos estructurados @@ -203,47 +203,47 @@ Command - + Fit plane Ajustar plano - + Fit cylinder Ajustar cilindro - + Fit sphere Ajustar esfera - + Fit polynomial surface Ajustar superficie polinomial - + View triangulation Ver triangulación - + Placement Ubicación - + Fit B-Spline Ajustar B-Spline - + Poisson reconstruction Reconstrucción de Poisson - + Segmentation Segmentación @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Error de entrada - + Wrong selection Selección incorrecta - + Please select a single placement object to get local orientation. Por favor, seleccione un solo objeto de colocación para obtener orientación local. @@ -375,7 +375,7 @@ Muestras por nodo
- + Input error Error de entrada @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Selección incorrecta - + Please select a point cloud or mesh. Por favor, seleccione una nube o malla de puntos. - + Please select a single point cloud. Por favor seleccione un solo punto. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Fallo en la vista de triangulación @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Crear diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_eu.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_eu.ts index 17512ed768..53da7c8543 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_eu.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_eu.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Alderantzizko ingeniaritza - + Cylinder Zilindroa - + Approximate a cylinder Hurbildu zilindro batera @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Alderantzizko ingeniaritza - + Plane... Plano... - + Approximate a plane Hurbildu plano batera @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Alderantzizko ingeniaritza - + Polynomial surface Gainazal polinomiala - + Approximate a polynomial surface Hurbildu gainazal polinomial batera @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Alderantzizko ingeniaritza - + Sphere Esfera - + Approximate a sphere Hurbildu esfera batera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Alderantzizko ingeniaritza - + Wire from mesh boundary... Alanbrea amaraun-mugatik... - + Create wire from mesh boundaries Sortu alanbrea amaraun-mugetatik @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Alderantzizko ingeniaritza - + Poisson... Poisson... - + Poisson surface reconstruction Poisson gainazalaren berreraikitzea @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Alderantzizko ingeniaritza - + Mesh segmentation... Amaraun-segmentazioa... - + Create mesh segments Sortu amaraun segmentuak @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Alderantzizko ingeniaritza - + From components Osagaietatik - + Create mesh segments from components Sortu amaraun segmentuak osagaietatik @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Alderantzizko ingeniaritza - + Manual segmentation... Eskuzko segmentazioa... - + Create mesh segments manually Sortu amaraun segmentuak eskuz @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Alderantzizko ingeniaritza - + Structured point clouds Puntu egituratuen hodeiak - - + + Triangulation of structured point clouds Puntu egituratuen hodeien triangelaketa @@ -203,47 +203,47 @@ Command - + Fit plane Doitu planoa - + Fit cylinder Doitu zilindroa - + Fit sphere Doitu esfera - + Fit polynomial surface Doitu gainazal polinomiala - + View triangulation Bistaren triangelaketa - + Placement Kokapena - + Fit B-Spline Doitu B-spline kurba - + Poisson reconstruction Poissonen berreraikitzea - + Segmentation Segmentazioa @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Sarrera-errorea - + Wrong selection Hautapen okerra - + Please select a single placement object to get local orientation. Hautatu kokapen-objektu bakarra tokiko orientazioa eskuratzeko. @@ -375,7 +375,7 @@ Laginak nodoko - + Input error Sarrera-errorea @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Hautapen okerra - + Please select a point cloud or mesh. Hautatu puntuen hodei bat edo amaraun bat. - + Please select a single point cloud. Hautatu puntu bakarreko hodeia. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Bistaren triangelaketak huts egin du @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Sortu diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fi.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fi.ts index 4382f220b2..d0e27dedf1 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fi.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fi.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Käänteissuunnittelu - + Cylinder Lieriö - + Approximate a cylinder Arvioi sylinteri @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Käänteissuunnittelu - + Plane... Taso... - + Approximate a plane Lähentää tasoa @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Käänteissuunnittelu - + Polynomial surface Polynomin pinta - + Approximate a polynomial surface Arvioi polynomin pinta @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Käänteissuunnittelu - + Sphere Pallo - + Approximate a sphere Arvioi pallo @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Käänteissuunnittelu - + Wire from mesh boundary... Tee lankapiirros verkkorajasta... - + Create wire from mesh boundaries Luo lankapiirros verkkorajoista @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Käänteissuunnittelu - + Poisson... Poisson-jakauma... - + Poisson surface reconstruction Poisson pinnan rekonstruointi @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Käänteissuunnittelu - + Mesh segmentation... Verkkopinnan segmentointi... - + Create mesh segments Luo verkkopinnan lohkoja @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Käänteissuunnittelu - + From components Osista saatu - + Create mesh segments from components Luo verkkopinnan segmenttejä komponenteista @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Käänteissuunnittelu - + Manual segmentation... Käsintehty segmentointi... - + Create mesh segments manually Luo verkkopinnan segmentit manuaalisesti @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Käänteissuunnittelu - + Structured point clouds Strukturoidut pistepilvet - - + + Triangulation of structured point clouds Rakenteellisten pistepilvien kolmiomittaus @@ -203,47 +203,47 @@ Command - + Fit plane Sovita taso - + Fit cylinder Sovita sylinteri - + Fit sphere Sovita pallo - + Fit polynomial surface Sovita polynomin pinta - + View triangulation Näytä kolmiomittaus - + Placement Sijainti - + Fit B-Spline Sovita B-käyrä - + Poisson reconstruction Poisson pinnan rekonstruointi - + Segmentation Segmentaatio @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Syötteen virhe - + Wrong selection Virheellinen valinta - + Please select a single placement object to get local orientation. Valitse yksi paikkaobjekti saadaksesi paikallisen suunnan. @@ -375,7 +375,7 @@ Näytteet solmua kohti - + Input error Syötteen virhe @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Virheellinen valinta - + Please select a point cloud or mesh. Ole hyvä ja valitse pistepilvi tai verkkopinta. - + Please select a single point cloud. Valitse yksi pistepilvi. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Näkymän kolmiomittaus epäonnistui @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Luo diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fr.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fr.ts index d80f1ac6c9..6fcd9af0a6 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fr.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_fr.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Rétro-ingénierie - + Cylinder Cylindre - + Approximate a cylinder Approximer un cylindre @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Rétro-ingénierie - + Plane... Planifier... - + Approximate a plane Approximer un plan @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Rétro-ingénierie - + Polynomial surface Surface polynomiale - + Approximate a polynomial surface Approximer une surface polynomiale @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Rétro-ingénierie - + Sphere Sphère - + Approximate a sphere Approximer une sphère @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Rétro-ingénierie - + Wire from mesh boundary... Fil à partir de la limite du maillage... - + Create wire from mesh boundaries Créer un fil à partir des limites du maillage @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Rétro-ingénierie - + Poisson... Poisson... - + Poisson surface reconstruction Reconstruction de surface Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Rétro-ingénierie - + Mesh segmentation... Segmentation du maillage... - + Create mesh segments Segmenter le maillage @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Rétro-ingénierie - + From components Depuis les composants - + Create mesh segments from components Créer des segments de maillage à partir des composants @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Rétro-ingénierie - + Manual segmentation... Segmentation manuelle... - + Create mesh segments manually Créer des segments de maillage manuellement @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Rétro-ingénierie - + Structured point clouds Nuages structurés de points - - + + Triangulation of structured point clouds Triangulation des nuages structurés de points @@ -203,47 +203,47 @@ Command - + Fit plane Ajuster le plan - + Fit cylinder Ajuster le cylindre - + Fit sphere Ajuster la sphère - + Fit polynomial surface Ajuster la surface polynomiale - + View triangulation Afficher la triangulation - + Placement Positionnement - + Fit B-Spline Ajuster la B-spline - + Poisson reconstruction Reconstruction de Poisson - + Segmentation Segmentation @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Erreur de saisie - + Wrong selection Sélection invalide - + Please select a single placement object to get local orientation. Veuillez sélectionner l'emplacement d'un seul objet pour obtenir l'orientation locale. @@ -375,7 +375,7 @@ Samples par noeuds - + Input error Erreur de saisie @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Sélection invalide - + Please select a point cloud or mesh. Veuillez sélectionner un nuage de points ou un maillage. - + Please select a single point cloud. Merci de sélectionner un point du nuage de points. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Erreur de la vue en triangulation @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Créer diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_gl.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_gl.ts index 792a733e2a..5203acbcd8 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_gl.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_gl.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Enxeñaría Inversa - + Cylinder Cilindro - + Approximate a cylinder Aproximar un cilindro @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Enxeñaría Inversa - + Plane... Plano... - + Approximate a plane Aproximado ó plano @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Enxeñaría Inversa - + Polynomial surface Superficie polinomial - + Approximate a polynomial surface Aproximar unha superficie polinomial @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Enxeñaría Inversa - + Sphere Esfera - + Approximate a sphere Aproximar unha esfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Enxeñaría Inversa - + Wire from mesh boundary... Arame dende o límite da malla... - + Create wire from mesh boundaries Crear arame a partir dos límites da malla @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Enxeñaría Inversa - + Poisson... Poisson... - + Poisson surface reconstruction Reconstrución da superficie de Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Enxeñaría Inversa - + Mesh segmentation... Segmentación de malla... - + Create mesh segments Crea segmentos de malla @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Enxeñaría Inversa - + From components Dos compoñentes - + Create mesh segments from components Crear segmentos de malla a partir de compoñentes @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Enxeñaría Inversa - + Manual segmentation... Segmentación manual... - + Create mesh segments manually Crear segmentos de malla manualmente @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Enxeñaría Inversa - + Structured point clouds Nubes de puntos estruturados - - + + Triangulation of structured point clouds Triangulación das nubes de puntos estruturados @@ -203,47 +203,47 @@ Command - + Fit plane Axustar plano - + Fit cylinder Axustar cilindro - + Fit sphere Axustar esfera - + Fit polynomial surface Axustar superficie polinomial - + View triangulation Ver triangulación - + Placement Emprazamento - + Fit B-Spline Axustar B-Spline - + Poisson reconstruction Reconstrución de Poisson - + Segmentation Segmentación @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Input error - + Wrong selection Escolma errada - + Please select a single placement object to get local orientation. Por favor escolme un único obxecto de posición para coller a orientación local. @@ -375,7 +375,7 @@ Mostras por nó - + Input error Input error @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Escolma errada - + Please select a point cloud or mesh. Seleccione unha nube de puntos ou unha malla. - + Please select a single point cloud. Por favor escolme un só punto da nube. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Fallou a vista de triangulación @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Facer diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hr.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hr.ts index 1ae7bf8819..edbd185cac 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hr.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hr.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Inverzni inženjering - + Cylinder Valjak - + Approximate a cylinder Približni cilindar @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Inverzni inženjering - + Plane... Ravnina... - + Approximate a plane Aproksimiraj ravninu @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Inverzni inženjering - + Polynomial surface Polinomna površina - + Approximate a polynomial surface Približno polinomna površina @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Inverzni inženjering - + Sphere Kugla - + Approximate a sphere Približno kugla @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Inverzni inženjering - + Wire from mesh boundary... Žica s granice mreže ... - + Create wire from mesh boundaries Napravite žicu od granica mreže @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Inverzni inženjering - + Poisson... Poissonova raspodjela... - + Poisson surface reconstruction Poissonova rekonstrukcija površine @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Inverzni inženjering - + Mesh segmentation... Mrežna segmentacija... - + Create mesh segments Kreiraj segmente mreže @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Inverzni inženjering - + From components Od komponenata - + Create mesh segments from components Napravite mrežni segment od komponenata @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Inverzni inženjering - + Manual segmentation... Ručna segmentacija - + Create mesh segments manually Napravite mrežne segmente ručno @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Inverzni inženjering - + Structured point clouds Strukturirani točka oblaci - - + + Triangulation of structured point clouds Triangulacija strukturiranih točka oblaka @@ -203,47 +203,47 @@ Command - + Fit plane Prilagodi ravninu - + Fit cylinder Prilagodi cilindar - + Fit sphere Prilagodi kuglu - + Fit polynomial surface Prilagodi polinomnu površinu - + View triangulation Pogled triangulacija - + Placement Položaj - + Fit B-Spline Prilagodi B-spline - + Poisson reconstruction Possion rekonstrukcija - + Segmentation Segmentacija @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Pogreška na ulazu - + Wrong selection Pogrešan odabir - + Please select a single placement object to get local orientation. Molimo odaberite jedan jedini položaj objekt da dobijete lokalnu orijentaciju. @@ -375,7 +375,7 @@ Uzoraka po čvoru - + Input error Pogreška na ulazu @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Pogrešan odabir - + Please select a point cloud or mesh. Molimo odaberite oblak točaka ili mrežu - + Please select a single point cloud. Molimo odaberite jedna točka oblak. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Prikaz triangulacija nije uspjelo @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Stvoriti diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hu.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hu.ts index d797cd0e72..0e861c219f 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hu.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_hu.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Fordított tervezés - + Cylinder Henger - + Approximate a cylinder Henger megbecsülése @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Fordított tervezés - + Plane... Sík... - + Approximate a plane Sík megbecsülése @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Fordított tervezés - + Polynomial surface Polinom felület - + Approximate a polynomial surface Hozzávetőleges polinom felület @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Fordított tervezés - + Sphere Gömb - + Approximate a sphere Gömb megbecsülése @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Fordított tervezés - + Wire from mesh boundary... Drótháló a háló szegélyből... - + Create wire from mesh boundaries Drótháló létrehozása a háló szegélyből @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Fordított tervezés - + Poisson... Poisson eloszlás... - + Poisson surface reconstruction Poisson felszín újraépítése @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Fordított tervezés - + Mesh segmentation... Háló szegmentálás... - + Create mesh segments Háló szegmensek létrehozása @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Fordított tervezés - + From components Összetevőkből - + Create mesh segments from components Háló szegmensek létrehozása az összetevőkből @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Fordított tervezés - + Manual segmentation... Kézi szegmentálás... - + Create mesh segments manually Háló szegmensek létrehozása kézzel @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Fordított tervezés - + Structured point clouds Strukturált pontfelhők - - + + Triangulation of structured point clouds Pont strukturált felhők háromszögelése @@ -203,47 +203,47 @@ Command - + Fit plane Sík illesztése - + Fit cylinder Henger illesztése - + Fit sphere Gömb illesztése - + Fit polynomial surface Polinom felület illesztése - + View triangulation Háromtényezős nézet - + Placement Elhelyezés - + Fit B-Spline B-görbe illesztése - + Poisson reconstruction Poisson felszín helyreállítás - + Segmentation Szegmentálás @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Bemeneti hiba - + Wrong selection Rossz kijelölés - + Please select a single placement object to get local orientation. Kérjük, válasszon egy önállóan elhelyezett tárgyat a hely meghatározásához. @@ -375,7 +375,7 @@ Csomópontonkénti minta - + Input error Bemeneti hiba @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Rossz kijelölés - + Please select a point cloud or mesh. Kérem válasszon egy pont felhőt vagy hálót. - + Please select a single point cloud. Kérjük, válasszon egy pontú felhőt. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Háromtényezős nézet nem sikerült @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Létrehozás diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_id.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_id.ts index 5842cf1593..303839ce3b 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_id.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_id.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Reverse Engineering - + Cylinder Silinder - + Approximate a cylinder Perkiraan silinder @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Reverse Engineering - + Plane... Plane... - + Approximate a plane Approximate a plane @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Reverse Engineering - + Polynomial surface Permukaan polynomial - + Approximate a polynomial surface Perkiraan permukaan polynomial @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Reverse Engineering - + Sphere Lingkup - + Approximate a sphere Approximate a sphere @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Reverse Engineering - + Wire from mesh boundary... Wire from mesh boundary... - + Create wire from mesh boundaries Create wire from mesh boundaries @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Reverse Engineering - + Poisson... Poisson ... - + Poisson surface reconstruction Rekonstruksi permukaan Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Reverse Engineering - + Mesh segmentation... Segmentasi Mesh... - + Create mesh segments Buat segmen jaring @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Reverse Engineering - + From components Dari komponen - + Create mesh segments from components Buat segment mesh dari komponen @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Reverse Engineering - + Manual segmentation... Segmentasi manual... - + Create mesh segments manually Buat segment mesh secara manual @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Reverse Engineering - + Structured point clouds Awan titik terstruktur - - + + Triangulation of structured point clouds Triangulasi awan titik terstruktur @@ -203,47 +203,47 @@ Command - + Fit plane Fit plane - + Fit cylinder Fit cylinder - + Fit sphere Fit sphere - + Fit polynomial surface Fit polynomial surface - + View triangulation View triangulation - + Placement Penempatan - + Fit B-Spline Fit B-Spline - + Poisson reconstruction Poisson reconstruction - + Segmentation Segmentasi @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Input error - + Wrong selection Pilihan salah - + Please select a single placement object to get local orientation. Harap pilih satu objek penempatan untuk mendapatkan orientasi lokal. @@ -375,7 +375,7 @@ Sampel per simpul - + Input error Input error @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Pilihan salah - + Please select a point cloud or mesh. Pilih sebuah titik cloud atau mesh. - + Please select a single point cloud. Silakan pilih awan titik tunggal . @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Lihat triangulasi gagal @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Membuat diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_it.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_it.ts index f34b9c88dc..259aa78c54 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_it.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_it.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Reverse Engineering - + Cylinder Cilindro - + Approximate a cylinder Approssima un cilindro @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Reverse Engineering - + Plane... Piano... - + Approximate a plane Approssima un piano @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Reverse Engineering - + Polynomial surface Superficie polinomiale - + Approximate a polynomial surface Approssima una superficie polinomiale @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Reverse Engineering - + Sphere Sfera - + Approximate a sphere Approssima una sfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Reverse Engineering - + Wire from mesh boundary... Polilinea dai bordi della mesh... - + Create wire from mesh boundaries Crea una polilinea dai limiti delle mesh @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Reverse Engineering - + Poisson... Poisson... - + Poisson surface reconstruction Ricostruzione di superfici di Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Reverse Engineering - + Mesh segmentation... Segmentazione della mesh... - + Create mesh segments Crea segmenti di mesh @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Reverse Engineering - + From components Da componenti - + Create mesh segments from components Crea dei segmenti mesh dai componenti @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Reverse Engineering - + Manual segmentation... Segmentazione manuale... - + Create mesh segments manually Crea dei segmenti mesh manualmente @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Reverse Engineering - + Structured point clouds Nuvola di punti strutturati - - + + Triangulation of structured point clouds Triangolazione delle nuvole di punti strutturati @@ -203,47 +203,47 @@ Command - + Fit plane Adatta piano - + Fit cylinder Adatta cilindro - + Fit sphere Adatta sfera - + Fit polynomial surface Adatta superficie polinomiale - + View triangulation Visualizza triangolazione - + Placement Posizionamento - + Fit B-Spline Adatta B-Spline - + Poisson reconstruction Ricostruzione di Poisson - + Segmentation Segmentazione @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Errore di input - + Wrong selection Selezione errata - + Please select a single placement object to get local orientation. Si prega di selezionare un solo oggetto di posizionamento per ottenere l'orientamento locale. @@ -375,7 +375,7 @@ Campioni per nodo - + Input error Errore di input @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Selezione errata - + Please select a point cloud or mesh. Si prega di selezionare una nuvola di punti o una mesh. - + Please select a single point cloud. Selezionare un solo punto. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Vista in triangolazione non riuscita @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Crea diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ja.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ja.ts index ac4359e9de..18bc39b849 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ja.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ja.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering リバースエンジニアリング - + Cylinder 円柱 - + Approximate a cylinder シリンダーの概算 @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering リバースエンジニアリング - + Plane... 平面... - + Approximate a plane 平面に近似する @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering リバースエンジニアリング - + Polynomial surface 多項式サーフェス - + Approximate a polynomial surface 多項式サーフェスに近似 @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering リバースエンジニアリング - + Sphere 球体 - + Approximate a sphere 球をおおよその球体にする @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering リバースエンジニアリング - + Wire from mesh boundary... ワイヤーをメッシュ境界から... - + Create wire from mesh boundaries メッシュ境界からワイヤを作成 @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering リバースエンジニアリング - + Poisson... ポアソン - + Poisson surface reconstruction ポアソン曲面の再構成 @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering リバースエンジニアリング - + Mesh segmentation... メッシュのセグメント化.. - + Create mesh segments メッシュのセグメントを作成します @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering リバースエンジニアリング - + From components コンポーネントから - + Create mesh segments from components コンポーネントからメッシュセグメントを作成 @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering リバースエンジニアリング - + Manual segmentation... 手動でのセグメント化... - + Create mesh segments manually メッシュセグメントを手動で作成 @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering リバースエンジニアリング - + Structured point clouds 構造化された点群 - - + + Triangulation of structured point clouds 構造化された点群の三角形分割 @@ -203,47 +203,47 @@ Command - + Fit plane 面に合わせる - + Fit cylinder 円筒に合わせる - + Fit sphere 球に合わせる - + Fit polynomial surface 多項式サーフェスに合わせる - + View triangulation 三角形分割の表示 - + Placement 配置 - + Fit B-Spline B-スプラインに合わせる - + Poisson reconstruction ポアソンの再構築 - + Segmentation セグメンテーション @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error 入力エラー - + Wrong selection 誤った選択 - + Please select a single placement object to get local orientation. ローカル方向を取得するには単一の配置オブジェクトを選択してください @@ -375,7 +375,7 @@ ノードあたりのサンプル数 - + Input error 入力エラー @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection 誤った選択 - + Please select a point cloud or mesh. 点群またはメッシュを選択してください。 - + Please select a single point cloud. 単一の点群を選択してください @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed ビューの三角形分割に失敗しました @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create 作成 diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ka.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ka.ts index 5d6578a5ab..eb2fa12c6a 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ka.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ka.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering საინჟინრო ანალიზი - + Cylinder ცილინდრი - + Approximate a cylinder ცილინდრის აპროქსიმაცია @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering საინჟინრო ანალიზი - + Plane... სიბრტყე... - + Approximate a plane სიბრტყის აპროქსიმაცია @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering საინჟინრო ანალიზი - + Polynomial surface პოლინომური ზედაპირი - + Approximate a polynomial surface პოლინომური ზედაპირის აპროქსიმაცია @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering საინჟინრო ანალიზი - + Sphere სფერო - + Approximate a sphere სფეროს აპროქსიმაცია @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering საინჟინრო ანალიზი - + Wire from mesh boundary... პოლიხაზი ბადის საზღვრებისგან... - + Create wire from mesh boundaries პოლიხაზის შექმნა ბადის საზღვრებისგან @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering საინჟინრო ანალიზი - + Poisson... პუასონი... - + Poisson surface reconstruction პუასონის ზედაპირის რეკონსტრუქცია @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering საინჟინრო ანალიზი - + Mesh segmentation... ბადის სეგმენტაცია... - + Create mesh segments ბადის სეგმენების შექმნა @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering საინჟინრო ანალიზი - + From components კოპონენტებიდან - + Create mesh segments from components ბადის სეგმენტების შექმნა კომპონენტებისგან @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering საინჟინრო ანალიზი - + Manual segmentation... სეგმენტაციის ხელით მორგება... - + Create mesh segments manually ბადის სეგმენტების ხელით შექმნა @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering საინჟინრო ანალიზი - + Structured point clouds დალაგებული წერტილების ღრუბელი - - + + Triangulation of structured point clouds სტრუქტურული წერტილების ღრუბლის ტრიანგულაცია @@ -203,47 +203,47 @@ Command - + Fit plane სიბრტყის მოთავსება - + Fit cylinder ცილინტრის მოთავსება - + Fit sphere სფეროს მოთავსება - + Fit polynomial surface პოლინომური ზედაპირის ჩატევა - + View triangulation ტრიანგულაციის ნახვა - + Placement მდებარეობა - + Fit B-Spline B-სპლაინის მოთავსება - + Poisson reconstruction პუასონის რეკონსტრუქცია - + Segmentation სეგმენტაცია @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error შეყვანის შეცდომა - + Wrong selection არასწორი არჩევანი - + Please select a single placement object to get local orientation. გთხოვთ, აირჩიოთ ერთი განლაგების ობიექტი ლოკალური ორიენტაციის მისაღებად. @@ -375,7 +375,7 @@ ნიმუშები თითო კვანძზე - + Input error შეყვანის შეცდომა @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection არასწორი არჩევანი - + Please select a point cloud or mesh. გთხოვთ აირჩიოთ წერტილების ღრუბელი ან ბადე. - + Please select a single point cloud. გთხოვთ აირჩიოთ ღრუბლის ერთი წერტილი. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed ტრიანგულაციის ნახვის შეცდომა @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create შექმნა diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ko.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ko.ts index 0cb6b6dc72..a3154761b9 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ko.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ko.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering 리버스 엔지니어링 - + Cylinder 실린더 - + Approximate a cylinder Approximate a cylinder @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering 리버스 엔지니어링 - + Plane... Plane... - + Approximate a plane Approximate a plane @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering 리버스 엔지니어링 - + Polynomial surface Polynomial surface - + Approximate a polynomial surface Approximate a polynomial surface @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering 리버스 엔지니어링 - + Sphere 공모양 - + Approximate a sphere Approximate a sphere @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering 리버스 엔지니어링 - + Wire from mesh boundary... Wire from mesh boundary... - + Create wire from mesh boundaries Create wire from mesh boundaries @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering 리버스 엔지니어링 - + Poisson... Poisson... - + Poisson surface reconstruction Poisson surface reconstruction @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering 리버스 엔지니어링 - + Mesh segmentation... Mesh segmentation... - + Create mesh segments Create mesh segments @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering 리버스 엔지니어링 - + From components From components - + Create mesh segments from components Create mesh segments from components @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering 리버스 엔지니어링 - + Manual segmentation... Manual segmentation... - + Create mesh segments manually Create mesh segments manually @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering 리버스 엔지니어링 - + Structured point clouds Structured point clouds - - + + Triangulation of structured point clouds Triangulation of structured point clouds @@ -203,47 +203,47 @@ Command - + Fit plane Fit plane - + Fit cylinder Fit cylinder - + Fit sphere Fit sphere - + Fit polynomial surface Fit polynomial surface - + View triangulation View triangulation - + Placement 위치 설정 - + Fit B-Spline Fit B-Spline - + Poisson reconstruction Poisson reconstruction - + Segmentation Segmentation @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error 입력 오류 - + Wrong selection 잘못 된 선택 - + Please select a single placement object to get local orientation. Please select a single placement object to get local orientation. @@ -375,7 +375,7 @@ Samples per node - + Input error 입력 오류 @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection 잘못 된 선택 - + Please select a point cloud or mesh. Please select a point cloud or mesh. - + Please select a single point cloud. Please select a single point cloud. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed View triangulation failed @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create 만들기 diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_nl.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_nl.ts index b03b93424d..76375c0a5e 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_nl.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_nl.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Reverse Engineering - + Cylinder Cilinder - + Approximate a cylinder Een cilinder benaderen @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Reverse Engineering - + Plane... Vlak... - + Approximate a plane Benader een vlak @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Reverse Engineering - + Polynomial surface Polynomiaal oppervlak - + Approximate a polynomial surface Een polynomiaal oppervlak benaderen @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Reverse Engineering - + Sphere Bol - + Approximate a sphere Een bol benaderen @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Reverse Engineering - + Wire from mesh boundary... Draad vanuit maasgrens... - + Create wire from mesh boundaries Genereer draad vanuit maasgrenzen @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Reverse Engineering - + Poisson... Poisson... - + Poisson surface reconstruction Wederopbouw van het Poisson-oppervlak @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Reverse Engineering - + Mesh segmentation... Maassegmentatie... - + Create mesh segments Gaassegmenten aanmaken @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Reverse Engineering - + From components Vanuit onderdelen - + Create mesh segments from components Genereer maaswerk-segmenten vanuit componenten @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Reverse Engineering - + Manual segmentation... Handmatige segmentatie... - + Create mesh segments manually Maak maaswerk-segmenten handmatig aan @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Reverse Engineering - + Structured point clouds Gestructureerde puntenwolken - - + + Triangulation of structured point clouds Driehoeksmeting van gestructureerde puntenwolken @@ -203,47 +203,47 @@ Command - + Fit plane Pas in vlak - + Fit cylinder Pas in cilinder - + Fit sphere Pas in bol - + Fit polynomial surface Pas in polynoom vlak - + View triangulation Bekijk de driehoekigheid - + Placement Plaatsing - + Fit B-Spline Pas in B-Spline - + Poisson reconstruction Poisson reconstructie - + Segmentation Segmentatie @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Invoerfout - + Wrong selection Verkeerde selectie - + Please select a single placement object to get local orientation. Gelieve een enkel plaatsingsobject te selecteren om een lokale oriëntatie te krijgen. @@ -375,7 +375,7 @@ Stalen per knoop - + Input error Invoerfout @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Verkeerde selectie - + Please select a point cloud or mesh. Selecteer een puntwolk of mesh. - + Please select a single point cloud. Gelieve een enkele puntwolk te selecteren. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Driehoeksmeting van de weergave mislukt @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Aanmaken diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pl.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pl.ts index fd28c83a95..2afff5a256 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pl.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pl.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Inżynieria Wsteczna - + Cylinder Walec - + Approximate a cylinder Przybliżenie cylindra @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering - Inżynieria Wsteczna + Inżynieria wsteczna - + Plane... Płaszczyzna... - + Approximate a plane Aproksymuj płaszczyznę @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Inżynieria wsteczna - + Polynomial surface Powierzchnia wielomianowa - + Approximate a polynomial surface Przybliżenie powierzchni wielomianu @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Inżynieria wsteczna - + Sphere Sfera - + Approximate a sphere Przybliżenie sfery @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Inżynieria wsteczna - + Wire from mesh boundary... Linia łamana z obwiedni siatki ... - + Create wire from mesh boundaries Utwórz polilinię z obwiedni siatki @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Inżynieria wsteczna - + Poisson... Rozkład Poissona ... - + Poisson surface reconstruction Rekonstrukcja powierzchni Poissona @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Inżynieria wsteczna - + Mesh segmentation... Segmentacja siatki... - + Create mesh segments Tworzy segmenty siatki @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Inżynieria wsteczna - + From components Z komponentów - + Create mesh segments from components Utwórz segmenty siatki z komponentów @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Inżynieria wsteczna - + Manual segmentation... Segmentacja samodzielna... - + Create mesh segments manually Utwórz samodzielnie segmenty siatki @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Inżynieria wsteczna - + Structured point clouds Strukturalne chmury punktów - - + + Triangulation of structured point clouds Triangulacja strukturalnych chmur punktów @@ -203,47 +203,47 @@ Command - + Fit plane Dopasuj do płaszczyzny - + Fit cylinder Dopasuj walec - + Fit sphere Dopasuj sferę - + Fit polynomial surface Dopasuj powierzchnię wielomianową - + View triangulation Widok triangulacji - + Placement Umiejscowienie - + Fit B-Spline Dopasuj krzywą złożoną - + Poisson reconstruction Rekonstrukcja powierzchni Poissona - + Segmentation Segmentacja @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Błąd danych wejściowych - + Wrong selection Nieprawidłowy wybór - + Please select a single placement object to get local orientation. Proszę wybrać pojedynczy obiekt, aby poznać orientację lokalną. @@ -375,7 +375,7 @@ Próbek na węzeł - + Input error Błąd danych wejściowych @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Nieprawidłowy wybór - + Please select a point cloud or mesh. Proszę wybrać chmurę punktów lub siatkę. - + Please select a single point cloud. Proszę wybrać pojedynczą chmurę punktów. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Triangulacja widoku nie powiodła się @@ -521,7 +521,7 @@ Minimum number of faces - Minimalna liczba ścian + Minimalna liczba płaszczyzn @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Utwórz @@ -577,7 +577,7 @@ Reverse Engineering - Inżynieria wsteczna + Inżynieria Wsteczna
diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-BR.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-BR.ts index 038920461c..88fab0f281 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-BR.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-BR.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Engenharia Reversa - + Cylinder Cilindro - + Approximate a cylinder Aproximar um cilindro @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Engenharia Reversa - + Plane... Plano... - + Approximate a plane Aproximar um plano @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Engenharia Reversa - + Polynomial surface Superfície de polinômios - + Approximate a polynomial surface Aproximar uma superfície polinomial @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Engenharia Reversa - + Sphere Esfera - + Approximate a sphere Aproximar uma esfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Engenharia Reversa - + Wire from mesh boundary... Arame a partir dos limites de uma malha... - + Create wire from mesh boundaries Criar arame a partir dos limites de uma malha @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Engenharia Reversa - + Poisson... Poisson... - + Poisson surface reconstruction Reconstrução de superfície de Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Engenharia Reversa - + Mesh segmentation... Segmentação de malha... - + Create mesh segments Criar segmentos de malha @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Engenharia Reversa - + From components A partir de componentes - + Create mesh segments from components Cria segmentos de malha a partir de componentes @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Engenharia Reversa - + Manual segmentation... Segmentação manual... - + Create mesh segments manually Criar segmentos de malha manualmente @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Engenharia Reversa - + Structured point clouds Nuvens de pontos estruturados - - + + Triangulation of structured point clouds Triangulação de nuvens de pontos estruturados @@ -203,47 +203,47 @@ Command - + Fit plane Aproximar plano - + Fit cylinder Aproximar cilindro - + Fit sphere Aproximar esfera - + Fit polynomial surface Aproximar superfície polinomial - + View triangulation Triangulação de exibição - + Placement Posicionamento - + Fit B-Spline Aproximar B-Spline - + Poisson reconstruction Reconstrução de superfície de Poisson - + Segmentation Segmentação @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Erro de entrada - + Wrong selection Seleção errada - + Please select a single placement object to get local orientation. Por favor, selecione um objeto de posicionamento único para obter orientação local. @@ -375,7 +375,7 @@ Amostras por nó - + Input error Erro de entrada @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Seleção errada - + Please select a point cloud or mesh. Selecione uma nuvem de pontos ou uma malha. - + Please select a single point cloud. Por favor, selecione uma nuvem de ponto único. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Ver Triangulação falha @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Criar diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-PT.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-PT.ts index e0179ccad4..887bb27f8f 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-PT.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_pt-PT.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Engenharia inversa - + Cylinder Cilindro - + Approximate a cylinder Aproximar um cilindro @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Engenharia inversa - + Plane... Plano... - + Approximate a plane Aproximar a um plano @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Engenharia inversa - + Polynomial surface Superfície de polinômios - + Approximate a polynomial surface Aproximar uma superfície polinomial @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Engenharia inversa - + Sphere Esfera - + Approximate a sphere Aproximar uma esfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Engenharia inversa - + Wire from mesh boundary... Fio a partir do limite da malha... - + Create wire from mesh boundaries Criar fio a partir dos limites da malha @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Engenharia inversa - + Poisson... Poisson... - + Poisson surface reconstruction Reconstrução de superfície de Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Engenharia inversa - + Mesh segmentation... Segmentação de malha... - + Create mesh segments Criar segmentos de malha @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Engenharia inversa - + From components De componentes - + Create mesh segments from components Criar segmentos de malha de componentes @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Engenharia inversa - + Manual segmentation... Segmentação manual... - + Create mesh segments manually Criar segmentos de malha manualmente @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Engenharia inversa - + Structured point clouds Nuvens de pontos estruturados - - + + Triangulation of structured point clouds Triangulação de nuvens de pontos estruturados @@ -203,47 +203,47 @@ Command - + Fit plane Ajustar plano - + Fit cylinder Ajustar cilindro - + Fit sphere Ajustar esfera - + Fit polynomial surface Ajustar superfície polinomial - + View triangulation Ver triangulação - + Placement Colocação - + Fit B-Spline Ajustar B-Spline - + Poisson reconstruction Reconstrução Poisson - + Segmentation Segmentação @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Erro de Inserção - + Wrong selection Seleção errada - + Please select a single placement object to get local orientation. Por favor selecione um objeto de posição única para obter orientação local. @@ -375,7 +375,7 @@ Amostras por nó - + Input error Erro de Inserção @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Seleção errada - + Please select a point cloud or mesh. Por favor, selecione uma nuvem de pontos ou malha. - + Please select a single point cloud. Por favor, selecione uma única nuvem de pontos. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Triangulação de vista falhada @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Criar diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ro.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ro.ts index 8e3f4ed025..057b8c3965 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ro.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ro.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Inginerie Inversă - + Cylinder Cilindru - + Approximate a cylinder Aproximează un cilindru @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Inginerie Inversă - + Plane... Plan... - + Approximate a plane Aproximaţi un plan @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Inginerie Inversă - + Polynomial surface Suprafață polinomială - + Approximate a polynomial surface Aproximează o suprafaţă polinomială @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Inginerie Inversă - + Sphere Sfera - + Approximate a sphere Aprobă o sferă @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Inginerie Inversă - + Wire from mesh boundary... Wire din limitele plasei... - + Create wire from mesh boundaries Creați un cablu din limitele ochiurilor de plasă @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Inginerie Inversă - + Poisson... Poisson... - + Poisson surface reconstruction Reconstrucţia suprafaţă Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Inginerie Inversă - + Mesh segmentation... Segmentarea plasei... - + Create mesh segments Creează segmente de plasă @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Inginerie Inversă - + From components Din componente - + Create mesh segments from components Crează segmente de plasă din componente @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Inginerie Inversă - + Manual segmentation... Segmentare manuală... - + Create mesh segments manually Crează manual segmentele de plasă @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Inginerie Inversă - + Structured point clouds Nor de puncte structurate - - + + Triangulation of structured point clouds Triangulaţie structurii norului de puncte @@ -203,47 +203,47 @@ Command - + Fit plane Potrivire plan - + Fit cylinder Potrivire cilindru - + Fit sphere Potrivire sferică - + Fit polynomial surface Potrivire pe suprafață polinomială - + View triangulation Vezi triangularea - + Placement Amplasare - + Fit B-Spline Potrivire B-Spline - + Poisson reconstruction Reconstrucția lui Poisson - + Segmentation Segmentare @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Eroare de intrare - + Wrong selection Selecţie greşită - + Please select a single placement object to get local orientation. Vă rugăm să selectaţi un obiect unic de plasare pentru a obţine orientarea locală. @@ -375,7 +375,7 @@ Eșantioane pe nod - + Input error Eroare de intrare @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Selecţie greşită - + Please select a point cloud or mesh. Vă rugăm să selectați un punct cloud sau plasă. - + Please select a single point cloud. Va rugam selectati un singur nor de puncte. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Eroarea la vederea de triangulație @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Creează diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ru.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ru.ts index 0c82353798..1776bf7246 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ru.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_ru.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Обратный инжиниринг - + Cylinder Цилиндр - + Approximate a cylinder Аппроксимировать цилиндр @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Обратный инжиниринг - + Plane... Плоскость... - + Approximate a plane Аппроксимировать плоскость @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Обратный инжиниринг - + Polynomial surface Полиномиальная поверхность - + Approximate a polynomial surface Аппроксимировать полиномиальную поверхность @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Обратный инжиниринг - + Sphere Сфера - + Approximate a sphere Аппроксимировать сферу @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Обратный инжиниринг - + Wire from mesh boundary... Ломаная линия из границ сетки... - + Create wire from mesh boundaries Создать провод из границ сетки @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Обратный инжиниринг - + Poisson... Пуассона... - + Poisson surface reconstruction Реконструкция поверхности Пуассона @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Обратный инжиниринг - + Mesh segmentation... Сегментация сетки... - + Create mesh segments Создать сегменты полигональной сетки @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Обратный инжиниринг - + From components Из компонентов - + Create mesh segments from components Создать сегменты сетки из компонентов @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Обратный инжиниринг - + Manual segmentation... Ручная сегментация... - + Create mesh segments manually Создать сегменты сетки вручную @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Обратный инжиниринг - + Structured point clouds Облака структурированных точек - - + + Triangulation of structured point clouds Триангуляция облаков структурированных точек @@ -203,47 +203,47 @@ Command - + Fit plane Разместить плоскость - + Fit cylinder Разместить цилиндр - + Fit sphere Разместить сферу - + Fit polynomial surface Разместить полиномиальную поверхность - + View triangulation Просмотреть триангуляцию - + Placement Расположение - + Fit B-Spline Разместить B-сплайн - + Poisson reconstruction Реконструирование поверхности Пуассона - + Segmentation Сегментация @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Ошибка ввода - + Wrong selection Неправильное выделение - + Please select a single placement object to get local orientation. Пожалуйста, выберите один объект размещения для получения локальной ориентации. @@ -375,7 +375,7 @@ Количество дискретных элементов на узел - + Input error Ошибка ввода @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Неправильное выделение - + Please select a point cloud or mesh. Пожалуйста, выберите облако точек или сетку. - + Please select a single point cloud. Пожалуйста, выберите одну точку облака. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Просмотр непросчитанной триангуляции @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Создать diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sl.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sl.ts index f4bc5f99b9..e6538bd5a2 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sl.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sl.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Vzvratni inženiring - + Cylinder Valj - + Approximate a cylinder Približek valja @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering - Vzvratni inženiring + Vzvratno inženirstvo - + Plane... Ravnina ... - + Approximate a plane Približek ravnine @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Vzvratno inženirstvo - + Polynomial surface Mnogočlensko površje - + Approximate a polynomial surface Približek mnogočlenskega površja @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Vzvratno inženirstvo - + Sphere Krogla - + Approximate a sphere Približek krogli @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Vzvratno inženirstvo - + Wire from mesh boundary... Črtovje iz robov ploskovja ... - + Create wire from mesh boundaries Ustvari žičje iz robov ploskovja @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Vzvratno inženirstvo - + Poisson... Poisson … - + Poisson surface reconstruction Ponovna zgraditev površine po Poissonu @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Vzvratno inženirstvo - + Mesh segmentation... Razčlenitev ploskovja ... - + Create mesh segments Ustvari odseke ploskovja @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Vzvratno inženirstvo - + From components Iz sestavin - + Create mesh segments from components Iz sestavin ustvari odseke ploskovij @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Vzvratno inženirstvo - + Manual segmentation... Ročna razčlenitev ... - + Create mesh segments manually Ročno naredit odseke ploskovja @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Vzvratno inženirstvo - + Structured point clouds Ustrojeni oblaki točk - - + + Triangulation of structured point clouds Trikotenje ustrojevanih točkovnih oblakov @@ -203,47 +203,47 @@ Command - + Fit plane Prilegaj ravnino - + Fit cylinder Prilegaj valj - + Fit sphere Prilegaj kroglo - + Fit polynomial surface Prilegaj mnogočlensko površje - + View triangulation Trikotenje pogleda - + Placement Postavitev - + Fit B-Spline Prilegaj B-zlepek - + Poisson reconstruction Ponovna zgraditev po Poissonu - + Segmentation Členitev @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Napaka vnosa - + Wrong selection Napačen izbor - + Please select a single placement object to get local orientation. Izberite eno postavitev objekta za pridobitev lokalne usmerjenosti. @@ -375,7 +375,7 @@ Vzorcev na vozlišče - + Input error Napaka vnosa @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Napačen izbor - + Please select a point cloud or mesh. Izberite oblak točk ali ploskovje. - + Please select a single point cloud. Izberite en točkovni oblak. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Trikotenje pogleda spodletelo @@ -521,7 +521,7 @@ Minimum number of faces - Najmanjše število ploskev + Najmanjše št. ploskev @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Ustvari @@ -577,7 +577,7 @@ Reverse Engineering - Vzvratno inženirstvo + Vzvratni inženiring
diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr-CS.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr-CS.ts index c6bccd69f4..f39a5e37cb 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr-CS.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr-CS.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Obrnuti inženjering - + Cylinder Valjak - + Approximate a cylinder Aproksimiraj valjak @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Obrnuti inženjering - + Plane... Ravan... - + Approximate a plane Aproksimiraj ravan @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Obrnuti inženjering - + Polynomial surface Polinomska površina - + Approximate a polynomial surface Aproksimiraj polinomsku površinu @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Obrnuti inženjering - + Sphere Lopta - + Approximate a sphere Aproksimiraj loptu @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Obrnuti inženjering - + Wire from mesh boundary... Žica od ivica mreže... - + Create wire from mesh boundaries Napravi žicu od ivica mreže @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Obrnuti inženjering - + Poisson... Poason... - + Poisson surface reconstruction Poasonova rekonstrukcija površine @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Obrnuti inženjering - + Mesh segmentation... Segmentacija mreže... - + Create mesh segments Napravi segmente mreže @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Obrnuti inženjering - + From components Od komponenti - + Create mesh segments from components Napravi segmente mreže od komponenti @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Obrnuti inženjering - + Manual segmentation... Ručna segmentacija... - + Create mesh segments manually Napravi segmente mreže ručno @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Obrnuti inženjering - + Structured point clouds Strukturirani oblaci tačaka - - + + Triangulation of structured point clouds Triangulacija strukturiranih oblaka tačaka @@ -203,47 +203,47 @@ Command - + Fit plane Uklopi ravan - + Fit cylinder Uklopi valjak - + Fit sphere Uklopi loptu - + Fit polynomial surface Uklopi polinomsku površinu - + View triangulation Prikaz triangulacije - + Placement Položaj - + Fit B-Spline Uklopi B-Splajn - + Poisson reconstruction Poasonova rekonstrukcija - + Segmentation Segmentacija @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Input error - + Wrong selection Pogrešan izbor - + Please select a single placement object to get local orientation. Izaberi jedan objekat Položaj da bi dobio lokalnu orijentaciju. @@ -375,7 +375,7 @@ Broj diskretnih elemenata po čvoru - + Input error Input error @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Pogrešan izbor - + Please select a point cloud or mesh. Izaberi oblak tačaka ili mrežu. - + Please select a single point cloud. Izaberi jedan oblak tačaka. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Prikaz triangulacije nije uspeo @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Napravi diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr.ts index db55cfd6e5..b190368842 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sr.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Обрнути инжењеринг - + Cylinder Ваљак - + Approximate a cylinder Апроксимирај ваљак @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Обрнути инжењеринг - + Plane... Раван... - + Approximate a plane Апроксимирај раван @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Обрнути инжењеринг - + Polynomial surface Полиномска површина - + Approximate a polynomial surface Апроксимирај полиномску површину @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Обрнути инжењеринг - + Sphere Лопта - + Approximate a sphere Апроксимирај лопту @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Обрнути инжењеринг - + Wire from mesh boundary... Жица од ивица мреже... - + Create wire from mesh boundaries Направи жицу од ивица мреже @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Обрнути инжењеринг - + Poisson... Поасон... - + Poisson surface reconstruction Поасонова реконструкција површине @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Обрнути инжењеринг - + Mesh segmentation... Сегментација мреже... - + Create mesh segments Направи сегмент мреже @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Обрнути инжењеринг - + From components Од компоненти - + Create mesh segments from components Направи сегменте мреже од компоненти @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Обрнути инжењеринг - + Manual segmentation... Ручна сегментација... - + Create mesh segments manually Направи сегменте мреже ручно @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Обрнути инжењеринг - + Structured point clouds Структурирани облаци тачака - - + + Triangulation of structured point clouds Триангулација структурираних облака тачака @@ -203,47 +203,47 @@ Command - + Fit plane Уклопи раван - + Fit cylinder Уклопи ваљак - + Fit sphere Уклопи лопту - + Fit polynomial surface Уклопи полиномски површину - + View triangulation Приказ триангулације - + Placement Положај - + Fit B-Spline Уклопи Б-Сплајн - + Poisson reconstruction Поасонова реконструкција - + Segmentation Сегментација @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Грешка приликом уноса - + Wrong selection Погрешан избор - + Please select a single placement object to get local orientation. Изабери један објекат Положај да би добио локалну оријентацију. @@ -375,7 +375,7 @@ Број дискретних елемената по чвору - + Input error Грешка приликом уноса @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Погрешан избор - + Please select a point cloud or mesh. Изабери облак тачака или мрежу. - + Please select a single point cloud. Изабери један облак тачака. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Приказ триангулације није успео @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Направи diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sv-SE.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sv-SE.ts index 8c63dff82b..63ac557500 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sv-SE.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_sv-SE.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Reverse Engineering - + Cylinder Cylinder - + Approximate a cylinder Approximera en cylinder @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Reverse Engineering - + Plane... Plan... - + Approximate a plane Approximera ett plan @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Reverse Engineering - + Polynomial surface Polynom yta - + Approximate a polynomial surface Approximera en polynom yta @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Reverse Engineering - + Sphere Sfär - + Approximate a sphere Approximera en sfär @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Reverse Engineering - + Wire from mesh boundary... Wire from mesh boundary... - + Create wire from mesh boundaries Create wire from mesh boundaries @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Reverse Engineering - + Poisson... Poisson... - + Poisson surface reconstruction Rekonstruktion av Poisson-yta @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Reverse Engineering - + Mesh segmentation... Mesh segmentation... - + Create mesh segments Skapa nät segment @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Reverse Engineering - + From components Från komponenter - + Create mesh segments from components Create mesh segments from components @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Reverse Engineering - + Manual segmentation... Manuell segmentering... - + Create mesh segments manually Create mesh segments manually @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Reverse Engineering - + Structured point clouds Strukturerade punktmoln - - + + Triangulation of structured point clouds Triangulering av strukturerade punktmoln @@ -203,47 +203,47 @@ Command - + Fit plane Passa plan - + Fit cylinder Passa cylinder - + Fit sphere Passa sfär - + Fit polynomial surface Passa polynom yta - + View triangulation Visa triangulering - + Placement Placering - + Fit B-Spline Passa B-Spline - + Poisson reconstruction Poisson reconstruction - + Segmentation Segmentering @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Inmatningsfel - + Wrong selection Fel val - + Please select a single placement object to get local orientation. Vänligen markera ett enstaka placeringsobjekt för att hämta lokal riktning. @@ -375,7 +375,7 @@ Urval per nod - + Input error Inmatningsfel @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Fel val - + Please select a point cloud or mesh. Please select a point cloud or mesh. - + Please select a single point cloud. Vänligen välj ett enstaka punktmoln. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Triangulering av vy misslyckades @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Skapa diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_tr.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_tr.ts index 42e05c6c53..2f73ddc730 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_tr.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_tr.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Tersine Mühendislik - + Cylinder Silindir - + Approximate a cylinder Bir silindir yaklaştırın @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Tersine Mühendislik - + Plane... Düzlem... - + Approximate a plane Bir düzlem yaklaştırın @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Tersine Mühendislik - + Polynomial surface Çokgensel yüzey - + Approximate a polynomial surface Bir çokgen yüzeyinin yaklaşık değeri @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Tersine Mühendislik - + Sphere Küre - + Approximate a sphere Bir kürenin yaklaşık değeri @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Tersine Mühendislik - + Wire from mesh boundary... Elek sınırından telle bağlayın... - + Create wire from mesh boundaries Elek sınırlarından tel oluşturun @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Tersine Mühendislik - + Poisson... Poisson Dağılımına isim veren Poisson... - + Poisson surface reconstruction Poisson yüzeyi yeniden inşası @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Tersine Mühendislik - + Mesh segmentation... Örgü bölütleme... - + Create mesh segments Kafes bölümleri oluştur @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Tersine Mühendislik - + From components Bileşenlerden - + Create mesh segments from components Bileşenlerden elek bölümleri oluşturun @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Tersine Mühendislik - + Manual segmentation... Elle bölümleme... - + Create mesh segments manually El yoluyla elek bölümleri oluşturun @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Tersine Mühendislik - + Structured point clouds Yapılandırılmış nokta bulutları - - + + Triangulation of structured point clouds Yapılandırılmış nokta bulutlarının üçgenliği @@ -203,47 +203,47 @@ Command - + Fit plane Düzleme sığdır - + Fit cylinder Silindire sığdır - + Fit sphere Küreye sığdır - + Fit polynomial surface Çokgensel yüzeye sığdır - + View triangulation Üçgenlemeyi göster - + Placement Yerleşim - + Fit B-Spline B-Spline'e sığdır - + Poisson reconstruction Poisson yüzey yeniden oluşumu - + Segmentation Bölümlenme @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Girdi hatası - + Wrong selection Yanlış seçim - + Please select a single placement object to get local orientation. Yerel yönlendirme almak için lütfen yalnızca bir tane yerleşim nesnesi seçin. @@ -375,7 +375,7 @@ Düğüm başına örnekler - + Input error Girdi hatası @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Yanlış seçim - + Please select a point cloud or mesh. Lütfen bir nokta bulutu veya kafes seçin. - + Please select a single point cloud. Bir tek nokta bulutu seçiniz. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Üçgenleme başarısız oldu @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Oluştur diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_uk.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_uk.ts index 2f5a0aad53..c72bc36281 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_uk.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_uk.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Зворотнє проектування - + Cylinder Циліндр - + Approximate a cylinder Приблизний циліндр @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Зворотнє проектування - + Plane... Площина... - + Approximate a plane Приблизна площина @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Зворотнє проектування - + Polynomial surface Поліноміальна поверхня - + Approximate a polynomial surface Апроксимація поліноміальної поверхні @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Зворотнє проектування - + Sphere Сфера - + Approximate a sphere Апроксимація сфери @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Зворотнє проектування - + Wire from mesh boundary... Грань із границі полігональної сітки... - + Create wire from mesh boundaries Створити грань в межах сітки @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Зворотнє проектування - + Poisson... Пуассона... - + Poisson surface reconstruction Реконструкція поверхні Пуассона @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Зворотнє проектування - + Mesh segmentation... Сегментація сітки... - + Create mesh segments Створити сегменти сітки @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Зворотнє проектування - + From components З компонентів - + Create mesh segments from components Створити сегменти полігональної сітка з компонентів @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Зворотнє проектування - + Manual segmentation... Ручна сегментація... - + Create mesh segments manually Створення сегментів полігональних сіток вручну @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Зворотнє проектування - + Structured point clouds Хмари структурованих точок - - + + Triangulation of structured point clouds Триангуляція хмар структурованих точок @@ -203,47 +203,47 @@ Command - + Fit plane Розмістити площину - + Fit cylinder Розмістити циліндр - + Fit sphere Розмістити сферу - + Fit polynomial surface Розмістити поліноміальну поверхню - + View triangulation Переглянути тріангуляцію - + Placement Розташувати - + Fit B-Spline Розмістити B-сплайн - + Poisson reconstruction Реконструкція Пуассона - + Segmentation Сегментація @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Помилка вводу - + Wrong selection Невірний вибір - + Please select a single placement object to get local orientation. Будь ласка, виберіть один об'єкт розміщення для отримання локальної орієнтації. @@ -375,7 +375,7 @@ Зразків на вузол - + Input error Помилка вводу @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Невірний вибір - + Please select a point cloud or mesh. Будь ласка, виберіть точку хмари або сітку. - + Please select a single point cloud. Оберіть одну точку хмари. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Перегляд непрорахованими тріангуляції @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Створити diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_val-ES.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_val-ES.ts index 9f5c3aa27a..eb515660aa 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_val-ES.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_val-ES.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering Enginyeria inversa - + Cylinder Cilindre - + Approximate a cylinder Aproxima un cilindre @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering Enginyeria inversa - + Plane... Pla... - + Approximate a plane Aproxima un pla @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering Enginyeria inversa - + Polynomial surface Superfície polinomial - + Approximate a polynomial surface Aproxima una superfície polinomial @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering Enginyeria inversa - + Sphere Esfera - + Approximate a sphere Aproxima una esfera @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering Enginyeria inversa - + Wire from mesh boundary... Filferro des del límit de la malla... - + Create wire from mesh boundaries Crea un filferro des dels límits de la malla @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering Enginyeria inversa - + Poisson... Poisson... - + Poisson surface reconstruction Reconstrucció de superfícies de Poisson @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering Enginyeria inversa - + Mesh segmentation... Segmentació de la malla... - + Create mesh segments Crea segments de malla @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering Enginyeria inversa - + From components Des dels components - + Create mesh segments from components Crea segments de malla a partir dels components @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering Enginyeria inversa - + Manual segmentation... Segmentació manual... - + Create mesh segments manually Crea segments de malla manualment @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering Enginyeria inversa - + Structured point clouds Núvols de punts estructurats - - + + Triangulation of structured point clouds Triangulació de núvols de punts estructurats @@ -203,47 +203,47 @@ Command - + Fit plane Fit plane - + Fit cylinder Fit cylinder - + Fit sphere Fit sphere - + Fit polynomial surface Fit polynomial surface - + View triangulation View triangulation - + Placement Posició - + Fit B-Spline Fit B-Spline - + Poisson reconstruction Poisson reconstruction - + Segmentation Segmentation @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error Input error - + Wrong selection Selecció incorrecta - + Please select a single placement object to get local orientation. Seleccioneu un sol objecte de posició per a obtindre l'orientació local. @@ -375,7 +375,7 @@ Mostres per node - + Input error Input error @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection Selecció incorrecta - + Please select a point cloud or mesh. Selecciona un núvol de punts o una malla. - + Please select a single point cloud. Seleccioneu un sol punt del núvol @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed Ha fallat la vista de triangulació. @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create Crea diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-CN.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-CN.ts index 640a0b4b46..8d73b991db 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-CN.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-CN.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering 逆向工程 - + Cylinder 圆柱体 - + Approximate a cylinder 近似一个圆柱体 @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering 逆向工程 - + Plane... 平面... - + Approximate a plane 近似一个平面 @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering 逆向工程 - + Polynomial surface 多项式表面 - + Approximate a polynomial surface 近似多项式表面 @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering 逆向工程 - + Sphere 球体 - + Approximate a sphere 近似一个球体 @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering 逆向工程 - + Wire from mesh boundary... 来自网格边界的导线... - + Create wire from mesh boundaries 从网格边界创建线 @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering 逆向工程 - + Poisson... 泊松... - + Poisson surface reconstruction 泊松曲面重构 @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering 逆向工程 - + Mesh segmentation... 网格分割... - + Create mesh segments 建立网格分割 @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering 逆向工程 - + From components 从组件 - + Create mesh segments from components 从组件创建网格线段 @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering 逆向工程 - + Manual segmentation... 手动分割... - + Create mesh segments manually 手动创建网格线段 @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering 逆向工程 - + Structured point clouds 结构化的点云 - - + + Triangulation of structured point clouds 结构点云的三角剖分 @@ -203,47 +203,47 @@ Command - + Fit plane 适合平面 - + Fit cylinder 适合圆柱体 - + Fit sphere 适合球体 - + Fit polynomial surface 适合多项式表面 - + View triangulation 查看三角剖分 - + Placement 定位 - + Fit B-Spline 适用于贝塞尔曲线 - + Poisson reconstruction 泊松曲面重构 - + Segmentation @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error 输入错误 - + Wrong selection 选择错误 - + Please select a single placement object to get local orientation. 请选择单个放置对象以获取本地方向。 @@ -375,7 +375,7 @@ 每个节点的示例 - + Input error 输入错误 @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection 选择错误 - + Please select a point cloud or mesh. 请选择一个点云或网格。 - + Please select a single point cloud. 请选择单一的点云。 @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed 视图三角化失败 @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create 创建 diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-TW.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-TW.ts index d291b052f1..d7166dff70 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-TW.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_zh-TW.ts @@ -4,17 +4,17 @@ CmdApproxCylinder - + Reverse Engineering 逆向工程 - + Cylinder 圓柱 - + Approximate a cylinder Approximate a cylinder @@ -22,17 +22,17 @@ CmdApproxPlane - + Reverse Engineering 逆向工程 - + Plane... Plane... - + Approximate a plane 模擬平面 @@ -40,17 +40,17 @@ CmdApproxPolynomial - + Reverse Engineering 逆向工程 - + Polynomial surface Polynomial surface - + Approximate a polynomial surface Approximate a polynomial surface @@ -58,17 +58,17 @@ CmdApproxSphere - + Reverse Engineering 逆向工程 - + Sphere 球體 - + Approximate a sphere Approximate a sphere @@ -94,17 +94,17 @@ CmdMeshBoundary - + Reverse Engineering 逆向工程 - + Wire from mesh boundary... Wire from mesh boundary... - + Create wire from mesh boundaries Create wire from mesh boundaries @@ -112,17 +112,17 @@ CmdPoissonReconstruction - + Reverse Engineering 逆向工程 - + Poisson... Poisson... - + Poisson surface reconstruction Poisson surface reconstruction @@ -130,17 +130,17 @@ CmdSegmentation - + Reverse Engineering 逆向工程 - + Mesh segmentation... Mesh segmentation... - + Create mesh segments 建立網格分割 @@ -148,17 +148,17 @@ CmdSegmentationFromComponents - + Reverse Engineering 逆向工程 - + From components From components - + Create mesh segments from components Create mesh segments from components @@ -166,17 +166,17 @@ CmdSegmentationManual - + Reverse Engineering 逆向工程 - + Manual segmentation... Manual segmentation... - + Create mesh segments manually Create mesh segments manually @@ -184,18 +184,18 @@ CmdViewTriangulation - + Reverse Engineering 逆向工程 - + Structured point clouds Structured point clouds - - + + Triangulation of structured point clouds Triangulation of structured point clouds @@ -203,47 +203,47 @@ Command - + Fit plane Fit plane - + Fit cylinder Fit cylinder - + Fit sphere Fit sphere - + Fit polynomial surface Fit polynomial surface - + View triangulation View triangulation - + Placement 佈置 - + Fit B-Spline Fit B-Spline - + Poisson reconstruction Poisson reconstruction - + Segmentation Segmentation @@ -331,18 +331,18 @@ ReenGui::FitBSplineSurfaceWidget - - + + Input error 輸入錯誤 - + Wrong selection 錯誤的選取 - + Please select a single placement object to get local orientation. Please select a single placement object to get local orientation. @@ -375,7 +375,7 @@ Samples per node - + Input error 輸入錯誤 @@ -383,18 +383,18 @@ Reen_ApproxSurface - - + + Wrong selection 錯誤的選取 - + Please select a point cloud or mesh. Please select a point cloud or mesh. - + Please select a single point cloud. Please select a single point cloud. @@ -402,7 +402,7 @@ Reen_ViewTriangulation - + View triangulation failed View triangulation failed @@ -567,7 +567,7 @@ ReverseEngineeringGui::TaskSegmentationManual - + Create 建立 diff --git a/src/Mod/ReverseEngineering/Gui/Segmentation.cpp b/src/Mod/ReverseEngineering/Gui/Segmentation.cpp index 2b57969a23..b28b6230fb 100644 --- a/src/Mod/ReverseEngineering/Gui/Segmentation.cpp +++ b/src/Mod/ReverseEngineering/Gui/Segmentation.cpp @@ -22,15 +22,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -38,8 +38,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -54,9 +54,9 @@ using namespace ReverseEngineeringGui; Segmentation::Segmentation(Mesh::Feature* mesh, QWidget* parent, Qt::WindowFlags fl) - : QWidget(parent, fl) - , ui(new Ui_Segmentation) - , myMesh(mesh) + : QWidget(parent, fl) + , ui(new Ui_Segmentation) + , myMesh(mesh) { ui->setupUi(this); ui->numPln->setRange(1, INT_MAX); @@ -69,8 +69,9 @@ Segmentation::~Segmentation() = default; void Segmentation::accept() { - if (myMesh.expired()) + if (myMesh.expired()) { return; + } Gui::WaitCursor wc; bool createUnused = ui->createUnused->isChecked(); @@ -96,8 +97,10 @@ void Segmentation::accept() // First create segments by curavture to get the surface type std::vector segm; if (ui->groupBoxPln->isChecked()) { - segm.emplace_back(std::make_shared - (meshCurv.GetCurvature(), ui->numPln->value(), ui->curvTolPln->value())); + segm.emplace_back( + std::make_shared(meshCurv.GetCurvature(), + ui->numPln->value(), + ui->curvTolPln->value())); } finder.FindSegments(segm); @@ -105,7 +108,8 @@ void Segmentation::accept() for (const auto& it : segm) { const std::vector& data = it->GetSegments(); - // For each planar segment compute a plane and use this then for a more accurate 2nd segmentation + // For each planar segment compute a plane and use this then for a more accurate 2nd + // segmentation if (strcmp(it->GetType(), "Plane") == 0) { for (const auto& jt : data) { std::vector indexes = kernel.GetFacetPoints(jt); @@ -114,9 +118,14 @@ void Segmentation::accept() if (fit.Fit() < FLOAT_MAX) { Base::Vector3f base = fit.GetBase(); Base::Vector3f axis = fit.GetNormal(); - MeshCore::AbstractSurfaceFit* fitter = new MeshCore::PlaneSurfaceFit(base, axis); - segmSurf.emplace_back(std::make_shared - (fitter, kernel, ui->numPln->value(), ui->distToPln->value())); + MeshCore::AbstractSurfaceFit* fitter = + new MeshCore::PlaneSurfaceFit(base, axis); + segmSurf.emplace_back( + std::make_shared( + fitter, + kernel, + ui->numPln->value(), + ui->distToPln->value())); } } } @@ -129,8 +138,8 @@ void Segmentation::accept() std::string internalname = "Segments_"; internalname += myMesh->getNameInDocument(); - App::DocumentObjectGroup* group = static_cast(document->addObject - ("App::DocumentObjectGroup", internalname.c_str())); + App::DocumentObjectGroup* group = static_cast( + document->addObject("App::DocumentObjectGroup", internalname.c_str())); std::string labelname = "Segments "; labelname += myMesh->Label.getValue(); group->Label.setValue(labelname); @@ -140,8 +149,8 @@ void Segmentation::accept() for (const auto& it : segmSurf) { const std::vector& data = it->GetSegments(); - std::shared_ptr genSegm = std::dynamic_pointer_cast - (it); + std::shared_ptr genSegm = + std::dynamic_pointer_cast(it); bool isPlanar = (strcmp(genSegm->GetType(), "Plane") == 0); for (const auto& jt : data) { @@ -149,7 +158,8 @@ void Segmentation::accept() algo.ResetFacetsFlag(jt, MeshCore::MeshFacet::TMP0); Mesh::MeshObject* segment = mesh->meshFromSegment(jt); - Mesh::Feature* feaSegm = static_cast(group->addObject("Mesh::Feature", "Segment")); + Mesh::Feature* feaSegm = + static_cast(group->addObject("Mesh::Feature", "Segment")); Mesh::MeshObject* feaMesh = feaSegm->Mesh.startEditing(); feaMesh->swap(*segment); feaSegm->Mesh.finishEditing(); @@ -160,7 +170,7 @@ void Segmentation::accept() feaSegm->Label.setValue(label.str()); if (createCompound) { - std::list > bounds; + std::list> bounds; algo.GetFacetBorders(jt, bounds); // Handle planar segments @@ -172,16 +182,22 @@ void Segmentation::accept() Handle(Geom_Plane) hPlane(new Geom_Plane(loc, dir)); std::vector wires; - for (const auto & bound : bounds) { + for (const auto& bound : bounds) { // project the points onto the surface std::vector polygon; - std::transform(bound.begin(), bound.end(), std::back_inserter(polygon), [&hPlane](const Base::Vector3f& v) { - gp_Pnt p(v.x, v.y, v.z); - return GeomAPI_ProjectPointOnSurf(p, hPlane).NearestPoint(); - }); + std::transform( + bound.begin(), + bound.end(), + std::back_inserter(polygon), + [&hPlane](const Base::Vector3f& v) { + gp_Pnt p(v.x, v.y, v.z); + return GeomAPI_ProjectPointOnSurf(p, hPlane).NearestPoint(); + }); BRepBuilderAPI_MakePolygon mkPoly; - for (std::vector::reverse_iterator it = polygon.rbegin(); it != polygon.rend(); ++it) { + for (std::vector::reverse_iterator it = polygon.rbegin(); + it != polygon.rend(); + ++it) { mkPoly.Add(*it); } if (mkPoly.IsDone()) { @@ -196,12 +212,14 @@ void Segmentation::accept() } else { failures.push_back(feaSegm); - Base::Console().Warning("Failed to create face from %s\n", feaSegm->Label.getValue()); + Base::Console().Warning("Failed to create face from %s\n", + feaSegm->Label.getValue()); } } catch (Standard_Failure&) { failures.push_back(feaSegm); - Base::Console().Error("Fatal failure to create face from %s\n", feaSegm->Label.getValue()); + Base::Console().Error("Fatal failure to create face from %s\n", + feaSegm->Label.getValue()); } } } @@ -215,20 +233,22 @@ void Segmentation::accept() if (!unusedFacets.empty()) { std::unique_ptr segment(mesh->meshFromSegment(unusedFacets)); - Mesh::Feature* feaSegm = static_cast(group->addObject("Mesh::Feature", "Unused")); + Mesh::Feature* feaSegm = + static_cast(group->addObject("Mesh::Feature", "Unused")); Mesh::MeshObject* feaMesh = feaSegm->Mesh.startEditing(); feaMesh->swap(*segment); feaSegm->Mesh.finishEditing(); } } if (createCompound) { - Part::Feature* shapeFea = static_cast(group->addObject("Part::Feature", "Compound")); + Part::Feature* shapeFea = + static_cast(group->addObject("Part::Feature", "Compound")); shapeFea->Shape.setValue(compound); // create a sub-group where to move the problematic segments if (!failures.empty()) { - App::DocumentObjectGroup* subgroup = static_cast(group->addObject - ("App::DocumentObjectGroup", "Failed")); + App::DocumentObjectGroup* subgroup = static_cast( + group->addObject("App::DocumentObjectGroup", "Failed")); failures = group->removeObjects(failures); subgroup->Group.setValues(failures); } @@ -237,7 +257,7 @@ void Segmentation::accept() document->commitTransaction(); } -void Segmentation::changeEvent(QEvent *e) +void Segmentation::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -252,8 +272,7 @@ void Segmentation::changeEvent(QEvent *e) TaskSegmentation::TaskSegmentation(Mesh::Feature* mesh) { widget = new Segmentation(mesh); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/ReverseEngineering/Gui/Segmentation.h b/src/Mod/ReverseEngineering/Gui/Segmentation.h index 666f1895ac..988282b823 100644 --- a/src/Mod/ReverseEngineering/Gui/Segmentation.h +++ b/src/Mod/ReverseEngineering/Gui/Segmentation.h @@ -32,22 +32,28 @@ // forward declarations -namespace Mesh { class Feature; } +namespace Mesh +{ +class Feature; +} -namespace ReverseEngineeringGui { +namespace ReverseEngineeringGui +{ class Ui_Segmentation; -class Segmentation : public QWidget +class Segmentation: public QWidget { Q_OBJECT public: - explicit Segmentation(Mesh::Feature* mesh, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); + explicit Segmentation(Mesh::Feature* mesh, + QWidget* parent = nullptr, + Qt::WindowFlags fl = Qt::WindowFlags()); ~Segmentation() override; void accept(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; @@ -57,7 +63,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskSegmentation : public Gui::TaskView::TaskDialog +class TaskSegmentation: public Gui::TaskView::TaskDialog { public: explicit TaskSegmentation(Mesh::Feature* mesh); @@ -66,13 +72,15 @@ public: bool accept() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: Segmentation* widget; Gui::TaskView::TaskBox* taskbox; }; -} +} // namespace ReverseEngineeringGui -#endif // REVERSEENGINEERINGGUI_SEGMENTATION_H +#endif // REVERSEENGINEERINGGUI_SEGMENTATION_H diff --git a/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp b/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp index 8690594da6..9e949f73de 100644 --- a/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp +++ b/src/Mod/ReverseEngineering/Gui/SegmentationManual.cpp @@ -22,15 +22,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include #include #include #include -#include #include +#include #include #include #include @@ -42,8 +42,8 @@ using namespace ReverseEngineeringGui; SegmentationManual::SegmentationManual(QWidget* parent, Qt::WindowFlags fl) - : QWidget(parent, fl) - , ui(new Ui_SegmentationManual) + : QWidget(parent, fl) + , ui(new Ui_SegmentationManual) { ui->setupUi(this); setupConnections(); @@ -60,31 +60,47 @@ SegmentationManual::~SegmentationManual() = default; void SegmentationManual::setupConnections() { - connect(ui->selectRegion, &QPushButton::clicked, - this, &SegmentationManual::onSelectRegionClicked); - connect(ui->selectAll, &QPushButton::clicked, - this, &SegmentationManual::onSelectAllClicked); - connect(ui->selectComponents, &QPushButton::clicked, - this, &SegmentationManual::onSelectComponentsClicked); - connect(ui->selectTriangle, &QPushButton::clicked, - this, &SegmentationManual::onSelectTriangleClicked); - connect(ui->deselectAll, &QPushButton::clicked, - this, &SegmentationManual::onDeselectAllClicked); - connect(ui->visibleTriangles, &QCheckBox::toggled, - this, &SegmentationManual::onVisibleTrianglesToggled); - connect(ui->screenTriangles, &QCheckBox::toggled, - this, &SegmentationManual::onScreenTrianglesToggled); - connect(ui->cbSelectComp, &QCheckBox::toggled, - this, &SegmentationManual::onSelectCompToggled); - connect(ui->planeDetect, &QPushButton::clicked, - this, &SegmentationManual::onPlaneDetectClicked); - connect(ui->cylinderDetect, &QPushButton::clicked, - this, &SegmentationManual::onCylinderDetectClicked); - connect(ui->sphereDetect, &QPushButton::clicked, - this, &SegmentationManual::onSphereDetectClicked); + connect(ui->selectRegion, + &QPushButton::clicked, + this, + &SegmentationManual::onSelectRegionClicked); + connect(ui->selectAll, &QPushButton::clicked, this, &SegmentationManual::onSelectAllClicked); + connect(ui->selectComponents, + &QPushButton::clicked, + this, + &SegmentationManual::onSelectComponentsClicked); + connect(ui->selectTriangle, + &QPushButton::clicked, + this, + &SegmentationManual::onSelectTriangleClicked); + connect(ui->deselectAll, + &QPushButton::clicked, + this, + &SegmentationManual::onDeselectAllClicked); + connect(ui->visibleTriangles, + &QCheckBox::toggled, + this, + &SegmentationManual::onVisibleTrianglesToggled); + connect(ui->screenTriangles, + &QCheckBox::toggled, + this, + &SegmentationManual::onScreenTrianglesToggled); + connect(ui->cbSelectComp, &QCheckBox::toggled, this, &SegmentationManual::onSelectCompToggled); + connect(ui->planeDetect, + &QPushButton::clicked, + this, + &SegmentationManual::onPlaneDetectClicked); + connect(ui->cylinderDetect, + &QPushButton::clicked, + this, + &SegmentationManual::onCylinderDetectClicked); + connect(ui->sphereDetect, + &QPushButton::clicked, + this, + &SegmentationManual::onSphereDetectClicked); } -void SegmentationManual::changeEvent(QEvent *e) +void SegmentationManual::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -131,55 +147,64 @@ void SegmentationManual::onSelectCompToggled(bool on) meshSel.setAddComponentOnClick(on); } -class SegmentationManual::Private { -public: -static void findGeometry(int minFaces, double tolerance, - std::function&, - const std::vector&)> fitFunc) +class SegmentationManual::Private { - Gui::Document* gdoc = Gui::Application::Instance->activeDocument(); - if (!gdoc) - return; +public: + static void findGeometry( + int minFaces, + double tolerance, + std::function&, + const std::vector&)> fitFunc) + { + Gui::Document* gdoc = Gui::Application::Instance->activeDocument(); + if (!gdoc) { + return; + } - App::Document* adoc = gdoc->getDocument(); - std::vector meshes = adoc->getObjectsOfType(); - for (auto it : meshes) { - MeshGui::ViewProviderMesh* vpm = static_cast(gdoc->getViewProvider(it)); - const Mesh::MeshObject& mesh = it->Mesh.getValue(); + App::Document* adoc = gdoc->getDocument(); + std::vector meshes = adoc->getObjectsOfType(); + for (auto it : meshes) { + MeshGui::ViewProviderMesh* vpm = + static_cast(gdoc->getViewProvider(it)); + const Mesh::MeshObject& mesh = it->Mesh.getValue(); - if (mesh.hasSelectedFacets()) { - const MeshCore::MeshKernel& kernel = mesh.getKernel(); + if (mesh.hasSelectedFacets()) { + const MeshCore::MeshKernel& kernel = mesh.getKernel(); - std::vector facets; - std::vector vertexes; - mesh.getFacetsFromSelection(facets); - vertexes = mesh.getPointsFromFacets(facets); - MeshCore::MeshPointArray coords = kernel.GetPoints(vertexes); + std::vector facets; + std::vector vertexes; + mesh.getFacetsFromSelection(facets); + vertexes = mesh.getPointsFromFacets(facets); + MeshCore::MeshPointArray coords = kernel.GetPoints(vertexes); - std::vector points, normals; - normals = kernel.GetFacetNormals(facets); - points.insert(points.end(), coords.begin(), coords.end()); - coords.clear(); + std::vector points, normals; + normals = kernel.GetFacetNormals(facets); + points.insert(points.end(), coords.begin(), coords.end()); + coords.clear(); - MeshCore::AbstractSurfaceFit* surfFit = fitFunc(points, normals); - if (surfFit) { - MeshCore::MeshSegmentAlgorithm finder(kernel); + MeshCore::AbstractSurfaceFit* surfFit = fitFunc(points, normals); + if (surfFit) { + MeshCore::MeshSegmentAlgorithm finder(kernel); - std::vector segm; - segm.emplace_back(std::make_shared - (surfFit, kernel, minFaces, tolerance)); - finder.FindSegments(segm); + std::vector segm; + segm.emplace_back( + std::make_shared( + surfFit, + kernel, + minFaces, + tolerance)); + finder.FindSegments(segm); - for (const auto& segmIt : segm) { - const std::vector& data = segmIt->GetSegments(); - for (const auto& dataIt : data) { - vpm->addSelection(dataIt); + for (const auto& segmIt : segm) { + const std::vector& data = segmIt->GetSegments(); + for (const auto& dataIt : data) { + vpm->addSelection(dataIt); + } } } } } } -} }; void SegmentationManual::onPlaneDetectClicked() @@ -248,8 +273,9 @@ void SegmentationManual::onSphereDetectClicked() void SegmentationManual::createSegment() { Gui::Document* gdoc = Gui::Application::Instance->activeDocument(); - if (!gdoc) + if (!gdoc) { return; + } // delete all selected faces App::Document* adoc = gdoc->getDocument(); gdoc->openCommand(QT_TRANSLATE_NOOP("Command", "Segmentation")); @@ -269,7 +295,8 @@ void SegmentationManual::createSegment() algo.GetFacetsFlag(facets, MeshCore::MeshFacet::SELECTED); std::unique_ptr segment(mesh.meshFromSegment(facets)); - Mesh::Feature* feaSegm = static_cast(adoc->addObject("Mesh::Feature", "Segment")); + Mesh::Feature* feaSegm = + static_cast(adoc->addObject("Mesh::Feature", "Segment")); Mesh::MeshObject* feaMesh = feaSegm->Mesh.startEditing(); feaMesh->swap(*segment); feaMesh->clearFacetSelection(); @@ -287,10 +314,12 @@ void SegmentationManual::createSegment() } } - if (!selected) + if (!selected) { gdoc->abortCommand(); - else + } + else { gdoc->commitCommand(); + } meshSel.clearSelection(); } @@ -314,8 +343,7 @@ void SegmentationManual::reject() TaskSegmentationManual::TaskSegmentationManual() { widget = new SegmentationManual(); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/ReverseEngineering/Gui/SegmentationManual.h b/src/Mod/ReverseEngineering/Gui/SegmentationManual.h index 7309b8779c..dee9bc47c9 100644 --- a/src/Mod/ReverseEngineering/Gui/SegmentationManual.h +++ b/src/Mod/ReverseEngineering/Gui/SegmentationManual.h @@ -32,7 +32,8 @@ #include -namespace ReverseEngineeringGui { +namespace ReverseEngineeringGui +{ class Ui_SegmentationManual; /** @@ -40,7 +41,7 @@ class Ui_SegmentationManual; * of a mesh. * @author Werner Mayer */ -class SegmentationManual : public QWidget +class SegmentationManual: public QWidget { Q_OBJECT @@ -65,7 +66,7 @@ public: void onSphereDetectClicked(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: class Private; @@ -78,7 +79,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskSegmentationManual : public Gui::TaskView::TaskDialog +class TaskSegmentationManual: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -90,9 +91,13 @@ public: void clicked(int) override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Close; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Close; + } bool isAllowedAlterDocument() const override - { return true; } + { + return true; + } void modifyStandardButtons(QDialogButtonBox*) override; private: @@ -100,6 +105,6 @@ private: Gui::TaskView::TaskBox* taskbox; }; -} +} // namespace ReverseEngineeringGui -#endif // REVERSEENGINEERINGGUI_SEGMENTATIONMANUAL_H +#endif // REVERSEENGINEERINGGUI_SEGMENTATIONMANUAL_H diff --git a/src/Mod/ReverseEngineering/Gui/Workbench.cpp b/src/Mod/ReverseEngineering/Gui/Workbench.cpp index b58cde4b96..fcc098aba7 100644 --- a/src/Mod/ReverseEngineering/Gui/Workbench.cpp +++ b/src/Mod/ReverseEngineering/Gui/Workbench.cpp @@ -30,7 +30,7 @@ using namespace ReverseEngineeringGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Reverse Engineering"); #endif @@ -49,13 +49,13 @@ Gui::MenuItem* Workbench::setupMenuBar() const root->insertItem(item, reen); reen->setCommand("&Reverse Engineering"); - Gui::MenuItem *reconstruct = new Gui::MenuItem(); + Gui::MenuItem* reconstruct = new Gui::MenuItem(); reconstruct->setCommand("Surface reconstruction"); *reconstruct << "Reen_PoissonReconstruction" << "Reen_ViewTriangulation"; *reen << reconstruct; - Gui::MenuItem *segm = new Gui::MenuItem(); + Gui::MenuItem* segm = new Gui::MenuItem(); segm->setCommand("Segmentation"); *segm << "Mesh_RemeshGmsh" << "Mesh_VertexCurvature" @@ -67,7 +67,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Reen_MeshBoundary"; *reen << segm; - Gui::MenuItem *approx = new Gui::MenuItem(); + Gui::MenuItem* approx = new Gui::MenuItem(); approx->setCommand("Approximation"); *approx << "Reen_ApproxPlane" << "Reen_ApproxCylinder" @@ -75,7 +75,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Reen_ApproxPolynomial" << "Separator" << "Reen_ApproxSurface"; - *reen << approx; + *reen << approx; return root; } @@ -86,7 +86,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const Gui::ToolBarItem* part = new Gui::ToolBarItem(root); part->setCommand("Reverse Engineering"); *part << "Reen_ApproxSurface"; - return root; + return root; } Gui::ToolBarItem* Workbench::setupCommandBars() const @@ -95,4 +95,3 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const Gui::ToolBarItem* root = new Gui::ToolBarItem; return root; } - diff --git a/src/Mod/ReverseEngineering/Gui/Workbench.h b/src/Mod/ReverseEngineering/Gui/Workbench.h index 5c04fcca9d..945cdf9255 100644 --- a/src/Mod/ReverseEngineering/Gui/Workbench.h +++ b/src/Mod/ReverseEngineering/Gui/Workbench.h @@ -26,12 +26,13 @@ #include -namespace ReverseEngineeringGui { +namespace ReverseEngineeringGui +{ /** * @author Werner Mayer */ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -45,7 +46,7 @@ protected: Gui::ToolBarItem* setupCommandBars() const override; }; -} // namespace ReverseEngineeringGui +} // namespace ReverseEngineeringGui -#endif // REENGUI_WORKBENCH_H +#endif // REENGUI_WORKBENCH_H diff --git a/src/Mod/ReverseEngineering/InitGui.py b/src/Mod/ReverseEngineering/InitGui.py index 7b647c2b5a..148bc9b369 100644 --- a/src/Mod/ReverseEngineering/InitGui.py +++ b/src/Mod/ReverseEngineering/InitGui.py @@ -1,25 +1,25 @@ -#*************************************************************************** -#* Copyright (c) 2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # ReverseEngineering gui init module # @@ -28,10 +28,14 @@ # runs when the gui is up -class ReverseEngineeringWorkbench ( Workbench ): +class ReverseEngineeringWorkbench(Workbench): "ReverseEngineering workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/ReverseEngineering/Resources/icons/ReverseEngineeringWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + + "Mod/ReverseEngineering/Resources/icons/ReverseEngineeringWorkbench.svg" + ) self.__class__.MenuText = "Reverse Engineering" self.__class__.ToolTip = "Reverse Engineering workbench" @@ -39,7 +43,9 @@ class ReverseEngineeringWorkbench ( Workbench ): # load the module import ReverseEngineeringGui import ReverseEngineering + def GetClassName(self): return "ReverseEngineeringGui::Workbench" + Gui.addWorkbench(ReverseEngineeringWorkbench()) diff --git a/src/Mod/ReverseEngineering/ReverseEngineeringGlobal.h b/src/Mod/ReverseEngineering/ReverseEngineeringGlobal.h index 329692bba2..3e4ac265cf 100644 --- a/src/Mod/ReverseEngineering/ReverseEngineeringGlobal.h +++ b/src/Mod/ReverseEngineering/ReverseEngineeringGlobal.h @@ -29,19 +29,19 @@ // Reen #ifndef ReenExport #ifdef ReverseEngineering_EXPORTS -# define ReenExport FREECAD_DECL_EXPORT +#define ReenExport FREECAD_DECL_EXPORT #else -# define ReenExport FREECAD_DECL_IMPORT +#define ReenExport FREECAD_DECL_IMPORT #endif #endif // ReenGui #ifndef ReenGuiExport #ifdef ReverseEngineeringGui_EXPORTS -# define ReenGuiExport FREECAD_DECL_EXPORT +#define ReenGuiExport FREECAD_DECL_EXPORT #else -# define ReenGuiExport FREECAD_DECL_IMPORT +#define ReenGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //REEN_GLOBAL_H +#endif // REEN_GLOBAL_H diff --git a/src/Mod/ReverseEngineering/reverseengineering.dox b/src/Mod/ReverseEngineering/reverseengineering.dox index a3ebec68e8..6eea5afcc1 100644 --- a/src/Mod/ReverseEngineering/reverseengineering.dox +++ b/src/Mod/ReverseEngineering/reverseengineering.dox @@ -5,4 +5,3 @@ See \ref src/Mod/Draft/draft.dox as an example of how to populate this page */ - diff --git a/src/Mod/Robot/App/AppRobot.cpp b/src/Mod/Robot/App/AppRobot.cpp index 7da22192c3..d0b7051ef7 100644 --- a/src/Mod/Robot/App/AppRobot.cpp +++ b/src/Mod/Robot/App/AppRobot.cpp @@ -27,8 +27,8 @@ #include "Edge2TracObject.h" #include "PropertyTrajectory.h" -#include "Robot6AxisPy.h" #include "Robot6Axis.h" +#include "Robot6AxisPy.h" #include "RobotObject.h" #include "Simulation.h" #include "Trajectory.h" @@ -36,39 +36,48 @@ #include "TrajectoryDressUpObject.h" #include "TrajectoryObject.h" #include "TrajectoryPy.h" -#include "WaypointPy.h" #include "Waypoint.h" +#include "WaypointPy.h" -namespace Robot { -class Module : public Py::ExtensionModule +namespace Robot +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Robot") + Module() + : Py::ExtensionModule("Robot") { - add_varargs_method("simulateToFile",&Module::simulateToFile, - "simulateToFile(Robot,Trajectory,TickSize,FileName) - runs the simulation and write the result to a file." - ); - initialize("This module is the Robot module."); // register with Python + add_varargs_method("simulateToFile", + &Module::simulateToFile, + "simulateToFile(Robot,Trajectory,TickSize,FileName) - runs the " + "simulation and write the result to a file."); + initialize("This module is the Robot module."); // register with Python } private: Py::Object simulateToFile(const Py::Tuple& args) { - PyObject *pcRobObj; - PyObject *pcTracObj; + PyObject* pcRobObj; + PyObject* pcTracObj; float tick; char* FileName; - if (!PyArg_ParseTuple(args.ptr(), "O!O!fs", &(Robot6AxisPy::Type), &pcRobObj, - &(TrajectoryPy::Type), &pcTracObj, - &tick,&FileName)) + if (!PyArg_ParseTuple(args.ptr(), + "O!O!fs", + &(Robot6AxisPy::Type), + &pcRobObj, + &(TrajectoryPy::Type), + &pcTracObj, + &tick, + &FileName)) { throw Py::Exception(); + } try { - Robot::Trajectory &Trac = * static_cast(pcTracObj)->getTrajectoryPtr(); - Robot::Robot6Axis &Rob = * static_cast(pcRobObj)->getRobot6AxisPtr(); - Simulation Sim(Trac,Rob); + Robot::Trajectory& Trac = *static_cast(pcTracObj)->getTrajectoryPtr(); + Robot::Robot6Axis& Rob = *static_cast(pcRobObj)->getRobot6AxisPtr(); + Simulation Sim(Trac, Rob); } catch (const Base::Exception& e) { throw Py::RuntimeError(e.what()); @@ -83,12 +92,13 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Robot +} // namespace Robot /* Python entry */ PyMOD_INIT_FUNC(Robot) { + // clang-format off // load dependent module try { Base::Interpreter().runString("import Part"); @@ -122,4 +132,5 @@ PyMOD_INIT_FUNC(Robot) Robot::TrajectoryDressUpObject ::init(); PyMOD_Return(robotModule); + // clang-format on } diff --git a/src/Mod/Robot/App/Edge2TracObject.cpp b/src/Mod/Robot/App/Edge2TracObject.cpp index 051920197e..4c8543bbcf 100644 --- a/src/Mod/Robot/App/Edge2TracObject.cpp +++ b/src/Mod/Robot/App/Edge2TracObject.cpp @@ -22,15 +22,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include -#include #include +#include #include "Edge2TracObject.h" #include "Trajectory.h" @@ -46,221 +46,232 @@ PROPERTY_SOURCE(Robot::Edge2TracObject, Robot::TrajectoryObject) Edge2TracObject::Edge2TracObject() { - ADD_PROPERTY_TYPE( Source, (nullptr) , "Edge2Trac",Prop_None,"Edges to generate the Trajectory"); - ADD_PROPERTY_TYPE( SegValue, (0.5), "Edge2Trac",Prop_None,"Max deviation from original geometry"); - ADD_PROPERTY_TYPE( UseRotation, (0) , "Edge2Trac",Prop_None,"use orientation of the edge"); + ADD_PROPERTY_TYPE(Source, + (nullptr), + "Edge2Trac", + Prop_None, + "Edges to generate the Trajectory"); + ADD_PROPERTY_TYPE(SegValue, + (0.5), + "Edge2Trac", + Prop_None, + "Max deviation from original geometry"); + ADD_PROPERTY_TYPE(UseRotation, (0), "Edge2Trac", Prop_None, "use orientation of the edge"); NbrOfEdges = 0; NbrOfCluster = 0; } -App::DocumentObjectExecReturn *Edge2TracObject::execute() +App::DocumentObjectExecReturn* Edge2TracObject::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No object linked"); - if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!link->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { return new App::DocumentObjectExecReturn("Linked object is not a Part object"); - Part::Feature *base = static_cast(Source.getValue()); + } + Part::Feature* base = static_cast(Source.getValue()); const Part::TopoShape& TopShape = base->Shape.getShape(); const std::vector& SubVals = Source.getSubValuesStartsWith("Edge"); - if (SubVals.empty()) + if (SubVals.empty()) { return new App::DocumentObjectExecReturn("No Edges specified"); + } - // container for all the edges + // container for all the edges std::vector edges; // run through the edge name and get the real objects from the TopoShape - for (const auto & SubVal : SubVals) { - TopoDS_Edge edge = TopoDS::Edge(TopShape.getSubShape(SubVal.c_str())); - edges.push_back(edge); + for (const auto& SubVal : SubVals) { + TopoDS_Edge edge = TopoDS::Edge(TopShape.getSubShape(SubVal.c_str())); + edges.push_back(edge); } - // instantiate an edge cluster sorter and get the result + // instantiate an edge cluster sorter and get the result Part::Edgecluster acluster(edges); Part::tEdgeClusterVector aclusteroutput = acluster.GetClusters(); - if(aclusteroutput.empty()) + if (aclusteroutput.empty()) { return new App::DocumentObjectExecReturn("No Edges specified"); + } - // set the number of cluster and edges + // set the number of cluster and edges NbrOfCluster = aclusteroutput.size(); NbrOfEdges = 0; - for(const auto & it : aclusteroutput) + for (const auto& it : aclusteroutput) { NbrOfEdges += it.size(); + } // trajectory to fill Robot::Trajectory trac; bool first = true; // cycle through the cluster - for(const auto & it : aclusteroutput) - { + for (const auto& it : aclusteroutput) { // cycle through the edges of the cluster - for(const auto& it2 : it) - { + for (const auto& it2 : it) { BRepAdaptor_Curve adapt(it2); - - switch(adapt.GetType()) - { - case GeomAbs_Line: - { - // get start and end point - gp_Pnt P1 = adapt.Value(adapt.FirstParameter()); - gp_Pnt P2 = adapt.Value(adapt.LastParameter()); - Base::Rotation R1; - Base::Rotation R2; + switch (adapt.GetType()) { + case GeomAbs_Line: { + // get start and end point + gp_Pnt P1 = adapt.Value(adapt.FirstParameter()); + gp_Pnt P2 = adapt.Value(adapt.LastParameter()); - // if orientation is used - if(UseRotation.getValue()) { - // here get the orientation of the start and end point... - //R1 = ; - //R2 = ; + Base::Rotation R1; + Base::Rotation R2; - } + // if orientation is used + if (UseRotation.getValue()) { + // here get the orientation of the start and end point... + // R1 = ; + // R2 = ; + } - // if reverse orintation, switch the points - if ( it2.Orientation() == TopAbs_REVERSED ) - { - //switch the points and orientation - gp_Pnt tmpP = P1; - Base::Rotation tmpR = R1; - P1 = P2; - R1 = R2; - R2 = tmpR; - P2 = tmpP; - } - if(first){ - Waypoint wp("Pt",Base::Placement(Base::Vector3d(P1.X(),P1.Y(),P1.Z()),R1)); + // if reverse orintation, switch the points + if (it2.Orientation() == TopAbs_REVERSED) { + // switch the points and orientation + gp_Pnt tmpP = P1; + Base::Rotation tmpR = R1; + P1 = P2; + R1 = R2; + R2 = tmpR; + P2 = tmpP; + } + if (first) { + Waypoint wp("Pt", + Base::Placement(Base::Vector3d(P1.X(), P1.Y(), P1.Z()), R1)); + trac.addWaypoint(wp); + first = false; + } + Waypoint wp("Pt", Base::Placement(Base::Vector3d(P2.X(), P2.Y(), P2.Z()), R2)); trac.addWaypoint(wp); - first = false; + break; } - Waypoint wp("Pt",Base::Placement(Base::Vector3d(P2.X(),P2.Y(),P2.Z()),R2)); - trac.addWaypoint(wp); - break; - } - case GeomAbs_BSplineCurve: - { - Standard_Real Length = CPnts_AbscissaPoint::Length(adapt); - Standard_Real ParLength = adapt.LastParameter()-adapt.FirstParameter(); - Standard_Real NbrSegments = Round(Length / SegValue.getValue()); + case GeomAbs_BSplineCurve: { + Standard_Real Length = CPnts_AbscissaPoint::Length(adapt); + Standard_Real ParLength = adapt.LastParameter() - adapt.FirstParameter(); + Standard_Real NbrSegments = Round(Length / SegValue.getValue()); - Standard_Real beg = adapt.FirstParameter(); - Standard_Real end = adapt.LastParameter(); - Standard_Real stp = ParLength / NbrSegments; - bool reversed = false; - if (it2.Orientation() == TopAbs_REVERSED) { - std::swap(beg, end); - stp = - stp; - reversed = true; - } + Standard_Real beg = adapt.FirstParameter(); + Standard_Real end = adapt.LastParameter(); + Standard_Real stp = ParLength / NbrSegments; + bool reversed = false; + if (it2.Orientation() == TopAbs_REVERSED) { + std::swap(beg, end); + stp = -stp; + reversed = true; + } - if (first) - first = false; - else - beg += stp; - Base::SequencerLauncher seq("Create waypoints", static_cast((end-beg)/stp)); - if(reversed) - { - for (;beg > end; beg += stp) { - gp_Pnt P = adapt.Value(beg); - Base::Rotation R1; - // if orientation is used - if(UseRotation.getValue()) { - // here get the orientation of the start and end point... - //R1 = ; + if (first) { + first = false; + } + else { + beg += stp; + } + Base::SequencerLauncher seq("Create waypoints", + static_cast((end - beg) / stp)); + if (reversed) { + for (; beg > end; beg += stp) { + gp_Pnt P = adapt.Value(beg); + Base::Rotation R1; + // if orientation is used + if (UseRotation.getValue()) { + // here get the orientation of the start and end point... + // R1 = ; + } + + Waypoint wp("Pt", + Base::Placement(Base::Vector3d(P.X(), P.Y(), P.Z()), R1)); + trac.addWaypoint(wp); + seq.next(); } - - Waypoint wp("Pt",Base::Placement(Base::Vector3d(P.X(),P.Y(),P.Z()),R1)); - trac.addWaypoint(wp); - seq.next(); - } - } - else - { - for (;beg < end; beg += stp) { - gp_Pnt P = adapt.Value(beg); - Base::Rotation R1; - // if orientation is used - if(UseRotation.getValue()) { - // here get the orientation of the start and end point... - //R1 = ; + } + else { + for (; beg < end; beg += stp) { + gp_Pnt P = adapt.Value(beg); + Base::Rotation R1; + // if orientation is used + if (UseRotation.getValue()) { + // here get the orientation of the start and end point... + // R1 = ; + } + Waypoint wp("Pt", + Base::Placement(Base::Vector3d(P.X(), P.Y(), P.Z()), R1)); + trac.addWaypoint(wp); + seq.next(); } - Waypoint wp("Pt",Base::Placement(Base::Vector3d(P.X(),P.Y(),P.Z()),R1)); - trac.addWaypoint(wp); - seq.next(); - } - } - + } + } break; - case GeomAbs_Circle: - { - Standard_Real Length = CPnts_AbscissaPoint::Length(adapt); - Standard_Real ParLength = adapt.LastParameter()-adapt.FirstParameter(); - Standard_Real NbrSegments = Round(Length / SegValue.getValue()); - Standard_Real SegLength = ParLength / NbrSegments; - - if ( it2.Orientation() == TopAbs_REVERSED ) - { - //Beginning and End switch - double i = adapt.LastParameter(); - if(first) - first=false; - else - i -= SegLength; - for (;i>adapt.FirstParameter();i-= SegLength){ - gp_Pnt P = adapt.Value(i); - Base::Rotation R1; - // if orientation is used - if(UseRotation.getValue()) { - // here get the orientation of the start and end point... - //R1 = ; + case GeomAbs_Circle: { + Standard_Real Length = CPnts_AbscissaPoint::Length(adapt); + Standard_Real ParLength = adapt.LastParameter() - adapt.FirstParameter(); + Standard_Real NbrSegments = Round(Length / SegValue.getValue()); + Standard_Real SegLength = ParLength / NbrSegments; + + if (it2.Orientation() == TopAbs_REVERSED) { + // Beginning and End switch + double i = adapt.LastParameter(); + if (first) { + first = false; } - Waypoint wp("Pt",Base::Placement(Base::Vector3d(P.X(),P.Y(),P.Z()),R1)); - trac.addWaypoint(wp); - } - } - else - { - double i = adapt.FirstParameter(); - if(first) - first=false; - else - i += SegLength; - for (;i adapt.FirstParameter(); i -= SegLength) { + gp_Pnt P = adapt.Value(i); + Base::Rotation R1; + // if orientation is used + if (UseRotation.getValue()) { + // here get the orientation of the start and end point... + // R1 = ; + } + Waypoint wp("Pt", + Base::Placement(Base::Vector3d(P.X(), P.Y(), P.Z()), R1)); + trac.addWaypoint(wp); + } + } + else { + double i = adapt.FirstParameter(); + if (first) { + first = false; + } + else { + i += SegLength; + } + for (; i < adapt.LastParameter(); i += SegLength) { + gp_Pnt P = adapt.Value(i); + Base::Rotation R1; + // if orientation is used + if (UseRotation.getValue()) { + // here get the orientation of the start and end point... + // R1 = ; + } + Waypoint wp("Pt", + Base::Placement(Base::Vector3d(P.X(), P.Y(), P.Z()), R1)); + trac.addWaypoint(wp); + } + } + break; } - default: - throw Base::TypeError("Unknown Edge type in Robot::Edge2TracObject::execute()"); + default: + throw Base::TypeError("Unknown Edge type in Robot::Edge2TracObject::execute()"); } } } Trajectory.setValue(trac); - + return App::DocumentObject::StdReturn; } -//short Edge2TracObject::mustExecute(void) const +// short Edge2TracObject::mustExecute(void) const //{ -// return 0; -//} +// return 0; +// } void Edge2TracObject::onChanged(const Property* prop) { diff --git a/src/Mod/Robot/App/Edge2TracObject.h b/src/Mod/Robot/App/Edge2TracObject.h index 9a42f14b4d..4e07c89628 100644 --- a/src/Mod/Robot/App/Edge2TracObject.h +++ b/src/Mod/Robot/App/Edge2TracObject.h @@ -31,7 +31,7 @@ namespace Robot { -class RobotExport Edge2TracObject : public TrajectoryObject +class RobotExport Edge2TracObject: public TrajectoryObject { PROPERTY_HEADER_WITH_OVERRIDE(Robot::TrajectoryObject); @@ -39,9 +39,9 @@ public: /// Constructor Edge2TracObject(); - App::PropertyLinkSub Source; + App::PropertyLinkSub Source; App::PropertyFloatConstraint SegValue; - App::PropertyBool UseRotation; + App::PropertyBool UseRotation; /// set by execute with the number of clusters found int NbrOfCluster; @@ -49,18 +49,18 @@ public: int NbrOfEdges; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "RobotGui::ViewProviderEdge2TracObject"; } - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; protected: /// get called by the container when a property has changed - void onChanged (const App::Property* prop) override; - + void onChanged(const App::Property* prop) override; }; -} //namespace Robot +} // namespace Robot -#endif // ROBOT_ROBOTOBJECT_H +#endif // ROBOT_ROBOTOBJECT_H diff --git a/src/Mod/Robot/App/PreCompiled.cpp b/src/Mod/Robot/App/PreCompiled.cpp index 942976f8be..cde4369c5b 100644 --- a/src/Mod/Robot/App/PreCompiled.cpp +++ b/src/Mod/Robot/App/PreCompiled.cpp @@ -20,4 +20,4 @@ * * ***************************************************************************/ -#include "PreCompiled.h" +#include "PreCompiled.h" diff --git a/src/Mod/Robot/App/PreCompiled.h b/src/Mod/Robot/App/PreCompiled.h index 2885f0a1c9..3a032ddf8a 100644 --- a/src/Mod/Robot/App/PreCompiled.h +++ b/src/Mod/Robot/App/PreCompiled.h @@ -27,13 +27,13 @@ // Exporting of App classes #ifdef FC_OS_WIN32 -# define RobotExport __declspec(dllexport) -# define PartExport __declspec(dllimport) -# define MeshExport __declspec(dllimport) -#else // for Linux -# define RobotExport -# define PartExport -# define MeshExport +#define RobotExport __declspec(dllexport) +#define PartExport __declspec(dllimport) +#define MeshExport __declspec(dllimport) +#else // for Linux +#define RobotExport +#define PartExport +#define MeshExport #endif #ifdef _PreComp_ @@ -44,10 +44,10 @@ // kdl_cp #include "kdl_cp/chain.hpp" -#include "kdl_cp/chainiksolverpos_nr.hpp" -#include "kdl_cp/chainiksolvervel_pinv.hpp" -#include "kdl_cp/chainiksolverpos_nr_jl.hpp" #include "kdl_cp/chainfksolverpos_recursive.hpp" +#include "kdl_cp/chainiksolverpos_nr.hpp" +#include "kdl_cp/chainiksolverpos_nr_jl.hpp" +#include "kdl_cp/chainiksolvervel_pinv.hpp" #include "kdl_cp/frames_io.hpp" #include "kdl_cp/path_line.hpp" #include "kdl_cp/path_roundedcomposite.hpp" @@ -63,5 +63,5 @@ #include #include -#endif // _PreComp_ +#endif // _PreComp_ #endif diff --git a/src/Mod/Robot/App/PropertyTrajectory.cpp b/src/Mod/Robot/App/PropertyTrajectory.cpp index b7ebb1ecbe..1926fcaec5 100644 --- a/src/Mod/Robot/App/PropertyTrajectory.cpp +++ b/src/Mod/Robot/App/PropertyTrajectory.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -34,7 +34,7 @@ using namespace Robot; -TYPESYSTEM_SOURCE(Robot::PropertyTrajectory , App::Property) +TYPESYSTEM_SOURCE(Robot::PropertyTrajectory, App::Property) PropertyTrajectory::PropertyTrajectory() = default; @@ -48,7 +48,7 @@ void PropertyTrajectory::setValue(const Trajectory& sh) } -const Trajectory &PropertyTrajectory::getValue()const +const Trajectory& PropertyTrajectory::getValue() const { return _Trajectory; } @@ -57,15 +57,15 @@ const Trajectory &PropertyTrajectory::getValue()const Base::BoundBox3d PropertyTrajectory::getBoundingBox() const { Base::BoundBox3d box; - //if (_Trajectory._Trajectory.IsNull()) - // return box; - //try { - // // If the shape is empty an exception may be thrown - // Bnd_Box bounds; - // BRepBndLib::Add(_Trajectory._Trajectory, bounds); - // bounds.SetGap(0.0); - // Standard_Real xMin, yMin, zMin, xMax, yMax, zMax; - // bounds.Get(xMin, yMin, zMin, xMax, yMax, zMax); + // if (_Trajectory._Trajectory.IsNull()) + // return box; + // try { + // // If the shape is empty an exception may be thrown + // Bnd_Box bounds; + // BRepBndLib::Add(_Trajectory._Trajectory, bounds); + // bounds.SetGap(0.0); + // Standard_Real xMin, yMin, zMin, xMax, yMax, zMax; + // bounds.Get(xMin, yMin, zMin, xMax, yMax, zMax); // box.MinX = xMin; // box.MaxX = xMax; @@ -74,22 +74,22 @@ Base::BoundBox3d PropertyTrajectory::getBoundingBox() const // box.MinZ = zMin; // box.MaxZ = zMax; //} - //catch (Standard_Failure& e) { + // catch (Standard_Failure& e) { //} return box; } -PyObject *PropertyTrajectory::getPyObject() +PyObject* PropertyTrajectory::getPyObject() { return new TrajectoryPy(new Trajectory(_Trajectory)); } -void PropertyTrajectory::setPyObject(PyObject *value) +void PropertyTrajectory::setPyObject(PyObject* value) { if (PyObject_TypeCheck(value, &(TrajectoryPy::Type))) { - TrajectoryPy *pcObject = static_cast(value); + TrajectoryPy* pcObject = static_cast(value); setValue(*pcObject->getTrajectoryPtr()); } else { @@ -99,37 +99,34 @@ void PropertyTrajectory::setPyObject(PyObject *value) } } -App::Property *PropertyTrajectory::Copy() const +App::Property* PropertyTrajectory::Copy() const { - PropertyTrajectory *prop = new PropertyTrajectory(); + PropertyTrajectory* prop = new PropertyTrajectory(); prop->_Trajectory = this->_Trajectory; - + return prop; } -void PropertyTrajectory::Paste(const App::Property &from) +void PropertyTrajectory::Paste(const App::Property& from) { aboutToSetValue(); _Trajectory = dynamic_cast(from)._Trajectory; hasSetValue(); } -unsigned int PropertyTrajectory::getMemSize () const +unsigned int PropertyTrajectory::getMemSize() const { return _Trajectory.getMemSize(); } -void PropertyTrajectory::Save (Base::Writer &writer) const +void PropertyTrajectory::Save(Base::Writer& writer) const { _Trajectory.Save(writer); } -void PropertyTrajectory::Restore(Base::XMLReader &reader) +void PropertyTrajectory::Restore(Base::XMLReader& reader) { Robot::Trajectory temp; temp.Restore(reader); setValue(temp); } - - - diff --git a/src/Mod/Robot/App/PropertyTrajectory.h b/src/Mod/Robot/App/PropertyTrajectory.h index 8e5eba9cb0..4593b8b995 100644 --- a/src/Mod/Robot/App/PropertyTrajectory.h +++ b/src/Mod/Robot/App/PropertyTrajectory.h @@ -35,7 +35,7 @@ namespace Robot /** The part shape property class. * @author Werner Mayer */ -class RobotExport PropertyTrajectory : public App::Property +class RobotExport PropertyTrajectory: public App::Property { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -48,10 +48,10 @@ public: /// set the part shape void setValue(const Trajectory&); /// get the part shape - const Trajectory &getValue() const; + const Trajectory& getValue() const; //@} - + /** @name Getting basic geometric entities */ //@{ /** Returns the bounding box around the underlying mesh kernel */ @@ -61,17 +61,17 @@ public: /** @name Python interface */ //@{ PyObject* getPyObject() override; - void setPyObject(PyObject *value) override; + void setPyObject(PyObject* value) override; //@} /** @name Save/restore */ //@{ - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; - App::Property *Copy() const override; - void Paste(const App::Property &from) override; - unsigned int getMemSize () const override; + App::Property* Copy() const override; + void Paste(const App::Property& from) override; + unsigned int getMemSize() const override; //@} private: @@ -79,7 +79,7 @@ private: }; -} //namespace Robot +} // namespace Robot -#endif // PROPERTYTOPOSHAPE_H +#endif // PROPERTYTOPOSHAPE_H diff --git a/src/Mod/Robot/App/Robot6Axis.cpp b/src/Mod/Robot/App/Robot6Axis.cpp index fca75e0ab9..43707a2592 100644 --- a/src/Mod/Robot/App/Robot6Axis.cpp +++ b/src/Mod/Robot/App/Robot6Axis.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include "kdl_cp/chainfksolverpos_recursive.hpp" -# include "kdl_cp/chainiksolvervel_pinv.hpp" -# include "kdl_cp/chainiksolverpos_nr_jl.hpp" +#include "kdl_cp/chainfksolverpos_recursive.hpp" +#include "kdl_cp/chainiksolverpos_nr_jl.hpp" +#include "kdl_cp/chainiksolvervel_pinv.hpp" #endif #include @@ -37,21 +37,21 @@ #ifndef M_PI - #define M_PI 3.14159265358979323846 /* pi */ +#define M_PI 3.14159265358979323846 /* pi */ #endif #ifndef M_PI_2 - #define M_PI_2 1.57079632679489661923 /* pi/2 */ +#define M_PI_2 1.57079632679489661923 /* pi/2 */ #endif using namespace Robot; using namespace Base; using namespace KDL; +// clang-format off // some default roboter - AxisDefinition KukaIR500[6] = { -// a ,alpha ,d ,theta ,rotDir ,maxAngle ,minAngle ,AxisVelocity +// a ,alpha ,d ,theta ,rotDir ,maxAngle ,minAngle ,AxisVelocity {500 ,-90 ,1045 ,0 , -1 ,+185 ,-185 ,156 }, // Axis 1 {1300 ,0 ,0 ,0 , 1 ,+35 ,-155 ,156 }, // Axis 2 {55 ,+90 ,0 ,-90 , 1 ,+154 ,-130 ,156 }, // Axis 3 @@ -59,9 +59,10 @@ AxisDefinition KukaIR500[6] = { {0 ,+90 ,0 ,0 , 1 ,+130 ,-130 ,330 }, // Axis 5 {0 ,+180 ,-300 ,0 , 1 ,+350 ,-350 ,615 } // Axis 6 }; +// clang-format on -TYPESYSTEM_SOURCE(Robot::Robot6Axis , Base::Persistence) +TYPESYSTEM_SOURCE(Robot::Robot6Axis, Base::Persistence) Robot6Axis::Robot6Axis() { @@ -81,11 +82,15 @@ void Robot6Axis::setKinematic(const AxisDefinition KinDef[6]) Chain temp; - for(int i=0 ; i<6 ;i++){ - temp.addSegment(Segment(Joint(Joint::RotZ),Frame::DH(KinDef[i].a ,KinDef[i].alpha * (M_PI/180) ,KinDef[i].d ,KinDef[i].theta * (M_PI/180) ))); - RotDir [i] = KinDef[i].rotDir; - Max(i) = KinDef[i].maxAngle * (M_PI/180); - Min(i) = KinDef[i].minAngle * (M_PI/180); + for (int i = 0; i < 6; i++) { + temp.addSegment(Segment(Joint(Joint::RotZ), + Frame::DH(KinDef[i].a, + KinDef[i].alpha * (M_PI / 180), + KinDef[i].d, + KinDef[i].theta * (M_PI / 180)))); + RotDir[i] = KinDef[i].rotDir; + Max(i) = KinDef[i].maxAngle * (M_PI / 180); + Min(i) = KinDef[i].minAngle * (M_PI / 180); Velocity[i] = KinDef[i].velocity; } @@ -98,56 +103,56 @@ void Robot6Axis::setKinematic(const AxisDefinition KinDef[6]) double Robot6Axis::getMaxAngle(int Axis) { - return Max(Axis) * (180.0/M_PI); + return Max(Axis) * (180.0 / M_PI); } double Robot6Axis::getMinAngle(int Axis) { - return Min(Axis) * (180.0/M_PI); + return Min(Axis) * (180.0 / M_PI); } void split(std::string const& string, const char delimiter, std::vector& destination) { - std::string::size_type last_position(0); - std::string::size_type position(0); + std::string::size_type last_position(0); + std::string::size_type position(0); - for (std::string::const_iterator it(string.begin()); it != string.end(); ++it, ++position) - { - if (*it == delimiter ) - { - destination.push_back(string.substr(last_position, position - last_position )); + for (std::string::const_iterator it(string.begin()); it != string.end(); ++it, ++position) { + if (*it == delimiter) { + destination.push_back(string.substr(last_position, position - last_position)); last_position = position + 1; } } - destination.push_back(string.substr(last_position, position - last_position )); + destination.push_back(string.substr(last_position, position - last_position)); } -void Robot6Axis::readKinematic(const char * FileName) +void Robot6Axis::readKinematic(const char* FileName) { char buf[120]; Base::FileInfo fi(FileName); Base::ifstream in(fi); - if (!in) + if (!in) { return; + } std::vector destination; AxisDefinition temp[6]; // over read the header - in.getline(buf,119,'\n'); + in.getline(buf, 119, '\n'); // read 6 Axis - for (auto & i : temp) { - in.getline(buf,79,'\n'); + for (auto& i : temp) { + in.getline(buf, 79, '\n'); destination.clear(); - split(std::string(buf),',',destination); - if (destination.size() < 8) + split(std::string(buf), ',', destination); + if (destination.size() < 8) { continue; + } // transfer the values in kinematic structure - i.a = atof(destination[0].c_str()); - i.alpha = atof(destination[1].c_str()); - i.d = atof(destination[2].c_str()); - i.theta = atof(destination[3].c_str()); - i.rotDir = atof(destination[4].c_str()); + i.a = atof(destination[0].c_str()); + i.alpha = atof(destination[1].c_str()); + i.d = atof(destination[2].c_str()); + i.theta = atof(destination[3].c_str()); + i.rotDir = atof(destination[4].c_str()); i.maxAngle = atof(destination[5].c_str()); i.minAngle = atof(destination[6].c_str()); i.velocity = atof(destination[7].c_str()); @@ -156,62 +161,65 @@ void Robot6Axis::readKinematic(const char * FileName) setKinematic(temp); } -unsigned int Robot6Axis::getMemSize () const +unsigned int Robot6Axis::getMemSize() const { return 0; } -void Robot6Axis::Save (Writer &writer) const +void Robot6Axis::Save(Writer& writer) const { - for(unsigned int i=0;i<6;i++){ + for (unsigned int i = 0; i < 6; i++) { Base::Placement Tip = toPlacement(Kinematic.getSegment(i).getFrameToTip()); writer.Stream() << writer.ind() << "" - << std::endl; + << "Px=\"" << Tip.getPosition().x << "\" " + << "Py=\"" << Tip.getPosition().y << "\" " + << "Pz=\"" << Tip.getPosition().z << "\" " + << "Q0=\"" << Tip.getRotation()[0] << "\" " + << "Q1=\"" << Tip.getRotation()[1] << "\" " + << "Q2=\"" << Tip.getRotation()[2] << "\" " + << "Q3=\"" << Tip.getRotation()[3] << "\" " + << "rotDir=\"" << RotDir[i] << "\" " + << "maxAngle=\"" << Max(i) * (180.0 / M_PI) << "\" " + << "minAngle=\"" << Min(i) * (180.0 / M_PI) << "\" " + << "AxisVelocity=\"" << Velocity[i] << "\" " + << "Pos=\"" << Actual(i) << "\"/>" << std::endl; } } -void Robot6Axis::Restore(XMLReader &reader) +void Robot6Axis::Restore(XMLReader& reader) { Chain Temp; Base::Placement Tip; - for(unsigned int i=0;i<6;i++){ + for (unsigned int i = 0; i < 6; i++) { // read my Element reader.readElement("Axis"); // get the value of the placement - Tip = Base::Placement(Base::Vector3d(reader.getAttributeAsFloat("Px"), - reader.getAttributeAsFloat("Py"), - reader.getAttributeAsFloat("Pz")), - Base::Rotation(reader.getAttributeAsFloat("Q0"), - reader.getAttributeAsFloat("Q1"), - reader.getAttributeAsFloat("Q2"), - reader.getAttributeAsFloat("Q3"))); - Temp.addSegment(Segment(Joint(Joint::RotZ),toFrame(Tip))); + Tip = Base::Placement(Base::Vector3d(reader.getAttributeAsFloat("Px"), + reader.getAttributeAsFloat("Py"), + reader.getAttributeAsFloat("Pz")), + Base::Rotation(reader.getAttributeAsFloat("Q0"), + reader.getAttributeAsFloat("Q1"), + reader.getAttributeAsFloat("Q2"), + reader.getAttributeAsFloat("Q3"))); + Temp.addSegment(Segment(Joint(Joint::RotZ), toFrame(Tip))); - if(reader.hasAttribute("rotDir")) + if (reader.hasAttribute("rotDir")) { Velocity[i] = reader.getAttributeAsFloat("rotDir"); - else + } + else { Velocity[i] = 1.0; + } // read the axis constraints - Min(i) = reader.getAttributeAsFloat("maxAngle")* (M_PI/180); - Max(i) = reader.getAttributeAsFloat("minAngle")* (M_PI/180); - if(reader.hasAttribute("AxisVelocity")) + Min(i) = reader.getAttributeAsFloat("maxAngle") * (M_PI / 180); + Max(i) = reader.getAttributeAsFloat("minAngle") * (M_PI / 180); + if (reader.hasAttribute("AxisVelocity")) { Velocity[i] = reader.getAttributeAsFloat("AxisVelocity"); - else + } + else { Velocity[i] = 156.0; + } Actual(i) = reader.getAttributeAsFloat("Pos"); } Kinematic = Temp; @@ -219,21 +227,32 @@ void Robot6Axis::Restore(XMLReader &reader) calcTcp(); } -bool Robot6Axis::setTo(const Placement &To) +bool Robot6Axis::setTo(const Placement& To) { - //Creation of the solvers: - ChainFkSolverPos_recursive fksolver1(Kinematic);//Forward position solver - ChainIkSolverVel_pinv iksolver1v(Kinematic);//Inverse velocity solver - ChainIkSolverPos_NR_JL iksolver1(Kinematic,Min,Max,fksolver1,iksolver1v,100,1e-6);//Maximum 100 iterations, stop at accuracy 1e-6 + // Creation of the solvers: + ChainFkSolverPos_recursive fksolver1(Kinematic); // Forward position solver + ChainIkSolverVel_pinv iksolver1v(Kinematic); // Inverse velocity solver + ChainIkSolverPos_NR_JL iksolver1(Kinematic, + Min, + Max, + fksolver1, + iksolver1v, + 100, + 1e-6); // Maximum 100 iterations, stop at accuracy 1e-6 - //Creation of jntarrays: + // Creation of jntarrays: JntArray result(Kinematic.getNrOfJoints()); - //Set destination frame - Frame F_dest = Frame(KDL::Rotation::Quaternion(To.getRotation()[0],To.getRotation()[1],To.getRotation()[2],To.getRotation()[3]),KDL::Vector(To.getPosition()[0],To.getPosition()[1],To.getPosition()[2])); + // Set destination frame + Frame F_dest = + Frame(KDL::Rotation::Quaternion(To.getRotation()[0], + To.getRotation()[1], + To.getRotation()[2], + To.getRotation()[3]), + KDL::Vector(To.getPosition()[0], To.getPosition()[1], To.getPosition()[2])); // solve - if (iksolver1.CartToJnt(Actual,F_dest,result) < 0) { + if (iksolver1.CartToJnt(Actual, F_dest, result) < 0) { return false; } else { @@ -245,9 +264,10 @@ bool Robot6Axis::setTo(const Placement &To) Base::Placement Robot6Axis::getTcp() { - double x,y,z,w; - Tcp.M.GetQuaternion(x,y,z,w); - return Base::Placement(Base::Vector3d(Tcp.p[0],Tcp.p[1],Tcp.p[2]),Base::Rotation(x,y,z,w)); + double x, y, z, w; + Tcp.M.GetQuaternion(x, y, z, w); + return Base::Placement(Base::Vector3d(Tcp.p[0], Tcp.p[1], Tcp.p[2]), + Base::Rotation(x, y, z, w)); } bool Robot6Axis::calcTcp() @@ -255,13 +275,13 @@ bool Robot6Axis::calcTcp() // Create solver based on kinematic chain ChainFkSolverPos_recursive fksolver = ChainFkSolverPos_recursive(Kinematic); - // Create the frame that will contain the results - KDL::Frame cartpos; - + // Create the frame that will contain the results + KDL::Frame cartpos; + // Calculate forward position kinematics int kinematics_status; - kinematics_status = fksolver.JntToCart(Actual,cartpos); - if (kinematics_status>=0) { + kinematics_status = fksolver.JntToCart(Actual, cartpos); + if (kinematics_status >= 0) { Tcp = cartpos; return true; } @@ -270,13 +290,13 @@ bool Robot6Axis::calcTcp() } } -bool Robot6Axis::setAxis(int Axis,double Value) +bool Robot6Axis::setAxis(int Axis, double Value) { - Actual(Axis) = RotDir[Axis] * Value * (M_PI/180); // degree to radiants + Actual(Axis) = RotDir[Axis] * Value * (M_PI / 180); // degree to radiants return calcTcp(); } double Robot6Axis::getAxis(int Axis) { - return RotDir[Axis] * (Actual(Axis)/(M_PI/180)); // radian to degree + return RotDir[Axis] * (Actual(Axis) / (M_PI / 180)); // radian to degree } diff --git a/src/Mod/Robot/App/Robot6Axis.h b/src/Mod/Robot/App/Robot6Axis.h index b63544909d..7fd957b4da 100644 --- a/src/Mod/Robot/App/Robot6Axis.h +++ b/src/Mod/Robot/App/Robot6Axis.h @@ -23,10 +23,10 @@ #ifndef ROBOT_ROBOT6AXLE_H #define ROBOT_ROBOT6AXLE_H -#include -#include #include "kdl_cp/chain.hpp" #include "kdl_cp/jntarray.hpp" +#include +#include #include @@ -34,21 +34,22 @@ namespace Robot { /// Definition of the Axis properties -struct AxisDefinition { - double a = 0.0; // a of the Denavit-Hartenberg parameters (mm) - double alpha = 0.0; // alpha of the Denavit-Hartenberg parameters (°) - double d = 0.0; // d of the Denavit-Hartenberg parameters (mm) - double theta = 0.0; // a of the Denavit-Hartenberg parameters (°) - double rotDir = 0.0; // rotational direction (1|-1) - double maxAngle = 0.0; // soft ends + in ° - double minAngle = 0.0; // soft ends - in ° - double velocity = 0.0; // max vlocity of the axle in °/s +struct AxisDefinition +{ + double a = 0.0; // a of the Denavit-Hartenberg parameters (mm) + double alpha = 0.0; // alpha of the Denavit-Hartenberg parameters (°) + double d = 0.0; // d of the Denavit-Hartenberg parameters (mm) + double theta = 0.0; // a of the Denavit-Hartenberg parameters (°) + double rotDir = 0.0; // rotational direction (1|-1) + double maxAngle = 0.0; // soft ends + in ° + double minAngle = 0.0; // soft ends - in ° + double velocity = 0.0; // max vlocity of the axle in °/s }; /** The representation for a 6-Axis industry grade robot */ -class RobotExport Robot6Axis : public Base::Persistence +class RobotExport Robot6Axis: public Base::Persistence { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -56,19 +57,19 @@ public: Robot6Axis(); // from base class - unsigned int getMemSize () const override; - void Save (Base::Writer &/*writer*/) const override; - void Restore(Base::XMLReader &/*reader*/) override; + unsigned int getMemSize() const override; + void Save(Base::Writer& /*writer*/) const override; + void Restore(Base::XMLReader& /*reader*/) override; // interface /// set the kinematic parameters of the robot void setKinematic(const AxisDefinition KinDef[6]); /// read the kinematic parameters of the robot from a file - void readKinematic(const char * FileName); - + void readKinematic(const char* FileName); + /// set the robot to that position, calculates the Axis - bool setTo(const Base::Placement &To); - bool setAxis(int Axis,double Value); + bool setTo(const Base::Placement& To); + bool setAxis(int Axis, double Value); double getAxis(int Axis); double getMaxAngle(int Axis); double getMinAngle(int Axis); @@ -76,7 +77,7 @@ public: bool calcTcp(); Base::Placement getTcp(); - //void setKinematik(const std::vector > &KinTable); + // void setKinematik(const std::vector > &KinTable); protected: @@ -87,10 +88,10 @@ protected: KDL::Frame Tcp; double Velocity[6]; - double RotDir [6]; + double RotDir[6]; }; -} //namespace Part +} // namespace Robot -#endif // PART_TOPOSHAPE_H +#endif // PART_TOPOSHAPE_H diff --git a/src/Mod/Robot/App/Robot6AxisPy.xml b/src/Mod/Robot/App/Robot6AxisPy.xml index a6f67fc9b7..fba8feebf0 100644 --- a/src/Mod/Robot/App/Robot6AxisPy.xml +++ b/src/Mod/Robot/App/Robot6AxisPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Robot/App/Robot6AxisPyImp.cpp b/src/Mod/Robot/App/Robot6AxisPyImp.cpp index 32c5477c3f..9dd6eba69d 100644 --- a/src/Mod/Robot/App/Robot6AxisPyImp.cpp +++ b/src/Mod/Robot/App/Robot6AxisPyImp.cpp @@ -22,15 +22,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include #include +// clang-format off // inclusion of the generated files (generated out of Robot6AxisPy.xml) #include "Robot6AxisPy.h" #include "Robot6AxisPy.cpp" +// clang-format on using namespace Robot; @@ -38,28 +40,27 @@ using namespace Robot; // returns a string which represents the object e.g. when printed in python std::string Robot6AxisPy::representation() const { - std::stringstream str; + std::stringstream str; str.precision(5); - str << "getTcp().getPosition().x << "," - << getRobot6AxisPtr()->getTcp().getPosition().y << "," - << getRobot6AxisPtr()->getTcp().getPosition().z << ") " - << "Axis:(" - << "1:" << getRobot6AxisPtr()->getAxis(0) << " " - << "2:" << getRobot6AxisPtr()->getAxis(1) << " " - << "3:" << getRobot6AxisPtr()->getAxis(2) << " " - << "4:" << getRobot6AxisPtr()->getAxis(3) << " " - << "5:" << getRobot6AxisPtr()->getAxis(4) << " " - << "6:" << getRobot6AxisPtr()->getAxis(5) << ")"; + str << "getTcp().getPosition().x << "," + << getRobot6AxisPtr()->getTcp().getPosition().y << "," + << getRobot6AxisPtr()->getTcp().getPosition().z << ") " + << "Axis:(" + << "1:" << getRobot6AxisPtr()->getAxis(0) << " " + << "2:" << getRobot6AxisPtr()->getAxis(1) << " " + << "3:" << getRobot6AxisPtr()->getAxis(2) << " " + << "4:" << getRobot6AxisPtr()->getAxis(3) << " " + << "5:" << getRobot6AxisPtr()->getAxis(4) << " " + << "6:" << getRobot6AxisPtr()->getAxis(5) << ")"; - return str.str(); + return str.str(); } -PyObject *Robot6AxisPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* Robot6AxisPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { - // create a new instance of Robot6AxisPy and the Twin object + // create a new instance of Robot6AxisPy and the Twin object return new Robot6AxisPy(new Robot6Axis); } @@ -70,14 +71,13 @@ int Robot6AxisPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/) } -PyObject* Robot6AxisPy::check(PyObject * /*args*/) +PyObject* Robot6AxisPy::check(PyObject* /*args*/) { PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented"); return nullptr; } - Py::Float Robot6AxisPy::getAxis1() const { return Py::Float(getRobot6AxisPtr()->getAxis(0)); @@ -85,7 +85,7 @@ Py::Float Robot6AxisPy::getAxis1() const void Robot6AxisPy::setAxis1(Py::Float arg) { - getRobot6AxisPtr()->setAxis(0,(float)arg.operator double()); + getRobot6AxisPtr()->setAxis(0, (float)arg.operator double()); } Py::Float Robot6AxisPy::getAxis2() const @@ -95,7 +95,7 @@ Py::Float Robot6AxisPy::getAxis2() const void Robot6AxisPy::setAxis2(Py::Float arg) { - getRobot6AxisPtr()->setAxis(1,(float)arg.operator double()); + getRobot6AxisPtr()->setAxis(1, (float)arg.operator double()); } Py::Float Robot6AxisPy::getAxis3() const @@ -105,7 +105,7 @@ Py::Float Robot6AxisPy::getAxis3() const void Robot6AxisPy::setAxis3(Py::Float arg) { - getRobot6AxisPtr()->setAxis(2,(float)arg.operator double()); + getRobot6AxisPtr()->setAxis(2, (float)arg.operator double()); } Py::Float Robot6AxisPy::getAxis4() const @@ -115,7 +115,7 @@ Py::Float Robot6AxisPy::getAxis4() const void Robot6AxisPy::setAxis4(Py::Float arg) { - getRobot6AxisPtr()->setAxis(3,(float)arg.operator double()); + getRobot6AxisPtr()->setAxis(3, (float)arg.operator double()); } Py::Float Robot6AxisPy::getAxis5() const @@ -125,7 +125,7 @@ Py::Float Robot6AxisPy::getAxis5() const void Robot6AxisPy::setAxis5(Py::Float arg) { - getRobot6AxisPtr()->setAxis(4,(float)arg.operator double()); + getRobot6AxisPtr()->setAxis(4, (float)arg.operator double()); } Py::Float Robot6AxisPy::getAxis6() const @@ -135,33 +135,34 @@ Py::Float Robot6AxisPy::getAxis6() const void Robot6AxisPy::setAxis6(Py::Float arg) { - getRobot6AxisPtr()->setAxis(5,(float)arg.operator double()); + getRobot6AxisPtr()->setAxis(5, (float)arg.operator double()); } Py::Object Robot6AxisPy::getTcp() const { - return Py::asObject(new Base::PlacementPy(new Base::Placement(getRobot6AxisPtr()->getTcp()))); + return Py::asObject(new Base::PlacementPy(new Base::Placement(getRobot6AxisPtr()->getTcp()))); } void Robot6AxisPy::setTcp(Py::Object value) { - if (PyObject_TypeCheck(*value, &(Base::MatrixPy::Type))) { - Base::MatrixPy *pcObject = (Base::MatrixPy*)*value; + if (PyObject_TypeCheck(*value, &(Base::MatrixPy::Type))) { + Base::MatrixPy* pcObject = (Base::MatrixPy*)*value; Base::Matrix4D mat = pcObject->value(); Base::Placement p; p.fromMatrix(mat); - getRobot6AxisPtr()->setTo(p); + getRobot6AxisPtr()->setTo(p); } else if (PyObject_TypeCheck(*value, &(Base::PlacementPy::Type))) { - if(! getRobot6AxisPtr()->setTo(*static_cast(*value)->getPlacementPtr())) - throw Base::RuntimeError("Can not reach Point"); + if (!getRobot6AxisPtr()->setTo( + *static_cast(*value)->getPlacementPtr())) { + throw Base::RuntimeError("Can not reach Point"); + } } else { std::string error = std::string("type must be 'Matrix' or 'Placement', not "); error += (*value)->ob_type->tp_name; throw Py::TypeError(error); } - } Py::Object Robot6AxisPy::getBase() const @@ -170,18 +171,14 @@ Py::Object Robot6AxisPy::getBase() const } void Robot6AxisPy::setBase(Py::Object /*arg*/) -{ +{} -} - -PyObject *Robot6AxisPy::getCustomAttributes(const char* /*attr*/) const +PyObject* Robot6AxisPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } int Robot6AxisPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } - - diff --git a/src/Mod/Robot/App/RobotAlgos.cpp b/src/Mod/Robot/App/RobotAlgos.cpp index f47be96b56..baf23c9f1a 100644 --- a/src/Mod/Robot/App/RobotAlgos.cpp +++ b/src/Mod/Robot/App/RobotAlgos.cpp @@ -22,10 +22,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include "kdl_cp/chainiksolverpos_nr.hpp" -# include "kdl_cp/chainiksolvervel_pinv.hpp" -# include "kdl_cp/chainfksolverpos_recursive.hpp" -# include "kdl_cp/frames_io.hpp" +#include "kdl_cp/chainfksolverpos_recursive.hpp" +#include "kdl_cp/chainiksolverpos_nr.hpp" +#include "kdl_cp/chainiksolvervel_pinv.hpp" +#include "kdl_cp/frames_io.hpp" #endif #include "RobotAlgos.h" @@ -36,12 +36,12 @@ using namespace std; using namespace KDL; #ifndef M_PI - #define M_PI 3.14159265358979323846 - #define M_PI 3.14159265358979323846 /* pi */ +#define M_PI 3.14159265358979323846 +#define M_PI 3.14159265358979323846 /* pi */ #endif #ifndef M_PI_2 - #define M_PI_2 1.57079632679489661923 /* pi/2 */ +#define M_PI_2 1.57079632679489661923 /* pi/2 */ #endif //=========================================================================== @@ -62,14 +62,14 @@ void RobotAlgos::Test() chain.addSegment(Segment(Joint(Joint::RotZ))); chain.addSegment(Segment(Joint(Joint::RotX), Frame(Vector(0.0, 0.0, 0.120)))); chain.addSegment(Segment(Joint(Joint::RotZ))); - + // Create solver based on kinematic chain ChainFkSolverPos_recursive fksolver = ChainFkSolverPos_recursive(chain); - + // Create joint array unsigned int nj = chain.getNrOfJoints(); KDL::JntArray jointpositions = JntArray(nj); - + // Assign some values to the joint positions for (unsigned int i = 0; i < nj; i++) { float myinput; @@ -78,13 +78,13 @@ void RobotAlgos::Test() (void)result; jointpositions(i) = (double)myinput; } - + // Create the frame that will contain the results - KDL::Frame cartpos; - + KDL::Frame cartpos; + // Calculate forward position kinematics int kinematics_status; - kinematics_status = fksolver.JntToCart(jointpositions,cartpos); + kinematics_status = fksolver.JntToCart(jointpositions, cartpos); if (kinematics_status >= 0) { std::cout << cartpos << std::endl; printf("%s \n", "Success, thanks KDL!"); @@ -93,22 +93,25 @@ void RobotAlgos::Test() printf("%s \n", "Error: could not calculate forward kinematics :("); } - // Creation of the solvers: - ChainFkSolverPos_recursive fksolver1(chain);// Forward position solver - ChainIkSolverVel_pinv iksolver1v(chain); // Inverse velocity solver - ChainIkSolverPos_NR iksolver1(chain, fksolver1, iksolver1v, - 100, 1e-6);// Maximum 100 iterations, stop at accuracy 1e-6 - - // Creation of jntarrays: - JntArray result(chain.getNrOfJoints()); - JntArray q_init(chain.getNrOfJoints()); - - // Set destination frame - Frame F_dest=cartpos; - - iksolver1.CartToJnt(q_init,F_dest,result); + // Creation of the solvers: + ChainFkSolverPos_recursive fksolver1(chain); // Forward position solver + ChainIkSolverVel_pinv iksolver1v(chain); // Inverse velocity solver + ChainIkSolverPos_NR iksolver1(chain, + fksolver1, + iksolver1v, + 100, + 1e-6); // Maximum 100 iterations, stop at accuracy 1e-6 - for (unsigned int i = 0; i < nj; i++) + // Creation of jntarrays: + JntArray result(chain.getNrOfJoints()); + JntArray q_init(chain.getNrOfJoints()); + + // Set destination frame + Frame F_dest = cartpos; + + iksolver1.CartToJnt(q_init, F_dest, result); + + for (unsigned int i = 0; i < nj; i++) { printf("Axle %i: %f \n", i, result(i)); - + } } diff --git a/src/Mod/Robot/App/RobotAlgos.h b/src/Mod/Robot/App/RobotAlgos.h index 173ea3c2b5..a5bc66f9cb 100644 --- a/src/Mod/Robot/App/RobotAlgos.h +++ b/src/Mod/Robot/App/RobotAlgos.h @@ -23,10 +23,10 @@ #ifndef _RobotAlgos_h_ #define _RobotAlgos_h_ +#include "kdl_cp/frames_io.hpp" #include #include #include -#include "kdl_cp/frames_io.hpp" namespace Robot @@ -38,24 +38,29 @@ class RobotExport RobotAlgos { public: - /// Constructor + /// Constructor RobotAlgos(); - virtual ~RobotAlgos(); + virtual ~RobotAlgos(); void Test(); }; -inline KDL::Frame toFrame(const Base::Placement &To){ - return KDL::Frame(KDL::Rotation::Quaternion(To.getRotation()[0],To.getRotation()[1],To.getRotation()[2],To.getRotation()[3]),KDL::Vector(To.getPosition()[0],To.getPosition()[1],To.getPosition()[2])); +inline KDL::Frame toFrame(const Base::Placement& To) +{ + return KDL::Frame(KDL::Rotation::Quaternion(To.getRotation()[0], + To.getRotation()[1], + To.getRotation()[2], + To.getRotation()[3]), + KDL::Vector(To.getPosition()[0], To.getPosition()[1], To.getPosition()[2])); } -inline Base::Placement toPlacement(const KDL::Frame &To){ - double x,y,z,w; - To.M.GetQuaternion(x,y,z,w); - return Base::Placement(Base::Vector3d(To.p[0],To.p[1],To.p[2]),Base::Rotation(x,y,z,w)); +inline Base::Placement toPlacement(const KDL::Frame& To) +{ + double x, y, z, w; + To.M.GetQuaternion(x, y, z, w); + return Base::Placement(Base::Vector3d(To.p[0], To.p[1], To.p[2]), Base::Rotation(x, y, z, w)); } -} //namespace Robot - +} // namespace Robot #endif diff --git a/src/Mod/Robot/App/RobotObject.cpp b/src/Mod/Robot/App/RobotObject.cpp index 4b332a3dc3..ed4b094ed3 100644 --- a/src/Mod/Robot/App/RobotObject.cpp +++ b/src/Mod/Robot/App/RobotObject.cpp @@ -38,25 +38,73 @@ PROPERTY_SOURCE(Robot::RobotObject, App::GeoFeature) RobotObject::RobotObject() { - ADD_PROPERTY_TYPE(RobotVrmlFile ,(nullptr),"Robot definition" ,Prop_None,"Included file with the VRML representation of the robot"); - ADD_PROPERTY_TYPE(RobotKinematicFile,(nullptr),"Robot definition",Prop_None,"Included file with kinematic definition of the robot Axis"); + ADD_PROPERTY_TYPE(RobotVrmlFile, + (nullptr), + "Robot definition", + Prop_None, + "Included file with the VRML representation of the robot"); + ADD_PROPERTY_TYPE(RobotKinematicFile, + (nullptr), + "Robot definition", + Prop_None, + "Included file with kinematic definition of the robot Axis"); - ADD_PROPERTY_TYPE(Axis1,(0.0),"Robot kinematic",Prop_None,"Axis 1 angle of the robot in degre"); - ADD_PROPERTY_TYPE(Axis2,(0.0),"Robot kinematic",Prop_None,"Axis 2 angle of the robot in degre"); - ADD_PROPERTY_TYPE(Axis3,(0.0),"Robot kinematic",Prop_None,"Axis 3 angle of the robot in degre"); - ADD_PROPERTY_TYPE(Axis4,(0.0),"Robot kinematic",Prop_None,"Axis 4 angle of the robot in degre"); - ADD_PROPERTY_TYPE(Axis5,(0.0),"Robot kinematic",Prop_None,"Axis 5 angle of the robot in degre"); - ADD_PROPERTY_TYPE(Axis6,(0.0),"Robot kinematic",Prop_None,"Axis 6 angle of the robot in degre"); - ADD_PROPERTY_TYPE(Error,("") ,"Robot kinematic",Prop_None,"Robot error while moving"); - - ADD_PROPERTY_TYPE(Tcp,(Base::Placement()),"Robot kinematic",Prop_None,"Tcp of the robot"); - ADD_PROPERTY_TYPE(Base,(Base::Placement()),"Robot kinematic",Prop_None,"Actual base frame of the robot"); - ADD_PROPERTY_TYPE(Tool,(Base::Placement()),"Robot kinematic",Prop_None,"Tool frame of the robot (Tool)"); - ADD_PROPERTY_TYPE(ToolShape,(nullptr),"Robot definition",Prop_None,"Link to the Shape is used as Tool"); - ADD_PROPERTY_TYPE(ToolBase ,(Base::Placement()),"Robot definition",Prop_None,"Defines where to connect the ToolShape"); - //ADD_PROPERTY_TYPE(Position,(Base::Placement()),"Robot definition",Prop_None,"Position of the robot in the simulation"); - ADD_PROPERTY_TYPE(Home ,(0),"Robot kinematic",Prop_None,"Axis position for home"); + ADD_PROPERTY_TYPE(Axis1, + (0.0), + "Robot kinematic", + Prop_None, + "Axis 1 angle of the robot in degre"); + ADD_PROPERTY_TYPE(Axis2, + (0.0), + "Robot kinematic", + Prop_None, + "Axis 2 angle of the robot in degre"); + ADD_PROPERTY_TYPE(Axis3, + (0.0), + "Robot kinematic", + Prop_None, + "Axis 3 angle of the robot in degre"); + ADD_PROPERTY_TYPE(Axis4, + (0.0), + "Robot kinematic", + Prop_None, + "Axis 4 angle of the robot in degre"); + ADD_PROPERTY_TYPE(Axis5, + (0.0), + "Robot kinematic", + Prop_None, + "Axis 5 angle of the robot in degre"); + ADD_PROPERTY_TYPE(Axis6, + (0.0), + "Robot kinematic", + Prop_None, + "Axis 6 angle of the robot in degre"); + ADD_PROPERTY_TYPE(Error, (""), "Robot kinematic", Prop_None, "Robot error while moving"); + ADD_PROPERTY_TYPE(Tcp, (Base::Placement()), "Robot kinematic", Prop_None, "Tcp of the robot"); + ADD_PROPERTY_TYPE(Base, + (Base::Placement()), + "Robot kinematic", + Prop_None, + "Actual base frame of the robot"); + ADD_PROPERTY_TYPE(Tool, + (Base::Placement()), + "Robot kinematic", + Prop_None, + "Tool frame of the robot (Tool)"); + ADD_PROPERTY_TYPE(ToolShape, + (nullptr), + "Robot definition", + Prop_None, + "Link to the Shape is used as Tool"); + ADD_PROPERTY_TYPE(ToolBase, + (Base::Placement()), + "Robot definition", + Prop_None, + "Defines where to connect the ToolShape"); + // ADD_PROPERTY_TYPE(Position,(Base::Placement()),"Robot definition",Prop_None,"Position of the + // robot in the simulation"); + ADD_PROPERTY_TYPE(Home, (0), "Robot kinematic", Prop_None, "Axis position for home"); } short RobotObject::mustExecute() const @@ -64,61 +112,61 @@ short RobotObject::mustExecute() const return 0; } -PyObject *RobotObject::getPyObject() +PyObject* RobotObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } - return Py::new_reference_to(PythonObject); + return Py::new_reference_to(PythonObject); } void RobotObject::onChanged(const Property* prop) { - - if(prop == &RobotKinematicFile){ + + if (prop == &RobotKinematicFile) { // load the new kinematic robot.readKinematic(RobotKinematicFile.getValue()); } - if(prop == &Axis1 && !block){ - robot.setAxis(0,Axis1.getValue()); + if (prop == &Axis1 && !block) { + robot.setAxis(0, Axis1.getValue()); block = true; Tcp.setValue(robot.getTcp()); block = false; } - if(prop == &Axis2 && !block){ - robot.setAxis(1,Axis2.getValue()); + if (prop == &Axis2 && !block) { + robot.setAxis(1, Axis2.getValue()); block = true; Tcp.setValue(robot.getTcp()); block = false; } - if(prop == &Axis3 && !block){ - robot.setAxis(2,Axis3.getValue()); + if (prop == &Axis3 && !block) { + robot.setAxis(2, Axis3.getValue()); block = true; Tcp.setValue(robot.getTcp()); block = false; } - if(prop == &Axis4 && !block){ - robot.setAxis(3,Axis4.getValue()); + if (prop == &Axis4 && !block) { + robot.setAxis(3, Axis4.getValue()); block = true; Tcp.setValue(robot.getTcp()); block = false; } - if(prop == &Axis5 && !block){ - robot.setAxis(4,Axis5.getValue()); + if (prop == &Axis5 && !block) { + robot.setAxis(4, Axis5.getValue()); block = true; Tcp.setValue(robot.getTcp()); block = false; } - if(prop == &Axis6 && !block){ - robot.setAxis(5,Axis6.getValue()); + if (prop == &Axis6 && !block) { + robot.setAxis(5, Axis6.getValue()); block = true; Tcp.setValue(robot.getTcp()); block = false; } - if(prop == &Tcp && !block){ + if (prop == &Tcp && !block) { robot.setTo(Tcp.getValue()); block = true; Axis1.setValue((float)robot.getAxis(0)); @@ -132,25 +180,25 @@ void RobotObject::onChanged(const Property* prop) App::GeoFeature::onChanged(prop); } -void RobotObject::Save (Base::Writer &writer) const +void RobotObject::Save(Base::Writer& writer) const { App::GeoFeature::Save(writer); robot.Save(writer); } -void RobotObject::Restore(Base::XMLReader &reader) +void RobotObject::Restore(Base::XMLReader& reader) { block = true; App::GeoFeature::Restore(reader); robot.Restore(reader); - // set up the robot with the loaded axis position - robot.setAxis(0,Axis1.getValue()); - robot.setAxis(1,Axis2.getValue()); - robot.setAxis(2,Axis3.getValue()); - robot.setAxis(3,Axis4.getValue()); - robot.setAxis(4,Axis5.getValue()); - robot.setAxis(5,Axis6.getValue()); + // set up the robot with the loaded axis position + robot.setAxis(0, Axis1.getValue()); + robot.setAxis(1, Axis2.getValue()); + robot.setAxis(2, Axis3.getValue()); + robot.setAxis(3, Axis4.getValue()); + robot.setAxis(4, Axis5.getValue()); + robot.setAxis(5, Axis6.getValue()); robot.setTo(Tcp.getValue()); Tcp.setValue(robot.getTcp()); block = false; diff --git a/src/Mod/Robot/App/RobotObject.h b/src/Mod/Robot/App/RobotObject.h index 791eb7eb12..273c275f4e 100644 --- a/src/Mod/Robot/App/RobotObject.h +++ b/src/Mod/Robot/App/RobotObject.h @@ -32,7 +32,7 @@ namespace Robot { -class RobotExport RobotObject : public App::GeoFeature +class RobotExport RobotObject: public App::GeoFeature { PROPERTY_HEADER_WITH_OVERRIDE(Robot::RobotObject); @@ -41,46 +41,50 @@ public: RobotObject(); /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "RobotGui::ViewProviderRobotObject"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; + PyObject* getPyObject() override; - void Save (Base::Writer &/*writer*/) const override; - void Restore(Base::XMLReader &/*reader*/) override; + void Save(Base::Writer& /*writer*/) const override; + void Restore(Base::XMLReader& /*reader*/) override; - Robot6Axis &getRobot(){return robot;} + Robot6Axis& getRobot() + { + return robot; + } App::PropertyFileIncluded RobotVrmlFile; App::PropertyFileIncluded RobotKinematicFile; - App::PropertyFloat Axis1,Axis2,Axis3,Axis4,Axis5,Axis6; + App::PropertyFloat Axis1, Axis2, Axis3, Axis4, Axis5, Axis6; - App::PropertyPlacement Base; - App::PropertyPlacement Tool; - App::PropertyLink ToolShape; - App::PropertyPlacement ToolBase; - App::PropertyPlacement Tcp; - //App::PropertyPlacement Position; + App::PropertyPlacement Base; + App::PropertyPlacement Tool; + App::PropertyLink ToolShape; + App::PropertyPlacement ToolBase; + App::PropertyPlacement Tcp; + // App::PropertyPlacement Position; - App::PropertyString Error; + App::PropertyString Error; App::PropertyFloatList Home; protected: /// get called by the container when a property has changed - void onChanged (const App::Property* prop) override; + void onChanged(const App::Property* prop) override; Robot6Axis robot; - bool block{false}; - + bool block {false}; }; -} //namespace Robot +} // namespace Robot -#endif // ROBOT_ROBOTOBJECT_H +#endif // ROBOT_ROBOTOBJECT_H diff --git a/src/Mod/Robot/App/RobotObjectPy.xml b/src/Mod/Robot/App/RobotObjectPy.xml index 390cc15c13..a514598461 100644 --- a/src/Mod/Robot/App/RobotObjectPy.xml +++ b/src/Mod/Robot/App/RobotObjectPy.xml @@ -1,13 +1,13 @@  - @@ -21,6 +21,5 @@ - diff --git a/src/Mod/Robot/App/RobotObjectPyImp.cpp b/src/Mod/Robot/App/RobotObjectPyImp.cpp index 086685286f..4bb779a232 100644 --- a/src/Mod/Robot/App/RobotObjectPyImp.cpp +++ b/src/Mod/Robot/App/RobotObjectPyImp.cpp @@ -22,9 +22,11 @@ #include "PreCompiled.h" +// clang-format off // inclusion of the generated files (generated out of RobotObjectPy.xml) #include "RobotObjectPy.h" #include "RobotObjectPy.cpp" +// clang-format on using namespace Robot; @@ -36,23 +38,19 @@ std::string RobotObjectPy::representation() const } - -PyObject* RobotObjectPy::getRobot(PyObject * /*args*/) +PyObject* RobotObjectPy::getRobot(PyObject* /*args*/) { PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented"); return nullptr; } - -PyObject *RobotObjectPy::getCustomAttributes(const char* /*attr*/) const +PyObject* RobotObjectPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } int RobotObjectPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } - - diff --git a/src/Mod/Robot/App/Simulation.cpp b/src/Mod/Robot/App/Simulation.cpp index 16ff7e3246..637a84bd58 100644 --- a/src/Mod/Robot/App/Simulation.cpp +++ b/src/Mod/Robot/App/Simulation.cpp @@ -33,14 +33,15 @@ using namespace KDL; // Simulation class //=========================================================================== -Simulation::Simulation(const Robot::Trajectory &Trac,Robot::Robot6Axis &Rob) -:Trac(Trac),Rob(Rob) +Simulation::Simulation(const Robot::Trajectory& Trac, Robot::Robot6Axis& Rob) + : Trac(Trac) + , Rob(Rob) { // simulate a trajectory with only one waypoint make no sense! assert(Trac.getSize() > 1); - - startAxis[0] = Rob.getAxis(0); + + startAxis[0] = Rob.getAxis(0); startAxis[1] = Rob.getAxis(1); startAxis[2] = Rob.getAxis(2); startAxis[3] = Rob.getAxis(3); @@ -48,26 +49,23 @@ Simulation::Simulation(const Robot::Trajectory &Trac,Robot::Robot6Axis &Rob) startAxis[5] = Rob.getAxis(5); setToTime(0); - } Simulation::~Simulation() = default; void Simulation::step(double tick) { - Pos += tick; + Pos += tick; } void Simulation::setToWaypoint(unsigned int) -{ - -} +{} void Simulation::setToTime(float t) { Pos = t; Base::Placement NeededPos = Trac.getPosition(Pos); - NeededPos = NeededPos *Tool.inverse(); + NeededPos = NeededPos * Tool.inverse(); Rob.setTo(NeededPos); Axis[0] = Rob.getAxis(0); Axis[1] = Rob.getAxis(1); @@ -75,20 +73,19 @@ void Simulation::setToTime(float t) Axis[3] = Rob.getAxis(3); Axis[4] = Rob.getAxis(4); Axis[5] = Rob.getAxis(5); - } void Simulation::reset() { - Rob.setAxis(0,startAxis[0]); - Rob.setAxis(1,startAxis[1]); - Rob.setAxis(2,startAxis[2]); - Rob.setAxis(3,startAxis[3]); - Rob.setAxis(4,startAxis[4]); - Rob.setAxis(5,startAxis[5]); + Rob.setAxis(0, startAxis[0]); + Rob.setAxis(1, startAxis[1]); + Rob.setAxis(2, startAxis[2]); + Rob.setAxis(3, startAxis[3]); + Rob.setAxis(4, startAxis[4]); + Rob.setAxis(5, startAxis[5]); Base::Placement NeededPos = Trac.getPosition(0.0); - NeededPos = NeededPos *Tool.inverse(); + NeededPos = NeededPos * Tool.inverse(); Rob.setTo(NeededPos); Axis[0] = Rob.getAxis(0); @@ -97,5 +94,4 @@ void Simulation::reset() Axis[3] = Rob.getAxis(3); Axis[4] = Rob.getAxis(4); Axis[5] = Rob.getAxis(5); - } diff --git a/src/Mod/Robot/App/Simulation.h b/src/Mod/Robot/App/Simulation.h index ac3ee59e8b..67fadc8dc0 100644 --- a/src/Mod/Robot/App/Simulation.h +++ b/src/Mod/Robot/App/Simulation.h @@ -19,7 +19,7 @@ * Suite 330, Boston, MA 02111-1307, USA * * * ***************************************************************************/ - + #ifndef _Simulation_h_ #define _Simulation_h_ @@ -38,35 +38,45 @@ class RobotExport Simulation { public: - /// Constructor - Simulation(const Trajectory &Trac,Robot6Axis &Rob); - virtual ~Simulation(); + /// Constructor + Simulation(const Trajectory& Trac, Robot6Axis& Rob); + virtual ~Simulation(); - double getLength(){return Trac.getLength();} - double getDuration(){return Trac.getDuration();} + double getLength() + { + return Trac.getLength(); + } + double getDuration() + { + return Trac.getDuration(); + } - Base::Placement getPosition(){return Trac.getPosition(Pos);} - double getVelocity(){return Trac.getVelocity(Pos);} + Base::Placement getPosition() + { + return Trac.getPosition(Pos); + } + double getVelocity() + { + return Trac.getVelocity(Pos); + } - void step(double tick); + void step(double tick); void setToWaypoint(unsigned int n); void setToTime(float t); // apply the start axis angles and set to time 0. Restores the exact start position void reset(); - double Pos{0.0}; - double Axis[6]{}; - double startAxis[6]{}; + double Pos {0.0}; + double Axis[6] {}; + double startAxis[6] {}; Trajectory Trac; - Robot6Axis &Rob; + Robot6Axis& Rob; Base::Placement Tool; }; - -} //namespace Robot - +} // namespace Robot #endif diff --git a/src/Mod/Robot/App/Trajectory.cpp b/src/Mod/Robot/App/Trajectory.cpp index 6b48567373..492260658b 100644 --- a/src/Mod/Robot/App/Trajectory.cpp +++ b/src/Mod/Robot/App/Trajectory.cpp @@ -23,69 +23,76 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include "kdl_cp/path_line.hpp" -# include "kdl_cp/path_roundedcomposite.hpp" -# include "kdl_cp/rotational_interpolation_sa.hpp" -# include "kdl_cp/trajectory_composite.hpp" -# include "kdl_cp/trajectory_segment.hpp" -# include "kdl_cp/utilities/error.h" -# include "kdl_cp/velocityprofile_trap.hpp" +#include "kdl_cp/path_line.hpp" +#include "kdl_cp/path_roundedcomposite.hpp" +#include "kdl_cp/rotational_interpolation_sa.hpp" +#include "kdl_cp/trajectory_composite.hpp" +#include "kdl_cp/trajectory_segment.hpp" +#include "kdl_cp/utilities/error.h" +#include "kdl_cp/velocityprofile_trap.hpp" #endif #include #include #include -#include "Trajectory.h" #include "RobotAlgos.h" +#include "Trajectory.h" #ifndef M_PI - #define M_PI 3.14159265358979323846 - #define M_PI 3.14159265358979323846 /* pi */ +#define M_PI 3.14159265358979323846 +#define M_PI 3.14159265358979323846 /* pi */ #endif #ifndef M_PI_2 - #define M_PI_2 1.57079632679489661923 /* pi/2 */ +#define M_PI_2 1.57079632679489661923 /* pi/2 */ #endif using namespace Robot; using namespace Base; -//using namespace KDL; +// using namespace KDL; -TYPESYSTEM_SOURCE(Robot::Trajectory , Base::Persistence) +TYPESYSTEM_SOURCE(Robot::Trajectory, Base::Persistence) Trajectory::Trajectory() = default; Trajectory::Trajectory(const Trajectory& Trac) -:vpcWaypoints(Trac.vpcWaypoints.size()),pcTrajectory(nullptr) + : vpcWaypoints(Trac.vpcWaypoints.size()) + , pcTrajectory(nullptr) { operator=(Trac); } Trajectory::~Trajectory() { - for(auto it : vpcWaypoints) + for (auto it : vpcWaypoints) { delete it; + } delete pcTrajectory; } -Trajectory &Trajectory::operator=(const Trajectory& Trac) +Trajectory& Trajectory::operator=(const Trajectory& Trac) { - if (this == &Trac) + if (this == &Trac) { return *this; + } - for(auto it : vpcWaypoints) + for (auto it : vpcWaypoints) { delete it; + } vpcWaypoints.clear(); vpcWaypoints.resize(Trac.vpcWaypoints.size()); - int i=0; - for (std::vector::const_iterator it=Trac.vpcWaypoints.begin();it!=Trac.vpcWaypoints.end();++it,i++) + int i = 0; + for (std::vector::const_iterator it = Trac.vpcWaypoints.begin(); + it != Trac.vpcWaypoints.end(); + ++it, i++) { vpcWaypoints[i] = new Waypoint(**it); + } generateTrajectory(); return *this; @@ -93,60 +100,72 @@ Trajectory &Trajectory::operator=(const Trajectory& Trac) double Trajectory::getLength(int n) const { - if(pcTrajectory) - if(n<0) + if (pcTrajectory) { + if (n < 0) { return pcTrajectory->GetPath()->PathLength(); - else + } + else { return pcTrajectory->Get(n)->GetPath()->PathLength(); - else + } + } + else { return 0; + } } double Trajectory::getDuration(int n) const { - if(pcTrajectory) - if(n<0) + if (pcTrajectory) { + if (n < 0) { return pcTrajectory->Duration(); - else + } + else { return pcTrajectory->Get(n)->Duration(); - else + } + } + else { return 0; + } } -Placement Trajectory::getPosition(double time)const +Placement Trajectory::getPosition(double time) const { - if (pcTrajectory) + if (pcTrajectory) { return Placement(toPlacement(pcTrajectory->Pos(time))); + } return {}; } -double Trajectory::getVelocity(double time)const +double Trajectory::getVelocity(double time) const { - if(pcTrajectory){ + if (pcTrajectory) { KDL::Vector vec = pcTrajectory->Vel(time).vel; - Base::Vector3d vec2(vec[0],vec[1],vec[2]); + Base::Vector3d vec2(vec[0], vec[1], vec[2]); return vec2.Length(); - }else + } + else { return 0; + } } void Trajectory::deleteLast(unsigned int n) { - for(unsigned int i=0;i<=n;i++){ - delete(*vpcWaypoints.rbegin()); + for (unsigned int i = 0; i <= n; i++) { + delete (*vpcWaypoints.rbegin()); vpcWaypoints.pop_back(); } - } void Trajectory::generateTrajectory() { - if (vpcWaypoints.empty()) + if (vpcWaypoints.empty()) { return; + } // delete the old and create a new one - if (pcTrajectory) + if (pcTrajectory) { delete (pcTrajectory); + } pcTrajectory = new KDL::Trajectory_Composite(); // pointer to the pieces while iterating @@ -159,7 +178,9 @@ void Trajectory::generateTrajectory() // handle the first waypoint special bool first = true; - for (std::vector::const_iterator it = vpcWaypoints.begin(); it != vpcWaypoints.end(); ++it) { + for (std::vector::const_iterator it = vpcWaypoints.begin(); + it != vpcWaypoints.end(); + ++it) { if (first) { Last = toFrame((*it)->EndPos); first = false; @@ -167,59 +188,70 @@ void Trajectory::generateTrajectory() else { // destinct the type of movement switch ((*it)->Type) { - case Waypoint::LINE: - case Waypoint::PTP: { - KDL::Frame Next = toFrame((*it)->EndPos); - // continues the movement until no continuous waypoint or the end - bool Cont = (*it)->Cont && !(it == --vpcWaypoints.end()); - // start of a continue block - if (Cont && !pcRoundComp) { - pcRoundComp = std::make_unique(3, 3, - new KDL::RotationalInterpolation_SingleAxis()); - // the velocity of the first waypoint is used - pcVelPrf = std::make_unique((*it)->Velocity, (*it)->Acceleration); - pcRoundComp->Add(Last); - pcRoundComp->Add(Next); + case Waypoint::LINE: + case Waypoint::PTP: { + KDL::Frame Next = toFrame((*it)->EndPos); + // continues the movement until no continuous waypoint or the end + bool Cont = (*it)->Cont && !(it == --vpcWaypoints.end()); + // start of a continue block + if (Cont && !pcRoundComp) { + pcRoundComp = std::make_unique( + 3, + 3, + new KDL::RotationalInterpolation_SingleAxis()); + // the velocity of the first waypoint is used + pcVelPrf = + std::make_unique((*it)->Velocity, + (*it)->Acceleration); + pcRoundComp->Add(Last); + pcRoundComp->Add(Next); - // continue a continues block - } - else if (Cont && pcRoundComp) { - pcRoundComp->Add(Next); - // end a continuous block - } - else if (!Cont && pcRoundComp) { - // add the last one - pcRoundComp->Add(Next); - pcRoundComp->Finish(); - pcVelPrf->SetProfile(0, pcRoundComp->PathLength()); - pcTrak = std::make_unique(pcRoundComp.release(), pcVelPrf.release()); + // continue a continues block + } + else if (Cont && pcRoundComp) { + pcRoundComp->Add(Next); + // end a continuous block + } + else if (!Cont && pcRoundComp) { + // add the last one + pcRoundComp->Add(Next); + pcRoundComp->Finish(); + pcVelPrf->SetProfile(0, pcRoundComp->PathLength()); + pcTrak = + std::make_unique(pcRoundComp.release(), + pcVelPrf.release()); - // normal block - } - else if (!Cont && !pcRoundComp) { - KDL::Path* pcPath; - pcPath = new KDL::Path_Line(Last, - Next, - new KDL::RotationalInterpolation_SingleAxis(), - 1.0, - true - ); + // normal block + } + else if (!Cont && !pcRoundComp) { + KDL::Path* pcPath; + pcPath = + new KDL::Path_Line(Last, + Next, + new KDL::RotationalInterpolation_SingleAxis(), + 1.0, + true); - pcVelPrf = std::make_unique((*it)->Velocity, (*it)->Acceleration); - pcVelPrf->SetProfile(0, pcPath->PathLength()); - pcTrak = std::make_unique(pcPath, pcVelPrf.release()); + pcVelPrf = + std::make_unique((*it)->Velocity, + (*it)->Acceleration); + pcVelPrf->SetProfile(0, pcPath->PathLength()); + pcTrak = std::make_unique(pcPath, + pcVelPrf.release()); + } + Last = Next; + break; } - Last = Next; - break; } - case Waypoint::WAIT: - break; - default: - break; + case Waypoint::WAIT: + break; + default: + break; } // add the segment if no continuous block is running - if (!pcRoundComp && pcTrak) + if (!pcRoundComp && pcTrak) { pcTrajectory->Add(pcTrak.release()); + } } } } @@ -228,27 +260,33 @@ void Trajectory::generateTrajectory() } } -std::string Trajectory::getUniqueWaypointName(const char *Name) const +std::string Trajectory::getUniqueWaypointName(const char* Name) const { - if (!Name || *Name == '\0') + if (!Name || *Name == '\0') { return {}; + } // check for first character whether it's a digit std::string CleanName = Name; - if (!CleanName.empty() && CleanName[0] >= 48 && CleanName[0] <= 57) + if (!CleanName.empty() && CleanName[0] >= 48 && CleanName[0] <= 57) { CleanName[0] = '_'; + } // strip illegal chars - for (char & it : CleanName) { - if (!((it>=48 && it<=57) || // number - (it>=65 && it<=90) || // uppercase letter - (it>=97 && it<=122))) // lowercase letter - it = '_'; // it's neither number nor letter + for (char& it : CleanName) { + if (!((it >= 48 && it <= 57) || // number + (it >= 65 && it <= 90) || // uppercase letter + (it >= 97 && it <= 122))) { // lowercase letter + it = '_'; // it's neither number nor letter + } } // name in use? std::vector::const_iterator it; - for(it = vpcWaypoints.begin();it!=vpcWaypoints.end();++it) - if((*it)->Name == CleanName) break; + for (it = vpcWaypoints.begin(); it != vpcWaypoints.end(); ++it) { + if ((*it)->Name == CleanName) { + break; + } + } if (it == vpcWaypoints.end()) { // if not, name is OK @@ -257,14 +295,15 @@ std::string Trajectory::getUniqueWaypointName(const char *Name) const else { // find highest suffix int nSuff = 0; - for(it = vpcWaypoints.begin();it!=vpcWaypoints.end();++it) { - const std::string &ObjName = (*it)->Name; - if (ObjName.substr(0, CleanName.length()) == CleanName) { // same prefix + for (it = vpcWaypoints.begin(); it != vpcWaypoints.end(); ++it) { + const std::string& ObjName = (*it)->Name; + if (ObjName.substr(0, CleanName.length()) == CleanName) { // same prefix std::string clSuffix(ObjName.substr(CleanName.length())); if (!clSuffix.empty()) { std::string::size_type nPos = clSuffix.find_first_not_of("0123456789"); - if (nPos==std::string::npos) + if (nPos == std::string::npos) { nSuff = std::max(nSuff, std::atol(clSuffix.c_str())); + } } } } @@ -275,34 +314,32 @@ std::string Trajectory::getUniqueWaypointName(const char *Name) const } } -void Trajectory::addWaypoint(const Waypoint &WPnt) +void Trajectory::addWaypoint(const Waypoint& WPnt) { std::string UniqueName = getUniqueWaypointName(WPnt.Name.c_str()); - Waypoint *tmp = new Waypoint(WPnt); + Waypoint* tmp = new Waypoint(WPnt); tmp->Name = UniqueName; vpcWaypoints.push_back(tmp); } - - -unsigned int Trajectory::getMemSize () const +unsigned int Trajectory::getMemSize() const { - return 0; + return 0; } -void Trajectory::Save (Writer &writer) const +void Trajectory::Save(Writer& writer) const { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; writer.incInd(); - for(unsigned int i = 0;iSave(writer); + } writer.decInd(); - writer.Stream() << writer.ind() << "" << std::endl ; - + writer.Stream() << writer.ind() << "" << std::endl; } -void Trajectory::Restore(XMLReader &reader) +void Trajectory::Restore(XMLReader& reader) { vpcWaypoints.clear(); // read my element @@ -312,7 +349,7 @@ void Trajectory::Restore(XMLReader &reader) vpcWaypoints.resize(count); for (int i = 0; i < count; i++) { - Waypoint *tmp = new Waypoint(); + Waypoint* tmp = new Waypoint(); tmp->Restore(reader); vpcWaypoints[i] = tmp; } diff --git a/src/Mod/Robot/App/Trajectory.h b/src/Mod/Robot/App/Trajectory.h index 1e6c7d56cc..1a9cb4c722 100644 --- a/src/Mod/Robot/App/Trajectory.h +++ b/src/Mod/Robot/App/Trajectory.h @@ -31,7 +31,10 @@ #include "Waypoint.h" -namespace KDL {class Trajectory_Composite;} +namespace KDL +{ +class Trajectory_Composite; +} namespace Robot { @@ -39,7 +42,7 @@ namespace Robot /** The representation of a Trajectory */ -class RobotExport Trajectory : public Base::Persistence +class RobotExport Trajectory: public Base::Persistence { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -48,39 +51,47 @@ public: Trajectory(const Trajectory&); ~Trajectory() override; - Trajectory &operator=(const Trajectory&); + Trajectory& operator=(const Trajectory&); - // from base class - unsigned int getMemSize () const override; - void Save (Base::Writer &/*writer*/) const override; - void Restore(Base::XMLReader &/*reader*/) override; + // from base class + unsigned int getMemSize() const override; + void Save(Base::Writer& /*writer*/) const override; + void Restore(Base::XMLReader& /*reader*/) override; - // interface + // interface void generateTrajectory(); - void addWaypoint(const Waypoint &WPnt); - unsigned int getSize() const{return vpcWaypoints.size();} - const Waypoint &getWaypoint(unsigned int pos)const {return *vpcWaypoints[pos];} - std::string getUniqueWaypointName(const char *Name) const; - const std::vector &getWaypoints()const{return vpcWaypoints;} + void addWaypoint(const Waypoint& WPnt); + unsigned int getSize() const + { + return vpcWaypoints.size(); + } + const Waypoint& getWaypoint(unsigned int pos) const + { + return *vpcWaypoints[pos]; + } + std::string getUniqueWaypointName(const char* Name) const; + const std::vector& getWaypoints() const + { + return vpcWaypoints; + } /// delete the last n waypoints - void deleteLast(unsigned int n=1); + void deleteLast(unsigned int n = 1); /// return the Length (mm) of the Trajectory if -1 or of the Waypoint with the given number - double getLength(int n=-1) const; + double getLength(int n = -1) const; /// return the duration (s) of the Trajectory if -1 or of the Waypoint with the given number - double getDuration (int n=-1) const; - Base::Placement getPosition(double time)const; - double getVelocity(double time)const; + double getDuration(int n = -1) const; + Base::Placement getPosition(double time) const; + double getVelocity(double time) const; protected: - std::vector vpcWaypoints; - KDL::Trajectory_Composite *pcTrajectory{nullptr}; + KDL::Trajectory_Composite* pcTrajectory {nullptr}; }; -} //namespace Part +} // namespace Robot -#endif // PART_TOPOSHAPE_H +#endif // PART_TOPOSHAPE_H diff --git a/src/Mod/Robot/App/TrajectoryCompound.cpp b/src/Mod/Robot/App/TrajectoryCompound.cpp index 8cb30a115a..7e4ce7b341 100644 --- a/src/Mod/Robot/App/TrajectoryCompound.cpp +++ b/src/Mod/Robot/App/TrajectoryCompound.cpp @@ -35,38 +35,41 @@ PROPERTY_SOURCE(Robot::TrajectoryCompound, Robot::TrajectoryObject) TrajectoryCompound::TrajectoryCompound() { - ADD_PROPERTY_TYPE( Source, (nullptr) , "Compound",Prop_None,"list of trajectories to combine"); - + ADD_PROPERTY_TYPE(Source, (nullptr), "Compound", Prop_None, "list of trajectories to combine"); } -App::DocumentObjectExecReturn *TrajectoryCompound::execute() +App::DocumentObjectExecReturn* TrajectoryCompound::execute() { - const std::vector &Tracs = Source.getValues(); + const std::vector& Tracs = Source.getValues(); Robot::Trajectory result; for (auto it : Tracs) { - if (it->getTypeId().isDerivedFrom(Robot::TrajectoryObject::getClassTypeId())){ - const std::vector &wps = static_cast(it)->Trajectory.getValue().getWaypoints(); + if (it->getTypeId().isDerivedFrom(Robot::TrajectoryObject::getClassTypeId())) { + const std::vector& wps = + static_cast(it)->Trajectory.getValue().getWaypoints(); for (auto wp : wps) { result.addWaypoint(*wp); } - }else - return new App::DocumentObjectExecReturn("Not all objects in compound are trajectories!"); + } + else { + return new App::DocumentObjectExecReturn( + "Not all objects in compound are trajectories!"); + } } Trajectory.setValue(result); - + return App::DocumentObject::StdReturn; } -//short TrajectoryCompound::mustExecute(void) const +// short TrajectoryCompound::mustExecute(void) const //{ -// return 0; -//} +// return 0; +// } -//void TrajectoryCompound::onChanged(const Property* prop) +// void TrajectoryCompound::onChanged(const Property* prop) //{ -// -// App::GeoFeature::onChanged(prop); -//} +// +// App::GeoFeature::onChanged(prop); +// } diff --git a/src/Mod/Robot/App/TrajectoryCompound.h b/src/Mod/Robot/App/TrajectoryCompound.h index 8c39fed289..afb7ddb64e 100644 --- a/src/Mod/Robot/App/TrajectoryCompound.h +++ b/src/Mod/Robot/App/TrajectoryCompound.h @@ -31,7 +31,7 @@ namespace Robot { -class RobotExport TrajectoryCompound : public TrajectoryObject +class RobotExport TrajectoryCompound: public TrajectoryObject { PROPERTY_HEADER_WITH_OVERRIDE(Robot::TrajectoryObject); @@ -39,21 +39,21 @@ public: /// Constructor TrajectoryCompound(); - App::PropertyLinkList Source; + App::PropertyLinkList Source; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "RobotGui::ViewProviderTrajectoryCompound"; } - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; protected: /// get called by the container when a property has changed - //virtual void onChanged (const App::Property* prop); - + // virtual void onChanged (const App::Property* prop); }; -} //namespace Robot +} // namespace Robot -#endif // ROBOT_ROBOTOBJECT_H +#endif // ROBOT_ROBOTOBJECT_H diff --git a/src/Mod/Robot/App/TrajectoryDressUpObject.cpp b/src/Mod/Robot/App/TrajectoryDressUpObject.cpp index 2eaa55af32..6961f4a36a 100644 --- a/src/Mod/Robot/App/TrajectoryDressUpObject.cpp +++ b/src/Mod/Robot/App/TrajectoryDressUpObject.cpp @@ -31,23 +31,46 @@ using namespace App; PROPERTY_SOURCE(Robot::TrajectoryDressUpObject, Robot::TrajectoryObject) -const char* TrajectoryDressUpObject::ContTypeEnums[]= {"DontChange","Continues","Discontinues",nullptr}; -const char* TrajectoryDressUpObject::AddTypeEnums[] = {"DontChange","UseOrientation","AddPosition","AddOrintation","AddPositionAndOrientation",nullptr}; +const char* TrajectoryDressUpObject::ContTypeEnums[] = {"DontChange", + "Continues", + "Discontinues", + nullptr}; +const char* TrajectoryDressUpObject::AddTypeEnums[] = {"DontChange", + "UseOrientation", + "AddPosition", + "AddOrintation", + "AddPositionAndOrientation", + nullptr}; TrajectoryDressUpObject::TrajectoryDressUpObject() { - ADD_PROPERTY_TYPE( Source, (nullptr) , "TrajectoryDressUp",Prop_None,"Trajectory to dress up"); - ADD_PROPERTY_TYPE( Speed, (1000) , "TrajectoryDressUp",Prop_None,"Speed to use"); - ADD_PROPERTY_TYPE( UseSpeed , (0) , "TrajectoryDressUp",Prop_None,"Switch the speed usage on"); - ADD_PROPERTY_TYPE( Acceleration, (1000) , "TrajectoryDressUp",Prop_None,"Acceleration to use"); - ADD_PROPERTY_TYPE( UseAcceleration, (0) , "TrajectoryDressUp",Prop_None,"Switch the acceleration usage on"); - ADD_PROPERTY_TYPE( ContType, ((long)0) , "TrajectoryDressUp",Prop_None,"Define the dress up of continuity"); + ADD_PROPERTY_TYPE(Source, (nullptr), "TrajectoryDressUp", Prop_None, "Trajectory to dress up"); + ADD_PROPERTY_TYPE(Speed, (1000), "TrajectoryDressUp", Prop_None, "Speed to use"); + ADD_PROPERTY_TYPE(UseSpeed, (0), "TrajectoryDressUp", Prop_None, "Switch the speed usage on"); + ADD_PROPERTY_TYPE(Acceleration, (1000), "TrajectoryDressUp", Prop_None, "Acceleration to use"); + ADD_PROPERTY_TYPE(UseAcceleration, + (0), + "TrajectoryDressUp", + Prop_None, + "Switch the acceleration usage on"); + ADD_PROPERTY_TYPE(ContType, + ((long)0), + "TrajectoryDressUp", + Prop_None, + "Define the dress up of continuity"); ContType.setEnums(ContTypeEnums); - ADD_PROPERTY_TYPE( PosAdd, (Base::Placement()) , "TrajectoryDressUp",Prop_None,"Position & Orientation to use"); - ADD_PROPERTY_TYPE( AddType, ((long)0) , "TrajectoryDressUp",Prop_None,"How to change the Position & Orientation"); + ADD_PROPERTY_TYPE(PosAdd, + (Base::Placement()), + "TrajectoryDressUp", + Prop_None, + "Position & Orientation to use"); + ADD_PROPERTY_TYPE(AddType, + ((long)0), + "TrajectoryDressUp", + Prop_None, + "How to change the Position & Orientation"); AddType.setEnums(AddTypeEnums); - } App::DocumentObjectExecReturn* TrajectoryDressUpObject::execute() @@ -55,44 +78,57 @@ App::DocumentObjectExecReturn* TrajectoryDressUpObject::execute() Robot::Trajectory result; App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No object linked"); - if (!link->getTypeId().isDerivedFrom(Robot::TrajectoryObject::getClassTypeId())) + } + if (!link->getTypeId().isDerivedFrom(Robot::TrajectoryObject::getClassTypeId())) { return new App::DocumentObjectExecReturn("Linked object is not a Trajectory object"); + } - const std::vector& wps = static_cast(link)->Trajectory.getValue().getWaypoints(); + const std::vector& wps = + static_cast(link)->Trajectory.getValue().getWaypoints(); for (auto wp : wps) { Waypoint wpt = *wp; - if (UseSpeed.getValue()) + if (UseSpeed.getValue()) { wpt.Velocity = Speed.getValue(); - if (UseAcceleration.getValue()) + } + if (UseAcceleration.getValue()) { wpt.Acceleration = Acceleration.getValue(); + } switch (ContType.getValue()) { - case 0: break; - case 1: wpt.Cont = true; break; - case 2: wpt.Cont = false; break; - default: assert(0); // must not happen! + case 0: + break; + case 1: + wpt.Cont = true; + break; + case 2: + wpt.Cont = false; + break; + default: + assert(0); // must not happen! } switch (AddType.getValue()) { - // do nothing - case 0: break; - // use orientation - case 1: - wpt.EndPos.setRotation(PosAdd.getValue().getRotation()); - break; - // add position - case 2: - wpt.EndPos.setPosition(wpt.EndPos.getPosition() + PosAdd.getValue().getPosition()); - break; - // add orientation - case 3: - wpt.EndPos.setRotation(wpt.EndPos.getRotation() * PosAdd.getValue().getRotation()); - break; - // add orientation & position - case 4: - wpt.EndPos = wpt.EndPos * PosAdd.getValue(); - break; - default: assert(0); // must not happen! + // do nothing + case 0: + break; + // use orientation + case 1: + wpt.EndPos.setRotation(PosAdd.getValue().getRotation()); + break; + // add position + case 2: + wpt.EndPos.setPosition(wpt.EndPos.getPosition() + PosAdd.getValue().getPosition()); + break; + // add orientation + case 3: + wpt.EndPos.setRotation(wpt.EndPos.getRotation() * PosAdd.getValue().getRotation()); + break; + // add orientation & position + case 4: + wpt.EndPos = wpt.EndPos * PosAdd.getValue(); + break; + default: + assert(0); // must not happen! } result.addWaypoint(wpt); diff --git a/src/Mod/Robot/App/TrajectoryDressUpObject.h b/src/Mod/Robot/App/TrajectoryDressUpObject.h index 712fda73bb..2e763e7de7 100644 --- a/src/Mod/Robot/App/TrajectoryDressUpObject.h +++ b/src/Mod/Robot/App/TrajectoryDressUpObject.h @@ -32,7 +32,7 @@ namespace Robot { -class RobotExport TrajectoryDressUpObject : public TrajectoryObject +class RobotExport TrajectoryDressUpObject: public TrajectoryObject { PROPERTY_HEADER_WITH_OVERRIDE(Robot::TrajectoryObject); @@ -40,33 +40,32 @@ public: /// Constructor TrajectoryDressUpObject(); - App::PropertyLink Source; - App::PropertySpeed Speed; - App::PropertyBool UseSpeed; + App::PropertyLink Source; + App::PropertySpeed Speed; + App::PropertyBool UseSpeed; App::PropertyAcceleration Acceleration; - App::PropertyBool UseAcceleration; - App::PropertyEnumeration ContType; - App::PropertyPlacement PosAdd; - App::PropertyEnumeration AddType; + App::PropertyBool UseAcceleration; + App::PropertyEnumeration ContType; + App::PropertyPlacement PosAdd; + App::PropertyEnumeration AddType; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "RobotGui::ViewProviderTrajectoryDressUp"; } - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; static const char* ContTypeEnums[]; static const char* AddTypeEnums[]; protected: /// get called by the container when a property has changed - void onChanged (const App::Property* prop) override; - - + void onChanged(const App::Property* prop) override; }; -} //namespace Robot +} // namespace Robot -#endif // ROBOT_ROBOTOBJECT_H +#endif // ROBOT_ROBOTOBJECT_H diff --git a/src/Mod/Robot/App/TrajectoryObject.cpp b/src/Mod/Robot/App/TrajectoryObject.cpp index 8dd8447ef4..c627f34a0a 100644 --- a/src/Mod/Robot/App/TrajectoryObject.cpp +++ b/src/Mod/Robot/App/TrajectoryObject.cpp @@ -37,9 +37,16 @@ PROPERTY_SOURCE(Robot::TrajectoryObject, App::GeoFeature) TrajectoryObject::TrajectoryObject() { - ADD_PROPERTY_TYPE(Base, (Base::Placement()), "Trajectory", Prop_None, "Base frame of the trajectory"); - ADD_PROPERTY_TYPE(Trajectory, (Robot::Trajectory()), "Trajectory", Prop_None, "Trajectory object"); - + ADD_PROPERTY_TYPE(Base, + (Base::Placement()), + "Trajectory", + Prop_None, + "Base frame of the trajectory"); + ADD_PROPERTY_TYPE(Trajectory, + (Robot::Trajectory()), + "Trajectory", + Prop_None, + "Trajectory object"); } short TrajectoryObject::mustExecute() const @@ -47,13 +54,13 @@ short TrajectoryObject::mustExecute() const return 0; } -PyObject *TrajectoryObject::getPyObject() +PyObject* TrajectoryObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } - return Py::new_reference_to(PythonObject); + return Py::new_reference_to(PythonObject); } void TrajectoryObject::onChanged(const Property* prop) diff --git a/src/Mod/Robot/App/TrajectoryObject.h b/src/Mod/Robot/App/TrajectoryObject.h index e0b6215b25..44aabdbe94 100644 --- a/src/Mod/Robot/App/TrajectoryObject.h +++ b/src/Mod/Robot/App/TrajectoryObject.h @@ -26,14 +26,14 @@ #include #include -#include "Trajectory.h" #include "PropertyTrajectory.h" +#include "Trajectory.h" namespace Robot { -class RobotExport TrajectoryObject : public App::GeoFeature +class RobotExport TrajectoryObject: public App::GeoFeature { PROPERTY_HEADER_WITH_OVERRIDE(Robot::TrajectoryObject); @@ -42,26 +42,27 @@ public: TrajectoryObject(); /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "RobotGui::ViewProviderTrajectory"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; + PyObject* getPyObject() override; App::PropertyPlacement Base; - PropertyTrajectory Trajectory; + PropertyTrajectory Trajectory; protected: /// get called by the container when a property has changed - void onChanged (const App::Property* prop) override; - + void onChanged(const App::Property* prop) override; }; -} //namespace Robot +} // namespace Robot -#endif // ROBOT_ROBOTOBJECT_H +#endif // ROBOT_ROBOTOBJECT_H diff --git a/src/Mod/Robot/App/TrajectoryPy.xml b/src/Mod/Robot/App/TrajectoryPy.xml index 878b29a3ac..4d87d81721 100644 --- a/src/Mod/Robot/App/TrajectoryPy.xml +++ b/src/Mod/Robot/App/TrajectoryPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Robot/App/TrajectoryPyImp.cpp b/src/Mod/Robot/App/TrajectoryPyImp.cpp index 1dcd42193c..159b59f623 100644 --- a/src/Mod/Robot/App/TrajectoryPyImp.cpp +++ b/src/Mod/Robot/App/TrajectoryPyImp.cpp @@ -24,10 +24,12 @@ #include +// clang-format off // inclusion of the generated files (generated out of TrajectoryPy.xml) #include #include #include +// clang-format on using namespace Robot; @@ -46,24 +48,26 @@ std::string TrajectoryPy::representation() const return str.str(); } -PyObject *TrajectoryPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* TrajectoryPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { - // create a new instance of TrajectoryPy and the Twin object + // create a new instance of TrajectoryPy and the Twin object return new TrajectoryPy(new Trajectory); } // constructor method int TrajectoryPy::PyInit(PyObject* args, PyObject* /*kwd*/) { - PyObject *pcObj=nullptr; - if (!PyArg_ParseTuple(args, "|O!", &(PyList_Type), &pcObj)) + PyObject* pcObj = nullptr; + if (!PyArg_ParseTuple(args, "|O!", &(PyList_Type), &pcObj)) { return -1; + } if (pcObj) { Py::List list(pcObj); for (Py::List::iterator it = list.begin(); it != list.end(); ++it) { if (PyObject_TypeCheck((*it).ptr(), &(Robot::WaypointPy::Type))) { - Robot::Waypoint &wp = *static_cast((*it).ptr())->getWaypointPtr(); + Robot::Waypoint& wp = + *static_cast((*it).ptr())->getWaypointPtr(); getTrajectoryPtr()->addWaypoint(wp); } } @@ -73,13 +77,13 @@ int TrajectoryPy::PyInit(PyObject* args, PyObject* /*kwd*/) } -PyObject* TrajectoryPy::insertWaypoints(PyObject * args) +PyObject* TrajectoryPy::insertWaypoints(PyObject* args) { PyObject* o; if (PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &o)) { - Base::Placement *plm = static_cast(o)->getPlacementPtr(); - getTrajectoryPtr()->addWaypoint(Robot::Waypoint("Pt",*plm)); + Base::Placement* plm = static_cast(o)->getPlacementPtr(); + getTrajectoryPtr()->addWaypoint(Robot::Waypoint("Pt", *plm)); getTrajectoryPtr()->generateTrajectory(); return new TrajectoryPy(new Robot::Trajectory(*getTrajectoryPtr())); @@ -87,12 +91,12 @@ PyObject* TrajectoryPy::insertWaypoints(PyObject * args) PyErr_Clear(); if (PyArg_ParseTuple(args, "O!", &(Robot::WaypointPy::Type), &o)) { - Robot::Waypoint &wp = *static_cast(o)->getWaypointPtr(); + Robot::Waypoint& wp = *static_cast(o)->getWaypointPtr(); getTrajectoryPtr()->addWaypoint(wp); getTrajectoryPtr()->generateTrajectory(); - + return new TrajectoryPy(new Robot::Trajectory(*getTrajectoryPtr())); - //Py_Return; + // Py_Return; } PyErr_Clear(); @@ -100,47 +104,49 @@ PyObject* TrajectoryPy::insertWaypoints(PyObject * args) Py::List list(o); for (Py::List::iterator it = list.begin(); it != list.end(); ++it) { if (PyObject_TypeCheck((*it).ptr(), &(Robot::WaypointPy::Type))) { - Robot::Waypoint &wp = *static_cast((*it).ptr())->getWaypointPtr(); + Robot::Waypoint& wp = + *static_cast((*it).ptr())->getWaypointPtr(); getTrajectoryPtr()->addWaypoint(wp); } } getTrajectoryPtr()->generateTrajectory(); - + return new TrajectoryPy(new Robot::Trajectory(*getTrajectoryPtr())); } Py_Error(PyExc_TypeError, "Wrong parameters - waypoint or placement expected"); - } -PyObject* TrajectoryPy::position(PyObject * args) +PyObject* TrajectoryPy::position(PyObject* args) { double pos; - if (!PyArg_ParseTuple(args, "d", &pos)) + if (!PyArg_ParseTuple(args, "d", &pos)) { return nullptr; + } return (new Base::PlacementPy(new Base::Placement(getTrajectoryPtr()->getPosition(pos)))); } -PyObject* TrajectoryPy::velocity(PyObject * args) +PyObject* TrajectoryPy::velocity(PyObject* args) { double pos; - if (!PyArg_ParseTuple(args, "d", &pos)) + if (!PyArg_ParseTuple(args, "d", &pos)) { return nullptr; + } - // return velocity as float + // return velocity as float return Py::new_reference_to(Py::Float(getTrajectoryPtr()->getVelocity(pos))); } -PyObject* TrajectoryPy::deleteLast(PyObject *args) +PyObject* TrajectoryPy::deleteLast(PyObject* args) { - int n=1; - if (!PyArg_ParseTuple(args, "|i", &n)) + int n = 1; + if (!PyArg_ParseTuple(args, "|i", &n)) { return nullptr; + } getTrajectoryPtr()->deleteLast(n); return new TrajectoryPy(new Robot::Trajectory(*getTrajectoryPtr())); - } - +} Py::Float TrajectoryPy::getDuration() const @@ -151,8 +157,10 @@ Py::Float TrajectoryPy::getDuration() const Py::List TrajectoryPy::getWaypoints() const { Py::List list; - for(unsigned int i = 0; i < getTrajectoryPtr()->getSize(); i++) - list.append(Py::asObject(new Robot::WaypointPy(new Robot::Waypoint(getTrajectoryPtr()->getWaypoint(i))))); + for (unsigned int i = 0; i < getTrajectoryPtr()->getSize(); i++) { + list.append(Py::asObject( + new Robot::WaypointPy(new Robot::Waypoint(getTrajectoryPtr()->getWaypoint(i))))); + } return list; } @@ -163,20 +171,15 @@ Py::Float TrajectoryPy::getLength() const } - void TrajectoryPy::setWaypoints(Py::List) -{ - -} +{} -PyObject *TrajectoryPy::getCustomAttributes(const char* /*attr*/) const +PyObject* TrajectoryPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } int TrajectoryPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } - - diff --git a/src/Mod/Robot/App/Waypoint.cpp b/src/Mod/Robot/App/Waypoint.cpp index c73fd8f556..85b95e155f 100644 --- a/src/Mod/Robot/App/Waypoint.cpp +++ b/src/Mod/Robot/App/Waypoint.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include "kdl_cp/chain.hpp" +#include "kdl_cp/chain.hpp" #endif #include @@ -32,12 +32,12 @@ #ifndef M_PI - #define M_PI 3.14159265358979323846 - #define M_PI 3.14159265358979323846 /* pi */ +#define M_PI 3.14159265358979323846 +#define M_PI 3.14159265358979323846 /* pi */ #endif #ifndef M_PI_2 - #define M_PI_2 1.57079632679489661923 /* pi/2 */ +#define M_PI_2 1.57079632679489661923 /* pi/2 */ #endif using namespace Robot; @@ -45,10 +45,10 @@ using namespace Base; using namespace KDL; -TYPESYSTEM_SOURCE(Robot::Waypoint , Base::Persistence) +TYPESYSTEM_SOURCE(Robot::Waypoint, Base::Persistence) Waypoint::Waypoint(const char* name, - const Base::Placement &endPos, + const Base::Placement& endPos, WaypointType type, float velocity, float acceleration, @@ -56,64 +56,67 @@ Waypoint::Waypoint(const char* name, unsigned int tool, unsigned int base) - : Name(name) - , Type(type) - , Velocity(velocity) - , Acceleration(acceleration) - , Cont(cont) - , Tool(tool) - , Base(base) - , EndPos(endPos) -{ -} + : Name(name) + , Type(type) + , Velocity(velocity) + , Acceleration(acceleration) + , Cont(cont) + , Tool(tool) + , Base(base) + , EndPos(endPos) +{} Waypoint::Waypoint() - : Type(UNDEF) - , Velocity(1000.0) - , Acceleration(100.0) - , Cont(false) - , Tool(0) - , Base(0) -{ -} + : Type(UNDEF) + , Velocity(1000.0) + , Acceleration(100.0) + , Cont(false) + , Tool(0) + , Base(0) +{} Waypoint::~Waypoint() = default; -unsigned int Waypoint::getMemSize () const +unsigned int Waypoint::getMemSize() const { - return 0; + return 0; } -void Waypoint::Save (Writer &writer) const +void Waypoint::Save(Writer& writer) const { - writer.Stream() << writer.ind() << " "; - else if(Type == Waypoint::LINE) + } + else if (Type == Waypoint::LINE) { writer.Stream() << " type=\"LIN\"/> "; - else if(Type == Waypoint::CIRC) + } + else if (Type == Waypoint::CIRC) { writer.Stream() << " type=\"CIRC\"/> "; - else if(Type == Waypoint::WAIT) + } + else if (Type == Waypoint::WAIT) { writer.Stream() << " type=\"WAIT\"/> "; - else if(Type == Waypoint::UNDEF) + } + else if (Type == Waypoint::UNDEF) { writer.Stream() << " type=\"UNDEF\"/> "; - writer.Stream()<< std::endl; + } + writer.Stream() << std::endl; } -void Waypoint::Restore(XMLReader &reader) +void Waypoint::Restore(XMLReader& reader) { // read my Element reader.readElement("Waypoint"); @@ -127,24 +130,26 @@ void Waypoint::Restore(XMLReader &reader) reader.getAttributeAsFloat("Q2"), reader.getAttributeAsFloat("Q3"))); - Velocity = (float) reader.getAttributeAsFloat("vel"); - Acceleration = (float) reader.getAttributeAsFloat("acc"); - Cont = (reader.getAttributeAsInteger("cont") != 0)?true:false; - Tool = reader.getAttributeAsInteger("tool"); - Base = reader.getAttributeAsInteger("base"); + Velocity = (float)reader.getAttributeAsFloat("vel"); + Acceleration = (float)reader.getAttributeAsFloat("acc"); + Cont = (reader.getAttributeAsInteger("cont") != 0) ? true : false; + Tool = reader.getAttributeAsInteger("tool"); + Base = reader.getAttributeAsInteger("base"); std::string type = reader.getAttribute("type"); - if(type=="PTP") + if (type == "PTP") { Type = Waypoint::PTP; - else if(type=="LIN") + } + else if (type == "LIN") { Type = Waypoint::LINE; - else if(type=="CIRC") + } + else if (type == "CIRC") { Type = Waypoint::CIRC; - else if(type=="WAIT") + } + else if (type == "WAIT") { Type = Waypoint::WAIT; - else + } + else { Type = Waypoint::UNDEF; - - + } } - diff --git a/src/Mod/Robot/App/Waypoint.h b/src/Mod/Robot/App/Waypoint.h index 7f0f4be145..99f4007c37 100644 --- a/src/Mod/Robot/App/Waypoint.h +++ b/src/Mod/Robot/App/Waypoint.h @@ -33,28 +33,30 @@ namespace Robot /** The representation of a waypoint in a trajectory */ -class RobotExport Waypoint : public Base::Persistence +class RobotExport Waypoint: public Base::Persistence { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - enum WaypointType { + enum WaypointType + { UNDEF, PTP, LINE, CIRC, - WAIT }; + WAIT + }; Waypoint(); - /// full constructor + /// full constructor Waypoint(const char* name, - const Base::Placement& endPos, - WaypointType type = Waypoint::LINE, - float velocity = 2000.0, - float acceleration = 100.0, - bool cont = false, - unsigned int tool = 0, - unsigned int base = 0); + const Base::Placement& endPos, + WaypointType type = Waypoint::LINE, + float velocity = 2000.0, + float acceleration = 100.0, + bool cont = false, + unsigned int tool = 0, + unsigned int base = 0); ~Waypoint() override; @@ -63,18 +65,17 @@ public: void Save(Base::Writer& /*writer*/) const override; void Restore(Base::XMLReader& /*reader*/) override; - + std::string Name; WaypointType Type; float Velocity; float Acceleration; bool Cont; - unsigned int Tool,Base; + unsigned int Tool, Base; Base::Placement EndPos; - }; -} //namespace Part +} // namespace Robot -#endif // ROBOT_WAYPOINT_H +#endif // ROBOT_WAYPOINT_H diff --git a/src/Mod/Robot/App/WaypointPy.xml b/src/Mod/Robot/App/WaypointPy.xml index b14f124432..cf600b6950 100644 --- a/src/Mod/Robot/App/WaypointPy.xml +++ b/src/Mod/Robot/App/WaypointPy.xml @@ -1,13 +1,13 @@ - diff --git a/src/Mod/Robot/App/WaypointPyImp.cpp b/src/Mod/Robot/App/WaypointPyImp.cpp index 3379220d65..9b4d8aaa11 100644 --- a/src/Mod/Robot/App/WaypointPyImp.cpp +++ b/src/Mod/Robot/App/WaypointPyImp.cpp @@ -26,9 +26,11 @@ #include #include +// clang-format off // inclusion of the generated files (generated out of WaypointPy.xml) #include "WaypointPy.h" #include "WaypointPy.cpp" +// clang-format on using namespace Robot; @@ -37,40 +39,50 @@ using namespace Base; // returns a string which represents the object e.g. when printed in python std::string WaypointPy::representation() const { - double A,B,C; + double A, B, C; std::stringstream str; - getWaypointPtr()->EndPos.getRotation().getYawPitchRoll(A,B,C); + getWaypointPtr()->EndPos.getRotation().getYawPitchRoll(A, B, C); str.precision(5); str << "Waypoint ["; - if(getWaypointPtr()->Type == Waypoint::PTP) + if (getWaypointPtr()->Type == Waypoint::PTP) { str << "PTP "; - else if(getWaypointPtr()->Type == Waypoint::LINE) + } + else if (getWaypointPtr()->Type == Waypoint::LINE) { str << "LIN "; - else if(getWaypointPtr()->Type == Waypoint::CIRC) + } + else if (getWaypointPtr()->Type == Waypoint::CIRC) { str << "CIRC "; - else if(getWaypointPtr()->Type == Waypoint::WAIT) + } + else if (getWaypointPtr()->Type == Waypoint::WAIT) { str << "WAIT "; - else if(getWaypointPtr()->Type == Waypoint::UNDEF) + } + else if (getWaypointPtr()->Type == Waypoint::UNDEF) { str << "UNDEF "; + } str << getWaypointPtr()->Name; str << " ("; - str << getWaypointPtr()->EndPos.getPosition().x << ","<< getWaypointPtr()->EndPos.getPosition().y << "," << getWaypointPtr()->EndPos.getPosition().z; + str << getWaypointPtr()->EndPos.getPosition().x << "," + << getWaypointPtr()->EndPos.getPosition().y << "," + << getWaypointPtr()->EndPos.getPosition().z; str << ";" << A << "," << B << "," << C << ")"; str << "v=" << getWaypointPtr()->Velocity << " "; - if(getWaypointPtr()->Cont) + if (getWaypointPtr()->Cont) { str << "Cont "; - if(getWaypointPtr()->Tool != 0) + } + if (getWaypointPtr()->Tool != 0) { str << "Tool" << getWaypointPtr()->Tool << " "; - if(getWaypointPtr()->Base != 0) + } + if (getWaypointPtr()->Base != 0) { str << "Tool" << getWaypointPtr()->Base << " "; + } str << "]"; return str.str(); } -PyObject *WaypointPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* WaypointPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { - // create a new instance of WaypointPy and the Twin object + // create a new instance of WaypointPy and the Twin object return new WaypointPy(new Waypoint); } @@ -86,12 +98,22 @@ int WaypointPy::PyInit(PyObject* args, PyObject* kwd) int tool = 0; int base = 0; - static const std::array kwlist{"Pos", "type", "name", "vel", "cont", "tool", "base", "acc", - nullptr}; + static const std::array + kwlist {"Pos", "type", "name", "vel", "cont", "tool", "base", "acc", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args, kwd, "O!|ssOiiiO", kwlist, - &(Base::PlacementPy::Type), &pos, // the placement object - &type, &name, &vel, &cont, &tool, &base, &acc)) { + if (!Base::Wrapped_ParseTupleAndKeywords(args, + kwd, + "O!|ssOiiiO", + kwlist, + &(Base::PlacementPy::Type), + &pos, // the placement object + &type, + &name, + &vel, + &cont, + &tool, + &base, + &acc)) { return -1; } @@ -99,40 +121,49 @@ int WaypointPy::PyInit(PyObject* args, PyObject* kwd) getWaypointPtr()->EndPos = TempPos; getWaypointPtr()->Name = name; std::string typeStr(type); - if (typeStr == "PTP") + if (typeStr == "PTP") { getWaypointPtr()->Type = Waypoint::PTP; - else if (typeStr == "LIN") + } + else if (typeStr == "LIN") { getWaypointPtr()->Type = Waypoint::LINE; - else if (typeStr == "CIRC") + } + else if (typeStr == "CIRC") { getWaypointPtr()->Type = Waypoint::CIRC; - else if (typeStr == "WAIT") + } + else if (typeStr == "WAIT") { getWaypointPtr()->Type = Waypoint::WAIT; - else + } + else { getWaypointPtr()->Type = Waypoint::UNDEF; + } - if (!vel) + if (!vel) { switch (getWaypointPtr()->Type) { - case Waypoint::PTP: - getWaypointPtr()->Velocity = 100; - break; - case Waypoint::LINE: - getWaypointPtr()->Velocity = 2000; - break; - case Waypoint::CIRC: - getWaypointPtr()->Velocity = 2000; - break; - default: - getWaypointPtr()->Velocity = 0; + case Waypoint::PTP: + getWaypointPtr()->Velocity = 100; + break; + case Waypoint::LINE: + getWaypointPtr()->Velocity = 2000; + break; + case Waypoint::CIRC: + getWaypointPtr()->Velocity = 2000; + break; + default: + getWaypointPtr()->Velocity = 0; } - else + } + else { getWaypointPtr()->Velocity = Base::UnitsApi::toDouble(vel, Base::Unit::Velocity); + } getWaypointPtr()->Cont = cont ? true : false; getWaypointPtr()->Tool = tool; getWaypointPtr()->Base = base; - if (!acc) + if (!acc) { getWaypointPtr()->Acceleration = 100; - else + } + else { getWaypointPtr()->Acceleration = Base::UnitsApi::toDouble(acc, Base::Unit::Acceleration); + } return 0; } @@ -143,9 +174,9 @@ Py::Float WaypointPy::getVelocity() const return Py::Float(getWaypointPtr()->Velocity); } -void WaypointPy::setVelocity(Py::Float arg) +void WaypointPy::setVelocity(Py::Float arg) { - getWaypointPtr()->Velocity = (float) arg.operator double(); + getWaypointPtr()->Velocity = (float)arg.operator double(); } @@ -161,46 +192,58 @@ void WaypointPy::setName(Py::String arg) Py::String WaypointPy::getType() const { - if(getWaypointPtr()->Type == Waypoint::PTP) + if (getWaypointPtr()->Type == Waypoint::PTP) { return Py::String("PTP"); - else if(getWaypointPtr()->Type == Waypoint::LINE) + } + else if (getWaypointPtr()->Type == Waypoint::LINE) { return Py::String("LIN"); - else if(getWaypointPtr()->Type == Waypoint::CIRC) + } + else if (getWaypointPtr()->Type == Waypoint::CIRC) { return Py::String("CIRC"); - else if(getWaypointPtr()->Type == Waypoint::WAIT) + } + else if (getWaypointPtr()->Type == Waypoint::WAIT) { return Py::String("WAIT"); - else if(getWaypointPtr()->Type == Waypoint::UNDEF) + } + else if (getWaypointPtr()->Type == Waypoint::UNDEF) { return Py::String("UNDEF"); - else + } + else { throw Base::TypeError("Unknown waypoint type! Only: PTP,LIN,CIRC,WAIT are supported."); + } } void WaypointPy::setType(Py::String arg) { std::string typeStr(arg.as_std_string("ascii")); - if(typeStr=="PTP") + if (typeStr == "PTP") { getWaypointPtr()->Type = Waypoint::PTP; - else if(typeStr=="LIN") + } + else if (typeStr == "LIN") { getWaypointPtr()->Type = Waypoint::LINE; - else if(typeStr=="CIRC") + } + else if (typeStr == "CIRC") { getWaypointPtr()->Type = Waypoint::CIRC; - else if(typeStr=="WAIT") + } + else if (typeStr == "WAIT") { getWaypointPtr()->Type = Waypoint::WAIT; - else + } + else { throw Base::TypeError("Unknown waypoint type! Only: PTP,LIN,CIRC,WAIT are allowed."); + } } Py::Object WaypointPy::getPos() const { - return Py::Object(new PlacementPy(new Placement(getWaypointPtr()->EndPos)),true); + return Py::Object(new PlacementPy(new Placement(getWaypointPtr()->EndPos)), true); } void WaypointPy::setPos(Py::Object arg) { Py::Type PlacementType(Base::getTypeAsObject(&(Base::PlacementPy::Type))); - if(arg.isType(PlacementType)) + if (arg.isType(PlacementType)) { getWaypointPtr()->EndPos = *static_cast((*arg))->getPlacementPtr(); + } } Py::Boolean WaypointPy::getCont() const @@ -221,10 +264,12 @@ Py::Long WaypointPy::getTool() const void WaypointPy::setTool(Py::Long arg) { long value = static_cast(arg); - if (value >= 0) + if (value >= 0) { getWaypointPtr()->Tool = value; - else + } + else { throw Py::ValueError("negative tool not allowed!"); + } } Py::Long WaypointPy::getBase() const @@ -235,20 +280,20 @@ Py::Long WaypointPy::getBase() const void WaypointPy::setBase(Py::Long arg) { long value = static_cast(arg); - if (value >= 0) + if (value >= 0) { getWaypointPtr()->Base = value; - else + } + else { throw Py::ValueError("negative base not allowed!"); + } } -PyObject *WaypointPy::getCustomAttributes(const char* /*attr*/) const +PyObject* WaypointPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } int WaypointPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { - return 0; + return 0; } - - diff --git a/src/Mod/Robot/CMakeLists.txt b/src/Mod/Robot/CMakeLists.txt index 03376fce7a..b6605ac7d6 100644 --- a/src/Mod/Robot/CMakeLists.txt +++ b/src/Mod/Robot/CMakeLists.txt @@ -64,4 +64,3 @@ INSTALL( PATTERN "Makefile*" EXCLUDE PATTERN "*.pdf" EXCLUDE ) - diff --git a/src/Mod/Robot/Gui/AppRobotGui.cpp b/src/Mod/Robot/Gui/AppRobotGui.cpp index b89b583e48..334b2500e3 100644 --- a/src/Mod/Robot/Gui/AppRobotGui.cpp +++ b/src/Mod/Robot/Gui/AppRobotGui.cpp @@ -50,13 +50,15 @@ void loadRobotResource() Gui::Translator::instance()->refresh(); } -namespace RobotGui { -class Module : public Py::ExtensionModule +namespace RobotGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("RobotGui") + Module() + : Py::ExtensionModule("RobotGui") { - initialize("This module is the RobotGui module."); // register with Python + initialize("This module is the RobotGui module."); // register with Python } private: @@ -67,7 +69,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace RobotGui +} // namespace RobotGui /* Python entry */ @@ -93,7 +95,7 @@ PyMOD_INIT_FUNC(RobotGui) // default displacement while e.g. picking Base::Interpreter().runString("_DefDisplacement = FreeCAD.Vector(0,0,0)"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } @@ -106,6 +108,7 @@ PyMOD_INIT_FUNC(RobotGui) CreateRobotCommandsInsertRobots(); CreateRobotCommandsTrajectory(); + // clang-format off // addition objects RobotGui::Workbench ::init(); RobotGui::ViewProviderRobotObject ::init(); @@ -113,8 +116,9 @@ PyMOD_INIT_FUNC(RobotGui) RobotGui::ViewProviderEdge2TracObject ::init(); RobotGui::ViewProviderTrajectoryCompound ::init(); RobotGui::ViewProviderTrajectoryDressUp ::init(); + // clang-format on - // add resources and reloads the translators + // add resources and reloads the translators loadRobotResource(); PyMOD_Return(mod); diff --git a/src/Mod/Robot/Gui/Command.cpp b/src/Mod/Robot/Gui/Command.cpp index c6c007fd1e..0328f76d71 100644 --- a/src/Mod/Robot/Gui/Command.cpp +++ b/src/Mod/Robot/Gui/Command.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -45,31 +45,31 @@ using namespace RobotGui; DEF_STD_CMD_A(CmdRobotSetHomePos) CmdRobotSetHomePos::CmdRobotSetHomePos() - :Command("Robot_SetHomePos") + : Command("Robot_SetHomePos") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Set the home position"); - sToolTipText = QT_TR_NOOP("Set the home position"); - sWhatsThis = "Robot_SetHomePos"; - sStatusTip = sToolTipText; - sPixmap = "Robot_SetHomePos"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Set the home position"); + sToolTipText = QT_TR_NOOP("Set the home position"); + sWhatsThis = "Robot_SetHomePos"; + sStatusTip = sToolTipText; + sPixmap = "Robot_SetHomePos"; } void CmdRobotSetHomePos::activated(int) { - const char * SelFilter = - "SELECT Robot::RobotObject COUNT 1 "; + const char* SelFilter = "SELECT Robot::RobotObject COUNT 1 "; Gui::SelectionFilter filter(SelFilter); - Robot::RobotObject *pcRobotObject; + Robot::RobotObject* pcRobotObject; if (filter.match()) { pcRobotObject = static_cast(filter.Result[0][0].getObject()); } else { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Robot to set home position")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Robot to set home position")); return; } @@ -78,10 +78,20 @@ void CmdRobotSetHomePos::activated(int) const char* n = FeatName.c_str(); openCommand("Set home"); - doCommand(Doc,"App.activeDocument().%s.Home = [App.activeDocument().%s.Axis1,App.activeDocument().%s.Axis2,App.activeDocument().%s.Axis3,App.activeDocument().%s.Axis4,App.activeDocument().%s.Axis5,App.activeDocument().%s.Axis6]",n,n,n,n,n,n,n); + doCommand(Doc, + "App.activeDocument().%s.Home = " + "[App.activeDocument().%s.Axis1,App.activeDocument().%s.Axis2,App.activeDocument().%" + "s.Axis3,App.activeDocument().%s.Axis4,App.activeDocument().%s.Axis5,App." + "activeDocument().%s.Axis6]", + n, + n, + n, + n, + n, + n, + n); updateActive(); commitCommand(); - } bool CmdRobotSetHomePos::isActive() @@ -94,31 +104,31 @@ bool CmdRobotSetHomePos::isActive() DEF_STD_CMD_A(CmdRobotRestoreHomePos) CmdRobotRestoreHomePos::CmdRobotRestoreHomePos() - :Command("Robot_RestoreHomePos") + : Command("Robot_RestoreHomePos") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Move to home"); - sToolTipText = QT_TR_NOOP("Move to home"); - sWhatsThis = "Robot_RestoreHomePos"; - sStatusTip = sToolTipText; - sPixmap = "Robot_RestoreHomePos"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Move to home"); + sToolTipText = QT_TR_NOOP("Move to home"); + sWhatsThis = "Robot_RestoreHomePos"; + sStatusTip = sToolTipText; + sPixmap = "Robot_RestoreHomePos"; } void CmdRobotRestoreHomePos::activated(int) { - const char * SelFilter = - "SELECT Robot::RobotObject COUNT 1 "; + const char* SelFilter = "SELECT Robot::RobotObject COUNT 1 "; Gui::SelectionFilter filter(SelFilter); - Robot::RobotObject *pcRobotObject; + Robot::RobotObject* pcRobotObject; if (filter.match()) { pcRobotObject = static_cast(filter.Result[0][0].getObject()); } else { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Robot")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Robot")); return; } @@ -127,15 +137,14 @@ void CmdRobotRestoreHomePos::activated(int) const char* n = FeatName.c_str(); openCommand("Move to home"); - doCommand(Doc,"App.activeDocument().%s.Axis1 = App.activeDocument().%s.Home[0]",n,n); - doCommand(Doc,"App.activeDocument().%s.Axis2 = App.activeDocument().%s.Home[1]",n,n); - doCommand(Doc,"App.activeDocument().%s.Axis3 = App.activeDocument().%s.Home[2]",n,n); - doCommand(Doc,"App.activeDocument().%s.Axis4 = App.activeDocument().%s.Home[3]",n,n); - doCommand(Doc,"App.activeDocument().%s.Axis5 = App.activeDocument().%s.Home[4]",n,n); - doCommand(Doc,"App.activeDocument().%s.Axis6 = App.activeDocument().%s.Home[5]",n,n); + doCommand(Doc, "App.activeDocument().%s.Axis1 = App.activeDocument().%s.Home[0]", n, n); + doCommand(Doc, "App.activeDocument().%s.Axis2 = App.activeDocument().%s.Home[1]", n, n); + doCommand(Doc, "App.activeDocument().%s.Axis3 = App.activeDocument().%s.Home[2]", n, n); + doCommand(Doc, "App.activeDocument().%s.Axis4 = App.activeDocument().%s.Home[3]", n, n); + doCommand(Doc, "App.activeDocument().%s.Axis5 = App.activeDocument().%s.Home[4]", n, n); + doCommand(Doc, "App.activeDocument().%s.Axis6 = App.activeDocument().%s.Home[5]", n, n); updateActive(); commitCommand(); - } bool CmdRobotRestoreHomePos::isActive() @@ -148,15 +157,15 @@ bool CmdRobotRestoreHomePos::isActive() DEF_STD_CMD_A(CmdRobotConstraintAxle) CmdRobotConstraintAxle::CmdRobotConstraintAxle() - :Command("Robot_Create") + : Command("Robot_Create") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Place robot..."); - sToolTipText = QT_TR_NOOP("Place a robot (experimental!)"); - sWhatsThis = "Robot_Create"; - sStatusTip = sToolTipText; - sPixmap = "Robot_CreateRobot"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Place robot..."); + sToolTipText = QT_TR_NOOP("Place a robot (experimental!)"); + sWhatsThis = "Robot_Create"; + sStatusTip = sToolTipText; + sPixmap = "Robot_CreateRobot"; } @@ -167,15 +176,22 @@ void CmdRobotConstraintAxle::activated(int) std::string KinematicPath = "Mod/Robot/Lib/Kuka/kr500_1.csv"; openCommand("Place robot"); - doCommand(Doc,"App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),RobotPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),KinematicPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis2 = -90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis3 = 90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis5 = 45",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + RobotPath.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + KinematicPath.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis2 = -90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis3 = 90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis5 = 45", FeatName.c_str()); updateActive(); commitCommand(); - } bool CmdRobotConstraintAxle::isActive() @@ -189,68 +205,74 @@ bool CmdRobotConstraintAxle::isActive() DEF_STD_CMD_A(CmdRobotSimulate) CmdRobotSimulate::CmdRobotSimulate() - :Command("Robot_Simulate") + : Command("Robot_Simulate") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Simulate a trajectory"); - sToolTipText = QT_TR_NOOP("Run a simulation on a trajectory"); - sWhatsThis = "Robot_Simulate"; - sStatusTip = sToolTipText; - sPixmap = "Robot_Simulate"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Simulate a trajectory"); + sToolTipText = QT_TR_NOOP("Run a simulation on a trajectory"); + sWhatsThis = "Robot_Simulate"; + sStatusTip = sToolTipText; + sPixmap = "Robot_Simulate"; } void CmdRobotSimulate::activated(int) { #if 1 - const char * SelFilter = - "SELECT Robot::RobotObject \n" - "SELECT Robot::TrajectoryObject "; + const char* SelFilter = "SELECT Robot::RobotObject \n" + "SELECT Robot::TrajectoryObject "; Gui::SelectionFilter filter(SelFilter); - Robot::RobotObject *pcRobotObject; - Robot::TrajectoryObject *pcTrajectoryObject; + Robot::RobotObject* pcRobotObject; + Robot::TrajectoryObject* pcTrajectoryObject; if (filter.match()) { pcRobotObject = static_cast(filter.Result[0][0].getObject()); - pcTrajectoryObject = static_cast(filter.Result[1][0].getObject());; + pcTrajectoryObject = static_cast(filter.Result[1][0].getObject()); + ; } else { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Robot and one Trajectory object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Robot and one Trajectory object.")); return; } - if(pcTrajectoryObject->Trajectory.getValue().getSize() < 2){ - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Trajectory not valid"), + if (pcTrajectoryObject->Trajectory.getValue().getSize() < 2) { + QMessageBox::warning( + Gui::getMainWindow(), + QObject::tr("Trajectory not valid"), QObject::tr("You need at least two waypoints in a trajectory to simulate.")); return; } - Gui::TaskView::TaskDialog* dlg = new TaskDlgSimulate(pcRobotObject,pcTrajectoryObject); + Gui::TaskView::TaskDialog* dlg = new TaskDlgSimulate(pcRobotObject, pcTrajectoryObject); Gui::Control().showDialog(dlg); #else - const char * SelFilter = - "SELECT Robot::RobotObject \n" - "SELECT Robot::TrajectoryObject "; + const char* SelFilter = "SELECT Robot::RobotObject \n" + "SELECT Robot::TrajectoryObject "; Gui::SelectionFilter filter(SelFilter); - Robot::RobotObject *pcRobotObject; - Robot::TrajectoryObject *pcTrajectoryObject; + Robot::RobotObject* pcRobotObject; + Robot::TrajectoryObject* pcTrajectoryObject; - if(filter.match()){ + if (filter.match()) { pcRobotObject = dynamic_cast(filter.Result[0][0].getObject()); - pcTrajectoryObject = dynamic_cast(filter.Result[1][0].getObject());; - }else{ - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Robot and one Trajectory object.")); + pcTrajectoryObject = + dynamic_cast(filter.Result[1][0].getObject()); + ; + } + else { + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Robot and one Trajectory object.")); } - RobotGui::TrajectorySimulate dlg(pcRobotObject,pcTrajectoryObject,Gui::getMainWindow()); + RobotGui::TrajectorySimulate dlg(pcRobotObject, pcTrajectoryObject, Gui::getMainWindow()); dlg.exec(); #endif } @@ -261,17 +283,15 @@ bool CmdRobotSimulate::isActive() } - // ##################################################################################################### - void CreateRobotCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdRobotRestoreHomePos()); rcCmdMgr.addCommand(new CmdRobotSetHomePos()); rcCmdMgr.addCommand(new CmdRobotConstraintAxle()); rcCmdMgr.addCommand(new CmdRobotSimulate()); - } +} diff --git a/src/Mod/Robot/Gui/CommandExport.cpp b/src/Mod/Robot/Gui/CommandExport.cpp index b7f6a89613..bbd390529c 100644 --- a/src/Mod/Robot/Gui/CommandExport.cpp +++ b/src/Mod/Robot/Gui/CommandExport.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -40,15 +40,15 @@ using namespace std; DEF_STD_CMD_A(CmdRobotExportKukaCompact) CmdRobotExportKukaCompact::CmdRobotExportKukaCompact() - :Command("Robot_ExportKukaCompact") + : Command("Robot_ExportKukaCompact") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka compact subroutine..."); - sToolTipText = QT_TR_NOOP("Export the trajectory as a compact KRL subroutine."); - sWhatsThis = "Robot_ExportKukaCompact"; - sStatusTip = sToolTipText; - sPixmap = "Robot_Export"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Kuka compact subroutine..."); + sToolTipText = QT_TR_NOOP("Export the trajectory as a compact KRL subroutine."); + sWhatsThis = "Robot_ExportKukaCompact"; + sStatusTip = sToolTipText; + sPixmap = "Robot_Export"; } @@ -58,37 +58,50 @@ void CmdRobotExportKukaCompact::activated(int) unsigned int n2 = getSelection().countObjectsOfType(Robot::TrajectoryObject::getClassTypeId()); if (n1 != 1 || n2 != 1) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Robot and one Trajectory object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Robot and one Trajectory object.")); return; } std::vector Sel = getSelection().getSelection(); - Robot::RobotObject *pcRobotObject=nullptr; - if(Sel[0].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) + Robot::RobotObject* pcRobotObject = nullptr; + if (Sel[0].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) { pcRobotObject = static_cast(Sel[0].pObject); - else if(Sel[1].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) + } + else if (Sel[1].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) { pcRobotObject = static_cast(Sel[1].pObject); + } std::string RoboName = pcRobotObject->getNameInDocument(); - Robot::TrajectoryObject *pcTrajectoryObject=nullptr; - if(Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) + Robot::TrajectoryObject* pcTrajectoryObject = nullptr; + if (Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) { pcTrajectoryObject = static_cast(Sel[0].pObject); - else if(Sel[1].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) + } + else if (Sel[1].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) { pcTrajectoryObject = static_cast(Sel[1].pObject); - //std::string TrakName = pcTrajectoryObject->getNameInDocument(); + } + // std::string TrakName = pcTrajectoryObject->getNameInDocument(); QStringList filter; filter << QString::fromLatin1("%1 (*.src)").arg(QObject::tr("KRL file")); filter << QString::fromLatin1("%1 (*.*)").arg(QObject::tr("All Files")); - QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), QObject::tr("Export program"), QString(), filter.join(QLatin1String(";;"))); - if (fn.isEmpty()) + QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), + QObject::tr("Export program"), + QString(), + filter.join(QLatin1String(";;"))); + if (fn.isEmpty()) { return; + } - doCommand(Doc,"from KukaExporter import ExportCompactSub"); - doCommand(Doc,"ExportCompactSub(App.activeDocument().%s,App.activeDocument().%s,'%s')",pcRobotObject->getNameInDocument(),pcTrajectoryObject->getNameInDocument(),(const char*)fn.toLatin1()); + doCommand(Doc, "from KukaExporter import ExportCompactSub"); + doCommand(Doc, + "ExportCompactSub(App.activeDocument().%s,App.activeDocument().%s,'%s')", + pcRobotObject->getNameInDocument(), + pcTrajectoryObject->getNameInDocument(), + (const char*)fn.toLatin1()); } bool CmdRobotExportKukaCompact::isActive() @@ -102,15 +115,15 @@ bool CmdRobotExportKukaCompact::isActive() DEF_STD_CMD_A(CmdRobotExportKukaFull) CmdRobotExportKukaFull::CmdRobotExportKukaFull() - :Command("Robot_ExportKukaFull") + : Command("Robot_ExportKukaFull") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka full subroutine..."); - sToolTipText = QT_TR_NOOP("Export the trajectory as a full KRL subroutine."); - sWhatsThis = "Robot_ExportKukaFull"; - sStatusTip = sToolTipText; - sPixmap = "Robot_Export"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Kuka full subroutine..."); + sToolTipText = QT_TR_NOOP("Export the trajectory as a full KRL subroutine."); + sWhatsThis = "Robot_ExportKukaFull"; + sStatusTip = sToolTipText; + sPixmap = "Robot_Export"; } @@ -120,37 +133,50 @@ void CmdRobotExportKukaFull::activated(int) unsigned int n2 = getSelection().countObjectsOfType(Robot::TrajectoryObject::getClassTypeId()); if (n1 != 1 || n2 != 1) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Robot and one Trajectory object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Robot and one Trajectory object.")); return; } std::vector Sel = getSelection().getSelection(); - Robot::RobotObject *pcRobotObject=nullptr; - if(Sel[0].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) + Robot::RobotObject* pcRobotObject = nullptr; + if (Sel[0].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) { pcRobotObject = static_cast(Sel[0].pObject); - else if(Sel[1].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) + } + else if (Sel[1].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) { pcRobotObject = static_cast(Sel[1].pObject); - //std::string RoboName = pcRobotObject->getNameInDocument(); + } + // std::string RoboName = pcRobotObject->getNameInDocument(); - Robot::TrajectoryObject *pcTrajectoryObject=nullptr; - if(Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) + Robot::TrajectoryObject* pcTrajectoryObject = nullptr; + if (Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) { pcTrajectoryObject = static_cast(Sel[0].pObject); - else if(Sel[1].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) + } + else if (Sel[1].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) { pcTrajectoryObject = static_cast(Sel[1].pObject); - //std::string TrakName = pcTrajectoryObject->getNameInDocument(); + } + // std::string TrakName = pcTrajectoryObject->getNameInDocument(); QStringList filter; filter << QString::fromLatin1("%1 (*.src)").arg(QObject::tr("KRL file")); filter << QString::fromLatin1("%1 (*.*)").arg(QObject::tr("All Files")); - QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), QObject::tr("Export program"), QString(), filter.join(QLatin1String(";;"))); - if (fn.isEmpty()) + QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), + QObject::tr("Export program"), + QString(), + filter.join(QLatin1String(";;"))); + if (fn.isEmpty()) { return; + } - doCommand(Doc,"from KukaExporter import ExportFullSub"); - doCommand(Doc,"ExportFullSub(App.activeDocument().%s,App.activeDocument().%s,'%s')",pcRobotObject->getNameInDocument(),pcTrajectoryObject->getNameInDocument(),(const char*)fn.toLatin1()); + doCommand(Doc, "from KukaExporter import ExportFullSub"); + doCommand(Doc, + "ExportFullSub(App.activeDocument().%s,App.activeDocument().%s,'%s')", + pcRobotObject->getNameInDocument(), + pcTrajectoryObject->getNameInDocument(), + (const char*)fn.toLatin1()); } bool CmdRobotExportKukaFull::isActive() @@ -161,11 +187,10 @@ bool CmdRobotExportKukaFull::isActive() // ##################################################################################################### - void CreateRobotCommandsExport() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdRobotExportKukaFull()); rcCmdMgr.addCommand(new CmdRobotExportKukaCompact()); - } +} diff --git a/src/Mod/Robot/Gui/CommandInsertRobot.cpp b/src/Mod/Robot/Gui/CommandInsertRobot.cpp index 2ce779bfe5..d990c48d58 100644 --- a/src/Mod/Robot/Gui/CommandInsertRobot.cpp +++ b/src/Mod/Robot/Gui/CommandInsertRobot.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -40,15 +40,15 @@ using namespace std; DEF_STD_CMD_A(CmdRobotInsertKukaIR500) CmdRobotInsertKukaIR500::CmdRobotInsertKukaIR500() - :Command("Robot_InsertKukaIR500") + : Command("Robot_InsertKukaIR500") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka IR500"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR500 into the document."); - sWhatsThis = "Robot_InsertKukaIR500"; - sStatusTip = sToolTipText; - sPixmap = "Robot_CreateRobot"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Kuka IR500"); + sToolTipText = QT_TR_NOOP("Insert a Kuka IR500 into the document."); + sWhatsThis = "Robot_InsertKukaIR500"; + sStatusTip = sToolTipText; + sPixmap = "Robot_CreateRobot"; } @@ -59,16 +59,25 @@ void CmdRobotInsertKukaIR500::activated(int) std::string KinematicPath = "Mod/Robot/Lib/Kuka/kr500_1.csv"; openCommand("Place robot"); - doCommand(Doc,"App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),RobotPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),KinematicPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis2 = -90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis3 = 90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis5 = 45",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Home = [0.0,-90.0,90.0,0.0,45.0,0.0]",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + RobotPath.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + KinematicPath.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis2 = -90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis3 = 90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis5 = 45", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.Home = [0.0,-90.0,90.0,0.0,45.0,0.0]", + FeatName.c_str()); updateActive(); commitCommand(); - } bool CmdRobotInsertKukaIR500::isActive() @@ -82,15 +91,15 @@ bool CmdRobotInsertKukaIR500::isActive() DEF_STD_CMD_A(CmdRobotInsertKukaIR16) CmdRobotInsertKukaIR16::CmdRobotInsertKukaIR16() - :Command("Robot_InsertKukaIR16") + : Command("Robot_InsertKukaIR16") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka IR16"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR16 into the document."); - sWhatsThis = "Robot_InsertKukaIR16"; - sStatusTip = sToolTipText; - sPixmap = "Robot_CreateRobot"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Kuka IR16"); + sToolTipText = QT_TR_NOOP("Insert a Kuka IR16 into the document."); + sWhatsThis = "Robot_InsertKukaIR16"; + sStatusTip = sToolTipText; + sPixmap = "Robot_CreateRobot"; } @@ -101,15 +110,22 @@ void CmdRobotInsertKukaIR16::activated(int) std::string KinematicPath = "Mod/Robot/Lib/Kuka/kr_16.csv"; openCommand("Place robot"); - doCommand(Doc,"App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),RobotPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),KinematicPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis2 = -90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis3 = 90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis5 = 45",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + RobotPath.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + KinematicPath.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis2 = -90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis3 = 90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis5 = 45", FeatName.c_str()); updateActive(); commitCommand(); - } bool CmdRobotInsertKukaIR16::isActive() @@ -123,15 +139,15 @@ bool CmdRobotInsertKukaIR16::isActive() DEF_STD_CMD_A(CmdRobotInsertKukaIR210) CmdRobotInsertKukaIR210::CmdRobotInsertKukaIR210() - :Command("Robot_InsertKukaIR210") + : Command("Robot_InsertKukaIR210") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka IR210"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR210 into the document."); - sWhatsThis = "Robot_InsertKukaIR210"; - sStatusTip = sToolTipText; - sPixmap = "Robot_CreateRobot"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Kuka IR210"); + sToolTipText = QT_TR_NOOP("Insert a Kuka IR210 into the document."); + sWhatsThis = "Robot_InsertKukaIR210"; + sStatusTip = sToolTipText; + sPixmap = "Robot_CreateRobot"; } @@ -142,15 +158,22 @@ void CmdRobotInsertKukaIR210::activated(int) std::string KinematicPath = "Mod/Robot/Lib/Kuka/kr_210_2.csv"; openCommand("Place robot"); - doCommand(Doc,"App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),RobotPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),KinematicPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis2 = -90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis3 = 90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis5 = 45",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + RobotPath.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + KinematicPath.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis2 = -90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis3 = 90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis5 = 45", FeatName.c_str()); updateActive(); commitCommand(); - } bool CmdRobotInsertKukaIR210::isActive() @@ -163,15 +186,15 @@ bool CmdRobotInsertKukaIR210::isActive() DEF_STD_CMD_A(CmdRobotInsertKukaIR125) CmdRobotInsertKukaIR125::CmdRobotInsertKukaIR125() - :Command("Robot_InsertKukaIR125") + : Command("Robot_InsertKukaIR125") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Kuka IR125"); - sToolTipText = QT_TR_NOOP("Insert a Kuka IR125 into the document."); - sWhatsThis = "Robot_InsertKukaIR125"; - sStatusTip = sToolTipText; - sPixmap = "Robot_CreateRobot"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Kuka IR125"); + sToolTipText = QT_TR_NOOP("Insert a Kuka IR125 into the document."); + sWhatsThis = "Robot_InsertKukaIR125"; + sStatusTip = sToolTipText; + sPixmap = "Robot_CreateRobot"; } @@ -182,15 +205,22 @@ void CmdRobotInsertKukaIR125::activated(int) std::string KinematicPath = "Mod/Robot/Lib/Kuka/kr_125.csv"; openCommand("Place robot"); - doCommand(Doc,"App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),RobotPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"",FeatName.c_str(),KinematicPath.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis2 = -90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis3 = 90",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Axis5 = 45",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Robot::RobotObject\",\"%s\")", + FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotVrmlFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + RobotPath.c_str()); + doCommand(Doc, + "App.activeDocument().%s.RobotKinematicFile = App.getResourceDir()+\"%s\"", + FeatName.c_str(), + KinematicPath.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis2 = -90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis3 = 90", FeatName.c_str()); + doCommand(Doc, "App.activeDocument().%s.Axis5 = 45", FeatName.c_str()); updateActive(); commitCommand(); - } bool CmdRobotInsertKukaIR125::isActive() @@ -204,60 +234,66 @@ bool CmdRobotInsertKukaIR125::isActive() DEF_STD_CMD_A(CmdRobotAddToolShape) CmdRobotAddToolShape::CmdRobotAddToolShape() - :Command("Robot_AddToolShape") + : Command("Robot_AddToolShape") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Add tool"); - sToolTipText = QT_TR_NOOP("Add a tool shape to the robot"); - sWhatsThis = "Robot_AddToolShape"; - sStatusTip = sToolTipText; - sPixmap = "Robot_CreateRobot"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Add tool"); + sToolTipText = QT_TR_NOOP("Add a tool shape to the robot"); + sWhatsThis = "Robot_AddToolShape"; + sStatusTip = sToolTipText; + sPixmap = "Robot_CreateRobot"; } void CmdRobotAddToolShape::activated(int) { - std::vector robots = getSelection() - .getObjectsOfType(Robot::RobotObject::getClassTypeId()); - std::vector shapes = getSelection() - .getObjectsOfType(Base::Type::fromName("Part::Feature")); - std::vector VRMLs = getSelection() - .getObjectsOfType(Base::Type::fromName("App::VRMLObject")); + std::vector robots = + getSelection().getObjectsOfType(Robot::RobotObject::getClassTypeId()); + std::vector shapes = + getSelection().getObjectsOfType(Base::Type::fromName("Part::Feature")); + std::vector VRMLs = + getSelection().getObjectsOfType(Base::Type::fromName("App::VRMLObject")); if (robots.size() != 1 || (shapes.size() != 1 && VRMLs.size() != 1)) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one robot and one shape or VRML object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one robot and one shape or VRML object.")); return; } std::string RoboName = robots.front()->getNameInDocument(); std::string ShapeName; - if(shapes.size() == 1) + if (shapes.size() == 1) { ShapeName = shapes.front()->getNameInDocument(); - else + } + else { ShapeName = VRMLs.front()->getNameInDocument(); + } openCommand("Add tool to robot"); - doCommand(Doc,"App.activeDocument().%s.ToolShape = App.activeDocument().%s",RoboName.c_str(),ShapeName.c_str()); - //doCommand(Gui,"Gui.activeDocument().hide(\"%s\")",ShapeName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.ToolShape = App.activeDocument().%s", + RoboName.c_str(), + ShapeName.c_str()); + // doCommand(Gui,"Gui.activeDocument().hide(\"%s\")",ShapeName.c_str()); updateActive(); commitCommand(); } bool CmdRobotAddToolShape::isActive() { - //return false; // not yet implemented and thus not active + // return false; // not yet implemented and thus not active return hasActiveDocument(); } void CreateRobotCommandsInsertRobots() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdRobotInsertKukaIR16()); rcCmdMgr.addCommand(new CmdRobotInsertKukaIR500()); rcCmdMgr.addCommand(new CmdRobotInsertKukaIR210()); rcCmdMgr.addCommand(new CmdRobotInsertKukaIR125()); rcCmdMgr.addCommand(new CmdRobotAddToolShape()); - } +} diff --git a/src/Mod/Robot/Gui/CommandTrajectory.cpp b/src/Mod/Robot/Gui/CommandTrajectory.cpp index 3836bf0db2..f87604e4fa 100644 --- a/src/Mod/Robot/Gui/CommandTrajectory.cpp +++ b/src/Mod/Robot/Gui/CommandTrajectory.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -49,15 +49,15 @@ using namespace RobotGui; DEF_STD_CMD_A(CmdRobotCreateTrajectory) CmdRobotCreateTrajectory::CmdRobotCreateTrajectory() - :Command("Robot_CreateTrajectory") + : Command("Robot_CreateTrajectory") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Create trajectory"); - sToolTipText = QT_TR_NOOP("Create a new empty trajectory"); - sWhatsThis = "Robot_CreateTrajectory"; - sStatusTip = sToolTipText; - sPixmap = "Robot_CreateTrajectory"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Create trajectory"); + sToolTipText = QT_TR_NOOP("Create a new empty trajectory"); + sWhatsThis = "Robot_CreateTrajectory"; + sStatusTip = sToolTipText; + sPixmap = "Robot_CreateTrajectory"; } @@ -66,10 +66,11 @@ void CmdRobotCreateTrajectory::activated(int) std::string FeatName = getUniqueObjectName("Trajectory"); openCommand("Create trajectory"); - doCommand(Doc,"App.activeDocument().addObject(\"Robot::TrajectoryObject\",\"%s\")",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Robot::TrajectoryObject\",\"%s\")", + FeatName.c_str()); updateActive(); commitCommand(); - } bool CmdRobotCreateTrajectory::isActive() @@ -82,16 +83,16 @@ bool CmdRobotCreateTrajectory::isActive() DEF_STD_CMD_A(CmdRobotInsertWaypoint) CmdRobotInsertWaypoint::CmdRobotInsertWaypoint() - :Command("Robot_InsertWaypoint") + : Command("Robot_InsertWaypoint") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Insert in trajectory"); - sToolTipText = QT_TR_NOOP("Insert robot Tool location into trajectory"); - sWhatsThis = "Robot_InsertWaypoint"; - sStatusTip = sToolTipText; - sPixmap = "Robot_InsertWaypoint"; - sAccel = "A"; + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Insert in trajectory"); + sToolTipText = QT_TR_NOOP("Insert robot Tool location into trajectory"); + sWhatsThis = "Robot_InsertWaypoint"; + sStatusTip = sToolTipText; + sPixmap = "Robot_InsertWaypoint"; + sAccel = "A"; } @@ -101,32 +102,44 @@ void CmdRobotInsertWaypoint::activated(int) unsigned int n2 = getSelection().countObjectsOfType(Robot::TrajectoryObject::getClassTypeId()); if (n1 != 1 || n2 != 1) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Robot and one Trajectory object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Robot and one Trajectory object.")); return; } std::vector Sel = getSelection().getSelection(); - Robot::RobotObject *pcRobotObject=nullptr; - if(Sel[0].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) + Robot::RobotObject* pcRobotObject = nullptr; + if (Sel[0].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) { pcRobotObject = static_cast(Sel[0].pObject); - else if(Sel[1].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) + } + else if (Sel[1].pObject->getTypeId() == Robot::RobotObject::getClassTypeId()) { pcRobotObject = static_cast(Sel[1].pObject); + } std::string RoboName = pcRobotObject->getNameInDocument(); - Robot::TrajectoryObject *pcTrajectoryObject=nullptr; - if(Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) + Robot::TrajectoryObject* pcTrajectoryObject = nullptr; + if (Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) { pcTrajectoryObject = static_cast(Sel[0].pObject); - else if(Sel[1].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) + } + else if (Sel[1].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) { pcTrajectoryObject = static_cast(Sel[1].pObject); + } std::string TrakName = pcTrajectoryObject->getNameInDocument(); openCommand("Insert waypoint"); - doCommand(Doc,"App.activeDocument().%s.Trajectory = App.activeDocument().%s.Trajectory.insertWaypoints(Robot.Waypoint(App.activeDocument().%s.Tcp.multiply(App.activeDocument().%s.Tool),type='LIN',name='Pt',vel=_DefSpeed,cont=_DefCont,acc=_DefAcceleration,tool=1))",TrakName.c_str(),TrakName.c_str(),RoboName.c_str(),RoboName.c_str()); + doCommand(Doc, + "App.activeDocument().%s.Trajectory = " + "App.activeDocument().%s.Trajectory.insertWaypoints(Robot.Waypoint(App." + "activeDocument().%s.Tcp.multiply(App.activeDocument().%s.Tool),type='LIN',name='Pt'," + "vel=_DefSpeed,cont=_DefCont,acc=_DefAcceleration,tool=1))", + TrakName.c_str(), + TrakName.c_str(), + RoboName.c_str(), + RoboName.c_str()); updateActive(); commitCommand(); - } bool CmdRobotInsertWaypoint::isActive() @@ -139,58 +152,71 @@ bool CmdRobotInsertWaypoint::isActive() DEF_STD_CMD_A(CmdRobotInsertWaypointPreselect) CmdRobotInsertWaypointPreselect::CmdRobotInsertWaypointPreselect() - :Command("Robot_InsertWaypointPreselect") + : Command("Robot_InsertWaypointPreselect") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Insert in trajectory"); - sToolTipText = QT_TR_NOOP("Insert preselection position into trajectory (W)"); - sWhatsThis = "Robot_InsertWaypointPreselect"; - sStatusTip = sToolTipText; - sPixmap = "Robot_InsertWaypointPre"; - sAccel = "W"; - + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Insert in trajectory"); + sToolTipText = QT_TR_NOOP("Insert preselection position into trajectory (W)"); + sWhatsThis = "Robot_InsertWaypointPreselect"; + sStatusTip = sToolTipText; + sPixmap = "Robot_InsertWaypointPre"; + sAccel = "W"; } void CmdRobotInsertWaypointPreselect::activated(int) { - if (getSelection().size() != 1 ) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Trajectory object.")); + if (getSelection().size() != 1) { + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Trajectory object.")); return; } std::vector Sel = getSelection().getSelection(); - const Gui::SelectionChanges & PreSel = getSelection().getPreselection(); + const Gui::SelectionChanges& PreSel = getSelection().getPreselection(); float x = PreSel.x; float y = PreSel.y; float z = PreSel.z; - Robot::TrajectoryObject *pcTrajectoryObject; - if (Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) + Robot::TrajectoryObject* pcTrajectoryObject; + if (Sel[0].pObject->getTypeId() == Robot::TrajectoryObject::getClassTypeId()) { pcTrajectoryObject = static_cast(Sel[0].pObject); + } else { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select one Trajectory object.")); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select one Trajectory object.")); return; } std::string TrakName = pcTrajectoryObject->getNameInDocument(); if (!PreSel.pDocName) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("No preselection"), - QObject::tr("You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details.")); + QMessageBox::warning( + Gui::getMainWindow(), + QObject::tr("No preselection"), + QObject::tr("You have to hover above a geometry (Preselection) with the mouse to use " + "this command. See documentation for details.")); return; } openCommand("Insert waypoint"); - doCommand(Doc,"App.activeDocument().%s.Trajectory = App.activeDocument().%s.Trajectory.insertWaypoints(Robot.Waypoint(FreeCAD.Placement(FreeCAD.Vector(%f,%f,%f)+_DefDisplacement,_DefOrientation),type='LIN',name='Pt',vel=_DefSpeed,cont=_DefCont,acc=_DefAcceleration,tool=1))",TrakName.c_str(),TrakName.c_str(),x,y,z); + doCommand(Doc, + "App.activeDocument().%s.Trajectory = " + "App.activeDocument().%s.Trajectory.insertWaypoints(Robot.Waypoint(FreeCAD.Placement(" + "FreeCAD.Vector(%f,%f,%f)+_DefDisplacement,_DefOrientation),type='LIN',name='Pt',vel=" + "_DefSpeed,cont=_DefCont,acc=_DefAcceleration,tool=1))", + TrakName.c_str(), + TrakName.c_str(), + x, + y, + z); updateActive(); commitCommand(); - } bool CmdRobotInsertWaypointPreselect::isActive() @@ -203,16 +229,16 @@ bool CmdRobotInsertWaypointPreselect::isActive() DEF_STD_CMD_A(CmdRobotSetDefaultOrientation) CmdRobotSetDefaultOrientation::CmdRobotSetDefaultOrientation() - :Command("Robot_SetDefaultOrientation") + : Command("Robot_SetDefaultOrientation") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Set default orientation"); - sToolTipText = QT_TR_NOOP("Set the default orientation for subsequent commands for waypoint creation"); - sWhatsThis = "Robot_SetDefaultOrientation"; - sStatusTip = sToolTipText; - sPixmap = nullptr; - + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Set default orientation"); + sToolTipText = + QT_TR_NOOP("Set the default orientation for subsequent commands for waypoint creation"); + sWhatsThis = "Robot_SetDefaultOrientation"; + sStatusTip = sToolTipText; + sPixmap = nullptr; } @@ -223,12 +249,17 @@ void CmdRobotSetDefaultOrientation::activated(int) Dlg.setSelection(Gui::Selection().getSelectionEx()); Base::Placement place; Dlg.setPlacement(place); - if (Dlg.exec() == QDialog::Accepted ){ + if (Dlg.exec() == QDialog::Accepted) { place = Dlg.getPlacement(); Base::Rotation rot = place.getRotation(); Base::Vector3d disp = place.getPosition(); - doCommand(Doc,"_DefOrientation = FreeCAD.Rotation(%f,%f,%f,%f)",rot[0],rot[1],rot[2],rot[3]); - doCommand(Doc,"_DefDisplacement = FreeCAD.Vector(%f,%f,%f)",disp[0],disp[1],disp[2]); + doCommand(Doc, + "_DefOrientation = FreeCAD.Rotation(%f,%f,%f,%f)", + rot[0], + rot[1], + rot[2], + rot[3]); + doCommand(Doc, "_DefDisplacement = FreeCAD.Vector(%f,%f,%f)", disp[0], disp[1], disp[2]); } } @@ -242,16 +273,16 @@ bool CmdRobotSetDefaultOrientation::isActive() DEF_STD_CMD_A(CmdRobotSetDefaultValues) CmdRobotSetDefaultValues::CmdRobotSetDefaultValues() - :Command("Robot_SetDefaultValues") + : Command("Robot_SetDefaultValues") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Set default values"); - sToolTipText = QT_TR_NOOP("Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation"); - sWhatsThis = "Robot_SetDefaultValues"; - sStatusTip = sToolTipText; - sPixmap = nullptr; - + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Set default values"); + sToolTipText = QT_TR_NOOP("Set the default values for speed, acceleration and continuity for " + "subsequent commands of waypoint creation"); + sWhatsThis = "Robot_SetDefaultValues"; + sStatusTip = sToolTipText; + sPixmap = nullptr; } @@ -259,43 +290,58 @@ void CmdRobotSetDefaultValues::activated(int) { bool ok; - QString text = QInputDialog::getText(nullptr, QObject::tr("Set default speed"), - QObject::tr("speed: (e.g. 1 m/s or 3 cm/s)"), QLineEdit::Normal, - QString::fromLatin1("1 m/s"), &ok, Qt::MSWindowsFixedSizeDialogHint); - if ( ok && !text.isEmpty() ) { - doCommand(Doc,"_DefSpeed = '%s'",text.toLatin1().constData()); + QString text = QInputDialog::getText(nullptr, + QObject::tr("Set default speed"), + QObject::tr("speed: (e.g. 1 m/s or 3 cm/s)"), + QLineEdit::Normal, + QString::fromLatin1("1 m/s"), + &ok, + Qt::MSWindowsFixedSizeDialogHint); + if (ok && !text.isEmpty()) { + doCommand(Doc, "_DefSpeed = '%s'", text.toLatin1().constData()); } QStringList items; - items << QString::fromLatin1("False") << QString::fromLatin1("True"); + items << QString::fromLatin1("False") << QString::fromLatin1("True"); - QString item = QInputDialog::getItem(nullptr, QObject::tr("Set default continuity"), - QObject::tr("continuous ?"), items, 0, false, &ok, Qt::MSWindowsFixedSizeDialogHint); - if (ok && !item.isEmpty()) - doCommand(Doc,"_DefCont = %s",item.toLatin1().constData()); + QString item = QInputDialog::getItem(nullptr, + QObject::tr("Set default continuity"), + QObject::tr("continuous ?"), + items, + 0, + false, + &ok, + Qt::MSWindowsFixedSizeDialogHint); + if (ok && !item.isEmpty()) { + doCommand(Doc, "_DefCont = %s", item.toLatin1().constData()); + } text.clear(); - text = QInputDialog::getText(nullptr, QObject::tr("Set default acceleration"), - QObject::tr("acceleration: (e.g. 1 m/s^2 or 3 cm/s^2)"), QLineEdit::Normal, - QString::fromLatin1("1 m/s^2"), &ok, Qt::MSWindowsFixedSizeDialogHint); - if ( ok && !text.isEmpty() ) { - doCommand(Doc,"_DefAcceleration = '%s'",text.toLatin1().constData()); + text = QInputDialog::getText(nullptr, + QObject::tr("Set default acceleration"), + QObject::tr("acceleration: (e.g. 1 m/s^2 or 3 cm/s^2)"), + QLineEdit::Normal, + QString::fromLatin1("1 m/s^2"), + &ok, + Qt::MSWindowsFixedSizeDialogHint); + if (ok && !text.isEmpty()) { + doCommand(Doc, "_DefAcceleration = '%s'", text.toLatin1().constData()); } // create placement dialog - //Gui::Dialog::Placement *Dlg = new Gui::Dialog::Placement(); - //Base::Placement place; - //Dlg->setPlacement(place); - //if(Dlg->exec() == QDialog::Accepted ){ + // Gui::Dialog::Placement *Dlg = new Gui::Dialog::Placement(); + // Base::Placement place; + // Dlg->setPlacement(place); + // if(Dlg->exec() == QDialog::Accepted ){ // place = Dlg->getPlacement(); // Base::Rotation rot = place.getRotation(); // Base::Vector3d disp = place.getPosition(); - // doCommand(Doc,"_DefOrientation = FreeCAD.Rotation(%f,%f,%f,%f)",rot[0],rot[1],rot[2],rot[3]); + // doCommand(Doc,"_DefOrientation = + // FreeCAD.Rotation(%f,%f,%f,%f)",rot[0],rot[1],rot[2],rot[3]); // doCommand(Doc,"_DefDisplacement = FreeCAD.Vector(%f,%f,%f)",disp[0],disp[1],disp[2]); //} - } bool CmdRobotSetDefaultValues::isActive() @@ -308,58 +354,60 @@ bool CmdRobotSetDefaultValues::isActive() DEF_STD_CMD_A(CmdRobotEdge2Trac) CmdRobotEdge2Trac::CmdRobotEdge2Trac() - :Command("Robot_Edge2Trac") + : Command("Robot_Edge2Trac") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Edge to Trajectory..."); - sToolTipText = QT_TR_NOOP("Generate a Trajectory from a set of edges"); - sWhatsThis = "Robot_Edge2Trac"; - sStatusTip = sToolTipText; - sPixmap = "Robot_Edge2Trac"; - + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Edge to Trajectory..."); + sToolTipText = QT_TR_NOOP("Generate a Trajectory from a set of edges"); + sWhatsThis = "Robot_Edge2Trac"; + sStatusTip = sToolTipText; + sPixmap = "Robot_Edge2Trac"; } void CmdRobotEdge2Trac::activated(int) { - /* App::DocumentObject *obj = this->getDocument()->getObject(FeatName.c_str()); - App::Property *prop = &(dynamic_cast(obj)->Source); + /* App::DocumentObject *obj = this->getDocument()->getObject(FeatName.c_str()); + App::Property *prop = &(dynamic_cast(obj)->Source); - Gui::TaskView::TaskDialog* dlg = new TaskDlgEdge2Trac(dynamic_cast(obj)); - Gui::Control().showDialog(dlg);*/ + Gui::TaskView::TaskDialog* dlg = new TaskDlgEdge2Trac(dynamic_cast(obj)); Gui::Control().showDialog(dlg);*/ Gui::SelectionFilter ObjectFilter("SELECT Robot::Edge2TracObject COUNT 1"); - Gui::SelectionFilter EdgeFilter ("SELECT Part::Feature SUBELEMENT Edge COUNT 1.."); + Gui::SelectionFilter EdgeFilter("SELECT Part::Feature SUBELEMENT Edge COUNT 1.."); if (ObjectFilter.match()) { - Robot::Edge2TracObject *EdgeObj = static_cast(ObjectFilter.Result[0][0].getObject()); + Robot::Edge2TracObject* EdgeObj = + static_cast(ObjectFilter.Result[0][0].getObject()); openCommand("Edit Edge2TracObject"); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",EdgeObj->getNameInDocument()); - }else if (EdgeFilter.match()) { + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", EdgeObj->getNameInDocument()); + } + else if (EdgeFilter.match()) { // get the selected object - //Part::Feature *part = static_cast(EdgeFilter.Result[0][0].getObject()); + // Part::Feature *part = static_cast(EdgeFilter.Result[0][0].getObject()); std::string obj_sub = EdgeFilter.Result[0][0].getAsPropertyLinkSubString(); std::string FeatName = getUniqueObjectName("Edge2Trac"); openCommand("Create a new Edge2TracObject"); - doCommand(Doc,"App.activeDocument().addObject('Robot::Edge2TracObject','%s')",FeatName.c_str()); - doCommand(Gui,"App.activeDocument().%s.Source = %s",FeatName.c_str(),obj_sub.c_str()); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); - - }else { + doCommand(Doc, + "App.activeDocument().addObject('Robot::Edge2TracObject','%s')", + FeatName.c_str()); + doCommand(Gui, "App.activeDocument().%s.Source = %s", FeatName.c_str(), obj_sub.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); + } + else { std::string FeatName = getUniqueObjectName("Edge2Trac"); openCommand("Create a new Edge2TracObject"); - doCommand(Doc,"App.activeDocument().addObject('Robot::Edge2TracObject','%s')",FeatName.c_str()); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject('Robot::Edge2TracObject','%s')", + FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } - - - } bool CmdRobotEdge2Trac::isActive() @@ -372,16 +420,16 @@ bool CmdRobotEdge2Trac::isActive() DEF_STD_CMD_A(CmdRobotTrajectoryDressUp) CmdRobotTrajectoryDressUp::CmdRobotTrajectoryDressUp() - :Command("Robot_TrajectoryDressUp") + : Command("Robot_TrajectoryDressUp") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Dress-up trajectory..."); - sToolTipText = QT_TR_NOOP("Create a dress-up object which overrides some aspects of a trajectory"); - sWhatsThis = "Robot_TrajectoryDressUp"; - sStatusTip = sToolTipText; - sPixmap = "Robot_TrajectoryDressUp"; - + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Dress-up trajectory..."); + sToolTipText = + QT_TR_NOOP("Create a dress-up object which overrides some aspects of a trajectory"); + sWhatsThis = "Robot_TrajectoryDressUp"; + sStatusTip = sToolTipText; + sPixmap = "Robot_TrajectoryDressUp"; } @@ -391,23 +439,33 @@ void CmdRobotTrajectoryDressUp::activated(int) Gui::SelectionFilter ObjectFilter("SELECT Robot::TrajectoryObject COUNT 1"); if (ObjectFilterDressUp.match()) { - Robot::TrajectoryDressUpObject *Object = static_cast(ObjectFilterDressUp.Result[0][0].getObject()); + Robot::TrajectoryDressUpObject* Object = static_cast( + ObjectFilterDressUp.Result[0][0].getObject()); openCommand("Edit Sketch"); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",Object->getNameInDocument()); - }else if (ObjectFilter.match()) { + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", Object->getNameInDocument()); + } + else if (ObjectFilter.match()) { std::string FeatName = getUniqueObjectName("DressUpObject"); - Robot::TrajectoryObject *Object = static_cast(ObjectFilter.Result[0][0].getObject()); + Robot::TrajectoryObject* Object = + static_cast(ObjectFilter.Result[0][0].getObject()); openCommand("Create a new TrajectoryDressUp"); - doCommand(Doc,"App.activeDocument().addObject('Robot::TrajectoryDressUpObject','%s')",FeatName.c_str()); - doCommand(Gui,"App.activeDocument().%s.Source = App.activeDocument().%s",FeatName.c_str(),Object->getNameInDocument()); - doCommand(Gui,"Gui.activeDocument().hide(\"%s\")",Object->getNameInDocument()); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); - }else { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), - QObject::tr("Select the Trajectory which you want to dress up.")); + doCommand(Doc, + "App.activeDocument().addObject('Robot::TrajectoryDressUpObject','%s')", + FeatName.c_str()); + doCommand(Gui, + "App.activeDocument().%s.Source = App.activeDocument().%s", + FeatName.c_str(), + Object->getNameInDocument()); + doCommand(Gui, "Gui.activeDocument().hide(\"%s\")", Object->getNameInDocument()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); + } + else { + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("Wrong selection"), + QObject::tr("Select the Trajectory which you want to dress up.")); return; } - } +} bool CmdRobotTrajectoryDressUp::isActive() { @@ -419,16 +477,15 @@ bool CmdRobotTrajectoryDressUp::isActive() DEF_STD_CMD_A(CmdRobotTrajectoryCompound) CmdRobotTrajectoryCompound::CmdRobotTrajectoryCompound() - :Command("Robot_TrajectoryCompound") + : Command("Robot_TrajectoryCompound") { - sAppModule = "Robot"; - sGroup = QT_TR_NOOP("Robot"); - sMenuText = QT_TR_NOOP("Trajectory compound..."); - sToolTipText = QT_TR_NOOP("Group and connect some trajectories to one"); - sWhatsThis = "Robot_TrajectoryCompound"; - sStatusTip = sToolTipText; - sPixmap = "Robot_TrajectoryCompound"; - + sAppModule = "Robot"; + sGroup = QT_TR_NOOP("Robot"); + sMenuText = QT_TR_NOOP("Trajectory compound..."); + sToolTipText = QT_TR_NOOP("Group and connect some trajectories to one"); + sWhatsThis = "Robot_TrajectoryCompound"; + sStatusTip = sToolTipText; + sPixmap = "Robot_TrajectoryCompound"; } @@ -437,15 +494,19 @@ void CmdRobotTrajectoryCompound::activated(int) Gui::SelectionFilter ObjectFilter("SELECT Robot::TrajectoryCompound COUNT 1"); if (ObjectFilter.match()) { - Robot::TrajectoryCompound *Object = static_cast(ObjectFilter.Result[0][0].getObject()); + Robot::TrajectoryCompound* Object = + static_cast(ObjectFilter.Result[0][0].getObject()); openCommand("Edit TrajectoryCompound"); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",Object->getNameInDocument()); - }else { + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", Object->getNameInDocument()); + } + else { std::string FeatName = getUniqueObjectName("TrajectoryCompound"); openCommand("Create a new TrajectoryDressUp"); - doCommand(Doc,"App.activeDocument().addObject('Robot::TrajectoryCompound','%s')",FeatName.c_str()); - doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject('Robot::TrajectoryCompound','%s')", + FeatName.c_str()); + doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); } } @@ -455,14 +516,12 @@ bool CmdRobotTrajectoryCompound::isActive() } - // ##################################################################################################### - void CreateRobotCommandsTrajectory() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdRobotCreateTrajectory()); rcCmdMgr.addCommand(new CmdRobotInsertWaypoint()); @@ -472,4 +531,4 @@ void CreateRobotCommandsTrajectory() rcCmdMgr.addCommand(new CmdRobotEdge2Trac()); rcCmdMgr.addCommand(new CmdRobotTrajectoryDressUp()); rcCmdMgr.addCommand(new CmdRobotTrajectoryCompound()); - } +} diff --git a/src/Mod/Robot/Gui/PreCompiled.h b/src/Mod/Robot/Gui/PreCompiled.h index eb2a061446..ce1ed1d790 100644 --- a/src/Mod/Robot/Gui/PreCompiled.h +++ b/src/Mod/Robot/Gui/PreCompiled.h @@ -27,22 +27,22 @@ // Importing of App classes #ifdef FC_OS_WIN32 -# define RobotExport __declspec(dllimport) -# define PartExport __declspec(dllimport) -# define PartGuiExport __declspec(dllimport) -# define RobotGuiExport __declspec(dllexport) -#else // for Linux -# define PartExport -# define RobotExport -# define PartGuiExport -# define RobotGuiExport +#define RobotExport __declspec(dllimport) +#define PartExport __declspec(dllimport) +#define PartGuiExport __declspec(dllimport) +#define RobotGuiExport __declspec(dllexport) +#else // for Linux +#define PartExport +#define RobotExport +#define PartGuiExport +#define RobotGuiExport #endif #include #ifdef _MSC_VER -# pragma warning(disable : 4005) -# pragma warning(disable : 4273) +#pragma warning(disable : 4005) +#pragma warning(disable : 4273) #endif #ifdef _PreComp_ @@ -59,15 +59,16 @@ #include #include #include -#include -#include #include #include +#include +#include // Inventor +#include #include #include -#include +#include #include #include #include @@ -76,8 +77,7 @@ #include #include #include -#include -#endif //_PreComp_ +#endif //_PreComp_ -#endif // ROBOTGUI_PRECOMPILED_H +#endif // ROBOTGUI_PRECOMPILED_H diff --git a/src/Mod/Robot/Gui/Resources/Robot.qrc b/src/Mod/Robot/Gui/Resources/Robot.qrc index b3c16b1edb..ae118c8377 100644 --- a/src/Mod/Robot/Gui/Resources/Robot.qrc +++ b/src/Mod/Robot/Gui/Resources/Robot.qrc @@ -1,5 +1,5 @@ - + icons/Robot_CreateRobot.svg icons/Robot_CreateTrajectory.svg icons/Robot_Edge2Trac.svg @@ -15,4 +15,4 @@ icons/Robot_TrajectoryDressUp.svg icons/RobotWorkbench.svg - + diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts index 0fd320d217..5c6afc6181 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts @@ -905,12 +905,12 @@ Position and Orientation: - Kokapena eta orientazioa: + Posizioa eta orientazioa: Don't change Position & Orientation - Ez aldatu kokapena eta orientazioa + Ez aldatu posizioa eta orientazioa @@ -920,7 +920,7 @@ Add Position - Gehitu kokapena + Gehitu posizioa diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts index 00dd04fa95..913adbedc4 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts @@ -843,7 +843,7 @@ 10mm / 1° - 10mm / 1 ° + 10mm / 1° diff --git a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp index a0a7239d1e..c5d43531af 100644 --- a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp +++ b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -42,11 +42,14 @@ using namespace RobotGui; // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgEdge2Trac::TaskDlgEdge2Trac(Robot::Edge2TracObject *obj) - : TaskDialog(),Edge2TaskObject(obj) +TaskDlgEdge2Trac::TaskDlgEdge2Trac(Robot::Edge2TracObject* obj) + : TaskDialog() + , Edge2TaskObject(obj) { - param = new TaskEdge2TracParameter(obj); - select = new Gui::TaskView::TaskSelectLinkProperty("SELECT Part::Feature SUBELEMENT Edge COUNT 1..",&(obj->Source)); + param = new TaskEdge2TracParameter(obj); + select = + new Gui::TaskView::TaskSelectLinkProperty("SELECT Part::Feature SUBELEMENT Edge COUNT 1..", + &(obj->Source)); Content.push_back(param); Content.push_back(select); @@ -59,23 +62,23 @@ void TaskDlgEdge2Trac::open() { select->activate(); Edge2TaskObject->execute(); - param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges,Edge2TaskObject->NbrOfCluster); - + param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges, Edge2TaskObject->NbrOfCluster); } void TaskDlgEdge2Trac::clicked(int button) { try { - if(QDialogButtonBox::Apply == button) - { - if (select->isSelectionValid()){ + if (QDialogButtonBox::Apply == button) { + if (select->isSelectionValid()) { select->sendSelection2Property(); // May throw an exception which we must handle here Edge2TaskObject->execute(); - param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges,Edge2TaskObject->NbrOfCluster); - } else { + param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges, + Edge2TaskObject->NbrOfCluster); + } + else { QApplication::beep(); - param->setEdgeAndClusterNbr(0,0); + param->setEdgeAndClusterNbr(0, 0); } } } @@ -87,16 +90,18 @@ void TaskDlgEdge2Trac::clicked(int button) bool TaskDlgEdge2Trac::accept() { try { - if (select->isSelectionValid()){ + if (select->isSelectionValid()) { select->accept(); Edge2TaskObject->recomputeFeature(); Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if(doc) + if (doc) { doc->resetEdit(); + } return true; } - else + else { QApplication::beep(); + } } catch (const Base::Exception& e) { Base::Console().Warning("TaskDlgEdge2Trac::accept(): %s\n", e.what()); @@ -113,9 +118,7 @@ bool TaskDlgEdge2Trac::reject() } void TaskDlgEdge2Trac::helpRequested() -{ - -} +{} #include "moc_TaskDlgEdge2Trac.cpp" diff --git a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h index 8d6b7f6cb9..2517ed740e 100644 --- a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h +++ b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.h @@ -30,17 +30,24 @@ // forward -namespace Gui { namespace TaskView { class TaskSelectLinkProperty;}} +namespace Gui +{ +namespace TaskView +{ +class TaskSelectLinkProperty; +} +} // namespace Gui -namespace RobotGui { +namespace RobotGui +{ /// simulation dialog for the TaskView -class RobotGuiExport TaskDlgEdge2Trac : public Gui::TaskView::TaskDialog +class RobotGuiExport TaskDlgEdge2Trac: public Gui::TaskView::TaskDialog { Q_OBJECT public: - explicit TaskDlgEdge2Trac(Robot::Edge2TracObject *); + explicit TaskDlgEdge2Trac(Robot::Edge2TracObject*); public: /// is called the TaskView when the dialog is opened @@ -51,21 +58,22 @@ public: bool accept() override; /// is called by the framework if the dialog is rejected (Cancel) bool reject() override; - /// is called by the framework if the user press the help button + /// is called by the framework if the user press the help button void helpRequested() override; - /// returns for Close and Help button + /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Apply|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel; + } protected: - TaskEdge2TracParameter *param; - Gui::TaskView::TaskSelectLinkProperty *select; - Robot::Edge2TracObject *Edge2TaskObject; + TaskEdge2TracParameter* param; + Gui::TaskView::TaskSelectLinkProperty* select; + Robot::Edge2TracObject* Edge2TaskObject; }; +} // namespace RobotGui -} //namespace RobotGui - -#endif // ROBOTGUI_TASKDLGSIMULATE_H +#endif // ROBOTGUI_TASKDLGSIMULATE_H diff --git a/src/Mod/Robot/Gui/TaskDlgSimulate.cpp b/src/Mod/Robot/Gui/TaskDlgSimulate.cpp index c3ed656f56..9404917579 100644 --- a/src/Mod/Robot/Gui/TaskDlgSimulate.cpp +++ b/src/Mod/Robot/Gui/TaskDlgSimulate.cpp @@ -32,14 +32,15 @@ using namespace RobotGui; // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgSimulate::TaskDlgSimulate(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject) +TaskDlgSimulate::TaskDlgSimulate(Robot::RobotObject* pcRobotObject, + Robot::TrajectoryObject* pcTrajectoryObject) : TaskDialog() { - rob = new TaskRobot6Axis(pcRobotObject); - ctr = new TaskRobotControl(pcRobotObject); + rob = new TaskRobot6Axis(pcRobotObject); + ctr = new TaskRobotControl(pcRobotObject); - trac = new TaskTrajectory(pcRobotObject,pcTrajectoryObject); - msg = new TaskRobotMessages(pcRobotObject); + trac = new TaskTrajectory(pcRobotObject, pcTrajectoryObject); + msg = new TaskRobotMessages(pcRobotObject); QObject::connect(trac, &TaskTrajectory::axisChanged, rob, &TaskRobot6Axis::setAxis); @@ -59,9 +60,7 @@ void TaskDlgSimulate::open() } void TaskDlgSimulate::clicked(int) -{ - -} +{} bool TaskDlgSimulate::accept() { @@ -74,9 +73,7 @@ bool TaskDlgSimulate::reject() } void TaskDlgSimulate::helpRequested() -{ - -} +{} #include "moc_TaskDlgSimulate.cpp" diff --git a/src/Mod/Robot/Gui/TaskDlgSimulate.h b/src/Mod/Robot/Gui/TaskDlgSimulate.h index edd0fc30a7..dcdf8863e2 100644 --- a/src/Mod/Robot/Gui/TaskDlgSimulate.h +++ b/src/Mod/Robot/Gui/TaskDlgSimulate.h @@ -33,15 +33,16 @@ #include "TaskTrajectory.h" -namespace RobotGui { +namespace RobotGui +{ /// simulation dialog for the TaskView -class RobotGuiExport TaskDlgSimulate : public Gui::TaskView::TaskDialog +class RobotGuiExport TaskDlgSimulate: public Gui::TaskView::TaskDialog { Q_OBJECT public: - TaskDlgSimulate(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject); + TaskDlgSimulate(Robot::RobotObject* pcRobotObject, Robot::TrajectoryObject* pcTrajectoryObject); public: /// is called the TaskView when the dialog is opened @@ -52,23 +53,23 @@ public: bool accept() override; /// is called by the framework if the dialog is rejected (Cancel) bool reject() override; - /// is called by the framework if the user press the help button + /// is called by the framework if the user press the help button void helpRequested() override; - /// returns for Close and Help button + /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Close|QDialogButtonBox::Help; } + { + return QDialogButtonBox::Close | QDialogButtonBox::Help; + } protected: - TaskRobot6Axis *rob; - TaskRobotControl *ctr ; - TaskTrajectory *trac; - TaskRobotMessages *msg ; - + TaskRobot6Axis* rob; + TaskRobotControl* ctr; + TaskTrajectory* trac; + TaskRobotMessages* msg; }; +} // namespace RobotGui -} //namespace RobotGui - -#endif // ROBOTGUI_TASKDLGSIMULATE_H +#endif // ROBOTGUI_TASKDLGSIMULATE_H diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp index fcc967dce4..73b418b887 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -39,10 +39,12 @@ using namespace RobotGui; // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgTrajectoryCompound::TaskDlgTrajectoryCompound(Robot::TrajectoryCompound *obj) - : TaskDialog(),TrajectoryCompound(obj) +TaskDlgTrajectoryCompound::TaskDlgTrajectoryCompound(Robot::TrajectoryCompound* obj) + : TaskDialog() + , TrajectoryCompound(obj) { - select = new Gui::TaskView::TaskSelectLinkProperty("SELECT Robot::TrajectoryObject COUNT 1..",&(obj->Source)); + select = new Gui::TaskView::TaskSelectLinkProperty("SELECT Robot::TrajectoryObject COUNT 1..", + &(obj->Source)); Content.push_back(select); } @@ -53,20 +55,23 @@ TaskDlgTrajectoryCompound::TaskDlgTrajectoryCompound(Robot::TrajectoryCompound * void TaskDlgTrajectoryCompound::open() { select->activate(); - } bool TaskDlgTrajectoryCompound::accept() { - if(select->isSelectionValid()){ + if (select->isSelectionValid()) { select->accept(); TrajectoryCompound->execute(); Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if(doc) doc->resetEdit(); + if (doc) { + doc->resetEdit(); + } return true; - }else + } + else { QApplication::beep(); + } return false; } @@ -76,14 +81,14 @@ bool TaskDlgTrajectoryCompound::reject() select->reject(); TrajectoryCompound->execute(); Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if(doc) doc->resetEdit(); + if (doc) { + doc->resetEdit(); + } return true; } void TaskDlgTrajectoryCompound::helpRequested() -{ - -} +{} #include "moc_TaskDlgTrajectoryCompound.cpp" diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h index 7934dcdfd6..6d92f5f916 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryCompound.h @@ -28,17 +28,24 @@ // forward -namespace Gui { namespace TaskView { class TaskSelectLinkProperty;}} +namespace Gui +{ +namespace TaskView +{ +class TaskSelectLinkProperty; +} +} // namespace Gui -namespace RobotGui { +namespace RobotGui +{ /// simulation dialog for the TaskView -class RobotGuiExport TaskDlgTrajectoryCompound : public Gui::TaskView::TaskDialog +class RobotGuiExport TaskDlgTrajectoryCompound: public Gui::TaskView::TaskDialog { Q_OBJECT public: - TaskDlgTrajectoryCompound(Robot::TrajectoryCompound *); + TaskDlgTrajectoryCompound(Robot::TrajectoryCompound*); public: /// is called the TaskView when the dialog is opened @@ -47,20 +54,21 @@ public: bool accept() override; /// is called by the framework if the dialog is rejected (Cancel) bool reject() override; - /// is called by the framework if the user press the help button + /// is called by the framework if the user press the help button void helpRequested() override; - /// returns for Close and Help button + /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } protected: - Gui::TaskView::TaskSelectLinkProperty *select; - Robot::TrajectoryCompound *TrajectoryCompound; + Gui::TaskView::TaskSelectLinkProperty* select; + Robot::TrajectoryCompound* TrajectoryCompound; }; +} // namespace RobotGui -} //namespace RobotGui - -#endif // ROBOTGUI_TASKDLGSIMULATE_H +#endif // ROBOTGUI_TASKDLGSIMULATE_H diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp index 3f91a904a5..3143bd682f 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.cpp @@ -35,10 +35,11 @@ using namespace RobotGui; // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgTrajectoryDressUp::TaskDlgTrajectoryDressUp(Robot::TrajectoryDressUpObject *obj) - : TaskDialog(),pcObject(obj) +TaskDlgTrajectoryDressUp::TaskDlgTrajectoryDressUp(Robot::TrajectoryDressUpObject* obj) + : TaskDialog() + , pcObject(obj) { - param = new TaskTrajectoryDressUpParameter(obj); + param = new TaskTrajectoryDressUpParameter(obj); Content.push_back(param); } @@ -47,14 +48,11 @@ TaskDlgTrajectoryDressUp::TaskDlgTrajectoryDressUp(Robot::TrajectoryDressUpObjec void TaskDlgTrajectoryDressUp::open() -{ - -} +{} void TaskDlgTrajectoryDressUp::clicked(int button) { - if(QDialogButtonBox::Apply == button) - { + if (QDialogButtonBox::Apply == button) { // transfer the values to the object param->writeValues(); // May throw an exception which we must handle here @@ -68,24 +66,23 @@ bool TaskDlgTrajectoryDressUp::accept() pcObject->recomputeFeature(); Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if(doc) + if (doc) { doc->resetEdit(); + } return true; - } bool TaskDlgTrajectoryDressUp::reject() { Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if(doc) + if (doc) { doc->resetEdit(); + } return true; } void TaskDlgTrajectoryDressUp::helpRequested() -{ - -} +{} #include "moc_TaskDlgTrajectoryDressUp.cpp" diff --git a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h index 5ee99a6fe0..45e7ebaa2f 100644 --- a/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h +++ b/src/Mod/Robot/Gui/TaskDlgTrajectoryDressUp.h @@ -30,17 +30,24 @@ // forward -namespace Gui { namespace TaskView { class TaskSelectLinkProperty;}} +namespace Gui +{ +namespace TaskView +{ +class TaskSelectLinkProperty; +} +} // namespace Gui -namespace RobotGui { +namespace RobotGui +{ /// simulation dialog for the TaskView -class RobotGuiExport TaskDlgTrajectoryDressUp : public Gui::TaskView::TaskDialog +class RobotGuiExport TaskDlgTrajectoryDressUp: public Gui::TaskView::TaskDialog { Q_OBJECT public: - explicit TaskDlgTrajectoryDressUp(Robot::TrajectoryDressUpObject *); + explicit TaskDlgTrajectoryDressUp(Robot::TrajectoryDressUpObject*); public: /// is called the TaskView when the dialog is opened @@ -51,20 +58,21 @@ public: bool accept() override; /// is called by the framework if the dialog is rejected (Cancel) bool reject() override; - /// is called by the framework if the user press the help button + /// is called by the framework if the user press the help button void helpRequested() override; - /// returns for Close and Help button + /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Apply|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Apply | QDialogButtonBox::Cancel; + } protected: - TaskTrajectoryDressUpParameter *param; - Robot::TrajectoryDressUpObject *pcObject; + TaskTrajectoryDressUpParameter* param; + Robot::TrajectoryDressUpObject* pcObject; }; +} // namespace RobotGui -} //namespace RobotGui - -#endif // ROBOTGUI_TASKDLGSIMULATE_H +#endif // ROBOTGUI_TASKDLGSIMULATE_H diff --git a/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp b/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp index 42e78fccab..128c3424ba 100644 --- a/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp +++ b/src/Mod/Robot/Gui/TaskEdge2TracParameter.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -30,20 +30,20 @@ #include #include -#include "ui_TaskEdge2TracParameter.h" #include "TaskEdge2TracParameter.h" +#include "ui_TaskEdge2TracParameter.h" using namespace RobotGui; using namespace Gui; -TaskEdge2TracParameter::TaskEdge2TracParameter(Robot::Edge2TracObject *pcObject,QWidget *parent) +TaskEdge2TracParameter::TaskEdge2TracParameter(Robot::Edge2TracObject* pcObject, QWidget* parent) : TaskBox(Gui::BitmapFactory().pixmap("Robot_Edge2Trac"), - tr("TaskEdge2TracParameter"), - true, - parent), - pcObject(pcObject), - HideShowObj(nullptr) + tr("TaskEdge2TracParameter"), + true, + parent) + , pcObject(pcObject) + , HideShowObj(nullptr) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -53,23 +53,26 @@ TaskEdge2TracParameter::TaskEdge2TracParameter(Robot::Edge2TracObject *pcObject, this->groupLayout()->addWidget(proxy); - QObject::connect(ui->pushButton_HideShow, &QPushButton::clicked, this, &TaskEdge2TracParameter::hideShow); - QObject::connect(ui->doubleSpinBoxSizing, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskEdge2TracParameter::sizingValueChanged); - QObject::connect(ui->checkBoxOrientation, &QCheckBox::toggled, - this, &TaskEdge2TracParameter::orientationToggled); + // clang-format off + connect(ui->pushButton_HideShow, &QPushButton::clicked, + this, &TaskEdge2TracParameter::hideShow); + connect(ui->doubleSpinBoxSizing, qOverload(&QDoubleSpinBox::valueChanged), + this, &TaskEdge2TracParameter::sizingValueChanged); + connect(ui->checkBoxOrientation, &QCheckBox::toggled, + this, &TaskEdge2TracParameter::orientationToggled); + // clang-format on setHideShowObject(); - } void TaskEdge2TracParameter::setHideShowObject() { HideShowObj = pcObject->Source.getValue(); - if(HideShowObj){ + if (HideShowObj) { QString ObjectName = QString::fromUtf8(HideShowObj->Label.getValue()); ui->lineEdit_ObjectName->setText(ObjectName); - }else{ + } + else { ui->lineEdit_ObjectName->setText(QString()); } } @@ -78,12 +81,14 @@ void TaskEdge2TracParameter::hideShow() { setHideShowObject(); - if(HideShowObj){ + if (HideShowObj) { Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if(doc->getViewProvider(HideShowObj)->isVisible()) + if (doc->getViewProvider(HideShowObj)->isVisible()) { doc->getViewProvider(HideShowObj)->setVisible(false); - else + } + else { doc->getViewProvider(HideShowObj)->setVisible(true); + } } } @@ -97,18 +102,19 @@ void TaskEdge2TracParameter::orientationToggled(bool Value) pcObject->UseRotation.setValue(Value); } -void TaskEdge2TracParameter::setEdgeAndClusterNbr(int NbrEdges,int NbrClusters) +void TaskEdge2TracParameter::setEdgeAndClusterNbr(int NbrEdges, int NbrClusters) { QPalette palette(QApplication::palette()); - QString text; + QString text; - const int a=200,p=0; + const int a = 200, p = 0; // set the text and the background color for the Edges label - if(NbrEdges > 0){ - palette.setBrush(QPalette::WindowText,QColor(p,a,p)); - }else{ - palette.setBrush(QPalette::WindowText,QColor(a,p,p)); + if (NbrEdges > 0) { + palette.setBrush(QPalette::WindowText, QColor(p, a, p)); + } + else { + palette.setBrush(QPalette::WindowText, QColor(a, p, p)); } text = QString::fromLatin1("Edges: %1").arg(NbrEdges); @@ -116,18 +122,16 @@ void TaskEdge2TracParameter::setEdgeAndClusterNbr(int NbrEdges,int NbrClusters) ui->label_Edges->setText(text); // set the text and the background color for the Clusters label - if(NbrClusters == 1){ - palette.setBrush(QPalette::WindowText,QColor(p,a,p)); - }else{ - palette.setBrush(QPalette::WindowText,QColor(a,p,p)); + if (NbrClusters == 1) { + palette.setBrush(QPalette::WindowText, QColor(p, a, p)); + } + else { + palette.setBrush(QPalette::WindowText, QColor(a, p, p)); } text = QString::fromLatin1("Cluster: %1").arg(NbrClusters); ui->label_Cluster->setPalette(palette); ui->label_Cluster->setText(text); - - - } diff --git a/src/Mod/Robot/Gui/TaskEdge2TracParameter.h b/src/Mod/Robot/Gui/TaskEdge2TracParameter.h index 950b2ee188..93c9d83e97 100644 --- a/src/Mod/Robot/Gui/TaskEdge2TracParameter.h +++ b/src/Mod/Robot/Gui/TaskEdge2TracParameter.h @@ -27,27 +27,29 @@ #include -class Ui_TaskEdge2TracParameter; - -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace RobotGui { +namespace RobotGui +{ -class TaskEdge2TracParameter : public Gui::TaskView::TaskBox +class Ui_TaskEdge2TracParameter; +class TaskEdge2TracParameter: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskEdge2TracParameter(Robot::Edge2TracObject *pcObject,QWidget *parent = nullptr); + explicit TaskEdge2TracParameter(Robot::Edge2TracObject* pcObject, QWidget* parent = nullptr); ~TaskEdge2TracParameter() override; - void setEdgeAndClusterNbr(int NbrEdges,int NbrClusters); + void setEdgeAndClusterNbr(int NbrEdges, int NbrClusters); private Q_SLOTS: void hideShow(); @@ -55,17 +57,17 @@ private Q_SLOTS: void orientationToggled(bool Value); protected: - Robot::Edge2TracObject *pcObject; - App::DocumentObject *HideShowObj; + Robot::Edge2TracObject* pcObject; + App::DocumentObject* HideShowObj; void setHideShowObject(); -private: +private: private: QWidget* proxy; Ui_TaskEdge2TracParameter* ui; }; -} //namespace PartDesignGui +} // namespace RobotGui -#endif // GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui b/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui index 088a55b247..5b9ce5fbb1 100644 --- a/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui +++ b/src/Mod/Robot/Gui/TaskEdge2TracParameter.ui @@ -1,6 +1,6 @@ - TaskEdge2TracParameter + RobotGui::TaskEdge2TracParameter diff --git a/src/Mod/Robot/Gui/TaskRobot6Axis.cpp b/src/Mod/Robot/Gui/TaskRobot6Axis.cpp index 1acf5d16bc..08d1deea3c 100644 --- a/src/Mod/Robot/Gui/TaskRobot6Axis.cpp +++ b/src/Mod/Robot/Gui/TaskRobot6Axis.cpp @@ -22,24 +22,25 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include #include #include -#include "ui_TaskRobot6Axis.h" #include "TaskRobot6Axis.h" +#include "ui_TaskRobot6Axis.h" using namespace RobotGui; using namespace Gui; -TaskRobot6Axis::TaskRobot6Axis(Robot::RobotObject *pcRobotObject,QWidget *parent) - : TaskBox(Gui::BitmapFactory().pixmap("Robot_CreateRobot"),tr("TaskRobot6Axis"),true, parent), - pcRobot(pcRobotObject),Rob() +TaskRobot6Axis::TaskRobot6Axis(Robot::RobotObject* pcRobotObject, QWidget* parent) + : TaskBox(Gui::BitmapFactory().pixmap("Robot_CreateRobot"), tr("TaskRobot6Axis"), true, parent) + , pcRobot(pcRobotObject) + , Rob() { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -49,13 +50,22 @@ TaskRobot6Axis::TaskRobot6Axis(Robot::RobotObject *pcRobotObject,QWidget *parent this->groupLayout()->addWidget(proxy); - QObject::connect(ui->horizontalSlider_Axis1, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA1); - QObject::connect(ui->horizontalSlider_Axis2, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA2); - QObject::connect(ui->horizontalSlider_Axis3, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA3); - QObject::connect(ui->horizontalSlider_Axis4, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA4); - QObject::connect(ui->horizontalSlider_Axis5, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA5); - QObject::connect(ui->horizontalSlider_Axis6, &QSlider::sliderMoved, this, &TaskRobot6Axis::changeSliderA6); - QObject::connect(ui->pushButtonChooseTool, &QPushButton::clicked, this, &TaskRobot6Axis::createPlacementDlg); + // clang-format off + connect(ui->horizontalSlider_Axis1, &QSlider::sliderMoved, + this, &TaskRobot6Axis::changeSliderA1); + connect(ui->horizontalSlider_Axis2, &QSlider::sliderMoved, + this, &TaskRobot6Axis::changeSliderA2); + connect(ui->horizontalSlider_Axis3, &QSlider::sliderMoved, + this, &TaskRobot6Axis::changeSliderA3); + connect(ui->horizontalSlider_Axis4, &QSlider::sliderMoved, + this, &TaskRobot6Axis::changeSliderA4); + connect(ui->horizontalSlider_Axis5, &QSlider::sliderMoved, + this, &TaskRobot6Axis::changeSliderA5); + connect(ui->horizontalSlider_Axis6, &QSlider::sliderMoved, + this, &TaskRobot6Axis::changeSliderA6); + connect(ui->pushButtonChooseTool, &QPushButton::clicked, + this, &TaskRobot6Axis::createPlacementDlg); + // clang-format on if (pcRobotObject) { setRobot(pcRobotObject); @@ -67,32 +77,32 @@ TaskRobot6Axis::~TaskRobot6Axis() delete ui; } -void TaskRobot6Axis::setRobot(Robot::RobotObject *pcRobotObject) +void TaskRobot6Axis::setRobot(Robot::RobotObject* pcRobotObject) { pcRobot = pcRobotObject; - if(!pcRobotObject){ + if (!pcRobotObject) { delete Rob; return; } Rob = new Robot::Robot6Axis(pcRobot->getRobot()); - ui->horizontalSlider_Axis1->setMaximum( (int ) Rob->getMaxAngle(0) ); - ui->horizontalSlider_Axis1->setMinimum( (int ) Rob->getMinAngle(0) ); - - ui->horizontalSlider_Axis2->setMaximum( (int ) Rob->getMaxAngle(1) ); - ui->horizontalSlider_Axis2->setMinimum( (int ) Rob->getMinAngle(1) ); + ui->horizontalSlider_Axis1->setMaximum((int)Rob->getMaxAngle(0)); + ui->horizontalSlider_Axis1->setMinimum((int)Rob->getMinAngle(0)); - ui->horizontalSlider_Axis3->setMaximum( (int ) Rob->getMaxAngle(2) ); - ui->horizontalSlider_Axis3->setMinimum( (int ) Rob->getMinAngle(2) ); + ui->horizontalSlider_Axis2->setMaximum((int)Rob->getMaxAngle(1)); + ui->horizontalSlider_Axis2->setMinimum((int)Rob->getMinAngle(1)); - ui->horizontalSlider_Axis4->setMaximum( (int ) Rob->getMaxAngle(3) ); - ui->horizontalSlider_Axis4->setMinimum( (int ) Rob->getMinAngle(3) ); + ui->horizontalSlider_Axis3->setMaximum((int)Rob->getMaxAngle(2)); + ui->horizontalSlider_Axis3->setMinimum((int)Rob->getMinAngle(2)); - ui->horizontalSlider_Axis5->setMaximum( (int ) Rob->getMaxAngle(4) ); - ui->horizontalSlider_Axis5->setMinimum( (int ) Rob->getMinAngle(4) ); + ui->horizontalSlider_Axis4->setMaximum((int)Rob->getMaxAngle(3)); + ui->horizontalSlider_Axis4->setMinimum((int)Rob->getMinAngle(3)); - ui->horizontalSlider_Axis6->setMaximum( (int ) Rob->getMaxAngle(5) ); - ui->horizontalSlider_Axis6->setMinimum( (int ) Rob->getMinAngle(5) ); + ui->horizontalSlider_Axis5->setMaximum((int)Rob->getMaxAngle(4)); + ui->horizontalSlider_Axis5->setMinimum((int)Rob->getMinAngle(4)); + + ui->horizontalSlider_Axis6->setMaximum((int)Rob->getMaxAngle(5)); + ui->horizontalSlider_Axis6->setMinimum((int)Rob->getMinAngle(5)); setAxis(pcRobot->Axis1.getValue(), pcRobot->Axis2.getValue(), @@ -109,140 +119,141 @@ void TaskRobot6Axis::createPlacementDlg() Gui::Dialog::Placement plc; plc.setSelection(Gui::Selection().getSelectionEx()); plc.setPlacement(pcRobot->Tool.getValue()); - if (plc.exec()==QDialog::Accepted) + if (plc.exec() == QDialog::Accepted) { pcRobot->Tool.setValue(plc.getPlacement()); + } viewTool(pcRobot->Tool.getValue()); } void TaskRobot6Axis::viewTcp(const Base::Placement& pos) { - double A,B,C; - pos.getRotation().getYawPitchRoll(A,B,C); + double A, B, C; + pos.getRotation().getYawPitchRoll(A, B, C); QString result = QString::fromLatin1("TCP:( %1, %2, %3, %4, %5, %6 )") - .arg(pos.getPosition().x,0,'f',1) - .arg(pos.getPosition().y,0,'f',1) - .arg(pos.getPosition().z,0,'f',1) - .arg(A,0,'f',1) - .arg(B,0,'f',1) - .arg(C,0,'f',1); + .arg(pos.getPosition().x, 0, 'f', 1) + .arg(pos.getPosition().y, 0, 'f', 1) + .arg(pos.getPosition().z, 0, 'f', 1) + .arg(A, 0, 'f', 1) + .arg(B, 0, 'f', 1) + .arg(C, 0, 'f', 1); ui->label_TCP->setText(result); } void TaskRobot6Axis::viewTool(const Base::Placement& pos) { - double A,B,C; - pos.getRotation().getYawPitchRoll(A,B,C); + double A, B, C; + pos.getRotation().getYawPitchRoll(A, B, C); QString result = QString::fromLatin1("Tool:( %1, %2, %3, %4, %5, %6 )") - .arg(pos.getPosition().x,0,'f',1) - .arg(pos.getPosition().y,0,'f',1) - .arg(pos.getPosition().z,0,'f',1) - .arg(A,0,'f',1) - .arg(B,0,'f',1) - .arg(C,0,'f',1); + .arg(pos.getPosition().x, 0, 'f', 1) + .arg(pos.getPosition().y, 0, 'f', 1) + .arg(pos.getPosition().z, 0, 'f', 1) + .arg(A, 0, 'f', 1) + .arg(B, 0, 'f', 1) + .arg(C, 0, 'f', 1); ui->label_Tool->setText(result); } -void TaskRobot6Axis::changeSliderA1(int value){ - pcRobot->Axis1.setValue(float (value)); +void TaskRobot6Axis::changeSliderA1(int value) +{ + pcRobot->Axis1.setValue(float(value)); viewTcp(pcRobot->Tcp.getValue()); - ui->lineEdit_Axis1->setText(QString::fromUtf8("%1\xc2\xb0").arg((float)value,0,'f',1)); - setColor(0,float (value),*(ui->lineEdit_Axis1)); + ui->lineEdit_Axis1->setText(QString::fromUtf8("%1\xc2\xb0").arg((float)value, 0, 'f', 1)); + setColor(0, float(value), *(ui->lineEdit_Axis1)); } void TaskRobot6Axis::changeSliderA2(int value) { - pcRobot->Axis2.setValue(float (value)); + pcRobot->Axis2.setValue(float(value)); viewTcp(pcRobot->Tcp.getValue()); - ui->lineEdit_Axis2->setText(QString::fromUtf8("%1\xc2\xb0").arg((float)value,0,'f',1)); - setColor(1,float (value),*(ui->lineEdit_Axis2)); - + ui->lineEdit_Axis2->setText(QString::fromUtf8("%1\xc2\xb0").arg((float)value, 0, 'f', 1)); + setColor(1, float(value), *(ui->lineEdit_Axis2)); } void TaskRobot6Axis::changeSliderA3(int value) { - pcRobot->Axis3.setValue(float (value)); + pcRobot->Axis3.setValue(float(value)); viewTcp(pcRobot->Tcp.getValue()); - ui->lineEdit_Axis3->setText(QString::fromUtf8("%1\xc2\xb0").arg((float)value,0,'f',1)); - setColor(2,float (value),*(ui->lineEdit_Axis3)); - + ui->lineEdit_Axis3->setText(QString::fromUtf8("%1\xc2\xb0").arg((float)value, 0, 'f', 1)); + setColor(2, float(value), *(ui->lineEdit_Axis3)); } void TaskRobot6Axis::changeSliderA4(int value) { - pcRobot->Axis4.setValue(float (value)); + pcRobot->Axis4.setValue(float(value)); viewTcp(pcRobot->Tcp.getValue()); - ui->lineEdit_Axis4->setText(QString::fromLatin1("%1°").arg((float)value,0,'f',1)); - setColor(3,float (value),*(ui->lineEdit_Axis4)); - + ui->lineEdit_Axis4->setText(QString::fromLatin1("%1°").arg((float)value, 0, 'f', 1)); + setColor(3, float(value), *(ui->lineEdit_Axis4)); } void TaskRobot6Axis::changeSliderA5(int value) { - pcRobot->Axis5.setValue(float (value)); + pcRobot->Axis5.setValue(float(value)); viewTcp(pcRobot->Tcp.getValue()); - ui->lineEdit_Axis5->setText(QString::fromLatin1("%1°").arg((float)value,0,'f',1)); - setColor(4,float (value),*(ui->lineEdit_Axis5)); - + ui->lineEdit_Axis5->setText(QString::fromLatin1("%1°").arg((float)value, 0, 'f', 1)); + setColor(4, float(value), *(ui->lineEdit_Axis5)); } void TaskRobot6Axis::changeSliderA6(int value) { - pcRobot->Axis6.setValue(float (value)); + pcRobot->Axis6.setValue(float(value)); viewTcp(pcRobot->Tcp.getValue()); - ui->lineEdit_Axis6->setText(QString::fromLatin1("%1°").arg((float)value,0,'f',1)); - setColor(5,float (value),*(ui->lineEdit_Axis6)); - + ui->lineEdit_Axis6->setText(QString::fromLatin1("%1°").arg((float)value, 0, 'f', 1)); + setColor(5, float(value), *(ui->lineEdit_Axis6)); } -void TaskRobot6Axis::setColor(int i,float angle, QLineEdit &lineEdit){ +void TaskRobot6Axis::setColor(int i, float angle, QLineEdit& lineEdit) +{ - if( angle > Rob->getMaxAngle(i) || angle < Rob->getMinAngle(i)){ + if (angle > Rob->getMaxAngle(i) || angle < Rob->getMinAngle(i)) { QPalette p = lineEdit.palette(); - p.setColor(QPalette::Base, QColor(255,220,220));//green color - lineEdit.setPalette(p); - }else{ - QPalette p = lineEdit.palette(); - p.setColor(QPalette::Base, QColor(220,255,220));//green color + p.setColor(QPalette::Base, QColor(255, 220, 220)); // green color + lineEdit.setPalette(p); + } + else { + QPalette p = lineEdit.palette(); + p.setColor(QPalette::Base, QColor(220, 255, 220)); // green color lineEdit.setPalette(p); } - } -void TaskRobot6Axis::setAxis(float A1,float A2,float A3,float A4,float A5,float A6,const Base::Placement &Tcp) +void TaskRobot6Axis::setAxis(float A1, + float A2, + float A3, + float A4, + float A5, + float A6, + const Base::Placement& Tcp) { ui->horizontalSlider_Axis1->setSliderPosition((int)A1); - ui->lineEdit_Axis1->setText(QString::fromLatin1("%1°").arg(A1,0,'f',1)); - setColor(0,A1,*(ui->lineEdit_Axis1)); + ui->lineEdit_Axis1->setText(QString::fromLatin1("%1°").arg(A1, 0, 'f', 1)); + setColor(0, A1, *(ui->lineEdit_Axis1)); ui->horizontalSlider_Axis2->setSliderPosition((int)A2); - ui->lineEdit_Axis2->setText(QString::fromLatin1("%1°").arg(A2,0,'f',1)); - setColor(1,A2,*(ui->lineEdit_Axis2)); + ui->lineEdit_Axis2->setText(QString::fromLatin1("%1°").arg(A2, 0, 'f', 1)); + setColor(1, A2, *(ui->lineEdit_Axis2)); ui->horizontalSlider_Axis3->setSliderPosition((int)A3); - ui->lineEdit_Axis3->setText(QString::fromLatin1("%1°").arg(A3,0,'f',1)); - setColor(2,A3,*(ui->lineEdit_Axis3)); + ui->lineEdit_Axis3->setText(QString::fromLatin1("%1°").arg(A3, 0, 'f', 1)); + setColor(2, A3, *(ui->lineEdit_Axis3)); ui->horizontalSlider_Axis4->setSliderPosition((int)A4); - ui->lineEdit_Axis4->setText(QString::fromLatin1("%1°").arg(A4,0,'f',1)); - setColor(3,A4,*(ui->lineEdit_Axis4)); + ui->lineEdit_Axis4->setText(QString::fromLatin1("%1°").arg(A4, 0, 'f', 1)); + setColor(3, A4, *(ui->lineEdit_Axis4)); ui->horizontalSlider_Axis5->setSliderPosition((int)A5); - ui->lineEdit_Axis5->setText(QString::fromLatin1("%1°").arg(A5,0,'f',1)); - setColor(4,A5,*(ui->lineEdit_Axis5)); + ui->lineEdit_Axis5->setText(QString::fromLatin1("%1°").arg(A5, 0, 'f', 1)); + setColor(4, A5, *(ui->lineEdit_Axis5)); ui->horizontalSlider_Axis6->setSliderPosition((int)A6); - ui->lineEdit_Axis6->setText(QString::fromLatin1("%1°").arg(A6,0,'f',1)); - setColor(5,A6,*(ui->lineEdit_Axis6)); + ui->lineEdit_Axis6->setText(QString::fromLatin1("%1°").arg(A6, 0, 'f', 1)); + setColor(5, A6, *(ui->lineEdit_Axis6)); viewTcp(Tcp); - - } - #include "moc_TaskRobot6Axis.cpp" diff --git a/src/Mod/Robot/Gui/TaskRobot6Axis.h b/src/Mod/Robot/Gui/TaskRobot6Axis.h index b47067cfef..40cab83691 100644 --- a/src/Mod/Robot/Gui/TaskRobot6Axis.h +++ b/src/Mod/Robot/Gui/TaskRobot6Axis.h @@ -27,33 +27,36 @@ #include -class Ui_TaskRobot6Axis; class QLineEdit; -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace RobotGui { +namespace RobotGui +{ - -class TaskRobot6Axis : public Gui::TaskView::TaskBox +class Ui_TaskRobot6Axis; +class TaskRobot6Axis: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskRobot6Axis(Robot::RobotObject *pcRobotObject,QWidget *parent = nullptr); + explicit TaskRobot6Axis(Robot::RobotObject* pcRobotObject, QWidget* parent = nullptr); ~TaskRobot6Axis() override; - void setRobot(Robot::RobotObject *pcRobotObject); + void setRobot(Robot::RobotObject* pcRobotObject); public Q_SLOTS: - void setAxis(float A1,float A2,float A3,float A4,float A5,float A6,const Base::Placement &Tcp); + void + setAxis(float A1, float A2, float A3, float A4, float A5, float A6, const Base::Placement& Tcp); void changeSliderA1(int value); void changeSliderA2(int value); void changeSliderA3(int value); @@ -63,18 +66,18 @@ public Q_SLOTS: void createPlacementDlg(); protected: - Robot::RobotObject *pcRobot; + Robot::RobotObject* pcRobot; void viewTcp(const Base::Placement& pos); void viewTool(const Base::Placement& pos); - void setColor(int i,float angle, QLineEdit &lineEdit); -private: + void setColor(int i, float angle, QLineEdit& lineEdit); +private: private: QWidget* proxy; Ui_TaskRobot6Axis* ui; - Robot::Robot6Axis *Rob; + Robot::Robot6Axis* Rob; }; -} //namespace PartDesignGui +} // namespace RobotGui -#endif // GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Robot/Gui/TaskRobotControl.cpp b/src/Mod/Robot/Gui/TaskRobotControl.cpp index 73674e8678..d21bcc1007 100644 --- a/src/Mod/Robot/Gui/TaskRobotControl.cpp +++ b/src/Mod/Robot/Gui/TaskRobotControl.cpp @@ -24,16 +24,19 @@ #include -#include "ui_TaskRobotControl.h" #include "TaskRobotControl.h" +#include "ui_TaskRobotControl.h" using namespace RobotGui; using namespace Gui; -TaskRobotControl::TaskRobotControl(Robot::RobotObject *pcRobotObject,QWidget *parent) - : TaskBox(Gui::BitmapFactory().pixmap("Robot_CreateRobot"),tr("TaskRobotControl"),true, parent), - pcRobot(pcRobotObject) +TaskRobotControl::TaskRobotControl(Robot::RobotObject* pcRobotObject, QWidget* parent) + : TaskBox(Gui::BitmapFactory().pixmap("Robot_CreateRobot"), + tr("TaskRobotControl"), + true, + parent) + , pcRobot(pcRobotObject) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -43,12 +46,12 @@ TaskRobotControl::TaskRobotControl(Robot::RobotObject *pcRobotObject,QWidget *pa this->groupLayout()->addWidget(proxy); - if(pcRobotObject) + if (pcRobotObject) { setRobot(pcRobotObject); - + } } -void TaskRobotControl::setRobot(Robot::RobotObject *pcRobotObject) +void TaskRobotControl::setRobot(Robot::RobotObject* pcRobotObject) { pcRobot = pcRobotObject; } diff --git a/src/Mod/Robot/Gui/TaskRobotControl.h b/src/Mod/Robot/Gui/TaskRobotControl.h index b007054ecb..6395f6efcb 100644 --- a/src/Mod/Robot/Gui/TaskRobotControl.h +++ b/src/Mod/Robot/Gui/TaskRobotControl.h @@ -28,41 +28,42 @@ #include -class Ui_TaskRobotControl; - -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace RobotGui { +namespace RobotGui +{ -class TaskRobotControl : public Gui::TaskView::TaskBox +class Ui_TaskRobotControl; +class TaskRobotControl: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskRobotControl(Robot::RobotObject *pcRobotObject,QWidget *parent = nullptr); + explicit TaskRobotControl(Robot::RobotObject* pcRobotObject, QWidget* parent = nullptr); ~TaskRobotControl() override; - void setRobot(Robot::RobotObject *pcRobotObject); + void setRobot(Robot::RobotObject* pcRobotObject); private Q_SLOTS: - + protected: - Robot::RobotObject *pcRobot; + Robot::RobotObject* pcRobot; private: - private: QWidget* proxy; Ui_TaskRobotControl* ui; }; -} //namespace PartDesignGui +} // namespace RobotGui -#endif // GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Robot/Gui/TaskRobotControl.ui b/src/Mod/Robot/Gui/TaskRobotControl.ui index d6fe44afa4..771bbe26b7 100644 --- a/src/Mod/Robot/Gui/TaskRobotControl.ui +++ b/src/Mod/Robot/Gui/TaskRobotControl.ui @@ -1,6 +1,6 @@ - TaskRobotControl + RobotGui::TaskRobotControl diff --git a/src/Mod/Robot/Gui/TaskRobotMessages.cpp b/src/Mod/Robot/Gui/TaskRobotMessages.cpp index b5fdffeaaf..ad15dd961a 100644 --- a/src/Mod/Robot/Gui/TaskRobotMessages.cpp +++ b/src/Mod/Robot/Gui/TaskRobotMessages.cpp @@ -24,16 +24,16 @@ #include -#include "ui_TaskRobotMessages.h" #include "TaskRobotMessages.h" +#include "ui_TaskRobotMessages.h" using namespace RobotGui; using namespace Gui; -TaskRobotMessages::TaskRobotMessages(Robot::RobotObject *pcRobotObject,QWidget *parent) - : TaskBox(Gui::BitmapFactory().pixmap("document-new"),tr("TaskRobotMessages"),true, parent), - pcRobot(pcRobotObject) +TaskRobotMessages::TaskRobotMessages(Robot::RobotObject* pcRobotObject, QWidget* parent) + : TaskBox(Gui::BitmapFactory().pixmap("document-new"), tr("TaskRobotMessages"), true, parent) + , pcRobot(pcRobotObject) { // we need a separate container widget to add all controls to proxy = new QWidget(this); diff --git a/src/Mod/Robot/Gui/TaskRobotMessages.h b/src/Mod/Robot/Gui/TaskRobotMessages.h index c4b8d519a5..f0e02fa5e9 100644 --- a/src/Mod/Robot/Gui/TaskRobotMessages.h +++ b/src/Mod/Robot/Gui/TaskRobotMessages.h @@ -27,41 +27,41 @@ #include -class Ui_TaskRobotMessages; - -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace RobotGui { +namespace RobotGui +{ - -class TaskRobotMessages : public Gui::TaskView::TaskBox +class Ui_TaskRobotMessages; +class TaskRobotMessages: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskRobotMessages(Robot::RobotObject *pcRobotObject,QWidget *parent = nullptr); + explicit TaskRobotMessages(Robot::RobotObject* pcRobotObject, QWidget* parent = nullptr); ~TaskRobotMessages() override; private Q_SLOTS: - + protected: - Robot::RobotObject *pcRobot; + Robot::RobotObject* pcRobot; private: - private: QWidget* proxy; Ui_TaskRobotMessages* ui; }; -} //namespace PartDesignGui +} // namespace RobotGui -#endif // GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Robot/Gui/TaskRobotMessages.ui b/src/Mod/Robot/Gui/TaskRobotMessages.ui index e4821b987e..4370dac0b8 100644 --- a/src/Mod/Robot/Gui/TaskRobotMessages.ui +++ b/src/Mod/Robot/Gui/TaskRobotMessages.ui @@ -1,6 +1,6 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages diff --git a/src/Mod/Robot/Gui/TaskTrajectory.cpp b/src/Mod/Robot/Gui/TaskTrajectory.cpp index f052535545..7db9b05fa8 100644 --- a/src/Mod/Robot/Gui/TaskTrajectory.cpp +++ b/src/Mod/Robot/Gui/TaskTrajectory.cpp @@ -26,20 +26,22 @@ #include #include -#include "ui_TaskTrajectory.h" #include "TaskTrajectory.h" +#include "ui_TaskTrajectory.h" using namespace RobotGui; using namespace Gui; -TaskTrajectory::TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject,QWidget *parent) - : TaskBox(Gui::BitmapFactory().pixmap("document-new"),tr("Trajectory"),true, parent), - sim(pcTrajectoryObject->Trajectory.getValue(),pcRobotObject->getRobot()), - pcRobot(pcRobotObject), - Run(false), - block(false), - timePos(0.0) +TaskTrajectory::TaskTrajectory(Robot::RobotObject* pcRobotObject, + Robot::TrajectoryObject* pcTrajectoryObject, + QWidget* parent) + : TaskBox(Gui::BitmapFactory().pixmap("document-new"), tr("Trajectory"), true, parent) + , sim(pcTrajectoryObject->Trajectory.getValue(), pcRobotObject->getRobot()) + , pcRobot(pcRobotObject) + , Run(false) + , block(false) + , timePos(0.0) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -49,7 +51,7 @@ TaskTrajectory::TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::Trajecto this->groupLayout()->addWidget(proxy); - // set Tool + // set Tool sim.Tool = pcRobotObject->Tool.getValue(); ui->trajectoryTable->setSortingEnabled(false); @@ -59,25 +61,49 @@ TaskTrajectory::TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::Trajecto duration = trac.getDuration(); ui->timeSpinBox->setMaximum(duration); - for(unsigned int i=0;itrajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("UNDEF")));break; - case Robot::Waypoint::CIRC: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("CIRC")));break; - case Robot::Waypoint::PTP: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("PTP")));break; - case Robot::Waypoint::LINE: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("LIN")));break; - default: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("UNDEF")));break; + switch (pt.Type) { + case Robot::Waypoint::UNDEF: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("UNDEF"))); + break; + case Robot::Waypoint::CIRC: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("CIRC"))); + break; + case Robot::Waypoint::PTP: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("PTP"))); + break; + case Robot::Waypoint::LINE: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("LIN"))); + break; + default: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("UNDEF"))); + break; } - ui->trajectoryTable->setItem(i, 1, new QTableWidgetItem(QString::fromUtf8(pt.Name.c_str()))); - if(pt.Cont) + ui->trajectoryTable->setItem(i, + 1, + new QTableWidgetItem(QString::fromUtf8(pt.Name.c_str()))); + if (pt.Cont) { ui->trajectoryTable->setItem(i, 2, new QTableWidgetItem(QString::fromLatin1("|"))); - else + } + else { ui->trajectoryTable->setItem(i, 2, new QTableWidgetItem(QString::fromLatin1("-"))); + } ui->trajectoryTable->setItem(i, 3, new QTableWidgetItem(QString::number(pt.Velocity))); ui->trajectoryTable->setItem(i, 4, new QTableWidgetItem(QString::number(pt.Acceleration))); - } + // clang-format off QObject::connect(ui->ButtonStepStart , &QPushButton::clicked, this, &TaskTrajectory::start); QObject::connect(ui->ButtonStepStop , &QPushButton::clicked, this, &TaskTrajectory::stop); QObject::connect(ui->ButtonStepRun , &QPushButton::clicked, this, &TaskTrajectory::run); @@ -95,9 +121,11 @@ TaskTrajectory::TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::Trajecto this, qOverload(&TaskTrajectory::valueChanged)); QObject::connect(ui->timeSlider, qOverload(&QSlider::valueChanged), this, qOverload(&TaskTrajectory::valueChanged)); + // clang-format on // get the view provider - ViewProv = dynamic_cast(Gui::Application::Instance->activeDocument()->getViewProvider(pcRobotObject) ); + ViewProv = dynamic_cast( + Gui::Application::Instance->activeDocument()->getViewProvider(pcRobotObject)); setTo(); } @@ -105,21 +133,20 @@ TaskTrajectory::TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::Trajecto TaskTrajectory::~TaskTrajectory() { delete ui; - } void TaskTrajectory::viewTool(const Base::Placement& pos) { - double A,B,C; - pos.getRotation().getYawPitchRoll(A,B,C); + double A, B, C; + pos.getRotation().getYawPitchRoll(A, B, C); QString result = QString::fromLatin1("Pos:(%1, %2, %3, %4, %5, %6)") - .arg(pos.getPosition().x,0,'f',1) - .arg(pos.getPosition().y,0,'f',1) - .arg(pos.getPosition().z,0,'f',1) - .arg(A,0,'f',1) - .arg(B,0,'f',1) - .arg(C,0,'f',1); + .arg(pos.getPosition().x, 0, 'f', 1) + .arg(pos.getPosition().y, 0, 'f', 1) + .arg(pos.getPosition().z, 0, 'f', 1) + .arg(A, 0, 'f', 1) + .arg(B, 0, 'f', 1) + .arg(C, 0, 'f', 1); ui->label_Pos->setText(result); } @@ -128,13 +155,26 @@ void TaskTrajectory::setTo() { sim.Tool = pcRobot->Tool.getValue(); - if(timePos < 0.0001) + if (timePos < 0.0001) { sim.reset(); - else{ + } + else { sim.setToTime(timePos); } - ViewProv->setAxisTo(sim.Axis[0],sim.Axis[1],sim.Axis[2],sim.Axis[3],sim.Axis[4],sim.Axis[5],sim.Rob.getTcp()); - Q_EMIT axisChanged(sim.Axis[0],sim.Axis[1],sim.Axis[2],sim.Axis[3],sim.Axis[4],sim.Axis[5],sim.Rob.getTcp()); + ViewProv->setAxisTo(sim.Axis[0], + sim.Axis[1], + sim.Axis[2], + sim.Axis[3], + sim.Axis[4], + sim.Axis[5], + sim.Rob.getTcp()); + Q_EMIT axisChanged(sim.Axis[0], + sim.Axis[1], + sim.Axis[2], + sim.Axis[3], + sim.Axis[4], + sim.Axis[5], + sim.Rob.getTcp()); viewTool(sim.Rob.getTcp()); } @@ -142,9 +182,8 @@ void TaskTrajectory::start() { timePos = 0.0f; ui->timeSpinBox->setValue(timePos); - ui->timeSlider->setValue(int((timePos/duration)*1000)); + ui->timeSlider->setValue(int((timePos / duration) * 1000)); setTo(); - } void TaskTrajectory::stop() { @@ -157,51 +196,50 @@ void TaskTrajectory::run() Run = true; } void TaskTrajectory::back() -{ -} +{} void TaskTrajectory::forward() -{ -} +{} void TaskTrajectory::end() { timePos = duration; ui->timeSpinBox->setValue(timePos); - ui->timeSlider->setValue(int((timePos/duration)*1000)); + ui->timeSlider->setValue(int((timePos / duration) * 1000)); setTo(); } void TaskTrajectory::timerDone() { - if(timePos < duration){ + if (timePos < duration) { timePos += .1f; ui->timeSpinBox->setValue(timePos); - ui->timeSlider->setValue(int((timePos/duration)*1000)); + ui->timeSlider->setValue(int((timePos / duration) * 1000)); setTo(); timer->start(); - }else{ + } + else { timer->stop(); Run = false; } } -void TaskTrajectory::valueChanged ( int value ) +void TaskTrajectory::valueChanged(int value) { - if(!block){ - timePos = duration*(value/1000.0); - block=true; + if (!block) { + timePos = duration * (value / 1000.0); + block = true; ui->timeSpinBox->setValue(timePos); - block=false; + block = false; setTo(); } } -void TaskTrajectory::valueChanged ( double value ) +void TaskTrajectory::valueChanged(double value) { - if(!block){ + if (!block) { timePos = value; - block=true; - ui->timeSlider->setValue(int((timePos/duration)*1000)); - block=false; + block = true; + ui->timeSlider->setValue(int((timePos / duration) * 1000)); + block = false; setTo(); } } diff --git a/src/Mod/Robot/Gui/TaskTrajectory.h b/src/Mod/Robot/Gui/TaskTrajectory.h index 67ca8deb4b..702c252272 100644 --- a/src/Mod/Robot/Gui/TaskTrajectory.h +++ b/src/Mod/Robot/Gui/TaskTrajectory.h @@ -32,29 +32,32 @@ #include "ViewProviderRobotObject.h" -class Ui_TaskTrajectory; - -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace RobotGui { +namespace RobotGui +{ - -class TaskTrajectory : public Gui::TaskView::TaskBox +class Ui_TaskTrajectory; +class TaskTrajectory: public Gui::TaskView::TaskBox { Q_OBJECT public: - TaskTrajectory(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject,QWidget *parent = nullptr); + TaskTrajectory(Robot::RobotObject* pcRobotObject, + Robot::TrajectoryObject* pcTrajectoryObject, + QWidget* parent = nullptr); ~TaskTrajectory() override; /// Observer message from the Selection - void OnChange(Gui::SelectionSingleton::SubjectType &rCaller, + void OnChange(Gui::SelectionSingleton::SubjectType& rCaller, Gui::SelectionSingleton::MessageType Reason); private Q_SLOTS: @@ -66,21 +69,27 @@ private Q_SLOTS: void end(); void timerDone(); - void valueChanged ( int value ); - void valueChanged ( double d ); + void valueChanged(int value); + void valueChanged(double d); Q_SIGNALS: - void axisChanged(float A1,float A2,float A3,float A4,float A5,float A6,const Base::Placement &Tcp); + void axisChanged(float A1, + float A2, + float A3, + float A4, + float A5, + float A6, + const Base::Placement& Tcp); protected: void setTo(); void viewTool(const Base::Placement& pos); - QTimer *timer; + QTimer* timer; Robot::Simulation sim; - Robot::RobotObject *pcRobot; - ViewProviderRobotObject *ViewProv; + Robot::RobotObject* pcRobot; + ViewProviderRobotObject* ViewProv; bool Run; bool block; @@ -93,6 +102,6 @@ private: Ui_TaskTrajectory* ui; }; -} //namespace PartDesignGui +} // namespace RobotGui -#endif // GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp index ac87760151..33ea8b3e6e 100644 --- a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp +++ b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -36,12 +36,13 @@ using namespace RobotGui; using namespace Gui; -TaskTrajectoryDressUpParameter::TaskTrajectoryDressUpParameter(Robot::TrajectoryDressUpObject *obj,QWidget *parent) +TaskTrajectoryDressUpParameter::TaskTrajectoryDressUpParameter(Robot::TrajectoryDressUpObject* obj, + QWidget* parent) : TaskBox(Gui::BitmapFactory().pixmap("Robot_TrajectoryDressUp"), - tr("Dress Up Parameter"), - true, - parent), - pcObject(obj) + tr("Dress Up Parameter"), + true, + parent) + , pcObject(obj) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -52,23 +53,23 @@ TaskTrajectoryDressUpParameter::TaskTrajectoryDressUpParameter(Robot::Trajectory this->groupLayout()->addWidget(proxy); // pump the actual values in the Gui - ui->doubleSpinBoxSpeed->setValue (pcObject->Speed.getValue() / 1000.0) ; - ui->doubleSpinBoxAccel->setValue (pcObject->Acceleration.getValue() / 1000.0) ; - ui->checkBoxUseSpeed ->setChecked (pcObject->UseSpeed.getValue()) ; - ui->checkBoxUseAccel ->setChecked (pcObject->UseAcceleration.getValue()) ; - ui->comboBoxCont ->setCurrentIndex (pcObject->ContType.getValue()) ; - ui->comboBoxOrientation->setCurrentIndex (pcObject->AddType.getValue()) ; + ui->doubleSpinBoxSpeed->setValue(pcObject->Speed.getValue() / 1000.0); + ui->doubleSpinBoxAccel->setValue(pcObject->Acceleration.getValue() / 1000.0); + ui->checkBoxUseSpeed->setChecked(pcObject->UseSpeed.getValue()); + ui->checkBoxUseAccel->setChecked(pcObject->UseAcceleration.getValue()); + ui->comboBoxCont->setCurrentIndex(pcObject->ContType.getValue()); + ui->comboBoxOrientation->setCurrentIndex(pcObject->AddType.getValue()); PosAdd = pcObject->PosAdd.getValue(); viewPlacement(); - QObject::connect(ui->toolButtonChoosePlacement, &QToolButton::clicked, - this, &TaskTrajectoryDressUpParameter::createPlacementDlg); - + QObject::connect(ui->toolButtonChoosePlacement, + &QToolButton::clicked, + this, + &TaskTrajectoryDressUpParameter::createPlacementDlg); } - TaskTrajectoryDressUpParameter::~TaskTrajectoryDressUpParameter() { delete ui; @@ -76,12 +77,12 @@ TaskTrajectoryDressUpParameter::~TaskTrajectoryDressUpParameter() void TaskTrajectoryDressUpParameter::writeValues() { - pcObject->Speed.setValue ( ui->doubleSpinBoxSpeed->value()*1000.0); - pcObject->Acceleration.setValue ( ui->doubleSpinBoxAccel->value()*1000.0); - pcObject->UseSpeed.setValue ( ui->checkBoxUseSpeed ->isChecked() ); - pcObject->UseAcceleration.setValue( ui->checkBoxUseAccel ->isChecked() ); - pcObject->ContType.setValue ( ui->comboBoxCont ->currentIndex()); - pcObject->AddType.setValue ( ui->comboBoxOrientation->currentIndex()); + pcObject->Speed.setValue(ui->doubleSpinBoxSpeed->value() * 1000.0); + pcObject->Acceleration.setValue(ui->doubleSpinBoxAccel->value() * 1000.0); + pcObject->UseSpeed.setValue(ui->checkBoxUseSpeed->isChecked()); + pcObject->UseAcceleration.setValue(ui->checkBoxUseAccel->isChecked()); + pcObject->ContType.setValue(ui->comboBoxCont->currentIndex()); + pcObject->AddType.setValue(ui->comboBoxOrientation->currentIndex()); pcObject->PosAdd.setValue(PosAdd); } @@ -94,22 +95,21 @@ void TaskTrajectoryDressUpParameter::createPlacementDlg() PosAdd = plc.getPlacement(); viewPlacement(); } - } void TaskTrajectoryDressUpParameter::viewPlacement() { - double A,B,C; + double A, B, C; Base::Vector3d pos = PosAdd.getPosition(); - PosAdd.getRotation().getYawPitchRoll(A,B,C); + PosAdd.getRotation().getYawPitchRoll(A, B, C); QString val = QString::fromLatin1("(%1,%2,%3),(%4,%5,%6)\n") - .arg(pos.x,0,'g',6) - .arg(pos.y,0,'g',6) - .arg(pos.z,0,'g',6) - .arg(A,0,'g',6) - .arg(B,0,'g',6) - .arg(C,0,'g',6); + .arg(pos.x, 0, 'g', 6) + .arg(pos.y, 0, 'g', 6) + .arg(pos.z, 0, 'g', 6) + .arg(A, 0, 'g', 6) + .arg(B, 0, 'g', 6) + .arg(C, 0, 'g', 6); ui->lineEditPlacement->setText(val); } diff --git a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.h b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.h index e208d508a6..5a857b75be 100644 --- a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.h +++ b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.h @@ -27,26 +27,27 @@ #include -class Ui_TaskTrajectoryDressUpParameter; - -namespace RobotGui { +namespace RobotGui +{ -class TaskTrajectoryDressUpParameter : public Gui::TaskView::TaskBox +class Ui_TaskTrajectoryDressUpParameter; +class TaskTrajectoryDressUpParameter: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskTrajectoryDressUpParameter(Robot::TrajectoryDressUpObject *obj,QWidget *parent = nullptr); + explicit TaskTrajectoryDressUpParameter(Robot::TrajectoryDressUpObject* obj, + QWidget* parent = nullptr); ~TaskTrajectoryDressUpParameter() override; /// this methode write the values from the Gui to the object, usually in accept() void writeValues(); - + private Q_SLOTS: /// edit the placement void createPlacementDlg(); - + protected: Base::Placement PosAdd; @@ -55,9 +56,9 @@ protected: private: QWidget* proxy; Ui_TaskTrajectoryDressUpParameter* ui; - Robot::TrajectoryDressUpObject *pcObject; + Robot::TrajectoryDressUpObject* pcObject; }; -} //namespace PartDesignGui +} // namespace RobotGui -#endif // GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui index 3d13d3fb3e..ec2be73fe0 100644 --- a/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui +++ b/src/Mod/Robot/Gui/TaskTrajectoryDressUpParameter.ui @@ -1,6 +1,6 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectoryDressUpParameter diff --git a/src/Mod/Robot/Gui/TaskWatcher.cpp b/src/Mod/Robot/Gui/TaskWatcher.cpp index 818cdd81a3..31df471ac3 100644 --- a/src/Mod/Robot/Gui/TaskWatcher.cpp +++ b/src/Mod/Robot/Gui/TaskWatcher.cpp @@ -35,27 +35,24 @@ using namespace RobotGui; TaskWatcherRobot::TaskWatcherRobot() : Gui::TaskView::TaskWatcher("SELECT Robot::RobotObject COUNT 1") { - rob = new TaskRobot6Axis(nullptr); - ctr = new TaskRobotControl(nullptr); + rob = new TaskRobot6Axis(nullptr); + ctr = new TaskRobotControl(nullptr); Content.push_back(rob); Content.push_back(ctr); - } //==== calls from the TaskView =============================================================== bool TaskWatcherRobot::shouldShow() { - if(match()){ - rob->setRobot((Robot::RobotObject *)Result[0][0].getObject()); - ctr->setRobot((Robot::RobotObject *)Result[0][0].getObject()); + if (match()) { + rob->setRobot((Robot::RobotObject*)Result[0][0].getObject()); + ctr->setRobot((Robot::RobotObject*)Result[0][0].getObject()); return true; } return false; } - - #include "moc_TaskWatcher.cpp" diff --git a/src/Mod/Robot/Gui/TaskWatcher.h b/src/Mod/Robot/Gui/TaskWatcher.h index d94c003db3..d9f5d5b866 100644 --- a/src/Mod/Robot/Gui/TaskWatcher.h +++ b/src/Mod/Robot/Gui/TaskWatcher.h @@ -29,27 +29,28 @@ #include "TaskRobotControl.h" -namespace RobotGui { +namespace RobotGui +{ class TaskContent; /// Father class of watcher classes -class RobotGuiExport TaskWatcherRobot : public Gui::TaskView::TaskWatcher +class RobotGuiExport TaskWatcherRobot: public Gui::TaskView::TaskWatcher { Q_OBJECT public: TaskWatcherRobot(); - /// is called when the document or the selection changes. + /// is called when the document or the selection changes. bool shouldShow() override; protected: - TaskRobot6Axis *rob; - TaskRobotControl *ctr ; + TaskRobot6Axis* rob; + TaskRobotControl* ctr; }; -} //namespace RobotGui +} // namespace RobotGui -#endif // ROBOTGUI_TASKWATCHER_H +#endif // ROBOTGUI_TASKWATCHER_H diff --git a/src/Mod/Robot/Gui/TrajectorySimulate.cpp b/src/Mod/Robot/Gui/TrajectorySimulate.cpp index 04ec504b3c..378f027279 100644 --- a/src/Mod/Robot/Gui/TrajectorySimulate.cpp +++ b/src/Mod/Robot/Gui/TrajectorySimulate.cpp @@ -22,23 +22,25 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include #include #include -#include "ui_TrajectorySimulate.h" #include "TrajectorySimulate.h" +#include "ui_TrajectorySimulate.h" using namespace RobotGui; using namespace Gui; -TrajectorySimulate::TrajectorySimulate(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject,QWidget *parent) - : QDialog( parent) - , sim(pcTrajectoryObject->Trajectory.getValue(),pcRobotObject->getRobot()) +TrajectorySimulate::TrajectorySimulate(Robot::RobotObject* pcRobotObject, + Robot::TrajectoryObject* pcTrajectoryObject, + QWidget* parent) + : QDialog(parent) + , sim(pcTrajectoryObject->Trajectory.getValue(), pcRobotObject->getRobot()) , Run(false) , block(false) , timePos(0.0) @@ -57,25 +59,49 @@ TrajectorySimulate::TrajectorySimulate(Robot::RobotObject *pcRobotObject,Robot:: duration = trac.getDuration(); ui->timeSpinBox->setMaximum(duration); - for(unsigned int i=0;itrajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("UNDEF")));break; - case Robot::Waypoint::CIRC: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("CIRC")));break; - case Robot::Waypoint::PTP: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("PTP")));break; - case Robot::Waypoint::LINE: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("LIN")));break; - default: ui->trajectoryTable->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("UNDEF")));break; + switch (pt.Type) { + case Robot::Waypoint::UNDEF: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("UNDEF"))); + break; + case Robot::Waypoint::CIRC: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("CIRC"))); + break; + case Robot::Waypoint::PTP: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("PTP"))); + break; + case Robot::Waypoint::LINE: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("LIN"))); + break; + default: + ui->trajectoryTable->setItem(i, + 0, + new QTableWidgetItem(QString::fromLatin1("UNDEF"))); + break; } - ui->trajectoryTable->setItem(i, 1, new QTableWidgetItem(QString::fromUtf8(pt.Name.c_str()))); - if(pt.Cont) + ui->trajectoryTable->setItem(i, + 1, + new QTableWidgetItem(QString::fromUtf8(pt.Name.c_str()))); + if (pt.Cont) { ui->trajectoryTable->setItem(i, 2, new QTableWidgetItem(QString::fromLatin1("|"))); - else + } + else { ui->trajectoryTable->setItem(i, 2, new QTableWidgetItem(QString::fromLatin1("-"))); + } ui->trajectoryTable->setItem(i, 3, new QTableWidgetItem(QString::number(pt.Velocity))); ui->trajectoryTable->setItem(i, 4, new QTableWidgetItem(QString::number(pt.Acceleration))); - } + // clang-format off QObject::connect(ui->ButtonStepStart, &QPushButton::clicked, this, &TrajectorySimulate::start); QObject::connect(ui->ButtonStepStop, &QPushButton::clicked, this, &TrajectorySimulate::stop); QObject::connect(ui->ButtonStepRun, &QPushButton::clicked, this, &TrajectorySimulate::run); @@ -91,9 +117,11 @@ TrajectorySimulate::TrajectorySimulate(Robot::RobotObject *pcRobotObject,Robot:: this, qOverload(&TrajectorySimulate::valueChanged)); QObject::connect(ui->timeSlider, qOverload(&QSlider::valueChanged), this, qOverload(&TrajectorySimulate::valueChanged)); + // clang-format on // get the view provider - ViewProv = static_cast(Gui::Application::Instance->activeDocument()->getViewProvider(pcRobotObject) ); + ViewProv = static_cast( + Gui::Application::Instance->activeDocument()->getViewProvider(pcRobotObject)); setTo(); } @@ -103,16 +131,21 @@ TrajectorySimulate::~TrajectorySimulate() = default; void TrajectorySimulate::setTo() { sim.setToTime(timePos); - ViewProv->setAxisTo(sim.Axis[0],sim.Axis[1],sim.Axis[2],sim.Axis[3],sim.Axis[4],sim.Axis[5],sim.Rob.getTcp()); + ViewProv->setAxisTo(sim.Axis[0], + sim.Axis[1], + sim.Axis[2], + sim.Axis[3], + sim.Axis[4], + sim.Axis[5], + sim.Rob.getTcp()); } void TrajectorySimulate::start() { timePos = 0.0f; ui->timeSpinBox->setValue(timePos); - ui->timeSlider->setValue(int((timePos/duration)*1000)); + ui->timeSlider->setValue(int((timePos / duration) * 1000)); setTo(); - } void TrajectorySimulate::stop() { @@ -125,51 +158,50 @@ void TrajectorySimulate::run() Run = true; } void TrajectorySimulate::back() -{ -} +{} void TrajectorySimulate::forward() -{ -} +{} void TrajectorySimulate::end() { timePos = duration; ui->timeSpinBox->setValue(timePos); - ui->timeSlider->setValue(int((timePos/duration)*1000)); + ui->timeSlider->setValue(int((timePos / duration) * 1000)); setTo(); } void TrajectorySimulate::timerDone() { - if(timePos < duration){ + if (timePos < duration) { timePos += .1f; ui->timeSpinBox->setValue(timePos); - ui->timeSlider->setValue(int((timePos/duration)*1000)); + ui->timeSlider->setValue(int((timePos / duration) * 1000)); setTo(); timer->start(); - }else{ + } + else { timer->stop(); Run = false; } } -void TrajectorySimulate::valueChanged ( int value ) +void TrajectorySimulate::valueChanged(int value) { - if(!block){ - timePos = duration*(value/1000.0); - block=true; + if (!block) { + timePos = duration * (value / 1000.0); + block = true; ui->timeSpinBox->setValue(timePos); - block=false; + block = false; setTo(); } } -void TrajectorySimulate::valueChanged ( double value ) +void TrajectorySimulate::valueChanged(double value) { - if(!block){ + if (!block) { timePos = value; - block=true; - ui->timeSlider->setValue(int((timePos/duration)*1000)); - block=false; + block = true; + ui->timeSlider->setValue(int((timePos / duration) * 1000)); + block = false; setTo(); } } diff --git a/src/Mod/Robot/Gui/TrajectorySimulate.h b/src/Mod/Robot/Gui/TrajectorySimulate.h index 8317560113..866c4d2f04 100644 --- a/src/Mod/Robot/Gui/TrajectorySimulate.h +++ b/src/Mod/Robot/Gui/TrajectorySimulate.h @@ -23,8 +23,8 @@ #ifndef GUI_TASKVIEW_TrajectorySimulate_H #define GUI_TASKVIEW_TrajectorySimulate_H -#include #include +#include #include #include @@ -33,16 +33,19 @@ #include "ViewProviderRobotObject.h" -namespace RobotGui { +namespace RobotGui +{ class Ui_DlgTrajectorySimulate; -class TrajectorySimulate : public QDialog +class TrajectorySimulate: public QDialog { Q_OBJECT public: - TrajectorySimulate(Robot::RobotObject *pcRobotObject,Robot::TrajectoryObject *pcTrajectoryObject,QWidget *parent = nullptr); + TrajectorySimulate(Robot::RobotObject* pcRobotObject, + Robot::TrajectoryObject* pcTrajectoryObject, + QWidget* parent = nullptr); ~TrajectorySimulate() override; private Q_SLOTS: @@ -54,17 +57,17 @@ private Q_SLOTS: void end(); void timerDone(); - void valueChanged ( int value ); - void valueChanged ( double d ); + void valueChanged(int value); + void valueChanged(double d); protected: void setTo(); - QTimer *timer; + QTimer* timer; Robot::Simulation sim; - ViewProviderRobotObject *ViewProv; + ViewProviderRobotObject* ViewProv; bool Run; bool block; @@ -76,6 +79,6 @@ private: std::unique_ptr ui; }; -} //namespace PartDesignGui +} // namespace RobotGui -#endif // GUI_TASKVIEW_TrajectorySimulate_H +#endif // GUI_TASKVIEW_TrajectorySimulate_H diff --git a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp index 359b7b2b58..19bc267355 100644 --- a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp +++ b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.cpp @@ -35,7 +35,8 @@ PROPERTY_SOURCE(RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderTra bool ViewProviderEdge2TracObject::doubleClicked() { - Gui::TaskView::TaskDialog* dlg = new TaskDlgEdge2Trac(static_cast(getObject())); + Gui::TaskView::TaskDialog* dlg = + new TaskDlgEdge2Trac(static_cast(getObject())); Gui::Control().showDialog(dlg); return true; } @@ -43,12 +44,11 @@ bool ViewProviderEdge2TracObject::doubleClicked() bool ViewProviderEdge2TracObject::setEdit(int) { - Gui::TaskView::TaskDialog* dlg = new TaskDlgEdge2Trac(static_cast(getObject())); + Gui::TaskView::TaskDialog* dlg = + new TaskDlgEdge2Trac(static_cast(getObject())); Gui::Control().showDialog(dlg); return true; } void ViewProviderEdge2TracObject::unsetEdit(int) -{ - -} +{} diff --git a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h index a2d60dd5fa..58251b1527 100644 --- a/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h +++ b/src/Mod/Robot/Gui/ViewProviderEdge2TracObject.h @@ -29,19 +29,19 @@ namespace RobotGui { -class RobotGuiExport ViewProviderEdge2TracObject : public ViewProviderTrajectory +class RobotGuiExport ViewProviderEdge2TracObject: public ViewProviderTrajectory { PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderEdge2TracObject); public: - bool doubleClicked() override; -protected: - bool setEdit(int ModNum) override; - void unsetEdit(int ModNum) override; + bool doubleClicked() override; +protected: + bool setEdit(int ModNum) override; + void unsetEdit(int ModNum) override; }; -} //namespace RobotGui +} // namespace RobotGui -#endif // ROBOT_VIEWPROVIDEREDGE2TRACOBJECT_H +#endif // ROBOT_VIEWPROVIDEREDGE2TRACOBJECT_H diff --git a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp index 900e701f0a..1690738ba2 100644 --- a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp +++ b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp @@ -22,23 +22,23 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include #endif #include #include #include -#include #include +#include #include "ViewProviderRobotObject.h" @@ -50,17 +50,17 @@ PROPERTY_SOURCE(RobotGui::ViewProviderRobotObject, Gui::ViewProviderGeometryObje ViewProviderRobotObject::ViewProviderRobotObject() { - ADD_PROPERTY(Manipulator,(0)); + ADD_PROPERTY(Manipulator, (0)); pcRobotRoot = new Gui::SoFCSelection(); pcRobotRoot->highlightMode = Gui::SoFCSelection::OFF; - //pcRobotRoot->selectionMode = Gui::SoFCSelection::SEL_OFF; - //pcRobotRoot->style = Gui::SoFCSelection::BOX; + // pcRobotRoot->selectionMode = Gui::SoFCSelection::SEL_OFF; + // pcRobotRoot->style = Gui::SoFCSelection::BOX; pcRobotRoot->ref(); pcSimpleRoot = new Gui::SoFCSelection(); pcSimpleRoot->highlightMode = Gui::SoFCSelection::OFF; - //pcSimpleRoot->selectionMode = Gui::SoFCSelection::SEL_OFF; + // pcSimpleRoot->selectionMode = Gui::SoFCSelection::SEL_OFF; pcSimpleRoot->ref(); pcOffRoot = new SoGroup(); @@ -86,17 +86,19 @@ void ViewProviderRobotObject::setDragger() { assert(!pcDragger); pcDragger = new SoJackDragger(); - pcDragger->addMotionCallback(sDraggerMotionCallback,this); + pcDragger->addMotionCallback(sDraggerMotionCallback, this); pcTcpRoot->addChild(pcDragger); // set the actual TCP position Robot::RobotObject* robObj = static_cast(pcObject); Base::Placement loc = robObj->Tcp.getValue(); - SbMatrix M; - M.setTransform(SbVec3f(loc.getPosition().x,loc.getPosition().y,loc.getPosition().z), - SbRotation(loc.getRotation()[0],loc.getRotation()[1],loc.getRotation()[2],loc.getRotation()[3]), - SbVec3f(150,150,150) - ); + SbMatrix M; + M.setTransform(SbVec3f(loc.getPosition().x, loc.getPosition().y, loc.getPosition().z), + SbRotation(loc.getRotation()[0], + loc.getRotation()[1], + loc.getRotation()[2], + loc.getRotation()[3]), + SbVec3f(150, 150, 150)); pcDragger->setMotionMatrix(M); } @@ -107,7 +109,7 @@ void ViewProviderRobotObject::resetDragger() pcDragger = nullptr; } -void ViewProviderRobotObject::attach(App::DocumentObject *pcObj) +void ViewProviderRobotObject::attach(App::DocumentObject* pcObj) { ViewProviderGeometryObject::attach(pcObj); @@ -129,13 +131,16 @@ void ViewProviderRobotObject::attach(App::DocumentObject *pcObj) void ViewProviderRobotObject::setDisplayMode(const char* ModeName) { - if ( strcmp("VRML",ModeName)==0 ) + if (strcmp("VRML", ModeName) == 0) { setDisplayMaskMode("VRML"); - if ( strcmp("Simple",ModeName)==0 ) + } + if (strcmp("Simple", ModeName) == 0) { setDisplayMaskMode("Simple"); - if ( strcmp("Off",ModeName)==0 ) + } + if (strcmp("Off", ModeName) == 0) { setDisplayMaskMode("Off"); - ViewProviderGeometryObject::setDisplayMode( ModeName ); + } + ViewProviderGeometryObject::setDisplayMode(ModeName); } std::vector ViewProviderRobotObject::getDisplayModes() const @@ -151,12 +156,14 @@ void ViewProviderRobotObject::onChanged(const App::Property* prop) { if (prop == &Manipulator) { if (Manipulator.getValue()) { - if (!this->pcDragger) + if (!this->pcDragger) { this->setDragger(); + } } else { - if (this->pcDragger) + if (this->pcDragger) { this->resetDragger(); + } } } else { @@ -176,198 +183,269 @@ void ViewProviderRobotObject::updateData(const App::Property* prop) Gui::coinRemoveAllChildren(pcRobotRoot); if (!fn.isEmpty() && file.open(QFile::ReadOnly)) { QByteArray buffer = file.readAll(); - in.setBuffer((void *)buffer.constData(), buffer.length()); - SoSeparator * node = SoDB::readAll(&in); - if (node) pcRobotRoot->addChild(node); + in.setBuffer((void*)buffer.constData(), buffer.length()); + SoSeparator* node = SoDB::readAll(&in); + if (node) { + pcRobotRoot->addChild(node); + } pcRobotRoot->addChild(pcTcpRoot); } - // search for the connection points +++++++++++++++++++++++++++++++++++++++++++++++++ - Axis1Node = Axis2Node = Axis3Node = Axis4Node = Axis5Node = Axis6Node = nullptr; - SoSearchAction searchAction; - SoPath * path; + // search for the connection points +++++++++++++++++++++++++++++++++++++++++++++++++ + Axis1Node = Axis2Node = Axis3Node = Axis4Node = Axis5Node = Axis6Node = nullptr; + SoSearchAction searchAction; + SoPath* path; - // Axis 1 - searchAction.setName("FREECAD_AXIS1"); - searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(false); - searchAction.apply(pcRobotRoot); - path = searchAction.getPath(); - if(path){ - SoNode* node = path->getTail(); - if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) - Axis1Node = static_cast(node); - } - // Axis 2 - searchAction.setName("FREECAD_AXIS2"); - searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(false); - searchAction.apply(pcRobotRoot); - path = searchAction.getPath(); - if(path){ - SoNode* node = path->getTail(); - if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) - Axis2Node = static_cast(node); - } - // Axis 3 - searchAction.setName("FREECAD_AXIS3"); - searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(false); - searchAction.apply(pcRobotRoot); - path = searchAction.getPath(); - if(path){ - SoNode* node = path->getTail(); - if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) - Axis3Node = static_cast(node); - } - // Axis 4 - searchAction.setName("FREECAD_AXIS4"); - searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(false); - searchAction.apply(pcRobotRoot); - path = searchAction.getPath(); - if(path){ - SoNode* node = path->getTail(); - if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) - Axis4Node = static_cast(node); - } - // Axis 5 - searchAction.setName("FREECAD_AXIS5"); - searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(false); - searchAction.apply(pcRobotRoot); - path = searchAction.getPath(); - if(path){ - SoNode* node = path->getTail(); - if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) - Axis5Node = static_cast(node); - } - // Axis 6 - searchAction.setName("FREECAD_AXIS6"); - searchAction.setInterest(SoSearchAction::FIRST); - searchAction.setSearchingAll(false); - searchAction.apply(pcRobotRoot); - path = searchAction.getPath(); - if(path){ - SoNode* node = path->getTail(); - if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) - Axis6Node = static_cast(node); - } - if(Axis1Node) - Axis1Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis1.getValue()*(M_PI/180)); - if(Axis2Node) - Axis2Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis2.getValue()*(M_PI/180)); - if(Axis3Node) - Axis3Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis3.getValue()*(M_PI/180)); - if(Axis4Node) - Axis4Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis4.getValue()*(M_PI/180)); - if(Axis5Node) - Axis5Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis5.getValue()*(M_PI/180)); - if(Axis6Node) - Axis6Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis6.getValue()*(M_PI/180)); - }else if (prop == &robObj->Axis1) { - if(Axis1Node){ - Axis1Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis1.getValue()*(M_PI/180)); - if(toolShape) - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + // Axis 1 + searchAction.setName("FREECAD_AXIS1"); + searchAction.setInterest(SoSearchAction::FIRST); + searchAction.setSearchingAll(false); + searchAction.apply(pcRobotRoot); + path = searchAction.getPath(); + if (path) { + SoNode* node = path->getTail(); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) { + Axis1Node = static_cast(node); + } } - }else if (prop == &robObj->Axis2) { - if(Axis2Node){ - Axis2Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis2.getValue()*(M_PI/180)); - if(toolShape) - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + // Axis 2 + searchAction.setName("FREECAD_AXIS2"); + searchAction.setInterest(SoSearchAction::FIRST); + searchAction.setSearchingAll(false); + searchAction.apply(pcRobotRoot); + path = searchAction.getPath(); + if (path) { + SoNode* node = path->getTail(); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) { + Axis2Node = static_cast(node); + } } - }else if (prop == &robObj->Axis3) { - if(Axis3Node){ - Axis3Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis3.getValue()*(M_PI/180)); - if(toolShape) - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + // Axis 3 + searchAction.setName("FREECAD_AXIS3"); + searchAction.setInterest(SoSearchAction::FIRST); + searchAction.setSearchingAll(false); + searchAction.apply(pcRobotRoot); + path = searchAction.getPath(); + if (path) { + SoNode* node = path->getTail(); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) { + Axis3Node = static_cast(node); + } } - }else if (prop == &robObj->Axis4) { - if(Axis4Node){ - Axis4Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis4.getValue()*(M_PI/180)); - if(toolShape) - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + // Axis 4 + searchAction.setName("FREECAD_AXIS4"); + searchAction.setInterest(SoSearchAction::FIRST); + searchAction.setSearchingAll(false); + searchAction.apply(pcRobotRoot); + path = searchAction.getPath(); + if (path) { + SoNode* node = path->getTail(); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) { + Axis4Node = static_cast(node); + } } - }else if (prop == &robObj->Axis5) { - if(Axis5Node){ - Axis5Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis5.getValue()*(M_PI/180)); - if(toolShape) - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + // Axis 5 + searchAction.setName("FREECAD_AXIS5"); + searchAction.setInterest(SoSearchAction::FIRST); + searchAction.setSearchingAll(false); + searchAction.apply(pcRobotRoot); + path = searchAction.getPath(); + if (path) { + SoNode* node = path->getTail(); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) { + Axis5Node = static_cast(node); + } } - }else if (prop == &robObj->Axis6) { - if(Axis6Node){ - Axis6Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),robObj->Axis6.getValue()*(M_PI/180)); - if(toolShape) - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + // Axis 6 + searchAction.setName("FREECAD_AXIS6"); + searchAction.setInterest(SoSearchAction::FIRST); + searchAction.setSearchingAll(false); + searchAction.apply(pcRobotRoot); + path = searchAction.getPath(); + if (path) { + SoNode* node = path->getTail(); + if (node && node->getTypeId() == SoVRMLTransform::getClassTypeId()) { + Axis6Node = static_cast(node); + } } - }else if (prop == &robObj->Tcp) { + if (Axis1Node) { + Axis1Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis1.getValue() * (M_PI / 180)); + } + if (Axis2Node) { + Axis2Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis2.getValue() * (M_PI / 180)); + } + if (Axis3Node) { + Axis3Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis3.getValue() * (M_PI / 180)); + } + if (Axis4Node) { + Axis4Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis4.getValue() * (M_PI / 180)); + } + if (Axis5Node) { + Axis5Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis5.getValue() * (M_PI / 180)); + } + if (Axis6Node) { + Axis6Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis6.getValue() * (M_PI / 180)); + } + } + else if (prop == &robObj->Axis1) { + if (Axis1Node) { + Axis1Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis1.getValue() * (M_PI / 180)); + if (toolShape) { + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + } + } + else if (prop == &robObj->Axis2) { + if (Axis2Node) { + Axis2Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis2.getValue() * (M_PI / 180)); + if (toolShape) { + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + } + } + else if (prop == &robObj->Axis3) { + if (Axis3Node) { + Axis3Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis3.getValue() * (M_PI / 180)); + if (toolShape) { + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + } + } + else if (prop == &robObj->Axis4) { + if (Axis4Node) { + Axis4Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis4.getValue() * (M_PI / 180)); + if (toolShape) { + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + } + } + else if (prop == &robObj->Axis5) { + if (Axis5Node) { + Axis5Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis5.getValue() * (M_PI / 180)); + if (toolShape) { + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + } + } + else if (prop == &robObj->Axis6) { + if (Axis6Node) { + Axis6Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), + robObj->Axis6.getValue() * (M_PI / 180)); + if (toolShape) { + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + } + } + else if (prop == &robObj->Tcp) { Base::Placement loc = robObj->Tcp.getValue(); - SbMatrix M; - M.setTransform(SbVec3f(loc.getPosition().x,loc.getPosition().y,loc.getPosition().z), - SbRotation(loc.getRotation()[0],loc.getRotation()[1],loc.getRotation()[2],loc.getRotation()[3]), - SbVec3f(150,150,150) - ); - if(pcDragger) + SbMatrix M; + M.setTransform(SbVec3f(loc.getPosition().x, loc.getPosition().y, loc.getPosition().z), + SbRotation(loc.getRotation()[0], + loc.getRotation()[1], + loc.getRotation()[2], + loc.getRotation()[3]), + SbVec3f(150, 150, 150)); + if (pcDragger) { pcDragger->setMotionMatrix(M); - if(toolShape) - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); - //pcTcpTransform->translation = SbVec3f(loc.getPosition().x,loc.getPosition().y,loc.getPosition().z); - //pcTcpTransform->rotation = SbRotation(loc.getRotation()[0],loc.getRotation()[1],loc.getRotation()[2],loc.getRotation()[3]); - }else if (prop == &robObj->ToolShape) { + } + if (toolShape) { + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + // pcTcpTransform->translation = + // SbVec3f(loc.getPosition().x,loc.getPosition().y,loc.getPosition().z); + // pcTcpTransform->rotation = + // SbRotation(loc.getRotation()[0],loc.getRotation()[1],loc.getRotation()[2],loc.getRotation()[3]); + } + else if (prop == &robObj->ToolShape) { App::DocumentObject* o = robObj->ToolShape.getValue(); - if(o && (o->isDerivedFrom(Part::Feature::getClassTypeId()) || o->isDerivedFrom(App::VRMLObject::getClassTypeId())) ){ - //Part::Feature *p = dynamic_cast(o); + if (o + && (o->isDerivedFrom(Part::Feature::getClassTypeId()) + || o->isDerivedFrom(App::VRMLObject::getClassTypeId()))) { + // Part::Feature *p = dynamic_cast(o); toolShape = Gui::Application::Instance->getViewProvider(o); - toolShape->setTransformation((robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); - }else + toolShape->setTransformation( + (robObj->Tcp.getValue() * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } + else { toolShape = nullptr; - } - + } + } } -void ViewProviderRobotObject::setAxisTo(float A1,float A2,float A3,float A4,float A5,float A6,const Base::Placement &Tcp) +void ViewProviderRobotObject::setAxisTo(float A1, + float A2, + float A3, + float A4, + float A5, + float A6, + const Base::Placement& Tcp) { Robot::RobotObject* robObj = static_cast(pcObject); - if(Axis1Node) - // FIXME Ugly hack for the wrong transformation of the Kuka 500 robot VRML the minus sign on Axis 1 - Axis1Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),A1*(M_PI/180)); - if(Axis2Node) - Axis2Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),A2*(M_PI/180)); - if(Axis3Node) - Axis3Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),A3*(M_PI/180)); - if(Axis4Node) - Axis4Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),A4*(M_PI/180)); - if(Axis5Node) - Axis5Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),A5*(M_PI/180)); - if(Axis6Node) - Axis6Node->rotation.setValue(SbVec3f(0.0,1.0,0.0),A6*(M_PI/180)); + if (Axis1Node) { + // FIXME Ugly hack for the wrong transformation of the Kuka 500 robot VRML the minus sign on + // Axis 1 + Axis1Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), A1 * (M_PI / 180)); + } + if (Axis2Node) { + Axis2Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), A2 * (M_PI / 180)); + } + if (Axis3Node) { + Axis3Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), A3 * (M_PI / 180)); + } + if (Axis4Node) { + Axis4Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), A4 * (M_PI / 180)); + } + if (Axis5Node) { + Axis5Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), A5 * (M_PI / 180)); + } + if (Axis6Node) { + Axis6Node->rotation.setValue(SbVec3f(0.0, 1.0, 0.0), A6 * (M_PI / 180)); + } // update tool position - if(toolShape) + if (toolShape) { toolShape->setTransformation((Tcp * (robObj->ToolBase.getValue().inverse())).toMatrix()); + } } -void ViewProviderRobotObject::sDraggerMotionCallback(void *data, SoDragger *dragger) +void ViewProviderRobotObject::sDraggerMotionCallback(void* data, SoDragger* dragger) { static_cast(data)->DraggerMotionCallback(dragger); } -void ViewProviderRobotObject::DraggerMotionCallback(SoDragger *dragger) +void ViewProviderRobotObject::DraggerMotionCallback(SoDragger* dragger) { float q0, q1, q2, q3; Robot::RobotObject* robObj = static_cast(pcObject); Base::Placement Tcp = robObj->Tcp.getValue(); - const SbMatrix & M = dragger->getMotionMatrix (); - SbVec3f translation; + const SbMatrix& M = dragger->getMotionMatrix(); + SbVec3f translation; SbRotation rotation; - SbVec3f scaleFactor; + SbVec3f scaleFactor; SbRotation scaleOrientation; - SbVec3f center(Tcp.getPosition().x,Tcp.getPosition().y,Tcp.getPosition().z); + SbVec3f center(Tcp.getPosition().x, Tcp.getPosition().y, Tcp.getPosition().z); M.getTransform(translation, rotation, scaleFactor, scaleOrientation); rotation.getValue(q0, q1, q2, q3); - //Base::Console().Message("M %f %f %f\n", M[3][0], M[3][1], M[3][2]); + // Base::Console().Message("M %f %f %f\n", M[3][0], M[3][1], M[3][2]); Base::Rotation rot(q0, q1, q2, q3); - Base::Vector3d pos(translation[0],translation[1],translation[2]); - robObj->Tcp.setValue(Base::Placement(pos,rot)); + Base::Vector3d pos(translation[0], translation[1], translation[2]); + robObj->Tcp.setValue(Base::Placement(pos, rot)); } diff --git a/src/Mod/Robot/Gui/ViewProviderRobotObject.h b/src/Mod/Robot/Gui/ViewProviderRobotObject.h index fc8e294be9..3779186d29 100644 --- a/src/Mod/Robot/Gui/ViewProviderRobotObject.h +++ b/src/Mod/Robot/Gui/ViewProviderRobotObject.h @@ -37,7 +37,7 @@ class SoTrackballDragger; namespace RobotGui { -class RobotGuiExport ViewProviderRobotObject : public Gui::ViewProviderGeometryObject +class RobotGuiExport ViewProviderRobotObject: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderRobotObject); @@ -50,7 +50,7 @@ public: App::PropertyBool Manipulator; - void attach(App::DocumentObject *pcObject) override; + void attach(App::DocumentObject* pcObject) override; void setDisplayMode(const char* ModeName) override; std::vector getDisplayModes() const override; void updateData(const App::Property*) override; @@ -58,38 +58,44 @@ public: void onChanged(const App::Property* prop) override; /// for simulation without changing the document: - void setAxisTo(float A1,float A2,float A3,float A4,float A5,float A6,const Base::Placement &Tcp); + void setAxisTo(float A1, + float A2, + float A3, + float A4, + float A5, + float A6, + const Base::Placement& Tcp); protected: - static void sDraggerMotionCallback(void *data, SoDragger *dragger); - void DraggerMotionCallback(SoDragger *dragger); + static void sDraggerMotionCallback(void* data, SoDragger* dragger); + void DraggerMotionCallback(SoDragger* dragger); void setDragger(); void resetDragger(); - Gui::SoFCSelection * pcRobotRoot; - Gui::SoFCSelection * pcSimpleRoot; - SoGroup * pcOffRoot; + Gui::SoFCSelection* pcRobotRoot; + Gui::SoFCSelection* pcSimpleRoot; + SoGroup* pcOffRoot; - SoGroup * pcTcpRoot; - //SoTransform * pcTcpTransform; + SoGroup* pcTcpRoot; + // SoTransform * pcTcpTransform; - //SoTrackballDragger * pcDragger; - SoJackDragger * pcDragger{nullptr}; + // SoTrackballDragger * pcDragger; + SoJackDragger* pcDragger {nullptr}; // view provider of the toolshape if set - Gui::ViewProvider *toolShape{nullptr}; + Gui::ViewProvider* toolShape {nullptr}; - // Pointers to the robot axis nodes in the VRML model - SoVRMLTransform *Axis1Node; - SoVRMLTransform *Axis2Node; - SoVRMLTransform *Axis3Node; - SoVRMLTransform *Axis4Node; - SoVRMLTransform *Axis5Node; - SoVRMLTransform *Axis6Node; + // Pointers to the robot axis nodes in the VRML model + SoVRMLTransform* Axis1Node; + SoVRMLTransform* Axis2Node; + SoVRMLTransform* Axis3Node; + SoVRMLTransform* Axis4Node; + SoVRMLTransform* Axis5Node; + SoVRMLTransform* Axis6Node; }; -} //namespace RobotGui +} // namespace RobotGui -#endif // ROBOT_VIEWPROVIDERROBOTOBJECT_H +#endif // ROBOT_VIEWPROVIDERROBOTOBJECT_H diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp b/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp index b7843f62e1..3674a81e5a 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp +++ b/src/Mod/Robot/Gui/ViewProviderTrajectory.cpp @@ -22,16 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #include @@ -51,10 +51,10 @@ PROPERTY_SOURCE(RobotGui::ViewProviderTrajectory, Gui::ViewProviderGeometryObjec ViewProviderTrajectory::ViewProviderTrajectory() { - pcTrajectoryRoot = new Gui::SoFCSelection(); + pcTrajectoryRoot = new Gui::SoFCSelection(); pcTrajectoryRoot->highlightMode = Gui::SoFCSelection::OFF; pcTrajectoryRoot->selectionMode = Gui::SoFCSelection::SEL_OFF; - //pcRobotRoot->style = Gui::SoFCSelection::BOX; + // pcRobotRoot->style = Gui::SoFCSelection::BOX; pcTrajectoryRoot->ref(); pcCoords = new SoCoordinate3(); @@ -66,8 +66,6 @@ ViewProviderTrajectory::ViewProviderTrajectory() pcLines = new SoLineSet; pcLines->ref(); - - } ViewProviderTrajectory::~ViewProviderTrajectory() @@ -76,26 +74,29 @@ ViewProviderTrajectory::~ViewProviderTrajectory() pcCoords->unref(); pcDrawStyle->unref(); pcLines->unref(); - } -void ViewProviderTrajectory::attach(App::DocumentObject *pcObj) +void ViewProviderTrajectory::attach(App::DocumentObject* pcObj) { ViewProviderGeometryObject::attach(pcObj); // Draw trajectory lines SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.5f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.5f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcLines); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("CROSS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 5)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "CROSS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 5)); linesep->addChild(markcol); linesep->addChild(marker); @@ -105,14 +106,14 @@ void ViewProviderTrajectory::attach(App::DocumentObject *pcObj) pcTrajectoryRoot->objectName = pcObj->getNameInDocument(); pcTrajectoryRoot->documentName = pcObj->getDocument()->getName(); pcTrajectoryRoot->subElementName = "Main"; - } void ViewProviderTrajectory::setDisplayMode(const char* ModeName) { - if ( strcmp("Waypoints",ModeName)==0 ) + if (strcmp("Waypoints", ModeName) == 0) { setDisplayMaskMode("Waypoints"); - ViewProviderGeometryObject::setDisplayMode( ModeName ); + } + ViewProviderGeometryObject::setDisplayMode(ModeName); } std::vector ViewProviderTrajectory::getDisplayModes() const @@ -126,22 +127,20 @@ void ViewProviderTrajectory::updateData(const App::Property* prop) { Robot::TrajectoryObject* pcTracObj = static_cast(pcObject); if (prop == &pcTracObj->Trajectory) { - const Trajectory &trak = pcTracObj->Trajectory.getValue(); + const Trajectory& trak = pcTracObj->Trajectory.getValue(); pcCoords->point.deleteValues(0); pcCoords->point.setNum(trak.getSize()); - for(unsigned int i=0;ipoint.set1Value(i,pos.x,pos.y,pos.z); - + pcCoords->point.set1Value(i, pos.x, pos.y, pos.z); } pcLines->numVertices.set1Value(0, trak.getSize()); } else if (prop == &pcTracObj->Base) { Base::Placement loc = *(&pcTracObj->Base.getValue()); } - } void ViewProviderTrajectory::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) @@ -149,4 +148,3 @@ void ViewProviderTrajectory::setupContextMenu(QMenu* menu, QObject* receiver, co QAction* act = menu->addAction(QObject::tr("Modify"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); } - diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectory.h b/src/Mod/Robot/Gui/ViewProviderTrajectory.h index d7f903883f..480f5a5a67 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectory.h +++ b/src/Mod/Robot/Gui/ViewProviderTrajectory.h @@ -37,7 +37,7 @@ class SoLineSet; namespace RobotGui { -class RobotGuiExport ViewProviderTrajectory : public Gui::ViewProviderGeometryObject +class RobotGuiExport ViewProviderTrajectory: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderTrajectory); @@ -48,22 +48,20 @@ public: /// destructor. ~ViewProviderTrajectory() override; - void attach(App::DocumentObject *pcObject) override; + void attach(App::DocumentObject* pcObject) override; void setDisplayMode(const char* ModeName) override; std::vector getDisplayModes() const override; void updateData(const App::Property*) override; void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override; protected: + Gui::SoFCSelection* pcTrajectoryRoot; + SoCoordinate3* pcCoords; + SoDrawStyle* pcDrawStyle; + SoLineSet* pcLines; +}; - Gui::SoFCSelection * pcTrajectoryRoot; - SoCoordinate3 * pcCoords; - SoDrawStyle * pcDrawStyle; - SoLineSet * pcLines; - - }; - -} //namespace RobotGui +} // namespace RobotGui -#endif // ROBOT_VIEWPROVIDERROBOTOBJECT_H +#endif // ROBOT_VIEWPROVIDERROBOTOBJECT_H diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp index 6d041db056..ac0153578f 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.cpp @@ -23,8 +23,8 @@ #include "PreCompiled.h" #include -#include #include +#include #include "ViewProviderTrajectoryCompound.h" @@ -34,31 +34,30 @@ using namespace RobotGui; PROPERTY_SOURCE(RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectory) -//bool ViewProviderTrajectoryCompound::doubleClicked(void) +// bool ViewProviderTrajectoryCompound::doubleClicked(void) //{ -// Gui::TaskView::TaskDialog* dlg = new TaskDlgTrajectoryCompound(dynamic_cast(getObject())); -// Gui::Control().showDialog(dlg); -// return true; -//} +// Gui::TaskView::TaskDialog* dlg = new +// TaskDlgTrajectoryCompound(dynamic_cast(getObject())); +// Gui::Control().showDialog(dlg); +// return true; +// } bool ViewProviderTrajectoryCompound::setEdit(int) { - Gui::TaskView::TaskDialog* dlg = new TaskDlgTrajectoryCompound(dynamic_cast(getObject())); + Gui::TaskView::TaskDialog* dlg = + new TaskDlgTrajectoryCompound(dynamic_cast(getObject())); Gui::Control().showDialog(dlg); return true; - } void ViewProviderTrajectoryCompound::unsetEdit(int) { // when pressing ESC make sure to close the dialog Gui::Control().closeDialog(); - - } -std::vector ViewProviderTrajectoryCompound::claimChildren()const +std::vector ViewProviderTrajectoryCompound::claimChildren() const { - return static_cast(getObject())->Source.getValues(); + return static_cast(getObject())->Source.getValues(); } diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h index 504aa7621f..edd584a6c9 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryCompound.h @@ -34,16 +34,15 @@ class RobotGuiExport ViewProviderTrajectoryCompound: public ViewProviderTrajecto PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderTrajectoryCompound); public: - /// grouping handling + /// grouping handling std::vector claimChildren() const override; protected: bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; - }; -} //namespace RobotGui +} // namespace RobotGui -#endif // ROBOT_ViewProviderTrajectoryCompound_H +#endif // ROBOT_ViewProviderTrajectoryCompound_H diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp index 9d9f81000d..e753484b6a 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.cpp @@ -33,17 +33,19 @@ using namespace RobotGui; PROPERTY_SOURCE(RobotGui::ViewProviderTrajectoryDressUp, RobotGui::ViewProviderTrajectory) -//bool ViewProviderTrajectoryDressUp::doubleClicked(void) +// bool ViewProviderTrajectoryDressUp::doubleClicked(void) //{ -// Gui::TaskView::TaskDialog* dlg = new TaskDlgTrajectoryDressUp(dynamic_cast(getObject())); -// Gui::Control().showDialog(dlg); -// return true; -//} +// Gui::TaskView::TaskDialog* dlg = new +// TaskDlgTrajectoryDressUp(dynamic_cast(getObject())); +// Gui::Control().showDialog(dlg); +// return true; +// } // bool ViewProviderTrajectoryDressUp::setEdit(int) { - Gui::TaskView::TaskDialog* dlg = new TaskDlgTrajectoryDressUp(static_cast(getObject())); + Gui::TaskView::TaskDialog* dlg = + new TaskDlgTrajectoryDressUp(static_cast(getObject())); Gui::Control().showDialog(dlg); return true; } @@ -52,11 +54,9 @@ void ViewProviderTrajectoryDressUp::unsetEdit(int) { // when pressing ESC make sure to close the dialog Gui::Control().closeDialog(); - - } -std::vector ViewProviderTrajectoryDressUp::claimChildren()const +std::vector ViewProviderTrajectoryDressUp::claimChildren() const { std::vector temp; temp.push_back(static_cast(getObject())->Source.getValue()); diff --git a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h index 5b14899a7b..764b09102f 100644 --- a/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h +++ b/src/Mod/Robot/Gui/ViewProviderTrajectoryDressUp.h @@ -29,12 +29,12 @@ namespace RobotGui { -class RobotGuiExport ViewProviderTrajectoryDressUp : public ViewProviderTrajectory +class RobotGuiExport ViewProviderTrajectoryDressUp: public ViewProviderTrajectory { PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderTrajectoryDressUp); public: - //virtual bool doubleClicked(void); + // virtual bool doubleClicked(void); /// grouping handling std::vector claimChildren() const override; @@ -42,10 +42,9 @@ public: protected: bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; - }; -} //namespace RobotGui +} // namespace RobotGui -#endif // ROBOT_ViewProviderTrajectoryDressUp_H +#endif // ROBOT_ViewProviderTrajectoryDressUp_H diff --git a/src/Mod/Robot/Gui/Workbench.cpp b/src/Mod/Robot/Gui/Workbench.cpp index fa9aeed7aa..b28317a55d 100644 --- a/src/Mod/Robot/Gui/Workbench.cpp +++ b/src/Mod/Robot/Gui/Workbench.cpp @@ -22,28 +22,28 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include #include #include #include -#include -#include #include #include +#include +#include -#include "Workbench.h" #include "TaskWatcher.h" +#include "Workbench.h" using namespace RobotGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Robot"); qApp->translate("Workbench", "Insert Robots"); qApp->translate("Workbench", "&Robot"); @@ -63,8 +63,7 @@ Workbench::~Workbench() = default; void Workbench::activated() { std::string res = App::Application::getResourceDir(); - QString dir = QString::fromLatin1("%1/Mod/Robot/Lib/Kuka") - .arg(QString::fromUtf8(res.c_str())); + QString dir = QString::fromLatin1("%1/Mod/Robot/Lib/Kuka").arg(QString::fromUtf8(res.c_str())); QFileInfo fi(dir, QString::fromLatin1("kr_16.csv")); if (!fi.exists()) { @@ -74,81 +73,63 @@ void Workbench::activated() Gui::getMainWindow(), QObject::tr("No robot files installed"), QObject::tr("Please visit %1 and copy the files to %2") - .arg(QString::fromLatin1( - "https://github.com/FreeCAD/FreeCAD/tree/master" - "/src/Mod/Robot/Lib/Kuka"), dir) - ); + .arg(QString::fromLatin1("https://github.com/FreeCAD/FreeCAD/tree/master" + "/src/Mod/Robot/Lib/Kuka"), + dir)); wc.setWaitCursor(); } Gui::Workbench::activated(); - const char* RobotAndTrac[] = { - "Robot_InsertWaypoint", - "Robot_InsertWaypointPreselect", - nullptr}; + const char* RobotAndTrac[] = {"Robot_InsertWaypoint", "Robot_InsertWaypointPreselect", nullptr}; - const char* Robot[] = { - "Robot_AddToolShape", - "Robot_SetHomePos", - "Robot_RestoreHomePos", - nullptr}; + const char* Robot[] = {"Robot_AddToolShape", + "Robot_SetHomePos", + "Robot_RestoreHomePos", + nullptr}; - const char* Empty[] = { - "Robot_InsertKukaIR500", - "Robot_InsertKukaIR16", - "Robot_InsertKukaIR210", - "Robot_InsertKukaIR125", - nullptr}; + const char* Empty[] = {"Robot_InsertKukaIR500", + "Robot_InsertKukaIR16", + "Robot_InsertKukaIR210", + "Robot_InsertKukaIR125", + nullptr}; - const char* TracSingle[] = { - "Robot_TrajectoryDressUp", - nullptr}; + const char* TracSingle[] = {"Robot_TrajectoryDressUp", nullptr}; - const char* TracMore[] = { - "Robot_TrajectoryCompound", - nullptr}; + const char* TracMore[] = {"Robot_TrajectoryCompound", nullptr}; std::vector Watcher; - Watcher.push_back(new Gui::TaskView::TaskWatcherCommands( - "SELECT Robot::TrajectoryObject COUNT 1" - "SELECT Robot::RobotObject COUNT 1", - RobotAndTrac, - "Trajectory tools", - "Robot_InsertWaypoint" - )); + Watcher.push_back( + new Gui::TaskView::TaskWatcherCommands("SELECT Robot::TrajectoryObject COUNT 1" + "SELECT Robot::RobotObject COUNT 1", + RobotAndTrac, + "Trajectory tools", + "Robot_InsertWaypoint")); Watcher.push_back(new TaskWatcherRobot); - Watcher.push_back(new Gui::TaskView::TaskWatcherCommands( - "SELECT Robot::RobotObject COUNT 1", - Robot, - "Robot tools", - "Robot_CreateRobot" - )); + Watcher.push_back(new Gui::TaskView::TaskWatcherCommands("SELECT Robot::RobotObject COUNT 1", + Robot, + "Robot tools", + "Robot_CreateRobot")); - Watcher.push_back(new Gui::TaskView::TaskWatcherCommands( - "SELECT Robot::TrajectoryObject COUNT 1", - TracSingle, - "Trajectory tools", - "Robot_CreateRobot" - )); + Watcher.push_back( + new Gui::TaskView::TaskWatcherCommands("SELECT Robot::TrajectoryObject COUNT 1", + TracSingle, + "Trajectory tools", + "Robot_CreateRobot")); - Watcher.push_back(new Gui::TaskView::TaskWatcherCommands( - "SELECT Robot::TrajectoryObject COUNT 2..", - TracMore, - "Trajectory tools", - "Robot_CreateRobot" - )); + Watcher.push_back( + new Gui::TaskView::TaskWatcherCommands("SELECT Robot::TrajectoryObject COUNT 2..", + TracMore, + "Trajectory tools", + "Robot_CreateRobot")); + + Watcher.push_back( + new Gui::TaskView::TaskWatcherCommandsEmptyDoc(Empty, "Insert Robot", "Robot_CreateRobot")); - Watcher.push_back(new Gui::TaskView::TaskWatcherCommandsEmptyDoc( - Empty, - "Insert Robot", - "Robot_CreateRobot" - )); - addTaskWatcher(Watcher); Gui::Control().showTaskView(); } @@ -158,7 +139,6 @@ void Workbench::deactivated() { Gui::Workbench::deactivated(); removeTaskWatcher(); - } @@ -176,7 +156,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const *part << "Robot_Edge2Trac"; *part << "Robot_TrajectoryDressUp"; *part << "Robot_TrajectoryCompound"; - *part << "Separator"; + *part << "Separator"; *part << "Robot_SetHomePos"; *part << "Robot_RestoreHomePos"; *part << "Separator"; @@ -189,29 +169,26 @@ Gui::MenuItem* Workbench::setupMenuBar() const Gui::MenuItem* root = StdWorkbench::setupMenuBar(); Gui::MenuItem* item = root->findItem("&Windows"); Gui::MenuItem* robot = new Gui::MenuItem; - root->insertItem( item, robot ); + root->insertItem(item, robot); // analyze Gui::MenuItem* insertRobots = new Gui::MenuItem; insertRobots->setCommand("Insert Robots"); - *insertRobots << "Robot_InsertKukaIR500" - << "Robot_InsertKukaIR210" - << "Robot_InsertKukaIR125" - << "Robot_InsertKukaIR16" + *insertRobots << "Robot_InsertKukaIR500" + << "Robot_InsertKukaIR210" + << "Robot_InsertKukaIR125" + << "Robot_InsertKukaIR16" << "Separator" - << "Robot_AddToolShape" - ; + << "Robot_AddToolShape"; // boolean Gui::MenuItem* exportM = new Gui::MenuItem; exportM->setCommand("Export trajectory"); - *exportM << "Robot_ExportKukaCompact" - << "Robot_ExportKukaFull" - ; - + *exportM << "Robot_ExportKukaCompact" + << "Robot_ExportKukaFull"; + robot->setCommand("&Robot"); - *robot << insertRobots - << "Robot_CreateTrajectory" + *robot << insertRobots << "Robot_CreateTrajectory" << "Separator" << "Robot_CreateTrajectory" << "Robot_InsertWaypoint" @@ -224,8 +201,6 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Robot_SetDefaultOrientation" << "Robot_SetDefaultValues" << "Separator" - << "Robot_Simulate" - << exportM - ; + << "Robot_Simulate" << exportM; return root; } diff --git a/src/Mod/Robot/Gui/Workbench.h b/src/Mod/Robot/Gui/Workbench.h index 6aa96a2345..bc4785aab4 100644 --- a/src/Mod/Robot/Gui/Workbench.h +++ b/src/Mod/Robot/Gui/Workbench.h @@ -20,20 +20,21 @@ * * ***************************************************************************/ -#ifndef IMAGE_WORKBENCH_H -#define IMAGE_WORKBENCH_H +#ifndef ROBOT_WORKBENCH_H +#define ROBOT_WORKBENCH_H -#include #include +#include #include -namespace RobotGui { +namespace RobotGui +{ /** * @author Werner Mayer */ -class RobotGuiExport Workbench : public Gui::StdWorkbench +class RobotGuiExport Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -41,7 +42,7 @@ public: Workbench(); ~Workbench() override; - /** Run some actions when the workbench gets activated. */ + /** Run some actions when the workbench gets activated. */ void activated() override; /** Run some actions when the workbench gets deactivated. */ void deactivated() override; @@ -49,12 +50,12 @@ public: protected: Gui::ToolBarItem* setupToolBars() const override; - Gui::MenuItem* setupMenuBar() const override; + Gui::MenuItem* setupMenuBar() const override; std::vector Watcher; }; -} // namespace RobotGui +} // namespace RobotGui -#endif // IMAGE_WORKBENCH_H +#endif // ROBOT_WORKBENCH_H diff --git a/src/Mod/Robot/Init.py b/src/Mod/Robot/Init.py index 8db77748e5..c1ed296277 100644 --- a/src/Mod/Robot/Init.py +++ b/src/Mod/Robot/Init.py @@ -1,25 +1,25 @@ # FreeCAD init script of the Robot module # (c) 2001 Juergen Riegel -#*************************************************************************** -#* Copyright (c) 2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ diff --git a/src/Mod/Robot/InitGui.py b/src/Mod/Robot/InitGui.py index c9a0117eca..813788984c 100644 --- a/src/Mod/Robot/InitGui.py +++ b/src/Mod/Robot/InitGui.py @@ -1,38 +1,41 @@ -# Robot gui init module +# Robot gui init module # (c) 2009 Juergen Riegel # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up -#*************************************************************************** -#* Copyright (c) 2009 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2009 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ -class RobotWorkbench ( Workbench ): +class RobotWorkbench(Workbench): "Robot workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Robot/Resources/icons/RobotWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Robot/Resources/icons/RobotWorkbench.svg" + ) self.__class__.MenuText = "Robot" self.__class__.ToolTip = "Robot workbench" @@ -40,7 +43,9 @@ class RobotWorkbench ( Workbench ): # load the module import RobotGui import Robot + def GetClassName(self): return "RobotGui::Workbench" + Gui.addWorkbench(RobotWorkbench()) diff --git a/src/Mod/Robot/KukaExporter.py b/src/Mod/Robot/KukaExporter.py index 62fd5f1f83..7a854872e7 100644 --- a/src/Mod/Robot/KukaExporter.py +++ b/src/Mod/Robot/KukaExporter.py @@ -11,7 +11,7 @@ $BWDSTART = FALSE LDAT_ACT=LCPDAT1 FDAT_ACT=FP4 BAS(#CP_PARAMS,0.2) -LIN XP4 +LIN XP4 ;ENDFOLD """ @@ -24,49 +24,52 @@ DECL LDAT LCPDAT1={VEL 2.0,ACC 100.0,APO_DIST 100.0,APO_FAC 50.0,ORI_TYP #VAR} HeaderSrc = """&ACCESS RVP &REL 1 &PARAM TEMPLATE = C:\KRC\Roboter\Template\ExpertVorgabe -&PARAM EDITMASK = * +&PARAM EDITMASK = * """ -def ExportCompactSub(Rob,Trak,FileName): - print(Rob,Trak,FileName) - Traj = Trak.Trajectory - # open the output file - SrcFile = open(FileName,'w') - # header - SrcFile.write(HeaderSrc) - # subroutine definition - SrcFile.write("DEF "+Trak.Name+"( )\n\n") - SrcFile.write(";- Kuka src file, generated by FreeCAD (https://www.freecad.org)\n") - SrcFile.write(";- "+ time.asctime()+"\n\n") - # defining world and base - SrcFile.write(";------------- definitions ------------\n") - SrcFile.write("EXT BAS (BAS_COMMAND :IN,REAL :IN ) ;set base to World\n") - SrcFile.write("BAS (#INITMOV,0 ) ;Initialicing the defaults for Vel and so on \n\n") - - SrcFile.write("\n;------------- main part ------------\n") +def ExportCompactSub(Rob, Trak, FileName): + print(Rob, Trak, FileName) + Traj = Trak.Trajectory + # open the output file + SrcFile = open(FileName, "w") + # header + SrcFile.write(HeaderSrc) + # subroutine definition + SrcFile.write("DEF " + Trak.Name + "( )\n\n") + SrcFile.write(";- Kuka src file, generated by FreeCAD (https://www.freecad.org)\n") + SrcFile.write(";- " + time.asctime() + "\n\n") + # defining world and base + SrcFile.write(";------------- definitions ------------\n") + SrcFile.write("EXT BAS (BAS_COMMAND :IN,REAL :IN ) ;set base to World\n") + SrcFile.write("BAS (#INITMOV,0 ) ;Initialicing the defaults for Vel and so on \n\n") - for w in Traj.Waypoints: - (X,Y,Z) = (w.Pos.Base.x,w.Pos.Base.x,w.Pos.Base.x) - (A,B,C) = (w.Pos.Rotation.toEuler()) - V = w.Velocity / 1000.0 # from mm/s to m/s - SrcFile.write("$VEL.CP = %f ; m/s ; m/s \n"%V) - SrcFile.write("LIN {X %.3f,Y %.3f,Z %.3f,A %.3f,B %.3f,C %.3f} ; %s\n"%(w.Pos.Base.x,w.Pos.Base.y,w.Pos.Base.z,A,B,C,w.Name)) - - # end of subroutine - SrcFile.write("\n;------------- end ------------\n") - SrcFile.write("END \n\n") + SrcFile.write("\n;------------- main part ------------\n") - SrcFile.close() - # open the output file - #DatFile = open(FileName[:-4]+'.dat','w') - # header - #DatFile.write(HeaderSrc) - # subroutine definition - #DatFile.write("DEFDAT "+Trak.Name+" PUBLIC\n\n") - #DatFile.write("ENDDAT\n") - #DatFile.close() - -def ExportFullSub(Rob,Trak,FileName): - print(Trak,FileName) + for w in Traj.Waypoints: + (X, Y, Z) = (w.Pos.Base.x, w.Pos.Base.x, w.Pos.Base.x) + (A, B, C) = w.Pos.Rotation.toEuler() + V = w.Velocity / 1000.0 # from mm/s to m/s + SrcFile.write("$VEL.CP = %f ; m/s ; m/s \n" % V) + SrcFile.write( + "LIN {X %.3f,Y %.3f,Z %.3f,A %.3f,B %.3f,C %.3f} ; %s\n" + % (w.Pos.Base.x, w.Pos.Base.y, w.Pos.Base.z, A, B, C, w.Name) + ) + # end of subroutine + SrcFile.write("\n;------------- end ------------\n") + SrcFile.write("END \n\n") + + SrcFile.close() + # open the output file + # DatFile = open(FileName[:-4]+'.dat','w') + # header + # DatFile.write(HeaderSrc) + # subroutine definition + # DatFile.write("DEFDAT "+Trak.Name+" PUBLIC\n\n") + # DatFile.write("ENDDAT\n") + # DatFile.close() + + +def ExportFullSub(Rob, Trak, FileName): + print(Trak, FileName) diff --git a/src/Mod/Robot/MovieTool.py b/src/Mod/Robot/MovieTool.py index a9a101b612..0c6f4b51b9 100644 --- a/src/Mod/Robot/MovieTool.py +++ b/src/Mod/Robot/MovieTool.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -import os,sys,string -import FreeCAD,FreeCADGui,Robot,RobotGui +import os, sys, string +import FreeCAD, FreeCADGui, Robot, RobotGui x = 1920 y = 1080 @@ -11,12 +11,13 @@ OutDir = "c:/temp/Movie/" Trajectory = None Robot = None + def run(): Tool = Robot.Tool Tool = Tool.inverse() # duration in seconds time the pictures per second gives the size size = int(Trajectory.Duration * 24.0) for l in range(size): - Robot.Tcp = Trajectory.position(l/24.0).multiply(Tool) + Robot.Tcp = Trajectory.position(l / 24.0).multiply(Tool) FreeCADGui.updateGui() - FreeCADGui.ActiveDocument.ActiveView.saveImage(OutDir + "Rob_" + l + ".jpg",x,y,"White") + FreeCADGui.ActiveDocument.ActiveView.saveImage(OutDir + "Rob_" + l + ".jpg", x, y, "White") diff --git a/src/Mod/Robot/RobotExample.py b/src/Mod/Robot/RobotExample.py index 48198d7ad3..e53333e36b 100644 --- a/src/Mod/Robot/RobotExample.py +++ b/src/Mod/Robot/RobotExample.py @@ -1,6 +1,6 @@ -# Example how to use the basic robot class Robot6Axis which represent a 6-Axis +# Example how to use the basic robot class Robot6Axis which represent a 6-Axis # industrial robot. The Robot Module is dependent on Part but not on other Modules. -# It works mostly with the basic types Placement, Vector and Matrix. So we need +# It works mostly with the basic types Placement, Vector and Matrix. So we need # only: from Robot import * from Part import * @@ -34,47 +34,52 @@ rob.Tcp = Start print(rob.Axis2) # Waypoints: -w = Waypoint(Placement(),name="Pt",type="LIN") -print(w.Name,w.Type,w.Pos,w.Cont,w.Velocity,w.Base,w.Tool) +w = Waypoint(Placement(), name="Pt", type="LIN") +print(w.Name, w.Type, w.Pos, w.Cont, w.Velocity, w.Base, w.Tool) # generate more. The Trajectory find always outomatically a unique name for the waypoints l = [w] for i in range(5): - l.append(Waypoint(Placement(Vector(0,0,i*100),Vector(1,0,0),0),"LIN","Pt")) + l.append(Waypoint(Placement(Vector(0, 0, i * 100), Vector(1, 0, 0), 0), "LIN", "Pt")) -# create a trajectory +# create a trajectory t = Trajectory(l) print(t) for i in range(7): - t.insertWaypoints(Waypoint(Placement(Vector(0,0,i*100+500),Vector(1,0,0),0),"LIN","Pt")) + t.insertWaypoints( + Waypoint(Placement(Vector(0, 0, i * 100 + 500), Vector(1, 0, 0), 0), "LIN", "Pt") + ) # see a list of all waypoints: print(t.Waypoints) -del rob,Start,t,l,w +del rob, Start, t, l, w # === working with the document === -# +# # Working with the robot document objects: # first create a robot in the active document -if(App.activeDocument() is None):App.newDocument() +if App.activeDocument() is None: + App.newDocument() -App.activeDocument().addObject("Robot::RobotObject","Robot") +App.activeDocument().addObject("Robot::RobotObject", "Robot") # Define the visual representation and the kinematic definition (see [[6-Axis Robot]] for details about that) -App.activeDocument().Robot.RobotVrmlFile = App.getResourceDir()+"Mod/Robot/Lib/Kuka/kr500_1.wrl" -App.activeDocument().Robot.RobotKinematicFile = App.getResourceDir()+"Mod/Robot/Lib/Kuka/kr500_1.csv" +App.activeDocument().Robot.RobotVrmlFile = App.getResourceDir() + "Mod/Robot/Lib/Kuka/kr500_1.wrl" +App.activeDocument().Robot.RobotKinematicFile = ( + App.getResourceDir() + "Mod/Robot/Lib/Kuka/kr500_1.csv" +) # start position of the Axis (only that which differ from 0) App.activeDocument().Robot.Axis2 = -90 App.activeDocument().Robot.Axis3 = 90 -# retrieve the Tcp position +# retrieve the Tcp position pos = App.getDocument("Unnamed").getObject("Robot").Tcp # move the robot -pos.move(App.Vector(-10,0,0)) +pos.move(App.Vector(-10, 0, 0)) App.getDocument("Unnamed").getObject("Robot").Tcp = pos # create an empty Trajectory object in the active document -App.activeDocument().addObject("Robot::TrajectoryObject","Trajectory") +App.activeDocument().addObject("Robot::TrajectoryObject", "Trajectory") # get the Trajectory t = App.activeDocument().Trajectory.Trajectory # add the actual TCP position of the robot to the trajectory @@ -85,9 +90,11 @@ print(App.activeDocument().Trajectory.Trajectory) # insert some more Waypoints and the start point at the end again: for i in range(7): - t.insertWaypoints(Waypoint(Placement(Vector(0,1000,i*100+500),Vector(1,0,0),i),"LIN","Pt")) + t.insertWaypoints( + Waypoint(Placement(Vector(0, 1000, i * 100 + 500), Vector(1, 0, 0), i), "LIN", "Pt") + ) -t.insertWaypoints(StartTcp) # end point of the trajectory +t.insertWaypoints(StartTcp) # end point of the trajectory App.activeDocument().Trajectory.Trajectory = t print(App.activeDocument().Trajectory.Trajectory) @@ -99,9 +106,16 @@ print(App.activeDocument().Trajectory.Trajectory) # python module. Here is in detail the Kuka Postprocessor described from KukaExporter import ExportCompactSub -ExportCompactSub(App.activeDocument().Robot,App.activeDocument().Trajectory,tempfile.gettempdir()+'/TestOut.src') +ExportCompactSub( + App.activeDocument().Robot, + App.activeDocument().Trajectory, + tempfile.gettempdir() + "/TestOut.src", +) # and that's kind of how its done: for w in App.activeDocument().Trajectory.Trajectory.Waypoints: - (A,B,C) = (w.Pos.Rotation.toEuler()) - print("LIN {X %.3f,Y %.3f,Z %.3f,A %.3f,B %.3f,C %.3f} ; %s"%(w.Pos.Base.x,w.Pos.Base.y,w.Pos.Base.z,A,B,C,w.Name)) + (A, B, C) = w.Pos.Rotation.toEuler() + print( + "LIN {X %.3f,Y %.3f,Z %.3f,A %.3f,B %.3f,C %.3f} ; %s" + % (w.Pos.Base.x, w.Pos.Base.y, w.Pos.Base.z, A, B, C, w.Name) + ) diff --git a/src/Mod/Robot/RobotExampleTrajectoryOutOfShapes.py b/src/Mod/Robot/RobotExampleTrajectoryOutOfShapes.py index 385db1d388..0af77333b0 100644 --- a/src/Mod/Robot/RobotExampleTrajectoryOutOfShapes.py +++ b/src/Mod/Robot/RobotExampleTrajectoryOutOfShapes.py @@ -5,18 +5,19 @@ import FreeCADGui as Gui count = 0 FirstPos1 = None FirstPos2 = None -LastPos2 = None +LastPos2 = None SortedEdgeList = [] for so in Gui.Selection.getSelectionEx(): - for edge in obj.SubObjects: - if edge.Type != 'Part::TopoShape':continue - pos1 = edge.valueAt(0) - pos2 = edge.valueAt(edge.Length) - print(pos1,pos2) - if count==0: # first edge - FirstPos1 = pos1 - FirstPos2 = pos2 - elif count==1 : # second edge - continue - else: # the rest - SortedEdgeList.append( (pos1,pos2,edge) ) + for edge in obj.SubObjects: + if edge.Type != "Part::TopoShape": + continue + pos1 = edge.valueAt(0) + pos2 = edge.valueAt(edge.Length) + print(pos1, pos2) + if count == 0: # first edge + FirstPos1 = pos1 + FirstPos2 = pos2 + elif count == 1: # second edge + continue + else: # the rest + SortedEdgeList.append((pos1, pos2, edge)) diff --git a/src/Mod/Robot/RobotGlobal.h b/src/Mod/Robot/RobotGlobal.h index f32c8c83b4..d3e8537632 100644 --- a/src/Mod/Robot/RobotGlobal.h +++ b/src/Mod/Robot/RobotGlobal.h @@ -29,19 +29,19 @@ // Robot #ifndef RobotExport #ifdef Robot_EXPORTS -# define RobotExport FREECAD_DECL_EXPORT +#define RobotExport FREECAD_DECL_EXPORT #else -# define RobotExport FREECAD_DECL_IMPORT +#define RobotExport FREECAD_DECL_IMPORT #endif #endif // RobotGui #ifndef RobotGuiExport #ifdef RobotGui_EXPORTS -# define RobotGuiExport FREECAD_DECL_EXPORT +#define RobotGuiExport FREECAD_DECL_EXPORT #else -# define RobotGuiExport FREECAD_DECL_IMPORT +#define RobotGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //ROBOT_GLOBAL_H +#endif // ROBOT_GLOBAL_H diff --git a/src/Mod/Robot/robot.dox b/src/Mod/Robot/robot.dox index 16f68f1cca..5e80c1dbd1 100644 --- a/src/Mod/Robot/robot.dox +++ b/src/Mod/Robot/robot.dox @@ -2,4 +2,3 @@ * \ingroup CWORKBENCHES * \brief Simulates 6-axis robot movements */ - diff --git a/src/Mod/Sandbox/App/AppSandbox.cpp b/src/Mod/Sandbox/App/AppSandbox.cpp index 37b569ce65..4618589aa8 100644 --- a/src/Mod/Sandbox/App/AppSandbox.cpp +++ b/src/Mod/Sandbox/App/AppSandbox.cpp @@ -146,7 +146,7 @@ public: return genericSetAttro( name_, value ); } } - virtual int sequence_length() + virtual PyCxx_ssize_t sequence_length() { // len(x) return m_array.size(); diff --git a/src/Mod/Sandbox/App/DocumentThread.cpp b/src/Mod/Sandbox/App/DocumentThread.cpp index ecec31d779..b1a68a867f 100644 --- a/src/Mod/Sandbox/App/DocumentThread.cpp +++ b/src/Mod/Sandbox/App/DocumentThread.cpp @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -88,7 +89,7 @@ void WorkerThread::run() // -------------------------------------- -QMutex PythonThread::mutex(QMutex::Recursive); +QRecursiveMutex PythonThread::mutex; PythonThread::PythonThread(QObject* parent) : QThread(parent) diff --git a/src/Mod/Sandbox/App/DocumentThread.h b/src/Mod/Sandbox/App/DocumentThread.h index b8329c38c8..aa607d86a2 100644 --- a/src/Mod/Sandbox/App/DocumentThread.h +++ b/src/Mod/Sandbox/App/DocumentThread.h @@ -25,7 +25,7 @@ #define SANDBOX_DOCUMENTTHREAD_H #include -#include +#include #include #include @@ -63,7 +63,7 @@ public: protected: void run(); - static QMutex mutex; + static QRecursiveMutex mutex; }; class SandboxAppExport MeshLoaderThread : public QThread diff --git a/src/Mod/Sandbox/Gui/CMakeLists.txt b/src/Mod/Sandbox/Gui/CMakeLists.txt index 67431d322b..4476da5eaf 100644 --- a/src/Mod/Sandbox/Gui/CMakeLists.txt +++ b/src/Mod/Sandbox/Gui/CMakeLists.txt @@ -37,14 +37,7 @@ set(SandboxGui_MOC_HDRS GLGraphicsView.h ) -fc_wrap_cpp(SandboxGui_MOC_SRCS ${SandboxGui_MOC_HDRS}) -SOURCE_GROUP("Moc" FILES ${SandboxGui_MOC_SRCS}) - -if(BUILD_QT5) - qt5_add_resources(Resource_SRCS Resources/Sandbox.qrc) -else() - qt4_add_resources(Resource_SRCS Resources/Sandbox.qrc) -endif() +qt_add_resources(Resource_SRCS Resources/Sandbox.qrc) SET(Resource_SRCS ${Resource_SRCS} Resources/Sandbox.qrc diff --git a/src/Mod/Sandbox/Gui/Command.cpp b/src/Mod/Sandbox/Gui/Command.cpp index b7a0ad6f9d..6775130893 100644 --- a/src/Mod/Sandbox/Gui/Command.cpp +++ b/src/Mod/Sandbox/Gui/Command.cpp @@ -60,6 +60,7 @@ #endif #include #include +#include #include #include #include @@ -932,7 +933,7 @@ void CmdTestGrabWidget::activated(int) { QCalendarWidget* c = new QCalendarWidget(); c->hide(); - QPixmap p = QPixmap::grabWidget(c, c->rect()); + QPixmap p = c->grab(c->rect()); QLabel* label = new QLabel(); label->resize(c->size()); label->setPixmap(p); @@ -1054,7 +1055,7 @@ void CmdTestImageNode::activated(int) QString text = QString::fromLatin1("Distance: 2.7jgiorjgor84mm"); QFont font; QFontMetrics fm(font); - int w = fm.width(text); + int w = Gui::QtTools::horizontalAdvance(fm, text); int h = fm.height(); diff --git a/src/Mod/Sandbox/Gui/GLGraphicsView.cpp b/src/Mod/Sandbox/Gui/GLGraphicsView.cpp index b3ee4eb1ac..6cae14de5f 100644 --- a/src/Mod/Sandbox/Gui/GLGraphicsView.cpp +++ b/src/Mod/Sandbox/Gui/GLGraphicsView.cpp @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -57,6 +56,7 @@ #include #include "GLGraphicsView.h" +#include #include #include @@ -239,10 +239,12 @@ SceneEventFilter::eventFilter(QObject *, QEvent * qevent) } case QEvent::GraphicsSceneWheel: { +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) QGraphicsSceneWheelEvent* ev = static_cast(qevent); sceneev.reset(new QWheelEvent(ev->pos().toPoint(), ev->delta(), ev->buttons(), ev->modifiers(), ev->orientation())); qevent = sceneev.get(); +#endif break; } case QEvent::GraphicsSceneResize: @@ -351,7 +353,9 @@ GraphicsScene::GraphicsScene() pos += QPointF(0, 10 + rect.height()); } +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) m_time.start(); +#endif sorendermanager = new SoRenderManager; sorendermanager->setAutoClipping(SoRenderManager::VARIABLE_NEAR_PLANE); @@ -572,14 +576,18 @@ void GraphicsScene::drawBackground(QPainter *painter, const QRectF &) return; } +#if 0 glViewport(0, 0, width(), height()); /**/ glClearColor(m_backgroundColor.redF(), m_backgroundColor.greenF(), m_backgroundColor.blueF(), 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); +#endif +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) const int delta = m_time.elapsed() - m_lastTime; m_lastTime += delta; +#endif sorendermanager->render(true/*PRIVATE(this)->clearwindow*/, @@ -625,7 +633,9 @@ void GraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event) if (event->isAccepted()) return; +#if QT_VERSION < QT_VERSION_CHECK(6,0,0) m_mouseEventTime = m_time.elapsed(); +#endif event->accept(); } @@ -654,10 +664,12 @@ GraphicsView3D::GraphicsView3D(Gui::Document* doc, QWidget* parent) : Gui::MDIView(doc, parent), m_scene(new GraphicsScene()), m_view(new GraphicsView) { m_view->installEventFilter(m_scene->getEventFilter()); - QGLFormat f; +#if 0 + QtGLFormat f; f.setSampleBuffers(true); f.setSamples(8); m_view->setViewport(new QGLWidget(f)); +#endif m_view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); m_view->setScene(m_scene); m_scene->setNavigationModeFile(QUrl(QString::fromLatin1("coin:///scxml/navigation/examiner.xml"))); @@ -698,5 +710,4 @@ void GraphicsView3D::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M m_scene->setBackgroundColor(QColor::fromRgbF(r1, g1, b1)); } } - #include "moc_GLGraphicsView.cpp" diff --git a/src/Mod/Sandbox/Gui/Overlay.cpp b/src/Mod/Sandbox/Gui/Overlay.cpp index aa8674dfc6..eb3c269dc8 100644 --- a/src/Mod/Sandbox/Gui/Overlay.cpp +++ b/src/Mod/Sandbox/Gui/Overlay.cpp @@ -63,20 +63,11 @@ public: p.drawText(200,200,QString::fromLatin1("Render to QImage")); } -#if !defined(HAVE_QT5_OPENGL) - img = QtGLWidget::convertToGLFormat(img); -#endif fbo = new QtGLFramebufferObject(v->getGLWidget()->size()); fbo->bind(); //glClear(GL_COLOR_BUFFER_BIT); fbo->release(); { -#if !defined(HAVE_QT5_OPENGL) - QPainter p(fbo); - p.setPen(Qt::white); - p.drawText(200,200,QString::fromLatin1("Render to QtGLFramebufferObject")); - p.end(); -#endif //img = fbo->toImage(); //img = QtGLWidget::convertToGLFormat(img); } @@ -623,18 +614,6 @@ void DrawingPlane::drawLineTo(const QPoint &endPoint) { Q_UNUSED(endPoint); return; -#if !defined(HAVE_QT5_OPENGL) - QPainter painter(fbo); - //QPainter painter(_pcView3D->getGLWidget()); - painter.setPen(QPen(myPenColor, myPenWidth, Qt::SolidLine, Qt::RoundCap, - Qt::RoundJoin)); - //painter.setOpacity(0.5); - //painter.drawLine(lastPoint.x(), fbo->height()-lastPoint.y(), endPoint.x(), fbo->height()-endPoint.y()); - painter.drawLine(lastPoint.x(), lastPoint.y(), endPoint.x(), endPoint.y()); - - //_pcView3D->scheduleRedraw(); - lastPoint = endPoint; -#endif } //Gui::Document* doc = Gui::Application::Instance->activeDocument(); //Gui::View3DInventorViewer* view = static_cast(doc->getActiveView())->getViewer(); diff --git a/src/Mod/Sandbox/Gui/TaskPanelView.cpp b/src/Mod/Sandbox/Gui/TaskPanelView.cpp index ad2e78b1ad..10ac3b1f5c 100644 --- a/src/Mod/Sandbox/Gui/TaskPanelView.cpp +++ b/src/Mod/Sandbox/Gui/TaskPanelView.cpp @@ -364,8 +364,6 @@ public: Q_UNUSED(MainWindow); } // retranslateUi }; -#else -#include #endif TaskPanelView::TaskPanelView(QWidget *parent) @@ -580,96 +578,6 @@ TaskPanelView::TaskPanelView(QWidget *parent) connect(ui->rbAndroidScheme, SIGNAL(toggled(bool)), androidAction, SIGNAL(toggled(bool))); func->toggle(androidAction, boost::bind(&TaskPanelView::on_rbAndroidScheme_toggled, this, bp::_1)); } -#else - setWindowTitle(QLatin1String("Task View")); - - QGridLayout* gridLayout = new QGridLayout(this); - iisTaskPanel *taskPanel = new iisTaskPanel(this); - iisTaskBox *tb1 = new iisTaskBox( - QPixmap(QString::fromLatin1(":/icons/document-save.svg")),QLatin1String("Expandable Group"),true, this); - taskPanel->addWidget(tb1); - gridLayout->addWidget(taskPanel, 0, 0, 2, 1); - - iisIconLabel *i1 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-new"), QLatin1String("Create new file"), tb1); - tb1->addIconLabel(i1); - connect(i1, SIGNAL(activated()), action, SIGNAL(triggered())); - - iisIconLabel *i2 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-open"), QLatin1String("Load a file"), tb1); - tb1->addIconLabel(i2); - connect(i2, SIGNAL(activated()), action, SIGNAL(triggered())); - - tb1->groupLayout()->addWidget(new QPushButton(QLatin1String("Just a button"), this)); - - iisIconLabel *i3 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-save"), QLatin1String("Save current file"), tb1); - tb1->addIconLabel(i3); - - iisIconLabel *i4 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-print"), QLatin1String("Print file contents"), tb1); - tb1->addIconLabel(i4); - i4->setColors(Qt::red, Qt::green, Qt::gray); - i4->setFocusPen(QPen()); - - tb1->groupLayout()->addWidget(new QPushButton(QLatin1String("Just another button"), this)); - - iisTaskBox *tb2 = new iisTaskBox( - Gui::BitmapFactory().pixmap("edit-redo"), QLatin1String("Non-expandable Group"), false, this); - taskPanel->addWidget(tb2); - - iisIconLabel *i21 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-new"), QLatin1String("Create new file"), tb2); - tb2->addIconLabel(i21); - - iisIconLabel *i22 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-open"), QLatin1String("Load a file"), tb2); - tb2->addIconLabel(i22); - - iisIconLabel *i23 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-save"), QLatin1String("Save current file"), tb2); - tb2->addIconLabel(i23); - i23->setEnabled(false); - - iisIconLabel *i24 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-print"), QLatin1String("Print file contents"), tb2); - tb2->addIconLabel(i24); - - - // Other widgets can be also added to the panel - QLabel *l1 = new QLabel(QLatin1String("Action Group without header"), this); - taskPanel->addWidget(l1); - - iisTaskGroup *tb3 = new iisTaskGroup(this); - taskPanel->addWidget(tb3); - - iisIconLabel *i31 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-new"), QLatin1String("Create new file"), tb3); - tb3->addIconLabel(i31); - - QHBoxLayout *hb3 = new QHBoxLayout(); - tb3->groupLayout()->addLayout(hb3); - - iisIconLabel *i32 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-open"), QLatin1String("Load a file"), tb3); - tb3->addIconLabel(i32); - hb3->addWidget(i32); - - iisIconLabel *i33 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-save"), QLatin1String("Save current file"), tb3); - tb3->addIconLabel(i33); - i33->setDisabled(true); - hb3->addWidget(i33); - - iisIconLabel *i34 = new iisIconLabel( - Gui::BitmapFactory().iconFromTheme("document-print"), QLatin1String("Print file contents"), tb3); - tb3->addIconLabel(i34); - - taskPanel->addStretch(); - taskPanel->setScheme(iisWinXPTaskPanelScheme::defaultScheme()); - tb1->setScheme(iisWinXPTaskPanelScheme::defaultScheme()); - tb2->setScheme(iisWinXPTaskPanelScheme2::defaultScheme()); - tb3->setScheme(iisTaskPanelScheme::defaultScheme()); #endif } diff --git a/src/Mod/Sandbox/Gui/Workbench.cpp b/src/Mod/Sandbox/Gui/Workbench.cpp index 11a9fb9e61..baae5e1508 100644 --- a/src/Mod/Sandbox/Gui/Workbench.cpp +++ b/src/Mod/Sandbox/Gui/Workbench.cpp @@ -37,6 +37,7 @@ #include #include "Workbench.h" +#include #include #include #include @@ -61,7 +62,7 @@ Workbench::Workbench() QGridLayout* pLayout = new QGridLayout(tree); pLayout->setSpacing(0); - pLayout->setMargin (0); + pLayout->setContentsMargins(0, 0, 0, 0); pLayout->addWidget(treeWidget, 0, 0); tree->setObjectName @@ -159,8 +160,7 @@ void SoWidgetShape::GLRender(SoGLRenderAction * /*action*/) #if defined(HAVE_QT5_OPENGL) this->image = QPixmap::grabWidget(w, w->rect()).toImage(); #else - this->image = QPixmap::grabWidget(w, w->rect()).toImage(); - this->image = QtGLWidget::convertToGLFormat(this->image); + this->image = w->grab(w->rect()).toImage(); #endif glRasterPos2d(10,10); glDrawPixels(this->image.width(),this->image.height(),GL_RGBA,GL_UNSIGNED_BYTE,this->image.bits()); @@ -285,7 +285,6 @@ void SoWidgetShape::setWidget(QWidget* w) this->image = img.toImage(); #if !defined(HAVE_QT5_OPENGL) - this->image = QPixmap::grabWidget(w, w->rect()).toImage(); - this->image = QtGLWidget::convertToGLFormat(this->image); + this->image = w->grab(w->rect()).toImage(); #endif } diff --git a/src/Mod/Show/Containers.py b/src/Mod/Show/Containers.py index 29c3acb3bc..565dd6e06f 100644 --- a/src/Mod/Show/Containers.py +++ b/src/Mod/Show/Containers.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2018 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -20,12 +20,14 @@ # * * # ***************************************************************************/ -#This is a temporary replacement for C++-powered Container class that should be eventually introduced into FreeCAD +# This is a temporary replacement for C++-powered Container class that should be eventually introduced into FreeCAD + class Container(object): """Container class: a unified interface for container objects, such as Group, Part, Body, or Document. This is a temporary implementation.""" - Object = None #DocumentObject or Document, the actual container + + Object = None # DocumentObject or Document, the actual container def __init__(self, obj): self.Object = obj @@ -33,7 +35,7 @@ class Container(object): def self_check(self): if self.Object is None: raise ValueError("Null!") - if not isAContainer(self.Object, links_too= True): + if not isAContainer(self.Object, links_too=True): raise NotAContainerError(self.Object) def getAllChildren(self): @@ -46,18 +48,18 @@ class Container(object): self.self_check() container = self.Object - if container.isDerivedFrom('App::Document'): + if container.isDerivedFrom("App::Document"): return [] - elif container.hasExtension('App::OriginGroupExtension'): + elif container.hasExtension("App::OriginGroupExtension"): if container.Origin is not None: return [container.Origin] else: return [] - elif container.isDerivedFrom('App::Origin'): + elif container.isDerivedFrom("App::Origin"): return container.OriginFeatures - elif container.hasExtension('App::GroupExtension'): + elif container.hasExtension("App::GroupExtension"): return [] - elif container.hasChildElement(): # Link + elif container.hasChildElement(): # Link return [] raise RuntimeError("getStaticChildren: unexpected container type!") @@ -66,7 +68,7 @@ class Container(object): self.self_check() container = self.Object - if container.isDerivedFrom('App::Document'): + if container.isDerivedFrom("App::Document"): # find all objects not contained by any Part or Body result = set(container.Objects) for obj in container.Objects: @@ -74,18 +76,18 @@ class Container(object): children = set(Container(obj).getAllChildren()) result = result - children return list(result) - elif container.hasExtension('App::GroupExtension'): + elif container.hasExtension("App::GroupExtension"): result = container.Group - if container.hasExtension('App::GeoFeatureGroupExtension'): - #geofeaturegroup's group contains all objects within the CS, we don't want that + if container.hasExtension("App::GeoFeatureGroupExtension"): + # geofeaturegroup's group contains all objects within the CS, we don't want that result = [obj for obj in result if obj.getParentGroup() is not container] return result - elif container.isDerivedFrom('App::Origin'): + elif container.isDerivedFrom("App::Origin"): return [] elif container.hasChildElement(): result = [] for sub in container.getSubObjects(1): - sobj = container.getSubObject(sub,retType=1) + sobj = container.getSubObject(sub, retType=1) if sobj: result.append(sobj) return result @@ -97,11 +99,11 @@ class Container(object): self.self_check() container = self.Object - if container.isDerivedFrom('App::Document'): - return True #Document is a special thing... is it a CS or not is a matter of coding convenience. - elif container.hasExtension('App::GeoFeatureGroupExtension'): + if container.isDerivedFrom("App::Document"): + return True # Document is a special thing... is it a CS or not is a matter of coding convenience. + elif container.hasExtension("App::GeoFeatureGroupExtension"): return True - elif container.hasChildElement(): # Link + elif container.hasChildElement(): # Link return True else: return False @@ -111,13 +113,13 @@ class Container(object): self.self_check() container = self.Object - if container.isDerivedFrom('App::Document'): - return True #Document is a special thing... Return value is a matter of coding convenience. - elif container.hasExtension('App::GeoFeatureGroupExtension'): + if container.isDerivedFrom("App::Document"): + return True # Document is a special thing... Return value is a matter of coding convenience. + elif container.hasExtension("App::GeoFeatureGroupExtension"): return True - elif container.isDerivedFrom('App::Origin'): + elif container.isDerivedFrom("App::Origin"): return True - elif container.hasChildElement(): # Link + elif container.hasChildElement(): # Link return True else: return False @@ -134,15 +136,15 @@ class Container(object): container = self.Object return _getMetacontainerChildren(self, Container.isAVisGroup) - def isChildVisible(self,obj): + def isChildVisible(self, obj): container = self.Object - isElementVisible = getattr(container,'isElementVisible',None) + isElementVisible = getattr(container, "isElementVisible", None) if not isElementVisible: return obj.Visibility vis = isElementVisible(obj.Name) if vis < 0: return obj.Visibility - return vis>0 + return vis > 0 def hasObject(self, obj): """Returns True if the container contains specified object directly.""" @@ -151,6 +153,7 @@ class Container(object): def hasObjectRecursive(self, obj): return self.Object in ContainerChain(obj) + def _getMetacontainerChildren(container, isrightcontainer_func): """Gathers up children of metacontainer - a container structure formed by containers of specific type. For example, coordinate systems form a kind of container structure. @@ -159,9 +162,9 @@ def _getMetacontainerChildren(container, isrightcontainer_func): isrightcontainer_func: a function f(cnt)->bool, where cnt is a Container object.""" result = [] - list_traversing_now = [container] #list of Container instances - list_to_be_traversed_next = [] #list of Container instances - visited_containers = set([container.Object]) #set of DocumentObjects + list_traversing_now = [container] # list of Container instances + list_to_be_traversed_next = [] # list of Container instances + visited_containers = set([container.Object]) # set of DocumentObjects while len(list_traversing_now) > 0: list_to_be_traversed_next = [] @@ -178,26 +181,26 @@ def _getMetacontainerChildren(container, isrightcontainer_func): return result - -def isAContainer(obj, links_too = False): - '''isAContainer(obj, links_too): returns True if obj is an object container, such as +def isAContainer(obj, links_too=False): + """isAContainer(obj, links_too): returns True if obj is an object container, such as Group, Part, Body. The important characteristic of an object being a container is that it can be activated to receive new objects. Documents are considered containers, too. If links_too, App::Link objects are considered containers, too. Then, container tree - isn't necessarily a tree.''' + isn't necessarily a tree.""" - if obj.isDerivedFrom('App::Document'): + if obj.isDerivedFrom("App::Document"): return True - if obj.hasExtension('App::GroupExtension'): + if obj.hasExtension("App::GroupExtension"): return True - if obj.isDerivedFrom('App::Origin'): + if obj.isDerivedFrom("App::Origin"): return True if obj.hasChildElement(): return True if links_too else False return False -#from Part-o-magic... + +# from Part-o-magic... def ContainerOf(obj): """ContainerOf(obj): returns the container that immediately has obj.""" cnt = None @@ -211,17 +214,19 @@ def ContainerOf(obj): return obj.Document return cnt + def getVisGroupOf(obj): chain = VisGroupChain(obj) return chain[-1] -#from Part-o-magic... over-engineered, but proven to work -def ContainerChain(feat): - '''ContainerChain(feat): container path to feat (not including feat itself). - Last container directly contains the feature. - Example of output: [,,,]''' - if feat.isDerivedFrom('App::Document'): +# from Part-o-magic... over-engineered, but proven to work +def ContainerChain(feat): + """ContainerChain(feat): container path to feat (not including feat itself). + Last container directly contains the feature. + Example of output: [,,,]""" + + if feat.isDerivedFrom("App::Document"): return [] list_traversing_now = [feat] @@ -243,18 +248,25 @@ def ContainerChain(feat): return [feat.Document] + list_of_deps[::-1] + def CSChain(feat): cnt_chain = ContainerChain(feat) return [cnt for cnt in cnt_chain if Container(cnt).isACS()] + def VisGroupChain(feat): cnt_chain = ContainerChain(feat) return [cnt for cnt in cnt_chain if Container(cnt).isAVisGroup()] + class ContainerError(RuntimeError): pass + + class NotAContainerError(ContainerError): def __init__(self, name="None"): ContainerError.__init__(self, "'{}' is not recognized as container".format(name)) + + class ContainerTreeError(ContainerError): pass diff --git a/src/Mod/Show/DepGraphTools.py b/src/Mod/Show/DepGraphTools.py index 324c556829..0e72ec425a 100644 --- a/src/Mod/Show/DepGraphTools.py +++ b/src/Mod/Show/DepGraphTools.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2016 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -20,10 +20,11 @@ # * * # ***************************************************************************/ + def getAllDependencies(feat): - '''getAllDependencies(feat): gets all features feat depends on, directly or indirectly. + """getAllDependencies(feat): gets all features feat depends on, directly or indirectly. Returns a list, with deepest dependencies last. feat is not included in the list, except - if the feature depends on itself (dependency loop).''' + if the feature depends on itself (dependency loop).""" list_traversing_now = [feat] set_of_deps = set() list_of_deps = [] @@ -41,10 +42,11 @@ def getAllDependencies(feat): return list_of_deps + def getAllDependent(feat): - '''getAllDependent(feat): gets all features that depend on feat, directly or indirectly. + """getAllDependent(feat): gets all features that depend on feat, directly or indirectly. Returns a list, with deepest dependencies last. feat is not included in the list, except - if the feature depends on itself (dependency loop).''' + if the feature depends on itself (dependency loop).""" list_traversing_now = [feat] set_of_deps = set() list_of_deps = [] diff --git a/src/Mod/Show/SceneDetail.py b/src/Mod/Show/SceneDetail.py index 18ccef672f..077fd89a45 100644 --- a/src/Mod/Show/SceneDetail.py +++ b/src/Mod/Show/SceneDetail.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -20,6 +20,7 @@ # * * # ***************************************************************************/ + class SceneDetail(object): """SceneDetail class: abstract class for tempovis scene save/restore plug-in. An implementation must provide: * data storage (as "data" attribute of the object) @@ -32,7 +33,8 @@ class SceneDetail(object): * test for equality, that checks if .data attributes of two SceneDetail instances are equal * info on if the modification affects what is saved to disk, and thus should be undone temporarily for file writing. """ - class_id = '' + + class_id = "" data = None doc = None @@ -45,9 +47,9 @@ class SceneDetail(object): def set_doc(self, doc): self.doc = doc - # - key = None #a string or something alike to use to store/find the entry in TempoVis. For example, a string "{object_name}.{property_name}". - affects_persistence = False #True indicate that the changes will be recorded if the doc is saved, and that this detail should be restored for saving + # + key = None # a string or something alike to use to store/find the entry in TempoVis. For example, a string "{object_name}.{property_name}". + affects_persistence = False # True indicate that the changes will be recorded if the doc is saved, and that this detail should be restored for saving def scene_value(self): """scene_value(): returns the value from the scene""" @@ -62,15 +64,16 @@ class SceneDetail(object): if isinstance(other, self.__class__): return self.data == other.data and self.data is not None else: - raise TypeError('{self} can\'t be compared with {other}' - .format(self= repr(self), other= repr(other))) - # + raise TypeError( + "{self} can't be compared with {other}".format(self=repr(self), other=repr(other)) + ) - # + # + + # @property def full_key(self): return (self.class_id, self.doc.Name if self.doc else None, self.key) - def __ne__(self, other): return not self.__eq__(other) diff --git a/src/Mod/Show/SceneDetails/Camera.py b/src/Mod/Show/SceneDetails/Camera.py index 20efeb689e..78322a7604 100644 --- a/src/Mod/Show/SceneDetails/Camera.py +++ b/src/Mod/Show/SceneDetails/Camera.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -24,19 +24,21 @@ from Show.SceneDetail import SceneDetail import FreeCADGui + class Camera(SceneDetail): """Camera(doc): TempoVis plugin for saving and restoring camera.""" - class_id = 'SDCamera' + + class_id = "SDCamera" def __init__(self, doc): self.doc = doc - self.key = 'the_cam' + self.key = "the_cam" def _viewer(self): gdoc = FreeCADGui.getDocument(self.doc.Name) v = gdoc.activeView() - if not hasattr(v, 'getCamera'): - v = gdoc.mdiViewsOfType('Gui::View3DInventor')[0] + if not hasattr(v, "getCamera"): + v = gdoc.mdiViewsOfType("Gui::View3DInventor")[0] return v def scene_value(self): @@ -44,4 +46,3 @@ class Camera(SceneDetail): def apply_data(self, val): self._viewer().setCamera(val) - diff --git a/src/Mod/Show/SceneDetails/ClipPlane.py b/src/Mod/Show/SceneDetails/ClipPlane.py index e1a7d383a3..221bb97d10 100644 --- a/src/Mod/Show/SceneDetails/ClipPlane.py +++ b/src/Mod/Show/SceneDetails/ClipPlane.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -24,31 +24,35 @@ from Show.SceneDetail import SceneDetail import FreeCAD as App import FreeCADGui as Gui + class ClipPlane(SceneDetail): """ClipPlane(document, enable = None, placement = None, offset = 0.0): TempoVis plugin for applying clipping plane to whole project except edit root. enable can be 0 for disable, 1 for enable, and -1 for toggle (FIXME: toggle value support is a hack for while we can't read out the current state).""" - class_id = 'SDClipPlane' - key = '' + class_id = "SDClipPlane" + key = "" - def __init__(self, document, enable = None, placement = None, offset = 0.0): + def __init__(self, document, enable=None, placement=None, offset=0.0): self.doc = document if enable is not None: if placement is not None and offset != 0.0: placement = placement.copy() - dir = placement.Rotation.multVec(App.Vector(0,0,1)) - placement.Base = placement.Base + dir*offset + dir = placement.Rotation.multVec(App.Vector(0, 0, 1)) + placement.Base = placement.Base + dir * offset self.data = (enable, placement) def scene_value(self): - return (0, None) #hack. For until there is a way to easily query the plane, this should be good enough. + return ( + 0, + None, + ) # hack. For until there is a way to easily query the plane, this should be good enough. def apply_data(self, val): enable, pla = val if enable != 0: - self._viewer().toggleClippingPlane(enable, pla= pla) + self._viewer().toggleClippingPlane(enable, pla=pla) else: self._viewer().toggleClippingPlane(enable) @@ -58,6 +62,6 @@ class ClipPlane(SceneDetail): else: gdoc = Gui.getDocument(self.doc.Name) v = gdoc.activeView() - if not hasattr(v, 'toggleClippingPlane'): - v = gdoc.mdiViewsOfType('Gui::View3DInventor')[0] + if not hasattr(v, "toggleClippingPlane"): + v = gdoc.mdiViewsOfType("Gui::View3DInventor")[0] return v diff --git a/src/Mod/Show/SceneDetails/ObjectClipPlane.py b/src/Mod/Show/SceneDetails/ObjectClipPlane.py index 0220a84d09..f2ede17091 100644 --- a/src/Mod/Show/SceneDetails/ObjectClipPlane.py +++ b/src/Mod/Show/SceneDetails/ObjectClipPlane.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -24,14 +24,16 @@ from Show.SceneDetail import SceneDetail import FreeCAD as App + class ObjectClipPlane(SceneDetail): """ObjectClipPlane(object, enable = None, placement = None, offset = 0.0): Plugin for TempoVis for adding clipping planes to individual objects.""" - class_id = 'SDObjectClipPlane' - propname = '' - objname = '' - def __init__(self, object, enable = None, placement = None, offset = 0.0): + class_id = "SDObjectClipPlane" + propname = "" + objname = "" + + def __init__(self, object, enable=None, placement=None, offset=0.0): self.objname = object.Name self.doc = object.Document self.key = self.objname @@ -40,7 +42,7 @@ class ObjectClipPlane(SceneDetail): def scene_value(self): vp = self.doc.getObject(self.objname).ViewObject - cp = getClipPlaneNode(vp, make_if_missing= False) + cp = getClipPlaneNode(vp, make_if_missing=False) if cp is None: return self.val(False) else: @@ -53,16 +55,17 @@ class ObjectClipPlane(SceneDetail): def apply_data(self, val): enable, pldef = val vp = self.doc.getObject(self.objname).ViewObject - cp = getClipPlaneNode(vp, make_if_missing= True if enable else False) + cp = getClipPlaneNode(vp, make_if_missing=True if enable else False) if cp is None and not enable: return if enable: from pivy import coin + v, d = pldef cp.plane.setValue(coin.SbPlane(coin.SbVec3f(*v), d)) cp.on.setValue(enable) - def val(self, enable, placement = None, offset = 0.0): + def val(self, enable, placement=None, offset=0.0): """val(enable, placement = None, offset = 0.0): constructs a value from convenient parameters. Placement is in global CS. The cutting will be by XY plane of Placement; the stuff in negative Z is visible and the stuff in positive Z is invisible.""" @@ -70,16 +73,20 @@ class ObjectClipPlane(SceneDetail): pldef = None if enable: obj = self.doc.getObject(self.objname) - plm_cs = obj.getGlobalPlacement().multiply(obj.Placement.inverse()) # placement of CS the object is in + plm_cs = obj.getGlobalPlacement().multiply( + obj.Placement.inverse() + ) # placement of CS the object is in plm_plane = plm_cs.inverse().multiply(placement) pldef = placement2plane(plm_plane, offset) return (enable, pldef if enable else None) -def getClipPlaneNode(viewprovider, make_if_missing = True): + +def getClipPlaneNode(viewprovider, make_if_missing=True): from pivy import coin + sa = coin.SoSearchAction() sa.setType(coin.SoClipPlane.getClassTypeId()) - sa.setName('TVClipPlane') + sa.setName("TVClipPlane") sa.traverse(viewprovider.RootNode) if sa.isFound() and sa.getPath().getLength() == 1: return sa.getPath().getTail() @@ -88,19 +95,22 @@ def getClipPlaneNode(viewprovider, make_if_missing = True): return None clipplane = coin.SoClipPlane() viewprovider.RootNode.insertChild(clipplane, 0) - clipplane.setName('TVClipPlane') - clipplane.on.setValue(False) #make sure the plane is not activated by default + clipplane.setName("TVClipPlane") + clipplane.on.setValue(False) # make sure the plane is not activated by default return clipplane + def placement2plane(placement, offset): """returns tuple (normal, D) for making coin plane.""" - normal = placement.Rotation.multVec(App.Vector(0,0,-1)) + normal = placement.Rotation.multVec(App.Vector(0, 0, -1)) D = placement.Base * normal - offset return tuple(normal), D -def clipPlane(obj, enable, placement = None, offset = 0, tv = None): + +def clipPlane(obj, enable, placement=None, offset=0, tv=None): if tv is None: from Show import TempoVis + tv = TempoVis(obj.Document) tv.modify(ClipPlane(obj, enable, placement, offset)) return tv diff --git a/src/Mod/Show/SceneDetails/Pickability.py b/src/Mod/Show/SceneDetails/Pickability.py index 95aed9ea10..171cc8cd05 100644 --- a/src/Mod/Show/SceneDetails/Pickability.py +++ b/src/Mod/Show/SceneDetails/Pickability.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -22,6 +22,7 @@ from Show.SceneDetail import SceneDetail + class Pickability(SceneDetail): """Pickability(object, pickstyle = None):Plugin for TempoVis for altering pick style of objects (i.e., selectability). @@ -29,11 +30,12 @@ class Pickability(SceneDetail): PS_REGULAR = 0 # selectable PS_BOUNDBOX = 1 # selectable, but faster hit testing using bounding box PS_UNPICKABLE = 2 # not selectable and not obstructing.""" - class_id = 'SDPickability' - propname = '' - objname = '' - def __init__(self, object, pickstyle = None): + class_id = "SDPickability" + propname = "" + objname = "" + + def __init__(self, object, pickstyle=None): self.objname = object.Name self.doc = object.Document self.key = self.objname @@ -46,12 +48,15 @@ class Pickability(SceneDetail): def apply_data(self, val): setPickStyle(self.doc.getObject(self.objname).ViewObject, val) + PS_REGULAR = 0 PS_BOUNDBOX = 1 PS_UNPICKABLE = 2 -def getPickStyleNode(viewprovider, make_if_missing = True): + +def getPickStyleNode(viewprovider, make_if_missing=True): from pivy import coin + sa = coin.SoSearchAction() sa.setType(coin.SoPickStyle.getClassTypeId()) sa.traverse(viewprovider.RootNode) @@ -67,14 +72,14 @@ def getPickStyleNode(viewprovider, make_if_missing = True): def getPickStyle(viewprovider): - ps = getPickStyleNode(viewprovider, make_if_missing= False) + ps = getPickStyleNode(viewprovider, make_if_missing=False) if ps is not None: return ps.style.getValue() else: return PS_REGULAR + def setPickStyle(viewprovider, pickstyle): - ps = getPickStyleNode(viewprovider, make_if_missing= pickstyle != 0) #coin.SoPickStyle.SHAPE + ps = getPickStyleNode(viewprovider, make_if_missing=pickstyle != 0) # coin.SoPickStyle.SHAPE if ps is not None: return ps.style.setValue(pickstyle) - diff --git a/src/Mod/Show/SceneDetails/VProperty.py b/src/Mod/Show/SceneDetails/VProperty.py index 35bb26e9d8..bb8d257d99 100644 --- a/src/Mod/Show/SceneDetails/VProperty.py +++ b/src/Mod/Show/SceneDetails/VProperty.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -22,22 +22,23 @@ from Show.SceneDetail import SceneDetail + class VProperty(SceneDetail): """VProperty(object, propname, val = None): plugin for TempoVis to alter ViewProvider properties""" - class_id = 'SDVProperty' + class_id = "SDVProperty" affects_persistence = True - propname = '' - objname = '' + propname = "" + objname = "" mild_restore = True - def __init__(self, object, propname, val = None): + def __init__(self, object, propname, val=None): self.objname = object.Name self.propname = propname self.doc = object.Document - self.key = self.objname + '.' + self.propname + self.key = self.objname + "." + self.propname self.data = val - if propname == 'LinkVisibility': #seems to not be a property + if propname == "LinkVisibility": # seems to not be a property self.affects_persistence = False def scene_value(self): diff --git a/src/Mod/Show/SceneDetails/Workbench.py b/src/Mod/Show/SceneDetails/Workbench.py index 13a5b4e9a7..a014999877 100644 --- a/src/Mod/Show/SceneDetails/Workbench.py +++ b/src/Mod/Show/SceneDetails/Workbench.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -24,14 +24,16 @@ from Show.SceneDetail import SceneDetail import FreeCADGui + class Workbench(SceneDetail): """Workbench(wb = None): Plugin for TempoVis for changing active workbench. wb: string, a name of a workbench (e.g. 'SketcherWorkbench')""" - class_id = 'SDWorkbench' + + class_id = "SDWorkbench" mild_restore = True - def __init__(self, wb = None): - self.key = 'workbench' + def __init__(self, wb=None): + self.key = "workbench" if wb is not None: self.data = wb @@ -40,4 +42,3 @@ class Workbench(SceneDetail): def apply_data(self, val): FreeCADGui.activateWorkbench(val) - diff --git a/src/Mod/Show/ShowUtils.py b/src/Mod/Show/ShowUtils.py index 8592f9cb7d..5ba7e5bf87 100644 --- a/src/Mod/Show/ShowUtils.py +++ b/src/Mod/Show/ShowUtils.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -20,6 +20,7 @@ # * * # ***************************************************************************/ + def is3DObject(obj): """is3DObject(obj): tests if the object has some 3d geometry. TempoVis is made only for objects in 3d view, so all objects that don't pass this check are ignored by TempoVis.""" @@ -29,8 +30,10 @@ def is3DObject(obj): # observation: all viewproviders have transform node, then a switch node. If that switch node contains something, the object has something in 3d view. try: from pivy import coin - return obj.ViewObject.SwitchNode.getNumChildren()>0 + + return obj.ViewObject.SwitchNode.getNumChildren() > 0 except Exception as err: import FreeCAD as App - App.Console.PrintWarning(u"Show.ShowUtils.is3DObject error: {err}\n".format(err= str(err))) - return True #assume. + + App.Console.PrintWarning("Show.ShowUtils.is3DObject error: {err}\n".format(err=str(err))) + return True # assume. diff --git a/src/Mod/Show/TVObserver.py b/src/Mod/Show/TVObserver.py index e0c4b65a8b..a2d190aafd 100644 --- a/src/Mod/Show/TVObserver.py +++ b/src/Mod/Show/TVObserver.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -22,6 +22,7 @@ import FreeCAD + class TVObserver(object): def __init__(self): FreeCAD.addDocumentObserver(self) @@ -31,18 +32,22 @@ class TVObserver(object): def slotStartSaveDocument(self, doc, filepath): from . import TVStack + TVStack._slotStartSaveDocument(doc) def slotFinishSaveDocument(self, doc, filepath): from . import TVStack + TVStack._slotFinishSaveDocument(doc) def slotDeletedDocument(self, doc): from . import TVStack + TVStack._slotDeletedDocument(doc) -#handle module reload -if 'observer_singleton' in vars(): + +# handle module reload +if "observer_singleton" in vars(): observer_singleton.stop() observer_singleton = TVObserver() diff --git a/src/Mod/Show/TVStack.py b/src/Mod/Show/TVStack.py index b803e60acf..62d4f8085f 100644 --- a/src/Mod/Show/TVStack.py +++ b/src/Mod/Show/TVStack.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -22,11 +22,12 @@ import weakref -global_stacks = {} # dict of TVStacks. key = document name. +global_stacks = {} # dict of TVStacks. key = document name. + class TVStack(object): - index_LUT = None # Key = id(tempovis_instance). Value = index in the stack. - stack = None #list of weakrefs to TV instances. Using weakrefs, so that TempoVis can self-destruct if forgotten. + index_LUT = None # Key = id(tempovis_instance). Value = index in the stack. + stack = None # list of weakrefs to TV instances. Using weakrefs, so that TempoVis can self-destruct if forgotten. document = None _rewind_tv = None @@ -35,13 +36,13 @@ class TVStack(object): self.document = None self.index_LUT = {} self.stack = [] - from . import TVObserver #to start the observer + from . import TVObserver # to start the observer - def insert(self, tv, index = None): + def insert(self, tv, index=None): if index is None: index = len(self.stack) idtv = id(tv) - ref = weakref.ref(tv, (lambda _, idtv=idtv, self=self : self._destruction(idtv))) + ref = weakref.ref(tv, (lambda _, idtv=idtv, self=self: self._destruction(idtv))) self.stack.insert(index, ref) self.rebuild_index(index) @@ -53,7 +54,7 @@ class TVStack(object): try: index = self.index_LUT.get(idtv) except KeyError: - #already withdrawn + # already withdrawn pass else: self.stack.pop(index) @@ -83,20 +84,19 @@ class TVStack(object): from . import mTempoVis index = self.index_LUT[id(tv)] if tv is not None else -1 - for tvref in self.stack[index + 1 : ]: + for tvref in self.stack[index + 1 :]: tv = tvref() if tv.state == mTempoVis.S_ACTIVE: if tv.has(detail): return (tv, tv.data[detail.full_key]) return None - def rebuild_index(self, start = 0): + def rebuild_index(self, start=0): if start == 0: self.index_LUT = {} for i in range(start, len(self.stack)): self.index_LUT[id(self.stack[i]())] = i - def purge_dead(self): """removes dead TV instances from the stack""" n = 0 @@ -117,9 +117,11 @@ class TVStack(object): def unwindForSaving(self): from . import mTempoVis - self.rewindAfterSaving() #just in case there was a failed save before. + self.rewindAfterSaving() # just in case there was a failed save before. - details = {} #dict of detail original values. Key = detail key; value = detail instance with data representing the original value + details = ( + {} + ) # dict of detail original values. Key = detail key; value = detail instance with data representing the original value for ref in self.stack: tv = ref() for key, detail in tv.data.items(): @@ -139,9 +141,11 @@ class TVStack(object): def getSplitSequence(self, tv): """getSplitSequence(tv): returns (list_before, list_after), neither list includes tv.""" index = self.index_LUT[id(tv)] + def deref(lst): return [ref() for ref in lst] - return deref(self.stack[0:index]), deref(self.stack[index+1:]) + + return deref(self.stack[0:index]), deref(self.stack[index + 1 :]) def __getitem__(self, index): return self.stack[index]() @@ -165,7 +169,7 @@ class TVStack(object): return [ref() for ref in self.stack if ref().tag == tag] -def mainStack(document, create_if_missing = True): +def mainStack(document, create_if_missing=True): """mainStack(document, create_if_missing = True):returns the main TVStack instance for provided document""" docname = document.Name @@ -175,18 +179,21 @@ def mainStack(document, create_if_missing = True): return global_stacks.get(docname, None) + def _slotDeletedDocument(document): docname = document.Name stk = global_stacks.pop(docname, None) if stk is not None: stk.dissolve() + def _slotStartSaveDocument(doc): - stk = mainStack(doc, create_if_missing= False) + stk = mainStack(doc, create_if_missing=False) if stk is not None: stk.unwindForSaving() + def _slotFinishSaveDocument(doc): - stk = mainStack(doc, create_if_missing= False) + stk = mainStack(doc, create_if_missing=False) if stk is not None: stk.rewindAfterSaving() diff --git a/src/Mod/Show/__init__.py b/src/Mod/Show/__init__.py index 81be83add6..79f24b93c0 100644 --- a/src/Mod/Show/__init__.py +++ b/src/Mod/Show/__init__.py @@ -1,4 +1,4 @@ __doc__ = "Show module: helper code for visibility automation." from .mTempoVis import TempoVis -from . import DepGraphTools \ No newline at end of file +from . import DepGraphTools diff --git a/src/Mod/Show/mTempoVis.py b/src/Mod/Show/mTempoVis.py index 28de095b4a..f611b15ec1 100644 --- a/src/Mod/Show/mTempoVis.py +++ b/src/Mod/Show/mTempoVis.py @@ -1,4 +1,4 @@ -#/*************************************************************************** +# /*************************************************************************** # * Copyright (c) 2016 Victor Titov (DeepSOIC) * # * * # * This file is part of the FreeCAD CAx development system. * @@ -27,6 +27,7 @@ from . import Containers from . import TVStack import FreeCAD as App + if App.GuiUp: import FreeCADGui as Gui Wrn = lambda msg: App.Console.PrintWarning(msg + "\n") @@ -35,27 +36,36 @@ Log = lambda msg: App.Console.PrintLog(msg + "\n") from copy import copy -S_EMPTY = 0 # TV is initialized, but no changes were done through it -S_ACTIVE = 1 # TV has something to be undone -S_RESTORED = 2 # TV has been restored -S_INTERNAL = 3 # TV instance is being used by another TV instance as a redo data storage +S_EMPTY = 0 # TV is initialized, but no changes were done through it +S_ACTIVE = 1 # TV has something to be undone +S_RESTORED = 2 # TV has been restored +S_INTERNAL = 3 # TV instance is being used by another TV instance as a redo data storage + def _printTraceback(err): import sys + if err is sys.exc_info()[1]: import traceback + tb = traceback.format_exc() Log(tb) + class MAINSTACK(object): - '''it's just a default value definition for TV constructor''' - pass -class JUST_SAVE(object): - '''it's just a default value meaning "save current scene value but don't modify anything"''' + """it's just a default value definition for TV constructor""" + pass + +class JUST_SAVE(object): + '''it's just a default value meaning "save current scene value but don't modify anything"''' + + pass + + class TempoVis(object): - '''TempoVis - helper object to save visibilities of objects before doing + """TempoVis - helper object to save visibilities of objects before doing some GUI editing, hiding or showing relevant stuff during edit, and then restoring all visibilities after editing. @@ -69,25 +79,25 @@ class TempoVis(object): MAINSTACK special value (a global stack for the document will be used), or None (then, the TV is not in any stack, and can be manually instertd into one if desired). - Any additional keyword args are assigned as attributes. You can use it to immediately set a tag, for example.''' + Any additional keyword args are assigned as attributes. You can use it to immediately set a tag, for example.""" document = None - stack = None # reference to stack this TV is in + stack = None # reference to stack this TV is in - data = None # dict. key = ("class_id","key"), value = instance of SceneDetail - data_requested = None #same as data, but stores (wanted) values passed to modify() + data = None # dict. key = ("class_id","key"), value = instance of SceneDetail + data_requested = None # same as data, but stores (wanted) values passed to modify() state = S_EMPTY - tag = '' #stores any user-defined string for identification purposes + tag = "" # stores any user-defined string for identification purposes def _init_attrs(self): - '''initialize member variables to empty values (needed because we can't use mutable initial values when initializing member variables in class definition)''' + """initialize member variables to empty values (needed because we can't use mutable initial values when initializing member variables in class definition)""" self.data = {} self.data_requested = {} - # - def __init__(self, document, stack = MAINSTACK, **kwargs): + # + def __init__(self, document, stack=MAINSTACK, **kwargs): self._init_attrs() self.document = document @@ -99,40 +109,40 @@ class TempoVis(object): else: stack.insert(self) - for key,val in kwargs.items(): + for key, val in kwargs.items(): setattr(self, key, val) def __del__(self): if self.state == S_ACTIVE: - self.restore(ultimate= True) + self.restore(ultimate=True) def has(self, detail): - '''has(self, detail): returns True if this TV has this detail value saved. - example: tv.has(VProperty(obj, "Visibility"))''' + """has(self, detail): returns True if this TV has this detail value saved. + example: tv.has(VProperty(obj, "Visibility"))""" return detail.full_key in self.data def stored_val(self, detail): - '''stored_val(self, detail): returns value of detail remembered by this TV. If not, raises KeyError.''' + """stored_val(self, detail): returns value of detail remembered by this TV. If not, raises KeyError.""" return self.data[detail.full_key].data - def save(self, detail, mild_restore = False): - '''save(detail, mild_restore = False):saves the scene detail to be restored. + def save(self, detail, mild_restore=False): + """save(detail, mild_restore = False):saves the scene detail to be restored. The detail is saved only once; repeated calls are ignored. - mild_restore: internal, do not use.''' + mild_restore: internal, do not use.""" self._change() if not detail.full_key in self.data: - #not saved yet - tv1, curr = self._value_after(detail, query_scene= True) + # not saved yet + tv1, curr = self._value_after(detail, query_scene=True) self.data[detail.full_key] = copy(curr) self.data[detail.full_key].mild_restore = mild_restore else: - #saved already. Change restore policy, if necessary. + # saved already. Change restore policy, if necessary. stored_dt = self.data[detail.full_key] if not mild_restore: stored_dt.mild_restore = False - def modify(self, detail, mild_restore = None): - '''modify(detail, mild_restore = True): modifies scene detail through this TV. + def modify(self, detail, mild_restore=None): + """modify(detail, mild_restore = True): modifies scene detail through this TV. The value is provided as an instance of SceneDetail implementation. The procedure takes care to account for the stack - that is, if in a TV applied later than this one this detail was changed too, the value saved therein is altered, @@ -141,7 +151,7 @@ class TempoVis(object): mild_restore: if True, when restoring later, checks if the value was changed by user after last call to modify(), and doesn't restore if it was changed. - Example: tv.modify(VProperty(obj, "Visibility", True))''' + Example: tv.modify(VProperty(obj, "Visibility", True))""" self._change() @@ -162,36 +172,35 @@ class TempoVis(object): if detail.mild_restore: self.data_requested[detail.full_key] = copy(detail) - def restoreDetail(self, detail, ultimate = False): - '''restoreDetail(detail, ultimate = False): restores a specific scene detail. + def restoreDetail(self, detail, ultimate=False): + """restoreDetail(detail, ultimate = False): restores a specific scene detail. ultimate: if true, the saved value is cleaned out. If the detail is not found, nothing is done. - ''' + """ if not self.has(detail): return self._restore_detail(detail) if ultimate: self.forgetDetail(detail) - def forgetDetail(self, detail): - '''forgetDetail(detail): ditches a saved detail value, making the change done through this TV permanent.''' + """forgetDetail(detail): ditches a saved detail value, making the change done through this TV permanent.""" self.data.pop(detail.full_key, None) self.data_requested.pop(detail.full_key, None) def forget(self): - '''forget(self): clears this TV, making all changes done through it permanent. - Also, withdraws the TV from the stack.''' + """forget(self): clears this TV, making all changes done through it permanent. + Also, withdraws the TV from the stack.""" self.state = S_EMPTY self.data = {} if self.is_in_stack: self.stack.withdraw(self) - def restore(self, ultimate = True): - '''restore(ultimate = True): undoes all changes done through this tempovis / restores saved scene details. + def restore(self, ultimate=True): + """restore(ultimate = True): undoes all changes done through this tempovis / restores saved scene details. ultimate: if true, the saved values are cleaned out, and the TV is withdrawn from the stack. If false, the TV will still remember stuff, and restore can be called again. - ''' + """ if self.state == S_RESTORED: return @@ -202,49 +211,59 @@ class TempoVis(object): try: self._restoreDetail(detail) except Exception as err: - Err("TempoVis.restore: failed to restore detail {key}: {err}".format(key= key, err= str(err))) + Err( + "TempoVis.restore: failed to restore detail {key}: {err}".format( + key=key, err=str(err) + ) + ) _printTraceback(err) if ultimate: self.data = {} if self.is_in_stack: self.stack.withdraw(self) - # + # - # + # def _inserted(self, stack, index): - '''calles when this tv is inserted into a stack''' + """calles when this tv is inserted into a stack""" self.stack = stack + def _withdrawn(self, stack, index): - '''calles when this tv is withdrawn from a stack''' + """calles when this tv is withdrawn from a stack""" self.stack = None + @property def is_in_stack(self): return self.stack is not None - # - # - def modifyVPProperty(self, doc_obj_or_list, prop_names, new_value = JUST_SAVE, mild_restore = None): - '''modifyVPProperty(doc_obj_or_list, prop_names, new_value = JUST_SAVE, mild_restore = None): modifies + # + + # + def modifyVPProperty(self, doc_obj_or_list, prop_names, new_value=JUST_SAVE, mild_restore=None): + """modifyVPProperty(doc_obj_or_list, prop_names, new_value = JUST_SAVE, mild_restore = None): modifies prop_name property of ViewProvider of doc_obj_or_list, and remembers original value of the property. Original values will be restored upon TempoVis deletion, or call to restore(). - mild_restore: test if user changed the value manually when restoring the TV.''' + mild_restore: test if user changed the value manually when restoring the TV.""" if self.state == S_RESTORED: Wrn("Attempting to use a TV that has been restored. There must be a problem with code.") return - if not hasattr(doc_obj_or_list, '__iter__'): + if not hasattr(doc_obj_or_list, "__iter__"): doc_obj_or_list = [doc_obj_or_list] - if not isinstance(prop_names,(list,tuple)): + if not isinstance(prop_names, (list, tuple)): prop_names = [prop_names] for doc_obj in doc_obj_or_list: for prop_name in prop_names: if not hasattr(doc_obj.ViewObject, prop_name): - Wrn("TempoVis: object {obj} has no attribute {attr}. Skipped." - .format(obj= doc_obj.Name, attr= prop_name)) + Wrn( + "TempoVis: object {obj} has no attribute {attr}. Skipped.".format( + obj=doc_obj.Name, attr=prop_name + ) + ) continue # Because the introduction of external objects, we shall now @@ -253,71 +272,80 @@ class TempoVis(object): # if doc_obj.Document is not self.document: #ignore objects from other documents # raise ValueError("Document object to be modified does not belong to document TempoVis was made for.") from .SceneDetails.VProperty import VProperty + if new_value is JUST_SAVE: if mild_restore: - Wrn("TempoVis: can't just save a value for mild restore. Saving for hard restore.") + Wrn( + "TempoVis: can't just save a value for mild restore. Saving for hard restore." + ) self.save(VProperty(doc_obj, prop_name, new_value)) else: self.modify(VProperty(doc_obj, prop_name, new_value), mild_restore) def restoreVPProperty(self, doc_obj_or_list, prop_names): - '''restoreVPProperty(doc_obj_or_list, prop_name, new_value): restores specific property changes.''' + """restoreVPProperty(doc_obj_or_list, prop_name, new_value): restores specific property changes.""" from .SceneDetails.VProperty import VProperty - if not hasattr(doc_obj_or_list, '__iter__'): + if not hasattr(doc_obj_or_list, "__iter__"): doc_obj_or_list = [doc_obj_or_list] - if not isinstance(prop_names,(tuple,list)): + if not isinstance(prop_names, (tuple, list)): prop_names = [prop_names] for doc_obj in doc_obj_or_list: for prop_name in prop_names: try: self.restoreDetail(VProperty(doc_obj, prop_name)) except Exception as err: - Err("TempoVis.restore: failed to restore detail {key}: {err}".format(key= key, err= str(err))) + Err( + "TempoVis.restore: failed to restore detail {key}: {err}".format( + key=key, err=str(err) + ) + ) _printTraceback(err) - def saveBodyVisibleFeature(self, doc_obj_or_list): """saveBodyVisibleFeature(self, doc_obj_or_list): saves Visibility of currently visible feature, for every body of PartDesign features in the provided list.""" - if not hasattr(doc_obj_or_list, '__iter__'): + if not hasattr(doc_obj_or_list, "__iter__"): doc_obj_or_list = [doc_obj_or_list] objs = [] bodies = set() for obj in doc_obj_or_list: - body = getattr(obj,'_Body',None) + body = getattr(obj, "_Body", None) if not body or body in bodies: continue bodies.add(body) - feature = getattr(body,'VisibleFeature',None) + feature = getattr(body, "VisibleFeature", None) if feature: objs.append(feature) - self.modifyVPProperty(objs, 'Visibility', JUST_SAVE) + self.modifyVPProperty(objs, "Visibility", JUST_SAVE) return objs - def show(self, doc_obj_or_list, links_too = True, mild_restore = None): - '''show(doc_obj_or_list, links_too = True): shows objects (sets their Visibility to True). + def show(self, doc_obj_or_list, links_too=True, mild_restore=None): + """show(doc_obj_or_list, links_too = True): shows objects (sets their Visibility to True). doc_obj_or_list can be a document object, or a list of document objects. - If links_too is True, all Links of the objects are also hidden, by setting LinkVisibility attribute of each object.''' + If links_too is True, all Links of the objects are also hidden, by setting LinkVisibility attribute of each object.""" doc_obj_or_list = self._3D_objects(doc_obj_or_list) - self.saveBodyVisibleFeature(doc_obj_or_list) #fix implicit hiding of other features by PartDesign not being recorded to TV - self.modifyVPProperty(doc_obj_or_list, 'Visibility', True, mild_restore) + self.saveBodyVisibleFeature( + doc_obj_or_list + ) # fix implicit hiding of other features by PartDesign not being recorded to TV + self.modifyVPProperty(doc_obj_or_list, "Visibility", True, mild_restore) if links_too: - self.modifyVPProperty(doc_obj_or_list, 'LinkVisibility', True, mild_restore) + self.modifyVPProperty(doc_obj_or_list, "LinkVisibility", True, mild_restore) - def hide(self, doc_obj_or_list, links_too = True, mild_restore = None): - '''hide(doc_obj_or_list): hides objects (sets their Visibility to False). doc_obj_or_list can be a document object, or a list of document objects''' + def hide(self, doc_obj_or_list, links_too=True, mild_restore=None): + """hide(doc_obj_or_list): hides objects (sets their Visibility to False). doc_obj_or_list can be a document object, or a list of document objects""" doc_obj_or_list = self._3D_objects(doc_obj_or_list) # no need to saveBodyVisibleFeature here, as no implicit showing will happen - self.modifyVPProperty(doc_obj_or_list, 'Visibility', False, mild_restore) + self.modifyVPProperty(doc_obj_or_list, "Visibility", False, mild_restore) if links_too: - self.modifyVPProperty(doc_obj_or_list, 'LinkVisibility', False, mild_restore) + self.modifyVPProperty(doc_obj_or_list, "LinkVisibility", False, mild_restore) - def get_all_dependent(self, doc_obj, subname = None): - '''get_all_dependent(doc_obj, subname = None): gets all objects that depend on doc_obj. Containers and Links (if subname) required for visibility of the object are excluded from the list.''' + def get_all_dependent(self, doc_obj, subname=None): + """get_all_dependent(doc_obj, subname = None): gets all objects that depend on doc_obj. Containers and Links (if subname) required for visibility of the object are excluded from the list.""" from . import Containers from .Containers import isAContainer from .DepGraphTools import getAllDependencies, getAllDependent + if subname: # a link-path was provided. doc_obj has nothing to do with the object we want # to collect dependencies from. So, replace it with the one pointed by link-path. @@ -329,48 +357,57 @@ class TempoVis(object): # # I don't know why do we need that isAContainer check here, but I'm leaving it, # realthunder must be knowing his business --DeepSOIC - cnt_chain = [ o for o in cnt_chain - if o==cnt_chain[-1] or isAContainer(o, links_too= True) ] + cnt_chain = [ + o for o in cnt_chain if o == cnt_chain[-1] or isAContainer(o, links_too=True) + ] else: cnt_chain = Containers.ContainerChain(doc_obj) return [o for o in getAllDependent(doc_obj) if not o in cnt_chain] def hide_all_dependent(self, doc_obj): - '''hide_all_dependent(doc_obj): hides all objects that depend on doc_obj. Groups, Parts and Bodies are not hidden by this.''' + """hide_all_dependent(doc_obj): hides all objects that depend on doc_obj. Groups, Parts and Bodies are not hidden by this.""" self.hide(self._3D_objects(self.get_all_dependent(doc_obj))) def show_all_dependent(self, doc_obj): - '''show_all_dependent(doc_obj): shows all objects that depend on doc_obj. This method is probably useless.''' + """show_all_dependent(doc_obj): shows all objects that depend on doc_obj. This method is probably useless.""" from .DepGraphTools import getAllDependencies, getAllDependent + self.show(self._3D_objects(getAllDependent(doc_obj))) def restore_all_dependent(self, doc_obj): - '''show_all_dependent(doc_obj): restores original visibilities of all dependent objects.''' + """show_all_dependent(doc_obj): restores original visibilities of all dependent objects.""" from .DepGraphTools import getAllDependencies, getAllDependent - self.restoreVPProperty( getAllDependent(doc_obj), ('Visibility', 'LinkVisibility') ) + + self.restoreVPProperty(getAllDependent(doc_obj), ("Visibility", "LinkVisibility")) def hide_all_dependencies(self, doc_obj): - '''hide_all_dependencies(doc_obj): hides all objects that doc_obj depends on (directly and indirectly).''' + """hide_all_dependencies(doc_obj): hides all objects that doc_obj depends on (directly and indirectly).""" from .DepGraphTools import getAllDependencies, getAllDependent + self.hide(self._3D_objects(getAllDependencies(doc_obj))) def show_all_dependencies(self, doc_obj): - '''show_all_dependencies(doc_obj): shows all objects that doc_obj depends on (directly and indirectly). This method is probably useless.''' + """show_all_dependencies(doc_obj): shows all objects that doc_obj depends on (directly and indirectly). This method is probably useless.""" from .DepGraphTools import getAllDependencies, getAllDependent + self.show(self._3D_objects(getAllDependencies(doc_obj))) - def saveCamera(self, vw = None): + def saveCamera(self, vw=None): self._change() from .SceneDetails.Camera import Camera + self.save(Camera(self.document)) - def restoreCamera(self, ultimate = False): + def restoreCamera(self, ultimate=False): from .SceneDetails.Camera import Camera + dt = Camera(self.document) self.restoreDetail(dt, ultimate) - def setUnpickable(self, doc_obj_or_list, actual_pick_style = 2): #2 is coin.SoPickStyle.UNPICKABLE - '''setUnpickable(doc_obj_or_list, actual_pick_style = 2): sets object unpickable (transparent to clicks). + def setUnpickable( + self, doc_obj_or_list, actual_pick_style=2 + ): # 2 is coin.SoPickStyle.UNPICKABLE + """setUnpickable(doc_obj_or_list, actual_pick_style = 2): sets object unpickable (transparent to clicks). doc_obj_or_list: object or list of objects to alter (App) actual_pick_style: optional parameter, specifying the actual pick style: 0 = regular, 1 = bounding box, 2 (default) = unpickable. @@ -378,12 +415,12 @@ class TempoVis(object): Implementation detail: uses SoPickStyle node. If viewprovider already has a node of this type as direct child, one is used. Otherwise, new one is created and inserted as the very first node, and remains there even after restore()/deleting - tempovis. ''' + tempovis.""" from .SceneDetails.Pickability import Pickability from .ShowUtils import is3DObject - if not hasattr(doc_obj_or_list, '__iter__'): + if not hasattr(doc_obj_or_list, "__iter__"): doc_obj_or_list = [doc_obj_or_list] for doc_obj in doc_obj_or_list: if not is3DObject(doc_obj): @@ -391,8 +428,8 @@ class TempoVis(object): dt = Pickability(doc_obj, actual_pick_style) self.modify(dt) - def clipPlane(self, doc_obj_or_list, enable, placement, offset = 0.02): - '''clipPlane(doc_obj_or_list, enable, placement, offset): slices off the object with a clipping plane. + def clipPlane(self, doc_obj_or_list, enable, placement, offset=0.02): + """clipPlane(doc_obj_or_list, enable, placement, offset): slices off the object with a clipping plane. doc_obj_or_list: object or list of objects to alter (App) enable: True if you want clipping, False if you want to remove clipping: placement: XY plane of local coordinates of the placement is the clipping plane. The placement must be in document's global coordinate system. @@ -400,12 +437,12 @@ class TempoVis(object): Implementation detail: uses SoClipPlane node. If viewprovider already has a node of this type as direct child, one is used. Otherwise, new one is created and - inserted as the very first node. The node is left, but disabled when tempovis is restoring.''' + inserted as the very first node. The node is left, but disabled when tempovis is restoring.""" from .SceneDetails.ObjectClipPlane import ObjectClipPlane from .ShowUtils import is3DObject - if not hasattr(doc_obj_or_list, '__iter__'): + if not hasattr(doc_obj_or_list, "__iter__"): doc_obj_or_list = [doc_obj_or_list] for doc_obj in doc_obj_or_list: if not is3DObject(doc_obj): @@ -415,8 +452,8 @@ class TempoVis(object): @staticmethod def allVisibleObjects(aroundObject): - '''allVisibleObjects(aroundObject): returns list of objects that have to be toggled invisible for only aroundObject to remain. - If a whole container can be made invisible, it is returned, instead of its child objects.''' + """allVisibleObjects(aroundObject): returns list of objects that have to be toggled invisible for only aroundObject to remain. + If a whole container can be made invisible, it is returned, instead of its child objects.""" from .ShowUtils import is3DObject from . import Containers @@ -424,7 +461,7 @@ class TempoVis(object): result = [] for i in range(len(chain)): cnt = chain[i] - cnt_next = chain[i+1] if i+1 < len(chain) else aroundObject + cnt_next = chain[i + 1] if i + 1 < len(chain) else aroundObject container = Containers.Container(cnt) for obj in container.getVisGroupChildren(): if not is3DObject(obj): @@ -434,9 +471,9 @@ class TempoVis(object): result.append(obj) return result - def sketchClipPlane(self, sketch, enable = None, reverted = False): - '''sketchClipPlane(sketch, enable = None): Clips all objects by plane of sketch. - If enable argument is omitted, calling the routine repeatedly will toggle clipping plane.''' + def sketchClipPlane(self, sketch, enable=None, reverted=False): + """sketchClipPlane(sketch, enable = None): Clips all objects by plane of sketch. + If enable argument is omitted, calling the routine repeatedly will toggle clipping plane.""" from .SceneDetails.ClipPlane import ClipPlane @@ -452,32 +489,35 @@ class TempoVis(object): if reverted: pla = pla * App.Rotation(0, 1, 0, 0) - if enable: # clip plane shall be disabled so new placement can be applied + if enable: # clip plane shall be disabled so new placement can be applied self.modify(ClipPlane(doc, 0)) self.modify(ClipPlane(doc, toggle, pla, 0.001)) - sketch.ViewObject.SectionView = enable if enable is not None else not sketch.ViewObject.SectionView + sketch.ViewObject.SectionView = ( + enable if enable is not None else not sketch.ViewObject.SectionView + ) def activateWorkbench(self, wb_name): from .SceneDetails.Workbench import Workbench + self.modify(Workbench(wb_name)) - # + # - # + # def _restoreDetail(self, detail): p = self.data[detail.full_key] - tv1, curr = self._value_after(detail, query_scene= p.mild_restore) + tv1, curr = self._value_after(detail, query_scene=p.mild_restore) if p.mild_restore: if self.data_requested[detail.full_key] != curr: - #the value on the scene doesn't match what was requested through TV. User probably changed it. We don't want to mess it up. + # the value on the scene doesn't match what was requested through TV. User probably changed it. We don't want to mess it up. self._purge_milds(detail) return if tv1 is None: # no other TV has changed this detail later, apply to the scene detail.apply_data(p.data) else: - #modify saved detail of higher TV + # modify saved detail of higher TV tv1.data[detail.full_key].data = p.data def _purge_milds(self, detail): @@ -490,23 +530,24 @@ class TempoVis(object): if tv.data[detail.full_key].mild_restore: tv.forgetDetail(detail) else: - #hard-restoring value encountered, stop + # hard-restoring value encountered, stop break def _change(self): - '''to be called whenever anything is done that is to be restored later.''' + """to be called whenever anything is done that is to be restored later.""" if self.state == S_EMPTY: self.state = S_ACTIVE if self.state == S_RESTORED: Wrn("Attempting to use a TV that has been restored. There must be a problem with code.") self.tv_redo = None - def _value_after(self, detail, query_scene = False): - '''_value_current(detail): returns (tv, detail1). SceneDetail instance holds "current" value of + def _value_after(self, detail, query_scene=False): + """_value_current(detail): returns (tv, detail1). SceneDetail instance holds "current" value of scene detail (current from the context of this TV; i.e. either the current scene status, or the saved state from upper TVs). If no upper TV has saved the detail value, returns either (None, None), or - (None, detail1) if query_scene is True, where detail1 holds value from the scene.''' + (None, detail1) if query_scene is True, where detail1 holds value from the scene.""" + def scene_value(): if query_scene: cpy = copy(detail) @@ -528,7 +569,7 @@ class TempoVis(object): """_3D_objects(doc_obj_or_list): returns list of objects that are in 3d view.""" from .ShowUtils import is3DObject - if not hasattr(doc_obj_or_list, '__iter__'): + if not hasattr(doc_obj_or_list, "__iter__"): doc_obj_or_list = [doc_obj_or_list] return [obj for obj in doc_obj_or_list if is3DObject(obj)] diff --git a/src/Mod/Sketcher/App/Analyse.h b/src/Mod/Sketcher/App/Analyse.h index 3e558c3db0..df06bb26b6 100644 --- a/src/Mod/Sketcher/App/Analyse.h +++ b/src/Mod/Sketcher/App/Analyse.h @@ -53,15 +53,17 @@ struct Constraint_Equal bool operator()(const ConstraintIds& x) const { if (c.First == x.First && c.FirstPos == x.FirstPos && c.Second == x.Second - && c.SecondPos == x.SecondPos) + && c.SecondPos == x.SecondPos) { return true; + } if (c.Second == x.First && c.SecondPos == x.FirstPos && c.First == x.Second - && c.FirstPos == x.SecondPos) + && c.FirstPos == x.SecondPos) { return true; + } return false; } }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_ANALYSE_H +#endif // SKETCHER_ANALYSE_H diff --git a/src/Mod/Sketcher/App/AppSketcher.cpp b/src/Mod/Sketcher/App/AppSketcher.cpp index 62f7b0dfa1..a1190b4c25 100644 --- a/src/Mod/Sketcher/App/AppSketcher.cpp +++ b/src/Mod/Sketcher/App/AppSketcher.cpp @@ -65,14 +65,18 @@ PyMOD_INIT_FUNC(Sketcher) // Add Types to module Base::Interpreter().addType(&Sketcher::ConstraintPy ::Type, sketcherModule, "Constraint"); Base::Interpreter().addType(&Sketcher::SketchPy ::Type, sketcherModule, "Sketch"); - Base::Interpreter().addType( - &Sketcher::ExternalGeometryExtensionPy ::Type, sketcherModule, "ExternalGeometryExtension"); - Base::Interpreter().addType( - &Sketcher::SketchGeometryExtensionPy ::Type, sketcherModule, "SketchGeometryExtension"); - Base::Interpreter().addType( - &Sketcher::GeometryFacadePy ::Type, sketcherModule, "GeometryFacade"); - Base::Interpreter().addType( - &Sketcher::ExternalGeometryFacadePy ::Type, sketcherModule, "ExternalGeometryFacade"); + Base::Interpreter().addType(&Sketcher::ExternalGeometryExtensionPy ::Type, + sketcherModule, + "ExternalGeometryExtension"); + Base::Interpreter().addType(&Sketcher::SketchGeometryExtensionPy ::Type, + sketcherModule, + "SketchGeometryExtension"); + Base::Interpreter().addType(&Sketcher::GeometryFacadePy ::Type, + sketcherModule, + "GeometryFacade"); + Base::Interpreter().addType(&Sketcher::ExternalGeometryFacadePy ::Type, + sketcherModule, + "ExternalGeometryFacade"); // NOTE: To finish the initialization of our own type objects we must diff --git a/src/Mod/Sketcher/App/AppSketcherPy.cpp b/src/Mod/Sketcher/App/AppSketcherPy.cpp index 406dcadb05..05eac05d99 100644 --- a/src/Mod/Sketcher/App/AppSketcherPy.cpp +++ b/src/Mod/Sketcher/App/AppSketcherPy.cpp @@ -42,7 +42,7 @@ public: { add_varargs_method("open", &Module::open); add_varargs_method("insert", &Module::insert); - initialize("This module is the Sketcher module.");// register with Python + initialize("This module is the Sketcher module."); // register with Python } ~Module() override @@ -52,8 +52,9 @@ private: Py::Object open(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -61,8 +62,9 @@ private: Base::FileInfo file(EncodedName.c_str()); // extract extension - if (file.extension().empty()) + if (file.extension().empty()) { throw Py::RuntimeError("No file extension"); + } throw Py::RuntimeError("Unknown file extension"); // return Py::None(); @@ -72,8 +74,9 @@ private: { char* Name; const char* DocName; - if (!PyArg_ParseTuple(args.ptr(), "ets", "utf-8", &Name, &DocName)) + if (!PyArg_ParseTuple(args.ptr(), "ets", "utf-8", &Name, &DocName)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -82,8 +85,9 @@ private: Base::FileInfo file(EncodedName.c_str()); // extract extension - if (file.extension().empty()) + if (file.extension().empty()) { throw Py::RuntimeError("No file extension"); + } App::Document* pcDoc = App::GetApplication().getDocument(DocName); if (!pcDoc) { @@ -115,4 +119,4 @@ PyObject* initModule() } /// @endcond -}// namespace Sketcher +} // namespace Sketcher diff --git a/src/Mod/Sketcher/App/Constraint.cpp b/src/Mod/Sketcher/App/Constraint.cpp index 9e4bfd9cd2..bf4e8e8c23 100644 --- a/src/Mod/Sketcher/App/Constraint.cpp +++ b/src/Mod/Sketcher/App/Constraint.cpp @@ -41,21 +41,21 @@ using namespace Base; TYPESYSTEM_SOURCE(Sketcher::Constraint, Base::Persistence) Constraint::Constraint() - : Value(0.0), - Type(None), - AlignmentType(Undef), - First(GeoEnum::GeoUndef), - FirstPos(PointPos::none), - Second(GeoEnum::GeoUndef), - SecondPos(PointPos::none), - Third(GeoEnum::GeoUndef), - ThirdPos(PointPos::none), - LabelDistance(10.f), - LabelPosition(0.f), - isDriving(true), - InternalAlignmentIndex(-1), - isInVirtualSpace(false), - isActive(true) + : Value(0.0) + , Type(None) + , AlignmentType(Undef) + , First(GeoEnum::GeoUndef) + , FirstPos(PointPos::none) + , Second(GeoEnum::GeoUndef) + , SecondPos(PointPos::none) + , Third(GeoEnum::GeoUndef) + , ThirdPos(PointPos::none) + , LabelDistance(10.f) + , LabelPosition(0.f) + , isDriving(true) + , InternalAlignmentIndex(-1) + , isInVirtualSpace(false) + , isActive(true) { // Initialize a random number generator, to avoid Valgrind false positives. static boost::mt19937 ran; @@ -131,7 +131,7 @@ Quantity Constraint::getPresentationValue() const QuantityFormat format = quantity.getFormat(); format.option = QuantityFormat::None; format.format = QuantityFormat::Default; - format.precision = 6;// QString's default + format.precision = 6; // QString's default quantity.setFormat(format); return quantity; } @@ -147,9 +147,10 @@ void Constraint::Save(Writer& writer) const writer.Stream() << writer.ind() << "Type == InternalAlignment) + if (this->Type == InternalAlignment) { writer.Stream() << "InternalAlignmentType=\"" << (int)AlignmentType << "\" " << "InternalAlignmentIndex=\"" << InternalAlignmentIndex << "\" "; + } writer.Stream() << "Value=\"" << Value << "\" " << "First=\"" << First << "\" " << "FirstPos=\"" << (int)FirstPos << "\" " @@ -181,8 +182,9 @@ void Constraint::Restore(XMLReader& reader) AlignmentType = static_cast( reader.getAttributeAsInteger("InternalAlignmentType")); - if (reader.hasAttribute("InternalAlignmentIndex")) + if (reader.hasAttribute("InternalAlignmentIndex")) { InternalAlignmentIndex = reader.getAttributeAsInteger("InternalAlignmentIndex"); + } } else { AlignmentType = Undef; @@ -195,20 +197,25 @@ void Constraint::Restore(XMLReader& reader) } // Read the distance a constraint label has been moved - if (reader.hasAttribute("LabelDistance")) + if (reader.hasAttribute("LabelDistance")) { LabelDistance = (float)reader.getAttributeAsFloat("LabelDistance"); + } - if (reader.hasAttribute("LabelPosition")) + if (reader.hasAttribute("LabelPosition")) { LabelPosition = (float)reader.getAttributeAsFloat("LabelPosition"); + } - if (reader.hasAttribute("IsDriving")) + if (reader.hasAttribute("IsDriving")) { isDriving = reader.getAttributeAsInteger("IsDriving") ? true : false; + } - if (reader.hasAttribute("IsInVirtualSpace")) + if (reader.hasAttribute("IsInVirtualSpace")) { isInVirtualSpace = reader.getAttributeAsInteger("IsInVirtualSpace") ? true : false; + } - if (reader.hasAttribute("IsActive")) + if (reader.hasAttribute("IsActive")) { isActive = reader.getAttributeAsInteger("IsActive") ? true : false; + } } void Constraint::substituteIndex(int fromGeoId, int toGeoId) diff --git a/src/Mod/Sketcher/App/Constraint.h b/src/Mod/Sketcher/App/Constraint.h index 1e53a23ab2..3b9a806ce6 100644 --- a/src/Mod/Sketcher/App/Constraint.h +++ b/src/Mod/Sketcher/App/Constraint.h @@ -63,7 +63,7 @@ enum ConstraintType : int Block = 17, Diameter = 18, Weight = 19, - NumConstraintTypes// must be the last item! + NumConstraintTypes // must be the last item! }; enum InternalAlignmentType @@ -80,7 +80,7 @@ enum InternalAlignmentType BSplineControlPoint = 9, BSplineKnotPoint = 10, ParabolaFocalAxis = 11, - NumInternalAlignmentType// must be the last item! + NumInternalAlignmentType // must be the last item! }; class SketcherExport Constraint: public Base::Persistence @@ -148,7 +148,7 @@ public: friend class PropertyConstraintList; private: - Constraint(const Constraint&) = default;// only for internal use + Constraint(const Constraint&) = default; // only for internal use private: double Value; @@ -212,7 +212,7 @@ protected: boost::uuids::uuid tag; }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_CONSTRAINT_H +#endif // SKETCHER_CONSTRAINT_H diff --git a/src/Mod/Sketcher/App/ConstraintPyImp.cpp b/src/Mod/Sketcher/App/ConstraintPyImp.cpp index d3ce49c2db..cac0c9bd04 100644 --- a/src/Mod/Sketcher/App/ConstraintPyImp.cpp +++ b/src/Mod/Sketcher/App/ConstraintPyImp.cpp @@ -34,7 +34,7 @@ using namespace Sketcher; -PyObject* ConstraintPy::PyMake(struct _typeobject*, PyObject*, PyObject*)// Python wrapper +PyObject* ConstraintPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of ConstraintPy and the Twin object return new ConstraintPy(new Constraint); @@ -110,10 +110,12 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) this->getConstraintPtr()->Type = InternalAlignment; valid = true; - if (strstr(ConstraintType, "EllipseMajorDiameter")) + if (strstr(ConstraintType, "EllipseMajorDiameter")) { this->getConstraintPtr()->AlignmentType = EllipseMajorDiameter; - else if (strstr(ConstraintType, "EllipseMinorDiameter")) + } + else if (strstr(ConstraintType, "EllipseMinorDiameter")) { this->getConstraintPtr()->AlignmentType = EllipseMinorDiameter; + } else { this->getConstraintPtr()->AlignmentType = Undef; valid = false; @@ -127,7 +129,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) } } // ConstraintType, GeoIndex, Value - if (PyNumber_Check(index_or_value)) {// can be float or int + if (PyNumber_Check(index_or_value)) { // can be float or int Value = PyFloat_AsDouble(index_or_value); bool valid = false; if (strcmp("Distance", ConstraintType) == 0) { @@ -138,8 +140,9 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) if (PyObject_TypeCheck(index_or_value, &(Base::QuantityPy::Type))) { Base::Quantity q = *(static_cast(index_or_value)->getQuantityPtr()); - if (q.getUnit() == Base::Unit::Angle) + if (q.getUnit() == Base::Unit::Angle) { Value = q.getValueAs(Base::Quantity::Radian); + } } this->getConstraintPtr()->Type = Angle; valid = true; @@ -205,10 +208,12 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) valid = true; - if (strstr(ConstraintType, "EllipseFocus1")) + if (strstr(ConstraintType, "EllipseFocus1")) { this->getConstraintPtr()->AlignmentType = EllipseFocus1; - else if (strstr(ConstraintType, "EllipseFocus2")) + } + else if (strstr(ConstraintType, "EllipseFocus2")) { this->getConstraintPtr()->AlignmentType = EllipseFocus2; + } else { this->getConstraintPtr()->AlignmentType = Undef; valid = false; @@ -223,15 +228,16 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) } // ConstraintType, GeoIndex1, GeoIndex2, Value // ConstraintType, GeoIndex, PosIndex, Value - if (PyNumber_Check(index_or_value)) {// can be float or int + if (PyNumber_Check(index_or_value)) { // can be float or int SecondIndex = any_index; Value = PyFloat_AsDouble(index_or_value); if (strcmp("Angle", ConstraintType) == 0) { if (PyObject_TypeCheck(index_or_value, &(Base::QuantityPy::Type))) { Base::Quantity q = *(static_cast(index_or_value)->getQuantityPtr()); - if (q.getUnit() == Base::Unit::Angle) + if (q.getUnit() == Base::Unit::Angle) { Value = q.getValueAs(Base::Quantity::Radian); + } } this->getConstraintPtr()->Type = Angle; this->getConstraintPtr()->First = FirstIndex; @@ -315,8 +321,9 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) this->getConstraintPtr()->ThirdPos = static_cast(intArg4); return 0; } - else if (strstr(ConstraintType, "InternalAlignment")) {// InteralAlignment with - // InternalElementIndex argument + else if (strstr(ConstraintType, + "InternalAlignment")) { // InteralAlignment with + // InternalElementIndex argument this->getConstraintPtr()->Type = InternalAlignment; valid = true; @@ -349,7 +356,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) } } // ConstraintType, GeoIndex1, PosIndex1, GeoIndex2, Value - if (PyNumber_Check(oNumArg4)) {// can be float or int + if (PyNumber_Check(oNumArg4)) { // can be float or int Value = PyFloat_AsDouble(oNumArg4); if (strcmp("Distance", ConstraintType) == 0) { this->getConstraintPtr()->Type = Distance; @@ -363,8 +370,14 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) } PyErr_Clear(); - if (PyArg_ParseTuple( - args, "siiiiO", &ConstraintType, &intArg1, &intArg2, &intArg3, &intArg4, &oNumArg5)) { + if (PyArg_ParseTuple(args, + "siiiiO", + &ConstraintType, + &intArg1, + &intArg2, + &intArg3, + &intArg4, + &oNumArg5)) { // ConstraintType, GeoIndex1, PosIndex1, GeoIndex2, PosIndex2, GeoIndex3 if (PyLong_Check(oNumArg5)) { intArg5 = PyLong_AsLong(oNumArg5); @@ -379,7 +392,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) } } // ConstraintType, GeoIndex1, PosIndex1, GeoIndex2, PosIndex2, Value - if (PyNumber_Check(oNumArg5)) {// can be float or int + if (PyNumber_Check(oNumArg5)) { // can be float or int Value = PyFloat_AsDouble(oNumArg5); bool valid = false; if (strcmp("Distance", ConstraintType) == 0) { @@ -398,8 +411,9 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) if (PyObject_TypeCheck(oNumArg5, &(Base::QuantityPy::Type))) { Base::Quantity q = *(static_cast(oNumArg5)->getQuantityPtr()); - if (q.getUnit() == Base::Unit::Angle) + if (q.getUnit() == Base::Unit::Angle) { Value = q.getValueAs(Base::Quantity::Radian); + } } this->getConstraintPtr()->Type = Angle; valid = true; @@ -408,14 +422,15 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) if (PyObject_TypeCheck(oNumArg5, &(Base::QuantityPy::Type))) { Base::Quantity q = *(static_cast(oNumArg5)->getQuantityPtr()); - if (q.getUnit() == Base::Unit::Angle) + if (q.getUnit() == Base::Unit::Angle) { Value = q.getValueAs(Base::Quantity::Radian); + } } this->getConstraintPtr()->Type = Angle; // valid = true;//non-standard assignment this->getConstraintPtr()->First = intArg1; this->getConstraintPtr()->FirstPos = Sketcher::PointPos::none; - this->getConstraintPtr()->Second = intArg2;// let's goof up all the terminology =) + this->getConstraintPtr()->Second = intArg2; // let's goof up all the terminology =) this->getConstraintPtr()->SecondPos = Sketcher::PointPos::none; this->getConstraintPtr()->Third = intArg3; this->getConstraintPtr()->ThirdPos = static_cast(intArg4); @@ -457,7 +472,7 @@ int ConstraintPy::PyInit(PyObject* args, PyObject* /*kwd*/) return 0; } } - if (PyNumber_Check(index_or_value)) {// can be float or int + if (PyNumber_Check(index_or_value)) { // can be float or int Value = PyFloat_AsDouble(index_or_value); if (strcmp("SnellsLaw", ConstraintType) == 0) { this->getConstraintPtr()->Type = SnellsLaw; @@ -525,25 +540,31 @@ std::string ConstraintPy::representation() const result << "'Parallel'>"; break; case Tangent: - if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef) + if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef) { result << "'Tangent'>"; - else + } + else { result << "'TangentViaPoint'>"; + } break; case Perpendicular: - if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef) + if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef) { result << "'Perpendicular'>"; - else + } + else { result << "'PerpendicularViaPoint'>"; + } break; case Distance: result << "'Distance'>"; break; case Angle: - if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef) + if (this->getConstraintPtr()->Third == GeoEnum::GeoUndef) { result << "'Angle'>"; - else + } + else { result << "'AngleViaPoint'>"; + } break; case Symmetric: result << "'Symmetric'>"; diff --git a/src/Mod/Sketcher/App/ExternalGeometryExtension.h b/src/Mod/Sketcher/App/ExternalGeometryExtension.h index be0998fe49..58a89cfc39 100644 --- a/src/Mod/Sketcher/App/ExternalGeometryExtension.h +++ b/src/Mod/Sketcher/App/ExternalGeometryExtension.h @@ -61,12 +61,12 @@ public: // enum Flag { - Defining = 0,// allow an external geometry to build shape - Frozen = 1, // freeze an external geometry - Detached = 2,// signal the intentions of detaching the geometry from external reference - Missing = 3, // geometry with missing external reference - Sync = 4, // signal the intention to synchronize a frozen geometry - NumFlags // Must be the last type + Defining = 0, // allow an external geometry to build shape + Frozen = 1, // freeze an external geometry + Detached = 2, // signal the intentions of detaching the geometry from external reference + Missing = 3, // geometry with missing external reference + Sync = 4, // signal the intention to synchronize a frozen geometry + NumFlags // Must be the last type }; // END_CREDIT_BLOCK: Credit under LGPL for this block to Zheng, Lei (realthunder) // @@ -133,7 +133,7 @@ private: // }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_EXTERNALGEOMETRYEXTENSION_H +#endif // SKETCHER_EXTERNALGEOMETRYEXTENSION_H diff --git a/src/Mod/Sketcher/App/ExternalGeometryExtensionPyImp.cpp b/src/Mod/Sketcher/App/ExternalGeometryExtensionPyImp.cpp index 5e28b559f7..c5acef78f8 100644 --- a/src/Mod/Sketcher/App/ExternalGeometryExtensionPyImp.cpp +++ b/src/Mod/Sketcher/App/ExternalGeometryExtensionPyImp.cpp @@ -39,8 +39,9 @@ std::string ExternalGeometryExtensionPy::representation() const str << "getName().empty()) + if (!getExternalGeometryExtensionPtr()->getName().empty()) { str << "\'" << getExternalGeometryExtensionPtr()->getName() << "\', "; + } str << "\"" << ref; @@ -102,9 +103,10 @@ PyObject* ExternalGeometryExtensionPy::testFlag(PyObject* args) ExternalGeometryExtension::Flag flagtype; - if (getExternalGeometryExtensionPtr()->getFlagsFromName(flag, flagtype)) + if (getExternalGeometryExtensionPtr()->getFlagsFromName(flag, flagtype)) { return new_reference_to( Py::Boolean(this->getExternalGeometryExtensionPtr()->testFlag(flagtype))); + } PyErr_SetString(PyExc_TypeError, "Flag string does not exist."); return nullptr; diff --git a/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp b/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp index 6149f72113..6cc6efaac8 100644 --- a/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp +++ b/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp @@ -36,52 +36,60 @@ using namespace Sketcher; TYPESYSTEM_SOURCE(Sketcher::ExternalGeometryFacade, Base::BaseClass) ExternalGeometryFacade::ExternalGeometryFacade() - : Geo(nullptr), - SketchGeoExtension(nullptr), - ExternalGeoExtension(nullptr) + : Geo(nullptr) + , SketchGeoExtension(nullptr) + , ExternalGeoExtension(nullptr) {} ExternalGeometryFacade::ExternalGeometryFacade(const Part::Geometry* geometry) : Geo(geometry) { - if (geometry) + if (geometry) { initExtensions(); - else + } + else { THROWM(Base::ValueError, "ExternalGeometryFacade initialized with Geometry null pointer"); + } } std::unique_ptr ExternalGeometryFacade::getFacade(Part::Geometry* geometry) { - if (geometry) + if (geometry) { return std::unique_ptr(new ExternalGeometryFacade(geometry)); - else + } + else { return std::unique_ptr(nullptr); + } } std::unique_ptr ExternalGeometryFacade::getFacade(const Part::Geometry* geometry) { - if (geometry) + if (geometry) { return std::unique_ptr(new ExternalGeometryFacade(geometry)); - else + } + else { return std::unique_ptr(nullptr); + } } void ExternalGeometryFacade::setGeometry(Part::Geometry* geometry) { Geo = geometry; - if (geometry) + if (geometry) { initExtensions(); - else + } + else { THROWM(Base::ValueError, "ExternalGeometryFacade initialized with Geometry null pointer"); + } } void ExternalGeometryFacade::initExtensions() { if (!Geo->hasExtension(SketchGeometryExtension::getClassTypeId())) { - getGeo()->setExtension(std::make_unique());// Create getExtension + getGeo()->setExtension(std::make_unique()); // Create getExtension Base::Console().Warning("%s\nSketcher External Geometry without Geometry Extension: %s \n", boost::uuids::to_string(Geo->getTag()).c_str()); @@ -89,7 +97,8 @@ void ExternalGeometryFacade::initExtensions() if (!Geo->hasExtension(ExternalGeometryExtension::getClassTypeId())) { - getGeo()->setExtension(std::make_unique());// Create getExtension + getGeo()->setExtension( + std::make_unique()); // Create getExtension Base::Console().Warning( "%s\nSketcher External Geometry without ExternalGeometryExtension: %s \n", @@ -105,13 +114,15 @@ void ExternalGeometryFacade::initExtensions() void ExternalGeometryFacade::initExtensions() const { - if (!Geo->hasExtension(SketchGeometryExtension::getClassTypeId())) + if (!Geo->hasExtension(SketchGeometryExtension::getClassTypeId())) { THROWM(Base::ValueError, "ExternalGeometryFacade for const::Geometry without SketchGeometryExtension"); + } - if (!Geo->hasExtension(ExternalGeometryExtension::getClassTypeId())) + if (!Geo->hasExtension(ExternalGeometryExtension::getClassTypeId())) { THROWM(Base::ValueError, "ExternalGeometryFacade for const::Geometry without ExternalGeometryExtension"); + } auto ext = std::static_pointer_cast( Geo->getExtension(SketchGeometryExtension::getClassTypeId()).lock()); diff --git a/src/Mod/Sketcher/App/ExternalGeometryFacade.h b/src/Mod/Sketcher/App/ExternalGeometryFacade.h index fbda7f3c6d..bbcf464121 100644 --- a/src/Mod/Sketcher/App/ExternalGeometryFacade.h +++ b/src/Mod/Sketcher/App/ExternalGeometryFacade.h @@ -57,15 +57,15 @@ class SketcherExport ExternalGeometryFacade: public Base::BaseClass, private: explicit ExternalGeometryFacade(const Part::Geometry* geometry); - ExternalGeometryFacade();// As TYPESYSTEM requirement + ExternalGeometryFacade(); // As TYPESYSTEM requirement friend class ExternalGeometryFacadePy; -public:// Factory methods +public: // Factory methods static std::unique_ptr getFacade(Part::Geometry* geometry); static std::unique_ptr getFacade(const Part::Geometry* geometry); -public:// Utility methods +public: // Utility methods static void ensureSketchGeometryExtensions(Part::Geometry* geometry); static void copyId(const Part::Geometry* src, Part::Geometry* dst); @@ -167,18 +167,20 @@ public: } // Geometry Element - template::type>::value>::type> + template< + typename GeometryT = Part::Geometry, + typename = typename std::enable_if< + std::is_base_of::type>::value>::type> GeometryT* getGeometry() { return dynamic_cast(const_cast(Geo)); } // Geometry Element - template::type>::value>::type> + template< + typename GeometryT = Part::Geometry, + typename = typename std::enable_if< + std::is_base_of::type>::value>::type> GeometryT* getGeometry() const { return dynamic_cast(Geo); @@ -304,7 +306,7 @@ private: }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_GEOMETRYEXTERNALFACADE_H +#endif // SKETCHER_GEOMETRYEXTERNALFACADE_H diff --git a/src/Mod/Sketcher/App/ExternalGeometryFacadePyImp.cpp b/src/Mod/Sketcher/App/ExternalGeometryFacadePyImp.cpp index 2367f40269..1127d31f4d 100644 --- a/src/Mod/Sketcher/App/ExternalGeometryFacadePyImp.cpp +++ b/src/Mod/Sketcher/App/ExternalGeometryFacadePyImp.cpp @@ -48,8 +48,9 @@ std::string ExternalGeometryFacadePy::representation() const return str.str(); } -PyObject* ExternalGeometryFacadePy::PyMake(struct _typeobject*, PyObject*, - PyObject*)// Python wrapper +PyObject* ExternalGeometryFacadePy::PyMake(struct _typeobject*, + PyObject*, + PyObject*) // Python wrapper { // create a new instance of PointPy and the Twin object return new ExternalGeometryFacadePy(new ExternalGeometryFacade()); @@ -150,8 +151,9 @@ Py::String ExternalGeometryFacadePy::getInternalType() const { int internaltypeindex = (int)this->getExternalGeometryFacadePtr()->getInternalType(); - if (internaltypeindex >= InternalType::NumInternalGeometryType) + if (internaltypeindex >= InternalType::NumInternalGeometryType) { throw Py::NotImplementedError("String name of enum not implemented"); + } std::string typestr = SketchGeometryExtension::internaltype2str[internaltypeindex]; @@ -192,8 +194,12 @@ PyObject* ExternalGeometryFacadePy::mirror(PyObject* args) PyErr_Clear(); PyObject* axis; - if (PyArg_ParseTuple( - args, "O!O!", &(Base::VectorPy::Type), &o, &(Base::VectorPy::Type), &axis)) { + if (PyArg_ParseTuple(args, + "O!O!", + &(Base::VectorPy::Type), + &o, + &(Base::VectorPy::Type), + &axis)) { Base::Vector3d pnt = static_cast(o)->value(); Base::Vector3d dir = static_cast(axis)->value(); getExternalGeometryFacadePtr()->mirror(pnt, dir); @@ -208,8 +214,9 @@ PyObject* ExternalGeometryFacadePy::mirror(PyObject* args) PyObject* ExternalGeometryFacadePy::rotate(PyObject* args) { PyObject* o; - if (!PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &o)) + if (!PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &o)) { return nullptr; + } Base::Placement* plm = static_cast(o)->getPlacementPtr(); getExternalGeometryFacadePtr()->rotate(*plm); @@ -241,8 +248,9 @@ PyObject* ExternalGeometryFacadePy::scale(PyObject* args) PyObject* ExternalGeometryFacadePy::transform(PyObject* args) { PyObject* o; - if (!PyArg_ParseTuple(args, "O!", &(Base::MatrixPy::Type), &o)) + if (!PyArg_ParseTuple(args, "O!", &(Base::MatrixPy::Type), &o)) { return nullptr; + } Base::Matrix4D mat = static_cast(o)->value(); getExternalGeometryFacadePtr()->transform(mat); Py_Return; @@ -502,8 +510,9 @@ Py::Boolean ExternalGeometryFacadePy::getConstruction() const void ExternalGeometryFacadePy::setConstruction(Py::Boolean arg) { - if (getExternalGeometryFacadePtr()->getTypeId() != Part::GeomPoint::getClassTypeId()) + if (getExternalGeometryFacadePtr()->getTypeId() != Part::GeomPoint::getClassTypeId()) { getExternalGeometryFacadePtr()->setConstruction(arg); + } } Py::Long ExternalGeometryFacadePy::getGeometryLayerId() const diff --git a/src/Mod/Sketcher/App/GeoEnum.h b/src/Mod/Sketcher/App/GeoEnum.h index ea58f7164f..4a1c546f4d 100644 --- a/src/Mod/Sketcher/App/GeoEnum.h +++ b/src/Mod/Sketcher/App/GeoEnum.h @@ -64,11 +64,11 @@ namespace Sketcher */ enum GeoEnum { - RtPnt = -1, // GeoId of the Root Point - HAxis = -1, // GeoId of the Horizontal Axis - VAxis = -2, // GeoId of the Vertical Axis - RefExt = -3,// Starting GeoID of external geometry ( negative geoIds starting at this index) - GeoUndef = -2000// GeoId of an undefined Geometry (uninitialised or unused GeoId) + RtPnt = -1, // GeoId of the Root Point + HAxis = -1, // GeoId of the Horizontal Axis + VAxis = -2, // GeoId of the Vertical Axis + RefExt = -3, // Starting GeoID of external geometry ( negative geoIds starting at this index) + GeoUndef = -2000 // GeoId of an undefined Geometry (uninitialised or unused GeoId) }; /*! @@ -81,10 +81,10 @@ enum GeoEnum */ enum class PointPos : int { - none = 0, // Edge of a geometry - start = 1,// Starting point of a geometry - end = 2, // End point of a geometry - mid = 3 // Mid point of a geometry + none = 0, // Edge of a geometry + start = 1, // Starting point of a geometry + end = 2, // End point of a geometry + mid = 3 // Mid point of a geometry }; /** @brief Struct for storing a {GeoId, PointPos} pair. @@ -139,8 +139,8 @@ public: // inline constexpr constructor inline constexpr GeoElementId::GeoElementId(int geoId, PointPos pos) - : GeoId(geoId), - Pos(pos) + : GeoId(geoId) + , Pos(pos) {} inline bool GeoElementId::isCurve() const @@ -159,7 +159,7 @@ constexpr const GeoElementId GeoElementId::HAxis = GeoElementId(GeoEnum::HAxis, constexpr const GeoElementId GeoElementId::VAxis = GeoElementId(GeoEnum::VAxis, PointPos::none); #endif -}// namespace Sketcher +} // namespace Sketcher namespace std { @@ -172,6 +172,6 @@ struct less : (static_cast(lhs.Pos) < static_cast(rhs.Pos)); } }; -}// namespace std +} // namespace std -#endif// SKETCHER_GeoEnum_H +#endif // SKETCHER_GeoEnum_H diff --git a/src/Mod/Sketcher/App/GeoList.cpp b/src/Mod/Sketcher/App/GeoList.cpp index 199d7d7de9..33fd95a054 100644 --- a/src/Mod/Sketcher/App/GeoList.cpp +++ b/src/Mod/Sketcher/App/GeoList.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include @@ -39,34 +39,36 @@ using namespace Sketcher; // Vector is moved template GeoListModel::GeoListModel(std::vector&& geometrylist, int intgeocount, bool ownerT) - : geomlist(std::move(geometrylist)), - intGeoCount(intgeocount), - OwnerT(ownerT), - indexInit(false) + : geomlist(std::move(geometrylist)) + , intGeoCount(intgeocount) + , OwnerT(ownerT) + , indexInit(false) {} // Vector is shallow copied (copy constructed) template GeoListModel::GeoListModel(const std::vector& geometrylist, int intgeocount) - : geomlist(geometrylist),// copy constructed here - intGeoCount(intgeocount), - OwnerT(false), - indexInit(false) + : geomlist(geometrylist) + , // copy constructed here + intGeoCount(intgeocount) + , OwnerT(false) + , indexInit(false) {} template GeoListModel::~GeoListModel() { if (OwnerT) { - for (auto& g : geomlist) + for (auto& g : geomlist) { delete g; + } } } template -GeoListModel GeoListModel::getGeoListModel(std::vector&& geometrylist, int intgeocount, - bool ownerT) +GeoListModel +GeoListModel::getGeoListModel(std::vector&& geometrylist, int intgeocount, bool ownerT) { return GeoListModel(std::move(geometrylist), intgeocount, ownerT); } @@ -84,10 +86,12 @@ int GeoListModel::getGeoIdFromGeomListIndex(int index) const { assert(index < int(geomlist.size())); - if (index < intGeoCount) + if (index < intGeoCount) { return index; - else + } + else { return (index - geomlist.size()); + } } template @@ -95,16 +99,20 @@ const Part::Geometry* GeoListModel::getGeometryFromGeoId(const std::vector int geoId) { if constexpr (std::is_same()) { - if (geoId >= 0) + if (geoId >= 0) { return geometrylist[geoId]; - else + } + else { return geometrylist[geometrylist.size() + geoId]; + } } else if constexpr (std::is_same()) { - if (geoId >= 0) + if (geoId >= 0) { return geometrylist[geoId]->getGeometry(); - else + } + else { return geometrylist[geometrylist.size() + geoId]->getGeometry(); + } } } @@ -113,16 +121,20 @@ const Sketcher::GeometryFacade* GeoListModel::getGeometryFacadeFromGeoId(const std::vector& geometrylist, int geoId) { if constexpr (std::is_same()) { - if (geoId >= 0) + if (geoId >= 0) { return GeometryFacade::getFacade(geometrylist[geoId]).release(); - else + } + else { return GeometryFacade::getFacade(geometrylist[geometrylist.size() + geoId]).release(); + } } else if constexpr (std::is_same()) { - if (geoId >= 0) + if (geoId >= 0) { return geometrylist[geoId].get(); - else + } + else { return geometrylist[geometrylist.size() + geoId].get(); + } } } @@ -161,68 +173,87 @@ Base::Vector3d GeoListModel::getPoint(const Part::Geometry* geo, Sketcher::Po if (geo->getTypeId() == Part::GeomPoint::getClassTypeId()) { const Part::GeomPoint* p = static_cast(geo); - if (pos == PointPos::start || pos == PointPos::mid || pos == PointPos::end) + if (pos == PointPos::start || pos == PointPos::mid || pos == PointPos::end) { return p->getPoint(); + } } else if (geo->getTypeId() == Part::GeomLineSegment::getClassTypeId()) { const Part::GeomLineSegment* lineSeg = static_cast(geo); - if (pos == PointPos::start) + if (pos == PointPos::start) { return lineSeg->getStartPoint(); - else if (pos == PointPos::end) + } + else if (pos == PointPos::end) { return lineSeg->getEndPoint(); + } } else if (geo->getTypeId() == Part::GeomCircle::getClassTypeId()) { const Part::GeomCircle* circle = static_cast(geo); - if (pos == PointPos::mid) + if (pos == PointPos::mid) { return circle->getCenter(); + } } else if (geo->getTypeId() == Part::GeomEllipse::getClassTypeId()) { const Part::GeomEllipse* ellipse = static_cast(geo); - if (pos == PointPos::mid) + if (pos == PointPos::mid) { return ellipse->getCenter(); + } } else if (geo->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) { const Part::GeomArcOfCircle* aoc = static_cast(geo); - if (pos == PointPos::start) + if (pos == PointPos::start) { return aoc->getStartPoint(/*emulateCCW=*/true); - else if (pos == PointPos::end) + } + else if (pos == PointPos::end) { return aoc->getEndPoint(/*emulateCCW=*/true); - else if (pos == PointPos::mid) + } + else if (pos == PointPos::mid) { return aoc->getCenter(); + } } else if (geo->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId()) { const Part::GeomArcOfEllipse* aoc = static_cast(geo); - if (pos == PointPos::start) + if (pos == PointPos::start) { return aoc->getStartPoint(/*emulateCCW=*/true); - else if (pos == PointPos::end) + } + else if (pos == PointPos::end) { return aoc->getEndPoint(/*emulateCCW=*/true); - else if (pos == PointPos::mid) + } + else if (pos == PointPos::mid) { return aoc->getCenter(); + } } else if (geo->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId()) { const Part::GeomArcOfHyperbola* aoh = static_cast(geo); - if (pos == PointPos::start) + if (pos == PointPos::start) { return aoh->getStartPoint(); - else if (pos == PointPos::end) + } + else if (pos == PointPos::end) { return aoh->getEndPoint(); - else if (pos == PointPos::mid) + } + else if (pos == PointPos::mid) { return aoh->getCenter(); + } } else if (geo->getTypeId() == Part::GeomArcOfParabola::getClassTypeId()) { const Part::GeomArcOfParabola* aop = static_cast(geo); - if (pos == PointPos::start) + if (pos == PointPos::start) { return aop->getStartPoint(); - else if (pos == PointPos::end) + } + else if (pos == PointPos::end) { return aop->getEndPoint(); - else if (pos == PointPos::mid) + } + else if (pos == PointPos::mid) { return aop->getCenter(); + } } else if (geo->getTypeId() == Part::GeomBSplineCurve::getClassTypeId()) { const Part::GeomBSplineCurve* bsp = static_cast(geo); - if (pos == PointPos::start) + if (pos == PointPos::start) { return bsp->getStartPoint(); - else if (pos == PointPos::end) + } + else if (pos == PointPos::end) { return bsp->getEndPoint(); + } } return Base::Vector3d(); @@ -244,19 +275,24 @@ void GeoListModel::rebuildVertexIndex() const std::forward_as_tuple(pointId++)); }; - if (geomlist.size() <= 2) + if (geomlist.size() <= 2) { return; + } for (auto it = geomlist.begin(); it != geomlist.end(); ++it, geoId++) { Base::Type type; - if constexpr (std::is_same::value) + if constexpr (std::is_same::value) { type = (*it)->getTypeId(); - else if constexpr (std::is_same>::value) + } + else if constexpr (std::is_same>::value) { type = (*it)->getGeometry()->getTypeId(); + } - if (geoId > getInternalCount()) + if (geoId > getInternalCount()) { geoId = -getExternalCount(); + } if (type == Part::GeomPoint::getClassTypeId()) { addGeoElement(geoId, PointPos::start); @@ -286,8 +322,9 @@ void GeoListModel::rebuildVertexIndex() const template Sketcher::GeoElementId GeoListModel::getGeoElementIdFromVertexId(int vertexId) { - if (!indexInit)// lazy initialised + if (!indexInit) { // lazy initialised rebuildVertexIndex(); + } return VertexId2GeoElementId[vertexId]; } @@ -295,14 +332,16 @@ Sketcher::GeoElementId GeoListModel::getGeoElementIdFromVertexId(int vertexId template int GeoListModel::getVertexIdFromGeoElementId(const Sketcher::GeoElementId& geoelementId) const { - if (!indexInit)// lazy initialised + if (!indexInit) { // lazy initialised rebuildVertexIndex(); + } auto found = std::find(VertexId2GeoElementId.begin(), VertexId2GeoElementId.end(), geoelementId); - if (found != VertexId2GeoElementId.end()) + if (found != VertexId2GeoElementId.end()) { return std::distance(found, VertexId2GeoElementId.begin()); + } THROWM(Base::IndexError, "GeoElementId not indexed"); } @@ -314,11 +353,13 @@ namespace Sketcher // Template specialisations template<> GeoListModel::GeoListModel( - std::vector&& geometrylist, int intgeocount, bool ownerT) - : geomlist(std::move(geometrylist)), - intGeoCount(intgeocount), - OwnerT(false), - indexInit(false) + std::vector&& geometrylist, + int intgeocount, + bool ownerT) + : geomlist(std::move(geometrylist)) + , intGeoCount(intgeocount) + , OwnerT(false) + , indexInit(false) { // GeometryFacades hold the responsibility for releasing the resources. // @@ -335,10 +376,11 @@ GeoListModel::GeoListModel( template<> GeoListModel::GeoListModel( - const std::vector& geometrylist, int intgeocount) - : intGeoCount(intgeocount), - OwnerT(false), - indexInit(false) + const std::vector& geometrylist, + int intgeocount) + : intGeoCount(intgeocount) + , OwnerT(false) + , indexInit(false) { // GeometryFacades are movable, but not copiable, so they need to be reconstructed (shallow copy // of vector) Under the Single Responsibility Principle, these will not take over a @@ -383,19 +425,22 @@ template SketcherExport Base::Vector3d GeoListModel::getPoint(const GeoElementId&) const; template SketcherExport GeoListModel GeoListModel::getGeoListModel( - std::vector&& geometrylist, int intgeocount, bool ownerT); + std::vector&& geometrylist, + int intgeocount, + bool ownerT); #endif -}// namespace Sketcher +} // namespace Sketcher GeoListFacade Sketcher::getGeoListFacade(const GeoList& geolist) { std::vector> facade; facade.reserve(geolist.geomlist.size()); - for (auto geo : geolist.geomlist) + for (auto geo : geolist.geomlist) { facade.push_back(GeometryFacade::getFacade(geo)); + } auto geolistfacade = GeoListFacade::getGeoListModel(std::move(facade), geolist.getInternalCount()); diff --git a/src/Mod/Sketcher/App/GeoList.h b/src/Mod/Sketcher/App/GeoList.h index 74b8aa6525..212eaa571c 100644 --- a/src/Mod/Sketcher/App/GeoList.h +++ b/src/Mod/Sketcher/App/GeoList.h @@ -132,8 +132,8 @@ public: * assertion is raised if this happens. The ownership needs to be specified on the GeoListFacade * objects themselves (setOwner method). */ - static GeoListModel getGeoListModel(std::vector&& geometrylist, int intgeocount, - bool ownerT = false); + static GeoListModel + getGeoListModel(std::vector&& geometrylist, int intgeocount, bool ownerT = false); static const GeoListModel getGeoListModel(const std::vector& geometrylist, int intgeocount); @@ -255,7 +255,7 @@ private: bool OwnerT; mutable bool indexInit; mutable std::vector - VertexId2GeoElementId;// these maps a lazy initialised on first demand. + VertexId2GeoElementId; // these maps a lazy initialised on first demand. mutable std::map GeoElementId2VertexId; }; @@ -267,7 +267,7 @@ using GeoListFacade = GeoListModel; GeoListFacade getGeoListFacade(const GeoList& geolist); -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_GeoList_H +#endif // SKETCHER_GeoList_H diff --git a/src/Mod/Sketcher/App/GeometryFacade.cpp b/src/Mod/Sketcher/App/GeometryFacade.cpp index f8c770d8f0..c272d8dcaa 100644 --- a/src/Mod/Sketcher/App/GeometryFacade.cpp +++ b/src/Mod/Sketcher/App/GeometryFacade.cpp @@ -34,42 +34,47 @@ using namespace Sketcher; TYPESYSTEM_SOURCE(Sketcher::GeometryFacade, Base::BaseClass) GeometryFacade::GeometryFacade() - : Geo(nullptr), - OwnerGeo(false), - SketchGeoExtension(nullptr) + : Geo(nullptr) + , OwnerGeo(false) + , SketchGeoExtension(nullptr) {} GeometryFacade::GeometryFacade(const Part::Geometry* geometry, bool owner) - : Geo(geometry), - OwnerGeo(owner) + : Geo(geometry) + , OwnerGeo(owner) { - assert(geometry);// This should never be nullptr, as this constructor is protected + assert(geometry); // This should never be nullptr, as this constructor is protected initExtension(); } GeometryFacade::~GeometryFacade() { - if (OwnerGeo && Geo) + if (OwnerGeo && Geo) { delete Geo; + } } std::unique_ptr GeometryFacade::getFacade(Part::Geometry* geometry, bool owner) { - if (geometry) + if (geometry) { return std::unique_ptr(new GeometryFacade(geometry, owner)); - else + } + else { return std::unique_ptr(nullptr); + } // make_unique has no access to private constructor // return std::make_unique(geometry); } std::unique_ptr GeometryFacade::getFacade(const Part::Geometry* geometry) { - if (geometry) + if (geometry) { return std::unique_ptr(new GeometryFacade(geometry)); - else + } + else { return std::unique_ptr(nullptr); + } // make_unique has no access to private constructor // return std::make_unique(geometry); } @@ -78,17 +83,19 @@ void GeometryFacade::setGeometry(Part::Geometry* geometry) { Geo = geometry; - if (geometry) + if (geometry) { initExtension(); - else + } + else { THROWM(Base::ValueError, "GeometryFacade initialized with Geometry null pointer"); + } } void GeometryFacade::initExtension() { if (!Geo->hasExtension(SketchGeometryExtension::getClassTypeId())) { - getGeo()->setExtension(std::make_unique());// Create getExtension + getGeo()->setExtension(std::make_unique()); // Create getExtension // Base::Console().Warning("%s\nSketcher Geometry without Extension: %s \n", // boost::uuids::to_string(Geo->getTag()).c_str()); @@ -101,10 +108,11 @@ void GeometryFacade::initExtension() void GeometryFacade::initExtension() const { // const Geometry without SketchGeometryExtension cannot initialise a GeometryFacade - if (!Geo->hasExtension(SketchGeometryExtension::getClassTypeId())) + if (!Geo->hasExtension(SketchGeometryExtension::getClassTypeId())) { THROWM(Base::ValueError, "Cannot create a GeometryFacade out of a const Geometry pointer not having a " "SketchGeometryExtension!"); + } auto ext = std::static_pointer_cast( Geo->getExtension(SketchGeometryExtension::getClassTypeId()).lock()); @@ -114,8 +122,9 @@ void GeometryFacade::initExtension() const void GeometryFacade::throwOnNullPtr(const Part::Geometry* geo) { - if (!geo) + if (!geo) { THROWM(Base::ValueError, "Geometry is nullptr!"); + } } void GeometryFacade::ensureSketchGeometryExtension(Part::Geometry* geometry) @@ -123,7 +132,7 @@ void GeometryFacade::ensureSketchGeometryExtension(Part::Geometry* geometry) throwOnNullPtr(geometry); if (!geometry->hasExtension(SketchGeometryExtension::getClassTypeId())) { - geometry->setExtension(std::make_unique());// Create getExtension + geometry->setExtension(std::make_unique()); // Create getExtension } } diff --git a/src/Mod/Sketcher/App/GeometryFacade.h b/src/Mod/Sketcher/App/GeometryFacade.h index 4291ee6cd3..b7aab2ee34 100644 --- a/src/Mod/Sketcher/App/GeometryFacade.h +++ b/src/Mod/Sketcher/App/GeometryFacade.h @@ -113,15 +113,15 @@ class SketcherExport GeometryFacade: public Base::BaseClass, private ISketchGeom protected: explicit GeometryFacade(const Part::Geometry* geometry, bool owner = false); - GeometryFacade();// As TYPESYSTEM requirement + GeometryFacade(); // As TYPESYSTEM requirement friend class GeometryFacadePy; -public:// Factory methods +public: // Factory methods static std::unique_ptr getFacade(Part::Geometry* geometry, bool owner = false); static std::unique_ptr getFacade(const Part::Geometry* geometry); -public:// Utility methods +public: // Utility methods static void ensureSketchGeometryExtension(Part::Geometry* geometry); static void copyId(const Part::Geometry* src, Part::Geometry* dst); static bool getConstruction(const Part::Geometry* geometry); @@ -225,18 +225,20 @@ public: } // Geometry Element - template::type>::value>::type> + template< + typename GeometryT = Part::Geometry, + typename = typename std::enable_if< + std::is_base_of::type>::value>::type> GeometryT* getGeometry() { return dynamic_cast(const_cast(Geo)); } // Geometry Element - template::type>::value>::type> + template< + typename GeometryT = Part::Geometry, + typename = typename std::enable_if< + std::is_base_of::type>::value>::type> const GeometryT* getGeometry() const { return dynamic_cast(Geo); @@ -402,7 +404,7 @@ private: : GeometryFacade() {} -public:// Factory methods +public: // Factory methods static std::unique_ptr> getTypedFacade(GeometryT* geometry, bool owner = false) { @@ -448,7 +450,7 @@ public:// Factory methods }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_GEOMETRYFACADE_H +#endif // SKETCHER_GEOMETRYFACADE_H diff --git a/src/Mod/Sketcher/App/GeometryFacadePyImp.cpp b/src/Mod/Sketcher/App/GeometryFacadePyImp.cpp index 19a6c53903..1aa73bad22 100644 --- a/src/Mod/Sketcher/App/GeometryFacadePyImp.cpp +++ b/src/Mod/Sketcher/App/GeometryFacadePyImp.cpp @@ -48,7 +48,7 @@ std::string GeometryFacadePy::representation() const return str.str(); } -PyObject* GeometryFacadePy::PyMake(struct _typeobject*, PyObject*, PyObject*)// Python wrapper +PyObject* GeometryFacadePy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of PointPy and the Twin object return new GeometryFacadePy(new GeometryFacade()); @@ -86,8 +86,9 @@ Py::String GeometryFacadePy::getInternalType() const { int internaltypeindex = (int)this->getGeometryFacadePtr()->getInternalType(); - if (internaltypeindex >= InternalType::NumInternalGeometryType) + if (internaltypeindex >= InternalType::NumInternalGeometryType) { throw Py::NotImplementedError("String name of enum not implemented"); + } std::string typestr = SketchGeometryExtension::internaltype2str[internaltypeindex]; @@ -124,8 +125,9 @@ PyObject* GeometryFacadePy::testGeometryMode(PyObject* args) GeometryMode::GeometryMode mode; - if (SketchGeometryExtension::getGeometryModeFromName(flag, mode)) + if (SketchGeometryExtension::getGeometryModeFromName(flag, mode)) { return new_reference_to(Py::Boolean(getGeometryFacadePtr()->testGeometryMode(mode))); + } PyErr_SetString(PyExc_TypeError, "Flag string does not exist."); return nullptr; @@ -168,8 +170,12 @@ PyObject* GeometryFacadePy::mirror(PyObject* args) PyErr_Clear(); PyObject* axis; - if (PyArg_ParseTuple( - args, "O!O!", &(Base::VectorPy::Type), &o, &(Base::VectorPy::Type), &axis)) { + if (PyArg_ParseTuple(args, + "O!O!", + &(Base::VectorPy::Type), + &o, + &(Base::VectorPy::Type), + &axis)) { Base::Vector3d pnt = static_cast(o)->value(); Base::Vector3d dir = static_cast(axis)->value(); getGeometryFacadePtr()->mirror(pnt, dir); @@ -184,8 +190,9 @@ PyObject* GeometryFacadePy::mirror(PyObject* args) PyObject* GeometryFacadePy::rotate(PyObject* args) { PyObject* o; - if (!PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &o)) + if (!PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &o)) { return nullptr; + } Base::Placement* plm = static_cast(o)->getPlacementPtr(); getGeometryFacadePtr()->rotate(*plm); @@ -217,8 +224,9 @@ PyObject* GeometryFacadePy::scale(PyObject* args) PyObject* GeometryFacadePy::transform(PyObject* args) { PyObject* o; - if (!PyArg_ParseTuple(args, "O!", &(Base::MatrixPy::Type), &o)) + if (!PyArg_ParseTuple(args, "O!", &(Base::MatrixPy::Type), &o)) { return nullptr; + } Base::Matrix4D mat = static_cast(o)->value(); getGeometryFacadePtr()->transform(mat); Py_Return; diff --git a/src/Mod/Sketcher/App/PreCompiled.h b/src/Mod/Sketcher/App/PreCompiled.h index d39a71f101..36d58d073b 100644 --- a/src/Mod/Sketcher/App/PreCompiled.h +++ b/src/Mod/Sketcher/App/PreCompiled.h @@ -25,6 +25,10 @@ #include +#ifdef _MSC_VER +#pragma warning(disable : 4251) +#endif + #ifdef _PreComp_ // standard @@ -89,6 +93,6 @@ #define NOMINMAX #endif #include -#endif// _PreComp_ +#endif // _PreComp_ #endif diff --git a/src/Mod/Sketcher/App/PropertyConstraintList.cpp b/src/Mod/Sketcher/App/PropertyConstraintList.cpp index a532faa1b7..0cc4fca622 100644 --- a/src/Mod/Sketcher/App/PropertyConstraintList.cpp +++ b/src/Mod/Sketcher/App/PropertyConstraintList.cpp @@ -52,17 +52,20 @@ TYPESYSTEM_SOURCE(Sketcher::PropertyConstraintList, App::PropertyLists) PropertyConstraintList::PropertyConstraintList() - : validGeometryKeys(0), - invalidGeometry(true), - restoreFromTransaction(false), - invalidIndices(false) + : validGeometryKeys(0) + , invalidGeometry(true) + , restoreFromTransaction(false) + , invalidIndices(false) {} PropertyConstraintList::~PropertyConstraintList() { - for (std::vector::iterator it = _lValueList.begin(); it != _lValueList.end(); ++it) - if (*it) + for (std::vector::iterator it = _lValueList.begin(); it != _lValueList.end(); + ++it) { + if (*it) { delete *it; + } + } } App::ObjectIdentifier PropertyConstraintList::makeArrayPath(int idx) @@ -72,9 +75,9 @@ App::ObjectIdentifier PropertyConstraintList::makeArrayPath(int idx) App::ObjectIdentifier PropertyConstraintList::makeSimplePath(const Constraint* c) { - return App::ObjectIdentifier(*this) - << App::ObjectIdentifier::SimpleComponent(App::ObjectIdentifier::String( - c->Name, !ExpressionParser::isTokenAnIndentifier(c->Name))); + return App::ObjectIdentifier(*this) << App::ObjectIdentifier::SimpleComponent( + App::ObjectIdentifier::String(c->Name, + !ExpressionParser::isTokenAnIndentifier(c->Name))); } App::ObjectIdentifier PropertyConstraintList::makePath(int idx, const Constraint* c) @@ -93,12 +96,14 @@ void PropertyConstraintList::setSize(int newSize) } /* Signal removed elements */ - if (!removed.empty()) + if (!removed.empty()) { signalConstraintsRemoved(removed); + } /* Actually delete them */ - for (unsigned int i = newSize; i < _lValueList.size(); i++) + for (unsigned int i = newSize; i < _lValueList.size(); i++) { delete _lValueList[i]; + } /* Resize array to new size */ _lValueList.resize(newSize); @@ -120,8 +125,9 @@ void PropertyConstraintList::set1Value(const int idx, const Constraint* lValue) std::map renamed; renamed[makePath(idx, _lValueList[idx])] = makePath(idx, lValue); - if (!renamed.empty()) + if (!renamed.empty()) { signalConstraintsRenamed(renamed); + } } _lValueList[idx] = newVal; @@ -148,8 +154,9 @@ void PropertyConstraintList::setValue(const Constraint* lValue) } /* Signal rename changes */ - if (!renamed.empty()) + if (!renamed.empty()) { signalConstraintsRenamed(renamed); + } /* Collect info about removals */ for (unsigned int i = start; i < _lValueList.size(); i++) { @@ -158,12 +165,14 @@ void PropertyConstraintList::setValue(const Constraint* lValue) } /* Signal removes */ - if (!removed.empty()) + if (!removed.empty()) { signalConstraintsRemoved(removed); + } // Cleanup - for (unsigned int i = 0; i < _lValueList.size(); i++) + for (unsigned int i = 0; i < _lValueList.size(); i++) { delete _lValueList[i]; + } /* Set new data */ _lValueList.resize(1); @@ -176,8 +185,9 @@ void PropertyConstraintList::setValue(const Constraint* lValue) void PropertyConstraintList::setValues(const std::vector& lValue) { auto copy = lValue; - for (auto& cstr : copy) + for (auto& cstr : copy) { cstr = cstr->clone(); + } setValues(std::move(copy)); } @@ -217,48 +227,55 @@ void PropertyConstraintList::applyValues(std::vector&& lValue) } /* Collect info about removed elements */ - for (auto& v : valueMap) + for (auto& v : valueMap) { removed.insert(makePath(v.second, _lValueList[v.second])); + } /* Update value map with new tags from new array */ valueMap = std::move(newValueMap); /* Signal removes first, in case renamed values below have the same names as some of the removed * ones. */ - if (!removed.empty() && !restoreFromTransaction) + if (!removed.empty() && !restoreFromTransaction) { signalConstraintsRemoved(removed); + } /* Signal renames */ - if (!renamed.empty() && !restoreFromTransaction) + if (!renamed.empty() && !restoreFromTransaction) { signalConstraintsRenamed(renamed); + } _lValueList = std::move(lValue); /* Clean-up; remove old values */ - for (auto& v : oldVals) + for (auto& v : oldVals) { delete v; + } } PyObject* PropertyConstraintList::getPyObject() { PyObject* list = PyList_New(getSize()); - for (int i = 0; i < getSize(); i++) + for (int i = 0; i < getSize(); i++) { PyList_SetItem(list, i, _lValueList[i]->getPyObject()); + } return list; } bool PropertyConstraintList::getPyPathValue(const App::ObjectIdentifier& path, Py::Object& res) const { - if (path.numSubComponents() != 2 || path.getPropertyComponent(0).getName() != getName()) + if (path.numSubComponents() != 2 || path.getPropertyComponent(0).getName() != getName()) { return false; + } const ObjectIdentifier::Component& c1 = path.getPropertyComponent(1); const Constraint* cstr = nullptr; - if (c1.isArray()) + if (c1.isArray()) { cstr = _lValueList[c1.getIndex(_lValueList.size())]; + } else if (c1.isSimple()) { ObjectIdentifier::Component c1 = path.getPropertyComponent(1); for (auto c : _lValueList) { @@ -268,8 +285,9 @@ bool PropertyConstraintList::getPyPathValue(const App::ObjectIdentifier& path, } } } - if (!cstr) + if (!cstr) { return false; + } Quantity q = cstr->getPresentationValue(); res = new Base::QuantityPy(new Base::Quantity(q)); return true; @@ -310,8 +328,9 @@ void PropertyConstraintList::Save(Writer& writer) const { writer.Stream() << writer.ind() << "" << endl; writer.incInd(); - for (int i = 0; i < getSize(); i++) + for (int i = 0; i < getSize(); i++) { _lValueList[i]->Save(writer); + } writer.decInd(); writer.Stream() << writer.ind() << "" << endl; } @@ -362,8 +381,9 @@ void PropertyConstraintList::Paste(const Property& from) unsigned int PropertyConstraintList::getMemSize() const { int size = sizeof(PropertyConstraintList); - for (int i = 0; i < getSize(); i++) + for (int i = 0; i < getSize(); i++) { size += _lValueList[i]->getMemSize(); + } return size; } @@ -372,8 +392,9 @@ void PropertyConstraintList::acceptGeometry(const std::vector& aboutToSetValue(); validGeometryKeys.clear(); validGeometryKeys.reserve(GeoList.size()); - for (const auto& it : GeoList) + for (const auto& it : GeoList) { validGeometryKeys.push_back((it)->getTypeId().getKey()); + } invalidGeometry = false; hasSetValue(); } @@ -406,8 +427,9 @@ bool PropertyConstraintList::checkConstraintIndices(int geomax, int geomin) int maxinternalgeoid = GeoEnum::GeoUndef; auto cmin = [](int previousmin, int cindex) { - if (cindex == GeoEnum::GeoUndef) + if (cindex == GeoEnum::GeoUndef) { return previousmin; + } return (cindex < previousmin) ? cindex : previousmin; }; @@ -427,10 +449,12 @@ bool PropertyConstraintList::checkConstraintIndices(int geomax, int geomin) maxinternalgeoid = cmax(maxinternalgeoid, v->Third); } - if (maxinternalgeoid > geomax || mininternalgeoid < geomin) + if (maxinternalgeoid > geomax || mininternalgeoid < geomin) { invalidIndices = true; - else + } + else { invalidIndices = false; + } return invalidIndices; } @@ -460,10 +484,12 @@ bool PropertyConstraintList::scanGeometry(const std::vector& Ge string PropertyConstraintList::getConstraintName(const std::string& name, int i) { - if (!name.empty()) + if (!name.empty()) { return name; - else + } + else { return getConstraintName(i); + } } string PropertyConstraintList::getConstraintName(int i) @@ -491,24 +517,31 @@ int PropertyConstraintList::getIndexFromConstraintName(const string& name) void PropertyConstraintList::setPathValue(const ObjectIdentifier& path, const boost::any& value) { - if (path.numSubComponents() != 2 || path.getPropertyComponent(0).getName() != getName()) + if (path.numSubComponents() != 2 || path.getPropertyComponent(0).getName() != getName()) { FC_THROWM(Base::ValueError, "invalid constraint path " << path.toString()); + } const ObjectIdentifier::Component& c1 = path.getPropertyComponent(1); double dvalue; - if (value.type() == typeid(double)) + if (value.type() == typeid(double)) { dvalue = boost::any_cast(value); - else if (value.type() == typeid(float)) + } + else if (value.type() == typeid(float)) { dvalue = App::any_cast(value); - else if (value.type() == typeid(long)) + } + else if (value.type() == typeid(long)) { dvalue = App::any_cast(value); - else if (value.type() == typeid(int)) + } + else if (value.type() == typeid(int)) { dvalue = App::any_cast(value); - else if (value.type() == typeid(Quantity)) + } + else if (value.type() == typeid(Quantity)) { dvalue = (App::any_cast(value)).getValue(); - else + } + else { throw std::bad_cast(); + } if (c1.isArray()) { size_t index = c1.getIndex(_lValueList.size()); @@ -550,8 +583,9 @@ void PropertyConstraintList::setPathValue(const ObjectIdentifier& path, const bo const Constraint* PropertyConstraintList::getConstraint(const ObjectIdentifier& path) const { - if (path.numSubComponents() != 2 || path.getPropertyComponent(0).getName() != getName()) + if (path.numSubComponents() != 2 || path.getPropertyComponent(0).getName() != getName()) { FC_THROWM(Base::ValueError, "Invalid constraint path " << path.toString()); + } const ObjectIdentifier::Component& c1 = path.getPropertyComponent(1); @@ -564,8 +598,9 @@ const Constraint* PropertyConstraintList::getConstraint(const ObjectIdentifier& for (std::vector::const_iterator it = _lValueList.begin(); it != _lValueList.end(); ++it) { - if ((*it)->Name == c1.getName()) + if ((*it)->Name == c1.getName()) { return *it; + } } } FC_THROWM(Base::ValueError, "Invalid constraint path " << path.toString()); @@ -578,16 +613,18 @@ const boost::any PropertyConstraintList::getPathValue(const ObjectIdentifier& pa ObjectIdentifier PropertyConstraintList::canonicalPath(const ObjectIdentifier& p) const { - if (p.numSubComponents() != 2 || p.getPropertyComponent(0).getName() != getName()) + if (p.numSubComponents() != 2 || p.getPropertyComponent(0).getName() != getName()) { FC_THROWM(Base::ValueError, "Invalid constraint path " << p.toString()); + } const ObjectIdentifier::Component& c1 = p.getPropertyComponent(1); if (c1.isArray()) { size_t idx = c1.getIndex(); - if (idx < _lValueList.size() && !_lValueList[idx]->Name.empty()) + if (idx < _lValueList.size() && !_lValueList[idx]->Name.empty()) { return ObjectIdentifier(*this) << ObjectIdentifier::SimpleComponent(_lValueList[idx]->Name); + } return p; } else if (c1.isSimple()) { @@ -600,9 +637,10 @@ void PropertyConstraintList::getPaths(std::vector& paths) cons { for (std::vector::const_iterator it = _lValueList.begin(); it != _lValueList.end(); ++it) { - if (!(*it)->Name.empty()) + if (!(*it)->Name.empty()) { paths.push_back(ObjectIdentifier(*this) << ObjectIdentifier::SimpleComponent((*it)->Name)); + } } } diff --git a/src/Mod/Sketcher/App/PropertyConstraintList.h b/src/Mod/Sketcher/App/PropertyConstraintList.h index e08bb85b27..800a4d2f1c 100644 --- a/src/Mod/Sketcher/App/PropertyConstraintList.h +++ b/src/Mod/Sketcher/App/PropertyConstraintList.h @@ -71,19 +71,19 @@ public: /*! Sets a single constraint to the property at a certain - position. The value is cloned inernally so it's in the + position. The value is cloned internally so it's in the responsibility of the caller to free the memory. */ void set1Value(const int idx, const Constraint*); /*! Sets a single constraint to the property. - The value is cloned inernally so it's in the + The value is cloned internally so it's in the responsibility of the caller to free the memory. */ void setValue(const Constraint*); /*! Sets a vector of constraint to the property. - The values of the array are cloned inernally so it's + The values of the array are cloned internally so it's in the responsibility of the caller to free the memory. */ void setValues(const std::vector&); @@ -183,7 +183,7 @@ private: static std::vector _emptyValueList; }; -}// namespace Sketcher +} // namespace Sketcher -#endif// APP_PropertyConstraintList_H +#endif // APP_PropertyConstraintList_H diff --git a/src/Mod/Sketcher/App/PythonConverter.cpp b/src/Mod/Sketcher/App/PythonConverter.cpp index 803337746c..184b770d7b 100644 --- a/src/Mod/Sketcher/App/PythonConverter.cpp +++ b/src/Mod/Sketcher/App/PythonConverter.cpp @@ -24,7 +24,7 @@ #ifndef _PreComp_ #include #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include #include @@ -62,8 +62,9 @@ std::string PythonConverter::convert(const Sketcher::Constraint* constraint) std::string PythonConverter::convert(const std::string& doc, const std::vector& geos) { - if (geos.empty()) + if (geos.empty()) { return std::string(); + } // Generates a list for consecutive geometries of construction type, or of normal type auto printGeoList = [&doc](const std::string& geolist, int ngeos, bool construction) { @@ -235,8 +236,9 @@ PythonConverter::SingleGeometry PythonConverter::process(const Part::Geometry* g auto result = converterMap.find(geo->getTypeId()); - if (result == converterMap.end()) + if (result == converterMap.end()) { THROWM(Base::ValueError, "PythonConverter: Geometry Type not supported") + } auto creator = result->second; @@ -484,8 +486,9 @@ std::string PythonConverter::process(const Sketcher::Constraint* constraint) auto result = converterMap.find(constraint->Type); - if (result == converterMap.end()) + if (result == converterMap.end()) { THROWM(Base::ValueError, "PythonConverter: Constraint Type not supported") + } auto creator = result->second; diff --git a/src/Mod/Sketcher/App/PythonConverter.h b/src/Mod/Sketcher/App/PythonConverter.h index ebab6391f3..ae86ffb798 100644 --- a/src/Mod/Sketcher/App/PythonConverter.h +++ b/src/Mod/Sketcher/App/PythonConverter.h @@ -74,7 +74,7 @@ private: static std::string process(const Sketcher::Constraint* constraint); }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_PythonConverter_H +#endif // SKETCHER_PythonConverter_H diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 43cfc2a038..bab148ca46 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -177,7 +177,7 @@ bool Sketch::analyseBlockedGeometry(const std::vector& internal if (blockisDriving) { if (blockOnly) { - onlyblockedGeometry[geoindex] = true;// we pre-fix this geometry + onlyblockedGeometry[geoindex] = true; // we pre-fix this geometry } else { // we will have to pos-analyse the first diagnose result for these geometries @@ -252,7 +252,7 @@ int Sketch::setUpSketch(const std::vector& GeoList, Base::Console().Log("\n None"); } Base::Console().Log("\n"); -#endif// DEBUG_BLOCK_CONSTRAINT +#endif // DEBUG_BLOCK_CONSTRAINT buildInternalAlignmentGeometryMap(ConstraintList); @@ -327,7 +327,7 @@ int Sketch::setUpSketch(const std::vector& GeoList, } } } -#endif// DEBUG_BLOCK_CONSTRAINT +#endif // DEBUG_BLOCK_CONSTRAINT } // Now we set the Sketch status with the latest solver information @@ -359,7 +359,7 @@ void Sketch::buildInternalAlignmentGeometryMap(const std::vector& c void Sketch::fixParametersAndDiagnose(std::vector& params_to_block) { - if (!params_to_block.empty()) {// only there are parameters to fix + if (!params_to_block.empty()) { // only there are parameters to fix for (auto p : params_to_block) { auto findparam = std::find(Parameters.begin(), Parameters.end(), p); @@ -412,7 +412,7 @@ bool Sketch::analyseBlockedConstraintDependentParameters( param2geoelement.find(*std::next(groups[i].begin(), j))->second.second); } } -#endif// DEBUG_BLOCK_CONSTRAINT +#endif // DEBUG_BLOCK_CONSTRAINT for (size_t i = 0; i < groups.size(); i++) { for (size_t j = 0; j < groups[i].size(); j++) { @@ -444,12 +444,12 @@ bool Sketch::analyseBlockedConstraintDependentParameters( double* thisparam = prop_groups[i].blockable_params_in_group[j]; auto pos = std::find(params_to_block.begin(), params_to_block.end(), thisparam); - if (pos == params_to_block.end()) {// not found, so add + if (pos == params_to_block.end()) { // not found, so add params_to_block.push_back(thisparam); prop_groups[i].blocking_param_in_group = thisparam; #ifdef DEBUG_BLOCK_CONSTRAINT Base::Console().Log("\nTentatively blocking group %d, with param=%x", i, thisparam); -#endif// DEBUG_BLOCK_CONSTRAINT +#endif // DEBUG_BLOCK_CONSTRAINT break; } } @@ -590,7 +590,7 @@ void Sketch::calculateDependentParametersElements() return false; }; - if (pDependencyGroups.size() > 1) {// only if there is more than 1 group + if (pDependencyGroups.size() > 1) { // only if there is more than 1 group size_t endcount = pDependencyGroups.size() - 1; for (size_t i = 0; i < endcount; i++) { @@ -682,48 +682,48 @@ const char* nameByType(Sketch::GeoType type) int Sketch::addGeometry(const Part::Geometry* geo, bool fixed) { - if (geo->getTypeId() == GeomPoint::getClassTypeId()) {// add a point + if (geo->getTypeId() == GeomPoint::getClassTypeId()) { // add a point const GeomPoint* point = static_cast(geo); auto pointf = GeometryFacade::getFacade(point); // create the definition struct for that geom return addPoint(*point, fixed); } - else if (geo->getTypeId() == GeomLineSegment::getClassTypeId()) {// add a line + else if (geo->getTypeId() == GeomLineSegment::getClassTypeId()) { // add a line const GeomLineSegment* lineSeg = static_cast(geo); // create the definition struct for that geom return addLineSegment(*lineSeg, fixed); } - else if (geo->getTypeId() == GeomCircle::getClassTypeId()) {// add a circle + else if (geo->getTypeId() == GeomCircle::getClassTypeId()) { // add a circle const GeomCircle* circle = static_cast(geo); // create the definition struct for that geom return addCircle(*circle, fixed); } - else if (geo->getTypeId() == GeomEllipse::getClassTypeId()) {// add a ellipse + else if (geo->getTypeId() == GeomEllipse::getClassTypeId()) { // add a ellipse const GeomEllipse* ellipse = static_cast(geo); // create the definition struct for that geom return addEllipse(*ellipse, fixed); } - else if (geo->getTypeId() == GeomArcOfCircle::getClassTypeId()) {// add an arc + else if (geo->getTypeId() == GeomArcOfCircle::getClassTypeId()) { // add an arc const GeomArcOfCircle* aoc = static_cast(geo); // create the definition struct for that geom return addArc(*aoc, fixed); } - else if (geo->getTypeId() == GeomArcOfEllipse::getClassTypeId()) {// add an arc + else if (geo->getTypeId() == GeomArcOfEllipse::getClassTypeId()) { // add an arc const GeomArcOfEllipse* aoe = static_cast(geo); // create the definition struct for that geom return addArcOfEllipse(*aoe, fixed); } - else if (geo->getTypeId() == GeomArcOfHyperbola::getClassTypeId()) {// add an arc of hyperbola + else if (geo->getTypeId() == GeomArcOfHyperbola::getClassTypeId()) { // add an arc of hyperbola const GeomArcOfHyperbola* aoh = static_cast(geo); // create the definition struct for that geom return addArcOfHyperbola(*aoh, fixed); } - else if (geo->getTypeId() == GeomArcOfParabola::getClassTypeId()) {// add an arc of parabola + else if (geo->getTypeId() == GeomArcOfParabola::getClassTypeId()) { // add an arc of parabola const GeomArcOfParabola* aop = static_cast(geo); // create the definition struct for that geom return addArcOfParabola(*aop, fixed); } - else if (geo->getTypeId() == GeomBSplineCurve::getClassTypeId()) {// add a bspline + else if (geo->getTypeId() == GeomBSplineCurve::getClassTypeId()) { // add a bspline const GeomBSplineCurve* bsp = static_cast(geo); // Current B-Spline implementation relies on OCCT calculations, so a second solve @@ -1146,7 +1146,7 @@ int Sketch::addArcOfHyperbola(const Part::GeomArcOfHyperbola& hyperbolaSegment, double dist_C_F = sqrt(radmaj * radmaj + radmin * radmin); // solver parameters - Base::Vector3d focus1 = center + dist_C_F * radmajdir;//+x + Base::Vector3d focus1 = center + dist_C_F * radmajdir; //+x double startAngle, endAngle; aoh->getRange(startAngle, endAngle, /*emulateCCW=*/true); @@ -1416,7 +1416,7 @@ int Sketch::addBSpline(const Part::GeomBSplineCurve& bspline, bool fixed) if (weights[i] != 1.0) { lastnotone = weights[i]; } - else {// is 1.0 + else { // is 1.0 lastoneindex = i; countones++; } @@ -1653,7 +1653,7 @@ int Sketch::addEllipse(const Part::GeomEllipse& elip, bool fixed) double dist_C_F = sqrt(radmaj * radmaj - radmin * radmin); // solver parameters - Base::Vector3d focus1 = center + dist_C_F * radmajdir;//+x + Base::Vector3d focus1 = center + dist_C_F * radmajdir; //+x // double *radmin; GCS::Point c; @@ -1663,7 +1663,7 @@ int Sketch::addEllipse(const Part::GeomEllipse& elip, bool fixed) c.x = params[params.size() - 2]; c.y = params[params.size() - 1]; - def.midPointId = Points.size();// this takes midPointId+1 + def.midPointId = Points.size(); // this takes midPointId+1 Points.push_back(c); params.push_back(new double(focus1.x)); @@ -1807,7 +1807,7 @@ Py::Tuple Sketch::getPyGeometry() const int Sketch::checkGeoId(int geoId) const { if (geoId < 0) { - geoId += Geoms.size();// convert negative external-geometry index to index into Geoms + geoId += Geoms.size(); // convert negative external-geometry index to index into Geoms } if (!(geoId >= 0 && geoId < int(Geoms.size()))) { throw Base::IndexError("Sketch::checkGeoId. GeoId index out range."); @@ -1871,7 +1871,7 @@ int Sketch::addConstraint(const Constraint* constraint) switch (constraint->Type) { case DistanceX: - if (constraint->FirstPos == PointPos::none) {// horizontal length of a line + if (constraint->FirstPos == PointPos::none) { // horizontal length of a line c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -1883,7 +1883,7 @@ int Sketch::addConstraint(const Constraint* constraint) rtn = addDistanceXConstraint(constraint->First, c.value, c.driving); } - else if (constraint->Second == GeoEnum::GeoUndef) {// point on fixed x-coordinate + else if (constraint->Second == GeoEnum::GeoUndef) { // point on fixed x-coordinate c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -1898,7 +1898,8 @@ int Sketch::addConstraint(const Constraint* constraint) c.value, c.driving); } - else if (constraint->SecondPos != PointPos::none) {// point to point horizontal distance + else if (constraint->SecondPos + != PointPos::none) { // point to point horizontal distance c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -1917,7 +1918,7 @@ int Sketch::addConstraint(const Constraint* constraint) } break; case DistanceY: - if (constraint->FirstPos == PointPos::none) {// vertical length of a line + if (constraint->FirstPos == PointPos::none) { // vertical length of a line c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -1929,7 +1930,7 @@ int Sketch::addConstraint(const Constraint* constraint) rtn = addDistanceYConstraint(constraint->First, c.value, c.driving); } - else if (constraint->Second == GeoEnum::GeoUndef) {// point on fixed y-coordinate + else if (constraint->Second == GeoEnum::GeoUndef) { // point on fixed y-coordinate c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -1944,7 +1945,7 @@ int Sketch::addConstraint(const Constraint* constraint) c.value, c.driving); } - else if (constraint->SecondPos != PointPos::none) {// point to point vertical distance + else if (constraint->SecondPos != PointPos::none) { // point to point vertical distance c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -1963,10 +1964,10 @@ int Sketch::addConstraint(const Constraint* constraint) } break; case Horizontal: - if (constraint->Second == GeoEnum::GeoUndef) {// horizontal line + if (constraint->Second == GeoEnum::GeoUndef) { // horizontal line rtn = addHorizontalConstraint(constraint->First); } - else {// two points on the same horizontal line + else { // two points on the same horizontal line rtn = addHorizontalConstraint(constraint->First, constraint->FirstPos, constraint->Second, @@ -1974,10 +1975,10 @@ int Sketch::addConstraint(const Constraint* constraint) } break; case Vertical: - if (constraint->Second == GeoEnum::GeoUndef) {// vertical line + if (constraint->Second == GeoEnum::GeoUndef) { // vertical line rtn = addVerticalConstraint(constraint->First); } - else {// two points on the same vertical line + else { // two points on the same vertical line rtn = addVerticalConstraint(constraint->First, constraint->FirstPos, constraint->Second, @@ -2109,7 +2110,7 @@ int Sketch::addConstraint(const Constraint* constraint) break; } case Distance: - if (constraint->SecondPos != PointPos::none) {// point to point distance + if (constraint->SecondPos != PointPos::none) { // point to point distance c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -2129,7 +2130,7 @@ int Sketch::addConstraint(const Constraint* constraint) && constraint->SecondPos == PointPos::none && constraint->Second != GeoEnum::GeoUndef && constraint->Third - == GeoEnum::GeoUndef) {// circle to circle, circle to arc, etc. + == GeoEnum::GeoUndef) { // circle to circle, circle to arc, etc. c.value = new double(constraint->getValue()); if (c.driving) { @@ -2145,7 +2146,7 @@ int Sketch::addConstraint(const Constraint* constraint) c.driving); } else if (constraint->Second != GeoEnum::GeoUndef) { - if (constraint->FirstPos != PointPos::none) {// point to line distance + if (constraint->FirstPos != PointPos::none) { // point to line distance c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -2161,7 +2162,7 @@ int Sketch::addConstraint(const Constraint* constraint) c.driving); } } - else {// line length + else { // line length c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -2213,7 +2214,7 @@ int Sketch::addConstraint(const Constraint* constraint) c.value, c.driving); } - else if (constraint->Second != GeoEnum::GeoUndef) {// angle between two lines + else if (constraint->Second != GeoEnum::GeoUndef) { // angle between two lines c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -2225,7 +2226,7 @@ int Sketch::addConstraint(const Constraint* constraint) rtn = addAngleConstraint(constraint->First, constraint->Second, c.value, c.driving); } - else if (constraint->First != GeoEnum::GeoUndef) {// orientation angle of a line + else if (constraint->First != GeoEnum::GeoUndef) { // orientation angle of a line c.value = new double(constraint->getValue()); if (c.driving) { FixParameters.push_back(c.value); @@ -2371,8 +2372,8 @@ int Sketch::addConstraint(const Constraint* constraint) c.secondvalue, c.driving); } break; - case Sketcher::None: // ambiguous enum value - case Sketcher::Block:// handled separately while adding geometry + case Sketcher::None: // ambiguous enum value + case Sketcher::Block: // handled separately while adding geometry case NumConstraintTypes: break; } @@ -2422,7 +2423,7 @@ int Sketch::addConstraints(const std::vector& ConstraintList, } } else { - ++ConstraintsCounter;// For correct solver redundant reporting + ++ConstraintsCounter; // For correct solver redundant reporting } } @@ -3046,9 +3047,9 @@ int Sketch::addAngleAtPointConstraint(int geoId1, return -1; } - bool avp = geoId3 != GeoEnum::GeoUndef; // is angle-via-point? - bool e2c = pos2 == PointPos::none && pos1 != PointPos::none;// is endpoint-to-curve? - bool e2e = pos2 != PointPos::none && pos1 != PointPos::none;// is endpoint-to-endpoint? + bool avp = geoId3 != GeoEnum::GeoUndef; // is angle-via-point? + bool e2c = pos2 == PointPos::none && pos1 != PointPos::none; // is endpoint-to-curve? + bool e2e = pos2 != PointPos::none && pos1 != PointPos::none; // is endpoint-to-endpoint? if (!(avp || e2c || e2e)) { // assert(0);//none of the three types. Why are we here?? @@ -3087,7 +3088,7 @@ int Sketch::addAngleAtPointConstraint(int geoId1, } GCS::Point& p = Points[pointId]; GCS::Point* p2 = nullptr; - if (e2e) {// we need second point + if (e2e) { // we need second point int pointId = getPointId(geoId2, pos2); if (pointId < 0 || pointId >= int(Points.size())) { Base::Console().Error("addAngleAtPointConstraint: point index out of range.\n"); @@ -3121,7 +3122,8 @@ int Sketch::addAngleAtPointConstraint(int geoId1, angleDesire = M_PI / 2; } - if (*value == 0.0) {// autodetect tangency internal/external (and same for perpendicularity) + if (*value + == 0.0) { // autodetect tangency internal/external (and same for perpendicularity) double angleErr = GCSsys.calculateAngleViaPoint(*crv1, *crv2, p) - angleDesire; // bring angleErr to -pi..pi if (angleErr > M_PI) { @@ -4380,7 +4382,7 @@ int Sketch::solve() int Sketch::internalSolve(std::string& solvername, int level) { - if (!isInitMove) {// make sure we are in single subsystem mode + if (!isInitMove) { // make sure we are in single subsystem mode clearTemporaryConstraints(); isFine = true; } @@ -4390,7 +4392,7 @@ int Sketch::internalSolve(std::string& solvername, int level) int defaultsoltype = -1; if (isInitMove) { - solvername = "DogLeg";// DogLeg is used for dragging (same as before) + solvername = "DogLeg"; // DogLeg is used for dragging (same as before) ret = GCSsys.solve(isFine, GCS::DogLeg); } else { @@ -4400,12 +4402,12 @@ int Sketch::internalSolve(std::string& solvername, int level) ret = GCSsys.solve(isFine, GCS::BFGS); defaultsoltype = 2; break; - case 1:// solving with the LevenbergMarquardt solver + case 1: // solving with the LevenbergMarquardt solver solvername = "LevenbergMarquardt"; ret = GCSsys.solve(isFine, GCS::LevenbergMarquardt); defaultsoltype = 1; break; - case 2:// solving with the BFGS solver + case 2: // solving with the BFGS solver solvername = "DogLeg"; ret = GCSsys.solve(isFine, GCS::DogLeg); defaultsoltype = 0; @@ -4435,11 +4437,11 @@ int Sketch::internalSolve(std::string& solvername, int level) } } - if (!valid_solution && !isInitMove) {// Fall back to other solvers + if (!valid_solution && !isInitMove) { // Fall back to other solvers for (int soltype = 0; soltype < 4; soltype++) { if (soltype == defaultsoltype) { - continue;// skip default solver + continue; // skip default solver } switch (soltype) { @@ -4447,11 +4449,11 @@ int Sketch::internalSolve(std::string& solvername, int level) solvername = "DogLeg"; ret = GCSsys.solve(isFine, GCS::DogLeg); break; - case 1:// solving with the LevenbergMarquardt solver + case 1: // solving with the LevenbergMarquardt solver solvername = "LevenbergMarquardt"; ret = GCSsys.solve(isFine, GCS::LevenbergMarquardt); break; - case 2:// solving with the BFGS solver + case 2: // solving with the BFGS solver solvername = "BFGS"; ret = GCSsys.solve(isFine, GCS::BFGS); break; @@ -4497,7 +4499,7 @@ int Sketch::internalSolve(std::string& solvername, int level) } } - if (soltype == 3) {// cleanup temporary constraints of the augmented system + if (soltype == 3) { // cleanup temporary constraints of the augmented system clearTemporaryConstraints(); } @@ -4523,7 +4525,7 @@ int Sketch::internalSolve(std::string& solvername, int level) break; } - }// soltype + } // soltype } // For OCCT reliant geometry that needs an extra solve() for example to update non-driving @@ -4553,7 +4555,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) if (pos == PointPos::start) { GCS::Point& point = Points[Geoms[geoId].startPointId]; GCS::Point p0; - MoveParameters.resize(2);// px,py + MoveParameters.resize(2); // px,py p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; *p0.x = *point.x; @@ -4563,7 +4565,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) } else if (Geoms[geoId].type == Line) { if (pos == PointPos::start || pos == PointPos::end) { - MoveParameters.resize(2);// x,y + MoveParameters.resize(2); // x,y GCS::Point p0; p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; @@ -4581,7 +4583,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) } } else if (pos == PointPos::none || pos == PointPos::mid) { - MoveParameters.resize(4);// x1,y1,x2,y2 + MoveParameters.resize(4); // x1,y1,x2,y2 GCS::Point p1, p2; p1.x = &MoveParameters[0]; p1.y = &MoveParameters[1]; @@ -4600,7 +4602,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) GCS::Point& center = Points[Geoms[geoId].midPointId]; GCS::Point p0, p1; if (pos == PointPos::mid) { - MoveParameters.resize(2);// cx,cy + MoveParameters.resize(2); // cx,cy p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; *p0.x = *center.x; @@ -4610,7 +4612,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) else if (pos == PointPos::none) { // bool pole = GeometryFacade::isInternalType(Geoms[geoId].geo, // InternalType::BSplineControlPoint); - MoveParameters.resize(4);// x,y,cx,cy - For poles blocking the center + MoveParameters.resize(4); // x,y,cx,cy - For poles blocking the center GCS::Circle& c = Circles[Geoms[geoId].index]; p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; @@ -4631,7 +4633,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) GCS::Point& center = Points[Geoms[geoId].midPointId]; GCS::Point p0, p1; if (pos == PointPos::mid || pos == PointPos::none) { - MoveParameters.resize(2);// cx,cy + MoveParameters.resize(2); // cx,cy p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; *p0.x = *center.x; @@ -4645,7 +4647,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) GCS::Point& center = Points[Geoms[geoId].midPointId]; GCS::Point p0, p1; if (pos == PointPos::mid || pos == PointPos::none) { - MoveParameters.resize(2);// cx,cy + MoveParameters.resize(2); // cx,cy p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; *p0.x = *center.x; @@ -4654,7 +4656,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) } else if (pos == PointPos::start || pos == PointPos::end) { - MoveParameters.resize(4);// x,y,cx,cy + MoveParameters.resize(4); // x,y,cx,cy if (pos == PointPos::start || pos == PointPos::end) { GCS::Point& p = (pos == PointPos::start) ? Points[Geoms[geoId].startPointId] : Points[Geoms[geoId].endPointId]; @@ -4682,7 +4684,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) GCS::Point& center = Points[Geoms[geoId].midPointId]; GCS::Point p0, p1; if (pos == PointPos::mid || pos == PointPos::none) { - MoveParameters.resize(2);// cx,cy + MoveParameters.resize(2); // cx,cy p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; *p0.x = *center.x; @@ -4692,7 +4694,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) } else if (pos == PointPos::start || pos == PointPos::end) { - MoveParameters.resize(4);// x,y,cx,cy + MoveParameters.resize(4); // x,y,cx,cy if (pos == PointPos::start || pos == PointPos::end) { GCS::Point& p = (pos == PointPos::start) ? Points[Geoms[geoId].startPointId] : Points[Geoms[geoId].endPointId]; @@ -4719,7 +4721,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) GCS::Point& center = Points[Geoms[geoId].midPointId]; GCS::Point p0, p1; if (pos == PointPos::mid || pos == PointPos::none) { - MoveParameters.resize(2);// cx,cy + MoveParameters.resize(2); // cx,cy p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; *p0.x = *center.x; @@ -4729,7 +4731,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) } else if (pos == PointPos::start || pos == PointPos::end) { - MoveParameters.resize(4);// x,y,cx,cy + MoveParameters.resize(4); // x,y,cx,cy if (pos == PointPos::start || pos == PointPos::end) { GCS::Point& p = (pos == PointPos::start) ? Points[Geoms[geoId].startPointId] : Points[Geoms[geoId].endPointId]; @@ -4753,7 +4755,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) } else if (Geoms[geoId].type == BSpline) { if (pos == PointPos::start || pos == PointPos::end) { - MoveParameters.resize(2);// x,y + MoveParameters.resize(2); // x,y GCS::Point p0; p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; @@ -4772,7 +4774,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) } else if (pos == PointPos::none || pos == PointPos::mid) { GCS::BSpline& bsp = BSplines[Geoms[geoId].index]; - MoveParameters.resize(bsp.poles.size() * 2);// x0,y0,x1,y1,....xp,yp + MoveParameters.resize(bsp.poles.size() * 2); // x0,y0,x1,y1,....xp,yp int mvindex = 0; for (std::vector::iterator it = bsp.poles.begin(); it != bsp.poles.end(); @@ -4793,7 +4795,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) GCS::Point& center = Points[Geoms[geoId].midPointId]; GCS::Point p0, p1; if (pos == PointPos::mid) { - MoveParameters.resize(2);// cx,cy + MoveParameters.resize(2); // cx,cy p0.x = &MoveParameters[0]; p0.y = &MoveParameters[1]; *p0.x = *center.x; @@ -4801,7 +4803,7 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) GCSsys.addConstraintP2PCoincident(p0, center, GCS::DefaultTemporaryConstraint); } else if (pos == PointPos::start || pos == PointPos::end || pos == PointPos::none) { - MoveParameters.resize(4);// x,y,cx,cy + MoveParameters.resize(4); // x,y,cx,cy if (pos == PointPos::start || pos == PointPos::end) { GCS::Point& p = (pos == PointPos::start) ? Points[Geoms[geoId].startPointId] : Points[Geoms[geoId].endPointId]; @@ -4887,7 +4889,7 @@ int Sketch::initBSplinePieceMove(int geoId, idx += bsp.mult[i]; } - MoveParameters.resize(2 * (bsp.degree + 1));// x[idx],y[idx],x[idx+1],y[idx+1],... + MoveParameters.resize(2 * (bsp.degree + 1)); // x[idx],y[idx],x[idx+1],y[idx+1],... size_t mvindex = 0; auto lastIt = (idx + bsp.degree + 1) % bsp.poles.size(); @@ -5013,7 +5015,7 @@ int Sketch::movePoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool rela else if (pos == PointPos::none || pos == PointPos::mid) { GCS::BSpline& bsp = BSplines[Geoms[geoId].index]; - double cx = 0, cy = 0;// geometric center + double cx = 0, cy = 0; // geometric center for (int i = 0; i < int(InitParameters.size() - 1); i += 2) { cx += InitParameters[i]; cy += InitParameters[i + 1]; @@ -5120,7 +5122,7 @@ TopoShape Sketch::toShape() const mkWire.Add(edge_list.front()); edge_list.pop_front(); - TopoDS_Wire new_wire = mkWire.Wire();// current new wire + TopoDS_Wire new_wire = mkWire.Wire(); // current new wire // try to connect each edge to the wire, the wire is complete if no more edges are // connectible diff --git a/src/Mod/Sketcher/App/Sketch.h b/src/Mod/Sketcher/App/Sketch.h index ad13f7a73c..2014e81ec1 100644 --- a/src/Mod/Sketcher/App/Sketch.h +++ b/src/Mod/Sketcher/App/Sketch.h @@ -75,7 +75,8 @@ public: * constraints or may not */ int setUpSketch(const std::vector& GeoList, - const std::vector& ConstraintList, int extGeoCount = 0); + const std::vector& ConstraintList, + int extGeoCount = 0); /// return the actual geometry of the sketch a TopoShape Part::TopoShape toShape() const; /// add unspecified geometry @@ -165,7 +166,9 @@ public: /** Initializes a B-spline piece drag by setting the current * sketch status as a reference. Only moves piece around `firstPoint`. */ - int initBSplinePieceMove(int geoId, PointPos pos, const Base::Vector3d& firstPoint, + int initBSplinePieceMove(int geoId, + PointPos pos, + const Base::Vector3d& firstPoint, bool fine = true); /** Resets the initialization of a point or curve drag @@ -264,7 +267,11 @@ public: * constraint value and already inserted into either the FixParameters or * Parameters array, as the case may be. */ - int addDistanceXConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, double* value, + int addDistanceXConstraint(int geoId1, + PointPos pos1, + int geoId2, + PointPos pos2, + double* value, bool driving = true); /** * add a vertical distance constraint to two points or line ends @@ -281,7 +288,11 @@ public: * constraint value and already inserted into either the FixParameters or * Parameters array, as the case may be. */ - int addDistanceYConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, double* value, + int addDistanceYConstraint(int geoId1, + PointPos pos1, + int geoId2, + PointPos pos2, + double* value, bool driving = true); /// add a horizontal constraint to a geometry int addHorizontalConstraint(int geoId); @@ -306,7 +317,10 @@ public: * constraint value and already inserted into either the FixParameters or * Parameters array, as the case may be. */ - int addDistanceConstraint(int geoId1, PointPos pos1, int geoId2, double* value, + int addDistanceConstraint(int geoId1, + PointPos pos1, + int geoId2, + double* value, bool driving = true); /** * add a length or distance constraint @@ -315,7 +329,11 @@ public: * constraint value and already inserted into either the FixParameters or * Parameters array, as the case may be. */ - int addDistanceConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, double* value, + int addDistanceConstraint(int geoId1, + PointPos pos1, + int geoId2, + PointPos pos2, + double* value, bool driving = true); /** * add a length or distance constraint @@ -332,13 +350,21 @@ public: int addPerpendicularConstraint(int geoId1, int geoId2); /// add a tangency constraint between two geometries int addTangentConstraint(int geoId1, int geoId2); - int addTangentLineAtBSplineKnotConstraint(int checkedlinegeoId, int checkedbsplinegeoId, + int addTangentLineAtBSplineKnotConstraint(int checkedlinegeoId, + int checkedbsplinegeoId, int checkedknotgeoid); - int addTangentLineEndpointAtBSplineKnotConstraint(int checkedlinegeoId, PointPos endpointPos, + int addTangentLineEndpointAtBSplineKnotConstraint(int checkedlinegeoId, + PointPos endpointPos, int checkedbsplinegeoId, int checkedknotgeoid); - int addAngleAtPointConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, int geoId3, - PointPos pos3, double* value, ConstraintType cTyp, + int addAngleAtPointConstraint(int geoId1, + PointPos pos1, + int geoId2, + PointPos pos2, + int geoId3, + PointPos pos3, + double* value, + ConstraintType cTyp, bool driving = true); /** * add a radius constraint on a circle or an arc @@ -379,7 +405,11 @@ public: * constraint value and already inserted into either the FixParameters or * Parameters array, as the case may be. */ - int addAngleConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, double* value, + int addAngleConstraint(int geoId1, + PointPos pos1, + int geoId2, + PointPos pos2, + double* value, bool driving = true); /** * add angle-via-point constraint between any two curves @@ -388,20 +418,31 @@ public: * constraint value and already inserted into either the FixParameters or * Parameters array, as the case may be. */ - int addAngleViaPointConstraint(int geoId1, int geoId2, int geoId3, PointPos pos3, double value, + int addAngleViaPointConstraint(int geoId1, + int geoId2, + int geoId3, + PointPos pos3, + double value, bool driving = true); /// add an equal length or radius constraints between two lines or between circles and arcs int addEqualConstraint(int geoId1, int geoId2); /// add a point on line constraint int addPointOnObjectConstraint(int geoId1, PointPos pos1, int geoId2, bool driving = true); /// add a point on B-spline constraint: needs a parameter - int addPointOnObjectConstraint(int geoId1, PointPos pos1, int geoId2, double* pointparam, + int addPointOnObjectConstraint(int geoId1, + PointPos pos1, + int geoId2, + double* pointparam, bool driving = true); /// add a symmetric constraint between two points with respect to a line int addSymmetricConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, int geoId3); /// add a symmetric constraint between three points, the last point is in the middle of the /// first two - int addSymmetricConstraint(int geoId1, PointPos pos1, int geoId2, PointPos pos2, int geoId3, + int addSymmetricConstraint(int geoId1, + PointPos pos1, + int geoId2, + PointPos pos2, + int geoId3, PointPos pos3); /** * add a snell's law constraint @@ -414,8 +455,14 @@ public: * second may be initialized to any value, however the solver will * provide n1 in value and n2 in second. */ - int addSnellsLawConstraint(int geoIdRay1, PointPos posRay1, int geoIdRay2, PointPos posRay2, - int geoIdBnd, double* value, double* second, bool driving = true); + int addSnellsLawConstraint(int geoIdRay1, + PointPos posRay1, + int geoIdRay2, + PointPos posRay2, + int geoIdBnd, + double* value, + double* second, + bool driving = true); //@} /// Internal Alignment constraints @@ -460,12 +507,12 @@ public: enum GeoType { None = 0, - Point = 1, // 1 Point(start), 2 Parameters(x,y) - Line = 2, // 2 Points(start,end), 4 Parameters(x1,y1,x2,y2) - Arc = 3, // 3 Points(start,end,mid), (4)+5 Parameters((x1,y1,x2,y2),x,y,r,a1,a2) - Circle = 4, // 1 Point(mid), 3 Parameters(x,y,r) - Ellipse = 5,// 1 Point(mid), 5 Parameters(x,y,r1,r2,phi) - // phi=angle xaxis of ellipse with respect of sketch xaxis + Point = 1, // 1 Point(start), 2 Parameters(x,y) + Line = 2, // 2 Points(start,end), 4 Parameters(x1,y1,x2,y2) + Arc = 3, // 3 Points(start,end,mid), (4)+5 Parameters((x1,y1,x2,y2),x,y,r,a1,a2) + Circle = 4, // 1 Point(mid), 3 Parameters(x,y,r) + Ellipse = 5, // 1 Point(mid), 5 Parameters(x,y,r1,r2,phi) + // phi=angle xaxis of ellipse with respect of sketch xaxis ArcOfEllipse = 6, ArcOfHyperbola = 7, ArcOfParabola = 8, @@ -486,35 +533,35 @@ protected: struct GeoDef { GeoDef() - : geo(nullptr), - type(None), - external(false), - index(-1), - startPointId(-1), - midPointId(-1), - endPointId(-1) + : geo(nullptr) + , type(None) + , external(false) + , index(-1) + , startPointId(-1) + , midPointId(-1) + , endPointId(-1) {} - Part::Geometry* geo;// pointer to the geometry - GeoType type; // type of the geometry - bool external; // flag for external geometries - int index; // index in the corresponding storage vector (Lines, Arcs, Circles, ...) - int startPointId; // index in Points of the start point of this geometry - int midPointId; // index in Points of the start point of this geometry - int endPointId; // index in Points of the end point of this geometry + Part::Geometry* geo; // pointer to the geometry + GeoType type; // type of the geometry + bool external; // flag for external geometries + int index; // index in the corresponding storage vector (Lines, Arcs, Circles, ...) + int startPointId; // index in Points of the start point of this geometry + int midPointId; // index in Points of the start point of this geometry + int endPointId; // index in Points of the end point of this geometry }; /// container element to store and work with the constraints of this sketch struct ConstrDef { ConstrDef() - : constr(nullptr), - driving(true), - value(nullptr), - secondvalue(nullptr) + : constr(nullptr) + , driving(true) + , value(nullptr) + , secondvalue(nullptr) {} - Constraint* constr;// pointer to the constraint + Constraint* constr; // pointer to the constraint bool driving; double* value; - double* secondvalue;// this is needed for SnellsLaw + double* secondvalue; // this is needed for SnellsLaw }; std::vector Geoms; @@ -543,9 +590,9 @@ protected: std::map> param2geoelement; // solving parameters - std::vector Parameters; // with memory allocation - std::vector DrivenParameters;// with memory allocation - std::vector FixParameters; // with memory allocation + std::vector Parameters; // with memory allocation + std::vector DrivenParameters; // with memory allocation + std::vector FixParameters; // with memory allocation std::vector MoveParameters, InitParameters; std::vector Points; std::vector Lines; @@ -757,7 +804,7 @@ private: void fixParametersAndDiagnose(std::vector& params_to_block); }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_SKETCH_H +#endif // SKETCHER_SKETCH_H diff --git a/src/Mod/Sketcher/App/SketchAnalysis.cpp b/src/Mod/Sketcher/App/SketchAnalysis.cpp index 84c530cb9c..b778660929 100644 --- a/src/Mod/Sketcher/App/SketchAnalysis.cpp +++ b/src/Mod/Sketcher/App/SketchAnalysis.cpp @@ -66,13 +66,16 @@ struct SketchAnalysis::Vertex_Less {} bool operator()(const VertexIds& x, const VertexIds& y) const { - if (fabs(x.v.x - y.v.x) > tolerance) + if (fabs(x.v.x - y.v.x) > tolerance) { return x.v.x < y.v.x; - if (fabs(x.v.y - y.v.y) > tolerance) + } + if (fabs(x.v.y - y.v.y) > tolerance) { return x.v.y < y.v.y; - if (fabs(x.v.z - y.v.z) > tolerance) + } + if (fabs(x.v.z - y.v.z) > tolerance) { return x.v.z < y.v.z; - return false;// points are considered to be equal + } + return false; // points are considered to be equal } private: @@ -121,9 +124,10 @@ struct SketchAnalysis::Edge_Less {} bool operator()(const EdgeIds& x, const EdgeIds& y) const { - if (fabs(x.l - y.l) > tolerance) + if (fabs(x.l - y.l) > tolerance) { return x.l < y.l; - return false;// points are considered to be equal + } + return false; // points are considered to be equal } private: @@ -150,15 +154,16 @@ private: int SketchAnalysis::detectMissingPointOnPointConstraints(double precision, bool includeconstruction /*=true*/) { - std::vector vertexIds;// Holds a list of all vertices in the sketch + std::vector vertexIds; // Holds a list of all vertices in the sketch // Build the list of sketch vertices const std::vector& geom = sketch->getInternalGeometry(); for (std::size_t i = 0; i < geom.size(); i++) { auto gf = GeometryFacade::getFacade(geom[i]); - if (gf->getConstruction() && !includeconstruction) + if (gf->getConstruction() && !includeconstruction) { continue; + } if (gf->getGeometry()->getTypeId() == Part::GeomLineSegment::getClassTypeId()) { const Part::GeomLineSegment* segm = @@ -256,7 +261,7 @@ int SketchAnalysis::detectMissingPointOnPointConstraints(double precision, // TODO optimizing by removing constraints not applying on vertices ? } - std::list missingCoincidences;// Holds the list of missing coincidences + std::list missingCoincidences; // Holds the list of missing coincidences std::vector::iterator vt = vertexIds.begin(); Vertex_EqualTo pred(precision); @@ -266,7 +271,7 @@ int SketchAnalysis::detectMissingPointOnPointConstraints(double precision, while (vt < vertexIds.end()) { // Seeking for adjacent group of vertices vt = std::adjacent_find(vt, vertexIds.end(), pred); - if (vt < vertexIds.end()) {// If one found + if (vt < vertexIds.end()) { // If one found std::vector::iterator vn; // Holds a single group of adjacent vertices std::set vertexGrp; @@ -321,16 +326,19 @@ int SketchAnalysis::detectMissingPointOnPointConstraints(double precision, for (std::set& grp : coincVertexGrps) { if ((grp.find(v1) != grp.end()) || (grp.find(v2) != grp.end())) { // If yes add them to the existing group - if (!nv1.empty()) + if (!nv1.empty()) { grp.insert(nv1.value()); - if (!nv2.empty()) + } + if (!nv2.empty()) { grp.insert(nv2.value()); + } continue; } } - if (nv1.empty() || nv2.empty()) + if (nv1.empty() || nv2.empty()) { continue; + } // If no, create a new group of coincident vertices std::set newGrp; @@ -355,7 +363,7 @@ int SketchAnalysis::detectMissingPointOnPointConstraints(double precision, // this group first vertex, and previous group first vertex for (vn = coincVertexGrps.begin() + 1; vn < coincVertexGrps.end(); ++vn) { ConstraintIds id; - id.Type = Coincident;// default point on point restriction + id.Type = Coincident; // default point on point restriction id.v = (vn - 1)->begin()->v; id.First = (vn - 1)->begin()->GeoId; id.FirstPos = (vn - 1)->begin()->PosId; @@ -461,7 +469,7 @@ void SketchAnalysis::makeMissingPointOnPointCoincident(bool onebyone) solvesketch(status, dofs, true); - if (status == -2) {// redundant constraints + if (status == -2) { // redundant constraints sketch->autoRemoveRedundants(false); solvesketch(status, dofs, false); @@ -479,8 +487,9 @@ void SketchAnalysis::makeMissingPointOnPointCoincident(bool onebyone) } } - if (!onebyone) + if (!onebyone) { sketch->addConstraints(constr); + } vertexConstraints.clear(); @@ -548,7 +557,7 @@ void SketchAnalysis::makeMissingVerticalHorizontal(bool onebyone) solvesketch(status, dofs, true); - if (status == -2) {// redundant constraints + if (status == -2) { // redundant constraints sketch->autoRemoveRedundants(false); solvesketch(status, dofs, false); @@ -566,8 +575,9 @@ void SketchAnalysis::makeMissingVerticalHorizontal(bool onebyone) } } - if (!onebyone) + if (!onebyone) { sketch->addConstraints(constr); + } verthorizConstraints.clear(); @@ -735,8 +745,9 @@ void SketchAnalysis::makeMissingEquality(bool onebyone) std::vector constr; std::vector equalities(lineequalityConstraints); - equalities.insert( - equalities.end(), radiusequalityConstraints.begin(), radiusequalityConstraints.end()); + equalities.insert(equalities.end(), + radiusequalityConstraints.begin(), + radiusequalityConstraints.end()); for (std::vector::iterator it = equalities.begin(); it != equalities.end(); @@ -755,7 +766,7 @@ void SketchAnalysis::makeMissingEquality(bool onebyone) solvesketch(status, dofs, true); - if (status == -2) {// redundant constraints + if (status == -2) { // redundant constraints sketch->autoRemoveRedundants(false); solvesketch(status, dofs, false); @@ -773,8 +784,9 @@ void SketchAnalysis::makeMissingEquality(bool onebyone) } } - if (!onebyone) + if (!onebyone) { sketch->addConstraints(constr); + } lineequalityConstraints.clear(); radiusequalityConstraints.clear(); @@ -789,24 +801,27 @@ void SketchAnalysis::solvesketch(int& status, int& dofs, bool updategeo) { status = sketch->solve(updategeo); - if (updategeo) + if (updategeo) { dofs = sketch->setUpSketch(); - else + } + else { dofs = sketch->getLastDoF(); + } - if (sketch->getLastHasRedundancies()) {// redundant constraints + if (sketch->getLastHasRedundancies()) { // redundant constraints status = -2; } - if (dofs < 0) {// over-constrained sketch + if (dofs < 0) { // over-constrained sketch status = -4; } - else if (sketch->getLastHasConflicts()) {// conflicting constraints + else if (sketch->getLastHasConflicts()) { // conflicting constraints status = -3; } } -int SketchAnalysis::autoconstraint(double precision, double angleprecision, +int SketchAnalysis::autoconstraint(double precision, + double angleprecision, bool includeconstruction) { App::Document* doc = sketch->getDocument(); @@ -820,7 +835,7 @@ int SketchAnalysis::autoconstraint(double precision, double angleprecision, solvesketch(status, dofs, true); - if (status) {// it should not be possible at this moment as we start from a clean situation + if (status) { // it should not be possible at this moment as we start from a clean situation THROWMT(Base::RuntimeError, QT_TRANSLATE_NOOP("Exceptions", "Autoconstrain error: Unsolvable sketch without constraints.")); @@ -835,9 +850,10 @@ int SketchAnalysis::autoconstraint(double precision, double angleprecision, // as the solver may move the geometry in the meantime and prevent correct detection int nc = detectMissingPointOnPointConstraints(precision, includeconstruction); - if (nc - > 0)// STAGE 2a: Classify point-on-point into coincidents, endpoint perp, endpoint tangency + if (nc > 0) { // STAGE 2a: Classify point-on-point into coincidents, endpoint perp, endpoint + // tangency analyseMissingPointOnPointCoincident(angleprecision); + } // STAGE 3: Equality constraint detection int ne = detectMissingEqualityConstraints(precision); @@ -860,7 +876,7 @@ int SketchAnalysis::autoconstraint(double precision, double angleprecision, solvesketch(status, dofs, true); - if (status == -2) {// redundants + if (status == -2) { // redundants sketch->autoRemoveRedundants(false); solvesketch(status, dofs, false); } @@ -885,7 +901,7 @@ int SketchAnalysis::autoconstraint(double precision, double angleprecision, solvesketch(status, dofs, true); - if (status == -2) {// redundants + if (status == -2) { // redundants sketch->autoRemoveRedundants(false); solvesketch(status, dofs, false); } @@ -916,7 +932,7 @@ int SketchAnalysis::autoconstraint(double precision, double angleprecision, solvesketch(status, dofs, true); - if (status == -2) {// redundants + if (status == -2) { // redundants sketch->autoRemoveRedundants(false); solvesketch(status, dofs, false); } @@ -968,14 +984,16 @@ int SketchAnalysis::detectDegeneratedGeometries(double tolerance) for (std::size_t i = 0; i < geom.size(); i++) { auto gf = GeometryFacade::getFacade(geom[i]); - if (gf->getConstruction()) + if (gf->getConstruction()) { continue; + } if (gf->getGeometry()->getTypeId().isDerivedFrom(Part::GeomCurve::getClassTypeId())) { Part::GeomCurve* curve = static_cast(gf->getGeometry()); double len = curve->length(curve->getFirstParameter(), curve->getLastParameter()); - if (len < tolerance) + if (len < tolerance) { countDegenerated++; + } } } @@ -989,14 +1007,16 @@ int SketchAnalysis::removeDegeneratedGeometries(double tolerance) for (std::size_t i = 0; i < geom.size(); i++) { auto gf = GeometryFacade::getFacade(geom[i]); - if (gf->getConstruction()) + if (gf->getConstruction()) { continue; + } if (gf->getGeometry()->getTypeId().isDerivedFrom(Part::GeomCurve::getClassTypeId())) { Part::GeomCurve* curve = static_cast(gf->getGeometry()); double len = curve->length(curve->getFirstParameter(), curve->getLastParameter()); - if (len < tolerance) + if (len < tolerance) { delInternalGeometries.insert(static_cast(i)); + } } } diff --git a/src/Mod/Sketcher/App/SketchAnalysis.h b/src/Mod/Sketcher/App/SketchAnalysis.h index f246d3f5bb..c2c951fc99 100644 --- a/src/Mod/Sketcher/App/SketchAnalysis.h +++ b/src/Mod/Sketcher/App/SketchAnalysis.h @@ -153,7 +153,8 @@ public: /// /// It applies coincidents - vertical/horizontal constraints and equality constraints. int autoconstraint(double precision = Precision::Confusion() * 1000, - double angleprecision = M_PI / 8, bool includeconstruction = true); + double angleprecision = M_PI / 8, + bool includeconstruction = true); // helper functions, which may be used by more complex methods, and/or called directly by user // space (python) methods @@ -186,6 +187,6 @@ protected: bool checkVertical(Base::Vector3d dir, double angleprecision); }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_SKETCHANALYSIS_H +#endif // SKETCHER_SKETCHANALYSIS_H diff --git a/src/Mod/Sketcher/App/SketchGeometryExtension.cpp b/src/Mod/Sketcher/App/SketchGeometryExtension.cpp index 8d2b9312f7..848d99bd53 100644 --- a/src/Mod/Sketcher/App/SketchGeometryExtension.cpp +++ b/src/Mod/Sketcher/App/SketchGeometryExtension.cpp @@ -43,15 +43,15 @@ TYPESYSTEM_SOURCE(Sketcher::SketchGeometryExtension, Part::GeometryPersistenceEx std::atomic SketchGeometryExtension::_GeometryID; SketchGeometryExtension::SketchGeometryExtension() - : Id(++SketchGeometryExtension::_GeometryID), - InternalGeometryType(InternalType::None), - GeometryLayer(0) + : Id(++SketchGeometryExtension::_GeometryID) + , InternalGeometryType(InternalType::None) + , GeometryLayer(0) {} SketchGeometryExtension::SketchGeometryExtension(long cid) - : Id(cid), - InternalGeometryType(InternalType::None), - GeometryLayer(0) + : Id(cid) + , InternalGeometryType(InternalType::None) + , GeometryLayer(0) {} void SketchGeometryExtension::copyAttributes(Part::GeometryExtension* cpy) const @@ -68,16 +68,18 @@ void SketchGeometryExtension::restoreAttributes(Base::XMLReader& reader) { Part::GeometryPersistenceExtension::restoreAttributes(reader); - if (reader.hasAttribute("id")) + if (reader.hasAttribute("id")) { Id = reader.getAttributeAsInteger("id"); + } InternalGeometryType = static_cast( reader.getAttributeAsInteger("internalGeometryType")); GeometryModeFlags = GeometryModeFlagType(reader.getAttribute("geometryModeFlags")); - if (reader.hasAttribute("geometryLayer")) + if (reader.hasAttribute("geometryLayer")) { GeometryLayer = reader.getAttributeAsInteger("geometryLayer"); + } } void SketchGeometryExtension::saveAttributes(Base::Writer& writer) const @@ -86,7 +88,7 @@ void SketchGeometryExtension::saveAttributes(Base::Writer& writer) const // This is removed as the stored Id is not used and it may interfere with RT's future // implementation - writer.Stream()// << "\" id=\"" << Id + writer.Stream() // << "\" id=\"" << Id << "\" internalGeometryType=\"" << (int)InternalGeometryType << "\" geometryModeFlags=\"" << GeometryModeFlags.to_string() << "\" geometryLayer=\"" << GeometryLayer; } diff --git a/src/Mod/Sketcher/App/SketchGeometryExtension.h b/src/Mod/Sketcher/App/SketchGeometryExtension.h index 160f477cc5..d20564b544 100644 --- a/src/Mod/Sketcher/App/SketchGeometryExtension.h +++ b/src/Mod/Sketcher/App/SketchGeometryExtension.h @@ -50,7 +50,7 @@ enum InternalType BSplineControlPoint = 9, BSplineKnotPoint = 10, ParabolaFocalAxis = 11, - NumInternalGeometryType// Must be the last + NumInternalGeometryType // Must be the last }; } @@ -60,7 +60,7 @@ enum GeometryMode { Blocked = 0, Construction = 1, - NumGeometryMode// Must be the last + NumGeometryMode // Must be the last }; } @@ -174,7 +174,7 @@ private: static std::atomic _GeometryID; }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_SKETCHGEOMETRYEXTENSION_H +#endif // SKETCHER_SKETCHGEOMETRYEXTENSION_H diff --git a/src/Mod/Sketcher/App/SketchGeometryExtensionPyImp.cpp b/src/Mod/Sketcher/App/SketchGeometryExtensionPyImp.cpp index e7c4de1a3b..9632229d21 100644 --- a/src/Mod/Sketcher/App/SketchGeometryExtensionPyImp.cpp +++ b/src/Mod/Sketcher/App/SketchGeometryExtensionPyImp.cpp @@ -35,8 +35,9 @@ std::string SketchGeometryExtensionPy::representation() const std::stringstream str; str << "getName().empty()) + if (!getSketchGeometryExtensionPtr()->getName().empty()) { str << "\'" << getSketchGeometryExtensionPtr()->getName() << "\', "; + } str << "\""; @@ -89,8 +90,9 @@ Py::String SketchGeometryExtensionPy::getInternalType() const { int internaltypeindex = (int)this->getSketchGeometryExtensionPtr()->getInternalType(); - if (internaltypeindex >= InternalType::NumInternalGeometryType) + if (internaltypeindex >= InternalType::NumInternalGeometryType) { throw Py::NotImplementedError("String name of enum not implemented"); + } std::string typestr = this->getSketchGeometryExtensionPtr()->internaltype2str[internaltypeindex]; @@ -139,9 +141,10 @@ PyObject* SketchGeometryExtensionPy::testGeometryMode(PyObject* args) GeometryMode::GeometryMode mode; - if (getSketchGeometryExtensionPtr()->getGeometryModeFromName(flag, mode)) + if (getSketchGeometryExtensionPtr()->getGeometryModeFromName(flag, mode)) { return new_reference_to( Py::Boolean(getSketchGeometryExtensionPtr()->testGeometryMode(mode))); + } PyErr_SetString(PyExc_TypeError, "Flag string does not exist."); return nullptr; diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 7734e6bad7..32918af027 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -7649,7 +7649,7 @@ void SketchObject::rebuildExternalGeometry() double t_min = t_max + 0.5 * M_PI; // ON_max = OM(t_max) gives the point, which projected on the sketch plane, - // becomes the apoapse of the pojected ellipse. + // becomes the apoapse of the projected ellipse. gp_Vec ON_max = origAxisMajor * cos(t_max) + origAxisMinor * sin(t_max); gp_Vec ON_min = origAxisMajor * cos(t_min) + origAxisMinor * sin(t_min); gp_Vec destAxisMajor = ProjVecOnPlane_UVN(ON_max, sketchPlane); diff --git a/src/Mod/Sketcher/App/SketchObject.h b/src/Mod/Sketcher/App/SketchObject.h index 5c48610ff3..4274a27c57 100644 --- a/src/Mod/Sketcher/App/SketchObject.h +++ b/src/Mod/Sketcher/App/SketchObject.h @@ -159,7 +159,10 @@ public: /// Deletes all constraints referencing an external geometry int delConstraintsToExternal(); /// transfers all constraints of a point to a new point - int transferConstraints(int fromGeoId, PointPos fromPosId, int toGeoId, PointPos toPosId, + int transferConstraints(int fromGeoId, + PointPos fromPosId, + int toGeoId, + PointPos toPosId, bool doNotTransformTangencies = false); /// Carbon copy another sketch geometry and constraints @@ -181,9 +184,10 @@ public: * id==-2 for the vertical sketch axis * id<=-3 for user defined projected external geometries, */ - template::type>::value>::type> + template< + typename GeometryT = Part::Geometry, + typename = typename std::enable_if< + std::is_base_of::type>::value>::type> const GeometryT* getGeometry(int GeoId) const; std::unique_ptr getGeometryFacade(int GeoId) const; @@ -233,8 +237,12 @@ public: sketch and updates all dependent features When a solve only is necessary (e.g. DoF changed), solve() solves the sketch and updates the geometry (if updateGeoAfterSolving==true), but does not trigger any recompute. - @return 0 if no error, if error, the following codes in this order of priority: -4 if - overconstrained, -3 if conflicting, -1 if solver error, -2 if redundant constraints + @return 0 if no error, if error, the following codes in this order of priority: + -4 if overconstrained, + -3 if conflicting constraints, + -5 if malformed constraints, + -1 if solver error, + -2 if redundant constraints */ int solve(bool updateGeoAfterSolving = true); /// set the datum of a Distance or Angle constraint and solve @@ -270,10 +278,13 @@ public: /// toggle the driving status of this constraint int toggleVirtualSpace(int ConstrId); /// move this point to a new location and solve - int movePoint(int GeoId, PointPos PosId, const Base::Vector3d& toPoint, bool relative = false, + int movePoint(int GeoId, + PointPos PosId, + const Base::Vector3d& toPoint, + bool relative = false, bool updateGeoBeforeMoving = false); /// retrieves the coordinates of a point - static Base::Vector3d getPoint(const Part::Geometry *geo, PointPos PosId); + static Base::Vector3d getPoint(const Part::Geometry* geo, PointPos PosId); Base::Vector3d getPoint(int GeoId, PointPos PosId) const; /// toggle geometry to draft line @@ -288,8 +299,8 @@ public: \param createCorner - keep geoId/pos as a Point and keep as many constraints as possible \retval - 0 on success, -1 on failure */ - int fillet(int geoId, PointPos pos, double radius, bool trim = true, - bool preserveCorner = false); + int + fillet(int geoId, PointPos pos, double radius, bool trim = true, bool preserveCorner = false); /*! \brief More general form of fillet \param geoId1, geoId2 - geoId for two lines (which don't necessarily have to coincide) @@ -299,8 +310,13 @@ public: meet and keep as many of the existing constraints as possible \retval - 0 on success, -1 on failure */ - int fillet(int geoId1, int geoId2, const Base::Vector3d& refPnt1, const Base::Vector3d& refPnt2, - double radius, bool trim = true, bool createCorner = false); + int fillet(int geoId1, + int geoId2, + const Base::Vector3d& refPnt1, + const Base::Vector3d& refPnt2, + double radius, + bool trim = true, + bool createCorner = false); /// trim a curve int trim(int geoId, const Base::Vector3d& point); @@ -317,15 +333,21 @@ public: int join(int geoId1, Sketcher::PointPos posId1, int geoId2, Sketcher::PointPos posId2); /// adds symmetric geometric elements with respect to the refGeoId (line or point) - int addSymmetric(const std::vector& geoIdList, int refGeoId, + int addSymmetric(const std::vector& geoIdList, + int refGeoId, Sketcher::PointPos refPosId = Sketcher::PointPos::none); /// with default parameters adds a copy of the geometric elements displaced by the displacement /// vector. It creates an array of csize elements in the direction of the displacement vector by /// rsize elements in the direction perpendicular to the displacement vector, wherein the /// modulus of this perpendicular vector is scaled by perpscale. - int addCopy(const std::vector& geoIdList, const Base::Vector3d& displacement, - bool moveonly = false, bool clone = false, int csize = 2, int rsize = 1, - bool constraindisplacement = false, double perpscale = 1.0); + int addCopy(const std::vector& geoIdList, + const Base::Vector3d& displacement, + bool moveonly = false, + bool clone = false, + int csize = 2, + int rsize = 1, + bool constraindisplacement = false, + double perpscale = 1.0); int removeAxesAlignment(const std::vector& geoIdList); /// Exposes all internal geometry of an object supporting internal geometry @@ -391,7 +413,7 @@ public: int getHighestVertexIndex() const { return VertexId2GeoId.size() - 1; - }// Most recently created + } // Most recently created int getHighestCurveIndex() const { return Geometry.getSize() - 1; @@ -406,7 +428,9 @@ public: const std::vector> getCoincidenceGroups(); // returns if the given geoId is fixed (coincident) with external geometry on any of the // possible relevant points - void isCoincidentWithExternalGeometry(int GeoId, bool& start_external, bool& mid_external, + void isCoincidentWithExternalGeometry(int GeoId, + bool& start_external, + bool& mid_external, bool& end_external); // returns a map containing all the GeoIds that are coincident with the given point as keys, and // the PosIds as values associated with the keys. @@ -414,9 +438,12 @@ public: /// retrieves for a Vertex number a list with all coincident points (sharing a single /// coincidence constraint) - void getDirectlyCoincidentPoints(int GeoId, PointPos PosId, std::vector& GeoIdList, + void getDirectlyCoincidentPoints(int GeoId, + PointPos PosId, + std::vector& GeoIdList, std::vector& PosIdList); - void getDirectlyCoincidentPoints(int VertexId, std::vector& GeoIdList, + void getDirectlyCoincidentPoints(int VertexId, + std::vector& GeoIdList, std::vector& PosIdList); bool arePointsCoincident(int GeoId1, PointPos PosId1, int GeoId2, PointPos PosId2); @@ -539,14 +566,16 @@ public: /* Solver exposed interface */ inline int initTemporaryMove(int geoId, PointPos pos, bool fine = true); /// Forwards a request for a temporary initBSplinePieceMove to the solver using the current /// sketch state as a reference (enables dragging) - inline int initTemporaryBSplinePieceMove(int geoId, PointPos pos, - const Base::Vector3d& firstPoint, bool fine = true); + inline int initTemporaryBSplinePieceMove(int geoId, + PointPos pos, + const Base::Vector3d& firstPoint, + bool fine = true); /** Forwards a request for point or curve temporary movement to the solver using the current * state as a reference (enables dragging). NOTE: A temporary move operation must always be * preceded by a initTemporaryMove() operation. */ - inline int moveTemporaryPoint(int geoId, PointPos pos, Base::Vector3d toPoint, - bool relative = false); + inline int + moveTemporaryPoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative = false); /// forwards a request to update an extension of a geometry of the solver to the solver. inline void updateSolverExtension(int geoId, std::unique_ptr&& ext) { @@ -585,48 +614,52 @@ public: rlCircularReference, rlOtherPart, rlOtherBody, - rlOtherBodyWithLinks,// for carbon copy - rlNotASketch, // for carbon copy - rlNonParallel, // for carbon copy - rlAxesMisaligned, // for carbon copy - rlOriginsMisaligned // for carbon copy + rlOtherBodyWithLinks, // for carbon copy + rlNotASketch, // for carbon copy + rlNonParallel, // for carbon copy + rlAxesMisaligned, // for carbon copy + rlOriginsMisaligned // for carbon copy }; /// Return true if this object is allowed as external geometry for the /// sketch. rsn argument receives the reason for disallowing. - bool isExternalAllowed(App::Document* pDoc, App::DocumentObject* pObj, + bool isExternalAllowed(App::Document* pDoc, + App::DocumentObject* pObj, eReasonList* rsn = nullptr) const; - bool isCarbonCopyAllowed(App::Document* pDoc, App::DocumentObject* pObj, bool& xinv, bool& yinv, + bool isCarbonCopyAllowed(App::Document* pDoc, + App::DocumentObject* pObj, + bool& xinv, + bool& yinv, eReasonList* rsn = nullptr) const; - Part::TopoShape getEdge(const Part::Geometry *geo, const char *name) const; + Part::TopoShape getEdge(const Part::Geometry* geo, const char* name) const; - Data::IndexedName checkSubName(const char *sub) const; + Data::IndexedName checkSubName(const char* sub) const; - bool geoIdFromShapeType(const Data::IndexedName &, int &geoId, PointPos &posId) const; + bool geoIdFromShapeType(const Data::IndexedName&, int& geoId, PointPos& posId) const; - bool geoIdFromShapeType(const char *shapetype, int &geoId, PointPos &posId) const + bool geoIdFromShapeType(const char* shapetype, int& geoId, PointPos& posId) const { return geoIdFromShapeType(checkSubName(shapetype), geoId, posId); } - bool geoIdFromShapeType(const char *shapetype, int &geoId) const + bool geoIdFromShapeType(const char* shapetype, int& geoId) const { PointPos posId; - return geoIdFromShapeType(shapetype,geoId,posId); + return geoIdFromShapeType(shapetype, geoId, posId); } - std::string convertSubName(const char *subname, bool postfix=true) const + std::string convertSubName(const char* subname, bool postfix = true) const { return convertSubName(checkSubName(subname), postfix); } - std::string convertSubName(const std::string & subname, bool postfix=true) const + std::string convertSubName(const std::string& subname, bool postfix = true) const { return convertSubName(subname.c_str(), postfix); } - std::string convertSubName(const Data::IndexedName &, bool postfix=true) const; + std::string convertSubName(const Data::IndexedName&, bool postfix = true) const; bool isPerformingInternalTransaction() const { @@ -638,13 +671,18 @@ public: * - it includes internal and external intersecting geometry. * - it returns GeoEnum::GeoUndef if no intersection is found. */ - bool seekTrimPoints(int GeoId, const Base::Vector3d& point, int& GeoId1, - Base::Vector3d& intersect1, int& GeoId2, Base::Vector3d& intersect2); + bool seekTrimPoints(int GeoId, + const Base::Vector3d& point, + int& GeoId1, + Base::Vector3d& intersect1, + int& GeoId2, + Base::Vector3d& intersect2); public: // Analyser functions int autoConstraint(double precision = Precision::Confusion() * 1000, - double angleprecision = M_PI / 20, bool includeconstruction = true); + double angleprecision = M_PI / 20, + bool includeconstruction = true); int detectMissingPointOnPointConstraints(double precision = Precision::Confusion() * 1000, bool includeconstruction = true); @@ -675,7 +713,7 @@ public: // Validation routines std::vector getOpenVertices() const; -public:// geometry extension functionalities for single element sketch object user convenience +public: // geometry extension functionalities for single element sketch object user convenience int setGeometryId(int GeoId, long id); int getGeometryId(int GeoId, long& id) const; @@ -726,8 +764,10 @@ protected: // migration functions void migrateSketch(); - static void appendConstraintsMsg(const std::vector& vector, const std::string& singularmsg, - const std::string& pluralmsg, std::string& msg); + static void appendConstraintsMsg(const std::vector& vector, + const std::string& singularmsg, + const std::string& pluralmsg, + std::string& msg); // retrieves redundant, conflicting and malformed constraint information from the solver void retrieveSolverDiagnostics(); @@ -746,16 +786,20 @@ protected: void synchroniseGeometryState(); // helper function to create a new constraint and move it to the Constraint Property - void addConstraint(Sketcher::ConstraintType constrType, int firstGeoId, - Sketcher::PointPos firstPos, int secondGeoId = GeoEnum::GeoUndef, + void addConstraint(Sketcher::ConstraintType constrType, + int firstGeoId, + Sketcher::PointPos firstPos, + int secondGeoId = GeoEnum::GeoUndef, Sketcher::PointPos secondPos = Sketcher::PointPos::none, int thirdGeoId = GeoEnum::GeoUndef, Sketcher::PointPos thirdPos = Sketcher::PointPos::none); // creates a new constraint std::unique_ptr - createConstraint(Sketcher::ConstraintType constrType, int firstGeoId, - Sketcher::PointPos firstPos, int secondGeoId = GeoEnum::GeoUndef, + createConstraint(Sketcher::ConstraintType constrType, + int firstGeoId, + Sketcher::PointPos firstPos, + int secondGeoId = GeoEnum::GeoUndef, Sketcher::PointPos secondPos = Sketcher::PointPos::none, int thirdGeoId = GeoEnum::GeoUndef, Sketcher::PointPos thirdPos = Sketcher::PointPos::none); @@ -830,25 +874,31 @@ inline int SketchObject::initTemporaryMove(int geoId, PointPos pos, bool fine /* // if a previous operation did not update the geometry (including geometry extensions) // or constraints (including any deleted pointer, as in renameConstraint) of the solver, // here we update them before starting a temporary operation. - if (solverNeedsUpdate) + if (solverNeedsUpdate) { solve(); + } return solvedSketch.initMove(geoId, pos, fine); } -inline int SketchObject::initTemporaryBSplinePieceMove(int geoId, PointPos pos, - const Base::Vector3d& firstPoint, bool fine) +inline int SketchObject::initTemporaryBSplinePieceMove(int geoId, + PointPos pos, + const Base::Vector3d& firstPoint, + bool fine) { // if a previous operation did not update the geometry (including geometry extensions) // or constraints (including any deleted pointer, as in renameConstraint) of the solver, // here we update them before starting a temporary operation. - if (solverNeedsUpdate) + if (solverNeedsUpdate) { solve(); + } return solvedSketch.initBSplinePieceMove(geoId, pos, firstPoint, fine); } -inline int SketchObject::moveTemporaryPoint(int geoId, PointPos pos, Base::Vector3d toPoint, +inline int SketchObject::moveTemporaryPoint(int geoId, + PointPos pos, + Base::Vector3d toPoint, bool relative /*=false*/) { return solvedSketch.movePoint(geoId, pos, toPoint, relative); @@ -859,18 +909,20 @@ const GeometryT* SketchObject::getGeometry(int GeoId) const { if (GeoId >= 0) { const std::vector& geomlist = getInternalGeometry(); - if (GeoId < int(geomlist.size())) + if (GeoId < int(geomlist.size())) { return static_cast(geomlist[GeoId]); + } } - else if (-GeoId <= int(ExternalGeo.size())) + else if (-GeoId <= int(ExternalGeo.size())) { return static_cast(ExternalGeo[-GeoId - 1]); + } return nullptr; } using SketchObjectPython = App::FeaturePythonT; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_SKETCHOBJECT_H +#endif // SKETCHER_SKETCHOBJECT_H diff --git a/src/Mod/Sketcher/App/SketchObjectPyImp.cpp b/src/Mod/Sketcher/App/SketchObjectPyImp.cpp index c0b721eaa1..a91c05fb82 100644 --- a/src/Mod/Sketcher/App/SketchObjectPyImp.cpp +++ b/src/Mod/Sketcher/App/SketchObjectPyImp.cpp @@ -68,7 +68,7 @@ PyObject* SketchObjectPy::solve(PyObject* args) PyObject* SketchObjectPy::addGeometry(PyObject* args) { PyObject* pcObj; - PyObject* construction;// this is an optional argument default false + PyObject* construction; // this is an optional argument default false bool isConstruction; if (!PyArg_ParseTuple(args, "OO!", &pcObj, &PyBool_Type, &construction)) { PyErr_Clear(); @@ -375,7 +375,7 @@ PyObject* SketchObjectPy::addConstraint(PyObject* args) // exist. this forces recalculation of the initial solution (not a full solve) if (this->getSketchObjectPtr()->noRecomputes) { this->getSketchObjectPtr()->setUpSketch(); - this->getSketchObjectPtr()->Constraints.touch();// update solver information + this->getSketchObjectPtr()->Constraints.touch(); // update solver information } return Py::new_reference_to(Py::Long(ret)); } @@ -504,7 +504,7 @@ PyObject* SketchObjectPy::carbonCopy(PyObject* args) { char* ObjectName; PyObject* construction = Py_True; - if (!PyArg_ParseTuple(args, "s|O!:Give an object", &ObjectName, &PyBool_Type, &construction)) { + if (!PyArg_ParseTuple(args, "s|O!", &ObjectName, &PyBool_Type, &construction)) { return nullptr; } @@ -517,16 +517,15 @@ PyObject* SketchObjectPy::carbonCopy(PyObject* args) PyErr_SetString(PyExc_ValueError, str.str().c_str()); return nullptr; } - // check if this type of external geometry is allowed - if (!skObj->isExternalAllowed(Obj->getDocument(), Obj) - && (Obj->getTypeId() != Sketcher::SketchObject::getClassTypeId())) { + + bool xinv = false, yinv = false; + if (!skObj->isCarbonCopyAllowed(Obj->getDocument(), Obj, xinv, yinv)) { std::stringstream str; str << ObjectName << " is not allowed for a carbon copy operation in this sketch"; PyErr_SetString(PyExc_ValueError, str.str().c_str()); return nullptr; } - // add the external if (skObj->carbonCopy(Obj, Base::asBoolean(construction)) < 0) { std::stringstream str; str << "Not able to add the requested geometry"; @@ -541,7 +540,7 @@ PyObject* SketchObjectPy::addExternal(PyObject* args) { char* ObjectName; char* SubName; - if (!PyArg_ParseTuple(args, "ss:Give an object and subelement name", &ObjectName, &SubName)) { + if (!PyArg_ParseTuple(args, "ss", &ObjectName, &SubName)) { return nullptr; } @@ -565,7 +564,7 @@ PyObject* SketchObjectPy::addExternal(PyObject* args) // add the external if (skObj->addExternal(Obj, SubName) < 0) { std::stringstream str; - str << "Not able to add external shape element"; + str << "Not able to add external shape element " << SubName; PyErr_SetString(PyExc_ValueError, str.str().c_str()); return nullptr; } @@ -601,7 +600,8 @@ PyObject* SketchObjectPy::delConstraintOnPoint(PyObject* args) && pos <= static_cast(Sketcher::PointPos::mid)) { // This is the whole range of valid positions if (this->getSketchObjectPtr()->delConstraintOnPoint( - Index, static_cast(pos))) { + Index, + static_cast(pos))) { std::stringstream str; str << "Not able to delete a constraint on point with the given index: " << Index << " and position: " << pos; @@ -1055,15 +1055,22 @@ PyObject* SketchObjectPy::movePoint(PyObject* args) int GeoId, PointType; int relative = 0; - if (!PyArg_ParseTuple( - args, "iiO!|i", &GeoId, &PointType, &(Base::VectorPy::Type), &pcObj, &relative)) { + if (!PyArg_ParseTuple(args, + "iiO!|i", + &GeoId, + &PointType, + &(Base::VectorPy::Type), + &pcObj, + &relative)) { return nullptr; } Base::Vector3d v1 = static_cast(pcObj)->value(); - if (this->getSketchObjectPtr()->movePoint( - GeoId, static_cast(PointType), v1, (relative > 0))) { + if (this->getSketchObjectPtr()->movePoint(GeoId, + static_cast(PointType), + v1, + (relative > 0))) { std::stringstream str; str << "Not able to move point with the id and type: (" << GeoId << ", " << PointType << ")"; @@ -1150,8 +1157,8 @@ PyObject* SketchObjectPy::fillet(PyObject* args) Base::Vector3d v1 = static_cast(pcObj1)->value(); Base::Vector3d v2 = static_cast(pcObj2)->value(); - if (this->getSketchObjectPtr()->fillet( - geoId1, geoId2, v1, v2, radius, trim, Base::asBoolean(createCorner))) { + if (this->getSketchObjectPtr() + ->fillet(geoId1, geoId2, v1, v2, radius, trim, Base::asBoolean(createCorner))) { std::stringstream str; str << "Not able to fillet curves with ids : (" << geoId1 << ", " << geoId2 << ") and points (" << v1.x << ", " << v1.y << ", " << v1.z << ") & " @@ -1164,8 +1171,14 @@ PyObject* SketchObjectPy::fillet(PyObject* args) PyErr_Clear(); // Point, radius - if (PyArg_ParseTuple( - args, "iid|iO!", &geoId1, &posId1, &radius, &trim, &PyBool_Type, &createCorner)) { + if (PyArg_ParseTuple(args, + "iid|iO!", + &geoId1, + &posId1, + &radius, + &trim, + &PyBool_Type, + &createCorner)) { if (this->getSketchObjectPtr()->fillet(geoId1, static_cast(posId1), radius, @@ -1215,8 +1228,9 @@ PyObject* SketchObjectPy::extend(PyObject* args) int GeoId; if (PyArg_ParseTuple(args, "idi", &GeoId, &increment, &endPoint)) { - if (this->getSketchObjectPtr()->extend( - GeoId, increment, static_cast(endPoint))) { + if (this->getSketchObjectPtr()->extend(GeoId, + increment, + static_cast(endPoint))) { std::stringstream str; str << "Not able to extend geometry with id : (" << GeoId << ") for increment (" << increment << ") and point position (" << endPoint << ")"; @@ -1267,8 +1281,10 @@ PyObject* SketchObjectPy::join(PyObject* args) return nullptr; } - if (this->getSketchObjectPtr()->join( - GeoId1, (Sketcher::PointPos)PosId1, GeoId2, (Sketcher::PointPos)PosId2)) { + if (this->getSketchObjectPtr()->join(GeoId1, + (Sketcher::PointPos)PosId1, + GeoId2, + (Sketcher::PointPos)PosId2)) { std::stringstream str; str << "Not able to join the curves with end points: (" << GeoId1 << ", " << PosId1 << "), (" << GeoId2 << ", " << PosId2 << ")"; @@ -1298,8 +1314,10 @@ PyObject* SketchObjectPy::addSymmetric(PyObject* args) } } - int ret = this->getSketchObjectPtr()->addSymmetric( - geoIdList, refGeoId, static_cast(refPosId)) + int ret = + this->getSketchObjectPtr()->addSymmetric(geoIdList, + refGeoId, + static_cast(refPosId)) + 1; if (ret == -1) { @@ -1326,8 +1344,13 @@ PyObject* SketchObjectPy::addCopy(PyObject* args) PyObject *pcObj, *pcVect; PyObject* clone = Py_False; - if (!PyArg_ParseTuple( - args, "OO!|O!", &pcObj, &(Base::VectorPy::Type), &pcVect, &PyBool_Type, &clone)) { + if (!PyArg_ParseTuple(args, + "OO!|O!", + &pcObj, + &(Base::VectorPy::Type), + &pcVect, + &PyBool_Type, + &clone)) { return nullptr; } @@ -1692,8 +1715,9 @@ PyObject* SketchObjectPy::modifyBSplineKnotMultiplicity(PyObject* args) return nullptr; } - if (!this->getSketchObjectPtr()->modifyBSplineKnotMultiplicity( - GeoId, knotIndex, multiplicity)) { + if (!this->getSketchObjectPtr()->modifyBSplineKnotMultiplicity(GeoId, + knotIndex, + multiplicity)) { std::stringstream str; str << "Multiplicity modification failed for: " << GeoId; PyErr_SetString(PyExc_ValueError, str.str().c_str()); @@ -1730,13 +1754,18 @@ PyObject* SketchObjectPy::autoconstraint(PyObject* args) PyObject* includeconstruction = Py_True; - if (!PyArg_ParseTuple( - args, "|ddO!", &precision, &angleprecision, &PyBool_Type, &includeconstruction)) { + if (!PyArg_ParseTuple(args, + "|ddO!", + &precision, + &angleprecision, + &PyBool_Type, + &includeconstruction)) { return nullptr; } - if (this->getSketchObjectPtr()->autoConstraint( - precision, angleprecision, Base::asBoolean(includeconstruction))) { + if (this->getSketchObjectPtr()->autoConstraint(precision, + angleprecision, + Base::asBoolean(includeconstruction))) { std::stringstream str; str << "Unable to autoconstraint"; PyErr_SetString(PyExc_ValueError, str.str().c_str()); @@ -1757,7 +1786,8 @@ PyObject* SketchObjectPy::detectMissingPointOnPointConstraints(PyObject* args) return Py::new_reference_to( Py::Long(this->getSketchObjectPtr()->detectMissingPointOnPointConstraints( - precision, Base::asBoolean(includeconstruction)))); + precision, + Base::asBoolean(includeconstruction)))); } PyObject* SketchObjectPy::detectMissingVerticalHorizontalConstraints(PyObject* args) diff --git a/src/Mod/Sketcher/App/SketchObjectSF.cpp b/src/Mod/Sketcher/App/SketchObjectSF.cpp index 7a76de4c01..87da13e326 100644 --- a/src/Mod/Sketcher/App/SketchObjectSF.cpp +++ b/src/Mod/Sketcher/App/SketchObjectSF.cpp @@ -42,8 +42,9 @@ SketchObjectSF::SketchObjectSF() short SketchObjectSF::mustExecute() const { - if (SketchFlatFile.isTouched()) + if (SketchFlatFile.isTouched()) { return 1; + } return 0; } diff --git a/src/Mod/Sketcher/App/SketchObjectSF.h b/src/Mod/Sketcher/App/SketchObjectSF.h index 06f12f2e0c..800cc32294 100644 --- a/src/Mod/Sketcher/App/SketchObjectSF.h +++ b/src/Mod/Sketcher/App/SketchObjectSF.h @@ -56,7 +56,7 @@ public: bool load(const char* FileName); }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCH_SKETCHOBJECTSF_H +#endif // SKETCH_SKETCHOBJECTSF_H diff --git a/src/Mod/Sketcher/App/SketchObjectSFPy.xml b/src/Mod/Sketcher/App/SketchObjectSFPy.xml index b9b81c4b3c..db7f521fa3 100644 --- a/src/Mod/Sketcher/App/SketchObjectSFPy.xml +++ b/src/Mod/Sketcher/App/SketchObjectSFPy.xml @@ -1,13 +1,13 @@  - diff --git a/src/Mod/Sketcher/App/SketchPyImp.cpp b/src/Mod/Sketcher/App/SketchPyImp.cpp index 4949eca6d4..5d25ea726b 100644 --- a/src/Mod/Sketcher/App/SketchPyImp.cpp +++ b/src/Mod/Sketcher/App/SketchPyImp.cpp @@ -42,7 +42,7 @@ std::string SketchPy::representation() const return std::string(""); } -PyObject* SketchPy::PyMake(struct _typeobject*, PyObject*, PyObject*)// Python wrapper +PyObject* SketchPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of SketchPy and the Twin object return new SketchPy(new Sketch()); @@ -58,8 +58,9 @@ int SketchPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/) PyObject* SketchPy::solve(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getSketchPtr()->resetSolver(); return Py::new_reference_to(Py::Long(getSketchPtr()->solve())); } @@ -67,8 +68,9 @@ PyObject* SketchPy::solve(PyObject* args) PyObject* SketchPy::addGeometry(PyObject* args) { PyObject* pcObj; - if (!PyArg_ParseTuple(args, "O", &pcObj)) + if (!PyArg_ParseTuple(args, "O", &pcObj)) { return nullptr; + } if (PyObject_TypeCheck(pcObj, &(Part::GeometryPy::Type))) { Part::Geometry* geo = static_cast(pcObj)->getGeometryPtr(); @@ -103,8 +105,9 @@ PyObject* SketchPy::addGeometry(PyObject* args) PyObject* SketchPy::addConstraint(PyObject* args) { PyObject* pcObj; - if (!PyArg_ParseTuple(args, "O", &pcObj)) + if (!PyArg_ParseTuple(args, "O", &pcObj)) { return nullptr; + } if (PyObject_TypeCheck(pcObj, &(PyList_Type)) || PyObject_TypeCheck(pcObj, &(PyTuple_Type))) { std::vector values; @@ -139,8 +142,9 @@ PyObject* SketchPy::addConstraint(PyObject* args) PyObject* SketchPy::clear(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getSketchPtr()->clear(); @@ -152,13 +156,22 @@ PyObject* SketchPy::movePoint(PyObject* args) int index1, index2; PyObject* pcObj; int relative = 0; - if (!PyArg_ParseTuple( - args, "iiO!|i", &index1, &index2, &(Base::VectorPy::Type), &pcObj, &relative)) + if (!PyArg_ParseTuple(args, + "iiO!|i", + &index1, + &index2, + &(Base::VectorPy::Type), + &pcObj, + &relative)) { return nullptr; + } Base::Vector3d* toPoint = static_cast(pcObj)->getVectorPtr(); - return Py::new_reference_to(Py::Long(getSketchPtr()->movePoint( - index1, static_cast(index2), *toPoint, (relative > 0)))); + return Py::new_reference_to( + Py::Long(getSketchPtr()->movePoint(index1, + static_cast(index2), + *toPoint, + (relative > 0)))); } // +++ attributes implementer ++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/src/Mod/Sketcher/App/SolverGeometryExtension.cpp b/src/Mod/Sketcher/App/SolverGeometryExtension.cpp index cb75eabdf9..89c94a2dfe 100644 --- a/src/Mod/Sketcher/App/SolverGeometryExtension.cpp +++ b/src/Mod/Sketcher/App/SolverGeometryExtension.cpp @@ -34,9 +34,9 @@ using namespace Sketcher; TYPESYSTEM_SOURCE(Sketcher::SolverGeometryExtension, Part::GeometryExtension) SolverGeometryExtension::SolverGeometryExtension() - : Start(SolverGeometryExtension::Dependent), - Mid(SolverGeometryExtension::Dependent), - End(SolverGeometryExtension::Dependent) + : Start(SolverGeometryExtension::Dependent) + , Mid(SolverGeometryExtension::Dependent) + , End(SolverGeometryExtension::Dependent) {} void SolverGeometryExtension::copyAttributes(Part::GeometryExtension* cpy) const @@ -69,12 +69,15 @@ PyObject* SolverGeometryExtension::getPyObject() SolverGeometryExtension::PointParameterStatus SolverGeometryExtension::getPoint(Sketcher::PointPos pos) const { - if (pos == Sketcher::PointPos::start) + if (pos == Sketcher::PointPos::start) { return getStartPoint(); - if (pos == Sketcher::PointPos::end) + } + if (pos == Sketcher::PointPos::end) { return getEndPoint(); - if (pos == Sketcher::PointPos::mid) + } + if (pos == Sketcher::PointPos::mid) { return getMidPoint(); + } THROWM(Base::ValueError, "SolverGeometryExtension - getPoint: Edge is not a point"); } @@ -91,28 +94,31 @@ void SolverGeometryExtension::notifyAttachment(Part::Geometry* geo) {Part::GeomEllipse::getClassTypeId(), 3}, {Part::GeomArcOfHyperbola::getClassTypeId(), 5}, {Part::GeomArcOfParabola::getClassTypeId(), 4}, - {Part::GeomBSplineCurve::getClassTypeId(), 0}// is dynamic + {Part::GeomBSplineCurve::getClassTypeId(), 0} // is dynamic }; GeometryType = geo->getTypeId(); auto result = edgeParamMap.find(GeometryType); - if (result == edgeParamMap.end()) + if (result == edgeParamMap.end()) { THROWM(Base::TypeError, "SolverGeometryExtension - notifyAttachment - Geometry not supported!!"); + } auto nedgeparams = (*result).second; - if (nedgeparams > 0) + if (nedgeparams > 0) { Edge.init(nedgeparams); + } } void SolverGeometryExtension::ensureType(const Base::Type& type) { - if (GeometryType != type) + if (GeometryType != type) { THROWM(Base::TypeError, "SolverGeometryExtension - requested edge parameters do not match underlying type!"); + } } SolverGeometryExtension::Point& SolverGeometryExtension::getPoint() diff --git a/src/Mod/Sketcher/App/SolverGeometryExtension.h b/src/Mod/Sketcher/App/SolverGeometryExtension.h index 790076a8f9..b87c154ab3 100644 --- a/src/Mod/Sketcher/App/SolverGeometryExtension.h +++ b/src/Mod/Sketcher/App/SolverGeometryExtension.h @@ -96,12 +96,15 @@ public: bool xfree = isXDoF(); bool yfree = isYDoF(); - if (xfree && yfree) + if (xfree && yfree) { return 2; - else if (xfree || yfree) + } + else if (xfree || yfree) { return 1; - else + } + else { return 0; + } } void setStatus(ParameterStatus status) @@ -156,8 +159,9 @@ public: void setStatus(int index, ParameterStatus status) { - if (index >= int(pstatus.size())) + if (index >= int(pstatus.size())) { pstatus.resize(index + 1, ParameterStatus::Dependent); + } pstatus.at(index) = status; }; @@ -327,8 +331,9 @@ public: { int npoles = pstatus.size() / 3; - if (poleindex < npoles) + if (poleindex < npoles) { return pstatus[poleindex * 2]; + } THROWM(Base::IndexError, "Pole index out of range") } @@ -337,8 +342,9 @@ public: { int npoles = pstatus.size() / 3; - if (poleindex < npoles) + if (poleindex < npoles) { return pstatus[poleindex * 2 + 1]; + } THROWM(Base::IndexError, "Pole index out of range") } @@ -347,8 +353,9 @@ public: { int nweights = pstatus.size() / 3; - if (weightindex < nweights) + if (weightindex < nweights) { return pstatus[nweights * 2 + weightindex]; + } THROWM(Base::IndexError, "Weight index out of range") } @@ -490,7 +497,7 @@ private: Base::Type GeometryType; }; -}// namespace Sketcher +} // namespace Sketcher -#endif// SKETCHER_SOLVERGEOMETRYEXTENSION_H +#endif // SKETCHER_SOLVERGEOMETRYEXTENSION_H diff --git a/src/Mod/Sketcher/App/planegcs/Constraints.cpp b/src/Mod/Sketcher/App/planegcs/Constraints.cpp index 1f1833c4d2..46bbbef181 100644 --- a/src/Mod/Sketcher/App/planegcs/Constraints.cpp +++ b/src/Mod/Sketcher/App/planegcs/Constraints.cpp @@ -903,10 +903,10 @@ double ConstraintP2LDistance::error() double dist = *distance(); double dx = x2 - x1; double dy = y2 - y1; - double d = sqrt(dx * dx + dy * dy);// line length + double d = sqrt(dx * dx + dy * dy); // line length double area = std::abs(-x0 * dy + y0 * dx + x1 * y2 - - x2 * y1);// = x1y2 - x2y1 - x0y2 + x2y0 + x0y1 - x1y0 = 2*(triangle area) + - x2 * y1); // = x1y2 - x2y1 - x0y2 + x2y0 + x0y1 - x1y0 = 2*(triangle area) return scale * (area / d - dist); } @@ -1053,7 +1053,7 @@ double ConstraintPointOnLine::error() double dy = y2 - y1; double d = sqrt(dx * dx + dy * dy); double area = -x0 * dy + y0 * dx + x1 * y2 - - x2 * y1;// = x1y2 - x2y1 - x0y2 + x2y0 + x0y1 - x1y0 = 2*(triangle area) + - x2 * y1; // = x1y2 - x2y1 - x0y2 + x2y0 + x0y1 - x1y0 = 2*(triangle area) return scale * area / d; } @@ -1219,29 +1219,29 @@ double ConstraintParallel::grad(double* param) { double deriv = 0.; if (param == l1p1x()) { - deriv += (*l2p1y() - *l2p2y());// = dy2 + deriv += (*l2p1y() - *l2p2y()); // = dy2 } if (param == l1p2x()) { - deriv += -(*l2p1y() - *l2p2y());// = -dy2 + deriv += -(*l2p1y() - *l2p2y()); // = -dy2 } if (param == l1p1y()) { - deriv += -(*l2p1x() - *l2p2x());// = -dx2 + deriv += -(*l2p1x() - *l2p2x()); // = -dx2 } if (param == l1p2y()) { - deriv += (*l2p1x() - *l2p2x());// = dx2 + deriv += (*l2p1x() - *l2p2x()); // = dx2 } if (param == l2p1x()) { - deriv += -(*l1p1y() - *l1p2y());// = -dy1 + deriv += -(*l1p1y() - *l1p2y()); // = -dy1 } if (param == l2p2x()) { - deriv += (*l1p1y() - *l1p2y());// = dy1 + deriv += (*l1p1y() - *l1p2y()); // = dy1 } if (param == l2p1y()) { - deriv += (*l1p1x() - *l1p2x());// = dx1 + deriv += (*l1p1x() - *l1p2x()); // = dx1 } if (param == l2p2y()) { - deriv += -(*l1p1x() - *l1p2x());// = -dx1 + deriv += -(*l1p1x() - *l1p2x()); // = -dx1 } return scale * deriv; @@ -1305,29 +1305,29 @@ double ConstraintPerpendicular::grad(double* param) { double deriv = 0.; if (param == l1p1x()) { - deriv += (*l2p1x() - *l2p2x());// = dx2 + deriv += (*l2p1x() - *l2p2x()); // = dx2 } if (param == l1p2x()) { - deriv += -(*l2p1x() - *l2p2x());// = -dx2 + deriv += -(*l2p1x() - *l2p2x()); // = -dx2 } if (param == l1p1y()) { - deriv += (*l2p1y() - *l2p2y());// = dy2 + deriv += (*l2p1y() - *l2p2y()); // = dy2 } if (param == l1p2y()) { - deriv += -(*l2p1y() - *l2p2y());// = -dy2 + deriv += -(*l2p1y() - *l2p2y()); // = -dy2 } if (param == l2p1x()) { - deriv += (*l1p1x() - *l1p2x());// = dx1 + deriv += (*l1p1x() - *l1p2x()); // = dx1 } if (param == l2p2x()) { - deriv += -(*l1p1x() - *l1p2x());// = -dx1 + deriv += -(*l1p1x() - *l1p2x()); // = -dx1 } if (param == l2p1y()) { - deriv += (*l1p1y() - *l1p2y());// = dy1 + deriv += (*l1p1y() - *l1p2y()); // = dy1 } if (param == l2p2y()) { - deriv += -(*l1p1y() - *l1p2y());// = -dy1 + deriv += -(*l1p1y() - *l1p2y()); // = -dy1 } return scale * deriv; @@ -1514,7 +1514,7 @@ double ConstraintMidpointOnLine::error() double dy = y2 - y1; double d = sqrt(dx * dx + dy * dy); double area = -x0 * dy + y0 * dx + x1 * y2 - - x2 * y1;// = x1y2 - x2y1 - x0y2 + x2y0 + x0y1 - x1y0 = 2*(triangle area) + - x2 * y1; // = x1y2 - x2y1 - x0y2 + x2y0 + x0y1 - x1y0 = 2*(triangle area) return scale * area / d; } @@ -1749,7 +1749,7 @@ ConstraintEllipseTangentLine::ConstraintEllipseTangentLine(Line& l, Ellipse& e) this->l.PushOwnParams(pvec); this->e = e; - this->e.PushOwnParams(pvec);// DeepSOIC: hopefully, this won't push arc's parameters + this->e.PushOwnParams(pvec); // DeepSOIC: hopefully, this won't push arc's parameters origpvec = pvec; pvecChangedFlag = true; rescale(); @@ -1785,13 +1785,13 @@ void ConstraintEllipseTangentLine::errorgrad(double* err, double* grad, double* DeriVector2 p2(l.p2, param); DeriVector2 f1(e.focus1, param); DeriVector2 c(e.center, param); - DeriVector2 f2 = c.linCombi(2.0, f1, -1.0);// 2*cv - f1v + DeriVector2 f2 = c.linCombi(2.0, f1, -1.0); // 2*cv - f1v // mirror F1 against the line DeriVector2 nl = l.CalculateNormal(l.p1, param).getNormalized(); - double distF1L = 0, ddistF1L = 0;// distance F1 to line + double distF1L = 0, ddistF1L = 0; // distance F1 to line distF1L = f1.subtr(p1).scalarProd(nl, &ddistF1L); - DeriVector2 f1m = f1.sum(nl.multD(-2 * distF1L, -2 * ddistF1L));// f1m = f1 mirrored + DeriVector2 f1m = f1.sum(nl.multD(-2 * distF1L, -2 * ddistF1L)); // f1m = f1 mirrored // calculate distance form f1m to f2 double distF1mF2, ddistF1mF2; @@ -1899,7 +1899,7 @@ void ConstraintInternalAlignmentPoint2Ellipse::errorgrad(double* err, double* gr DeriVector2 emaj = f1.subtr(c).getNormalized(); DeriVector2 emin = emaj.rotate90ccw(); DeriVector2 pv(p, param); - double b, db;// minor radius + double b, db; // minor radius b = *e.radmin; db = (e.radmin == param) ? 1.0 : 0.0; @@ -1907,9 +1907,9 @@ void ConstraintInternalAlignmentPoint2Ellipse::errorgrad(double* err, double* gr double a, da; a = e.getRadMaj(c, f1, b, db, da); - DeriVector2 poa;// point to align to + DeriVector2 poa; // point to align to bool by_y_not_by_x = - false;// a flag to indicate if the alignment error function is for y (false - x, true - y) + false; // a flag to indicate if the alignment error function is for y (false - x, true - y) switch (AlignmentType) { case EllipsePositiveMajorX: @@ -1939,7 +1939,7 @@ void ConstraintInternalAlignmentPoint2Ellipse::errorgrad(double* err, double* gr break; default: // shouldn't happen - poa = pv;// align to the point itself, doing nothing essentially + poa = pv; // align to the point itself, doing nothing essentially } if (err) { *err = by_y_not_by_x ? pv.y - poa.y : pv.x - poa.x; @@ -2039,7 +2039,7 @@ void ConstraintInternalAlignmentPoint2Hyperbola::errorgrad(double* err, double* DeriVector2 emin = emaj.rotate90ccw(); DeriVector2 pv(p, param); - double b, db;// minor radius + double b, db; // minor radius b = *e.radmin; db = (e.radmin == param) ? 1.0 : 0.0; @@ -2047,9 +2047,9 @@ void ConstraintInternalAlignmentPoint2Hyperbola::errorgrad(double* err, double* double a, da; a = e.getRadMaj(c, f1, b, db, da); - DeriVector2 poa;// point to align to + DeriVector2 poa; // point to align to bool by_y_not_by_x = - false;// a flag to indicate if the alignment error function is for y (false - x, true - y) + false; // a flag to indicate if the alignment error function is for y (false - x, true - y) switch (AlignmentType) { case HyperbolaPositiveMajorX: @@ -2082,7 +2082,7 @@ void ConstraintInternalAlignmentPoint2Hyperbola::errorgrad(double* err, double* } default: // shouldn't happen - poa = pv;// align to the point itself, doing nothing essentially + poa = pv; // align to the point itself, doing nothing essentially } if (err) { @@ -2294,8 +2294,8 @@ void ConstraintCurveValue::ReconstructGeomPointers() i++; p.y = pvec[i]; i++; - i++;// we have an inline function for point coordinate - i++;// we have an inline function for the parameterU + i++; // we have an inline function for point coordinate + i++; // we have an inline function for the parameterU this->crv->ReconstructOnNewPvec(pvec, i); pvecChangedFlag = false; } @@ -2320,14 +2320,14 @@ void ConstraintCurveValue::errorgrad(double* err, double* grad, double* param) u = *(this->u()); du = (param == this->u()) ? 1.0 : 0.0; - DeriVector2 P_to;// point of curve at parameter value of u, in global coordinates + DeriVector2 P_to; // point of curve at parameter value of u, in global coordinates P_to = this->crv->Value(u, du, param); - DeriVector2 P_from(this->p, param);// point to be constrained + DeriVector2 P_from(this->p, param); // point to be constrained DeriVector2 err_vec = P_from.subtr(P_to); - if (this->pcoord() == this->p.x) {// this constraint is for X projection + if (this->pcoord() == this->p.x) { // this constraint is for X projection if (err) { *err = err_vec.x; } @@ -2335,7 +2335,7 @@ void ConstraintCurveValue::errorgrad(double* err, double* grad, double* param) *grad = err_vec.dx; } } - else if (this->pcoord() == this->p.y) {// this constraint is for Y projection + else if (this->pcoord() == this->p.y) { // this constraint is for Y projection if (err) { *err = err_vec.y; } @@ -2564,7 +2564,7 @@ void ConstraintPointOnParabola::errorgrad(double* err, double* grad, double* par DeriVector2 focus(this->parab->focus1, param); DeriVector2 vertex(this->parab->vertex, param); - DeriVector2 point(this->p, param);// point to be constrained to parabola + DeriVector2 point(this->p, param); // point to be constrained to parabola DeriVector2 focalvect = focus.subtr(vertex); @@ -2640,7 +2640,7 @@ ConstraintAngleViaPoint::~ConstraintAngleViaPoint() void ConstraintAngleViaPoint::ReconstructGeomPointers() { int cnt = 0; - cnt++;// skip angle - we have an inline function for that + cnt++; // skip angle - we have an inline function for that poa.x = pvec[cnt]; cnt++; poa.y = pvec[cnt]; @@ -2768,7 +2768,7 @@ void ConstraintSnell::ReconstructGeomPointers() { int cnt = 0; cnt++; - cnt++;// skip n1, n2 - we have an inline function for that + cnt++; // skip n1, n2 - we have an inline function for that poa.x = pvec[cnt]; cnt++; poa.y = pvec[cnt]; @@ -2799,7 +2799,7 @@ void ConstraintSnell::errorgrad(double* err, double* grad, double* param) DeriVector2 tang2 = ray2->CalculateNormal(poa, param).rotate90cw().getNormalized(); DeriVector2 tangB = boundary->CalculateNormal(poa, param).rotate90cw().getNormalized(); double sin1, dsin1, sin2, dsin2; - sin1 = tang1.scalarProd(tangB, &dsin1);// sinus of angle of incidence + sin1 = tang1.scalarProd(tangB, &dsin1); // sinus of angle of incidence sin2 = tang2.scalarProd(tangB, &dsin2); if (flipn1) { sin1 = -sin1; @@ -2994,7 +2994,7 @@ ConstraintC2CDistance::ConstraintC2CDistance(Circle& c1, Circle& c2, double* d) void ConstraintC2CDistance::ReconstructGeomPointers() { int i = 0; - i++;// skip the first parameter as there is the inline function distance for it + i++; // skip the first parameter as there is the inline function distance for it c1.ReconstructOnNewPvec(pvec, i); c2.ReconstructOnNewPvec(pvec, i); pvecChangedFlag = false; @@ -3059,7 +3059,7 @@ void ConstraintC2CDistance::errorgrad(double* err, double* grad, double* param) if (length_ct12 > 1e-13) { *grad = -dlength_ct12 + drad; } - else {// concentric case + else { // concentric case *grad = drad; } } @@ -3116,7 +3116,7 @@ void ConstraintC2LDistance::rescale(double coef) void ConstraintC2LDistance::ReconstructGeomPointers() { int i = 0; - i++;// skip the first parameter as there is the inline function distance for it + i++; // skip the first parameter as there is the inline function distance for it circle.ReconstructOnNewPvec(pvec, i); line.ReconstructOnNewPvec(pvec, i); pvecChangedFlag = false; @@ -3136,7 +3136,7 @@ void ConstraintC2LDistance::errorgrad(double* err, double* grad, double* param) // center to line distance (=h) and its derivative (=dh) double darea = 0.0; - double area = v_line.crossProdNorm(v_p1ct, darea);// parallelogram oriented area + double area = v_line.crossProdNorm(v_p1ct, darea); // parallelogram oriented area double dlength; double length = v_line.length(dlength); @@ -3220,7 +3220,7 @@ void ConstraintP2CDistance::rescale(double coef) void ConstraintP2CDistance::ReconstructGeomPointers() { int i = 0; - i++;// skip the first parameter as there is the inline function distance for it + i++; // skip the first parameter as there is the inline function distance for it circle.ReconstructOnNewPvec(pvec, i); pt.ReconstructOnNewPvec(pvec, i); pvecChangedFlag = false; @@ -3280,4 +3280,4 @@ double ConstraintP2CDistance::grad(double* param) return deriv * scale; } -}// namespace GCS +} // namespace GCS diff --git a/src/Mod/Sketcher/App/planegcs/Constraints.h b/src/Mod/Sketcher/App/planegcs/Constraints.h index f052b35872..e4ff32edf9 100644 --- a/src/Mod/Sketcher/App/planegcs/Constraints.h +++ b/src/Mod/Sketcher/App/planegcs/Constraints.h @@ -114,7 +114,7 @@ public: }; _PROTECTED_UNLESS_EXTRACT_MODE_ - : VEC_pD origpvec;// is used only as a reference for redirecting and reverting pvec + : VEC_pD origpvec; // is used only as a reference for redirecting and reverting pvec VEC_pD pvec; double scale; int tag; @@ -1249,11 +1249,11 @@ private: { return pvec[0]; } - void ReconstructGeomPointers();// writes pointers in pvec to the parameters of c + void ReconstructGeomPointers(); // writes pointers in pvec to the parameters of c void errorgrad(double* err, double* grad, - double* param);// error and gradient combined. Values are returned through pointers. + double* param); // error and gradient combined. Values are returned through pointers. public: ConstraintP2CDistance(Point& p, Circle& c, double* d); ConstraintType getTypeId() override; @@ -1263,6 +1263,6 @@ public: }; -}// namespace GCS +} // namespace GCS -#endif// PLANEGCS_CONSTRAINTS_H +#endif // PLANEGCS_CONSTRAINTS_H diff --git a/src/Mod/Sketcher/App/planegcs/GCS.cpp b/src/Mod/Sketcher/App/planegcs/GCS.cpp index d14a1ff730..fdbf350a70 100644 --- a/src/Mod/Sketcher/App/planegcs/GCS.cpp +++ b/src/Mod/Sketcher/App/planegcs/GCS.cpp @@ -21,6 +21,7 @@ ***************************************************************************/ #ifdef _MSC_VER +#pragma warning(disable : 4251) #pragma warning(disable : 4244) #pragma warning(disable : 4996) #endif @@ -72,11 +73,11 @@ #endif #endif -#if EIGEN_VERSION > 30290// This regulates that only starting in Eigen 3.3, the problem with - // http://forum.freecad.org/viewtopic.php?f=3&t=4651&start=40 - // was solved in Eigen: - // http://forum.freecad.org/viewtopic.php?f=10&t=12769&start=60#p106492 - // https://forum.kde.org/viewtopic.php?f=74&t=129439 +#if EIGEN_VERSION > 30290 // This regulates that only starting in Eigen 3.3, the problem with + // http://forum.freecad.org/viewtopic.php?f=3&t=4651&start=40 + // was solved in Eigen: + // http://forum.freecad.org/viewtopic.php?f=10&t=12769&start=60#p106492 + // https://forum.kde.org/viewtopic.php?f=74&t=129439 #define EIGEN_STOCK_FULLPIVLU_COMPUTE #endif @@ -146,7 +147,7 @@ FullPivLU& FullPivLU::compute(const MatrixdType& matri // correct the values! since they were computed in the corner, row_of_biggest_in_corner += k; - col_of_biggest_in_corner += k;// need to add k to them. + col_of_biggest_in_corner += k; // need to add k to them. // when k==0, biggest_in_corner is the biggest coeff absolute value in the original // matrix @@ -216,7 +217,7 @@ FullPivLU& FullPivLU::compute(const MatrixdType& matri return *this; } -}// namespace Eigen +} // namespace Eigen #endif namespace GCS @@ -317,7 +318,7 @@ void SolverReportingManager::LogToFile(const std::string& str) flushStream(); #else - (void)(str);// silence unused parameter + (void)(str); // silence unused parameter LogToConsole("Debugging to file not enabled!"); #endif } @@ -629,8 +630,8 @@ void System::clearByTag(int tagId) int System::addConstraint(Constraint* constr) { isInit = false; - if (constr->getTag() >= 0) {// negatively tagged constraints have no impact - hasDiagnosis = false; // on the diagnosis + if (constr->getTag() >= 0) { // negatively tagged constraints have no impact + hasDiagnosis = false; // on the diagnosis } clist.push_back(constr); @@ -1784,9 +1785,9 @@ void System::calculateNormalAtPoint(const Curve& crv, double System::calculateConstraintErrorByTag(int tagId) { - int cnt = 0; // how many constraints have been accumulated - double sqErr = 0.0;// accumulator of squared errors - double err = 0.0; // last computed signed error value + int cnt = 0; // how many constraints have been accumulated + double sqErr = 0.0; // accumulator of squared errors + double err = 0.0; // last computed signed error value for (std::vector::const_iterator constr = clist.begin(); constr != clist.end(); ++constr) { @@ -1797,7 +1798,7 @@ double System::calculateConstraintErrorByTag(int tagId) }; } switch (cnt) { - case 0:// constraint not found! + case 0: // constraint not found! return std::numeric_limits::quiet_NaN(); break; case 1: @@ -1899,9 +1900,9 @@ void System::initSolution(Algorithm alg) } // identification of equality constraints and parameter reduction - std::set reducedConstrs;// constraints that will be eliminated through reduction - reductionmaps.clear(); // destroy any maps - reductionmaps.resize(componentsSize);// create empty maps to be filled in + std::set reducedConstrs; // constraints that will be eliminated through reduction + reductionmaps.clear(); // destroy any maps + reductionmaps.resize(componentsSize); // create empty maps to be filled in { VEC_pD reducedParams = plist; @@ -1932,8 +1933,8 @@ void System::initSolution(Algorithm alg) } } - clists.clear(); // destroy any lists - clists.resize(componentsSize);// create empty lists to be filled in + clists.clear(); // destroy any lists + clists.resize(componentsSize); // create empty lists to be filled in int i = int(plist.size()); for (std::vector::const_iterator constr = clistR.begin(); constr != clistR.end(); ++constr, i++) { @@ -1943,8 +1944,8 @@ void System::initSolution(Algorithm alg) } } - plists.clear(); // destroy any lists - plists.resize(componentsSize);// create empty lists to be filled in + plists.clear(); // destroy any lists + plists.resize(componentsSize); // create empty lists to be filled in for (int i = 0; i < int(plist.size()); ++i) { int cid = components[i]; plists[cid].push_back(plist[i]); @@ -1960,7 +1961,7 @@ void System::initSolution(Algorithm alg) if ((*constr)->getTag() >= 0) { clist0.push_back(*constr); } - else {// move or distance from reference constraints + else { // move or distance from reference constraints clist1.push_back(*constr); } } @@ -2096,7 +2097,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi h = x; subsys->getParams(x); - h = x - h;// = x - xold + h = x - h; // = x - xold // double convergence = isFine ? convergence : XconvergenceRough; int maxIterNumber = @@ -2129,7 +2130,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi } break; } - if (err > divergingLim || err != err) {// check for diverging and NaN + if (err > divergingLim || err != err) { // check for diverging and NaN if (debugMode == IterationLevel) { std::stringstream stream; stream << "BFGS Failed: Diverging!!: " @@ -2143,7 +2144,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi y = grad; subsys->calcGrad(grad); - y = grad - y;// = grad - gradold + y = grad - y; // = grad - gradold double hty = h.dot(y); // make sure that hty is never 0 @@ -2165,7 +2166,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi h = x; subsys->getParams(x); - h = x - h;// = x - xold + h = x - h; // = x - xold if (debugMode == IterationLevel) { std::stringstream stream; @@ -2202,8 +2203,8 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) } Eigen::VectorXd e(csize), - e_new(csize);// vector of all function errors (every constraint is one function) - Eigen::MatrixXd J(csize, xsize);// Jacobi of the subsystem + e_new(csize); // vector of all function errors (every constraint is one function) + Eigen::MatrixXd J(csize, xsize); // Jacobi of the subsystem Eigen::MatrixXd A(xsize, xsize); Eigen::VectorXd x(xsize), h(xsize), x_new(xsize), g(xsize), diag_A(xsize); @@ -2240,11 +2241,11 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) // check error double err = e.squaredNorm(); - if (err <= eps * eps) {// error is small, Success + if (err <= eps * eps) { // error is small, Success stop = 1; break; } - else if (err > divergingLim || err != err) {// check for diverging and NaN + else if (err > divergingLim || err != err) { // check for diverging and NaN stop = 6; break; } @@ -2258,7 +2259,7 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) // Compute ||J^T e||_inf double g_inf = g.lpNorm(); - diag_A = A.diagonal();// save diagonal entries so that augmentation can be later canceled + diag_A = A.diagonal(); // save diagonal entries so that augmentation can be later canceled // check for convergence if (g_inf <= eps1) { @@ -2297,12 +2298,12 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) x_new = x + h; h_norm = h.squaredNorm(); - if (h_norm <= eps1 * eps1 * x.norm()) {// relative change in p is small, stop + if (h_norm <= eps1 * eps1 * x.norm()) { // relative change in p is small, stop stop = 3; break; } else if (h_norm - >= (x.norm() + eps1) / (DBL_EPSILON * DBL_EPSILON)) {// almost singular + >= (x.norm() + eps1) / (DBL_EPSILON * DBL_EPSILON)) { // almost singular stop = 4; break; } @@ -2314,7 +2315,7 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) double dF = e.squaredNorm() - e_new.squaredNorm(); double dL = h.dot(mu * h + g); - if (dF > 0. && dL > 0.) {// reduction in error, increment is accepted + if (dF > 0. && dL > 0.) { // reduction in error, increment is accepted double tmp = 2 * dF / dL - 1.; mu *= std::max(1. / 3., 1. - tmp * tmp * tmp); nu = 2; @@ -2331,7 +2332,7 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) mu *= nu; nu *= 2.0; - for (int i = 0; i < xsize; ++i) {// restore diagonal J^T J entries + for (int i = 0; i < xsize; ++i) { // restore diagonal J^T J entries A(i, i) = diag_A(i); } @@ -2428,7 +2429,7 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving) while (!stop) { // check if finished - if (fx_inf <= tolf) {// Success + if (fx_inf <= tolf) { // Success stop = 1; } else if (g_inf <= tolg) { @@ -2440,7 +2441,7 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving) else if (iter >= maxIterNumber) { stop = 4; } - else if (err > divergingLim || err != err) {// check for diverging and NaN + else if (err > divergingLim || err != err) { // check for diverging and NaN stop = 6; } else { @@ -2584,7 +2585,7 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving) #ifdef _GCS_EXTRACT_SOLVER_SUBSYSTEM_ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) { - VEC_pD plistout;// std::vector + VEC_pD plistout; // std::vector std::vector clist_; VEC_pD clist_params_; @@ -2600,9 +2601,10 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) int ip = 0; - subsystemfile << "GCS::VEC_pD plist_;" << std::endl; // all SYSTEM params - subsystemfile << "std::vector clist_;" << std::endl;// SUBSYSTEM constraints - subsystemfile << "GCS::VEC_pD plistsub_;" << std::endl; // all SUBSYSTEM params + subsystemfile << "GCS::VEC_pD plist_;" << std::endl; // all SYSTEM params + subsystemfile << "std::vector clist_;" + << std::endl; // SUBSYSTEM constraints + subsystemfile << "GCS::VEC_pD plistsub_;" << std::endl; // all SUBSYSTEM params // constraint params not within SYSTEM params subsystemfile << "GCS::VEC_pD clist_params_;" << std::endl; @@ -2626,12 +2628,12 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) subsystemfile << "plistsub_.push_back(plist_[" << p_index << "]); // " << ips << std::endl; } - int ic = 0; // constraint index - int icp = 0;// index of constraint params not within SYSTEM params + int ic = 0; // constraint index + int icp = 0; // index of constraint params not within SYSTEM params for (std::vector::iterator it = clist_.begin(); it != clist_.end(); ++it, ++ic) { switch ((*it)->getTypeId()) { - case Equal: {// 2 + case Equal: { // 2 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); size_t i1 = std::distance(plist.begin(), p1); @@ -2682,7 +2684,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << "," << (*it)->pvec[1] << std::endl; break; } - case Difference: {// 3 + case Difference: { // 3 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -2756,7 +2758,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << "," << (*it)->pvec[2] << std::endl; break; } - case P2PDistance: {// 5 + case P2PDistance: { // 5 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -2888,7 +2890,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << (*it)->pvec[4] << std::endl; break; } - case P2PAngle: {// 5 + case P2PAngle: { // 5 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -3020,7 +3022,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << (*it)->pvec[4] << std::endl; break; } - case P2LDistance: {// 7 + case P2LDistance: { // 7 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -3201,7 +3203,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << std::endl; break; } - case PointOnLine: {// 6 + case PointOnLine: { // 6 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -3357,7 +3359,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << (*it)->pvec[4] << "," << (*it)->pvec[5] << std::endl; break; } - case PointOnPerpBisector: {// 6 + case PointOnPerpBisector: { // 6 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -3513,7 +3515,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << (*it)->pvec[4] << "," << (*it)->pvec[5] << std::endl; break; } - case Parallel: {// 8 + case Parallel: { // 8 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -3718,7 +3720,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << "," << (*it)->pvec[7] << std::endl; break; } - case Perpendicular: {// 8 + case Perpendicular: { // 8 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -3923,7 +3925,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << "," << (*it)->pvec[7] << std::endl; break; } - case L2LAngle: {// 9 + case L2LAngle: { // 9 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -4152,7 +4154,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << "," << (*it)->pvec[7] << "," << (*it)->pvec[8] << std::endl; break; } - case MidpointOnLine: {// 8 + case MidpointOnLine: { // 8 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -4357,7 +4359,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << "," << (*it)->pvec[7] << std::endl; break; } - case TangentCircumf: {// 6 + case TangentCircumf: { // 6 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -4517,7 +4519,7 @@ void System::extractSubsystem(SubSystem* subsys, bool isRedundantsolving) << (*it)->pvec[4] << "," << (*it)->pvec[5] << std::endl; break; } - case PointOnEllipse: {// 7 + case PointOnEllipse: { // 7 VEC_pD::iterator p1 = std::find(plist.begin(), plist.end(), (*it)->pvec[0]); VEC_pD::iterator p2 = std::find(plist.begin(), plist.end(), (*it)->pvec[1]); VEC_pD::iterator p3 = std::find(plist.begin(), plist.end(), (*it)->pvec[2]); @@ -4757,7 +4759,7 @@ int System::solve(SubSystem* subsysA, SubSystem* subsysB, bool /*isFine*/, bool subsysB->getParams(plistAB, x); subsysA->getParams(plistAB, x); - subsysB->setParams(plistAB, x);// just to ensure that A and B are synchronized + subsysB->setParams(plistAB, x); // just to ensure that A and B are synchronized subsysB->calcGrad(plistAB, grad); subsysA->calcJacobi(plistAB, JA); @@ -4823,7 +4825,7 @@ int System::solve(SubSystem* subsysA, SubSystem* subsysB, bool /*isFine*/, bool // xdir1 = JA.jacobiSvd(Eigen::ComputeThinU | // Eigen::ComputeThinV).solve(-resA); xdir1 = -Y * resA; - x += xdir1;// = x0 + alpha * xdir + xdir1 + x += xdir1; // = x0 + alpha * xdir + xdir1 subsysA->setParams(plistAB, x); subsysB->setParams(plistAB, x); subsysA->calcResidual(resA); @@ -4833,7 +4835,7 @@ int System::solve(SubSystem* subsysA, SubSystem* subsysB, bool /*isFine*/, bool } } alpha = tau * alpha; - if (alpha < 1e-8) {// let the linesearch fail + if (alpha < 1e-8) { // let the linesearch fail alpha = 0.; } x = x0 + alpha * xdir; @@ -4841,7 +4843,7 @@ int System::solve(SubSystem* subsysA, SubSystem* subsysB, bool /*isFine*/, bool subsysB->setParams(plistAB, x); subsysA->calcResidual(resA); f = subsysB->error() + mu * resA.lpNorm<1>(); - if (alpha < 1e-8) {// let the linesearch fail + if (alpha < 1e-8) { // let the linesearch fail break; } } @@ -4855,7 +4857,7 @@ int System::solve(SubSystem* subsysA, SubSystem* subsysB, bool /*isFine*/, bool subsysA->calcJacobi(plistAB, JA); subsysA->calcResidual(resA); } - y = grad - JA.transpose() * lambda - y;// Eq. 18.13 + y = grad - JA.transpose() * lambda - y; // Eq. 18.13 if (iter > 1) { double yTh = y.dot(h); @@ -4872,7 +4874,7 @@ int System::solve(SubSystem* subsysA, SubSystem* subsysB, bool /*isFine*/, bool && err <= smallF) { break; } - if (err > divergingLim || err != err) {// check for diverging and NaN + if (err > divergingLim || err != err) { // check for diverging and NaN break; } } @@ -4956,7 +4958,7 @@ void System::makeReducedJacobian(Eigen::MatrixXd& J, } } - if (jacobianconstraintcount == 0) {// only driven constraints + if (jacobianconstraintcount == 0) { // only driven constraints J.resize(0, 0); } } @@ -5098,7 +5100,7 @@ int System::diagnose(Algorithm alg) Base::TimeInfo DenseQR_start_time; #endif if (J.rows() > 0) { - int rank = 0;// rank is not cheap to retrieve from qrJT in DenseQR + int rank = 0; // rank is not cheap to retrieve from qrJT in DenseQR Eigen::MatrixXd R; Eigen::FullPivHouseholderQR qrJT; // Here we give the system the possibility to run the two QR decompositions in parallel, @@ -5131,12 +5133,12 @@ int System::diagnose(Algorithm alg) // identifyDependentGeometryParametersInTransposedJacobianDenseQRDecomposition( qrJT, // pdiagnoselist, paramsNum, rank); - fut.wait();// wait for the execution of identifyDependentParametersSparseQR to finish + fut.wait(); // wait for the execution of identifyDependentParametersSparseQR to finish - dofs = paramsNum - rank;// unless overconstraint, which will be overridden below + dofs = paramsNum - rank; // unless overconstraint, which will be overridden below // Detecting conflicting or redundant constraints - if (constrNum > rank) {// conflicting or redundant constraints + if (constrNum > rank) { // conflicting or redundant constraints int nonredundantconstrNum; identifyConflictingRedundantConstraints(alg, qrJT, @@ -5147,7 +5149,7 @@ int System::diagnose(Algorithm alg) constrNum, rank, nonredundantconstrNum); - if (paramsNum == rank && nonredundantconstrNum > rank) {// over-constrained + if (paramsNum == rank && nonredundantconstrNum > rank) { // over-constrained dofs = paramsNum - nonredundantconstrNum; } } @@ -5204,9 +5206,9 @@ int System::diagnose(Algorithm alg) int paramsNum = SqrJT.rows(); int constrNum = SqrJT.cols(); - fut.wait();// wait for the execution of identifyDependentParametersSparseQR to finish + fut.wait(); // wait for the execution of identifyDependentParametersSparseQR to finish - dofs = paramsNum - rank;// unless overconstraint, which will be overridden below + dofs = paramsNum - rank; // unless overconstraint, which will be overridden below // Detecting conflicting or redundant constraints if (constrNum > rank) { @@ -5223,7 +5225,7 @@ int System::diagnose(Algorithm alg) rank, nonredundantconstrNum); - if (paramsNum == rank && nonredundantconstrNum > rank) {// over-constrained + if (paramsNum == rank && nonredundantconstrNum > rank) { // over-constrained dofs = paramsNum - nonredundantconstrNum; } } @@ -5258,9 +5260,9 @@ void System::makeDenseQRDecomposition(const Eigen::MatrixXd& J, #endif #ifdef _GCS_DEBUG_SOLVER_JACOBIAN_QR_DECOMPOSITION_TRIANGULAR_MATRIX - Eigen::MatrixXd Q; // Obtaining the Q matrix with Sparse QR is buggy, see comments below - Eigen::MatrixXd R2;// Intended for a trapezoidal matrix, where R is the top triangular matrix of - // the R2 trapezoidal matrix + Eigen::MatrixXd Q; // Obtaining the Q matrix with Sparse QR is buggy, see comments below + Eigen::MatrixXd R2; // Intended for a trapezoidal matrix, where R is the top triangular matrix + // of the R2 trapezoidal matrix #endif // For a transposed J SJG rows are paramsNum and cols are constrNum @@ -5346,9 +5348,9 @@ void System::makeSparseQRDecomposition( #endif #ifdef _GCS_DEBUG_SOLVER_JACOBIAN_QR_DECOMPOSITION_TRIANGULAR_MATRIX - Eigen::MatrixXd Q; // Obtaining the Q matrix with Sparse QR is buggy, see comments below - Eigen::MatrixXd R2;// Intended for a trapezoidal matrix, where R is the top triangular matrix of - // the R2 trapezoidal matrix + Eigen::MatrixXd Q; // Obtaining the Q matrix with Sparse QR is buggy, see comments below + Eigen::MatrixXd R2; // Intended for a trapezoidal matrix, where R is the top triangular matrix + // of the R2 trapezoidal matrix #endif // For a transposed J SJG rows are paramsNum and cols are constrNum @@ -5412,9 +5414,9 @@ void System::makeSparseQRDecomposition( SolverReportingManager::Manager().LogMatrix("Q", Q); #endif } -#endif//_GCS_DEBUG_SOLVER_JACOBIAN_QR_DECOMPOSITION_TRIANGULAR_MATRIX +#endif //_GCS_DEBUG_SOLVER_JACOBIAN_QR_DECOMPOSITION_TRIANGULAR_MATRIX } -#endif// EIGEN_SPARSEQR_COMPATIBLE +#endif // EIGEN_SPARSEQR_COMPATIBLE void System::identifyDependentParametersDenseQR(const Eigen::MatrixXd& J, const std::map& jacobianconstraintmap, @@ -5448,7 +5450,7 @@ void System::identifyDependentParametersSparseQR(const Eigen::MatrixXd& J, nontransprank, Rparams, false, - true);// do not transpose allow to diagnose parameters + true); // do not transpose allow to diagnose parameters identifyDependentParameters(SqrJ, Rparams, nontransprank, pdiagnoselist, silent); } @@ -5461,8 +5463,8 @@ void System::identifyDependentParameters(T& qrJ, const GCS::VEC_pD& pdiagnoselist, bool silent) { - (void)silent;// silent is only used in debug code, but it is important as Base::Console is not - // thread-safe. Removes warning in non Debug mode. + (void)silent; // silent is only used in debug code, but it is important as Base::Console is not + // thread-safe. Removes warning in non Debug mode. // int constrNum = SqrJ.rows(); // this is the other way around than for the transposed J // int paramsNum = SqrJ.cols(); @@ -5662,9 +5664,9 @@ void System::identifyConflictingRedundantConstraints( bool isinternalalignment = (constr->isInternalAlignment() == Constraint::Alignment::InternalAlignment); bool priorityconstraint = (constr->getTag() == 0); - if (!priorityconstraint && !isinternalalignment) {// exclude constraints tagged - // with zero and internal - // alignment + if (!priorityconstraint && !isinternalalignment) { // exclude constraints + // tagged with zero and + // internal alignment conflictingMap[constr].insert(i); } } @@ -5682,7 +5684,7 @@ void System::identifyConflictingRedundantConstraints( ++it) { int numberofsets = static_cast( - it->second.size());// number of sets in which the constraint appears + it->second.size()); // number of sets in which the constraint appears /* This is a heuristic algorithm to propose the user which constraints from a * redundant/conflicting set should be removed. It is based on the following principles: @@ -5702,16 +5704,16 @@ void System::identifyConflictingRedundantConstraints( * introduced. */ - if ((numberofsets > maxPopularity ||// (1) + if ((numberofsets > maxPopularity || // (1) (numberofsets == maxPopularity && mostPopular && tagmultiplicity.at(it->first->getTag()) < tagmultiplicity.at(mostPopular->getTag())) - ||// (2) + || // (2) (numberofsets == maxPopularity && mostPopular && tagmultiplicity.at(it->first->getTag()) == tagmultiplicity.at(mostPopular->getTag()) - && it->first->getTag() > mostPopular->getTag()))// (3) + && it->first->getTag() > mostPopular->getTag())) // (3) ) { mostPopular = it->first; @@ -5760,10 +5762,10 @@ void System::identifyConflictingRedundantConstraints( case 0: solvername = "BFGS"; break; - case 1:// solving with the LevenbergMarquardt solver + case 1: // solving with the LevenbergMarquardt solver solvername = "LevenbergMarquardt"; break; - case 2:// solving with the BFGS solver + case 2: // solving with the BFGS solver solvername = "DogLeg"; break; } @@ -5822,8 +5824,8 @@ void System::identifyConflictingRedundantConstraints( bool isinternalalignment = (conflictGroups[i][j]->isInternalAlignment() == Constraint::Alignment::InternalAlignment); if (conflictGroups[i][j]->getTag() != 0 - && !isinternalalignment) {// exclude constraints tagged with zero and internal - // alignment + && !isinternalalignment) { // exclude constraints tagged with zero and internal + // alignment conflictingTagsSet.insert(conflictGroups[i][j]->getTag()); } } @@ -6016,4 +6018,4 @@ void free(std::vector& subsysvec) } -}// namespace GCS +} // namespace GCS diff --git a/src/Mod/Sketcher/App/planegcs/GCS.h b/src/Mod/Sketcher/App/planegcs/GCS.h index fb8f28312d..441a1e9af1 100644 --- a/src/Mod/Sketcher/App/planegcs/GCS.h +++ b/src/Mod/Sketcher/App/planegcs/GCS.h @@ -51,11 +51,11 @@ namespace GCS enum SolveStatus { - Success = 0, // Found a solution zeroing the error function - Converged = 1, // Found a solution minimizing the error function - Failed = 2, // Failed to find any solution - SuccessfulSolutionInvalid = 3,// This is a solution where the solver succeeded, but the - // resulting geometry is OCE-invalid + Success = 0, // Found a solution zeroing the error function + Converged = 1, // Found a solution minimizing the error function + Failed = 2, // Failed to find any solution + SuccessfulSolutionInvalid = 3, // This is a solution where the solver succeeded, but the + // resulting geometry is OCE-invalid }; enum Algorithm @@ -107,41 +107,41 @@ class SketcherExport System // This is the main class. It holds all constraints and information // about partitioning into subsystems and solution strategies private: - VEC_pD plist; // list of the unknown parameters - VEC_pD pdrivenlist;// list of parameters of driven constraints + VEC_pD plist; // list of the unknown parameters + VEC_pD pdrivenlist; // list of parameters of driven constraints MAP_pD_I pIndex; - VEC_pD pDependentParameters;// list of dependent parameters by the system + VEC_pD pDependentParameters; // list of dependent parameters by the system // This is a map of primary and secondary identifiers that are found dependent by the solver // GCS ignores from a type point std::vector> pDependentParametersGroups; std::vector clist; - std::map c2p; // constraint to parameter adjacency list - std::map> p2c;// parameter to constraint adjacency list + std::map c2p; // constraint to parameter adjacency list + std::map> p2c; // parameter to constraint adjacency list std::vector subSystems, subSystemsAux; void clearSubSystems(); VEC_D reference; - void setReference(); // copies the current parameter values to reference - void resetToReference();// reverts all parameter values to the stored reference + void setReference(); // copies the current parameter values to reference + void resetToReference(); // reverts all parameter values to the stored reference - std::vector plists;// partitioned plist except equality constraints + std::vector plists; // partitioned plist except equality constraints // partitioned clist except equality constraints std::vector> clists; - std::vector reductionmaps;// for simplification of equality constraints + std::vector reductionmaps; // for simplification of equality constraints int dofs; std::set redundant; VEC_I conflictingTags, redundantTags, partiallyRedundantTags; - bool hasUnknowns; // if plist is filled with the unknown parameters - bool hasDiagnosis;// if dofs, conflictingTags, redundantTags are up to date - bool isInit; // if plists, clists, reductionmaps are up to date + bool hasUnknowns; // if plist is filled with the unknown parameters + bool hasDiagnosis; // if dofs, conflictingTags, redundantTags are up to date + bool isInit; // if plists, clists, reductionmaps are up to date - bool emptyDiagnoseMatrix;// false only if there is at least one driving constraint. + bool emptyDiagnoseMatrix; // false only if there is at least one driving constraint. int solve_BFGS(SubSystem* subsys, bool isFine = true, bool isRedundantsolving = false); int solve_LM(SubSystem* subsys, bool isRedundantsolving = false); @@ -217,8 +217,8 @@ private: public: int maxIter; int maxIterRedundant; - bool sketchSizeMultiplier;// if true note that the total number of iterations allowed is - // MaxIterations *xLength + bool sketchSizeMultiplier; // if true note that the total number of iterations allowed is + // MaxIterations *xLength bool sketchSizeMultiplierRedundant; double convergence; double convergenceRedundant; @@ -610,6 +610,6 @@ void free(VEC_pD& doublevec); void free(std::vector& constrvec); void free(std::vector& subsysvec); -}// namespace GCS +} // namespace GCS -#endif// PLANEGCS_GCS_H +#endif // PLANEGCS_GCS_H diff --git a/src/Mod/Sketcher/App/planegcs/Geo.cpp b/src/Mod/Sketcher/App/planegcs/Geo.cpp index 07da3f10b8..cba43d830a 100644 --- a/src/Mod/Sketcher/App/planegcs/Geo.cpp +++ b/src/Mod/Sketcher/App/planegcs/Geo.cpp @@ -93,8 +93,8 @@ DeriVector2 DeriVector2::getNormalized() const rtn.dx = dx / l; rtn.dy = dy / l; // next, remove the collinear part of dx,dy (make a projection onto a normal) - double dsc = rtn.dx * rtn.x + rtn.dy * rtn.y;// scalar product d*v - rtn.dx -= dsc * rtn.x; // subtract the projection + double dsc = rtn.dx * rtn.x + rtn.dy * rtn.y; // scalar product d*v + rtn.dx -= dsc * rtn.x; // subtract the projection rtn.dy -= dsc * rtn.y; return rtn; } @@ -288,8 +288,8 @@ double Ellipse::getRadMaj(const DeriVector2& center, b, cf, db, - dcf);// hack = a nonsense vector to calculate major radius with derivatives, useful just - // because the calculation formula is the same as vector length formula + dcf); // hack = a nonsense vector to calculate major radius with derivatives, useful just + // because the calculation formula is the same as vector length formula return hack.length(ret_dRadMaj); } @@ -304,7 +304,7 @@ double Ellipse::getRadMaj(double* derivparam, double& ret_dRadMaj) const // returns the major radius (plain value, no derivatives) double Ellipse::getRadMaj() const { - double dradmaj;// dummy + double dradmaj; // dummy return getRadMaj(nullptr, dradmaj); } @@ -317,7 +317,7 @@ DeriVector2 Ellipse::CalculateNormal(const Point& p, const double* derivparam) c // calculation. // focus2: - DeriVector2 f2v = cv.linCombi(2.0, f1v, -1.0);// 2*cv - f1v + DeriVector2 f2v = cv.linCombi(2.0, f1v, -1.0); // 2*cv - f1v // pf1, pf2 = vectors from p to focus1,focus2 DeriVector2 pf1 = f1v.subtr(pv); @@ -326,7 +326,7 @@ DeriVector2 Ellipse::CalculateNormal(const Point& p, const double* derivparam) c DeriVector2 ret = pf1.getNormalized().sum(pf2.getNormalized()); // numeric derivatives for testing -#if 0// make sure to enable DEBUG_DERIVS when enabling +#if 0 // make sure to enable DEBUG_DERIVS when enabling if(derivparam) { double const eps = 0.00001; double oldparam = *derivparam; @@ -379,7 +379,7 @@ DeriVector2 Ellipse::Value(double u, double du, const double* derivparam) const si = std::sin(u); dsi = std::cos(u) * du; - DeriVector2 ret;// point of ellipse at parameter value of u, in global coordinates + DeriVector2 ret; // point of ellipse at parameter value of u, in global coordinates ret = a_vec.multD(co, dco).sum(b_vec.multD(si, dsi)).sum(c); return ret; } @@ -489,7 +489,7 @@ double Hyperbola::getRadMaj(double* derivparam, double& ret_dRadMaj) const // returns the major radius (plain value, no derivatives) double Hyperbola::getRadMaj() const { - double dradmaj;// dummy + double dradmaj; // dummy return getRadMaj(nullptr, dradmaj); } @@ -502,11 +502,11 @@ DeriVector2 Hyperbola::CalculateNormal(const Point& p, const double* derivparam) // calculation. // focus2: - DeriVector2 f2v = cv.linCombi(2.0, f1v, -1.0);// 2*cv - f1v + DeriVector2 f2v = cv.linCombi(2.0, f1v, -1.0); // 2*cv - f1v // pf1, pf2 = vectors from p to focus1,focus2 DeriVector2 pf1 = f1v.subtr(pv).mult( - -1.0);// <--- differs from ellipse normal calculation code by inverting this vector + -1.0); // <--- differs from ellipse normal calculation code by inverting this vector DeriVector2 pf2 = f2v.subtr(pv); // return sum of normalized pf2, pf2 DeriVector2 ret = pf1.getNormalized().sum(pf2.getNormalized()); @@ -545,7 +545,7 @@ DeriVector2 Hyperbola::Value(double u, double du, const double* derivparam) cons si = std::sinh(u); dsi = std::cosh(u) * du; - DeriVector2 ret;// point of hyperbola at parameter value of u, in global coordinates + DeriVector2 ret; // point of hyperbola at parameter value of u, in global coordinates ret = a_vec.multD(co, dco).sum(b_vec.multD(si, dsi)).sum(c); return ret; } @@ -667,7 +667,7 @@ DeriVector2 Parabola::Value(double u, double du, const double* derivparam) const DeriVector2 dir = dirx.sum(diry); - DeriVector2 ret;// point of parabola at parameter value of u, in global coordinates + DeriVector2 ret; // point of parabola at parameter value of u, in global coordinates ret = c.sum(dir); @@ -925,7 +925,7 @@ void BSpline::setupFlattenedKnots() // Adjust for periodic: see OCC documentation for explanation if (periodic) { double period = *knots.back() - *knots.front(); - int c = degree + 1 - mult[0];// number of knots to pad + int c = degree + 1 - mult[0]; // number of knots to pad // Add capacity so that iterators remain valid flattenedknots.reserve(flattenedknots.size() + 2 * c); @@ -950,4 +950,4 @@ void BSpline::setupFlattenedKnots() } } -}// namespace GCS +} // namespace GCS diff --git a/src/Mod/Sketcher/App/planegcs/Geo.h b/src/Mod/Sketcher/App/planegcs/Geo.h index 136897618c..a6f6487274 100644 --- a/src/Mod/Sketcher/App/planegcs/Geo.h +++ b/src/Mod/Sketcher/App/planegcs/Geo.h @@ -98,7 +98,7 @@ public: // unlike other vectors in FreeCAD, this normalization creates a new vector instead of // modifying existing one. - DeriVector2 getNormalized() const;// returns zero vector if the original is zero. + DeriVector2 getNormalized() const; // returns zero vector if the original is zero. // calculates scalar product of two vectors and returns the result. The derivative // of the result is written into argument dprd. double scalarProd(const DeriVector2& v2, double* dprd = nullptr) const; @@ -107,19 +107,19 @@ public: // of the result is written into argument dprd. double crossProdNorm(const DeriVector2& v2, double& dprd) const; DeriVector2 sum(const DeriVector2& v2) const - {// adds two vectors and returns result + { // adds two vectors and returns result return DeriVector2(x + v2.x, y + v2.y, dx + v2.dx, dy + v2.dy); } DeriVector2 subtr(const DeriVector2& v2) const - {// subtracts two vectors and returns result + { // subtracts two vectors and returns result return DeriVector2(x - v2.x, y - v2.y, dx - v2.dx, dy - v2.dy); } DeriVector2 mult(double val) const { return DeriVector2(x * val, y * val, dx * val, dy * val); - }// multiplies the vector by a number. Derivatives are scaled. + } // multiplies the vector by a number. Derivatives are scaled. DeriVector2 multD(double val, double dval) const - {// multiply vector by a variable with a derivative. + { // multiply vector by a variable with a derivative. return DeriVector2(x * val, y * val, dx * val + x * dval, dy * val + y * dval); } // divide vector by a variable with a derivative @@ -133,7 +133,7 @@ public: return DeriVector2(y, -x, dy, -dx); } DeriVector2 linCombi(double m1, const DeriVector2& v2, double m2) const - {// linear combination of two vectors + { // linear combination of two vectors return DeriVector2(x * m1 + v2.x * m2, y * m1 + v2.y * m2, dx * m1 + v2.dx * m2, @@ -145,7 +145,7 @@ public: // Geometries /////////////////////////////////////// -class Curve// a base class for all curve-based objects (line, circle/arc, ellipse/arc) +class Curve // a base class for all curve-based objects (line, circle/arc, ellipse/arc) { public: virtual ~Curve() @@ -396,7 +396,7 @@ public: ~BSpline() override {} // parameters - VEC_P poles;// TODO: use better data structures so poles.x and poles.y + VEC_P poles; // TODO: use better data structures so poles.x and poles.y VEC_pD weights; VEC_pD knots; // dependent parameters (depends on previous parameters, @@ -408,7 +408,7 @@ public: VEC_I mult; int degree; bool periodic; - VEC_I knotpointGeoids;// geoids of knotpoints as to index Geom array + VEC_I knotpointGeoids; // geoids of knotpoints as to index Geom array // knot vector with repetitions for multiplicity and "padding" for periodic spline // interface helpers VEC_D flattenedknots; @@ -437,6 +437,6 @@ public: static double splineValue(double x, size_t k, unsigned int p, VEC_D& d, const VEC_D& flatknots); }; -}// namespace GCS +} // namespace GCS -#endif// PLANEGCS_GEO_H +#endif // PLANEGCS_GEO_H diff --git a/src/Mod/Sketcher/App/planegcs/SubSystem.cpp b/src/Mod/Sketcher/App/planegcs/SubSystem.cpp index f6e5b0db46..9df1d84937 100644 --- a/src/Mod/Sketcher/App/planegcs/SubSystem.cpp +++ b/src/Mod/Sketcher/App/planegcs/SubSystem.cpp @@ -59,12 +59,15 @@ void SubSystem::initialize(VEC_pD& params, MAP_pD_pD& reductionmap) for (std::vector::iterator constr = clist.begin(); constr != clist.end(); ++constr) { (*constr) - ->revertParams();// ensure that the constraint points to the original parameters + ->revertParams(); // ensure that the constraint points to the original parameters VEC_pD constr_params = (*constr)->params(); s2.insert(constr_params.begin(), constr_params.end()); } - std::set_intersection( - s1.begin(), s1.end(), s2.begin(), s2.end(), std::back_inserter(tmpplist)); + std::set_intersection(s1.begin(), + s1.end(), + s2.begin(), + s2.end(), + std::back_inserter(tmpplist)); } plist.clear(); @@ -76,16 +79,18 @@ void SubSystem::initialize(VEC_pD& params, MAP_pD_pD& reductionmap) MAP_pD_pD::const_iterator itr = reductionmap.find(*itt); if (itr != reductionmap.end()) { MAP_pD_I::const_iterator itp = pindex.find(itr->second); - if (itp == pindex.end()) {// the reduction target is not in plist yet, so add it now + if (itp + == pindex.end()) { // the reduction target is not in plist yet, so add it now plist.push_back(itr->second); rindex[itr->first] = i; pindex[itr->second] = i; i++; } - else// the reduction target is already in plist, just inform rindex + else { // the reduction target is already in plist, just inform rindex rindex[itr->first] = itp->second; + } } - else if (pindex.find(*itt) == pindex.end()) {// not in plist yet, so add it now + else if (pindex.find(*itt) == pindex.end()) { // not in plist yet, so add it now plist.push_back(*itt); pindex[*itt] = i; i++; @@ -103,21 +108,23 @@ void SubSystem::initialize(VEC_pD& params, MAP_pD_pD& reductionmap) pmap[plist[j]] = &pvals[j]; pvals[j] = *plist[j]; } - for (MAP_pD_I::const_iterator itr = rindex.begin(); itr != rindex.end(); ++itr) + for (MAP_pD_I::const_iterator itr = rindex.begin(); itr != rindex.end(); ++itr) { pmap[itr->first] = &pvals[itr->second]; + } c2p.clear(); p2c.clear(); for (std::vector::iterator constr = clist.begin(); constr != clist.end(); ++constr) { - (*constr)->revertParams();// ensure that the constraint points to the original parameters + (*constr)->revertParams(); // ensure that the constraint points to the original parameters VEC_pD constr_params_orig = (*constr)->params(); SET_pD constr_params; for (VEC_pD::const_iterator p = constr_params_orig.begin(); p != constr_params_orig.end(); ++p) { MAP_pD_pD::const_iterator pmapfind = pmap.find(*p); - if (pmapfind != pmap.end()) + if (pmapfind != pmap.end()) { constr_params.insert(pmapfind->second); + } } for (SET_pD::const_iterator p = constr_params.begin(); p != constr_params.end(); ++p) { // jacobi.set(*constr, *p, 0.); @@ -131,21 +138,24 @@ void SubSystem::initialize(VEC_pD& params, MAP_pD_pD& reductionmap) void SubSystem::redirectParams() { // copying values to pvals - for (MAP_pD_pD::const_iterator p = pmap.begin(); p != pmap.end(); ++p) + for (MAP_pD_pD::const_iterator p = pmap.begin(); p != pmap.end(); ++p) { *(p->second) = *(p->first); + } // redirect constraints to point to pvals for (std::vector::iterator constr = clist.begin(); constr != clist.end(); ++constr) { - (*constr)->revertParams();// this line will normally not be necessary + (*constr)->revertParams(); // this line will normally not be necessary (*constr)->redirectParams(pmap); } } void SubSystem::revertParams() { - for (std::vector::iterator constr = clist.begin(); constr != clist.end(); ++constr) + for (std::vector::iterator constr = clist.begin(); constr != clist.end(); + ++constr) { (*constr)->revertParams(); + } } void SubSystem::getParamMap(MAP_pD_pD& pmapOut) @@ -160,23 +170,27 @@ void SubSystem::getParamList(VEC_pD& plistOut) void SubSystem::getParams(VEC_pD& params, Eigen::VectorXd& xOut) { - if (xOut.size() != int(params.size())) + if (xOut.size() != int(params.size())) { xOut.setZero(params.size()); + } for (int j = 0; j < int(params.size()); j++) { MAP_pD_pD::const_iterator pmapfind = pmap.find(params[j]); - if (pmapfind != pmap.end()) + if (pmapfind != pmap.end()) { xOut[j] = *(pmapfind->second); + } } } void SubSystem::getParams(Eigen::VectorXd& xOut) { - if (xOut.size() != psize) + if (xOut.size() != psize) { xOut.setZero(psize); + } - for (int i = 0; i < psize; i++) + for (int i = 0; i < psize; i++) { xOut[i] = pvals[i]; + } } void SubSystem::setParams(VEC_pD& params, Eigen::VectorXd& xIn) @@ -184,16 +198,18 @@ void SubSystem::setParams(VEC_pD& params, Eigen::VectorXd& xIn) assert(xIn.size() == int(params.size())); for (int j = 0; j < int(params.size()); j++) { MAP_pD_pD::const_iterator pmapfind = pmap.find(params[j]); - if (pmapfind != pmap.end()) + if (pmapfind != pmap.end()) { *(pmapfind->second) = xIn[j]; + } } } void SubSystem::setParams(Eigen::VectorXd& xIn) { assert(xIn.size() == psize); - for (int i = 0; i < psize; i++) + for (int i = 0; i < psize; i++) { pvals[i] = xIn[i]; + } } void SubSystem::getConstraintList(std::vector& clist_) @@ -259,9 +275,11 @@ void SubSystem::calcJacobi(VEC_pD& params, Eigen::MatrixXd& jacobi) jacobi.setZero(csize, params.size()); for (int j = 0; j < int(params.size()); j++) { MAP_pD_pD::const_iterator pmapfind = pmap.find(params[j]); - if (pmapfind != pmap.end()) - for (int i = 0; i < csize; i++) + if (pmapfind != pmap.end()) { + for (int i = 0; i < csize; i++) { jacobi(i, j) = clist[i]->grad(pmapfind->second); + } + } } } @@ -282,8 +300,9 @@ void SubSystem::calcGrad(VEC_pD& params, Eigen::VectorXd& grad) std::vector constrs = p2c[pmapfind->second]; for (std::vector::const_iterator constr = constrs.begin(); constr != constrs.end(); - ++constr) + ++constr) { grad[j] += (*constr)->error() * (*constr)->grad(pmapfind->second); + } } } } @@ -300,13 +319,16 @@ double SubSystem::maxStep(VEC_pD& params, Eigen::VectorXd& xdir) MAP_pD_D dir; for (int j = 0; j < int(params.size()); j++) { MAP_pD_pD::const_iterator pmapfind = pmap.find(params[j]); - if (pmapfind != pmap.end()) + if (pmapfind != pmap.end()) { dir[pmapfind->second] = xdir[j]; + } } double alpha = 1e10; - for (std::vector::iterator constr = clist.begin(); constr != clist.end(); ++constr) + for (std::vector::iterator constr = clist.begin(); constr != clist.end(); + ++constr) { alpha = (*constr)->maxStep(dir, alpha); + } return alpha; } @@ -318,8 +340,9 @@ double SubSystem::maxStep(Eigen::VectorXd& xdir) void SubSystem::applySolution() { - for (MAP_pD_pD::const_iterator it = pmap.begin(); it != pmap.end(); ++it) + for (MAP_pD_pD::const_iterator it = pmap.begin(); it != pmap.end(); ++it) { *(it->first) = *(it->second); + } } void SubSystem::analyse(Eigen::MatrixXd& /*J*/, Eigen::MatrixXd& /*ker*/, Eigen::MatrixXd& /*img*/) @@ -344,4 +367,4 @@ void SubSystem::printResidual() } -}// namespace GCS +} // namespace GCS diff --git a/src/Mod/Sketcher/App/planegcs/SubSystem.h b/src/Mod/Sketcher/App/planegcs/SubSystem.h index 5c0bafebb5..6c4062d242 100644 --- a/src/Mod/Sketcher/App/planegcs/SubSystem.h +++ b/src/Mod/Sketcher/App/planegcs/SubSystem.h @@ -39,13 +39,13 @@ class SubSystem private: int psize, csize; std::vector clist; - VEC_pD plist; // pointers to the original parameters - MAP_pD_pD pmap;// redirection map from the original parameters to pvals - VEC_D pvals; // current variables vector (psize) - // JacobianMatrix jacobi; // jacobi matrix of the residuals - std::map c2p; // constraint to parameter adjacency list - std::map> p2c;// parameter to constraint adjacency list - void initialize(VEC_pD& params, MAP_pD_pD& reductionmap);// called by the constructors + VEC_pD plist; // pointers to the original parameters + MAP_pD_pD pmap; // redirection map from the original parameters to pvals + VEC_D pvals; // current variables vector (psize) + // JacobianMatrix jacobi; // jacobi matrix of the residuals + std::map c2p; // constraint to parameter adjacency list + std::map> p2c; // parameter to constraint adjacency list + void initialize(VEC_pD& params, MAP_pD_pD& reductionmap); // called by the constructors public: SubSystem(std::vector& clist_, VEC_pD& params); SubSystem(std::vector& clist_, VEC_pD& params, MAP_pD_pD& reductionmap); @@ -93,6 +93,6 @@ public: double lineSearch(SubSystem* subsys, Eigen::VectorXd& xdir); -}// namespace GCS +} // namespace GCS -#endif// PLANEGCS_SUBSYSTEM_H +#endif // PLANEGCS_SUBSYSTEM_H diff --git a/src/Mod/Sketcher/App/planegcs/Util.h b/src/Mod/Sketcher/App/planegcs/Util.h index 3aa0782b41..644b5a7e3c 100644 --- a/src/Mod/Sketcher/App/planegcs/Util.h +++ b/src/Mod/Sketcher/App/planegcs/Util.h @@ -43,6 +43,6 @@ using SET_I = std::set; #define M_PI 3.14159265358979323846 #endif -}// namespace GCS +} // namespace GCS -#endif// PLANEGCS_UTIL_H +#endif // PLANEGCS_UTIL_H diff --git a/src/Mod/Sketcher/App/planegcs/qp_eq.cpp b/src/Mod/Sketcher/App/planegcs/qp_eq.cpp index 9673915316..4cc37c2ce7 100644 --- a/src/Mod/Sketcher/App/planegcs/qp_eq.cpp +++ b/src/Mod/Sketcher/App/planegcs/qp_eq.cpp @@ -40,8 +40,9 @@ int qp_eq(MatrixXd& H, VectorXd& g, MatrixXd& A, VectorXd& c, VectorXd& x, Matri size_t constr_num = qrAT.cols(); size_t rank = qrAT.rank(); - if (rank != constr_num || constr_num > params_num) + if (rank != constr_num || constr_num > params_num) { return -1; + } // A^T = Q*R*P^T = Q1*R1*P^T // Q = [Q1,Q2], R=[R1;0] @@ -53,8 +54,9 @@ int qp_eq(MatrixXd& H, VectorXd& g, MatrixXd& A, VectorXd& c, VectorXd& x, Matri .transpose() .solve(Q.leftCols(rank)) * qrAT.colsPermutation().transpose(); - if (params_num == rank) + if (params_num == rank) { x = -Y * c; + } else { Z = Q.rightCols(params_num - rank); diff --git a/src/Mod/Sketcher/App/planegcs/qp_eq.h b/src/Mod/Sketcher/App/planegcs/qp_eq.h index 0d5489250e..fdb85c1bc4 100644 --- a/src/Mod/Sketcher/App/planegcs/qp_eq.h +++ b/src/Mod/Sketcher/App/planegcs/qp_eq.h @@ -21,5 +21,10 @@ ***************************************************************************/ #include -int qp_eq(Eigen::MatrixXd& H, Eigen::VectorXd& g, Eigen::MatrixXd& A, Eigen::VectorXd& c, - Eigen::VectorXd& x, Eigen::MatrixXd& Y, Eigen::MatrixXd& Z); +int qp_eq(Eigen::MatrixXd& H, + Eigen::VectorXd& g, + Eigen::MatrixXd& A, + Eigen::VectorXd& c, + Eigen::VectorXd& x, + Eigen::MatrixXd& Y, + Eigen::MatrixXd& Z); diff --git a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp index 5a319390d0..7c9e8085a5 100644 --- a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp +++ b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp @@ -67,7 +67,7 @@ public: Module() : Py::ExtensionModule("SketcherGui") { - initialize("This module is the SketcherGui module.");// register with Python + initialize("This module is the SketcherGui module."); // register with Python } ~Module() override @@ -81,7 +81,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -}// namespace SketcherGui +} // namespace SketcherGui /* Python entry */ PyMOD_INIT_FUNC(SketcherGui) diff --git a/src/Mod/Sketcher/Gui/AutoConstraint.h b/src/Mod/Sketcher/Gui/AutoConstraint.h index 4f70f2d16f..ef1d5e6412 100644 --- a/src/Mod/Sketcher/Gui/AutoConstraint.h +++ b/src/Mod/Sketcher/Gui/AutoConstraint.h @@ -43,7 +43,7 @@ struct AutoConstraint Sketcher::PointPos PosId; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_AutoConstraint_H +#endif // SKETCHERGUI_AutoConstraint_H diff --git a/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp b/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp index 38ce0aeae8..53c2b750ae 100644 --- a/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp +++ b/src/Mod/Sketcher/Gui/CommandAlterGeometry.cpp @@ -129,7 +129,7 @@ void CmdSketcherToggleConstruction::activated(int iMsg) rcCmdMgr.updateCommands("ToggleConstruction", static_cast(geometryCreationMode)); } - else// there was a selection, so operate in toggle mode. + else // there was a selection, so operate in toggle mode. { // get the selection std::vector selection; @@ -199,8 +199,9 @@ void CmdSketcherToggleConstruction::activated(int iMsg) if (geo && geo->getTypeId() == Part::GeomPoint::getClassTypeId()) { // issue the actual commands to toggle - Gui::cmdAppObjectArgs( - selection[0].getObject(), "toggleConstruction(%d) ", geoId); + Gui::cmdAppObjectArgs(selection[0].getObject(), + "toggleConstruction(%d) ", + geoId); } } } @@ -219,7 +220,7 @@ bool CmdSketcherToggleConstruction::isActive() return isAlterGeoActive(getActiveGuiDocument()); } -}// namespace SketcherGui +} // namespace SketcherGui void CreateSketcherCommandsAlterGeo() { diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index bf4fd0fac4..6fc7f6b1d2 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -52,6 +52,8 @@ #include "ui_InsertDatum.h" #include +// Remove this after pre-commit hook is activated +// clang-format off using namespace std; using namespace SketcherGui; using namespace Sketcher; @@ -612,7 +614,7 @@ bool addConstraintSafely(SketchObject* obj, std::function constraintaddi tryAutoRecompute(obj); return false; } - catch (const Base::Exception& e) { + catch (const Base::Exception&) { Gui::TranslatedUserError( obj, QObject::tr("Error"), @@ -1031,6 +1033,77 @@ void CmdSketcherConstraint::activated(int /*iMsg*/) getSelection().clearSelection(); } +// Comp for dimension tools ============================================= + +class CmdSketcherCompDimensionTools : public Gui::GroupCommand +{ +public: + CmdSketcherCompDimensionTools() + : GroupCommand("Sketcher_CompDimensionTools") + { + sAppModule = "Sketcher"; + sGroup = "Sketcher"; + sMenuText = QT_TR_NOOP("Dimension"); + sToolTipText = QT_TR_NOOP("Dimension tools."); + sWhatsThis = "Sketcher_CompDimensionTools"; + sStatusTip = sToolTipText; + eType = ForEdit; + + setCheckable(false); + + addCommand("Sketcher_Dimension"); + addCommand(); //separator + addCommand("Sketcher_ConstrainLock"); + addCommand("Sketcher_ConstrainDistanceX"); + addCommand("Sketcher_ConstrainDistanceY"); + addCommand("Sketcher_ConstrainDistance"); + addCommand("Sketcher_ConstrainRadius"); + addCommand("Sketcher_ConstrainDiameter"); + addCommand("Sketcher_ConstrainRadiam"); + addCommand("Sketcher_ConstrainAngle"); + } + + void updateAction(int mode) override + { + Gui::ActionGroup* pcAction = qobject_cast(getAction()); + if (!pcAction) { + return; + } + + QList al = pcAction->actions(); + int index = pcAction->property("defaultAction").toInt(); + switch (mode) { + case Reference: + al[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Dimension_Driven")); + //al[1] is the separator + al[2]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Lock_Driven")); + al[3]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_HorizontalDistance_Driven")); + al[4]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_VerticalDistance_Driven")); + al[5]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Length_Driven")); + al[6]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radius_Driven")); + al[7]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Diameter_Driven")); + al[8]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radiam_Driven")); + al[9]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_InternalAngle_Driven")); + getAction()->setIcon(al[index]->icon()); + break; + case Driving: + al[0]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Dimension")); + //al[1] is the separator + al[2]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Lock")); + al[3]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_HorizontalDistance")); + al[4]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_VerticalDistance")); + al[5]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Length")); + al[6]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radius")); + al[7]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Diameter")); + al[8]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_Radiam")); + al[9]->setIcon(Gui::BitmapFactory().iconFromTheme("Constraint_InternalAngle")); + getAction()->setIcon(al[index]->icon()); + break; + } + } + + const char* className() const override { return "CmdSketcherCompDimensionTools"; } +}; // Dimension tool ======================================================= @@ -1054,7 +1127,7 @@ public: bool has4MorePoints() const { return s_pts >= 4 && s_lns == 0 && s_cir == 0 && s_ell == 0; } bool has2Points1Line() const { return s_pts == 2 && s_lns == 1 && s_cir == 0 && s_ell == 0; } bool has3MorePoints1Line() const { return s_pts >= 3 && s_lns == 1 && s_cir == 0 && s_ell == 0; } - bool has1MorePoint1Circle() const { return s_pts >= 1 && s_lns == 0 && s_cir == 1 && s_ell == 0; } + bool has1Point1Circle() const { return s_pts == 1 && s_lns == 0 && s_cir == 1 && s_ell == 0; } bool has1MorePoint1Ellipse() const { return s_pts >= 1 && s_lns == 0 && s_cir == 0 && s_ell == 1; } bool has1Line() const { return s_pts == 0 && s_lns == 1 && s_cir == 0 && s_ell == 0; } @@ -1078,7 +1151,7 @@ public: class DrawSketchHandlerDimension : public DrawSketchHandler { public: - DrawSketchHandlerDimension() + DrawSketchHandlerDimension(std::vector SubNames) : specialConstraint(SpecialConstraint::None) , availableConstraint(AvailableConstraint::FIRST) , previousOnSketchPos(Base::Vector2d(0.f, 0.f)) @@ -1086,6 +1159,7 @@ public: , selLine({}) , selCircleArc({}) , selEllipseAndCo({}) + , initialSelection(std::move(SubNames)) , numberOfConstraintsCreated(0) { } @@ -1138,6 +1212,8 @@ public: hotY *= pixelRatio; } setCursor(cursorPixmap, hotX, hotY, false); + + handleInitialSelection(); } void deactivated() override @@ -1149,7 +1225,7 @@ public: void registerPressedKey(bool pressed, int key) override { - if ((key == SoKeyboardEvent::RIGHT_SHIFT || key == SoKeyboardEvent::LEFT_SHIFT) && pressed) { + if (key == SoKeyboardEvent::M && pressed) { if (availableConstraint == AvailableConstraint::FIRST) { availableConstraint = AvailableConstraint::SECOND; } @@ -1202,13 +1278,13 @@ public: bool pressButton(Base::Vector2d onSketchPos) override { + Q_UNUSED(onSketchPos) return true; } bool releaseButton(Base::Vector2d onSketchPos) override { Q_UNUSED(onSketchPos); - availableConstraint = AvailableConstraint::FIRST; SelIdPair selIdPair; selIdPair.GeoId = GeoEnum::GeoUndef; @@ -1260,11 +1336,12 @@ public: if (selIdPair.GeoId == GeoEnum::GeoUndef) { // If mouse is released on "blank" space, finalize and start over finalizeCommand(); + return true; } - else if (notSelectedYet(selIdPair)) { - std::vector& selVector = getSelectionVector(newselGeoType); + std::vector& selVector = getSelectionVector(newselGeoType); + if (notSelectedYet(selIdPair)) { //add the geometry to its type vector. Temporarily if not selAllowed selVector.push_back(selIdPair); @@ -1281,6 +1358,21 @@ public: selVector.pop_back(); } } + else { + //if it is already selected we unselect it. + selVector.pop_back(); + if (!selectionEmpty()) { + makeAppropriateConstraint(onSketchPos); + } + else { + restartCommand(QT_TRANSLATE_NOOP("Command", "Dimension")); + } + + Gui::Selection().rmvSelection(Obj->getDocument()->getName(), + Obj->getNameInDocument(), + ss.str().c_str()); + sketchgui->draw(false, false); // Redraw + } return true; } protected: @@ -1294,10 +1386,51 @@ protected: std::vector selCircleArc; std::vector selEllipseAndCo; + std::vector initialSelection; + int numberOfConstraintsCreated; Sketcher::SketchObject* Obj; + void handleInitialSelection() + { + if (initialSelection.size() == 0) { + return; + } + + availableConstraint = AvailableConstraint::FIRST; + + // Add the selected elements to their corresponding selection vectors + for (auto& selElement : initialSelection) { + SelIdPair selIdPair; + getIdsFromName(selElement, Obj, selIdPair.GeoId, selIdPair.PosId); + + Base::Type newselGeoType = Base::Type::badType(); + if (isEdge(selIdPair.GeoId, selIdPair.PosId)) { + const Part::Geometry* geo = Obj->getGeometry(selIdPair.GeoId); + newselGeoType = geo->getTypeId(); + } + else if (isVertex(selIdPair.GeoId, selIdPair.PosId)) { + newselGeoType = Part::GeomPoint::getClassTypeId(); + } + + std::vector& selVector = getSelectionVector(newselGeoType); + + //add the geometry to its type vector. Temporarily if not selAllowed + selVector.push_back(selIdPair); + } + + // See if the selection is valid + bool selAllowed = makeAppropriateConstraint(Base::Vector2d(0.,0.)); + + if (!selAllowed) { + selPoints.clear(); + selLine.clear(); + selCircleArc.clear(); + selEllipseAndCo.clear(); + } + } + void finalizeCommand() { // Ask for the value of datum constraints @@ -1377,6 +1510,11 @@ protected: && !contains(selEllipseAndCo, elem); } + bool selectionEmpty() + { + return selPoints.empty() && selLine.empty() && selCircleArc.empty() && selEllipseAndCo.empty(); + } + bool makeAppropriateConstraint(Base::Vector2d onSketchPos) { bool selAllowed = false; @@ -1390,7 +1528,7 @@ protected: else if (selection.has4MorePoints()) { makeCts_4MorePoint(selAllowed, selection.s_pts); } else if (selection.has2Points1Line()) { makeCts_2Point1Line(selAllowed, onSketchPos, selection.s_pts); } else if (selection.has3MorePoints1Line()) { makeCts_3MorePoint1Line(selAllowed, onSketchPos, selection.s_pts); } - else if (selection.has1MorePoint1Circle()) { makeCts_1MorePoint1Circle(selAllowed); } + else if (selection.has1Point1Circle()) { makeCts_1Point1Circle(selAllowed, onSketchPos); } else if (selection.has1MorePoint1Ellipse()) { makeCts_1MorePoint1Ellipse(selAllowed); } } else if (selection.hasLines()) { @@ -1453,7 +1591,7 @@ protected: //distance, Symmetry if (availableConstraint == AvailableConstraint::FIRST) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add point to line Distance constraint")); - createDistanceConstrain(selPoints[0].GeoId, selPoints[0].PosId, selLine[0].GeoId, selLine[0].PosId, onSketchPos); // line to be on second parameter + createDistanceConstrain(selPoints[0].GeoId, selPoints[0].PosId, selLine[0].GeoId, selLine[0].PosId, onSketchPos); // point to be on first parameter selAllowed = true; } if (availableConstraint == AvailableConstraint::SECOND) { @@ -1465,16 +1603,16 @@ protected: void makeCts_3Point(bool& selAllowed, size_t s_pts) { //Horizontal, vertical, symmetry - if (availableConstraint == AvailableConstraint::FIRST) { + if (s_pts > 0 && availableConstraint == AvailableConstraint::FIRST) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add 'Horizontal' constraints")); - for (int i = 0; i < s_pts - 1; i++) { + for (size_t i = 0; i < s_pts - 1; i++) { createHorizontalConstrain(selPoints[i].GeoId, selPoints[i].PosId, selPoints[i + 1].GeoId, selPoints[i + 1].PosId); } selAllowed = true; } - if (availableConstraint == AvailableConstraint::SECOND) { + if (s_pts > 0 && availableConstraint == AvailableConstraint::SECOND) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add 'Vertical' constraints")); - for (int i = 0; i < s_pts - 1; i++) { + for (size_t i = 0; i < s_pts - 1; i++) { createVerticalConstrain(selPoints[i].GeoId, selPoints[i].PosId, selPoints[i + 1].GeoId, selPoints[i + 1].PosId); } } @@ -1487,16 +1625,16 @@ protected: void makeCts_4MorePoint(bool& selAllowed, size_t s_pts) { //Horizontal, vertical - if (availableConstraint == AvailableConstraint::FIRST) { + if (s_pts > 0 && availableConstraint == AvailableConstraint::FIRST) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add 'Horizontal' constraints")); - for (int i = 0; i < s_pts - 1; i++) { + for (size_t i = 0; i < s_pts - 1; i++) { createHorizontalConstrain(selPoints[i].GeoId, selPoints[i].PosId, selPoints[i + 1].GeoId, selPoints[i + 1].PosId); } selAllowed = true; } - if (availableConstraint == AvailableConstraint::SECOND) { + if (s_pts > 0 && availableConstraint == AvailableConstraint::SECOND) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add 'Vertical' constraints")); - for (int i = 0; i < s_pts - 1; i++) { + for (size_t i = 0; i < s_pts - 1; i++) { createVerticalConstrain(selPoints[i].GeoId, selPoints[i].PosId, selPoints[i + 1].GeoId, selPoints[i + 1].PosId); } availableConstraint = AvailableConstraint::RESET; @@ -1512,7 +1650,7 @@ protected: } if (availableConstraint == AvailableConstraint::SECOND) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add Distance constraints")); - for (int i = 0; i < s_pts; i++) { + for (size_t i = 0; i < s_pts; i++) { createDistanceConstrain(selPoints[i].GeoId, selPoints[i].PosId, selLine[0].GeoId, selLine[0].PosId, onSketchPos); } availableConstraint = AvailableConstraint::RESET; @@ -1523,24 +1661,28 @@ protected: //distances if (availableConstraint == AvailableConstraint::FIRST) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add Distance constraints")); - for (int i = 0; i < s_pts; i++) { + for (size_t i = 0; i < s_pts; i++) { createDistanceConstrain(selPoints[i].GeoId, selPoints[i].PosId, selLine[0].GeoId, selLine[0].PosId, onSketchPos); } selAllowed = true; availableConstraint = AvailableConstraint::RESET; } } - void makeCts_1MorePoint1Circle(bool& selAllowed) + void makeCts_1Point1Circle(bool& selAllowed, Base::Vector2d onSketchPos) { - //distance between 1 point and circle/arc not supported yet. - if (availableConstraint == AvailableConstraint::FIRST) { - //nothing yet - //availableConstraint = AvailableConstraint::RESET; + //Distance. For now only circles not arcs! + const Part::Geometry* geom = Obj->getGeometry(selCircleArc[0].GeoId); + if (availableConstraint == AvailableConstraint::FIRST && geom->getTypeId() == Part::GeomCircle::getClassTypeId()) { + restartCommand(QT_TRANSLATE_NOOP("Command", "Add length constraint")); + createDistanceConstrain(selPoints[0].GeoId, selPoints[0].PosId, selCircleArc[0].GeoId, selCircleArc[0].PosId, onSketchPos); + selAllowed = true; + availableConstraint = AvailableConstraint::RESET; } } void makeCts_1MorePoint1Ellipse(bool& selAllowed) { - //distance between 1 point and elipse/arc of... not supported yet. + Q_UNUSED(selAllowed) + //distance between 1 point and ellipse/arc of... not supported yet. if (availableConstraint == AvailableConstraint::FIRST) { //nothing yet //availableConstraint = AvailableConstraint::RESET; @@ -1606,9 +1748,9 @@ protected: void makeCts_3MoreLine(bool& selAllowed, size_t s_lns) { //equality. - if (availableConstraint == AvailableConstraint::FIRST) { + if (s_lns > 0 && availableConstraint == AvailableConstraint::FIRST) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add Equality constraints")); - for (int i = 0; i < s_lns - 1; i++) { + for (size_t i = 0; i < s_lns - 1; i++) { createEqualityConstrain(selLine[i].GeoId, selLine[i + 1].GeoId); } selAllowed = true; @@ -1617,10 +1759,11 @@ protected: } void makeCts_1Line1Circle(bool& selAllowed, Base::Vector2d onSketchPos) { - //Distance. - if (availableConstraint == AvailableConstraint::FIRST) { + //Distance. For now only circles not arcs! + const Part::Geometry* geom = Obj->getGeometry(selCircleArc[0].GeoId); + if (availableConstraint == AvailableConstraint::FIRST && geom->getTypeId() == Part::GeomCircle::getClassTypeId()) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add length constraint")); - createDistanceConstrain(selCircleArc[0].GeoId, selCircleArc[0].PosId, selLine[0].GeoId, selLine[0].PosId, onSketchPos); // line to be on second parameter + createDistanceConstrain(selCircleArc[0].GeoId, selCircleArc[0].PosId, selLine[0].GeoId, selLine[0].PosId, onSketchPos); //Line second parameter selAllowed = true; availableConstraint = AvailableConstraint::RESET; } @@ -1637,6 +1780,7 @@ protected: } void makeCts_1Line1Ellipse(bool& selAllowed) { + Q_UNUSED(selAllowed) //TODO distance between line and ellipse/arc of... not supported yet. if (availableConstraint == AvailableConstraint::FIRST) { //selAllowed = true; @@ -1654,9 +1798,17 @@ protected: void makeCts_2Circle(bool& selAllowed, Base::Vector2d onSketchPos) { //Distance, radial distance, equality + //Distance: For now only circles not arcs! + const Part::Geometry* geom = Obj->getGeometry(selCircleArc[0].GeoId); + const Part::Geometry* geom2 = Obj->getGeometry(selCircleArc[1].GeoId); if (availableConstraint == AvailableConstraint::FIRST) { - restartCommand(QT_TRANSLATE_NOOP("Command", "Add length constraint")); - createDistanceConstrain(selCircleArc[0].GeoId, selCircleArc[0].PosId, selCircleArc[1].GeoId, selCircleArc[1].PosId, onSketchPos); + if (geom->getTypeId() == Part::GeomCircle::getClassTypeId() && geom2->getTypeId() == Part::GeomCircle::getClassTypeId()) { + restartCommand(QT_TRANSLATE_NOOP("Command", "Add length constraint")); + createDistanceConstrain(selCircleArc[0].GeoId, selCircleArc[0].PosId, selCircleArc[1].GeoId, selCircleArc[1].PosId, onSketchPos); + } + else { + availableConstraint = AvailableConstraint::THIRD; + } selAllowed = true; } if (availableConstraint == AvailableConstraint::SECOND) { @@ -1679,9 +1831,9 @@ protected: void makeCts_3MoreCircle(bool& selAllowed, size_t s_cir) { //equality. - if (availableConstraint == AvailableConstraint::FIRST) { + if (s_cir > 0 && availableConstraint == AvailableConstraint::FIRST) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add Equality constraint")); - for (int i = 0; i < s_cir - 1; i++) { + for (size_t i = 0; i < s_cir - 1; i++) { createEqualityConstrain(selCircleArc[i].GeoId, selCircleArc[i + 1].GeoId); } selAllowed = true; @@ -1690,6 +1842,7 @@ protected: } void makeCts_1Circle1Ellipse(bool& selAllowed) { + Q_UNUSED(selAllowed) //TODO distance between circle and ellipse/arc of... not supported yet. if (availableConstraint == AvailableConstraint::FIRST) { //selAllowed = true; @@ -1708,7 +1861,7 @@ protected: bool allTheSame = 1; const Part::Geometry* geom = Obj->getGeometry(selEllipseAndCo[0].GeoId); Base::Type typeOf = geom->getTypeId(); - for (int i = 1; i < s_ell; i++) { + for (size_t i = 1; i < s_ell; i++) { const Part::Geometry* geomi = Obj->getGeometry(selEllipseAndCo[i].GeoId); if (typeOf != geomi->getTypeId()) { allTheSame = 0; @@ -1716,7 +1869,7 @@ protected: } if (allTheSame) { restartCommand(QT_TRANSLATE_NOOP("Command", "Add Equality constraint")); - for (int i = 1; i < s_ell; i++) { + for (size_t i = 1; i < s_ell; i++) { createEqualityConstrain(selEllipseAndCo[0].GeoId, selEllipseAndCo[i].GeoId); } selAllowed = true; @@ -1724,29 +1877,34 @@ protected: } void createDistanceConstrain(int GeoId1, Sketcher::PointPos PosId1, int GeoId2, Sketcher::PointPos PosId2, Base::Vector2d onSketchPos) { - //We make sure that if there's a line, it is GeoId2. + // If there's a point, it must be GeoId1. We could add a swap to make sure but as it's hardcoded it's not necessary. + if (GeoId1 == GeoId2 || (PosId1 != Sketcher::PointPos::none && PosId2 != Sketcher::PointPos::none)) { specialConstraint = SpecialConstraint::LineOr2PointsDistance; } bool arebothpointsorsegmentsfixed = isPointOrSegmentFixed(Obj, GeoId1) && isPointOrSegmentFixed(Obj, GeoId2); - if (PosId1 != Sketcher::PointPos::none && PosId2 == Sketcher::PointPos::none) { // Point-line case (and point-circle in the future) + if (PosId1 != Sketcher::PointPos::none && PosId2 == Sketcher::PointPos::none) { // Point-line case and point-circle Base::Vector3d pnt = Obj->getPoint(GeoId1, PosId1); + double ActDist = 0.; const Part::Geometry* geom = Obj->getGeometry(GeoId2); if (geom->getTypeId() == Part::GeomLineSegment::getClassTypeId()) { const Part::GeomLineSegment* lineSeg = static_cast(geom); Base::Vector3d pnt1 = lineSeg->getStartPoint(); Base::Vector3d pnt2 = lineSeg->getEndPoint(); Base::Vector3d d = pnt2 - pnt1; - double ActDist = std::abs(-pnt.x * d.y + pnt.y * d.x + pnt1.x * pnt2.y - pnt2.x * pnt1.y) / d.Length(); - - Gui::cmdAppObjectArgs(Obj, "addConstraint(Sketcher.Constraint('Distance',%d,%d,%d,%f)) ", - GeoId1, static_cast(PosId1), GeoId2, ActDist); + ActDist = std::abs(-pnt.x * d.y + pnt.y * d.x + pnt1.x * pnt2.y - pnt2.x * pnt1.y) / d.Length(); } - //else if (geom->getTypeId() == Part::GeomCircle::getClassTypeId()) { - // const Part::GeomCircle* circle = static_cast(geom); - //} + else if (geom->getTypeId() == Part::GeomCircle::getClassTypeId()) { + const Part::GeomCircle* circle = static_cast(geom); + Base::Vector3d ct = circle->getCenter(); + Base::Vector3d di = ct - pnt; + ActDist = std::abs(di.Length() - circle->getRadius()); + } + + Gui::cmdAppObjectArgs(Obj, "addConstraint(Sketcher.Constraint('Distance',%d,%d,%d,%f)) ", + GeoId1, static_cast(PosId1), GeoId2, ActDist); } else if (PosId1 == Sketcher::PointPos::none && PosId2 == Sketcher::PointPos::none) { // Circle - line, circle - circle cases const Part::Geometry* geo1 = Obj->getGeometry(GeoId1); @@ -2244,7 +2402,7 @@ CmdSketcherDimension::CmdSketcherDimension() sGroup = "Sketcher"; sMenuText = QT_TR_NOOP("Dimension"); sToolTipText = QT_TR_NOOP("Constrain contextually based on your selection.\n" - "Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key.\n" + "Depending on your selection you might have several constraints available. You can cycle through them using M key.\n" "Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel."); sWhatsThis = "Sketcher_Dimension"; sStatusTip = sToolTipText; @@ -2256,8 +2414,18 @@ CmdSketcherDimension::CmdSketcherDimension() void CmdSketcherDimension::activated(int iMsg) { Q_UNUSED(iMsg); - ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerDimension()); - getSelection().clearSelection(); + App::AutoTransaction::setEnable(false); + + // get the selection + std::vector selection = getSelection().getSelectionEx(); + std::vector SubNames = {}; + + // only one sketch with its subelements are allowed to be selected + if (selection.size() == 1 && selection[0].isObjectTypeOf(Sketcher::SketchObject::getClassTypeId())) { + SubNames = selection[0].getSubNames(); + } + + ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerDimension(SubNames)); } void CmdSketcherDimension::updateAction(int mode) @@ -7189,9 +7357,8 @@ CmdSketcherConstrainRadius::CmdSketcherConstrainRadius() { sAppModule = "Sketcher"; sGroup = "Sketcher"; - sMenuText = QT_TR_NOOP("Constrain radius or weight"); - sToolTipText = QT_TR_NOOP( - "Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline"); + sMenuText = QT_TR_NOOP("Constrain radius"); + sToolTipText = QT_TR_NOOP("Fix the radius of a circle or an arc"); sWhatsThis = "Sketcher_ConstrainRadius"; sStatusTip = sToolTipText; sPixmap = "Constraint_Radius"; @@ -8381,7 +8548,7 @@ void CmdSketcherCompConstrainRadDia::languageChange() QAction* arc3 = a[2]; arc3->setText(QApplication::translate("CmdSketcherCompConstrainRadDia", "Constrain auto radius/diameter")); - arc3->setToolTip(QApplication::translate("Sketcher_ConstraintRadiam", + arc3->setToolTip(QApplication::translate("Sketcher_ConstrainRadiam", "Fix the radius/diameter of a circle or an arc")); arc3->setStatusTip(QApplication::translate("Sketcher_ConstrainRadiam", "Fix the radius/diameter of a circle or an arc")); @@ -9928,6 +10095,7 @@ CmdSketcherToggleDrivingConstraint::CmdSketcherToggleDrivingConstraint() rcCmdMgr.addCommandMode("ToggleDrivingConstraint", "Sketcher_ConstrainAngle"); rcCmdMgr.addCommandMode("ToggleDrivingConstraint", "Sketcher_CompConstrainRadDia"); rcCmdMgr.addCommandMode("ToggleDrivingConstraint", "Sketcher_Dimension"); + rcCmdMgr.addCommandMode("ToggleDrivingConstraint", "Sketcher_CompDimensionTools"); // rcCmdMgr.addCommandMode("ToggleDrivingConstraint", "Sketcher_ConstrainSnellsLaw"); } @@ -10161,4 +10329,6 @@ void CreateSketcherCommandsConstraints() rcCmdMgr.addCommand(new CmdSketcherConstrainSnellsLaw()); rcCmdMgr.addCommand(new CmdSketcherToggleDrivingConstraint()); rcCmdMgr.addCommand(new CmdSketcherToggleActiveConstraint()); + rcCmdMgr.addCommand(new CmdSketcherCompDimensionTools()); } +// clang-format on diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.h b/src/Mod/Sketcher/Gui/CommandConstraints.h index d1435459ca..c7a17cbc94 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.h +++ b/src/Mod/Sketcher/Gui/CommandConstraints.h @@ -41,8 +41,11 @@ namespace SketcherGui /// NOTE: A command must be opened before calling this function, which this function /// commits or aborts as appropriate. The reason is for compatibility reasons with /// other code e.g. "Autoconstraints" in DrawSketchHandler.cpp -void makeTangentToEllipseviaNewPoint(Sketcher::SketchObject* Obj, const Part::GeomEllipse* ellipse, - const Part::Geometry* geom2, int geoId1, int geoId2); +void makeTangentToEllipseviaNewPoint(Sketcher::SketchObject* Obj, + const Part::GeomEllipse* ellipse, + const Part::Geometry* geom2, + int geoId1, + int geoId2); /// Makes a tangency constraint using external construction line between /// aoe => an arc of ellipse /// geom2 => any of an arc of ellipse, a circle, or an arc (of circle) @@ -53,7 +56,9 @@ void makeTangentToEllipseviaNewPoint(Sketcher::SketchObject* Obj, const Part::Ge /// other code e.g. "Autoconstraints" in DrawSketchHandler.cpp void makeTangentToArcOfEllipseviaNewPoint(Sketcher::SketchObject* Obj, const Part::GeomArcOfEllipse* aoe, - const Part::Geometry* geom2, int geoId1, int geoId2); + const Part::Geometry* geom2, + int geoId1, + int geoId2); /// Makes a tangency constraint using external construction line between /// aoh => an arc of hyperbola @@ -65,7 +70,9 @@ void makeTangentToArcOfEllipseviaNewPoint(Sketcher::SketchObject* Obj, /// other code e.g. "Autoconstraints" in DrawSketchHandler.cpp void makeTangentToArcOfHyperbolaviaNewPoint(Sketcher::SketchObject* Obj, const Part::GeomArcOfHyperbola* aoh, - const Part::Geometry* geom2, int geoId1, int geoId2); + const Part::Geometry* geom2, + int geoId1, + int geoId2); /// Makes a simple tangency constraint using extra point + tangent via point /// aop => an arc of parabola @@ -79,19 +86,26 @@ void makeTangentToArcOfHyperbolaviaNewPoint(Sketcher::SketchObject* Obj, /// DrawSketchHandler.cpp void makeTangentToArcOfParabolaviaNewPoint(Sketcher::SketchObject* Obj, const Part::GeomArcOfParabola* aop, - const Part::Geometry* geom2, int geoId1, int geoId2); + const Part::Geometry* geom2, + int geoId1, + int geoId2); /// Does an endpoint-to-endpoint tangency -void doEndpointTangency(Sketcher::SketchObject* Obj, int GeoId1, int GeoId2, - Sketcher::PointPos PosId1, Sketcher::PointPos PosId2); +void doEndpointTangency(Sketcher::SketchObject* Obj, + int GeoId1, + int GeoId2, + Sketcher::PointPos PosId1, + Sketcher::PointPos PosId2); /// Does an endpoint-edge tangency -void doEndpointToEdgeTangency(Sketcher::SketchObject* Obj, int GeoId1, Sketcher::PointPos PosId1, +void doEndpointToEdgeTangency(Sketcher::SketchObject* Obj, + int GeoId1, + Sketcher::PointPos PosId1, int GeoId2); /// shows constraint substitution information dialog box, enabling the user to forgo further /// notifications void notifyConstraintSubstitutions(const QString& message); -}// namespace SketcherGui -#endif// SKETCHERGUI_CommandConstraints_H +} // namespace SketcherGui +#endif // SKETCHERGUI_CommandConstraints_H diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp index 43cb566d4f..7807d45d02 100644 --- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp +++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp @@ -241,16 +241,20 @@ CmdSketcherCompCreateRectangles::CmdSketcherCompCreateRectangles() void CmdSketcherCompCreateRectangles::activated(int iMsg) { - if (iMsg == 0) + if (iMsg == 0) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerBox(DrawSketchHandlerBox::Diagonal)); - else if (iMsg == 1) + } + else if (iMsg == 1) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerBox(DrawSketchHandlerBox::CenterAndCorner)); - else if (iMsg == 2) + } + else if (iMsg == 2) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerOblong()); - else + } + else { return; + } // Since the default icon is reset when enabling/disabling the command we have // to explicitly set the icon of the used command. @@ -287,8 +291,9 @@ Gui::Action* CmdSketcherCompCreateRectangles::createAction() void CmdSketcherCompCreateRectangles::updateAction(int mode) { Gui::ActionGroup* pcAction = qobject_cast(getAction()); - if (!pcAction) + if (!pcAction) { return; + } QList a = pcAction->actions(); int index = pcAction->property("defaultAction").toInt(); @@ -313,8 +318,9 @@ void CmdSketcherCompCreateRectangles::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); @@ -454,12 +460,15 @@ CmdSketcherCompCreateArc::CmdSketcherCompCreateArc() void CmdSketcherCompCreateArc::activated(int iMsg) { - if (iMsg == 0) + if (iMsg == 0) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerArc()); - else if (iMsg == 1) + } + else if (iMsg == 1) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandler3PointArc()); - else + } + else { return; + } // Since the default icon is reset when enabling/disabling the command we have // to explicitly set the icon of the used command. @@ -494,8 +503,9 @@ Gui::Action* CmdSketcherCompCreateArc::createAction() void CmdSketcherCompCreateArc::updateAction(int mode) { Gui::ActionGroup* pcAction = qobject_cast(getAction()); - if (!pcAction) + if (!pcAction) { return; + } QList a = pcAction->actions(); int index = pcAction->property("defaultAction").toInt(); @@ -517,8 +527,9 @@ void CmdSketcherCompCreateArc::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); @@ -526,14 +537,17 @@ void CmdSketcherCompCreateArc::languageChange() arc1->setText(QApplication::translate("CmdSketcherCompCreateArc", "Center and end points")); arc1->setToolTip(QApplication::translate("Sketcher_CreateArc", "Create an arc by its center and by its end points")); - arc1->setStatusTip(QApplication::translate( - "Sketcher_CreateArc", "Create an arc by its center and by its end points")); + arc1->setStatusTip( + QApplication::translate("Sketcher_CreateArc", + "Create an arc by its center and by its end points")); QAction* arc2 = a[1]; arc2->setText(QApplication::translate("CmdSketcherCompCreateArc", "End points and rim point")); - arc2->setToolTip(QApplication::translate( - "Sketcher_Create3PointArc", "Create an arc by its end points and a point along the arc")); - arc2->setStatusTip(QApplication::translate( - "Sketcher_Create3PointArc", "Create an arc by its end points and a point along the arc")); + arc2->setToolTip( + QApplication::translate("Sketcher_Create3PointArc", + "Create an arc by its end points and a point along the arc")); + arc2->setStatusTip( + QApplication::translate("Sketcher_Create3PointArc", + "Create an arc by its end points and a point along the arc")); } bool CmdSketcherCompCreateArc::isActive() @@ -813,8 +827,9 @@ Gui::Action* CmdSketcherCompCreateConic::createAction() void CmdSketcherCompCreateConic::updateAction(int mode) { Gui::ActionGroup* pcAction = qobject_cast(getAction()); - if (!pcAction) + if (!pcAction) { return; + } QList a = pcAction->actions(); int index = pcAction->property("defaultAction").toInt(); @@ -847,21 +862,25 @@ void CmdSketcherCompCreateConic::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); QAction* ellipseByCenter = a[0]; ellipseByCenter->setText(QApplication::translate("CmdSketcherCompCreateConic", "Ellipse by center, major radius, point")); - ellipseByCenter->setToolTip(QApplication::translate( - "Sketcher_CreateEllipseByCenter", "Create an ellipse by center, major radius and point")); - ellipseByCenter->setStatusTip(QApplication::translate( - "Sketcher_CreateEllipseByCenter", "Create an ellipse by center, major radius and point")); + ellipseByCenter->setToolTip( + QApplication::translate("Sketcher_CreateEllipseByCenter", + "Create an ellipse by center, major radius and point")); + ellipseByCenter->setStatusTip( + QApplication::translate("Sketcher_CreateEllipseByCenter", + "Create an ellipse by center, major radius and point")); QAction* ellipseBy3Points = a[1]; - ellipseBy3Points->setText(QApplication::translate( - "CmdSketcherCompCreateConic", "Ellipse by periapsis, apoapsis, minor radius")); + ellipseBy3Points->setText( + QApplication::translate("CmdSketcherCompCreateConic", + "Ellipse by periapsis, apoapsis, minor radius")); ellipseBy3Points->setToolTip( QApplication::translate("Sketcher_CreateEllipseBy3Points", "Create a ellipse by periapsis, apoapsis, and minor radius")); @@ -869,8 +888,9 @@ void CmdSketcherCompCreateConic::languageChange() QApplication::translate("Sketcher_CreateEllipseBy3Points", "Create a ellipse by periapsis, apoapsis, and minor radius")); QAction* arcofellipse = a[2]; - arcofellipse->setText(QApplication::translate( - "CmdSketcherCompCreateConic", "Arc of ellipse by center, major radius, endpoints")); + arcofellipse->setText( + QApplication::translate("CmdSketcherCompCreateConic", + "Arc of ellipse by center, major radius, endpoints")); arcofellipse->setToolTip(QApplication::translate( "Sketcher_CreateArcOfEllipse", "Create an arc of ellipse by its center, major radius, and endpoints")); @@ -878,8 +898,9 @@ void CmdSketcherCompCreateConic::languageChange() "Sketcher_CreateArcOfEllipse", "Create an arc of ellipse by its center, major radius, and endpoints")); QAction* arcofhyperbola = a[3]; - arcofhyperbola->setText(QApplication::translate( - "CmdSketcherCompCreateConic", "Arc of hyperbola by center, major radius, endpoints")); + arcofhyperbola->setText( + QApplication::translate("CmdSketcherCompCreateConic", + "Arc of hyperbola by center, major radius, endpoints")); arcofhyperbola->setToolTip(QApplication::translate( "Sketcher_CreateArcOfHyperbola", "Create an arc of hyperbola by its center, major radius, and endpoints")); @@ -1116,8 +1137,9 @@ Gui::Action* CmdSketcherCompCreateBSpline::createAction() void CmdSketcherCompCreateBSpline::updateAction(int mode) { Gui::ActionGroup* pcAction = qobject_cast(getAction()); - if (!pcAction) + if (!pcAction) { return; + } QList a = pcAction->actions(); int index = pcAction->property("defaultAction").toInt(); @@ -1148,8 +1170,9 @@ void CmdSketcherCompCreateBSpline::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); @@ -1163,10 +1186,12 @@ void CmdSketcherCompCreateBSpline::languageChange() QAction* periodicbspline = a[1]; periodicbspline->setText(QApplication::translate("Sketcher_Create_Periodic_BSpline", "Periodic B-spline by control points")); - periodicbspline->setToolTip(QApplication::translate( - "Sketcher_Create_Periodic_BSpline", "Create a periodic B-spline by control points")); - periodicbspline->setStatusTip(QApplication::translate( - "Sketcher_Create_Periodic_BSpline", "Create a periodic B-spline by control points")); + periodicbspline->setToolTip( + QApplication::translate("Sketcher_Create_Periodic_BSpline", + "Create a periodic B-spline by control points")); + periodicbspline->setStatusTip( + QApplication::translate("Sketcher_Create_Periodic_BSpline", + "Create a periodic B-spline by control points")); QAction* bsplinebyknot = a[2]; bsplinebyknot->setText( QApplication::translate("Sketcher_CreateBSplineByInterpolation", "B-spline by knots")); @@ -1175,12 +1200,15 @@ void CmdSketcherCompCreateBSpline::languageChange() bsplinebyknot->setStatusTip(QApplication::translate("Sketcher_CreateBSplineByInterpolation", "Create a B-spline by knots")); QAction* periodicbsplinebyknot = a[3]; - periodicbsplinebyknot->setText(QApplication::translate( - "Sketcher_Create_Periodic_BSplineByInterpolation", "Periodic B-spline by knots")); - periodicbsplinebyknot->setToolTip(QApplication::translate( - "Sketcher_Create_Periodic_BSplineByInterpolation", "Create a periodic B-spline by knots")); - periodicbsplinebyknot->setStatusTip(QApplication::translate( - "Sketcher_Create_Periodic_BSplineByInterpolation", "Create a periodic B-spline by knots")); + periodicbsplinebyknot->setText( + QApplication::translate("Sketcher_Create_Periodic_BSplineByInterpolation", + "Periodic B-spline by knots")); + periodicbsplinebyknot->setToolTip( + QApplication::translate("Sketcher_Create_Periodic_BSplineByInterpolation", + "Create a periodic B-spline by knots")); + periodicbsplinebyknot->setStatusTip( + QApplication::translate("Sketcher_Create_Periodic_BSplineByInterpolation", + "Create a periodic B-spline by knots")); } bool CmdSketcherCompCreateBSpline::isActive() @@ -1237,12 +1265,15 @@ CmdSketcherCompCreateCircle::CmdSketcherCompCreateCircle() void CmdSketcherCompCreateCircle::activated(int iMsg) { - if (iMsg == 0) + if (iMsg == 0) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerCircle()); - else if (iMsg == 1) + } + else if (iMsg == 1) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandler3PointCircle()); - else + } + else { return; + } // Since the default icon is reset when enabling/disabling the command we have // to explicitly set the icon of the used command. @@ -1277,8 +1308,9 @@ Gui::Action* CmdSketcherCompCreateCircle::createAction() void CmdSketcherCompCreateCircle::updateAction(int mode) { Gui::ActionGroup* pcAction = qobject_cast(getAction()); - if (!pcAction) + if (!pcAction) { return; + } QList a = pcAction->actions(); int index = pcAction->property("defaultAction").toInt(); @@ -1300,8 +1332,9 @@ void CmdSketcherCompCreateCircle::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); @@ -1488,8 +1521,9 @@ void CmdSketcherCompCreateFillets::updateAction(int mode) { Q_UNUSED(mode); Gui::ActionGroup* pcAction = qobject_cast(getAction()); - if (!pcAction) + if (!pcAction) { return; + } QList a = pcAction->actions(); int index = pcAction->property("defaultAction").toInt(); @@ -1502,8 +1536,9 @@ void CmdSketcherCompCreateFillets::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); @@ -1516,10 +1551,12 @@ void CmdSketcherCompCreateFillets::languageChange() QAction* pointFillet = a[1]; pointFillet->setText(QApplication::translate("CmdSketcherCompCreateFillets", "Constraint-preserving sketch fillet")); - pointFillet->setToolTip(QApplication::translate( - "Sketcher_CreatePointFillet", "Fillet that preserves constraints and intersection point")); - pointFillet->setStatusTip(QApplication::translate( - "Sketcher_CreatePointFillet", "Fillet that preserves constraints and intersection point")); + pointFillet->setToolTip( + QApplication::translate("Sketcher_CreatePointFillet", + "Fillet that preserves constraints and intersection point")); + pointFillet->setStatusTip( + QApplication::translate("Sketcher_CreatePointFillet", + "Fillet that preserves constraints and intersection point")); } bool CmdSketcherCompCreateFillets::isActive() @@ -1911,8 +1948,9 @@ void CmdSketcherCreateRegularPolygon::activated(int iMsg) // Pop-up asking for values SketcherRegularPolygonDialog srpd; - if (srpd.exec() == QDialog::Accepted) + if (srpd.exec() == QDialog::Accepted) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerRegularPolygon(srpd.sides)); + } } bool CmdSketcherCreateRegularPolygon::isActive() @@ -1959,9 +1997,10 @@ void CmdSketcherCompCreateRegularPolygon::activated(int iMsg) case 6: { // Pop-up asking for values SketcherRegularPolygonDialog srpd; - if (srpd.exec() == QDialog::Accepted) + if (srpd.exec() == QDialog::Accepted) { ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerRegularPolygon(srpd.sides)); + } } break; default: return; @@ -2010,8 +2049,9 @@ Gui::Action* CmdSketcherCompCreateRegularPolygon::createAction() void CmdSketcherCompCreateRegularPolygon::updateAction(int mode) { Gui::ActionGroup* pcAction = qobject_cast(getAction()); - if (!pcAction) + if (!pcAction) { return; + } QList a = pcAction->actions(); int index = pcAction->property("defaultAction").toInt(); @@ -2044,8 +2084,9 @@ void CmdSketcherCompCreateRegularPolygon::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); @@ -2061,39 +2102,50 @@ void CmdSketcherCompCreateRegularPolygon::languageChange() square->setText(QApplication::translate("CmdSketcherCompCreateRegularPolygon", "Square")); square->setToolTip(QApplication::translate("Sketcher_CreateSquare", "Create a square by its center and by one corner")); - square->setStatusTip(QApplication::translate( - "Sketcher_CreateSquare", "Create a square by its center and by one corner")); + square->setStatusTip( + QApplication::translate("Sketcher_CreateSquare", + "Create a square by its center and by one corner")); QAction* pentagon = a[2]; pentagon->setText(QApplication::translate("CmdSketcherCompCreateRegularPolygon", "Pentagon")); - pentagon->setToolTip(QApplication::translate( - "Sketcher_CreatePentagon", "Create a pentagon by its center and by one corner")); - pentagon->setStatusTip(QApplication::translate( - "Sketcher_CreatePentagon", "Create a pentagon by its center and by one corner")); + pentagon->setToolTip( + QApplication::translate("Sketcher_CreatePentagon", + "Create a pentagon by its center and by one corner")); + pentagon->setStatusTip( + QApplication::translate("Sketcher_CreatePentagon", + "Create a pentagon by its center and by one corner")); QAction* hexagon = a[3]; hexagon->setText(QApplication::translate("CmdSketcherCompCreateRegularPolygon", "Hexagon")); - hexagon->setToolTip(QApplication::translate( - "Sketcher_CreateHexagon", "Create a hexagon by its center and by one corner")); - hexagon->setStatusTip(QApplication::translate( - "Sketcher_CreateHexagon", "Create a hexagon by its center and by one corner")); + hexagon->setToolTip( + QApplication::translate("Sketcher_CreateHexagon", + "Create a hexagon by its center and by one corner")); + hexagon->setStatusTip( + QApplication::translate("Sketcher_CreateHexagon", + "Create a hexagon by its center and by one corner")); QAction* heptagon = a[4]; heptagon->setText(QApplication::translate("CmdSketcherCompCreateRegularPolygon", "Heptagon")); - heptagon->setToolTip(QApplication::translate( - "Sketcher_CreateHeptagon", "Create a heptagon by its center and by one corner")); - heptagon->setStatusTip(QApplication::translate( - "Sketcher_CreateHeptagon", "Create a heptagon by its center and by one corner")); + heptagon->setToolTip( + QApplication::translate("Sketcher_CreateHeptagon", + "Create a heptagon by its center and by one corner")); + heptagon->setStatusTip( + QApplication::translate("Sketcher_CreateHeptagon", + "Create a heptagon by its center and by one corner")); QAction* octagon = a[5]; octagon->setText(QApplication::translate("CmdSketcherCompCreateRegularPolygon", "Octagon")); - octagon->setToolTip(QApplication::translate( - "Sketcher_CreateOctagon", "Create an octagon by its center and by one corner")); - octagon->setStatusTip(QApplication::translate( - "Sketcher_CreateOctagon", "Create an octagon by its center and by one corner")); + octagon->setToolTip( + QApplication::translate("Sketcher_CreateOctagon", + "Create an octagon by its center and by one corner")); + octagon->setStatusTip( + QApplication::translate("Sketcher_CreateOctagon", + "Create an octagon by its center and by one corner")); QAction* regular = a[6]; regular->setText( QApplication::translate("CmdSketcherCompCreateRegularPolygon", "Regular polygon")); - regular->setToolTip(QApplication::translate( - "Sketcher_CreateOctagon", "Create a regular polygon by its center and by one corner")); - regular->setStatusTip(QApplication::translate( - "Sketcher_CreateOctagon", "Create a regular polygon by its center and by one corner")); + regular->setToolTip( + QApplication::translate("Sketcher_CreateOctagon", + "Create a regular polygon by its center and by one corner")); + regular->setStatusTip( + QApplication::translate("Sketcher_CreateOctagon", + "Create a regular polygon by its center and by one corner")); } bool CmdSketcherCompCreateRegularPolygon::isActive() diff --git a/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp b/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp index 4f0a30655c..e16b1448ef 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherBSpline.cpp @@ -67,15 +67,18 @@ void ActivateBSplineHandler(Gui::Document* doc, DrawSketchHandler* handler) /// index within it (by OCC numbering). /// Returns true if the entities are found, false otherwise. /// If returns false, `splineGeoId` and `knotIndexOCC` have garbage values. -bool findBSplineAndKnotIndex(Sketcher::SketchObject* Obj, int knotGeoId, - Sketcher::PointPos knotPosId, int& splineGeoId, int& knotIndexOCC) +bool findBSplineAndKnotIndex(Sketcher::SketchObject* Obj, + int knotGeoId, + Sketcher::PointPos knotPosId, + int& splineGeoId, + int& knotIndexOCC) { for (auto const constraint : Obj->Constraints.getValues()) { if (constraint->Type == Sketcher::InternalAlignment && constraint->First == knotGeoId && constraint->AlignmentType == Sketcher::BSplineKnotPoint) { splineGeoId = constraint->Second; knotIndexOCC = constraint->InternalAlignmentIndex + 1; - return true;// we have already found our knot. + return true; // we have already found our knot. } } @@ -222,11 +225,13 @@ void CmdSketcherIncreaseDegree::activated(int iMsg) const Part::Geometry* geo = Obj->getGeometry(GeoId); if (geo->getTypeId() == Part::GeomBSplineCurve::getClassTypeId()) { - Gui::cmdAppObjectArgs( - selection[0].getObject(), "increaseBSplineDegree(%d) ", GeoId); + Gui::cmdAppObjectArgs(selection[0].getObject(), + "increaseBSplineDegree(%d) ", + GeoId); // add new control points - Gui::cmdAppObjectArgs( - selection[0].getObject(), "exposeInternalGeometry(%d)", GeoId); + Gui::cmdAppObjectArgs(selection[0].getObject(), + "exposeInternalGeometry(%d)", + GeoId); } else { ignored = true; @@ -299,16 +304,17 @@ void CmdSketcherDecreaseDegree::activated(int iMsg) const Part::Geometry* geo = Obj->getGeometry(GeoId); if (geo->getTypeId() == Part::GeomBSplineCurve::getClassTypeId()) { - Gui::cmdAppObjectArgs( - selection[0].getObject(), "decreaseBSplineDegree(%d) ", GeoId); + Gui::cmdAppObjectArgs(selection[0].getObject(), + "decreaseBSplineDegree(%d) ", + GeoId); // add new control points // Currently exposeInternalGeometry is called from within decreaseBSplineDegree // because the old spline is deleted and a new one is added so that the GeoId is // invalid afterwards // Gui::cmdAppObjectArgs(selection[0].getObject(), "exposeInternalGeometry(%d)", // GeoId); - break;// cannot handle more than spline because the GeoIds will be invalidated after - // the first change + break; // cannot handle more than spline because the GeoIds will be invalidated + // after the first change } else { ignored = true; @@ -411,16 +417,18 @@ void CmdSketcherIncreaseKnotMultiplicity::activated(int iMsg) catch (const Base::CADKernelError& e) { e.ReportException(); if (e.getTranslatable()) { - Gui::TranslatedUserError( - Obj, QObject::tr("CAD Kernel Error"), QObject::tr(e.getMessage().c_str())); + Gui::TranslatedUserError(Obj, + QObject::tr("CAD Kernel Error"), + QObject::tr(e.getMessage().c_str())); } getSelection().clearSelection(); } catch (const Base::Exception& e) { e.ReportException(); if (e.getTranslatable()) { - Gui::TranslatedUserError( - Obj, QObject::tr("Input Error"), QObject::tr(e.getMessage().c_str())); + Gui::TranslatedUserError(Obj, + QObject::tr("Input Error"), + QObject::tr(e.getMessage().c_str())); } getSelection().clearSelection(); } @@ -451,12 +459,14 @@ void CmdSketcherIncreaseKnotMultiplicity::activated(int iMsg) if (ngfound) { try { // add internalalignment for new pole - Gui::cmdAppObjectArgs( - selection[0].getObject(), "exposeInternalGeometry(%d)", ngeoid); + Gui::cmdAppObjectArgs(selection[0].getObject(), + "exposeInternalGeometry(%d)", + ngeoid); } catch (const Base::Exception& e) { - Gui::NotifyUserError( - Obj, QT_TRANSLATE_NOOP("Notifications", "Invalid Constraint"), e.what()); + Gui::NotifyUserError(Obj, + QT_TRANSLATE_NOOP("Notifications", "Invalid Constraint"), + e.what()); getSelection().clearSelection(); } } @@ -585,12 +595,14 @@ void CmdSketcherDecreaseKnotMultiplicity::activated(int iMsg) if (ngfound) { try { // add internalalignment for new pole - Gui::cmdAppObjectArgs( - selection[0].getObject(), "exposeInternalGeometry(%d)", ngeoid); + Gui::cmdAppObjectArgs(selection[0].getObject(), + "exposeInternalGeometry(%d)", + ngeoid); } catch (const Base::Exception& e) { - Gui::NotifyUserError( - Obj, QT_TRANSLATE_NOOP("Notifications", "Invalid Constraint"), e.what()); + Gui::NotifyUserError(Obj, + QT_TRANSLATE_NOOP("Notifications", "Invalid Constraint"), + e.what()); getSelection().clearSelection(); } } @@ -780,15 +792,17 @@ public: catch (const Base::CADKernelError& e) { e.ReportException(); if (e.getTranslatable()) { - Gui::TranslatedUserError( - Obj, QObject::tr("CAD Kernel Error"), QObject::tr(e.getMessage().c_str())); + Gui::TranslatedUserError(Obj, + QObject::tr("CAD Kernel Error"), + QObject::tr(e.getMessage().c_str())); } } catch (const Base::Exception& e) { e.ReportException(); if (e.getTranslatable()) { - Gui::TranslatedUserError( - Obj, QObject::tr("Input Error"), QObject::tr(e.getMessage().c_str())); + Gui::TranslatedUserError(Obj, + QObject::tr("Input Error"), + QObject::tr(e.getMessage().c_str())); } } @@ -814,8 +828,9 @@ public: Gui::cmdAppObjectArgs(Obj, "exposeInternalGeometry(%d)", newGeoId); } catch (const Base::Exception& e) { - Gui::NotifyUserError( - Obj, QT_TRANSLATE_NOOP("Notifications", "Invalid Constraint"), e.what()); + Gui::NotifyUserError(Obj, + QT_TRANSLATE_NOOP("Notifications", "Invalid Constraint"), + e.what()); } } } @@ -846,7 +861,7 @@ public: } else { sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + ->purgeHandler(); // no code after this line, Handler get deleted in ViewProvider } return true; @@ -1052,8 +1067,9 @@ void CmdSketcherJoinCurves::activated(int iMsg) // Warning: GeoId list will have changed } catch (const Base::Exception& e) { - Gui::TranslatedUserError( - Obj, QObject::tr("Error"), QObject::tr(getStrippedPythonExceptionString(e).c_str())); + Gui::TranslatedUserError(Obj, + QObject::tr("Error"), + QObject::tr(getStrippedPythonExceptionString(e).c_str())); getSelection().clearSelection(); } diff --git a/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp b/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp index 5f2f90f6c6..9c0659e887 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherOverlay.cpp @@ -227,18 +227,24 @@ void CmdSketcherCompBSplineShowHideGeometryInformation::activated(int iMsg) Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); Gui::Command* cmd; - if (iMsg == 0) + if (iMsg == 0) { cmd = rcCmdMgr.getCommandByName("Sketcher_BSplineDegree"); - else if (iMsg == 1) + } + else if (iMsg == 1) { cmd = rcCmdMgr.getCommandByName("Sketcher_BSplinePolygon"); - else if (iMsg == 2) + } + else if (iMsg == 2) { cmd = rcCmdMgr.getCommandByName("Sketcher_BSplineComb"); - else if (iMsg == 3) + } + else if (iMsg == 3) { cmd = rcCmdMgr.getCommandByName("Sketcher_BSplineKnotMultiplicity"); - else if (iMsg == 4) + } + else if (iMsg == 4) { cmd = rcCmdMgr.getCommandByName("Sketcher_BSplinePoleWeight"); - else + } + else { return; + } cmd->invoke(0); @@ -284,8 +290,9 @@ void CmdSketcherCompBSplineShowHideGeometryInformation::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); diff --git a/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp b/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp index f469a70881..f1651b5667 100644 --- a/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp +++ b/src/Mod/Sketcher/Gui/CommandSketcherVirtualSpace.cpp @@ -58,12 +58,14 @@ bool isSketcherVirtualSpaceActive(Gui::Document* doc, bool actsOnSelection) && doc->getInEdit()->isDerivedFrom(SketcherGui::ViewProviderSketch::getClassTypeId())) { if (static_cast(doc->getInEdit())->getSketchMode() == ViewProviderSketch::STATUS_NONE) { - if (!actsOnSelection) + if (!actsOnSelection) { return true; + } else if (Gui::Selection().countObjectsOfType( Sketcher::SketchObject::getClassTypeId()) - > 0) + > 0) { return true; + } } } } @@ -133,8 +135,9 @@ void CmdSketcherSwitchVirtualSpace::activated(int iMsg) for (std::vector::const_iterator it = SubNames.begin(); it != SubNames.end(); ++it) { // see if we have constraints, if we do it is not a mode change, but a toggle. - if (it->size() > 10 && it->substr(0, 10) == "Constraint") + if (it->size() > 10 && it->substr(0, 10) == "Constraint") { modeChange = false; + } } } @@ -182,10 +185,12 @@ void CmdSketcherSwitchVirtualSpace::activated(int iMsg) } } - if (successful > 0) + if (successful > 0) { commitCommand(); - else + } + else { abortCommand(); + } // recomputer and clear the selection (convenience) tryAutoRecompute(Obj); diff --git a/src/Mod/Sketcher/Gui/ConstraintFilters.h b/src/Mod/Sketcher/Gui/ConstraintFilters.h index d9d561b9f4..ec0e58897d 100644 --- a/src/Mod/Sketcher/Gui/ConstraintFilters.h +++ b/src/Mod/Sketcher/Gui/ConstraintFilters.h @@ -65,7 +65,7 @@ enum class FilterValue SnellsLaw = 21, Named = 22, NonDriving = 23, - NumFilterValue// SpecialFilterValue shall start at the same index as this + NumFilterValue // SpecialFilterValue shall start at the same index as this }; constexpr auto FilterValueLength = @@ -73,8 +73,8 @@ constexpr auto FilterValueLength = enum class SpecialFilterValue { - Selection = FilterValueLength,// = 24 - AssociatedConstraints, // = 25 + Selection = FilterValueLength, // = 24 + AssociatedConstraints, // = 25 NumSpecialFilterValue }; @@ -111,53 +111,80 @@ constexpr decltype(auto) buildBitset(Args... args) /// FilterValue, which other FilterValues are comprised therein. It defines the dependencies between /// filters. constexpr std::array filterAggregates { - buildBitset(FilterValue::All, FilterValue::Geometric, FilterValue::Horizontal, - FilterValue::Vertical, FilterValue::Coincident, FilterValue::PointOnObject, - FilterValue::Parallel, FilterValue::Perpendicular, FilterValue::Tangent, - FilterValue::Equality, FilterValue::Symmetric, FilterValue::Block, - FilterValue::Datums, FilterValue::Distance, FilterValue::HorizontalDistance, - FilterValue::VerticalDistance, FilterValue::Radius, FilterValue::Weight, - FilterValue::Diameter, FilterValue::Angle, FilterValue::SnellsLaw, - FilterValue::Named, FilterValue::NonDriving, - FilterValue::InternalAlignment),// All = All other groups are covered (0) - buildBitset(FilterValue::Geometric, FilterValue::Horizontal, FilterValue::Vertical, - FilterValue::Coincident, FilterValue::PointOnObject, FilterValue::Parallel, - FilterValue::Perpendicular, FilterValue::Tangent, FilterValue::Equality, - FilterValue::Symmetric, FilterValue::Block, - FilterValue::InternalAlignment),// Geometric = All others not being datums (1) + buildBitset(FilterValue::All, + FilterValue::Geometric, + FilterValue::Horizontal, + FilterValue::Vertical, + FilterValue::Coincident, + FilterValue::PointOnObject, + FilterValue::Parallel, + FilterValue::Perpendicular, + FilterValue::Tangent, + FilterValue::Equality, + FilterValue::Symmetric, + FilterValue::Block, + FilterValue::Datums, + FilterValue::Distance, + FilterValue::HorizontalDistance, + FilterValue::VerticalDistance, + FilterValue::Radius, + FilterValue::Weight, + FilterValue::Diameter, + FilterValue::Angle, + FilterValue::SnellsLaw, + FilterValue::Named, + FilterValue::NonDriving, + FilterValue::InternalAlignment), // All = All other groups are covered (0) + buildBitset(FilterValue::Geometric, + FilterValue::Horizontal, + FilterValue::Vertical, + FilterValue::Coincident, + FilterValue::PointOnObject, + FilterValue::Parallel, + FilterValue::Perpendicular, + FilterValue::Tangent, + FilterValue::Equality, + FilterValue::Symmetric, + FilterValue::Block, + FilterValue::InternalAlignment), // Geometric = All others not being datums (1) - buildBitset(FilterValue::Coincident), // Coincident = Just this (2) - buildBitset(FilterValue::PointOnObject), // PointOnObject = Just this (3) - buildBitset(FilterValue::Vertical), // Vertical = Just this (4) - buildBitset(FilterValue::Horizontal), // Horizontal = Just this (5) - buildBitset(FilterValue::Parallel), // Parallel = Just this (6) - buildBitset(FilterValue::Perpendicular), // Perpendicular = Just this (7) - buildBitset(FilterValue::Tangent), // Tangent = Just this (8) - buildBitset(FilterValue::Equality), // Equality = Just this (9) - buildBitset(FilterValue::Symmetric), // Symmetric = Just this (10) - buildBitset(FilterValue::Block), // Block = Just this (11) - buildBitset(FilterValue::InternalAlignment),// InternalAlignment = Just this (12) + buildBitset(FilterValue::Coincident), // Coincident = Just this (2) + buildBitset(FilterValue::PointOnObject), // PointOnObject = Just this (3) + buildBitset(FilterValue::Vertical), // Vertical = Just this (4) + buildBitset(FilterValue::Horizontal), // Horizontal = Just this (5) + buildBitset(FilterValue::Parallel), // Parallel = Just this (6) + buildBitset(FilterValue::Perpendicular), // Perpendicular = Just this (7) + buildBitset(FilterValue::Tangent), // Tangent = Just this (8) + buildBitset(FilterValue::Equality), // Equality = Just this (9) + buildBitset(FilterValue::Symmetric), // Symmetric = Just this (10) + buildBitset(FilterValue::Block), // Block = Just this (11) + buildBitset(FilterValue::InternalAlignment), // InternalAlignment = Just this (12) - buildBitset(FilterValue::Datums, FilterValue::Distance, FilterValue::HorizontalDistance, - FilterValue::VerticalDistance, FilterValue::Radius, FilterValue::Weight, - FilterValue::Diameter, FilterValue::Angle, - FilterValue::SnellsLaw),// Datum = all others not being geometric (13) + buildBitset(FilterValue::Datums, + FilterValue::Distance, + FilterValue::HorizontalDistance, + FilterValue::VerticalDistance, + FilterValue::Radius, + FilterValue::Weight, + FilterValue::Diameter, + FilterValue::Angle, + FilterValue::SnellsLaw), // Datum = all others not being geometric (13) - buildBitset(FilterValue::HorizontalDistance),// HorizontalDistance = Just this (14) - buildBitset(FilterValue::VerticalDistance), // VerticalDistance = Just this (15) - buildBitset(FilterValue::Distance), // Distance = Just this (16) - buildBitset(FilterValue::Radius), // Radius = Just this (17) - buildBitset(FilterValue::Weight), // Weight = Just this (18) - buildBitset(FilterValue::Diameter), // Diameter = Just this (19) - buildBitset(FilterValue::Angle), // Angle = Just this (20) - buildBitset(FilterValue::SnellsLaw), // SnellsLaw = Just this (21) + buildBitset(FilterValue::HorizontalDistance), // HorizontalDistance = Just this (14) + buildBitset(FilterValue::VerticalDistance), // VerticalDistance = Just this (15) + buildBitset(FilterValue::Distance), // Distance = Just this (16) + buildBitset(FilterValue::Radius), // Radius = Just this (17) + buildBitset(FilterValue::Weight), // Weight = Just this (18) + buildBitset(FilterValue::Diameter), // Diameter = Just this (19) + buildBitset(FilterValue::Angle), // Angle = Just this (20) + buildBitset(FilterValue::SnellsLaw), // SnellsLaw = Just this (21) - buildBitset(FilterValue::Named), // Named = Just this (22) - buildBitset(FilterValue::NonDriving)// NonDriving = Just this (23) + buildBitset(FilterValue::Named), // Named = Just this (22) + buildBitset(FilterValue::NonDriving) // NonDriving = Just this (23) }; -}// namespace ConstraintFilter +} // namespace ConstraintFilter -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_ConstraintFilters_H +#endif // SKETCHERGUI_ConstraintFilters_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp index 50142dbbe5..1d6e000aee 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp +++ b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp @@ -26,7 +26,7 @@ #include #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include #include #include @@ -81,13 +81,15 @@ ViewProviderSketchDrawSketchHandlerAttorney::drawEdit(ViewProviderSketch& vp, } inline void ViewProviderSketchDrawSketchHandlerAttorney::drawEdit( - ViewProviderSketch& vp, const std::list>& list) + ViewProviderSketch& vp, + const std::list>& list) { vp.drawEdit(list); } inline void ViewProviderSketchDrawSketchHandlerAttorney::drawEditMarkers( - ViewProviderSketch& vp, const std::vector& EditMarkers, + ViewProviderSketch& vp, + const std::vector& EditMarkers, unsigned int augmentationlevel) { vp.drawEditMarkers(EditMarkers, augmentationlevel); @@ -131,15 +133,16 @@ ViewProviderSketchDrawSketchHandlerAttorney::getPreselectCross(const ViewProvide } inline void -ViewProviderSketchDrawSketchHandlerAttorney::setAngleSnapping(ViewProviderSketch& vp, bool enable, +ViewProviderSketchDrawSketchHandlerAttorney::setAngleSnapping(ViewProviderSketch& vp, + bool enable, Base::Vector2d referencePoint) { vp.setAngleSnapping(enable, referencePoint); } -inline void -ViewProviderSketchDrawSketchHandlerAttorney::moveConstraint(ViewProviderSketch& vp, int constNum, - const Base::Vector2d& toPos) +inline void ViewProviderSketchDrawSketchHandlerAttorney::moveConstraint(ViewProviderSketch& vp, + int constNum, + const Base::Vector2d& toPos) { vp.moveConstraint(constNum, toPos); } @@ -154,10 +157,11 @@ CurveConverter::CurveConverter() "User parameter:BaseApp/Preferences/View"); hGrp->Attach(this); } - catch (const Base::ValueError& e) {// ensure that if parameter strings are not well-formed, the - // exception is not propagated - Base::Console().DeveloperError( - "CurveConverter", "Malformed parameter string: %s\n", e.what()); + catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, + // the exception is not propagated + Base::Console().DeveloperError("CurveConverter", + "Malformed parameter string: %s\n", + e.what()); } updateCurvedEdgeCountSegmentsParameter(); @@ -171,10 +175,11 @@ CurveConverter::~CurveConverter() hGrp->Detach(this); } catch (const Base::ValueError& - e) {// ensure that if parameter strings are not well-formed, the program is not - // terminated when calling the noexcept destructor. - Base::Console().DeveloperError( - "CurveConverter", "Malformed parameter string: %s\n", e.what()); + e) { // ensure that if parameter strings are not well-formed, the program is not + // terminated when calling the noexcept destructor. + Base::Console().DeveloperError("CurveConverter", + "Malformed parameter string: %s\n", + e.what()); } } @@ -191,7 +196,7 @@ std::vector CurveConverter::toVector2D(const Part::Geometry* geo auto isconic = type.isDerivedFrom(Part::GeomConic::getClassTypeId()); auto isbounded = type.isDerivedFrom(Part::GeomBoundedCurve::getClassTypeId()); - if (type == Part::GeomLineSegment::getClassTypeId()) {// add a line + if (type == Part::GeomLineSegment::getClassTypeId()) { // add a line auto geo = static_cast(geometry); emplaceasvector2d(geo->getStartPoint()); @@ -204,8 +209,9 @@ std::vector CurveConverter::toVector2D(const Part::Geometry* geo double segment = (geo->getLastParameter() - geo->getFirstParameter()) / curvedEdgeCountSegments; - for (int i = 0; i < curvedEdgeCountSegments; i++) + for (int i = 0; i < curvedEdgeCountSegments; i++) { emplaceasvector2d(geo->value(geo->getFirstParameter() + i * segment)); + } // either close the curve for untrimmed conic or set the last point for bounded curves emplaceasvector2d(isconic ? geo->value(0) : geo->value(geo->getLastParameter())); @@ -219,8 +225,9 @@ CurveConverter::toVector2DList(const std::vector& geometries) { std::list> list; - for (const auto& geo : geometries) + for (const auto& geo : geometries) { list.push_back(toVector2D(geo)); + } return list; } @@ -232,8 +239,9 @@ void CurveConverter::updateCurvedEdgeCountSegmentsParameter() int stdcountsegments = hGrp->GetInt("SegmentsPerGeometry", 50); // value cannot be smaller than 6 - if (stdcountsegments < 6) + if (stdcountsegments < 6) { stdcountsegments = 6; + } curvedEdgeCountSegments = stdcountsegments; }; @@ -325,7 +333,7 @@ int DrawSketchHandler::getHighestCurveIndex() unsigned long DrawSketchHandler::getCrosshairColor() { - unsigned long color = 0xFFFFFFFF;// white + unsigned long color = 0xFFFFFFFF; // white ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); color = hGrp->GetUnsigned("CursorCrosshairColor", color); @@ -352,7 +360,9 @@ void DrawSketchHandler::setCrosshairCursor(const char* svgName) setCrosshairCursor(cursorName); } -void DrawSketchHandler::setSvgCursor(const QString& cursorName, int x, int y, +void DrawSketchHandler::setSvgCursor(const QString& cursorName, + int x, + int y, const std::map& colorMapping) { // The Sketcher_Pointer_*.svg icons have a default size of 64x64. When directly creating @@ -373,10 +383,12 @@ void DrawSketchHandler::setSvgCursor(const QString& cursorName, int x, int y, #endif qreal cursorSize = defaultCursorSize * pRatio; - QPixmap pointer = Gui::BitmapFactory().pixmapFromSvg( - cursorName.toStdString().c_str(), QSizeF(cursorSize, cursorSize), colorMapping); - if (isRatioOne) + QPixmap pointer = Gui::BitmapFactory().pixmapFromSvg(cursorName.toStdString().c_str(), + QSizeF(cursorSize, cursorSize), + colorMapping); + if (isRatioOne) { pointer = pointer.scaled(32, 32); + } pointer.setDevicePixelRatio(pRatio); setCursor(pointer, hotX, hotY, false); } @@ -463,7 +475,7 @@ void DrawSketchHandler::addCursorTail(std::vector& pixmaps) currentIconX += icon.width(); } - qp.end();// Finish painting + qp.end(); // Finish painting // Create the new cursor with the icon. QPoint p = actCursor.hotSpot(); @@ -477,8 +489,9 @@ void DrawSketchHandler::updateCursor() { auto cursorstring = getCrosshairCursorSVGName(); - if (cursorstring != QString::fromLatin1("None")) + if (cursorstring != QString::fromLatin1("None")) { setCrosshairCursor(cursorstring); + } } void DrawSketchHandler::applyCursor() @@ -561,16 +574,20 @@ DrawSketchHandler::suggestedConstraintsPixmaps(std::vector& sugg } int DrawSketchHandler::seekAutoConstraint(std::vector& suggestedConstraints, - const Base::Vector2d& Pos, const Base::Vector2d& Dir, + const Base::Vector2d& Pos, + const Base::Vector2d& Dir, AutoConstraint::TargetType type) { suggestedConstraints.clear(); - if (!sketchgui->Autoconstraints.getValue()) - return 0;// If Autoconstraints property is not set quit + if (!sketchgui->Autoconstraints.getValue()) { + return 0; // If Autoconstraints property is not set quit + } - Base::Vector3d hitShapeDir = Base::Vector3d( - 0, 0, 0);// direction of hit shape (if it is a line, the direction of the line) + Base::Vector3d hitShapeDir = + Base::Vector3d(0, + 0, + 0); // direction of hit shape (if it is a line, the direction of the line) // Get Preselection int preSelPnt = getPreselectPoint(); @@ -580,8 +597,9 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested Sketcher::PointPos PosId = Sketcher::PointPos::none; - if (preSelPnt != -1) + if (preSelPnt != -1) { sketchgui->getSketchObject()->getGeoVertexIndex(preSelPnt, GeoId, PosId); + } else if (preSelCrv != -1) { const Part::Geometry* geom = sketchgui->getSketchObject()->getGeometry(preSelCrv); @@ -594,15 +612,15 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested } } } - else if (preSelCrs == 0) {// root point + else if (preSelCrs == 0) { // root point GeoId = Sketcher::GeoEnum::RtPnt; PosId = Sketcher::PointPos::start; } - else if (preSelCrs == 1) {// x axis + else if (preSelCrs == 1) { // x axis GeoId = Sketcher::GeoEnum::HAxis; hitShapeDir = Base::Vector3d(1, 0, 0); } - else if (preSelCrs == 2) {// y axis + else if (preSelCrs == 2) { // y axis GeoId = Sketcher::GeoEnum::VAxis; hitShapeDir = Base::Vector3d(0, 1, 0); } @@ -614,19 +632,23 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested constr.GeoId = GeoId; constr.PosId = PosId; if ((type == AutoConstraint::VERTEX || type == AutoConstraint::VERTEX_NO_TANGENCY) - && PosId != Sketcher::PointPos::none) + && PosId != Sketcher::PointPos::none) { constr.Type = Sketcher::Coincident; - else if (type == AutoConstraint::CURVE && PosId != Sketcher::PointPos::none) + } + else if (type == AutoConstraint::CURVE && PosId != Sketcher::PointPos::none) { constr.Type = Sketcher::PointOnObject; + } else if ((type == AutoConstraint::VERTEX || type == AutoConstraint::VERTEX_NO_TANGENCY) - && PosId == Sketcher::PointPos::none) + && PosId == Sketcher::PointPos::none) { constr.Type = Sketcher::PointOnObject; - else if (type == AutoConstraint::CURVE && PosId == Sketcher::PointPos::none) + } + else if (type == AutoConstraint::CURVE && PosId == Sketcher::PointPos::none) { constr.Type = Sketcher::Tangent; + } if (constr.Type == Sketcher::Tangent && Dir.Length() > 1e-8 && hitShapeDir.Length() - > 1e-8) {// We are hitting a line and have hitting vector information + > 1e-8) { // We are hitting a line and have hitting vector information Base::Vector3d dir3d = Base::Vector3d(Dir.x, Dir.y, 0); double cosangle = dir3d.Normalize() * hitShapeDir.Normalize(); @@ -636,20 +658,23 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested // degrees) if (fabs(cosangle) < 0.995f || ((GeoId == Sketcher::GeoEnum::HAxis || GeoId == Sketcher::GeoEnum::VAxis) - && fabs(cosangle) < 0.1)) + && fabs(cosangle) < 0.1)) { suggestedConstraints.push_back(constr); + } return suggestedConstraints.size(); } - if (constr.Type != Sketcher::None) + if (constr.Type != Sketcher::None) { suggestedConstraints.push_back(constr); + } } - if (Dir.Length() < 1e-8 || type == AutoConstraint::CURVE) + if (Dir.Length() < 1e-8 || type == AutoConstraint::CURVE) { // Direction not set so return; return suggestedConstraints.size(); + } // Suggest vertical and horizontal constraints @@ -662,19 +687,23 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested constr.GeoId = GeoEnum::GeoUndef; constr.PosId = Sketcher::PointPos::none; double angle = std::abs(atan2(Dir.y, Dir.x)); - if (angle < angleDevRad || (M_PI - angle) < angleDevRad) + if (angle < angleDevRad || (M_PI - angle) < angleDevRad) { // Suggest horizontal constraint constr.Type = Sketcher::Horizontal; - else if (std::abs(angle - M_PI_2) < angleDevRad) + } + else if (std::abs(angle - M_PI_2) < angleDevRad) { // Suggest vertical constraint constr.Type = Sketcher::Vertical; + } - if (constr.Type != Sketcher::None) + if (constr.Type != Sketcher::None) { suggestedConstraints.push_back(constr); + } // Do not seek for tangent if we are actually building a primitive - if (type == AutoConstraint::VERTEX_NO_TANGENCY) + if (type == AutoConstraint::VERTEX_NO_TANGENCY) { return suggestedConstraints.size(); + } // Find if there are tangent constraints (currently arcs and circles) @@ -688,9 +717,9 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested const std::vector geomlist = sketchgui->getSketchObject()->getCompleteGeometry(); - Base::Vector3d tmpPos(Pos.x, Pos.y, 0.f); // Current cursor point - Base::Vector3d tmpDir(Dir.x, Dir.y, 0.f); // Direction of line - Base::Vector3d tmpStart(Pos.x - Dir.x, Pos.y - Dir.y, 0.f);// Start point + Base::Vector3d tmpPos(Pos.x, Pos.y, 0.f); // Current cursor point + Base::Vector3d tmpDir(Dir.x, Dir.y, 0.f); // Direction of line + Base::Vector3d tmpStart(Pos.x - Dir.x, Pos.y - Dir.y, 0.f); // Start point // Iterate through geometry int i = 0; @@ -705,8 +734,9 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested double radius = circle->getRadius(); // ignore if no touch (use dot product) - if (tmpDir * (center - tmpPos) > 0 || tmpDir * (center - tmpStart) < 0) + if (tmpDir * (center - tmpPos) > 0 || tmpDir * (center - tmpStart) < 0) { continue; + } Base::Vector3d projPnt(0.f, 0.f, 0.f); projPnt = projPnt.ProjectToLine(center - tmpPos, tmpDir); @@ -735,10 +765,10 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested Base::Vector3d norm = Base::Vector3d(Dir.y, -Dir.x).Normalize(); - double distancetoline = norm * (tmpPos - focus1P);// distance focus1 to line + double distancetoline = norm * (tmpPos - focus1P); // distance focus1 to line Base::Vector3d focus1PMirrored = - focus1P + 2 * distancetoline * norm;// mirror of focus1 with respect to the line + focus1P + 2 * distancetoline * norm; // mirror of focus1 with respect to the line double error = fabs((focus1PMirrored - focus2P).Length() - 2 * a); @@ -754,8 +784,9 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested double radius = arc->getRadius(); // ignore if no touch (use dot product) - if (tmpDir * (center - tmpPos) > 0 || tmpDir * (center - tmpStart) < 0) + if (tmpDir * (center - tmpPos) > 0 || tmpDir * (center - tmpStart) < 0) { continue; + } Base::Vector3d projPnt(0.f, 0.f, 0.f); projPnt = projPnt.ProjectToLine(center - tmpPos, tmpDir); @@ -766,11 +797,12 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested arc->getRange(startAngle, endAngle, /*emulateCCW=*/true); double angle = atan2(projPnt.y, projPnt.x); - while (angle < startAngle) - angle += 2 * D_PI;// Bring it to range of arc + while (angle < startAngle) { + angle += 2 * D_PI; // Bring it to range of arc + } // if the point is on correct side of arc - if (angle <= endAngle) {// Now need to check only one side + if (angle <= endAngle) { // Now need to check only one side tangId = i; tangDeviation = projDist; } @@ -792,10 +824,10 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested Base::Vector3d norm = Base::Vector3d(Dir.y, -Dir.x).Normalize(); - double distancetoline = norm * (tmpPos - focus1P);// distance focus1 to line + double distancetoline = norm * (tmpPos - focus1P); // distance focus1 to line Base::Vector3d focus1PMirrored = - focus1P + 2 * distancetoline * norm;// mirror of focus1 with respect to the line + focus1P + 2 * distancetoline * norm; // mirror of focus1 with respect to the line double error = fabs((focus1PMirrored - focus2P).Length() - 2 * a); @@ -817,11 +849,12 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested - startAngle, 2.f * M_PI); - while (angle < startAngle) - angle += 2 * D_PI;// Bring it to range of arc + while (angle < startAngle) { + angle += 2 * D_PI; // Bring it to range of arc + } // if the point is on correct side of arc - if (angle <= endAngle) {// Now need to check only one side + if (angle <= endAngle) { // Now need to check only one side tangId = i; tangDeviation = error; } @@ -830,8 +863,9 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested } if (tangId != GeoEnum::GeoUndef) { - if (tangId > getHighestCurveIndex())// external Geometry + if (tangId > getHighestCurveIndex()) { // external Geometry tangId = getHighestCurveIndex() - tangId; + } // Suggest vertical constraint constr.Type = Tangent; constr.GeoId = tangId; @@ -843,11 +877,13 @@ int DrawSketchHandler::seekAutoConstraint(std::vector& suggested } void DrawSketchHandler::createAutoConstraints(const std::vector& autoConstrs, - int geoId1, Sketcher::PointPos posId1, + int geoId1, + Sketcher::PointPos posId1, bool createowncommand /*= true*/) { - if (!sketchgui->Autoconstraints.getValue()) - return;// If Autoconstraints property is not set quit + if (!sketchgui->Autoconstraints.getValue()) { + return; // If Autoconstraints property is not set quit + } if (!autoConstrs.empty()) { @@ -863,8 +899,9 @@ void DrawSketchHandler::createAutoConstraints(const std::vector& switch (it->Type) { case Sketcher::Coincident: { - if (posId1 == Sketcher::PointPos::none) + if (posId1 == Sketcher::PointPos::none) { continue; + } // If the auto constraint has a point create a coincident otherwise it is an // edge on a point Gui::cmdAppObjectArgs( @@ -917,8 +954,9 @@ void DrawSketchHandler::createAutoConstraints(const std::vector& && (geom1->getTypeId() == Part::GeomEllipse::getClassTypeId() || geom2->getTypeId() == Part::GeomEllipse::getClassTypeId())) { - if (geom1->getTypeId() != Part::GeomEllipse::getClassTypeId()) + if (geom1->getTypeId() != Part::GeomEllipse::getClassTypeId()) { std::swap(geoId1, geoId2); + } // geoId1 is the ellipse geom1 = Obj->getGeometry(geoId1); @@ -944,8 +982,9 @@ void DrawSketchHandler::createAutoConstraints(const std::vector& && (geom1->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId() || geom2->getTypeId() == Part::GeomArcOfEllipse::getClassTypeId())) { - if (geom1->getTypeId() != Part::GeomArcOfEllipse::getClassTypeId()) + if (geom1->getTypeId() != Part::GeomArcOfEllipse::getClassTypeId()) { std::swap(geoId1, geoId2); + } // geoId1 is the arc of ellipse geom1 = Obj->getGeometry(geoId1); @@ -1048,8 +1087,9 @@ void DrawSketchHandler::drawDirectionAtCursor(const Base::Vector2d& position, void DrawSketchHandler::drawEditMarkers(const std::vector& EditMarkers, unsigned int augmentationlevel) { - ViewProviderSketchDrawSketchHandlerAttorney::drawEditMarkers( - *sketchgui, EditMarkers, augmentationlevel); + ViewProviderSketchDrawSketchHandlerAttorney::drawEditMarkers(*sketchgui, + EditMarkers, + augmentationlevel); } void DrawSketchHandler::setAxisPickStyle(bool on) @@ -1089,12 +1129,12 @@ Sketcher::SketchObject* DrawSketchHandler::getSketchObject() void DrawSketchHandler::setAngleSnapping(bool enable, Base::Vector2d referencePoint) { - ViewProviderSketchDrawSketchHandlerAttorney::setAngleSnapping( - *sketchgui, enable, referencePoint); + ViewProviderSketchDrawSketchHandlerAttorney::setAngleSnapping(*sketchgui, + enable, + referencePoint); } void DrawSketchHandler::moveConstraint(int constNum, const Base::Vector2d& toPos) { - ViewProviderSketchDrawSketchHandlerAttorney::moveConstraint( - *sketchgui, constNum, toPos); -} \ No newline at end of file + ViewProviderSketchDrawSketchHandlerAttorney::moveConstraint(*sketchgui, constNum, toPos); +} diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandler.h b/src/Mod/Sketcher/Gui/DrawSketchHandler.h index a5679b5e46..6aa3e8ab25 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandler.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandler.h @@ -39,7 +39,7 @@ namespace Sketcher { class Sketch; class SketchObject; -}// namespace Sketcher +} // namespace Sketcher namespace SketcherGui { @@ -83,8 +83,8 @@ class ViewProviderSketchDrawSketchHandlerAttorney { private: static inline void setConstraintSelectability(ViewProviderSketch& vp, bool enabled = true); - static inline void setPositionText(ViewProviderSketch& vp, const Base::Vector2d& Pos, - const SbString& txt); + static inline void + setPositionText(ViewProviderSketch& vp, const Base::Vector2d& Pos, const SbString& txt); static inline void setPositionText(ViewProviderSketch& vp, const Base::Vector2d& Pos); static inline void resetPositionText(ViewProviderSketch& vp); static inline void drawEdit(ViewProviderSketch& vp, @@ -97,14 +97,16 @@ private: static inline void setAxisPickStyle(ViewProviderSketch& vp, bool on); static inline void moveCursorToSketchPoint(ViewProviderSketch& vp, Base::Vector2d point); static inline void preselectAtPoint(ViewProviderSketch& vp, Base::Vector2d point); - static inline void setAngleSnapping(ViewProviderSketch& vp, bool enable, + static inline void setAngleSnapping(ViewProviderSketch& vp, + bool enable, Base::Vector2d referencePoint = Base::Vector2d(0., 0.)); static inline int getPreselectPoint(const ViewProviderSketch& vp); static inline int getPreselectCurve(const ViewProviderSketch& vp); static inline int getPreselectCross(const ViewProviderSketch& vp); - static inline void moveConstraint(ViewProviderSketch& vp, int constNum, const Base::Vector2d& toPos); + static inline void + moveConstraint(ViewProviderSketch& vp, int constNum, const Base::Vector2d& toPos); friend class DrawSketchHandler; }; @@ -153,12 +155,14 @@ public: int getHighestCurveIndex(); int seekAutoConstraint(std::vector& suggestedConstraints, - const Base::Vector2d& Pos, const Base::Vector2d& Dir, + const Base::Vector2d& Pos, + const Base::Vector2d& Dir, AutoConstraint::TargetType type = AutoConstraint::VERTEX); // createowncommand indicates whether a separate command shall be create and committed (for // example for undo purposes) or not is not it is the responsibility of the developer to create // and commit the command appropriately. - void createAutoConstraints(const std::vector& autoConstrs, int geoId, + void createAutoConstraints(const std::vector& autoConstrs, + int geoId, Sketcher::PointPos pointPos = Sketcher::PointPos::none, bool createowncommand = true); @@ -167,7 +171,7 @@ public: void resetPositionText(); void renderSuggestConstraintsCursor(std::vector& suggestedConstraints); -private:// NVI +private: // NVI virtual void preActivated(); virtual void activated() {} @@ -176,7 +180,7 @@ private:// NVI virtual void postDeactivated() {} -protected:// NVI requiring base implementation +protected: // NVI requiring base implementation virtual QString getCrosshairCursorSVGName() const; protected: @@ -234,7 +238,9 @@ protected: void moveConstraint(int constNum, const Base::Vector2d& toPos); private: - void setSvgCursor(const QString& svgName, int x, int y, + void setSvgCursor(const QString& svgName, + int x, + int y, const std::map& colorMapping = std::map()); @@ -259,7 +265,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandler_H +#endif // SKETCHERGUI_DrawSketchHandler_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h index 074d261718..edd742d5a7 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArc.h @@ -33,7 +33,7 @@ using namespace std; namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerArc: public DrawSketchHandler { @@ -154,8 +154,9 @@ public: atan2(onSketchPos.y - CenterPoint.y, onSketchPos.x - CenterPoint.x) - startAngle; double angle2 = angle1 + (angle1 < 0. ? 2 : -2) * M_PI; arcAngle = abs(angle1 - arcAngle) < abs(angle2 - arcAngle) ? angle1 : angle2; - if (arcAngle > 0) + if (arcAngle > 0) { endAngle = startAngle + arcAngle; + } else { endAngle = startAngle; startAngle += arcAngle; @@ -189,7 +190,7 @@ public: startAngle, endAngle, geometryCreationMode == Construction ? "True" - : "False");// arcAngle > 0 ? 0 : 1); + : "False"); // arcAngle > 0 ? 0 : 1); Gui::Command::commitCommand(); } @@ -244,8 +245,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -308,7 +309,7 @@ public: for (int i = 1; i <= 32; i++) { // Start at current angle double angle = - (i - 1) * 2 * M_PI / 32.0 + lineAngle;// N point closed circle has N segments + (i - 1) * 2 * M_PI / 32.0 + lineAngle; // N point closed circle has N segments if (i != 1 && i != 17) { EditCurve[i] = Base::Vector2d(CenterPoint.x + radius * cos(angle), CenterPoint.y + radius * sin(angle)); @@ -387,7 +388,8 @@ public: // Build a 30 point circle ignoring already constructed points for (int i = 1; i <= 28; i++) { - double angle = startAngle + i * arcAngle / 29.0;// N point arc has N-1 segments + double angle = + startAngle + i * arcAngle / 29.0; // N point arc has N-1 segments EditCurve[i] = Base::Vector2d(CenterPoint.x + radius * cos(angle), CenterPoint.y + radius * sin(angle)); } @@ -401,8 +403,10 @@ public: } drawEdit(EditCurve); - if (seekAutoConstraint( - sugConstr3, onSketchPos, Base::Vector2d(0.0, 0.0), AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr3, + onSketchPos, + Base::Vector2d(0.0, 0.0), + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr3); return; } @@ -509,8 +513,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -531,7 +535,7 @@ protected: Sketcher::PointPos arcPos1, arcPos2; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerArc_H +#endif // SKETCHERGUI_DrawSketchHandlerArc_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h index 25ada63cd8..697d8c6fce 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfEllipse.h @@ -30,7 +30,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerArcOfEllipse: public DrawSketchHandler { @@ -62,8 +62,9 @@ public: { if (Mode == STATUS_SEEK_First) { setPositionText(onSketchPos); - if (seekAutoConstraint( - sugConstr1, onSketchPos, Base::Vector2d(0.f, 0.f))) {// TODO: ellipse prio 1 + if (seekAutoConstraint(sugConstr1, + onSketchPos, + Base::Vector2d(0.f, 0.f))) { // TODO: ellipse prio 1 renderSuggestConstraintsCursor(sugConstr1); return; } @@ -91,8 +92,10 @@ public: } drawEdit(EditCurve); - if (seekAutoConstraint( - sugConstr2, onSketchPos, onSketchPos - centerPoint, AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr2, + onSketchPos, + onSketchPos - centerPoint, + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr2); return; } @@ -134,7 +137,7 @@ public: return; } } - else if (Mode == STATUS_SEEK_Fourth) {// here we differ from ellipse creation + else if (Mode == STATUS_SEEK_Fourth) { // here we differ from ellipse creation // angle between the major axis of the ellipse and the X axis double a = (axisPoint - centerPoint).Length(); double phi = atan2(axisPoint.y - centerPoint.y, axisPoint.x - centerPoint.x); @@ -149,7 +152,7 @@ public: double rxs = startingPoint.x - centerPoint.x; double rys = startingPoint.y - centerPoint.y; startAngle = atan2(a * (rys * cos(phi) - rxs * sin(phi)), - b * (rxs * cos(phi) + rys * sin(phi)));// eccentric anomaly angle + b * (rxs * cos(phi) + rys * sin(phi))); // eccentric anomaly angle double angle1 = atan2(a * ((onSketchPos.y - centerPoint.y) * cos(phi) @@ -177,8 +180,10 @@ public: std::string aString = lengthToDisplayFormat(a, 1); std::string bString = lengthToDisplayFormat(b, 1); std::string angleString = angleToDisplayFormat(arcAngle * 180.0 / M_PI, 1); - text.sprintf( - " (R%s, R%s, %s)", aString.c_str(), bString.c_str(), angleString.c_str()); + text.sprintf(" (R%s, R%s, %s)", + aString.c_str(), + bString.c_str(), + angleString.c_str()); setPositionText(onSketchPos, text); } @@ -212,7 +217,7 @@ public: arcAngle_t = 0.; Mode = STATUS_SEEK_Fourth; } - else {// Fourth + else { // Fourth endPoint = onSketchPos; setAngleSnapping(false); @@ -252,8 +257,9 @@ public: bool isOriginalArcCCW = true; - if (arcAngle > 0) + if (arcAngle > 0) { endAngle = startAngle + arcAngle; + } else { endAngle = startAngle; startAngle += arcAngle; @@ -287,7 +293,7 @@ public: phi -= M_PI / 2; double t = a; a = b; - b = t;// swap a,b + b = t; // swap a,b } int currentgeoid = getHighestCurveIndex(); @@ -312,8 +318,9 @@ public: currentgeoid++; - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "exposeInternalGeometry(%d)", + currentgeoid); } catch (const Base::Exception&) { Gui::NotifyError( @@ -379,8 +386,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -400,7 +407,7 @@ protected: std::vector sugConstr1, sugConstr2, sugConstr3, sugConstr4; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerArcOfEllipse_H +#endif // SKETCHERGUI_DrawSketchHandlerArcOfEllipse_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h index 006635a091..87107cdc82 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfHyperbola.h @@ -33,7 +33,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerArcOfHyperbola: public DrawSketchHandler { @@ -78,8 +78,10 @@ public: } drawEdit(EditCurve); - if (seekAutoConstraint( - sugConstr2, onSketchPos, Base::Vector2d(0.f, 0.f), AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr2, + onSketchPos, + Base::Vector2d(0.f, 0.f), + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr2); return; } @@ -208,7 +210,7 @@ public: arcAngle_t = 0.; Mode = STATUS_SEEK_Fourth; } - else {// Fourth + else { // Fourth endPoint = onSketchPos; Mode = STATUS_Close; @@ -260,8 +262,9 @@ public: bool isOriginalArcCCW = true; - if (arcAngle > 0) + if (arcAngle > 0) { endAngle = startAngle + arcAngle; + } else { endAngle = startAngle; startAngle += arcAngle; @@ -320,8 +323,9 @@ public: currentgeoid++; - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "exposeInternalGeometry(%d)", + currentgeoid); } catch (const Base::Exception&) { Gui::NotifyError( @@ -388,8 +392,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -411,7 +415,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerArcOfHyperbola_H +#endif // SKETCHERGUI_DrawSketchHandlerArcOfHyperbola_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h index bbfbb4b52b..3b820e8aac 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerArcOfParabola.h @@ -30,7 +30,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerArcOfParabola: public DrawSketchHandler { @@ -193,7 +193,7 @@ public: arcAngle_t = 0.; Mode = STATUS_SEEK_Fourth; } - else {// Fourth + else { // Fourth endPoint = onSketchPos; Mode = STATUS_Close; } @@ -250,8 +250,9 @@ public: currentgeoid++; - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "exposeInternalGeometry(%d)", + currentgeoid); } catch (const Base::Exception&) { Gui::NotifyError( @@ -317,8 +318,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -338,7 +339,7 @@ protected: std::vector sugConstr1, sugConstr2, sugConstr3, sugConstr4; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerArcOfParabola_H +#endif // SKETCHERGUI_DrawSketchHandlerArcOfParabola_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h index e4c8463e61..72c7694f11 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h @@ -34,7 +34,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerBSpline: public DrawSketchHandler { @@ -121,7 +121,7 @@ public: Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Weight',%d,%f)) ", poleGeoIds.back(), - 1.0);// First pole defaults to 1.0 weight + 1.0); // First pole defaults to 1.0 weight } catch (const Base::Exception&) { Gui::NotifyError(sketchgui, @@ -141,8 +141,10 @@ public: // add auto constraints on pole if (!sugConstr.back().empty()) { - createAutoConstraints( - sugConstr.back(), poleGeoIds.back(), Sketcher::PointPos::mid, false); + createAutoConstraints(sugConstr.back(), + poleGeoIds.back(), + Sketcher::PointPos::mid, + false); } static_cast(sketchgui->getObject())->solve(); @@ -155,16 +157,18 @@ public: // check if coincident with first pole for (auto& ac : sugConstr.back()) { if (ac.Type == Sketcher::Coincident) { - if (ac.GeoId == poleGeoIds[0] && ac.PosId == Sketcher::PointPos::mid) + if (ac.GeoId == poleGeoIds[0] && ac.PosId == Sketcher::PointPos::mid) { IsClosed = true; + } else { // The coincidence with first point may be indirect const auto coincidents = static_cast(sketchgui->getObject()) ->getAllCoincidentPoints(ac.GeoId, ac.PosId); if (coincidents.find(poleGeoIds[0]) != coincidents.end() - && coincidents.at(poleGeoIds[0]) == Sketcher::PointPos::mid) + && coincidents.at(poleGeoIds[0]) == Sketcher::PointPos::mid) { IsClosed = true; + } } } } @@ -172,7 +176,7 @@ public: if (IsClosed) { Mode = STATUS_CLOSE; - if (ConstrMethod == 1) {// if periodic we do not need the last pole + if (ConstrMethod == 1) { // if periodic we do not need the last pole BSplinePoles.pop_back(); sugConstr.pop_back(); @@ -217,8 +221,10 @@ public: // add auto constraints on pole if (!sugConstr.back().empty()) { - createAutoConstraints( - sugConstr.back(), poleGeoIds.back(), Sketcher::PointPos::mid, false); + createAutoConstraints(sugConstr.back(), + poleGeoIds.back(), + Sketcher::PointPos::mid, + false); } // static_cast(sketchgui->getObject())->solve(); @@ -256,12 +262,14 @@ public: // On pressing Backspace delete last pole else if (SoKeyboardEvent::BACKSPACE == key && pressed) { // when mouse is pressed we are in a transitional state so don't mess with it - if (MOUSE_PRESSED == MousePressMode) + if (MOUSE_PRESSED == MousePressMode) { return; + } // can only delete last pole if it exists - if (STATUS_SEEK_FIRST_CONTROLPOINT == Mode || STATUS_CLOSE == Mode) + if (STATUS_SEEK_FIRST_CONTROLPOINT == Mode || STATUS_CLOSE == Mode) { return; + } // if only first pole exists it's equivalent to canceling current spline if (poleGeoIds.size() == 1) { @@ -279,8 +287,9 @@ public: ->Constraints.getValues(); for (int i = constraints.size() - 1; i >= 0; --i) { if (delGeoId == constraints[i]->First || delGeoId == constraints[i]->Second - || delGeoId == constraints[i]->Third) + || delGeoId == constraints[i]->Third) { Gui::cmdAppObjectArgs(sketchgui->getObject(), "delConstraint(%d)", i); + } } // Remove pole @@ -352,8 +361,8 @@ public: resetHandlerState(); } } - else {// we have no data (CurrentConstraint == 0) so user when right-clicking really wants - // to exit + else { // we have no data (CurrentConstraint == 0) so user when right-clicking really wants + // to exit DrawSketchHandler::quit(); } } @@ -509,8 +518,9 @@ private: Gui::Command::doCommand(Gui::Command::Doc, cstream.str().c_str()); // for showing the knots on creation - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "exposeInternalGeometry(%d)", + currentgeoid); } catch (const Base::Exception&) { Gui::NotifyError(sketchgui, @@ -545,8 +555,8 @@ private: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } else { @@ -575,7 +585,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerBSpline_H +#endif // SKETCHERGUI_DrawSketchHandlerBSpline_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h index 031bda63e1..ac3440f8b9 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSplineByInterpolation.h @@ -34,7 +34,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerBSplineByInterpolation: public DrawSketchHandler { @@ -102,7 +102,7 @@ public: if (Mode == STATUS_SEEK_FIRST_POINT) { BSplineKnots.push_back(onSketchPos); - BSplineMults.push_back(1);// NOTE: not strictly true for end-points + BSplineMults.push_back(1); // NOTE: not strictly true for end-points Mode = STATUS_SEEK_ADDITIONAL_POINTS; @@ -131,8 +131,10 @@ public: // add auto constraints on knot if (!sugConstr.back().empty()) { - createAutoConstraints( - sugConstr.back(), knotGeoIds.back(), Sketcher::PointPos::start, false); + createAutoConstraints(sugConstr.back(), + knotGeoIds.back(), + Sketcher::PointPos::start, + false); } static_cast(sketchgui->getObject())->solve(); @@ -143,32 +145,34 @@ public: // check if coincidence issues with first or last added knot for (auto& ac : sugConstr.back()) { if (ac.Type == Sketcher::Coincident) { - if (ac.GeoId == knotGeoIds[0] && ac.PosId == Sketcher::PointPos::start) + if (ac.GeoId == knotGeoIds[0] && ac.PosId == Sketcher::PointPos::start) { IsClosed = true; + } else { // The coincidence with first point may be indirect const auto coincidents = static_cast(sketchgui->getObject()) ->getAllCoincidentPoints(ac.GeoId, ac.PosId); if (coincidents.find(knotGeoIds[0]) != coincidents.end() - && coincidents.at(knotGeoIds[0]) == Sketcher::PointPos::start) + && coincidents.at(knotGeoIds[0]) == Sketcher::PointPos::start) { IsClosed = true; + } else if (coincidents.find(knotGeoIds.back()) != coincidents.end() && coincidents.at(knotGeoIds.back()) == Sketcher::PointPos::start) { - return true;// OCCT doesn't allow consecutive points being coincident + return true; // OCCT doesn't allow consecutive points being coincident } } } } BSplineKnots.push_back(onSketchPos); - BSplineMults.push_back(1);// NOTE: not strictly true for end-points + BSplineMults.push_back(1); // NOTE: not strictly true for end-points if (IsClosed) { Mode = STATUS_CLOSE; - if (ConstrMethod == 1) {// if periodic we do not need the last pole + if (ConstrMethod == 1) { // if periodic we do not need the last pole BSplineKnots.pop_back(); sugConstr.pop_back(); @@ -202,8 +206,10 @@ public: // add auto constraints on knot if (!sugConstr.back().empty()) { - createAutoConstraints( - sugConstr.back(), knotGeoIds.back(), Sketcher::PointPos::start, false); + createAutoConstraints(sugConstr.back(), + knotGeoIds.back(), + Sketcher::PointPos::start, + false); } if (!IsClosed) { @@ -254,12 +260,14 @@ public: // On pressing Backspace delete last knot else if (SoKeyboardEvent::BACKSPACE == key && pressed) { // when mouse is pressed we are in a transitional state so don't mess with it - if (MOUSE_PRESSED == MousePressMode) + if (MOUSE_PRESSED == MousePressMode) { return; + } // can only delete last knot if it exists - if (STATUS_SEEK_FIRST_POINT == Mode || STATUS_CLOSE == Mode) + if (STATUS_SEEK_FIRST_POINT == Mode || STATUS_CLOSE == Mode) { return; + } // if only first knot exists it's equivalent to canceling current spline if (knotGeoIds.size() == 1) { @@ -277,8 +285,9 @@ public: ->Constraints.getValues(); for (int i = constraints.size() - 1; i >= 0; --i) { if (delGeoId == constraints[i]->First || delGeoId == constraints[i]->Second - || delGeoId == constraints[i]->Third) + || delGeoId == constraints[i]->Third) { Gui::cmdAppObjectArgs(sketchgui->getObject(), "delConstraint(%d)", i); + } } // Remove knot @@ -348,8 +357,8 @@ public: resetHandlerState(); } } - else {// we have no data (CurrentConstraint == 0) so user when right-clicking really wants - // to exit + else { // we have no data (CurrentConstraint == 0) so user when right-clicking really wants + // to exit DrawSketchHandler::quit(); } } @@ -427,9 +436,9 @@ private: if (ConstrMethod == 0) { BSplineMults.front() = - myDegree + 1;// FIXME: This is hardcoded until degree can be changed + myDegree + 1; // FIXME: This is hardcoded until degree can be changed BSplineMults.back() = - myDegree + 1;// FIXME: This is hardcoded until degree can be changed + myDegree + 1; // FIXME: This is hardcoded until degree can be changed } std::vector streams; @@ -475,8 +484,9 @@ private: // FIXME: Decide whether to force a knot or not. std::vector isBetweenC0Points(BSplineKnots.size(), false); for (size_t i = 1; i < BSplineKnots.size() - 1; ++i) { - if (BSplineMults[i - 1] >= myDegree && BSplineMults[i + 1] >= myDegree) + if (BSplineMults[i - 1] >= myDegree && BSplineMults[i + 1] >= myDegree) { isBetweenC0Points[i] = true; + } } int currentgeoid = getHighestCurveIndex(); @@ -511,12 +521,13 @@ private: } else { Gui::Command::runCommand( - Gui::Command::Gui, "_finalbsp_poles.extend(_bsps[-1].getPoles()[1:])"); + Gui::Command::Gui, + "_finalbsp_poles.extend(_bsps[-1].getPoles()[1:])"); Gui::Command::runCommand(Gui::Command::Gui, "_finalbsp_knots.extend([_finalbsp_knots[-1] + i " "for i in _bsps[-1].getKnots()[1:]])"); Gui::Command::runCommand(Gui::Command::Gui, - "_finalbsp_mults[-1] = 3");// FIXME: Hardcoded + "_finalbsp_mults[-1] = 3"); // FIXME: Hardcoded Gui::Command::runCommand( Gui::Command::Gui, "_finalbsp_mults.extend(_bsps[-1].getMultiplicities()[1:])"); @@ -605,8 +616,9 @@ private: Gui::Command::doCommand(Gui::Command::Doc, cstream.str().c_str()); // for showing the rest of internal geometry on creation - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "exposeInternalGeometry(%d)", + currentgeoid); } catch (const Base::Exception&) { Gui::NotifyError(sketchgui, @@ -633,8 +645,8 @@ private: * right button of the mouse */ } else { - sketchgui->purgeHandler();// no code after this line, Handler get deleted in - // ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } return false; @@ -661,8 +673,8 @@ private: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } else { @@ -692,7 +704,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerBSplineByInterpolation_H +#endif // SKETCHERGUI_DrawSketchHandlerBSplineByInterpolation_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h index d2b7bb9dc8..14c1b44243 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerCarbonCopy.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class CarbonCopySelection: public Gui::SelectionFilterGate { @@ -117,8 +117,9 @@ public: void mouseMove(Base::Vector2d onSketchPos) override { Q_UNUSED(onSketchPos); - if (Gui::Selection().getPreselection().pObjectName) + if (Gui::Selection().getPreselection().pObjectName) { applyCursor(); + } } bool pressButton(Base::Vector2d onSketchPos) override @@ -142,8 +143,9 @@ public: if (msg.Type == Gui::SelectionChanges::AddSelection) { App::DocumentObject* obj = sketchgui->getObject()->getDocument()->getObject(msg.pObjectName); - if (!obj) + if (!obj) { throw Base::ValueError("Sketcher: Carbon Copy: Invalid object in selection"); + } if (obj->getTypeId() == Sketcher::SketchObject::getClassTypeId()) { @@ -204,7 +206,7 @@ private: } }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerCarbonCopy_H +#endif // SKETCHERGUI_DrawSketchHandlerCarbonCopy_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h index 6bc2116780..efae776701 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerCircle.h @@ -29,7 +29,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerCircle: public DrawSketchHandler { @@ -79,8 +79,10 @@ public: } drawEdit(EditCurve); - if (seekAutoConstraint( - sugConstr2, onSketchPos, onSketchPos - EditCurve[0], AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr2, + onSketchPos, + onSketchPos - EditCurve[0], + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr2); return; } @@ -160,8 +162,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -203,19 +205,23 @@ public: { if (Mode == STATUS_SEEK_First) { setPositionText(onSketchPos); - if (seekAutoConstraint( - sugConstr1, onSketchPos, Base::Vector2d(0.f, 0.f), AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr1, + onSketchPos, + Base::Vector2d(0.f, 0.f), + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr1); return; } } else if (Mode == STATUS_SEEK_Second || Mode == STATUS_SEEK_Third) { try { - if (Mode == STATUS_SEEK_Second) + if (Mode == STATUS_SEEK_Second) { CenterPoint = EditCurve[N + 1] = (onSketchPos - FirstPoint) / 2 + FirstPoint; - else + } + else { CenterPoint = EditCurve[N + 1] = Part::Geom2dCircle::getCircleCenter(FirstPoint, SecondPoint, onSketchPos); + } radius = (onSketchPos - CenterPoint).Length(); double lineAngle = GetPointAngle(CenterPoint, onSketchPos); @@ -223,7 +229,7 @@ public: for (int i = 1; i < N; i++) { // Start at current angle double angle = - i * 2 * M_PI / N + lineAngle;// N point closed circle has N segments + i * 2 * M_PI / N + lineAngle; // N point closed circle has N segments EditCurve[i] = Base::Vector2d(CenterPoint.x + radius * cos(angle), CenterPoint.y + radius * sin(angle)); } @@ -356,8 +362,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -373,12 +379,12 @@ protected: SelectMode Mode; std::vector EditCurve; Base::Vector2d CenterPoint, FirstPoint, SecondPoint; - double radius, N;// N should be even + double radius, N; // N should be even std::vector sugConstr1, sugConstr2, sugConstr3; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerCircle_H +#endif // SKETCHERGUI_DrawSketchHandlerCircle_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h index 6bf67dae9d..c463e67e15 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerEllipse.h @@ -35,7 +35,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp /* Ellipse ==============================================================================*/ /** @@ -125,8 +125,10 @@ public: if (method == PERIAPSIS_APOAPSIS_B) { if (mode == STATUS_SEEK_PERIAPSIS) { setPositionText(onSketchPos); - if (seekAutoConstraint( - sugConstr1, onSketchPos, Base::Vector2d(0.f, 0.f), AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr1, + onSketchPos, + Base::Vector2d(0.f, 0.f), + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr1); return; } @@ -147,8 +149,10 @@ public: drawEdit(editCurve); // Suggestions for ellipse and curves are disabled because many tangent constraints // need an intermediate point or line. - if (seekAutoConstraint( - sugConstr2, onSketchPos, Base::Vector2d(0.f, 0.f), AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr2, + onSketchPos, + Base::Vector2d(0.f, 0.f), + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr2); return; } @@ -167,18 +171,21 @@ public: } drawEdit(editCurve); - if (seekAutoConstraint( - sugConstr3, onSketchPos, Base::Vector2d(0.f, 0.f), AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr3, + onSketchPos, + Base::Vector2d(0.f, 0.f), + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr3); return; } } } - else {// method is CENTER_PERIAPSIS_B + else { // method is CENTER_PERIAPSIS_B if (mode == STATUS_SEEK_CENTROID) { setPositionText(onSketchPos); - if (seekAutoConstraint( - sugConstr1, onSketchPos, Base::Vector2d(0.f, 0.f))) {// TODO: ellipse prio 1 + if (seekAutoConstraint(sugConstr1, + onSketchPos, + Base::Vector2d(0.f, 0.f))) { // TODO: ellipse prio 1 renderSuggestConstraintsCursor(sugConstr1); return; } @@ -197,8 +204,10 @@ public: } drawEdit(editCurve); - if (seekAutoConstraint( - sugConstr2, onSketchPos, onSketchPos - centroid, AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr2, + onSketchPos, + onSketchPos - centroid, + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr2); return; } @@ -217,8 +226,10 @@ public: } drawEdit(editCurve); - if (seekAutoConstraint( - sugConstr3, onSketchPos, onSketchPos - centroid, AutoConstraint::CURVE)) { + if (seekAutoConstraint(sugConstr3, + onSketchPos, + onSketchPos - centroid, + AutoConstraint::CURVE)) { renderSuggestConstraintsCursor(sugConstr3); return; } @@ -249,7 +260,7 @@ public: mode = STATUS_Close; } } - else {// method is CENTER_PERIAPSIS_B + else { // method is CENTER_PERIAPSIS_B if (mode == STATUS_SEEK_CENTROID) { centroid = onSketchPos; setAngleSnapping(true, centroid); @@ -404,19 +415,20 @@ private: centroid = periapsis + centroid; if (mode == STATUS_SEEK_APOAPSIS) { // for first step, we draw an ellipse inscribed in a golden rectangle - ratio = 1 / GOLDEN_RATIO;// ~= 0.6180339887 - e = sqrt(ratio); // ~= 0.7861513777 + ratio = 1 / GOLDEN_RATIO; // ~= 0.6180339887 + e = sqrt(ratio); // ~= 0.7861513777 b = a * ratio; } else if (mode == STATUS_SEEK_B) { // Get the closest distance from onSketchPos to apse line, as a 'requested' value // for b Base::Vector2d cursor = - Base::Vector2d(onSketchPos - f);// vector from f to cursor pos + Base::Vector2d(onSketchPos - f); // vector from f to cursor pos // decompose cursor with a projection, then length of w_2 will give us b Base::Vector2d w_1 = cursor; w_1.ProjectToLine( - cursor, (periapsis - apoapsis));// projection of cursor line onto apse line + cursor, + (periapsis - apoapsis)); // projection of cursor line onto apse line Base::Vector2d w_2 = (cursor - w_1); b = w_2.Length(); @@ -439,7 +451,7 @@ private: num = a * (1 - (e * e)); // The ellipse is now solved } - else {// method == CENTER_PERIAPSIS_B + else { // method == CENTER_PERIAPSIS_B if (mode == STATUS_SEEK_PERIAPSIS) { // solve the ellipse inscribed in a golden rectangle periapsis = onSketchPos; @@ -447,11 +459,11 @@ private: iPrime.x = periapsis.x - centroid.x; iPrime.y = periapsis.y - centroid.y; iPrime.z = 0; - jPrime = k % iPrime;// j = k cross i + jPrime = k % iPrime; // j = k cross i // these are constant for any ellipse inscribed in a golden rectangle - ratio = 1 / GOLDEN_RATIO;// ~= 0.6180339887 - e = sqrt(ratio); // ~= 0.7861513777 + ratio = 1 / GOLDEN_RATIO; // ~= 0.6180339887 + e = sqrt(ratio); // ~= 0.7861513777 b = a * ratio; ae = a * e; @@ -476,12 +488,12 @@ private: // between looking for a b point and looking for periapsis, so ensure // we are in the right mode Base::Vector2d cursor = - Base::Vector2d(onSketchPos - centroid);// vector from centroid to cursor pos + Base::Vector2d(onSketchPos - centroid); // vector from centroid to cursor pos // decompose cursor with a projection, then length of w_2 will give us b Base::Vector2d w_1 = cursor; w_1.ProjectToLine( cursor, - (fixedAxis - centroid));// projection of cursor line onto fixed axis line + (fixedAxis - centroid)); // projection of cursor line onto fixed axis line Base::Vector2d w_2 = (cursor - w_1); if (w_2.Length() > fixedAxisLength) { // b is fixed, we are seeking a @@ -489,7 +501,7 @@ private: jPrime.x = (fixedAxis - centroid).x; jPrime.y = (fixedAxis - centroid).y; jPrime.Normalize(); - iPrime = jPrime % k;// cross + iPrime = jPrime % k; // cross b = fixedAxisLength; a = w_2.Length(); } @@ -499,7 +511,7 @@ private: iPrime.x = (fixedAxis - centroid).x; iPrime.y = (fixedAxis - centroid).y; iPrime.Normalize(); - jPrime = k % iPrime;// cross + jPrime = k % iPrime; // cross a = fixedAxisLength; b = w_2.Length(); } @@ -552,7 +564,7 @@ private: } r = num / (1 + (e * cos(theta))); // r(pi/2) is semi-latus rectum, if we need it - pos.x = r * cos(theta + phi);// phi rotates, sin/cos translate + pos.x = r * cos(theta + phi); // phi rotates, sin/cos translate pos.y = r * sin(theta + phi); pos = pos + f; posPrime.x = r * cos(theta + phi + M_PI); @@ -577,16 +589,16 @@ private: } } // load pos & neg b points - theta = M_PI - atan2(b, ae);// the angle from f to the positive b point + theta = M_PI - atan2(b, ae); // the angle from f to the positive b point r = num / (1 + (e * cos(theta))); pos.x = r * cos(theta + phi); pos.y = r * sin(theta + phi); pos = pos + f; - editCurve[n] = pos;// positive + editCurve[n] = pos; // positive pos.x = r * cos(-1 * theta + phi); pos.y = r * sin(-1 * theta + phi); pos = pos + f; - editCurve[(3 * n)] = pos;// negative + editCurve[(3 * n)] = pos; // negative // force the curve to be a closed shape editCurve[(4 * n)] = editCurve[0]; } @@ -722,10 +734,10 @@ private: */ Base::Vector3d k(0, 0, 1); Base::Vector3d i(periapsis.x - centroid.x, periapsis.y - centroid.y, 0); - Base::Vector3d j = k % i;// j = k cross i + Base::Vector3d j = k % i; // j = k cross i double beta = 1e-7; int count = 0; - int limit = 25;// no infinite loops! + int limit = 25; // no infinite loops! bool success = false; double tempB = b; @@ -773,7 +785,7 @@ private: fPrime.Scale(-1 * ae); fPrime = centroid + fPrime; - int currentgeoid = getHighestCurveIndex();// index of the ellipse we just created + int currentgeoid = getHighestCurveIndex(); // index of the ellipse we just created try { Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Add sketch ellipse")); @@ -791,8 +803,9 @@ private: currentgeoid++; - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "exposeInternalGeometry(%d)", currentgeoid); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "exposeInternalGeometry(%d)", + currentgeoid); } catch (const Base::Exception&) { Gui::NotifyError(sketchgui, @@ -869,12 +882,12 @@ private: } else { sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + ->purgeHandler(); // no code after this line, Handler get deleted in ViewProvider } } }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerEllipse_H +#endif // SKETCHERGUI_DrawSketchHandlerEllipse_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h index 288b77c7ca..da3c128a29 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerExtend.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class ExtendSelection: public Gui::SelectionFilterGate { @@ -46,20 +46,24 @@ public: bool allow(App::Document* /*pDoc*/, App::DocumentObject* pObj, const char* sSubName) override { - if (pObj != this->object) + if (pObj != this->object) { return false; - if (!sSubName || sSubName[0] == '\0') + } + if (!sSubName || sSubName[0] == '\0') { return false; - if (disabled) + } + if (disabled) { return true; + } std::string element(sSubName); if (element.substr(0, 4) == "Edge") { int GeoId = std::atoi(element.substr(4, 4000).c_str()) - 1; Sketcher::SketchObject* Sketch = static_cast(object); const Part::Geometry* geom = Sketch->getGeometry(GeoId); if (geom->getTypeId() == Part::GeomLineSegment::getClassTypeId() - || geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) + || geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) { return true; + } } return false; } @@ -131,8 +135,8 @@ public: */ bool inCurve = (projection.Length() < recenteredLine.Length() && projection.GetAngle(recenteredLine) - < 0.1);// Two possible values here, M_PI and 0, but 0.1 is to - // avoid floating point problems. + < 0.1); // Two possible values here, M_PI and 0, but 0.1 is to + // avoid floating point problems. if (inCurve) { Increment = SavedExtendFromStart ? -1 * projection.Length() @@ -267,7 +271,7 @@ public: double angleToEnd = angle.GetAngle(Base::Vector2d(cos(end), sin(end))); ExtendFromStart = (angleToStart - < angleToEnd);// move start point if closer to angle than end point + < angleToEnd); // move start point if closer to angle than end point EditCurve.resize(31); Mode = STATUS_SEEK_Second; } @@ -278,7 +282,7 @@ public: try { Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Extend edge")); Gui::cmdAppObjectArgs(sketchgui->getObject(), - "extend(%d, %f, %d)\n",// GeoId, increment, PointPos + "extend(%d, %f, %d)\n", // GeoId, increment, PointPos BaseGeoId, Increment, ExtendFromStart ? static_cast(Sketcher::PointPos::start) @@ -288,8 +292,9 @@ public: ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Sketcher"); bool autoRecompute = hGrp->GetBool("AutoRecompute", false); - if (autoRecompute) + if (autoRecompute) { Gui::Command::updateActive(); + } // constrain chosen point if (!SugConstr.empty()) { @@ -315,8 +320,8 @@ public: * right button of the mouse */ } else { - sketchgui->purgeHandler();// no code after this line, Handler get deleted in - // ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } catch (const Base::Exception&) { @@ -326,10 +331,10 @@ public: Gui::Command::abortCommand(); } } - else {// exit extension tool if user clicked on empty space + else { // exit extension tool if user clicked on empty space BaseGeoId = -1; sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + ->purgeHandler(); // no code after this line, Handler get deleted in ViewProvider } return true; } @@ -353,7 +358,7 @@ protected: std::vector EditCurve; int BaseGeoId; ExtendSelection* filterGate = nullptr; - bool ExtendFromStart;// if true, extend from start, else extend from end (circle only) + bool ExtendFromStart; // if true, extend from start, else extend from end (circle only) bool SavedExtendFromStart; double Increment; std::vector SugConstr; @@ -366,7 +371,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerExtend_H +#endif // SKETCHERGUI_DrawSketchHandlerExtend_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h index a7b4f812bc..c15abdeecf 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerExternal.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class ExternalSelection: public Gui::SelectionFilterGate { @@ -83,8 +83,9 @@ public: // return false; //} - if (!sSubName || sSubName[0] == '\0') + if (!sSubName || sSubName[0] == '\0') { return false; + } std::string element(sSubName); if ((element.size() > 4 && element.substr(0, 4) == "Edge") || (element.size() > 6 && element.substr(0, 6) == "Vertex") @@ -92,8 +93,9 @@ public: return true; } if (pObj->getTypeId().isDerivedFrom(App::Plane::getClassTypeId()) - || pObj->getTypeId().isDerivedFrom(Part::Datum::getClassTypeId())) + || pObj->getTypeId().isDerivedFrom(Part::Datum::getClassTypeId())) { return true; + } return false; } }; @@ -110,8 +112,9 @@ public: void mouseMove(Base::Vector2d onSketchPos) override { Q_UNUSED(onSketchPos); - if (Gui::Selection().getPreselection().pObjectName) + if (Gui::Selection().getPreselection().pObjectName) { applyCursor(); + } } bool pressButton(Base::Vector2d onSketchPos) override @@ -135,8 +138,9 @@ public: if (msg.Type == Gui::SelectionChanges::AddSelection) { App::DocumentObject* obj = sketchgui->getObject()->getDocument()->getObject(msg.pObjectName); - if (!obj) + if (!obj) { throw Base::ValueError("Sketcher: External geometry: Invalid object in selection"); + } std::string subName(msg.pSubName); if (obj->getTypeId().isDerivedFrom(App::Plane::getClassTypeId()) || obj->getTypeId().isDerivedFrom(Part::Datum::getClassTypeId()) @@ -207,7 +211,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerExternal_H +#endif // SKETCHERGUI_DrawSketchHandlerExternal_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerFillet.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerFillet.h index eaf62182d5..3e6fb02bbf 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerFillet.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerFillet.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class FilletSelection: public Gui::SelectionFilterGate { @@ -45,17 +45,20 @@ public: bool allow(App::Document* /*pDoc*/, App::DocumentObject* pObj, const char* sSubName) override { - if (pObj != this->object) + if (pObj != this->object) { return false; - if (!sSubName || sSubName[0] == '\0') + } + if (!sSubName || sSubName[0] == '\0') { return false; + } std::string element(sSubName); if (element.substr(0, 4) == "Edge") { int GeoId = std::atoi(element.substr(4, 4000).c_str()) - 1; Sketcher::SketchObject* Sketch = static_cast(object); const Part::Geometry* geom = Sketch->getGeometry(GeoId); - if (geom->getTypeId().isDerivedFrom(Part::GeomBoundedCurve::getClassTypeId())) + if (geom->getTypeId().isDerivedFrom(Part::GeomBoundedCurve::getClassTypeId())) { return true; + } } if (element.substr(0, 6) == "Vertex") { int VtId = std::atoi(element.substr(6, 4000).c_str()) - 1; @@ -67,8 +70,9 @@ public: const Part::Geometry* geom1 = Sketch->getGeometry(GeoIdList[0]); const Part::Geometry* geom2 = Sketch->getGeometry(GeoIdList[1]); if (geom1->getTypeId() == Part::GeomLineSegment::getClassTypeId() - && geom2->getTypeId() == Part::GeomLineSegment::getClassTypeId()) + && geom2->getTypeId() == Part::GeomLineSegment::getClassTypeId()) { return true; + } } } return false; @@ -128,8 +132,10 @@ public: double radius = -1; std::vector GeoIdList; std::vector PosIdList; - sketchgui->getSketchObject()->getDirectlyCoincidentPoints( - GeoId, PosId, GeoIdList, PosIdList); + sketchgui->getSketchObject()->getDirectlyCoincidentPoints(GeoId, + PosId, + GeoIdList, + PosIdList); if (GeoIdList.size() == 2 && GeoIdList[0] >= 0 && GeoIdList[1] >= 0) { const Part::Geometry* geom1 = sketchgui->getSketchObject()->getGeometry(GeoIdList[0]); @@ -145,18 +151,21 @@ public: static_cast(geom2); Base::Vector3d dir1 = lineSeg1->getEndPoint() - lineSeg1->getStartPoint(); Base::Vector3d dir2 = lineSeg2->getEndPoint() - lineSeg2->getStartPoint(); - if (PosIdList[0] == Sketcher::PointPos::end) + if (PosIdList[0] == Sketcher::PointPos::end) { dir1 *= -1; - if (PosIdList[1] == Sketcher::PointPos::end) + } + if (PosIdList[1] == Sketcher::PointPos::end) { dir2 *= -1; + } double l1 = dir1.Length(); double l2 = dir2.Length(); double angle = dir1.GetAngle(dir2); radius = (l1 < l2 ? l1 : l2) * 0.2 * sin(angle / 2); } } - if (radius < 0) + if (radius < 0) { return false; + } int currentgeoid = getHighestCurveIndex(); // create fillet at point @@ -172,8 +181,9 @@ public: pointFillet ? "True" : "False"); if (construction) { - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "toggleConstruction(%d) ", currentgeoid + 1); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "toggleConstruction(%d) ", + currentgeoid + 1); } Gui::Command::commitCommand(); @@ -234,13 +244,14 @@ public: sketchgui->getSketchObject()->getGeometry(secondCurve)); radius = Part::suggestFilletRadius(lineSeg1, lineSeg2, refPnt1, refPnt2); - if (radius < 0) + if (radius < 0) { return false; + } construction = Sketcher::GeometryFacade::getConstruction(lineSeg1) && Sketcher::GeometryFacade::getConstruction(lineSeg2); } - else {// other supported curves + else { // other supported curves const Part::Geometry* geo1 = static_cast( sketchgui->getSketchObject()->getGeometry(firstCurve)); const Part::Geometry* geo2 = static_cast( @@ -293,8 +304,9 @@ public: tryAutoRecompute(static_cast(sketchgui->getObject())); if (construction) { - Gui::cmdAppObjectArgs( - sketchgui->getObject(), "toggleConstruction(%d) ", currentgeoid + 1); + Gui::cmdAppObjectArgs(sketchgui->getObject(), + "toggleConstruction(%d) ", + currentgeoid + 1); } @@ -304,9 +316,10 @@ public: } } - if (VtId < 0 && GeoId < 0)// exit the fillet tool if the user clicked on empty space + if (VtId < 0 && GeoId < 0) { // exit the fillet tool if the user clicked on empty space sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + ->purgeHandler(); // no code after this line, Handler get deleted in ViewProvider + } return true; } @@ -326,7 +339,7 @@ protected: Base::Vector2d firstPos; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerFillet_H +#endif // SKETCHERGUI_DrawSketchHandlerFillet_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h index 7965cd8210..db6d16e073 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerLine.h @@ -30,7 +30,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerLine: public DrawSketchHandler { @@ -129,16 +129,18 @@ public: bool avoidredundant = sketchgui->AvoidRedundant.getValue() && sketchgui->Autoconstraints.getValue(); - if (avoidredundant) + if (avoidredundant) { removeRedundantHorizontalVertical( static_cast(sketchgui->getObject()), sugConstr1, sugConstr2); + } // add auto constraints for the line segment start if (!sugConstr1.empty()) { - createAutoConstraints( - sugConstr1, getHighestCurveIndex(), Sketcher::PointPos::start); + createAutoConstraints(sugConstr1, + getHighestCurveIndex(), + Sketcher::PointPos::start); sugConstr1.clear(); } @@ -166,8 +168,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -185,7 +187,7 @@ protected: std::vector sugConstr1, sugConstr2; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerLine_H +#endif // SKETCHERGUI_DrawSketchHandlerLine_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h index 379f4f27d7..f025cacbc0 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerLineSet.h @@ -34,7 +34,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerLineSet: public DrawSketchHandler { @@ -89,8 +89,9 @@ public: void registerPressedKey(bool pressed, int key) override { - if (Mode != STATUS_SEEK_Second) - return;// SegmentMode can be changed only in STATUS_SEEK_Second mode + if (Mode != STATUS_SEEK_Second) { + return; // SegmentMode can be changed only in STATUS_SEEK_Second mode + } if (key == SoKeyboardEvent::M && pressed && previousCurve != -1) { // loop through the following modes: @@ -104,10 +105,12 @@ public: SnapMode = SNAP_MODE_Free; Base::Vector2d onSketchPos; - if (SegmentMode == SEGMENT_MODE_Line) + if (SegmentMode == SEGMENT_MODE_Line) { onSketchPos = EditCurve[EditCurve.size() - 1]; - else + } + else { onSketchPos = EditCurve[29]; + } const Part::Geometry* geom = sketchgui->getSketchObject()->getGeometry(previousCurve); @@ -115,55 +118,64 @@ public: switch (TransitionMode) { case TRANSITION_MODE_Free: if (geom->getTypeId() - == Part::GeomArcOfCircle::getClassTypeId()) {// 3rd mode + == Part::GeomArcOfCircle::getClassTypeId()) { // 3rd mode SegmentMode = SEGMENT_MODE_Arc; TransitionMode = TRANSITION_MODE_Tangent; } - else// 1st mode + else { // 1st mode TransitionMode = TRANSITION_MODE_Perpendicular_L; + } break; - case TRANSITION_MODE_Perpendicular_L:// 2nd mode - if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) + case TRANSITION_MODE_Perpendicular_L: // 2nd mode + if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) { TransitionMode = TRANSITION_MODE_Free; - else + } + else { TransitionMode = TRANSITION_MODE_Tangent; + } break; case TRANSITION_MODE_Tangent: - if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId())// 1st mode + if (geom->getTypeId() + == Part::GeomArcOfCircle::getClassTypeId()) { // 1st mode TransitionMode = TRANSITION_MODE_Perpendicular_L; - else {// 3rd mode + } + else { // 3rd mode SegmentMode = SEGMENT_MODE_Arc; TransitionMode = TRANSITION_MODE_Tangent; } break; - default:// unexpected mode + default: // unexpected mode TransitionMode = TRANSITION_MODE_Free; break; } } else { switch (TransitionMode) { - case TRANSITION_MODE_Tangent:// 4th mode + case TRANSITION_MODE_Tangent: // 4th mode TransitionMode = TRANSITION_MODE_Perpendicular_L; break; - case TRANSITION_MODE_Perpendicular_L:// 5th mode + case TRANSITION_MODE_Perpendicular_L: // 5th mode TransitionMode = TRANSITION_MODE_Perpendicular_R; break; - default:// 6th mode (Perpendicular_R) + unexpected mode + default: // 6th mode (Perpendicular_R) + unexpected mode SegmentMode = SEGMENT_MODE_Line; - if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) + if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) { TransitionMode = TRANSITION_MODE_Tangent; - else + } + else { TransitionMode = TRANSITION_MODE_Free; + } break; } } - if (SegmentMode == SEGMENT_MODE_Line) + if (SegmentMode == SEGMENT_MODE_Line) { EditCurve.resize(TransitionMode == TRANSITION_MODE_Free ? 2 : 3); - else + } + else { EditCurve.resize(32); - mouseMove(onSketchPos);// trigger an update of EditCurve + } + mouseMove(onSketchPos); // trigger an update of EditCurve } } @@ -187,8 +199,9 @@ public: EditCurve[1] = EditCurve[2]; suppressTransition = true; } - else + else { EditCurve[1] = EditCurve[0] + EditCurve[1]; + } } else if (TransitionMode == TRANSITION_MODE_Perpendicular_L || TransitionMode == TRANSITION_MODE_Perpendicular_R) { @@ -219,18 +232,23 @@ public: } else if (SegmentMode == SEGMENT_MODE_Arc) { - if (QApplication::keyboardModifiers() == Qt::ControlModifier) + if (QApplication::keyboardModifiers() == Qt::ControlModifier) { SnapMode = SNAP_MODE_45Degree; - else + } + else { SnapMode = SNAP_MODE_Free; + } Base::Vector2d Tangent; - if (TransitionMode == TRANSITION_MODE_Tangent) + if (TransitionMode == TRANSITION_MODE_Tangent) { Tangent = Base::Vector2d(dirVec.x, dirVec.y); - else if (TransitionMode == TRANSITION_MODE_Perpendicular_L) + } + else if (TransitionMode == TRANSITION_MODE_Perpendicular_L) { Tangent = Base::Vector2d(-dirVec.y, dirVec.x); - else if (TransitionMode == TRANSITION_MODE_Perpendicular_R) + } + else if (TransitionMode == TRANSITION_MODE_Perpendicular_R) { Tangent = Base::Vector2d(dirVec.y, -dirVec.x); + } double theta = Tangent.GetAngle(onSketchPos - EditCurve[0]); @@ -246,10 +264,12 @@ public: double y2 = y1 + Tangent.y; double x3 = onSketchPos.x; double y3 = onSketchPos.y; - if ((x2 * y3 - x3 * y2) - (x1 * y3 - x3 * y1) + (x1 * y2 - x2 * y1) > 0) + if ((x2 * y3 - x3 * y2) - (x1 * y3 - x3 * y1) + (x1 * y2 - x2 * y1) > 0) { arcRadius *= -1; - if (boost::math::isnan(arcRadius) || boost::math::isinf(arcRadius)) + } + if (boost::math::isnan(arcRadius) || boost::math::isinf(arcRadius)) { arcRadius = 0.f; + } CenterPoint = EditCurve[0] + Base::Vector2d(arcRadius * Tangent.y, -arcRadius * Tangent.x); @@ -262,15 +282,19 @@ public: double rxe = onSketchPos.x - CenterPoint.x; double rye = onSketchPos.y - CenterPoint.y; double arcAngle = atan2(-rxe * ry + rye * rx, rxe * rx + rye * ry); - if (boost::math::isnan(arcAngle) || boost::math::isinf(arcAngle)) + if (boost::math::isnan(arcAngle) || boost::math::isinf(arcAngle)) { arcAngle = 0.f; - if (arcRadius >= 0 && arcAngle > 0) + } + if (arcRadius >= 0 && arcAngle > 0) { arcAngle -= 2 * M_PI; - if (arcRadius < 0 && arcAngle < 0) + } + if (arcRadius < 0 && arcAngle < 0) { arcAngle += 2 * M_PI; + } - if (SnapMode == SNAP_MODE_45Degree) + if (SnapMode == SNAP_MODE_45Degree) { arcAngle = round(arcAngle / (M_PI / 4)) * M_PI / 4; + } endAngle = startAngle + arcAngle; @@ -307,14 +331,14 @@ public: { if (Mode == STATUS_SEEK_First) { - EditCurve[0] = onSketchPos;// this may be overwritten if previousCurve is found + EditCurve[0] = onSketchPos; // this may be overwritten if previousCurve is found - virtualsugConstr1 = sugConstr1;// store original autoconstraints. + virtualsugConstr1 = sugConstr1; // store original autoconstraints. // here we check if there is a preselected point and // we set up a transition from the neighbouring segment. // (peviousCurve, previousPosId, dirVec, TransitionMode) - for (unsigned int i = 0; i < sugConstr1.size(); i++) + for (unsigned int i = 0; i < sugConstr1.size(); i++) { if (sugConstr1[i].Type == Sketcher::Coincident) { const Part::Geometry* geom = sketchgui->getSketchObject()->getGeometry(sugConstr1[i].GeoId); @@ -325,25 +349,28 @@ public: previousCurve = sugConstr1[i].GeoId; previousPosId = sugConstr1[i].PosId; updateTransitionData(previousCurve, - previousPosId);// -> dirVec, EditCurve[0] + previousPosId); // -> dirVec, EditCurve[0] if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) { TransitionMode = TRANSITION_MODE_Tangent; SnapMode = SNAP_MODE_Free; } sugConstr1.erase(sugConstr1.begin() - + i);// actually we should clear the vector completely + + i); // actually we should clear the vector completely break; } } + } // remember our first point (even if we are doing a transition from a previous curve) firstCurve = getHighestCurveIndex() + 1; firstPosId = Sketcher::PointPos::start; - if (SegmentMode == SEGMENT_MODE_Line) + if (SegmentMode == SEGMENT_MODE_Line) { EditCurve.resize(TransitionMode == TRANSITION_MODE_Free ? 2 : 3); - else if (SegmentMode == SEGMENT_MODE_Arc) + } + else if (SegmentMode == SEGMENT_MODE_Arc) { EditCurve.resize(32); + } Mode = STATUS_SEEK_Second; } else if (Mode == STATUS_SEEK_Second) { @@ -380,8 +407,8 @@ public: return true; } else { - sketchgui->purgeHandler();// no code after this line, Handler get deleted in - // ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider return true; } } @@ -392,15 +419,21 @@ public: int GeoId; Sketcher::PointPos PosId; sketchgui->getSketchObject()->getGeoVertexIndex(getPreselectPoint(), GeoId, PosId); - if (sketchgui->getSketchObject()->arePointsCoincident( - GeoId, PosId, firstCurve, firstPosId)) + if (sketchgui->getSketchObject()->arePointsCoincident(GeoId, + PosId, + firstCurve, + firstPosId)) { Mode = STATUS_Close; + } } else if (getPreselectCross() == 0 && firstPosId != Sketcher::PointPos::none) { // close line started at root point - if (sketchgui->getSketchObject()->arePointsCoincident( - -1, Sketcher::PointPos::start, firstCurve, firstPosId)) + if (sketchgui->getSketchObject()->arePointsCoincident(-1, + Sketcher::PointPos::start, + firstCurve, + firstPosId)) { Mode = STATUS_Close; + } } } return true; @@ -435,7 +468,7 @@ public: firstsegment = false; } - else if (SegmentMode == SEGMENT_MODE_Arc) {// We're dealing with an Arc + else if (SegmentMode == SEGMENT_MODE_Arc) { // We're dealing with an Arc if (!boost::math::isnormal(arcRadius)) { Mode = STATUS_SEEK_Second; return true; @@ -481,11 +514,13 @@ public: // in case of a tangency constraint, the coincident constraint is redundant std::string constrType = "Coincident"; if (!suppressTransition && previousCurve != -1) { - if (TransitionMode == TRANSITION_MODE_Tangent) + if (TransitionMode == TRANSITION_MODE_Tangent) { constrType = "Tangent"; + } else if (TransitionMode == TRANSITION_MODE_Perpendicular_L - || TransitionMode == TRANSITION_MODE_Perpendicular_R) + || TransitionMode == TRANSITION_MODE_Perpendicular_R) { constrType = "Perpendicular"; + } } Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('%s',%i,%i,%i,%i)) ", @@ -504,7 +539,7 @@ public: // #3974: if in radians, the printf %f defaults to six decimals, which leads to // loss of precision double arcAngle = - abs(round((endAngle - startAngle) / (M_PI / 4)) * 45);// in degrees + abs(round((endAngle - startAngle) / (M_PI / 4)) * 45); // in degrees Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Angle',%i,App.Units." @@ -536,17 +571,19 @@ public: if (Mode == STATUS_Close) { if (avoidredundant) { - if (SegmentMode == SEGMENT_MODE_Line) {// avoid redundant constraints. - if (sugConstr1.size() > 0) + if (SegmentMode == SEGMENT_MODE_Line) { // avoid redundant constraints. + if (sugConstr1.size() > 0) { removeRedundantHorizontalVertical( static_cast(sketchgui->getObject()), sugConstr1, sugConstr2); - else + } + else { removeRedundantHorizontalVertical( static_cast(sketchgui->getObject()), virtualsugConstr1, sugConstr2); + } } } @@ -554,11 +591,13 @@ public: // exclude any coincidence constraints std::vector sugConstr; for (unsigned int i = 0; i < sugConstr2.size(); i++) { - if (sugConstr2[i].Type != Sketcher::Coincident) + if (sugConstr2[i].Type != Sketcher::Coincident) { sugConstr.push_back(sugConstr2[i]); + } } - createAutoConstraints( - sugConstr, getHighestCurveIndex(), Sketcher::PointPos::end); + createAutoConstraints(sugConstr, + getHighestCurveIndex(), + Sketcher::PointPos::end); sugConstr2.clear(); } @@ -596,38 +635,41 @@ public: * right button of the mouse */ } else { - sketchgui->purgeHandler();// no code after this line, Handler get deleted in - // ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } else { Gui::Command::commitCommand(); // Add auto constraints - if (!sugConstr1.empty()) {// this is relevant only to the very first point - createAutoConstraints( - sugConstr1, getHighestCurveIndex(), Sketcher::PointPos::start); + if (!sugConstr1.empty()) { // this is relevant only to the very first point + createAutoConstraints(sugConstr1, + getHighestCurveIndex(), + Sketcher::PointPos::start); sugConstr1.clear(); } if (avoidredundant) { - if (SegmentMode == SEGMENT_MODE_Line) {// avoid redundant constraints. - if (sugConstr1.size() > 0) + if (SegmentMode == SEGMENT_MODE_Line) { // avoid redundant constraints. + if (sugConstr1.size() > 0) { removeRedundantHorizontalVertical( static_cast(sketchgui->getObject()), sugConstr1, sugConstr2); - else + } + else { removeRedundantHorizontalVertical( static_cast(sketchgui->getObject()), virtualsugConstr1, sugConstr2); + } } } virtualsugConstr1 = - sugConstr2;// these are the initial constraints for the next iteration. + sugConstr2; // these are the initial constraints for the next iteration. if (!sugConstr2.empty()) { createAutoConstraints(sugConstr2, @@ -645,7 +687,7 @@ public: previousCurve = getHighestCurveIndex(); previousPosId = (SegmentMode == SEGMENT_MODE_Arc && startAngle > endAngle) ? Sketcher::PointPos::start - : Sketcher::PointPos::end;// cw arcs are rendered in reverse + : Sketcher::PointPos::end; // cw arcs are rendered in reverse // setup for the next line segment // calculate dirVec and EditCurve[0] @@ -665,7 +707,7 @@ public: SegmentMode = SEGMENT_MODE_Line; SnapMode = SNAP_MODE_Free; EditCurve[1] = EditCurve[0]; - mouseMove(onSketchPos);// trigger an update of EditCurve + mouseMove(onSketchPos); // trigger an update of EditCurve } } return true; @@ -753,8 +795,9 @@ protected: EditCurve[0] = Base::Vector2d(lineSeg->getStartPoint().x, lineSeg->getStartPoint().y); } - else + else { EditCurve[0] = Base::Vector2d(lineSeg->getEndPoint().x, lineSeg->getEndPoint().y); + } } else if (geom->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) { const Part::GeomArcOfCircle* arcSeg = static_cast(geom); @@ -776,7 +819,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerLineSet_H +#endif // SKETCHERGUI_DrawSketchHandlerLineSet_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h index 74b5025e94..e061216b40 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerPoint.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerPoint: public DrawSketchHandler { @@ -104,8 +104,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -124,7 +124,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerPoint_H +#endif // SKETCHERGUI_DrawSketchHandlerPoint_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h index 276a4a4e3b..ee8df3500a 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerPolygon.h @@ -32,7 +32,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerRegularPolygon: public DrawSketchHandler { @@ -137,15 +137,17 @@ public: // add auto constraints at the center of the polygon if (!sugConstr1.empty()) { - createAutoConstraints( - sugConstr1, getHighestCurveIndex(), Sketcher::PointPos::mid); + createAutoConstraints(sugConstr1, + getHighestCurveIndex(), + Sketcher::PointPos::mid); sugConstr1.clear(); } // add auto constraints to the last side of the polygon if (!sugConstr2.empty()) { - createAutoConstraints( - sugConstr2, getHighestCurveIndex() - 1, Sketcher::PointPos::end); + createAutoConstraints(sugConstr2, + getHighestCurveIndex() - 1, + Sketcher::PointPos::end); sugConstr2.clear(); } @@ -179,8 +181,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -203,7 +205,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerPolygon_H +#endif // SKETCHERGUI_DrawSketchHandlerPolygon_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h index 1d316d6229..a335f2fcfc 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerRectangle.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerBox: public DrawSketchHandler { @@ -183,36 +183,36 @@ public: EditCurve[0].x, EditCurve[0].y, EditCurve[1].x, - EditCurve[1].y,// line 1 + EditCurve[1].y, // line 1 EditCurve[1].x, EditCurve[1].y, EditCurve[2].x, - EditCurve[2].y,// line 2 + EditCurve[2].y, // line 2 EditCurve[2].x, EditCurve[2].y, EditCurve[3].x, - EditCurve[3].y,// line 3 + EditCurve[3].y, // line 3 EditCurve[3].x, EditCurve[3].y, EditCurve[0].x, - EditCurve[0].y, // line 4 - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(),// the sketch + EditCurve[0].y, // line 4 + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(), // the sketch geometryCreationMode == Construction ? "True" - : "False",// geometry as construction or not + : "False", // geometry as construction or not firstCurve, - firstCurve + 1,// coincident1 + firstCurve + 1, // coincident1 firstCurve + 1, - firstCurve + 2,// coincident2 + firstCurve + 2, // coincident2 firstCurve + 2, - firstCurve + 3,// coincident3 + firstCurve + 3, // coincident3 firstCurve + 3, - firstCurve, // coincident4 - firstCurve, // horizontal1 - firstCurve + 2, // horizontal2 - firstCurve + 1, // vertical1 - firstCurve + 3, // vertical2 - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str());// the sketch + firstCurve, // coincident4 + firstCurve, // horizontal1 + firstCurve + 2, // horizontal2 + firstCurve + 1, // vertical1 + firstCurve + 3, // vertical2 + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str()); // the sketch Gui::Command::commitCommand(); } @@ -247,41 +247,41 @@ public: EditCurve[0].x, EditCurve[0].y, EditCurve[1].x, - EditCurve[1].y,// line 1 + EditCurve[1].y, // line 1 EditCurve[1].x, EditCurve[1].y, EditCurve[2].x, - EditCurve[2].y,// line 2 + EditCurve[2].y, // line 2 EditCurve[2].x, EditCurve[2].y, EditCurve[3].x, - EditCurve[3].y,// line 3 + EditCurve[3].y, // line 3 EditCurve[3].x, EditCurve[3].y, EditCurve[0].x, - EditCurve[0].y,// line 4 + EditCurve[0].y, // line 4 center.x, - center.y, // center point - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(),// the sketch + center.y, // center point + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(), // the sketch geometryCreationMode == Construction ? "True" - : "False",// geometry as construction or not + : "False", // geometry as construction or not firstCurve, - firstCurve + 1,// coincident1 + firstCurve + 1, // coincident1 firstCurve + 1, - firstCurve + 2,// coincident2 + firstCurve + 2, // coincident2 firstCurve + 2, - firstCurve + 3,// coincident3 + firstCurve + 3, // coincident3 firstCurve + 3, - firstCurve, // coincident4 - firstCurve + 1,// horizontal1 - firstCurve + 3,// horizontal2 - firstCurve, // vertical1 - firstCurve + 2,// vertical2 + firstCurve, // coincident4 + firstCurve + 1, // horizontal1 + firstCurve + 3, // horizontal2 + firstCurve, // vertical1 + firstCurve + 2, // vertical2 firstCurve + 1, firstCurve, - firstCurve + 4, // Symmetric - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str());// the sketch + firstCurve + 4, // Symmetric + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str()); // the sketch Gui::Command::commitCommand(); } @@ -297,30 +297,34 @@ public: if (constructionMethod == Diagonal) { // add auto constraints at the start of the first side if (!sugConstr1.empty()) { - createAutoConstraints( - sugConstr1, getHighestCurveIndex() - 3, Sketcher::PointPos::start); + createAutoConstraints(sugConstr1, + getHighestCurveIndex() - 3, + Sketcher::PointPos::start); sugConstr1.clear(); } // add auto constraints at the end of the second side if (!sugConstr2.empty()) { - createAutoConstraints( - sugConstr2, getHighestCurveIndex() - 2, Sketcher::PointPos::end); + createAutoConstraints(sugConstr2, + getHighestCurveIndex() - 2, + Sketcher::PointPos::end); sugConstr2.clear(); } } else if (constructionMethod == CenterAndCorner) { // add auto constraints at the start of the first side if (!sugConstr1.empty()) { - createAutoConstraints( - sugConstr1, getHighestCurveIndex(), Sketcher::PointPos::start); + createAutoConstraints(sugConstr1, + getHighestCurveIndex(), + Sketcher::PointPos::start); sugConstr1.clear(); } // add auto constraints at the end of the second side if (!sugConstr2.empty()) { - createAutoConstraints( - sugConstr2, getHighestCurveIndex() - 3, Sketcher::PointPos::end); + createAutoConstraints(sugConstr2, + getHighestCurveIndex() - 3, + Sketcher::PointPos::end); sugConstr2.clear(); } } @@ -344,8 +348,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -406,8 +410,8 @@ public: signX = Base::sgn(distanceX); signY = Base::sgn(distanceY); if (fabs(distanceX) > fabs(distanceY)) { - radius = - fabs(distanceY) / 4;// we use a fourth of the smaller distance as default radius + radius = fabs(distanceY) + / 4; // we use a fourth of the smaller distance as default radius } else { radius = fabs(distanceX) / 4; @@ -470,8 +474,10 @@ public: std::string radiusString = lengthToDisplayFormat(radius, 1); std::string xString = lengthToDisplayFormat(lengthX, 1); std::string yString = lengthToDisplayFormat(lengthY, 1); - text.sprintf( - " (R%s X%s Y%s)", radiusString.c_str(), xString.c_str(), yString.c_str()); + text.sprintf(" (R%s X%s Y%s)", + radiusString.c_str(), + xString.c_str(), + yString.c_str()); setPositionText(onSketchPos, text); } @@ -565,16 +571,17 @@ public: "%s.addConstraint(conList)\n" "del geoList, conList\n", StartPos.x + (signX * radius), - StartPos.y + (signY * radius),// center of the arc 1 + StartPos.y + (signY * radius), // center of the arc 1 radius, start, - end,// start and end angle of arc1 + end, // start and end angle of arc1 EditCurve[8].x, EditCurve[8].y, EditCurve[9].x, - EditCurve[9].y,// line 1 - signX == signY ? StartPos.x + (signX * radius) - : StartPos.x + lengthX - (signX * radius),// center of the arc 2 + EditCurve[9].y, // line 1 + signX == signY + ? StartPos.x + (signX * radius) + : StartPos.x + lengthX - (signX * radius), // center of the arc 2 signX == signY ? StartPos.y + lengthY - (signY * radius) : StartPos.y + (signY * radius), radius, @@ -586,18 +593,18 @@ public: EditCurve[17].x, EditCurve[17].y, EditCurve[18].x, - EditCurve[18].y,// line 2 + EditCurve[18].y, // line 2 StartPos.x + lengthX - (signX * radius), - StartPos.y + lengthY - (signY * radius),// center of the arc 3 + StartPos.y + lengthY - (signY * radius), // center of the arc 3 radius, end - 1.5 * M_PI, end - M_PI, EditCurve[26].x, EditCurve[26].y, EditCurve[27].x, - EditCurve[27].y,// line 3 + EditCurve[27].y, // line 3 signX == signY ? StartPos.x + lengthX - (signX * radius) - : StartPos.x + (signX * radius),// center of the arc 4 + : StartPos.x + (signX * radius), // center of the arc 4 signX == signY ? StartPos.y + (signY * radius) : StartPos.y + lengthY - (signY * radius), radius, @@ -606,38 +613,38 @@ public: EditCurve[35].x, EditCurve[35].y, EditCurve[36].x, - EditCurve[36].y, // line 4 - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(),// the sketch + EditCurve[36].y, // line 4 + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(), // the sketch geometryCreationMode == Construction ? "True" - : "False",// geometry as construction or not + : "False", // geometry as construction or not firstCurve, - firstCurve + 1,// tangent 1 + firstCurve + 1, // tangent 1 firstCurve + 1, - firstCurve + 2,// tangent 2 + firstCurve + 2, // tangent 2 firstCurve + 2, - firstCurve + 3,// tangent 3 + firstCurve + 3, // tangent 3 firstCurve + 3, - firstCurve + 4,// tangent 4 + firstCurve + 4, // tangent 4 firstCurve + 4, - firstCurve + 5,// tangent 5 + firstCurve + 5, // tangent 5 firstCurve + 5, - firstCurve + 6,// tangent 6 + firstCurve + 6, // tangent 6 firstCurve + 6, - firstCurve + 7,// tangent 7 + firstCurve + 7, // tangent 7 firstCurve + 7, - firstCurve, // tangent 8 - signX == signY ? firstCurve + 3 : firstCurve + 1,// horizontal constraint - signX == signY ? firstCurve + 7 : firstCurve + 5,// horizontal constraint - signX == signY ? firstCurve + 1 : firstCurve + 3,// vertical constraint - signX == signY ? firstCurve + 5 : firstCurve + 7,// vertical constraint + firstCurve, // tangent 8 + signX == signY ? firstCurve + 3 : firstCurve + 1, // horizontal constraint + signX == signY ? firstCurve + 7 : firstCurve + 5, // horizontal constraint + signX == signY ? firstCurve + 1 : firstCurve + 3, // vertical constraint + signX == signY ? firstCurve + 5 : firstCurve + 7, // vertical constraint firstCurve, - firstCurve + 2,// equal 1 + firstCurve + 2, // equal 1 firstCurve + 2, - firstCurve + 4,// equal 2 + firstCurve + 4, // equal 2 firstCurve + 4, - firstCurve + 6, // equal 3 - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str());// the sketch + firstCurve + 6, // equal 3 + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str()); // the sketch // not all users want these extra points, some power users find them unnecessary ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( @@ -650,7 +657,7 @@ public: "geoList = []\n" "geoList.append(Part.Point(App.Vector(%f, %f, 0)))\n" "geoList.append(Part.Point(App.Vector(%f, %f, 0)))\n" - "%s.addGeometry(geoList, True)\n"// geometry as construction + "%s.addGeometry(geoList, True)\n" // geometry as construction "conList = []\n" "conList.append(Sketcher.Constraint('PointOnObject', %i, 1, %i, ))\n" "conList.append(Sketcher.Constraint('PointOnObject', %i, 1, %i, ))\n" @@ -659,34 +666,36 @@ public: "%s.addConstraint(conList)\n" "del geoList, conList\n", StartPos.x, - StartPos.y,// point at StartPos + StartPos.y, // point at StartPos EndPos.x, - EndPos.y,// point at EndPos - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(),// the sketch + EndPos.y, // point at EndPos + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(), // the sketch firstCurve + 8, - firstCurve + 1,// point on object constraint + firstCurve + 1, // point on object constraint firstCurve + 8, - firstCurve + 7,// point on object constraint + firstCurve + 7, // point on object constraint firstCurve + 9, - firstCurve + 3,// point on object constraint + firstCurve + 3, // point on object constraint firstCurve + 9, - firstCurve + 5,// point on object constraint - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str());// the sketch + firstCurve + 5, // point on object constraint + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str()); // the sketch } Gui::Command::commitCommand(); // add auto constraints at the StartPos auxiliary point if (!sugConstr1.empty()) { - createAutoConstraints( - sugConstr1, getHighestCurveIndex() - 1, Sketcher::PointPos::start); + createAutoConstraints(sugConstr1, + getHighestCurveIndex() - 1, + Sketcher::PointPos::start); sugConstr1.clear(); } // add auto constraints at the EndPos auxiliary point if (!sugConstr2.empty()) { - createAutoConstraints( - sugConstr2, getHighestCurveIndex(), Sketcher::PointPos::start); + createAutoConstraints(sugConstr2, + getHighestCurveIndex(), + Sketcher::PointPos::start); sugConstr2.clear(); } @@ -720,8 +729,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } } return true; @@ -743,7 +752,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerRectangle_H +#endif // SKETCHERGUI_DrawSketchHandlerRectangle_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h index 21c20a4c61..2658e4efdd 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerSlot.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class DrawSketchHandlerSlot: public DrawSketchHandler { @@ -81,10 +81,12 @@ public: dx = onSketchPos.x - StartPos.x; dy = onSketchPos.y - StartPos.y; - if (QApplication::keyboardModifiers() == Qt::ControlModifier) + if (QApplication::keyboardModifiers() == Qt::ControlModifier) { SnapMode = SNAP_MODE_Straight; - else + } + else { SnapMode = SNAP_MODE_Free; + } double a = 0; double rev = 0; @@ -92,16 +94,18 @@ public: r = fabs(dx) / 4; rev = Base::sgn(dx); SnapDir = SNAP_DIR_Horz; - if (SnapMode == SNAP_MODE_Straight) + if (SnapMode == SNAP_MODE_Straight) { dy = 0; + } } else { r = fabs(dy) / 4; a = 8; rev = Base::sgn(dy); SnapDir = SNAP_DIR_Vert; - if (SnapMode == SNAP_MODE_Straight) + if (SnapMode == SNAP_MODE_Straight) { dx = 0; + } } // draw the arcs with each 16 segments @@ -116,8 +120,9 @@ public: // onSketchPos if (!(dx == 0 || dy == 0)) { double rotAngle = atan(dy / dx); - if (a > 0) + if (a > 0) { rotAngle = -atan(dx / dy); + } double rxRot = rx * cos(rotAngle) - ry * sin(rotAngle); double ryRot = rx * sin(rotAngle) + ry * cos(rotAngle); rx = rxRot; @@ -195,11 +200,13 @@ public: try { Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Add slot")); - AutoConstraint lastCons = { - Sketcher::None, Sketcher::GeoEnum::GeoUndef, Sketcher::PointPos::none}; + AutoConstraint lastCons = {Sketcher::None, + Sketcher::GeoEnum::GeoUndef, + Sketcher::PointPos::none}; - if (!sugConstr2.empty()) + if (!sugConstr2.empty()) { lastCons = sugConstr2.back(); + } ostringstream snapCon = ostringstream(""); if (SnapMode == SNAP_MODE_Straight) { @@ -215,15 +222,17 @@ public: // If horizontal/vertical already applied because of snap, do not duplicate with // Autocontraint if (lastCons.Type == Sketcher::Horizontal - || lastCons.Type == Sketcher::Vertical) + || lastCons.Type == Sketcher::Vertical) { sugConstr2.pop_back(); + } } else { // If horizontal/vertical Autoconstraint suggested, applied it on first line // (rather than last arc) if (lastCons.Type == Sketcher::Horizontal - || lastCons.Type == Sketcher::Vertical) + || lastCons.Type == Sketcher::Vertical) { sugConstr2.back().GeoId = firstCurve + 2; + } } Gui::Command::doCommand( @@ -248,53 +257,55 @@ public: "%s.addConstraint(conList)\n" "del geoList, conList\n", StartPos.x, - StartPos.y,// center of the arc1 - r, // radius arc1 + StartPos.y, // center of the arc1 + r, // radius arc1 start, - end,// start and end angle of arc1 + end, // start and end angle of arc1 StartPos.x + dx, - StartPos.y + dy,// center of the arc2 - r, // radius arc2 + StartPos.y + dy, // center of the arc2 + r, // radius arc2 end, - end + M_PI,// start and end angle of arc2 + end + M_PI, // start and end angle of arc2 EditCurve[16].x, EditCurve[16].y, EditCurve[17].x, - EditCurve[17].y,// line1 + EditCurve[17].y, // line1 EditCurve[33].x, EditCurve[33].y, EditCurve[34].x, - EditCurve[34].y, // line2 - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(),// the sketch + EditCurve[34].y, // line2 + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str(), // the sketch geometryCreationMode == Construction ? "True" - : "False",// geometry as construction or not + : "False", // geometry as construction or not firstCurve, - firstCurve + 2,// tangent1 + firstCurve + 2, // tangent1 firstCurve + 2, - firstCurve + 1,// tangent2 + firstCurve + 1, // tangent2 firstCurve + 1, - firstCurve + 3,// tangent3 + firstCurve + 3, // tangent3 firstCurve + 3, - firstCurve,// tangent4 + firstCurve, // tangent4 firstCurve, - firstCurve + 1, // equal constraint - snapCon.str().c_str(),// horizontal/vertical constraint if snapping - Gui::Command::getObjectCmd(sketchgui->getObject()).c_str());// the sketch + firstCurve + 1, // equal constraint + snapCon.str().c_str(), // horizontal/vertical constraint if snapping + Gui::Command::getObjectCmd(sketchgui->getObject()).c_str()); // the sketch Gui::Command::commitCommand(); // add auto constraints at the center of the first arc if (!sugConstr1.empty()) { - createAutoConstraints( - sugConstr1, getHighestCurveIndex() - 3, Sketcher::PointPos::mid); + createAutoConstraints(sugConstr1, + getHighestCurveIndex() - 3, + Sketcher::PointPos::mid); sugConstr1.clear(); } // add auto constraints at the center of the second arc if (!sugConstr2.empty()) { - createAutoConstraints( - sugConstr2, getHighestCurveIndex() - 2, Sketcher::PointPos::mid); + createAutoConstraints(sugConstr2, + getHighestCurveIndex() - 2, + Sketcher::PointPos::mid); sugConstr2.clear(); } @@ -327,8 +338,8 @@ public: * right button of the mouse */ } else { - sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + sketchgui->purgeHandler(); // no code after this line, Handler get deleted in + // ViewProvider } SnapMode = SNAP_MODE_Straight; } @@ -352,7 +363,7 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerSlot_H +#endif // SKETCHERGUI_DrawSketchHandlerSlot_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h index e844b72907..59dfd499c1 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerSplitting.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class SplittingSelection: public Gui::SelectionFilterGate @@ -46,10 +46,12 @@ public: bool allow(App::Document* /*pDoc*/, App::DocumentObject* pObj, const char* sSubName) override { - if (pObj != this->object) + if (pObj != this->object) { return false; - if (!sSubName || sSubName[0] == '\0') + } + if (!sSubName || sSubName[0] == '\0') { return false; + } std::string element(sSubName); if (element.substr(0, 4) == "Edge") { int GeoId = std::atoi(element.substr(4, 4000).c_str()) - 1; @@ -69,8 +71,9 @@ public: Sketcher::PointPos PosId = Sketcher::PointPos::none; Sketcher::SketchObject* Sketch = static_cast(object); Sketch->getGeoVertexIndex(VertId, GeoId, PosId); - if (isBsplineKnot(Sketch, GeoId)) + if (isBsplineKnot(Sketch, GeoId)) { return true; + } } return false; } @@ -127,8 +130,9 @@ public: && constr->First == pointGeoId); }); - if (conIt != constraints.end()) + if (conIt != constraints.end()) { GeoId = (*conIt)->Second; + } } } @@ -172,7 +176,7 @@ private: } }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerSplitting_H +#endif // SKETCHERGUI_DrawSketchHandlerSplitting_H diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h index dd5b9875fe..8aa73ee176 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerTrimming.h @@ -31,7 +31,7 @@ namespace SketcherGui { -extern GeometryCreationMode geometryCreationMode;// defined in CommandCreateGeo.cpp +extern GeometryCreationMode geometryCreationMode; // defined in CommandCreateGeo.cpp class TrimmingSelection: public Gui::SelectionFilterGate { @@ -45,10 +45,12 @@ public: bool allow(App::Document* /*pDoc*/, App::DocumentObject* pObj, const char* sSubName) override { - if (pObj != this->object) + if (pObj != this->object) { return false; - if (!sSubName || sSubName[0] == '\0') + } + if (!sSubName || sSubName[0] == '\0') { return false; + } std::string element(sSubName); if (element.substr(0, 4) == "Edge") { int GeoId = std::atoi(element.substr(4, 4000).c_str()) - 1; @@ -59,8 +61,9 @@ public: || geom->getTypeId() == Part::GeomEllipse::getClassTypeId() || geom->getTypeId() == Part::GeomBSplineCurve::getClassTypeId()) { // We do not trim internal geometry of complex geometries - if (Sketcher::GeometryFacade::isInternalType(geom, Sketcher::InternalType::None)) + if (Sketcher::GeometryFacade::isInternalType(geom, Sketcher::InternalType::None)) { return true; + } } } return false; @@ -95,22 +98,24 @@ public: EditMarkers.resize(0); - if (GeoId1 != Sketcher::GeoEnum::GeoUndef) + if (GeoId1 != Sketcher::GeoEnum::GeoUndef) { EditMarkers.emplace_back(intersect1.x, intersect1.y); + } else { auto start = sk->getPoint(GeoId, Sketcher::PointPos::start); EditMarkers.emplace_back(start.x, start.y); } - if (GeoId2 != Sketcher::GeoEnum::GeoUndef) + if (GeoId2 != Sketcher::GeoEnum::GeoUndef) { EditMarkers.emplace_back(intersect2.x, intersect2.y); + } else { auto end = sk->getPoint(GeoId, Sketcher::PointPos::end); EditMarkers.emplace_back(end.x, end.y); } drawEditMarkers(EditMarkers, - 2);// maker augmented by two sizes (see supported marker sizes) + 2); // maker augmented by two sizes (see supported marker sizes) } } else { @@ -156,9 +161,10 @@ public: EditMarkers.resize(0); drawEditMarkers(EditMarkers); } - else// exit the trimming tool if the user clicked on empty space + else { // exit the trimming tool if the user clicked on empty space sketchgui - ->purgeHandler();// no code after this line, Handler get deleted in ViewProvider + ->purgeHandler(); // no code after this line, Handler get deleted in ViewProvider + } return true; } @@ -181,7 +187,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandlerTrimming_H +#endif // SKETCHERGUI_DrawSketchHandlerTrimming_H diff --git a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp index e7bd088750..fce007a561 100644 --- a/src/Mod/Sketcher/Gui/EditDatumDialog.cpp +++ b/src/Mod/Sketcher/Gui/EditDatumDialog.cpp @@ -146,8 +146,10 @@ int EditDatumDialog::exec(bool atCursor) ui_ins_datum->cbDriving->setChecked(!Constr->isDriving); - connect( - ui_ins_datum->cbDriving, &QCheckBox::toggled, this, &EditDatumDialog::drivingToggled); + connect(ui_ins_datum->cbDriving, + &QCheckBox::toggled, + this, + &EditDatumDialog::drivingToggled); connect(ui_ins_datum->labelEdit, qOverload(&Gui::QuantitySpinBox::valueChanged), this, @@ -160,7 +162,7 @@ int EditDatumDialog::exec(bool atCursor) connect(&dlg, &QDialog::rejected, this, &EditDatumDialog::rejected); if (atCursor) { - dlg.show();// Need to show the dialog so geometry is computed + dlg.show(); // Need to show the dialog so geometry is computed QRect pg = dlg.parentWidget()->geometry(); int Xmin = pg.x() + 10; int Ymin = pg.y() + 10; @@ -197,22 +199,26 @@ void EditDatumDialog::accepted() }*/ if (!ui_ins_datum->cbDriving->isChecked()) { - if (ui_ins_datum->labelEdit->hasExpression()) + if (ui_ins_datum->labelEdit->hasExpression()) { ui_ins_datum->labelEdit->apply(); - else + } + else { Gui::cmdAppObjectArgs(sketch, "setDatum(%i,App.Units.Quantity('%f %s'))", ConstrNbr, newDatum, (const char*)newQuant.getUnit().getString().toUtf8()); + } } QString constraintName = ui_ins_datum->name->text().trimmed(); if (Base::Tools::toStdString(constraintName) != sketch->Constraints[ConstrNbr]->Name) { std::string escapedstr = Base::Tools::escapedUnicodeFromUtf8(constraintName.toUtf8().constData()); - Gui::cmdAppObjectArgs( - sketch, "renameConstraint(%d, u'%s')", ConstrNbr, escapedstr.c_str()); + Gui::cmdAppObjectArgs(sketch, + "renameConstraint(%d, u'%s')", + ConstrNbr, + escapedstr.c_str()); } Gui::Command::commitCommand(); @@ -238,14 +244,16 @@ void EditDatumDialog::accepted() success = true; } catch (const Base::Exception& e) { - Gui::NotifyUserError( - sketch, QT_TRANSLATE_NOOP("Notifications", "Value Error"), e.what()); + Gui::NotifyUserError(sketch, + QT_TRANSLATE_NOOP("Notifications", "Value Error"), + e.what()); Gui::Command::abortCommand(); - if (sketch->noRecomputes)// if setdatum failed, it is highly likely that solver - // information is invalid. + if (sketch->noRecomputes) { // if setdatum failed, it is highly likely that solver + // information is invalid. sketch->solve(); + } } } } @@ -267,8 +275,9 @@ void EditDatumDialog::drivingToggled(bool state) ui_ins_datum->labelEdit->setToLastUsedValue(); } sketch->setDriving(ConstrNbr, !state); - if (!sketch->noRecomputes)// if noRecomputes, solve() is already done by setDriving() + if (!sketch->noRecomputes) { // if noRecomputes, solve() is already done by setDriving() sketch->solve(); + } } void EditDatumDialog::datumChanged() diff --git a/src/Mod/Sketcher/Gui/EditDatumDialog.h b/src/Mod/Sketcher/Gui/EditDatumDialog.h index 2252a28472..64cb732af5 100644 --- a/src/Mod/Sketcher/Gui/EditDatumDialog.h +++ b/src/Mod/Sketcher/Gui/EditDatumDialog.h @@ -31,7 +31,7 @@ namespace Sketcher { class Constraint; class SketchObject; -}// namespace Sketcher +} // namespace Sketcher namespace SketcherGui { @@ -65,5 +65,5 @@ private Q_SLOTS: void formEditorOpened(bool); }; -}// namespace SketcherGui -#endif// SKETCHERGUI_DrawSketchHandler_H +} // namespace SketcherGui +#endif // SKETCHERGUI_DrawSketchHandler_H diff --git a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp index 6fb6aba3a1..2dbdff3588 100644 --- a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp +++ b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp @@ -40,7 +40,7 @@ #include #include #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include #include @@ -250,8 +250,9 @@ void EditModeCoinManager::ParameterObserver::updateCurvedEdgeCountSegmentsParame App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); int stdcountsegments = hGrp->GetInt(parametername.c_str(), 50); // value cannot be smaller than 6 - if (stdcountsegments < 6) + if (stdcountsegments < 6) { stdcountsegments = 6; + } Client.drawingParameters.curvedEdgeCountSegments = stdcountsegments; } @@ -292,25 +293,32 @@ void EditModeCoinManager::ParameterObserver::updateOverlayVisibilityParameter( ParameterGrp::handle hGrpsk = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Sketcher/General"); - if constexpr (visibilityparameter == OverlayVisibilityParameter::BSplineDegree) + if constexpr (visibilityparameter == OverlayVisibilityParameter::BSplineDegree) { Client.overlayParameters.bSplineDegreeVisible = hGrpsk->GetBool(parametername.c_str(), true); + } else if constexpr (visibilityparameter - == OverlayVisibilityParameter::BSplineControlPolygonVisible) + == OverlayVisibilityParameter::BSplineControlPolygonVisible) { Client.overlayParameters.bSplineControlPolygonVisible = hGrpsk->GetBool(parametername.c_str(), true); - else if constexpr (visibilityparameter == OverlayVisibilityParameter::BSplineCombVisible) + } + else if constexpr (visibilityparameter == OverlayVisibilityParameter::BSplineCombVisible) { Client.overlayParameters.bSplineCombVisible = hGrpsk->GetBool(parametername.c_str(), true); + } else if constexpr (visibilityparameter - == OverlayVisibilityParameter::BSplineKnotMultiplicityVisible) + == OverlayVisibilityParameter::BSplineKnotMultiplicityVisible) { Client.overlayParameters.bSplineKnotMultiplicityVisible = hGrpsk->GetBool(parametername.c_str(), true); - else if constexpr (visibilityparameter == OverlayVisibilityParameter::BSplinePoleWeightVisible) + } + else if constexpr (visibilityparameter + == OverlayVisibilityParameter::BSplinePoleWeightVisible) { Client.overlayParameters.bSplinePoleWeightVisible = hGrpsk->GetBool(parametername.c_str(), true); - else if constexpr (visibilityparameter == OverlayVisibilityParameter::ArcCircleHelperVisible) + } + else if constexpr (visibilityparameter == OverlayVisibilityParameter::ArcCircleHelperVisible) { Client.overlayParameters.arcCircleHelperVisible = hGrpsk->GetBool(parametername.c_str(), false); + } Client.overlayParameters.visibleInformationChanged = true; } @@ -330,7 +338,7 @@ void EditModeCoinManager::ParameterObserver::updateElementSizeParameters( int markersize = hGrp->GetInt("MarkerSize", 7); int defaultFontSizePixels = - Client.defaultApplicationFontSizePixels();// returns height in pixels, not points + Client.defaultApplicationFontSizePixels(); // returns height in pixels, not points int sketcherfontSize = hGrp->GetInt("EditSketcherFontSize", defaultFontSizePixels); @@ -338,7 +346,7 @@ void EditModeCoinManager::ParameterObserver::updateElementSizeParameters( // simple scaling factor for hardcoded pixel values in the Sketcher Client.drawingParameters.pixelScalingFactor = viewScalingFactor * dpi - / 96;// 96 ppi is the standard pixel density for which pixel quantities were calculated + / 96; // 96 ppi is the standard pixel density for which pixel quantities were calculated // About sizes: // SoDatumLabel takes the size in points, not in pixels. This is because it uses QFont @@ -360,9 +368,9 @@ void EditModeCoinManager::ParameterObserver::updateElementSizeParameters( // necessary so that the Sketcher is usable in HDPI monitors. Client.drawingParameters.coinFontSize = - std::lround(sketcherfontSize * 96.0f / dpi);// this is in pixels + std::lround(sketcherfontSize * 96.0f / dpi); // this is in pixels Client.drawingParameters.labelFontSize = std::lround( - sketcherfontSize * 72.0f / dpi);// this is in points, as SoDatumLabel uses points + sketcherfontSize * 72.0f / dpi); // this is in points, as SoDatumLabel uses points Client.drawingParameters.constraintIconSize = std::lround(0.8 * sketcherfontSize); // For marker size the global default is used. @@ -416,10 +424,11 @@ void EditModeCoinManager::ParameterObserver::subscribeToParameters() "User parameter:BaseApp/Preferences/Units"); hGrpu->Attach(this); } - catch (const Base::ValueError& e) {// ensure that if parameter strings are not well-formed, the - // exception is not propagated - Base::Console().DeveloperError( - "EditModeCoinManager", "Malformed parameter string: %s\n", e.what()); + catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, + // the exception is not propagated + Base::Console().DeveloperError("EditModeCoinManager", + "Malformed parameter string: %s\n", + e.what()); } } @@ -443,10 +452,11 @@ void EditModeCoinManager::ParameterObserver::unsubscribeToParameters() hGrpu->Detach(this); } catch (const Base::ValueError& - e) {// ensure that if parameter strings are not well-formed, the program is not - // terminated when calling the noexcept destructor. - Base::Console().DeveloperError( - "EditModeCoinManager", "Malformed parameter string: %s\n", e.what()); + e) { // ensure that if parameter strings are not well-formed, the program is not + // terminated when calling the noexcept destructor. + Base::Console().DeveloperError("EditModeCoinManager", + "Malformed parameter string: %s\n", + e.what()); } } @@ -462,7 +472,7 @@ void EditModeCoinManager::ParameterObserver::OnChange(Base::Subject function(string); - Client.redrawViewProvider();// redraw with non-temporal geometry + Client.redrawViewProvider(); // redraw with non-temporal geometry } } @@ -518,8 +528,9 @@ void EditModeCoinManager::drawEditMarkers(const std::vector& Edi if (defaultmarker != supportedsizes.end()) { auto validAugmentationLevels = std::distance(defaultmarker, supportedsizes.end()); - if (augmentationlevel >= validAugmentationLevels) + if (augmentationlevel >= validAugmentationLevels) { augmentationlevel = validAugmentationLevels - 1; + } augmentedmarkersize = *std::next(defaultmarker, augmentationlevel); } @@ -534,7 +545,7 @@ void EditModeCoinManager::drawEditMarkers(const std::vector& Edi SbVec3f* verts = editModeScenegraphNodes.EditMarkersCoordinate->point.startEditing(); SbColor* color = editModeScenegraphNodes.EditMarkersMaterials->diffuseColor.startEditing(); - int i = 0;// setting up the line set + int i = 0; // setting up the line set for (std::vector::const_iterator it = EditMarkers.begin(); it != EditMarkers.end(); ++it, i++) { @@ -559,7 +570,7 @@ void EditModeCoinManager::drawEdit(const std::vector& EditCurve) int32_t* index = editModeScenegraphNodes.EditCurveSet->numVertices.startEditing(); SbColor* color = editModeScenegraphNodes.EditCurvesMaterials->diffuseColor.startEditing(); - int i = 0;// setting up the line set + int i = 0; // setting up the line set for (std::vector::const_iterator it = EditCurve.begin(); it != EditCurve.end(); ++it, i++) { verts[i].setValue(it->x, @@ -579,8 +590,9 @@ void EditModeCoinManager::drawEdit(const std::list>& { int ncoords = 0; - for (const auto& v : list) + for (const auto& v : list) { ncoords += v.size(); + } editModeScenegraphNodes.EditCurveSet->numVertices.setNum(list.size()); editModeScenegraphNodes.EditCurvesCoordinate->point.setNum(ncoords); @@ -638,10 +650,12 @@ void EditModeCoinManager::resetPositionText() void EditModeCoinManager::setAxisPickStyle(bool on) { - if (on) + if (on) { editModeScenegraphNodes.pickStyleAxes->style = SoPickStyle::SHAPE; - else + } + else { editModeScenegraphNodes.pickStyleAxes->style = SoPickStyle::UNPICKABLE; + } } EditModeCoinManager::PreselectionResult @@ -649,12 +663,13 @@ EditModeCoinManager::detectPreselection(SoPickedPoint* Point, const SbVec2s& cur { EditModeCoinManager::PreselectionResult result; - if (!Point) + if (!Point) { return result; + } // Base::Console().Log("Point pick\n"); SoPath* path = Point->getPath(); - SoNode* tail = path->getTail();// Tail is directly the node containing points and curves + SoNode* tail = path->getTail(); // Tail is directly the node containing points and curves for (int l = 0; l < geometryLayerParameters.getCoinLayerCount(); l++) { // checking for a hit in the points @@ -664,10 +679,12 @@ EditModeCoinManager::detectPreselection(SoPickedPoint* Point, const SbVec2s& cur // get the index int pindex = static_cast(point_detail)->getCoordinateIndex(); result.PointIndex = coinMapping.getPointVertexId( - pindex, l);// returns -1 for root, global VertexId for the rest of vertices. + pindex, + l); // returns -1 for root, global VertexId for the rest of vertices. - if (result.PointIndex == -1) + if (result.PointIndex == -1) { result.Cross = PreselectionResult::Axes::RootPoint; + } return result; } @@ -692,10 +709,12 @@ EditModeCoinManager::detectPreselection(SoPickedPoint* Point, const SbVec2s& cur // get the index (reserve index 0 for root point) int CrossIndex = static_cast(cross_detail)->getLineIndex(); - if (CrossIndex == 0) + if (CrossIndex == 0) { result.Cross = PreselectionResult::Axes::HorizontalAxis; - else if (CrossIndex == 1) + } + else if (CrossIndex == 1) { result.Cross = PreselectionResult::Axes::VerticalAxis; + } return result; } @@ -715,8 +734,9 @@ SoGroup* EditModeCoinManager::getSelectedConstraints() for (int i = 0; i < editModeScenegraphNodes.constrGroup->getNumChildren(); i++) { if (ViewProviderSketchCoinAttorney::isConstraintSelected(viewProvider, i)) { SoSeparator* sep = pEditModeConstraintCoinManager->getConstraintIdSeparator(i); - if (sep) + if (sep) { group->addChild(sep); + } } } @@ -726,7 +746,8 @@ SoGroup* EditModeCoinManager::getSelectedConstraints() /***** update coin nodes *****/ void EditModeCoinManager::processGeometryConstraintsInformationOverlay( - const GeoListFacade& geolistfacade, bool rebuildinformationlayer) + const GeoListFacade& geolistfacade, + bool rebuildinformationlayer) { overlayParameters.rebuildInformationLayer = rebuildinformationlayer; @@ -746,9 +767,10 @@ void EditModeCoinManager::updateOverlayParameters() if ((analysisResults.combRepresentationScale > (2 * overlayParameters.currentBSplineCombRepresentationScale)) || (analysisResults.combRepresentationScale - < (overlayParameters.currentBSplineCombRepresentationScale / 2))) + < (overlayParameters.currentBSplineCombRepresentationScale / 2))) { overlayParameters.currentBSplineCombRepresentationScale = analysisResults.combRepresentationScale; + } } void EditModeCoinManager::processGeometryInformationOverlay(const GeoListFacade& geolistfacade) @@ -758,8 +780,10 @@ void EditModeCoinManager::processGeometryInformationOverlay(const GeoListFacade& Gui::coinRemoveAllChildren(editModeScenegraphNodes.infoGroup); } - auto ioconv = EditModeInformationOverlayCoinConverter( - viewProvider, editModeScenegraphNodes.infoGroup, overlayParameters, drawingParameters); + auto ioconv = EditModeInformationOverlayCoinConverter(viewProvider, + editModeScenegraphNodes.infoGroup, + overlayParameters, + drawingParameters); // geometry information layer for bsplines, as they need a second round now that max curvature // is known @@ -774,7 +798,7 @@ void EditModeCoinManager::processGeometryInformationOverlay(const GeoListFacade& } - overlayParameters.visibleInformationChanged = false;// just updated + overlayParameters.visibleInformationChanged = false; // just updated } void EditModeCoinManager::updateAxesLength() @@ -782,13 +806,17 @@ void EditModeCoinManager::updateAxesLength() auto zCrossH = ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider) * drawingParameters.zCross; editModeScenegraphNodes.RootCrossCoordinate->point.set1Value( - 0, SbVec3f(-analysisResults.boundingBoxMagnitudeOrder, 0.0f, zCrossH)); + 0, + SbVec3f(-analysisResults.boundingBoxMagnitudeOrder, 0.0f, zCrossH)); editModeScenegraphNodes.RootCrossCoordinate->point.set1Value( - 1, SbVec3f(analysisResults.boundingBoxMagnitudeOrder, 0.0f, zCrossH)); + 1, + SbVec3f(analysisResults.boundingBoxMagnitudeOrder, 0.0f, zCrossH)); editModeScenegraphNodes.RootCrossCoordinate->point.set1Value( - 2, SbVec3f(0.0f, -analysisResults.boundingBoxMagnitudeOrder, zCrossH)); + 2, + SbVec3f(0.0f, -analysisResults.boundingBoxMagnitudeOrder, zCrossH)); editModeScenegraphNodes.RootCrossCoordinate->point.set1Value( - 3, SbVec3f(0.0f, analysisResults.boundingBoxMagnitudeOrder, zCrossH)); + 3, + SbVec3f(0.0f, analysisResults.boundingBoxMagnitudeOrder, zCrossH)); } void EditModeCoinManager::updateColor() @@ -808,8 +836,9 @@ void EditModeCoinManager::updateColor(const GeoListFacade& geolistfacade) auto constraints = ViewProviderSketchCoinAttorney::getConstraints(viewProvider); - if (ViewProviderSketchCoinAttorney::haveConstraintsInvalidGeometry(viewProvider)) + if (ViewProviderSketchCoinAttorney::haveConstraintsInvalidGeometry(viewProvider)) { return; + } pEditModeConstraintCoinManager->updateConstraintColor(constraints); } @@ -830,7 +859,7 @@ void EditModeCoinManager::createEditModeInventorNodes() // 1 - Create the edit root node editModeScenegraphNodes.EditRoot = new SoSeparator; editModeScenegraphNodes.EditRoot - ->ref();// Node is unref in the destructor of EditModeCoinManager + ->ref(); // Node is unref in the destructor of EditModeCoinManager editModeScenegraphNodes.EditRoot->setName("Sketch_EditRoot"); ViewProviderSketchCoinAttorney::addNodeToRoot(viewProvider, editModeScenegraphNodes.EditRoot); editModeScenegraphNodes.EditRoot->renderCaching = SoSeparator::OFF; @@ -858,9 +887,11 @@ void EditModeCoinManager::createEditModeInventorNodes() editModeScenegraphNodes.RootCrossMaterials = new SoMaterial; editModeScenegraphNodes.RootCrossMaterials->setName("RootCrossMaterials"); editModeScenegraphNodes.RootCrossMaterials->diffuseColor.set1Value( - 0, drawingParameters.CrossColorH); + 0, + drawingParameters.CrossColorH); editModeScenegraphNodes.RootCrossMaterials->diffuseColor.set1Value( - 1, drawingParameters.CrossColorV); + 1, + drawingParameters.CrossColorV); crossRoot->addChild(editModeScenegraphNodes.RootCrossMaterials); editModeScenegraphNodes.RootCrossCoordinate = new SoCoordinate3; @@ -1036,9 +1067,11 @@ void EditModeCoinManager::updateInventorNodeSizes() void EditModeCoinManager::updateInventorColors() { editModeScenegraphNodes.RootCrossMaterials->diffuseColor.set1Value( - 0, drawingParameters.CrossColorH); + 0, + drawingParameters.CrossColorH); editModeScenegraphNodes.RootCrossMaterials->diffuseColor.set1Value( - 1, drawingParameters.CrossColorV); + 1, + drawingParameters.CrossColorV); editModeScenegraphNodes.textMaterial->diffuseColor = drawingParameters.CursorTextColor; } diff --git a/src/Mod/Sketcher/Gui/EditModeCoinManager.h b/src/Mod/Sketcher/Gui/EditModeCoinManager.h index b071e2d347..aaf2a9b14e 100644 --- a/src/Mod/Sketcher/Gui/EditModeCoinManager.h +++ b/src/Mod/Sketcher/Gui/EditModeCoinManager.h @@ -45,7 +45,7 @@ class Vector3; class Vector2d; class Placement; -}// namespace Base +} // namespace Base namespace Part { @@ -56,7 +56,7 @@ namespace Sketcher { class Constraint; class PropertyConstraintList; -};// namespace Sketcher +}; // namespace Sketcher namespace SketcherGui { @@ -185,8 +185,8 @@ public: }; int PointIndex = InvalidPoint; - int GeoIndex = InvalidCurve;// valid values are 0,1,2,... for normal geometry and - // -3,-4,-5,... for external geometry + int GeoIndex = InvalidCurve; // valid values are 0,1,2,... for normal geometry and + // -3,-4,-5,... for external geometry Axes Cross = Axes::None; std::set ConstrIndices; @@ -246,7 +246,7 @@ public: //@{ void updateColor(); void - updateColor(const GeoListFacade& geolistfacade);// overload to be used with temporal geometry. + updateColor(const GeoListFacade& geolistfacade); // overload to be used with temporal geometry. //@} /** @name change constraints selectability*/ @@ -310,7 +310,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_EditModeCoinManager_H +#endif // SKETCHERGUI_EditModeCoinManager_H diff --git a/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.cpp b/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.cpp index aa928f5ac7..005739b502 100644 --- a/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.cpp +++ b/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.cpp @@ -27,35 +27,42 @@ using namespace SketcherGui; -SbColor DrawingParameters::InformationColor(0.0f, 1.0f, 0.0f); // #00FF00 -> ( 0,255, 0) -SbColor DrawingParameters::CreateCurveColor(0.8f, 0.8f, 0.8f); // #CCCCCC -> (204,204,204) -SbColor DrawingParameters::CrossColorH(0.8f, 0.4f, 0.4f); // #CC6666 -> (204,102,102) -SbColor DrawingParameters::CrossColorV(0.47f, 1.0f, 0.51f); // #83FF83 -> (120,255,131) -SbColor DrawingParameters::InvalidSketchColor(1.0f, 0.42f, 0.0f); // #FF6D00 -> (255,109, 0) -SbColor DrawingParameters::FullyConstrainedColor(0.0f, 1.0f, 0.0f);// #00FF00 -> ( 0,255, 0) -SbColor DrawingParameters::FullyConstraintInternalAlignmentColor(0.87f, 0.87f, - 0.78f);// #DEDEC8 -> (222,222,200) -SbColor DrawingParameters::InternalAlignedGeoColor(0.7f, 0.7f, 0.5f); // #B2B27F -> (178,178,127) -SbColor DrawingParameters::FullyConstraintConstructionPointColor(1.0f, 0.58f, - 0.50f);// #FF9580 -> (255,149,128) -SbColor DrawingParameters::VertexColor(1.0f, 0.149f, 0.0f); // #FF2600 -> (255, 38, 0) -SbColor DrawingParameters::FullyConstraintElementColor(0.50f, 0.81f, - 0.62f); // #80D0A0 -> (128,208,160) -SbColor DrawingParameters::CurveColor(1.0f, 1.0f, 1.0f); // #FFFFFF -> (255,255,255) -SbColor DrawingParameters::PreselectColor(0.88f, 0.88f, 0.0f); // #E1E100 -> (225,225, 0) -SbColor DrawingParameters::SelectColor(0.11f, 0.68f, 0.11f); // #1CAD1C -> ( 28,173, 28) -SbColor DrawingParameters::PreselectSelectedColor(0.36f, 0.48f, 0.11f);// #5D7B1C -> ( 93,123, 28) -SbColor DrawingParameters::CurveExternalColor(0.8f, 0.2f, 0.6f); // #CC3399 -> (204, 51,153) -SbColor DrawingParameters::CurveDraftColor(0.0f, 0.0f, 0.86f); // #0000DC -> ( 0, 0,220) +SbColor DrawingParameters::InformationColor(0.0f, 1.0f, 0.0f); // #00FF00 -> ( 0,255, 0) +SbColor DrawingParameters::CreateCurveColor(0.8f, 0.8f, 0.8f); // #CCCCCC -> (204,204,204) +SbColor DrawingParameters::CrossColorH(0.8f, 0.4f, 0.4f); // #CC6666 -> (204,102,102) +SbColor DrawingParameters::CrossColorV(0.47f, 1.0f, 0.51f); // #83FF83 -> (120,255,131) +SbColor DrawingParameters::InvalidSketchColor(1.0f, 0.42f, 0.0f); // #FF6D00 -> (255,109, 0) +SbColor DrawingParameters::FullyConstrainedColor(0.0f, 1.0f, 0.0f); // #00FF00 -> ( 0,255, 0) SbColor - DrawingParameters::FullyConstraintConstructionElementColor(0.56f, 0.66f, - 0.99f);// #8FA9FD -> (143,169,253) + DrawingParameters::FullyConstraintInternalAlignmentColor(0.87f, + 0.87f, + 0.78f); // #DEDEC8 -> (222,222,200) +SbColor DrawingParameters::InternalAlignedGeoColor(0.7f, 0.7f, 0.5f); // #B2B27F -> (178,178,127) +SbColor + DrawingParameters::FullyConstraintConstructionPointColor(1.0f, + 0.58f, + 0.50f); // #FF9580 -> (255,149,128) +SbColor DrawingParameters::VertexColor(1.0f, 0.149f, 0.0f); // #FF2600 -> (255, 38, 0) +SbColor DrawingParameters::FullyConstraintElementColor(0.50f, + 0.81f, + 0.62f); // #80D0A0 -> (128,208,160) +SbColor DrawingParameters::CurveColor(1.0f, 1.0f, 1.0f); // #FFFFFF -> (255,255,255) +SbColor DrawingParameters::PreselectColor(0.88f, 0.88f, 0.0f); // #E1E100 -> (225,225, 0) +SbColor DrawingParameters::SelectColor(0.11f, 0.68f, 0.11f); // #1CAD1C -> ( 28,173, 28) +SbColor DrawingParameters::PreselectSelectedColor(0.36f, 0.48f, 0.11f); // #5D7B1C -> ( 93,123, 28) +SbColor DrawingParameters::CurveExternalColor(0.8f, 0.2f, 0.6f); // #CC3399 -> (204, 51,153) +SbColor DrawingParameters::CurveDraftColor(0.0f, 0.0f, 0.86f); // #0000DC -> ( 0, 0,220) +SbColor + DrawingParameters::FullyConstraintConstructionElementColor(0.56f, + 0.66f, + 0.99f); // #8FA9FD -> (143,169,253) -SbColor DrawingParameters::ConstrDimColor(1.0f, 0.149f, 0.0f); // #FF2600 -> (255, 38, 0) -SbColor DrawingParameters::ConstrIcoColor(1.0f, 0.149f, 0.0f); // #FF2600 -> (255, 38, 0) -SbColor DrawingParameters::NonDrivingConstrDimColor(0.0f, 0.149f, 1.0f);// #0026FF -> ( 0, 38,255) -SbColor DrawingParameters::ExprBasedConstrDimColor(1.0f, 0.5f, 0.149f); // #FF7F26 -> (255, 127,38) -SbColor DrawingParameters::DeactivatedConstrDimColor(0.8f, 0.8f, 0.8f); // #CCCCCC -> (204,204,204) -SbColor DrawingParameters::CursorTextColor(0.0f, 0.0f, 1.0f); // #0000FF -> (0,0,255) +SbColor DrawingParameters::ConstrDimColor(1.0f, 0.149f, 0.0f); // #FF2600 -> (255, 38, 0) +SbColor DrawingParameters::ConstrIcoColor(1.0f, 0.149f, 0.0f); // #FF2600 -> (255, 38, 0) +SbColor + DrawingParameters::NonDrivingConstrDimColor(0.0f, 0.149f, 1.0f); // #0026FF -> ( 0, 38,255) +SbColor DrawingParameters::ExprBasedConstrDimColor(1.0f, 0.5f, 0.149f); // #FF7F26 -> (255, 127,38) +SbColor DrawingParameters::DeactivatedConstrDimColor(0.8f, 0.8f, 0.8f); // #CCCCCC -> (204,204,204) +SbColor DrawingParameters::CursorTextColor(0.0f, 0.0f, 1.0f); // #0000FF -> (0,0,255) const MultiFieldId MultiFieldId::Invalid = MultiFieldId(); diff --git a/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.h b/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.h index 93a14816c7..a59f7766a6 100644 --- a/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.h +++ b/src/Mod/Sketcher/Gui/EditModeCoinManagerParameters.h @@ -67,19 +67,19 @@ struct DrawingParameters /** @name Rendering Heights - virtual height introduced in the scenegraph to determine what is * drawn on top of what*/ //@{ - const float zEdit = 0.002f; // Height used by temporal edit curves - const float zCross = 0.002f; // Height used by the Axes - const float zInfo = 0.004f; // Height used by the Overlay information layer - const float zLowLines = 0.005f; // Height used for bottom rendered lines - const float zMidLines = 0.006f; // Height used for in-the-middle rendered lines - const float zHighLines = 0.007f; // Height used for on top rendered lines - const float zHighLine = 0.008f; // Height for highlighted lines (selected/preselected) - const float zConstr = 0.009f; // Height for rendering constraints - const float zRootPoint = 0.010f; // Height used for rendering the root point - const float zLowPoints = 0.011f; // Height used for bottom rendered points - const float zHighPoints = 0.012f;// Height used for in-the-middle rendered points - const float zHighlight = 0.013f; // Height for highlighted points (selected/preselected) - const float zText = 0.013f; // Height for rendered text + const float zEdit = 0.002f; // Height used by temporal edit curves + const float zCross = 0.002f; // Height used by the Axes + const float zInfo = 0.004f; // Height used by the Overlay information layer + const float zLowLines = 0.005f; // Height used for bottom rendered lines + const float zMidLines = 0.006f; // Height used for in-the-middle rendered lines + const float zHighLines = 0.007f; // Height used for on top rendered lines + const float zHighLine = 0.008f; // Height for highlighted lines (selected/preselected) + const float zConstr = 0.009f; // Height for rendering constraints + const float zRootPoint = 0.010f; // Height used for rendering the root point + const float zLowPoints = 0.011f; // Height used for bottom rendered points + const float zHighPoints = 0.012f; // Height used for in-the-middle rendered points + const float zHighlight = 0.013f; // Height for highlighted points (selected/preselected) + const float zText = 0.013f; // Height for rendered text //@} /// Different categories of geometries that can be selected by the user to be rendered on top, @@ -99,47 +99,47 @@ struct DrawingParameters /** @name Rendering Coin Colors **/ //@{ - static SbColor InformationColor; // Information Overlay Color - static SbColor CreateCurveColor; // Color for Edit Curves during creation - static SbColor CrossColorH; // Color for the Horizontal Axis - static SbColor CrossColorV; // Color for the Vertical Axis - static SbColor InvalidSketchColor; // Color for rendering an invalid sketch - static SbColor FullyConstrainedColor; // Color for a fully constrained sketch - static SbColor FullyConstraintInternalAlignmentColor;// Color for fully constrained internal - // alignment geometry + static SbColor InformationColor; // Information Overlay Color + static SbColor CreateCurveColor; // Color for Edit Curves during creation + static SbColor CrossColorH; // Color for the Horizontal Axis + static SbColor CrossColorV; // Color for the Vertical Axis + static SbColor InvalidSketchColor; // Color for rendering an invalid sketch + static SbColor FullyConstrainedColor; // Color for a fully constrained sketch + static SbColor FullyConstraintInternalAlignmentColor; // Color for fully constrained internal + // alignment geometry static SbColor - InternalAlignedGeoColor;// Color for non-fully constrained internal alignment geometry + InternalAlignedGeoColor; // Color for non-fully constrained internal alignment geometry static SbColor - FullyConstraintConstructionPointColor; // Color for fully constrained construction points - static SbColor VertexColor; // Color for vertices - static SbColor FullyConstraintElementColor;// Color for a fully constrained element - static SbColor CurveColor; // Color for curves - static SbColor PreselectColor; // Color used for pre-selection + FullyConstraintConstructionPointColor; // Color for fully constrained construction points + static SbColor VertexColor; // Color for vertices + static SbColor FullyConstraintElementColor; // Color for a fully constrained element + static SbColor CurveColor; // Color for curves + static SbColor PreselectColor; // Color used for pre-selection static SbColor - PreselectSelectedColor;// Color used for pre-selection when geometry is already selected - static SbColor SelectColor;// Color used for selected geometry - static SbColor CurveExternalColor; // Color used for external geometry - static SbColor CurveDraftColor; // Color used for construction geometry - static SbColor FullyConstraintConstructionElementColor;// Color used for a fully constrained - // construction element - static SbColor ConstrDimColor;// Color used for a dimensional constraints - static SbColor ConstrIcoColor;// Color used for constraint icons + PreselectSelectedColor; // Color used for pre-selection when geometry is already selected + static SbColor SelectColor; // Color used for selected geometry + static SbColor CurveExternalColor; // Color used for external geometry + static SbColor CurveDraftColor; // Color used for construction geometry + static SbColor FullyConstraintConstructionElementColor; // Color used for a fully constrained + // construction element + static SbColor ConstrDimColor; // Color used for a dimensional constraints + static SbColor ConstrIcoColor; // Color used for constraint icons static SbColor - NonDrivingConstrDimColor;// Color used for non-driving (reference) dimensional constraints + NonDrivingConstrDimColor; // Color used for non-driving (reference) dimensional constraints static SbColor - ExprBasedConstrDimColor;// Color used for expression based dimensional constraints - static SbColor DeactivatedConstrDimColor;// Color used for deactivated dimensional constraints - static SbColor CursorTextColor; // Color used by the edit mode cursor + ExprBasedConstrDimColor; // Color used for expression based dimensional constraints + static SbColor DeactivatedConstrDimColor; // Color used for deactivated dimensional constraints + static SbColor CursorTextColor; // Color used by the edit mode cursor //@} /** @name Rendering sizes (also to support HDPI monitors) **/ //@{ - double pixelScalingFactor = 1.0;// Scaling factor to be used for pixels - int coinFontSize = 17; // Font size to be used by coin + double pixelScalingFactor = 1.0; // Scaling factor to be used for pixels + int coinFontSize = 17; // Font size to be used by coin int labelFontSize = - 17;// Font size to be used by SoDatumLabel, which uses a QPainter and a QFont internally - int constraintIconSize = 15;// Size of constraint icons - int markerSize = 7; // Size used for markers + 17; // Font size to be used by SoDatumLabel, which uses a QPainter and a QFont internally + int constraintIconSize = 15; // Size of constraint icons + int markerSize = 7; // Size used for markers //@} }; @@ -149,15 +149,15 @@ struct GeometryLayerNodes { /** @name Point nodes*/ //@{ - std::vector& PointsMaterials; // The materials for the points/vertices - std::vector& PointsCoordinate;// The coordinates of the points/vertices + std::vector& PointsMaterials; // The materials for the points/vertices + std::vector& PointsCoordinate; // The coordinates of the points/vertices //@} /** @name Curve nodes*/ //@{ - std::vector& CurvesMaterials; // The materials for the curves - std::vector& CurvesCoordinate;// The coordinates of the segments of the curves - std::vector& CurveSet; // The set of curves + std::vector& CurvesMaterials; // The materials for the curves + std::vector& CurvesCoordinate; // The coordinates of the segments of the curves + std::vector& CurveSet; // The set of curves //@} }; @@ -204,7 +204,7 @@ public: }; -}// namespace SketcherGui +} // namespace SketcherGui namespace std { @@ -219,7 +219,7 @@ struct less : (static_cast(lhs.fieldIndex) < static_cast(rhs.fieldIndex)); } }; -}// namespace std +} // namespace std namespace SketcherGui @@ -281,16 +281,16 @@ public: } private: - int CoinLayers = 1;// defaults to a single Coin Geometry Layer. + int CoinLayers = 1; // defaults to a single Coin Geometry Layer. }; /** @brief Struct to hold the results of analysis performed on geometry */ struct AnalysisResults -{ // TODO: This needs to be refactored - double combRepresentationScale = 0; // used for information overlay (BSpline comb) - float boundingBoxMagnitudeOrder = 0;// used for grid extension - std::vector bsplineGeoIds; // used for information overlay +{ // TODO: This needs to be refactored + double combRepresentationScale = 0; // used for information overlay (BSpline comb) + float boundingBoxMagnitudeOrder = 0; // used for grid extension + std::vector bsplineGeoIds; // used for information overlay std::vector arcGeoIds; }; @@ -317,9 +317,10 @@ struct OverlayParameters */ struct ConstraintParameters { - bool bHideUnits; // whether units should be hidden or not - bool bShowDimensionalName;// whether the name of dimensional constraints should be shown or not - QString sDimensionalStringFormat;// how to code strings of dimensional constraints + bool bHideUnits; // whether units should be hidden or not + bool + bShowDimensionalName; // whether the name of dimensional constraints should be shown or not + QString sDimensionalStringFormat; // how to code strings of dimensional constraints }; /** @brief Helper struct adapted to store the pointer to edit mode scenegraph objects. @@ -450,20 +451,21 @@ struct CoinMapping auto indexit = std::find(PointIdToVertexId[l].begin(), PointIdToVertexId[l].end(), vertexId); - if (indexit != PointIdToVertexId[l].end()) + if (indexit != PointIdToVertexId[l].end()) { return MultiFieldId(std::distance(PointIdToVertexId[l].begin(), indexit), l); + } } return MultiFieldId::Invalid; } //* These map a MF index (second index) within a coin layer (first index) for points or curves - //to a GeoId */ - std::vector> CurvIdToGeoId; // conversion of SoLineSet index to GeoId - std::vector> PointIdToGeoId;// conversion of SoCoordinate3 index to GeoId + // to a GeoId */ + std::vector> CurvIdToGeoId; // conversion of SoLineSet index to GeoId + std::vector> PointIdToGeoId; // conversion of SoCoordinate3 index to GeoId //* This maps an MF index (second index) of a point within a coin layer (first index) to a - //global VertexId */ + // global VertexId */ std::vector> PointIdToVertexId; /// This maps GeoElementId index {GeoId, PointPos} to a {coin layer and MF index} of a curve or @@ -471,6 +473,6 @@ struct CoinMapping std::map GeoElementId2SetId; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_EditModeCoinManagerParameters_H +#endif // SKETCHERGUI_EditModeCoinManagerParameters_H diff --git a/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp b/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp index a37f0f11d4..8a0b18198c 100644 --- a/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp +++ b/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp @@ -39,7 +39,7 @@ #include #include #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include #include @@ -104,7 +104,7 @@ void EditModeConstraintCoinManager::updateVirtualSpace() for (size_t i = 0; i < constrlist.size(); i++) { sws[i] = !(constrlist[i]->isInVirtualSpace - != isshownvirtualspace);// XOR of constraint mode and VP mode + != isshownvirtualspace); // XOR of constraint mode and VP mode } @@ -182,7 +182,7 @@ Restart: // bug #0001956). goto Restart; } - try {// because calculateNormalAtPoint, used in there, can throw + try { // because calculateNormalAtPoint, used in there, can throw // root separator for this constraint SoSeparator* sep = static_cast(editModeScenegraphNodes.constrGroup->getChild(i)); @@ -200,9 +200,9 @@ Restart: // distinguish different constraint types to build up switch (Constr->Type) { case Block: - case Horizontal:// write the new position of the Horizontal constraint Same as - // vertical position. - case Vertical: // write the new position of the Vertical constraint + case Horizontal: // write the new position of the Horizontal constraint Same as + // vertical position. + case Vertical: // write the new position of the Vertical constraint { assert(Constr->First >= -extGeoCount && Constr->First < intGeoCount); bool alignment = Constr->Type != Block && Constr->Second != GeoEnum::GeoUndef; @@ -256,8 +256,8 @@ Restart: else { double ra = 0, rb = 0; double angle, - angleplus = 0.;// angle = rotation of object as a whole; angleplus = - // arc angle (t parameter for ellipses). + angleplus = 0.; // angle = rotation of object as a whole; angleplus + // = arc angle (t parameter for ellipses). if (geo->getTypeId() == Part::GeomCircle::getClassTypeId()) { const Part::GeomCircle* circle = static_cast(geo); @@ -332,10 +332,10 @@ Restart: Base::Vector3d majDir, minDir, rvec; majDir = Base::Vector3d(cos(angle), sin(angle), - 0);// direction of major axis of ellipse + 0); // direction of major axis of ellipse minDir = Base::Vector3d(-majDir.y, majDir.x, - 0);// direction of minor axis of ellipse + 0); // direction of minor axis of ellipse rvec = (ra * cos(angleplus)) * majDir + (rb * sin(angleplus)) * minDir; midpos += rvec; @@ -344,7 +344,7 @@ Restart: dir = Base::Vector3d( -rvec.y, rvec.x, - 0);// DeepSOIC: I'm not sure what dir is supposed to mean. + 0); // DeepSOIC: I'm not sure what dir is supposed to mean. } else { norm = Base::Vector3d(cos(angle), sin(angle), 0); @@ -364,7 +364,7 @@ Restart: static_cast(ConstraintNodePosition::FirstTranslationIndex))); translation->abPos = - SbVec3f(midpos.x, midpos.y, zConstrH);// Absolute Reference + SbVec3f(midpos.x, midpos.y, zConstrH); // Absolute Reference // Reference Position that is scaled according to zoom translation->translation = SbVec3f(relpos.x, relpos.y, 0); @@ -423,17 +423,17 @@ Restart: const Part::Geometry* geo2 = geolistfacade.getGeometryFromGeoId(Constr->Second); Base::Vector3d midpos1, dir1, norm1; Base::Vector3d midpos2, dir2, norm2; - bool twoIcons = false;// a very local flag. It's set to true to indicate that - // the second dir+norm are valid and should be used + bool twoIcons = false; // a very local flag. It's set to true to indicate that + // the second dir+norm are valid and should be used - if (Constr->Third != GeoEnum::GeoUndef ||// perpty via point + if (Constr->Third != GeoEnum::GeoUndef || // perpty via point Constr->FirstPos - != Sketcher::PointPos::none) {// endpoint-to-curve or - // endpoint-to-endpoint perpty + != Sketcher::PointPos::none) { // endpoint-to-curve or + // endpoint-to-endpoint perpty int ptGeoId; Sketcher::PointPos ptPosId; - do {// dummy loop to use break =) Maybe goto? + do { // dummy loop to use break =) Maybe goto? ptGeoId = Constr->First; ptPosId = Constr->FirstPos; if (ptPosId != Sketcher::PointPos::none) { @@ -449,7 +449,7 @@ Restart: if (ptPosId != Sketcher::PointPos::none) { break; } - assert(0);// no point found! + assert(0); // no point found! } while (false); midpos1 = geolistfacade.getPoint(ptGeoId, ptPosId); @@ -574,8 +574,8 @@ Restart: double angle1, angle1plus = 0., angle2, angle2plus = - 0.;// angle1 = rotation of object as a whole; angle1plus = arc - // angle (t parameter for ellipses). + 0.; // angle1 = rotation of object as a whole; angle1plus = arc + // angle (t parameter for ellipses). if (geo1->getTypeId() == Part::GeomCircle::getClassTypeId()) { const Part::GeomCircle* circle = static_cast(geo1); @@ -720,10 +720,10 @@ Restart: Base::Vector3d majDir, minDir, rvec; majDir = Base::Vector3d(cos(angle1), sin(angle1), - 0);// direction of major axis of ellipse + 0); // direction of major axis of ellipse minDir = Base::Vector3d(-majDir.y, majDir.x, - 0);// direction of minor axis of ellipse + 0); // direction of minor axis of ellipse rvec = (r1a * cos(angle1plus)) * majDir + (r1b * sin(angle1plus)) * minDir; midpos1 += rvec; @@ -732,7 +732,7 @@ Restart: dir1 = Base::Vector3d( -rvec.y, rvec.x, - 0);// DeepSOIC: I'm not sure what dir is supposed to mean. + 0); // DeepSOIC: I'm not sure what dir is supposed to mean. } else { norm1 = Base::Vector3d(cos(angle1), sin(angle1), 0); @@ -749,10 +749,10 @@ Restart: Base::Vector3d majDir, minDir, rvec; majDir = Base::Vector3d(cos(angle2), sin(angle2), - 0);// direction of major axis of ellipse + 0); // direction of major axis of ellipse minDir = Base::Vector3d(-majDir.y, majDir.x, - 0);// direction of minor axis of ellipse + 0); // direction of minor axis of ellipse rvec = (r2a * cos(angle2plus)) * majDir + (r2b * sin(angle2plus)) * minDir; midpos2 += rvec; @@ -766,7 +766,7 @@ Restart: midpos2 += r2a * norm2; } } - else {// Parallel can only apply to a GeomLineSegment + else { // Parallel can only apply to a GeomLineSegment break; } } @@ -803,7 +803,7 @@ Restart: static_cast(ConstraintNodePosition::FirstTranslationIndex))); translation->abPos = - SbVec3f(midpos1.x, midpos1.y, zConstrH);// Absolute Reference + SbVec3f(midpos1.x, midpos1.y, zConstrH); // Absolute Reference // Reference Position that is scaled according to zoom translation->translation = SbVec3f(relpos1.x, relpos1.y, 0); @@ -814,7 +814,7 @@ Restart: static_cast(ConstraintNodePosition::SecondTranslationIndex))); translation->abPos = - SbVec3f(secondPos.x, secondPos.y, zConstrH);// Absolute Reference + SbVec3f(secondPos.x, secondPos.y, zConstrH); // Absolute Reference // Reference Position that is scaled according to zoom translation->translation = @@ -826,7 +826,7 @@ Restart: case DistanceY: { assert(Constr->First >= -extGeoCount && Constr->First < intGeoCount); Base::Vector3d pnt1(0., 0., 0.), pnt2(0., 0., 0.); - if (Constr->SecondPos != Sketcher::PointPos::none) {// point to point distance + if (Constr->SecondPos != Sketcher::PointPos::none) { // point to point distance pnt1 = geolistfacade.getPoint(Constr->First, Constr->FirstPos); pnt2 = geolistfacade.getPoint(Constr->Second, Constr->SecondPos); } @@ -839,7 +839,7 @@ Restart: Base::Vector3d l2p1 = lineSeg->getStartPoint(); Base::Vector3d l2p2 = lineSeg->getEndPoint(); if (Constr->FirstPos - != Sketcher::PointPos::none) {// point to line distance + != Sketcher::PointPos::none) { // point to line distance pnt1 = geolistfacade.getPoint(Constr->First, Constr->FirstPos); // calculate the projection of p1 onto line2 pnt2.ProjectToLine(pnt1 - l2p1, l2p2 - l2p1); @@ -849,15 +849,15 @@ Restart: const Part::Geometry* geo1 = geolistfacade.getGeometryFromGeoId(Constr->First); if (geo1->getTypeId() - == Part::GeomCircle::getClassTypeId()) {// circle to line - // distance + == Part::GeomCircle::getClassTypeId()) { // circle to line + // distance const Part::GeomCircle* circleSeg = static_cast(geo1); Base::Vector3d ct = circleSeg->getCenter(); double radius = circleSeg->getRadius(); pnt1.ProjectToLine( ct - l2p1, - l2p2 - l2p1);// project on the line translated to origin + l2p2 - l2p1); // project on the line translated to origin Base::Vector3d dir = pnt1; dir.Normalize(); pnt1 += ct; @@ -869,14 +869,15 @@ Restart: const Part::Geometry* geo1 = geolistfacade.getGeometryFromGeoId(Constr->First); if (geo1->getTypeId() - == Part::GeomCircle::getClassTypeId()) {// circle to circle distance + == Part::GeomCircle::getClassTypeId()) { // circle to circle + // distance const Part::GeomCircle* circleSeg1 = static_cast(geo1); auto circleSeg2 = static_cast(geo); GetCirclesMinimalDistance(circleSeg1, circleSeg2, pnt1, pnt2); } else if (Constr->FirstPos - != Sketcher::PointPos::none) {// point to circle distance + != Sketcher::PointPos::none) { // point to circle distance auto circleSeg2 = static_cast(geo); pnt1 = geolistfacade.getPoint(Constr->First, Constr->FirstPos); Base::Vector3d v = pnt1 - circleSeg2->getCenter(); @@ -895,7 +896,7 @@ Restart: const Part::Geometry* geo = geolistfacade.getGeometryFromGeoId(Constr->First); if (geo->getTypeId() - == Part::GeomLineSegment::getClassTypeId()) {// segment distance + == Part::GeomLineSegment::getClassTypeId()) { // segment distance const Part::GeomLineSegment* lineSeg = static_cast(geo); pnt1 = lineSeg->getStartPoint(); @@ -948,18 +949,18 @@ Restart: Base::Vector3d pos, relPos; if (Constr->Type == PointOnObject || Constr->Type == SnellsLaw || (Constr->Type == Tangent && Constr->Third != GeoEnum::GeoUndef) - ||// Tangency via point + || // Tangency via point (Constr->Type == Tangent && Constr->FirstPos - != Sketcher::PointPos::none)// endpoint-to-curve or - // endpoint-to-endpoint tangency + != Sketcher::PointPos::none) // endpoint-to-curve or + // endpoint-to-endpoint tangency ) { // find the point of tangency/point that is on object // just any point among first/second/third should be OK int ptGeoId; Sketcher::PointPos ptPosId; - do {// dummy loop to use break =) Maybe goto? + do { // dummy loop to use break =) Maybe goto? ptGeoId = Constr->First; ptPosId = Constr->FirstPos; if (ptPosId != Sketcher::PointPos::none) { @@ -975,7 +976,7 @@ Restart: if (ptPosId != Sketcher::PointPos::none) { break; } - assert(0);// no point found! + assert(0); // no point found! } while (false); pos = geolistfacade.getPoint(ptGeoId, ptPosId); @@ -998,7 +999,7 @@ Restart: auto translation = static_cast(sep->getChild( static_cast(ConstraintNodePosition::FirstTranslationIndex))); - translation->abPos = SbVec3f(pos.x, pos.y, zConstrH);// Absolute Reference + translation->abPos = SbVec3f(pos.x, pos.y, zConstrH); // Absolute Reference translation->translation = SbVec3f(relPos.x, relPos.y, 0); } else if (Constr->Type == Tangent) { @@ -1043,7 +1044,7 @@ Restart: static_cast(ConstraintNodePosition::FirstTranslationIndex))); translation->abPos = - SbVec3f(midpos1.x, midpos1.y, zConstrH);// Absolute Reference + SbVec3f(midpos1.x, midpos1.y, zConstrH); // Absolute Reference translation->translation = SbVec3f(relpos1.x, relpos1.y, 0); Base::Vector3d secondPos = midpos2 - midpos1; @@ -1052,7 +1053,7 @@ Restart: static_cast(ConstraintNodePosition::SecondTranslationIndex))); translation->abPos = - SbVec3f(secondPos.x, secondPos.y, zConstrH);// Absolute Reference + SbVec3f(secondPos.x, secondPos.y, zConstrH); // Absolute Reference translation->translation = SbVec3f(relpos2.x - relpos1.x, relpos2.y - relpos1.y, 0); @@ -1076,7 +1077,7 @@ Restart: (circle->getCenter() - lineSeg->getStartPoint()) * dir; pos = lineSeg->getStartPoint() + dir * length; - relPos = norm * 1;// TODO Huh? + relPos = norm * 1; // TODO Huh? } else if (geo2->getTypeId() == Part::GeomEllipse::getClassTypeId() || geo2->getTypeId() @@ -1107,7 +1108,7 @@ Restart: float length = (arc->getCenter() - lineSeg->getStartPoint()) * dir; pos = lineSeg->getStartPoint() + dir * length; - relPos = norm * 1;// TODO Huh? + relPos = norm * 1; // TODO Huh? } } @@ -1154,7 +1155,7 @@ Restart: auto translation = static_cast(sep->getChild( static_cast(ConstraintNodePosition::FirstTranslationIndex))); - translation->abPos = SbVec3f(pos.x, pos.y, zConstrH);// Absolute Reference + translation->abPos = SbVec3f(pos.x, pos.y, zConstrH); // Absolute Reference translation->translation = SbVec3f(relPos.x, relPos.y, 0); } } break; @@ -1197,7 +1198,7 @@ Restart: double startangle, range, endangle; if (Constr->Second != GeoEnum::GeoUndef) { Base::Vector3d dir1, dir2; - if (Constr->Third == GeoEnum::GeoUndef) {// angle between two lines + if (Constr->Third == GeoEnum::GeoUndef) { // angle between two lines const Part::Geometry* geo1 = geolistfacade.getGeometryFromGeoId(Constr->First); const Part::Geometry* geo2 = @@ -1255,10 +1256,10 @@ Restart: } } - range = Constr->getValue();// WYSIWYG + range = Constr->getValue(); // WYSIWYG startangle = atan2(dir1.y, dir1.x); } - else {// angle-via-point + else { // angle-via-point Base::Vector3d p = geolistfacade.getPoint(Constr->Third, Constr->ThirdPos); p0 = SbVec3f(p.x, p.y, 0); @@ -1266,7 +1267,7 @@ Restart: // TODO: Check // dir1 = getSolvedSketch().calculateNormalAtPoint(Constr->First, p.x, // p.y); - dir1.RotateZ(-M_PI / 2);// convert to vector of tangency by rotating + dir1.RotateZ(-M_PI / 2); // convert to vector of tangency by rotating dir2 = getNormal(geolistfacade, Constr->Second, p); // TODO: Check // dir2 = getSolvedSketch().calculateNormalAtPoint(Constr->Second, p.x, @@ -1466,7 +1467,7 @@ Restart: asciiText->pnts.finishEditing(); } break; - case Coincident:// nothing to do for coincident + case Coincident: // nothing to do for coincident case None: case InternalAlignment: case NumConstraintTypes: @@ -1514,8 +1515,8 @@ Base::Vector3d EditModeConstraintCoinManager::seekConstraintPosition(const Base: rp->setPickAll(true); rp->setRay(SbVec3f(freePos.x, freePos.y, -1.f), SbVec3f(0, 0, 1)); // problem - rp->apply(editModeScenegraphNodes.constrGroup);// We could narrow it down to just the - // SoGroup containing the constraints + rp->apply(editModeScenegraphNodes.constrGroup); // We could narrow it down to just the + // SoGroup containing the constraints // returns a copy of the point SoPickedPoint* pp = rp->getPickedPoint(); @@ -1536,13 +1537,13 @@ Base::Vector3d EditModeConstraintCoinManager::seekConstraintPosition(const Base: isConstraintAtPosition = false; } - multiplier *= -1;// search in both sides + multiplier *= -1; // search in both sides if (multiplier >= 0) { - multiplier++;// Increment the multiplier + multiplier++; // Increment the multiplier } } if (multiplier == 10) { - relPos = norm * 0.5f;// no free position found + relPos = norm * 0.5f; // no free position found } return relPos * step; } @@ -1554,9 +1555,9 @@ void EditModeConstraintCoinManager::updateConstraintColor( // materials. std::vector PtNum; - std::vector pcolor;// point color + std::vector pcolor; // point color std::vector CurvNum; - std::vector color;// curve color + std::vector color; // curve color for (int l = 0; l < geometryLayerParameters.getCoinLayerCount(); l++) { PtNum.push_back(editModeScenegraphNodes.PointsMaterials[l]->diffuseColor.getNum()); @@ -1796,7 +1797,7 @@ void EditModeConstraintCoinManager::rebuildConstraintNodes( // nodes not needed sep->unref(); mat->unref(); - continue;// jump to next constraint + continue; // jump to next constraint } break; case Horizontal: case Vertical: @@ -1819,7 +1820,7 @@ void EditModeConstraintCoinManager::rebuildConstraintNodes( // remember the type of this constraint node vConstrType.push_back((*it)->Type); } break; - case Coincident:// no visual for coincident so far + case Coincident: // no visual for coincident so far vConstrType.push_back(Coincident); break; case Parallel: @@ -1910,13 +1911,13 @@ void EditModeConstraintCoinManager::rebuildConstraintNodes( QString EditModeConstraintCoinManager::getPresentationString(const Constraint* constraint) { - QString nameStr; // name parameter string - QString valueStr; // dimensional value string - QString presentationStr; // final return string - QString unitStr; // the actual unit string - QString baseUnitStr; // the expected base unit string - double factor; // unit scaling factor, currently not used - Base::UnitSystem unitSys;// current unit system + QString nameStr; // name parameter string + QString valueStr; // dimensional value string + QString presentationStr; // final return string + QString unitStr; // the actual unit string + QString baseUnitStr; // the expected base unit string + double factor; // unit scaling factor, currently not used + Base::UnitSystem unitSys; // current unit system if (!constraint->isActive) { return QString::fromLatin1(" "); @@ -1967,17 +1968,17 @@ QString EditModeConstraintCoinManager::getPresentationString(const Constraint* c if (QString::compare(baseUnitStr, unitStr) == 0) { // Example code from: Mod/TechDraw/App/DrawViewDimension.cpp:372 QRegularExpression rxUnits( - QString::fromUtf8(" \\D*$"));// space + any non digits at end of string - valueStr.remove(rxUnits); // getUserString(defaultDecimals) without units + QString::fromUtf8(" \\D*$")); // space + any non digits at end of string + valueStr.remove(rxUnits); // getUserString(defaultDecimals) without units } } } if (constraint->Type == Sketcher::Diameter) { - valueStr.prepend(QChar(216));// Diameter sign + valueStr.prepend(QChar(216)); // Diameter sign } else if (constraint->Type == Sketcher::Radius) { - valueStr.prepend(QChar(82));// Capital letter R + valueStr.prepend(QChar(82)); // Capital letter R } /** @@ -2213,7 +2214,7 @@ void EditModeConstraintCoinManager::drawConstraintIcons(const GeoListFacade& geo switch (constraint->Type) { - case Tangent: {// second icon is available only for colinear line segments + case Tangent: { // second icon is available only for colinear line segments const Part::Geometry* geo1 = geolistfacade.getGeometryFromGeoId(constraint->First); const Part::Geometry* geo2 = geolistfacade.getGeometryFromGeoId(constraint->Second); if (geo1 && geo1->getTypeId() == Part::GeomLineSegment::getClassTypeId() && geo2 @@ -2222,7 +2223,7 @@ void EditModeConstraintCoinManager::drawConstraintIcons(const GeoListFacade& geo } } break; case Horizontal: - case Vertical: {// second icon is available only for point alignment + case Vertical: { // second icon is available only for point alignment if (constraint->Second != GeoEnum::GeoUndef && constraint->FirstPos != Sketcher::PointPos::none && constraint->SecondPos != Sketcher::PointPos::none) { @@ -2402,7 +2403,7 @@ void EditModeConstraintCoinManager::combineConstraintIcons(IconQueue iconQueue) ++i; } } - else {// if !visible we skip it + else { // if !visible we skip it i++; } } @@ -2575,13 +2576,13 @@ QImage EditModeConstraintCoinManager::renderConstrIcon(const QString& type, QPixmap pxMap; std::stringstream constraintName; constraintName << type.toLatin1().data() - << drawingParameters.constraintIconSize;// allow resizing by embedding size + << drawingParameters.constraintIconSize; // allow resizing by embedding size if (!Gui::BitmapFactory().findPixmapInCache(constraintName.str().c_str(), pxMap)) { pxMap = Gui::BitmapFactory().pixmapFromSvg( type.toLatin1().data(), QSizeF(drawingParameters.constraintIconSize, drawingParameters.constraintIconSize)); Gui::BitmapFactory().addPixmapToCache(constraintName.str().c_str(), - pxMap);// Cache for speed, avoiding pixmapFromSvg + pxMap); // Cache for speed, avoiding pixmapFromSvg } QImage icon = pxMap.toImage(); @@ -2632,7 +2633,7 @@ QImage EditModeConstraintCoinManager::renderConstrIcon(const QString& type, qp.setPen(*colorItr); - if (labelItr + 1 == labels.end()) {// if this is the last label + if (labelItr + 1 == labels.end()) { // if this is the last label labelStr = *labelItr; } else { @@ -2791,16 +2792,16 @@ void EditModeConstraintCoinManager::createEditModeInventorNodes() // add the group where all the constraints has its SoSeparator editModeScenegraphNodes.constrGrpSelect = - new SoPickStyle();// used to toggle constraints selectability + new SoPickStyle(); // used to toggle constraints selectability editModeScenegraphNodes.constrGrpSelect->style.setValue(SoPickStyle::SHAPE); editModeScenegraphNodes.EditRoot->addChild(editModeScenegraphNodes.constrGrpSelect); - setConstraintSelectability();// Ensure default value; + setConstraintSelectability(); // Ensure default value; editModeScenegraphNodes.constrGroup = new SmSwitchboard(); editModeScenegraphNodes.constrGroup->setName("ConstraintGroup"); editModeScenegraphNodes.EditRoot->addChild(editModeScenegraphNodes.constrGroup); - SoPickStyle* ps = new SoPickStyle();// used to following nodes aren't impacted + SoPickStyle* ps = new SoPickStyle(); // used to following nodes aren't impacted ps->style.setValue(SoPickStyle::SHAPE); editModeScenegraphNodes.EditRoot->addChild(ps); } diff --git a/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.h b/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.h index b4b6e23edc..147154170f 100644 --- a/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.h +++ b/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.h @@ -51,7 +51,7 @@ class Vector3; class Vector2d; class Placement; -}// namespace Base +} // namespace Base namespace Part { @@ -62,7 +62,7 @@ namespace Sketcher { class Constraint; class PropertyConstraintList; -};// namespace Sketcher +}; // namespace Sketcher namespace SketcherGui { @@ -94,7 +94,8 @@ private: }; public: - explicit EditModeConstraintCoinManager(ViewProviderSketch& vp, DrawingParameters& drawingParams, + explicit EditModeConstraintCoinManager(ViewProviderSketch& vp, + DrawingParameters& drawingParams, GeometryLayerParameters& geometryLayerParams, ConstraintParameters& constraintParams, EditModeScenegraphNodes& editModeScenegraph, @@ -137,14 +138,17 @@ public: void createEditModeInventorNodes(); private: - void rebuildConstraintNodes(const GeoListFacade& geolistfacade);// with specific geometry + void rebuildConstraintNodes(const GeoListFacade& geolistfacade); // with specific geometry void rebuildConstraintNodes(const GeoListFacade& geolistfacade, - const std::vector constrlist, SbVec3f norm); + const std::vector constrlist, + SbVec3f norm); /// finds a free position for placing a constraint icon - Base::Vector3d seekConstraintPosition(const Base::Vector3d& origPos, const Base::Vector3d& norm, - const Base::Vector3d& dir, float step, + Base::Vector3d seekConstraintPosition(const Base::Vector3d& origPos, + const Base::Vector3d& norm, + const Base::Vector3d& dir, + float step, const SoNode* constraint); /// Return display string for constraint including hiding units if @@ -227,8 +231,11 @@ private: void drawMergedConstraintIcons(IconQueue iconQueue); /// Helper for drawMergedConstraintIcons and drawTypicalConstraintIcon - QImage renderConstrIcon(const QString& type, const QColor& iconColor, const QStringList& labels, - const QList& labelColors, double iconRotation, + QImage renderConstrIcon(const QString& type, + const QColor& iconColor, + const QStringList& labels, + const QList& labelColors, + double iconRotation, //! Gets populated with bounding boxes (in icon //! image coordinates) for the icon at left, then //! labels for different constraints. @@ -258,7 +265,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_EditModeConstraintCoinManager_H +#endif // SKETCHERGUI_EditModeConstraintCoinManager_H diff --git a/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp b/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp index 46c6d7d20b..d1b0679788 100644 --- a/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp +++ b/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp @@ -35,8 +35,10 @@ using namespace SketcherGui; EditModeGeometryCoinConverter::EditModeGeometryCoinConverter( - ViewProviderSketch& vp, GeometryLayerNodes& geometrylayernodes, - DrawingParameters& drawingparameters, GeometryLayerParameters& geometryLayerParams, + ViewProviderSketch& vp, + GeometryLayerNodes& geometrylayernodes, + DrawingParameters& drawingparameters, + GeometryLayerParameters& geometryLayerParams, CoinMapping& coinMap) : viewProvider(vp) , geometryLayerNodes(geometrylayernodes) @@ -80,9 +82,9 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli // when that functionality is provided, be added to the first visible layer, or may even a new // empty layer. Points[0].emplace_back(0., 0., 0.); - coinMapping.PointIdToGeoId[0].push_back(-1);// root point + coinMapping.PointIdToGeoId[0].push_back(-1); // root point coinMapping.PointIdToVertexId[0].push_back( - -1);// VertexId is the reference used for point selection/preselection + -1); // VertexId is the reference used for point selection/preselection coinMapping.GeoElementId2SetId.emplace(std::piecewise_construct, std::forward_as_tuple(Sketcher::GeoElementId::RtPnt), @@ -147,15 +149,17 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli coinMapping.PointIdToVertexId[coinLayer].push_back(vertexCounter++); } - if (numberCurves > 0)// insert the first segment of the curve into the map + if (numberCurves > 0) { // insert the first segment of the curve into the map coinMapping.GeoElementId2SetId.emplace( std::piecewise_construct, std::forward_as_tuple(geoId, Sketcher::PointPos::none), std::forward_as_tuple(static_cast(coinMapping.CurvIdToGeoId[coinLayer].size()), coinLayer)); + } - for (int i = 0; i < numberCurves; i++) + for (int i = 0; i < numberCurves; i++) { coinMapping.CurvIdToGeoId[coinLayer].push_back(geoId); + } }; for (size_t i = 0; i < geolistfacade.geomlist.size() - 2; i++) { @@ -168,48 +172,60 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli auto coinLayer = geometryLayerParameters.getSafeCoinLayer(layerId); - if (type == Part::GeomPoint::getClassTypeId()) {// add a point + if (type == Part::GeomPoint::getClassTypeId()) { // add a point convert(geom, GeoId); - setTracking( - GeoId, coinLayer, EditModeGeometryCoinConverter::PointsMode::InsertSingle, 0); + setTracking(GeoId, + coinLayer, + EditModeGeometryCoinConverter::PointsMode::InsertSingle, + 0); } - else if (type == Part::GeomLineSegment::getClassTypeId()) {// add a line + else if (type == Part::GeomLineSegment::getClassTypeId()) { // add a line convert(geom, GeoId); - setTracking( - GeoId, coinLayer, EditModeGeometryCoinConverter::PointsMode::InsertStartEnd, 1); + setTracking(GeoId, + coinLayer, + EditModeGeometryCoinConverter::PointsMode::InsertStartEnd, + 1); } - else if (type.isDerivedFrom(Part::GeomConic::getClassTypeId())) {// add a closed curve conic + else if (type.isDerivedFrom( + Part::GeomConic::getClassTypeId())) { // add a closed curve conic convert(geom, GeoId); - setTracking( - GeoId, coinLayer, EditModeGeometryCoinConverter::PointsMode::InsertMidOnly, 1); + setTracking(GeoId, + coinLayer, + EditModeGeometryCoinConverter::PointsMode::InsertMidOnly, + 1); } - else if (type.isDerivedFrom(Part::GeomArcOfConic::getClassTypeId())) {// add an arc of conic + else if (type.isDerivedFrom( + Part::GeomArcOfConic::getClassTypeId())) { // add an arc of conic convert(geom, GeoId); - setTracking( - GeoId, coinLayer, EditModeGeometryCoinConverter::PointsMode::InsertStartEndMid, 1); + setTracking(GeoId, + coinLayer, + EditModeGeometryCoinConverter::PointsMode::InsertStartEndMid, + 1); arcGeoIds.push_back(GeoId); } - else if (type == Part::GeomBSplineCurve::getClassTypeId()) {// add a bspline (a bounded - // curve that is not a conic) + else if (type == Part::GeomBSplineCurve::getClassTypeId()) { // add a bspline (a bounded + // curve that is not a conic) convert(geom, GeoId); - setTracking( - GeoId, coinLayer, EditModeGeometryCoinConverter::PointsMode::InsertStartEnd, 1); + setTracking(GeoId, + coinLayer, + EditModeGeometryCoinConverter::PointsMode::InsertStartEnd, + 1); bsplineGeoIds.push_back(GeoId); } } @@ -227,29 +243,32 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli int32_t* index = geometryLayerNodes.CurveSet[l]->numVertices.startEditing(); SbVec3f* pverts = geometryLayerNodes.PointsCoordinate[l]->point.startEditing(); - int i = 0;// setting up the line set + int i = 0; // setting up the line set for (std::vector::const_iterator it = Coords[l].begin(); it != Coords[l].end(); - ++it, i++) + ++it, i++) { verts[i].setValue(it->x, it->y, ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider) * drawingParameters.zLowLines); + } - i = 0;// setting up the indexes of the line set + i = 0; // setting up the indexes of the line set for (std::vector::const_iterator it = Index[l].begin(); it != Index[l].end(); - ++it, i++) + ++it, i++) { index[i] = *it; + } - i = 0;// setting up the point set + i = 0; // setting up the point set for (std::vector::const_iterator it = Points[l].begin(); it != Points[l].end(); - ++it, i++) + ++it, i++) { pverts[i].setValue( it->x, it->y, ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider) * drawingParameters.zLowPoints); + } geometryLayerNodes.CurvesCoordinate[l]->point.finishEditing(); geometryLayerNodes.CurveSet[l]->numVertices.finishEditing(); @@ -257,7 +276,8 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeoListFacade& geoli } } -template void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geometryfacade, @@ -303,8 +323,9 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom } else if constexpr (curvemode == CurveMode::ClosedCurve) { int numSegments = drawingParameters.curvedEdgeCountSegments; - if constexpr (std::is_same::value) + if constexpr (std::is_same::value) { numSegments *= geo->countKnots(); + } double segment = (geo->getLastParameter() - geo->getFirstParameter()) / numSegments; @@ -320,8 +341,9 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom } else if constexpr (curvemode == CurveMode::OpenCurve) { int numSegments = drawingParameters.curvedEdgeCountSegments; - if constexpr (std::is_same::value) - numSegments *= (geo->countKnots() - 1);// one less segments than knots + if constexpr (std::is_same::value) { + numSegments *= (geo->countKnots() - 1); // one less segments than knots + } double segment = (geo->getLastParameter() - geo->getFirstParameter()) / numSegments; @@ -379,26 +401,30 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom Base::Console().DeveloperError( "EditModeGeometryCoinConverter", "Curvature graph for B-Spline with GeoId=%d could not be calculated.\n", - geoid);// TODO: Fix identification of curve. + geoid); // TODO: Fix identification of curve. curvaturelist[i] = 0; } - if (curvaturelist[i] > maxcurv) + if (curvaturelist[i] > maxcurv) { maxcurv = curvaturelist[i]; + } double tempf = (pointatcurvelist[i] - midp).Length(); - if (tempf > maxdisttocenterofmass) + if (tempf > maxdisttocenterofmass) { maxdisttocenterofmass = tempf; + } } double temprepscale = 0; - if (maxcurv > 0) + if (maxcurv > 0) { temprepscale = (0.5 * maxdisttocenterofmass) - / maxcurv;// just a factor to make a comb reasonably visible + / maxcurv; // just a factor to make a comb reasonably visible + } - if (temprepscale > combrepscale) + if (temprepscale > combrepscale) { combrepscale = temprepscale; + } } } } diff --git a/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.h b/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.h index aee7eed6c4..950635138a 100644 --- a/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.h +++ b/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.h @@ -34,13 +34,13 @@ template class Vector3; class Vector2d; -}// namespace Base +} // namespace Base namespace Sketcher { enum ConstraintType : int; enum class PointPos : int; -}// namespace Sketcher +} // namespace Sketcher namespace Part { @@ -109,7 +109,8 @@ public: * * @param drawingparameters: Parameters for drawing the overlay information */ - EditModeGeometryCoinConverter(ViewProviderSketch& vp, GeometryLayerNodes& geometrylayernodes, + EditModeGeometryCoinConverter(ViewProviderSketch& vp, + GeometryLayerNodes& geometrylayernodes, DrawingParameters& drawingparameters, GeometryLayerParameters& geometryLayerParams, CoinMapping& coinMap); @@ -179,13 +180,13 @@ private: // measurements float boundingBoxMaxMagnitude = 100; double combrepscale = - 0;// the repscale that would correspond to this comb based only on this calculation. + 0; // the repscale that would correspond to this comb based only on this calculation. std::vector bsplineGeoIds; std::vector arcGeoIds; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_GeometryCoinConverter_H +#endif // SKETCHERGUI_GeometryCoinConverter_H diff --git a/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.cpp b/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.cpp index f71b3d653e..120e8dd352 100644 --- a/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.cpp +++ b/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.cpp @@ -31,7 +31,7 @@ #include #include #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include #include @@ -52,9 +52,12 @@ using namespace Sketcher; //**************************** EditModeGeometryCoinManager class ****************************** EditModeGeometryCoinManager::EditModeGeometryCoinManager( - ViewProviderSketch& vp, DrawingParameters& drawingParams, - GeometryLayerParameters& geometryLayerParams, AnalysisResults& analysisResultStruct, - EditModeScenegraphNodes& editModeScenegraph, CoinMapping& coinMap) + ViewProviderSketch& vp, + DrawingParameters& drawingParams, + GeometryLayerParameters& geometryLayerParams, + AnalysisResults& analysisResultStruct, + EditModeScenegraphNodes& editModeScenegraph, + CoinMapping& coinMap) : viewProvider(vp) , drawingParameters(drawingParams) , geometryLayerParameters(geometryLayerParams) @@ -75,8 +78,8 @@ void EditModeGeometryCoinManager::processGeometry(const GeoListFacade& geolistfa SbBool* swsc = editModeScenegraphNodes.CurvesGroup->enable.startEditing(); auto setEnableLayer = [swsp, swsc](int l, bool enabled) { - swsp[l] = enabled;// layer defaults to enabled - swsc[l] = enabled;// layer defaults to enabled + swsp[l] = enabled; // layer defaults to enabled + swsc[l] = enabled; // layer defaults to enabled }; auto layersconfigurations = viewProvider.VisualLayerList.getValues(); @@ -96,8 +99,11 @@ void EditModeGeometryCoinManager::processGeometry(const GeoListFacade& geolistfa editModeScenegraphNodes.CurveSet}; // process geometry layers - EditModeGeometryCoinConverter gcconv( - viewProvider, geometrylayernodes, drawingParameters, geometryLayerParameters, coinMapping); + EditModeGeometryCoinConverter gcconv(viewProvider, + geometrylayernodes, + drawingParameters, + geometryLayerParameters, + coinMapping); gcconv.convert(geolistfacade); @@ -118,15 +124,17 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli // Lambdas for convenience retrieval of geometry information auto isConstructionGeom = [&geolistfacade](int GeoId) { auto geom = geolistfacade.getGeometryFacadeFromGeoId(GeoId); - if (geom) + if (geom) { return geom->getConstruction(); + } return false; }; auto isDefinedGeomPoint = [&geolistfacade](int GeoId) { auto geom = geolistfacade.getGeometryFacadeFromGeoId(GeoId); - if (geom) + if (geom) { return geom->isGeoType(Part::GeomPoint::getClassTypeId()) && !geom->getConstruction(); + } return false; }; @@ -174,15 +182,16 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli // colors of the point set if (issketchinvalid) { - for (int i = 0; i < PtNum; i++) + for (int i = 0; i < PtNum; i++) { pcolor[i] = drawingParameters.InvalidSketchColor; + } } else { for (int i = 0; i < PtNum; i++) { if (!(i == 0 && l == 0) && ViewProviderSketchCoinAttorney::isSketchFullyConstrained( - viewProvider)) {// root point is not coloured + viewProvider)) { // root point is not coloured pcolor[i] = drawingParameters.FullyConstrainedColor; } else { @@ -191,23 +200,29 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli bool constrainedElement = isFullyConstraintElement(GeoId); if (isInternalAlignedGeom(GeoId)) { - if (constrainedElement) + if (constrainedElement) { pcolor[i] = drawingParameters.FullyConstraintInternalAlignmentColor; - else + } + else { pcolor[i] = drawingParameters.InternalAlignedGeoColor; + } } else { if (!isDefinedGeomPoint(GeoId)) { - if (constrainedElement) + if (constrainedElement) { pcolor[i] = drawingParameters.FullyConstraintConstructionPointColor; - else + } + else { pcolor[i] = drawingParameters.VertexColor; + } } - else {// this is a defined GeomPoint - if (constrainedElement) + else { // this is a defined GeomPoint + if (constrainedElement) { pcolor[i] = drawingParameters.FullyConstraintElementColor; - else + } + else { pcolor[i] = drawingParameters.CurveColor; + } } } } @@ -220,12 +235,15 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli float toprendering, float midrendering, float lowrendering) { - if (drawingParameters.topRenderingGeometry == renderingtype) + if (drawingParameters.topRenderingGeometry == renderingtype) { return toprendering; - else if (drawingParameters.midRenderingGeometry == renderingtype) + } + else if (drawingParameters.midRenderingGeometry == renderingtype) { return midrendering; - else + } + else { return lowrendering; + } }; float zNormPoint = getRenderHeight(DrawingParameters::GeometryRendering::NormalGeometry, @@ -238,8 +256,8 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli drawingParameters.zLowPoints, drawingParameters.zLowPoints); - for (int i = 0; i < PtNum; i++) {// 0 is the origin - if (i == 0 && l == 0) { // reset root point to lowest + for (int i = 0; i < PtNum; i++) { // 0 is the origin + if (i == 0 && l == 0) { // reset root point to lowest pverts[i].setValue(0, 0, viewOrientationFactor * drawingParameters.zRootPoint); } else { @@ -248,10 +266,12 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli geolistfacade.getGeometryFacadeFromGeoId(coinMapping.getPointGeoId(i, l)); if (geom) { - if (geom->getConstruction()) + if (geom->getConstruction()) { pverts[i].setValue(x, y, viewOrientationFactor * zConstrPoint); - else + } + else { pverts[i].setValue(x, y, viewOrientationFactor * zNormPoint); + } } } } @@ -269,8 +289,9 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli MultiFieldId preselectpointmfid; if (preselectcross == 0) { - if (l == 0)// cross only in layer 0 + if (l == 0) { // cross only in layer 0 pcolor[0] = drawingParameters.PreselectColor; + } } else if (preselectpoint != -1) { preselectpointmfid = coinMapping.getIndexLayer(preselectpoint); @@ -279,7 +300,8 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli pcolor[preselectpointmfid.fieldIndex] = drawingParameters.PreselectColor; - raisePoint(pverts[preselectpointmfid.fieldIndex], viewOrientationFactor * drawingParameters.zHighlight); + raisePoint(pverts[preselectpointmfid.fieldIndex], + viewOrientationFactor * drawingParameters.zHighlight); } } @@ -301,7 +323,8 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli ? drawingParameters.PreselectSelectedColor : drawingParameters.SelectColor; - raisePoint(pverts[pointindex.fieldIndex], viewOrientationFactor * drawingParameters.zHighlight); + raisePoint(pverts[pointindex.fieldIndex], + viewOrientationFactor * drawingParameters.zHighlight); } }); @@ -322,7 +345,7 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli drawingParameters.zMidLines, drawingParameters.zLowLines); - int j = 0;// vertexindex + int j = 0; // vertexindex for (int i = 0; i < CurvNum; i++) { int GeoId = coinMapping.getCurveGeoId(i, l); @@ -356,7 +379,7 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli verts[j] = SbVec3f(x, y, viewOrientationFactor * drawingParameters.zHighLine); } } - else if (GeoId <= Sketcher::GeoEnum::RefExt) {// external Geometry + else if (GeoId <= Sketcher::GeoEnum::RefExt) { // external Geometry color[i] = drawingParameters.CurveExternalColor; for (int k = j; j < k + indexes; j++) { verts[j].getValue(x, y, z); @@ -372,16 +395,20 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli } else if (isConstructionGeom(GeoId)) { if (isInternalAlignedGeom(GeoId)) { - if (constrainedElement) + if (constrainedElement) { color[i] = drawingParameters.FullyConstraintInternalAlignmentColor; - else + } + else { color[i] = drawingParameters.InternalAlignedGeoColor; + } } else { - if (constrainedElement) + if (constrainedElement) { color[i] = drawingParameters.FullyConstraintConstructionElementColor; - else + } + else { color[i] = drawingParameters.CurveDraftColor; + } } for (int k = j; j < k + indexes; j++) { @@ -413,12 +440,12 @@ void EditModeGeometryCoinManager::updateGeometryColor(const GeoListFacade& geoli } // colors of the cross - if (l == 0) {// only in layer 0 + if (l == 0) { // only in layer 0 if (ViewProviderSketchCoinAttorney::isCurveSelected(viewProvider, Sketcher::GeoEnum::HAxis)) { crosscolor[0] = drawingParameters.SelectColor; } - else if (preselectcross == 1) {// cross only in layer 0 + else if (preselectcross == 1) { // cross only in layer 0 crosscolor[0] = drawingParameters.PreselectColor; } else { diff --git a/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.h b/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.h index b69e98df91..cd96446e2c 100644 --- a/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.h +++ b/src/Mod/Sketcher/Gui/EditModeGeometryCoinManager.h @@ -44,7 +44,7 @@ class Vector3; class Vector2d; class Placement; -}// namespace Base +} // namespace Base namespace Part { @@ -55,7 +55,7 @@ namespace Sketcher { class Constraint; class PropertyConstraintList; -};// namespace Sketcher +}; // namespace Sketcher namespace SketcherGui { @@ -86,7 +86,8 @@ class SketcherGuiExport EditModeGeometryCoinManager { public: - explicit EditModeGeometryCoinManager(ViewProviderSketch& vp, DrawingParameters& drawingParams, + explicit EditModeGeometryCoinManager(ViewProviderSketch& vp, + DrawingParameters& drawingParams, GeometryLayerParameters& geometryLayerParams, AnalysisResults& analysisResultStruct, EditModeScenegraphNodes& editModeScenegraph, @@ -124,7 +125,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_EditModeGeometryCoinManager_H +#endif // SKETCHERGUI_EditModeGeometryCoinManager_H diff --git a/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp b/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp index fbd288a8e0..263cc4c423 100644 --- a/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp +++ b/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp @@ -31,7 +31,7 @@ #include #include #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include #include @@ -45,7 +45,9 @@ using namespace SketcherGui; EditModeInformationOverlayCoinConverter::EditModeInformationOverlayCoinConverter( - ViewProviderSketch& vp, SoGroup* infogroup, OverlayParameters& overlayparameters, + ViewProviderSketch& vp, + SoGroup* infogroup, + OverlayParameters& overlayparameters, DrawingParameters& drawingparameters) : viewProvider(vp) , infoGroup(infogroup) @@ -123,8 +125,9 @@ void EditModeInformationOverlayCoinConverter::calculate(const Part::Geometry* ge Base::Vector3d midp = Base::Vector3d(0, 0, 0); - for (auto val : poles) + for (auto val : poles) { midp += val; + } midp /= poles.size(); @@ -142,21 +145,25 @@ void EditModeInformationOverlayCoinConverter::calculate(const Part::Geometry* ge size_t nvertices; - if (spline->isPeriodic()) + if (spline->isPeriodic()) { nvertices = poles.size() + 1; - else + } + else { nvertices = poles.size(); + } controlPolygon.coordinates.reserve(nvertices); - for (auto& v : poles) + for (auto& v : poles) { controlPolygon.coordinates.emplace_back(v); + } - if (spline->isPeriodic()) + if (spline->isPeriodic()) { controlPolygon.coordinates.emplace_back(poles[0]); + } controlPolygon.indices.push_back( - nvertices);// single continuous polygon starting at index 0 + nvertices); // single continuous polygon starting at index 0 } else if constexpr (calculation == CalculationType::BSplineCurvatureComb) { @@ -171,7 +178,7 @@ void EditModeInformationOverlayCoinConverter::calculate(const Part::Geometry* ge auto knots = spline->getKnots(); auto mults = spline->getMultiplicities(); - const int ndivPerPiece = 64;// heuristic of number of division to fill in + const int ndivPerPiece = 64; // heuristic of number of division to fill in const int ndiv = ndivPerPiece * (knots.size() - 1); std::vector pointatcurvelist; @@ -234,31 +241,33 @@ void EditModeInformationOverlayCoinConverter::calculate(const Part::Geometry* ge * normallist[i]); } - curvatureComb.coordinates.reserve( - 3 - * ndiv);// 2*ndiv +1 points of ndiv separate segments + ndiv points for last segment + curvatureComb.coordinates.reserve(3 * ndiv); // 2*ndiv +1 points of ndiv separate + // segments + ndiv points for last segment curvatureComb.indices.reserve( - ndiv + 1);// ndiv separate segments of radials + 1 segment connecting at comb end + ndiv + 1); // ndiv separate segments of radials + 1 segment connecting at comb end auto zInfoH = ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider) * drawingParameters.zInfo; for (int i = 0; i < ndiv; i++) { // note emplace emplaces on the position BEFORE the iterator given. - curvatureComb.coordinates.emplace_back( - pointatcurvelist[i].x, pointatcurvelist[i].y, zInfoH);// radials - curvatureComb.coordinates.emplace_back( - pointatcomblist[i].x, pointatcomblist[i].y, zInfoH);// radials - - curvatureComb.indices.emplace_back(2);// line - } - - for (int i = 0; i < ndiv; i++) + curvatureComb.coordinates.emplace_back(pointatcurvelist[i].x, + pointatcurvelist[i].y, + zInfoH); // radials curvatureComb.coordinates.emplace_back(pointatcomblist[i].x, pointatcomblist[i].y, - zInfoH);// // comb endpoint closing segment + zInfoH); // radials - curvatureComb.indices.emplace_back(ndiv);// Comb line + curvatureComb.indices.emplace_back(2); // line + } + + for (int i = 0; i < ndiv; i++) { + curvatureComb.coordinates.emplace_back(pointatcomblist[i].x, + pointatcomblist[i].y, + zInfoH); // // comb endpoint closing segment + } + + curvatureComb.indices.emplace_back(ndiv); // Comb line } else if constexpr (calculation == CalculationType::BSplineKnotMultiplicity) { @@ -284,8 +293,11 @@ void EditModeInformationOverlayCoinConverter::calculate(const Part::Geometry* ge for (size_t i = 0; i < poles.size(); i++) { poleWeights.positions.emplace_back(poles[i]); - QString WeightString = QString::fromLatin1("[%1]").arg( - weights[i], 0, 'f', Base::UnitsApi::getDecimals()); + QString WeightString = + QString::fromLatin1("[%1]").arg(weights[i], + 0, + 'f', + Base::UnitsApi::getDecimals()); poleWeights.strings.emplace_back(WeightString.toStdString()); } @@ -297,10 +309,12 @@ template void EditModeInformationOverlayCoinConverter::addUpdateNode(const Result& result) { - if (overlayParameters.rebuildInformationLayer) + if (overlayParameters.rebuildInformationLayer) { addNode(result); - else + } + else { updateNode(result); + } } template @@ -338,14 +352,16 @@ void EditModeInformationOverlayCoinConverter::setPolygon(const Result& result, int32_t* index = polygonlineset->numVertices.startEditing(); SbVec3f* vts = polygoncoords->point.startEditing(); - for (size_t i = 0; i < result.coordinates.size(); i++) + for (size_t i = 0; i < result.coordinates.size(); i++) { vts[i].setValue(result.coordinates[i].x, result.coordinates[i].y, ViewProviderSketchCoinAttorney::getViewOrientationFactor(viewProvider) * drawingParameters.zInfo); + } - for (size_t i = 0; i < result.indices.size(); i++) + for (size_t i = 0; i < result.indices.size(); i++) { index[i] = result.indices[i]; + } polygoncoords->point.finishEditing(); polygonlineset->numVertices.finishEditing(); @@ -361,8 +377,9 @@ void EditModeInformationOverlayCoinConverter::setText(const std::string& string, else { assert(line > 1); SoMFString label; - for (int l = 0; l < (line - 1); l++) + for (int l = 0; l < (line - 1); l++) { label.set1Value(l, SbString("")); + } label.set1Value(line - 1, SbString(string.c_str())); text->string = label; @@ -426,10 +443,12 @@ void EditModeInformationOverlayCoinConverter::addNode(const Result& result) // // This could be made into a more generic form, but it is probably not worth the effort // at this time. - if constexpr (Result::calculationType == CalculationType::BSplinePoleWeight) + if constexpr (Result::calculationType == CalculationType::BSplinePoleWeight) { setText<2>(result.strings[i], text); - else + } + else { setText(result.strings[i], text); + } sep->addChild(mat); sep->addChild(font); @@ -487,9 +506,10 @@ void EditModeInformationOverlayCoinConverter::updateNode(const Result& result) for (size_t i = 0; i < result.strings.size(); i++) { SoSwitch* sw = static_cast(infoGroup->getChild(nodeId)); - if (overlayParameters.visibleInformationChanged) + if (overlayParameters.visibleInformationChanged) { sw->whichChild = isVisible() ? SO_SWITCH_ALL : SO_SWITCH_NONE; + } SoSeparator* sep = static_cast(sw->getChild(0)); @@ -507,14 +527,16 @@ void EditModeInformationOverlayCoinConverter::updateNode(const Result& result) // // This could be made into a more generic form, but it is probably not worth the effort // at this time. - if constexpr (Result::calculationType == CalculationType::BSplinePoleWeight) + if constexpr (Result::calculationType == CalculationType::BSplinePoleWeight) { setText<2>(result.strings[i], static_cast( sep->getChild(static_cast(TextNodePosition::TextInformation)))); - else + } + else { setText(result.strings[i], static_cast( sep->getChild(static_cast(TextNodePosition::TextInformation)))); + } nodeId++; } @@ -523,8 +545,9 @@ void EditModeInformationOverlayCoinConverter::updateNode(const Result& result) SoSwitch* sw = static_cast(infoGroup->getChild(nodeId)); - if (overlayParameters.visibleInformationChanged) + if (overlayParameters.visibleInformationChanged) { sw->whichChild = isVisible() ? SO_SWITCH_ALL : SO_SWITCH_NONE; + } SoSeparator* sep = static_cast(sw->getChild(0)); diff --git a/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.h b/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.h index c74f636228..9eb94ef3c0 100644 --- a/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.h +++ b/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.h @@ -34,7 +34,7 @@ template class Vector3; class Vector2d; -}// namespace Base +} // namespace Base namespace Part { @@ -154,7 +154,8 @@ public: * @param overlayparameters: Parameters for controlling the overlay * @param drawingparameters: Parameters for drawing the overlay information */ - EditModeInformationOverlayCoinConverter(ViewProviderSketch& vp, SoGroup* infogroup, + EditModeInformationOverlayCoinConverter(ViewProviderSketch& vp, + SoGroup* infogroup, OverlayParameters& overlayparameters, DrawingParameters& drawingparameters); @@ -214,7 +215,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_InformationOverlayCoinConverter_H +#endif // SKETCHERGUI_InformationOverlayCoinConverter_H diff --git a/src/Mod/Sketcher/Gui/GeometryCreationMode.h b/src/Mod/Sketcher/Gui/GeometryCreationMode.h index 60f059be63..940f341bcc 100644 --- a/src/Mod/Sketcher/Gui/GeometryCreationMode.h +++ b/src/Mod/Sketcher/Gui/GeometryCreationMode.h @@ -33,4 +33,4 @@ enum GeometryCreationMode }; } -#endif// SKETCHERGUI_GEOMETRYCREATIONMODE_H +#endif // SKETCHERGUI_GEOMETRYCREATIONMODE_H diff --git a/src/Mod/Sketcher/Gui/PreCompiled.h b/src/Mod/Sketcher/Gui/PreCompiled.h index d0e9863c9b..a194183e87 100644 --- a/src/Mod/Sketcher/Gui/PreCompiled.h +++ b/src/Mod/Sketcher/Gui/PreCompiled.h @@ -80,6 +80,6 @@ #include #endif -#endif//_PreComp_ +#endif //_PreComp_ -#endif// __PRECOMPILED_GUI__ +#endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/Sketcher/Gui/PropertyConstraintListItem.cpp b/src/Mod/Sketcher/Gui/PropertyConstraintListItem.cpp index d428ac6a96..d2179d90d1 100644 --- a/src/Mod/Sketcher/Gui/PropertyConstraintListItem.cpp +++ b/src/Mod/Sketcher/Gui/PropertyConstraintListItem.cpp @@ -54,8 +54,9 @@ QVariant PropertyConstraintListItem::toString(const QVariant& prop) const QTextStream out(&str); out << "["; for (QList::const_iterator it = value.begin(); it != value.end(); ++it) { - if (it != value.begin()) + if (it != value.begin()) { out << ";"; + } out << it->getUserString(); } out << "]"; @@ -75,7 +76,7 @@ void PropertyConstraintListItem::initialize() for (std::vector::const_iterator it = vals.begin(); it != vals.end(); ++it, ++id) { - if ((*it)->Type == Sketcher::Distance ||// Datum constraint + if ((*it)->Type == Sketcher::Distance || // Datum constraint (*it)->Type == Sketcher::DistanceX || (*it)->Type == Sketcher::DistanceY || (*it)->Type == Sketcher::Radius || (*it)->Type == Sketcher::Diameter || (*it)->Type == Sketcher::Angle) { @@ -146,8 +147,9 @@ void PropertyConstraintListItem::assignProperty(const App::Property* prop) // Hint: When renaming a constraint that was unnamed before then it can happen that // a constraint appears twice in the property editor, one time in this group and a // second time inside the Unnamed group - if (!prop->getTypeId().isDerivedFrom(Sketcher::PropertyConstraintList::getClassTypeId())) + if (!prop->getTypeId().isDerivedFrom(Sketcher::PropertyConstraintList::getClassTypeId())) { return; + } const Sketcher::PropertyConstraintList* list = static_cast(prop); @@ -173,7 +175,7 @@ void PropertyConstraintListItem::assignProperty(const App::Property* prop) for (std::vector::const_iterator it = vals.begin(); it != vals.end(); ++it, ++id) { - if ((*it)->Type == Sketcher::Distance ||// Datum constraint + if ((*it)->Type == Sketcher::Distance || // Datum constraint (*it)->Type == Sketcher::DistanceX || (*it)->Type == Sketcher::DistanceY || (*it)->Type == Sketcher::Radius || (*it)->Type == Sketcher::Diameter || (*it)->Type == Sketcher::Angle) { @@ -199,8 +201,9 @@ void PropertyConstraintListItem::assignProperty(const App::Property* prop) } else { // search inside this item - if (namedIndex < numNamed) + if (namedIndex < numNamed) { child = dynamic_cast(this->child(namedIndex)); + } if (!child) { child = static_cast(PropertyUnitItem::create()); @@ -252,7 +255,7 @@ QVariant PropertyConstraintListItem::value(const App::Property* prop) const static_cast(prop)->getValues(); for (std::vector::const_iterator it = vals.begin(); it != vals.end(); ++it, ++id) { - if ((*it)->Type == Sketcher::Distance ||// Datum constraint + if ((*it)->Type == Sketcher::Distance || // Datum constraint (*it)->Type == Sketcher::DistanceX || (*it)->Type == Sketcher::DistanceY || (*it)->Type == Sketcher::Radius || (*it)->Type == Sketcher::Diameter || (*it)->Type == Sketcher::Angle) { @@ -335,7 +338,7 @@ bool PropertyConstraintListItem::event(QEvent* ev) for (std::vector::const_iterator it = vals.begin(); it != vals.end(); ++it, ++id) { - if ((*it)->Type == Sketcher::Distance ||// Datum constraint + if ((*it)->Type == Sketcher::Distance || // Datum constraint (*it)->Type == Sketcher::DistanceX || (*it)->Type == Sketcher::DistanceY || (*it)->Type == Sketcher::Radius || (*it)->Type == Sketcher::Diameter || (*it)->Type == Sketcher::Angle) { @@ -344,8 +347,9 @@ bool PropertyConstraintListItem::event(QEvent* ev) QString internalName = QString::fromLatin1("Constraint%1").arg(id + 1); if (internalName == propName) { double datum = quant.getValue(); - if ((*it)->Type == Sketcher::Angle) + if ((*it)->Type == Sketcher::Angle) { datum = Base::toRadians(datum); + } std::unique_ptr copy((*it)->clone()); copy->setValue(datum); item->set1Value(id, copy.get()); @@ -365,7 +369,8 @@ void PropertyConstraintListItem::setValue(const QVariant& value) Q_UNUSED(value); } -QWidget* PropertyConstraintListItem::createEditor(QWidget* parent, const QObject* receiver, +QWidget* PropertyConstraintListItem::createEditor(QWidget* parent, + const QObject* receiver, const char* method) const { Q_UNUSED(receiver); diff --git a/src/Mod/Sketcher/Gui/PropertyConstraintListItem.h b/src/Mod/Sketcher/Gui/PropertyConstraintListItem.h index 23315b01cc..77b7ec29f8 100644 --- a/src/Mod/Sketcher/Gui/PropertyConstraintListItem.h +++ b/src/Mod/Sketcher/Gui/PropertyConstraintListItem.h @@ -38,8 +38,8 @@ class PropertyConstraintListItem: public Gui::PropertyEditor::PropertyItem ~PropertyConstraintListItem() override; void assignProperty(const App::Property* prop) override; - QWidget* createEditor(QWidget* parent, const QObject* receiver, - const char* method) const override; + QWidget* + createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; void setEditorData(QWidget* editor, const QVariant& data) const override; QVariant editorData(QWidget* editor) const override; @@ -57,7 +57,7 @@ protected: bool onlyUnnamed; }; -}// namespace SketcherGui +} // namespace SketcherGui #endif diff --git a/src/Mod/Sketcher/Gui/PropertyVisualLayerList.h b/src/Mod/Sketcher/Gui/PropertyVisualLayerList.h index 0fe2091525..ed4cd1c47d 100644 --- a/src/Mod/Sketcher/Gui/PropertyVisualLayerList.h +++ b/src/Mod/Sketcher/Gui/PropertyVisualLayerList.h @@ -72,7 +72,7 @@ protected: VisualLayer getPyValue(PyObject*) const override; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_PropertyVisualLayerList_H +#endif // SKETCHERGUI_PropertyVisualLayerList_H diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts index b69b490c7f..6952356310 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy - + Copy the geometry of another sketch @@ -100,27 +100,27 @@ - + Show/hide B-spline degree - + Show/hide B-spline control polygon - + Show/hide B-spline curvature comb - + Show/hide B-spline knot multiplicity - + Show/hide B-spline control point weight @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle - + Constrain an arc or a circle - + Constrain radius - + Constrain diameter - + Constrain auto radius/diameter @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc - + Create an arc in the sketcher - + Center and end points - + End points and rim point @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline - + Create a B-spline in the sketch @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle - + Create a circle in the sketcher - + Center and rim point - + 3 rim points @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic - + Create a conic in the sketch - + Ellipse by center, major radius, point - + Ellipse by periapsis, apoapsis, minor radius - + Arc of ellipse by center, major radius, endpoints - + Arc of hyperbola by center, major radius, endpoints - + Arc of parabola by focus, vertex, endpoints @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet - + Create a fillet between two lines - + Sketch fillet - + Constraint-preserving sketch fillet @@ -299,17 +299,17 @@ - + Rectangle - + Centered rectangle - + Rounded rectangle @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon - + Create a regular polygon in the sketcher - + Triangle - + Square - + Pentagon - + Hexagon - + Heptagon - + Octagon - + Regular polygon @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity - + Modifies the multiplicity of the selected knot of a B-spline - + Increase knot multiplicity - + Decrease knot multiplicity @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle - + Fix the angle of a line or the angle between two lines @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block - + Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter - + Fix the diameter of a circle or an arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance - + Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance - + Fix the horizontal distance between two points or line ends @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance - + Fix the vertical distance between two points or line ends @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal - + Create an equality constraint between two lines or between circles and arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally - + Create a horizontal constraint on the selected item @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock - + Create both a horizontal and a vertical distance constraint on the selected vertex @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel - + Create a parallel constraint between two lines @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular - + Create a perpendicular constraint between two lines @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object - + Fix a point onto an object @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. @@ -598,12 +598,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical - + Create a symmetry constraint between two points with respect to a line or a third point @@ -612,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent - + Create a tangent constraint between two entities @@ -625,12 +625,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically - + Create a vertical constraint on the selected item @@ -638,12 +638,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline - + Converts the selected geometry to a B-spline @@ -664,12 +664,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points - + Create an arc by its end points and a point along the arc @@ -677,12 +677,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points - + Create a circle by 3 perimeter points @@ -690,12 +690,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center - + Create an arc by its center and by its end points @@ -703,12 +703,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse - + Create an arc of ellipse in the sketch @@ -716,12 +716,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola - + Create an arc of hyperbola in the sketch @@ -729,12 +729,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola - + Create an arc of parabola in the sketch @@ -742,12 +742,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline - + Create a B-spline by control points in the sketch. @@ -755,12 +755,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle - + Create a circle in the sketch @@ -768,12 +768,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points - + Create an ellipse by 3 points in the sketch @@ -781,12 +781,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center - + Create an ellipse by center in the sketch @@ -794,12 +794,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet - + Create a fillet between two lines or at a coincident point @@ -807,12 +807,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon - + Create a heptagon in the sketch @@ -820,12 +820,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon - + Create a hexagon in the sketch @@ -859,12 +859,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon - + Create an octagon in the sketch @@ -872,12 +872,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon - + Create a pentagon in the sketch @@ -885,12 +885,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline - + Create a periodic B-spline by control points in the sketch. @@ -898,12 +898,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point - + Create a point in the sketch @@ -911,12 +911,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet - + Fillet that preserves intersection point and most constraints @@ -924,12 +924,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline - + Create a polyline in the sketch. 'M' Key cycles behaviour @@ -963,12 +963,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon - + Create a regular polygon in the sketch @@ -976,12 +976,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot - + Create a slot in the sketch @@ -989,12 +989,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square - + Create a square in the sketch @@ -1002,12 +1002,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle - + Create an equilateral triangle in the sketch @@ -1015,12 +1015,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree - + Decreases the degree of the B-spline @@ -1028,12 +1028,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity - + Decreases the multiplicity of the selected knot of a B-spline @@ -1080,12 +1080,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge - + Extend an edge with respect to the picked position @@ -1093,12 +1093,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry - + Create an edge linked to an external geometry @@ -1106,12 +1106,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree - + Increases the degree of the B-spline @@ -1119,12 +1119,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity - + Increases the multiplicity of the selected knot of a B-spline @@ -1132,12 +1132,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1145,12 +1145,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves - + Join two curves at selected end points @@ -1432,12 +1432,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge - + Splits an edge into two while preserving constraints @@ -1458,12 +1458,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space - + Switches the selected constraints or the view to the other virtual space @@ -1484,12 +1484,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint - + Activates or deactivates the selected constraints @@ -1510,12 +1510,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode @@ -1524,12 +1524,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge - + Trim an edge with respect to the picked position @@ -1587,369 +1587,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint - - - + + + Add horizontal alignment - - + + Add vertical constraint - + Add vertical alignment - + Add 'Lock' constraint - + Add relative 'Lock' constraint - + Add fixed constraint - + Add 'Block' constraint - + Add block constraint - - - + + + Add coincident constraint - - + + Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint - - + + Add point to point distance constraint - - - + + + Add point to line Distance constraint - - + + Add circle to circle distance constraint - + Add circle to line distance constraint - - - - - + + + + + + Add length constraint - - + + Dimension - + Add lock constraint - + Add 'Distance to origin' constraint - - - + + + Add Distance constraint - - - + + + Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints - - + + Add Symmetry constraint - - + + Add Symmetry constraints - - + + Add Distance constraints - + Add Horizontal constraint - + Add Vertical constraint - + Add Block constraint - + Add Angle constraint - - - + + + Add Equality constraint - + Add Equality constraints - + Add Radius constraint - + Add concentric and length constraint - + Add DistanceX constraint - + Add DistanceY constraint - + Add point to circle Distance constraint - - + + Add point on object constraint - - + + Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint - + Add fixed y-coordinate constraint - - + + Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint - + Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point - - - - + + + + Add radius constraint - - - - + + + + Add diameter constraint - - - - + + + + Add radiam constraint - - - - - - + + + + + + Add angle constraint - - + + Add equality constraint - - - - - + + + + + Add symmetric constraint - + Add Snell's law constraint - + Toggle constraint to driving/reference - + Activate/Deactivate constraint @@ -2009,44 +2010,44 @@ invalid constraints, degenerated geometry, etc. - + Add rounded rectangle - + Add line to sketch wire - + Add arc to sketch wire - - + + Add sketch arc - - + + Add sketch circle - + Add sketch ellipse - + Add sketch arc of ellipse - + Add sketch arc of hyperbola @@ -2066,33 +2067,33 @@ invalid constraints, degenerated geometry, etc. - - + + Create fillet - + Trim edge - + Extend edge - + Split edge - + Add external geometry - + Add slot @@ -2102,37 +2103,37 @@ invalid constraints, degenerated geometry, etc. - + Convert to NURBS - + Increase spline degree - + Decrease spline degree - + Increase knot multiplicity - + Decrease knot multiplicity - + Insert knot - + Join Curves @@ -2172,12 +2173,12 @@ invalid constraints, degenerated geometry, etc. - + Toggle constraints to the other virtual space - + @@ -2185,7 +2186,7 @@ invalid constraints, degenerated geometry, etc. - + Add auto constraints @@ -2225,7 +2226,7 @@ invalid constraints, degenerated geometry, etc. - + Create a carbon copy @@ -2241,37 +2242,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. - + Autoconstrain error: Unsolvable sketch without constraints. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. @@ -2396,143 +2397,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2548,9 +2549,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection @@ -2571,329 +2572,329 @@ invalid constraints, degenerated geometry, etc. - + Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. - - + + Select an edge from the sketch. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint - - - - + + + + The selected edge is not a line segment. - - - - - - + + + + + + Double constraint - - - - - + + + + + The selected edge already has a horizontal constraint! - - - + + + The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! - + The selected item(s) can't accept a horizontal constraint! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! - + The selected item(s) can't accept a vertical constraint! - - - + + + Select vertices from the sketch. - + Select one vertex from the sketch other than the origin. - + Select only vertices from the sketch. The last selected vertex may be the origin. - + Wrong solver status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. - + Select only edges from the sketch. - + Number of selected objects is not 3 - - - + + + Error - + Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. - + Select two or more points from the sketch. - + Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. - + Cannot add a length constraint on an axis! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. - - - - + + + + Select exactly one line or up to two points from the sketch. - + Cannot add a horizontal length constraint on an axis! - + Cannot add a fixed x-coordinate constraint on the origin point! - - + + This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! - + Cannot add a fixed y-coordinate constraint on the origin point! - + Select two or more lines from the sketch. - - + + Select at least two lines from the sketch. - + Select a valid line. - - + + The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2901,42 +2902,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c - + Select some geometry from the sketch. perpendicular constraint - - + + Cannot add a perpendicularity constraint at an unconnected point! - - - + + + Perpendicular to B-spline edge currently unsupported. - - + + One of the selected edges should be a line. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2944,277 +2945,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c - + Select some geometry from the sketch. tangent constraint - - - + + + Cannot add a tangency constraint at an unconnected point! - - + + Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! - - + + With 3 objects, there must be 2 curves and 1 point. - - - + + + Tangency to B-spline edge currently unsupported. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. - - + + Select one or two lines from the sketch. Or select two edges and a point. - - + + Parallel lines - - + + An angle constraint cannot be set for two parallel lines. - + Cannot add an angle constraint on an axis! - + Select two edges from the sketch. - + Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. - - - - + + + + Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. - - + + Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw - + Selected objects are not just geometry from one sketch. - + Cannot create constraint with external geometry only. - + Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. - + B-Spline Degree - + Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error - + None of the selected elements is an edge. - - + + At least one of the selected objects was not a B-Spline and was ignored. - - + + The selection comprises more than one item. Please select just one knot. - - + + Input Error - - + + None of the selected elements is a knot of a B-spline - - + + Selection is empty - + Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. - + Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point - + Two end points, or coincident point should be selected. @@ -3294,17 +3295,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c - + Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error @@ -3618,12 +3619,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c - + Refractive index ratio - + Ratio n2/n1: @@ -3903,8 +3904,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed @@ -4133,8 +4134,8 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4153,32 +4154,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always - + Single tool - + Separated tools - + Both - + Auto - + Diameter - + Radius @@ -4619,12 +4620,12 @@ Then objects are only visible behind the sketch plane. - + Unexpected C++ exception - + Sketcher @@ -4632,55 +4633,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences - + No missing coincidences found - + Missing coincidences - + %1 missing coincidences found - + No invalid constraints - + No invalid constraints found - + Invalid constraints - + Invalid constraints found - - - + + + Reversed external geometry - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4689,82 +4690,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. - + No reversed external-geometry arcs were found. - + %1 changes were made to constraints linking to endpoints of reversed arcs. - - + + Constraint orientation locking - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. - - + + Delete constraints to external geom. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? - + All constraints that deal with external geometry were deleted. - + No degenerated geometry - + No degenerated geometry found - + Degenerated geometry - + %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - - Check to toggle filters @@ -4839,11 +4835,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - - Check to toggle filters @@ -5029,7 +5020,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control @@ -5317,8 +5308,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines @@ -5326,8 +5317,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline @@ -5335,8 +5326,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines @@ -5344,8 +5335,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline @@ -5353,8 +5344,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines @@ -5362,8 +5353,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines @@ -5371,8 +5362,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines @@ -5407,8 +5398,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc @@ -5416,7 +5407,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc @@ -5424,8 +5415,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc @@ -5433,7 +5424,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc @@ -5450,8 +5441,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc @@ -5459,8 +5450,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points @@ -5468,8 +5459,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points @@ -5477,8 +5468,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints @@ -5486,8 +5477,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints @@ -5495,8 +5486,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints @@ -5504,13 +5495,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points - - + + Create a B-spline by control points @@ -5518,8 +5509,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point @@ -5527,8 +5518,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius @@ -5536,8 +5527,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point @@ -5545,8 +5536,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines @@ -5554,8 +5545,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner @@ -5563,8 +5554,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner @@ -5572,7 +5563,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle @@ -5580,14 +5571,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner - - + + Create a regular polygon by its center and by one corner @@ -5595,8 +5586,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner @@ -5604,8 +5595,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point @@ -5613,7 +5604,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle @@ -5621,7 +5612,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle @@ -5629,8 +5620,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner @@ -5638,8 +5629,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner @@ -5647,13 +5638,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points - - + + Create a periodic B-spline by control points @@ -6276,36 +6267,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error @@ -6325,45 +6316,45 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - - - - - + + + + + + + + + + Invalid Constraint - - - + + + Failed to add arc - + Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola - + Cannot create arc of parabola @@ -6373,18 +6364,18 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Error creating B-spline pole - - + + Error creating B-spline - + Error deleting last pole @@ -6394,49 +6385,49 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Cannot add internal alignment points - + Error removing knot - + Failed to add carbon copy - - + + Failed to add circle - + Failed to add an ellipse - + Failed to extend edge - + Failed to add external geometry - + Failed to create fillet - + Failed to add line @@ -6446,7 +6437,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add polygon @@ -6456,27 +6447,27 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add rounded rectangle - + Failed to add slot - + Failed to add edge - + Failed to trim edge - + Value Error @@ -6486,13 +6477,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots - - + + Create a B-spline by knots @@ -6500,13 +6491,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots - - + + Create a periodic B-spline by knots @@ -6611,12 +6602,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6624,12 +6615,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6637,12 +6628,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6652,14 +6643,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + + + + + Dimension tools. + + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts index a967d85d00..44e0683168 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Стварыць дакладную копію - + Copy the geometry of another sketch Скапіраваць геаметрыю іншага эскіза @@ -100,27 +100,27 @@ Паказаць/схаваць інфармацыйны пласт B-сплайна - + Show/hide B-spline degree Паказаць/схаваць ступень B-сплайна - + Show/hide B-spline control polygon Паказаць/схаваць палігон кіравання B-сплайна - + Show/hide B-spline curvature comb Паказаць/схаваць грабянец крывізні B-сплайна - + Show/hide B-spline knot multiplicity Паказаць/схаваць кратнасць вузлоў B-сплайна - + Show/hide B-spline control point weight Паказаць/схаваць вагу кантрольнай кропкі B-сплайна @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Абмежаванне дугі альбо акружнасці - + Constrain an arc or a circle Абмежаванне дугі альбо акружнасці - + Constrain radius Абмежаванне радыуса - + Constrain diameter Абмежаванне дыяметра - + Constrain auto radius/diameter Аўтаматычнае абмежаванне радыуса/дыяметра @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Стварыць дугу - + Create an arc in the sketcher Стварыць дугу ў варштаце эскізу - + Center and end points Па цэнтральнай і канчатковым кропкам - + End points and rim point Па канчатковым і датычнай кропцы @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Стварыць B-сплайн - + Create a B-spline in the sketch Стварыць B-сплайн на эскізе @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Стварыць акружнасць - + Create a circle in the sketcher Стварыць акружнасць у варштаце эскізу - + Center and rim point Па цэнтру і датычнай кропцы - + 3 rim points Па тром кропкам @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Стварыць канічную - + Create a conic in the sketch Стварыць канічную на эскізе - + Ellipse by center, major radius, point Эліпс па цэнтральнай кропцы, вялікай паўвосі, кропцы - + Ellipse by periapsis, apoapsis, minor radius Эліпс па перыцэнтру, апацэнтру, малой паўвосі - + Arc of ellipse by center, major radius, endpoints Дуга эліпсу па цэнтральнай кропцы, вялікай паўвосі, канчатковым кропкам - + Arc of hyperbola by center, major radius, endpoints Дуга гіпербалы па цэнтры, вялікай паўвосі, канчатковым кропкам - + Arc of parabola by focus, vertex, endpoints Дуга парабалы па фокусу, вяршыні, канчатковым кропкам @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Стварыць акругленне - + Create a fillet between two lines Сварыць акругленне паміж дзвюма лініямі - + Sketch fillet Акругленне - + Constraint-preserving sketch fillet Акругленне эскіза з захаваннем абмежаванняў @@ -299,17 +299,17 @@ Стварае прастакутнік на эскізе - + Rectangle Прастакутнік - + Centered rectangle Цэнтраваны прастакутнік - + Rounded rectangle Закруглены прастакутнік @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Стварыць правільны шматкутнік - + Create a regular polygon in the sketcher Стварыць правільны шматкутнік у варштаце эскізу - + Triangle Трыкутнік - + Square Квадрат - + Pentagon Пяцікутнік - + Hexagon Шасцікутнік - + Heptagon Сямікутнік - + Octagon Васьмікутнік - + Regular polygon Правільны шматкутнік @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Змена кратнасці вузлоў - + Modifies the multiplicity of the selected knot of a B-spline Змена кратнасці абранага вузла B-сплайна - + Increase knot multiplicity Павялічвае кратнасць вузлоў - + Decrease knot multiplicity Памяншае кратнасць вузлоў @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Абмежаванне вугла - + Fix the angle of a line or the angle between two lines Фіксаваць вугал лініі ці вугал паміж дзвюма лініямі @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Абмежаванне руху - + Block the selected edge from moving Абмежаваць рух абранага рабра @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Абмежаванне накладання кропак - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Стварыць абмежаванне супадзення паміж кропкамі, ці канцэнтрычнае абмежаванне паміж акружнасцямі, дугамі і эліпсамі @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Абмежаванне дыяметра - + Fix the diameter of a circle or an arc Задаць дыяметр акружнасці ці дугі @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Абмежаванне адлегласці - + Fix a length of a line or the distance between a line and a vertex or between two circles Задаць даўжыню лініі, альбо адлегласць паміж лініяй і вяршыняй, альбо паміж дзвюма акружнасцямі @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Абмежаванне гарызантальнай адлегласці - + Fix the horizontal distance between two points or line ends Задаць адлегласць па гарызанталі паміж дзвюма кропкамі ці канцамі лініі @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Абмежаванне вертыкальнай адлегласці - + Fix the vertical distance between two points or line ends Задаць вертыкальную адлегласць паміж дзвюма кропкамі ці канцамі лініі @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Абмежаванне роўнасцю - + Create an equality constraint between two lines or between circles and arcs Стварыць абмежаванне роўнасці паміж дзвюма лініямі ці паміж акружнасцямі і дугамі @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Абмежаванне гарызантальнасці - + Create a horizontal constraint on the selected item Стварыць абмежаванне гарызантальнасці для абранага элемента @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Абмежаванне блакавання - + Create both a horizontal and a vertical distance constraint on the selected vertex Стварыць абмежаванне адлегласці па гарызанталі і вертыкалі для абранай вяршыні @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Абмежаванне паралельнасці - + Create a parallel constraint between two lines Стварыць паралельнае абмежаванне паміж дзвюма лініямі @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Абмежаванне перпендыкулярнасці - + Create a perpendicular constraint between two lines Стварыць перпендыкулярнае абмежаванне паміж дзвюма адрэзкамі @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Абмежаваць кропку на аб'екце - + Fix a point onto an object Прывязаць кропку да аб'екта @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Аўтаматычнае абмежаванне радыуса/дыяметра - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Задаць дыяметр, калі абрана акружнасць, альбо радыус, калі абраны полюс дугі/сплайну @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Абмежаванне радыуса ці вагі - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Задаць радыус акружнасці ці дугі альбо задаць вагу полюса B-сплайна @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Абмежаванне праламлення (закон Снеліуса) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Стварыць абмежаванне па закону праламлення свету (закон Снеліуса) паміж дзвюма канчатковымі кропкамі прамянёў і рабром у якасці мяжы падзелу асяроддзя. @@ -598,12 +598,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Абмежаванне сіметрычнасці - + Create a symmetry constraint between two points with respect to a line or a third point Стварыць абмежаванне сіметрыі паміж дзвюма кропкамі адносна лініі ці трэцяй кропкі @@ -612,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Абмежаванне датычнай - + Create a tangent constraint between two entities Стварыць датычнае абмежаванне паміж дзвюма сутнасцямі @@ -625,12 +625,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Абмежаванне вертыкальнасці - + Create a vertical constraint on the selected item Стварыць абмежаванне вертыкальнасці для абранага элемента @@ -638,12 +638,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Пераўтварыць геаметрыю ў B-сплайн - + Converts the selected geometry to a B-spline Пераўтварыць абраную геаметрыю ў B-сплайн @@ -664,12 +664,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Стварыць дугу па трох кропках - + Create an arc by its end points and a point along the arc Стварыць дугу па яе канчатковым кропках і кропку наўздоўж дугі @@ -677,12 +677,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Стварыць акружнасць па трох кропках - + Create a circle by 3 perimeter points Стварыць акружнасць па трох кропках перыметра @@ -690,12 +690,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Стварыць дугу па цэнтральнай кропцы - + Create an arc by its center and by its end points Стварыць дугу па яе цэнтральнай кропцы і канчатковых кропках @@ -703,12 +703,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Стварыць эліптычную дугу - + Create an arc of ellipse in the sketch Стварыць дугу эліпса на эскізе @@ -716,12 +716,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Стварыць гіпербалічную дугу - + Create an arc of hyperbola in the sketch Стварыць дугу гіпербалы на эскізе @@ -729,12 +729,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Стварыць парабалічную дугу - + Create an arc of parabola in the sketch Стварыць дугу парабалы на эскізе @@ -742,12 +742,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Стварыць B-сплайн - + Create a B-spline by control points in the sketch. Стварыць B-сплайн па кантрольных кропках на эскізе. @@ -755,12 +755,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Стварыць акружнасць - + Create a circle in the sketch Стварыць акружнасць на эскізе @@ -768,12 +768,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Стварыць эліпс па трох кропках - + Create an ellipse by 3 points in the sketch Стварыць эліпс па трох кропкам на эскізе @@ -781,12 +781,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Стварыць эліпс па цэнтральнай кропцы - + Create an ellipse by center in the sketch Стварыць эліпс па цэнтральнай кропцы на эскізе @@ -794,12 +794,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Стварыць акругленне - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -807,12 +807,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Стварыць сямікутнік - + Create a heptagon in the sketch Стварыць сямікутнік на эскізе @@ -820,12 +820,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Стварыць шасцікутнік - + Create a hexagon in the sketch Стварыць шасцікутнік на эскізе @@ -859,12 +859,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Стварыць васьмікутнік - + Create an octagon in the sketch Стварыць васьмікутнік на эскізе @@ -872,12 +872,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Стварыць пяцікутнік - + Create a pentagon in the sketch Стварыць пяцікутнік на эскізе @@ -885,12 +885,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Стварыць перыядычны B-сплайн - + Create a periodic B-spline by control points in the sketch. Стварыць перыядычны B-сплайн па кантрольных кропках на эскізе. @@ -898,12 +898,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Стварыць кропку - + Create a point in the sketch Стварыць кропку на эскізе @@ -911,12 +911,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Стварыць акругленне з захаванне кропкі скрыжавання - + Fillet that preserves intersection point and most constraints Акругленне, якое захоўвае кропку скрыжавання і большасці абмежаванняў @@ -924,12 +924,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Стварыць ломаную лінію - + Create a polyline in the sketch. 'M' Key cycles behaviour Стварыць ломаную лінію на эскізе. Клавіша 'М' - змена рэжыму @@ -963,12 +963,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Стварыць правільны шматкутнік - + Create a regular polygon in the sketch Стварыць правільны шматкутнік на эскізе @@ -976,12 +976,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Стварыць паз - + Create a slot in the sketch Стварыць паз на эскізе @@ -989,12 +989,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Стварыць квадрат - + Create a square in the sketch Стварыць квадрат на эскізе @@ -1002,12 +1002,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Стварыць роўнабаковы трыкутнік - + Create an equilateral triangle in the sketch Стварыць роўнабаковы трыкутнік на эскізе @@ -1015,12 +1015,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Паменшыць ступень B-сплайна - + Decreases the degree of the B-spline Памяншае ступень B-сплайна @@ -1028,12 +1028,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Памяншае кратнасць вузлоў - + Decreases the multiplicity of the selected knot of a B-spline Памяншае кратнасць абранага вузла B-сплайна @@ -1080,12 +1080,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Выцягнуць рабро - + Extend an edge with respect to the picked position Выцягнуць рабро адносна абранага становішча @@ -1093,12 +1093,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Стварыць вонкавую геаметрыю - + Create an edge linked to an external geometry Стварыць рабро, звязанае з вонкавай геаметрыяй @@ -1106,12 +1106,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Павялічыць ступень B-сплайна - + Increases the degree of the B-spline Павялічвае ступень B-сплайна @@ -1119,12 +1119,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Павялічвае кратнасць вузлоў - + Increases the multiplicity of the selected knot of a B-spline Павялічвае кратнасць абранага вузла B-сплайна @@ -1132,12 +1132,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Уставіць вузел - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Уставіць вузел па зададзеным наладах. Калі вузел ужо існуе з гэтымі наладамі, яго кратнасць павялічваецца на адзінку. @@ -1145,12 +1145,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Аб'яднаць крывыя - + Join two curves at selected end points Аб'яднаць дзве крывыя ў абраных канчатковых кропках @@ -1435,12 +1435,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Падзяліць рабро - + Splits an edge into two while preserving constraints Падзяліць рабро на дзве часткі з захаваннем абмежаванняў @@ -1461,12 +1461,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Пераключыць віртуальную прастору - + Switches the selected constraints or the view to the other virtual space Пераключае абраныя абмежаванні ці выгляд у іншую віртуальную прастору @@ -1487,12 +1487,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Задзейнічаць/адключыць абмежаванні - + Activates or deactivates the selected constraints Задзейнічае ці адключае абраныя абмежаванні @@ -1513,12 +1513,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Пераключыць кіруючае/апорнае абмежаванне - + Set the toolbar, or the selected constraints, into driving or reference mode Пераключае панэль інструментаў ці пераўтварае абраныя абмежаванні @@ -1528,12 +1528,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Абрэзаць рабро - + Trim an edge with respect to the picked position Абрэзаць рабро адносна абранага становішча @@ -1567,12 +1567,12 @@ invalid constraints, degenerated geometry, etc. View section - Прагляд перасеку + Выгляд перасеку When in edit mode, switch between section view and full view. - У рэжыме змены пераключыць прагляд паміж выглядам перасеку і поўным выглядам. + У рэжыме змены пераключыць выгляд паміж выглядам перасеку і поўным выглядам. @@ -1591,369 +1591,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Дадаць гарызантальныя абмежаванні - - - + + + Add horizontal alignment Дадаць гарызантальнае выраўноўванне - - + + Add vertical constraint Дадаць вертыкальныя абмежаванні - + Add vertical alignment Дадаць вертыкальнае выраўноўванне - + Add 'Lock' constraint Дадаць абмежаванне 'Блакаванне' - + Add relative 'Lock' constraint Дадаць адноснае абмежаванне 'Блакаванне' - + Add fixed constraint Дадаць фіксаванае абмежаванне - + Add 'Block' constraint Дадаць абмежаванне 'Абмежаванне' - + Add block constraint Дадаць абмежаванае абмежаванне - - - + + + Add coincident constraint Дадаць абмежаванне супадзення - - + + Add distance from horizontal axis constraint Дадаць абмежаванне адлегласці ад гарызантальнай восі - - + + Add distance from vertical axis constraint Дадаць абмежаванне адлегласці ад вертыкальнай восі - - + + Add point to point distance constraint Дадаць абмежаванне кропкі да адлегласці кропкі - - - + + + Add point to line Distance constraint Дадаць абмежаванне кропкі да адлегласці лініі - - + + Add circle to circle distance constraint Дадаць абмежаванне акружнасці да адлегласці акружнасці - + Add circle to line distance constraint Дадаць абмежаванне акружнасці да адлегласці акружнасці - - - - - + + + + + + Add length constraint Дадаць абмежаванне даўжыні - - + + Dimension Вымярэнне - + Add lock constraint - Add lock constraint + Дадаць абмежаванне блакавання - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Дадаць абмежаванне 'Адлегласць да пачатку каардынат' - - - + + + Add Distance constraint - Add Distance constraint + Дадаць абмежаванне адлегласці - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Дадаць абмежаванне 'Гарызантальнасць' - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Дадаць абмежаванне 'Вертыкальнасць' + + Add Symmetry constraint + Дадаць абмежаванне сіметрычнасці + + + + + Add Symmetry constraints + Дадаць абмежаванні сіметрычнасці + + + + + Add Distance constraints + Дадаць абмежаванні адлегласці + + + + Add Horizontal constraint + Дадаць абмежаванне гарызантальнасці + + + + Add Vertical constraint + Дадаць абмежаванне вертыкальнасці + + + Add Block constraint - Add Block constraint + Дадаць абмежаванне блакавання - + Add Angle constraint - Add Angle constraint + Дадаць абмежаванне вугла - - - + + + Add Equality constraint - Add Equality constraint + Дадаць абмежаванне роўнасці - + Add Equality constraints - Add Equality constraints + Дадаць абмежаванні роўнасці - + Add Radius constraint - Add Radius constraint + Дадаць абмежаванне радыусу - + Add concentric and length constraint - Add concentric and length constraint + Дадаць абмежаванне канцентрычнасці і даўжыні - + Add DistanceX constraint - Add DistanceX constraint + Дадаць абмежаванне адлегласці X - + Add DistanceY constraint - Add DistanceY constraint + Дадаць абмежаванне адлегласці Y - + Add point to circle Distance constraint - Add point to circle Distance constraint + Дадаць абмежаванне кропкі да адлегласці акружнасці - - + + Add point on object constraint Дадаць кропку на абмежаванне аб'екта - - + + Add point to point horizontal distance constraint Дадаць абмежаванне кропкі да адлегласці па гарызанталі - + Add fixed x-coordinate constraint Дадаць фіксаванае абмежаванне x-каардынаты - - + + Add point to point vertical distance constraint Дадаць абмежаванне кропкі да адлегласці па вертыкалі - + Add fixed y-coordinate constraint Дадаць фіксаванае абмежаванне y-каардынаты - - + + Add parallel constraint Дадаць абмежаванні паралельнасці - - - - - - - + + + + + + + Add perpendicular constraint Дадаць абмежаванні перпендыкуляру - + Add perpendicularity constraint Дадаць абмежаванні перпендыкулярнасці - + Swap coincident+tangency with ptp tangency Памяняць супадзенне+дотык з дотыкам кропка-кропка - + Swap PointOnObject+tangency with point to curve tangency Памяняць КропкаНаАб'еце+дотык з кропкай дотыку крывой - - - - - - - + + + + + + + Add tangent constraint Дадаць абмежаванне датычнай - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Дадаць абмежаванне датычнай да кропкі - - - - + + + + Add radius constraint Дадаць абмежаванне радыусу - - - - + + + + Add diameter constraint Дадаць абмежаванне дыяметру - - - - + + + + Add radiam constraint Дадаць абмежаванне радыусу/дыяметру - - - - - - + + + + + + Add angle constraint Дадаць абмежаванне кута - - + + Add equality constraint Дадаць абмежаванне роўнасці - - - - - + + + + + Add symmetric constraint Дадаць абмежаванне сіметрычнасці - + Add Snell's law constraint Дадаць абмежаванне па закону Снеліуса - + Toggle constraint to driving/reference Пераключае абмежаванне паміж кіруючым і апорным - + Activate/Deactivate constraint Задзейнічаць/Адключыць абмежаванне @@ -2013,44 +2014,44 @@ invalid constraints, degenerated geometry, etc. Дадаць цэнтраваны эскіз каробкі - + Add rounded rectangle Дадаць закруглены прастакутнік - + Add line to sketch wire Дадаць лінію да ломанай лініі эскіза - + Add arc to sketch wire Дадаць дугу да ломанай лініі эскіза - - + + Add sketch arc Дадаць эскіз дугі - - + + Add sketch circle Дадаць эскіз акружнасці - + Add sketch ellipse Дадаць эскіз эліпса - + Add sketch arc of ellipse Дадаць эскіз дугі эліпса - + Add sketch arc of hyperbola Дадаць эскіз дугі гіпербалы @@ -2070,33 +2071,33 @@ invalid constraints, degenerated geometry, etc. Дадаць эскіз кропкі - - + + Create fillet Стварыць акругленне - + Trim edge Абрэзаць рабро - + Extend edge Выцягнуць рабро - + Split edge Падзяліць рабро - + Add external geometry Дадаць вонкавую геаметрыю - + Add slot Дадаць паз @@ -2106,37 +2107,37 @@ invalid constraints, degenerated geometry, etc. Дадаць шасцікутнік - + Convert to NURBS Пераўтварыць у NURBS - + Increase spline degree Павялічыць ступень сплайна - + Decrease spline degree Паменшыць ступень сплайна - + Increase knot multiplicity Павялічвае кратнасць вузлоў - + Decrease knot multiplicity Памяншае кратнасць вузлоў - + Insert knot Уставіць вузел - + Join Curves Аб'яднаць Крывыя @@ -2176,12 +2177,12 @@ invalid constraints, degenerated geometry, etc. Выдаліць выраўноўванне восяў - + Toggle constraints to the other virtual space Пераключыць абмежаванні на іншую віртуальную прастору - + @@ -2189,7 +2190,7 @@ invalid constraints, degenerated geometry, etc. Абнавіць абмежаванне віртуальнай прасторы - + Add auto constraints Дадаць аўтаматычныя абмежаванні @@ -2229,7 +2230,7 @@ invalid constraints, degenerated geometry, etc. Дадаць вузлавую кропку - + Create a carbon copy Стварыць дакладную копію @@ -2245,37 +2246,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Памылка аўтаматычнага абмежавання: Невырашальны эскіз пры ўжыванні абмежаванняў супадзення. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Памылка аўтаматычнага абмежавання: Невырашальны эскіз пры ўжыванні вертыкальных/гарызантальных абмежаванняў. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Памылка аўтаматычнага абмежавання: Невырашальны эскіз пры ўжыванні абмежаванняў роўнасці. - + Autoconstrain error: Unsolvable sketch without constraints. Памылка аўтаматычнага абмежавання: Невырашальны эскіз без абмежаванняў. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Памылка аўтаматычнага абмежавання: Невырашальны эскіз пасля ўжывання гарызантальных і вертыкальных абмежаванняў. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Памылка аўтаматычнага абмежавання: Невырашальны эскіз пасля ўжывання абмежаванняў супадзення кропак. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Памылка аўтаматычнага абмежавання: Невырашальны эскіз пасля ўжывання абмежаванняў роўнасці. @@ -2400,143 +2401,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2552,9 +2553,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Няправільны выбар @@ -2575,329 +2576,329 @@ invalid constraints, degenerated geometry, etc. Памернае абмежаванне - + Cannot add a constraint between two external geometries. Не атрымалася дадаць абмежаванне паміж дзвюма вонкавымі геаметрыямі. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Не атрымалася дадаць абмежаванне паміж дзвюма фіксаванымі геаметрыямі. Фіксаваная геаметрыя ўключае вонкавую геаметрыю, абмежаваную геаметрыю, альбо спецыяльныя кропкі, такія як вузлавыя кропкі B-сплайну. - + Sketcher Constraint Substitution Замена абмежаванняў Варштата эскізу - + Keep notifying me of constraint substitutions Працягнуць апавяшчаць мяне аб зменах абмежаванняў - - - + + + Only sketch and its support are allowed to be selected. Дазволена абіраць толькі эскіз і яго падтрымку. - + One of the selected has to be on the sketch. Адзін з абраных павінен быць на эскізе. - - + + Select an edge from the sketch. Абраць рабро на эскізе. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Немагчымае абмежаванне - - - - + + + + The selected edge is not a line segment. Абранае рабро не з'яўляецца адрэзкам лініі. - - - - - - + + + + + + Double constraint Залішняе абмежаванне - - - - - + + + + + The selected edge already has a horizontal constraint! Абранае рабро ўжо мае гарызантальнае абмежаванне! - - - + + + The selected edge already has a vertical constraint! Абранае рабро ўжо мае вертыкальнае абмежаванне! - - - - - - + + + + + + The selected edge already has a Block constraint! Абранае рабро ўжо мае абмежаванне руху! - + The selected item(s) can't accept a horizontal constraint! Абраны элемент(-ы) не можа прымаць гарызантальнае абмежаванне! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Абрана некалькі фіксаваных кропак. Абярыце найбольш адну фіксаваную кропку! - + The selected item(s) can't accept a vertical constraint! Абраны элемент(-ы) не можа прымаць вертыкальнае абмежаванне! - - - + + + Select vertices from the sketch. Абраць вяршыню на эскізе. - + Select one vertex from the sketch other than the origin. Абраць адну вяршыню з эскіза, акрамя кропкі пачатку каардынат. - + Select only vertices from the sketch. The last selected vertex may be the origin. Абраць толькі вяршыні з эскіза. Апошняя абраная вяршыня можа быць кропкай пачатку каардынат. - + Wrong solver status Няправільны статус сродку рашэння - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Абмежаванае абмежаванне не можа быць дададзена, калі эскіз не вырашаны альбо мае залішнія і абмежаванні, якія канфліктуюць. - + Select one edge from the sketch. Абраць адно рабро на эскізе. - + Select only edges from the sketch. Абраць толькі рэбры на эскізе. - + Number of selected objects is not 3 Колькасць абраных аб'ектаў не 3 - - - + + + Error Памылка - + Unexpected error. More information may be available in the Report View. Нечаканая памылка. Больш падрабязная інфармацыя можа быць даступная ў Праглядзе справаздачы. - + Endpoint to endpoint tangency was applied instead. Замест канчатковай кропкі ўжыты дотык да канчатковай кропкі. - + Select two or more points from the sketch. Абраць дзве ці болей кропак на эскізе. - + Select two or more vertices from the sketch. Абраць дзве ці болей вяршыні на эскізе. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Абраць дзве ці болей вяршыні на эскізе для абмежавання супадзення альбо дзве ці болей акружнасцяў, эліпсаў, дуг або дуг эліпса для канцэнтрычнага абмежавання. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Абраць дзве вяршыні на эскізе для абмежавання супадзення альбо дзве акружнасці, эліпсаў, дуг або дуг эліпса для канцэнтрычнага абмежавання. - + Select exactly one line or one point and one line or two points from the sketch. Абраць на эскізе адну лінію, альбо адну кропку і адну лінію, альбо дзве кропкі. - + Cannot add a length constraint on an axis! Не атрымалася дадаць абмежаванне даўжыні на вось! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Абраць на эскізе адну лінію, альбо адну кропку і адну лінію, альбо дзве кропкі, альбо дзве акружнасці. - + This constraint does not make sense for non-linear curves. Абмежаванне не мае сэнсу для нелінейных крывых. - + Endpoint to edge tangency was applied instead. Замест канчатковай кропкі ўжыты дотык да рабра. - - - - - - - + + + + + + + Select the right things from the sketch. Абраць неабходныя аб'екты на эскізе. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Абраць рабро, якое не з'яўляецца вагой B-сплайна. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ні адна з абраных кропак не была абмежаваная адпаведнымі крывымі, таму што яны з'яўляюцца часткамі аднаго і таго ж элемента, таму што яны абодва з'яўляюцца вонкавай геаметрыяй альбо таму, што рабро не падыходзіць. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ні адна з абраных кропак не была абмежаваная адпаведнымі крывымі, альбо таму што яны з'яўляюцца часткамі аднаго і таго ж элемента, альбо таму што яны абодва з'яўляюцца вонкавай геаметрыяй. - - - - + + + + Select exactly one line or up to two points from the sketch. Абраць на эскізе адну лінію, альбо не болей дзвюх кропак. - + Cannot add a horizontal length constraint on an axis! Не атрымалася дадаць гарызантальнае абмежаванне даўжыні на вось! - + Cannot add a fixed x-coordinate constraint on the origin point! Не атрымалася дадаць фіксаванае абмежаванне каардынаты X да кропкі пачатку каардынат! - - + + This constraint only makes sense on a line segment or a pair of points. Абмежаванне мае сэнс толькі для адрэзка лініі ці пары кропак. - + Cannot add a vertical length constraint on an axis! Не атрымалася дадаць вертыкальнае абмежаванне даўжыні на вось! - + Cannot add a fixed y-coordinate constraint on the origin point! Не атрымалася дадаць фіксаванае абмежаванне каардынаты Y да кропкі пачатку каардынат! - + Select two or more lines from the sketch. Абраць дзве ці болей ліній на эскізе. - - + + Select at least two lines from the sketch. Абраць па крайняй меры дзве лініі на эскізе. - + Select a valid line. Абраць дапушчальную лінію. - - + + The selected edge is not a valid line. Абранае рабро не з'яўляецца дапушчальнай ліняй. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2907,42 +2908,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Дапушчальныя камбінацыі: дзве крывыя; канчатковая кропка і крывая; дзве канчатковыя кропкі; дзве крывыя і кропка. - + Select some geometry from the sketch. perpendicular constraint Абраць некаторую геаметрыю на эскізе. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не атрымалася дадаць абмежаванне перпендыкулярнасці ў нязлучанай кропцы! - - - + + + Perpendicular to B-spline edge currently unsupported. Перпендыкуляр да рабра B-сплайна ў бягучым часе не падтрымліваецца. - - + + One of the selected edges should be a line. Адно з абраных рэбраў павінна быць лініяй. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Ужыты дотык канчатковай кропкі да канчатковай кропкі. Абмежаванне супадзення было выдалена. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Ужыты дотык канчатковай кропкі да рабра. Абмежаванне кропкі на аб'екце было выдалена. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2952,277 +2953,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Дапушчальныя камбінацыі: дзве крывыя; канчатковая кропка і крывая; дзве канчатковыя кропкі; дзве крывыя і кропка. - + Select some geometry from the sketch. tangent constraint Абраць некаторую геаметрыю на эскізе. - - - + + + Cannot add a tangency constraint at an unconnected point! Не атрымалася дадаць абмежаванне дотыку ў нязлучанай кропцы! - - + + Tangent constraint at B-spline knot is only supported with lines! Датычная абмежаванне ў вузле B-сплайна падтрымліваецца толькі лініямі! - + B-spline knot to endpoint tangency was applied instead. Замест вузла B-сплайну ўжыты дотык да канчатковай кропкі. - + Select either one point and several curves, or one curve and several points. Абраць альбо адну кропку і некалькі крывых, альбо адну крывую і некалькі кропак. - - + + Wrong number of selected objects! Няправільная колькасць абраных аб'ектаў! - - + + With 3 objects, there must be 2 curves and 1 point. З 3 аб'ектамі павінна быць 2 крывыя і 1 кропка. - - - + + + Tangency to B-spline edge currently unsupported. Дотык да рабра B-сплайна ў бягучым часе не падтрымліваецца. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Абраць адну ці болей дуг альбо акружнасцяў на эскізе. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Абраці альбо толькі адзін ці некалькі палюсоў B-сплайну, альбо толькі адну ці некалькі дуг або акружнасцяў на эскізе, але не змешаных. - - - + + + Constraint only applies to arcs or circles. Абмежаванне прымяняецца толькі на дугах ці акружнасцях. - - + + Select one or two lines from the sketch. Or select two edges and a point. Абраць адну ці дзве лініі, альбо дзве крывыя і кропку. - - + + Parallel lines Паралельныя лініі - - + + An angle constraint cannot be set for two parallel lines. Не атрымалася задаць абмежаванне вугла паміж паралельнымі лініямі. - + Cannot add an angle constraint on an axis! Не атрымалася дадаць абмежаванне вугла на вось! - + Select two edges from the sketch. Абраць два рабра на эскізе. - + Select two or more compatible edges. Абраць два ці больш сумяшчальных рабра. - + Sketch axes cannot be used in equality constraints. Восі эскізу нельга ўжываць у абмежаваннях роўнасці. - + Equality for B-spline edge currently unsupported. Абмежаванні роўнасці на рэбры B-сплайна ў бягучым часе не падтрымліваецца. - - - - + + + + Select two or more edges of similar type. Абярыце два ці больш рэбраў аналагічнага тыпу. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Абярыце на эскізе дзве кропкі і лінію сіметрыі, альбо дзве кропкі і кропку сіметрыі, альбо лінію і кропку сіметрыі. - - + + Cannot add a symmetry constraint between a line and its end points. Не атрымалася дадаць абмежаванне сіметрыі паміж лініяй і яе канчатковымі кропкамі. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Не атрымалася дадаць абмежаванне сіметрыі паміж лініяй і яе канчатковымі кропкамі! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Абраць дзве канчатковыя кропкі ліній, якія будуць дзейнічаць як прамяні, і рабро, якое прадстаўляе мяжу. Першая абраная кропка адпавядае індэксу n1, другая - n2, а апорнае значэнне вызначаецца суадносінамі n2/n1. - + Selected objects are not just geometry from one sketch. Абраныя аб'екты не з'яўляюцца проста геаметрыяй з аднаго эскіза. - + Cannot create constraint with external geometry only. Не атрымалася стварыць абмежаванне з ужываннем толькі вонкавай геаметрыі. - + Incompatible geometry is selected. Абрана несумяшчальная геаметрыя. - + SnellsLaw on B-spline edge is currently unsupported. Закон Снеліуса для рабра B-сплайна ў бягучым часе не падтрымліваецца. - - - - - + + + + + Select constraints from the sketch. Абраць абмежаванне на эскізе. - - - + + + Select constraint(s) from the sketch. Абраць абмежаванне(і) на эскізе. - + B-Spline Degree Ступень B-сплайну - + Define B-Spline Degree, between 1 and %1: Вызначыць ступень B-сплайну, паміж 1 і %1: - - - + + + CAD Kernel Error Памылка ядра CAD - + None of the selected elements is an edge. Ні адзін з абраных элементаў не з'яўляецца рабром. - - + + At least one of the selected objects was not a B-Spline and was ignored. Прынамсі, адзін з абраных аб'ектаў не B-сплайн, і быў прапушчаны. - - + + The selection comprises more than one item. Please select just one knot. Абрана больш аднаго элемента. Калі ласка, абярыце толькі адзін вузел. - - + + Input Error Памылка ўводу - - + + None of the selected elements is a knot of a B-spline Ні адзін з абраных элементаў не з'яўляецца вузлом B-сплайна - - + + Selection is empty Выбар пусты - + Nothing is selected. Please select a b-spline. Нічога на абрана. Калі ласка, абярыце B-сплайн. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Калі ласка, абярыце крывую B-сплайна, каб уставіць вузел (вузел не на ім). Калі крывая не з'яўляецца B-сплайнам, калі ласка, спачатку пераўтварыце яе. - + Nothing is selected. Please select end points of curves. Нічога не абрана. Калі ласка, абярыце канчатковыя кропкі крывых. - + Too many curves on point Занадта шмат крывых у кропцы - - + + Exactly two curves should end at the selected point to be able to join them. Дзве крывыя павінны заканчвацца ў абранай кропцы, каб іх можна было аб'яднаць. - + Too few curves on point Занадта мала крывых у кропцы - + Two end points, or coincident point should be selected. Варта выбраць дзве канчатковыя кропкі альбо супадальную кропку. @@ -3302,19 +3303,19 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c У бягучым часе не падтрымліваецца рух вонкавай геаметрыі на іншы візуальны пласт. Вонкавая геаметрыя будзе апушчаная - + Set knot multiplicity Задаць кратнасць вузлоў - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Задаць кратнасць вузла ў апошняй прадстаўленай кропцы, паміж 1 і %1: Звярніце ўвагу, што кратнасць можа быць ігнараваная пры пэўных абставінах. Калі ласка, звярніцеся да дакументацыі, каб атрымаць падрабязную інфармацыю - + Value Error Памылка значэння @@ -3628,12 +3629,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Даўжыня: - + Refractive index ratio Суадносіны каэфіцыента праламлення - + Ratio n2/n1: Суадносіны n2/n1: @@ -3913,8 +3914,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Без назвы @@ -4136,30 +4137,30 @@ Requires to re-enter edit mode to take effect. Dimension Constraint - Dimension Constraint + Абмежаванне вымярэнне Dimensioning constraints: - Dimensioning constraints: + Абмежаванні вымярэнняў: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Абярыце тып абмежаванняў вымярэнняў для вашай панэлі інструментаў: +'Адзінкавы інструмент' : адзіны інструмент для ўсіх абмежаванняў вымярэнняў на панэлі инструментаў: Адлегласць, Адлегласць X / Y, Вугал, Радыус. (Іншыя ў выпадальным спісе) +'Асобныя інструменты': асобныя інструменты для кожнага абмежавання вымярэнняў. +'Абодва': у вас будзе як інструмент 'Вымярэнне', так і асобныя інструменты. +Гэтая налада прызначаная толькі для панэлі інструментаў. Што б вы ні абралі, усе інструменты заўсёды даступныя ў меню і з дапамогай спалучэнняў. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Рэжым вымярэння дыяметра/радыуса інструменту: @@ -4167,38 +4168,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Калі ўжываецца інструмент вымярэння, вы можаце выбраць спосаб апрацоўкі акружнасцяў і дуг: +'Аўтаматычнае': інструмент прыменіць радыус да дугі і дыяметр да акружнасці. +'Дыяметр': інструмент прыменіць дыяметр як да дугі, так і да акружнасці. +'Радыус': інструмент прыменіць радыус як да дугі, так і да акружнасці. - + Single tool - Single tool + Адзінкавы інструмент - + Separated tools - Separated tools + Асобныя інструменты - + Both Абодва - + Auto Аўтаматычнае - + Diameter Дыяметр - + Radius Радыус @@ -4629,7 +4630,7 @@ Then objects are only visible behind the sketch plane. Open sketch in Section View mode - Адчыніць эскіз у рэжыме Прагляд Перасеку + Адчыніць эскіз у рэжыме Выгляд перасеку @@ -4647,12 +4648,12 @@ Then objects are only visible behind the sketch plane. Ужыць да існуючым эскізам - + Unexpected C++ exception Нечаканае выключэнне C++ - + Sketcher Варштат эскізу @@ -4660,55 +4661,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Прапушчаныя супадзенні адсутнічаюць - + No missing coincidences found Прапушчаныя супадзенні не выяўлены - + Missing coincidences Супадзенні адсутнічаюць - + %1 missing coincidences found Знойдзена %1 прапушчаных супадзенняў - + No invalid constraints Хібныя абмежаванні адсутнічаюць - + No invalid constraints found Хібныя абмежаванні не выяўлены - + Invalid constraints Хібныя абмежаванні - + Invalid constraints found Выяўлены хібныя абмежаванні - - - + + + Reversed external geometry Зваротная вонкавая геаметрыя - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4718,10 +4719,10 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only %2 абмежаванняў звязана з канчатковымі кропкамі. Гэтыя абмежаванні пералічаныя ў Праглядзе справаздачы (меню Від -> Панэлі -> Прагляд справаздачы). -Націсніце кнопку "Памяняць месцамі канчатковыя кропкі ў абмежаваннях", каб памяняць месцамі канчатковыя кропкі. Зрабіце гэта толькі адзін раз для эскізаў, якія створаны ў FreeCAD версіі старэй чым 0.15 +Націсніце кнопку "Памяняць месцамі канчатковыя кропкі ў абмежаваннях", каб памяняць месцамі канчатковыя кропкі. Зрабіце гэта толькі адзін раз для эскізаў, якія створаны ў FreeCAD версіі старэй за 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4730,75 +4731,70 @@ However, no constraints linking to the endpoints were found. Аднак ніякіх абмежаванняў, якія звязаныя з канчатковымі кропкамі, выяўлена не было. - + No reversed external-geometry arcs were found. Зваротныя дугі вонкавай не выяўлены. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Было зроблена %1 змен у абмежаванні, якія прывязаныя да канчатковых кропак зваротных дуг. - - + + Constraint orientation locking Блакаванне арыентацыі абмежавання - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Блакаванне арыентацыі было ўключана і пералічана для %1 абмежаванняў. Абмежаванні пералічаныя ў Прагляд справаздачы (меню Від -> Панэлі -> Прагляд справаздачы). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Блакаванне арыентацыі была адключаная для %1 абмежаванняў. Абмежаванні пералічаныя ў праглядзе справаздачы (меню Від -> Панэлі -> Прагляд справаздачы). Звярніце ўвагу, што для ўсіх будучых абмежаванняў блакіроўка па-ранейшаму першапачаткова ўключана. - - + + Delete constraints to external geom. Выдаліць абмежаванні да вонкавай геаметрыі. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Вы збіраецеся выдаліць УСЕ абмежаванні, якія звязаныя з вонкавай геаметрыяй. Карысна для аднаўлення эскіза з пашкоджанымі/змененымі сувязямі на вонкавую геаметрыю. Вы сапраўды жадаеце выдаліць абмежаванні? - + All constraints that deal with external geometry were deleted. Усе абмежаванні, якія звязаныя з вонкавая геаметрыя, былі выдаленыя. - + No degenerated geometry Выраджаная геаметрыя адсутнічае - + No degenerated geometry found Выраджаная геаметрыя не выяўлена - + Degenerated geometry Выраджаная геаметрыя - + %1 degenerated geometry found Знойдзена %1 выраджаных геаметрый SketcherGui::TaskSketcherConstraints - - - Form - Форма - Check to toggle filters @@ -4873,11 +4869,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Форма - Check to toggle filters @@ -5063,7 +5054,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Пашыранае кіраванне сродкам рашэння @@ -5356,8 +5347,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Пераключэнне паміж паказваннем і хаваннем грабянца крывізны для ўсіх B-сплайнаў @@ -5365,8 +5356,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Памяншае кратнасць абранага вузла B-сплайна @@ -5374,8 +5365,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Пераключэнне паміж паказваннем і хаваннем ступеняў для ўсіх B-сплайнаў @@ -5383,8 +5374,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Павялічвае кратнасць абранага вузла B-сплайна @@ -5392,8 +5383,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Пераключэнне паміж паказваннем і хаваннем кратнасці вузлоў для ўсіх B-сплайнаў @@ -5401,8 +5392,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Пераключэнне паміж адлюстраваннем і хаваннем вагі кантрольнай кропкі для ўсіх B-сплайнаўпаказваннем @@ -5410,8 +5401,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Пераключэнне паміж паказваннем і хаваннем палігона кіравання для ўсіх B-сплайнаў @@ -5446,8 +5437,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Задаць дыяметр акружнасці ці дугі @@ -5455,7 +5446,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Задаць радыус/дыяметр акружнасці ці дугі @@ -5463,8 +5454,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Задаць радыус акружнасці ці дугі @@ -5472,7 +5463,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Задаць радыус/дыяметр акружнасці ці дугі @@ -5489,8 +5480,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Стварыць дугу па яе канчатковым кропках і кропку наўздоўж дугі @@ -5498,8 +5489,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Стварыць акружнасць па трох кропках вобада @@ -5507,8 +5498,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Стварыць дугу па яе цэнтральнай кропцы і канчатковых кропках @@ -5516,8 +5507,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Стварыць дугу эліпса па яе цэнтральнай кропцы, вялікай паўвосі і канчатковым кропкам @@ -5525,8 +5516,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Стварыць дугу гіпербалы па яе цэнтральнай кропцы, вялікай паўвосі і канчатковым кропкам @@ -5534,8 +5525,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Стварыць дугу парабалы па яе фокусу, вяршыні і канчатковым кропках @@ -5543,13 +5534,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-сплайн па кантрольным кропкам - - + + Create a B-spline by control points Стварыць B-сплайн па кантрольным кропкам @@ -5557,8 +5548,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Стварыць акружнасць па яе цэнтральнай кропцы і кропцы вобада @@ -5566,8 +5557,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Стварыць эліпс па перыцэнтру, апацэнтру і малой паўвосі @@ -5575,8 +5566,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Стварыць эліпс па цэнтральнай кропцы, вялікай паўвосі і кропцы @@ -5584,8 +5575,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Стварае радыус паміж дзвюма лініямі @@ -5593,8 +5584,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Стварыць семікутнік па яе цэнтральнай кропцы і адным куце @@ -5602,8 +5593,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Стварыць шасцікутнік па яе цэнтральнай кропцы і адным куце @@ -5611,7 +5602,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Стварыць закруглены прастакутнік @@ -5619,14 +5610,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Стварыць васьмікутнік па яе цэнтральнай кропцы і адным куце - - + + Create a regular polygon by its center and by one corner Стварыць правільны шматкутнік па яе цэнтральнай кропцы і адным куце @@ -5634,8 +5625,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Стварыць пяцікутнік па яе цэнтральнай кропцы і адным куце @@ -5643,8 +5634,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Акругленне з захаванымі абмежаваннямі і кропкай скрыжавання @@ -5652,7 +5643,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Стварыць прастакутнік @@ -5660,7 +5651,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Стварыць цэнтраваны прастакутнік @@ -5668,8 +5659,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Стварыць квадрат па яе цэнтральнай кропцы і адным куце @@ -5677,8 +5668,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Стварыць роўнабаковы трыкутнік па яе цэнтральнай кропцы і адным куце @@ -5686,13 +5677,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Перыядычны B-сплайн па кантрольным кропкам - - + + Create a periodic B-spline by control points Стварыць перыядычны B-сплайн па кантрольным кропкам @@ -6326,36 +6317,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Памылка @@ -6375,45 +6366,45 @@ The grid spacing change if it becomes smaller than this number of pixel.Абмежаванне змяшчае недапушчальную інфармацыю аб індэксе і з'яўляецца скажоным. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Хібнае абмежаванне - - - + + + Failed to add arc Не атрымалася дадаць дугу - + Failed to add arc of ellipse Не атрымалася дадаць дугу эліпса - + Cannot create arc of hyperbola from invalid angles, try again! Не атрымалася стварыць дугу гіпербалы з хібнымі вугламі, паспрабуйце яшчэ раз! - + Cannot create arc of hyperbola Не атрымалася стварыць дугу гіпербалы - + Cannot create arc of parabola Не атрымалася стварыць дугу парабалы @@ -6423,18 +6414,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Памылка дадання полюса B-сплайну - + Error creating B-spline pole Памылка стварэння полюса B-сплайну - - + + Error creating B-spline Памылка стварэння B-сплайну - + Error deleting last pole Памылка выдалення апошняга полюсу @@ -6444,49 +6435,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Не атрымалася дадаць вузлавую кропку - + Cannot add internal alignment points Не атрымалася дадаць унутраныя кропкі выраўноўвання - + Error removing knot Памылка выдалення вузла - + Failed to add carbon copy Немагчыма дадаць дакладную копію - - + + Failed to add circle Немагчыма дадаць акружнасць - + Failed to add an ellipse Немагчыма дадаць эліпс - + Failed to extend edge Немагчыма выцягнуць рабро - + Failed to add external geometry Немагчыма дадаць вонкавую геаметрыю - + Failed to create fillet Немагчыма стварыць акругленне - + Failed to add line Немагчыма дадаць лінію @@ -6496,7 +6487,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Немагчыма дадаць кропку - + Failed to add polygon Немагчыма дадаць шматкутнік @@ -6506,27 +6497,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Не атрымалася дадаць паралелепіпед - + Failed to add rounded rectangle Немагчыма дадаць закруглены прастакутнік - + Failed to add slot Немагчыма дадаць паз - + Failed to add edge Немагчыма дадаць рабро - + Failed to trim edge Немагчыма абрэзаць рабро - + Value Error @@ -6536,13 +6527,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-сплайн па вузлах - - + + Create a B-spline by knots Стварыць B-сплайн па вузлах @@ -6550,13 +6541,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Перыядычны B-сплайн па вузлах - - + + Create a periodic B-spline by knots Стварыць перыядычны B-сплайн па вузлах @@ -6666,12 +6657,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Стварыць B-сплайн па вузлах - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Стварыць B-сплайн па вузлах, гэта значыць шляхам інтэрпаляцыі ў эскізе. @@ -6679,12 +6670,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Стварыць перыядычны B-сплайн па вузлах - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Стварыць перыядычны B-сплайн па вузлах, гэта значыць шляхам інтэрпаляцыі ў эскізе. @@ -6692,31 +6683,44 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Вымярэнне - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Абмяжоўвае кантэкстуальную ў залежнасці ад вашага выбару. +У залежнасці ад вашага выбару ў вас можа быць некалькі даступных абмежаванняў. Вы можаце перамыкацца паміж імі, калі ўжываеце клавішу <Shift>. +Пстрычка <левай кнопкай мышы> па пустой прасторы пацвердзіць бягучае абмежаванне. Пстрычка <правай кнопкай мышы> ці націск клавішы <Esc> прывядзе да адмены. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Паказаць/схаваць кругавы памочнік для дуг - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Пераключэнне паміж паказваннем і хаваннем кругавога памочніку для ўсіх дуг + + + + CmdSketcherCompDimensionTools + + + Dimension + Вымярэнне + + + + Dimension tools. + Інструменты вымярэння.
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts index 5d0f4e571c..4f3a456ab1 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Crea un calc - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Mostra/Amaga la capa d'informació del B-spline - + Show/hide B-spline degree Mostra/Amaga el grau del B-spline - + Show/hide B-spline control polygon Mostra/Amaga el polígon de control de la B-spline - + Show/hide B-spline curvature comb Mostra/Amaga la nansa de curvatura del B-spline - + Show/hide B-spline knot multiplicity Mostra/oculta la multiplicitat de nus del B-spline - + Show/hide B-spline control point weight Mostra/Amaga el punt de control de pesos del B-spline @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringeix l'arc o la circumferència - + Constrain an arc or a circle Restringeix un arc o una circumferència - + Constrain radius Restringeix el radi - + Constrain diameter Restringeix el diàmetre - + Constrain auto radius/diameter Limiteu el radi/diàmetre automàtic @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Create arc - + Create an arc in the sketcher Crear un arc en el croquis - + Center and end points Centre i punts finals - + End points and rim point Punts finals i punt de vora @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Crea un B-spline - + Create a B-spline in the sketch Crea un B-spline en el croquis @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Crea un cercle - + Create a circle in the sketcher Crear un cercle en el croquis - + Center and rim point Punt centre i vora - + 3 rim points 3 punts de vora @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Crea una cònica - + Create a conic in the sketch Crear una Cònica al croquis - + Ellipse by center, major radius, point El·lipse donats el centre, el radi major i un punt - + Ellipse by periapsis, apoapsis, minor radius El·lipse donats el periàpside, l'apoàpsi de i el radi menor - + Arc of ellipse by center, major radius, endpoints Arc d'el·lipse donats el centre, el radi major i els extrems - + Arc of hyperbola by center, major radius, endpoints Arc d'hipèrbola donats el centre, el radi major i els extrems - + Arc of parabola by focus, vertex, endpoints Arc de paràbola pel focus, el vèrtex i els extrems @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Crea un cantell - + Create a fillet between two lines Crea un cantell arrodonit entre dues línies - + Sketch fillet Cantell del croquis - + Constraint-preserving sketch fillet Restricció conservant el cantell del croquis @@ -299,17 +299,17 @@ Crea un rectangle a l'esbós - + Rectangle Rectangle - + Centered rectangle Rectangle centrat - + Rounded rectangle Rectangle arrodonit @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Crear polígon regular - + Create a regular polygon in the sketcher Crea un polígon regular en el croquis - + Triangle Triangle - + Square Quadrat - + Pentagon Pentàgon - + Hexagon Hexàgon - + Heptagon Heptàgon - + Octagon Octàgon - + Regular polygon Polígon regular @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modifica la multiplicitat del nus - + Modifies the multiplicity of the selected knot of a B-spline Modifica la multiplicitat del nus seleccionat d'un B-spline - + Increase knot multiplicity Augmenta la multiplicitat del nus - + Decrease knot multiplicity Redueix la multiplicitat del nus @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restricció de angle - + Fix the angle of a line or the angle between two lines Fixa l'angle d'una línia o l'angle entre dues línies @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restringeix el bloc - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restricció coincident - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea una restricció coincident entre punts o una restricció concèntrica entre cercles, arcs i el·lipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringeix el diàmetre - + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restricció de distància - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Fixa la distància horitzontal entre dos punts o extrems de línia @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restringir la distància vertical - + Fix the vertical distance between two points or line ends Fixa la distància vertical entre dos punts o extrems de línia @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restricció igual - + Create an equality constraint between two lines or between circles and arcs Crea una restricció d'igualtat entre dues línies o entre cercles i arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restricció horitzontal - + Create a horizontal constraint on the selected item Crea una restricció horitzontal en l'element seleccionat @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restricció de bloqueig - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restricció de parel·lelisme - + Create a parallel constraint between two lines Crea una restricció de paral·lelisme entre dues línies @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restricció de perpendicularitat - + Create a perpendicular constraint between two lines Crea una restricció de perpendicularitat entre dues línies @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restricció d'un punt sobre l'objecte - + Fix a point onto an object Fixa un punt sobre un objecte @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Limiteu el radi/diàmetre automàtic - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Restricció de radi o pes - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Corretgir el radi d'un cercle o un arc o fixar el pes d'un poste o d'una B-spline @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restricció de simetria - + Create a symmetry constraint between two points with respect to a line or a third point Crea una restricció de simetria entre dos punts respecte a una línia o a un tercer punt @@ -614,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Restricció tangent - + Create a tangent constraint between two entities Crea una restricció tangent entre dues entitats @@ -627,12 +627,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Restricció veertical - + Create a vertical constraint on the selected item Crea una restricció vertical en l'element seleccionat @@ -640,12 +640,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Converteix la geometria a B-spline - + Converts the selected geometry to a B-spline Converteix la geometria seleccionada a B-spline @@ -666,12 +666,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Crea un arc donats tres punts - + Create an arc by its end points and a point along the arc Crea un arc donats els extrems i un punt al llarg de l'arc @@ -679,12 +679,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Crea un cercle donats tres punts - + Create a circle by 3 perimeter points Crea un cercle donats tres punts del perímetre @@ -692,12 +692,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Crea un arc donat el centre - + Create an arc by its center and by its end points Crea un arc donats el centre i els extrems @@ -705,12 +705,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Crea un arc d'el·lipse - + Create an arc of ellipse in the sketch Crea un arc d'el·lipse en el croquis @@ -718,12 +718,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Crea un arc d'hipèrbole - + Create an arc of hyperbola in the sketch Crea un arc d'hipèrbola en el croquis @@ -731,12 +731,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Crea un arc de paràbola - + Create an arc of parabola in the sketch Crea un arc de paràbola en el croquis @@ -744,12 +744,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Crea un B-spline - + Create a B-spline by control points in the sketch. Crear un B-spline mitjançant punts de control del croquis. @@ -757,12 +757,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Crea un cercle - + Create a circle in the sketch Crear un cercle en el dibuix @@ -770,12 +770,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Crear l'el·lipse per 3 punts - + Create an ellipse by 3 points in the sketch Crear una el·lipse els 3 punts en el dibuix @@ -783,12 +783,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Crear el·lipse pel centre - + Create an ellipse by center in the sketch Crear una el·lipse pel centre en el dibuix @@ -796,12 +796,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Crea un cantell - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Crear heptàgon - + Create a heptagon in the sketch Crear un heptàgon en el dibuix @@ -822,12 +822,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Crear hexàgon - + Create a hexagon in the sketch Crear un hexàgon en el dibuix @@ -861,12 +861,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Crear octàgon - + Create an octagon in the sketch Crear un octàgon en el dibuix @@ -874,12 +874,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Crear Pentàgon - + Create a pentagon in the sketch Crear un pentàgon al croquis @@ -887,12 +887,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Crea un B-spline periòdic - + Create a periodic B-spline by control points in the sketch. Crea una B-spline periòdica mitjançant punts de control del croquis. @@ -900,12 +900,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Crear punt - + Create a point in the sketch Crear un punt en el dibuix @@ -913,12 +913,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Crear un cantell que conservi les cantonades - + Fillet that preserves intersection point and most constraints Cantell que conserva el punt d'intersecció i la majoria de les restriccions @@ -926,12 +926,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Crear polyline - + Create a polyline in the sketch. 'M' Key cycles behaviour Crear un polyline en el dibuix. Estic 'M' cicles de comportament @@ -965,12 +965,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Crear polígon regular - + Create a regular polygon in the sketch Crea un polígon regular en el croquis @@ -978,12 +978,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Crear ranura - + Create a slot in the sketch Crear una ranura en el dibuix @@ -991,12 +991,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Crear quadrats - + Create a square in the sketch Crear un quadrat en el dibuix @@ -1004,12 +1004,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Crear triangle equilàter - + Create an equilateral triangle in the sketch Crear un triangle equilàter en el dibuix @@ -1017,12 +1017,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Reduïr el grau de B-spline - + Decreases the degree of the B-spline Disminueix el grau d'una B-spline @@ -1030,12 +1030,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Redueix la multiplicitat del nus - + Decreases the multiplicity of the selected knot of a B-spline Redueix la multiplicitat del nus seleccionat d'un B-spline @@ -1082,12 +1082,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Estén una aresta - + Extend an edge with respect to the picked position Estén una aresta respecte a la posició seleccionada @@ -1095,12 +1095,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Crea una geometria externa - + Create an edge linked to an external geometry Crear un vertex vinculat a una geometria externa @@ -1108,12 +1108,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Augmenta el grau de la B-spline - + Increases the degree of the B-spline Augmenta el grau del B-spline @@ -1121,12 +1121,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Augmenta la multiplicitat del nus - + Increases the multiplicity of the selected knot of a B-spline Augmenta la multiplicitat del nus seleccionat d'un B-spline @@ -1134,12 +1134,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Inserir node - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Insereix un nus al paràmetre donat. Si ja existeix un node en aquest paràmetre, la seva multiplicitat augmenta en un. @@ -1147,12 +1147,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1438,12 +1438,12 @@ Això esborrarà la propietat 'Suport', si existeix. CmdSketcherSplit - + Split edge Dividir aresta - + Splits an edge into two while preserving constraints Divideix una vora en dos tot conservant les restriccions @@ -1464,12 +1464,12 @@ Això esborrarà la propietat 'Suport', si existeix. CmdSketcherSwitchVirtualSpace - + Switch virtual space Canvia l'espai virtual - + Switches the selected constraints or the view to the other virtual space Canvia les restriccions seleccionades o la vista d'altre espai virtual @@ -1490,12 +1490,12 @@ Això esborrarà la propietat 'Suport', si existeix. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activa/desactiva la restricció - + Activates or deactivates the selected constraints Activa o desactiva les restriccions seleccionades @@ -1516,12 +1516,12 @@ Això esborrarà la propietat 'Suport', si existeix. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Canvia la restricció de guia a referència - + Set the toolbar, or the selected constraints, into driving or reference mode Estableix la barra d'eines o les restriccions seleccionades, en mode guia o referència @@ -1530,12 +1530,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Retalla l'aresta - + Trim an edge with respect to the picked position Retalla una aresta respecte a la posició seleccionada @@ -1594,369 +1594,370 @@ restriccions invàlides, geometries degenerades, etc. Command - - + + Add horizontal constraint Afegeix restricció horitzontal - - - + + + Add horizontal alignment Afegeix alinieació horitzontal - - + + Add vertical constraint Afegeix restricció vertical - + Add vertical alignment Afegeix alineació vertical - + Add 'Lock' constraint Afegir restricció 'Bloquejar' - + Add relative 'Lock' constraint Afegeix una restricció de bloqueig relatiu - + Add fixed constraint Afegir restricció fixa - + Add 'Block' constraint Afegir restricció 'Bloqueig' - + Add block constraint Afegir restricció de Bloqueig - - - + + + Add coincident constraint Afegir restricció de coincidència - - + + Add distance from horizontal axis constraint Afegir distancia des-de la restricció del eix horitzontal - - + + Add distance from vertical axis constraint Afegir distancia des-de la restricció del eix vertical - - + + Add point to point distance constraint Afegeix una restricció de distància entre dos punts - - - + + + Add point to line Distance constraint Afegeix una restricció de distància de punt a línia - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Afegeix una restricció de longitud - - + + Dimension Cota - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Afegeix una restricció de punt sobre l'objecte - - + + Add point to point horizontal distance constraint Afegeix una restricció punt a punt de distància horitzontal - + Add fixed x-coordinate constraint Afegeix restricció de coordenada x fixa - - + + Add point to point vertical distance constraint Afegeix una restricció de distància vertical punt a punt - + Add fixed y-coordinate constraint Afegeix una restricció de coordenada x fixe - - + + Add parallel constraint Afegeix una restricció paral·lela - - - - - - - + + + + + + + Add perpendicular constraint Afegeix una restricció perpendicular - + Add perpendicularity constraint Afegeix una restricció de perpendicularitat - + Swap coincident+tangency with ptp tangency Canvia tangència+coincident amb tangència punt a punt - + Swap PointOnObject+tangency with point to curve tangency Canvia PointOnObject+tangència amb tangència punt a corba - - - - - - - + + + + + + + Add tangent constraint Afegeix una restricció tangent - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Afegeix un punt de restricció de tangent - - - - + + + + Add radius constraint Afegeix una restricció de radi - - - - + + + + Add diameter constraint Afegeix una restricció de diàmetre - - - - + + + + Add radiam constraint Afegeix una restricció de radi - - - - - - + + + + + + Add angle constraint Afegeix una restricció d'angle - - + + Add equality constraint Afegeix una restricció d'igualtat - - - - - + + + + + Add symmetric constraint Afegeix una restricció de simetria - + Add Snell's law constraint Afegeix una restricció de Llei de Snell - + Toggle constraint to driving/reference Canvia restricció entre guia i referència - + Activate/Deactivate constraint Activa o desactiva la restricció @@ -2016,44 +2017,44 @@ restriccions invàlides, geometries degenerades, etc. Afegeix un quadre de dibuix centrat - + Add rounded rectangle Afegiu un rectangle arrodonit - + Add line to sketch wire Afegeix una línia al filferro del croquis - + Add arc to sketch wire Afegeix un arc al filferro del croquis - - + + Add sketch arc Afegeix un arc al corquis - - + + Add sketch circle Afegeix una circumferència al croquis - + Add sketch ellipse Afegeix una el·lipse al croquis - + Add sketch arc of ellipse Afegeix un arc d'el·lipse al croquis - + Add sketch arc of hyperbola Afegeix un arc d'hipèrbola al croquis @@ -2073,33 +2074,33 @@ restriccions invàlides, geometries degenerades, etc. Afegeix un punt al croquis - - + + Create fillet Crea un cantell - + Trim edge Retalla l'aresta - + Extend edge Estén una aresta - + Split edge Dividir aresta - + Add external geometry Afegeix una geometria externa - + Add slot Afegeix una ranura @@ -2109,37 +2110,37 @@ restriccions invàlides, geometries degenerades, etc. Afegeix un hexàgon - + Convert to NURBS Converteix en NURBS - + Increase spline degree Augmenta el grau de l'spline - + Decrease spline degree Redueix el grau de l'spline - + Increase knot multiplicity Augmenta la multiplicitat del nus - + Decrease knot multiplicity Redueix la multiplicitat del nus - + Insert knot Inserir node - + Join Curves Join Curves @@ -2179,12 +2180,12 @@ restriccions invàlides, geometries degenerades, etc. Elimina l'alineació d'eixos - + Toggle constraints to the other virtual space Canvia les restriccions a l'altre espai virtual - + @@ -2192,7 +2193,7 @@ restriccions invàlides, geometries degenerades, etc. Actualitza l'espai virtual de la restricció - + Add auto constraints Afegeix restriccions automàtiques @@ -2232,7 +2233,7 @@ restriccions invàlides, geometries degenerades, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2248,37 +2249,37 @@ restriccions invàlides, geometries degenerades, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Error de autorestriccio: esbos sense solucio al aplicar restriccions coincidents. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Error d'Autorestricio: croquis irresoluble si s'apliquen restriccions vertcials/horitzontals. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Error de restricció automàtica: corquis irresoluble si s'apliquen restriccions d'igualtat. - + Autoconstrain error: Unsolvable sketch without constraints. Error de restricció: croquis irresoluble sense restriccions. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Error d'autorestricció: croquis irresoluble després d'aplicar restriccions verticals i horitzontals. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Error d'autorestricció: croquis irresoluble si s'apliquen restriccions de punt sobre punt. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Error d'autorestricció: croquis irresoluble si s'apliquen restriccions d'igualtat. @@ -2403,143 +2404,143 @@ restriccions invàlides, geometries degenerades, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2555,9 +2556,9 @@ restriccions invàlides, geometries degenerades, etc. - - - + + + Wrong selection Selecció incorrecta @@ -2578,329 +2579,329 @@ restriccions invàlides, geometries degenerades, etc. Restricció de dimensió - + Cannot add a constraint between two external geometries. No es pot afegir una restricció entre dues geometries externes. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. No es pot afegir una restricció entre dues geometries fixes. Les geometries fixes inclouen geometria externa, geometria bloquejada i punts especials com ara punts de node B-spline. - + Sketcher Constraint Substitution Substitució de restriccions de Sketcher "Esbos" - + Keep notifying me of constraint substitutions Continueu notificant-me les substitucions de restriccions - - - + + + Only sketch and its support are allowed to be selected. Només es permet seleccionar l'esbós i el seu suport. - + One of the selected has to be on the sketch. Un dels seleccionats ha d'estar a l'esbós. - - + + Select an edge from the sketch. Seleccioneu una aresta del croquis. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricció impossible - - - - + + + + The selected edge is not a line segment. L'aresta seleccionada no és un segment de línia. - - - - - - + + + + + + Double constraint Restricció doble - - - - - + + + + + The selected edge already has a horizontal constraint! La vora seleccionat ja té una restricció horitzontal! - - - + + + The selected edge already has a vertical constraint! La vora seleccionat ja té una restricció vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! La vora seleccionat ja té una restricció de bloc! - + The selected item(s) can't accept a horizontal constraint! El/s element/s seleccionat/s no poden acceptar una restricció horitzontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hi ha més d'un fix punts seleccionats. Seleccioneu un màxim d'un punt fix! - + The selected item(s) can't accept a vertical constraint! El/s element/s seleccionat/s no poden acceptar una restricció vertical! - - - + + + Select vertices from the sketch. Seleccioneu vèrtexs del croquis. - + Select one vertex from the sketch other than the origin. Seleccioneu un vèrtex del croquis que no sigui l'origen. - + Select only vertices from the sketch. The last selected vertex may be the origin. Seleccioneu només vèrtexs del croquis. L'últim vèrtex seleccionat pot ser l'origen. - + Wrong solver status Estat del Solver incorrecte - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. No es pot afegir una restricció de bloqueig si el croquis no està resolt o hi ha restriccions redundants i en conflicte. - + Select one edge from the sketch. Seleccioneu una aresta del corquis. - + Select only edges from the sketch. Seleccioneu sols arestes del croquis. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Error - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. En el seu lloc s'ha aplicat una tangència entre extrems. - + Select two or more points from the sketch. Seleccioneu dos o més punts del corquis. - + Select two or more vertices from the sketch. Seleccioneu dos o més vèrtexs de l'esbós. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Seleccioneu exactament una línia, o un punt i una línia, o dos punts del croquis. - + Cannot add a length constraint on an axis! No es pot afegir una restricció de longitud sobre un eix! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. Aquesta restricció no té sentit per a corbes no lineals. - + Endpoint to edge tangency was applied instead. En el seu lloc, s'ha aplicat la tangència de punt final a vora. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccioneu els elements correctes del croquis. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Seleccioneu una vora que no sigui un pes B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Cap dels punts seleccionats estava restringit sobre les respectives corbes, perquè són parts del mateix element, perque ambdós són geometries externes, o perquè l'aresta no és eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Cap dels punts seleccionats estaven limitats a les respectives corbes, perquè són peces del mateix element o perquè són tant geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccioneu exactament una línia o fins a dos punts del croquis. - + Cannot add a horizontal length constraint on an axis! No es pot afegir una restricció de longitud horitzontal sobre un eix! - + Cannot add a fixed x-coordinate constraint on the origin point! No es pot afegir una limitació coordenada x fixa en el punt d'origen! - - + + This constraint only makes sense on a line segment or a pair of points. Aquesta restricció només té sentit en un segment de línia o un parell de punts. - + Cannot add a vertical length constraint on an axis! No es pot afegir una restricció de longitud vertical sobre un eix! - + Cannot add a fixed y-coordinate constraint on the origin point! No es pot afegir una limitació coordenada x fixa en el punt d'origen! - + Select two or more lines from the sketch. Seleccioneu dues o més línies del croquis. - - + + Select at least two lines from the sketch. Seleccioneu almenys dues línies del croquis. - + Select a valid line. Seleccioneu una línia vàlida. - - + + The selected edge is not a valid line. L'aresta seleccionada no és una línia vàlida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2908,42 +2909,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. perpendicular constraint Seleccioneu alguna geometria del croquis. - - + + Cannot add a perpendicularity constraint at an unconnected point! No es pot afegir una restricció de perpendicularitat en un punt no connectat! - - - + + + Perpendicular to B-spline edge currently unsupported. Actualment no s'admet una perpendicular a la vora del B-spline. - - + + One of the selected edges should be a line. Una de les arestes seleccionades ha de ser una línia. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. S'ha aplicat una tangència entre extrems. S'han suprimit les restriccions coincidents. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. S'ha aplicat la tangència de punt final a vora. S'ha suprimit el punt sobre la restricció d'objectes. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2951,277 +2952,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. tangent constraint Seleccioneu alguna geometria del croquis. - - - + + + Cannot add a tangency constraint at an unconnected point! No es pot afegir una restricció de tangència en un punt no connectat! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! El nombre d'objectes seleccionats és incorrecte! - - + + With 3 objects, there must be 2 curves and 1 point. Amb 3 objectes, hi ha d'haver 2 corbes i 1 punt. - - - + + + Tangency to B-spline edge currently unsupported. Actualment no s'admet la tangència a la vora del B-spline. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccioneu un o més arcs o cercles del croquis. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Seleccioneu o bé un o diversos pols de B-spline, o bé un o més arcs o circumferències del croquis, però no els mescleu. - - - + + + Constraint only applies to arcs or circles. La restricció només s'aplica a arcs i cercles. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccioneu una o dues línies del croquis. O seleccioneu dues arestes i un punt. - - + + Parallel lines Línies paral·leles - - + + An angle constraint cannot be set for two parallel lines. Una restricció d'angle no es pot definir per dues línies paral·leles. - + Cannot add an angle constraint on an axis! No es pot afegir una restricció d'angle sobre un eix! - + Select two edges from the sketch. Seleccioneu dues arestes del croquis. - + Select two or more compatible edges. Seleccioneu dues o més arestes compatibles. - + Sketch axes cannot be used in equality constraints. Els eixos d'esbós no es poden utilitzar en restriccions d'igualtat. - + Equality for B-spline edge currently unsupported. Actualment no s'admet la igualtat per a la vora del B-spline. - - - - + + + + Select two or more edges of similar type. Seleccioneu dues o més arestes de tipus similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccioneu dos punts i una línia de simetria, dos punts i un punt de simetria, o bé una línia i un punt de simetria del croquis. - - + + Cannot add a symmetry constraint between a line and its end points. No es pot afegir una restricció de simetria entre una línia i els seus extrems. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! No es pot afegir una restricció de simetria entre una línia i els seus extrems! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Seleccioneu dos extrems de línia per actuar com a raigs, i una aresta que representi un límit. El primer punt seleccionat correspon a l'índex n1, el segon a n2, i el valor de la restricció estableix una ràtio n2/n1. - + Selected objects are not just geometry from one sketch. Els objectes seleccionats no són només geometria d'un corquis. - + Cannot create constraint with external geometry only. No es pot crear una restricció només amb geometria externa. - + Incompatible geometry is selected. S'ha seleccionat geometria incompatible. - + SnellsLaw on B-spline edge is currently unsupported. Actualment no es suporta la Llei de Snell en arestes de B-spline. - - - - - + + + + + Select constraints from the sketch. Seleccioneu restriccions del croquis. - - - + + + Select constraint(s) from the sketch. Seleccioneu restricció(ns) del croquis. - + B-Spline Degree Grau B-Spline - + Define B-Spline Degree, between 1 and %1: Definiu el grau B-Spline, entre 1 i %1: - - - + + + CAD Kernel Error Error del nucli del CAD - + None of the selected elements is an edge. Cap dels elements seleccionats és una vora. - - + + At least one of the selected objects was not a B-Spline and was ignored. Com a mínim, un els objectes seleccionats no és una B-Spline i s'ha ignorat. - - + + The selection comprises more than one item. Please select just one knot. La selecció inclou més d'un element. Seleccioneu només un nus. - - + + Input Error Error d'entrada - - + + None of the selected elements is a knot of a B-spline Cap dels elements seleccionats és un nus d'un B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. No hi ha res seleccionat. Seleccioneu una b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Seleccioneu una corba b-spline per inserir un node (no un node a ell). Si la corba no és una b-spline, primer convertiu-la en una. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3301,17 +3302,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3625,12 +3626,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Longitud: - + Refractive index ratio Índex de refracció - + Ratio n2/n1: Relació n2/n1: @@ -3910,8 +3911,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Sense nom @@ -4140,13 +4141,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4167,32 +4168,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Ambdós - + Auto Auto - + Diameter Diàmetre - + Radius Radi @@ -4640,12 +4641,12 @@ Then objects are only visible behind the sketch plane. Aplica als esbossos existents - + Unexpected C++ exception S'ha produït una excepció inesperada de C++ - + Sketcher Esbossos @@ -4653,55 +4654,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences No hi ha cap coincidència perduda - + No missing coincidences found No s'ha trobat cap coincidència perduda - + Missing coincidences Coincidències perdudes - + %1 missing coincidences found S'han trobat %1 coincidències perdudes - + No invalid constraints No hi ha cap restricció invàlida - + No invalid constraints found No s'ha trobat cap restricció invàlida - + Invalid constraints Restriccions invàlides - + Invalid constraints found S'han trobat restriccions invàlides - - - + + + Reversed external geometry Geometria externa inversa - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4710,82 +4711,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only S'han trobat %1 arcs de geometria externa inversa. Els seus extrems estan encerclats en la vista 3D. %2 restriccions s'apliquen als extrems. Les restriccions s'han llistat en la vista d'informe (menú Vista -> Panells -> Vista d'informe). Feu clic a «Intercanvia els extrems en les restriccions» per a reassignar els extrems. Feu això només una vegada en esbossos creats en una versió del FreeCAD anterior a la v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. S'han trobat %1 arcs de geometria externa inversa. Els seus extrems estan encerclats en la vista 3D. Tanmateix, no s'ha trobat cap restricció vinculada als extrems. - + No reversed external-geometry arcs were found. No s'ha trobat cap arc de geometria externa inversa. - + %1 changes were made to constraints linking to endpoints of reversed arcs. S'han realitzat %1 canvis en les restriccions vinculades als extrems dels arcs inversos. - - + + Constraint orientation locking Restricció de bloqueig d'orientació - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). El bloqueig d'orientació s'ha activat i recalculat per a %1 restriccions. Les restriccions s'han llistat en la vista d'informe (menú Vista -> Panells -> Vista d'informe). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. El bloqueig d'orientació s'ha desactivat per a %1 restriccions. Les restriccions s'han llistat en la vista d'informe (menú Vista -> Panells -> Vista d'informe). Tingueu en compte que per a restriccions futures, el bloqueig per defecte sempre és Activat. - - + + Delete constraints to external geom. Suprimeix les restriccions vinculades a la geometria externa. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Ara suprimireu TOTES les restriccions vinculades a la geometria externa. Això és útil per a recuperar un croquis amb enllaços a la geometria externa trencats o canviats. Esteu segur que voleu suprimir les restriccions? - + All constraints that deal with external geometry were deleted. Totes les restriccions vinculades a una geometria externa s'han suprimit. - + No degenerated geometry Cap geometria degenerada - + No degenerated geometry found No s'ha trobat cap geometria degenerada - + Degenerated geometry Geometria degenerada - + %1 degenerated geometry found S'han trobat %1 geometries degenerades SketcherGui::TaskSketcherConstraints - - - Form - Forma - Check to toggle filters @@ -4860,11 +4856,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Forma - Check to toggle filters @@ -5050,7 +5041,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Control avançat del solucionador @@ -5343,8 +5334,8 @@ El solucionador no ha pogut convergir Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Canvia entre mostrar i amagar la Pinta de curvatura per a tots els B-splines @@ -5352,8 +5343,8 @@ El solucionador no ha pogut convergir Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Redueix la multiplicitat del nus seleccionat d'un B-spline @@ -5361,8 +5352,8 @@ El solucionador no ha pogut convergir Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Canvia entre mostrar i amagar els graus per a totes les B-splines @@ -5370,8 +5361,8 @@ El solucionador no ha pogut convergir Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Augmenta la multiplicitat del nus seleccionat d'un B-spline @@ -5379,8 +5370,8 @@ El solucionador no ha pogut convergir Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Canvia entre mostrar i amagar la multiplicitat del nus per a totes les B-splines @@ -5388,8 +5379,8 @@ El solucionador no ha pogut convergir Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Canvia entre mostrar i amagar el punt de control de pes per a totes els B-splines @@ -5397,8 +5388,8 @@ El solucionador no ha pogut convergir Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Canvia entre mostrar i amagar els polígons de control per a totes les B-splines @@ -5433,8 +5424,8 @@ El solucionador no ha pogut convergir Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -5442,7 +5433,7 @@ El solucionador no ha pogut convergir Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fixeu el radi/diàmetre d'un cercle o d'un arc @@ -5450,8 +5441,8 @@ El solucionador no ha pogut convergir Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixa el radi d'un cercle o arc @@ -5459,7 +5450,7 @@ El solucionador no ha pogut convergir Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fixeu el radi/diàmetre d'un cercle o d'un arc @@ -5476,8 +5467,8 @@ El solucionador no ha pogut convergir Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Crea un arc donats els extrems i un punt al llarg de l'arc @@ -5485,8 +5476,8 @@ El solucionador no ha pogut convergir Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Crea un cercle donats tres punts de la vora @@ -5494,8 +5485,8 @@ El solucionador no ha pogut convergir Sketcher_CreateArc - - + + Create an arc by its center and by its end points Crea un arc donats el centre i els extrems @@ -5503,8 +5494,8 @@ El solucionador no ha pogut convergir Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Crea un arc d'el·lipse a partir del seu centre, radi major i extrems @@ -5512,8 +5503,8 @@ El solucionador no ha pogut convergir Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Crea un arc d'hipèrbola a partir del seu centre, radi major i extrems @@ -5521,8 +5512,8 @@ El solucionador no ha pogut convergir Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Crea un arc de parabola a partir del seu focus, vèrtex i extrems @@ -5530,13 +5521,13 @@ El solucionador no ha pogut convergir Sketcher_CreateBSpline - + B-spline by control points B-spline per punts de control - - + + Create a B-spline by control points Crea un B-spline donats els punts de control @@ -5544,8 +5535,8 @@ El solucionador no ha pogut convergir Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Crea un cercle donats el centre i un punt de la vora @@ -5553,8 +5544,8 @@ El solucionador no ha pogut convergir Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Crea una el·lipse donats el periàpside, l'apoàpside i el radi menor @@ -5562,8 +5553,8 @@ El solucionador no ha pogut convergir Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Crea una el·lipse donats el centre, el radi major i un punt @@ -5571,8 +5562,8 @@ El solucionador no ha pogut convergir Sketcher_CreateFillet - - + + Creates a radius between two lines Crea un radi entre dues línies @@ -5580,8 +5571,8 @@ El solucionador no ha pogut convergir Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Crea un heptàgon donats el centre i un vèrtex @@ -5589,8 +5580,8 @@ El solucionador no ha pogut convergir Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Crea un hexàgon donats el centre i un vèrtex @@ -5598,7 +5589,7 @@ El solucionador no ha pogut convergir Sketcher_CreateOblong - + Create a rounded rectangle Crea un rectangle arrodonit @@ -5606,14 +5597,14 @@ El solucionador no ha pogut convergir Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Crea un octàgon donats el centre i un vèrtex - - + + Create a regular polygon by its center and by one corner Crea un polígon regular donats el centre i un vèrtex @@ -5621,8 +5612,8 @@ El solucionador no ha pogut convergir Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Crea un pentàgon donats el centre i un vèrtex @@ -5630,8 +5621,8 @@ El solucionador no ha pogut convergir Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Cantell que preserva les restriccions i el punt d'intersecció @@ -5639,7 +5630,7 @@ El solucionador no ha pogut convergir Sketcher_CreateRectangle - + Create a rectangle Crear rectangle @@ -5647,7 +5638,7 @@ El solucionador no ha pogut convergir Sketcher_CreateRectangle_Center - + Create a centered rectangle Crea un rectangle centrat @@ -5655,8 +5646,8 @@ El solucionador no ha pogut convergir Sketcher_CreateSquare - - + + Create a square by its center and by one corner Crea un quadrat donats el centre i un vèrtex @@ -5664,8 +5655,8 @@ El solucionador no ha pogut convergir Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Crea un triangle equilàter donats el centre i un vèrtex @@ -5673,13 +5664,13 @@ El solucionador no ha pogut convergir Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periòdic per punts de control - - + + Create a periodic B-spline by control points Crea un B-spline periòdic donats els punts de control @@ -6312,36 +6303,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Error @@ -6361,45 +6352,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6409,18 +6400,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6430,49 +6421,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6482,7 +6473,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6492,27 +6483,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6522,13 +6513,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6536,13 +6527,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6648,12 +6639,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Crea una B-spline per nusos - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Crea una B-spline per nusos, p. ex. per interpolació, en el croquis. @@ -6661,12 +6652,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Crea una B-spline periòdica per nusos - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Crea una B-spline periòdica per nusos, p. ex. per interpolació, en el croquis. @@ -6674,12 +6665,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Cota - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6691,14 +6682,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Cota + + + + Dimension tools. + Dimension tools. + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts index dc351b1e0f..88af02a878 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts @@ -37,7 +37,7 @@ Switches between showing and hiding the knot multiplicity for all B-splines - Přepne mezi zobrazením a skrytím násobnosti uzlů pro všechny B-splajny + Přepne mezi zobrazením a skrytím násobnosti uzlů všech B-splajnů
@@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy - Create carbon copy + Vytvořit kopii náčrtu - + Copy the geometry of another sketch Zkopírovat geometrii jiného náčrtu @@ -100,27 +100,27 @@ Zobrazit/skrýt informační vrstvu B-splajnu - + Show/hide B-spline degree Zobrazit/skrýt stupeň B-splajnu - + Show/hide B-spline control polygon Zobrazit/skrýt kontrolní polygon B-splajnu - + Show/hide B-spline curvature comb Zobrazit/skrýt graf křivosti B-splajnu - + Show/hide B-spline knot multiplicity Zobrazit/skrýt násobnost uzlů B-splajnu - + Show/hide B-spline control point weight Zobrazit/skrýt váhu řídicích bodů B-splajnu @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Vazba oblouku nebo kružnice - + Constrain an arc or a circle Vazba oblouku nebo kružnice - + Constrain radius Vazba poloměru - + Constrain diameter Vazba průměru - + Constrain auto radius/diameter Vazba automatický rádius/průměr @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Vytvoř oblouk - + Create an arc in the sketcher Vytvoří oblouk v náčrtu - + Center and end points Střed a koncové body - + End points and rim point Koncové body a okrajový bod @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Vytvoří B-splajn - + Create a B-spline in the sketch Vytvoří B-splajn v náčrtu @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Vytvoř kružnici - + Create a circle in the sketcher Vytvoří kružnici v náčrtu - + Center and rim point Střed a okrajový bod - + 3 rim points 3 okrajové body @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic - Create conic + Vytvořit kuželosečku - + Create a conic in the sketch Vytvoří kuželosečku v náčrtu - + Ellipse by center, major radius, point Elipsa pomocí středu, hlavní poloosy a bodu - + Ellipse by periapsis, apoapsis, minor radius Elipsa pomocí perihélia, afélia a vedlejší poloosy - + Arc of ellipse by center, major radius, endpoints Oblouk elipsy pomocí středu, hlavní poloosy a koncových bodů - + Arc of hyperbola by center, major radius, endpoints Oblouk hyperboly od středu, hlavní poloměr, koncové body - + Arc of parabola by focus, vertex, endpoints Oblouk paraboly pomocí ohniska, vrscholu, koncových bodů @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Vytvořit zaoblení - + Create a fillet between two lines Vytvořit zaoblení mezi dvěma úsečkami - + Sketch fillet Náčrt zaoblení - + Constraint-preserving sketch fillet Náčrt zaoblení se zachováním vazeb @@ -299,17 +299,17 @@ Vytvoří obdélník v náčrtu - + Rectangle Obdélník - + Centered rectangle Vystředěný obdélník - + Rounded rectangle Zaoblený obdélník @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Vytvoří pravidelný mnohoúhelník - + Create a regular polygon in the sketcher Vytvoří pravidelný mnohoúhelník v náčrtu - + Triangle Trojúhelník - + Square Čtverec - + Pentagon Pětiúhelník - + Hexagon Šestiúhelník - + Heptagon Sedmiúhelník - + Octagon Osmiúhelník - + Regular polygon Pravidelný n-úhelník @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modifikovat násobnost uzlu - + Modifies the multiplicity of the selected knot of a B-spline Modifikuje násobnost vybraného uzlu B-splajnu - + Increase knot multiplicity Zvýšit násobnost uzlu - + Decrease knot multiplicity Snížit násobnost uzlu @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Vazba úhlu - + Fix the angle of a line or the angle between two lines Zadá úhel čáry nebo úhel mezi dvěma čarami @@ -401,38 +401,38 @@ CmdSketcherConstrainBlock - + Constrain block - Bloková vazba + Vazba blokace - + Block the selected edge from moving - Blokování pohybu vybrané hrany + Blokuje pohyb vybrané hrany CmdSketcherConstrainCoincident - + Constrain coincident Vazba totožnosti - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses - Vytvořte souosou vazbu mezi body nebo soustřednou vazbu mezi kružnicemi, oblouky a elipsami + Vytvoří souosou vazbu mezi body nebo soustřednou vazbu mezi kružnicemi, oblouky a elipsami CmdSketcherConstrainDiameter - + Constrain diameter Vazba průměru - + Fix the diameter of a circle or an arc Zadá průměr kružnice nebo oblouku @@ -440,25 +440,25 @@ CmdSketcherConstrainDistance - + Constrain distance Vazba vzdálenosti - + Fix a length of a line or the distance between a line and a vertex or between two circles - Fixujte délku čáry nebo vzdálenost mezi čárou a vrcholem nebo mezi dvěma kružnicemi + Zadá délku čáry nebo vzdálenost mezi čárou a vrcholem nebo mezi dvěma kružnicemi CmdSketcherConstrainDistanceX - + Constrain horizontal distance - Vazba svislé vzdálenosti + Vazba vodorovné vzdálenosti - + Fix the horizontal distance between two points or line ends Zadá vodorovnou vzdálenost mezi dvěma body nebo konci čáry @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Vazba svislé vzdálenosti - + Fix the vertical distance between two points or line ends Zadá svislou vzdálenost mezi dvěma body nebo konci čáry @@ -479,79 +479,78 @@ CmdSketcherConstrainEqual - + Constrain equal - Zadat jako shodné + Vazba shodnosti - + Create an equality constraint between two lines or between circles and arcs - Vytvoří zadání rovnosti mezi dvěma čarami, kruhy nebo oblouky + Vytvoří shodnost mezi dvěma čarami, kruhy nebo oblouky CmdSketcherConstrainHorizontal - + Constrain horizontally - Vazba horizontálně + Vazba vodorovně - + Create a horizontal constraint on the selected item - Vytvoř vodorovnou vazbu na vybranou položku + Vytvoří vodorovnou vazbu na vybranou položku CmdSketcherConstrainLock - + Constrain lock - Vazba uzamknout + Vazba uzamknutí - + Create both a horizontal and a vertical distance constraint on the selected vertex - Vytvoření vodorovné i svislé vazby vzdálenosti -na vybraném vrcholu + Vytvoří vodorovnou i svislou vazbu vzdálenosti na vybraném vrcholu CmdSketcherConstrainParallel - + Constrain parallel Vazba rovnoběžnosti - + Create a parallel constraint between two lines - Vytvoř vazbu rovnoběžnosti mezi dvěma úsečkami + Vytvoří rovnoběžnost mezi dvěma čarami CmdSketcherConstrainPerpendicular - + Constrain perpendicular - Zadání kolmosti + Vazba kolmosti - + Create a perpendicular constraint between two lines - Vytvoří kolmou vazbu mezi dvěma čarami + Vytvoří kolmost mezi dvěma čarami CmdSketcherConstrainPointOnObject - + Constrain point onto object - Zadá bod na objektu + Vazba bodu k objektu - + Fix a point onto an object Umístí bod na objekt @@ -559,12 +558,12 @@ na vybraném vrcholu CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Vazba automatický rádius/průměr - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fixujte průměr, pokud je vybrána kružnice, nebo poloměr, pokud je vybrán oblouk/spline pól @@ -572,80 +571,80 @@ na vybraném vrcholu CmdSketcherConstrainRadius - + Constrain radius or weight - Zadání poloměru nebo váhy + Vazba poloměru nebo váhy - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Definuje poloměr kružnice nebo oblouku nebo definuje váhu pólu B-splajnu + Zadá poloměr kružnice nebo oblouku nebo zadá váhu pólu B-splajnu CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) - Vazba refrakce (Snellův zákon) + Vazba lomu (Snellův zákon) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. - Vytvořte omezení podle zákona lomu (Snellův zákon) mezi dvěma koncovými body paprsků -a hrana jako rozhraní. + Vytvoří vazbu podle zákona lomu (Snellův zákon) mezi +dvěma koncovými body paprsků a hranou jako rozhraní. CmdSketcherConstrainSymmetric - + Constrain symmetrical - Zadá jako symetrické + Vazba symetrie - + Create a symmetry constraint between two points with respect to a line or a third point - Vytvoří symetrickou vazbu mezi dvěma body vzhledem k čáře nebo třetímu bodu + Vytvoří symetrii mezi dvěma body vzhledem k čáře nebo třetímu bodu CmdSketcherConstrainTangent - + Constrain tangent - Zadá tečnost + Vazba tečnosti - + Create a tangent constraint between two entities - Zadá tečnost mezi dvěma objekty + Vytvoří tečnost mezi dvěma objekty CmdSketcherConstrainVertical - + Constrain vertically Vazba svisle - + Create a vertical constraint on the selected item - Vytvoří vazbu svislosti na vybranou položku + Vytvoří svislou vazbu na vybranou položku CmdSketcherConvertToNURBS - + Convert geometry to B-spline Převést geometrii na B-splajn - + Converts the selected geometry to a B-spline Převede vybranou geometrii na B-splajn @@ -666,12 +665,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Vytvoř oblouk třemi body - + Create an arc by its end points and a point along the arc Vytvoří oblouk jeho koncovými body a bodem podél oblouku @@ -679,12 +678,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Vytvoř kružnici třemi body - + Create a circle by 3 perimeter points Vytvoř kružnici třemi obvodovými body @@ -692,12 +691,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Vytvoř oblouk podle středu - + Create an arc by its center and by its end points Vytvoří oblouk podle jeho středu a skrz jeho koncové body @@ -705,12 +704,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse - Create arc of ellipse + Vytvořit oblouk elipsy - + Create an arc of ellipse in the sketch Vytvoří oblouk elipsy v náčrtu @@ -718,25 +717,25 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola - Create arc of hyperbola + Vytvořit oblouk hyperboly - + Create an arc of hyperbola in the sketch - Vytvořit oblouk hyperboly ve skice + Vytvoří oblouk hyperboly v náčrtu CmdSketcherCreateArcOfParabola - + Create arc of parabola - Create arc of parabola + Vytvořit oblouk paraboly - + Create an arc of parabola in the sketch Vytvoří oblouk paraboly v náčrtu @@ -744,25 +743,25 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Vytvoří B-splajn - + Create a B-spline by control points in the sketch. - Create a B-spline by control points in the sketch. + Vytvoří B-splajn pomocí kontrolních bodů v náčrtu. CmdSketcherCreateCircle - + Create circle Vytvoř kružnici - + Create a circle in the sketch Vytvoří kružnici v náčrtu @@ -770,12 +769,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Vytvoří elipsu pomocí 3 bodů - + Create an ellipse by 3 points in the sketch Vytvoří elipsu pomocí 3 bodů v náčrtu @@ -783,12 +782,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Vytvoří elipsu pomocí středu - + Create an ellipse by center in the sketch Vytvoří elipsu pomocí středu v náčrtu @@ -796,12 +795,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Vytvořit zaoblení - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +808,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Vytvoří sedmiúhelník - + Create a heptagon in the sketch Vytvoří sedmiúhelník v náčrtu @@ -822,12 +821,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Vytvoří šestiúhelník - + Create a hexagon in the sketch Vytvoří šestiúhelník v náčrtu @@ -861,12 +860,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Vytvoří osmiúhelník - + Create an octagon in the sketch Vytvoří osmiúhelník v náčrtu @@ -874,12 +873,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Vytvoří pětiúhelník - + Create a pentagon in the sketch Vytvoří pětiúhelník v náčrtu @@ -887,25 +886,25 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Vytvoří periodický B-splajn - + Create a periodic B-spline by control points in the sketch. - Create a periodic B-spline by control points in the sketch. + Vytvoří periodický B-splajn pomocí kontrolních bodů v náčrtu. CmdSketcherCreatePoint - + Create point Vytvoř bod - + Create a point in the sketch Vytvoří bod v náčrtu @@ -913,12 +912,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Vytvořit zaoblení zachovávající rohy - + Fillet that preserves intersection point and most constraints Zaoblení, které zachovává průsečík a většinu vazeb @@ -926,12 +925,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Vytvoř lomenou čáru - + Create a polyline in the sketch. 'M' Key cycles behaviour Vytvoří lomenou čáru v náčrtu. Klávesa 'M' mění chování @@ -965,12 +964,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Vytvoří pravidelný mnohoúhelník - + Create a regular polygon in the sketch Vytvoří pravidelný mnohoúhelník v náčrtu @@ -978,25 +977,25 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Vytvoř drážku - + Create a slot in the sketch - Vytvoří drážku ve skice + Vytvoří drážku v náčrtu CmdSketcherCreateSquare - + Create square Vytvoří čtverec - + Create a square in the sketch Vytvoří čtverec v náčrtu @@ -1004,12 +1003,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Vytvoří rovnostranný trojúhelník - + Create an equilateral triangle in the sketch Vytvoří rovnostranný trojúhelník v náčrtu @@ -1017,12 +1016,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Snížit stupeň B-splajnu - + Decreases the degree of the B-spline Sníží stupeň B-splajnu @@ -1030,12 +1029,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Snížit násobnost uzlu - + Decreases the multiplicity of the selected knot of a B-spline Snížit násobnost vybraného uzlu B-splajnu @@ -1071,7 +1070,7 @@ with respect to a line or a third point Edit sketch - Upravit skicu + Upravit náčrt @@ -1082,12 +1081,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Prodloužit hranu - + Extend an edge with respect to the picked position Prodlouží hranu vzhledem k vybrané pozici @@ -1095,12 +1094,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry - Create external geometry + Vytvořit vnější geometrii - + Create an edge linked to an external geometry Vytvořit hranu spojenou s vnější geometií @@ -1108,12 +1107,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Zvýšit stupeň B-splajnu - + Increases the degree of the B-spline Zvýšit stupeň B-splajnu @@ -1121,12 +1120,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Zvýšit násobnost uzlu - + Increases the multiplicity of the selected knot of a B-spline Zvýší násobnost vybraného uzlu B-splajnu @@ -1134,12 +1133,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Vložit uzel - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Vloží uzel na zadaný parametr. Pokud uzel v tomto parametru již existuje, je jeho násobnost zvýšena o jeden. @@ -1147,12 +1146,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Spojit křivky - + Join two curves at selected end points Připojte se ke dvěma křivkám ve vybraných koncových bodech @@ -1375,12 +1374,12 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. Select horizontal axis - Vybere horizontální osu + Vybrat vodorovnou osu Select the local horizontal axis of the sketch - Vybrat lokální horizontální osu náčrtu + Vybere lokální vodorovnou osu náčrtu @@ -1439,12 +1438,12 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. CmdSketcherSplit - + Split edge Rozdělit hranu - + Splits an edge into two while preserving constraints Rozdělí hranu na dvě se zachováním vazeb @@ -1465,12 +1464,12 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. CmdSketcherSwitchVirtualSpace - + Switch virtual space Přepne virtuální prostor - + Switches the selected constraints or the view to the other virtual space Přepne vybrané vazby nebo pohled do dalšího virtuálního prostoru @@ -1491,12 +1490,12 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktivovat/deaktivovat vazbu - + Activates or deactivates the selected constraints Aktivuje nebo deaktivuje vybrané vazby @@ -1517,12 +1516,12 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Přepnout řídící/referenční vazbu - + Set the toolbar, or the selected constraints, into driving or reference mode Nastavit panel nástrojů nebo vybrané vazby @@ -1532,12 +1531,12 @@ do řídícího nebo referenčního režimu CmdSketcherTrimming - + Trim edge Oříznout hranu - + Trim an edge with respect to the picked position Oříznout hranu podle vybrané polohy @@ -1585,7 +1584,7 @@ neplatných vazeb, degenerované geometrie atd. View sketch - Zobrazit skicu + Zobrazit náčrt @@ -1596,369 +1595,370 @@ neplatných vazeb, degenerované geometrie atd. Command - - + + Add horizontal constraint Přidat vodorovnou vazbu - - - + + + Add horizontal alignment Přidat vodorovné zarovnání - - + + Add vertical constraint Přidat vertikální vazbu - + Add vertical alignment Přidat svislé zarovnání - + Add 'Lock' constraint Přidat vazbu 'Uzamčení' - + Add relative 'Lock' constraint Přidat vazbu relativního 'Uzamčení' - + Add fixed constraint Přidat pevnou vazbu - + Add 'Block' constraint - Přidat vazbu 'Blok' + Přidat vazbu 'Blokace' - + Add block constraint - Přidat blokovou vazbu + Přidat vazbu blokace - - - + + + Add coincident constraint - Přidat vazbu shodnosti + Přidat vazbu totožnosti - - + + Add distance from horizontal axis constraint Přidat vazbu vzdálenosti od vodorovné osy - - + + Add distance from vertical axis constraint Přidat vazbu vzdálenosti od svislé osy - - + + Add point to point distance constraint Přidat vazbu vzdálenosti dvou bodů - - - + + + Add point to line Distance constraint Přidat vazbu vzdálenosti bodu a čáry - - + + Add circle to circle distance constraint Přidat kruh do kružnice – omezení vzdálenosti - + Add circle to line distance constraint Přidání vazby vzdálenosti kružnice od čáry - - - - - + + + + + + Add length constraint Přidat vazbu délky - - + + Dimension Rozměr - + Add lock constraint - Add lock constraint + Přidat vazbu uzamčení - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Přidat vazbu 'Vzdálenost k počátku' - - - + + + Add Distance constraint - Add Distance constraint + Přidat vazbu vzdálenosti - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Přidat 'Vodorovné' vazby - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Přidat 'Vertikální' vazby + + Add Symmetry constraint + Přidat vazbu symetrie + + + + + Add Symmetry constraints + Přidat vazby symetrie + + + + + Add Distance constraints + Přidat vazby vzdálenosti + + + + Add Horizontal constraint + Přidat vodorovnou vazbu + + + + Add Vertical constraint + Přidat vertikální vazbu + + + Add Block constraint - Add Block constraint + Přidat vazbu blokace - + Add Angle constraint - Add Angle constraint + Přidat vazbu úhlu - - - + + + Add Equality constraint - Add Equality constraint + Přidat vazbu rovnosti - + Add Equality constraints - Add Equality constraints + Přidat vazby rovnosti - + Add Radius constraint - Add Radius constraint + Přidat vazbu poloměru - + Add concentric and length constraint - Add concentric and length constraint + Přidat soustřednou a délkovou vazbu - + Add DistanceX constraint - Add DistanceX constraint + Přidat vazbu vodorovné vzdálenosti - + Add DistanceY constraint - Add DistanceY constraint + Přidat vazbu svislé vzdálenosti - + Add point to circle Distance constraint - Add point to circle Distance constraint + Přidat vazbu vzdálenosti bodu od kružnice - - + + Add point on object constraint Přidat vazbu bodu na objektu - - + + Add point to point horizontal distance constraint Přidat vazbu vodorovné vzdálenosti dvou bodů - + Add fixed x-coordinate constraint Přidat vazbu pevné souřadnice x - - + + Add point to point vertical distance constraint Přidat vazbu svislé vzdálenosti dvou bodů - + Add fixed y-coordinate constraint Přidat vazbu pevné souřadnice y - - + + Add parallel constraint Přidat paralelní vazbu - - - - - - - + + + + + + + Add perpendicular constraint Přidat kolmou vazbu - + Add perpendicularity constraint Přidat vazbu kolmosti - + Swap coincident+tangency with ptp tangency Prohodit shodnost+tečnost s tečností v bodech - + Swap PointOnObject+tangency with point to curve tangency Bod na křivce + tečnost prohodit s tečností v bodě křivky - - - - - - - + + + + + + + Add tangent constraint Přidat vazbu tečnosti - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Přidat vazbu bodu tečnosti - - - - + + + + Add radius constraint Přidat vazbu poloměru - - - - + + + + Add diameter constraint Přidat vazbu průměru - - - - + + + + Add radiam constraint Přidat vazbu poloměr-průměr - - - - - - + + + + + + Add angle constraint Přidat úhlovou vazbu - - + + Add equality constraint Přidat vazbu rovnosti - - - - - + + + + + Add symmetric constraint Přidat vazbu symetrie - + Add Snell's law constraint Přidat vazbu Snellova zákona - + Toggle constraint to driving/reference Přepnout vazbu na řídící/referenční - + Activate/Deactivate constraint Aktivovat/Deaktivovat vazbu @@ -2018,44 +2018,44 @@ neplatných vazeb, degenerované geometrie atd. Přidat vystředěný obdélník - + Add rounded rectangle Přidat zaoblený obdélník - + Add line to sketch wire Přidat čáru k drátu náčrtu - + Add arc to sketch wire Přidat oblouk k drátu náčrtu - - + + Add sketch arc Přidat oblouk náčrtu - - + + Add sketch circle Přidat kružnici náčrtu - + Add sketch ellipse Přidat elipsu náčrtu - + Add sketch arc of ellipse Přidat oblouk náčrtu elipsy - + Add sketch arc of hyperbola Přidat oblouk náčrtu hyperboly @@ -2075,33 +2075,33 @@ neplatných vazeb, degenerované geometrie atd. Přidat bod náčrtu - - + + Create fillet Vytvořit zaoblení - + Trim edge Oříznout hranu - + Extend edge Prodloužit hranu - + Split edge Rozdělit hranu - + Add external geometry Přidat vnější geometrii - + Add slot Přidat drážku @@ -2111,37 +2111,37 @@ neplatných vazeb, degenerované geometrie atd. Přidat šestiúhelník - + Convert to NURBS Převést na NURBS - + Increase spline degree Zvýšit stupeň splajnu - + Decrease spline degree Snížit stupeň splajnu - + Increase knot multiplicity Zvýšit násobnost uzlu - + Decrease knot multiplicity Snížit násobnost uzlu - + Insert knot Vložit uzel - + Join Curves Připojte se ke křivkám @@ -2181,12 +2181,12 @@ neplatných vazeb, degenerované geometrie atd. Odstranit osové zarovnání - + Toggle constraints to the other virtual space Přepnout vazby do jiného virtuálního prostoru - + @@ -2194,7 +2194,7 @@ neplatných vazeb, degenerované geometrie atd. Aktualizovat virtuální prostor vazby - + Add auto constraints Přidat automatické vazby @@ -2234,9 +2234,9 @@ neplatných vazeb, degenerované geometrie atd. Přidat uzel - + Create a carbon copy - Vytvořit kopii + Vytvořit kopii náčrtu @@ -2250,37 +2250,37 @@ neplatných vazeb, degenerované geometrie atd. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Chyba automatických vazeb: Neřešitelný náčrt při aplikaci vazeb totožnosti. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Chyba automatických vazeb: Neřešitelný náčrt při aplikaci svislých/vodorových vazeb. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Chyba automatických vazeb: Neřešitelný náčrt při aplikaci vazeb rovnosti. - + Autoconstrain error: Unsolvable sketch without constraints. Chyba automatických vazeb: Neřešitelný náčrt bez vazeb. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Chyba automatických vazeb: Neřešitelný náčrt po aplikaci vodorových a svislých vazeb. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Chyba automatických vazeb: Neřešitelný náčrt po aplikaci vazeb bod-bod. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Chyba automatických vazeb: Neřešitelný náčrt po aplikaci vazeb rovnosti. @@ -2389,7 +2389,7 @@ neplatných vazeb, degenerované geometrie atd. Sketch mapping - Skica mapování + Mapování náčrtu @@ -2405,143 +2405,143 @@ neplatných vazeb, degenerované geometrie atd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2557,9 +2557,9 @@ neplatných vazeb, degenerované geometrie atd. - - - + + + Wrong selection Neplatný výběr @@ -2567,7 +2567,7 @@ neplatných vazeb, degenerované geometrie atd. Select edge(s) from the sketch. - Vyberte hrany ze skicy. + Vyberte hranu/hrany z náčrtu. @@ -2580,329 +2580,329 @@ neplatných vazeb, degenerované geometrie atd. Vazba vzdálenosti - + Cannot add a constraint between two external geometries. Nelze přidat vazbu mezi dvěma vnějšími geometriemi. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nelze přidat vazbu mezi dvě pevné geometrie. Pevné geometrie obsahují vnější geometrii, blokovanou geometrii a speciální body jako jsou uzly B-splajnu. - + Sketcher Constraint Substitution Nahrazení vazeb náčrtu - + Keep notifying me of constraint substitutions Informovat o nahrazování vazeb - - - + + + Only sketch and its support are allowed to be selected. Vybrán může být pouze náčert a jeho podpora. - + One of the selected has to be on the sketch. Jeden z vybraných musí být na náčrt. - - + + Select an edge from the sketch. Vyber hranu z náčrtu. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemožné omezení - - - - + + + + The selected edge is not a line segment. Vybraný okraj není segment čáry. - - - - - - + + + + + + Double constraint Dvojité omezení - - - - - + + + + + The selected edge already has a horizontal constraint! - Vybraná hrana již má horizontální vazbu! + Vybraná hrana již má vodorovnou vazbu! - - - + + + The selected edge already has a vertical constraint! Vybraná hrana již má vertikální vazbu! - - - - - - + + + + + + The selected edge already has a Block constraint! - Vybraná hrana již má blokovou vazbu! + Vybraná hrana již má vazbu blokace! - + The selected item(s) can't accept a horizontal constraint! Vybrané položky nemohou přijmout vodorovnou vazbu! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Je vybráno více pevných bodů. Vyberte nejvýše jeden pevný bod! - + The selected item(s) can't accept a vertical constraint! Vybrané položky nemohou přijmout svislou vazbu! - - - + + + Select vertices from the sketch. Vyberte vrcholy z náčrtu. - + Select one vertex from the sketch other than the origin. Vyberte jeden vrchol z náčrtu jiný než počátek. - + Select only vertices from the sketch. The last selected vertex may be the origin. Vyberte jen vrcholy z náčrtu. Poslední vybraný vrchol může být počátek. - + Wrong solver status Špatný status řešiče - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - Bloková vazba nemůže být přidána, pokud je náčrt nevyřešený nebo pokud obsahuje nadbytečné či konfliktní vazby. + Vazba blokace nemůže být přidána, pokud je náčrt nevyřešený nebo pokud obsahuje nadbytečné či konfliktní vazby. - + Select one edge from the sketch. Vyberte jednu hranu z náčrtu. - + Select only edges from the sketch. Vyberte pouze hrany z náčrtu. - + Number of selected objects is not 3 Počet vybraných objektů není 3 - - - + + + Error Chyba - + Unexpected error. More information may be available in the Report View. Neočekávaná chyba. Více informací může být k dispozici v zobrazení zprávy. - + Endpoint to endpoint tangency was applied instead. Namísto toho byla aplikována tečnost v koncových bodech. - + Select two or more points from the sketch. Vyberte dva nebo více bodů z náčrtu. - + Select two or more vertices from the sketch. Vyberte dva nebo více vrcholů z náčrtu. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - Vyberte dva nebo více vrcholů ze skici pro shodnou vazbu nebo dvě nebo více kružnic, elips, oblouků nebo oblouků elips pro soustřednou vazbu. + Vyberte dva nebo více vrcholů z náčrtu pro vazbu totožnosti nebo dvě nebo více kružnic, elips, oblouků nebo oblouků elips pro soustřednou vazbu. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - Vyberte dva vrcholy ze skici pro shodnou vazbu nebo dvě kružnice, elipsy, oblouky nebo oblouky elipsy pro soustřednou vazbu. + Vyberte dva vrcholy z náčrtu pro vazbu totožnosti nebo dvě kružnice, elipsy, oblouky nebo oblouky elipsy pro soustřednou vazbu. - + Select exactly one line or one point and one line or two points from the sketch. - Vyberte právě jednu úsečku nebo jeden bod a úsečku nebo dva body ze skici. + Vyberte právě jednu úsečku nebo jeden bod a úsečku nebo dva body z náčrtu. - + Cannot add a length constraint on an axis! Nelze přidat délkovou vazbu osy! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. - Vyberte přesně jednu čáru nebo jeden bod a jednu čáru nebo dva body nebo dvě kružnice ze skici. + Vyberte přesně jednu čáru nebo jeden bod a jednu čáru nebo dva body nebo dvě kružnice z náčrtu. - + This constraint does not make sense for non-linear curves. Tato vazba nedává smysl pro nelineární křivky. - + Endpoint to edge tangency was applied instead. Namísto toho byla použita tečnost hrany v koncovém bodě. - - - - - - - + + + + + + + Select the right things from the sketch. Výberte správné věci z náčrtu. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Vyberte hranu, která není váhou B-splajnu. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Žádný z vybraných bodů nebyl napojen na příslušnou křivku, protože jsou součástí téhož elementu nebo tvoří oba vnější geometrii. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Žádný z vybraných bodů nebyl napojen na příslušnou křivku, protože jsou buď součístí téhož elementu nebo tvoří oba vnější geometrii. - - - - + + + + Select exactly one line or up to two points from the sketch. - Vyberte právě jednu úsečku nebo až dva body ze skici. + Vyberte právě jednu úsečku nebo až dva body z náčrtu. - + Cannot add a horizontal length constraint on an axis! Nelze přidat vodorovnou délkovou vazbu osy! - + Cannot add a fixed x-coordinate constraint on the origin point! Nelze přidat vazbu souřadnice x na počátek souřadnic! - - + + This constraint only makes sense on a line segment or a pair of points. Tato vazba má smysl pouze na segmentu čáry nebo na dvojici bodů. - + Cannot add a vertical length constraint on an axis! Nelze přidat svislou délkovou vazbu osy! - + Cannot add a fixed y-coordinate constraint on the origin point! Nelze přidat vazbu souřadnice y na počátek souřadnic! - + Select two or more lines from the sketch. - Vyberte dvě nebo více úseček ze skici. + Vyberte dvě nebo více úseček z náčrtu. - - + + Select at least two lines from the sketch. - Vyberte nejméně dvě úsečky ze skici. + Vyberte nejméně dvě úsečky z náčrtu. - + Select a valid line. Vyberte platnou úsečku. - - + + The selected edge is not a valid line. Vybraná hrana není platnou úsečkou. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; dvě křivky a bod. - + Select some geometry from the sketch. perpendicular constraint Vyberte geometrii z náčrtu. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nelze přidat kolmou vazbu na volný bod! - - - + + + Perpendicular to B-spline edge currently unsupported. Kolmost na hranu B-splajnu momentálně není podpofována. - - + + One of the selected edges should be a line. Jedna z vybraných hran by měla být úsečka. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. - Byla aplikována tečnost v koncových bodech. Vazba shodnosti byla smazána. + Byla aplikována tečnost v koncových bodech. Vazba totožnosti byla smazána. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Byla použita tečnost hrany v koncovém bodě. Vazba bodu na objektu byla smazána. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,279 +2957,279 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; dvě křivky a bod. - + Select some geometry from the sketch. tangent constraint Vyberte geometrii z náčrtu. - - - + + + Cannot add a tangency constraint at an unconnected point! Nelze přidat tangentní vazbu na volný bod! - - + + Tangent constraint at B-spline knot is only supported with lines! Omezení tečny u B-spline uzlu je podporováno pouze čarami! - + B-spline knot to endpoint tangency was applied instead. Místo toho byl použit uzel B-spline k tečnosti koncového bodu. - + Select either one point and several curves, or one curve and several points. Vyberte buď jeden bod a několik křivek, nebo jednu křivku a několik bodů. - - + + Wrong number of selected objects! Nesprávný počet vybraných objektů! - - + + With 3 objects, there must be 2 curves and 1 point. Mezi třemi objekty musí být 2 křivky a 1 bod. - - - + + + Tangency to B-spline edge currently unsupported. Tangentnost na hranu B-splajnu momentálně není podporována. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Vyberte jeden nebo více oblouků nebo kružnic z náčrtu. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Vyberte buď pouze jeden nebo více pólů B-Splajnu nebo pouze jeden oblouk nebo kružnici z náčrtu, ale ne jejich kombinace. - - - + + + Constraint only applies to arcs or circles. Vazbu lze použít jen na oblouky nebo kružnice. - - + + Select one or two lines from the sketch. Or select two edges and a point. Vyberte jednu nebo dvě úsečky z náčrtu. Nebo vyberte dvě hrany a bod. - - + + Parallel lines Rovnoběžné úsečky - - + + An angle constraint cannot be set for two parallel lines. Úhlová vazba nemůže být nastavena pro dvě rovnoběžné úsečky. - + Cannot add an angle constraint on an axis! Nelze přidat úhlovou vazbu na osu! - + Select two edges from the sketch. - Vyberte dvě hrany ze skici. + Vyberte dvě hrany z náčrtu. - + Select two or more compatible edges. Vyberte dvě nebo více kompatibilních hran. - + Sketch axes cannot be used in equality constraints. Osy náčrtu nelze použít pro vazby rovnosti. - + Equality for B-spline edge currently unsupported. Shodnost pro hranu B-splajnu momentálně není podporována. - - - - + + + + Select two or more edges of similar type. Vyberte dvě nebo více hran podobného typu. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Vyberte dva body a čáru symetrie, dva body a bod symetrie nebo čáru a bod symetrie z náčrtu. - - + + Cannot add a symmetry constraint between a line and its end points. Nelze přidat vazbu symetrie mezi čárou a jejími koncovými body. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nelze přidat symetrickou vazbu mezi úsečku a její koncový bod! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Vyberte koncové body úsečky představující paprsek a hranu reprezentující rozhraní. První vybraný bod odpovídá indexu n1, druhý indexu n2, zadává se hodnota poměru n2/n1. - + Selected objects are not just geometry from one sketch. Vybrané objekty nejsou geometrií jednoho náčrtu. - + Cannot create constraint with external geometry only. Nejde vytvořit vazbu jen s vnější geometrií. - + Incompatible geometry is selected. Je vybrána nekompatibilní geometrie. - + SnellsLaw on B-spline edge is currently unsupported. Snellův zákon na hraně B-splajnu momentálně není podporován. - - - - - + + + + + Select constraints from the sketch. Vybrat vazby z náčrtu. - - - + + + Select constraint(s) from the sketch. Vybrat vazbu/y z náčrtu. - + B-Spline Degree Stupeň B-splajnu - + Define B-Spline Degree, between 1 and %1: Definovat stupeň B-Splajnu mezi 1 a %1: - - - + + + CAD Kernel Error Chyba jádra CADu - + None of the selected elements is an edge. Žádný z vybraných prvků není hrana. - - + + At least one of the selected objects was not a B-Spline and was ignored. Alespoň jeden z vybraných objektů nebyl B-splajn a byl vynechán. - - + + The selection comprises more than one item. Please select just one knot. Výběr obsahuje více než jednu položku. Prosím vyberte právě jeden uzel. - - + + Input Error Chyba vstupu - - + + None of the selected elements is a knot of a B-spline Žádný z vybraných prvků není uzlem B-splajnu - - + + Selection is empty - Selection is empty + Výběr je prázdný - + Nothing is selected. Please select a b-spline. Nic není vybráno. Vyberte prosím B-splajn. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Vyberte křivku B-splajn pro vložení uzlu (ne uzel na ni). Pokud křivka není b-splajn, nejprve ji na ni převeďte. - + Nothing is selected. Please select end points of curves. Není vybráno nic. Vyberte prosím koncové body křivek. - + Too many curves on point Příliš mnoho křivek v bodě - - + + Exactly two curves should end at the selected point to be able to join them. Přesně dvě křivky by měly končit ve vybraném bodě, aby bylo možné je spojit. - + Too few curves on point Příliš málo zatáček - + Two end points, or coincident point should be selected. - Měly by být vybrány dva koncové body nebo shodný bod. + Měly by být vybrány dva koncové body nebo totožný bod. @@ -3304,20 +3304,20 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - V současné době není podporováno přesunutí externí geometrie do jiné vizuální vrstvy. Vnější geometrie bude vynechána + V současné době není podporováno přesunutí vnější geometrie do jiné vizuální vrstvy. Vnější geometrie bude vynechána - + Set knot multiplicity Nastavte násobnost uzlu - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Nastavte násobnost uzlu v posledním uvedeném bodě mezi 1 a %1:Všimněte si, že násobnost může být za určitých okolností ignorována. Podrobnosti naleznete v dokumentaci - + Value Error Chyba v hodnotě @@ -3342,7 +3342,7 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; This object belongs to another body and it contains external geometry. Cross-reference not allowed. - Tento objekt patří do jiného těla a obsahuje externí geometrii. Křížové odkazy nejsou povolené. + Tento objekt patří do jiného těla a obsahuje vnější geometrii. Křížové odkazy nejsou povolené. @@ -3380,7 +3380,7 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Coincident - Coincident + Totožnost @@ -3425,7 +3425,7 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Block - Blok + Blokace @@ -3450,7 +3450,7 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Distance - Distance + Vzdálenost @@ -3460,7 +3460,7 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Weight - Tloušťka + Váha @@ -3631,12 +3631,12 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Délka: - + Refractive index ratio Index lomu - + Ratio n2/n1: Poměr n2/n1: @@ -3734,7 +3734,7 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Horizontal Constraint - Horizontální vazba + Vodorovná vazba @@ -3764,7 +3764,7 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Block Constraint - Blokovat vazbu + Vazba blokace @@ -3916,8 +3916,8 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; SketcherGui::PropertyConstraintListItem - - + + Unnamed Nepojmenovaný @@ -4138,30 +4138,30 @@ Vyžaduje znovu otevření editace náčrtu, aby se aktivovalo. Dimension Constraint - Dimension Constraint + Vazba rozměru Dimensioning constraints: - Dimensioning constraints: + Vazbení rozměru: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Vyberte typ vazbení rozměrů pro váš panel nástrojů: +'Jediný nástroj': jeden nástroj pro všechny vazby rozměrů v panelu nástrojů: Vzdálenost, Vzdálenost X / Y, úhel, poloměr. (Ostatní v rozbalovací nabídce) +'Oddělené nástroje': Individuální nástroje pro každou vazbu rozměru. +'Oboje': Budete mít jak nástroj 'Rozměr', tak i oddělené nástroje. +Toto nastavení je pouze pro panel nástrojů. Ať už si vyberete cokoliv, všechny nástroje jsou vždy dostupné v menu a pomocí zkratek. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Režim průměr/poloměr nástroje pro rozměr: @@ -4169,38 +4169,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Při používání nástroje pro rozměr si můžete vybrat, jak pracovat s kružnicemi a oblouky: +'Automaticky': Nástroj bude aplikovat poloměr na oblouky a průměr na kružnice. +'Průměr': Nástroj bude aplikovat průměr na oblouky i kružnice. +'Poloměr': Nástroj bude aplikovat poloměr na oblouky i kružnice. - + Single tool - Single tool + Jediný nástroj - + Separated tools - Separated tools + Oddělené nástroje - + Both - Obě + Oboje - + Auto Automaticky - + Diameter Průměr - + Radius Poloměr @@ -4329,7 +4329,7 @@ This setting is only for the toolbar. Whichever you chose, all tools are always External geometry - Externí geometrie + Vnější geometrie @@ -4484,7 +4484,7 @@ Podporuje všechny jednotkové systémy kromě „US obvyklé“ a „Budování Cursor position coordinates will be displayed beside cursor while editing sketch. - Při úpravě skici se vedle kurzoru zobrazí souřadnice polohy kurzoru. + Při úpravě náčrtu se vedle kurzoru zobrazí souřadnice polohy kurzoru. @@ -4577,17 +4577,17 @@ Výchozí nastavení: %N = %V Hide all objects that depend on the sketch - Skrýt všechny objekty, které závisí na skice + Skrýt všechny objekty, které závisí na náčrtu When opening a sketch, show sources for external geometry links. - Při otevírání náčrtu zobrazit zdroje pro připojení externí geometrie. + Při otevírání náčrtu zobrazit zdroje pro připojení vnější geometrie. Show objects used for external geometry - Zobrazit objekty použité pro externí geometrii + Zobrazit objekty použité pro vnější geometrii @@ -4649,12 +4649,12 @@ Pak jsou objekty viditelné pouze za rovinou náčrtu. Použít na existující náčrty - + Unexpected C++ exception Neočekávaná C++ vyjímka - + Sketcher Náčrt @@ -4662,55 +4662,55 @@ Pak jsou objekty viditelné pouze za rovinou náčrtu. SketcherGui::SketcherValidation - + No missing coincidences Shody nechybí - + No missing coincidences found Chybějící shody nebyly nalezeny - + Missing coincidences Chybějící shody - + %1 missing coincidences found Počet chybějících shod: %1 - + No invalid constraints Neplatné vazby nejsou - + No invalid constraints found Neplatné vazby nenalezeny - + Invalid constraints Neplatné vazby - + Invalid constraints found Byly nalezeny neplatné vazby - - - + + + Reversed external geometry Obrácená vnější geometrie - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4723,7 +4723,7 @@ Ke koncovým bodům je připojeno %2 vazeb. Vazby byly vypsány do Zobrazení re Klikněte na tlačítko "Vyměnit koncové body ve vazbách" pro nové vytvoření koncových bodů. Proveďte to pouze u náčrtů vytvořených ve verzi FreeCADu starší než v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4732,75 +4732,70 @@ However, no constraints linking to the endpoints were found. Nebyly nalezeny vazby připojené k těmto koncovým bodům. - + No reversed external-geometry arcs were found. Nebyly nalezeny žádné oblouky s obrácenou vnější geometrií. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Bylo změněno %1 vazeb připojených ke koncovým bodům obrácených oblouků. - - + + Constraint orientation locking Zamčení orientace vazby - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Zamčení orientace bylo zapnuto a přepočítáno pro %1 vazeb. Vazby byly vypsány do Zobrazení reportu (menu Zobrazit -> Panely -> Zobrazení reportu). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Zamčení orientace bylo vypnuto pro %1 vazeb. Vazby byly vypsány do Zobrazení reportu (menu Zobrazit -> Panely -> Zobrazení reportu). Nicméně pro budoucí vazby je zamčení podle výchozího nastavení zapnuto. - - + + Delete constraints to external geom. Smazat vazby k vnější geometrii. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Chystáte se smazat VŠECHNY vazby spojené s vnější geometrií. Je to užitečné pro záchranu náčrtu s rozbitými/změněnými vazbami na vnější geometrii. Chcete opravdu smazat tyto vazby? - + All constraints that deal with external geometry were deleted. Všechny vazby spojené s vnější geometrií byly smazány. - + No degenerated geometry Žádná degenerovaná geometrie - + No degenerated geometry found Nebyla nalezena žádná degenerovaná geometrie - + Degenerated geometry Degenerovaná geometrie - + %1 degenerated geometry found Nalezena degenerovaná geometrie %1krát SketcherGui::TaskSketcherConstraints - - - Form - Návrh - Check to toggle filters @@ -4875,11 +4870,6 @@ Nebyly nalezeny vazby připojené k těmto koncovým bodům. SketcherGui::TaskSketcherElements - - - Form - Návrh - Check to toggle filters @@ -5065,7 +5055,7 @@ Nebyly nalezeny vazby připojené k těmto koncovým bodům. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Pokročilé ovládání řešiče @@ -5097,7 +5087,7 @@ Je to založeno výhradně na topologickém tvaru náčrtu a ne na jeho prvcích Fixes found missing coincidences by adding extra coincident constrains - Opraví chybějící shody přidáním dalších shodných vazeb + Opraví chybějící totožnosti přidáním dalších vazeb totožnosti @@ -5237,7 +5227,7 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Edit sketch - Upravit skicu + Upravit náčrt @@ -5359,8 +5349,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Přepnout mezi zobrazením a skrytím křivosti všech B-splajnů @@ -5368,8 +5358,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Snížit násobnost vybraného uzlu B-splajnu @@ -5377,8 +5367,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Přepnout mezi zobrazením a skrytím stupně všech B-splajnů @@ -5386,8 +5376,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Zvýší násobnost vybraného uzlu B-splajnu @@ -5395,17 +5385,17 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines - Přepne mezi zobrazením a skrytím násobnosti uzlů pro všechny B-splajny + Přepne mezi zobrazením a skrytím násobnosti uzlů všech B-splajnů Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Přepne mezi zobrazením a skrytím váhy kontrolních bodů všech B-splajnů @@ -5413,8 +5403,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Přepne mezi zobrazením a skrytím kontrolních polygonů všech B-splajnů @@ -5449,8 +5439,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Zadá průměr kružnice nebo oblouku @@ -5458,7 +5448,7 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Opravit poloměr/průměr kružnice nebo oblouku @@ -5466,8 +5456,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Zadá poloměr kružnice nebo oblouku @@ -5475,7 +5465,7 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Opravit poloměr/průměr kružnice nebo oblouku @@ -5492,8 +5482,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Vytvoří oblouk jeho koncovými body a bodem podél oblouku @@ -5501,8 +5491,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Vytvoří kružnici třemi okrajovými body @@ -5510,8 +5500,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Vytvoří oblouk podle jeho středu a skrz jeho koncové body @@ -5519,8 +5509,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Vytvoří oblouk elipsy pomocí středu, hlavní poloosy a koncových bodů @@ -5528,8 +5518,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Vytvoří oblouk hyperboly pomocí středu, hlavního poloměru a koncových bodů @@ -5537,8 +5527,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Vytvoří oblouk paraboly pomocí ohniska, vrcholu a koncových bodů @@ -5546,13 +5536,13 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateBSpline - + B-spline by control points B-splajn pomocí kontrolních bodů - - + + Create a B-spline by control points Vytvoří B-splajn pomocí kontrolních bodů @@ -5560,8 +5550,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Vytvoří kružnici podle jeho středu a skrz okrajový bod @@ -5569,8 +5559,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Vytvoří elipsu pomocí perihélia, afélia a vedlejší poloosy @@ -5578,8 +5568,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Vytvoří elipsu pomocí středu, hlavní poloosy a bodu @@ -5587,8 +5577,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateFillet - - + + Creates a radius between two lines Vytvoří rádius mezi dvěma čarami @@ -5596,8 +5586,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Vytvoří sedmiúhelník pomocí jeho středu a vrcholu @@ -5605,8 +5595,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Vytvoří šestiúhelník pomocí jeho středu a vrcholu @@ -5614,7 +5604,7 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateOblong - + Create a rounded rectangle Vytvořit zaoblený obdélník @@ -5622,14 +5612,14 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Vytvoří osmiúhelník pomocí jeho středu a vrcholu - - + + Create a regular polygon by its center and by one corner Vyvtoří rovnostranný mnohoúhelník pomocí středu a jednoho rohu @@ -5637,8 +5627,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Vytvoří pětiúhelník pomocí jeho středu a vrcholu @@ -5646,8 +5636,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Zaoblení, které zachová omezení a průsečík @@ -5655,7 +5645,7 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateRectangle - + Create a rectangle Vytvořit obdélník @@ -5663,7 +5653,7 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateRectangle_Center - + Create a centered rectangle Vytvořit vystředěný obdélník @@ -5671,8 +5661,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Vytvoří čtverec pomocí jeho středu a vrcholu @@ -5680,8 +5670,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Vytvoří pravidelný trojúhelník pomocí jeho středu a vrcholu @@ -5689,13 +5679,13 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Periodický B-splajn pomocí kontrolních bodů - - + + Create a periodic B-spline by control points Vytvoří periodický B-splajn pomocí kontrolních bodů @@ -5705,17 +5695,17 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. No sketch found - Žádná skica nalezena + Žádný náčrt nenalezen The document doesn't have a sketch - Dokument nemá skicu + Dokument nemá náčrt Select sketch - Vyberte skicu + Vybrat náčrt @@ -6120,12 +6110,12 @@ Eigen Sparse QR algoritmus je optimalizován pro řídké matrice; obvykle rychl Sketcher edit mode - Sketcher edit mode + Režim úprav náčrtu Sketcher geometries - Geometrie skici + Geometrie náčrtu @@ -6150,7 +6140,7 @@ Eigen Sparse QR algoritmus je optimalizován pro řídké matrice; obvykle rychl Sketcher edit tools - Sketcher edit tools + Nástroje úprav náčrtu @@ -6192,7 +6182,7 @@ Eigen Sparse QR algoritmus je optimalizován pro řídké matrice; obvykle rychl Grid Auto Spacing - Automatická mezera mřížek + Automatická rozteč mřížky @@ -6204,7 +6194,7 @@ Eigen Sparse QR algoritmus je optimalizován pro řídké matrice; obvykle rychl Distance between two subsequent grid lines. If 'Grid Auto Spacing' is enabled, will be used as base value. Vzdálenost mezi dvěma následujícími čarami mřížky. -Pokud je povoleno „Automatické rozestupy mřížky“, použije se jako základní hodnota. +Pokud je povolena „Automatická rozteč mřížky“, použije se jako základní hodnota. @@ -6287,7 +6277,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. Grid auto spacing - Grid auto spacing + Automatická rozteč mřížky @@ -6302,7 +6292,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. Distance between two subsequent grid lines. - Distance between two subsequent grid lines. + Vzdálenost mezi dvěma následujícími čarami mřížky. @@ -6328,36 +6318,36 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Chyba @@ -6377,45 +6367,45 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Omezení má neplatné informace o indexu a je chybné. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Neplatná omezení - - - + + + Failed to add arc Nepodařilo se přidat oblouk - + Failed to add arc of ellipse Nepodařilo se přidat oblouk elipsy - + Cannot create arc of hyperbola from invalid angles, try again! Nelze vytvořit oblouk hyperboly z neplatných úhlů, zkuste to znovu! - + Cannot create arc of hyperbola Nelze vytvořit oblouk hyperboly - + Cannot create arc of parabola Nelze vytvořit oblouk paraboly @@ -6425,18 +6415,18 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Chyba při přidávání B-splajnu pole - + Error creating B-spline pole - Error creating B-spline pole + Chyba při vytváření B-splajn pole - - + + Error creating B-spline - Error creating B-spline + Chyba při vytváření B-splajnu - + Error deleting last pole Chyba při odstraňování posledního pole @@ -6446,49 +6436,49 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Nelze přidat uzel - + Cannot add internal alignment points Nelze přidat vnitřní body zarovnání - + Error removing knot Chyba při odstraňování uzlu - + Failed to add carbon copy Přidání kopie se nezdařilo - - + + Failed to add circle Přidání kruhu se nezdařilo - + Failed to add an ellipse Přidání elipsy se nezdařilo - + Failed to extend edge Rozšíření hrany se nezdařilo - + Failed to add external geometry - Přidání externí geometrie se nezdařilo + Přidání vnější geometrie se nezdařilo - + Failed to create fillet - Failed to create fillet + Nepodařilo se vytvořit zaoblení - + Failed to add line Přidání řádku se nezdařilo @@ -6498,7 +6488,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Přidání bodu se nezdařilo - + Failed to add polygon Přidání polygonu se nezdařilo @@ -6508,27 +6498,27 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Přidání pole se nezdařilo - + Failed to add rounded rectangle Nepodařilo se přidat zaokrouhlený obdélník - + Failed to add slot Nepodařilo se přidat pozici - + Failed to add edge Přidání hrany se nezdařilo - + Failed to trim edge Nepodařilo se oříznout okraj - + Value Error @@ -6538,13 +6528,13 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-splajn uzly - - + + Create a B-spline by knots Vytvořit B-splajn uzly @@ -6552,13 +6542,13 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodický B-splajn uzly - - + + Create a periodic B-spline by knots Vytvořit periodický B-splajn uzly @@ -6573,7 +6563,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. New points will snap to the currently preselected object. It will also snap to the middle of lines and arcs. - Nové body přejdou k aktuálně zvolenému objektu. Přicházejí také do středu čar a oblouků. + Nové body se budou přichytávat k aktuálně předvolenému objektu. Budou se přichytávat také do středu čar a oblouků. @@ -6584,18 +6574,18 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. New points will snap to the nearest grid line. Points must be set closer than a fifth of the grid spacing to a grid line to snap. - Nové body se přesunou na nejbližší řádek mřížky. -Body musí být nastaveny blíže než pětina rozestupu mřížky k napnutí mřížky. + Nové body se budou přichytávat k nejbližší čáře mřížky. +Body musí být k lince mřížky blíže než pětina rozteče mřížky, aby se přichytili. Snap angle - Úhel zachytávání + Úhel přichycení Angular step for tools that use 'Snap at Angle' (line for instance). Hold CTRL to enable 'Snap at Angle'. The angle starts from the positive X axis of the sketch. - Angular step for tools that use 'Snap at Angle' (line for instance). Hold CTRL to enable 'Snap at Angle'. The angle starts from the positive X axis of the sketch. + Úhlový krok pro nástroje, které používají 'Přichytávání v úhlu' (například úsečka). Držením klávesy CTRL povolíte "Přichytávání v úhlu". Úhel začíná od kladné osy X náčrtu. @@ -6619,7 +6609,7 @@ Body musí být nastaveny blíže než pětina rozestupu mřížky k napnutí m External Geometry - Externí geometrie + Vnější geometrie @@ -6645,7 +6635,7 @@ Body musí být nastaveny blíže než pětina rozestupu mřížky k napnutí m Toggle the grid in the sketch. In the menu you can change grid settings. - Toggle the grid in the sketch. In the menu you can change grid settings. + Přepnout mřížku v náčrtu. V nabídce můžete změnit nastavení mřížky. @@ -6658,63 +6648,76 @@ Body musí být nastaveny blíže než pětina rozestupu mřížky k napnutí m Toggle all snap functionality. In the menu you can toggle 'Snap to grid' and 'Snap to objects' individually, and change further snap settings. - Toggle all snap functionality. In the menu you can toggle 'Snap to grid' and 'Snap to objects' individually, and change further snap settings. + Přepne všechny funkce přichytávání. V nabídce můžete samostatně přepnout 'Přichycení k mřížce' a 'Přichycení k objektům' a změnit další nastavení přichytávání. CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots - Create B-spline by knots + Vytvořit B-splajn uzly - + Create a B-spline by knots, i.e. by interpolation, in the sketch. - Create a B-spline by knots, i.e. by interpolation, in the sketch. + Vytvoří B-splajn uzly, tj. interpolací, v náčrtu. CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots - Create periodic B-spline by knots + Vytvořit periodický B-splajn uzly - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. - Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. + Vytvoří periodický B-splajn uzly, tj. interpolací, v náčrtu. CmdSketcherDimension - + Dimension Rozměr - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Vazba kontextově založená na vašem výběru. +V závislosti na vašem výběru můžete mít k dispozici několik typů vazby. Procházet jimi můžete pomocí klávesy SHIFT. +Levé kliknutí na prázdné místo ověří aktuální vazbu. Pravým kliknutím nebo stisknutím klávesy Esc se zruší. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Zobrazit/skrýt kruhový pomocník pro oblouky - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Přepne mezi zobrazením a skrytím pomocných kružnic všech oblouků + + + + CmdSketcherCompDimensionTools + + + Dimension + Rozměr + + + + Dimension tools. + Nástroje pro rozměr.
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts index 62325212a1..e2ea952dc9 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Blaupause erstellen - + Copy the geometry of another sketch Kopiert die Geometrie einer anderen Skizze @@ -100,27 +100,27 @@ B-Spline-Informationsschicht ein- / ausblenden - + Show/hide B-spline degree B-Spline-Grad ein- / ausblenden - + Show/hide B-spline control polygon B-Spline-Kontrollpolygon ein- / ausblenden - + Show/hide B-spline curvature comb B-Spline-Krümmungskamm ein- / ausblenden - + Show/hide B-spline knot multiplicity Vielfachheit der B-Spline-Knoten ein- / ausblenden - + Show/hide B-spline control point weight Gewicht der B-Spline-Kontrollpunkte anzeigen / ausblenden @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Bogen oder Kreis festlegen - + Constrain an arc or a circle Krümmung eines Kreisbogens oder Kreises festlegen - + Constrain radius Radius festlegen - + Constrain diameter Durchmesser festlegen - + Constrain auto radius/diameter Automatisch Radius oder Durchmesser festlegen @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Bogen erstellen - + Create an arc in the sketcher Kreisbogen in der Skizze erstellen - + Center and end points Mittel- und Endpunkte - + End points and rim point Endpunkte und Punkt auf Kreisbogen @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline B-Spline erstellen - + Create a B-spline in the sketch B-Spline in der Skizze erstellen @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Kreis erstellen - + Create a circle in the sketcher Einen Kreis in der Skizze erstellen - + Center and rim point Mittelpunkt und Punkt auf Kreisbogen - + 3 rim points Drei Punkte auf Kreisbogen @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Kegelschnitt erstellen - + Create a conic in the sketch Kegelschnitt in der Skizze erstellen - + Ellipse by center, major radius, point Ellipse durch Angabe von Mittelpunkt, Hauptradius und Punkt - + Ellipse by periapsis, apoapsis, minor radius Ellipse durch Periapsis, Apoapsis (Endpunkte der Hauptachse), kleinem Radius - + Arc of ellipse by center, major radius, endpoints Ellipsenbogen durch Angabe von Mittelpunkt, großem Radius und Endpunkten - + Arc of hyperbola by center, major radius, endpoints Hyperbelbogen durch Angabe von Mittelpunkt, Hauptradius sowie den Endpunkten - + Arc of parabola by focus, vertex, endpoints Parabelbogen durch Angabe von Fokus, Scheitelpunkt sowie den Endpunkten @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Verrundung erstellen - + Create a fillet between two lines Erstellt eine Verrundung zwischen zwei Linien - + Sketch fillet Verrundung - + Constraint-preserving sketch fillet Einschränkungserhaltende Verrundung @@ -299,17 +299,17 @@ Rechteck in der Skizze erstellen - + Rectangle Rechteck - + Centered rectangle Zentriertes Rechteck - + Rounded rectangle Abgerundetes Rechteck @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Regelmäßiges Vieleck erstellen - + Create a regular polygon in the sketcher Erstelle ein regelmäßiges Polygon in der Skizze - + Triangle Dreieck - + Square Quadrat - + Pentagon Fünfeck - + Hexagon Sechseck - + Heptagon Siebeneck - + Octagon Achteck - + Regular polygon Regelmäßiges Vieleck @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Vielfachheit eines Spline-Knotens ändern - + Modifies the multiplicity of the selected knot of a B-spline Modifiziert die Vielfachheit eines ausgewählten B-Spline-Knotens - + Increase knot multiplicity Vielfachheit eines Spline-Knotens erhöhen - + Decrease knot multiplicity Vielfachheit eines Spline-Knotens verringern @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Winkel festlegen - + Fix the angle of a line or the angle between two lines Winkel einer Linie (zur horizontalen Skizzenachse) oder Winkel zwischen zwei Linien festlegen @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Fixieren - + Block the selected edge from moving Ausgewählte Kante fixieren @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Koinzidenz festlegen - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Erstellt eine Randbedingung Koinzidenz festlegen zwischen Punkten oder eine Randbedingung Konzentrisch festlegen zwischen Kreisen, Bögen und Ellipsen @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Durchmesser festlegen - + Fix the diameter of a circle or an arc Durchmesser eines Kreises oder Kreisbogens festlegen @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Abstand festlegen - + Fix a length of a line or the distance between a line and a vertex or between two circles Legt die Länge einer Linie, den Abstand zwischen einer Linie und einem Knotenpunkt oder zwischen zwei Kreisen fest @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Horizontalen Abstand festlegen - + Fix the horizontal distance between two points or line ends Den horizontalen Abstand zwischen zwei Punkten oder Streckenenden festlegen @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Vertikalen Abstand festlegen - + Fix the vertical distance between two points or line ends Den vertikalen Abstand zwischen zwei Punkten oder Streckenenden festlegen @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Gleichheit festlegen - + Create an equality constraint between two lines or between circles and arcs Eine Gleichheitsbeschränkung zwischen zwei Linien oder zwischen Kreisen und Bögen festlegen @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Horizontal festlegen - + Create a horizontal constraint on the selected item Eine horizontale Beschränkung für das gewählte Element setzen @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Sperren - + Create both a horizontal and a vertical distance constraint on the selected vertex Erstellt gleichzeitig Randbedingungen für den horizontalen und @@ -520,12 +520,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainParallel - + Constrain parallel Parallel festlegen - + Create a parallel constraint between two lines Legt die Parallelität zweier Geraden fest @@ -533,12 +533,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainPerpendicular - + Constrain perpendicular Rechtwinklig festlegen - + Create a perpendicular constraint between two lines Erstellt eine Randbedingung, die zwei Linien rechtwinklig zueinander festlegt @@ -546,12 +546,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainPointOnObject - + Constrain point onto object Punkt auf Objekt festlegen - + Fix a point onto an object Punkt auf ein Objekt festlegen @@ -559,12 +559,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Automatisch Radius oder Durchmesser festlegen - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Legt den Durchmesser fest, wenn ein Kreis ausgewählt wird, oder den Radius, wenn ein Kreisbogen oder Spline-Kontrollpunkt ausgewählt wird @@ -572,12 +572,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainRadius - + Constrain radius or weight Radius oder Gewicht festlegen - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Legt den Radius eines Kreises oder eines Bogens fest, oder das Gewicht eines B-Spline-Kontrollpunktes @@ -585,12 +585,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Lichtbrechung (nach Snellius-Gesetz) festlegen - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Erstellen Sie eine Lichtbrechung (Snellius-Gesetz) als Einschränkung zwischen zwei Endpunkten der Strahlen und einer Kante als Schnittstelle. @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Symmetrie festlegen - + Create a symmetry constraint between two points with respect to a line or a third point Die Symmetrie zwischen zwei Punkten im Bezug auf eine Linie oder einen dritten Punkt festlegen @@ -613,12 +613,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Tangential festlegen - + Create a tangent constraint between two entities Legt zwei Elementen tangential zueinander fest @@ -626,12 +626,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Vertikal festlegen - + Create a vertical constraint on the selected item Eine vertikale Beschränkung für das gewählte Element setzen @@ -639,12 +639,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Geometrie in B-Spline wandeln - + Converts the selected geometry to a B-spline Wandelt die ausgewählte Geometrie in einen B-Spline @@ -665,12 +665,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Kreisbogen durch drei Punkte erstellen - + Create an arc by its end points and a point along the arc Erstellt einen Kreisbogen durch die Endpunkte und einen Punkt auf dem Bogen @@ -678,12 +678,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Kreis durch drei Punkte erstellen - + Create a circle by 3 perimeter points Kreis erstellen aus drei Punkten auf dem Kreisbogen @@ -691,12 +691,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Bogen aus Mittelpunkt erstellen - + Create an arc by its center and by its end points Erstellt einen Kreisbogen mit Mittelpunkt und durch die Endpunkte @@ -704,12 +704,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Ellipsenbogen erstellen - + Create an arc of ellipse in the sketch Ellipsenbogen in der Skizze erstellen @@ -717,12 +717,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Hyperbelbogen erstellen - + Create an arc of hyperbola in the sketch Hyperbelbogen in der Skizze erstellen @@ -730,12 +730,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Parabelbogen erstellen - + Create an arc of parabola in the sketch Parabelbogen in der Skizze erstellen @@ -743,12 +743,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline B-Spline erstellen - + Create a B-spline by control points in the sketch. B-Spline mittels Kontrollpunkten in der Skizze erstellen. @@ -756,12 +756,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Kreis erstellen - + Create a circle in the sketch Kreis in der Skizze erstellen @@ -769,12 +769,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Ellipse durch 3 Punkte erstellen - + Create an ellipse by 3 points in the sketch Ellipse durch 3 Punkte in der Skizze erstellen @@ -782,12 +782,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Ellipse um Mittelpunkt erstellen - + Create an ellipse by center in the sketch Ellipse um Mittelpunkt in der Skizze erzeugen @@ -795,12 +795,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Abrundung erstellen - + Create a fillet between two lines or at a coincident point Erstellen einer Abrundung zwischen zwei Geraden oder an einem anliegenden Punkt @@ -808,12 +808,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Siebeneck erstellen - + Create a heptagon in the sketch Siebeneck in der Skizze erstellen @@ -821,12 +821,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Sechseck erstellen - + Create a hexagon in the sketch Sechseck in der Skizze erstellen @@ -860,12 +860,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Achteck erstellen - + Create an octagon in the sketch Achteck in der Skizze erstellen @@ -873,12 +873,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Fünfeck erstellen - + Create a pentagon in the sketch Fünfeck in der Skizze erstellen @@ -886,12 +886,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Geschlossenen B-Spline erstellen - + Create a periodic B-spline by control points in the sketch. Geschlossenen B-Spline mittels Kontrollpunkten in der Skizze erstellen. @@ -899,12 +899,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Punkt erstellen - + Create a point in the sketch Punkt in der Skizze erstellen @@ -912,12 +912,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Eckenerhaltende Verrundung erstellen - + Fillet that preserves intersection point and most constraints Verrundung, die den Schnittpunkt und die meisten Randbedingungen beibehält @@ -925,12 +925,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Linienzug erstellen - + Create a polyline in the sketch. 'M' Key cycles behaviour Einen Linienzug in der Skizze erstellen. Taste 'M' wechselt Verhalten durch @@ -964,12 +964,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Regelmäßiges Vieleck erstellen - + Create a regular polygon in the sketch Erstelle ein regelmäßiges Polygon in der Skizze @@ -977,12 +977,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Nut erstellen - + Create a slot in the sketch Nut in der Skizze erstellen @@ -990,12 +990,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Quadrat erstellen - + Create a square in the sketch Quadrat in der Skizze erstellen @@ -1003,12 +1003,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Gleichseitiges Dreieck erstellen - + Create an equilateral triangle in the sketch Gleichseitiges Dreieck in der Skizze erstellen @@ -1016,12 +1016,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Grad des B-Splines verringern - + Decreases the degree of the B-spline Verringert den Grad des B-Splines @@ -1029,12 +1029,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Knoten-Multiplikation verringern - + Decreases the multiplicity of the selected knot of a B-spline Verringert die Vielfachheit eines ausgewählten B-Spline-Knotens @@ -1081,12 +1081,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Kante verlängern - + Extend an edge with respect to the picked position Verlängern einer Kante in Bezug auf die ausgewählte Position @@ -1094,12 +1094,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Externe Geometrie erstellen - + Create an edge linked to an external geometry Erstellen einer Kante verknüpft mit einer externen Geometrie @@ -1107,12 +1107,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Grad des B-Splines erhöhen - + Increases the degree of the B-spline Erhöht den Grad des B-Splines @@ -1120,12 +1120,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Knoten-Multiplikation erhöhen - + Increases the multiplicity of the selected knot of a B-spline Erhöht die Vielfachheit eines ausgewählten B-Spline-Knotens @@ -1133,12 +1133,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Knoten einfügen - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Fügt einen Knoten zum angegebenen Parameter hinzu. Wenn zu diesem Parameter schon ein Punkt vorhanden ist, wird dessen Vielfachheit um eins erhöht. @@ -1146,12 +1146,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Kurven verbinden - + Join two curves at selected end points Verbindet zwei Kurven an den ausgewählten Endpunkten @@ -1437,12 +1437,12 @@ Die Eigenschaft 'Support' wird gelöscht. CmdSketcherSplit - + Split edge Kante teilen - + Splits an edge into two while preserving constraints Teilt eine Kante in zwei unter Beibehaltung der Beschränkungen @@ -1463,12 +1463,12 @@ Die Eigenschaft 'Support' wird gelöscht. CmdSketcherSwitchVirtualSpace - + Switch virtual space Virtuellen Bereich wechseln - + Switches the selected constraints or the view to the other virtual space Schaltet die ausgewählten Einschränkungen oder die Ansicht auf den anderen virtuellen Bereich um @@ -1489,12 +1489,12 @@ Die Eigenschaft 'Support' wird gelöscht. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Einschränkung aktivieren/deaktivieren - + Activates or deactivates the selected constraints Aktiviert oder deaktiviert die ausgewählten Einschränkungen @@ -1515,12 +1515,12 @@ Die Eigenschaft 'Support' wird gelöscht. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Einschränkung zwischen festlegend und anzeigend umschalten - + Set the toolbar, or the selected constraints, into driving or reference mode Die Symbolleiste oder die ausgewählten Einschränkungen @@ -1530,12 +1530,12 @@ auf den festlegenden oder den anzeigenden Modus festlegen CmdSketcherTrimming - + Trim edge Kante zuschneiden - + Trim an edge with respect to the picked position Trimmen einer Kante bezüglich der ausgewählten Position @@ -1594,369 +1594,370 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. Command - - + + Add horizontal constraint Horizontal-Einschränkung hinzufügen - - - + + + Add horizontal alignment Horizontale Ausrichtung hinzufügen - - + + Add vertical constraint Vertikal-Einschränkung hinzufügen - + Add vertical alignment Vertikale Ausrichtung hinzufügen - + Add 'Lock' constraint Sperreinschränkung hinzufügen - + Add relative 'Lock' constraint Relative Sperreinschränkung hinzufügen - + Add fixed constraint Sperr-Einschränkung hinzufügen - + Add 'Block' constraint Fixier-Einschränkung hinzufügen - + Add block constraint Fixier-Einschränkung hinzufügen - - - + + + Add coincident constraint Übereinstimmungseinschränkung hinzufügen - - + + Add distance from horizontal axis constraint Einschränkung des Abstands zur horizontalen Achse hinzufügen - - + + Add distance from vertical axis constraint Einschränkung des Abstands zur vertikalen Achse hinzufügen - - + + Add point to point distance constraint Einschränkung des Abstands zweier Punkte hinzufügen - - - + + + Add point to line Distance constraint Einschränkung des Abstands eines Punktes zu einer Linie hinzufügen - - + + Add circle to circle distance constraint Kreisabstand hinzufügen - + Add circle to line distance constraint Abstand von Kreis zu Linie hinzufügen - - - - - + + + + + + Add length constraint Längeneinschränkung hinzufügen - - + + Dimension Abmessung - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Punkt-auf-Objekt-Einschränkung hinzufügen - - + + Add point to point horizontal distance constraint Einschränkung des horizontalen Abstands zweier Punkte hinzufügen - + Add fixed x-coordinate constraint Einschränkung zur Sperrung der x-Koordinate hinzufügen - - + + Add point to point vertical distance constraint Einschränkung des vertikalen Abstands zweier Punkte hinzufügen - + Add fixed y-coordinate constraint Einschränkung zur Sperrung der y-Koordinate hinzufügen - - + + Add parallel constraint Parallelitätseinschränkung hinzufügen - - - - - - - + + + + + + + Add perpendicular constraint Rechtwinkligkeitseinschränkung hinzufügen - + Add perpendicularity constraint Rechtwinkligkeitseinschränkung hinzufügen - + Swap coincident+tangency with ptp tangency Deckungsgleichheit + Berührung gegen tangentenstetigen Übergang in einem Punkt tauschen - + Swap PointOnObject+tangency with point to curve tangency Tausche Punkt auf Objekt + Tangentialität gegen Punkt zu Kurve Tangentialität - - - - - - - + + + + + + + Add tangent constraint Tangenteneinschränkung hinzufügen - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Punkt für Tangenteneinschränkung hinzufügen - - - - + + + + Add radius constraint Radius-Einschränkung hinzufügen - - - - + + + + Add diameter constraint Durchmesser-Einschränkung hinzufügen - - - - + + + + Add radiam constraint Radiam-Beschränkung hinzufügen - - - - - - + + + + + + Add angle constraint Winkeleinschränkung hinzufügen - - + + Add equality constraint Gleichheitseinschränkung hinzufügen - - - - - + + + + + Add symmetric constraint Symmetrieeinschränkung hinzufügen - + Add Snell's law constraint Einschränkung nach Snellius-Gesetz (Lichtbrechung) hinzufügen - + Toggle constraint to driving/reference Einschränkung zwischen festlegend und anzeigend umschalten - + Activate/Deactivate constraint Einschränkung aktivieren / deaktivieren @@ -2016,44 +2017,44 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Zentrierten Skizzenrahmen hinzufügen - + Add rounded rectangle Abgerundetes Rechteck hinzufügen - + Add line to sketch wire Linie zum Skizzendraht hinzufügen - + Add arc to sketch wire Bogen zum Skizzendraht hinzufügen - - + + Add sketch arc Skizzenbogen hinzufügen - - + + Add sketch circle Skizzenkreis hinzufügen - + Add sketch ellipse Skizzenellipse hinzufügen - + Add sketch arc of ellipse Skizzenellipsenbogen hinzufügen - + Add sketch arc of hyperbola Skizzenhyperbelbogen hinzufügen @@ -2073,33 +2074,33 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Skizzenpunkt hinzufügen - - + + Create fillet Verrundung erstellen - + Trim edge Kante zuschneiden - + Extend edge Kante verlängern - + Split edge Kante teilen - + Add external geometry Externe Geometrie hinzufügen - + Add slot Nut hinzufügen @@ -2109,37 +2110,37 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Sechseck hinzufügen - + Convert to NURBS In NURBS umwandeln - + Increase spline degree Grad des Splines erhöhen - + Decrease spline degree Grad des Splines verringern - + Increase knot multiplicity Vielfachheit eines Spline-Knotens erhöhen - + Decrease knot multiplicity Vielfachheit eines Spline-Knotens verringern - + Insert knot Knoten einfügen - + Join Curves Kurven verbinden @@ -2179,12 +2180,12 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Achsenausrichtung entfernen - + Toggle constraints to the other virtual space Einschränkungen auf den anderen virtuellen Raum umschalten - + @@ -2192,7 +2193,7 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Virtuellen Raum der Einschränkungen aktualisieren - + Add auto constraints Automatische Randbedingungen hinzufügen @@ -2232,7 +2233,7 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Knotenpunkt hinzufügen - + Create a carbon copy Eine Blaupause erstellen @@ -2248,37 +2249,37 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Fehler automatische Beschränkungen: unlösbare Skizze beim Anwenden von Koinzidenzen. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Fehler automatische Beschränkungen: unlösbare Skizze beim Anwenden von vetikalen/horizontalen Beschränkungen. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Fehler automatische Beschränkungen: unlösbare Skizze beim Anwenden von gleichheits Beschränkungen. - + Autoconstrain error: Unsolvable sketch without constraints. Fehler automatische Beschränkungen: unlösbare Skizze ohne Beschränkungen. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Fehler automatische Beschränkungen: unlösbare Skizze nach dem Anwenden von horizontalen und vertikalen Beschränkungen. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Fehler automatische Beschränkungen: unlösbare Skizze nach dem Anwenden von Punkt auf Punkt Beschränkungen. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Fehler automatische Beschränkungen: unlösbare Skizze nach dem Anwenden von gleichheits Beschränkungen. @@ -2403,143 +2404,143 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2555,9 +2556,9 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. - - - + + + Wrong selection Falsche Auswahl @@ -2578,329 +2579,329 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Maßliche Einschränkung - + Cannot add a constraint between two external geometries. Es ist nicht möglich eine Einschränkung zwischen zwei externen Geometrien hinzuzufügen. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Es ist nicht möglich, eine Randbedingung zwischen zwei unveränderlichen Geometrien hinzuzufügen. Unveränderliche Geometrien schließen externe Geometrie, fixierte Geometrie oder spezielle Punkte, wie B-Spline-Knotenpunkte, ein. - + Sketcher Constraint Substitution Beschränkung Ersetzen - + Keep notifying me of constraint substitutions Benachrichtige mich über Beschränkungssubstitutionen - - - + + + Only sketch and its support are allowed to be selected. Nur eine Skizze und deren Trägerfläche dürfen ausgewählt werden. - + One of the selected has to be on the sketch. Eins der ausgewählten muss auf der Skizze liegen. - - + + Select an edge from the sketch. Wählen Sie eine Kante aus der Skizze. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nicht erfüllbare Bedingung - - - - + + + + The selected edge is not a line segment. Die ausgewählte Kante ist kein Liniensegment. - - - - - - + + + + + + Double constraint Doppelbedingung - - - - - + + + + + The selected edge already has a horizontal constraint! Die ausgewählte Kante hat bereits eine Horizontal-Einschränkung! - - - + + + The selected edge already has a vertical constraint! Die ausgewählte Kante hat bereits eine Vertikal-Einschränkung! - - - - - - + + + + + + The selected edge already has a Block constraint! Die ausgewählte Kante hat bereits eine Fixier-Einschränkung! - + The selected item(s) can't accept a horizontal constraint! Die ausgewählten Elemente können keine Horizontal-Einschränkung annehmen! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Es ist mehr als ein Fixpunkt ausgewählt. Wähle maximal einen Fixpunkt! - + The selected item(s) can't accept a vertical constraint! Die ausgewählten Elemente können keine Vertikal-Einschränkung annehmen! - - - + + + Select vertices from the sketch. Wählen Sie Knoten aus der Skizze aus. - + Select one vertex from the sketch other than the origin. Einen Knoten aus der Skizze auswählen, nur nicht den Ursprung. - + Select only vertices from the sketch. The last selected vertex may be the origin. Nur Knoten aus der Skizze auswählen. Der letzte gewählte Knoten darf der Ursprung sein. - + Wrong solver status Falscher Solver Status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Eine Fixier-Einschränkung kann nicht hinzugefügt werden, solange die Skizze nicht berechnet (gelöst) ist oder redundante und / oder widersprüchliche Einschränkungen enthält. - + Select one edge from the sketch. Wähle eine Kante aus der Skizze aus. - + Select only edges from the sketch. Wähle nur Kanten aus der Skizze aus. - + Number of selected objects is not 3 Die Anzahl der ausgewählten Objekte ist nicht 3 - - - + + + Error Fehler - + Unexpected error. More information may be available in the Report View. Unerwarteter Fehler. Das Ausgabefenster könnte weitere Informationen enthalten. - + Endpoint to endpoint tangency was applied instead. Die Endpunkt zu Endpunkt Tangente wurde stattdessen angewendet. - + Select two or more points from the sketch. Wählen Sie aus der Skizze zwei oder mehr Punkte aus. - + Select two or more vertices from the sketch. Zwei oder mehr Knotenpunkte aus der Skizze auswählen. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wähle zwei oder mehr Knotenpunkte aus der Skizze für eine Übereinstimmungseinschränkung, oder zwei oder mehr Kreise, Ellipsen, Bögen oder Ellipsenbögen für einen konzentrischen Zwang. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wähle zwei Knotenpunkte aus der Skizze für eine Übereinstimmunseinschränkung aus, oder zwei Kreise, Ellipsen, Bögen oder Ellipsenbögen für einen konzentrischen Zwang. - + Select exactly one line or one point and one line or two points from the sketch. Wählen Sie genau eine Linie oder einen Punkt und eine Linie oder zwei Punkte aus der Skizze aus. - + Cannot add a length constraint on an axis! Keine Längenbeschränkung einer Achse möglich! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Wählen Sie genau eine Linie oder einen Punkt und eine Linie oder zwei Punkte oder zwei Kreise aus der Skizze aus. - + This constraint does not make sense for non-linear curves. Diese Randbedingung ist für nichtlineare Kurven nicht sinnvoll. - + Endpoint to edge tangency was applied instead. Die Endpunkt zu Kante Tangente wurde stattdessen angewendet. - - - - - - - + + + + + + + Select the right things from the sketch. Wähle die richtigen Dinge aus der Skizze. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Eine Kante auswählen, die kein B-Spline-Gewicht darstellt. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Keiner der ausgewählten Punkte wurde auf die jeweiligen Kurven beschränkt, da sie Teile desselben Elements sind, weil beide externe Geometrien sind oder weil die Kante nicht geeignet ist. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Keiner der gewählten Punkte wurde beschränkt auf die zugehörigen Kurven. Sie sind entweder Bestandteil des gleichen Elements oder Sie sind beide Externe Geometrie. - - - - + + + + Select exactly one line or up to two points from the sketch. Wählen Sie genau eine Linie oder bis zu zwei Punkte aus der Skizze aus. - + Cannot add a horizontal length constraint on an axis! Keine horizontale Längenbeschränkung einer Achse möglich! - + Cannot add a fixed x-coordinate constraint on the origin point! Eine feste x-Einschränkung auf den Ursprung kann nicht hinzugefügt werden! - - + + This constraint only makes sense on a line segment or a pair of points. Diese Randbedingung ist nur für ein Liniensegment oder ein Punktepaar sinnvoll. - + Cannot add a vertical length constraint on an axis! Keine vertikale Längenbeschränkung einer Achse möglich! - + Cannot add a fixed y-coordinate constraint on the origin point! Eine feste y-Einschränkung auf den Ursprung kann nicht hinzugefügt werden! - + Select two or more lines from the sketch. Wählen Sie zwei oder mehr Linien aus der Skizze aus. - - + + Select at least two lines from the sketch. Wählen Sie mindestens zwei Linien aus der Skizze aus. - + Select a valid line. Eine gültige Linie auswählen. - - + + The selected edge is not a valid line. Die ausgewählte Kante ist keine gültige Linie. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2910,42 +2911,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Erlaubte Kombinationen: zwei Kurven; einen Endpunkt und eine Kurve; zwei Endpunkte; zwei Kurven und einen Punkt. - + Select some geometry from the sketch. perpendicular constraint Geometrie aus der Skizze auswählen. - - + + Cannot add a perpendicularity constraint at an unconnected point! Eine Rechtwinkligkeitsbedingung kann nicht zu einem unverbundenen Punkt hinzugefügt werden! - - - + + + Perpendicular to B-spline edge currently unsupported. Senkrecht zur B-Spline-Kante wird derzeit nicht unterstützt. - - + + One of the selected edges should be a line. Eine der ausgewählten Kanten sollte eine Gerade sein. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Eine Endpunkt-zu-Endpunkt-Tangente wurde angelegt. Die Koinzidenz-Einschränkung wurde gelöscht. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Die Endpunkt zu Kante Tangente wurde stattdessen angewendet. Die Punkt auf Objekt Beschränkung wurde gelöscht. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,277 +2956,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Akzeptierte Kombinationen: zwei Kurven; Ein Endpunkt und eine Kurve; Zwei Endpunkte; Zwei Kurven und ein Punkt. - + Select some geometry from the sketch. tangent constraint Geometrie aus der Skizze auswählen. - - - + + + Cannot add a tangency constraint at an unconnected point! Eine Tangentialrandbedingung kann nicht zu einem unverbundenen Punkt hinzugefügt werden! - - + + Tangent constraint at B-spline knot is only supported with lines! Randbedingung Tangential festlegen wird am B-Spline-Knoten wird nur mit Linien unterstützt! - + B-spline knot to endpoint tangency was applied instead. Eine B-Spline-Knoten zu Endpunkt Tangente wurde stattdessen festgelegt. - + Select either one point and several curves, or one curve and several points. Wählen Sie entweder einen Punkt und mehrere Kurven oder eine Kurve und mehrere Punkte. - - + + Wrong number of selected objects! Falsche Anzahl von ausgewählten Objekten! - - + + With 3 objects, there must be 2 curves and 1 point. Bei 3 Objekten müssen diese aus 2 Kurven und 1 Punkt bestehen. - - - + + + Tangency to B-spline edge currently unsupported. Tangentiale zu B-Spline Rand wird derzeit nicht unterstützt. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Wählen Sie eine oder mehrere Bögen oder Kreise aus der Skizze. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Entweder nur einen oder mehrere B-Spline-Kontrollpunkte auswählen oder nur einen oder mehrere Bögen oder Kreise aus der Skizze auswählen, aber nicht gemischt. - - - + + + Constraint only applies to arcs or circles. Einschränkung gilt nur für Bögen oder Kreise. - - + + Select one or two lines from the sketch. Or select two edges and a point. Wählen Sie eine oder zwei Linien aus der Skizze. Oder wählen Sie zwei Kanten und einen Punkt. - - + + Parallel lines Parallele Linien - - + + An angle constraint cannot be set for two parallel lines. Es ist nicht möglich eine Winkel-Einschränkung für zwei parallele Linien festzulegen. - + Cannot add an angle constraint on an axis! Winkelbeschränkung einer Achse nicht möglich! - + Select two edges from the sketch. Wählen Sie zwei Kanten aus der Skizze aus. - + Select two or more compatible edges. Wählen Sie zwei oder mehr kompatible Kanten aus. - + Sketch axes cannot be used in equality constraints. Skizzenachsen können nicht mit der Randbedingung Gleichheit festlegen eingesetzt werden. - + Equality for B-spline edge currently unsupported. Gleichheit für B-Spline Rand wird derzeit nicht unterstützt. - - - - + + + + Select two or more edges of similar type. Zwei oder mehr gleichartige Kanten auswählen. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Wählen Sie zwei Punkte und eine Symmetrielinie, zwei Punkte und einen Symmetriepunkt oder eine Linie und einen Symmetriepunkt von der Skizze. - - + + Cannot add a symmetry constraint between a line and its end points. Es ist nicht möglich eine Symmetrieeinschränkung zwischen einer Linie und ihren Endpunkten hinzuzufügen. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Es ist nicht möglich eine Symmetrieeinschränkung zwischen einer Linie und ihren Endpunkten hinzuzufügen! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Endpunkte zweier Linien, die als Strahlen dienen sollen, und eine Kante, die eine Grenze darstellt, auswählen. Der erste gewählte Punkt entspricht dem Index n1, der zweite dem Index n2 und der Eigabewert legt das Verhältnis n2/n1 fest. - + Selected objects are not just geometry from one sketch. Ausgewählte Objekte sind nicht nur Geometrie aus einer einzigen Skizze. - + Cannot create constraint with external geometry only. Es ist nicht möglich eine Einschränkung zu erstellen, die nur auf externen Geometrien basiert. - + Incompatible geometry is selected. Es wurde unpassende Geometrie ausgewählt. - + SnellsLaw on B-spline edge is currently unsupported. Brechung nach Snellius-Gesetz an B-Spline-Kanten wird derzeit nicht unterstützt. - - - - - + + + + + Select constraints from the sketch. Einschränkungen aus der Skizze auswählen. - - - + + + Select constraint(s) from the sketch. Einschränkung(en) aus der Skizze auswählen. - + B-Spline Degree B-Spline-Grad - + Define B-Spline Degree, between 1 and %1: B-Spline-Grad, zwischen 1 und %1 festlegen: - - - + + + CAD Kernel Error CAD-Kernel-Fehler - + None of the selected elements is an edge. Keines der ausgewählten Elemente ist eine Kante. - - + + At least one of the selected objects was not a B-Spline and was ignored. Mindestens eines der ausgewählten Objekte war keine B-Spline und wurde ignoriert. - - + + The selection comprises more than one item. Please select just one knot. Die Auswahl umfasst mehrere Elemente. Bitte wählen Sie nur einen Knoten. - - + + Input Error Eingabefehler - - + + None of the selected elements is a knot of a B-spline Keines der ausgewählten Elemente ist ein Knoten eines B-Splines - - + + Selection is empty Nichts ausgewählt - + Nothing is selected. Please select a b-spline. Es ist nichts ausgewählt. Bitte einen B-Spline auswählen. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Bitte eine B-Spline-Kurve auswählen, um einen Knoten einzufügen (Kontrollpunkt, nicht Kurvenpunkt). Wenn die Kurve kein B-Spline ist, bitte zuerst in einen umwandeln. - + Nothing is selected. Please select end points of curves. Es ist nichts ausgewählt. Bitte Endpunkte von Kurven auswählen. - + Too many curves on point Zu viele Kurven an einem Punkt - - + + Exactly two curves should end at the selected point to be able to join them. Genau zwei Kurven sollten am ausgewählten Punkt enden, damit sie verbunden werden können. - + Too few curves on point Zu wenige Kurven an einem Punkt - + Two end points, or coincident point should be selected. Es sollten zwei Endpunkte oder zwei deckungsgleiche (koinzidente) Punkte ausgewählt werden. @@ -3305,17 +3306,17 @@ Akzeptierte Kombinationen: zwei Kurven; Ein Endpunkt und eine Kurve; Zwei Endpun Derzeit kann eine externe Geometrie nicht auf eine andere visuelle Ebene verschoben werden. Die externe Geometrie wird weggelassen - + Set knot multiplicity Vielfachheit eines B-Spline-Knotens festlegen - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Vielfachheit des letzten B-Spline-Knotens zwischen 1 und %1 festlegen:Beachten Sie, dass die Vielfachheit unter bestimmten Umständen ignoriert werden kann. Siehe Dokumentation für Details - + Value Error Wertfehler @@ -3629,12 +3630,12 @@ Akzeptierte Kombinationen: zwei Kurven; Ein Endpunkt und eine Kurve; Zwei Endpun Länge: - + Refractive index ratio Brechungsindex-Verhältnis - + Ratio n2/n1: Verhältnis n2/n1: @@ -3914,8 +3915,8 @@ Akzeptierte Kombinationen: zwei Kurven; Ein Endpunkt und eine Kurve; Zwei Endpun SketcherGui::PropertyConstraintListItem - - + + Unnamed Unbenannt @@ -4136,25 +4137,25 @@ Erfordert das erneute aktivieren des Bearbeitungsmodus. Dimension Constraint - Dimension Constraint + Maßliche Randbedingung Dimensioning constraints: - Dimensioning constraints: + Maßliche Randbedingungen: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Auswahl der Darstellung der Werkzeuge für maßliche Randbedingungen in der Symbolleiste: +'Einzelnes Werkzeug': Ein einzelnes Werkzeug für alle maßlichen Randbedingungen in der Symbolleiste: Abstand, X-/Y-Abstand, Winkel, Radius. (Andere im Ausklappmenü) +'Getrennte Werkzeuge': Individuelle Werkzeuge für jede maßliche Randbedingung. +'Beides': Es werden sowohl das Werkzeug 'Maß festlegen' als auch die getrennten Werkzeuge dargestellt. +Diese Einstellung ist nur für die Symbolleiste. Was auch immer ausgewählt wurde, alle Werkzeuge stehen immer im Menü und über Tastenkürzel zur Verfügung. @@ -4173,32 +4174,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Beide - + Auto Automatisch - + Diameter Durchmesser - + Radius Radius @@ -4646,12 +4647,12 @@ Then objects are only visible behind the sketch plane. Auf vorhandene Skizzen anwenden - + Unexpected C++ exception Unerwartete C++ - Ausnahme - + Sketcher Sketcher @@ -4659,55 +4660,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Keine zusammenfallenden Punkte - + No missing coincidences found Keine zusammenfallenden Punkte gefunden - + Missing coincidences Zusammenfallende Punkte - + %1 missing coincidences found %1 zusammenfallende Punkte gefunden - + No invalid constraints Keine ungültigen Einschränkungen - + No invalid constraints found Keine ungültigen Einschränkungen gefunden - + Invalid constraints Ungültige Randbedingung - + Invalid constraints found Ungültige Randbedingungen gefunden - - - + + + Reversed external geometry Verdrehte externe Geometrie - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4720,7 +4721,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Nutze "Tausche Endpunkte in Beschränkungen" um die Entpunkte neu zuzuordnen. Dies ist einmalig für Skizzen nötig, welche mit einer Version <0.15 erzeugt wurden - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4729,75 +4730,70 @@ However, no constraints linking to the endpoints were found. Es wurden keine Beschränkungen zu diesen Punkten gefunden. - + No reversed external-geometry arcs were found. Keine verdrehten Kreisbögen in externer Geometrie gefunden. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 Änderungen wurden an Beschränkungen durchgeführt, welche mit Endpunkten von verdrehten Kreisbögen verknüpft waren. - - + + Constraint orientation locking Fixiert Orientierung von Beschränkung - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Eine feste Orientierung wurde für %1 Beschränkungen aktiviert. Die betroffenen Beschränkungen sind im Ausgabefenster angegeben (Menü Ansicht -> Paneele -> Ausgabefenster). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Eine feste Orientierung wurde für %1 Beschränkungen deaktiviert. Die betroffenen Beschränkungen sind im Ausgabefenster angegeben (Menü Ansicht -> Paneele -> Ausgabefenster). Für alle zukünftig erstellten Beschränkungen ist eine feste Orientierung weiterhin aktiviert. - - + + Delete constraints to external geom. Lösche Beschränkungen zu externen Geometrien - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Sie löschen ALLE Beschränkungen die mit externer Geometrie verknüpft sind. Dies ist Sinnvoll um Skizzen zu erhalten, in welchen solche Verknüpfungen verloren gingen. Sind Sie sicher diese Beschränkungen löschen zu wollen? - + All constraints that deal with external geometry were deleted. Alle Beschränkungen mit Verknüpfungen zu externer Geometrie wurden gelöscht. - + No degenerated geometry Keine degenerierte Geometrie - + No degenerated geometry found Keine degenerierte Geometrie gefunden - + Degenerated geometry Degenerierte Geometrie - + %1 degenerated geometry found %1 degenerierte Geometrie gefunden SketcherGui::TaskSketcherConstraints - - - Form - Form - Check to toggle filters @@ -4872,11 +4868,6 @@ Es wurden keine Beschränkungen zu diesen Punkten gefunden. SketcherGui::TaskSketcherElements - - - Form - Form - Check to toggle filters @@ -5062,7 +5053,7 @@ Es wurden keine Beschränkungen zu diesen Punkten gefunden. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Erweiterte Steuerung des Lösers @@ -5353,8 +5344,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Wechselt zwischen dem Anzeigen und Ausblenden des Krümmungskammes für alle B-Splines @@ -5362,8 +5353,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Verringert die Vielfachheit eines ausgewählten B-Spline-Knotens @@ -5371,8 +5362,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Wechselt zwischen dem Anzeigen und Ausblenden des Grades für alle B-Splines @@ -5380,8 +5371,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Erhöht die Vielfachheit eines ausgewählten B-Spline-Knotens @@ -5389,8 +5380,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Wechselt zwischen dem Anzeigen und Ausblenden der Knoten-Vielfachheit für alle B-Splines @@ -5398,8 +5389,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Wechselt zwischen dem Anzeigen und Ausblenden des Gewichts für alle B-Spline-Kontrollpunkte @@ -5407,8 +5398,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Wechselt zwischen dem Anzeigen und Ausblenden der Kontroll-Polygone für alle B-Splines @@ -5443,8 +5434,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Durchmesser eines Kreises oder Kreisbogens festlegen @@ -5452,7 +5443,7 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Legt den Radius eines Kreisbogens oder den Durchmesser eines Kreises fest @@ -5460,8 +5451,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Radius eines Kreises oder Kreisbogens festlegen @@ -5469,7 +5460,7 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Legt den Radius eines Kreisbogens oder den Durchmesser eines Kreises fest @@ -5486,8 +5477,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Erstellt einen Kreisbogen durch die Endpunkte und einen Punkt auf dem Bogen @@ -5495,8 +5486,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Erstellt einen Kreis durch drei Punkte auf dem Kreisbogen @@ -5504,8 +5495,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Erstellt einen Kreisbogen mit Mittelpunkt und durch die Endpunkte @@ -5513,8 +5504,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Ellipsenbogen durch Mittelpunkt, großem Radius sowie den Endpunkten erstellen @@ -5522,8 +5513,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Hyperbelbogen durch Mittelpunkt, großem Radius sowie den Endpunkten erstellen @@ -5531,8 +5522,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Parabelbogen durch Fokus, Scheitelpunkt sowie den Endpunkten erstellen @@ -5540,13 +5531,13 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateBSpline - + B-spline by control points B-Spline durch Kontrollpunkte - - + + Create a B-spline by control points Erzeugt einen B-Spline durch Kontrollpunkte @@ -5554,8 +5545,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Erstelle einen Kreis aus Mittel- und einem Randpunkt @@ -5563,8 +5554,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Ellipse aus Periapsis, Apoapsis und kleiner Halbachse erzeugen @@ -5572,8 +5563,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Ellipse aus Mittelpunkt, großer Halbachse und weiterem Punkt erzeugen @@ -5581,8 +5572,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateFillet - - + + Creates a radius between two lines Erstellt einen Bogen zwischen zwei Linien @@ -5590,8 +5581,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Siebeneck aus Mittelpunkt und einer Ecke erzeugen @@ -5599,8 +5590,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Sechseck aus Mittelpunkt und einer Ecke erzeugen @@ -5608,7 +5599,7 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateOblong - + Create a rounded rectangle Ein abgerundetes Rechteck erstellen @@ -5616,14 +5607,14 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Achteck aus Mittelpunkt und einer Ecke erzeugen - - + + Create a regular polygon by its center and by one corner Regelmäßiges Polygon aus Mittelpunkt und einer Ecke erzeugen @@ -5631,8 +5622,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Fünfeck aus Mittelpunkt und einer Ecke erzeugen @@ -5640,8 +5631,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Eine Verrundung, die Randbedingungen und den Schnittpunkt beibehält @@ -5649,7 +5640,7 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateRectangle - + Create a rectangle Ein Rechteck erstellen @@ -5657,7 +5648,7 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateRectangle_Center - + Create a centered rectangle Ein zentriertes Rechteck erstellen @@ -5665,8 +5656,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Quadrat aus Mittelpunkt und einer Ecke erzeugen @@ -5674,8 +5665,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Gleichseitiges Dreieck aus Mittelpunkt und einer Ecke erzeugen @@ -5683,13 +5674,13 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Geschlossener B-Spline durch Kontrollpunkte - - + + Create a periodic B-spline by control points Erzeugt einen geschlossenen B-Spline durch Kontrollpunkte @@ -6321,38 +6312,38 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error - Fehlermeldungen + Fehler @@ -6370,45 +6361,45 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Die Randbedingng hat eine ungültige Indexierung und ist fehlerhaft. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Ungültige Randbedingung - - - + + + Failed to add arc Fehler beim Hinzufügen des Bogens - + Failed to add arc of ellipse Fehler beim Hinzufügen von Ellipsenbogen - + Cannot create arc of hyperbola from invalid angles, try again! Hyperbelbogen kann nicht aus ungültigen Winkeln erstellt werden. Versuche es erneut! - + Cannot create arc of hyperbola Hyperbelbogen kann nicht erstellt werden - + Cannot create arc of parabola Parabelbogen kann nicht erstellt werden @@ -6418,18 +6409,18 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Fehler beim Hinzufügen von B-Spline Pol - + Error creating B-spline pole Fehler beim Erstellen des B-spline Kontrollpunktes - - + + Error creating B-spline Fehler beim Erstellen des B-splines - + Error deleting last pole Fehler beim Entfernen des letzten Pols @@ -6439,49 +6430,49 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Knoten kann nicht hinzugefügt werden - + Cannot add internal alignment points Interne Orientierungspunkte können nicht hinzugefügt werden - + Error removing knot Fehler beim Entfernen des Knoten - + Failed to add carbon copy Eine Kopie konnte nicht hinzugefügt werden - - + + Failed to add circle Kreis hinzufügen fehlgeschlagen - + Failed to add an ellipse Ellipse hinzufügen fehlgeschlagen - + Failed to extend edge Fehler beim Erweitern der Kante - + Failed to add external geometry Fehler beim Hinzufügen einer externen Geometrie - + Failed to create fillet Verrundung konnte nicht erstellt werden - + Failed to add line Linie hinzufügen fehlgeschlagen @@ -6491,7 +6482,7 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Punkt hinzufügen fehlgeschlagen - + Failed to add polygon Vieleck hinzufügen fehlgeschlagen @@ -6501,27 +6492,27 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Fehler beim Hinzufügen des Feldes - + Failed to add rounded rectangle Fehler beim Hinzufügen des abgerundeten Rechtecks - + Failed to add slot Fehler beim Hinzufügen der Nut - + Failed to add edge Kante hinzufügen fehlgeschlagen - + Failed to trim edge Trimmen der Kante fehlgeschlagen - + Value Error @@ -6531,13 +6522,13 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-Spline durch Knoten - - + + Create a B-spline by knots Erstellt einen B-Spline durch Knoten @@ -6545,13 +6536,13 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Geschlossener B-Spline durch Knoten - - + + Create a periodic B-spline by knots Erstellt einen geschlossenen B-Spline durch Knoten @@ -6657,12 +6648,12 @@ Punkte müssen näher als ein Fünftel der Rasterweite an eine Rasterlinie geset CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots B-Spline durch Knoten erstellen - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Erstellt einen B-Spline durch Knoten, d.h. durch Interpolation, in der Skizze. @@ -6670,12 +6661,12 @@ Punkte müssen näher als ein Fünftel der Rasterweite an eine Rasterlinie geset CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Geschlossenen B-Spline durch Knoten erstellen - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Erstellt einen geschlossenen B-Spline durch Knoten, d.h. durch Interpolation, in der Skizze. @@ -6683,31 +6674,44 @@ Punkte müssen näher als ein Fünftel der Rasterweite an eine Rasterlinie geset CmdSketcherDimension - + Dimension Abmessung - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Kontextabhängige Randbedingung, basierend auf der aktuellen Auswahl. +Abhängig von der Auswahl stehen möglicherweise mehrere Randbedingungen zur Verfügung. Diese können mit der Umschalttaste (SHIFT-key) gewechselt werden. +Ein Linksklick auf einen leeren Bereich, bestätigt die aktuell vorausgewählte Randbedingung. Ein Rechtsklick oder das Drücken von Esc bricht die Ausführung ab. CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Maßeintrag + + + + Dimension tools. + Werkzeuge für Maßeinträge. + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts index 92f40a411f..d885358eb9 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts @@ -19,7 +19,7 @@ Show/hide B-spline degree - Εμφάνιση/Απόκρυψη βαθμού καμπύλης B-spline + Εμφάνιση/απόκρυψη βαθμού καμπύλης B-spline @@ -69,14 +69,14 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch - Αντιγραφή της γεωμετρίας ενός άλλου σκαριφήματος + Αντιγράφει τα γεωμετρικά στοιχεία ενός άλλου σχεδιίου @@ -100,27 +100,27 @@ Εμφάνιση/Απόκρυψη του επιπέδου πληροφοριών καμπύλης B-spline - + Show/hide B-spline degree - Εμφάνιση/Απόκρυψη βαθμού καμπύλης B-spline + Εμφάνιση/απόκρυψη βαθμού καμπύλης B-spline - + Show/hide B-spline control polygon Εμφάνιση/απόκρυψη πολυγώνου ελέγχου καμπύλης B-spline - + Show/hide B-spline curvature comb Εμφάνιση/Απόκρυψη οδηγού καμπυλότητας της καμπύλης B-spline - + Show/hide B-spline knot multiplicity Εμφάνιση/απόκρυψη πολλαπλότητας κόμβου καμπύλης B-spline - + Show/hide B-spline control point weight Show/hide B-spline control point weight @@ -128,29 +128,29 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Περιορισμός τόξου ή κύκλου - + Constrain an arc or a circle Περιόρισε ένα τόξο ή έναν κύκλο - + Constrain radius Περιορισμός ακτίνας - + Constrain diameter Περιορισμός διαμέτρου - + Constrain auto radius/diameter - Constrain auto radius/diameter + Περιορισμός αυτόματης ακτίνας/διαμέτρου @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Δημιουργία τόξου - + Create an arc in the sketcher Δημιουργήστε ένα τόξο - + Center and end points Κέντρο, αρχικό σημείο και τελικό σημείο - + End points and rim point Αρχικό σημείο, τελικό σημείο καθώς και σημείο της περιφέρειας @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Δημιουργία καμπύλης B-spline - + Create a B-spline in the sketch Δημιουργία μιας καμπύλης B-spline στο σχέδιο @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Δημιουργία κύκλου - + Create a circle in the sketcher Δημιουργήστε έναν κύκλο - + Center and rim point Κέντρο και σημείο της περιφέρειας - + 3 rim points 3 σημεία της περιφέρειας @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Δημιουργήστε ένα κωνικό σχήμα - - - Ellipse by center, major radius, point - Χάραξη έλλειψης με χρήση κέντρου, μεγάλου ημιάξονα, σημείου - - - - Ellipse by periapsis, apoapsis, minor radius - Ellipse by periapsis, apoapsis, minor radius - + Ellipse by center, major radius, point + Χάραξη έλλειψης με χρήση κέντρου, μεγάλης ακτίνας, σημείου + + + + Ellipse by periapsis, apoapsis, minor radius + Χάραξη έλλειψης με χρήση Περίκεντρου, απόκεντρου, μικρής ακτίνας + + + Arc of ellipse by center, major radius, endpoints Χάραξη τόξου έλλειψης με χρήση κέντρου, μεγάλου ημιάξονα, αρχικού και τελικού σημείου - + Arc of hyperbola by center, major radius, endpoints Χάραξη τόξου υπερβολής με χρήση κέντρου, μείζονος άξονα, αρχικού και τελικού σημείου - + Arc of parabola by focus, vertex, endpoints Χάραξη τόξου παραβολής με χρήση εστίας, κορυφής, αρχικού και τελικού σημείου @@ -266,24 +266,24 @@ CmdSketcherCompCreateFillets - + Create fillet Δημιουργία στρογγυλέματος - + Create a fillet between two lines - Create a fillet between two lines + Δημιουργήστε ένα στρογγύλεμα μεταξύ δύο γραμμών - + Sketch fillet - Φιλέτο σκίτου - σχεδίου + Σκίτσο στρογγύλεμα - + Constraint-preserving sketch fillet - Φιλέτο σχεδίου με περιορισμούς + Στρογγύλεμα με περιορισμούς @@ -299,17 +299,17 @@ Δημιουργεί ένα ορθογώνιο στο σχέδιο - + Rectangle Ορθογώνιο - + Centered rectangle Centered rectangle - + Rounded rectangle Rounded rectangle @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Δημιουργία κανονικού πολυγώνου - + Create a regular polygon in the sketcher Δημιουργήστε ένα κανονικό πολύγωνο στο σχέδιο - + Triangle Τρίγωνο - + Square Τετράγωνο - + Pentagon Πεντάγωνο - + Hexagon Εξάγωνο - + Heptagon Επτάγωνο - + Octagon Οκτάγωνο - + Regular polygon Κανονικό πολύγωνο @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Τροποποίηση πολλαπλότητας κόμβου - + Modifies the multiplicity of the selected knot of a B-spline Τροποποιεί την πολλαπλότητα του επιλεγμένου κόμβου μιας καμπύλης B-spline - + Increase knot multiplicity Αύξηση της πολλαπλότητας κόμβου - + Decrease knot multiplicity Μείωση της πολλαπλότητας κόμβου @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Περιορισμός γωνίας - + Fix the angle of a line or the angle between two lines Καθορισμός της γωνίας μιας γραμμής ή της γωνίας μεταξύ δύο γραμμών @@ -401,38 +401,38 @@ CmdSketcherConstrainBlock - + Constrain block - Constrain block + Περιορισμός Κλειδώματος - + Block the selected edge from moving - Block the selected edge from moving + Αποκλεισμός της επιλεγμένης ακμής από την κίνηση CmdSketcherConstrainCoincident - + Constrain coincident Περιορισμός ταύτισης - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses - Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses + Δημιουργία ενός περιορισμού σύμπτωσης μεταξύ σημείων ή ενός ομόκεντρου περιορισμού μεταξύ κύκλων, τόξων και ελλείψεων CmdSketcherConstrainDiameter - + Constrain diameter Περιορισμός διαμέτρου - + Fix the diameter of a circle or an arc Όρισε τη σταθερή διάμετρο ενός κύκλου, ή ενός τόξου @@ -440,25 +440,25 @@ CmdSketcherConstrainDistance - + Constrain distance Περιορισμός απόστασης - + Fix a length of a line or the distance between a line and a vertex or between two circles - Fix a length of a line or the distance between a line and a vertex or between two circles + Καθορίστε ένα μήκος μιας γραμμής ή την απόσταση μεταξύ μιας γραμμής και μιας κορυφής ή μεταξύ δύο κύκλων CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Καθορισμός της οριζόντιας απόστασης μεταξύ δύο σημείων ή μεταξύ τελικών σημείων γραμμών @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Καθορισμός της κατακόρυφης απόστασης μεταξύ δύο σημείων ή μεταξύ τελικών σημείων γραμμών @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Περιορισμός ισότητας - + Create an equality constraint between two lines or between circles and arcs Δημιουργία ενός περιορισμού ισότητας μεταξύ δύο γραμμών ή μεταξύ κύκλων και τόξων @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Περιορισμός κατά την οριζόντια διεύθυνση - + Create a horizontal constraint on the selected item Δημιουργία ενός οριζόντιου περιορισμού για το επιλεγμένο αντικείμενο @@ -505,27 +505,27 @@ CmdSketcherConstrainLock - + Constrain lock Περιορισμός κλειδώματος - + Create both a horizontal and a vertical distance constraint on the selected vertex - Create both a horizontal and a vertical distance constraint -on the selected vertex + Δημιουργήστε τόσο οριζόντιο όσο και κατακόρυφο περιορισμό απόστασης +στην επιλεγμένη κορυφή CmdSketcherConstrainParallel - + Constrain parallel Περιορισμός παραλληλίας - + Create a parallel constraint between two lines Δημιουργήστε έναν περιορισμό παραλληλίας μεταξύ δύο γραμμών @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Περιορισμός καθετότητας - + Create a perpendicular constraint between two lines Δημιουργία ενός περιορισμού καθετότητας μεταξύ δύο γραμμών @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Περιορισμός θέσης σημείου σε αντικείμενο - + Fix a point onto an object Καθορισμός της θέσης ενός σημείου σε ένα αντικείμενο @@ -559,38 +559,39 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter - Constrain auto radius/diameter + Περιορισμός αυτόματης ακτίνας/διαμέτρου - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen + Διορθώστε τη διάμετρο, εάν επιλέξεται κύκλο, ή την ακτίνα ενός τόξου/σπιράλ + CmdSketcherConstrainRadius - + Constrain radius or weight Constrain radius or weight - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline + Διορθώστε την ακτίνα ενός κύκλου ή ενός τόξου ή διορθώστε το βάρος ενός πόλου ενός B-Spline CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +601,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Περιορισμός συμμετρίας - + Create a symmetry constraint between two points with respect to a line or a third point Δημιουργία περιορισμού συμμετρίας μεταξύ δύο σημείων ως προς μια γραμμή ή ένα τρίτο σημείο @@ -614,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Περιορισμός εφαπτομένης - + Create a tangent constraint between two entities Δημιουργία ενός περιορισμού επαφής μεταξύ δύο οντοτήτων @@ -627,12 +628,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Περιορισμός κατά την κατακόρυφη διεύθυνση - + Create a vertical constraint on the selected item Δημιουργία ενός κατακόρυφου περιορισμού στο επιλεγμένο αντικείμενο @@ -640,12 +641,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convert geometry to B-spline - + Converts the selected geometry to a B-spline Converts the selected geometry to a B-spline @@ -666,12 +667,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Δημιουργία τόξου από τρία σημεία - + Create an arc by its end points and a point along the arc Δημιουργία ενός τόξου με χρήση του αρχικού και του τελικού του σημείου καθώς και ενός σημείου κατά μήκος του τόξου @@ -679,12 +680,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Δημιουργία κύκλου από τρία σημεία - + Create a circle by 3 perimeter points Δημιουργία ενός κύκλου από τρία σημεία της περιμέτρου @@ -692,12 +693,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Δημιουργία τόξου από κέντρο - + Create an arc by its center and by its end points Δημιουργία ενός τόξου με χρήση του κέντρου, του αρχικού και του τελικού του σημείου @@ -705,12 +706,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse - Create arc of ellipse + Δημιουργία ενός τόξου έλλειψης - + Create an arc of ellipse in the sketch Δημιουργήστε ένα τόξο έλλειψης στο σχέδιο @@ -718,12 +719,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola - Create arc of hyperbola + Δημιουργία τόξου υπερβολής - + Create an arc of hyperbola in the sketch Δημιουργήστε ένα ομαλό τόξο στο σχέδιο @@ -731,12 +732,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola - Create arc of parabola + Δημιουργία ενός τόξου παραβολής - + Create an arc of parabola in the sketch Δημιουργήστε ένα τόξο παραβολής στο σχέδιο @@ -744,12 +745,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Δημιουργία καμπύλης B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -757,12 +758,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Δημιουργία κύκλου - + Create a circle in the sketch Δημιουργία ενός κύκλου στο σχέδιο @@ -770,12 +771,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Δημιουργία έλλειψης από 3 σημεία - + Create an ellipse by 3 points in the sketch Δημιουργία μιας έλλειψης από 3 σημεία στο σχέδιο @@ -783,12 +784,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Δημιουργία έλλειψης από κέντρο - + Create an ellipse by center in the sketch Δημιουργήστε μια έλλειψη στο κέντρο του σχεδίου @@ -796,12 +797,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Δημιουργία στρογγυλέματος - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +810,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Δημιουργία επταγώνου - + Create a heptagon in the sketch Δημιουργήστε ένα επτάγωνο στο σχέδιο @@ -822,12 +823,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Δημιουργία εξαγώνου - + Create a hexagon in the sketch Δημιουργήστε ένα εξάγωνο στο σχέδιο @@ -861,12 +862,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Δημιουργία οκταγώνου - + Create an octagon in the sketch Δημιουργία ενός οκταγώνου στο σχέδιο @@ -874,12 +875,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Δημιουργία πενταγώνου - + Create a pentagon in the sketch Δημιουργία ενός πενταγώνου στο σχέδιο @@ -887,12 +888,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Δημιουργία μιας περιοδικής καμπύλης B-spline - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -900,12 +901,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Δημιουργία σημείου - + Create a point in the sketch Δημιουργία ενός σημείου στο σχέδιο @@ -913,25 +914,25 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet - Create corner-preserving fillet + Δημιουργία στρογγυλέματος με διατήρησης γωνίας - + Fillet that preserves intersection point and most constraints - Fillet that preserves intersection point and most constraints + Στρογγύλεμα που διατηρεί το σημείο τομής και τους περισσότερους περιορισμούς CmdSketcherCreatePolyline - + Create polyline Δημιουργία πολυγραμμής - + Create a polyline in the sketch. 'M' Key cycles behaviour Δημιουργία μιας πολυγραμμής στο σχέδιο. Το πλήκτρο 'Μ' πραγματοποιεί κυκλική εναλλαγή λειτουργίας @@ -965,12 +966,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Δημιουργία κανονικού πολυγώνου - + Create a regular polygon in the sketch Δημιουργία ενός κανονικού πολυγώνου στο σχέδιο @@ -978,12 +979,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Δημιουργία εσοχής - + Create a slot in the sketch Δημιουργία μιας εσοχής στο σχέδιο @@ -991,12 +992,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Δημιουργία τετραγώνου - + Create a square in the sketch Δημιουργία ενός τετραγώνου στο σχέδιο @@ -1004,12 +1005,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Δημιουργία ισόπλευρου τριγώνου - + Create an equilateral triangle in the sketch Δημιουργία ενός ισόπλευρου τριγώνου στο σχέδιο @@ -1017,12 +1018,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Decrease B-spline degree - + Decreases the degree of the B-spline Decreases the degree of the B-spline @@ -1030,12 +1031,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Μείωση της πολλαπλότητας κόμβου - + Decreases the multiplicity of the selected knot of a B-spline Μειώνει την πολλαπλότητα του επιλεγμένου κόμβου μιας καμπύλης B-spline @@ -1045,7 +1046,7 @@ with respect to a line or a third point Delete all constraints - Delete all constraints + Διαγραφή όλων των περιορισμών @@ -1082,12 +1083,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Επέκταση ακμής - + Extend an edge with respect to the picked position Επέκταση μιας ακμής ως προς την επιλεγμένη θέση @@ -1095,12 +1096,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Δημιουργία μιας ακμής που συνδέεται με ένα στοιχείο εξωτερικής γεωμετρίας @@ -1108,12 +1109,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Increase B-spline degree - + Increases the degree of the B-spline Αυξάνει τον βαθμό της καμπύλης B-spline @@ -1121,12 +1122,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Αύξηση της πολλαπλότητας κόμβου - + Increases the multiplicity of the selected knot of a B-spline Αυξάνει την πολλαπλότητα του επιλεγμένου κόμβου μιας καμπύλης B-spline @@ -1134,12 +1135,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1147,12 +1148,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1271,7 +1272,7 @@ as mirroring reference. Rectangular array - Rectangular array + Ορθογωνική Διάταξη @@ -1437,12 +1438,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Split edge - + Splits an edge into two while preserving constraints Splits an edge into two while preserving constraints @@ -1452,23 +1453,23 @@ This will clear the 'Support' property, if any. Stop operation - Stop operation + Διακοπή λειτουργίας When in edit mode, stop the active operation (drawing, constraining, etc.). - Όταν βρίσκεστε σε λειτουργία επεξεργασίας, σταματήστε την ενεργή λειτουργία (σχεδίαση, περιορισμός, κ.λ.π.). + Όταν βρίσκεστε σε λειτουργία επεξεργασίας, διακόψτε την ενεργή λειτουργία (σχέδιο, περιορισμός, κλπ.). CmdSketcherSwitchVirtualSpace - + Switch virtual space Εναλλαγή εικονικού χώρου - + Switches the selected constraints or the view to the other virtual space Πραγματοποιεί μεταφορά των επιλεγμένων περιορισμών ή της προβολής στον άλλο εικονικό χώρο @@ -1489,12 +1490,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Ενεργοποιεί ή Απενεργοποιεί την κατάσταση λειτουργίας επεξεργασίας του επιλεγμένου αντικείμενου @@ -1515,12 +1516,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1530,12 +1531,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Περικοπή ακμής - + Trim an edge with respect to the picked position Περικοπή μιας ακμής ως προς την επιλεγμένη θέση @@ -1593,369 +1594,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Προσθήκη οριζόντιου περιορισμού - - - + + + Add horizontal alignment Προσθήκη οριζόντιας ευθυγράμμισης - - + + Add vertical constraint Προσθήκη κάθετου περιορισμού - + Add vertical alignment Προσθήκη κάθετης ευθυγράμμισης - + Add 'Lock' constraint Προσθήκη περιορισμού "Κλειδώματος" - + Add relative 'Lock' constraint Προσθήκη σχετικού περιορισμού "Κλειδώματος" - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint - Add 'Block' constraint + Προσθήκη περιορισμού 'Κλειδώματος' - + Add block constraint - Add block constraint + Προσθήκη περιορισμού kλειδώματος - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from vertical axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Add length constraint - - + + Dimension Διάσταση - + Add lock constraint - Add lock constraint + Προσθήκη περιορισμού κλειδώματος - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint - Add Block constraint + Προσθήκη περιορισμού "Κλειδώματος" - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Προσθήκη κάθετου περιορισμού - + Add perpendicularity constraint Προσθήκη περιορισμού καθετότητας - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Προσθήκη περιορισμού διαμέτρου - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Προσθήκη περιορισμού νόμου Snell - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2015,44 +2017,44 @@ invalid constraints, degenerated geometry, etc. Προσθήκη κεντραρισμένου πλαισίου - + Add rounded rectangle Add rounded rectangle - + Add line to sketch wire Προσθήκη γραμμής στη γραμμή σχεδίου - + Add arc to sketch wire Προσθέστε τόξο στη γραμμή σχεδίου - - + + Add sketch arc Προσθήκη τόξου - - + + Add sketch circle Προσθήκη κύκλου - + Add sketch ellipse Προσθήκη έλλειψης - + Add sketch arc of ellipse Προσθήκη ελλειπτικό τόξο - + Add sketch arc of hyperbola Προσθήκη τόξου ομαλής καμπύλης @@ -2072,33 +2074,33 @@ invalid constraints, degenerated geometry, etc. Προσθήκη σημείου στο σχέδιο - - + + Create fillet Δημιουργία στρογγυλέματος - + Trim edge Περικοπή ακμής - + Extend edge Επέκταση ακμής - + Split edge Split edge - + Add external geometry Add external geometry - + Add slot Add slot @@ -2108,37 +2110,37 @@ invalid constraints, degenerated geometry, etc. Add hexagon - + Convert to NURBS Convert to NURBS - + Increase spline degree Increase spline degree - + Decrease spline degree Decrease spline degree - + Increase knot multiplicity Αύξηση της πολλαπλότητας κόμβου - + Decrease knot multiplicity Μείωση της πολλαπλότητας κόμβου - + Insert knot Insert knot - + Join Curves Join Curves @@ -2155,7 +2157,7 @@ invalid constraints, degenerated geometry, etc. Copy/clone/move geometry - Copy/clone/move geometry + Αντιγραφή/κλωνοποίηση/μετακίνηση γεωμετρίας @@ -2178,12 +2180,12 @@ invalid constraints, degenerated geometry, etc. Remove Axes Alignment - + Toggle constraints to the other virtual space Toggle constraints to the other virtual space - + @@ -2191,9 +2193,9 @@ invalid constraints, degenerated geometry, etc. Update constraint's virtual space - + Add auto constraints - Add auto constraints + Προσθήκη αυτόματων περιορισμών @@ -2231,7 +2233,7 @@ invalid constraints, degenerated geometry, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2247,37 +2249,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Σφάλμα αυτόματου περιορισμού: άλυτο σχέδιο κατά την εφαρμογή πολλαπλών περιορισμών. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Σφάλμα αυτόματου περιορισμού: Άλυτο σχέδιο εφαρμόζοντας κάθετους/οριζόντιους περιορισμούς. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Σφάλμα αυτόματου περιορισμού: Άλυτο σχέδιο κατά την εφαρμογή περιορισμών ισότητας. - + Autoconstrain error: Unsolvable sketch without constraints. Σφάλμα αυτόματου περιορισμού: Άλυτο σχέδιο χωρίς περιορισμούς. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Σφάλμα αυτόματου περιορισμού: Άλυτο σχέδιο μετά την εφαρμογή οριζόντιων και κατακόρυφων περιορισμών. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Σφάλμα αυτόματου περιορισμού: Άλυτο σχέδιο μετά την εφαρμογή περιορισμών από σημείο σε σημείο. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Σφάλμα αυτόματου περιορισμού: Άλυτο σχέδιο μετά την εφαρμογή περιορισμών ισότητας. @@ -2403,143 +2405,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2555,9 +2557,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Λάθος επιλογή @@ -2578,329 +2580,329 @@ invalid constraints, degenerated geometry, etc. Περιορισμός διαστάσεων - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. + Δεν είναι δυνατή η προσθήκη περιορισμού μεταξύ δύο σταθερών γεωμετριών. Οι σταθερές γεωμετρίες περιλαμβάνουν εξωτερική γεωμετρία, φραγμένη γεωμετρία, και ειδικά σημεία όπως σημεία κόμβων καμπύλης B-spline. - + Sketcher Constraint Substitution Αντικατάσταση περιορισμού Σχεδιασμού - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Επιτρέπεται η επιλογή μόνο του σχεδίου και της υποστήριξής του. - + One of the selected has to be on the sketch. Ένα από τα επιλεγμένα πρέπει να βρίσκεται στο σχέδιο. - - + + Select an edge from the sketch. Επιλέξτε μια ακμή από το σχέδιο. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Αδύνατος περιορισμός - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Διπλός περιορισμός - - - - - + + + + + The selected edge already has a horizontal constraint! The selected edge already has a horizontal constraint! - - - + + + The selected edge already has a vertical constraint! The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! - The selected edge already has a Block constraint! + Η επιλεγμένη ακμή έχει ήδη έναν περιορισμό! - + The selected item(s) can't accept a horizontal constraint! Το επιλεγμένο αντικείμενο(α) δεν μπορεί να δεχτεί οριζόντιο περιορισμό! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! - There are more than one fixed points selected. Select a maximum of one fixed point! + Υπάρχουν περισσότερα από ένα σταθερά σημεία επιλεγμένα. Επιλέξτε το πολύ ένα σταθερό σημείο! - + The selected item(s) can't accept a vertical constraint! Το επιλεγμένα αντικείμενο(α) δεν μπορεί να δεχτεί κατακόρυφο περιορισμό! - - - + + + Select vertices from the sketch. Επιλέξτε κορυφές από το σχέδιο. - + Select one vertex from the sketch other than the origin. Επιλέξτε μια κορυφή από το σκαρίφημα εκτός από το σημείο τομής των αξόνων. - + Select only vertices from the sketch. The last selected vertex may be the origin. Επιλέξτε μόνο τις κορυφές από το σχέδιο. Η τελευταία επιλεγμένη κορυφή δύναται να είναι το σημείο τομής των αξόνων. - + Wrong solver status Λάθος κατάσταση επιλυτή - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Δεν μπορεί να προστεθεί περιορισμός εάν το σχέδιο δεν έχει επιλυθεί ή υπάρχουν περιττοί και αντικρουόμενοι περιορισμοί. - + Select one edge from the sketch. Επιλέξτε μια ακμή από το σχέδιο. - + Select only edges from the sketch. Επιλέξτε μόνο ακμές από το σχέδιο. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Σφάλμα - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Εφαρμόστηκε περιορισμός επαφής μεταξύ άκρων εναλλακτικά. - + Select two or more points from the sketch. Επιλέξτε δύο ή περισσότερα σημεία από το σχέδιο. - + Select two or more vertices from the sketch. Επιλέξτε δύο ή περισσότερες κορυφές από το σχέδιο. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Επιλέξτε ακριβώς μια γραμμή ή ένα σημείο και μια γραμμή ή δύο σημεία από το σχέδιο. - + Cannot add a length constraint on an axis! Αδύνατη η προσθήκη περιορισμού μήκους σε άξονα! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Επιλέξτε τα κατάλληλα στοιχεία από το σχέδιο. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Κανένα από τα επιλεγμένα σημεία δεν ήταν περιορισμένο πάνω στις αντίστοιχες καμπύλες, είτε επειδή είναι τμήματα του ίδιου στοιχείου, είτε επειδή ανήκουν και τα δύο στο ίδιο στοιχείο εξωτερικής γεωμετρίας. - - - - + + + + Select exactly one line or up to two points from the sketch. Επιλέξτε ακριβώς μια γραμμή ή έως και δύο σημεία από το σχέδιο. - + Cannot add a horizontal length constraint on an axis! Αδύνατη η προσθήκη περιορισμού οριζόντιου μήκους σε άξονα! - + Cannot add a fixed x-coordinate constraint on the origin point! - Cannot add a fixed x-coordinate constraint on the origin point! + Αδυναμία προσθήκης σταθερού περιορισμού συντεταγμένων x στο σημείο αρχής! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Αδύνατη η προσθήκη κατακόρυφου μήκους σε άξονα! - + Cannot add a fixed y-coordinate constraint on the origin point! - Cannot add a fixed y-coordinate constraint on the origin point! + Δεν είναι δυνατή η προσθήκη ενός σταθερού περιορισμού συντεταγμένων y στο σημείο αρχής! - + Select two or more lines from the sketch. Επιλέξτε δύο ή περισσότερες γραμμές από το σχέδιο. - - + + Select at least two lines from the sketch. Επιλέξτε τουλάχιστον δύο γραμμές από το σχέδιο. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2910,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Αποδεκτοί συνδυασμοί: δύο καμπύλες· ένα αρχικό σημείο και μια καμπύλη· ένα αρχικό και ένα τελικό σημείο· δύο καμπύλες και ένα σημείο. - + Select some geometry from the sketch. perpendicular constraint Επιλέξτε γεωμετρικά στοιχεία από το σχέδιο. - - + + Cannot add a perpendicularity constraint at an unconnected point! Αδύνατη η προσθήκη περιορισμού καθετότητας σε ένα ασύνδετο σημείο! - - - + + + Perpendicular to B-spline edge currently unsupported. Δεν υποστηρίζονται περιορισμοί καθετότητας σε ακμές καμπύλης B-spline επί του παρόντος. - - + + One of the selected edges should be a line. Μια από τις επιλεγμένες ακμές θα πρέπει να είναι γραμμή. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Εφαρμόστηκε περιορισμός επαφής μεταξύ άκρων. Ο περιορισμός ταύτισης διαγράφηκε. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Αποδεκτοί συνδυασμοί: δύο καμπύλες· ένα αρχικό σημείο και μια καμπύλη· ένα αρχικό και ένα τελικό σημείο· δύο καμπύλες και ένα σημείο. - + Select some geometry from the sketch. tangent constraint Επιλέξτε γεωμετρικά στοιχεία από το σχέδιο. - - - + + + Cannot add a tangency constraint at an unconnected point! Αδύνατη η προσθήκη περιορισμού επαφής σε ένα ασύνδετο σημείο! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Λάθος αριθμός επιλεγμένων αντικειμένων! - - + + With 3 objects, there must be 2 curves and 1 point. Με 3 αντικείμενα, πρέπει να υπάρχουν 2 καμπύλες και 1 σημείο. - - - + + + Tangency to B-spline edge currently unsupported. Δεν υποστηρίζονται περιορισμοί επαφής σε ακμές καμπύλης B-spline επί του παρόντος. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Επιλέξτε ένα ή περισσότερα τόξα ή κύκλους από το σχέδιο. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Επιλέξτε έναν ή περισσότερους πόλους B-Spline είτε ένα ή περισσότερα τόξα ή κύκλους από το σχέδιο, αλλά όχι ανάμεικτα. - - - + + + Constraint only applies to arcs or circles. Ο περιορισμός εφαρμόζεται μόνο σε τόξα ή κύκλους. - - + + Select one or two lines from the sketch. Or select two edges and a point. Επιλέξτε μια ή δύο γραμμές από το σχέδιο. Ή επιλέξτε δύο ακμές και ένα σημείο. - - + + Parallel lines Παράλληλες γραμμές - - + + An angle constraint cannot be set for two parallel lines. Δεν δύναται να οριστεί γωνιακός περιορισμός για δύο παράλληλες γραμμές. - + Cannot add an angle constraint on an axis! Αδύνατη η προσθήκη γωνιακού περιορισμού σε άξονα! - + Select two edges from the sketch. Επιλέξτε δύο ακμές από το σχέδιο. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Οι άξονες σχεδίου δεν μπορούν να χρησιμοποιηθούν για περιορισμούς ισότητας. - + Equality for B-spline edge currently unsupported. Δεν υποστηρίζονται περιορισμοί ισότητας σε ακμές καμπύλης B-spline επί του παρόντος. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Επιλέξτε δύο σημεία και μια γραμμή συμμετρίας, δύο σημεία και ένα σημείο συμμετρίας ή μια γραμμή και ένα σημείο συμμετρίας από το σχέδιο. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Αδύνατη η προσθήκη περιορισμού μεταξύ μιας γραμμής και του αρχικού ή του τελικού της σημείου! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Τα επιλεγμένα στοιχεία δεν είναι μόνο γεωμετρικά στοιχεία από το ίδιο σκαρίφημα. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Επιλέξτε τους περιορισμούς από το σχέδιο. - - - + + + Select constraint(s) from the sketch. Επιλέξτε περιορισμό(ή περιορισμούς) από το σχέδιο. - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error Σφάλμα Πυρήνα CAD - + None of the selected elements is an edge. Κανένα από τα επιλεγμένα στοιχεία δεν είναι ακμή. - - + + At least one of the selected objects was not a B-Spline and was ignored. Τουλάχιστον ένα από τα επιλεγμένα αντικείμενα δεν ήταν καμπύλη B-spline και αγνοήθηκε. - - + + The selection comprises more than one item. Please select just one knot. Η επιλογή περιλαμβάνει πάνω από ένα αντικείμενα. Παρακαλώ επιλέξτε μόνο έναν κόμβο. - - + + Input Error Σφάλμα Εισαγωγής - - + + None of the selected elements is a knot of a B-spline Κανένα από τα επιλεγμένα στοιχεία δεν είναι κόμβος καμπύλης B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3305,17 +3307,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3388,12 +3390,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Vertical - Vertical + Κατακόρυφα Horizontal - Horizontal + Οριζόντια @@ -3423,7 +3425,7 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Block - Block + Αποκλεισμός @@ -3629,12 +3631,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Μήκος: - + Refractive index ratio Δείκτης διάθλασης - + Ratio n2/n1: Λόγος n2/n1: @@ -3762,12 +3764,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Block Constraint - Block Constraint + Περιορισμός Κλειδώματος Lock Constraint - Lock Constraint + Περιορισμός Κλειδώματος @@ -3914,8 +3916,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Ανώνυμο @@ -4114,7 +4116,7 @@ Requires to re-enter edit mode to take effect. Auto remove redundants - Αυτόματη αφαίρεση περιττών + Αυτόματη αφαίρεση πλεοναζόντων @@ -4129,7 +4131,7 @@ Requires to re-enter edit mode to take effect. Notifies about automatic constraint substitutions - Notifies about automatic constraint substitutions + Ειδοποιεί για αυτόματες αντικαταστάσεις περιορισμών @@ -4149,13 +4151,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4176,32 +4178,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Both - + Auto Αυτόματο - + Diameter Διάμετρος - + Radius Ακτίνα @@ -4650,12 +4652,12 @@ Then objects are only visible behind the sketch plane. Εφαρμογή στα υπάρχοντα σχέδια - + Unexpected C++ exception Απρόσμενη εξαίρεση C++ - + Sketcher Σχεδιασμός @@ -4663,55 +4665,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Δεν υπάρχει αστοχία σύμπτωσης σημείων - + No missing coincidences found Δεν βρέθηκαν περιπτώσεις αστοχίας σύμπτωσης σημείων - + Missing coincidences Βρέθηκαν περιπτώσεις αστοχίας σύμπτωσης σημείων - + %1 missing coincidences found Βρέθηκαν %1 περιπτώσεις αστοχίας σύμπτωσης σημείων - + No invalid constraints Κανένας μη έγκυρος περιορισμός - + No invalid constraints found Δεν βρέθηκε κανένας μη έγκυρος περιορισμός - + Invalid constraints Μη έγκυροι περιορισμοί - + Invalid constraints found Βρέθηκαν μη έγκυροι περιορισμοί - - - + + + Reversed external geometry Ανεστραμμένη εξωτερική γεωμετρία - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4724,82 +4726,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Κάντε κλικ στο κουμπί "Εναλλαγή τελικών σημείων σε περιορισμούς" για να εκχωρήσετε εκ νέου τελικά σημεία. Κάντε αυτό μόνο μία φορά σε σκίτσα που έχουν δημιουργηθεί σε FreeCAD παλαιότερα από την έκδοση 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. Βρέθηκαν %1 ανεστραμμένα τόξα εξωτερικής γεωμετρίας. Τα αρχικά και τα τελικά τους σημεία επισημαίνονται στην τρισδιάστατη προβολή. - + No reversed external-geometry arcs were found. Δεν βρέθηκε κανένα ανεστραμμένο τόξο εξωτερικής γεωμετρίας. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 αλλαγές έγιναν σε περιορισμούς που συνδέονται με τα αρχικά και τελικά σημεία ανεστραμμένων τόξων. - - + + Constraint orientation locking Περιορισμός κλειδώματος προσανατολισμού - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Το κλείδωμα προσανατολισμού ενεργοποιήθηκε και υπολογίστηκε εκ νέου για τους περιορισμούς %1. Οι περιορισμοί παρατίθενται στο (μενού Προβολή -> Πίνακες -> Προβολή αναφοράς). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Το κλείδωμα προσανατολισμού απενεργοποιήθηκε για τους περιορισμούς %1. Οι περιορισμοί έχουν παρατεθεί στο (μενού Προβολή -> Πίνακες -> Προβολή αναφοράς). Σημειώστε ότι για όλους τους μελλοντικούς περιορισμούς, το κλείδωμα εξακολουθεί να είναι ON (ενεργοποιημένο). - - + + Delete constraints to external geom. Διαγραφή περιορισμών των στοιχείων εξωτερικής γεωμετρίας. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Πρόκειται να διαγράψετε ΟΛΟΥΣ τους περιορισμούς που σχετίζονται με την εξωτερική γεωμετρία. Αυτή η επιλογή είναι χρήσιμη αν θέλετε να σώσετε ένα σχέδιο με χαλασμένες/αλλαγμένες συνδέσεις εξωτερικής γεωμετρίας. Είστε βέβαιοι πως θέλετε να διαγράψετε τους περιορισμούς; - + All constraints that deal with external geometry were deleted. Όλοι οι περιορισμοί που σχετίζονται με την εξωτερική γεωμετρία διαγράφηκαν. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - Μορφή - Check to toggle filters @@ -4838,7 +4835,7 @@ However, no constraints linking to the endpoints were found. Auto remove redundants - Αυτόματη αφαίρεση περιττών + Αυτόματη αφαίρεση πλεοναζόντων @@ -4874,11 +4871,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Μορφή - Check to toggle filters @@ -5064,7 +5056,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Πεδίο ελέγχου επιλυτή για προχωρημένους @@ -5212,7 +5204,7 @@ This is done by analyzing the sketch geometries and constraints. Enables/updates constraint orientation locking - Enables/updates constraint orientation locking + Ενεργοποιεί/ενημερώνει το κλείδωμα περιορισμού προσανατολισμού @@ -5222,7 +5214,7 @@ This is done by analyzing the sketch geometries and constraints. Disables constraint orientation locking - Disables constraint orientation locking + Απενεργοποιεί το κλείδωμα προσανατολισμού περιορισμού @@ -5354,8 +5346,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Πραγματοποιεί εναλλαγή μεταξύ εμφάνισης και απόκρυψης του οδηγού καμπυλότητας όλων των καμπύλων B-spline @@ -5363,8 +5355,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Μειώνει την πολλαπλότητα του επιλεγμένου κόμβου μιας καμπύλης B-spline @@ -5372,8 +5364,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Πραγματοποιεί εναλλαγή μεταξύ εμφάνισης και απόκρυψης του βαθμού όλων των καμπύλων B-spline @@ -5381,8 +5373,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Αυξάνει την πολλαπλότητα του επιλεγμένου κόμβου μιας καμπύλης B-spline @@ -5390,8 +5382,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Πραγματοποιεί εναλλαγή μεταξύ εμφάνισης και απόκρυψης της πολλαπλότητας κόμβων όλων των καμπύλων B-spline @@ -5399,8 +5391,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Switches between showing and hiding the control point weight for all B-splines @@ -5408,8 +5400,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Πραγματοποιεί εναλλαγή μεταξύ εμφάνισης και απόκρυψης των πολυγώνων ελέγχου όλων των καμπύλων B-spline @@ -5444,8 +5436,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Όρισε τη σταθερή διάμετρο ενός κύκλου, ή ενός τόξου @@ -5453,16 +5445,16 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc + Καθορισμός της ακτίνας/διαμέτρου ενός κύκλου ή ενός τόξου Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Καθορισμός της ακτίνας ενός κύκλου ή ενός τόξου @@ -5470,9 +5462,9 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc + Καθορισμός της ακτίνας/διαμέτρου ενός κύκλου ή ενός τόξου @@ -5487,8 +5479,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Δημιουργία ενός τόξου με χρήση του αρχικού και του τελικού του σημείου καθώς και ενός σημείου κατά μήκος του τόξου @@ -5496,8 +5488,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Δημιουργία ενός κύκλου από 3 σημεία της περιφέρειας @@ -5505,8 +5497,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Δημιουργία ενός τόξου με χρήση του κέντρου, του αρχικού και του τελικού του σημείου @@ -5514,26 +5506,26 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints - Create an arc of ellipse by its center, major radius, and endpoints + Δημιουργήστε ένα τόξο έλλειψης με βάση το κέντρο, την μεγάλη ακτίνα και τα τελικά σημεία Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints - Create an arc of hyperbola by its center, major radius, and endpoints + Δημιουργήστε ένα τόξο υπερβολής με βάση το κέντρο, την μεγάλη ακτίνα και τα τελικά σημεία Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Δημιουργήστε ένα τόξο παραβολής από την εστία του, την κορυφή και τελικά σημεία @@ -5541,13 +5533,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points Καμπύλη B-spline από σημεία ελέγχου - - + + Create a B-spline by control points Δημιουργία μιας καμπύλης B-spline με χρήση σημείων ελέγχου @@ -5555,8 +5547,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Δημιουργία ενός κύκλου με χρήση του κέντρου του και ενός σημείου της περιφέρειας @@ -5564,8 +5556,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Δημιουργία μιας έλλειψης με χρήση του περίκεντρου, του απόκεντρου και του μικρού ημιάξονα @@ -5573,8 +5565,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Δημιουργία μιας έλλειψης με χρήση του κέντρου της, του μεγάλου ημιάξονα και ενός σημείου @@ -5582,8 +5574,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Δημιουργεί ένα τόξο μεταξύ δύο γραμμών @@ -5591,8 +5583,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Δημιουργία ενός επταγώνου με χρήση του κέντρου του και μιας γωνίας @@ -5600,8 +5592,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Δημιουργία ενός εξαγώνου με χρήση του κέντρου του και μιας γωνίας @@ -5609,7 +5601,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Create a rounded rectangle @@ -5617,14 +5609,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Δημιουργία ενός οκταγώνου με χρήση του κέντρου του και μιας γωνίας - - + + Create a regular polygon by its center and by one corner Δημιουργία ενός κανονικού πολυγώνου με χρήση του κέντρου του και μιας γωνίας @@ -5632,8 +5624,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Δημιουργία ενός πενταγώνου με χρήση του κέντρου του και μιας γωνίας @@ -5641,16 +5633,16 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point - Fillet that preserves constraints and intersection point + Στρογγύλεμα που διατηρεί τους περιορισμούς και το σημείο τομής Sketcher_CreateRectangle - + Create a rectangle Create a rectangle @@ -5658,7 +5650,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Create a centered rectangle @@ -5666,8 +5658,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Δημιουργία ενός τετραγώνου με χρήση του κέντρου του και μιας γωνίας @@ -5675,8 +5667,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Δημιουργία ενός ισόπλευρου τριγώνου με χρήση του κέντρου του και μιας γωνίας @@ -5684,13 +5676,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Περιοδική καμπύλη B-spline από σημεία ελέγχου - - + + Create a periodic B-spline by control points Δημιουργία μιας περιοδικής καμπύλης B-spline με χρήση σημείων ελέγχου @@ -6324,36 +6316,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Σφάλμα @@ -6373,47 +6365,47 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! - Cannot create arc of hyperbola from invalid angles, try again! + Αδυναμία δημιουργίας τόξου υπερβολής από μη έγκυρες γωνίες, προσπαθήστε ξανά! - + Cannot create arc of hyperbola - Cannot create arc of hyperbola + Αδυναμία δημιουργίας τόξου υπερβολής - + Cannot create arc of parabola - Cannot create arc of parabola + Αδυναμία δημιουργίας τόξου παραβολής @@ -6421,18 +6413,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6442,49 +6434,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet - Failed to create fillet + Αποτυχία δημιουργίας φιλέτου - + Failed to add line Failed to add line @@ -6494,7 +6486,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6504,27 +6496,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6534,13 +6526,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6548,13 +6540,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6660,12 +6652,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6673,12 +6665,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6686,12 +6678,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Διάσταση - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6703,14 +6695,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Διάσταση + + + + Dimension tools. + Dimension tools. + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts index 7c71e8ffea..b3f5a8e61f 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Crear una copia carbónica - + Copy the geometry of another sketch Copia la geometría de otro croquis @@ -100,27 +100,27 @@ Mostrar/ocultar capa de información de B-spline - + Show/hide B-spline degree Mostrar/ocultar grado de B-spline - + Show/hide B-spline control polygon Mostrar/ocultar control poligonal de B-spline - + Show/hide B-spline curvature comb Mostrar/ocultar peine de curvatura B-spline - + Show/hide B-spline knot multiplicity Mostrar/ocultar multiplicidad de nudo de B-spline - + Show/hide B-spline control point weight Mostrar/ocultar el peso de los puntos de control de la B-spline @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir arco o circunferencia - + Constrain an arc or a circle Restringe un arco o una circunferencia - + Constrain radius Restringir radio - + Constrain diameter Restringir diámetro - + Constrain auto radius/diameter Restricción automática de radio/diámetro @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Crear arco - + Create an arc in the sketcher Crea un arco en el Croquis - + Center and end points Centro y puntos finales - + End points and rim point Puntos finales y punto de borde @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Crear B-spline - + Create a B-spline in the sketch Crea una B-spline en el croquis @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Crear circunferencia - + Create a circle in the sketcher Crea una circunferencia en el croquis - + Center and rim point Centro y punto de borde - + 3 rim points 3 puntos del borde @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Crear una curva cónica - + Create a conic in the sketch Crea una curva cónica en el croquis - + Ellipse by center, major radius, point Elipse mediante centro, radio mayor, punto - + Ellipse by periapsis, apoapsis, minor radius Elipse mediante periastro, apoastro y radio menor - + Arc of ellipse by center, major radius, endpoints Arco de elipse mediante centro, radio mayor, puntos finales - + Arc of hyperbola by center, major radius, endpoints Arco de hipérbola mediante centro, radio mayor, puntos finales - + Arc of parabola by focus, vertex, endpoints Arco de parábola mediante foco, vértices, puntos finales @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Crear redondeo - + Create a fillet between two lines Crea un redondeo entre dos aristas - + Sketch fillet Redondeo en croquis - + Constraint-preserving sketch fillet Restricción conservando el redondeo de croquis @@ -299,17 +299,17 @@ Crea un rectángulo en el croquis - + Rectangle Rectángulo - + Centered rectangle Rectángulo centrado - + Rounded rectangle Rectángulo redondeado @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Crear polígono regular - + Create a regular polygon in the sketcher Crea un polígono regular en el croquis - + Triangle Triángulo - + Square Cuadrado - + Pentagon Pentágono - + Hexagon Hexágono - + Heptagon Heptágono - + Octagon Octágono - + Regular polygon Polígono regular @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modificar multiplicidad de nudo - + Modifies the multiplicity of the selected knot of a B-spline Modifica la multiplicidad del nudo seleccionado de una B-spline - + Increase knot multiplicity Aumentar la multiplicidad de nudo - + Decrease knot multiplicity Disminuir la multiplicidad de nudo @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restringir ángulo - + Fix the angle of a line or the angle between two lines Fija el ángulo de una línea o el ángulo entre dos líneas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restricción en bloque - + Block the selected edge from moving Bloquea el movimiento del borde seleccionado @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restringir coincidencia - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea una restricción coincidente entre puntos, o una restricción concéntrica entre círculos, arcos y elipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir diámetro - + Fix the diameter of a circle or an arc Fija el diámetro de una circunferencia o un arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restringir distancia - + Fix a length of a line or the distance between a line and a vertex or between two circles Fija una longitud de una línea o la distancia entre una línea y un vértice o entre dos círculos @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Restricción de distancia horizontal - + Fix the horizontal distance between two points or line ends Fija la distancia horizontal entre dos puntos o extremos de línea @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restricción de distancia vertical - + Fix the vertical distance between two points or line ends Fija la distancia vertical entre dos puntos o extremos de línea @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restringir igualdad - + Create an equality constraint between two lines or between circles and arcs Crea una restricción de igualdad entre dos líneas o entre circunferencias y arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Crea una restricción horizontal en el elemento seleccionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restringir bloqueo - + Create both a horizontal and a vertical distance constraint on the selected vertex Crea una restricción de distancia horizontal y vertical @@ -520,12 +520,12 @@ en el vértice seleccionado CmdSketcherConstrainParallel - + Constrain parallel Restringir paralela - + Create a parallel constraint between two lines Crea una restricción paralela entre dos líneas @@ -533,12 +533,12 @@ en el vértice seleccionado CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restringir perpendicular - + Create a perpendicular constraint between two lines Crea una restricción perpendicular entre dos líneas @@ -546,12 +546,12 @@ en el vértice seleccionado CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir el punto al objeto - + Fix a point onto an object Fija un punto en un objeto @@ -559,12 +559,12 @@ en el vértice seleccionado CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restricción automática de radio/diámetro - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Corrija el diámetro si se elige un círculo, o el radio si se elige un polo arco/curva @@ -572,12 +572,12 @@ en el vértice seleccionado CmdSketcherConstrainRadius - + Constrain radius or weight Restringir radio o peso - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fija el radio de una circunferencia o un arco o corrige el peso del polo de una B-Spline @@ -585,12 +585,12 @@ en el vértice seleccionado CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Restricción de refracción (Ley de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crea una restricción de ley de refracción (ley de Snell) entre dos extremos de los rayos @@ -600,12 +600,12 @@ y un borde como interfaz. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restringir simetría - + Create a symmetry constraint between two points with respect to a line or a third point Crea una restricción de simetría entre dos puntos @@ -615,12 +615,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainTangent - + Constrain tangent Restringir tangente - + Create a tangent constraint between two entities Crea una restricción tangente entre dos entidades @@ -628,12 +628,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Crea una restricción vertical en el elemento seleccionado @@ -641,12 +641,12 @@ con respecto a una línea o un tercer punto CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convertir geometría en una B-spline - + Converts the selected geometry to a B-spline Convierte la geometría seleccionada en una B-spline @@ -667,12 +667,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreate3PointArc - + Create arc by three points Crear arco por tres puntos - + Create an arc by its end points and a point along the arc Crea un arco por sus puntos finales y un punto a lo largo del arco @@ -680,12 +680,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreate3PointCircle - + Create circle by three points Crear una circunferencia por tres puntos - + Create a circle by 3 perimeter points Crea una circunferencia por 3 puntos perimetrales @@ -693,12 +693,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArc - + Create arc by center Crear arco por centro - + Create an arc by its center and by its end points Crea un arco por su centro y sus extremos @@ -706,12 +706,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Crear arco de elipse - + Create an arc of ellipse in the sketch Crear un arco de elipse en el croquis @@ -719,12 +719,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Crear arco de hiperbola - + Create an arc of hyperbola in the sketch Crear un arco de hipérbola en el croquis @@ -732,12 +732,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArcOfParabola - + Create arc of parabola Crear arco de parábola - + Create an arc of parabola in the sketch Crear un arco de parábola en el croquis @@ -745,12 +745,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateBSpline - + Create B-spline Crear B-spline - + Create a B-spline by control points in the sketch. Crear una B-spline por puntos de control en el croquis. @@ -758,12 +758,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateCircle - + Create circle Crear circunferencia - + Create a circle in the sketch Crea una circunferencia en el croquis @@ -771,12 +771,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Crear elipse mediante 3 puntos - + Create an ellipse by 3 points in the sketch Crear elipse mediante 3 puntos en el Croquizador @@ -784,12 +784,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateEllipseByCenter - + Create ellipse by center Crear elipse mediante centro - + Create an ellipse by center in the sketch Crear una elipse mediante centro en el Croquizador @@ -797,12 +797,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateFillet - + Create fillet Crear redondeo - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -810,12 +810,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateHeptagon - + Create heptagon Crear heptágono - + Create a heptagon in the sketch Crear un heptágono en el Croquizador @@ -823,12 +823,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateHexagon - + Create hexagon Crear hexágono - + Create a hexagon in the sketch Crear un hexágono en el Croquizador @@ -862,12 +862,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateOctagon - + Create octagon Crear octágono - + Create an octagon in the sketch Crear un octágono en el Croquizador @@ -875,12 +875,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePentagon - + Create pentagon Crear pentágono - + Create a pentagon in the sketch Crear un pentágono en el Croquizador @@ -888,12 +888,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Crear una B-spline periódica - + Create a periodic B-spline by control points in the sketch. Crear una B-spline periódica por puntos de control en el croquis. @@ -901,12 +901,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePoint - + Create point Crear punto - + Create a point in the sketch Crea un punto en el croquis @@ -914,12 +914,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePointFillet - + Create corner-preserving fillet Crear un redondeo conservando las esquinas - + Fillet that preserves intersection point and most constraints Redondeo que conserva el punto de intersección y la mayoría de las restricciones @@ -927,12 +927,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePolyline - + Create polyline Crear polilínea - + Create a polyline in the sketch. 'M' Key cycles behaviour Crea una polilínea en el croquis. La tecla 'M' cambia su comportamiento @@ -966,12 +966,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateRegularPolygon - + Create regular polygon Crear polígono regular - + Create a regular polygon in the sketch Crea un polígono regular en el croquis @@ -979,12 +979,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateSlot - + Create slot Crear ranura - + Create a slot in the sketch Crea una ranura en el croquis @@ -992,12 +992,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateSquare - + Create square Crear cuadrado - + Create a square in the sketch Crear un cuadrado en el Croquizador @@ -1005,12 +1005,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateTriangle - + Create equilateral triangle Crear triángulo equilátero - + Create an equilateral triangle in the sketch Crear un triángulo equilátero en el Croquizador @@ -1018,12 +1018,12 @@ con respecto a una línea o un tercer punto CmdSketcherDecreaseDegree - + Decrease B-spline degree Reducir grado de B-spline - + Decreases the degree of the B-spline Disminuye el grado de la B-spline @@ -1031,12 +1031,12 @@ con respecto a una línea o un tercer punto CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Disminuir la multiplicidad de nudo - + Decreases the multiplicity of the selected knot of a B-spline Disminuye la multiplicidad del nudo seleccionado de una B-spline @@ -1083,12 +1083,12 @@ con respecto a una línea o un tercer punto CmdSketcherExtend - + Extend edge Extender borde - + Extend an edge with respect to the picked position Extiende un borde con respecto a la posición seleccionada @@ -1096,12 +1096,12 @@ con respecto a una línea o un tercer punto CmdSketcherExternal - + Create external geometry Crear geometría externa - + Create an edge linked to an external geometry Crea un borde vinculado a una geometría externa @@ -1109,12 +1109,12 @@ con respecto a una línea o un tercer punto CmdSketcherIncreaseDegree - + Increase B-spline degree Aumentar grado de B-spline - + Increases the degree of the B-spline Aumenta el grado de la B-spline @@ -1122,12 +1122,12 @@ con respecto a una línea o un tercer punto CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Aumentar la multiplicidad de nudo - + Increases the multiplicity of the selected knot of a B-spline Aumenta la multiplicidad del nudo seleccionado de una B-spline @@ -1135,12 +1135,12 @@ con respecto a una línea o un tercer punto CmdSketcherInsertKnot - + Insert knot Insertar nodo - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserta el nodo en un parámetro determinado. Si ya existe un nodo en ese parámetro, su multiplicidad se incrementa en uno. @@ -1148,12 +1148,12 @@ con respecto a una línea o un tercer punto CmdSketcherJoinCurves - + Join curves Unir curvas - + Join two curves at selected end points Une dos curvas en los puntos finales seleccionados @@ -1439,12 +1439,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherSplit - + Split edge Dividir borde - + Splits an edge into two while preserving constraints Divide un borde en dos preservando las restricciones @@ -1465,12 +1465,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherSwitchVirtualSpace - + Switch virtual space Cambia el espacio virtual - + Switches the selected constraints or the view to the other virtual space Cambia las restricciones seleccionadas o la vista a otro espacio virtual @@ -1491,12 +1491,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activar/desactivar restricción - + Activates or deactivates the selected constraints Activa o desactiva las restricciones seleccionadas @@ -1517,12 +1517,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Alterna las restricciones entre operativas o de referencia - + Set the toolbar, or the selected constraints, into driving or reference mode Fija la barra de herramientas, o las restricciones seleccionadas, @@ -1532,12 +1532,12 @@ en modo operativo o de referencia CmdSketcherTrimming - + Trim edge Recortar borde - + Trim an edge with respect to the picked position Recorta un borde con respecto a la posición elegida @@ -1596,369 +1596,370 @@ restricciones inválidas, geometrías degeneradas, etc. Command - - + + Add horizontal constraint Añadir restricción horizontal - - - + + + Add horizontal alignment Añadir alineación horizontal - - + + Add vertical constraint Añadir restricción vertical - + Add vertical alignment Añadir alineación vertical - + Add 'Lock' constraint Añadir restricción 'Bloquear' - + Add relative 'Lock' constraint Agregar restricción relativa 'Bloquear' - + Add fixed constraint Añadir restricción fija - + Add 'Block' constraint Añadir restricción 'Bloqueo' - + Add block constraint Añadir restricción de bloqueo - - - + + + Add coincident constraint Añadir restricción coincidente - - + + Add distance from horizontal axis constraint Añadir distancia desde la restricción del eje horizontal - - + + Add distance from vertical axis constraint Añadir distancia desde la restricción del eje vertical - - + + Add point to point distance constraint Añadir punto a restricción de distancia de punto - - - + + + Add point to line Distance constraint Añadir punto a restricción de Distancia de Línea - - + + Add circle to circle distance constraint Agrega un círculo a la restricción de distancia circular - + Add circle to line distance constraint Agrega un círculo a la restricción de distancia de línea - - - - - + + + + + + Add length constraint Añadir restricción de longitud - - + + Dimension Cota - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Añadir punto a la restricción del objeto - - + + Add point to point horizontal distance constraint Añadir punto a la restricción de distancia horizontal del punto - + Add fixed x-coordinate constraint Añadir restricción de coordenada-x fija - - + + Add point to point vertical distance constraint Añadir punto a la restricción de distancia vertical del punto - + Add fixed y-coordinate constraint Añadir restricción de coordenada-y fija - - + + Add parallel constraint Añadir restricción paralela - - - - - - - + + + + + + + Add perpendicular constraint Añadir restricción perpendicular - + Add perpendicularity constraint Añadir restricción de perpendicularidad - + Swap coincident+tangency with ptp tangency Intercambia coincidencia + tangencia con la tangencia ptp - + Swap PointOnObject+tangency with point to curve tangency Intercambia Punto en Objeto+tangencia con tangencia de punto a curva - - - - - - - + + + + + + + Add tangent constraint Añadir restricción tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Añadir punto de restricción tangente - - - - + + + + Add radius constraint Añadir restricción de radio - - - - + + + + Add diameter constraint Añadir restricción de diámetro - - - - + + + + Add radiam constraint Añadir restricción de radio - - - - - - + + + + + + Add angle constraint Añadir restricción de ángulo - - + + Add equality constraint Añadir restricción de igualdad - - - - - + + + + + Add symmetric constraint Añadir restricción de simetría - + Add Snell's law constraint Añadir restricción de ley de Snell - + Toggle constraint to driving/reference Cambiar la restricción a la conducción/referencia - + Activate/Deactivate constraint Activar/desactivar restricción @@ -2018,44 +2019,44 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir cuadro de croquis centrado - + Add rounded rectangle Añadir rectángulo redondeado - + Add line to sketch wire Añadir línea al alambre de croquis - + Add arc to sketch wire Añadir arco al alambre de croquis - - + + Add sketch arc Añadir arco de croquis - - + + Add sketch circle Añadir circunferencia de croquis - + Add sketch ellipse Añadir elipse de croquis - + Add sketch arc of ellipse Añadir arco de elipse de croquis - + Add sketch arc of hyperbola Añadir arco de hipérbola de croquis @@ -2075,33 +2076,33 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir punto de croquis - - + + Create fillet Crear redondeo - + Trim edge Recortar borde - + Extend edge Extender borde - + Split edge Dividir borde - + Add external geometry Añadir geometría externa - + Add slot Agregar ranura @@ -2111,37 +2112,37 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir hexágono - + Convert to NURBS Convertir a NURBS - + Increase spline degree Aumentar grado de spline - + Decrease spline degree Reducir grado de spline - + Increase knot multiplicity Aumentar la multiplicidad de nudo - + Decrease knot multiplicity Disminuir la multiplicidad de nudo - + Insert knot Insertar nodo - + Join Curves Unir curvas @@ -2181,12 +2182,12 @@ restricciones inválidas, geometrías degeneradas, etc. Quitar alineación de ejes - + Toggle constraints to the other virtual space Cambiar restricciones al otro espacio virtual - + @@ -2194,7 +2195,7 @@ restricciones inválidas, geometrías degeneradas, etc. Actualizar el espacio virtual de la restricción - + Add auto constraints Añadir restricciones automáticas @@ -2234,7 +2235,7 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir punto de nudo - + Create a carbon copy Crear una copia carbónica @@ -2250,37 +2251,37 @@ restricciones inválidas, geometrías degeneradas, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Error de auto-restricción: Croquis sin solución al aplicar restricciones coincidentes. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Error de auto-restricción: Croquis sin solución al aplicar restricciones verticales/horizontales. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Error de auto-restricción: Croquis sin solución al aplicar restricciones de igualdad. - + Autoconstrain error: Unsolvable sketch without constraints. Error de auto-restricción: Croquis sin restricciones no tiene solución. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Error de auto-restricción: Croquis sin solución después de aplicar restricciones horizontales y verticales. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Error de auto-restricción: Croquis sin solución después de aplicar restricciones de punto a punto. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Error de auto-restricción: Croquis sin solución después de aplicar restricciones de igualdad. @@ -2405,143 +2406,143 @@ restricciones inválidas, geometrías degeneradas, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2557,9 +2558,9 @@ restricciones inválidas, geometrías degeneradas, etc. - - - + + + Wrong selection Selección Incorrecta @@ -2580,329 +2581,329 @@ restricciones inválidas, geometrías degeneradas, etc. Restricción de cota - + Cannot add a constraint between two external geometries. No se puede añadir una restricción entre dos geometrias externas. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. No se puede agregar una restricción entre dos geometrías fijas. Las geometrías fijas incluyen geometría externa, geometría bloqueada y puntos especiales como puntos de nodos de B-spline. - + Sketcher Constraint Substitution Sustitución de restricción del croquis - + Keep notifying me of constraint substitutions Seguir notificándome de sustituciones de restricciones - - - + + + Only sketch and its support are allowed to be selected. Solo se permite seleccionar el croquis y su soporte. - + One of the selected has to be on the sketch. Uno de los seleccionados tiene que estar en el croquis. - - + + Select an edge from the sketch. Seleccione un borde del Croquizador. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricción imposible - - - - + + + + The selected edge is not a line segment. El borde seleccionado no es un segmento de línea. - - - - - - + + + + + + Double constraint Restricción doble - - - - - + + + + + The selected edge already has a horizontal constraint! ¡El borde seleccionado ya tiene una restricción horizontal! - - - + + + The selected edge already has a vertical constraint! ¡El borde seleccionado ya tiene una restricción vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! ¡El borde seleccionado ya tiene una restricción de Bloque! - + The selected item(s) can't accept a horizontal constraint! ¡El elemento(s) seleccionado no puede aceptar una restricción horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hay más de un punto fijo seleccionado. ¡Seleccione solamente un punto fijo! - + The selected item(s) can't accept a vertical constraint! ¡El(los) elemento(s) seleccionado(s) no admiten una restricción vertical! - - - + + + Select vertices from the sketch. Selecciona vértices del croquis. - + Select one vertex from the sketch other than the origin. Seleccione un vértice del croquis que no sea el origen. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecciona sólo vértices del croquis. El último vértice seleccionado puede ser el origen. - + Wrong solver status Estado de Solver incorrecto - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Una restricción de Bloqueo no puede ser añadida si el croquis está sin resolver o hay restricciones redundantes y en conflicto. - + Select one edge from the sketch. Seleccione un borde del croquis. - + Select only edges from the sketch. Seleccione solo bordes a partir del croquis. - + Number of selected objects is not 3 El número de objetos seleccionados no es 3 - - - + + + Error Error - + Unexpected error. More information may be available in the Report View. Error inesperado. Puede haber más información disponible en la vista de reporte. - + Endpoint to endpoint tangency was applied instead. En su lugar, se aplicó la tangencia de punto final a punto final. - + Select two or more points from the sketch. Seleccione dos o más puntos del croquis. - + Select two or more vertices from the sketch. Seleccione dos o más vértices del croquis. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos o más vértices del croquis para una restricción coincidente, o dos o más círculos, elipses, arcos o arcos de elípse para una restricción concéntrica. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos vértices del croquis para una restricción coincidente, o dos círculos, elipses, arcos o arcos de elipse para una restricción concéntrica. - + Select exactly one line or one point and one line or two points from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos del croquis. - + Cannot add a length constraint on an axis! ¡No se puede agregar una restricción de longitud en un eje! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos o dos círculos del croquis. - + This constraint does not make sense for non-linear curves. Esta restricción no tiene sentido para curvas no lineales. - + Endpoint to edge tangency was applied instead. El punto final a la tangencia del borde se aplicó en su lugar. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccione las cosas correctas desde el croquis. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Seleccione un borde que no sea un peso de B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ninguno de los puntos seleccionados fueron restringidos en sus respectivas curvas, porque son partes del mismo elemento, y porque ambos son geometría externa, o porque la arista no es elegible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ninguno de los puntos seleccionados se restringió a las curvas respectivas, ya sea porque son partes del mismo elemento o porque ambos son geometría externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccione exactamente una línea o hasta dos puntos del croquis. - + Cannot add a horizontal length constraint on an axis! ¡No se puede agregar una restricción de longitud horizontal en un eje! - + Cannot add a fixed x-coordinate constraint on the origin point! ¡No se puede agregar una restricción fija de coordenadas X en el punto de origen! - - + + This constraint only makes sense on a line segment or a pair of points. Esta restricción sólo tiene sentido en un segmento de línea o un par de puntos. - + Cannot add a vertical length constraint on an axis! ¡No se puede agregar una restricción de longitud vertical sobre un eje! - + Cannot add a fixed y-coordinate constraint on the origin point! ¡No se puede agregar una restricción fija de coordenadas Y en el punto de origen! - + Select two or more lines from the sketch. Seleccione dos o más líneas del croquis. - - + + Select at least two lines from the sketch. Seleccione al menos dos líneas del croquis. - + Select a valid line. Seleccione una línea válida. - - + + The selected edge is not a valid line. El borde seleccionado no es una línea válida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2913,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos finales; dos curvas y un punto. - + Select some geometry from the sketch. perpendicular constraint Seleccione alguna geometría del croquis. - - + + Cannot add a perpendicularity constraint at an unconnected point! ¡No se puede agregar una restricción de perpendicularidad en un punto desconectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular al borde de B-spline actualmente no soportado. - - + + One of the selected edges should be a line. Uno de los bordes seleccionados debe ser una línea. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Se aplicó la tangencia de punto final a punto final. La restricción coincidente fue eliminada. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Se aplicó la restricción del punto final a la tangencia. Se eliminó la restricción del punto sobre el objeto. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,277 +2958,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos finales; dos curvas y un punto. - + Select some geometry from the sketch. tangent constraint Seleccione alguna geometría del croquis. - - - + + + Cannot add a tangency constraint at an unconnected point! ¡No se puede agregar una restricción de tangencia en un punto desconectado! - - + + Tangent constraint at B-spline knot is only supported with lines! La restricción tangente en nudo de B-spline sólo es compatible con líneas! - + B-spline knot to endpoint tangency was applied instead. En su lugar, se aplicó el punto de la B-spline al extremo de la tangencia. - + Select either one point and several curves, or one curve and several points. Seleccione un punto y varias curvas, o una curva y varios puntos. - - + + Wrong number of selected objects! ¡Número incorrecto de objetos seleccionados! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 objetos, debe haber 2 curvas y 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tangencia a borde de B-spline no soportada actualmente. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccione uno o más arcos o circunferencias del croquis. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Seleccione sólo uno o más polos de B-Spline o sólo uno o más arcos o circunferencias del croquis, pero no mezclado. - - - + + + Constraint only applies to arcs or circles. La restricción sólo se aplica a los arcos o circunferencias. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccione una o dos líneas del croquis. O seleccione dos bordes y un punto. - - + + Parallel lines Líneas paralelas - - + + An angle constraint cannot be set for two parallel lines. No se puede establecer una restricción de ángulo para dos líneas paralelas. - + Cannot add an angle constraint on an axis! ¡No se puede agregar una restricción de ángulo en un eje! - + Select two edges from the sketch. Seleccione dos bordes del croquis. - + Select two or more compatible edges. Seleccione dos o más bordes compatibles. - + Sketch axes cannot be used in equality constraints. Los ejes de dibujo no pueden utilizarse en restricciones de igualdad. - + Equality for B-spline edge currently unsupported. La igualdad para el borde de B-spline no está soportada actualmente. - - - - + + + + Select two or more edges of similar type. Seleccione dos o más bordes de tipo similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccione dos puntos y una línea de simetría, dos puntos y un punto de simetría o una línea y un punto de simetría del croquis. - - + + Cannot add a symmetry constraint between a line and its end points. No se puede añadir una restricción de simetría entre una línea y sus extremos. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! ¡No se puede agregar una restricción de simetría entre una línea y sus puntos finales! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Seleccione dos extremos de líneas para actuar como rayos, y una arista que representa un límite. El primer punto seleccionado corresponde al índice n1, segundo a n2, y el valor de referencia establece la relación n2/n1. - + Selected objects are not just geometry from one sketch. Los objetos seleccionados no son solo geometría de un croquis. - + Cannot create constraint with external geometry only. No se puede crear restricción sólo con geometría externa. - + Incompatible geometry is selected. Se ha seleccionado geometría incompatible. - + SnellsLaw on B-spline edge is currently unsupported. Ley de Snell sobre arista de B-spline no es compatible por el momento. - - - - - + + + + + Select constraints from the sketch. Seleccione restricciones del croquis. - - - + + + Select constraint(s) from the sketch. Seleccione la(s) restriccion(es) del croquis. - + B-Spline Degree Grado B-Spline - + Define B-Spline Degree, between 1 and %1: Definir el grado de la B-Spline, entre 1 y %1: - - - + + + CAD Kernel Error Error de Kernel CAD - + None of the selected elements is an edge. Ninguno de los elementos seleccionados es un borde. - - + + At least one of the selected objects was not a B-Spline and was ignored. Al menos uno de los objetos seleccionados no era una B-Spline y fue ignorado. - - + + The selection comprises more than one item. Please select just one knot. La selección incluye más de un elemento. Por favor seleccione solo un nudo. - - + + Input Error Error de Entrada - - + + None of the selected elements is a knot of a B-spline Ninguno de los elementos seleccionados es un nudo de una B-spline - - + + Selection is empty La selección está vacía - + Nothing is selected. Please select a b-spline. No hay nada seleccionado. Por favor, seleccione una B-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Por favor, seleccione una curva b-spline para insertar un nudo (no un nudo en él). Si la curva no es una curva b-spline, por favor conviértalo en una primero. - + Nothing is selected. Please select end points of curves. No se ha seleccionado nada. Por favor, seleccione los puntos finales de las curvas. - + Too many curves on point Demasiadas curvas en el punto - - + + Exactly two curves should end at the selected point to be able to join them. Dos curvas deben terminar exactamente en el punto seleccionado para poder unirlas. - + Too few curves on point Muy pocas curvas en el punto - + Two end points, or coincident point should be selected. Se deben seleccionar dos puntos finales, o un punto coincidente. @@ -3307,17 +3308,17 @@ Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos fina Actualmente no está soportado el mover la geometría externa a otra capa visual. Se omitirá la geometría externa - + Set knot multiplicity Establecer multiplicidad del nudo - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Establece la multiplicidad del nudo en el último punto proporcionado, entre 1 y %1:Note que la multiplicidad puede ignorarse bajo ciertas circunstancias. Por favor refiérase a la documentación para detalles - + Value Error Error del valor @@ -3631,12 +3632,12 @@ Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos fina Longitud: - + Refractive index ratio Índice de refracción - + Ratio n2/n1: Relación n2/n1: @@ -3916,8 +3917,8 @@ Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos fina SketcherGui::PropertyConstraintListItem - - + + Unnamed Sin nombre @@ -4150,15 +4151,15 @@ Requiere volver a ingresar al modo de edición para tener efecto. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Selecciona el tipo de cotas de restricción para tu barra de herramientas: +'Herramienta sola': Una sola herramienta para todas las cotas de restricción en la barra de herramientas: Distancia, Distancia X / Y, Ángulo, Radio. (Otros en el desplegable) +'Herramientas separadas': Herramientas individuales para cada cota de restricción. +'Ambas': Tendrás ambas la herramienta de Dimensión y las herramientas separadas. +Estos ajustes solo son para la barra de herramientas. Cualquiera que tú escojas, todas las herramientas estan siempre disponible en el menú y a través de atajos. @@ -4177,32 +4178,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools - Separated tools + Herramientas separadas - + Both Ambas - + Auto Automático - + Diameter Diámetro - + Radius Radio @@ -4651,12 +4652,12 @@ Entonces los objetos sólo son visibles detrás del plano del croquis.Se aplica a los croquis existentes - + Unexpected C++ exception Excepción de C++ inesperada - + Sketcher Croquizador @@ -4664,55 +4665,55 @@ Entonces los objetos sólo son visibles detrás del plano del croquis. SketcherGui::SketcherValidation - + No missing coincidences No faltan coincidencias - + No missing coincidences found No se encontraron coincidencias faltantes - + Missing coincidences Falta de coincidencias - + %1 missing coincidences found %1 faltan coincidencias encontradas - + No invalid constraints Sin restricciones no válidas - + No invalid constraints found No se encontraron restricciones no válidas - + Invalid constraints Restricciones no válidas - + Invalid constraints found Se han encontrado restricciones no válidas - - - + + + Reversed external geometry Geometría externa invertida - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,7 +4726,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Haz clic en el botón "Intercambiar los extremos en las restricciones" para reasignar los extremos. Hacer únicamente una vez en croquis creados en una versión de FreeCAD anterior a v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4734,75 +4735,70 @@ However, no constraints linking to the endpoints were found. Sin embargo, no se encontraron restricciones que vinculen a los puntos finales. - + No reversed external-geometry arcs were found. No se encontraron arcos invertidos con geometría externa. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Se hicieron %1 cambios a las restricciones que vinculan a los puntos finales de los arcos invertidos. - - + + Constraint orientation locking Bloqueo de restricción de orientación - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). El bloqueo de orientación se habilitó y se volvió a calcular para %1 restricciones. Las restricciones se han enumerado en la vista Informe (menú Ver -> Paneles -> Vista informe). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. El bloqueo de orientación se deshabilitó para %1 restricciones. Las restricciones se han enumerado en la vista Informe (menú Ver -> Paneles -> Vista informe). Tenga en cuenta que para todas las restricciones futuras, el bloqueo predeterminado aún es ON. - - + + Delete constraints to external geom. Eliminar restricciones a la geometría externa. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Está a punto de eliminar TODAS las restricciones relacionadas con la geometría externa. Esto es útil para rescatar un croquis con enlaces rotos/modificados a geometría externa. ¿Estás seguro de que deseas eliminar las restricciones? - + All constraints that deal with external geometry were deleted. Se eliminaron todas las restricciones que tienen que ver con la geometría externa. - + No degenerated geometry Sin geometría degenerada - + No degenerated geometry found No se encontró geometría degenerada - + Degenerated geometry Geometría degenerada - + %1 degenerated geometry found %1 geometría degenerada encontrada SketcherGui::TaskSketcherConstraints - - - Form - Forma - Check to toggle filters @@ -4877,11 +4873,6 @@ Sin embargo, no se encontraron restricciones que vinculen a los puntos finales.< SketcherGui::TaskSketcherElements - - - Form - Forma - Check to toggle filters @@ -5067,7 +5058,7 @@ Sin embargo, no se encontraron restricciones que vinculen a los puntos finales.< SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Control avanzado del Solver @@ -5358,8 +5349,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Cambia entre mostrar y ocultar el peine de curvatura para todas las B-splines @@ -5367,8 +5358,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Disminuye la multiplicidad del nudo seleccionado de una B-spline @@ -5376,8 +5367,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Cambiar entre mostrar y ocultar el grado de todas las B-splines @@ -5385,8 +5376,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Aumenta la multiplicidad del nudo seleccionado de una B-spline @@ -5394,8 +5385,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Cambia entre mostrar y ocultar la multiplicidad de nudo para todas las B-splines @@ -5403,8 +5394,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Cambia entre mostrar y ocultar el peso de los puntos de control para todas las B-splines @@ -5412,8 +5403,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Cambia entre mostrar y ocultar los polígonos de control para todas las B-splines @@ -5448,8 +5439,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fija el diámetro de una circunferencia o un arco @@ -5457,7 +5448,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fija el diámetro/radio de una circunferencia o de un arco @@ -5465,8 +5456,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fija el radio de una circunferencia o arco @@ -5474,7 +5465,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fija el diámetro/radio de una circunferencia o de un arco @@ -5491,8 +5482,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Crea un arco por sus puntos finales y un punto a lo largo del arco @@ -5500,8 +5491,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Crear circunferencia por 3 puntos de borde @@ -5509,8 +5500,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Crea un arco por su centro y sus extremos @@ -5518,8 +5509,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Crea un arco de elipse por su centro, radio mayor y extremos @@ -5527,8 +5518,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Crear un arco de hipérbola por su centro, radio mayor y puntos finales @@ -5536,8 +5527,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Crea un arco de parábola por su foco, vértice y extremos @@ -5545,13 +5536,13 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateBSpline - + B-spline by control points B-spline por puntos de control - - + + Create a B-spline by control points Crea una B-spline por puntos de control @@ -5559,8 +5550,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Crea una circunferencia por su centro y un punto exterior @@ -5568,8 +5559,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Crea una elipse mediante periastro, apoastro y radio menor @@ -5577,8 +5568,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Crea una elipse por centro, radio mayor y punto @@ -5586,8 +5577,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateFillet - - + + Creates a radius between two lines Crea un radio entre dos líneas @@ -5595,8 +5586,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Crea un heptágono por su centro y por una esquina @@ -5604,8 +5595,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Crea un hexágono por su centro y por una esquina @@ -5613,7 +5604,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateOblong - + Create a rounded rectangle Crea un rectángulo redondeado @@ -5621,14 +5612,14 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Crea un octágono por su centro y por una esquina - - + + Create a regular polygon by its center and by one corner Crea un polígono regular por su centro y por una esquina @@ -5636,8 +5627,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Crea un pentágono por su centro y por una esquina @@ -5645,8 +5636,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Redondeo que conserva restricciones y punto de intersección @@ -5654,7 +5645,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateRectangle - + Create a rectangle Crea un rectángulo @@ -5662,7 +5653,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateRectangle_Center - + Create a centered rectangle Crea un rectángulo centrado @@ -5670,8 +5661,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Crea un cuadrado por su centro y por una esquina @@ -5679,8 +5670,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Crea un triángulo equilátero por su centro y por una esquina @@ -5688,13 +5679,13 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periódica por puntos de control - - + + Create a periodic B-spline by control points Crea una B-spline periódica por puntos de control @@ -6114,7 +6105,7 @@ El algoritmo QR de Eigen Sparse está optimizado para matrices dispersas; genera Sketcher - Sketcher + Croquizador @@ -6327,36 +6318,36 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Error @@ -6376,45 +6367,45 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< La restricción tiene información de índice inválida y está mal formada. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Restricción inválida - - - + + + Failed to add arc Falló al añadir el arco - + Failed to add arc of ellipse Fallo al añadir el arco de elipse - + Cannot create arc of hyperbola from invalid angles, try again! No se puede crear el arco de hiperbola desde ángulos inválidos, ¡inténte de nuevo! - + Cannot create arc of hyperbola No se puede crear el arco de hipérbola - + Cannot create arc of parabola No se puede crear el arco de parábola @@ -6424,18 +6415,18 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Error al añadir polo de B-Spline - + Error creating B-spline pole Error al crear el polo de B-Spline - - + + Error creating B-spline Error al crear B-spline - + Error deleting last pole Error al eliminar el último polo @@ -6445,49 +6436,49 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< No se puede añadir el punto de nodo - + Cannot add internal alignment points No se pueden añadir puntos de alineación internos - + Error removing knot Error al eliminar el nodo - + Failed to add carbon copy Fallo al añadir copia de carbón - - + + Failed to add circle Fallo al añadir círculo - + Failed to add an ellipse Fallo al añadir una elipse - + Failed to extend edge Fallo al extender línea - + Failed to add external geometry Fallo al añadir geometría externa - + Failed to create fillet Error al crear el redondeo - + Failed to add line Fallo al añadir línea @@ -6497,7 +6488,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Fallo al añadir punto - + Failed to add polygon Fallo al añadir polígono @@ -6507,27 +6498,27 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Fallo al añadir caja - + Failed to add rounded rectangle Fallo al añadir rectángulo redondeado - + Failed to add slot Fallo al añadir ranura - + Failed to add edge Fallo al añadir arista - + Failed to trim edge Fallo al recortar arista - + Value Error @@ -6537,13 +6528,13 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline por nudos - - + + Create a B-spline by knots Crea una curva B por nudos @@ -6551,13 +6542,13 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots B-spline periódica por nudos - - + + Create a periodic B-spline by knots Crea una B-spline periódica por nudos @@ -6663,12 +6654,12 @@ Los puntos deben estar más cerca de una quinta parte del espacio de la cuadríc CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Crear curva B-spline por nodos - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Crear una B-spline por nodos, es decir, por interpolación, en el croquis. @@ -6676,12 +6667,12 @@ Los puntos deben estar más cerca de una quinta parte del espacio de la cuadríc CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Crear B-spline periódica mediante nudos - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Crear una B-spline periódica por nodos, es decir, por interpolación, en el croquis. @@ -6689,12 +6680,12 @@ Los puntos deben estar más cerca de una quinta parte del espacio de la cuadríc CmdSketcherDimension - + Dimension Cota - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6706,14 +6697,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Cota + + + + Dimension tools. + Herramientas de acotación + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts index ae094ef598..a3c87c1e1f 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Crear copia de carbón - + Copy the geometry of another sketch Copiar la geometría de otro croquis @@ -100,27 +100,27 @@ Mostrar/ocultar capa de información de B-spline - + Show/hide B-spline degree Mostrar/ocultar grado de B-spline - + Show/hide B-spline control polygon Mostrar/ocultar control poligonal de B-spline - + Show/hide B-spline curvature comb Mostrar/ocultar peine de curvatura B-spline - + Show/hide B-spline knot multiplicity Mostrar/ocultar multiplicidad de nudo de B-spline - + Show/hide B-spline control point weight Mostrar/ocultar el peso de los puntos de control de la B-spline @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir arco o circunferencia - + Constrain an arc or a circle Restringir un arco o una circunferencia - + Constrain radius Restringir radio - + Constrain diameter Restringir diámetro - + Constrain auto radius/diameter Restricción automática de radio/diámetro @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Crear arco - + Create an arc in the sketcher Crea un arco en el croquis - + Center and end points Centro y puntos finales - + End points and rim point Puntos finales y punto de borde @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Crear B-spline - + Create a B-spline in the sketch Crea una B-spline en el croquis @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Crear circunferencia - + Create a circle in the sketcher Crea una circunferencia en el croquis - + Center and rim point Punto centro y borde - + 3 rim points 3 puntos del borde @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Crear una curva cónica - + Create a conic in the sketch Crea una curva cónica en el croquis - + Ellipse by center, major radius, point Elipse mediante centro, radio mayor y punto - + Ellipse by periapsis, apoapsis, minor radius Elipse mediante periastro, apoastro y radio menor - + Arc of ellipse by center, major radius, endpoints Arco de elipse mediante centro, radio mayor y extremos - + Arc of hyperbola by center, major radius, endpoints Arco de hipérbola mediante centro, radio mayor y extremos - + Arc of parabola by focus, vertex, endpoints Arco de parábola por foco, vértices, extremos @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Crear redondeo - + Create a fillet between two lines Crea un redondeo entre dos lineas - + Sketch fillet Redondeo de croquis - + Constraint-preserving sketch fillet Redondeo de croquis que conserva las restricciones @@ -299,17 +299,17 @@ Crea un rectángulo en el croquis - + Rectangle Rectángulo - + Centered rectangle Rectángulo centrado - + Rounded rectangle Rectángulo redondeado @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Crear polígono regular - + Create a regular polygon in the sketcher Crea un polígono regular en el croquis - + Triangle Triángulo - + Square Cuadrado - + Pentagon Pentágono - + Hexagon Hexágono - + Heptagon Heptágono - + Octagon Octágono - + Regular polygon Polígono regular @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modificar multiplicidad de nudo - + Modifies the multiplicity of the selected knot of a B-spline Modifica la multiplicidad del nudo seleccionado de una B-spline - + Increase knot multiplicity Aumentar la multiplicidad del nudo - + Decrease knot multiplicity Disminuir la multiplicidad de nudo @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restringir ángulo - + Fix the angle of a line or the angle between two lines Fijar el ángulo de una línea o el ángulo entre dos líneas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restricción de bloque - + Block the selected edge from moving Bloquear al borde seleccionado de moverse @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restricción de coincidencia - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea una restricción coincidente entre puntos, o una restricción concéntrica entre círculos, arcos y elipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir diámetro - + Fix the diameter of a circle or an arc Fijar el diámetro de una circunferencia o un arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restricción de distancia - + Fix a length of a line or the distance between a line and a vertex or between two circles Fija una longitud de una línea o la distancia entre una línea y un vértice o entre dos círculos @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Restricción de distancia horizontal - + Fix the horizontal distance between two points or line ends Fijar la distancia horizontal entre dos puntos o extremos de línea @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restricción de distancia vertical - + Fix the vertical distance between two points or line ends Fijar la distancia vertical entre dos puntos o extremos de línea @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restringir igualdad - + Create an equality constraint between two lines or between circles and arcs Crear una restricción de igualdad entre dos líneas o entre circunferencias y arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Crear una restricción horizontal en el elemento seleccionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restricción de bloqueo - + Create both a horizontal and a vertical distance constraint on the selected vertex Crea una restricción de distancia horizontal y vertical @@ -520,12 +520,12 @@ en el vértice seleccionado CmdSketcherConstrainParallel - + Constrain parallel Restricción de paralelismo - + Create a parallel constraint between two lines Crear una restricción entre dos líneas paralelas @@ -533,12 +533,12 @@ en el vértice seleccionado CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restricción perpendicular - + Create a perpendicular constraint between two lines Crear una restricción perpendicular entre dos líneas @@ -546,12 +546,12 @@ en el vértice seleccionado CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir punto en objeto - + Fix a point onto an object Fijar un punto sobre un objeto @@ -559,12 +559,12 @@ en el vértice seleccionado CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restricción automática de radio/diámetro - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Corrija el diámetro si se elige un círculo, o el radio si se elige un polo arco/curva @@ -572,12 +572,12 @@ en el vértice seleccionado CmdSketcherConstrainRadius - + Constrain radius or weight Limitar radio o peso - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Corregir el radio de una circunferencia o un arco o fija el peso de un poste o de una B-spline @@ -585,12 +585,12 @@ en el vértice seleccionado CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Restricción de refracción (Ley de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crea una restricción de ley de refracción (ley de Snell) entre dos extremos de los rayos y una arista como interfaz. @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restricción de simetría - + Create a symmetry constraint between two points with respect to a line or a third point Crear una restricción de simetría entre dos puntos @@ -614,12 +614,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainTangent - + Constrain tangent Restricción tangencial - + Create a tangent constraint between two entities Crear una restricción tangencial entre dos entidades @@ -627,12 +627,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Crear una restricción vertical en el elemento seleccionado @@ -640,12 +640,12 @@ con respecto a una línea o un tercer punto CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convertir geometría a B-spline - + Converts the selected geometry to a B-spline Convierte la geometría seleccionada en una B-spline @@ -666,12 +666,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreate3PointArc - + Create arc by three points Crear arco con tres puntos - + Create an arc by its end points and a point along the arc Crear un arco por sus extremos y un punto a lo largo del arco @@ -679,12 +679,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreate3PointCircle - + Create circle by three points Crear una circunferencia por tres puntos - + Create a circle by 3 perimeter points Crear una circunferencia por 3 puntos perimetrales @@ -692,12 +692,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArc - + Create arc by center Crear arco por centro - + Create an arc by its center and by its end points Crear un arco por su centro y sus extremos @@ -705,12 +705,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Crear arco de elipse - + Create an arc of ellipse in the sketch Crear un arco de elipse en el croquis @@ -718,12 +718,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Crear arco de hipérbola - + Create an arc of hyperbola in the sketch Crear un arco de hipérbola en el croquis @@ -731,12 +731,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateArcOfParabola - + Create arc of parabola Crear arco de parábola - + Create an arc of parabola in the sketch Crear un arco de parábola en el croquis @@ -744,12 +744,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateBSpline - + Create B-spline Crear B-spline - + Create a B-spline by control points in the sketch. Crear un B-spline a través de puntos de control en el croquis. @@ -757,12 +757,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateCircle - + Create circle Crear circunferencia - + Create a circle in the sketch Crea una circunferencia en el croquis @@ -770,12 +770,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Crear elipse mediante 3 puntos - + Create an ellipse by 3 points in the sketch Crear elipse en el croquis mediante 3 puntos @@ -783,12 +783,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateEllipseByCenter - + Create ellipse by center Crear elipse mediante centro - + Create an ellipse by center in the sketch Crear una elipse en el croquis mediante centro @@ -796,12 +796,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateFillet - + Create fillet Crear redondeo - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateHeptagon - + Create heptagon Crear heptágono - + Create a heptagon in the sketch Crear un heptágono en el croquis @@ -822,12 +822,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateHexagon - + Create hexagon Crear hexágono - + Create a hexagon in the sketch Crear un hexágono en el croquis @@ -861,12 +861,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateOctagon - + Create octagon Crear octágono - + Create an octagon in the sketch Crear un octágono en el croquis @@ -874,12 +874,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePentagon - + Create pentagon Crear pentágono - + Create a pentagon in the sketch Crear un pentágono en el croquis @@ -887,12 +887,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Crear una B-spline periódica - + Create a periodic B-spline by control points in the sketch. Crear un B-spline periódica mediante puntos de control en el croquis. @@ -900,12 +900,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePoint - + Create point Crear punto - + Create a point in the sketch Crea un punto en el croquis @@ -913,12 +913,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePointFillet - + Create corner-preserving fillet Crear redondeo que conserva las esquinas - + Fillet that preserves intersection point and most constraints Redondeo que conserva el punto de intersección y la mayoría de las restricciones @@ -926,12 +926,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreatePolyline - + Create polyline Crear polilínea - + Create a polyline in the sketch. 'M' Key cycles behaviour Crea una polilínea en el croquis. La tecla 'M' cambia su comportamiento @@ -965,12 +965,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateRegularPolygon - + Create regular polygon Crear polígono regular - + Create a regular polygon in the sketch Crea un polígono regular en el croquis @@ -978,12 +978,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateSlot - + Create slot Crear ranura - + Create a slot in the sketch Crea una ranura en el croquis @@ -991,12 +991,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateSquare - + Create square Crear cuadrado - + Create a square in the sketch Crear un cuadrado en el croquis @@ -1004,12 +1004,12 @@ con respecto a una línea o un tercer punto CmdSketcherCreateTriangle - + Create equilateral triangle Crear triángulo equilátero - + Create an equilateral triangle in the sketch Crear un triángulo equilátero en el croquis @@ -1017,12 +1017,12 @@ con respecto a una línea o un tercer punto CmdSketcherDecreaseDegree - + Decrease B-spline degree Reducir grado de B-spline - + Decreases the degree of the B-spline Disminuye el grado de la B-spline @@ -1030,12 +1030,12 @@ con respecto a una línea o un tercer punto CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Disminuir la multiplicidad de nudo - + Decreases the multiplicity of the selected knot of a B-spline Disminuye la multiplicidad del nudo seleccionado de una B-spline @@ -1082,12 +1082,12 @@ con respecto a una línea o un tercer punto CmdSketcherExtend - + Extend edge Extender borde - + Extend an edge with respect to the picked position Extender un borde con respecto a la posición seleccionada @@ -1095,12 +1095,12 @@ con respecto a una línea o un tercer punto CmdSketcherExternal - + Create external geometry Crear geometría externa - + Create an edge linked to an external geometry Crear una arista vinculada a una geometría externa @@ -1108,12 +1108,12 @@ con respecto a una línea o un tercer punto CmdSketcherIncreaseDegree - + Increase B-spline degree Aumentar grado de B-spline - + Increases the degree of the B-spline Aumentar el grado de la B-spline @@ -1121,12 +1121,12 @@ con respecto a una línea o un tercer punto CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Aumentar la multiplicidad del nudo - + Increases the multiplicity of the selected knot of a B-spline Aumenta la multiplicidad del nudo seleccionado de una B-spline @@ -1134,12 +1134,12 @@ con respecto a una línea o un tercer punto CmdSketcherInsertKnot - + Insert knot Insertar nodo - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserta el nodo en un parámetro determinado. Si ya existe un nodo en ese parámetro, su multiplicidad se incrementa en uno. @@ -1147,12 +1147,12 @@ con respecto a una línea o un tercer punto CmdSketcherJoinCurves - + Join curves Unir curvas - + Join two curves at selected end points Une dos curvas en los puntos finales seleccionados @@ -1438,12 +1438,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherSplit - + Split edge Dividir borde - + Splits an edge into two while preserving constraints Divida un borde en dos preservando las restricciones @@ -1464,12 +1464,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherSwitchVirtualSpace - + Switch virtual space Cambia el espacio virtual - + Switches the selected constraints or the view to the other virtual space Cambia las restricciones seleccionadas o la vista a otro espacio virtual @@ -1490,12 +1490,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activar/desactivar restricción - + Activates or deactivates the selected constraints Activa o desactiva las restricciones seleccionadas @@ -1516,12 +1516,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Alternar restricción/referencia - + Set the toolbar, or the selected constraints, into driving or reference mode Establece la barra de herramientas, o las restricciones seleccionadas, @@ -1531,12 +1531,12 @@ en modo de conducción o referencia CmdSketcherTrimming - + Trim edge Recortar arista - + Trim an edge with respect to the picked position Recortar una arista con respecto a la posición elegida @@ -1595,369 +1595,370 @@ restricciones inválidas, geometrías degeneradas, etc. Command - - + + Add horizontal constraint Añadir restricción horizontal - - - + + + Add horizontal alignment Añadir alineación horizontal - - + + Add vertical constraint Añadir restricción vertical - + Add vertical alignment Añadir alineación vertical - + Add 'Lock' constraint Añadir restricción 'Bloquear' - + Add relative 'Lock' constraint Agregar restricción relativa 'Bloquear' - + Add fixed constraint Añadir restricción fija - + Add 'Block' constraint Añadir restricción 'Bloqueo' - + Add block constraint Añadir restricción de bloqueo - - - + + + Add coincident constraint Añadir restricción de coincidencia - - + + Add distance from horizontal axis constraint Añadir distancia desde la restricción del eje horizontal - - + + Add distance from vertical axis constraint Añadir distancia desde la restricción del eje vertical - - + + Add point to point distance constraint Añadir punto a restricción de distancia de punto - - - + + + Add point to line Distance constraint Añadir punto a restricción de Distancia de Línea - - + + Add circle to circle distance constraint Agrega un círculo a la restricción de distancia circular - + Add circle to line distance constraint Agrega un círculo a la restricción de distancia de línea - - - - - + + + + + + Add length constraint Añadir restricción de longitud - - + + Dimension Cota - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Añadir punto a la restricción del objeto - - + + Add point to point horizontal distance constraint Añadir punto a la restricción de distancia horizontal del punto - + Add fixed x-coordinate constraint Añadir restricción de coordenada-x fija - - + + Add point to point vertical distance constraint Añadir punto a la restricción de distancia vertical del punto - + Add fixed y-coordinate constraint Añadir restricción de coordenada-y fija - - + + Add parallel constraint Añadir restricción paralela - - - - - - - + + + + + + + Add perpendicular constraint Añadir restricción perpendicular - + Add perpendicularity constraint Añadir restricción de perpendicularidad - + Swap coincident+tangency with ptp tangency Intercambia coincidencia + tangencia con la tangencia ptp - + Swap PointOnObject+tangency with point to curve tangency Intercambia Punto en Objeto+tangencia con tangencia de punto a curva - - - - - - - + + + + + + + Add tangent constraint Añadir restricción tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Añadir punto de restricción tangente - - - - + + + + Add radius constraint Añadir restricción de radio - - - - + + + + Add diameter constraint Añadir restricción de diámetro - - - - + + + + Add radiam constraint Añadir restricción radiam - - - - - - + + + + + + Add angle constraint Añadir restricción de ángulo - - + + Add equality constraint Añadir restricción de igualdad - - - - - + + + + + Add symmetric constraint Añadir restricción de simetría - + Add Snell's law constraint Añadir restricción de ley de Snell - + Toggle constraint to driving/reference Cambiar la restricción a la conducción/referencia - + Activate/Deactivate constraint Activar/desactivar restricción @@ -2017,44 +2018,44 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir cuadro de croquis centrado - + Add rounded rectangle Añadir rectángulo redondeado - + Add line to sketch wire Añadir línea al alambre de croquis - + Add arc to sketch wire Añadir arco al alambre de croquis - - + + Add sketch arc Añadir arco de croquis - - + + Add sketch circle Añadir circunferencia de croquis - + Add sketch ellipse Añadir elipse de croquis - + Add sketch arc of ellipse Añadir arco de elipse de croquis - + Add sketch arc of hyperbola Añadir arco de hipérbola de croquis @@ -2074,33 +2075,33 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir punto de croquis - - + + Create fillet Crear redondeo - + Trim edge Recortar arista - + Extend edge Extender borde - + Split edge Dividir borde - + Add external geometry Añadir geometría externa - + Add slot Añadir ranurado @@ -2110,37 +2111,37 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir hexágono - + Convert to NURBS Convertir a NURBS - + Increase spline degree Aumentar grado de spline - + Decrease spline degree Reducir grado de spline - + Increase knot multiplicity Aumentar la multiplicidad del nudo - + Decrease knot multiplicity Disminuir la multiplicidad de nudo - + Insert knot Insertar nodo - + Join Curves Unir curvas @@ -2180,12 +2181,12 @@ restricciones inválidas, geometrías degeneradas, etc. Quitar alineación de ejes - + Toggle constraints to the other virtual space Cambiar restricciones al otro espacio virtual - + @@ -2193,7 +2194,7 @@ restricciones inválidas, geometrías degeneradas, etc. Actualizar el espacio virtual de la restricción - + Add auto constraints Añadir restricciones automáticas @@ -2233,7 +2234,7 @@ restricciones inválidas, geometrías degeneradas, etc. Añadir punto de nudo - + Create a carbon copy Crear una copia @@ -2249,37 +2250,37 @@ restricciones inválidas, geometrías degeneradas, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Error de autorestricción: croquis sin solución al aplicar restricciones coincidentes. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Error de autorestricción: croquis sin solución al aplicar restricciones verticales/horizontales. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Error de autorestricción: croquis sin solución al aplicar restricciones de igualdad. - + Autoconstrain error: Unsolvable sketch without constraints. Error de autorestricción: sin restricciones el croquis no tiene solución. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Error de autorestricción: croquis sin solución después de aplicar restricciones horizontales y verticales. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Error de autorestricción: croquis sin solución después de aplicar restricciones punto a punto. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Error de autorestricción: croquis sin solución después de aplicar restricciones de igualdad. @@ -2404,143 +2405,143 @@ restricciones inválidas, geometrías degeneradas, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2556,9 +2557,9 @@ restricciones inválidas, geometrías degeneradas, etc. - - - + + + Wrong selection Selección incorrecta @@ -2579,329 +2580,329 @@ restricciones inválidas, geometrías degeneradas, etc. Restricción dimensional - + Cannot add a constraint between two external geometries. No se puede añadir una restricción entre dos geometrias externas. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. No se puede agregar una restricción entre dos geometrías fijas. Las geometrías fijas incluyen geometría externa, geometría bloqueada y puntos especiales como puntos de nodos de B-spline. - + Sketcher Constraint Substitution Sustitución de restricción del croquis - + Keep notifying me of constraint substitutions Seguir notificándome de sustituciones de restricciones - - - + + + Only sketch and its support are allowed to be selected. Solo se permite seleccionar el croquis y su soporte. - + One of the selected has to be on the sketch. Uno de los seleccionados tiene que estar en el croquis. - - + + Select an edge from the sketch. Seleccione una arista del croquis. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricción imposible - - - - + + + + The selected edge is not a line segment. El borde seleccionado no es un segmento de línea. - - - - - - + + + + + + Double constraint Restricción doble - - - - - + + + + + The selected edge already has a horizontal constraint! ¡La arista seleccionada ya tiene una restricción horizontal! - - - + + + The selected edge already has a vertical constraint! ¡El borde seleccionado ya tiene una restricción vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! ¡La arista seleccionada ya tiene una restricción de Bloque! - + The selected item(s) can't accept a horizontal constraint! ¡El(los) elemento(s) seleccionado(s) no pueden aceptar una restricción horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hay mas de un punto fijo seleccionado. Debe seleccionar solamente un punto Fijo! - + The selected item(s) can't accept a vertical constraint! ¡El(los) elemento(s) seleccionado(s) no admiten una restricción vertical! - - - + + + Select vertices from the sketch. Selecciona vértices del croquis. - + Select one vertex from the sketch other than the origin. Seleccione un vértice del croquis que no sea el origen. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecciona sólo vértices del croquis. El último vértice seleccionado puede ser el origen. - + Wrong solver status Estado de Solver Incorrecto - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Una restricción de Bloqueo no puede ser añadida si el croquis está sin resolver o hay restricciones redundantes y en conflicto. - + Select one edge from the sketch. Seleccione una arista del croquis. - + Select only edges from the sketch. Seleccione únicamente aristas de el Croquis. - + Number of selected objects is not 3 El número de objetos seleccionados no es 3 - - - + + + Error Error - + Unexpected error. More information may be available in the Report View. Error inesperado. Puede haber más información disponible en la vista de reporte. - + Endpoint to endpoint tangency was applied instead. Una Tangente de Puntos de Extremo se aplicó en su lugar. - + Select two or more points from the sketch. Seleccione dos o más puntos del croquis. - + Select two or more vertices from the sketch. Seleccione dos o más vértices del croquis. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos o más vértices del croquis para una restricción coincidente, o dos o más círculos, elipses, arcos o arcos de elípse para una restricción concéntrica. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos vértices del croquis para una restricción coincidente, o dos círculos, elipses, arcos o arcos de elipse para una restricción concéntrica. - + Select exactly one line or one point and one line or two points from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos del croquis. - + Cannot add a length constraint on an axis! ¡No se puede añadir una restricción de longitud en un eje! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos o dos círculos del croquis. - + This constraint does not make sense for non-linear curves. Esta restricción no tiene sentido para curvas no lineales. - + Endpoint to edge tangency was applied instead. El punto final a la tangencia del borde se aplicó en su lugar. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccione las cosas correctas desde el croquis. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Seleccione un borde que no sea un peso de B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ninguno de los puntos seleccionados fueron restringidos en sus respectivas curvas, porque son partes del mismo elemento, y porque ambos son geometría externa, o porque la arista no es elegible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ninguno de los puntos seleccionados fueron limitados en las curvas respectivas, porque son partes de un mismo elemento, o porque son ambos de geometría externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccione exactamente una línea o hasta dos puntos del croquis. - + Cannot add a horizontal length constraint on an axis! ¡No se puede añadir una restricción de longitud horizontal en un eje! - + Cannot add a fixed x-coordinate constraint on the origin point! ¡No se puede agregar una restricción de coordenada x fija en el punto de origen! - - + + This constraint only makes sense on a line segment or a pair of points. Esta restricción sólo tiene sentido en un segmento de línea o un par de puntos. - + Cannot add a vertical length constraint on an axis! ¡No se puede añadir una restricción de longitud vertical sobre un eje! - + Cannot add a fixed y-coordinate constraint on the origin point! ¡No se puede agregar una restricción de coordenada y fija en el punto de origen! - + Select two or more lines from the sketch. Seleccione dos o más líneas del croquis. - - + + Select at least two lines from the sketch. Seleccione al menos dos líneas del croquis. - + Select a valid line. Seleccione una línea válida. - - + + The selected edge is not a valid line. El borde seleccionado no es una línea válida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2910,42 +2911,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Las combinaciones posibles son: dos curvas; extremo y curva; dos extremos; dos curvas y un punto. - + Select some geometry from the sketch. perpendicular constraint Seleccione alguna geometría del croquis. - - + + Cannot add a perpendicularity constraint at an unconnected point! ¡No se puede añadir una restricción de perpendicularidad en un punto no conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular a arista de B-spline no compatible por el momento. - - + + One of the selected edges should be a line. ¡Una de las aristas seleccionadas debe ser una línea. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Una Tangente de Puntos de Estremo fue aplicada, La restricción coincidente fue eliminada. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Se aplicó un punto final al borde tangencial. Se eliminó el punto sobre la restricción del objeto. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,277 +2956,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaciones aceptadas: dos curvas; un extremo y una curva; dos extremos; dos curvas y un punto. - + Select some geometry from the sketch. tangent constraint Seleccione alguna geometría del croquis. - - - + + + Cannot add a tangency constraint at an unconnected point! ¡No se puede añadir una restricción de tangencia en un punto no conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! La restricción tangente en nudo de B-spline sólo es compatible con líneas! - + B-spline knot to endpoint tangency was applied instead. En su lugar, se aplicó tangecia entre el nudo de B-spline y el punto final. - + Select either one point and several curves, or one curve and several points. Seleccione un punto y varias curvas, o una curva y varios puntos. - - + + Wrong number of selected objects! ¡Número incorrecto de objetos seleccionados! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 objetos, debe haber 2 curvas y 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tangencia sobre arista de B-spline no compatible por el momento. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccione uno o más arcos o circunferencias del croquis. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Seleccione sólo uno o más polos de B-Spline o sólo uno o más arcos o circunferencias del croquis, pero no mezclado. - - - + + + Constraint only applies to arcs or circles. La restricción sólo se aplica a los arcos o circunferencias. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccione una o dos líneas del croquis. O seleccione un punto y dos aristas. - - + + Parallel lines Líneas paralelas - - + + An angle constraint cannot be set for two parallel lines. Una restricción de ángulo no puede ser establecida por dos lineas paralelas. - + Cannot add an angle constraint on an axis! ¡No se puede añadir una restricción angular en un eje! - + Select two edges from the sketch. Seleccione dos aristas del croquis. - + Select two or more compatible edges. Seleccione dos o más bordes compatibles. - + Sketch axes cannot be used in equality constraints. Los ejes de dibujo no pueden utilizarse en restricciones de igualdad. - + Equality for B-spline edge currently unsupported. Igualdad para arista de B-Spline no compatible por el momento. - - - - + + + + Select two or more edges of similar type. Seleccione dos o más bordes de tipo similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccione dos puntos y una línea de simetría, dos puntos y un punto de simetría o una línea y un punto de simetría del croquis. - - + + Cannot add a symmetry constraint between a line and its end points. No se puede añadir una restricción de simetría entre una línea y sus extremos. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! ¡No se puede añadir una restricción de simetría entre una línea y sus extremos! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Seleccione dos extremos de líneas para actuar como rayos, y una arista que representa un límite. El primer punto seleccionado corresponde al índice n1, segundo a n2, y el valor de referencia establece la relación n2/n1. - + Selected objects are not just geometry from one sketch. Los objetos seleccionados no son sólo la geometría de un croquis. - + Cannot create constraint with external geometry only. No se puede crear restricción sólo con geometría externa. - + Incompatible geometry is selected. Se ha seleccionado geometría incompatible. - + SnellsLaw on B-spline edge is currently unsupported. Ley de Snell sobre arista de B-spline no es compatible por el momento. - - - - - + + + + + Select constraints from the sketch. Seleccione restricciones del croquis. - - - + + + Select constraint(s) from the sketch. Seleccionar la(s) limitación(es) del croquis. - + B-Spline Degree Grado B-Spline - + Define B-Spline Degree, between 1 and %1: Definir el grado de la B-Spline, entre 1 y %1: - - - + + + CAD Kernel Error Error del Kernel CAD - + None of the selected elements is an edge. Ninguno de los elementos seleccionados es una arista. - - + + At least one of the selected objects was not a B-Spline and was ignored. Al menos uno de los objetos seleccionados no era un B-Spline y fue ignorado. - - + + The selection comprises more than one item. Please select just one knot. La selección incluye más de un elemento. Por favor seleccione solo un nudo. - - + + Input Error Error de Entrada - - + + None of the selected elements is a knot of a B-spline Ninguno de los elementos seleccionados es un nudo de una B-spline - - + + Selection is empty No ha seleccionado nada - + Nothing is selected. Please select a b-spline. No hay nada seleccionado. Por favor, seleccione una B-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Por favor, seleccione una curva b-spline para insertar un nudo (no un nudo en él). Si la curva no es una curva b-spline, por favor conviértalo en una primero. - + Nothing is selected. Please select end points of curves. No se ha seleccionado nada. Por favor, seleccione los puntos finales de las curvas. - + Too many curves on point Demasiadas curvas en el punto - - + + Exactly two curves should end at the selected point to be able to join them. Exactamente dos curvas deben terminar en el punto seleccionado para poder unirlas. - + Too few curves on point Muy pocas curvas en el punto - + Two end points, or coincident point should be selected. Se deben seleccionar dos puntos finales, o un punto coincidente. @@ -3305,17 +3306,17 @@ Combinaciones aceptadas: dos curvas; un extremo y una curva; dos extremos; dos c Actualmente no está soportado para mover la geometría externa a otra capa visual. Se omitirá la geometría externa - + Set knot multiplicity Establece multiplicidad del nudo - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Establece la multiplicidad del nudo en el último punto proporcionado, entre 1 y %1:Nota: que la multiplicidad puede ignorarse bajo ciertas circunstancias. Por favor consulte la documentación para obtener detalles - + Value Error Error del valor @@ -3629,12 +3630,12 @@ Combinaciones aceptadas: dos curvas; un extremo y una curva; dos extremos; dos c Longitud: - + Refractive index ratio Índice refracción - + Ratio n2/n1: Razón n2/n1: @@ -3914,8 +3915,8 @@ Combinaciones aceptadas: dos curvas; un extremo y una curva; dos extremos; dos c SketcherGui::PropertyConstraintListItem - - + + Unnamed Sin nombre @@ -4146,15 +4147,15 @@ Requiere volver a entrar en modo de edición para tener efecto. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Selecciona el tipo de cotas de restricción para tu barra de herramientas: +'Herramienta sola': Una sola herramienta para todas las cotas de restricción en la barra de herramientas: Distancia, Distancia X / Y, Ángulo, Radio. (Otros en el desplegable) +'Herramientas separadas': Herramientas individuales para cada cota de restricción. +'Ambas': Tendrás ambas la herramienta de Dimensión y las herramientas separadas. +Estos ajustes solo son para la barra de herramientas. Cualquiera que tú escojas, todas las herramientas estan siempre disponible en el menú y a través de atajos. @@ -4173,32 +4174,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools - Separated tools + Herramientas separadas - + Both Ambos - + Auto Auto - + Diameter Diámetro - + Radius Radio @@ -4647,12 +4648,12 @@ Entonces los objetos sólo son visibles detrás del plano del croquis.Se aplica a los croquis existentes - + Unexpected C++ exception Excepción de C++ inesperada - + Sketcher Croquizador @@ -4660,55 +4661,55 @@ Entonces los objetos sólo son visibles detrás del plano del croquis. SketcherGui::SketcherValidation - + No missing coincidences No faltan coincidencias - + No missing coincidences found No se encontre coincidencias faltando - + Missing coincidences Falta de coincidencias - + %1 missing coincidences found %1 coincidencias faltando - + No invalid constraints Sin restricciones no válidas - + No invalid constraints found No se encontraron restricciones no válidas - + Invalid constraints Restricciones no válidas - + Invalid constraints found Se han encontrado restricciones no válidas - - - + + + Reversed external geometry Geometría externa invertida - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4721,7 +4722,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Haz clic en el botón "Intercambiar los extremos en las restricciones" para reasignar los extremos. Hacer únicamente una vez en croquis creados en una versión de FreeCAD anterior a v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4730,75 +4731,70 @@ However, no constraints linking to the endpoints were found. Sin embargo, no se encontraron restricciones a los extremos. - + No reversed external-geometry arcs were found. No se encontraron arcos invertidos con geometría externa. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 modificaciones fueron hechas a las resticciones vinculadas a los extremos de los arcos invertidos. - - + + Constraint orientation locking Bloqueo de restricción de orientación - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Bloqueo de orientación fue activado y recalculado para %1 restricciones. Las restricciones se han listado en la vista reporte (menú Ver-> Paneles-> Ver Reporte). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. El bloqueo de orientación fue desactivado para %1 restricciones. Las restricciones se han enumerado en la vista de repote (menú Ver-> Paneles-> Ver reporte). Tenga en cuenta que para todas las restricciones futuras, el bloqueo por defecto aún es ON. - - + + Delete constraints to external geom. Eliminar restricciones a la geometría externa. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Está a punto de eliminar todas las restricciones que tienen que ver con la geometría externa. Esto es útil para rescatar un croquis con enlaces rotos/cambiados a geometría externa. ¿Está seguro que desea eliminar las limitaciones? - + All constraints that deal with external geometry were deleted. Se eliminaron todas las restricciones que tienen que ver con la geometría externa. - + No degenerated geometry Geometría no degenerada - + No degenerated geometry found No se encontró geometría degenerada - + Degenerated geometry Geometría degenerada - + %1 degenerated geometry found %1 geometría degenerada encontrada SketcherGui::TaskSketcherConstraints - - - Form - Formulario - Check to toggle filters @@ -4873,11 +4869,6 @@ Sin embargo, no se encontraron restricciones a los extremos. SketcherGui::TaskSketcherElements - - - Form - Formulario - Check to toggle filters @@ -5063,7 +5054,7 @@ Sin embargo, no se encontraron restricciones a los extremos. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Control avanzado de solucionador @@ -5354,8 +5345,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Cambiar entre mostrar y ocultar el peine de curvatura para todas las B-splines @@ -5363,8 +5354,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Disminuye la multiplicidad del nudo seleccionado de una B-spline @@ -5372,8 +5363,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Cambiar entre mostrar y ocultar el grado de todas las B-splines @@ -5381,8 +5372,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Aumenta la multiplicidad del nudo seleccionado de una B-spline @@ -5390,8 +5381,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Cambia entre mostrar y ocultar la multiplicidad de nudo para todas las B-splines @@ -5399,8 +5390,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Cambia entre mostrar y ocultar el peso de los puntos de control para todas las B-splines @@ -5408,8 +5399,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Cambia entre mostrar y ocultar el control poligonal para todas las B-splines @@ -5444,8 +5435,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fijar el diámetro de una circunferencia o un arco @@ -5453,7 +5444,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fijar el diámetro/radio de una circunferencia o un arco @@ -5461,8 +5452,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fijar el radio de una circunferencia o arco @@ -5470,7 +5461,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fijar el diámetro/radio de una circunferencia o un arco @@ -5487,8 +5478,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Crear un arco por sus extremos y un punto a lo largo del arco @@ -5496,8 +5487,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Crear circunferencia por 3 puntos @@ -5505,8 +5496,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Crear un arco por su centro y sus extremos @@ -5514,8 +5505,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Crear un arco de elipse por su centro, radio mayor y extremos @@ -5523,8 +5514,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Crear un arco de hipérbola por su centro, radio mayor y puntos finales @@ -5532,8 +5523,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Crea un arco de parábola por su foco, vértice y extremos @@ -5541,13 +5532,13 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateBSpline - + B-spline by control points B-spline por puntos de control o polos - - + + Create a B-spline by control points Crear una B-spline por puntos de control o polos @@ -5555,8 +5546,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Crear una circunferencia por centro y un punto exterior @@ -5564,8 +5555,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Crear una elipse mediante periapsis, apoapsis y radio menor @@ -5573,8 +5564,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Crear una elipse mediante centro, radio mayor y un punto @@ -5582,8 +5573,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateFillet - - + + Creates a radius between two lines Crea un radio entre dos líneas @@ -5591,8 +5582,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Crear un heptágono mediante centro y vértice @@ -5600,8 +5591,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Crear un hexágono mediante centro y vértice @@ -5609,7 +5600,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateOblong - + Create a rounded rectangle Crear rectángulo redondeado @@ -5617,14 +5608,14 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Crear un octágono mediante centro y vértice - - + + Create a regular polygon by its center and by one corner Crear un polígono regular por su centro y por una esquina @@ -5632,8 +5623,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Crear un pentágono mediante centro y vértice @@ -5641,8 +5632,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Redondeo que conserva restricciones y punto de intersección @@ -5650,7 +5641,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateRectangle - + Create a rectangle Crear rectángulo @@ -5658,7 +5649,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateRectangle_Center - + Create a centered rectangle Crear un rectángulo centrado @@ -5666,8 +5657,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Crear un cuadrado mediante centro y vértice @@ -5675,8 +5666,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Crear un triángulo equilátero mediante centro y vértice @@ -5684,13 +5675,13 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periódica por puntos de control o polos - - + + Create a periodic B-spline by control points Crear un B-spline periódico mediante puntos de control @@ -6323,36 +6314,36 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Error @@ -6372,45 +6363,45 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< La restricción tiene información de índice inválida y está mal formada. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Restricción inválida - - - + + + Failed to add arc Falló al añadir el arco - + Failed to add arc of ellipse Fallo al añadir el arco de elipse - + Cannot create arc of hyperbola from invalid angles, try again! No se puede crear el arco de hiperbola desde ángulos inválidos, ¡inténte de nuevo! - + Cannot create arc of hyperbola No se puede crear el arco de hipérbola - + Cannot create arc of parabola No se puede crear el arco de parábola @@ -6420,18 +6411,18 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Error al añadir polo de B-Spline - + Error creating B-spline pole Error al crear el polo de B-Spline - - + + Error creating B-spline Error al crear B-Spline - + Error deleting last pole Error al eliminar el último polo @@ -6441,49 +6432,49 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< No se puede añadir el punto de nodo - + Cannot add internal alignment points No se pueden añadir puntos de alineación internos - + Error removing knot Error al eliminar el nodo - + Failed to add carbon copy Fallo al añadir copia de carbón - - + + Failed to add circle Fallo al añadir círculo - + Failed to add an ellipse Fallo al añadir una elipse - + Failed to extend edge Fallo al extender línea - + Failed to add external geometry Fallo al añadir geometría externa - + Failed to create fillet Fallo al crear redondeo - + Failed to add line Fallo al añadir línea @@ -6493,7 +6484,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Fallo al añadir punto - + Failed to add polygon Fallo al añadir polígono @@ -6503,27 +6494,27 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Fallo al añadir caja - + Failed to add rounded rectangle Fallo al añadir rectángulo redondeado - + Failed to add slot Fallo al añadir ranura - + Failed to add edge Fallo al añadir arista - + Failed to trim edge Fallo al recortar arista - + Value Error @@ -6533,13 +6524,13 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline por nudos - - + + Create a B-spline by knots Crear una curva B-spline por nudos @@ -6547,13 +6538,13 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots B-spline periódica por nudos - - + + Create a periodic B-spline by knots Crear un B-spline periódica mediante nudos @@ -6659,12 +6650,12 @@ Los puntos deben estar más cerca de una quinta parte del tamaño de la cuadríc CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Crear curva B-spline por nodos - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Crear una B-spline por nodos, es decir, por interpolación, en el croquis. @@ -6672,12 +6663,12 @@ Los puntos deben estar más cerca de una quinta parte del tamaño de la cuadríc CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Crear B-spline periódica mediante nudos - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Crear una B-spline periódica por nodos, es decir, por interpolación, en el croquis. @@ -6685,12 +6676,12 @@ Los puntos deben estar más cerca de una quinta parte del tamaño de la cuadríc CmdSketcherDimension - + Dimension Cota - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6702,14 +6693,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Cota + + + + Dimension tools. + Herramientas de acotación + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts index 4c8b897d44..76c87c3bd6 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Sortu kopia bat - + Copy the geometry of another sketch Kopiatu beste krokis bateko geometria @@ -100,27 +100,27 @@ Erakutsi/ezkutatu B-spline funtzioaren informazio-geruza - + Show/hide B-spline degree Erakutsi/ezkutatu B-spline funtzioaren gradua - + Show/hide B-spline control polygon Erakutsi/ezkutatu B-spline kontrol-poligonoa - + Show/hide B-spline curvature comb Erakutsi/ezkutatu B-spline elementuen kurbadura-orrazia - + Show/hide B-spline knot multiplicity Erakutsi/ezkutatu B-spline adabegi-aniztasuna - + Show/hide B-spline control point weight Erakutsi/ezkutatu B-spline kontrol-puntuaren pisua @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Murriztu arkua edo zirkulua - + Constrain an arc or a circle Murriztu arku bat edo zirkulu bat - + Constrain radius Murriztu erradioa - + Constrain diameter Murriztu diametroa - + Constrain auto radius/diameter Murriztu erradio/diametro automatikoa @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Sortu arkua - + Create an arc in the sketcher Sortu arku bat krokisgilean - + Center and end points Puntu zentrala eta bukaerakoa - + End points and rim point Bukaera puntuak eta ertzeko puntua @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Sortu B-spline elementua - + Create a B-spline in the sketch Sortu B-spline bat krokisean @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Sortu zirkulua - + Create a circle in the sketcher Sortu zirkulu bat krokisgilean - + Center and rim point Puntu zentrala eta ertzeko puntua - + 3 rim points 3 ertzeko puntu @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Sortu koniko bat - + Create a conic in the sketch Sortu kono bat krokisgilean - + Ellipse by center, major radius, point Elipsea puntu zentrala, erradio handia eta puntu baten bidez - + Ellipse by periapsis, apoapsis, minor radius Elipsea periapsi, apoapsi eta erradio txikiaren bidez - + Arc of ellipse by center, major radius, endpoints Elipse-arku bat puntu zentrala, erradio handia eta amaiera-puntuak erabiliz - + Arc of hyperbola by center, major radius, endpoints Hiperbola-arku bat puntu zentrala, erradio handia eta amaiera-puntuak erabiliz - + Arc of parabola by focus, vertex, endpoints Parabola-arku bat fokua, erpina eta amaiera-puntuak erabiliz @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Sortu biribiltzea - + Create a fillet between two lines Sortu biribiltze bat bi lerroren artean - + Sketch fillet Krokis-biribiltzea - + Constraint-preserving sketch fillet Murrizketak mantentzen dituen krokis-biribiltzea @@ -299,17 +299,17 @@ Sortu laukizuzen bat krokisean - + Rectangle Laukizuzena - + Centered rectangle Laukizuzen zentratua - + Rounded rectangle Laukizuzen biribildua @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Sortu poligono erregularra - + Create a regular polygon in the sketcher Sortu poligono erregular bat krokisgilean - + Triangle Triangelua - + Square Laukia - + Pentagon Pentagonoa - + Hexagon Hexagonoa - + Heptagon Heptagonoa - + Octagon Oktagonoa - + Regular polygon Poligono erregularra @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Aldatu adabegi-aniztasuna - + Modifies the multiplicity of the selected knot of a B-spline B-spline batean hautatutako adabegi baten aniztasuna aldatzen du - + Increase knot multiplicity Handitu adabegi-aniztasuna - + Decrease knot multiplicity Txikitu adabegi-aniztasuna @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Murriztu angelua - + Fix the angle of a line or the angle between two lines Finkatu lerro baten angelua edo bi lerroren arteko angelua @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Murriztu blokea - + Block the selected edge from moving Blokeatu hautatutako ertza, lekuz aldatu ez dadin @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Murriztu bat datozenak - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Sortu bat datorren murrizketa bat puntuen artean, edo murrizketa kontzentriko bat zirkuluen, arkuen eta elipseen artean @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Murriztu diametroa - + Fix the diameter of a circle or an arc Finkatu zirkulu baten edo arku baten diametroa @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Murriztu distantzia - + Fix a length of a line or the distance between a line and a vertex or between two circles Finkatu lerro baten luzera edo lerro baten eta erpin baten arteko edo bi zirkuluren arteko distantzia @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Murriztu distantzia horizontala - + Fix the horizontal distance between two points or line ends Finkatu bi punturen edo bi lerro-amaieren arteko distantzia horizontala @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Murriztu distantzia bertikala - + Fix the vertical distance between two points or line ends Finkatu bi punturen edo bi lerro-amaieren arteko distantzia bertikala @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Murriztu berdin - + Create an equality constraint between two lines or between circles and arcs Sortu berdintasun-murrizketa bat bi lerroren artean edo zirkuluen eta arkuen artean @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Murriztu horizontalean - + Create a horizontal constraint on the selected item Sortu murrizketa horizontala hautatutako elementuan @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Blokeo-murrizketa - + Create both a horizontal and a vertical distance constraint on the selected vertex Sortu distantzia-murrizketa horizontala eta bertikala @@ -520,12 +520,12 @@ hautatutako erpinean CmdSketcherConstrainParallel - + Constrain parallel Murriztu paraleloa - + Create a parallel constraint between two lines Sortu murrizketa paraleloa bi lerroren artean @@ -533,12 +533,12 @@ hautatutako erpinean CmdSketcherConstrainPerpendicular - + Constrain perpendicular Murriztu perpendikularra - + Create a perpendicular constraint between two lines Sortu murrizketa perpendikularra bi lerroren artean @@ -546,12 +546,12 @@ hautatutako erpinean CmdSketcherConstrainPointOnObject - + Constrain point onto object Murriztu puntua objektuan - + Fix a point onto an object Finkatu puntu bat objektu batean @@ -559,12 +559,12 @@ hautatutako erpinean CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Murriztu erradio/diametro automatikoa - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Finkatu diamteroa zirkulu bat hautatu bada, edo erradioa arku/spline polo bat hautatu bada @@ -572,12 +572,12 @@ hautatutako erpinean CmdSketcherConstrainRadius - + Constrain radius or weight Murriztu erradioa edo pisua - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Finkatu zirkulu baten edo arku baten erradioa edo finkatu B-spline baten polo baten pisua @@ -585,12 +585,12 @@ hautatutako erpinean CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Murriztu errefrakzioa (Snell-en legea) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Sortu Snell-en errefrakzio-legearen murrizketa bat, izpien bi amaiera-punturen @@ -600,12 +600,12 @@ artean eta ertz bat interfaze modura erabilita. CmdSketcherConstrainSymmetric - + Constrain symmetrical Murriztu simetrikoki - + Create a symmetry constraint between two points with respect to a line or a third point Sortu simetria-murrizketa bat bi punturen artean, @@ -615,12 +615,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherConstrainTangent - + Constrain tangent Murriztu tangentea - + Create a tangent constraint between two entities Sortu murrizketa tangentea bi lerroren artean @@ -628,12 +628,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherConstrainVertical - + Constrain vertically Murriztu bertikalean - + Create a vertical constraint on the selected item Sortu murrizketa bertikala hautatutako elementuan @@ -641,12 +641,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherConvertToNURBS - + Convert geometry to B-spline Bihurtu geometria B-spline - + Converts the selected geometry to a B-spline Hautatutako geometria B-spline bihurtzen du @@ -667,12 +667,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreate3PointArc - + Create arc by three points Sortu arkua hiru puntutik abiatuz - + Create an arc by its end points and a point along the arc Sortu arku bat amaiera-puntuak eta arkuan dagoen puntu bat erabiliz @@ -680,12 +680,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreate3PointCircle - + Create circle by three points Sortu zirkulua hiru puntutik abiatuz - + Create a circle by 3 perimeter points Sortu zirkulu bat 3 perimetro-puntutik abiatuz @@ -693,12 +693,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateArc - + Create arc by center Sortu arkua erdigunetik abiatuz - + Create an arc by its center and by its end points Sortu arku bat puntu zentrala eta amaiera-puntuak erabiliz @@ -706,12 +706,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Sortu elipse-arku bat - + Create an arc of ellipse in the sketch Sortu elipse-arku bat krokisean @@ -719,12 +719,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Sortu hiperbola-arku bat - + Create an arc of hyperbola in the sketch Sortu hiperbola-arku bat krokisean @@ -732,12 +732,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateArcOfParabola - + Create arc of parabola Sortu parabola-arku bat - + Create an arc of parabola in the sketch Sortu parabola-arku bat krokisean @@ -745,12 +745,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateBSpline - + Create B-spline Sortu B-spline elementua - + Create a B-spline by control points in the sketch. Sortu B-spline bat krokiseko kontrol-puntuak erabilita. @@ -758,12 +758,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateCircle - + Create circle Sortu zirkulua - + Create a circle in the sketch Sortu zirkulu bat krokisean @@ -771,12 +771,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Sortu elipsea hiru puntutik abiatuz - + Create an ellipse by 3 points in the sketch Sortu elipse bat krokisean 3 puntutik abiatuz @@ -784,12 +784,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateEllipseByCenter - + Create ellipse by center Sortu elipsea erdigunetik abiatuz - + Create an ellipse by center in the sketch Sortu elipse bat krokisean erdigunetik abiatuz @@ -797,12 +797,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateFillet - + Create fillet Sortu biribiltzea - + Create a fillet between two lines or at a coincident point Sortu bi lerroren arteko biribiltzea bat datozen puntu batean @@ -810,12 +810,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateHeptagon - + Create heptagon Sortu heptagonoa - + Create a heptagon in the sketch Sortu heptagono bat krokisean @@ -823,12 +823,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateHexagon - + Create hexagon Sortu hexagonoa - + Create a hexagon in the sketch Sortu hexagono bat krokisean @@ -862,12 +862,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateOctagon - + Create octagon Sortu oktogonoa - + Create an octagon in the sketch Sortu oktogono bat krokisean @@ -875,12 +875,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreatePentagon - + Create pentagon Sortu pentagonoa - + Create a pentagon in the sketch Sortu pentagono bat krokisean @@ -888,12 +888,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Sortu B-spline periodikoa - + Create a periodic B-spline by control points in the sketch. Sortu B-spline periodiko bat krokiseko kontrol-puntuak erabilita. @@ -901,12 +901,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreatePoint - + Create point Sortu puntua - + Create a point in the sketch Sortu puntu bat krokisean @@ -914,12 +914,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreatePointFillet - + Create corner-preserving fillet Sortu izkina mantentzen duen biribiltzea - + Fillet that preserves intersection point and most constraints Ebakidura-puntua eta murrizketa gehienak mantentzen dituen biribiltzea @@ -927,12 +927,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreatePolyline - + Create polyline Sortu polilerroa - + Create a polyline in the sketch. 'M' Key cycles behaviour Sortu polilerro bat krokisean. 'M' teklak portaera ziklikoa sortzen du @@ -966,12 +966,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateRegularPolygon - + Create regular polygon Sortu poligono erregularra - + Create a regular polygon in the sketch Sortu poligono erregular bat krokisean @@ -979,12 +979,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateSlot - + Create slot Sortu arteka - + Create a slot in the sketch Sortu arteka bat krokisean @@ -992,12 +992,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateSquare - + Create square Sortu laukia - + Create a square in the sketch Sortu lauki bat krokisean @@ -1005,12 +1005,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherCreateTriangle - + Create equilateral triangle Sortu triangelu aldeberdina - + Create an equilateral triangle in the sketch Sortu triangelu aldeberdin bat krokisean @@ -1018,12 +1018,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherDecreaseDegree - + Decrease B-spline degree Txikitu B-spline elementuaren gradua - + Decreases the degree of the B-spline B-spline elementuaren gradua txikitzen du @@ -1031,12 +1031,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Txikitu adabegi-aniztasuna - + Decreases the multiplicity of the selected knot of a B-spline B-spline batean hautatutako adabegi baten aniztasuna txikitzen du @@ -1083,12 +1083,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherExtend - + Extend edge Hedatu ertza - + Extend an edge with respect to the picked position Hedatu ertz bat aukeratutako posizioaren arabera @@ -1096,12 +1096,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherExternal - + Create external geometry Sortu kanpo-geometria - + Create an edge linked to an external geometry Sortu kanpo-geometria bati estekatutako ertz bat @@ -1109,12 +1109,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherIncreaseDegree - + Increase B-spline degree Handitu B-spline elementuaren gradua - + Increases the degree of the B-spline B-spline elementuaren gradua handitzen du @@ -1122,12 +1122,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Handitu adabegi-aniztasuna - + Increases the multiplicity of the selected knot of a B-spline B-spline batean hautatutako adabegi baten aniztasuna handitzen du @@ -1135,12 +1135,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherInsertKnot - + Insert knot Txertatu adabegia - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Adabegi bat txertatzen du emandako parametro batean. Adabegia lehendik badago parametro horretan, bere aniztasuna batean gehitzen da. @@ -1148,12 +1148,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherJoinCurves - + Join curves Elkartu kurbak - + Join two curves at selected end points Elkartu bi kurba hautatutako amaierako puntuetan @@ -1440,12 +1440,12 @@ Horrela 'Euskarria' propietatea garbituko da, halakorik badago. CmdSketcherSplit - + Split edge Zatitu ertza - + Splits an edge into two while preserving constraints Ertz bat bi zatitan zatitzen du murrizketak mantenduta @@ -1466,12 +1466,12 @@ Horrela 'Euskarria' propietatea garbituko da, halakorik badago. CmdSketcherSwitchVirtualSpace - + Switch virtual space Aldatu espazio birtuala - + Switches the selected constraints or the view to the other virtual space Hautatutako murrizketak edo bista beste espazio birtualera aldatzen du @@ -1492,12 +1492,12 @@ Horrela 'Euskarria' propietatea garbituko da, halakorik badago. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktibatu/desaktibatu murrizketa - + Activates or deactivates the selected constraints Hautatutako murrizketak aktibatzen edo desaktibatzen ditu @@ -1518,12 +1518,12 @@ Horrela 'Euskarria' propietatea garbituko da, halakorik badago. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Aktibatu/desaktibatu gidatze/erreferentziako murrizketa - + Set the toolbar, or the selected constraints, into driving or reference mode Ezarri tresna-barra, edo hautatutako murrizketak, @@ -1533,12 +1533,12 @@ gidatze edo erreferentziako moduan CmdSketcherTrimming - + Trim edge Muxarratu ertza - + Trim an edge with respect to the picked position Muxarratu ertz bat aukeratutako posizioaren arabera @@ -1597,369 +1597,370 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Command - - + + Add horizontal constraint Gehitu murrizketa horizontala - - - + + + Add horizontal alignment Gehitu lerrokatze horizontala - - + + Add vertical constraint Gehitu murrizketa bertikala - + Add vertical alignment Gehitu lerrokatze bertikala - + Add 'Lock' constraint Gehitu 'Blokeo' murrizketa - + Add relative 'Lock' constraint Gehitu 'Blokeo' erlatiboko murrizketa - + Add fixed constraint Gehitu murrizketa finkoa - + Add 'Block' constraint Gehitu 'Bloke' murrizketa - + Add block constraint Gehitu bloke-murrizketa - - - + + + Add coincident constraint Gehitu bat datorren murrizketa - - + + Add distance from horizontal axis constraint Gehitu distantzia ardatz horizontaleko murrizketatik - - + + Add distance from vertical axis constraint Gehitu distantzia ardatz bertikaleko murrizketatik - - + + Add point to point distance constraint Gehitu puntutik punturako distantzia-murrizketa - - - + + + Add point to line Distance constraint Gehitu puntutik lerrorako distantzia-murrizketa - - + + Add circle to circle distance constraint Gehitu zirkulutik zirkulurako distantzia-murrizketa - + Add circle to line distance constraint Gehitu zirkulutik lerrorako distantzia-murrizketa - - - - - + + + + + + Add length constraint Gehitu luzera-murrizketa - - + + Dimension Kota - + Add lock constraint - Add lock constraint + Gehitu blokeo-murrizketa - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Gehitu jatorrirako distantzia murrizketa gisa - - - + + + Add Distance constraint - Add Distance constraint + Gehitu distantzia-murrizketa - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Gehitu murrizketa horizontalak - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Gehitu murrizketa bertikalak + + Add Symmetry constraint + Gehitu simetria-murrizketa + + + + + Add Symmetry constraints + Gehitu simetria-murrizketak + + + + + Add Distance constraints + Gehitu distantzia-murrizketak + + + + Add Horizontal constraint + Gehitu murrizketa horizontala + + + + Add Vertical constraint + Gehitu murrizketa bertikala + + + Add Block constraint - Add Block constraint + Gehitu bloke-murrizketa - + Add Angle constraint - Add Angle constraint + Gehitu angelu-murrizketa - - - + + + Add Equality constraint - Add Equality constraint + Gehitu berdintasun-murrizketa - + Add Equality constraints - Add Equality constraints + Gehitu berdintasun-murrizketak - + Add Radius constraint - Add Radius constraint + Gehitu erradio-murrizketa - + Add concentric and length constraint - Add concentric and length constraint + Gehitu luzeraren eta zentrokidetasunaren murrizketa - + Add DistanceX constraint - Add DistanceX constraint + Gehitu X distantziaren murrizketa - + Add DistanceY constraint - Add DistanceY constraint + Gehitu Y distantziaren murrizketa - + Add point to circle Distance constraint - Add point to circle Distance constraint + Gehitu puntutik zirkulurako distantzia-murrizketa - - + + Add point on object constraint Gehitu objektu gaineko puntuaren murrizketa - - + + Add point to point horizontal distance constraint Gehitu puntutik punturako distantzia horizontaleko murrizketa - + Add fixed x-coordinate constraint Gehitu X koordenatu finkoko murrizketa - - + + Add point to point vertical distance constraint Gehitu puntutik punturako distantzia bertikaleko murrizketa - + Add fixed y-coordinate constraint Gehitu Y koordenatu finkoko murrizketa - - + + Add parallel constraint Gehitu murrizketa paraleloa - - - - - - - + + + + + + + Add perpendicular constraint Gehitu murrizketa perpendikularra - + Add perpendicularity constraint Gehitu perpendikulartasun-murrizketa - + Swap coincident+tangency with ptp tangency Trukatu bat etortzea+tangentzia ptp tangentziarekin - + Swap PointOnObject+tangency with point to curve tangency Trukatu PuntuaObjektuan+tangentzia puntutik kurbarako tangentziarekin - - - - - - - + + + + + + + Add tangent constraint Gehitu tangente-murrizketa - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Gehitu tangentzia-murrizketako puntua - - - - + + + + Add radius constraint Gehitu erradio-murrizketa - - - - + + + + Add diameter constraint Gehitu diametro-murrizketa - - - - + + + + Add radiam constraint Gehitu erradio/diametro-murrizketa - - - - - - + + + + + + Add angle constraint Gehitu angelu-murrizketa - - + + Add equality constraint Gehitu berdintasun-murrizketa - - - - - + + + + + Add symmetric constraint Gehitu simetria-murrizketa - + Add Snell's law constraint Gehitu Snell-en legearen murrizketa - + Toggle constraint to driving/reference Txandakatu murrizketa gidatze/erreferentziara - + Activate/Deactivate constraint Aktibatu/desaktibatu murrizketa @@ -2019,44 +2020,44 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Gehitu zentratutako krokis-kutxa - + Add rounded rectangle Gehitu laukizuzen biribildua - + Add line to sketch wire Gehitu lerroa krokis-alanbreari - + Add arc to sketch wire Gehitu arkua krokis-alanbreari - - + + Add sketch arc Gehitu krokis-arkua - - + + Add sketch circle Gehitu krokis-zirkulua - + Add sketch ellipse Gehitu krokis-elipsea - + Add sketch arc of ellipse Gehitu elipse baten arkuaren krokisa - + Add sketch arc of hyperbola Gehitu hiperbola baten arkuaren krokisa @@ -2076,33 +2077,33 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Gehitu krokis-puntua - - + + Create fillet Sortu biribiltzea - + Trim edge Muxarratu ertza - + Extend edge Hedatu ertza - + Split edge Zatitu ertza - + Add external geometry Gehitu kanpo-geometria - + Add slot Gehitu arteka @@ -2112,37 +2113,37 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Gehitu hexagonoa - + Convert to NURBS Bihurtu NURBS - + Increase spline degree Handitu spline elementuaren gradua - + Decrease spline degree Txikitu spline elementuaren gradua - + Increase knot multiplicity Handitu adabegi-aniztasuna - + Decrease knot multiplicity Txikitu adabegi-aniztasuna - + Insert knot Txertatu adabegia - + Join Curves Elkartu kurbak @@ -2182,12 +2183,12 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Kendu ardatzen lerrokatzea - + Toggle constraints to the other virtual space Txandakatu murrizketak beste espazio birtualera - + @@ -2195,7 +2196,7 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Eguneratu murrizketen espazio birtuala - + Add auto constraints Gehitu murrizketa automatikoak @@ -2235,7 +2236,7 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Gehitu adabegi-puntua - + Create a carbon copy Sortu kalkoa @@ -2251,37 +2252,37 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Automurrizketa-errorea: Ebatzi ezin den krokisa bat datozen murrizketak aplikatzean. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Automurrizketa-errorea: Ebatzi ezin den krokisa murrizketa bertikalak/horizontalak aplikatzean. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Automurrizketa-errorea: Ebatzi ezin den krokisa berdintasun-murrizketak aplikatzean. - + Autoconstrain error: Unsolvable sketch without constraints. Automurrizketa-errorea: Ebatzi ezin den krokisa, murrizketarik gabekoa. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Automurrizketa-errorea: Ebatzi ezin den krokisa murrizketa bertikalak eta horizontalak aplikatu ondoren. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Automurrizketa-errorea: Ebatzi ezin den krokisa puntuz puntuko murrizketak aplikatu ondoren. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Automurrizketa-errorea: Ebatzi ezin den krokisa berdintasun-murrizketak aplikatu ondoren. @@ -2406,143 +2407,143 @@ murrizketak, geometria degeneratuak, etab. aztertuta. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ murrizketak, geometria degeneratuak, etab. aztertuta. - - - + + + Wrong selection Hautapen okerra @@ -2581,329 +2582,329 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Kota-murrizketa - + Cannot add a constraint between two external geometries. Ezin da murrizketa bat gehitu bi kanpo-geometriaren artean. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Ezin da murrizketa bat gehitu bi geometria finkoren artean. Geometria finkoek kanpo-geometriak, blokeatutako geometriak eta puntu bereziak (esaterako, B-spline adabegi-puntuak) barne hartzen dituzte. - + Sketcher Constraint Substitution Kroskisgile-murrizketen ordezkapena - + Keep notifying me of constraint substitutions Jarraitu murrizketa-ordezkapenak jakinarazten - - - + + + Only sketch and its support are allowed to be selected. Krokisa eta bere euskarria soilik onartzen dira hautatzea. - + One of the selected has to be on the sketch. Hautatuetako batek krokisean egon behar du. - - + + Select an edge from the sketch. Hautatu krokiseko ertz bat. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Ezinezko murrizketa - - - - + + + + The selected edge is not a line segment. Hautatutako ertza ez da lerro segmentu bat. - - - - - - + + + + + + Double constraint Murrizketa bikoitza - - - - - + + + + + The selected edge already has a horizontal constraint! Hautatutako ertzak badauka murrizketa horizontal bat! - - - + + + The selected edge already has a vertical constraint! Hautatutako ertzak badauka murrizketa bertikal bat! - - - - - - + + + + + + The selected edge already has a Block constraint! Hautatutako ertzak badauka bloke-murrizketa bat! - + The selected item(s) can't accept a horizontal constraint! Hautatutako elementua(e)k ez du(te) murrizketa horizontal bat onartzen! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Puntu finko bat baino gehiago dago hautatuta. Gehienez puntu finko bakarra hautatu behar duzu! - + The selected item(s) can't accept a vertical constraint! Hautatutako elementua(e)k ez du(te) murrizketa bertikal bat onartzen! - - - + + + Select vertices from the sketch. Hautatu krokiseko erpinak. - + Select one vertex from the sketch other than the origin. Hautatu krokiseko erpin bat, jatorria ez dena. - + Select only vertices from the sketch. The last selected vertex may be the origin. Hautatu krokiseko erpinak soilik. Hautatutako azken erpina jatorria izan daiteke. - + Wrong solver status Ebazle-egoera okerra - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Ezin da bloke-murrizketarik gehitu krokisa ebatzi gabe badago edo murrizketa errepikatuak eta gatazkan daudenak badaude. - + Select one edge from the sketch. Hautatu krokiseko ertz bat. - + Select only edges from the sketch. Hautatu krokiseko ertzak soilik. - + Number of selected objects is not 3 Hautatutako objektuen kopurua ez da 3 - - - + + + Error Errorea - + Unexpected error. More information may be available in the Report View. Ustekabeko errorea. Txosten-bistan informazio gehiago aurkitu daiteke. - + Endpoint to endpoint tangency was applied instead. Amaiera-puntutik amaiera-punturako tangentzia aplikatu da horren ordez. - + Select two or more points from the sketch. Hautatu krokiseko bi puntu edo gehiago. - + Select two or more vertices from the sketch. Hautatu krokiseko bi erpin edo gehiago. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Hautatu krokisaren bi erpin edo gehiago bat datorren murrizketa baterako, edo bi edo gehiago zirkulu, elipse, arku edo arkuen elipse, murrizketa kontzentriko baterako. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Hautatu krokisaren bi erpin bat datorren murrizketa baterako, edo bi zirkulu, elipse, arku edo arkuen elipse, murrizketa kontzentriko baterako. - + Select exactly one line or one point and one line or two points from the sketch. Hautatu krokiseko lerro bat edo puntu bat edo lerro bat eta bi puntu. - + Cannot add a length constraint on an axis! Ezin zaio luzera-murrizketa bat gehitu ardatz bati! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Hautatu krokiseko lerro bat edo puntu bat eta lerro bat edo bi puntu edo bi zirkulu. - + This constraint does not make sense for non-linear curves. Murrizketa honek ez du zentzurik linealak ez diren kurbekin. - + Endpoint to edge tangency was applied instead. Amaiera-puntutik ertzerako tangentzia aplikatu da horren ordez. - - - - - - - + + + + + + + Select the right things from the sketch. Hautatu krokiseko elementu egokiak. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Hautatu B-spline pisua ez den ertz bat. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Hautatutako puntuetako bat ere ez dago murriztuta bakoitzari dagokion kurban, elementu bereko osagai direlako, kanpo-geometria direlako edo ertza hautatu ezin delako. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Hautatutako puntuetako bat ere ez dago murriztuta bakoitzari dagokion kurban, bai elementu bereko osagai direlako bai kanpo-geometria direlako. - - - - + + + + Select exactly one line or up to two points from the sketch. Hautatu krokiseko lerro bat, puntu bat edo bi puntu. - + Cannot add a horizontal length constraint on an axis! Ezin zaio luzera horizontaleko murrizketa bat gehitu ardatz bati! - + Cannot add a fixed x-coordinate constraint on the origin point! Ezin zaio X koordenatu finkoko murrizketa bat gehitu jatorri-puntuari! - - + + This constraint only makes sense on a line segment or a pair of points. Murriztapen honek lerro segmentuetan edo puntu-bikoteetan soilik du zentzua. - + Cannot add a vertical length constraint on an axis! Ezin zaio luzera bertikaleko murrizketa bat gehitu ardatz bati! - + Cannot add a fixed y-coordinate constraint on the origin point! Ezin zaio Y koordenatu finkoko murrizketa bat gehitu jatorri-puntuari! - + Select two or more lines from the sketch. Hautatu krokiseko bi lerro edo gehiago. - - + + Select at least two lines from the sketch. Hautatu krokiseko bi lerro, gutxienez. - + Select a valid line. Hautatu baliozko lerro bat. - - + + The selected edge is not a valid line. Hautatutako ertza ez da baliozko lerro bat. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2914,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-puntu; bi kurba eta puntu bat. - + Select some geometry from the sketch. perpendicular constraint Hautatu krokiseko geometriaren bat. - - + + Cannot add a perpendicularity constraint at an unconnected point! Ezin zaio perpendikulartasun-murrizketa bat gehitu konektatu gabeko puntu bati! - - - + + + Perpendicular to B-spline edge currently unsupported. Oraindik ez da onartzen perpendikularra B-spline ertzean. - - + + One of the selected edges should be a line. Hautatutako ertzetako batek lerroa izan behar du. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Amaiera-puntutik amaiera-punturako tangentzia aplikatu da. Bat datorren murrizketa ezabatu egin da. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Amaiera-puntutik ertzerako tangentzia aplikatu da. Objektuaren gaineko puntuaren murrizketa ezabatu egin da. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2958,277 +2959,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-puntu; bi kurba eta puntu bat. - + Select some geometry from the sketch. tangent constraint Hautatu krokiseko geometriaren bat. - - - + + + Cannot add a tangency constraint at an unconnected point! Ezin zaio tangentzia-murrizketa gehitu konektatu gabeko puntu bati! - - + + Tangent constraint at B-spline knot is only supported with lines! B-spline adabegiko tangente-murrizketa lerroekin soilik onartzen da. - + B-spline knot to endpoint tangency was applied instead. B-splinearen adabegitik amaiera-punturako tangentzia aplikatu da horren ordez. - + Select either one point and several curves, or one curve and several points. Hautatu puntu bat edo kurba anitz, edo kurba bat eta puntu anitz. - - + + Wrong number of selected objects! Hautatutako objektu kopuru okerra! - - + + With 3 objects, there must be 2 curves and 1 point. 3 objektu badira, 2 kurba eta puntu1 egon behar dute. - - - + + + Tangency to B-spline edge currently unsupported. Oraindik ez da onartzen tangentea B-spline kurbaren ertzean. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Hautatu krokiseko arku edo zirkulu bat edo gehiago. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Hautatu B-spline polo bat edo gehiago edo zirkuluen arku bat edo gehiago krokisean, baina ez bi motak nahastuta. - - - + + + Constraint only applies to arcs or circles. Murrizketa arkuei edo zirkuluei soilik aplikatzen zaie. - - + + Select one or two lines from the sketch. Or select two edges and a point. Hautatu krokisaren lerro bat edo bi. Edo hautatu bi ertz eta puntu bat. - - + + Parallel lines Lerro paraleloak - - + + An angle constraint cannot be set for two parallel lines. Ezin da angelu-murrizketa bat ezarri bi lerro paralelotarako. - + Cannot add an angle constraint on an axis! Ezin zaio angelu-murrizketa bat gehitu ardatz bati! - + Select two edges from the sketch. Hautatu krokiseko bi ertz. - + Select two or more compatible edges. Hautatu bateragarriak diren bi ertz edo gehiago. - + Sketch axes cannot be used in equality constraints. Krokis-ardatzak ezin dira erabili berdintasun-murrizketetan. - + Equality for B-spline edge currently unsupported. Momentuz ez dago onartuta B-spline ertzen berdintasuna. - - - - + + + + Select two or more edges of similar type. Hautatu antzekoak diren bi ertz edo gehiago. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Hautatu krokiseko bi puntu eta simetria-lerro bat, bi puntu eta simetria-puntu bat edo lerro bat eta simetria-puntu bat. - - + + Cannot add a symmetry constraint between a line and its end points. Ezin da simetria-murrizketarik gehitu lerro baten eta haren amaiera-puntuen artean. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Ezin da simetria-murrizketarik gehitu lerro baten eta haren amaiera-puntuen artean! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Hautatu lerroen bi amaiera-puntu izpi gisa joka dezaten, eta muga bat adieraziko duen ertz bat. Hautatutako lehen puntua n1 indizeari dagokio, bigarrena n2 indizeari, eta zero puntuaren balioak n2/n1 erlazioa ezartzen du. - + Selected objects are not just geometry from one sketch. Hautatutako elementuak ez dira soilik krokis bateko geometria. - + Cannot create constraint with external geometry only. Ezin da murrizketa sortu kanpo-geometria soilik erabiliz. - + Incompatible geometry is selected. Bateragarria ez den geometria hautatu da. - + SnellsLaw on B-spline edge is currently unsupported. Oraindik ez da onartzen Snell-en legea B-spline ertzean. - - - - - + + + + + Select constraints from the sketch. Hautatu krokiseko murrizketak. - - - + + + Select constraint(s) from the sketch. Hautatu krokiseko murrizketa(k). - + B-Spline Degree B-spline gradua - + Define B-Spline Degree, between 1 and %1: Definitu B-spline gradua, 1 eta %1 artekoa: - - - + + + CAD Kernel Error CAD kernel-errorea - + None of the selected elements is an edge. Hautatutako elementuetako bat ere ez da ertza. - - + + At least one of the selected objects was not a B-Spline and was ignored. Hautatutako objektuetako bat, gutxienez, ez da B-spline motakoa, eta ezikusi egin da. - - + + The selection comprises more than one item. Please select just one knot. Hautapenak elementu bat baino gehiago du. Hautatu adabegi bakar bat. - - + + Input Error Sarrera-errorea - - + + None of the selected elements is a knot of a B-spline Hautatutako elementuetan ez dago B-spline baten adabegirik - - + + Selection is empty Hautapena hutsik dago - + Nothing is selected. Please select a b-spline. Ez da ezer hautatu. Hautatu B-spline bat. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Hautatu B-spline kurbat bat adabegi bat txertatzeko (ez adabegia gainean jartzeko). Kurba ez bada B-spline bat, bihurtu lehenengo. - + Nothing is selected. Please select end points of curves. Ez da ezer hautatu. Hautatu kurben amaierako puntuak. - + Too many curves on point Kurba gehiegi puntuan - - + + Exactly two curves should end at the selected point to be able to join them. Bi kurbak soilik amaitu beharko lukete hautatutako puntuan, haiek elkartu ahal izateko. - + Too few curves on point Kurba gutxiegi puntuan - + Two end points, or coincident point should be selected. Amaierako bi puntu, edo bat datozen puntuak, hautatu beharko lirateke. @@ -3308,17 +3309,17 @@ Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-p Momentuz ez da onartzen kanpoko geometria bat ikusizko beste geruza batera eramatea. Kanpoko geometriari ez ikusiarena egingo zaio - + Set knot multiplicity Ezarri adabegi-aniztasuna - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Ezarri adabegi-aniztasuna emandako azken puntuan, 1 eta %1 artean: Kontuan izan aniztasunari ez ikusiarena egin ahal zaiola zenbait egoeratan. Begiratu dokumentazioa xehetasun gehiagorako - + Value Error Balio-errorea @@ -3632,12 +3633,12 @@ Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-p Luzera: - + Refractive index ratio Errefrakzio-indizea - + Ratio n2/n1: n2/n1 erlazioa: @@ -3917,8 +3918,8 @@ Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-p SketcherGui::PropertyConstraintListItem - - + + Unnamed Izenik gabea @@ -4142,30 +4143,30 @@ Edizio moduan berriro sartu behar da horrek eragina izan dezan. Dimension Constraint - Dimension Constraint + Kota-murrizketa Dimensioning constraints: - Dimensioning constraints: + Dimentsio-murrizketak: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Hautatu zure tresna-barrak zein motatako kota-murrizketa izango duen: +'Tresna bakarra': Tresna bakarra tresna-barrako kota-murrizketa guztietarako : Distantzia, X / Y distantzia, angelua, erradioa. (Besteak goitibeherakoan) +'Tresna bereiztuak': Banakako tresnak kota-murrizketa bakoitzerako. +'Biak': 'Kota' tresna eta tresna bereiztuak, biak izango dira. +Ezarpen hau tresna-barrarako soilik da. Aukeratzen dena edozein izanda ere, menuetan tresna guztiak egongo dira eta lasterbideen bidez ere erabili ahal izango dira. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Kota-tresnaren diametro/erradio modua: @@ -4173,38 +4174,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Koten tresna erabiltzean, zirkuluak eta arkuak nola maneiatzen diren aukeratu daiteke: +'Auto': Tresnak erradioak aplikatuko ditu arkuetan eta diametroak zirkuluetan. +'Diametroa': Tresnak diametroak aplikatuko ditu bai arkuetan bai zirkuluetan. +'Erradioa': Tresnak erradioak aplikatuko ditu bai arkuetan bai zirkuluetan. - + Single tool - Single tool + Tresna bakarra - + Separated tools - Separated tools + Tresna bereiztuak - + Both Biak - + Auto Automatikoa - + Diameter Diametroa - + Radius Erradioa @@ -4653,12 +4654,12 @@ Horrela, objektuak krokis-planoaren atzean soilik egongo dira ikusgai.Aplikatu lehendik dauden krokisei - + Unexpected C++ exception Espero ez zen C++ salbuespena - + Sketcher Krokisgilea @@ -4666,55 +4667,55 @@ Horrela, objektuak krokis-planoaren atzean soilik egongo dira ikusgai. SketcherGui::SketcherValidation - + No missing coincidences Ez dago falta den bat etortzerik - + No missing coincidences found Ez da aurkitu falta den bat etortzerik - + Missing coincidences Falta diren bat etortzeak - + %1 missing coincidences found Falta diren %1 bat etortze aurkitu dira - + No invalid constraints Ez dago baliogabeko murrizketarik - + No invalid constraints found Ez da baliozko murrizketarik aurkitu - + Invalid constraints Baliogabeko murrizketak - + Invalid constraints found Baliogabeko murrizketak aurkitu dira - - - + + + Reversed external geometry Alderantzizko kanpo-geometria - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4727,7 +4728,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Sakatu "Trukatu amaiera-puntuak murrizketetan" botoia amaiera-puntuak berriro esleitzeko. Egin behin bakarrik 0.15 bertsioa baino zaharragoa den FreeCAD batekin sortutako krokisetan. - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4736,75 +4737,70 @@ However, no constraints linking to the endpoints were found. Hala ere, ez da aurkitu amaiera-puntuei estekatutako murrizketarik. - + No reversed external-geometry arcs were found. Ez da aurkitu alderantzizko kanpo-geometria duen arkurik. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 aldaketa egin dira alderantzizko arkuen amaiera-puntuei estekatutako murrizketetan. - - + + Constraint orientation locking Orientazio-blokearen murrizketa - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Orientazio-blokeoa gaitu eta birkakulatu egin da %1 murrizketatarako. Murrizketak txosten-bistan zerrendatu dira ('Ikusi > Panelak > Txosten-bista' menuan). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Orientazioaren blokeoa desgaitu egin da %1 murrizketarako. Murrizketak txosten-bistan zerrendatu dira ('Bista > Panelak > Txosten-bista' menuan). Kontuan izan geroagoko murrizketetarako blokeoak aktibatuta jarraituko duela. - - + + Delete constraints to external geom. Ezabatu kanpo-geometrien murrizketak - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Kanpo-geometriarekin zerikusia duten murrizketa GUZTIAK ezabatzera zoaz. Ekintza hori erabilgarria da kanpo-geometriarekin esteka hautsiak/aldatuak dituen krokisekin. Benetan ezabatu nahi dituzu murrizketak? - + All constraints that deal with external geometry were deleted. Kanpo-geometriarekin zerikusia duten murrizketa guztiak ezabatu dira. - + No degenerated geometry Ez dago geometria degeneraturik - + No degenerated geometry found Ez da aurkitu geometria degeneraturik - + Degenerated geometry Geometria degeneratua - + %1 degenerated geometry found Geometria degeneratu %1 aurkitu da SketcherGui::TaskSketcherConstraints - - - Form - Inprimakia - Check to toggle filters @@ -4879,11 +4875,6 @@ Hala ere, ez da aurkitu amaiera-puntuei estekatutako murrizketarik. SketcherGui::TaskSketcherElements - - - Form - Inprimakia - Check to toggle filters @@ -5069,7 +5060,7 @@ Hala ere, ez da aurkitu amaiera-puntuei estekatutako murrizketarik. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Ebazle-kontrol aurreratua @@ -5359,8 +5350,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines B-spline guztien kurbadura-orrazia erakusten/ezkutatzen ditu @@ -5368,8 +5359,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline B-spline batean hautatutako adabegi baten aniztasuna txikitzen du @@ -5377,8 +5368,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines B-spline guztien gradua erakusten/ezkutatzen ditu @@ -5386,8 +5377,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline B-spline batean hautatutako adabegi baten aniztasuna handitzen du @@ -5395,8 +5386,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines B-spline guztien adabegi-aniztasuna erakusten/ezkutatzen ditu @@ -5404,8 +5395,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines B-spline guztien kontrol-puntuen pisuak erakusten/ezkutatzen ditu @@ -5413,8 +5404,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines B-spline guztien kontrol-poligonoak erakusten/ezkutatzen ditu @@ -5449,8 +5440,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Finkatu zirkulu baten edo arku baten diametroa @@ -5458,7 +5449,7 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Finkatu zirkulu baten edo arku baten erradioa/diametroa @@ -5466,8 +5457,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Finkatu zirkulu baten edo arku baten erradioa @@ -5475,7 +5466,7 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Finkatu zirkulu baten edo arku baten erradioa/diametroa @@ -5492,8 +5483,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Sortu arku bat amaiera-puntuak eta arkuan dagoen puntu bat erabiliz @@ -5501,8 +5492,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Sortu zirkulu bat 3 ertz-puntutik abiatuz @@ -5510,8 +5501,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Sortu arku bat puntu zentrala eta amaiera-puntuak erabiliz @@ -5519,8 +5510,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Sortu elipse-arku bat erdiko puntua, erradio handia eta amaiera-puntuak erabiliz @@ -5528,8 +5519,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Sortu hiperbola-arku bat erdiko puntua, erradio handia eta amaiera-puntuak erabiliz @@ -5537,8 +5528,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Sortu parabola-arku bat fokua, erpina eta amaiera-puntuak erabiliz @@ -5546,13 +5537,13 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateBSpline - + B-spline by control points B-spline kontrol-puntuetatik - - + + Create a B-spline by control points Sortu B-spline bat kontrol-puntuetatik abiatuz @@ -5560,8 +5551,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Sortu zirkulu bat puntu zentrala eta ertz-puntu bat erabiliz @@ -5569,8 +5560,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Sortu elipse bat periapsia, apoapsia eta erradio txikia erabiliz @@ -5578,8 +5569,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Sortu elipse bat puntu zentrala, erradio handia eta puntu bat erabiliz @@ -5587,8 +5578,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateFillet - - + + Creates a radius between two lines Bi lerroren arteko erradio bat sortzen du @@ -5596,8 +5587,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Sortu heptagono bat bere erdigunea eta izkina bat erabiliz @@ -5605,8 +5596,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Sortu hexagono bat bere erdigunea eta izkina bat erabiliz @@ -5614,7 +5605,7 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateOblong - + Create a rounded rectangle Sortu laukizuzen biribildua @@ -5622,14 +5613,14 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Sortu oktogono bat bere erdigunea eta izkina bat erabiliz - - + + Create a regular polygon by its center and by one corner Sortu poligono erregular bat bere erdigunea eta izkina bat erabiliz @@ -5637,8 +5628,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Sortu pentagono bat bere erdigunea eta izkina bat erabiliz @@ -5646,8 +5637,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Murrizketak eta ebakidura-puntua mantentzen dituen biribiltzea @@ -5655,7 +5646,7 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateRectangle - + Create a rectangle Sortu laukizuzena @@ -5663,7 +5654,7 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateRectangle_Center - + Create a centered rectangle Sortu laukizuzen zentratua @@ -5671,8 +5662,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Sortu lauki bat bere erdigunea eta izkina bat erabiliz @@ -5680,8 +5671,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Sortu triangelu aldeberdin bat bere erdigunea eta izkina bat erabiliz @@ -5689,13 +5680,13 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periodikoa kontrol-puntuetatik - - + + Create a periodic B-spline by control points Sortu B-spline periodiko bat krokiseko kontrol-puntuetatik abiatuz @@ -6328,36 +6319,36 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Errorea @@ -6377,45 +6368,45 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Murrizketak indize-informazio baliogabea du eta gaizki eratuta dago. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Baliogabeko murrizketa - - - + + + Failed to add arc Huts egin du arkua gehitzeak - + Failed to add arc of ellipse Huts egin du elipsearen arkua gehitzeak - + Cannot create arc of hyperbola from invalid angles, try again! Ezin da hirperbolaren arkua sortu angeluak baliogabeak badira, saiatu berriro. - + Cannot create arc of hyperbola Ezin da hiperbolaren arkua sortu - + Cannot create arc of parabola Ezin da parabolaren arkua sortu @@ -6425,18 +6416,18 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Errorea B-spline poloa gehitzean - + Error creating B-spline pole Errorea B-spline poloa sortzean - - + + Error creating B-spline Errorea B-spline kurba gehitzean - + Error deleting last pole Errorea azken poloa ezabatzean @@ -6446,49 +6437,49 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Ezin da adabegi-puntua gehitu - + Cannot add internal alignment points Ezin dira barneko lerrokatze-puntuak gehitu - + Error removing knot Errorea adabegia kentzean - + Failed to add carbon copy Huts egin du kalkoa gehitzeak - - + + Failed to add circle Huts egin du zirkulua gehitzeak - + Failed to add an ellipse Huts egin du elipsea gehitzeak - + Failed to extend edge Huts egin du ertza luzatzeak - + Failed to add external geometry Huts egin du kanpo-geometria gehitzeak - + Failed to create fillet Huts egin du biribiltzea sortzeak - + Failed to add line Huts egin du lerroa gehitzeak @@ -6498,7 +6489,7 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Huts egin du puntua gehitzeak - + Failed to add polygon Huts egin du poligonoa gehitzeak @@ -6508,27 +6499,27 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Huts egin du kutxa gehitzeak - + Failed to add rounded rectangle Huts egin du laukizuzen biribildua gehitzeak - + Failed to add slot Huts egin du arteka gehitzeak - + Failed to add edge Huts egin du ertza gehitzeak - + Failed to trim edge Huts egin du ertza muxarratzeak - + Value Error @@ -6538,13 +6529,13 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline kurba adabegietatik - - + + Create a B-spline by knots Sortu B-spline bat adabegietatik abiatuz @@ -6552,13 +6543,13 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots B-spline periodikoa adabegietatik - - + + Create a periodic B-spline by knots Sortu B-spline periodiko bat adabegietatik abiatuz @@ -6664,12 +6655,12 @@ Puntuak sareta-tartearen bosten bat baino hurbilago ezarri behar dira lerro bate CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Sortu B-spline bat adabegietatik abiatuz - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Sortu B-spline bat adabegietatik abiatuz, alegia interpolazio bidez, krokisean. @@ -6677,12 +6668,12 @@ Puntuak sareta-tartearen bosten bat baino hurbilago ezarri behar dira lerro bate CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Sortu B-spline periodiko bat adabegietatik abiatuz - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Sortu B-spline periodiko bat adabegietatik abiatuz, alegia interpolazio bidez, krokisean. @@ -6690,31 +6681,44 @@ Puntuak sareta-tartearen bosten bat baino hurbilago ezarri behar dira lerro bate CmdSketcherDimension - + Dimension Kota - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Murriztu testuinguruaren arabera, hautapenean oinarrituta. +Hautapenaren arabera, murriztapen batzuk edo besteak egon daitezke erabilgarri. Haien artean saltatzeko, erabili Shift tekla. +Hutsi dagoen espazioan klik eginda, uneko murriztapena baliozkotuko da. Eskuineko klik eginda edo Esc erabilita ekintza bertan behera geratuko da. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Erakutsi/ezkutatu laguntzaile zirkularra arkuetarako - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Laguntzaile zirkularra erakusten edo ezkutatzen du arku guztietarako + + + + CmdSketcherCompDimensionTools + + + Dimension + Kota + + + + Dimension tools. + Koten tresnak.
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts index b54a2c9338..7fe3df4821 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Näytä/piilota B-splinien informaatiokerros - + Show/hide B-spline degree Näytä/piilota B-splinien aste - + Show/hide B-spline control polygon Näytä/piilota B-splinien ohjausmonikulmio - + Show/hide B-spline curvature comb Näytä/piilota B-splinien kaarevuuskampa - + Show/hide B-spline knot multiplicity Näytä/piilota B-splinien solmujen moninkertaisuusarvo - + Show/hide B-spline control point weight Näytä/piilota B-splinien painokertoimien arvot @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Rajoita ympyrän kaari - + Constrain an arc or a circle Rajoita ympyrän kaari - + Constrain radius Rajoita säde - + Constrain diameter Rajoita halkaisija - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Luo kaari - + Create an arc in the sketcher Luo kaari luonnostyökalulla - + Center and end points Keski- ja loppupisteet - + End points and rim point Loppupisteet ja kehän kohta @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Luo B-splini - + Create a B-spline in the sketch Luo B-splinin luonnokseen @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Luo ympyrä - + Create a circle in the sketcher Luo ympyrä luonnostyökalulla - + Center and rim point keskipiste ja kehäpiste - + 3 rim points 3 kehän pistettä @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Luo kartio luonnokseen - + Ellipse by center, major radius, point Ellipsi keskipisteellä, pääsäteellä tai pisteellä - + Ellipse by periapsis, apoapsis, minor radius Ellipsi lähimmällä pisteellä, kauimmalla pisteellä, ja pienellä säteellä - + Arc of ellipse by center, major radius, endpoints Ellipsin kaari keskipisteellä, suurella säteellä, päätepisteillä - + Arc of hyperbola by center, major radius, endpoints Hyperbelin kaari keskipisteen, isoakselin säteen ja päätepisteiden perusteella - + Arc of parabola by focus, vertex, endpoints Paraabelin kaari polttopisteen, huipun ja päätepisteiden perusteella @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Luo pyöristys - + Create a fillet between two lines Luo pyöristys kahden viivan väliseen nurkkaan - + Sketch fillet Pyöristys luonnokselle - + Constraint-preserving sketch fillet Rajoitteet säilyttävä pyöristys luonnokselle @@ -299,17 +299,17 @@ Creates a rectangle in the sketch - + Rectangle Suorakulmio - + Centered rectangle Centered rectangle - + Rounded rectangle Rounded rectangle @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Luo säännöllinen monikulmio - + Create a regular polygon in the sketcher Luo säännöllinen monikulmio luonnokseen - + Triangle Kolmio - + Square Neliö - + Pentagon Viisikulmio - + Hexagon Kuusikulmio - + Heptagon Seitsenkulmio - + Octagon Kahdeksankulmio - + Regular polygon Säännöllinen monikulmio @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Muokkaa solmun moninkertaisuusarvoa - + Modifies the multiplicity of the selected knot of a B-spline Muuttaa B-splinin valitun solmun moninkertaisuusarvoa - + Increase knot multiplicity Lisää solmun moninkertaisuusarvoa - + Decrease knot multiplicity Pienennä solmun moninkertaisuusarvoa @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Rajoita kulma - + Fix the angle of a line or the angle between two lines Korjaa viivan kulmaa tai kahden viivan välistä kulma @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Rajoita esteellä - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Samanlaisuus rajoite - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Rajoita halkaisija - + Fix the diameter of a circle or an arc Kiinnitä ympyrän tai kaaren halkaisija @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Etäisyys rajoitus - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Vaakasuoran etäisyyden rajoite - + Fix the horizontal distance between two points or line ends Korjaa kahden pisteen tai viivanpään vaakasuoraa etäisyyttä @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Korjaa kahden pisteen tai viivanpään pystysuoraa etäisyyttä @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Yhtäsuuruus rajoite - + Create an equality constraint between two lines or between circles and arcs Luo yhtäsuuruus rajoite kahdelle viivan tai ympyröiden ja kaarien väliin @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Vaakasuora rajoite - + Create a horizontal constraint on the selected item Luo vaakasuora rajoite valittujen osien välille @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Rajoite lukko - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Rajoita yhdensuuntaiseksi - + Create a parallel constraint between two lines Luo rinnakkaisuus rajoite kahden viivan välille @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Rajoita kohtisuorasti - + Create a perpendicular constraint between two lines Luo kohtisuora rajoitus kahden viivan väliin @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Rajoita piste objektiin - + Fix a point onto an object Korjaa piste objektin paalle @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Rajoita säde tai painokerroin - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Kiinnitä ympyrän tai kaaren säde, tai kiinnitä navan tai B-splinin painokerroin @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Rajoita taittuminen (Snellin laki) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Rajoita symmetrisesti - + Create a symmetry constraint between two points with respect to a line or a third point Luo symmetriarajoite kahden pisteen välille, @@ -615,12 +615,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherConstrainTangent - + Constrain tangent Rajoita tangentti - + Create a tangent constraint between two entities Luo tangenttirajoite kahden yksikön välillä @@ -628,12 +628,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherConstrainVertical - + Constrain vertically Rajoita pystysuuntaisesti - + Create a vertical constraint on the selected item Luo pystysuora rajoite valitulle kohteelle @@ -641,12 +641,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherConvertToNURBS - + Convert geometry to B-spline Muunna geometria B-spliniksi - + Converts the selected geometry to a B-spline Muuntaa valitun geometrian B-spliniksi @@ -667,12 +667,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreate3PointArc - + Create arc by three points Luo kaari kolmella pistettä - + Create an arc by its end points and a point along the arc Luoda kaari sen loppupisteistä ja kaarella olevasta pisteestä @@ -680,12 +680,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreate3PointCircle - + Create circle by three points Luo ympyrä kolmella pistettä - + Create a circle by 3 perimeter points Luo ympyrä kolmella kehän pisteellä @@ -693,12 +693,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateArc - + Create arc by center Luo kaari keskipistettä - + Create an arc by its center and by its end points Luo kaari sen keskipisteellä ja sen loppupisteillä @@ -706,12 +706,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Luo ellipsin kaaren luonnoksessa @@ -719,12 +719,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Luo hyperbelin kaari luonnokseen @@ -732,12 +732,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Lue paraabelin kaari luonnokseen @@ -745,12 +745,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateBSpline - + Create B-spline Luo B-splini - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -758,12 +758,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateCircle - + Create circle Luo ympyrä - + Create a circle in the sketch Luo ympyrän luonnoksessa @@ -771,12 +771,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Luo ellipsi 3:lla pisteellä - + Create an ellipse by 3 points in the sketch Luo ellipsi 3 pisteellä luonnoksessa @@ -784,12 +784,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateEllipseByCenter - + Create ellipse by center Luo ellipsi keskipisteen avulla - + Create an ellipse by center in the sketch Luo ellipsi keskipisteen avulla luonnoksessa @@ -797,12 +797,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateFillet - + Create fillet Luo pyöristys - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -810,12 +810,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateHeptagon - + Create heptagon Luo seitsenkulmio - + Create a heptagon in the sketch Luo seitsenkulmio luonnoksessa @@ -823,12 +823,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateHexagon - + Create hexagon Luo kuusikulmio - + Create a hexagon in the sketch Luo kuusikulmio luonnoksessa @@ -862,12 +862,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateOctagon - + Create octagon Luo kahdeksankulmio - + Create an octagon in the sketch Luo kahdeksankulmio luonnoksessa @@ -875,12 +875,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreatePentagon - + Create pentagon Luo viisikulmio - + Create a pentagon in the sketch Luo viisikulmio luonnoksessa @@ -888,12 +888,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Luo jaksollinen B-splini - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -901,12 +901,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreatePoint - + Create point Luo piste - + Create a point in the sketch Luo pisteen luonnoksessa @@ -914,12 +914,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreatePointFillet - + Create corner-preserving fillet Luo nurkkapisteen säilyttävä pyöristys - + Fillet that preserves intersection point and most constraints Pyöristys, joka säilyttää alkuperäisen nurkkapisteen ja useimmat rajoitteet @@ -927,12 +927,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreatePolyline - + Create polyline Luo murtoviiva - + Create a polyline in the sketch. 'M' Key cycles behaviour Luo murtoviivan luonnos. 'M' avain ohjaa käyttäytymistä @@ -966,12 +966,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateRegularPolygon - + Create regular polygon Luo säännöllinen monikulmio - + Create a regular polygon in the sketch Luo säännöllinen monikulmio luonnokseen @@ -979,12 +979,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateSlot - + Create slot Luo rako - + Create a slot in the sketch Luo rako luonnokseen @@ -992,12 +992,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateSquare - + Create square Luo neliö - + Create a square in the sketch Luo neliö luonnoksessa @@ -1005,12 +1005,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherCreateTriangle - + Create equilateral triangle Luo tasasivuinen kolmio - + Create an equilateral triangle in the sketch Luo tasasivuinen kolmio luonnoksessa @@ -1018,12 +1018,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherDecreaseDegree - + Decrease B-spline degree Vähennä B-splinin astetta - + Decreases the degree of the B-spline Vähentää B-splinin astetta @@ -1031,12 +1031,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Pienennä solmun moninkertaisuusarvoa - + Decreases the multiplicity of the selected knot of a B-spline Vähentää B-splinin valitun solmun moninkertaisuusarvoa @@ -1083,12 +1083,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherExtend - + Extend edge Pidennä reunaa - + Extend an edge with respect to the picked position Pidennä reunaa valittuun sijaintiin asti @@ -1096,12 +1096,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Luo reuna joka on yhteydessä ulkoiseen geometriaan @@ -1109,12 +1109,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherIncreaseDegree - + Increase B-spline degree Lisää B-splinin astetta - + Increases the degree of the B-spline Kasvattaa B-splinin astetta @@ -1122,12 +1122,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Lisää solmun moninkertaisuusarvoa - + Increases the multiplicity of the selected knot of a B-spline Lisää B-splinin valitun solmun moninkertaisuusarvoa @@ -1135,12 +1135,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1148,12 +1148,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1440,12 +1440,12 @@ Tämä tyhjentää 'Tukipiste'-ominaisuuden, jos sellainen on. CmdSketcherSplit - + Split edge Split edge - + Splits an edge into two while preserving constraints Splits an edge into two while preserving constraints @@ -1466,12 +1466,12 @@ Tämä tyhjentää 'Tukipiste'-ominaisuuden, jos sellainen on. CmdSketcherSwitchVirtualSpace - + Switch virtual space Vaihda virtuaalitilaa - + Switches the selected constraints or the view to the other virtual space Vaihtaa valitut rajoitteet tai näkymän toiseen virtuaalitilaan @@ -1492,12 +1492,12 @@ Tämä tyhjentää 'Tukipiste'-ominaisuuden, jos sellainen on. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktivoi/deaktivoi rajoite - + Activates or deactivates the selected constraints Aktivoi tai deaktivoi valitut rajoitteet @@ -1519,12 +1519,12 @@ rakennetilan ja tavallisen geometrian välillä edestakaisin CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Vaihda rajoite määräävän/referenssin välillä - + Set the toolbar, or the selected constraints, into driving or reference mode Vaihtaa työkalupalkin kuvakkeen, tai valitut rajoitteet, @@ -1534,12 +1534,12 @@ määräävän ja referenssimoodin välillä edestakaisin CmdSketcherTrimming - + Trim edge Trimmaa reuna - + Trim an edge with respect to the picked position Tarkenna reuna suhteessa valittuun kohtaan @@ -1598,369 +1598,370 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Command - - + + Add horizontal constraint Lisää vaakasuuntainen rajoite - - - + + + Add horizontal alignment Lisää vaakatasaus - - + + Add vertical constraint Lisää pystysuuntainen rajoite - + Add vertical alignment Lisää pystytasaus - + Add 'Lock' constraint Lisää 'Block' rajoitus - + Add relative 'Lock' constraint Lisää suhteellinen 'Lock' rajoite - + Add fixed constraint Lisää kiinteä rajoite - + Add 'Block' constraint Lisää 'Block' rajoitus - + Add block constraint Lisää lohkon rajoitus - - - + + + Add coincident constraint Lisää yhtenevyys-rajoite - - + + Add distance from horizontal axis constraint Lisää etäisyys vaaka-akselin rajoituksesta - - + + Add distance from vertical axis constraint Lisää etäisyys pystyakselin rajoituksesta - - + + Add point to point distance constraint Lisää pisteestä pisteeseen etäisyyden rajoite - - - + + + Add point to line Distance constraint Lisää piste viivalle etäisyysrajoite - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Lisää pituusrajoite - - + + Dimension Mitta - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Lisää piste-on-objektilla rajoite - - + + Add point to point horizontal distance constraint Lisää pisteestä pisteeseen vaakasuuntaisen etäisyyden rajoite - + Add fixed x-coordinate constraint Lisää kiinnitetyn x-koordinaatin rajoite - - + + Add point to point vertical distance constraint Lisää pisteestä pisteeseen pystysuuntaisen etäisyyden rajoite - + Add fixed y-coordinate constraint Lisää kiinnitetyn y-koordinaatin rajoite - - + + Add parallel constraint Lisää yhdensuuntaisuuden rajoite - - - - - - - + + + + + + + Add perpendicular constraint Lisää kohtisuora rajoite - + Add perpendicularity constraint Lisää kohtisuoruuden rajoite - + Swap coincident+tangency with ptp tangency Vaihda yhtenevyyden+tangentiaalisuuden ja pisteestä-pisteeseen tangentiaalisuuden välillä - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Lisää tangentiaalisuus-rajoite - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Lisää tangenttirajoitepiste - - - - + + + + Add radius constraint Lisää säteen rajoite - - - - + + + + Add diameter constraint Lisää halkaisijan rajoite - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Lisää kulman rajoite - - + + Add equality constraint Lisää yhtäsuuruuden rajoite - - - - - + + + + + Add symmetric constraint Lisää symmetrisyyden rajoite - + Add Snell's law constraint Lisää Snellin lain rajoite - + Toggle constraint to driving/reference Vaihda rajoite määräävän/referenssin välillä - + Activate/Deactivate constraint Aktivoi/deaktivoi rajoite @@ -2020,44 +2021,44 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Add centered sketch box - + Add rounded rectangle Add rounded rectangle - + Add line to sketch wire Lisää linja luonnoksen lankaan - + Add arc to sketch wire Lisää kaari luonnokseen lankaan - - + + Add sketch arc Lisää luonnos kaari - - + + Add sketch circle Lisää luonnosympyrä - + Add sketch ellipse Lisää luonnos ellipsi - + Add sketch arc of ellipse Lisää luonnos ellipsin kaaresta - + Add sketch arc of hyperbola Lisää luonnos hyperbolin kaaresta @@ -2077,33 +2078,33 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Lisää luonnos piste - - + + Create fillet Luo pyöristys - + Trim edge Trimmaa reuna - + Extend edge Pidennä reunaa - + Split edge Split edge - + Add external geometry Lisää ulkoinen geometria - + Add slot Lisää paikka @@ -2113,37 +2114,37 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Lisää kuusikulmio - + Convert to NURBS Muunna NURBS-käyräksi - + Increase spline degree Lisää B-splinin astetta - + Decrease spline degree Vähennä B-splinin astetta - + Increase knot multiplicity Lisää solmun moninkertaisuusarvoa - + Decrease knot multiplicity Pienennä solmun moninkertaisuusarvoa - + Insert knot Insert knot - + Join Curves Join Curves @@ -2183,12 +2184,12 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Remove Axes Alignment - + Toggle constraints to the other virtual space Vaihda rajoitteet toiseen virtuaalitilaan - + @@ -2196,7 +2197,7 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Päivitä rajoituksen virtuaalinen tila - + Add auto constraints Lisää automaattisesti rajoitteita @@ -2236,7 +2237,7 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2252,37 +2253,37 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Automaattinen rajoitusvirhe: Ratkaisematon luonnos kun käytetään satunnaisia rajoitteita. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Automaattinen rajoitusvirhe: Ratkaisematon luonnos kun käytetään vaakasuoria/pystyasuoria rajoitteita. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Automaattinen rajoitusvirhe: Ratkaisematon luonnos kun käytetään yhdenmukaisia rajoitteita. - + Autoconstrain error: Unsolvable sketch without constraints. Automaattinen rajoitusvirhe: Ratkaisematon luonnos ilman rajoituksia. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Automaattinen rajoitusvirhe: Ratkaisematon luonnos kun käytetään vaakasuoria/pystysuoria rajoitteita. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Automaattinen rajoitusvirhe: Ratkaisematon luonnos kun käytetään piste-pisteeltä rajoitteita. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Automaattinen rajoitusvirhe: Ratkaisematon luonnos kun käytetään yhdenmukaisia rajoitteita. @@ -2407,143 +2408,143 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2559,9 +2560,9 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. - - - + + + Wrong selection Virheellinen valinta @@ -2582,329 +2583,329 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Mittarajoite - + Cannot add a constraint between two external geometries. Ei voi lisätä rajoitusta kahden ulkoisen geometrian välillä. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Valitse luonnoksen reuna. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Mahdoton rajoite - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Kaksinkertainen rajoite - - - - - + + + + + The selected edge already has a horizontal constraint! Valitulla reunalla on jo vaakasuuntainen rajoite! - - - + + + The selected edge already has a vertical constraint! Valitulla reunalla on jo pystysuuntainen rajoite! - - - - - - + + + + + + The selected edge already has a Block constraint! Valitulla reunalla on jo lohkon rajoitus! - + The selected item(s) can't accept a horizontal constraint! Valitut kohteet eivät voi hyväksyä vaakasuoraa rajoitetta! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Valittuja pisteitä on enemmän kuin yksi. Valitse enintään yksi kiinteä piste! - + The selected item(s) can't accept a vertical constraint! Valitut kohteet eivät voi hyväksyä pystysuoraa rajoitetta! - - - + + + Select vertices from the sketch. Valitse kärkipisteet luonnoksesta. - + Select one vertex from the sketch other than the origin. Valitse luonnoksesta yksi muu piste kuin origo. - + Select only vertices from the sketch. The last selected vertex may be the origin. Valitse kärkipisteitä vain luonnoksesta. Viimeksi valittu piste saattaa olla origo. - + Wrong solver status Väärä ratkaisualgoritmin tila - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Lohkon rajoitusta ei voida lisätä, jos luonnos on ratkaisematon tai on olemassa tarpeettomia ja ristiriitaisia rajoituksia. - + Select one edge from the sketch. Valitse yksi reuna luonnoksesta. - + Select only edges from the sketch. Valitse vain reunoja luonnoksesta. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Virhe - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Valitun sijasta käytettiin tangentiaalisuutta päätepisteestä päätepisteeseen. - + Select two or more points from the sketch. Valitse kaksi tai useampia pisteitä luonnoksesta. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Valitse täsmälleen yksi viiva tai yksi piste ja yksi viiva tai kaksi pistettä sketsistä. - + Cannot add a length constraint on an axis! Akselille ei voida lisätä pituusrajoitetta! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Valitse oikeat asiat luonnoksesta. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Yksikään valituista pisteistä ei rajoittunut vastaaviin käyriin, joko koska ne ovat saman elementin osia, tai koska ne ovat molemmat ulkoisia geometrioita, tai reuna ei ole tukikelpoinen. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Yksikään valituista pisteistä ei rajoittunut vastaaviin käyriin, joko koska ne ovat saman elementin osia, tai koska ne ovat molemmat ulkoisia geometrioita. - - - - + + + + Select exactly one line or up to two points from the sketch. Valitse täsmälleen yksi viiva tai enintään kaksi pistettä sketsistä. - + Cannot add a horizontal length constraint on an axis! Akselille ei voida lisätä vaakasuoraa pituusrajoitetta! - + Cannot add a fixed x-coordinate constraint on the origin point! Alkupisteeseen ei voi lisätä kiinteää x-koordinaattirajoitetta! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Akselille ei voida lisätä vaakapituusrajoitetta! - + Cannot add a fixed y-coordinate constraint on the origin point! Alkupisteeseen ei voi lisätä kiinteää y-koordinaattirajoitetta! - + Select two or more lines from the sketch. Valitse kaksi tai useampi viiva sketsistä. - - + + Select at least two lines from the sketch. Valitse vähintään kaksi viivaa sketsistä. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2914,42 +2915,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päätepistettä; kaksi käyrää ja piste. - + Select some geometry from the sketch. perpendicular constraint Valitse jokin geometria luonnoksesta. - - + + Cannot add a perpendicularity constraint at an unconnected point! Yhdistämättömille pisteille ei voida lisätä samansuuntausuusrajoitetta! - - - + + + Perpendicular to B-spline edge currently unsupported. Ohjelma ei tällä hetkellä vielä tue kohtisuoruutta B-splinin reunan kanssa. - - + + One of the selected edges should be a line. Yhden valituista reunoista pitäisi olla viiva. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Luotu päästä päähän -tangentti. Sattumarajoitus on poistettu. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2959,277 +2960,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päätepistettä; kaksi käyrää ja piste. - + Select some geometry from the sketch. tangent constraint Valitse jokin geometria luonnoksesta. - - - + + + Cannot add a tangency constraint at an unconnected point! Yhdistämättömään pisteeseen ei voi lisätä samansuuntaisuusrajoitetta! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Väärä lukumäärä valittuja kohteita! - - + + With 3 objects, there must be 2 curves and 1 point. 3 kohteella on oltava 2 käyrää ja 1 piste. - - - + + + Tangency to B-spline edge currently unsupported. Ohjelma ei tällä hetkellä vielä tue tangentiaalisuutta B-splinin reunan kanssa. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Valitse yksi tai userampia kaaria tai ympyröitä luonnoksesta. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Valitse luonnoksesta yksi tai useampi B-Splinien napa, tai yksi tai useampi kaari tai ympyrä, mutta ei molempien ryhmien sekamuotoa. - - - + + + Constraint only applies to arcs or circles. Rajoite sopii vain kaarille tai ympyröille. - - + + Select one or two lines from the sketch. Or select two edges and a point. Valitse yksi tai useampi viiva luonnoksesta. Tai valitse kaksi reunaa ja piste. - - + + Parallel lines Samansuuntaiset viivat - - + + An angle constraint cannot be set for two parallel lines. Kulma-rajoitusta ei voi määrittää kahdelle samansuuntaiselle viivalle. - + Cannot add an angle constraint on an axis! Akseliin ei voi lisätä kulmarajoitetta! - + Select two edges from the sketch. Valitse kaksi reunaa sketsistä. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Ohjelma ei tällä hetkellä vielä tue yhtäsuuruutta B-splinin reunan kanssa. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Valitse kaksi pistettä ja symmetria linja, kaksi pistettä ja symmetria kohta, tai linja ja symmetriakohta luonnoksesta. - - + + Cannot add a symmetry constraint between a line and its end points. Ei voida lisätä symmetristä rajoitusta viivan ja sen päätepisteiden väliin. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Viivan ja sen päätepisteiden välille ei voi lisätä symmetriarajoitetta! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Valitse kaksi viivojen päätepistettä säteinä toimimaan sekä reuna kuvaamaan rajaa. Ensimmäinen valittu piste vastaa indeksiä n1, toinen - n2 ja viitearvo määrittää suhteen n2/n1. - + Selected objects are not just geometry from one sketch. Valitut kohteet eivät ole vain yhden luonnoksen geometriaa. - + Cannot create constraint with external geometry only. Rajoitetta ei voi luoda vain ulkoista geometriaa käyttämällä. - + Incompatible geometry is selected. Valittuna on epäyhteensopivaa geometriaa. - + SnellsLaw on B-spline edge is currently unsupported. Ohjelma ei tällä hetkellä vielä tue Snellin lakia B-splinin reunan kanssa. - - - - - + + + + + Select constraints from the sketch. Valitse rajoitteet luonnoksesta. - - - + + + Select constraint(s) from the sketch. Valitse rajoitteet luonnoksesta. - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error CAD-ytimen virhe - + None of the selected elements is an edge. Mikään valituista elementeistä ei ole reuna. - - + + At least one of the selected objects was not a B-Spline and was ignored. Vähintään yksi valituista objekteista ei ollut B-splini ja jätettiin huomiotta. - - + + The selection comprises more than one item. Please select just one knot. Valinnassa on useampi kuin yksi kohde. Valitse vain yksi solmu. - - + + Input Error Virhe syötetyissä tiedoissa - - + + None of the selected elements is a knot of a B-spline Mikään valituista elementeistä ei ole B-splinin solmu - - + + Selection is empty Valinta on tyhjä - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3309,17 +3310,17 @@ Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päät It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3633,12 +3634,12 @@ Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päät Pituus: - + Refractive index ratio Taitekerroin suhdeluku - + Ratio n2/n1: Suhde n2/n1: @@ -3918,8 +3919,8 @@ Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päät SketcherGui::PropertyConstraintListItem - - + + Unnamed Nimetön @@ -4153,13 +4154,13 @@ Vaatii syöttämään uudelleen muokkaustilan tullakseen voimaan. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4180,32 +4181,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Molemmat - + Auto Automaattinen - + Diameter Halkaisija - + Radius Säde @@ -4654,12 +4655,12 @@ Then objects are only visible behind the sketch plane. Apply to existing sketches - + Unexpected C++ exception Odottamaton C++-poikkeus - + Sketcher Luonnostelija @@ -4667,55 +4668,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Ei puuttuvia yhteensattumia - + No missing coincidences found Ei puuttuvia yhteensattumia löydettävissä - + Missing coincidences Puuttuvat yhteensattumia - + %1 missing coincidences found %1 puuttuvia yhteensattumia löytyi - + No invalid constraints Virheellinen rajoitukset - + No invalid constraints found Ei ole löytynyt virheellisiä rajoituksia - + Invalid constraints Epäkelpoja rajoituksia - + Invalid constraints found Virheellisiä rajoituksia löytyi - - - + + + Reversed external geometry Käänteinen ulkoinen geometria - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4728,7 +4729,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Click "Swap endpoints in constraints" button to reassign endpoints. Do this only once to sketches created in FreeCAD older than v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4737,75 +4738,70 @@ However, no constraints linking to the endpoints were found. Kuitenkaan ei ole löytynyt rajoitteita, jotka liittyisivät päätepisteisiin. - + No reversed external-geometry arcs were found. Ei löytynyt käänteisiä ulkoisen geometrian kaaria. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 muutoksia tehtiin rajoitteisiin, jotka liittyvät käänteisiin ulkoisen geometrian kaariin. - - + + Constraint orientation locking rajoitteen suunnan lukitus - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. - - + + Delete constraints to external geom. Poista rajoitteet ulkoiseen geometriaan. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Olet aikeissa poistaa kaikki rajoitteet, jotka koskevat ulkoista geometriaa. Tästä on hyötyä, jos aiot pelastaa luonnoksen, jossa on rikkoutunut tai muuttunut linkki ulkoiseen geometriaan. Oletko varma, että haluat poistaa rajoitteet? - + All constraints that deal with external geometry were deleted. Kaikki ulkoista geometriaa koskevat rajoitteet poistettiin. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - Lomake - Check to toggle filters @@ -4880,11 +4876,6 @@ Kuitenkaan ei ole löytynyt rajoitteita, jotka liittyisivät päätepisteisiin.< SketcherGui::TaskSketcherElements - - - Form - Lomake - Check to toggle filters @@ -5070,7 +5061,7 @@ Kuitenkaan ei ole löytynyt rajoitteita, jotka liittyisivät päätepisteisiin.< SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Kehittynyt ratkaisijan ohjaus @@ -5361,8 +5352,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Vaihtaa kaikkien B-splinien kaarevuuskamman näkyvyyden päälle tai pois @@ -5370,8 +5361,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Vähentää B-splinin valitun solmun moninkertaisuusarvoa @@ -5379,8 +5370,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Vaihtaa kaikkien B-splinien asteen näkyvyyden päälle tai pois @@ -5388,8 +5379,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Lisää B-splinin valitun solmun moninkertaisuusarvoa @@ -5397,8 +5388,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Vaihtaa kaikkien B-splinien solmujen moninkertaisuusarvojen näkyvyyden päälle tai pois @@ -5406,8 +5397,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Vaihtaa kaikkien B-splinien solmujen painokertoimien arvojen näkyvyyden päälle tai pois @@ -5415,8 +5406,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Vaihtaa kaikkien B-splinien hallintamonikulmion näkyvyyden päälle tai pois @@ -5451,8 +5442,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Kiinnitä ympyrän tai kaaren halkaisija @@ -5460,7 +5451,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5468,8 +5459,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Korjaa ympyrän tai kaaren sädettä @@ -5477,7 +5468,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5494,8 +5485,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Luoda kaari sen loppupisteistä ja kaarella olevasta pisteestä @@ -5503,8 +5494,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Luo ympyrä kehän 3:sta pisteestä @@ -5512,8 +5503,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Luo kaari sen keskipisteellä ja sen loppupisteillä @@ -5521,8 +5512,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Luo ellipsin kaari keskipisteellä, suurella säteellä, päätepisteillä @@ -5530,8 +5521,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Luo hyperbolin kaari sen keskipisteellä, pääsäteellä ja päätepisteillä @@ -5539,8 +5530,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Luo paraabelin kaari polttopisteen, huipun ja päätepisteiden perusteella @@ -5548,13 +5539,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-splini ohjauspisteillä - - + + Create a B-spline by control points Luo B-splini ohjauspisteillä @@ -5562,8 +5553,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Luoda ympyrä sen keskipisteellä ja kehän pisteellä @@ -5571,8 +5562,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Luo ellipsi kauimmalla pisteellä, lähimmällä pisteellä ja pienellä säteellä @@ -5580,8 +5571,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Luo ellipsi keskipisteellä, suurella säteellä ja pisteellä @@ -5589,8 +5580,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Luo säteen kahden linjan välillä @@ -5598,8 +5589,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Luo seitsenkulmio keskipisteellä ja yhdellä kulmalla @@ -5607,8 +5598,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Luo kuusikulmio keskipisteellä ja yhdellä kulmalla @@ -5616,7 +5607,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Create a rounded rectangle @@ -5624,14 +5615,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Luo kahdeksankulmio keskipisteellä ja yhdellä kulmalla - - + + Create a regular polygon by its center and by one corner Luo säännöllinen monikulmio sen keskikohdan ja yhden kulman mukaan @@ -5639,8 +5630,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Luo viisikulmio keskipisteellä ja yhdellä kulmalla @@ -5648,8 +5639,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Kaistale, joka säilyttää rajoitteet ja risteyspisteen @@ -5657,7 +5648,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Create a rectangle @@ -5665,7 +5656,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Create a centered rectangle @@ -5673,8 +5664,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Luo neliö keskipisteellä ja yhdellä kulmalla @@ -5682,8 +5673,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Luo tasasivuinen kolmio keskipisteellä ja yhdellä kulmalla @@ -5691,13 +5682,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Jaksollinen B-splini ohjauspisteillä - - + + Create a periodic B-spline by control points Luo jaksollinen B-splini ohjauspisteillä @@ -6331,36 +6322,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Virhe @@ -6380,45 +6371,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6428,18 +6419,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Virhe luotaessa B-splinin napaa - - + + Error creating B-spline Virhe luotaessa B-spliniä - + Error deleting last pole Error deleting last pole @@ -6449,49 +6440,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6501,7 +6492,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6511,27 +6502,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6541,13 +6532,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6555,13 +6546,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6667,12 +6658,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6680,12 +6671,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6693,12 +6684,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Mitta - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6710,14 +6701,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Mitta + + + + Dimension tools. + Dimension tools. + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fil.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fil.ts index 0e6ab84590..1c4a12e0fe 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fil.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fil.ts @@ -301,7 +301,7 @@ Rectangle - + Taluhaba @@ -5625,7 +5625,7 @@ Select the method to attach this sketch to selected objects. Sketch with a support face cannot be reoriented. Do you want to detach it from the support? - Ang sketch ay may suporta ng face ay hindi pwedeng i-reorient. + Ang sketch ay may suporta ng face ay hindi pwedeng i-reorient. Gusto mo bang tanggalin ito mula sa suporta?
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts index e39b04992d..643cadce62 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts @@ -50,7 +50,7 @@ Switches between showing and hiding the control point weight for all B-splines - Bascule entre afficher et masquer le poids du point de contrôle pour toutes les B-splines + Permet d'afficher ou de masquer le poids du point de contrôle pour toutes les B-splines
@@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Créer une copie carbone - + Copy the geometry of another sketch Copier la géométrie d’une autre esquisse @@ -100,27 +100,27 @@ Afficher/masquer le calque d’information de la B-spline - + Show/hide B-spline degree Afficher/masquer le degré de la B-spline - + Show/hide B-spline control polygon Afficher/masquer le polygone de contrôle de la B-spline - + Show/hide B-spline curvature comb Afficher/masquer le peigne de courbure de la B-spline - + Show/hide B-spline knot multiplicity Afficher/masquer la multiplicité du nœud de la B-spline - + Show/hide B-spline control point weight Afficher/masquer le poids du point de contrôle de la B-spline @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Contrainte d'arc ou de cercle - + Constrain an arc or a circle Contraindre un arc ou un cercle - + Constrain radius Contrainte de rayon - + Constrain diameter Contrainte de diamètre - + Constrain auto radius/diameter Contrainte automatique rayon/diamètre @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Créer un arc - + Create an arc in the sketcher Créer un arc de cercle dans l'esquisse - + Center and end points Centre et points d'extrémité - + End points and rim point Points d'extrémité et point sur périmètre @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Créer une B-spline - + Create a B-spline in the sketch Créer une B-spline dans l’esquisse @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Créer un cercle - + Create a circle in the sketcher Créer un cercle dans l'esquisse - + Center and rim point Cercle par le centre et un point du bord - + 3 rim points Cercle par 3 points @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Créer une conique - + Create a conic in the sketch Créer une conique dans l’esquisse - + Ellipse by center, major radius, point Ellipse par centre, demi-grand axe, point - + Ellipse by periapsis, apoapsis, minor radius Ellipse par périapse, apoapse, petit axe - + Arc of ellipse by center, major radius, endpoints Arc d'ellipse par centre, demi-grand axe, extrémités - + Arc of hyperbola by center, major radius, endpoints Arc d'hyperbole par centre, axe focal, extrémités - + Arc of parabola by focus, vertex, endpoints Arc de parabole par foyer, sommet, points d'extrémités @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Créer un congé - + Create a fillet between two lines Créer un congé entre deux lignes - + Sketch fillet Congé d'esquisse - + Constraint-preserving sketch fillet Congé d'esquisse préservant les contraintes @@ -299,17 +299,17 @@ Créer un rectangle dans l'esquisse - + Rectangle Rectangle - + Centered rectangle Rectangle centré - + Rounded rectangle Rectangle arrondi @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Créer un polygone régulier - + Create a regular polygon in the sketcher Créer un polygone régulier dans l'esquisse - + Triangle Triangle - + Square Carré - + Pentagon Pentagone - + Hexagon Hexagone - + Heptagon Heptagone - + Octagon Octogone - + Regular polygon Polygone régulier @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modifier la multiplicité de nœud - + Modifies the multiplicity of the selected knot of a B-spline Modifie la multiplicité du nœud sélectionné d’une B-spline - + Increase knot multiplicity Augmenter la multiplicité de nœud - + Decrease knot multiplicity Diminuer la multiplicité de nœud @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Contrainte angulaire - + Fix the angle of a line or the angle between two lines Fixer l'angle d'une ligne ou l'angle entre deux lignes @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block - Contrainte de blocage + Contraindre un blocage - + Block the selected edge from moving Bloquer le déplacement de l'arête sélectionnée @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Contrainte coïncidente - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Créer une contrainte de coïncidence entre les points, ou une contrainte concentrique entre les cercles, les arcs et les ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Contrainte de diamètre - + Fix the diameter of a circle or an arc Fixer le diamètre d'un cercle ou d'un arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Contrainte dimensionnelle - + Fix a length of a line or the distance between a line and a vertex or between two circles Fixer la longueur d'une ligne ou la distance entre une ligne et un sommet ou entre deux cercles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Contrainte de distance horizontale - + Fix the horizontal distance between two points or line ends Fixer la distance horizontale entre deux points ou extrémités de ligne @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Contrainte de distance verticale - + Fix the vertical distance between two points or line ends Fixer la distance verticale entre deux points ou extrémités de ligne @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Contrainte d'égalité - + Create an equality constraint between two lines or between circles and arcs Créer une contrainte d'égalité entre deux lignes ou entre des cercles et/ou des arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Contrainte horizontale - + Create a horizontal constraint on the selected item Créer une contrainte horizontale sur l'élément sélectionné @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Contrainte fixe - + Create both a horizontal and a vertical distance constraint on the selected vertex Créer deux contraintes de distance (horizontale et verticale) sur le sommet sélectionné @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Contrainte parallèle - + Create a parallel constraint between two lines Créer une contrainte parallèle entre deux lignes @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Contrainte perpendiculaire - + Create a perpendicular constraint between two lines Créer une contrainte de perpendicularité entre deux lignes @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Contrainte point sur objet - + Fix a point onto an object Fixer un point sur un objet @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Contrainte automatique rayon/diamètre - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fixer le diamètre si l'on choisit un cercle ou le rayon si l'on choisit un arc ou un pôle de spline @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Contrainte de rayon ou de poids - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fixe le rayon d’un cercle ou d’un arc ou fixe le poids d’un pôle d’une B-Spline @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Contrainte de réfraction (loi de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crée une contrainte de réfraction (loi de Snell) entre deux extrémités de lignes et une arête en tant qu'interface. @@ -598,12 +598,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Contrainte symétrique - + Create a symmetry constraint between two points with respect to a line or a third point Crée une contrainte de symétrie entre deux points par rapport à une ligne ou un point @@ -612,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Contrainte tangente - + Create a tangent constraint between two entities Créer une contrainte tangente entre deux entités @@ -625,12 +625,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Contrainte verticale - + Create a vertical constraint on the selected item Créer une contrainte verticale sur l'élément sélectionné @@ -638,12 +638,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convertir la géométrie en B-spline - + Converts the selected geometry to a B-spline Convertit la géométrie sélectionnée en B-spline @@ -664,12 +664,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Créer un arc par 3 points - + Create an arc by its end points and a point along the arc Créer un arc par ses extrémités et un point sur l'arc @@ -677,12 +677,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Créer un cercle par trois points - + Create a circle by 3 perimeter points Crée un cercle par 3 points @@ -690,12 +690,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Créer un arc à partir du centre - + Create an arc by its center and by its end points Créer un arc par son centre et ses extrémités @@ -703,12 +703,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Créer un arc d'ellipse - + Create an arc of ellipse in the sketch Créer un arc d'ellipse dans l'esquisse @@ -716,12 +716,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Créer un arc d'hyperbole - + Create an arc of hyperbola in the sketch Créer un arc d’hyperbole dans l’esquisse @@ -729,12 +729,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Créer un arc de parabole - + Create an arc of parabola in the sketch Créer un arc de parabole dans l'esquisse @@ -742,12 +742,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Créer une B-spline - + Create a B-spline by control points in the sketch. Créer une B-spline par des points de contrôle dans l'esquisse. @@ -755,12 +755,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Créer un cercle - + Create a circle in the sketch Créer un cercle dans l'esquisse @@ -768,12 +768,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Créer une ellipse via 3 points - + Create an ellipse by 3 points in the sketch Créer une ellipse via 3 points dans l'esquisse @@ -781,12 +781,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Créer une ellipse par son centre - + Create an ellipse by center in the sketch Créer une ellipse par son centre dans l'esquisse @@ -794,12 +794,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Créer un congé - + Create a fillet between two lines or at a coincident point Créer un congé entre deux lignes ou un sur un sommet coïncident @@ -807,12 +807,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Créer un heptagone - + Create a heptagon in the sketch Créer un heptagone dans l'esquisse @@ -820,12 +820,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Créer un hexagone - + Create a hexagon in the sketch Créer un hexagone dans l'esquisse @@ -859,12 +859,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Créer un octogone - + Create an octagon in the sketch Créer un octogone dans l'esquisse @@ -872,12 +872,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Créer un pentagone - + Create a pentagon in the sketch Créer un pentagone dans l'esquisse @@ -885,12 +885,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Créer une B-spline périodique - + Create a periodic B-spline by control points in the sketch. Créer une B-spline périodique par des points de contrôle dans l'esquisse. @@ -898,12 +898,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Créer un point - + Create a point in the sketch Créer un point dans l'esquisse @@ -911,12 +911,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Créer un congé conservant l'angle - + Fillet that preserves intersection point and most constraints Congé qui préserve le point d'intersection et la plupart des contraintes @@ -924,12 +924,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Créer une polyligne - + Create a polyline in the sketch. 'M' Key cycles behaviour Créer une polyligne dans l'esquisse. La touche "M" fait basculer entre les modes disponibles. @@ -963,12 +963,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Créer un polygone régulier - + Create a regular polygon in the sketch Créer un polygone régulier dans l'esquisse @@ -976,12 +976,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Créer un contour oblong - + Create a slot in the sketch Créer un contour oblong dans l'esquisse @@ -989,12 +989,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Créer un carré - + Create a square in the sketch Créer un carré dans l'esquisse @@ -1002,12 +1002,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Créer un triangle équilatéral - + Create an equilateral triangle in the sketch Créer un triangle équilatéral dans l'esquisse @@ -1015,12 +1015,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Diminuer le degré de la B-spline - + Decreases the degree of the B-spline Diminue le degré de la B-spline @@ -1028,12 +1028,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Diminuer la multiplicité de nœud - + Decreases the multiplicity of the selected knot of a B-spline Diminue la multiplicité du nœud sélectionné d’une B-spline @@ -1080,12 +1080,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Prolonger l'arête - + Extend an edge with respect to the picked position Prolonger une arête par rapport à la position sélectionnée @@ -1093,12 +1093,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Créer une géométrie externe - + Create an edge linked to an external geometry Créer une arête liée à une géométrie externe. @@ -1106,12 +1106,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Augmenter le degré de la B-spline - + Increases the degree of the B-spline Augmenter le degré de la B-spline @@ -1119,12 +1119,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Augmenter la multiplicité de nœud - + Increases the multiplicity of the selected knot of a B-spline Augmente la multiplicité du nœud sélectionné d’une B-spline @@ -1132,12 +1132,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Insérer un noeud - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Insérer un noeud au paramètre donné. Si un noeud existe déjà à ce paramètre, sa multiplicité est augmentée de un. @@ -1145,12 +1145,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Joindre des courbes - + Join two curves at selected end points Joindre deux courbes par les extrémités sélectionnées @@ -1435,12 +1435,12 @@ Cela effacera la propriété 'Support', le cas échéant. CmdSketcherSplit - + Split edge Diviser une arête - + Splits an edge into two while preserving constraints Diviser une arête en deux tout en préservant les contraintes @@ -1461,12 +1461,12 @@ Cela effacera la propriété 'Support', le cas échéant. CmdSketcherSwitchVirtualSpace - + Switch virtual space Basculer vers/de l'espace virtuel - + Switches the selected constraints or the view to the other virtual space Bascule les contraintes sélectionnées ou la vue vers/depuis l'espace virtuel @@ -1487,12 +1487,12 @@ Cela effacera la propriété 'Support', le cas échéant. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activer/désactiver la contrainte - + Activates or deactivates the selected constraints Active ou désactive les contraintes sélectionnées @@ -1513,12 +1513,12 @@ Cela effacera la propriété 'Support', le cas échéant. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Basculer les contraintes pilotantes/pilotées - + Set the toolbar, or the selected constraints, into driving or reference mode Basculer la barre d'outils, ou les contraintes sélectionnées, @@ -1528,12 +1528,12 @@ en mode pilotant ou piloté CmdSketcherTrimming - + Trim edge Ajuster l'arête - + Trim an edge with respect to the picked position Ajuster une arête par rapport à la position sélectionnée. @@ -1592,369 +1592,370 @@ les contraintes invalides, les géométries dégénérées, etc. Command - - + + Add horizontal constraint Ajouter une contrainte horizontale - - - + + + Add horizontal alignment Ajouter un alignement horizontal - - + + Add vertical constraint Ajouter une contrainte verticale - + Add vertical alignment Ajouter un alignement vertical - + Add 'Lock' constraint Ajouter la contrainte 'Verrouiller' - + Add relative 'Lock' constraint Ajouter une contrainte "fixe" relative - + Add fixed constraint Ajouter une contrainte fixe - + Add 'Block' constraint - Ajouter une contrainte 'Bloquer' + Ajouter une contrainte de blocage - + Add block constraint Ajouter une contrainte de blocage - - - + + + Add coincident constraint Ajouter une contrainte de coïncidence - - + + Add distance from horizontal axis constraint Ajouter une contrainte de distance par rapport à l'axe horizontal - - + + Add distance from vertical axis constraint Ajouter une contrainte de distance par rapport à l'axe vertical - - + + Add point to point distance constraint Ajouter une contrainte de distance entre points - - - + + + Add point to line Distance constraint Ajouter une contrainte de distance point à ligne - - + + Add circle to circle distance constraint Ajouter une contrainte de distance entre les cercles - + Add circle to line distance constraint Ajouter une contrainte de distance entre les cercles - - - - - + + + + + + Add length constraint Ajouter une contrainte de longueur - - + + Dimension Dimension - + Add lock constraint - Add lock constraint + Ajouter une contrainte de verrouillage - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Ajouter la contrainte 'Distance à l'origine' - - - + + + Add Distance constraint - Add Distance constraint + Ajouter une contrainte de distance - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Ajouter des contraintes "horizontales" - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Ajouter des contraintes "verticales" + + Add Symmetry constraint + Ajouter une contrainte de symétrie + + + + + Add Symmetry constraints + Ajouter des contraintes de symétrie + + + + + Add Distance constraints + Ajouter des contraintes de distance + + + + Add Horizontal constraint + Ajouter une contrainte horizontale + + + + Add Vertical constraint + Ajouter une contrainte verticale + + + Add Block constraint - Add Block constraint + Ajouter une contrainte de blocage - + Add Angle constraint - Add Angle constraint + Ajouter une contrainte d'angle - - - + + + Add Equality constraint - Add Equality constraint + Ajouter une contrainte d'égalité - + Add Equality constraints - Add Equality constraints + Ajouter des contraintes d'égalité - + Add Radius constraint - Add Radius constraint + Ajouter une contrainte de rayon - + Add concentric and length constraint - Add concentric and length constraint + Ajouter une contrainte concentrique et de longueur - + Add DistanceX constraint - Add DistanceX constraint + Ajouter une contrainte de distance en X - + Add DistanceY constraint - Add DistanceY constraint + Ajouter une contrainte de distance en Y - + Add point to circle Distance constraint - Add point to circle Distance constraint + Ajouter une contrainte de distance d'un point à un cercle - - + + Add point on object constraint Ajouter une contrainte point sur objet - - + + Add point to point horizontal distance constraint Ajouter une contrainte de distance horizontale point à point - + Add fixed x-coordinate constraint Ajouter une contrainte fixe de coordonnée X - - + + Add point to point vertical distance constraint Ajouter une contrainte de distance verticale point à point - + Add fixed y-coordinate constraint Ajouter une contrainte fixe de coordonnée Y - - + + Add parallel constraint Ajouter une contrainte parallèle - - - - - - - + + + + + + + Add perpendicular constraint Ajouter une contrainte perpendiculaire - + Add perpendicularity constraint Ajouter une contrainte de perpendicularité - + Swap coincident+tangency with ptp tangency Permuter coincidence+tangence avec une tangente sommet/sommet - + Swap PointOnObject+tangency with point to curve tangency Échanger Point sur objet + tangence pour Point à courbe + tangence - - - - - - - + + + + + + + Add tangent constraint Ajouter une contrainte de tangence - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Ajouter un point de contrainte de tangence - - - - + + + + Add radius constraint Contraindre le rayon - - - - + + + + Add diameter constraint Contraindre le diamètre - - - - + + + + Add radiam constraint Ajouter une contrainte de rayon/diamètre - - - - - - + + + + + + Add angle constraint Ajouter une contrainte d'angle - - + + Add equality constraint Ajouter une contrainte d'égalité - - - - - + + + + + Add symmetric constraint Ajouter une contrainte de symétrie - + Add Snell's law constraint Ajouter une contrainte de loi de Snell - + Toggle constraint to driving/reference Basculer les contraintes pilotantes/pilotées - + Activate/Deactivate constraint Activer/désactiver la contrainte @@ -2014,44 +2015,44 @@ les contraintes invalides, les géométries dégénérées, etc. Ajout d'un rectanlge centré à l'esquisse - + Add rounded rectangle Ajouter un rectangle arrondi - + Add line to sketch wire Ajouter une ligne au fil d’esquisse - + Add arc to sketch wire Ajouter un arc au fil d’esquisse - - + + Add sketch arc Ajouter un arc à l'esquisse - - + + Add sketch circle Ajouter un arc à l'esquisse - + Add sketch ellipse Ajouter une ellipse à l’esquisse - + Add sketch arc of ellipse Ajouter un arc d'ellipse à l'esquisse - + Add sketch arc of hyperbola Ajouter un arc d'hyperbole à l'esquisse @@ -2071,33 +2072,33 @@ les contraintes invalides, les géométries dégénérées, etc. Ajouter un point à l'esquisse - - + + Create fillet Créer un congé - + Trim edge Ajuster l'arête - + Extend edge Prolonger l'arête - + Split edge Diviser une arête - + Add external geometry Ajouter une géométrie externe - + Add slot Ajouter un contour oblong @@ -2107,37 +2108,37 @@ les contraintes invalides, les géométries dégénérées, etc. Ajouter un hexagone - + Convert to NURBS Convertir en NURBS - + Increase spline degree Augmenter le degré de la B-spline - + Decrease spline degree Diminuer le degré de la B-spline - + Increase knot multiplicity Augmenter la multiplicité de nœud - + Decrease knot multiplicity Diminuer la multiplicité de nœud - + Insert knot Insérer un noeud - + Join Curves Joindre des courbes @@ -2177,12 +2178,12 @@ les contraintes invalides, les géométries dégénérées, etc. Supprimer l'alignement des axes - + Toggle constraints to the other virtual space Basculer les contraintes vers l'autre espace virtuel - + @@ -2190,7 +2191,7 @@ les contraintes invalides, les géométries dégénérées, etc. Mettre à jour l'espace virtuel de la contrainte - + Add auto constraints Ajouter des contraintes automatiques @@ -2230,7 +2231,7 @@ les contraintes invalides, les géométries dégénérées, etc. Ajouter un point de nœud - + Create a carbon copy Créer une copie carbone @@ -2246,37 +2247,37 @@ les contraintes invalides, les géométries dégénérées, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Erreur de contrainte automatique : esquisse insoluble lors de l'application des contraintes de coïncidence. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Erreur de contrainte automatique : esquisse insoluble lors de l'application des contraintes verticales ou horizontales. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Erreur de contrainte automatique : esquisse insoluble lors de l'application des contraintes d'égalité. - + Autoconstrain error: Unsolvable sketch without constraints. Erreur de contrainte automatique : esquisse insoluble sans contraintes. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Erreur de contrainte automatique : esquisse insoluble après l'application des contraintes verticales et horizontales. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Erreur de contrainte automatique : esquisse insoluble après l’application de contraintes point-à-point. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Erreur de contrainte automatique : esquisse insoluble après l'application des contraintes d'égalité. @@ -2401,143 +2402,143 @@ les contraintes invalides, les géométries dégénérées, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2553,9 +2554,9 @@ les contraintes invalides, les géométries dégénérées, etc. - - - + + + Wrong selection Sélection invalide @@ -2576,329 +2577,329 @@ les contraintes invalides, les géométries dégénérées, etc. Contrainte dimensionnelle - + Cannot add a constraint between two external geometries. Impossible d'ajouter une contrainte entre deux géométries externes. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Impossible d'ajouter une contrainte entre deux géométries fixes. Les géométries fixes comprennent la géométrie externe, la géométrie bloquée et les points spéciaux tels que les points de nœuds des B-splines. - + Sketcher Constraint Substitution Substitution de contraintes d'esquisse - + Keep notifying me of constraint substitutions Continuer à me notifier des substitutions de contraintes - - - + + + Only sketch and its support are allowed to be selected. Seule l'esquisse et son support peuvent être sélectionnés. - + One of the selected has to be on the sketch. Une des sélections doit être sur l'esquisse. - - + + Select an edge from the sketch. Sélectionnez une arête de l'esquisse. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Contrainte impossible - - - - + + + + The selected edge is not a line segment. L'arête sélectionnée n'est pas un segment de ligne. - - - - - - + + + + + + Double constraint Double contrainte - - - - - + + + + + The selected edge already has a horizontal constraint! L’arête sélectionnée possède déjà une contrainte horizontale ! - - - + + + The selected edge already has a vertical constraint! L’arête sélectionnée possède déjà une contrainte verticale ! - - - - - - + + + + + + The selected edge already has a Block constraint! L’arête sélectionnée possède déjà une contrainte de blocage ! - + The selected item(s) can't accept a horizontal constraint! Le(s) élément(s) sélectionné(s) ne peu(ven)t pas accepter de contrainte horizontale! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Plus d'un point fixe est sélectionné. Sélectionner au maximum un point fixe ! - + The selected item(s) can't accept a vertical constraint! Le(s) élément(s) sélectionné(s) ne peu(ven)t pas accepter de contrainte verticale! - - - + + + Select vertices from the sketch. Sélectionner des sommets de l’esquisse. - + Select one vertex from the sketch other than the origin. Sélectionner un sommet de l'esquisse autre que l'origine. - + Select only vertices from the sketch. The last selected vertex may be the origin. Sélectionner uniquement les sommets de l'esquisse. Le dernier sommet sélectionné peut être l'origine. - + Wrong solver status Erreur de statut du solveur - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - Un contrainte de type blocage ne peut pas être ajoutée si l'esquisse n'est pas résolue ou s'il y a des contraintes redondantes ou conflictuelles. + Une contrainte de blocage ne peut pas être ajoutée si l'esquisse n'est pas résolue ou s'il y a des contraintes redondantes ou conflictuelles. - + Select one edge from the sketch. Sélectionnez une arête de l’esquisse. - + Select only edges from the sketch. Sélectionnez uniquement des arêtes de l'esquisse. - + Number of selected objects is not 3 Le nombre d'objets sélectionnés n'est pas 3 - - - + + + Error Erreur - + Unexpected error. More information may be available in the Report View. Erreur inattendue. Plus d'informations peuvent être disponibles dans la vue rapport. - + Endpoint to endpoint tangency was applied instead. Une contrainte de tangence entre points d'extrémité a été créée à la place. - + Select two or more points from the sketch. Sélectionner deux ou plusieurs points de l’esquisse. - + Select two or more vertices from the sketch. Sélectionner deux sommets de l'esquisse ou plus. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Sélectionner deux sommets ou plus de l’esquisse pour une contrainte de coïncidence, ou deux ou plusieurs cercles, ellipses, arcs ou arcs d’ellipse pour une contrainte concentrique. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Sélectionner deux sommets de l'esquisse pour une contrainte de coïncidence, ou deux cercles, ellipses, arcs ou arcs d'ellipse pour une contrainte concentrique. - + Select exactly one line or one point and one line or two points from the sketch. Sélectionnez soit une seule ligne, ou un point et une ligne, ou deux points de l'esquisse. - + Cannot add a length constraint on an axis! Impossible d'ajouter une contrainte de longueur sur un axe ! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Sélectionner exactement une ligne ou un point et une ligne ou deux points ou deux cercles de l'esquisse. - + This constraint does not make sense for non-linear curves. Cette contrainte n'a pas de sens pour les courbes non linéaires. - + Endpoint to edge tangency was applied instead. Une tangence entre point d'extrémité et arête a été appliquée à la place. - - - - - - - + + + + + + + Select the right things from the sketch. Sélectionner les bons éléments de l'esquisse. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Sélectionner une arête qui ne représente pas un poids d'une B-Spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Aucun des points sélectionnés n'a été contraint aux courbes respectives, soit parce que ce sont des parties du même élément, soit parce qu'ils sont tous deux de la géométrie externe, soit parce que la ligne n'est pas éligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Aucun des points sélectionnés n'ont été contraints aux courbes respectives, soit parce qu'ils font partie du même élément, soit parce qu'ils font tous partie de géométries externes. - - - - + + + + Select exactly one line or up to two points from the sketch. Sélectionner soit une seule ligne soit jusqu'à deux points de l'esquisse. - + Cannot add a horizontal length constraint on an axis! Impossible d'ajouter une contrainte de longueur horizontale sur un axe ! - + Cannot add a fixed x-coordinate constraint on the origin point! Impossible d'ajouter une contrainte fixe de coordonnée x sur le point d'origine ! - - + + This constraint only makes sense on a line segment or a pair of points. Cette contrainte n’a de sens que sur un segment de ligne ou une paire de points. - + Cannot add a vertical length constraint on an axis! Impossible d'ajouter une contrainte de longueur verticale sur un axe ! - + Cannot add a fixed y-coordinate constraint on the origin point! Impossible d'ajouter une contrainte fixe de coordonnée y sur le point d'origine ! - + Select two or more lines from the sketch. Sélectionnez au moins deux lignes de l'esquisse. - - + + Select at least two lines from the sketch. Sélectionner au moins deux lignes de l'esquisse. - + Select a valid line. Sélectionner une ligne valide. - - + + The selected edge is not a valid line. L'arête sélectionnée n'est pas une ligne valide. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2908,42 +2909,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaisons acceptés : deux courbes ; un point d'extrémité et une courbe ; deux points d'extrémités ; deux courbes et un point. - + Select some geometry from the sketch. perpendicular constraint Sélectionnez une géométrie de l'esquisse. - - + + Cannot add a perpendicularity constraint at an unconnected point! Impossible d'ajouter une contrainte de perpendicularité sur un point non connecté ! - - - + + + Perpendicular to B-spline edge currently unsupported. Contrainte perpendiculaire à arête B-spline actuellement non prise en charge. - - + + One of the selected edges should be a line. Une des arêtes sélectionnées doit être une ligne. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Une contrainte de tangence entre points d'extrémité a été créée. La contrainte de coïncidence a été supprimée. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Une contrainte de tangence entre point d'extrémité et arête a été créée. La contrainte point sur objet a été supprimée. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2953,277 +2954,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaisons acceptés : deux courbes ; un point d'extrémité et une courbe ; deux points d'extrémités ; deux courbes et un point. - + Select some geometry from the sketch. tangent constraint Sélectionnez une géométrie de l'esquisse. - - - + + + Cannot add a tangency constraint at an unconnected point! Impossible d'ajouter une contrainte de tangence à un point non connecté ! - - + + Tangent constraint at B-spline knot is only supported with lines! La contrainte de tangente au nœud de la B-spline n'est pris en charge que par des lignes ! - + B-spline knot to endpoint tangency was applied instead. Le nœud de la B-spline à la tangence du dernier point a été appliqué à la place. - + Select either one point and several curves, or one curve and several points. Sélectionner soit un point et plusieurs courbes, soit une courbe et plusieurs points. - - + + Wrong number of selected objects! Nombre d'objets sélectionnés erroné ! - - + + With 3 objects, there must be 2 curves and 1 point. Pour une sélection de 3 objets, il doit y avoir 2 courbes et 1 point. - - - + + + Tangency to B-spline edge currently unsupported. Tangence à arrête B-spline actuellement non prise en charge. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Sélectionnez un ou plusieurs arcs ou cercles dans l'esquisse. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Sélectionner soit un ou plusieurs pôles B-Spline ou un ou plusieurs arcs ou cercles de l'esquisse, mais pas mélangés. - - - + + + Constraint only applies to arcs or circles. Contrainte applicable qu’aux arcs ou cercles. - - + + Select one or two lines from the sketch. Or select two edges and a point. Sélectionnez une ou deux lignes dans l'esquisse. Ou sélectionnez deux arêtes et un point. - - + + Parallel lines Lignes parallèles - - + + An angle constraint cannot be set for two parallel lines. Une contrainte angulaire ne peut pas être appliquée à deux lignes parallèles. - + Cannot add an angle constraint on an axis! Impossible d'ajouter une contrainte angulaire sur un axe ! - + Select two edges from the sketch. Sélectionnez deux arêtes de l'esquisse. - + Select two or more compatible edges. Sélectionner deux arêtes compatibles ou plus. - + Sketch axes cannot be used in equality constraints. Les axes de l'esquisse ne peuvent pas être utilisés comme des contraintes d'alignement interne. - + Equality for B-spline edge currently unsupported. Égalité pour arête B-Spline actuellement non prise en charge. - - - - + + + + Select two or more edges of similar type. Sélectionner deux arêtes de type similaire ou plus. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Sélectionnez deux points et une ligne de symétrie, deux points et un point de symétrie, ou une ligne et un point de symétrie dans l'esquisse. - - + + Cannot add a symmetry constraint between a line and its end points. Impossible d'ajouter une contrainte de symétrie entre une ligne et ses extrémités. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Impossible d'ajouter une contrainte de symétrie entre une ligne et ses points d'extrémité ! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Sélectionner deux extrémités de lignes pour agir comme des rayons, et une arête qui représente une limite. Le premier point sélectionné correspond à l'indice n1, le deuxième à n2, et la valeur définit la rapport n2/n1. - + Selected objects are not just geometry from one sketch. Les objets sélectionnés ne sont pas seulement des géométries de l'esquisse. - + Cannot create constraint with external geometry only. Impossible de créer une contrainte avec uniquement une géométrie externe. - + Incompatible geometry is selected. La géométrie sélectionnée est incompatible. - + SnellsLaw on B-spline edge is currently unsupported. La loi de Snell sur les arêtes B-spline n'est actuellement pas prise en charge. - - - - - + + + + + Select constraints from the sketch. Sélectionner les contraintes de l'esquisse. - - - + + + Select constraint(s) from the sketch. Sélectionner la/les contrainte(s) de l'esquisse. - + B-Spline Degree Degré de la B-spline - + Define B-Spline Degree, between 1 and %1: Définir le degré de la B-spline, entre 1 et %1 : - - - + + + CAD Kernel Error Erreur du noyau de CAO - + None of the selected elements is an edge. Aucun des éléments sélectionnés n'est une arête. - - + + At least one of the selected objects was not a B-Spline and was ignored. Au moins l’un des objets sélectionnés n’était pas une B-Spline et a été ignoré. - - + + The selection comprises more than one item. Please select just one knot. La sélection comprend plus d'un élément. Veuillez sélectionner un seul nœud. - - + + Input Error Erreur de saisie - - + + None of the selected elements is a knot of a B-spline Aucun des éléments sélectionnés n'est un nœud d’une B-spline - - + + Selection is empty La sélection est vide - + Nothing is selected. Please select a b-spline. Rien n'est sélectionné. Sélectionner une B-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Sélectionner une B-spline pour insérer un nœud (et non un nœud sur celle-ci). Si la courbe n'est pas une B-spline, la convertir d'abord en une B-spline. - + Nothing is selected. Please select end points of curves. Rien n'est sélectionné. Sélectionner les extrémités des courbes. - + Too many curves on point Trop de courbes sur le point - - + + Exactly two curves should end at the selected point to be able to join them. Exactement deux courbes devraient se terminer au point sélectionné pour pouvoir les rejoindre. - + Too few curves on point Trop peu de courbes sur le point - + Two end points, or coincident point should be selected. Il faut sélectionner deux extrémités ou des points de coïncidence. @@ -3303,19 +3304,19 @@ Combinaisons acceptés : deux courbes ; un point d'extrémité et une courbe ; d Il n'est pas possible pour l'instant de déplacer une géométrie externe vers une autre couche visuelle. La géométrie externe sera omise - + Set knot multiplicity Définir la multiplicité du nœud - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Définir la multiplicité du nœud au dernier point fourni, entre 1 et %1. Remarque: la multiplicité peut être ignorée dans certaines circonstances. Voir la documentation pour plus de détails. - + Value Error Erreur de valeur @@ -3423,7 +3424,7 @@ Voir la documentation pour plus de détails. Block - Bloc + Blocage @@ -3458,7 +3459,7 @@ Voir la documentation pour plus de détails. Weight - Épaisseur + Poids @@ -3629,12 +3630,12 @@ Voir la documentation pour plus de détails. Longueur : - + Refractive index ratio Ratio de l'indice de réfraction - + Ratio n2/n1: Ratio n2/n1 : @@ -3914,8 +3915,8 @@ Voir la documentation pour plus de détails. SketcherGui::PropertyConstraintListItem - - + + Unnamed Sans nom @@ -4136,30 +4137,30 @@ Nécessite de rentrer dans le mode édition pour que cela prenne effet. Dimension Constraint - Dimension Constraint + Contrainte dimensionnelle Dimensioning constraints: - Dimensioning constraints: + Contraintes dimensionnantes : Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Sélectionnez le type de contraintes de dimensionnement pour votre barre d'outils : +"Outil unique" : un seul outil pour toutes les contraintes de dimensionnement dans la barre d'outils : Distance, Distance X / Y, Angle, Rayon. (Autres dans la liste déroulante) +"Outils séparés" : outils distincts pour chaque contrainte de dimensionnement. +"Les deux" : vous disposerez à la fois de l'outil "Dimension" et des outils séparés. +Ce paramètre ne concerne que la barre d'outils. Quel que soit votre choix, tous les outils sont toujours disponibles dans le menu et par les raccourcis. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Mode diamètre/rayon de l'outil de dimension : @@ -4167,38 +4168,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Lorsque vous utilisez l'outil Dimension, vous pouvez choisir comment manipuler des cercles et des arcs : +"Automatique" : l'outil appliquera le rayon aux arcs et au diamètre aux cercles. +"'Diamètre" : l'outil appliquera le diamètre à la fois aux arcs et aux cercles. +"Rayon" : l'outil appliquera le rayon aux arcs et aux cercles. - + Single tool - Single tool + Outil unique - + Separated tools - Separated tools + Outils séparés - + Both Les deux - + Auto Auto - + Diameter Diamètre - + Radius Rayon @@ -4646,12 +4647,12 @@ Seuls les objets derrière le plan de l'esquisse sont visibles. Appliquer aux esquisses existantes - + Unexpected C++ exception Exception C++ inattendue - + Sketcher Sketcher @@ -4659,55 +4660,55 @@ Seuls les objets derrière le plan de l'esquisse sont visibles. SketcherGui::SketcherValidation - + No missing coincidences Aucune coïncidence manquante - + No missing coincidences found Aucune coïncidence manquante trouvée - + Missing coincidences Coïncidences manquantes - + %1 missing coincidences found %1 coïncidences manquantes trouvées - + No invalid constraints Aucune contrainte non valide - + No invalid constraints found Aucune contrainte non valide trouvée - + Invalid constraints Contraintes non valides - + Invalid constraints found Contraintes non valides trouvées - - - + + + Reversed external geometry Géométrie externe inversée - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4720,7 +4721,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Cliquez sur le bouton «Inverser les points d'extrémité des contraintes» pour réaffecter ces extrémités. Ne faites ceci qu'une seule fois pour les esquisses créés avec une version de FreeCAD antérieure à 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4729,75 +4730,70 @@ However, no constraints linking to the endpoints were found. Toutefois, aucune contrainte liée aux extrémités n'a été trouvée. - + No reversed external-geometry arcs were found. Aucun arc inversé n'a été trouvé dans la géométrie externe. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 modifications ont été apportées aux contraintes liées aux points d'extrémité des arcs inversés. - - + + Constraint orientation locking Contrainte de verrouillage d'orientation - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Le verrouillage de l'orientation a été activé et recalculé pour %1 contraintes. Ces contraintes sont indiquées dans la Vue rapport (menu Affichage -> Panneaux -> Vue rapport). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Le verrouillage de l'orientation a été désactivé pour %1 contraintes. Ces contraintes sont indiquées dans la vue rapport (menu Affichage -> Panneaux -> Vue rapport). Notez que pour les contraintes futures, le verrouillage par défaut est toujours activé. - - + + Delete constraints to external geom. Supprimer les contraintes liées à une géométrie externe - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Vous êtes sur le point de supprimer toutes les contraintes liées à la géométrie externe. Ceci est utile pour réparer une esquisse avec des liens vers une géométrie externe brisés ou modifiés. Êtes-vous sûr de que vouloir supprimer ces contraintes? - + All constraints that deal with external geometry were deleted. Toutes les contraintes liées à une géométrie externe ont été supprimées. - + No degenerated geometry Aucune géométrie dégénérée - + No degenerated geometry found Aucune géométrie dégénérée trouvée - + Degenerated geometry Géométrie dégénérée - + %1 degenerated geometry found %1 géométrie dégénérée trouvée SketcherGui::TaskSketcherConstraints - - - Form - Forme - Check to toggle filters @@ -4873,11 +4869,6 @@ Toutefois, aucune contrainte liée aux extrémités n'a été trouvée. SketcherGui::TaskSketcherElements - - - Form - Forme - Check to toggle filters @@ -4896,7 +4887,7 @@ Toutefois, aucune contrainte liée aux extrémités n'a été trouvée. Settings - Réglages + Paramètres @@ -5063,7 +5054,7 @@ Toutefois, aucune contrainte liée aux extrémités n'a été trouvée. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Contrôle avancé du solveur @@ -5354,8 +5345,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Bascule entre afficher et masquer le peigne de courbure pour toutes les B-splines @@ -5363,8 +5354,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Diminue la multiplicité du nœud sélectionné d’une B-spline @@ -5372,8 +5363,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Bascule entre afficher et masquer le degré pour tous les B-splines @@ -5381,8 +5372,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Augmente la multiplicité du nœud sélectionné d’une B-spline @@ -5390,8 +5381,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Basculer entre afficher et masquer la multiplicité de nœuds pour toutes les B-splines @@ -5399,17 +5390,17 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines - Bascule entre afficher et masquer le poids du point de contrôle pour toutes les B-splines + Permet d'afficher ou de masquer le poids du point de contrôle pour toutes les B-splines Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Bascule entre afficher et masquer les polygones de contrôle pour toutes les B-splines @@ -5444,8 +5435,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixer le diamètre d'un cercle ou d'un arc @@ -5453,7 +5444,7 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fixer le rayon/diamètre d'un arc ou d'un cercle @@ -5461,8 +5452,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixer le rayon d'un cercle ou d'un arc @@ -5470,7 +5461,7 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fixer le rayon/diamètre d'un arc ou d'un cercle @@ -5487,8 +5478,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Créer un arc par ses extrémités et un point sur l'arc @@ -5496,8 +5487,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Créer un cercle par 3 points @@ -5505,8 +5496,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Créer un arc par son centre et ses extrémités @@ -5514,8 +5505,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Créer un arc d'ellipse par son centre, le grand axe et les extrémités @@ -5523,8 +5514,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Créer un arc d’hyperbole par son centre, son grand axe et ses points d'extrémités @@ -5532,8 +5523,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Créer un arc de parabole par son foyer, son sommet, ses points d'extrémités @@ -5541,13 +5532,13 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateBSpline - + B-spline by control points B-spline par points de contrôle - - + + Create a B-spline by control points Créer une B-spline par points de contrôle @@ -5555,8 +5546,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Créer un cercle par son centre et par un point sur le périmètre @@ -5564,8 +5555,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Créer une ellipse avec le périapse, l'apoapse et le petit rayon @@ -5573,8 +5564,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Créer une ellipse par son centre, le grand rayon et un point @@ -5582,8 +5573,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateFillet - - + + Creates a radius between two lines Créer un congé entre deux lignes @@ -5591,8 +5582,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Créer un heptagone avec son centre et un sommet @@ -5600,8 +5591,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Créer un hexagone avec son centre et un sommet @@ -5609,7 +5600,7 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateOblong - + Create a rounded rectangle Créer un rectangle arrondi @@ -5617,14 +5608,14 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Créer un octogone avec son centre et un sommet - - + + Create a regular polygon by its center and by one corner Créer un polygone régulier par son centre et un sommet @@ -5632,8 +5623,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Créer un pentagone avec son centre et un sommet @@ -5641,8 +5632,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Congé qui préserve les contraintes et le point d'intersection @@ -5650,7 +5641,7 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateRectangle - + Create a rectangle Créer un rectangle @@ -5658,7 +5649,7 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateRectangle_Center - + Create a centered rectangle Créer un rectangle centré @@ -5666,8 +5657,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Créer un carré avec son centre et un sommet @@ -5675,8 +5666,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Créer un triangle équilatéral avec son centre et un sommet @@ -5684,13 +5675,13 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline périodique par points de contrôle ou pôles - - + + Create a periodic B-spline by control points Créer une B-spline périodique par points de contrôle @@ -6322,36 +6313,36 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Erreur @@ -6371,45 +6362,45 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p La contrainte a des informations d'index non valides et est mal formée. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Contrainte invalide - - - + + + Failed to add arc Impossible d'ajouter un arc - + Failed to add arc of ellipse Impossible d'ajouter un arc d'ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Impossible de créer un arc d'hyperbole à partir d'angles invalides, essayez à nouveau ! - + Cannot create arc of hyperbola Impossible de créer un arc d'hyperbole - + Cannot create arc of parabola Impossible de créer un arc de parabole @@ -6419,18 +6410,18 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p Erreur lors de l'ajout d'un pôle de B-Spline - + Error creating B-spline pole Erreur lors de la création d'un pôle de B-spline - - + + Error creating B-spline Erreur lors de la création d'une B-spline - + Error deleting last pole Erreur lors de la suppression du dernier pôle @@ -6440,49 +6431,49 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p Impossible d'ajouter un nœud - + Cannot add internal alignment points Impossible d'ajouter des points d'alignement internes - + Error removing knot Erreur lors de la suppression du nœud - + Failed to add carbon copy Impossible d'ajouter une copie carbone - - + + Failed to add circle Impossible d'ajouter un cercle - + Failed to add an ellipse Impossible d'ajouter une ellipse - + Failed to extend edge Impossible d'étendre l'arête - + Failed to add external geometry Impossible d'ajouter la géométrie externe - + Failed to create fillet Échec de la création du congé - + Failed to add line Impossible d'ajouter une ligne @@ -6492,7 +6483,7 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p Impossiblr d'ajouter un point - + Failed to add polygon Impossible d'ajouter un polygone @@ -6502,27 +6493,27 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p Impossible d'ajouter un rectangle - + Failed to add rounded rectangle Impossible d'ajouter un rectangle arrondi - + Failed to add slot Impossible d'ajouter un contour oblong - + Failed to add edge Impossible d'ajouter une arête - + Failed to trim edge Impossible d'ajuster une arête - + Value Error @@ -6532,13 +6523,13 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline par des noeuds - - + + Create a B-spline by knots Créer une B-spline par des noeuds @@ -6546,13 +6537,13 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots B-spline périodique par des noeuds - - + + Create a periodic B-spline by knots Créer une B-spline périodique par des noeuds @@ -6658,12 +6649,12 @@ Les points doivent être placés à moins d'un cinquième de l'espacement de la CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Créer une B-spline par des noeuds - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Créer une B-spline par des noeuds, c'est-à-dire par interpolation, dans l'esquisse. @@ -6671,12 +6662,12 @@ Les points doivent être placés à moins d'un cinquième de l'espacement de la CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Créer une B-spline périodique par des noeuds - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Créer une B-spline périodique par des noeuds, c'est-à-dire par interpolation, dans l'esquisse. @@ -6684,31 +6675,44 @@ Les points doivent être placés à moins d'un cinquième de l'espacement de la CmdSketcherDimension - + Dimension Dimension - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Contrainte contextuellement en fonction de votre sélection. +Selon votre sélection, vous pourriez avoir plusieurs contraintes disponibles. Vous pouvez les parcourir à l'aide de la touche CTRL. +Un clic gauche dans un espace vide validera la contrainte en cours. Cliquez avec le bouton droit ou appuyez sur Échap pour annuler. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Afficher/masquer l'aide circulaire pour les arcs - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Bascule entre afficher et masquer l'aide circulaire pour tous les arcs + + + + CmdSketcherCompDimensionTools + + + Dimension + Dimension + + + + Dimension tools. + Outils de dimensionnement.
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts index eff614b8a7..6835ba9a13 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Amosar/Agochar información de capa B-spline - + Show/hide B-spline degree Show/hide B-spline degree - + Show/hide B-spline control polygon Show/hide B-spline control polygon - + Show/hide B-spline curvature comb Show/hide B-spline curvature comb - + Show/hide B-spline knot multiplicity Show/hide B-spline knot multiplicity - + Show/hide B-spline control point weight Show/hide B-spline control point weight @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Constrinxir arco ou círculo - + Constrain an arc or a circle Constrinxir un arco ou un círculo - + Constrain radius Constrinxir raio - + Constrain diameter Constrixir diámetro - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Create arc - + Create an arc in the sketcher Fai un arco no esbozo - + Center and end points Centro e puntos finais - + End points and rim point Puntos finais e punto de bordo @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Facer B-spline - + Create a B-spline in the sketch Fai unha B-spline no esbozo @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Facer círculo - + Create a circle in the sketcher Fai un círculo no esbozo - + Center and rim point Centro e punto de bordo - + 3 rim points 3 puntos de bordo @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Fai unha cónica no esbozo - + Ellipse by center, major radius, point Elipse mediante centro, raio maior e punto - + Ellipse by periapsis, apoapsis, minor radius Ellipse by periapsis, apoapsis, minor radius - + Arc of ellipse by center, major radius, endpoints Arco de elipse mediante centro, raio maior e cabos - + Arc of hyperbola by center, major radius, endpoints Arco de hipérbole mediante centro, raio maior e cabos - + Arc of parabola by focus, vertex, endpoints Arco de parábola mediante focos, vértice e cabos @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Facer chafrán - + Create a fillet between two lines Create a fillet between two lines - + Sketch fillet Sketch fillet - + Constraint-preserving sketch fillet Constraint-preserving sketch fillet @@ -299,17 +299,17 @@ Fai un rectángulo no esbozo - + Rectangle Rectángulo - + Centered rectangle Centered rectangle - + Rounded rectangle Rounded rectangle @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Facer un polígono regular - + Create a regular polygon in the sketcher Crea un polígono regular no esbozo - + Triangle Triángulo - + Square Cadrado - + Pentagon Pentágono - + Hexagon Hexágono - + Heptagon Heptágono - + Octagon Octógono - + Regular polygon Polígono regular @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modificar multiplicidade de nodo - + Modifies the multiplicity of the selected knot of a B-spline Modifica a multiplicidade do nodo escolmado dunha B-spline - + Increase knot multiplicity Aumenta a multiplicidade do nodo - + Decrease knot multiplicity Diminuir a multiplicidade de nodo @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Constrinxir o ángulo - + Fix the angle of a line or the angle between two lines Fixar o ángulo dunha liña ou o ángulo entre dúas liñas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Constrinxir coincidentes - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Constrixir diámetro - + Fix the diameter of a circle or an arc Fixa o diámetro dun círculo ou arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Constrinxir a distancia - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Fixar a distancia horizontal entre dous puntos ou os cabos dunha liña @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Fixar a distancia vertical entre dous puntos ou os cabos dunha liña @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Constrinxir a igualdade - + Create an equality constraint between two lines or between circles and arcs Fai unha constrición de igualdade entre dúas liñas ou entre círculos e arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Constrinxir horizontalmente - + Create a horizontal constraint on the selected item Fai unha constrición horizontal nos elementos escolmados @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Constrición fixa - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Constrinxir o paralelismo - + Create a parallel constraint between two lines Fai unha constrición de paralelismo entre dúas liñas @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Constrinxir a perpendicularidade - + Create a perpendicular constraint between two lines Fai unha constrición de perpendicularidade entre dúas liñas @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Constrinxir un punto a un obxecto - + Fix a point onto an object Fixa un punto a un obxecto @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Constrain radius or weight - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Constrinxir a simetría - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -615,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Constrinxir a tanxencia - + Create a tangent constraint between two entities Fai unha constrición de tanxencia entre dúas entidades @@ -628,12 +628,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Constrinxir verticalmente - + Create a vertical constraint on the selected item Fai unha constrición vertical nos elementos escolmados @@ -641,12 +641,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convert geometry to B-spline - + Converts the selected geometry to a B-spline Converts the selected geometry to a B-spline @@ -667,12 +667,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Facer un arco mediante tres puntos - + Create an arc by its end points and a point along the arc Fai un arco mediante os seus puntos finais mais un punto calquera no arco @@ -680,12 +680,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Facer un círculo mediante tres puntos - + Create a circle by 3 perimeter points Facer un círculo mediante tres puntos no perímetro @@ -693,12 +693,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Facer un arco cun centro dado - + Create an arc by its center and by its end points Facer un arco mediante o centro mais os seus puntos finais @@ -706,12 +706,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Fai unha liña de construción no esbozo @@ -719,12 +719,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Fai un arco de hipérbole no esbozo @@ -732,12 +732,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Fai un arco de parábola no esbozo @@ -745,12 +745,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Facer B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -758,12 +758,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Facer círculo - + Create a circle in the sketch Fai un círculo no esbozo @@ -771,12 +771,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Facer elipse mediante 3 puntos - + Create an ellipse by 3 points in the sketch Fai unha elipse mediante 3 puntos no esbozo @@ -784,12 +784,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Facer elipse mediante centro - + Create an ellipse by center in the sketch Fai unha elipse mediante centro no esbozo @@ -797,12 +797,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Facer chafrán - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -810,12 +810,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Facer un heptágono - + Create a heptagon in the sketch Fai un heptágono no esbozo @@ -823,12 +823,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Facer un hexágono - + Create a hexagon in the sketch Fai un hexágono no esbozo @@ -862,12 +862,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Facer un octógono - + Create an octagon in the sketch Fai un octógono no esbozo @@ -875,12 +875,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Facer un pentágono - + Create a pentagon in the sketch Fai un pentágono no esbozo @@ -888,12 +888,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Facer unha B-spline periódica - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -901,12 +901,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Facer un punto - + Create a point in the sketch Fai un punto no esbozo @@ -914,12 +914,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Create corner-preserving fillet - + Fillet that preserves intersection point and most constraints Fillet that preserves intersection point and most constraints @@ -927,12 +927,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Facer unha poliliña - + Create a polyline in the sketch. 'M' Key cycles behaviour Fai unha poliliña no esbozo. A tecla 'M' alterna o seu comportamento ciclicamente @@ -966,12 +966,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Facer un polígono regular - + Create a regular polygon in the sketch Crea un polígono regular nun esbozo @@ -979,12 +979,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Facer unha rañura - + Create a slot in the sketch Fai unha rañura no esbozo @@ -992,12 +992,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Facer cadrado - + Create a square in the sketch Fai un cadrado no esbozo @@ -1005,12 +1005,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Facer un triángulo equilátero - + Create an equilateral triangle in the sketch Fai un triángulo equilátero no esbozo @@ -1018,12 +1018,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Decrease B-spline degree - + Decreases the degree of the B-spline Decreases the degree of the B-spline @@ -1031,12 +1031,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Diminuir a multiplicidade de nodo - + Decreases the multiplicity of the selected knot of a B-spline Diminuir a multiplicidade do nodo escolmado dunha B-spline @@ -1083,12 +1083,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Estendido - + Extend an edge with respect to the picked position Extender un borde con respecto á posición escolmada @@ -1096,12 +1096,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Facer unha aresta ligada a unha xeometría externa @@ -1109,12 +1109,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Increase B-spline degree - + Increases the degree of the B-spline Incrementa o grao da B-spline @@ -1122,12 +1122,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Aumenta a multiplicidade do nodo - + Increases the multiplicity of the selected knot of a B-spline Modifica a multiplicidade do nodo escolmado dunha B-spline @@ -1135,12 +1135,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1148,12 +1148,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1440,12 +1440,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Split edge - + Splits an edge into two while preserving constraints Splits an edge into two while preserving constraints @@ -1466,12 +1466,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Alternar espazo virtual - + Switches the selected constraints or the view to the other virtual space Alterna as constricións escolmadas ou vista a outro espazo virtual @@ -1492,12 +1492,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Activates or deactivates the selected constraints @@ -1518,12 +1518,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1533,12 +1533,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Tallar aresta - + Trim an edge with respect to the picked position Tallar unha aresta na parte escollida hasta o/s próximo/s cruzamento/s @@ -1597,369 +1597,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Add length constraint - - + + Dimension Acoutamento - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2019,44 +2020,44 @@ invalid constraints, degenerated geometry, etc. Add centered sketch box - + Add rounded rectangle Add rounded rectangle - + Add line to sketch wire Add line to sketch wire - + Add arc to sketch wire Add arc to sketch wire - - + + Add sketch arc Add sketch arc - - + + Add sketch circle Add sketch circle - + Add sketch ellipse Add sketch ellipse - + Add sketch arc of ellipse Add sketch arc of ellipse - + Add sketch arc of hyperbola Add sketch arc of hyperbola @@ -2076,33 +2077,33 @@ invalid constraints, degenerated geometry, etc. Add sketch point - - + + Create fillet Facer chafrán - + Trim edge Tallar aresta - + Extend edge Estendido - + Split edge Split edge - + Add external geometry Add external geometry - + Add slot Add slot @@ -2112,37 +2113,37 @@ invalid constraints, degenerated geometry, etc. Add hexagon - + Convert to NURBS Convert to NURBS - + Increase spline degree Increase spline degree - + Decrease spline degree Decrease spline degree - + Increase knot multiplicity Aumenta a multiplicidade do nodo - + Decrease knot multiplicity Diminuir a multiplicidade de nodo - + Insert knot Insert knot - + Join Curves Join Curves @@ -2182,12 +2183,12 @@ invalid constraints, degenerated geometry, etc. Remove Axes Alignment - + Toggle constraints to the other virtual space Toggle constraints to the other virtual space - + @@ -2195,7 +2196,7 @@ invalid constraints, degenerated geometry, etc. Update constraint's virtual space - + Add auto constraints Add auto constraints @@ -2235,7 +2236,7 @@ invalid constraints, degenerated geometry, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2251,37 +2252,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Erro auto constrición: esbozo sen solución mentres aplica constricións coincidentes. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Erro auto constrición: esbozo sen solución mentres aplica constricións verticais/horizontais. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Erro auto constrición: esbozo sen solución mentres aplica constricións de igualdade. - + Autoconstrain error: Unsolvable sketch without constraints. Erro auto constrición: esbozo sen solución sen constricións. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Erro auto constrición: esbozo sen solución despois de aplicar constricións horizontais e verticais. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Erro auto constrición: esbozo sen solución despois de aplicar constricións punto a punto. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Erro auto constrición: esbozo sen solución despois de aplicar constricións de igualdade. @@ -2406,143 +2407,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Escolma errada @@ -2581,329 +2582,329 @@ invalid constraints, degenerated geometry, etc. Constrinxir dimensión - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Escolme unha aresta do esbozo. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Imposible constrinxir - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Dobre constrición - - - - - + + + + + The selected edge already has a horizontal constraint! A bordo escolmado xa ten unha constrición horizontal! - - - + + + The selected edge already has a vertical constraint! A bordo escolmado xa ten unha constrición vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! O bordo escolmado xa ten constrición de Bloque! - + The selected item(s) can't accept a horizontal constraint! O/s elemento/s escolmado/s non pode/n aceptar unha constrición horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hai máis dun punto fixo escolmado. Escolma un máximo dun punto fixo! - + The selected item(s) can't accept a vertical constraint! O/s elemento/s escolmado/s non pode/n aceptar unha constrición vertical! - - - + + + Select vertices from the sketch. Escolmar vértices do esbozo. - + Select one vertex from the sketch other than the origin. Escolme un vértice do esbozo distinto da orixe. - + Select only vertices from the sketch. The last selected vertex may be the origin. Escolma só vértices do croquis. O último vértice escolmado pode ser a orixe. - + Wrong solver status Erro no estado do resolvedor - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Escolmado dun bordo dende o esbozo. - + Select only edges from the sketch. Escolmado só de bordos dende esbozos. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Erro - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. No seu lugar aplicouse a tanxencia de punto final ao punto final. - + Select two or more points from the sketch. Escolmar dous ou máis vértices do esbozo. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Escolme unicamente unha liña, unha liña mais un punto ou dous puntos do esbozo. - + Cannot add a length constraint on an axis! Non se pode engadir unha constrición de lonxitude nun eixo! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Escolmar as cousas correctas do esbozo. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ningún dos puntos escolmados foron limitados nas curvas respectivas, ben porque son partes dun mesmo elemento, ou ben porque os dous son de xeometría externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Escolme unicamente unha liña ou ata dous puntos do esbozo. - + Cannot add a horizontal length constraint on an axis! Non se pode engadir unha constrición de lonxitude horizontal nun eixo! - + Cannot add a fixed x-coordinate constraint on the origin point! Non se pode engadir unha constrición de coordenada X no punto de orixe! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Non se pode engadir unha constrición de lonxitude vertical nun eixo! - + Cannot add a fixed y-coordinate constraint on the origin point! Non se pode engadir unha constrición de coordenada Y no punto de orixe! - + Select two or more lines from the sketch. Escolmar dúas ou máis liñas do esbozo. - - + + Select at least two lines from the sketch. Escolmar polo menos dúas liñas do esbozo. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2913,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas curvas mais un punto. - + Select some geometry from the sketch. perpendicular constraint Escolme algunha xeometría do esbozo. - - + + Cannot add a perpendicularity constraint at an unconnected point! Non se pode engadir unha constrición de perpendicularidade nun punto non conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular a arista de B-spline non compatible polo momento. - - + + One of the selected edges should be a line. Unha das arestas escolmadas debe de ser unha liña. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Aplicouse a tanxencia de punto final a punto final. Borrouse a constrición coincidente. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas curvas mais un punto. - + Select some geometry from the sketch. tangent constraint Escolme algunha xeometría do esbozo. - - - + + + Cannot add a tangency constraint at an unconnected point! Non se pode engadir unha constrición de tanxencia nun punto non conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Cantidade incorrecta de obxectos escolmados! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 obxectos, debe de haber 2 curvas e 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tanxencia sobre arista de B-spline non compatible polo momento. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Escolme un ou máis arcos ou círculos no esbozo. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Esta constrición só aplica a arcos ou círculos. - - + + Select one or two lines from the sketch. Or select two edges and a point. Escolme unha ou dúas liñas do esbozo. Ou escolme un punto e dúas arestas. - - + + Parallel lines Liñas paralelas - - + + An angle constraint cannot be set for two parallel lines. Unha constrición de ángulo non pode ser establecida por dúas liñas paralelas. - + Cannot add an angle constraint on an axis! Non se pode engadir unha constrición angular nun eixo! - + Select two edges from the sketch. Escolme dúas arestas do esbozo. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Igualdade para arista de B-Spline non compatible polo momento. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Escolme dous puntos e unha liña de simetría, dous puntos e un punto de simetría ou unha liña e un punto de simetría do esbozo. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Non se pode engadir unha constrición de simetría entre unha liña e os seus puntos finais! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Os obxectos escolmados non son a xeometría dun esbozo unicamente. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. Escolma constrición(s) do esbozo. - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error Erro do Kernel CAD - + None of the selected elements is an edge. Ningún dos elementos escolmados é unha aresta. - - + + At least one of the selected objects was not a B-Spline and was ignored. Canda menos un dos obxectos escolmados non é unha BSpline e foi ignorado. - - + + The selection comprises more than one item. Please select just one knot. A selección inclúe máis dun elemento. Por favor escolme só un nodo. - - + + Input Error Erro de Entrada - - + + None of the selected elements is a knot of a B-spline Ningún dos elementos escolmados é un nodo dunha B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3306,17 +3307,17 @@ As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas cu It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3630,12 +3631,12 @@ As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas cu Lonxitude: - + Refractive index ratio Índice de refracción - + Ratio n2/n1: Razón n2/n1: @@ -3915,8 +3916,8 @@ As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas cu SketcherGui::PropertyConstraintListItem - - + + Unnamed Sen nome @@ -4150,13 +4151,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4177,32 +4178,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Ambos - + Auto Automático - + Diameter Diámetro - + Radius Radio @@ -4651,12 +4652,12 @@ Then objects are only visible behind the sketch plane. Aplicar ós esbozos existentes - + Unexpected C++ exception Excepción de C++ inesperada - + Sketcher Sketcher @@ -4664,55 +4665,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Ningunha coincidencia perdida - + No missing coincidences found Non se atoparon coincidencias perdidas - + Missing coincidences Coincidencias perdidas - + %1 missing coincidences found Atopadas %1 coincidencias perdidas - + No invalid constraints Ningunha constrición non válida - + No invalid constraints found Non se atoparon constricións non válidas - + Invalid constraints Constricións non válidas - + Invalid constraints found Atopadas constricións non válidas - - - + + + Reversed external geometry Xeometría externa invertida - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,7 +4726,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Prema no botón "Trocar os puntos finais das constricións" para asignar de novo os cabos. Facer isto só unha vez nos esbozos feitos nunha versión de FreeCAD anterior á v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4734,75 +4735,70 @@ However, no constraints linking to the endpoints were found. Pola contra, non se atoparon constricións ligadas os cabos. - + No reversed external-geometry arcs were found. Non se atoparon arcos invertidos na xeometría externa. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Fixéronse %1 cambios nas constricións ligadas os cabos dos arcos invertidos. - - + + Constraint orientation locking Bloqueo da constrición de orientación - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). O bloqueo de orientación foi habilitado e recalculado para %1 constricións. As constricións son listadas na vista de informes (menú Ver-> Vistas-> Ver Informe). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. O bloqueo de orientación foi inhabilitado para %1 constricións. As constricións son listadas na vista de informes (menú Ver-> Vistas-> Ver Informe). Teña en conta que para tódalas futuras constricións, segue activado o bloqueo por defecto. - - + + Delete constraints to external geom. Desbotar constricións á xeometría externa. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Está a piques de desbotar TODAS as constricións que relacionadas coa xeometría externa. Isto é útil para rescatar un esbozo con ligazóns rompidas/trocadas á xeometría externa. ¿Seguro que quere desbotar as constricións? - + All constraints that deal with external geometry were deleted. Tódalas constricións relacionadas coa xeometría externa foron desbotadas. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - Formulario - Check to toggle filters @@ -4877,11 +4873,6 @@ Pola contra, non se atoparon constricións ligadas os cabos. SketcherGui::TaskSketcherElements - - - Form - Formulario - Check to toggle filters @@ -5067,7 +5058,7 @@ Pola contra, non se atoparon constricións ligadas os cabos. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Control avanzado do resolvedor @@ -5358,8 +5349,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Cambia entre amosar e agochar o peite de curvatura para tódalas B-splines @@ -5367,8 +5358,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Diminuir a multiplicidade do nodo escolmado dunha B-spline @@ -5376,8 +5367,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Cambia entre amosar e agochar o grao para tódalas B-splines @@ -5385,8 +5376,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Modifica a multiplicidade do nodo escolmado dunha B-spline @@ -5394,8 +5385,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Troca entre amosar e agochar o polígono de control para tódalas B-splines @@ -5403,8 +5394,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Switches between showing and hiding the control point weight for all B-splines @@ -5412,8 +5403,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Cambia entre amosar e agochar o polígono de control para tódalas B-splines @@ -5448,8 +5439,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixa o diámetro dun círculo ou arco @@ -5457,7 +5448,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5465,8 +5456,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixa o raio dun círculo ou arco @@ -5474,7 +5465,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5491,8 +5482,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Fai un arco mediante os seus puntos finais mais un punto calquera no arco @@ -5500,8 +5491,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Facer un círculo mediante 3 puntos no bordo @@ -5509,8 +5500,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Facer un arco mediante o centro mais os seus puntos finais @@ -5518,8 +5509,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Create an arc of ellipse by its center, major radius, and endpoints @@ -5527,8 +5518,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Create an arc of hyperbola by its center, major radius, and endpoints @@ -5536,8 +5527,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Create an arc of parabola by its focus, vertex, and endpoints @@ -5545,13 +5536,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline por puntos de control - - + + Create a B-spline by control points Crea unha B-spline por puntos de control @@ -5559,8 +5550,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Facer un círculo mediante o centro mais un punto no bordo @@ -5568,8 +5559,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Facer unha elipse mediante periapse, apoapse e raio menor @@ -5577,8 +5568,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Facer unha elipse mediante centro, raio maior e un punto @@ -5586,8 +5577,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Creates a radius between two lines @@ -5595,8 +5586,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Facer un heptágono mediante o seu centro mais un vértice @@ -5604,8 +5595,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Facer un hexágono mediante o seu centro mais un vértice @@ -5613,7 +5604,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Create a rounded rectangle @@ -5621,14 +5612,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Facer un octógono mediante o seu centro mais un vértice - - + + Create a regular polygon by its center and by one corner Crea un polígono regular polo seu centro e por un vértice @@ -5636,8 +5627,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Facer un pentágono mediante o seu centro mais un vértice @@ -5645,8 +5636,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Fillet that preserves constraints and intersection point @@ -5654,7 +5645,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Crear Rectángulo @@ -5662,7 +5653,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Create a centered rectangle @@ -5670,8 +5661,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Facer un cadrado mediante o seu centro mais un vértice @@ -5679,8 +5670,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Facer un triángulo equilátero mediante o seu centro mais un vértice @@ -5688,13 +5679,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periódica por puntos de control - - + + Create a periodic B-spline by control points Crea unha B-spline periódica por puntos de control @@ -6327,36 +6318,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Erro @@ -6376,45 +6367,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6424,18 +6415,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6445,49 +6436,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6497,7 +6488,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6507,27 +6498,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6537,13 +6528,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6551,13 +6542,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6663,12 +6654,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6676,12 +6667,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6689,12 +6680,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Acoutamento - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6706,14 +6697,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Acoutamento + + + + Dimension tools. + Dimension tools. + +
diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts index fee3081c74..33c1913d41 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts @@ -71,12 +71,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Napravi indigo kopiju - + Copy the geometry of another sketch Kopira geometriju druge skice @@ -102,27 +102,27 @@ Pokaži/Sakrij B-spline Sloj Informacije - + Show/hide B-spline degree Pokaži/Sakrij B-spline stupnjevi - + Show/hide B-spline control polygon Pokaži/Sakrij kontrolni višekutnik Bezierove krivulje - + Show/hide B-spline curvature comb Pokaži/Sakrij češalj zakrivljenosti B-spline krive - + Show/hide B-spline knot multiplicity Pokaži/Sakrij B-spline uvišestručenje čvora - + Show/hide B-spline control point weight Pokaži/Sakrij kontroliraj težinu točke B-spline @@ -130,27 +130,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ograničiti luk ili krug - + Constrain an arc or a circle Ograniči luk ili krug - + Constrain radius Ograniči radijus - + Constrain diameter Ograniči promjer - + Constrain auto radius/diameter Ograničiti automatski polumjer/promjer @@ -171,22 +171,22 @@ CmdSketcherCompCreateArc - + Create arc Napravi luk - + Create an arc in the sketcher Stvaranje luka u skici - + Center and end points Centar i krajnje točke - + End points and rim point Krajnje točke i rubna točka @@ -194,12 +194,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Stvaranje B-spline - + Create a B-spline in the sketch Stvaranje B-spline skice @@ -207,22 +207,22 @@ CmdSketcherCompCreateCircle - + Create circle Napravi krug - + Create a circle in the sketcher Stvaranje kruga u skici - + Center and rim point Centar i rubna točka - + 3 rim points 3 rubne točke @@ -230,37 +230,37 @@ CmdSketcherCompCreateConic - + Create conic Konstruiraj konus - + Create a conic in the sketch Stvaranje konusne krivulje u skici - + Ellipse by center, major radius, point Elipsa od: točke centra, točaka glavnih radijusa - + Ellipse by periapsis, apoapsis, minor radius Elipsa od periapsis, apoapsis, manjeg polumjera - + Arc of ellipse by center, major radius, endpoints Luk elipse od centra, velikog radijusa, krajnje točke - + Arc of hyperbola by center, major radius, endpoints Luk hiperbole od centra, velikog radijusa, krajnje točke - + Arc of parabola by focus, vertex, endpoints Luk parabole od fokusa, tjemene točke, krajnje točke @@ -268,22 +268,22 @@ CmdSketcherCompCreateFillets - + Create fillet Napravi obrub - + Create a fillet between two lines Stvori obrube između dvije linije - + Sketch fillet Skica obruba - + Constraint-preserving sketch fillet Skica obruba za očuvanje ograničenja @@ -301,17 +301,17 @@ Stvara pravokutnike u skici - + Rectangle Pravokutnik - + Centered rectangle Centrirani pravokutnik - + Rounded rectangle Zaobljeni pravokutnik @@ -319,47 +319,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Stvorite pravilan višekutnik - + Create a regular polygon in the sketcher Stvara pravilan višekutnik u crtaču - + Triangle Trokut - + Square Kvadrat - + Pentagon Peterokut - + Hexagon Šesterokut - + Heptagon Sedmerokut - + Octagon Osmerokut - + Regular polygon Pravilni višekutnik @@ -367,22 +367,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Izmijeniti višestrukost čvora - + Modifies the multiplicity of the selected knot of a B-spline Mijenja umnožak odabranoga čvora B-spline krive - + Increase knot multiplicity Povećanje višestrukosti čvora - + Decrease knot multiplicity Smanjenje višestrukosti čvora @@ -390,12 +390,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ograniči kut - + Fix the angle of a line or the angle between two lines Fiksiraj kut linije ili kut između dvije linije @@ -403,12 +403,12 @@ CmdSketcherConstrainBlock - + Constrain block Blok ograničenja - + Block the selected edge from moving Blokira pomjeranje izabranog ruba @@ -416,12 +416,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ograničiti zajedničko - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Stvorite koincidentno ograničenje između točaka ili koncentrično ograničenje između krugova, lukova i elipsa @@ -429,12 +429,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ograniči promjer - + Fix the diameter of a circle or an arc Popravi promjer kruga ili luka @@ -442,12 +442,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ograniči udaljenost - + Fix a length of a line or the distance between a line and a vertex or between two circles Namjestiti duljinu linije ili rastojanje između linije i tjemene točke ili rastojanje između dva kruga @@ -455,12 +455,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ograniči horizontalnu udaljenost - + Fix the horizontal distance between two points or line ends Ograniči horizontalnu udaljenost između dvije točke ili krajeva linije @@ -468,12 +468,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ograničenje okomite udaljenosti - + Fix the vertical distance between two points or line ends Ograniči vertikalnu udaljenost između dvije točke ili krajeva linije @@ -481,12 +481,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ograniči jednaku duljinu - + Create an equality constraint between two lines or between circles and arcs Napravite ograničenje jednakosti između dvije linije ili između kružnica i lukova @@ -494,12 +494,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ograniči vodoravno - + Create a horizontal constraint on the selected item Napravi vodoravno ograničenje na odabranoj jedinici @@ -507,12 +507,12 @@ CmdSketcherConstrainLock - + Constrain lock Ograniči pomicanje - + Create both a horizontal and a vertical distance constraint on the selected vertex Napravi ograničenje vodoravno i okomito ograničenje udaljenosti @@ -522,12 +522,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainParallel - + Constrain parallel Ograniči paralelno - + Create a parallel constraint between two lines Napravi paralelno ograničenje između dvije linije @@ -535,12 +535,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ograniči okomito - + Create a perpendicular constraint between two lines Stvara okomito ograničenje između dvije linije @@ -548,12 +548,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainPointOnObject - + Constrain point onto object Ograniči točku na objekt - + Fix a point onto an object Fiksiraj točku na objekt @@ -561,12 +561,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Ograničiti automatski polumjer/promjer - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fiksirajte promjer ako je odabrana kružnica ili radijus ako je odabran luk/spline pol @@ -574,14 +574,14 @@ na odabranoj tjemenoj točki CmdSketcherConstrainRadius - + Constrain radius or weight Ograniči radijus ili težinu - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Popravite radijus kruga ili luka ili fiksirajte težinu pola B-zavoja @@ -589,12 +589,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ograniči lom (Snell's zakon ') - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Stvaranje zakona loma svijetla (Snell's law) ograničenje između dvije krajnje točke zrake i ruba kao sučelja. @@ -603,12 +603,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ograniči simetrijski - + Create a symmetry constraint between two points with respect to a line or a third point Stvoriti simetrično ograničenje između dvije točke u odnosu na liniju ili treću točku @@ -617,12 +617,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Ograniči tangentno - + Create a tangent constraint between two entities Napravi tangentno ograničenje između dva entiteta @@ -630,12 +630,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Ograniči okomito - + Create a vertical constraint on the selected item Napravi okomito ograničenje na odabranoj jedinici @@ -643,12 +643,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Pretvoriti geometriju u B-spline krivu - + Converts the selected geometry to a B-spline Pretvara zadane geometrije u B-spline krive @@ -669,12 +669,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Stvori luk kroz tri točke - + Create an arc by its end points and a point along the arc Stvaranje luka od svojih završnih točki i točke na luku @@ -682,12 +682,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Stvori krug kroz tri točke - + Create a circle by 3 perimeter points Stvori krug kroz tri obodne točke @@ -695,12 +695,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Stvori luk od središta - + Create an arc by its center and by its end points Stvaranje luka od njegovog središta i njegovih krajnjih točaka @@ -708,12 +708,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Stvaranje luka elipse - + Create an arc of ellipse in the sketch Stvaranje luka elipse u skici @@ -721,12 +721,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Stvaranje luka hiperbole - + Create an arc of hyperbola in the sketch Stvaranje luka hiperbole u skici @@ -734,12 +734,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Stvaranje luka parabole - + Create an arc of parabola in the sketch Stvaranje luka parabole u skici @@ -747,12 +747,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Stvaranje B-spline - + Create a B-spline by control points in the sketch. Stvaranje B-spline krive putem kontrolnih točaka u skici. @@ -760,12 +760,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Napravi krug - + Create a circle in the sketch Napravi krug u skici @@ -773,12 +773,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Stvaranje elipse s 3 točke - + Create an ellipse by 3 points in the sketch Stvaranje elipse od 3 točke u skici @@ -786,12 +786,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Stvaranje elipse od centra - + Create an ellipse by center in the sketch Stvaranje elipse od središta u skici @@ -799,12 +799,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Napravi obrub - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -812,12 +812,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Stvaranje sedmerokuta - + Create a heptagon in the sketch Stvaranje sedmerokuta u skici @@ -825,12 +825,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Stvaranje šesterokut - + Create a hexagon in the sketch Stvaranje šestero kuta u skici @@ -864,12 +864,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Stvaranje osmerokuta - + Create an octagon in the sketch Stvaranje osmero kuta u skici @@ -877,12 +877,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Stvaranje peterokuta - + Create a pentagon in the sketch Stvaranje petero kuta u skici @@ -890,12 +890,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Napravite periodične B-spline - + Create a periodic B-spline by control points in the sketch. Napravite periodične B-spline putem kontrolnih točaka u skici. @@ -903,12 +903,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Napravi točku - + Create a point in the sketch Napravi točku u skici @@ -916,12 +916,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Stvori obrub očuvanih kutova - + Fillet that preserves intersection point and most constraints Obrub koji čuva točku sjecišta i većinu ograničenja @@ -929,12 +929,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Napravi višestruke linije (polylines) - + Create a polyline in the sketch. 'M' Key cycles behaviour Stvara višestruku liniju (polyline) u skici. 'M ' tipka mijenja ponašanje ciklusa @@ -968,12 +968,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Stvorite pravilan višekutnik - + Create a regular polygon in the sketch Stvara pravilan višekutnik u skici @@ -981,12 +981,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Napravite utor - + Create a slot in the sketch Stvorite otvor u skici @@ -994,12 +994,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Stvaranje kvadrata - + Create a square in the sketch Stvaranje kvadrata u skici @@ -1007,12 +1007,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Stvaranje istostraničnog trokuta - + Create an equilateral triangle in the sketch Stvaranje jednostraničnih trokuta u skici @@ -1020,12 +1020,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Smanjuje stupnjeve B-spline - + Decreases the degree of the B-spline Smanjuje stupnjeve B-spline krive @@ -1033,12 +1033,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Smanjenje višestrukosti čvora - + Decreases the multiplicity of the selected knot of a B-spline Smanjuje umnožak odabranoga čvora B-spline krive @@ -1085,12 +1085,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Vanjski rub - + Extend an edge with respect to the picked position Proširiti rub u odnosu na pokupljenu poziciju @@ -1098,12 +1098,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Napravi vanjsku geometriju - + Create an edge linked to an external geometry Kreiraj rub povezan sa vanjskom geometrijom @@ -1111,12 +1111,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Povećava stupnjeve B-spline - + Increases the degree of the B-spline Povećava stupnjeve B-spline krive @@ -1124,12 +1124,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Povećanje višestrukosti čvora - + Increases the multiplicity of the selected knot of a B-spline Povećati mnoštvo odabranoga čvora B-spline krive @@ -1137,12 +1137,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Umetni čvor - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Umeće čvor na zadani parametar. Ako čvor već postoji na tom parametru, njegova množina se povećava za jedan. @@ -1150,12 +1150,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Spoji krivulje - + Join two curves at selected end points Spojite dvije krivulje na odabranim krajnjim točkama @@ -1450,12 +1450,12 @@ Ovo će očistiti svojstvo "Podrška", ako postoji. CmdSketcherSplit - + Split edge Razdjeli rub - + Splits an edge into two while preserving constraints Razdjeli rub na dva uz očuvanje ograničenja @@ -1478,12 +1478,12 @@ Ovo će očistiti svojstvo "Podrška", ako postoji. CmdSketcherSwitchVirtualSpace - + Switch virtual space Pređi na virtualni prostor - + Switches the selected constraints or the view to the other virtual space Pređi na odabrana ograničenja ili prikaz u drugom virtualnom prostoru @@ -1504,14 +1504,14 @@ Ovo će očistiti svojstvo "Podrška", ako postoji. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Prebaci aktivirati / isključiti ograničenje - + Activates or deactivates the selected constraints Uključuje ili isključuje odabrana ograničenja @@ -1532,14 +1532,14 @@ Ovo će očistiti svojstvo "Podrška", ako postoji. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Prebacuj vožnje / reference ograničenje - + Set the toolbar, or the selected constraints, into driving or reference mode Postavite alatnu traku ili odabrana ograničenja, @@ -1551,12 +1551,12 @@ u režim vožnje ili referentni CmdSketcherTrimming - + Trim edge Skrati rub - + Trim an edge with respect to the picked position Odreži dio ruba s obzirom na odabranu poziciju @@ -1621,394 +1621,395 @@ nevaljana ograničenja, degenerirana geometrija itd. Command - - + + Add horizontal constraint Dodajte vodoravno ograničenje - - - + + + Add horizontal alignment Dodajte vodoravno poravnavanje - - + + Add vertical constraint Dodajte okomito ograničenje - + Add vertical alignment Dodajte okomito poranavanje - + Add 'Lock' constraint Dodajte 'Zaključaj' ograničenje - + Add relative 'Lock' constraint Dodajte relativno 'Zaključaj' ograničenje - + Add fixed constraint Dodajte fiksno ograničenje - + Add 'Block' constraint Dodajte 'Blok' ograničenje - + Add block constraint Dodaje blok ograničenje - - - + + + Add coincident constraint Dodajte podudarno ograničenje - - + + Add distance from horizontal axis constraint Dodajte udaljenost od ograničenja vodoravne osi - - + + Add distance from vertical axis constraint Dodajte udaljenost od ograničenja okomite osi - - + + Add point to point distance constraint Dodajte ograničenje udaljenosti od točke do točke - - - + + + Add point to line Distance constraint Dodaj ograničenje udaljenosti od točke do linije - - + + Add circle to circle distance constraint Dodaj ograničenje između dva kruga - + Add circle to line distance constraint Dodaj ograničenje između kruga i linije - - - - - + + + + + + Add length constraint Dodajte ograničenje duljine - - + + Dimension Dimenzija - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Dodajte ograničenje udaljenosti točka na objektu - - + + Add point to point horizontal distance constraint Dodajte ograničenje vodoravne udaljenosti od točke do točke - + Add fixed x-coordinate constraint Dodajte fiksno x-koordinata ograničenje - - + + Add point to point vertical distance constraint Dodajte ograničenje okomite udaljenosti od točke do točke - + Add fixed y-coordinate constraint Dodajte fiksno y-koordinata ograničenje - - + + Add parallel constraint Dodajte paralelno ograničenje - - - - - - - + + + + + + + Add perpendicular constraint Dodajte vertikalno ograničenje - + Add perpendicularity constraint Dodajte vertikalno ograničenje - + Swap coincident+tangency with ptp tangency Zamijeni slučajnost + tangencija s ptp tangencijom - + Swap PointOnObject+tangency with point to curve tangency Zamijenite točka na objektu+dodiruje s točka na krivulji dodiruje - - - - - - - + + + + + + + Add tangent constraint Dodajte tangencijalno ograničenje - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodajte točku tangencijalno ograničenje - - - - + + + + Add radius constraint Dodajte ograničenje polumjera - - - - + + + + Add diameter constraint Dodajte ograničenje promjera - - - - + + + + Add radiam constraint Dodaj polumjer-promjer ograničenje - - - - - - + + + + + + Add angle constraint Dodajte ograničenje kuta - - + + Add equality constraint Dodajte ograničenje jednakosti - - - - - + + + + + Add symmetric constraint Dodajte ograničenje simetrije - + Add Snell's law constraint Dodajte ograničenje Snell's law - + Toggle constraint to driving/reference Uključivanje ograničenja na pogon / referencu - + Activate/Deactivate constraint Aktiviranje / deaktiviranje ograničenja @@ -2071,46 +2072,46 @@ nevaljana ograničenja, degenerirana geometrija itd. Dodaj centrirani okvir skice - + Add rounded rectangle Dodaj zaobljeni pravokutnik - + Add line to sketch wire Dodajte liniju na skicu žice - + Add arc to sketch wire Dodajte luk na skicu žice - - + + Add sketch arc Dodaj luk skice - - + + Add sketch circle Dodaj krug skice - + Add sketch ellipse Dodajte elipsu skice - + Add sketch arc of ellipse Dodajte skica luk elipse - + Add sketch arc of hyperbola Dodajte skicu luk hiperbole @@ -2134,33 +2135,33 @@ nevaljana ograničenja, degenerirana geometrija itd. Dodajte točku skice - - + + Create fillet Napravi obrub - + Trim edge Skrati rub - + Extend edge Vanjski rub - + Split edge Razdjeli rub - + Add external geometry Dodajte vanjsku geometriju - + Add slot Dodajte utor @@ -2170,37 +2171,37 @@ nevaljana ograničenja, degenerirana geometrija itd. Dodajte šesterokut - + Convert to NURBS Pretvori u NURBS - + Increase spline degree Povećava stupnjeve krive - + Decrease spline degree Smanjuje stupnjeve krive - + Increase knot multiplicity Povećanje višestrukosti čvora - + Decrease knot multiplicity Smanjenje višestrukosti čvora - + Insert knot Umetni čvor - + Join Curves Spoji krivulje @@ -2246,14 +2247,14 @@ nevaljana ograničenja, degenerirana geometrija itd. Ukloni poravnanje osi - + Toggle constraints to the other virtual space Prebaci ograničenja na drugi virtualni prostor - + @@ -2263,7 +2264,7 @@ nevaljana ograničenja, degenerirana geometrija itd. - + Add auto constraints Dodajte automatska ograničenja @@ -2305,7 +2306,7 @@ nevaljana ograničenja, degenerirana geometrija itd. Dodaj čvor - + Create a carbon copy Napravi indigo kopiju @@ -2321,37 +2322,37 @@ nevaljana ograničenja, degenerirana geometrija itd. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Automatsko ograničenje, pogreška: nerješiva skica prilikom primjene podudarnih ograničenja. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Automatsko ograničenje, pogreška: nerješiva skica prilikom primjene okomitih/vodoravnih ograničenja. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Automatsko ograničenje, pogreška: nerješiva skica prilikom primjene izjednačavajućih ograničenja. - + Autoconstrain error: Unsolvable sketch without constraints. Automatsko ograničenje, pogreška: nerješiva skica bez ograničenja. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Automatsko ograničenje, pogreška: nerješiva skica nakon primjene vodoravnih i okomitih ograničenja. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Automatsko ograničenje, pogreška: nerješiva skica nakon primjene točka na točku ograničenja. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Automatsko ograničenje, pogreška: nerješiva skica nakon primjene izjednačavajućih ograničenja. @@ -2478,143 +2479,143 @@ nevaljana ograničenja, degenerirana geometrija itd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2630,9 +2631,9 @@ nevaljana ograničenja, degenerirana geometrija itd. - - - + + + Wrong selection Pogrešan odabir @@ -2653,332 +2654,332 @@ nevaljana ograničenja, degenerirana geometrija itd. Dimenzijonalno ograničenje - + Cannot add a constraint between two external geometries. Nije moguće dodati ograničenja između dvije vanjske geometrije. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nije moguće dodati ograničenje između dvije fiksne geometrije. Fiksne geometrije uključuju vanjsku geometriju, blokiranu geometriju i posebne točke kao što su čvorne točke B-splinea. - + Sketcher Constraint Substitution Zamjena ograničenja skice - + Keep notifying me of constraint substitutions Obavijesti me o zamjeni ograničenja - - - + + + Only sketch and its support are allowed to be selected. Dopušteno je odabrati samo skicu i njenu podršku. - + One of the selected has to be on the sketch. Jedan od odabranih mora biti na skici. - - + + Select an edge from the sketch. Odaberite rub skice. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemoguće ograničenje - - - - + + + + The selected edge is not a line segment. Odabrani rub nije segment linije. - - - - - - + + + + + + Double constraint Ograničenje dvaput - - - - - + + + + + The selected edge already has a horizontal constraint! Odabrani rub već ima vodoravno ograničenje! - - - + + + The selected edge already has a vertical constraint! Odabrani rub već ima okomito ograničenje! - - - - - - + + + + + + The selected edge already has a Block constraint! Odabrani rub već ima blok ograničenje! - + The selected item(s) can't accept a horizontal constraint! Odabrani objekt(i) ne mogu prihvatiti horizontalno ograničenje! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Odabrano više od jedne fiksne točke. Odaberite najviše jednu fiksnu točku! - + The selected item(s) can't accept a vertical constraint! Odabrani objekt(i) ne mogu prihvatiti vertikalno ograničenje! - - - + + + Select vertices from the sketch. Odaberite samo vrhove sa skice. - + Select one vertex from the sketch other than the origin. Odaberite jednu vrh točku iz skice koja nije u ishodištu. - + Select only vertices from the sketch. The last selected vertex may be the origin. Odaberite samo krajnje točke skice. Posljednje odabrana tjemena točka je možda ishodište. - + Wrong solver status Pogrešan status alata za rješavanje (solver) - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Blok ograničenja ne može biti dodan ako skica nije riješena ili postoje redundantna i/ili proturječna ograničenja. - + Select one edge from the sketch. Odaberite jedan rub skice. - + Select only edges from the sketch. Odaberite samo rubove sa skice. - + Number of selected objects is not 3 Broj odabranih objekata nije 3 - - - + + + Error Pogreška - + Unexpected error. More information may be available in the Report View. Neočekivana greška. Potražite više informacija u Pregledu izvješća. - + Endpoint to endpoint tangency was applied instead. Tangenta od krajnje točka do krajnje točke je primijenjena umjesto toga. - + Select two or more points from the sketch. Odaberite dvije ili više točaka na skici. - + Select two or more vertices from the sketch. Odaberite dva ili više tjemenih točaka na skici. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Odaberite dva ili više vrhova sa skice za koincidentno ograničenje, ili dva ili više krugova, elipsa, lukova ili lukova elipse za koncentrično ograničenje. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Odaberite dva vrha sa skice za koincidentno ograničenje ili dva kruga, elipse, lukove ili lukove elipse za koncentrično ograničenje. - + Select exactly one line or one point and one line or two points from the sketch. Odaberite točno jednu liniju ili jednu točku i jednu liniju ili dvije točke iz skice. - + Cannot add a length constraint on an axis! Ne možete dodati ograničenje duljine na osi! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Izaberi točno jednu liniju ili jednu točku i jednu liniju ili dvije točke ili dva kruga na skici. - + This constraint does not make sense for non-linear curves. Ovo ograničenje nema smisla za nelinearne krivulje. - + Endpoint to edge tangency was applied instead. Tangenta od krajnje točka do ruba je primijenjena umjesto toga. - - - - - - - + + + + + + + Select the right things from the sketch. Odaberite prave stvari sa skice. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Odaberite rub koji nije težina B-krive. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nijedna od odabranih točaka nije ograničena na dotične krivulje, jer su dijelovi istog elementa, jer su obje vanjska geometrija ili zato što rub ne ispunjava uvjete. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nijedna od odabranih točaka nije bila je ograničena na dotične krivulje, ili su dijelovi isti element, ili su oba vanjske geometrije. - - - - + + + + Select exactly one line or up to two points from the sketch. Odaberite točno jednu liniju ili do dvije točke iz skice. - + Cannot add a horizontal length constraint on an axis! Nemoguće je dodati ograničenje duljine na os! - + Cannot add a fixed x-coordinate constraint on the origin point! Nije moguće dodati fiksno ograničenje X koordinate na izvornu točku! - - + + This constraint only makes sense on a line segment or a pair of points. Ovo ograničenje samo ima smisla na segmentu crte ili paru točaka. - + Cannot add a vertical length constraint on an axis! Nemoguće je dodati ograničenje duljine na os! - + Cannot add a fixed y-coordinate constraint on the origin point! Nije moguće dodati fiksno ograničenje Y koordinate na izvornu točku! - + Select two or more lines from the sketch. Odaberite dvije ili više linija iz skice. - - + + Select at least two lines from the sketch. Odaberite barem dvije linije iz skice. - + Select a valid line. Odaberite ispravnu liniju. - - + + The selected edge is not a valid line. Odabrani rub nije valjana linija. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2988,42 +2989,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije krajnje točke; dvije krivulje i točka. - + Select some geometry from the sketch. perpendicular constraint Odaberite neke geometrije sa skice. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nemoguće je postaviti okomicu na nepovezanoj točki! - - - + + + Perpendicular to B-spline edge currently unsupported. Okomito na rub B-spline krive trenutno nije podržano. - - + + One of the selected edges should be a line. Jedan od doabranih rubova bi trebala biti linija. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Primijenjena je tangenta krajnja točka do krajnje točke. Podudarna ograničenja su izbrisana. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Primijenjena je tangenta krajnja točka do ruba. Točka na objekt ograničenja su izbrisana. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -3033,285 +3034,285 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije krajnje točke; dvije krivulje i točka. - + Select some geometry from the sketch. tangent constraint Odaberite neke geometrije sa skice. - - - + + + Cannot add a tangency constraint at an unconnected point! Nemoguće je postaviti tangentu u nepovezanoj točki! - - + + Tangent constraint at B-spline knot is only supported with lines! Ograničenje tangente na B-krivulja čvoru podržano je samo s linijama! - + B-spline knot to endpoint tangency was applied instead. B-krivulja od krajnje točka do krajnje točke je primijenjena umjesto toga. - + Select either one point and several curves, or one curve and several points. Izaberi ili jednu točku i nekoliko krivih, ili jednu krivu i nekoliko točaka. - - + + Wrong number of selected objects! Pogrešan broj odabranih objekata! - - + + With 3 objects, there must be 2 curves and 1 point. Sa 3 objekta, ondje mora biti 2 krivulje i 1 točka. - - - + + + Tangency to B-spline edge currently unsupported. Tangencijalno na rub B-Spline krive trenutno nije podržano. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Odaberite jedan ili više lukova ili krugovima iz skice. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Odaberite samo jedan ili više B-Spline stupova ili samo jedan ili više lukova ili krugova sa skice, ali ne i mejšano. - - - + + + Constraint only applies to arcs or circles. Ograničenje se odnosi samo na lukove i krugove. - - + + Select one or two lines from the sketch. Or select two edges and a point. Odaberite jednu ili dvije linije na skici. Ili odaberite dva ruba i točku. - - + + Parallel lines Paralelne linije - - + + An angle constraint cannot be set for two parallel lines. Kut ograničenje ne može se postaviti za dvije paralelne linije. - + Cannot add an angle constraint on an axis! Nemoguće je dodati ograničenje kuta osi! - + Select two edges from the sketch. Odaberite dva ruba iz skice. - + Select two or more compatible edges. Odaberite dva ili više kompatibilnih rubova. - + Sketch axes cannot be used in equality constraints. Osi skice ne mogu se koristiti u ograničenjima jednakosti. - + Equality for B-spline edge currently unsupported. Izjednačavanje na rub B-Spline krive trenutno nije podržano. - - - - + + + + Select two or more edges of similar type. Odaberite dva ili više rubova sličnog tipa. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Odaberite dvije točke i liniju simetrije, dvije točke i točku simetrije ili liniju i točku simetrije iz skice. - - + + Cannot add a symmetry constraint between a line and its end points. Nije moguće dodati ograničenje simetrije između crte i njenih krajnjih točaka. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nemoguće je postaviti simetriju između linije i njenih vrhova! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Odaberite dvije krajnje točke linije kao zrake, rub predstavlja granicu. Prva odabrana točka odgovara indeksu n1, druga indeksu n2 a vrijednost polazišta postavlja omjer na n2/n1. - + Selected objects are not just geometry from one sketch. Odabrani objekti nisu samo geometrije iz jedne skice. - + Cannot create constraint with external geometry only. Ne možete stvoriti ograničenja samo s vanjskom geometrijom. - + Incompatible geometry is selected. Nespojiva geometrije je odabrana. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw na B-spline trenutno nije podržano. - - - - - + + + + + Select constraints from the sketch. Odaberite ograničenja sa skice. - - - + + + Select constraint(s) from the sketch. Odaberite objekt(e) sa skice. - + B-Spline Degree Grad B-krive - + Define B-Spline Degree, between 1 and %1: Definirajte stupanj B-krive, između 1 i %1: - - - + + + CAD Kernel Error CAD Kernel greška - + None of the selected elements is an edge. Nijedan odabrani element nije jedan rub. - - + + At least one of the selected objects was not a B-Spline and was ignored. Barem jedan od odabranih objekata nije bio B-Spline, i bio je zanemaren. - - + + The selection comprises more than one item. Please select just one knot. Izbor se sastoji od više od jedne stavke. Odaberite samo jedan čvor. - - + + Input Error Ulazna greška - - + + None of the selected elements is a knot of a B-spline Nijedan od odabranih elemenata nije čvor od B-spline krive - - + + Selection is empty Odabir je prazan - + Nothing is selected. Please select a b-spline. Ništa nije odabrano. Odaberite B-krivulju. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Odaberite krivulju B-krivulja da biste umetnuli čvor (ne čvor na njoj). Ako krivulja nije B-krivulja, prvo je pretvorite u jednu. - + Nothing is selected. Please select end points of curves. Ništa nije odabrano. Odaberite krajnje točke krivulja. - + Too many curves on point Previše krivulja na mjestu - - + + Exactly two curves should end at the selected point to be able to join them. Točno dvije krivulje trebaju završiti na odabranoj točki da bi se mogle spojiti. - + Too few curves on point Premalo krivulja na mjestu - + Two end points, or coincident point should be selected. Treba odabrati dvije krajnje točke ili točku koja se podudara. @@ -3391,17 +3392,17 @@ Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije Trenutno je nemoguće premjestiti vanjsku geometriju na drugi vizualni sloj. Vanjska geometrija će biti izostavljena. - + Set knot multiplicity Postavi multiplicitet čvora - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Postavite multiplicitet čvora na posljednjoj točki koju ste naveli, između 1 i %1: Imajte na umu da se multiplicitet može zanemariti u određenim okolnostima. Za detalje se obratite dokumentaciji. - + Value Error Greška vrijednosti @@ -3715,12 +3716,12 @@ Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije Duljina: - + Refractive index ratio Omjer indeksa loma - + Ratio n2/n1: Omjer n2/n1: @@ -4006,8 +4007,8 @@ Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije SketcherGui::PropertyConstraintListItem - - + + Unnamed Neimenovano @@ -4251,13 +4252,13 @@ Za stupanje na snagu zahtijeva ponovni ulazak u način uređivanja. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4278,32 +4279,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Oboje - + Auto Automatski - + Diameter Promjer - + Radius Polumjer @@ -4762,12 +4763,12 @@ Tada su vidljivi samo objekti iza ravnine skice. Primijeni na postojeće skice - + Unexpected C++ exception Neočekivani C++ izuzetak - + Sketcher Skica @@ -4775,55 +4776,55 @@ Tada su vidljivi samo objekti iza ravnine skice. SketcherGui::SketcherValidation - + No missing coincidences Slučajnosti ne nedostaju - + No missing coincidences found Slučajnosti koje ne nedostaju nema - + Missing coincidences Nema podudaranja - + %1 missing coincidences found %1 Slučajnosti nedostaje - + No invalid constraints Nema neispravnih ograničenja - + No invalid constraints found Nisu pronađena neispravna ograničenja - + Invalid constraints Neispravna ograničenja - + Invalid constraints found Pronađena neispravna ograničenja - - - + + + Reversed external geometry Obrnuta vanjska geometrija - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4836,7 +4837,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Kliknite "Zamijeni krajnje točke u ograničenja" gumb da biste ponovo pridružili krajnje točke. Napravite to samo jedanput za skice u FreeCAD prije v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4845,81 +4846,76 @@ However, no constraints linking to the endpoints were found. Međutim, nema povezanih ograničenja na krajnje točake. - + No reversed external-geometry arcs were found. Obrnuti lukovi nisu pronađeni u vanjskoj geometriji. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 promjena je napravljeno kod povezivanja ograničenja na krajnje točke od obrnutih lukova. - - + + Constraint orientation locking Zaključavanje ograničenja orijentacije - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Zaključavanje položaja je omogućeno i preračunato za %1 ograničenja. Ograničenja su navedena u kartici Ograničenja (izbornik: Kombinirani pregled -> Zadaci -> Ograničenja). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Zaključavanje položaja je onemogućeno za %1 ograničenja. Ograničenja su navedene u kartici Ograničenja (izbornik: Kombinirani pregled -> Zadaci -> Ograničenja). Imajte na umu da je za sva buduća ograničenja, zaključavanje položaja UKLJUČENO. - - + + Delete constraints to external geom. Brisanje ograničenja od vanjske geometrije. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Vi ćete izbrisati sva ograničenja koje se bave vanjskom geometrijom. To je korisno za spašavanje skica s slomljenim/ izmijenjenim linkovima na vanjske geometrije. Jeste li sigurni da želite izbrisati ograničenja? - + All constraints that deal with external geometry were deleted. Izbrisana su sva ograničenja koje se bave vanjskom geometrijom. - + No degenerated geometry Nema nevaljane geometrije - + No degenerated geometry found Nije pronađena nevaljana geometrija - + Degenerated geometry Nevaljana geometrija - + %1 degenerated geometry found %1 pronađenih nevaljanih geometrija SketcherGui::TaskSketcherConstraints - - - Form - Obrazac - Check to toggle filters @@ -4996,11 +4992,6 @@ Međutim, nema povezanih ograničenja na krajnje točake. SketcherGui::TaskSketcherElements - - - Form - Obrazac - Check to toggle filters @@ -5188,7 +5179,7 @@ Međutim, nema povezanih ograničenja na krajnje točake. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Napredna kontrola alata za rješavanje @@ -5482,8 +5473,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Prijelaz između pokazivanja i skrivanja češlja zakrivljenosti za sve (B-splines) zakrivljene linije @@ -5491,8 +5482,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Smanjuje umnožak odabranoga čvora B-spline krive @@ -5500,8 +5491,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Prijelaz između pokazivanja i skrivanja intenziteta za sve (B-splines) zakrivljene linije @@ -5509,8 +5500,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Povećati mnoštvo odabranoga čvora B-spline krive @@ -5518,8 +5509,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Prijelaz između pokazivanja i skrivanja za višestrukost čvora (B-splines) zakrivljene linije @@ -5527,8 +5518,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Prebacuje se između prikazivanja i skrivanja težine kontrolne točke za sve B-splines @@ -5538,8 +5529,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Prijelaz između pokazivanja i skrivanja kontrolnog višekutnika (B-splines) zakrivljene linije @@ -5574,8 +5565,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Popravi promjer kruga ili luka @@ -5583,7 +5574,7 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Popravi polumjer/promjer kruga ili luka @@ -5591,8 +5582,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fiksiraj radijus kruga ili luka @@ -5600,7 +5591,7 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Popravi polumjer/promjer kruga ili luka @@ -5617,8 +5608,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Stvaranje luka od svojih završnih točki i točke na luku @@ -5626,8 +5617,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Stvori krug kroz tri točke @@ -5635,8 +5626,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Stvaranje luka od njegovog središta i njegovih krajnjih točaka @@ -5644,8 +5635,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Stvaranje luka elipsa iz njegovog centra, velikog radijusa i krajnjih točaka @@ -5653,8 +5644,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Stvaranje luka hiperbole iz njegovog centra, velikog radijusa i krajnjih točaka @@ -5662,8 +5653,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Stvarane luka parabole iz fokusa, tjemene točke i krajnjih točaka @@ -5671,13 +5662,13 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateBSpline - + B-spline by control points B-spline kriva kroz kontrolne točke - - + + Create a B-spline by control points Stvaranje B-splinekrive kroz kontrolne točke @@ -5685,8 +5676,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Stvaranje kruga od njegovog središta i njegovih točaka @@ -5694,8 +5685,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Elipsa od: periapsis, apoapsis, manjeg polumjera @@ -5703,8 +5694,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Elipsa od: točke centra, točaka glavnih radijusa @@ -5712,8 +5703,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateFillet - - + + Creates a radius between two lines Stvori polumjer između dvije linije @@ -5721,8 +5712,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Stvaranje heptagona (sedmerokuta) iz središta i jednog ugla @@ -5730,8 +5721,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Stvaranje heksagona iz središta i jednog ugla @@ -5739,7 +5730,7 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateOblong - + Create a rounded rectangle Stvori zaobljeni pravokutnik @@ -5747,14 +5738,14 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Stvaranje oktagona iz središta i jednog ugla - - + + Create a regular polygon by its center and by one corner Stvaranje pravilnog višekutnika iz središta i jednog ugla @@ -5762,8 +5753,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Stvaranje pentagona iz središta i jednog ugla @@ -5771,8 +5762,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Obrub koji čuva ograničenja i točku presjeka @@ -5780,7 +5771,7 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateRectangle - + Create a rectangle Stvori pravokutnik @@ -5788,7 +5779,7 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateRectangle_Center - + Create a centered rectangle Stvori centrirani pravokutnik @@ -5796,8 +5787,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Stvaranje kvadrata iz središta i jednog ugla @@ -5805,8 +5796,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Stvaranje istostraničnog trokuta iz središta i jednog ugla @@ -5814,13 +5805,13 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Periodična B-spline kriva kroz kontrolne točke - - + + Create a periodic B-spline by control points Stvaranje B-spline krive kroz kontrolne točke @@ -6474,36 +6465,36 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Pogreška @@ -6523,45 +6514,45 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. Ograničenje ima neispravnu index informaciju i neispravno je. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Neispravno ograničenje - - - + + + Failed to add arc Nije uspjelo dodavanje luka - + Failed to add arc of ellipse Nije uspjelo dodavanje kuta elipse - + Cannot create arc of hyperbola from invalid angles, try again! Nemoguće stvoriti luk hiperbole zbog pogrešnih uglova, pokušajte ponovo! - + Cannot create arc of hyperbola Nemoguće napraviti luk hiperbole - + Cannot create arc of parabola Nemoguće napraviti luk parabole @@ -6571,18 +6562,18 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. Greška dodavanja pola B-krivulje - + Error creating B-spline pole Greška stvaranja pola B-krivulje - - + + Error creating B-spline Greška stvaranja B-krivulje - + Error deleting last pole Greška kod brisanja zadnjeg pola B-krive @@ -6593,49 +6584,49 @@ Greška kod brisanja zadnjeg pola B-krive Nemoguče dodati točku čvora - + Cannot add internal alignment points Nemoguče dodati poravnanje unutarnjih točaka - + Error removing knot Greška prilikom uklanjanja čvora - + Failed to add carbon copy Nije uspjelo dodavanje Indigo kopije - - + + Failed to add circle Nije uspjelo dodavanje kruga - + Failed to add an ellipse Nije uspjelo dodavanje elipse - + Failed to extend edge Nije uspjelo produžiti rub - + Failed to add external geometry Nije uspjelo dodavanje vanjske geometrije - + Failed to create fillet Nije uspjelo stvaranje obruba - + Failed to add line Nije uspjelo dodavanje linije @@ -6645,7 +6636,7 @@ Greška kod brisanja zadnjeg pola B-krive Nije uspjelo dodavanje točke - + Failed to add polygon Nije uspjelo dodavanje višekutnika @@ -6655,27 +6646,27 @@ Greška kod brisanja zadnjeg pola B-krive Nije uspjelo dodavanje okvira - + Failed to add rounded rectangle Nije uspjelo dodavanje zaobljenog pravokutnika - + Failed to add slot Nije uspjelo dodavanje utora - + Failed to add edge Nije uspjelo dodavanje ruba - + Failed to trim edge Nije uspjelo skraćivanje ruba - + Value Error @@ -6685,13 +6676,13 @@ Greška kod brisanja zadnjeg pola B-krive Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-krivulja kroz čvorove - - + + Create a B-spline by knots Napravi B-krivulju pomoću čvorova @@ -6699,13 +6690,13 @@ Greška kod brisanja zadnjeg pola B-krive Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodična B-krivulja kroz čvorove - - + + Create a periodic B-spline by knots Stvaranje periodične B-spline krive kroz kontrolne točke @@ -6811,12 +6802,12 @@ Točke moraju biti postavljene bliže od petine razdaljine rešetke kako bi se p CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Napravi B-krivulju pomoću čvorova - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Napravi B-krivulju kroz čvorove tj. interpolacijom na skici. @@ -6824,12 +6815,12 @@ Točke moraju biti postavljene bliže od petine razdaljine rešetke kako bi se p CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Napravi periodičnu B-spline krivulju pomoću čvorova - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Napravi periodičnu B-krivulju kroz čvorove tj. interpolacijom na skici. @@ -6837,12 +6828,12 @@ Točke moraju biti postavljene bliže od petine razdaljine rešetke kako bi se p CmdSketcherDimension - + Dimension Dimenzija - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6854,14 +6845,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimenzija + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts index 753f978df0..852e883a05 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Másolat létrehozása - + Copy the geometry of another sketch Másik vázlat geometriáinak másolatai @@ -100,27 +100,27 @@ B-görbe információs réteg mutatása/elrejtése - + Show/hide B-spline degree B-görbe fok megjelenítése/elrejtése - + Show/hide B-spline control polygon B-görbe vezérlő sokszög megjelenítése/elrejtése - + Show/hide B-spline curvature comb B-görbe görbületi fésű mutatása/elrejtése - + Show/hide B-spline knot multiplicity B-görbe csomó sokszorosságának megjelenítése/elrejtése - + Show/hide B-spline control point weight B-görbe vezérlőpont súlyának megjelenítése/elrejtése @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Kör vagy körív kényszer - + Constrain an arc or a circle Egy kör vagy körív kényszerítése - + Constrain radius Sugár illesztés - + Constrain diameter Átmérő kényszer - + Constrain auto radius/diameter Kényszeríti az automatikus sugarat/átmérőt @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Ív létrehozása - + Create an arc in the sketcher Ívet hoz létre a vázlatkészítőben - + Center and end points Közép és végpontok - + End points and rim point Végpontok és perem pont @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline B-görbe létrehozása - + Create a B-spline in the sketch Hozzon létre egy B-görbét a vázlatban @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Kör rajzolása - + Create a circle in the sketcher Kör létrehozása a vázlatkészítőben - + Center and rim point Közép- és a perem pont - + 3 rim points 3 perem pont @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Kúpszelet létrehozás - + Create a conic in the sketch Létrehoz egy kúp ívet a vázlaton - + Ellipse by center, major radius, point Ellipszis központtal, fő sugárral, ponttal - + Ellipse by periapsis, apoapsis, minor radius Ellipszis periapsis-al, apoapsis-al, alárendelt sugárral - + Arc of ellipse by center, major radius, endpoints Ellipszis ív központtal, fő sugárral, végpontokkal - + Arc of hyperbola by center, major radius, endpoints Hiperbola ív központtal, fő sugárral, végpontokkal - + Arc of parabola by focus, vertex, endpoints Parabola fókusszal, csúcsponttal, végpontokkal @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Lekerekítés létrehozása - + Create a fillet between two lines Létrehoz egy lekerekítést két vonal közt - + Sketch fillet Vázlat lekerekítés - + Constraint-preserving sketch fillet Kényszer-megőrzési vázlat lekerekítés @@ -299,17 +299,17 @@ Téglalap létrehozása a vázlatban - + Rectangle Téglalap - + Centered rectangle Középre tett téglalap - + Rounded rectangle Lekerekített téglalap @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Szabályos sokszög létrehozása - + Create a regular polygon in the sketcher Szabályos sokszög létrehozása a vázlatkészítőben - + Triangle Háromszög - + Square Négyzet - + Pentagon Ötszög - + Hexagon Hatszög - + Heptagon Hétszög - + Octagon Nyolcszög - + Regular polygon Szabályos sokszög @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Sokszög módosítása - + Modifies the multiplicity of the selected knot of a B-spline A kiválasztott B-görbe sokszöge sokszorozásának módosítása - + Increase knot multiplicity Sokszög növelése - + Decrease knot multiplicity Sokszög csökkentése @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Szög zárolása - + Fix the angle of a line or the angle between two lines Rögzítsen szöget a vonalon, vagy a szöget két vonalon @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Kényszerítő kocka - + Block the selected edge from moving A kijelölt él mozgásának letiltása @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Egymásra llesztés - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Konvergens kényszer létrehozása pontok között vagy koncentrikus kötés létrehozása körök, ívek és ellipszisek között @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Átmérő kényszer - + Fix the diameter of a circle or an arc Rögzíteni egy kör vagy egy ív átmérőjét @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Távolság kényszer - + Fix a length of a line or the distance between a line and a vertex or between two circles Vonal hosszának rögzítése vagy adott távolság tartása két kör között @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Vízszintes távolság zárolása - + Fix the horizontal distance between two points or line ends Két pont közötti vagy vonal végek közötti vízszintes távolság zárolása @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Függőleges távolság kényszerítése - + Fix the vertical distance between two points or line ends Két pont közötti vagy vonal végek közötti függőleges távolság zárolása @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Illesztás megtartása - + Create an equality constraint between two lines or between circles and arcs Hozzon létre egy egyenlőség illesztést két vonal között, illetve körök és ívek között @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Vízszintes illesztés - + Create a horizontal constraint on the selected item Vízszintes illesztés létrehozása a kiválasztott elemen @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Illesztés zárolása - + Create both a horizontal and a vertical distance constraint on the selected vertex Vízszintes és függőleges távolságkényszerítés létrehozása @@ -520,12 +520,12 @@ a kijelölt csúcsponton CmdSketcherConstrainParallel - + Constrain parallel Párhuzamosság tartása - + Create a parallel constraint between two lines Két vonal közötti párhuzamos kényszerítés @@ -533,12 +533,12 @@ a kijelölt csúcsponton CmdSketcherConstrainPerpendicular - + Constrain perpendicular Merőleges illesztés - + Create a perpendicular constraint between two lines Merőleges illesztést hoz létre két vonal közt @@ -546,12 +546,12 @@ a kijelölt csúcsponton CmdSketcherConstrainPointOnObject - + Constrain point onto object A pont illesztése a tárgyra - + Fix a point onto an object Pont rögzítése egy tárgyra @@ -559,12 +559,12 @@ a kijelölt csúcsponton CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Kényszeríti az automatikus sugarat/átmérőt - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Beállítja az átmérőt kör kiválasztásakor, illetve a sugarat, ha ív/görbe pólus van kiválasztva @@ -572,12 +572,12 @@ a kijelölt csúcsponton CmdSketcherConstrainRadius - + Constrain radius or weight Kényszersugár vagy súly - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Beállítja egy kör vagy ív sugarát, vagy beállítja a B-görbe pólus súlyát @@ -585,12 +585,12 @@ a kijelölt csúcsponton CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Illesztés törésmutatója (Snellius–Descartes-törvény) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Hozzon létre egy fénytörés törvény (Snellius-törvény) kényszerítést sugarak két végpontja között és egy élt mint határfelületet. @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Szimmetria illesztés - + Create a symmetry constraint between two points with respect to a line or a third point Állítsa be a szimmetriát két pont között egy vonalhoz vagy egy harmadik ponthoz képest @@ -613,12 +613,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Érintő illesztés - + Create a tangent constraint between two entities Hozzon létre egy érintő illesztést két rész között @@ -626,12 +626,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Függőleges illesztés - + Create a vertical constraint on the selected item Függőleges kényszerítés alkalmazása a kijelölt elemen @@ -639,12 +639,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Geometria átalakítása a B-görbévé - + Converts the selected geometry to a B-spline Az adott geometria konvertálása egy B-görbévé @@ -665,12 +665,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Ív létrehozása három ponttal - + Create an arc by its end points and a point along the arc Ívet hoz létre az ív végpontjaival és egy ív menti ponttal @@ -678,12 +678,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Kör létrehozása három ponttal - + Create a circle by 3 perimeter points Kör létrehozása 3 kerületi ponttal @@ -691,12 +691,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Ív létrehozása középpont kijelöléssel - + Create an arc by its center and by its end points Ívet hoz létre a középpontjával és a végpontokkal @@ -704,12 +704,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Ellipszisív létrehozása - + Create an arc of ellipse in the sketch Létrehoz egy ellipszis ívet a vázlaton @@ -717,12 +717,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Hiperbolaív létrehozása - + Create an arc of hyperbola in the sketch Létrehoz egy hiperbola ívet a vázlaton @@ -730,12 +730,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Parabolaív létrehozása - + Create an arc of parabola in the sketch Létrehoz egy parabola ívet a vázlaton @@ -743,12 +743,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline B-görbe létrehozása - + Create a B-spline by control points in the sketch. Létrehoz egy B-görbét ellenőrző ponttokkal a vázlaton. @@ -756,12 +756,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Kör rajzolása - + Create a circle in the sketch Kör rajzolása a vázlaton @@ -769,12 +769,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Létrehoz egy 3 pontos ellipszist - + Create an ellipse by 3 points in the sketch Létrehoz egy 3 pontos ellipszist a vázlaton @@ -782,12 +782,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Ellipszis létrehozása középponttal - + Create an ellipse by center in the sketch Ellipszis létrehozása középponttal a vázlaton @@ -795,12 +795,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Lekerekítés létrehozása - + Create a fillet between two lines or at a coincident point Lekerekítés létrehozása két vonal között vagy egybeeső pontok közt @@ -808,12 +808,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Hétszög létrehozása - + Create a heptagon in the sketch Egy hétszög létrehozása a vázlaton @@ -821,12 +821,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Hatszög létrehozása - + Create a hexagon in the sketch Egy hatszög létrehozása a vázlaton @@ -860,12 +860,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Nyolcszög létrehozása - + Create an octagon in the sketch Egy nyolcszög létrehozása a vázlaton @@ -873,12 +873,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Ötszög létrehozása - + Create a pentagon in the sketch Egy ötszög létrehozása a vázlaton @@ -886,12 +886,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Időszakos B-görbe létrehozása - + Create a periodic B-spline by control points in the sketch. Létrehoz egy időszakos B-görbét ellenőrző ponttokkal a vázlaton. @@ -899,12 +899,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Pont létrehozása - + Create a point in the sketch Pont létrehozása a vázlaton @@ -912,12 +912,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Sarokmegőrző lekerekítés létrehozása - + Fillet that preserves intersection point and most constraints Lekerekítés a metszéspont és a legtöbb kényszerítés megörzésével @@ -925,12 +925,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Vonallánc rajzolása - + Create a polyline in the sketch. 'M' Key cycles behaviour Vonallánc létrehozása a vázlatban. Az 'M' billentyűvel váltogathat a módok közt @@ -964,12 +964,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Szabályos sokszög létrehozása - + Create a regular polygon in the sketch Egy szabályos sokszög létrehozása a vázlatban @@ -977,12 +977,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Hozzon létre nyílást - + Create a slot in the sketch Hozzon létre egy nyílást a vázlatban @@ -990,12 +990,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Négyzet létrehozása - + Create a square in the sketch Egy négyszög létrehozása a vázlaton @@ -1003,12 +1003,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Egyenlő oldalú háromszög létrehozása - + Create an equilateral triangle in the sketch Egyenlő oldalú háromszög létrehozása a vázlaton @@ -1016,12 +1016,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Csökkentse a B-görbe mértékét - + Decreases the degree of the B-spline Csökkenti a B-görbe fokát @@ -1029,12 +1029,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Sokszög csökkentése - + Decreases the multiplicity of the selected knot of a B-spline A kiválasztott B-görbe sokszöge sokszorozásának csökkentése @@ -1081,12 +1081,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Él meghosszabbítás - + Extend an edge with respect to the picked position Hosszabbítson meg egy élt a kiválasztott pozíció figyelembe vételével @@ -1094,12 +1094,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Külső geometria létrehozása - + Create an edge linked to an external geometry Hozzon létre egy szegélyt, csatolva a külső geometriához @@ -1107,12 +1107,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Növelje a B-görbe mértékét - + Increases the degree of the B-spline Növeli a B-görbe fokát @@ -1120,12 +1120,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Sokszög növelése - + Increases the multiplicity of the selected knot of a B-spline A kiválasztott B-görbe sokszöge sokszorozásának növelése @@ -1133,12 +1133,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Csomó beszúrása - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Csomót illeszt be az adott paraméterhez. Ha egy csomó már létezik az adott paraméternél, akkor a szorzása eggyel növekszik. @@ -1146,12 +1146,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Görbék összekapcsolása - + Join two curves at selected end points Két görbe összekapcsolása a kiválasztott végpontokon @@ -1438,12 +1438,12 @@ A 'Támogatás' tulajdonság törlődik, ha van. CmdSketcherSplit - + Split edge Él felosztás - + Splits an edge into two while preserving constraints Kettévágja az éleket, miközben megőrzi a kényszerítéseket @@ -1464,12 +1464,12 @@ A 'Támogatás' tulajdonság törlődik, ha van. CmdSketcherSwitchVirtualSpace - + Switch virtual space Virtuális terület váltása - + Switches the selected constraints or the view to the other virtual space Kiválasztott kényszerítés vagy nézet átváltása a másik virtuális területre @@ -1490,12 +1490,12 @@ A 'Támogatás' tulajdonság törlődik, ha van. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Kényszerítés bekapcsolása/kikapcsolása - + Activates or deactivates the selected constraints A kijelölt kényszerítések engedélyezése vagy letiltása @@ -1516,12 +1516,12 @@ A 'Támogatás' tulajdonság törlődik, ha van. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Kényszerítés váltása a meghatározott és a megjelenített között - + Set the toolbar, or the selected constraints, into driving or reference mode Állítsa be az eszköztárat vagy a kijelölt kényszerítéseket, @@ -1531,12 +1531,12 @@ megvezetett vagy hivatkozási üzemmódban CmdSketcherTrimming - + Trim edge Él vágása - + Trim an edge with respect to the picked position Él levágása, tekintettel a kiválasztott helyzetre @@ -1595,369 +1595,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Vízszintes kényszerítés hozzáadása - - - + + + Add horizontal alignment Vízszintes igazítást hozzáadása - - + + Add vertical constraint Függőleges kényszerítést hozzáadása - + Add vertical alignment Függőleges igazítás hozzáadása - + Add 'Lock' constraint 'Zár' kényszerítés hozzáadása - + Add relative 'Lock' constraint Viszonyított 'Zár' kényszerítés hozzáadása - + Add fixed constraint Rögzített kényszerítést ad hozzá - + Add 'Block' constraint 'Blokk' kényszerítés hozzáadása - + Add block constraint Blokk kényszerítés hozzáadása - - - + + + Add coincident constraint Véletlenszerű kényszerítés hozzáadása - - + + Add distance from horizontal axis constraint Vízszintes tengelymegkötéstől való távolság hozzáadása - - + + Add distance from vertical axis constraint Függőleges tengelymegkötéstől való távolság hozzáadása - - + + Add point to point distance constraint Ponttól pontig távolság kényszerítést ad hozzá - - - + + + Add point to line Distance constraint Ponttól a vonalig távolság kényszerítést ad hozzá - - + + Add circle to circle distance constraint Kör hozzáadása a kör távolsági kényszerítéséhez - + Add circle to line distance constraint Kör hozzáadása a vonal távolsági kényszerítéséhez - - - - - + + + + + + Add length constraint Hossz kényszerítés hozzáadása - - + + Dimension Dimenzió - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Pont a tárgyon kényszerítés hozzáadása - - + + Add point to point horizontal distance constraint Ponttól pontig vízszintes távolság kényszerítés hozzáadása - + Add fixed x-coordinate constraint Rögzített x-koordináta kényszerítés hozzáadása - - + + Add point to point vertical distance constraint Ponttól pontig függőleges távolság kényszerítés hozzáadása - + Add fixed y-coordinate constraint Rögzített y-koordináta kényszerítés hozzáadása - - + + Add parallel constraint Párhuzamos kényszerítés hozzáadása - - - - - - - + + + + + + + Add perpendicular constraint Merőleges kényszerítés hozzáadása - + Add perpendicularity constraint Függőlegesség kényszerítés hozzáadása - + Swap coincident+tangency with ptp tangency Egybeeső érintő felcserélése ptp érintővel - + Swap PointOnObject+tangency with point to curve tangency Felcseréli a tárgyat+érintőpontot a görbe érintőpontjához ponttal - - - - - - - + + + + + + + Add tangent constraint Érintő kényszerítés hozzáadása - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Érintő pont kényszerítés hozzáadása - - - - + + + + Add radius constraint Sugár kényszerítés hozzáadása - - - - + + + + Add diameter constraint Átmérőhöz kényszerítés hozzáadása - - - - + + + + Add radiam constraint Sugár/átm-kényszer hozzáadása - - - - - - + + + + + + Add angle constraint Szöghöz kényszerítés hozzáadása - - + + Add equality constraint Egyenlőség kényszerítés hozzáadása - - - - - + + + + + Add symmetric constraint Szimmetrikus kényszerítés hozzáadása - + Add Snell's law constraint Fénytörés (Snellius-törvény) kényszerítés hozzáadása - + Toggle constraint to driving/reference Kényszerítés váltása megvezetés/hivatkozás közt - + Activate/Deactivate constraint Kényszerítés bekapcsolása/kikapcsolása @@ -2017,44 +2018,44 @@ invalid constraints, degenerated geometry, etc. Központosított vázlatmező hozzáadása - + Add rounded rectangle Lekerekített téglalap hozzáadása - + Add line to sketch wire Egyenes hozzáadása a vázlat hálóhoz - + Add arc to sketch wire Ív hozzáadása a vázlathálóhoz - - + + Add sketch arc Vázlat ív hozzáadása - - + + Add sketch circle Vázlat kör hozzáadása - + Add sketch ellipse Vázlat ellipszis hozzáadása - + Add sketch arc of ellipse Ellipszis vázlatív hozzáadása - + Add sketch arc of hyperbola Hiperbola vázlatív hozzáadása @@ -2074,33 +2075,33 @@ invalid constraints, degenerated geometry, etc. Vázlat pont hozzáadása - - + + Create fillet Lekerekítés létrehozása - + Trim edge Él vágása - + Extend edge Él meghosszabbítás - + Split edge Él felosztás - + Add external geometry Külső geometria hozzáadása - + Add slot Horony hozzáadása @@ -2110,37 +2111,37 @@ invalid constraints, degenerated geometry, etc. Hatszög hozzáadása - + Convert to NURBS Konvertálás NURBS-re - + Increase spline degree Görbe mértékének növelése - + Decrease spline degree Görbe mértékének csökkentése - + Increase knot multiplicity Sokszög növelése - + Decrease knot multiplicity Sokszög csökkentése - + Insert knot Csomó beszúrása - + Join Curves Görbák összekapcsolása @@ -2180,12 +2181,12 @@ invalid constraints, degenerated geometry, etc. Tengelyek igazításának eltávolítása - + Toggle constraints to the other virtual space Kényszerítések átkapcsolása a másik virtuális térre - + @@ -2193,7 +2194,7 @@ invalid constraints, degenerated geometry, etc. A kényszerítés virtuális helyének frissítése - + Add auto constraints Automatikus kényszerítés hozzáadása @@ -2233,7 +2234,7 @@ invalid constraints, degenerated geometry, etc. Csomópont hozzáadása - + Create a carbon copy Egy új másolat létrehozása @@ -2249,37 +2250,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Autókényszer hiba: megoldhatatlan vázlat egybeeső kényszerek alkalmazása mellett. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Autókényszer hiba: megoldhatatlan vázlat függőleges/vízszintes megkötések alkalmazása mellett. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Autókényszer hiba: megoldhatatlan vázlat egyenlőség kényszerek alkalmazása mellett. - + Autoconstrain error: Unsolvable sketch without constraints. Autókényszer hiba: megoldhatatlan kényszerek nélküli vázlat. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Autókényszer hiba: megoldhatatlan vázlat függőleges/vízszintes kényszerek alkalmazása után. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Autókényszer hiba: megoldhatatlan vázlat pont-a-ponton kényszerek alkalmazása után. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Autókényszer hiba: megoldhatatlan vázlat egyenlőségi kényszer alkalmazása után. @@ -2404,143 +2405,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2556,9 +2557,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Rossz kijelölés @@ -2579,329 +2580,329 @@ invalid constraints, degenerated geometry, etc. Méretezett illesztés - + Cannot add a constraint between two external geometries. Két külső geometria között nem lehet kényszerítés hozzáadni. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nem lehet kényszerítést hozzáadni két rögzített geometria közé. A rögzített geometriák közé tartozik a külső geometria, a blokkolt geometria és a speciális pontok, például a B-görbe csomópontok. - + Sketcher Constraint Substitution Vázlatolói kényszerítés helyettesítése - + Keep notifying me of constraint substitutions Folyamatosan értesítsen a kényszerítés helyettesítéséről - - - + + + Only sketch and its support are allowed to be selected. Csak vázlat és annak támogatása választható ki. - + One of the selected has to be on the sketch. Az egyik kiválasztottnak szerepelnie kell a vázlaton. - - + + Select an edge from the sketch. Egy él kiválasztása a vázlaton. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Lehetetlen kényszerítés - - - - + + + + The selected edge is not a line segment. A kiválasztott él nem egy egyenes szakasz. - - - - - - + + + + + + Double constraint Kettős kényszerítés - - - - - + + + + + The selected edge already has a horizontal constraint! A kiválasztott él már rendelkezik egy vízszintes kényszerítéssel! - - - + + + The selected edge already has a vertical constraint! A kiválasztott él már rendelkezik egy függőleges kényszerítéssel! - - - - - - + + + + + + The selected edge already has a Block constraint! A kijelölt élnek már van blokk kényszerítése! - + The selected item(s) can't accept a horizontal constraint! A kiválasztott elem(ek) nem fogadják el a vízszintes illesztést! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Több mint egy rögzített pontot választott. Válasszon legfeljebb egy rögzített pontot! - + The selected item(s) can't accept a vertical constraint! A kiválasztott elem(ek) nem fogadják el a függőleges illesztést! - - - + + + Select vertices from the sketch. Válasszon sarkokat a vázlatból. - + Select one vertex from the sketch other than the origin. Jelöljön ki a vázlaton egy, a kiindulási ponttól eltérő, végpontot. - + Select only vertices from the sketch. The last selected vertex may be the origin. Csak sarkokat válasszon a vázlatból. Az utoljára kiválasztott végpont lehet a kezdőpont. - + Wrong solver status Rossz a megoldó állapota - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Egy blokk kényszerítést nem adhat hozzá, ha a vázlat megoldatlan vagy felesleges és ellentmondó kényszerítései vannak. - + Select one edge from the sketch. Válasszon egy élt a vázlaton. - + Select only edges from the sketch. Csak éleket válasszon a vázlaton. - + Number of selected objects is not 3 A kijelölt tárgyak száma nem 3 - - - + + + Error Hiba - + Unexpected error. More information may be available in the Report View. Váratlan hiba. További információ a Jelentés nézetben érhető el. - + Endpoint to endpoint tangency was applied instead. Végpont-végpont érintőt alkalmazott helyette. - + Select two or more points from the sketch. Jelöljön ki két vagy több pontot a vázlatból. - + Select two or more vertices from the sketch. Jelöljön ki két vagy több csúcspontot a vázlatból. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Válasszon két vagy több csúcsot a vázlatból az egybeeső kényszerítéshez, vagy legalább két kört, ellipszist, ívet vagy elliptikus ívet a koncentrikus kényszerhez. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Válasszon két csúcsot a vázlatból az egybeeső kényszerítéshez, vagy két kört, ellipszist, ívet vagy elliptikus ívet a koncentrikus kényszerhez. - + Select exactly one line or one point and one line or two points from the sketch. Válasszon ki pontosan egy sort vagy egy pontot és egy sort és két pontot a vázlatból. - + Cannot add a length constraint on an axis! Nem adható hozzá a hosszanti illesztés egy tengelyen! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Válasszon ki pontosan egy vonalat vagy egy pontot és egy vonalat vagy két pontot vagy két kört a vázlatból. - + This constraint does not make sense for non-linear curves. Ennek a kényszerítésnek nincs értelme a nem-lineáris görbéknél. - + Endpoint to edge tangency was applied instead. Ehelyett a végpont és az él érintője került alkalmazásra. - - - - - - - + + + + + + + Select the right things from the sketch. Válassza ki a megfelelő dolgokat a vázlatból. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Jelöljön ki egy olyan élt, amely nem B-görbe vastagságú. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. A kijelölt pontok egyike sem volt korlátozva a megfelelő görbékre, mivel ugyanannak az elemnek a részei, valamint mindkettő külső geometria, vagy mert az éle nem megfelelő. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. A kijelölt pontok egyike sincs kényszerítve a vonatkozó görbékhez, mert azok részei ugyanannak az elemnek, vagy azért, mert mindkét külső geometria. - - - - + + + + Select exactly one line or up to two points from the sketch. Válasszon ki pontosan egy vonalat, vagy legfeljebb két pontot a vázlatból. - + Cannot add a horizontal length constraint on an axis! Nem lehet hozzáadni egy vízszintes hosszanti illesztést egy tengelyen! - + Cannot add a fixed x-coordinate constraint on the origin point! Nem adható hozzá a rögzített x-koordináta illesztése a kezdő ponthoz! - - + + This constraint only makes sense on a line segment or a pair of points. Ez a kényszerítés csak egy vonalszakaszon vagy egy pont páron érvényesül. - + Cannot add a vertical length constraint on an axis! Nem adható hozzá a függőleges hosszanti illesztés egy tengelyen! - + Cannot add a fixed y-coordinate constraint on the origin point! Nem adható hozzá a rögzített y-koordináta illesztése a kezdő ponthoz! - + Select two or more lines from the sketch. Válasszon ki két vagy több vonalat a vázlatból. - - + + Select at least two lines from the sketch. Válasszon ki legalább két vonalat a vázlatból. - + Select a valid line. Válasszon ki egy érvényes egyenest. - - + + The selected edge is not a valid line. A kiválasztott él nem egy érvényes egyenes. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpont; két görbe és egy pont. - + Select some geometry from the sketch. perpendicular constraint Válasszon ki néhány geometriát a vázlatból. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nem lehet hozzáadni a függőlegesség illesztést a független ponton! - - - + + + Perpendicular to B-spline edge currently unsupported. Merőleges a B-görbe élre, jelenleg nem támogatott. - - + + One of the selected edges should be a line. Az egyik kijelölt élnek egy vonalnak kell lennie. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Végpont-végpont érintőt alkalmazott. Az egybeeső kényszerítést törölve lett. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Végponttól az élig érintőt alkalmaztak. A tárgy kényszerítés pontját törölték. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpont; két görbe és egy pont. - + Select some geometry from the sketch. tangent constraint Válasszon ki néhány geometriát a vázlatból. - - - + + + Cannot add a tangency constraint at an unconnected point! Nem lehet hozzáadni egy érintő illesztést a független ponton! - - + + Tangent constraint at B-spline knot is only supported with lines! A B-görbe csomó érintő kényszerítését csak vonalak támogatják! - + B-spline knot to endpoint tangency was applied instead. B-görbe csomó a végponthoz érintőt alkalmazott helyette. - + Select either one point and several curves, or one curve and several points. Válasszon ki egy pontot és több görbét, vagy egy görbét és több pontot. - - + + Wrong number of selected objects! Kijelölt objektumok téves mennyisége! - - + + With 3 objects, there must be 2 curves and 1 point. 3 tárggyal, két görbének és 1 pontnak kell lennie. - - - + + + Tangency to B-spline edge currently unsupported. Érintő B-görbe élével jelenleg nem támogatott. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Válasszon egy vagy több ívet vagy kört a vázlatból. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Jelöljön ki egy vagy több B-görbe pólust, vagy egy vagy több ívet vagy kört a vázlatból, de nem keverve. - - - + + + Constraint only applies to arcs or circles. Kényszerítés csak az ívekre és körökre vonatkozik. - - + + Select one or two lines from the sketch. Or select two edges and a point. Válasszon egy vagy két vonalat a vázlatból. Vagy válasszon ki két élet és egy pontot. - - + + Parallel lines Párhuzamos vonalak - - + + An angle constraint cannot be set for two parallel lines. Egy szög kényszerítést nem lehet beállítani két párhuzamos vonalra. - + Cannot add an angle constraint on an axis! Nem lehet hozzáadni egy szög illesztést egy tengelyhez! - + Select two edges from the sketch. Két él kiválasztása a vázlaton. - + Select two or more compatible edges. Válasszon ki két vagy több kompatibilis élt. - + Sketch axes cannot be used in equality constraints. Vázlat tengelyek nem használhatók egyenlőségi kényszerítésekhez. - + Equality for B-spline edge currently unsupported. Egyenlőség B-görbe élével jelenleg nem támogatott. - - - - + + + + Select two or more edges of similar type. Jelöljön ki két vagy több hasonló típusú élt. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Válasszon ki két pontot és egy szimmetria vonalat, két pontot és egy szimmetria pontot vagy egy vonalat és egy szimmetria pontot a vázlatból. - - + + Cannot add a symmetry constraint between a line and its end points. Nem lehet hozzáadni a szimmetria kényszerítést a vonalhoz és annak végpontjaihoz. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nem lehet hozzáadni a szimmetria illesztést a vonalhoz és annak végpontjaihoz! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Jelöljön ki két vonalvégpontot sugarakként, és egy szegélyt jelölő élt. Az első kijelölt pont megfelel az n1 indexnek, a második az n2-nek, és a méretadat állítja be az n2/n1 arányt. - + Selected objects are not just geometry from one sketch. A kijelölt tárgyak nem csak egy vázlat geometriái. - + Cannot create constraint with external geometry only. Kényszerítést nem lehet szimplán külső geometriával létrehozni. - + Incompatible geometry is selected. Inkompatibilis geometriát jelölt ki. - + SnellsLaw on B-spline edge is currently unsupported. A Snellius–Descartes-törvény a B-görbe élén jelenleg nem támogatott. - - - - - + + + + + Select constraints from the sketch. Válasszon kényszerítéseket a vázlatból. - - - + + + Select constraint(s) from the sketch. Jelölje ki a vázlatból a kényszerítés(eke)t. - + B-Spline Degree B-görbe fok - + Define B-Spline Degree, between 1 and %1: Határozza meg a B-görbe fokot 1 és %1 között: - - - + + + CAD Kernel Error CAD rendszermag hiba - + None of the selected elements is an edge. A kiválasztott elemek közül egyik sem él. - - + + At least one of the selected objects was not a B-Spline and was ignored. A kijelölt objektumok legalább egyike nem volt egy B-görbe, és figyelmen kívül lett hagyva. - - + + The selection comprises more than one item. Please select just one knot. A kiválasztás magában foglal egynél több tételt. Kérem csak egy csomópontot válasszon. - - + + Input Error Beviteli hiba - - + + None of the selected elements is a knot of a B-spline Kiválasztott elemek közül egyik sem B-görbe csomópont - - + + Selection is empty A kijelölési terület nem tartalmaz objektumokat - + Nothing is selected. Please select a b-spline. Semmi sincs kiválasztva. Kérjük, válasszon egy B-görbét. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Válasszon ki egy összetett B-görbét egy csomópont beszúrásához (ne csomópontot rajta). Ha a görbe nem összetett B-görbe, először alakítsa át. - + Nothing is selected. Please select end points of curves. Semmit nincs kiválasztva. Kérjük, válassza ki a görbék végpontjait. - + Too many curves on point Túl sok görbe a ponton - - + + Exactly two curves should end at the selected point to be able to join them. Pontosan két görbének kell véget érnie a kiválasztott ponton, hogy illeszkedjenek. - + Too few curves on point Túl kevés görbe a ponton - + Two end points, or coincident point should be selected. Válasszon ki két végpontot vagy egy átfedő pontot. @@ -3306,17 +3307,17 @@ Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpon Jelenleg nem támogatott a külső geometria áthelyezése egy másik vizuális rétegre. A külső geometria kimarad - + Set knot multiplicity Csomó szorzatának beállítása - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Állítsa be a csomó szorzatát az utolsó megadott ponton, 1 és %1 között:Vegye figyelembe, hogy a szorzatot bizonyos körülmények között figyelmen kívül lehet hagyni.A részleteket lásd a dokumentációban - + Value Error Értékhiba @@ -3630,12 +3631,12 @@ Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpon Hossz: - + Refractive index ratio Refraktív index arány - + Ratio n2/n1: Arány n2/n1: @@ -3915,8 +3916,8 @@ Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpon SketcherGui::PropertyConstraintListItem - - + + Unnamed Névtelen @@ -4148,13 +4149,13 @@ A hatályba lépéshez újra be kell lépnie a szerkesztési módba. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4175,32 +4176,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Mindkettő - + Auto Automatikus - + Diameter Átmérő - + Radius Sugár @@ -4649,12 +4650,12 @@ A tárgyak csak a vázlatsík mögött lesznek láthatók. Alkalmazza a meglévő vázlatokhoz - + Unexpected C++ exception Váratlan C++ kivétel - + Sketcher Vázlatkészítő @@ -4662,55 +4663,55 @@ A tárgyak csak a vázlatsík mögött lesznek láthatók. SketcherGui::SketcherValidation - + No missing coincidences Nincsenek hiányzó egybeesések - + No missing coincidences found Nem található hiányzó egybeesés - + Missing coincidences Hiányzó egybeesések - + %1 missing coincidences found %1 hiányzó egybeesést talált - + No invalid constraints Nincs érvényes kényszerítés - + No invalid constraints found Nem talált érvényes kényszerítést - + Invalid constraints Érvénytelen illesztés - + Invalid constraints found Érvénytelen kényszerítést talált - - - + + + Reversed external geometry Fordított külső geometria - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4723,7 +4724,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only "Kényszerítés végpontjait cseréli fel" gombra kattintva a végpontokat újrarendezi. Csak egyszer végezze el a FreeCAD v0.15.???, vagy régebbi vázlatokkal - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4732,75 +4733,70 @@ However, no constraints linking to the endpoints were found. Azonban, nem találhatók a végpontokhoz kötött kényszerítések. - + No reversed external-geometry arcs were found. Fordított külső-geometria ívek nem találhatóak. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 módosítás volt a visszafordított ívek végpontjaihoz kötött kényszerítéseken. - - + + Constraint orientation locking Kényszerítés orientáció zárolás - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Tájolás zárolás és újraszámítás volt engedélyezve a %1 kényszerítésen. A kényszerítés listázásra került a jelentés nézetben (Nézet menü -> Panelek -> jelentés nézetben). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Tájolás zár letiltásra került a %1 kényszerítésen. A kényszerítés listázásra került a jelentés nézetben (Nézet menü-> Panelek -> jelentés nézetben). Vegye figyelembe, hogy minden jövőbeli kényszerítésen a zár alapértelmezetten bekapcsolt. - - + + Delete constraints to external geom. Törli a külső geom. kényszerítést. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Közel áll az ÖSSZES külső geometriához tartozó kényszerítés törléséhez. Ez hasznos a tört/megváltozott külső geometriákat elérő vázlatok megmentéséhez. Biztosan törli a kényszerítéseket? - + All constraints that deal with external geometry were deleted. Az összes külső geometriával foglalkozó kényszerítés törlésre került. - + No degenerated geometry Nincs korcs geometria - + No degenerated geometry found Nem talált korcs geometriát - + Degenerated geometry Korcs geometria - + %1 degenerated geometry found %1 korcs geometriát talált SketcherGui::TaskSketcherConstraints - - - Form - Űrlap - Check to toggle filters @@ -4875,11 +4871,6 @@ Azonban, nem találhatók a végpontokhoz kötött kényszerítések. SketcherGui::TaskSketcherElements - - - Form - Űrlap - Check to toggle filters @@ -5065,7 +5056,7 @@ Azonban, nem találhatók a végpontokhoz kötött kényszerítések. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Speciális megoldó vezérlő @@ -5356,8 +5347,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Kapcsoló az összes B-görbéhez a görbület fésű megjelenítéséhez és elrejtéséhez @@ -5365,8 +5356,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline A kiválasztott B-görbe sokszöge sokszorozásának csökkentése @@ -5374,8 +5365,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Kapcsoló az összes B-görbéhez a görbület fokok megjelenítéséhez és elrejtéséhez @@ -5383,8 +5374,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline A kiválasztott B-görbe sokszöge sokszorozásának növelése @@ -5392,8 +5383,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Kapcsoló az összes B-görbéhez a sokszög megjelenítéséhez és elrejtéséhez @@ -5401,8 +5392,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Váltás a vezérlőpont súlyának megjelenítése és elrejtése között az összes B-görbén @@ -5410,8 +5401,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Kapcsoló az összes B-görbéhez a vezérlő sokszög megjelenítéséhez és elrejtéséhez @@ -5446,8 +5437,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Rögzíteni egy kör vagy egy ív átmérőjét @@ -5455,7 +5446,7 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Sugár/Átmérő illesztése körre vagy ívre @@ -5463,8 +5454,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Sugár illesztése körre vagy ívre @@ -5472,7 +5463,7 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Sugár/Átmérő illesztése körre vagy ívre @@ -5489,8 +5480,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Ívet hoz létre az ív végpontjaival és egy ív menti ponttal @@ -5498,8 +5489,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Kört hoz létre 3 határoló ponttal @@ -5507,8 +5498,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Ívet hoz létre a középpontjával és a végpontokkal @@ -5516,8 +5507,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Ellipszisív létrehozása a középpontjával, a fő sugarával és a végpontjaival @@ -5525,8 +5516,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Hiperbola ív létrehozása középpontjával, fő sugarával és végpontjaival @@ -5534,8 +5525,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Létrehoz egy parabola ívet fókusszal, csúcsponttal, és végpontokkal @@ -5543,13 +5534,13 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateBSpline - + B-spline by control points B-görbe ellenőrzési pontokkal - - + + Create a B-spline by control points Létrehoz egy B-görbét ellenőrzési pontokkal @@ -5557,8 +5548,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Kört hoz létre annak középpontjával és egy határoló ponttal @@ -5566,8 +5557,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Létrehoz egy ellipszist a peri apszis, apoapszis és mellék sugárból @@ -5575,8 +5566,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Létrehoz egy ellipszist a középpontból, a fő sugárból és pontból @@ -5584,8 +5575,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateFillet - - + + Creates a radius between two lines Sugarat hoz létre két vonal között @@ -5593,8 +5584,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Létrehoz egy hétszöget a középpontból és egy sarokból @@ -5602,8 +5593,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Létrehoz egy hatszöget a középpontból és egy sarokból @@ -5611,7 +5602,7 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateOblong - + Create a rounded rectangle Egy lekerekített téglalapot hoz létre @@ -5619,14 +5610,14 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Létrehoz egy nyolcszöget a középpontból és egy sarokból - - + + Create a regular polygon by its center and by one corner Létrehoz egy egyszerű sokszöget a középpontból és egy sarokból @@ -5634,8 +5625,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Létrehoz egy ötszöget a középpontból és egy sarokból @@ -5643,8 +5634,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Kényszerítéseket és metszéspontokat fenntartó lekerekítés @@ -5652,7 +5643,7 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateRectangle - + Create a rectangle Téglalap létrehozása @@ -5660,7 +5651,7 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateRectangle_Center - + Create a centered rectangle Középre tett téglalap létrehozása @@ -5668,8 +5659,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Létrehoz egy négyszöget a középpontból és egy sarokból @@ -5677,8 +5668,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Létrehoz egy egyenlő oldalú háromszöget a középpontból és egy sarokból @@ -5686,13 +5677,13 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Időszakos B-görbe ellenőrzési pontokkal - - + + Create a periodic B-spline by control points Létrehoz egy időszakos B-görbét ellenőrzési pontokkal @@ -6325,36 +6316,36 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Hiba @@ -6374,45 +6365,45 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.A korlátozás érvénytelen indexinformációval rendelkezik, és rosszul formázott. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Érvénytelen kényszerítés - - - + + + Failed to add arc Ív hozzáadása sikertelen - + Failed to add arc of ellipse Ellipszis ívének hozzáadása sikertelen - + Cannot create arc of hyperbola from invalid angles, try again! Nem lehet létrehozni a hiperbola ívét érvénytelen szögekből, próbáld újra! - + Cannot create arc of hyperbola Nem tudja létrehozni a hiperbola ívét - + Cannot create arc of parabola Nem tudja létrehozni a parabola ívét @@ -6422,18 +6413,18 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.Hiba a B-görbe pólus hozzáadásakor - + Error creating B-spline pole B-görbe pólus létrehozás hiba - - + + Error creating B-spline Hiba a B-görbe létrehozásakor - + Error deleting last pole Hiba az utolsó pólus törlésekor @@ -6443,49 +6434,49 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.Nem tud csomópontot hozzáadni - + Cannot add internal alignment points Nem lehet belső igazítási pontokat hozzáadni - + Error removing knot Sikertelen csomópont eltávolítás - + Failed to add carbon copy Sikertelen másolat hozzáadás - - + + Failed to add circle Simertelen kör hozzáadás - + Failed to add an ellipse Sikertelen az ellipszis hozzáadása - + Failed to extend edge Él nyújtása sikertelen - + Failed to add external geometry Sikertelen külső geometria hozzáadása - + Failed to create fillet Lekerekítés létrehozása sikertelen - + Failed to add line Sikertelen a vonal hozzáadása @@ -6495,7 +6486,7 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.Sikertelen a pont hozzáadása - + Failed to add polygon Sikertelen a sokszög hozzáadása @@ -6505,27 +6496,27 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.Sikertelen a mező hozzáadása - + Failed to add rounded rectangle Sikertelen a lekerekített téglalap hozzáadása - + Failed to add slot Sikertelen a horony hozzáadása - + Failed to add edge Sikertelen az él hozzáadása - + Failed to trim edge Sikertelen az él vágása - + Value Error @@ -6535,13 +6526,13 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-görbe csomópontokkal - - + + Create a B-spline by knots Létrehoz egy B-görbét csomópontokkal @@ -6549,13 +6540,13 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Időszakos B-görbe csomópontokkal - - + + Create a periodic B-spline by knots Létrehoz egy időszakos B-görbét csomópontokkal @@ -6661,12 +6652,12 @@ A pontokat a rácsháló távolságának egyötödénél közelebb kell állíta CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots B-görbe létrehozása csomópontokkal - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Hozzon létre egy B-görbét csomópontok által, azaz interpolációval a vázlatban. @@ -6674,12 +6665,12 @@ A pontokat a rácsháló távolságának egyötödénél közelebb kell állíta CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Időszakos B-görbe létrehozása csomópontok által - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Hozzon létre egy B-görbét csomópontokkal, azaz interpolációval a vázlatban. @@ -6687,12 +6678,12 @@ A pontokat a rácsháló távolságának egyötödénél közelebb kell állíta CmdSketcherDimension - + Dimension Dimenzió - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6704,14 +6695,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimenzió + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts index 06e02df5ba..ebcfbb6662 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Tampilkan / sembunyikan lapisan informasi B-spline - + Show/hide B-spline degree Show/hide B-spline degree - + Show/hide B-spline control polygon Show/hide B-spline control polygon - + Show/hide B-spline curvature comb Show/hide B-spline curvature comb - + Show/hide B-spline knot multiplicity Show/hide B-spline knot multiplicity - + Show/hide B-spline control point weight Show/hide B-spline control point weight @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Constrain arc or circle - + Constrain an arc or a circle Constrain an arc or a circle - + Constrain radius Kendalikan radius - + Constrain diameter Constrain diameter - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -169,23 +169,23 @@ CmdSketcherCompCreateArc - + Create arc Create arc - + Create an arc in the sketcher Buat busur di sketsa & quot; "terjemahan =" Indonesia "> sketcher - + Center and end points Pusat dan titik akhir - + End points and rim point Titik akhir dan titik pelek @@ -193,12 +193,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Buat B-spline - + Create a B-spline in the sketch Buat B-spline di sketsa @@ -206,23 +206,23 @@ CmdSketcherCompCreateCircle - + Create circle Buat lingkaran - + Create a circle in the sketcher Buat lingkaran dalam & quot; sketsa & quot; "terjemahan =" bahasa indonesia "> sketsa - + Center and rim point Pusat dan titik pelek - + 3 rim points 3 titik pelek @@ -230,37 +230,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Buat kerucut di sketsa - + Ellipse by center, major radius, point Elips oleh pusat, radius utama, titik - + Ellipse by periapsis, apoapsis, minor radius Ellipse by periapsis, apoapsis, minor radius - + Arc of ellipse by center, major radius, endpoints Arc elips oleh pusat, radius utama, titik akhir - + Arc of hyperbola by center, major radius, endpoints Arc hiperbola oleh pusat, radius utama, titik akhir - + Arc of parabola by focus, vertex, endpoints Busur parabola dengan fokus, simpul, titik akhir @@ -268,22 +268,22 @@ CmdSketcherCompCreateFillets - + Create fillet Buat fillet - + Create a fillet between two lines Create a fillet between two lines - + Sketch fillet Sketch fillet - + Constraint-preserving sketch fillet Constraint-preserving sketch fillet @@ -301,17 +301,17 @@ Creates a rectangle in the sketch - + Rectangle Empat persegi panjang - + Centered rectangle Centered rectangle - + Rounded rectangle Rounded rectangle @@ -319,47 +319,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Buat poligon biasa - + Create a regular polygon in the sketcher Membuat poligon beraturan di sketcher - + Triangle Segi tiga - + Square Kotak - + Pentagon Segi lima - + Hexagon Segi enam - + Heptagon Segi tujuh - + Octagon Segi delapan - + Regular polygon Poligon beraturan @@ -367,22 +367,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modifikasi keseragaman simpul - + Modifies the multiplicity of the selected knot of a B-spline Memodifikasi banyaknya simpul terpilih dari B-spline - + Increase knot multiplicity Meningkatkan keseragaman simpul - + Decrease knot multiplicity Turunkan keseragaman simpul @@ -390,12 +390,12 @@ CmdSketcherConstrainAngle - + Constrain angle Kendalikan sudut - + Fix the angle of a line or the angle between two lines Perbaiki sudut garis atau sudut antara dua garis @@ -403,12 +403,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -416,12 +416,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Kendala bertepatan - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -429,12 +429,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Constrain diameter - + Fix the diameter of a circle or an arc Fix the diameter of a circle or an arc @@ -442,12 +442,12 @@ CmdSketcherConstrainDistance - + Constrain distance Kendalikan jarak - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -455,12 +455,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Perbaiki jarak horizontal antara dua titik atau garis ujung @@ -468,12 +468,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Perbaiki jarak vertikal antara dua titik atau garis ujung @@ -481,12 +481,12 @@ CmdSketcherConstrainEqual - + Constrain equal Kendalikan sama - + Create an equality constraint between two lines or between circles and arcs Buat batasan kesetaraan antara dua garis atau antara lingkaran dan busur @@ -494,12 +494,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Kendalikan secara horisontal - + Create a horizontal constraint on the selected item Buat kendala horizontal pada item yang dipilih @@ -507,12 +507,12 @@ CmdSketcherConstrainLock - + Constrain lock Kendalikan kunci - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -522,12 +522,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Kendalikan sejajar - + Create a parallel constraint between two lines Buat batasan paralel antara dua baris @@ -535,12 +535,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Kendalikan tegak lurus - + Create a perpendicular constraint between two lines Buat kendala tegak lurus antara dua garis @@ -548,12 +548,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Konstruksikan titik ke objek - + Fix a point onto an object Perbaiki sebuah titik pada sebuah objek @@ -561,12 +561,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -574,12 +574,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Constrain radius or weight - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline @@ -587,12 +587,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -602,12 +602,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Konstruksikan simetris - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -617,12 +617,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Kendalikan singgung - + Create a tangent constraint between two entities Buat kendala singgung antara dua entitas @@ -630,12 +630,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Kendalikan secara vertikal - + Create a vertical constraint on the selected item Buat kendala vertikal pada item yang dipilih @@ -643,12 +643,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convert geometry to B-spline - + Converts the selected geometry to a B-spline Converts the selected geometry to a B-spline @@ -669,12 +669,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Buat busur dengan tiga titik - + Create an arc by its end points and a point along the arc Buat busur dengan titik ujungnya dan satu titik di sepanjang busur @@ -682,12 +682,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Buat lingkaran dengan tiga titik - + Create a circle by 3 perimeter points Buat lingkaran dengan 3 titik perimeter @@ -695,12 +695,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Buat lingkaran dengan 3 titik perimeter - + Create an arc by its center and by its end points Buat busur dengan pusatnya dan pada titik ujungnya @@ -708,12 +708,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Buat busur elips di sketsa @@ -721,12 +721,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Buat busur hiperbola di sketsa @@ -734,12 +734,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Buat busur parabola di sketsa @@ -747,12 +747,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Buat B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -760,12 +760,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Buat lingkaran - + Create a circle in the sketch Buat B-spline lewat titik kontrol pada sketsa @@ -773,12 +773,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Buat elips dengan 3 poin - + Create an ellipse by 3 points in the sketch Buat elips dengan 3 poin pada sketsa @@ -786,12 +786,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Buat elips menurut pusat - + Create an ellipse by center in the sketch Buat elips dengan pusat di sketsa @@ -799,12 +799,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Buat fillet - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -812,12 +812,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Buat heptagon - + Create a heptagon in the sketch Buat heptagon di sketsa @@ -825,12 +825,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Buat segi enam - + Create a hexagon in the sketch Buat segi enam di sketsa @@ -864,12 +864,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Buat oktagon - + Create an octagon in the sketch Buat oktagon di sketsa @@ -877,12 +877,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Buat pentagon - + Create a pentagon in the sketch Buat pentagon di sketsa @@ -890,12 +890,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Buat B-spline periodik - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -903,12 +903,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Buat titik - + Create a point in the sketch Buat sebuah titik di sketsa @@ -916,12 +916,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Create corner-preserving fillet - + Fillet that preserves intersection point and most constraints Fillet that preserves intersection point and most constraints @@ -929,12 +929,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Buat polyline - + Create a polyline in the sketch. 'M' Key cycles behaviour Create a polyline in the sketch. 'M' Key cycles behaviour @@ -968,12 +968,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Buat poligon biasa - + Create a regular polygon in the sketch Membuat poligon beraturan di sketch @@ -981,12 +981,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Buat slot - + Create a slot in the sketch Buat slot di sketsa @@ -994,12 +994,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Buat kuadrat - + Create a square in the sketch Buat kotak di sketsa @@ -1007,12 +1007,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Buat segitiga sama sisi - + Create an equilateral triangle in the sketch Buat segitiga sama sisi dalam sketsa @@ -1020,12 +1020,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Decrease B-spline degree - + Decreases the degree of the B-spline Decreases the degree of the B-spline @@ -1033,12 +1033,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Turunkan keseragaman simpul - + Decreases the multiplicity of the selected knot of a B-spline Turunkan multiplisitas dari simpul yang dipilih dari B-spline @@ -1085,12 +1085,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Perluas tepi - + Extend an edge with respect to the picked position Perluas keunggulan sehubungan dengan posisi yang dipetik @@ -1098,12 +1098,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Buat tepi yang terhubung dengan geometri eksternal @@ -1111,12 +1111,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Increase B-spline degree - + Increases the degree of the B-spline Meningkatkan derajat B-spline @@ -1124,12 +1124,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Meningkatkan keseragaman simpul - + Increases the multiplicity of the selected knot of a B-spline Meningkatkan multiplisitas dari simpul yang dipilih dari B-spline @@ -1137,12 +1137,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1150,12 +1150,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1442,12 +1442,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Split edge - + Splits an edge into two while preserving constraints Splits an edge into two while preserving constraints @@ -1468,12 +1468,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Switch virtual space - + Switches the selected constraints or the view to the other virtual space Mengalihkan batasan terpilih atau tampilan ke ruang virtual lain @@ -1494,12 +1494,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Activates or deactivates the selected constraints @@ -1520,12 +1520,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1535,12 +1535,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Trim tepi - + Trim an edge with respect to the picked position Potong tepi dengan memperhatikan posisi yang dipetik @@ -1599,369 +1599,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Add length constraint - - + + Dimension Dimensi - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2021,44 +2022,44 @@ invalid constraints, degenerated geometry, etc. Add centered sketch box - + Add rounded rectangle Add rounded rectangle - + Add line to sketch wire Add line to sketch wire - + Add arc to sketch wire Add arc to sketch wire - - + + Add sketch arc Add sketch arc - - + + Add sketch circle Add sketch circle - + Add sketch ellipse Add sketch ellipse - + Add sketch arc of ellipse Add sketch arc of ellipse - + Add sketch arc of hyperbola Add sketch arc of hyperbola @@ -2078,33 +2079,33 @@ invalid constraints, degenerated geometry, etc. Add sketch point - - + + Create fillet Buat fillet - + Trim edge Trim tepi - + Extend edge Perluas tepi - + Split edge Split edge - + Add external geometry Add external geometry - + Add slot Add slot @@ -2114,37 +2115,37 @@ invalid constraints, degenerated geometry, etc. Add hexagon - + Convert to NURBS Convert to NURBS - + Increase spline degree Increase spline degree - + Decrease spline degree Decrease spline degree - + Increase knot multiplicity Meningkatkan keseragaman simpul - + Decrease knot multiplicity Turunkan keseragaman simpul - + Insert knot Insert knot - + Join Curves Join Curves @@ -2184,12 +2185,12 @@ invalid constraints, degenerated geometry, etc. Remove Axes Alignment - + Toggle constraints to the other virtual space Toggle constraints to the other virtual space - + @@ -2197,7 +2198,7 @@ invalid constraints, degenerated geometry, etc. Update constraint's virtual space - + Add auto constraints Add auto constraints @@ -2237,7 +2238,7 @@ invalid constraints, degenerated geometry, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2253,37 +2254,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Autoconstrain error: Unsolvable sketch while applying coincident constraints. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Autoconstrain error: Unsolvable sketch while applying equality constraints. - + Autoconstrain error: Unsolvable sketch without constraints. Autoconstrain error: Unsolvable sketch without constraints. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Autoconstrain error: Unsolvable sketch after applying equality constraints. @@ -2408,143 +2409,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2560,9 +2561,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Pilihan salah @@ -2583,329 +2584,329 @@ invalid constraints, degenerated geometry, etc. Batasan dimensi - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Pilih tepi dari sketsa. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Kendala yang tidak mungkin - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Kendala ganda - - - - - + + + + + The selected edge already has a horizontal constraint! The selected edge already has a horizontal constraint! - - - + + + The selected edge already has a vertical constraint! The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! The selected edge already has a Block constraint! - + The selected item(s) can't accept a horizontal constraint! The dipilih item (s) tidak dapat menerima horisontal kendala ! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! There are more than one fixed points selected. Select a maximum of one fixed point! - + The selected item(s) can't accept a vertical constraint! Dipilih item (s) tidak dapat menerima vertikal kendala! - - - + + + Select vertices from the sketch. Pilih simpul dari para sketsa . - + Select one vertex from the sketch other than the origin. Pilih salah satu titik dari satu sketsa selain asal . - + Select only vertices from the sketch. The last selected vertex may be the origin. Pilih hanya simpul dari para sketsa . Yang terakhir dipilih vertex mungkin asal . - + Wrong solver status Wrong solver status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Select one edge from the sketch. - + Select only edges from the sketch. Select only edges from the sketch. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Kesalahan - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Endpoint to endpoint tangency was applied instead. - + Select two or more points from the sketch. Pilih dua atau lebih poin dari para sketsa . - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Pilih tepat satu baris atau satu titik dan satu garis atau dua poin dari para sketsa . - + Cannot add a length constraint on an axis! Tidak dapat menambahkan batasan panjang pada sumbu! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Pilih hal yang benar dari yang sketsa . - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Tak satu pun dari titik-titik yang dipilih dibatasi ke masing-masing kurva, entah karena mereka adalah bagian dari elemen yang sama, atau karena keduanya adalah geometri eksternal . - - - - + + + + Select exactly one line or up to two points from the sketch. Pilih tepat satu baris atau sampai dengan dua poin dari para sketsa . - + Cannot add a horizontal length constraint on an axis! Tidak dapat menambahkan batasan panjang horizontal pada sumbu! - + Cannot add a fixed x-coordinate constraint on the origin point! Cannot add a fixed x-coordinate constraint on the origin point! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Tidak dapat menambahkan batasan panjang vertikal pada sumbu! - + Cannot add a fixed y-coordinate constraint on the origin point! Cannot add a fixed y-coordinate constraint on the origin point! - + Select two or more lines from the sketch. Pilih dua atau lebih baris dari para sketsa . - - + + Select at least two lines from the sketch. Pilih setidaknya dua baris dari para sketsa . - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2914,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Ada beberapa cara kendala ini bisa diterapkan. Kombinasi yang diterima: dua kurva; titik akhir dan kurva; dua titik akhir; dua tikungan dan satu titik . - + Select some geometry from the sketch. perpendicular constraint Pilih beberapa geometri dari para sketsa . - - + + Cannot add a perpendicularity constraint at an unconnected point! Tidak dapat menambahkan batasan tegak lurus pada titik yang tidak terhubung ! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular ke tepi B-spline saat ini tidak didukung. - - + + One of the selected edges should be a line. Salah satu tepi yang dipilih harus berupa garis . - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Endpoint to endpoint tangency was applied. The coincident constraint was deleted. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Ada beberapa cara kendala ini bisa diterapkan. Kombinasi yang diterima: dua kurva; titik akhir dan kurva; dua titik akhir; dua tikungan dan satu titik . - + Select some geometry from the sketch. tangent constraint Pilih beberapa geometri dari para sketsa . - - - + + + Cannot add a tangency constraint at an unconnected point! Tidak dapat menambahkan kendala singgung pada titik yang tidak terhubung ! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Salah jumlah objek terpilih ! - - + + With 3 objects, there must be 2 curves and 1 point. Dengan 3 objek, harus ada 2 kurva dan 1 titik . - - - + + + Tangency to B-spline edge currently unsupported. Tangensi ke tepi B-spline saat ini tidak didukung. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Pilih satu atau lebih busur atau lingkaran dari para sketsa . - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Kendala hanya berlaku untuk busur atau lingkaran. - - + + Select one or two lines from the sketch. Or select two edges and a point. Pilih satu atau dua baris dari para sketsa . Atau pilih dua sisi dan satu titik . - - + + Parallel lines Garis sejajar - - + + An angle constraint cannot be set for two parallel lines. Kendala sudut tidak dapat diatur untuk dua garis sejajar. - + Cannot add an angle constraint on an axis! Tidak dapat menambahkan batasan sudut pada sumbu! - + Select two edges from the sketch. Pilih dua sisi dari satu sketsa . - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Kesetaraan untuk tepi B-spline saat ini tidak didukung. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Pilih dua poin dan simetri garis , dua poin dan simetri titik atau garis dan simetri titik dari yang sketsa . - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Tidak dapat menambahkan batasan simetri antara garis dan titik akhirnya! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Objek yang dipilih bukan hanya geometri dari satu sketsa . - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. Pilih kendala (s) dari para sketsa . - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error Kernel CAD Error - + None of the selected elements is an edge. Tak satu pun dari elemen yang dipilih adalah keunggulan . - - + + At least one of the selected objects was not a B-Spline and was ignored. At least one of the selected objects was not a B-Spline and was ignored. - - + + The selection comprises more than one item. Please select just one knot. Pemilihan terdiri dari lebih dari satu item. Silahkan pilih hanya satu simpul . - - + + Input Error Kesalahan Masukan - - + + None of the selected elements is a knot of a B-spline Tak satu pun dari yang dipilih elemen adalah simpul dari B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3306,17 +3307,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3630,12 +3631,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Length: - + Refractive index ratio Rasio indeks bias - + Ratio n2/n1: Rasio n2 / n1: @@ -3915,8 +3916,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Tanpa nama @@ -4150,13 +4151,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4177,32 +4178,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Both - + Auto Mobil - + Diameter Diameter - + Radius Jari-jari @@ -4651,12 +4652,12 @@ Then objects are only visible behind the sketch plane. Terapkan pada sketsa yang ada - + Unexpected C++ exception Pengecualian C ++ tak terduga - + Sketcher Sketcher @@ -4664,55 +4665,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Tidak ada kebetulan yang hilang - + No missing coincidences found Tidak ada kebetulan yang hilang ditemukan - + Missing coincidences Kebetulan tidak ada - + %1 missing coincidences found %1 Kebetulan ditemukan hilang - + No invalid constraints Tidak ada batasan yang tidak valid - + No invalid constraints found Tidak ada kendala yang tidak valid ditemukan - + Invalid constraints Kendala tidak valid - + Invalid constraints found Kendala tidak ditemukan - - - + + + Reversed external geometry Membalikkan geometri eksternal - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,82 +4726,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Click "Swap endpoints in constraints" button to reassign endpoints. Do this only once to sketches created in FreeCAD older than v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. %1 busur geometri eksternal terbalik ditemukan. Titik akhir mereka dikepung dalam tampilan 3d . Namun, tidak ada kendala yang terkait dengan titik akhir yang ditemukan. - + No reversed external-geometry arcs were found. Tidak ditemukan busur geometri eksternal terbalik. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 perubahan dilakukan pada batasan yang menghubungkan ke titik akhir busur terbalik. - - + + Constraint orientation locking Kendala penguncian orientasi - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. - - + + Delete constraints to external geom. Hapus kendala pada geom eksternal. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Anda akan menghapus SEMUA kendala yang berhubungan dengan geometri eksternal . Ini berguna untuk menyelamatkan sketsa dengan link yang rusak / berubah ke geometri eksternal . Anda yakin ingin menghapus batasannya? - + All constraints that deal with external geometry were deleted. Semua kendala yang berhubungan dengan geometri eksternal telah dihapus. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - Bentuk - Check to toggle filters @@ -4875,11 +4871,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Bentuk - Check to toggle filters @@ -5065,7 +5056,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Kontrol pemecah lanjut @@ -5355,8 +5346,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Beralih antara menampilkan dan menyembunyikan kelengkungan sisir untuk B-splines semua @@ -5364,8 +5355,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Turunkan multiplisitas dari simpul yang dipilih dari B-spline @@ -5373,8 +5364,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Beralih antara menunjukkan dan menyembunyikan derajat untuk semua B-splines @@ -5382,8 +5373,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Meningkatkan multiplisitas dari simpul yang dipilih dari B-spline @@ -5391,8 +5382,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Beralih antara menunjukkan dan menyembunyikan keseragaman simpul untuk semua B-splines @@ -5400,8 +5391,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Switches between showing and hiding the control point weight for all B-splines @@ -5409,8 +5400,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Beralih antara menampilkan dan menyembunyikan poligon kontrol untuk semua B-splines @@ -5445,8 +5436,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fix the diameter of a circle or an arc @@ -5454,7 +5445,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5462,8 +5453,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Perbaiki jari-jari lingkaran atau busur @@ -5471,7 +5462,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5488,8 +5479,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Buat busur dengan titik ujungnya dan satu titik di sepanjang busur @@ -5497,8 +5488,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Buat lingkaran dengan 3 titik pelek @@ -5506,8 +5497,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Buat busur dengan pusatnya dan pada titik ujungnya @@ -5515,8 +5506,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Create an arc of ellipse by its center, major radius, and endpoints @@ -5524,8 +5515,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Create an arc of hyperbola by its center, major radius, and endpoints @@ -5533,8 +5524,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Create an arc of parabola by its focus, vertex, and endpoints @@ -5542,13 +5533,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline oleh titik kontrol - - + + Create a B-spline by control points Buat B-spline oleh titik kontrol @@ -5556,8 +5547,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Buat lingkaran di bagian tengahnya dan dengan titik pelek @@ -5565,8 +5556,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Buat elips dengan periapsis, apoapsis, dan jari-jari kecil @@ -5574,8 +5565,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Buat elips berdasarkan pusat, jari-jari dan titik utama @@ -5583,8 +5574,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Creates a radius between two lines @@ -5592,8 +5583,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Buat heptagon oleh pusatnya dan di satu sudut @@ -5601,8 +5592,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Buat segi enam dengan pusatnya dan di satu sudut @@ -5610,7 +5601,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Create a rounded rectangle @@ -5618,14 +5609,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Buat sebuah oktagon di tengahnya dan di satu sudut - - + + Create a regular polygon by its center and by one corner Create a regular polygon by its center and by one corner @@ -5633,8 +5624,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Buat pentagon di tengahnya dan di satu sudut @@ -5642,8 +5633,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Fillet that preserves constraints and intersection point @@ -5651,7 +5642,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Create a rectangle @@ -5659,7 +5650,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Create a centered rectangle @@ -5667,8 +5658,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Buat persegi di tengahnya dan di salah satu sudut @@ -5676,8 +5667,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Buat segitiga sama sisi dengan pusatnya dan di satu sudut @@ -5685,13 +5676,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periodik dengan titik kontrol - - + + Create a periodic B-spline by control points Buat B-spline periodik dengan titik kontrol @@ -6324,36 +6315,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Kesalahan @@ -6373,45 +6364,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6421,18 +6412,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6442,49 +6433,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6494,7 +6485,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6504,27 +6495,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6534,13 +6525,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6548,13 +6539,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6660,12 +6651,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6673,12 +6664,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6686,12 +6677,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensi - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6703,14 +6694,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimensi + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts index 6e28ec14a2..a64353234d 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Crea copia carbone - + Copy the geometry of another sketch Copia la geometria di un altro schizzo @@ -100,27 +100,27 @@ Mostra/Nascondi il layer dati della B-spline - + Show/hide B-spline degree Mostra/nascondi il grado della B-spline - + Show/hide B-spline control polygon Mostra/nascondi il poligono di controllo della B-spline - + Show/hide B-spline curvature comb Mostra/nascondi la traccia di curvatura per la B-spline - + Show/hide B-spline knot multiplicity Mostra/nascondi molteplicità di nodo della B-spline - + Show/hide B-spline control point weight Mostra/nascondi i pesi dei punti di controllo della B-spline @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Vincola l'arco o il cerchio - + Constrain an arc or a circle Vincola l'arco o il cerchio - + Constrain radius Raggio - + Constrain diameter Vincola il diametro - + Constrain auto radius/diameter Vincola raggio/diametro automatico @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Arco - + Create an arc in the sketcher Crea un arco nello schizzo - + Center and end points Punti finali e centro - + End points and rim point Punti finali e punto sul cerchio @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline B-spline - + Create a B-spline in the sketch Crea una B-spline nello schizzo @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Cerchio - + Create a circle in the sketcher Crea un cerchio nello schizzo - + Center and rim point Centro e punto sul cerchio - + 3 rim points 3 punti @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Crea conica - + Create a conic in the sketch Crea una sezione conica nello schizzo - + Ellipse by center, major radius, point Ellisse da centro, raggio maggiore, punto - + Ellipse by periapsis, apoapsis, minor radius Ellisse per periasse, apoasse e raggio minore - + Arc of ellipse by center, major radius, endpoints Arco di ellisse da centro, raggio maggiore, punti finali - + Arc of hyperbola by center, major radius, endpoints Arco di iperbole da centro, raggio maggiore, punti finali - + Arc of parabola by focus, vertex, endpoints Arco di parabola da fuoco, vertice e punti finali @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Raccorda - + Create a fillet between two lines Crea un raccordo tra due linee - + Sketch fillet Raccorda schizzo - + Constraint-preserving sketch fillet Raccorda schizzo preservando vincoli @@ -299,17 +299,17 @@ Crea un rettangolo nello schizzo - + Rectangle Rettangolo - + Centered rectangle Rettangolo centrato - + Rounded rectangle Rettangolo arrotondato @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Poligono regolare - + Create a regular polygon in the sketcher Crea un poligono regolare nello schizzo - + Triangle Triangolo - + Square Quadrato - + Pentagon Pentagono - + Hexagon Esagono - + Heptagon Ettagono - + Octagon Ottagono - + Regular polygon Poligono regolare @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modifica le molteplicità di nodo - + Modifies the multiplicity of the selected knot of a B-spline Modifica la molteplicità del nodo selezionato di una B-spline - + Increase knot multiplicity Aumenta la molteplicità di nodo - + Decrease knot multiplicity Diminuisci la molteplicità di nodo @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Angolo - + Fix the angle of a line or the angle between two lines Fissa l'angolo di una linea o l'angolo tra due linee @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Vincolo di blocco - + Block the selected edge from moving Blocca il bordo selezionato dallo spostamento @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Coincidenza - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea un vincolo coincidente tra i punti, o un vincolo concentrico tra cerchi, archi ed ellissi @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Vincola il diametro - + Fix the diameter of a circle or an arc Vincola il diametro di un cerchio o di un arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Distanza - + Fix a length of a line or the distance between a line and a vertex or between two circles Fissare una lunghezza di una linea o la distanza tra una linea e un vertice o tra due cerchi @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Distanza orizzontale - + Fix the horizontal distance between two points or line ends Fissa la distanza orizzontale tra due punti o estremi di una linea @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Distanza verticale - + Fix the vertical distance between two points or line ends Fissa la distanza verticale tra due punti o estremi di una linea @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Uguale - + Create an equality constraint between two lines or between circles and arcs Crea un vincolo di uguaglianza tra due linee o tra cerchi e archi @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Orizzontale - + Create a horizontal constraint on the selected item Crea un vincolo orizzontale sull'elemento selezionato @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Blocca - + Create both a horizontal and a vertical distance constraint on the selected vertex Crea sia un vincolo di distanza orizzontale e che verticale @@ -520,12 +520,12 @@ sul vertice selezionato CmdSketcherConstrainParallel - + Constrain parallel Parallelo - + Create a parallel constraint between two lines Crea un vincolo di parallelismo tra due linee @@ -533,12 +533,12 @@ sul vertice selezionato CmdSketcherConstrainPerpendicular - + Constrain perpendicular Perpendicolare - + Create a perpendicular constraint between two lines Crea un vincolo di perpendicolarità tra due linee @@ -546,12 +546,12 @@ sul vertice selezionato CmdSketcherConstrainPointOnObject - + Constrain point onto object Punto su oggetto - + Fix a point onto an object Fissa un punto su un oggetto @@ -559,12 +559,12 @@ sul vertice selezionato CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Vincola raggio/diametro automatico - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fissare il diametro se si sceglie un cerchio, o il raggio se si sceglie un arco/spline @@ -572,12 +572,12 @@ sul vertice selezionato CmdSketcherConstrainRadius - + Constrain radius or weight Vincola il raggio o il peso - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fissa il raggio del cerchio o di un arco o il peso del polo di una B-Spline @@ -585,12 +585,12 @@ sul vertice selezionato CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Vincolo di rifrazione (legge di Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crea un vincolo di rifrazione (legge di Snell) tra due punti finali di raggi e con un bordo come interfaccia. @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Simmetria - + Create a symmetry constraint between two points with respect to a line or a third point Crea un vincolo di simmetria tra due punti @@ -614,12 +614,12 @@ rispetto a una linea o a un terzo punto CmdSketcherConstrainTangent - + Constrain tangent Tangente - + Create a tangent constraint between two entities Crea un vincolo di tangenza tra due entità @@ -627,12 +627,12 @@ rispetto a una linea o a un terzo punto CmdSketcherConstrainVertical - + Constrain vertically Verticale - + Create a vertical constraint on the selected item Crea un vincolo verticale sull'elemento selezionato @@ -640,12 +640,12 @@ rispetto a una linea o a un terzo punto CmdSketcherConvertToNURBS - + Convert geometry to B-spline Converti la geometria in B-spline - + Converts the selected geometry to a B-spline Converti la geometria selezionata in B-Spline @@ -666,12 +666,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreate3PointArc - + Create arc by three points Arco da tre punti - + Create an arc by its end points and a point along the arc Crea un arco dai suoi punti finali e un punto lungo l'arco @@ -679,12 +679,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreate3PointCircle - + Create circle by three points Cerchio da tre punti - + Create a circle by 3 perimeter points Crea un cerchio da punti perimetrali @@ -692,12 +692,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateArc - + Create arc by center Arco dal centro - + Create an arc by its center and by its end points Crea un arco dal suo centro e dai suoi punti finali @@ -705,12 +705,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Crea arco di ellisse - + Create an arc of ellipse in the sketch Crea un arco di ellisse nello schizzo @@ -718,12 +718,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Crea arco di iperbola - + Create an arc of hyperbola in the sketch Crea un arco di iperbole nello schizzo @@ -731,12 +731,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateArcOfParabola - + Create arc of parabola Crea arco di parabola - + Create an arc of parabola in the sketch Crea un arco di parabola nello schizzo @@ -744,12 +744,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateBSpline - + Create B-spline B-spline - + Create a B-spline by control points in the sketch. Crea una B-spline dai punti di controllo nello schizzo. @@ -757,12 +757,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateCircle - + Create circle Cerchio - + Create a circle in the sketch Crea un cerchio nello schizzo @@ -770,12 +770,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Ellisse da 3 punti - + Create an ellipse by 3 points in the sketch Crea nello schizzo un'ellisse da 3 punti @@ -783,12 +783,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateEllipseByCenter - + Create ellipse by center Ellisse da centro - + Create an ellipse by center in the sketch Crea nello schizzo un'ellisse dal suo centro @@ -796,12 +796,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateFillet - + Create fillet Raccorda - + Create a fillet between two lines or at a coincident point Crea un raccordo tra due linee o in un punto di coincidenza @@ -809,12 +809,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateHeptagon - + Create heptagon Ettagono - + Create a heptagon in the sketch Crea un ettagono nello schizzo @@ -822,12 +822,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateHexagon - + Create hexagon Esagono - + Create a hexagon in the sketch Crea un esagono nello schizzo @@ -861,12 +861,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateOctagon - + Create octagon Ottagono - + Create an octagon in the sketch Crea un ottagono nello schizzo @@ -874,12 +874,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreatePentagon - + Create pentagon Pentagono - + Create a pentagon in the sketch Crea un pentagono nello schizzo @@ -887,12 +887,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline B-spline periodica - + Create a periodic B-spline by control points in the sketch. Crea una B-spline periodica dai punti di controllo nello schizzo. @@ -900,12 +900,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreatePoint - + Create point Punto - + Create a point in the sketch Crea un punto nello schizzo @@ -913,12 +913,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreatePointFillet - + Create corner-preserving fillet Crea raccordo salva-angolo - + Fillet that preserves intersection point and most constraints Raccordo che preserva il punto di intersezione e la maggior parte dei vincoli @@ -926,12 +926,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreatePolyline - + Create polyline Polilinea - + Create a polyline in the sketch. 'M' Key cycles behaviour Crea una polilinea nello schizzo. 'M' per ripetere ciclicamente @@ -965,12 +965,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateRegularPolygon - + Create regular polygon Poligono regolare - + Create a regular polygon in the sketch Crea un poligono regolare nello schizzo @@ -978,12 +978,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateSlot - + Create slot Asola - + Create a slot in the sketch Crea un'asola nello schizzo @@ -991,12 +991,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateSquare - + Create square Quadrato - + Create a square in the sketch Crea un quadrato nello schizzo @@ -1004,12 +1004,12 @@ rispetto a una linea o a un terzo punto CmdSketcherCreateTriangle - + Create equilateral triangle Triangolo equilatero - + Create an equilateral triangle in the sketch Crea un triangolo equilatero nello schizzo @@ -1017,12 +1017,12 @@ rispetto a una linea o a un terzo punto CmdSketcherDecreaseDegree - + Decrease B-spline degree Diminuisci il grado della B-spline - + Decreases the degree of the B-spline Riduce il grado della B-spline @@ -1030,12 +1030,12 @@ rispetto a una linea o a un terzo punto CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Diminuisci la molteplicità di nodo - + Decreases the multiplicity of the selected knot of a B-spline Diminuisce la molteplicità del nodo selezionato di una B-spline @@ -1082,12 +1082,12 @@ rispetto a una linea o a un terzo punto CmdSketcherExtend - + Extend edge Estendi lo spigolo - + Extend an edge with respect to the picked position Estendi uno spigolo in riferimento alla posizione selezionata @@ -1095,12 +1095,12 @@ rispetto a una linea o a un terzo punto CmdSketcherExternal - + Create external geometry Crea geometria esterna - + Create an edge linked to an external geometry Crea un bordo collegato a una geometria esterna @@ -1108,12 +1108,12 @@ rispetto a una linea o a un terzo punto CmdSketcherIncreaseDegree - + Increase B-spline degree Aumenta il grado della B-spline - + Increases the degree of the B-spline Aumenta il grado della B-spline @@ -1121,12 +1121,12 @@ rispetto a una linea o a un terzo punto CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Aumenta la molteplicità di nodo - + Increases the multiplicity of the selected knot of a B-spline Aumenta la molteplicità del nodo selezionato di una B-spline @@ -1134,12 +1134,12 @@ rispetto a una linea o a un terzo punto CmdSketcherInsertKnot - + Insert knot Inserisci nodo - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserisce il nodo al parametro specificato. Se esiste già un nodo con quel parametro, la molteplicità viene aumentata di uno. @@ -1147,12 +1147,12 @@ rispetto a una linea o a un terzo punto CmdSketcherJoinCurves - + Join curves Unisci le curve - + Join two curves at selected end points Unisce due curve ai punti finali selezionati @@ -1439,12 +1439,12 @@ Questo cancellerà la proprietà 'Supporto', se presente. CmdSketcherSplit - + Split edge Dividere spigolo - + Splits an edge into two while preserving constraints Dividere uno spingo in due preservando i vincoli @@ -1465,12 +1465,12 @@ Questo cancellerà la proprietà 'Supporto', se presente. CmdSketcherSwitchVirtualSpace - + Switch virtual space Cambia spazio virtuale - + Switches the selected constraints or the view to the other virtual space Scambia da uno all'altro lo spazio virtuale usato per mostrare i vincoli selezionati o per la vista @@ -1491,12 +1491,12 @@ Questo cancellerà la proprietà 'Supporto', se presente. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Attiva/disattiva vincolo - + Activates or deactivates the selected constraints Attiva o disattiva i vincoli selezionati @@ -1517,12 +1517,12 @@ Questo cancellerà la proprietà 'Supporto', se presente. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Attiva/disattiva vincolo di guida/riferimento - + Set the toolbar, or the selected constraints, into driving or reference mode Imposta la barra degli strumenti, o i vincoli selezionati, @@ -1532,12 +1532,12 @@ in modalità guida o di riferimento CmdSketcherTrimming - + Trim edge Rifila - + Trim an edge with respect to the picked position Taglia un bordo nel punto specificato @@ -1596,369 +1596,370 @@ vincoli non validi, geometria degenerata, ecc. Command - - + + Add horizontal constraint Vincola orizzontale - - - + + + Add horizontal alignment Aggiunge allineamento orizzontale - - + + Add vertical constraint Vincola verticale - + Add vertical alignment Aggiunge allineamento verticale - + Add 'Lock' constraint Aggiungi vincolo bloccato - + Add relative 'Lock' constraint Aggiungi vincolo di blocco relativo - + Add fixed constraint Aggiungi vincolo fisso - + Add 'Block' constraint Aggiungi vincolo di blocco - + Add block constraint Aggiungi vincolo di blocco - - - + + + Add coincident constraint Vincola la coincidenza - - + + Add distance from horizontal axis constraint Vincola la distanza dall'asse orizzontale - - + + Add distance from vertical axis constraint Vincola la distanza dall'asse verticale - - + + Add point to point distance constraint Vincola la distanza tra i punti - - - + + + Add point to line Distance constraint Vincola la Distanza da punto a linea - - + + Add circle to circle distance constraint Aggiungi il vincolo di distanza da cerchio a cerchio - + Add circle to line distance constraint Aggiungi il vincolo di distanza dal cerchio alla linea - - - - - + + + + + + Add length constraint Vincola lunghezza - - + + Dimension Dimensione - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Vincola il punto all'oggetto - - + + Add point to point horizontal distance constraint Vincola la distanza orizzontale tra i punti - + Add fixed x-coordinate constraint Vincola la coordinata X - - + + Add point to point vertical distance constraint Vincola la distanza verticale tra i punti - + Add fixed y-coordinate constraint Vincola la coordinata Y - - + + Add parallel constraint Vincola parallelismo - - - - - - - + + + + + + + Add perpendicular constraint Vincola perpendicolare - + Add perpendicularity constraint Aggiungi vincolo di perpendicolarità - + Swap coincident+tangency with ptp tangency Scambia coincidenza+tangenza con tangenza ptp - + Swap PointOnObject+tangency with point to curve tangency Scambiare PointOnObject+tangenza con il punto a tangenza curva - - - - - - - + + + + + + + Add tangent constraint Vincola la tangenza - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Aggiungi punto di vincolo tangente - - - - + + + + Add radius constraint Vincola il raggio - - - - + + + + Add diameter constraint Vincola il diametro - - - - + + + + Add radiam constraint Vincolare il raggio - - - - - - + + + + + + Add angle constraint Vincola l'angolo - - + + Add equality constraint Vincola uguaglianza - - - - - + + + + + Add symmetric constraint Vincola simmetria - + Add Snell's law constraint Aggiungi vincolo di legge di Snell's - + Toggle constraint to driving/reference Commuta il vincolo guida/riferimento - + Activate/Deactivate constraint Attiva/disattiva vincolo @@ -2018,44 +2019,44 @@ vincoli non validi, geometria degenerata, ecc. Aggiungi schizzo rettangolare centrato - + Add rounded rectangle Aggiungi rettangolo arrotondato - + Add line to sketch wire Aggiungi linea alla polilinea di schizzo - + Add arc to sketch wire Aggiungi arco alla polilinea di schizzo - - + + Add sketch arc Aggiungi arco di schizzo - - + + Add sketch circle Aggiungi cerchio di schizzo - + Add sketch ellipse Aggiungi ellisse di schizzo - + Add sketch arc of ellipse Aggiungi arco di ellisse di schizzo - + Add sketch arc of hyperbola Aggiungi arco di Iperbole di schizzo @@ -2075,33 +2076,33 @@ vincoli non validi, geometria degenerata, ecc. Aggiungi punto di schizzo - - + + Create fillet Raccorda - + Trim edge Rifila - + Extend edge Estendi lo spigolo - + Split edge Dividere spigolo - + Add external geometry Aggiungi geometria esterna - + Add slot Aggiungi asola @@ -2111,37 +2112,37 @@ vincoli non validi, geometria degenerata, ecc. Aggiungi esagono - + Convert to NURBS Converti in NURBS - + Increase spline degree Aumenta il grado della spline - + Decrease spline degree Diminuisci il grado della spline - + Increase knot multiplicity Aumenta la molteplicità di nodo - + Decrease knot multiplicity Diminuisci la molteplicità di nodo - + Insert knot Inserisci nodo - + Join Curves Unisci le curve @@ -2181,12 +2182,12 @@ vincoli non validi, geometria degenerata, ecc. Rimuovi Allineamento Assi - + Toggle constraints to the other virtual space Attiva/disattiva i vincoli all'altro spazio virtuale - + @@ -2194,7 +2195,7 @@ vincoli non validi, geometria degenerata, ecc. Aggiorna lo spazio virtuale del vincolo - + Add auto constraints Aggiungi vincoli automatici @@ -2234,7 +2235,7 @@ vincoli non validi, geometria degenerata, ecc. Aggiungi punto di nodo - + Create a carbon copy Crea una copia carbone @@ -2250,37 +2251,37 @@ vincoli non validi, geometria degenerata, ecc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Errore di vincolo automatico: schizzo non risolvibile durante l'applicazione dei vincoli di coincidenza. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Errore di vincolo automatico: schizzo non risolvibile durante l'applicazione dei vincoli verticale o orizzontale. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Errore di vincolo automatico: schizzo non risolvibile durante l'applicazione dei vincoli di uguaglianza. - + Autoconstrain error: Unsolvable sketch without constraints. Errore di vincolo automatico: schizzo irrisolvibile senza vincoli. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Errore di vincolo automatico: schizzo irrisolvibile dopo l'applicazione di vincoli orizzontali e verticali. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Errore di vincolo automatico: schizzo irrisolvibile dopo l'applicazione dei vincoli punto-su-punto. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Errore di vincolo automatico: schizzo non risolvibile dopo l'applicazione dei vincoli di uguaglianza. @@ -2405,143 +2406,143 @@ vincoli non validi, geometria degenerata, ecc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2557,9 +2558,9 @@ vincoli non validi, geometria degenerata, ecc. - - - + + + Wrong selection Selezione errata @@ -2580,329 +2581,329 @@ vincoli non validi, geometria degenerata, ecc. Lunghezza - + Cannot add a constraint between two external geometries. Impossibile aggiungere un vincolo tra due geometrie esterne. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Non è possibile aggiungere un vincolo tra due geometrie bloccate! Le geometrie bloccate comprendono la geometria esterna, la geometria fissata o i punti speciali come i punti di nodo delle B-Spline. - + Sketcher Constraint Substitution Sostituzione vincoli dello Schizzo - + Keep notifying me of constraint substitutions Continuare a notificare le sostituzione dei vincoli - - - + + + Only sketch and its support are allowed to be selected. È consentito selezionare solo lo schizzo e il suo supporto. - + One of the selected has to be on the sketch. Uno dei selezionati deve essere sullo schizzo. - - + + Select an edge from the sketch. Seleziona un bordo dello schizzo. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Vincolo Impossible - - - - + + + + The selected edge is not a line segment. Il bordo selezionato non è un segmento di linea. - - - - - - + + + + + + Double constraint Doppio vincolo - - - - - + + + + + The selected edge already has a horizontal constraint! Il bordo selezionato ha già un vincolo orizzontale! - - - + + + The selected edge already has a vertical constraint! Il bordo selezionato ha già un vincolo verticale! - - - - - - + + + + + + The selected edge already has a Block constraint! Il bordo selezionato ha già un vincolo di fissaggio! - + The selected item(s) can't accept a horizontal constraint! Gli elementi selezionati non possono accettare un vincolo orizzontale! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Sono stati selezionati più punti bloccati. Selezionare al massimo un punto bloccato! - + The selected item(s) can't accept a vertical constraint! Gli elementi selezionati non possono accettare un vincolo verticale! - - - + + + Select vertices from the sketch. Selezionare i vertici nello schizzo. - + Select one vertex from the sketch other than the origin. Selezionare dallo schizzo un vertice diverso dall'origine. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selezionare solo i vertici dallo schizzo. L'ultimo vertice selezionato può essere l'origine. - + Wrong solver status Stato del risolutore difettoso - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Un vincolo di blocco non può essere aggiunto se lo schizzo è irrisolto o ci sono vincoli ridondanti e conflittuali. - + Select one edge from the sketch. Seleziona un bordo dello schizzo. - + Select only edges from the sketch. Selezionare solo i bordi dallo schizzo. - + Number of selected objects is not 3 Il numero di oggetti selezionati non è 3 - - - + + + Error Errore - + Unexpected error. More information may be available in the Report View. Errore inatteso. Ulteriori informazioni possono essere disponibili nel registro eventi. - + Endpoint to endpoint tangency was applied instead. È stata invece applicata la tangenza punto finale su punto finale. - + Select two or more points from the sketch. Selezionare due o più punti dallo schizzo. - + Select two or more vertices from the sketch. Seleziona due o più vertici dallo schizzo. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleziona due o più vertici dallo schizzo per un vincolo coincidente, o due o più cerchi, ellissi, archi o archi di ellisse per un vincolo concentrico. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleziona due vertici dallo schizzo per un vincolo coincidente, o due cerchi, ellissi, archi o archi di ellisse per un vincolo concentrico. - + Select exactly one line or one point and one line or two points from the sketch. Selezionare una linea o un punto più una linea, oppure due punti dello schizzo. - + Cannot add a length constraint on an axis! Non è possibile aggiungere un vincolo di lunghezza su un asse! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Selezionare esattamente una linea o un punto e una linea o due punti o due cerchi dallo schizzo. - + This constraint does not make sense for non-linear curves. Questo vincolo non ha senso per le curve non lineari. - + Endpoint to edge tangency was applied instead. È stata applicata invece la tangenza segmento sul punto finale. - - - - - - - + + + + + + + Select the right things from the sketch. Selezionare le cose giuste dallo schizzo. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Selezionare un bordo che non è un peso B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nessuno dei punti selezionati è stato vincolato alle rispettive curve, perché sono parti dello stesso elemento, perché entrambi sono geometria esterna, o perché il bordo non è ammissibile. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nessuno dei punti selezionati è stato vincolato sulla rispettiva curva, perchè essi sono parti dello stesso elemento, o perchè sono entrambi una geometria esterna. - - - - + + + + Select exactly one line or up to two points from the sketch. Selezionare solo una linea oppure al massimo due punti dello schizzo. - + Cannot add a horizontal length constraint on an axis! Non è possibile aggiungere un vincolo di lunghezza orizzontale su un asse! - + Cannot add a fixed x-coordinate constraint on the origin point! Non è possibile aggiungere un vincolo di coordinata x nel punto di origine! - - + + This constraint only makes sense on a line segment or a pair of points. Questo vincolo ha senso solo su un segmento di linea o su una coppia di punti. - + Cannot add a vertical length constraint on an axis! Non è possibile aggiungere un vincolo di lunghezza verticale su un asse! - + Cannot add a fixed y-coordinate constraint on the origin point! Non è possibile aggiungere un vincolo di coordinata y nel punto di origine! - + Select two or more lines from the sketch. Selezionare due o più linee dello schizzo. - - + + Select at least two lines from the sketch. Selezionare almeno due linee dello schizzo. - + Select a valid line. Selezionare una linea valida. - - + + The selected edge is not a valid line. Il bordo selezionato non è una linea valida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2913,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; due curve e un punto. - + Select some geometry from the sketch. perpendicular constraint Selezionare alcune geometrie dello schizzo. - - + + Cannot add a perpendicularity constraint at an unconnected point! Non è possibile aggiungere un vincolo di perpendicolarità in un punto non connesso! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicolare al bordo di una B-spline attualmente non è supportato. - - + + One of the selected edges should be a line. Uno degli spigoli selezionati deve essere una linea. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. È stato applicato il vincolo tangenza punto finale su punto finale. È stato eliminato il vincolo coincidente. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. È stato applicato il vincolo tangenza segmento su punto finale. È stato eliminato il vincolo punto su oggetto. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,277 +2958,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; due curve e un punto. - + Select some geometry from the sketch. tangent constraint Selezionare alcune geometrie dello schizzo. - - - + + + Cannot add a tangency constraint at an unconnected point! Non è possibile aggiungere un vincolo di tangenza in un punto non connesso! - - + + Tangent constraint at B-spline knot is only supported with lines! Il vincolo tangente al nodo B-spline è supportato solo con le linee! - + B-spline knot to endpoint tangency was applied instead. È stata invece applicata la tangenza del nodo B-spline sul punto finale. - + Select either one point and several curves, or one curve and several points. Selezionare un punto e diverse curve, oppure una curva e diversi punti. - - + + Wrong number of selected objects! Numero di oggetti selezionati errato! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 oggetti, ci devono essere 2 curve e 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tangente al bordo di una B-spline attualmente non è supportato. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selezionare uno o più archi o cerchi nello schizzo. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selezionare solo uno o più poli B-Spline o solo uno o più archi o cerchi dallo schizzo, ma non miscelati. - - - + + + Constraint only applies to arcs or circles. Vincolo applicato solo ad archi o cerchi. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selezionare una o due linee dello schizzo, oppure selezionare due bordi e un punto. - - + + Parallel lines Linee parallele - - + + An angle constraint cannot be set for two parallel lines. Un vincolo di angolo non può essere impostato per due linee parallele. - + Cannot add an angle constraint on an axis! Non è possibile aggiungere un vincolo di angolo su un asse! - + Select two edges from the sketch. Selezionare due spigoli dello schizzo. - + Select two or more compatible edges. Selezionare due o più spigoli compatibili. - + Sketch axes cannot be used in equality constraints. Gli assi dello schizzo non possono essere usati nei vincoli di uguaglianza. - + Equality for B-spline edge currently unsupported. Uguaglianza tra bordi di una B-spline attualmente non è supportato. - - - - + + + + Select two or more edges of similar type. Seleziona due o più bordi di tipo simile. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selezionare due punti e una linea di simmetria, o due punti e un punto di simmetria, o una linea e un punto di simmetria nello schizzo. - - + + Cannot add a symmetry constraint between a line and its end points. Impossibile aggiungere un vincolo di simmetria tra una linea e i suoi punti finali. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Non è possibile aggiungere un vincolo di simmetria tra una linea e i suoi estremi! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selezionare i due punti finali delle linee da usare come raggi e un bordo che rappresenta il limite. Il primo punto selezionato corrisponde all'indice n1, il secondo a n2 e il valore è definito dal rapporto n2/n1. - + Selected objects are not just geometry from one sketch. Gli oggetti selezionati non sono delle geometrie dello stesso schizzo. - + Cannot create constraint with external geometry only. Impossibile creare il vincolo solo con la geometria esterna. - + Incompatible geometry is selected. Le geometrie selezionate sono incompatibili. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw sul bordo di una B-spline attualmente non è supportato. - - - - - + + + + + Select constraints from the sketch. Seleziona i vincoli dallo schizzo. - - - + + + Select constraint(s) from the sketch. Selezionare Vincolo(i) dallo schizzo. - + B-Spline Degree Grado B-Spline - + Define B-Spline Degree, between 1 and %1: Definisci il grado B-Spline, tra 1 e %1: - - - + + + CAD Kernel Error Errore Kernel CAD - + None of the selected elements is an edge. Nessuno degli elementi selezionati è un bordo. - - + + At least one of the selected objects was not a B-Spline and was ignored. Almeno uno degli oggetti selezionati non è una B-Spline ed è stato ignorato. - - + + The selection comprises more than one item. Please select just one knot. La selezione comprende più di un elemento. Si prega di selezionare un solo nodo. - - + + Input Error Errore di input - - + + None of the selected elements is a knot of a B-spline Nessuno degli elementi selezionati è un nodo di una B-spline - - + + Selection is empty La selezione è vuota - + Nothing is selected. Please select a b-spline. Nessuna selezione. Si prega di selezionare una b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Seleziona una curva b-spline per inserire un nodo (non un nodo su di esso). Se la curva non è una b-spline, si prega di convertirla in una prima. - + Nothing is selected. Please select end points of curves. Nulla è selezionato. Seleziona i punti finali delle curve. - + Too many curves on point Troppe curve sul punto - - + + Exactly two curves should end at the selected point to be able to join them. Esattamente due curve dovrebbero terminare nel punto selezionato per poterle unire. - + Too few curves on point Troppe poche curve sul punto - + Two end points, or coincident point should be selected. Dovrebbero essere selezionati due punti finali o un punto coincidente. @@ -3307,17 +3308,17 @@ Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; Attualmente non è supportato spostare la geometria esterna su un altro livello visivo. La geometria esterna sarà omessa - + Set knot multiplicity Imposta molteplicità di nodo - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Imposta la molteplicità del nodo all'ultimo punto fornito, tra 1 e %1:Nota che la molteplicità può essere ignorata in determinate circostanze. Per favore fare riferimento alla documentazione per i dettagli - + Value Error Errore di valore @@ -3631,12 +3632,12 @@ Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; Lunghezza: - + Refractive index ratio Indice di rifrazione - + Ratio n2/n1: Rapporto n2/n1: @@ -3916,8 +3917,8 @@ Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; SketcherGui::PropertyConstraintListItem - - + + Unnamed Senza nome @@ -4147,15 +4148,15 @@ Per ottenere l'effetto è necessario accedere nuovamente alla modalità di modif Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Seleziona il tipo di vincoli di quotature per la barra degli strumenti: +'Strumento singolo': Un singolo strumento per tutti i vincoli di quotature nella barra degli strumenti: Distanza, Distanza X / Y, Angolo, Raggio. (Altri nella lista ) +'Strumenti separati': Strumenti individuali per ogni vincolo di quotature. +'Entrambi': Avrai sia lo strumento 'Quotature' che gli strumenti separati. +Questa impostazione è solo per la barra degli strumenti. Qualunque sia la scelta, tutti gli strumenti sono sempre disponibili nel menu e attraverso le scorciatoie. @@ -4174,32 +4175,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Entrambe - + Auto Auto - + Diameter Diametro - + Radius Raggio @@ -4648,12 +4649,12 @@ Quindi gli oggetti sono visibili solo dietro il piano dello schizzo.Applica agli schizzi esistenti - + Unexpected C++ exception Eccezione imprevista di C++ - + Sketcher Sketcher @@ -4661,55 +4662,55 @@ Quindi gli oggetti sono visibili solo dietro il piano dello schizzo. SketcherGui::SketcherValidation - + No missing coincidences Nessuna coincidenza mancante - + No missing coincidences found Nessuna coincidenza mancante trovata - + Missing coincidences Coincidenze mancanti - + %1 missing coincidences found %1 coincidenze mancante trovate - + No invalid constraints Nessun vincolo non valido - + No invalid constraints found Non è stato trovato nessun vincolo non valido - + Invalid constraints Vincoli non validi - + Invalid constraints found Trovati dei vincoli non validi - - - + + + Reversed external geometry Geometria esterna reversa - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4722,7 +4723,7 @@ Ai punti finali sono applicati %2 vincoli. I vincoli sono elencati nella vista R Per riassegnare i punti finali cliccare sul pulsante "Scambia i punti finali vincolati". Fare questo solo una volta per gli schizzi creati con versioni di FreeCAD precedenti alla 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4731,75 +4732,70 @@ However, no constraints linking to the endpoints were found. Tuttavia, non sono stati trovati i vincoli che riguardano i punti finali. - + No reversed external-geometry arcs were found. Nella geometria esterna non sono stati trovati archi invertiti. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Sono state apportate %1 modifiche ai vincoli collegati ai punti finali di archi invertiti. - - + + Constraint orientation locking Vincolo orientamento bloccato - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Il blocco dell'orientamento è stato attivato e ricalcolato per %1 vincoli. I vincoli sono elencati nella vista Rapporto (menu Visualizza -> Pannelli -> Rapporto). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Il blocco dell'orientamento è stato disattivato per %1 vincoli. I vincoli sono elencati nella vista Rapporto (menu Visualizza -> Pannelli -> Rapporto). Si noti che per tutti i vincoli futuri, di default il blocco è ancora attivo. - - + + Delete constraints to external geom. Elimina i vincoli alla geometria esterna - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? State per eliminare tutti i vincoli che trattano con la geometria esterna. Questo è utile per salvare uno schizzo che contiene dei collegamenti con la geometria esterna che sono interrotti o modificati. Siete sicuri di voler eliminare i vincoli? - + All constraints that deal with external geometry were deleted. Tutti i vincoli che trattano con la geometria esterna sono stati cancellati. - + No degenerated geometry Nessuna geometria degenerata - + No degenerated geometry found Non è stata trovata nessuna geometria degenerata - + Degenerated geometry Geometria degenerata - + %1 degenerated geometry found %1 geometria degenerata trovata SketcherGui::TaskSketcherConstraints - - - Form - Modulo - Check to toggle filters @@ -4874,11 +4870,6 @@ Tuttavia, non sono stati trovati i vincoli che riguardano i punti finali. SketcherGui::TaskSketcherElements - - - Form - Modulo - Check to toggle filters @@ -5064,7 +5055,7 @@ Tuttavia, non sono stati trovati i vincoli che riguardano i punti finali. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Controlli avanzati del solutore @@ -5355,8 +5346,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Cambia modalità tra mostra o nascondi lo strumento curvatura di tutte le B-spline @@ -5364,8 +5355,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Diminuisce la molteplicità del nodo selezionato di una B-spline @@ -5373,8 +5364,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Cambia modalità tra mostra o nascondi i gradi di tutte le B-spline @@ -5382,8 +5373,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Aumenta la molteplicità del nodo selezionato di una B-spline @@ -5391,8 +5382,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Commuta tra mostrare e nascondere le molteplicità di nodo per tutte le B-spline @@ -5400,8 +5391,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Commuta tra mostra e nascondi le molteplicità di nodo per tutte le B-spline @@ -5409,8 +5400,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Cambia modalità tra mostra o nascondi i poligoni di controllo di tutte le B-spline @@ -5445,8 +5436,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Vincola il diametro di un cerchio o di un arco @@ -5454,7 +5445,7 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fissare il diametro/raggio di un cerchio o di un arco @@ -5462,8 +5453,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fissa il raggio di un cerchio o di un arco @@ -5471,7 +5462,7 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fissare il diametro/raggio di un cerchio o di un arco @@ -5488,8 +5479,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Crea un arco dai suoi punti finali e un punto lungo l'arco @@ -5497,8 +5488,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Crea un cerchio da 3 punti del cerchio @@ -5506,8 +5497,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Crea un arco dal suo centro e dai suoi punti finali @@ -5515,8 +5506,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Crea un arco di ellisse dal suo centro, raggio maggiore e punti finali @@ -5524,8 +5515,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Crea un arco di iperbole dal suo centro, raggio maggiore e punti finali @@ -5533,8 +5524,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Crea un arco di parabola dal suo fuoco, vertice e punti finali @@ -5542,13 +5533,13 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateBSpline - + B-spline by control points B-spline da punti di controllo - - + + Create a B-spline by control points Crea una B-spline dai punti di controllo @@ -5556,8 +5547,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Crea un cerchio dal suo centro e da un punto del cerchio @@ -5565,8 +5556,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Crea un ellisse da periasse, apoasse e raggio minore @@ -5574,8 +5565,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Crea un'ellisse da centro, raggio maggiore e punto @@ -5583,8 +5574,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateFillet - - + + Creates a radius between two lines Crea un raccordo circolare tra due linee @@ -5592,8 +5583,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Crea un ettagono dal suo centro e un vertice @@ -5601,8 +5592,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Crea un esagono dal suo centro e un vertice @@ -5610,7 +5601,7 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateOblong - + Create a rounded rectangle Crea un rettangolo arrotondato @@ -5618,14 +5609,14 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Crea un ottagono dal suo centro e un vertice - - + + Create a regular polygon by its center and by one corner Crea un poligono regolare dal suo centro e un vertice @@ -5633,8 +5624,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Crea un pentagono dal suo centro e un vertice @@ -5642,8 +5633,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Raccordo che preserva i vincoli e il punto di intersezione @@ -5651,7 +5642,7 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateRectangle - + Create a rectangle Crea un rettangolo @@ -5659,7 +5650,7 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateRectangle_Center - + Create a centered rectangle Crea un rettangolo centrato @@ -5667,8 +5658,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Crea un quadrato dal suo centro e un vertice @@ -5676,8 +5667,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Crea un triangolo equilatero da centro e un vertice @@ -5685,13 +5676,13 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periodica dai punti di controllo - - + + Create a periodic B-spline by control points Crea una B-spline periodica dai punti di controllo @@ -6109,7 +6100,7 @@ L'algoritmo di Eigen Sparse QR è ottimizzato per matrici sparsi; solitamente pi Sketcher - Schizzo + Sketcher @@ -6322,36 +6313,36 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Errore @@ -6371,45 +6362,45 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Il vincolo ha informazioni sull'indice non valide ed è malformato. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Vincolo non valido - - - + + + Failed to add arc Impossibile aggiungere l'arco - + Failed to add arc of ellipse Impossibile aggiungere l'arco d'elisse - + Cannot create arc of hyperbola from invalid angles, try again! Impossibile creare l'arco di iperbola da angoli non validi, riprova! - + Cannot create arc of hyperbola Impossibile creare l'arco di iperbola - + Cannot create arc of parabola Impossibile creare l'arco di parabola @@ -6419,18 +6410,18 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Errore nell'aggiunta del polo B-Spline - + Error creating B-spline pole Errore nella creazione del polo B-Spline - - + + Error creating B-spline Errore nella creazione della Bspline - + Error deleting last pole Errore nell'eliminazione dell'ultimo polo @@ -6440,49 +6431,49 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Impossibile aggiungere nodo - + Cannot add internal alignment points Impossibile aggiungere punti di allineamento interni - + Error removing knot Errore nel rimuovere il nodo - + Failed to add carbon copy Impossibile aggiungere copia carbone - - + + Failed to add circle Impossibile aggiungere il cerchio - + Failed to add an ellipse Impossibile aggiungere un'elisse - + Failed to extend edge Impossibile estendere il bordo - + Failed to add external geometry Impossibile aggiungere la geometria esterna - + Failed to create fillet Impossibile creare il raccordo - + Failed to add line Impossibile aggiungere la linea @@ -6492,7 +6483,7 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Impossibile aggiungere il punto - + Failed to add polygon Impossibile aggiungere il poligono @@ -6502,27 +6493,27 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Impossibile aggiungere il rettangolo - + Failed to add rounded rectangle Impossibile aggiungere il rettangolo arrotondato - + Failed to add slot Impossibile aggiungere l'asola - + Failed to add edge Impossibile aggiungere il bordo - + Failed to trim edge Impossibile tagliare il bordo - + Value Error @@ -6532,13 +6523,13 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline da nodi - - + + Create a B-spline by knots Crea una B-spline con i nodi @@ -6546,13 +6537,13 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots B-spline periodica dai nodi - - + + Create a periodic B-spline by knots Crea una B-spline periodica dai nodi @@ -6658,12 +6649,12 @@ I punti devono essere impostati più vicino di un quinto della spaziatura della CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Crea B-spline con i nodi - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Creare una B-spline con i nodi, cioè per interpolazione, nello schizzo. @@ -6671,12 +6662,12 @@ I punti devono essere impostati più vicino di un quinto della spaziatura della CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Crea B-spline periodica con i nodi - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Creare una B-spline periodica con i nodi, cioè per interpolazione, nello schizzo. @@ -6684,12 +6675,12 @@ I punti devono essere impostati più vicino di un quinto della spaziatura della CmdSketcherDimension - + Dimension Dimensione - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6701,14 +6692,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimensione + + + + Dimension tools. + Strumenti di quotature. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts index 04124487d8..fe788a8b80 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy カーボンコピーを作成 - + Copy the geometry of another sketch 別のスケッチのジオメトリーをコピー @@ -100,27 +100,27 @@ B-スプラインの情報レイヤーの表示/非表示 - + Show/hide B-spline degree B-スプラインの次数の表示/非表示 - + Show/hide B-spline control polygon B-スプラインの制御ポリゴンの表示/非表示 - + Show/hide B-spline curvature comb B-スプラインの曲率コームの表示/非表示 - + Show/hide B-spline knot multiplicity B-スプラインのノット多重度を表示/非表示 - + Show/hide B-spline control point weight B-スプラインの制御点重みの表示/非表示 @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 円弧や円を拘束する - + Constrain an arc or a circle 円弧や円を拘束する - + Constrain radius 半径拘束 - + Constrain diameter 直径拘束 - + Constrain auto radius/diameter 半径/直径を自動拘束 @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc 円弧を作成 - + Create an arc in the sketcher スケッチに円弧を作成 - + Center and end points 中心点と端点 - + End points and rim point 端点と円周上の点から作成 @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline B-スプラインを作成 - + Create a B-spline in the sketch スケッチ上にB-スプラインを作成 @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle 円を作成 - + Create a circle in the sketcher スケッチに円を作成 - + Center and rim point 中心点と周上の点から円を作成 - + 3 rim points 円上の3点 @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic 円錐曲線を作成 - + Create a conic in the sketch スケッチに円錐曲線を作成 - + Ellipse by center, major radius, point 中心、長半径、点を指定して楕円を作成 - + Ellipse by periapsis, apoapsis, minor radius 近点、遠点、短半径を指定して楕円を作成 - + Arc of ellipse by center, major radius, endpoints 中心、長半径、端点からなる楕円弧 - + Arc of hyperbola by center, major radius, endpoints 中心、長半径、端点からなる双曲線の円弧 - + Arc of parabola by focus, vertex, endpoints 焦点、頂点、端点からなる放物線の円弧 @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet フィレットを作成 - + Create a fillet between two lines 2 線の間にフィレットを作成 - + Sketch fillet スケッチフィレット - + Constraint-preserving sketch fillet 拘束を維持したスケッチフィレット @@ -299,17 +299,17 @@ スケッチ上に長方形を作成 - + Rectangle 四角形 - + Centered rectangle 中心配置長方形 - + Rounded rectangle 角丸長方形 @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon 正多角形を作成 - + Create a regular polygon in the sketcher スケッチャーで正多角形を作成 - + Triangle 三角形 - + Square 正方形 - + Pentagon 五角形 - + Hexagon 六角形 - + Heptagon 七角形 - + Octagon 八角形 - + Regular polygon 正多角形 @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity ノット多重度を変更 - + Modifies the multiplicity of the selected knot of a B-spline 選択されたB-スプラインのノットの多重度を変更 - + Increase knot multiplicity ノット多重度を増やす - + Decrease knot multiplicity ノット多重度を減らす @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 角度を拘束 - + Fix the angle of a line or the angle between two lines 直線の角度または2直線間の角度を拘束 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block ブロック拘束 - + Block the selected edge from moving 選択したエッジが動かないようブロック @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 一致拘束 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses 点間の一致拘束、または円、円弧、楕円の間の同心拘束を作成 @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 直径拘束 - + Fix the diameter of a circle or an arc 円または円弧の直径を固定 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 距離拘束 - + Fix a length of a line or the distance between a line and a vertex or between two circles 直線の長さ、直線と節点の間の距離、または2つの円の間の距離を拘束 @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 水平距離拘束 - + Fix the horizontal distance between two points or line ends 2点間または直線端点間の水平距離を拘束 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 垂直距離拘束 - + Fix the vertical distance between two points or line ends 2点間または直線端点間の垂直距離を拘束 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 等値拘束 - + Create an equality constraint between two lines or between circles and arcs 2直線間または円と円弧間の等値拘束を作成 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 水平拘束 - + Create a horizontal constraint on the selected item 選択されているアイテムに対して水平拘束を作成 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock ロック拘束 - + Create both a horizontal and a vertical distance constraint on the selected vertex 選択した頂点に水平距離拘束と垂直距離拘束の両方を作成 @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 平行拘束 - + Create a parallel constraint between two lines 2直線間の平行拘束を作成 @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 直角拘束 - + Create a perpendicular constraint between two lines 2直線間の垂直拘束を作成 @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object オブジェクト上の点拘束 - + Fix a point onto an object 点をオブジェクト上に拘束 @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 半径/直径を自動拘束 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 円を選択した場合は直径を拘束、円弧/スプラインを選択した場合は半径を拘束 @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight 半径または重みを拘束 - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline 円・円弧の半径、またはB-スプラインの極の重みを固定 @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) 屈折率拘束(スネルの法則) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. 光線の2端点と境界のエッジの間に屈折の法則 (スネル則の法則) による拘束を作成 @@ -598,12 +598,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 対称拘束 - + Create a symmetry constraint between two points with respect to a line or a third point 線または第3点に対して、2点間の対称拘束を作成 @@ -612,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 正接拘束 - + Create a tangent constraint between two entities 2 つのエンティティ間に正接拘束を作成 @@ -625,12 +625,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 垂直拘束 - + Create a vertical constraint on the selected item 選択されているアイテムに対して垂直拘束を作成 @@ -638,12 +638,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline ジオメトリーをB-スプラインに変換 - + Converts the selected geometry to a B-spline 選択されたジオメトリーをB-スプラインに変換 @@ -664,12 +664,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points 3点を指定して円弧を作成 - + Create an arc by its end points and a point along the arc 終点と円弧に上の点から円弧を作成 @@ -677,12 +677,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points 3点を指定して円を作成 - + Create a circle by 3 perimeter points 3つの境界点から円を作成 @@ -690,12 +690,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center 中心点から円弧を作成 - + Create an arc by its center and by its end points 中心と終点から円弧を作成 @@ -703,12 +703,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse 楕円弧を作成 - + Create an arc of ellipse in the sketch スケッチに楕円弧を作成します。 @@ -716,12 +716,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola 双曲線の円弧を作成 - + Create an arc of hyperbola in the sketch スケッチ上に双曲線の円弧を作成 @@ -729,12 +729,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola 放物線の円弧を作成 - + Create an arc of parabola in the sketch スケッチ上に放物線の円弧を作成 @@ -742,12 +742,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline B-スプラインを作成 - + Create a B-spline by control points in the sketch. スケッチの制御点からB-スプラインを作成 @@ -755,12 +755,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle 円を作成 - + Create a circle in the sketch スケッチ上に円を作成 @@ -768,12 +768,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points 3 点を指定して楕円を作成 - + Create an ellipse by 3 points in the sketch 3点を指定して楕円をスケッチに作成します。 @@ -781,12 +781,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center 中心点を指定して楕円を作成 - + Create an ellipse by center in the sketch 中心点を指定して楕円をスケッチに作成 @@ -794,12 +794,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet フィレットを作成 - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -807,12 +807,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon 七角形を作成 - + Create a heptagon in the sketch スケッチに七角形を作成 @@ -820,12 +820,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon 六角形を作成 - + Create a hexagon in the sketch スケッチに六角形を作成 @@ -859,12 +859,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon 八角形を作成 - + Create an octagon in the sketch スケッチに八角形を作成します。 @@ -872,12 +872,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon 五角形を作成 - + Create a pentagon in the sketch スケッチに五角形を作成します。 @@ -885,12 +885,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline 周期的なB-スプラインを作成 - + Create a periodic B-spline by control points in the sketch. スケッチの制御点から周期的なB-スプラインを作成 @@ -898,12 +898,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point 点を作成 - + Create a point in the sketch スケッチ上に点を作成 @@ -911,12 +911,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet コーナーを維持したフィレットを作成 - + Fillet that preserves intersection point and most constraints 交差点とほとんどの拘束を維持したフィレット @@ -924,12 +924,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline ポリラインを作成 - + Create a polyline in the sketch. 'M' Key cycles behaviour スケッチにポリラインを作成。Mキーで挙動を切り替え。 @@ -963,12 +963,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon 正多角形を作成 - + Create a regular polygon in the sketch スケッチに正多角形を作成 @@ -976,12 +976,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot 長円形を作成 - + Create a slot in the sketch スケッチに長円を作成 @@ -989,12 +989,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square 正方形を作成 - + Create a square in the sketch スケッチに正方形を作成 @@ -1002,12 +1002,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle 正三角形を作成 - + Create an equilateral triangle in the sketch スケッチに正三角形を作成 @@ -1015,12 +1015,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree B-スプラインの次数を減らす - + Decreases the degree of the B-spline B-スプラインの次数を減らす @@ -1028,12 +1028,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity ノット多重度を減らす - + Decreases the multiplicity of the selected knot of a B-spline 選択されたB-スプラインのノットの多重度を減らす @@ -1080,12 +1080,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge エッジを延長 - + Extend an edge with respect to the picked position ピックした位置でエッジを延長 @@ -1093,12 +1093,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry 外部ジオメトリーを作成 - + Create an edge linked to an external geometry 外部形状にリンクするエッジを作成 @@ -1106,12 +1106,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree B-スプラインの次数を増やす - + Increases the degree of the B-spline B-スプラインの次数を増加 @@ -1119,12 +1119,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity ノット多重度を増やす - + Increases the multiplicity of the selected knot of a B-spline 選択されたB-スプラインのノットの多重度を増やす @@ -1132,12 +1132,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot ノットを挿入 - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. 指定したパラメーターのノットを挿入。そのパラメーターにすでにノットが存在する場合、多重度が1増加します。 @@ -1145,12 +1145,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves 曲線を結合 - + Join two curves at selected end points 選択した端点で2曲線を結合 @@ -1435,12 +1435,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge エッジを分割 - + Splits an edge into two while preserving constraints 拘束を維持したままエッジを2つに分割 @@ -1461,12 +1461,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space 仮想スペースの切り替え - + Switches the selected constraints or the view to the other virtual space 選択した拘束または表示を他の仮想スペースに切り替え @@ -1487,12 +1487,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 拘束をアクティブ化/非アクティブ化 - + Activates or deactivates the selected constraints 選択した拘束をアクティブ化・非アクティブ化 @@ -1513,12 +1513,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 駆動拘束/参照拘束の切り替え - + Set the toolbar, or the selected constraints, into driving or reference mode ツールバー、または選択した拘束を駆動モードまたは参照モードに設定 @@ -1527,12 +1527,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge エッジをトリム - + Trim an edge with respect to the picked position ピックされている位置に従ってエッジをトリム @@ -1590,369 +1590,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 水平拘束を追加 - - - + + + Add horizontal alignment 水平配置を追加 - - + + Add vertical constraint 垂直拘束を追加 - + Add vertical alignment 垂直配置を追加 - + Add 'Lock' constraint 「ロック」拘束を追加 - + Add relative 'Lock' constraint 相対的な「ロック」拘束を追加 - + Add fixed constraint 固定拘束を追加 - + Add 'Block' constraint 「ブロック」拘束を追加 - + Add block constraint ブロック拘束を追加 - - - + + + Add coincident constraint 一致拘束を追加 - - + + Add distance from horizontal axis constraint 水平軸からの距離拘束を追加 - - + + Add distance from vertical axis constraint 垂直軸からの距離拘束を追加 - - + + Add point to point distance constraint 点間の距離拘束を追加 - - - + + + Add point to line Distance constraint 点と線の間の距離拘束を追加 - - + + Add circle to circle distance constraint 円と円の間の距離拘束を追加 - + Add circle to line distance constraint 円と線の間の距離拘束を追加 - - - - - + + + + + + Add length constraint 寸法拘束を追加 - - + + Dimension 寸法 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint オブジェクト上への点の拘束を追加 - - + + Add point to point horizontal distance constraint 点間の水平距離拘束を追加 - + Add fixed x-coordinate constraint X座標固定拘束を追加 - - + + Add point to point vertical distance constraint 点間の垂直距離拘束を追加 - + Add fixed y-coordinate constraint Y座標固定拘束を追加 - - + + Add parallel constraint 並行拘束を追加 - - - - - - - + + + + + + + Add perpendicular constraint 直角拘束を追加 - + Add perpendicularity constraint 垂直拘束を追加 - + Swap coincident+tangency with ptp tangency 点間正接によって一致と正接を入れ替え - + Swap PointOnObject+tangency with point to curve tangency 点曲線間正接によってオブジェクト上点と正接を入れ替え - - - - - - - + + + + + + + Add tangent constraint 正接拘束を追加 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 正接拘束点を追加 - - - - + + + + Add radius constraint 半径拘束を追加 - - - - + + + + Add diameter constraint 直径拘束を追加 - - - - + + + + Add radiam constraint 径拘束を追加 - - - - - - + + + + + + Add angle constraint 角度拘束を追加 - - + + Add equality constraint 等値拘束を追加 - - - - - + + + + + Add symmetric constraint 対称拘束を追加 - + Add Snell's law constraint スネル則拘束を追加 - + Toggle constraint to driving/reference 拘束の駆動/参照を切り替え - + Activate/Deactivate constraint 拘束をアクティブ化/非アクティブ化 @@ -2012,44 +2013,44 @@ invalid constraints, degenerated geometry, etc. 中心配置長方形を追加 - + Add rounded rectangle 角丸四角形を追加 - + Add line to sketch wire スケッチワイヤーに線を追加 - + Add arc to sketch wire スケッチワイヤーに円弧を追加 - - + + Add sketch arc スケッチ円弧を追加 - - + + Add sketch circle スケッチ円を追加 - + Add sketch ellipse スケッチ楕円を追加 - + Add sketch arc of ellipse スケッチ楕円弧を追加 - + Add sketch arc of hyperbola スケッチ双曲線弧を追加 @@ -2069,33 +2070,33 @@ invalid constraints, degenerated geometry, etc. スケッチ点を追加 - - + + Create fillet フィレットを作成 - + Trim edge エッジをトリム - + Extend edge エッジを延長 - + Split edge エッジを分割 - + Add external geometry 外部ジオメトリーを追加 - + Add slot 長円を追加 @@ -2105,37 +2106,37 @@ invalid constraints, degenerated geometry, etc. 六角形を追加 - + Convert to NURBS NURBSに変換 - + Increase spline degree スプラインの次数を増やす - + Decrease spline degree スプラインの次数を減らす - + Increase knot multiplicity ノット多重度を増やす - + Decrease knot multiplicity ノット多重度を減らす - + Insert knot ノットを挿入 - + Join Curves 曲線を結合 @@ -2175,12 +2176,12 @@ invalid constraints, degenerated geometry, etc. 軸配置を削除 - + Toggle constraints to the other virtual space 拘束を他の仮想スペースへ切り替え - + @@ -2188,7 +2189,7 @@ invalid constraints, degenerated geometry, etc. 拘束の仮想スペースを更新 - + Add auto constraints 自動拘束を追加 @@ -2228,7 +2229,7 @@ invalid constraints, degenerated geometry, etc. ノット点を追加 - + Create a carbon copy カーボンコピーを作成 @@ -2244,37 +2245,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. 自動拘束エラー: 一致拘束の適用中にスケッチの求解に失敗しました。 - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. 自動拘束エラー: 垂直/水平拘束の適用中にスケッチの求解に失敗しました。 - + Autoconstrain error: Unsolvable sketch while applying equality constraints. 自動拘束エラー: 等値拘束の適用中にスケッチの求解に失敗しました。 - + Autoconstrain error: Unsolvable sketch without constraints. 自動拘束エラー: 拘束の無いスケッチの求解に失敗しました。 - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. 自動拘束エラー: 水平拘束・垂直拘束の適用後にスケッチの求解に失敗しました。 - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. 自動拘束エラー: 一致拘束の適用後にスケッチの求解に失敗しました。 - + Autoconstrain error: Unsolvable sketch after applying equality constraints. 自動拘束エラー: 等値拘束の適用後にスケッチの求解に失敗しました。 @@ -2399,143 +2400,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2551,9 +2552,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection 誤った選択 @@ -2574,329 +2575,329 @@ invalid constraints, degenerated geometry, etc. 寸法拘束 - + Cannot add a constraint between two external geometries. 2つの外部形状間に拘束を追加することはできません。 - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. 2つの固定ジオメトリーの間に拘束を追加することができません。固定ジオメトリーに外部ジオメトリー、ブロック拘束されたジオメトリー、B-スプラインの節点といった特殊な点が含まれています。 - + Sketcher Constraint Substitution スケッチャー拘束の置換 - + Keep notifying me of constraint substitutions 拘束置換の通知を継続 - - - + + + Only sketch and its support are allowed to be selected. スケッチとそのサポートのみが選択可能です. - + One of the selected has to be on the sketch. 選択されているアイテムの1つがスケッチ上にある必要があります. - - + + Select an edge from the sketch. スケッチからエッジを選択 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 拘束不可 - - - - + + + + The selected edge is not a line segment. 選択したエッジは線分ではありません. - - - - - - + + + + + + Double constraint 二重拘束 - - - - - + + + + + The selected edge already has a horizontal constraint! 選択されたエッジにはすでに水平拘束が設定されています! - - - + + + The selected edge already has a vertical constraint! 選択されたエッジにはすでに垂直拘束が設定されています! - - - - - - + + + + + + The selected edge already has a Block constraint! 選択されたエッジにはすでにブロック拘束が設定されています! - + The selected item(s) can't accept a horizontal constraint! 選択されているアイテムは水平拘束出来ません! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! 複数の固定点が選択されています。固定点を1つだけ選択してください! - + The selected item(s) can't accept a vertical constraint! 選択されているアイテムは垂直拘束出来ません! - - - + + + Select vertices from the sketch. スケッチから頂点を選択 - + Select one vertex from the sketch other than the origin. スケッチから原点以外の節点を 1 つ選択します。 - + Select only vertices from the sketch. The last selected vertex may be the origin. スケッチから頂点のみを選択してください。最後に選択された頂点は原点になります。 - + Wrong solver status 不適切なソルバー状態 - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. スケッチが求解されていない場合や冗長/競合する拘束がある場合はブロック拘束を追加できません。 - + Select one edge from the sketch. スケッチから1本のエッジを選択 - + Select only edges from the sketch. スケッチからエッジのみを選択 - + Number of selected objects is not 3 選択したオブジェクトの数が3ではありません。 - - - + + + Error エラー - + Unexpected error. More information may be available in the Report View. 予期しないエラーです。詳細についてはレポートビューで確認できます。 - + Endpoint to endpoint tangency was applied instead. 代わりに端点間の正接拘束が適用されました。 - + Select two or more points from the sketch. スケッチから2点以上の節点を選択 - + Select two or more vertices from the sketch. スケッチから2点以上の節点を選択してください。 - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. スケッチから一致拘束のための複数の頂点、または同心拘束のための複数の円、楕円、円弧、楕円弧を選択してください。 - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. スケッチから一致拘束のための2頂点、または同心拘束のための2つの円、楕円、円弧、楕円弧を選択してください。 - + Select exactly one line or one point and one line or two points from the sketch. スケッチから1直線または1点と1直線または2点を選択してください - + Cannot add a length constraint on an axis! 軸に対して長さ拘束を追加することはできません! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. スケッチから1直線、1点と1直線、2点、または2円を選択してください。 - + This constraint does not make sense for non-linear curves. この拘束は非線形な曲線に対して無効です。 - + Endpoint to edge tangency was applied instead. 代わりに端点とエッジの正接拘束が適用されました。 - - - - - - - + + + + + + + Select the right things from the sketch. スケッチから正しい対象を選択してください。 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. B-スプラインの重みではないエッジを選択してください。 - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. 選択した点をそれぞれの曲線上に拘束することができません。同じ要素の一部であるか、両方とも外部ジオメトリーであるか、適切なエッジでないことが原因です。 - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 選択した点をそれぞれの曲線上に拘束することができません。同じ要素のパーツであるか、両方とも外部ジオメトリーであることが原因です。 - - - - + + + + Select exactly one line or up to two points from the sketch. スケッチから1直線または2つ以下の点を選択してください - + Cannot add a horizontal length constraint on an axis! 軸に対して水平距離拘束を追加することはできません! - + Cannot add a fixed x-coordinate constraint on the origin point! 原点に対してX座標を固定する拘束を追加することはできません! - - + + This constraint only makes sense on a line segment or a pair of points. この拘束は1線分または点ペアに対してのみ有効です。 - + Cannot add a vertical length constraint on an axis! 軸に対して垂直距離拘束を追加することはできません! - + Cannot add a fixed y-coordinate constraint on the origin point! 原点に対してY座標を固定する拘束を追加することはできません! - + Select two or more lines from the sketch. スケッチから2本以上の直線を選択してください - - + + Select at least two lines from the sketch. スケッチから2本以上の直線を選択してください - + Select a valid line. 有効な直線を選択してください。 - - + + The selected edge is not a valid line. 選択されたエッジは有効な直線ではありません。 - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2906,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 可能な組み合わせ: 2曲線; 1端点と1曲線; 2端点; 2曲線と1点 - + Select some geometry from the sketch. perpendicular constraint スケッチから幾つかのジオメトリを選択してください。 - - + + Cannot add a perpendicularity constraint at an unconnected point! 接続していない点に対して垂直拘束を追加することはできません! - - - + + + Perpendicular to B-spline edge currently unsupported. B-スプラインエッジの直角拘束は現在サポートされていません。 - - + + One of the selected edges should be a line. 選択されているエッジの1つが直線である必要があります - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. 端点間の正接拘束が適用されました。一致拘束は削除されました。 - + Endpoint to edge tangency was applied. The point on object constraint was deleted. 端点とエッジの正接拘束が適用されました。点のオブジェクト上への拘束は削除されました。 - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2951,277 +2952,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 可能な組み合わせ: 2曲線; 端点と曲線; 2端点; 2曲線と1点 - + Select some geometry from the sketch. tangent constraint スケッチから幾つかのジオメトリを選択してください。 - - - + + + Cannot add a tangency constraint at an unconnected point! 接続されていない点に対して正接拘束を追加することはできません! - - + + Tangent constraint at B-spline knot is only supported with lines! B-スプラインのノットでの接線拘束は線でのみサポートされています! - + B-spline knot to endpoint tangency was applied instead. 代わりにB-スプラインのノットと端点の正接拘束が適用されました。 - + Select either one point and several curves, or one curve and several points. 1点と複数の曲線、または1曲線と複数の点を選択してください。 - - + + Wrong number of selected objects! 選択したオブジェクトの数が正しくありません ! - - + + With 3 objects, there must be 2 curves and 1 point. 使用される3オブジェクトは2つの曲線と1つの点である必要があります。 - - - + + + Tangency to B-spline edge currently unsupported. B-スプラインエッジの正接拘束は現在サポートされていません。 - - - - - - + + + + + + Select one or more arcs or circles from the sketch. スケッチから 1 つ以上の円弧または円を選択してください。 - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. 1つ以上のB-スプラインの極、または1つ以上の円・円弧をスケッチから選択してください。ただし混在はできません。 - - - + + + Constraint only applies to arcs or circles. 円弧または円のみに適用される拘束です。 - - + + Select one or two lines from the sketch. Or select two edges and a point. スケッチから1本か2本の線分を選択してください。あるいは2つのエッジと頂点を選択します。 - - + + Parallel lines 平行線 - - + + An angle constraint cannot be set for two parallel lines. 2つの平行線に角度拘束を設定できません。 - + Cannot add an angle constraint on an axis! 軸に対して角度拘束を追加することはできません! - + Select two edges from the sketch. スケッチから2本のエッジを選択してください - + Select two or more compatible edges. 複数の互換性のあるエッジを選択してください。 - + Sketch axes cannot be used in equality constraints. スケッチ軸を等値拘束で使用することはできません。 - + Equality for B-spline edge currently unsupported. B-スプラインエッジの等値拘束は現在サポートされていません。 - - - - + + + + Select two or more edges of similar type. 複数の同じタイプのエッジを選択してください。 - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 2つの点と対称線、2つの点と対称点、あるいは1本の直線と対称点をスケッチから選択してください。 - - + + Cannot add a symmetry constraint between a line and its end points. 直線とその端点間に対称拘束を追加することはできません。 - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 直線とその端点間に対称拘束を追加することはできません! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw 光線として使用される直線の2端点と境界を表すエッジを選択してください。1つ目に選択された点がインデックスn1、2つ目の点がインデックスn2と対応し、データ値は比n2/n1を設定します。 - + Selected objects are not just geometry from one sketch. 選択されたオブジェクトは1つのスケッチから成るジオメトリーではありません。 - + Cannot create constraint with external geometry only. 外部ジオメトリーのみからなる拘束を作成することはできません。 - + Incompatible geometry is selected. 互換性のないジオメトリーが選択されています。 - + SnellsLaw on B-spline edge is currently unsupported. B-スプラインエッジのスネル則拘束は現在サポートされていません。 - - - - - + + + + + Select constraints from the sketch. スケッチから拘束を選択 - - - + + + Select constraint(s) from the sketch. スケッチからの拘束(複数可)を選択します。 - + B-Spline Degree B-スプラインの次数 - + Define B-Spline Degree, between 1 and %1: 1から %1 の間でB-スプラインの次数を定義してください: - - - + + + CAD Kernel Error CADカーネルエラー - + None of the selected elements is an edge. 選択した要素の中にエッジがありません。 - - + + At least one of the selected objects was not a B-Spline and was ignored. 選択したオブジェクトの少なくとも 1 つは B-スプラインではなかったため無視されました。 - - + + The selection comprises more than one item. Please select just one knot. 複数のアイテムが選択されています。ノットをひとつだけ選択してください。 - - + + Input Error 入力エラー - - + + None of the selected elements is a knot of a B-spline 選択要素のなかにB-スプラインのノットがありません。 - - + + Selection is empty 選択されていません - + Nothing is selected. Please select a b-spline. 何も選択されていません。B-スプラインを選択してください。 - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. ノットを挿入するには (ノットではなく) B-スプライン曲線を選択してください。 曲線がB-スプラインでない場合は、まず曲線をB-スプラインに変換してください。 - + Nothing is selected. Please select end points of curves. 何も選択されていません。曲線の端点を選択してください。 - + Too many curves on point 点に対する曲線が多すぎます。 - - + + Exactly two curves should end at the selected point to be able to join them. 結合するには2曲線の端点だけが選択されている必要があります。 - + Too few curves on point 点に対する曲線が少なすぎます。 - + Two end points, or coincident point should be selected. 2端点、または一致点を選択する必要があります。 @@ -3301,17 +3302,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 外部ジオメトリーの別の表示レイヤーへの移動は現在サポートされていません。外部ジオメトリーは省略されます。 - + Set knot multiplicity ノット多重度を設定 - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details 最後に指定された点に 1 から %1 の間のノット多重度を設定します。特定の状況では多重度は無視されることに注意してください。詳細についてはドキュメントを参照してください。 - + Value Error 値エラー @@ -3625,12 +3626,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 長さ: - + Refractive index ratio 屈折率 - + Ratio n2/n1: 比 n2/n1: @@ -3910,8 +3911,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Unnamed @@ -4140,13 +4141,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4167,32 +4168,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both 両方 - + Auto 自動 - + Diameter 直径 - + Radius 半径 @@ -4641,12 +4642,12 @@ Then objects are only visible behind the sketch plane. 既存のスケッチに適用 - + Unexpected C++ exception 予期しない C++ 例外 - + Sketcher スケッチャー @@ -4654,55 +4655,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences 一致点の欠損はありません - + No missing coincidences found 一致点の欠損は見つかりませんでした - + Missing coincidences 一致点の欠損 - + %1 missing coincidences found 一致点の欠損が、%1 個見つかりました - + No invalid constraints 無効な拘束はありません - + No invalid constraints found 無効な拘束は見つかりません - + Invalid constraints 無効な拘束 - + Invalid constraints found 無効な拘束が見つかりました - - - + + + Reversed external geometry 反転された外部ジオメトリー - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4715,7 +4716,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only 「拘束内の端点を交換」ボタンをクリックし端点を再配置してください。 v0.15 よりも古い FreeCAD において作成されたスケッチでは、一度だけ行ってみるとよい。 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4724,75 +4725,70 @@ However, no constraints linking to the endpoints were found. ただし端点にリンクする拘束が見つかりません。 - + No reversed external-geometry arcs were found. 反転された外部ジオメトリーの円弧は見つかりませんでした。 - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 は、逆接の端点にリンクする拘束が変更されました。 - - + + Constraint orientation locking 方向のロック拘束 - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). 方向のロック拘束が有効なので、 %1 の拘束は再計算されました。拘束はレポートビュー(表示メニュー -> パネル -> レポートビュー)でリストされています。 - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. 拘束 %1 によって方向のロックが無効です。拘束リストはレポートビューにあります(メニューの表示 -> パネル -> レポートビュー)。全てのフィーチャー拘束でロックのデフォルトは有効のままであることに注意してください。 - - + + Delete constraints to external geom. 外部ジオメトリーへの拘束を削除 - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? 外部ジオメトリーを扱うすべての拘束を削除しようとしています。これは外部ジオメトリーへの壊れた/変更されたリンクを回復するのに便利です。拘束を削除してもよろしいですか。 - + All constraints that deal with external geometry were deleted. 外部ジオメトリーを扱うすべての制約が削除されました。 - + No degenerated geometry 縮退ジオメトリーがありません。 - + No degenerated geometry found 縮退ジオメトリーが見つかりませんでした。 - + Degenerated geometry 縮退したジオメトリー - + %1 degenerated geometry found %1 の縮退ジオメトリーが見つかりました。 SketcherGui::TaskSketcherConstraints - - - Form - フォーム - Check to toggle filters @@ -4867,11 +4863,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - フォーム - Check to toggle filters @@ -5057,7 +5048,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control 高度なソルバー制御 @@ -5346,8 +5337,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines すべてのB-スプラインの曲率コームの非表示と表示を切り替えます。 @@ -5355,8 +5346,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline 選択されたB-スプラインのノットの多重度を減らす @@ -5364,8 +5355,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines すべてのB-スプラインの次数の非表示と表示を切り替えます。 @@ -5373,8 +5364,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline 選択されたB-スプラインのノットの多重度を増やす @@ -5382,8 +5373,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines すべてのB-スプラインのノット多重度の非表示と表示を切り替えます。 @@ -5391,8 +5382,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines すべてのB-スプラインの制御点重みの非表示と表示を切り替えます。 @@ -5400,8 +5391,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines すべてのB-スプラインの制御ポリゴンの非表示と表示を切り替えます。 @@ -5436,8 +5427,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 円または円弧の直径を固定 @@ -5445,7 +5436,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc 円または円弧の半径/直径を固定 @@ -5453,8 +5444,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 円または円弧の半径を固定 @@ -5462,7 +5453,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc 円または円弧の半径/直径を固定 @@ -5479,8 +5470,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc 終点と円弧に上の点から円弧を作成 @@ -5488,8 +5479,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points 円周上の3点から円を作成 @@ -5497,8 +5488,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points 中心と終点から円弧を作成 @@ -5506,8 +5497,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints 中心点、長半径、端点から楕円弧を作成 @@ -5515,8 +5506,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints 中心、長半径、端点から双曲線の円弧を作成 @@ -5524,8 +5515,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints 焦点、頂点、端点から放物線の円弧を作成 @@ -5533,13 +5524,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points 制御点によるB-スプライン - - + + Create a B-spline by control points 制御点によるB-スプラインを作成 @@ -5547,8 +5538,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point 中心と円周上の点から円を作成 @@ -5556,8 +5547,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius 近点、遠点、短半径から楕円を作成 @@ -5565,8 +5556,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point 中心、長半径、1点から楕円を作成 @@ -5574,8 +5565,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines 2 線の間に半径を作成 @@ -5583,8 +5574,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner 中心点と1つの角を指定して七角形を作成 @@ -5592,8 +5583,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner 中心点と1つの角を指定して六角形を作成 @@ -5601,7 +5592,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle 角丸長方形を作成 @@ -5609,14 +5600,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner 中心点と1つの角を指定して八角形を作成 - - + + Create a regular polygon by its center and by one corner 中心点と1つの角を指定して正多角形を作成 @@ -5624,8 +5615,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner 中心点と1つの角を指定して五角形を作成 @@ -5633,8 +5624,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point 拘束と交差点を維持したフィレット @@ -5642,7 +5633,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle 長方形を作成 @@ -5650,7 +5641,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle 中心配置長方形を作成 @@ -5658,8 +5649,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner 中心点と1つの角を指定して正方形を作成 @@ -5667,8 +5658,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner 中心点と1つの角を指定して正三角形を作成 @@ -5676,13 +5667,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points 制御点による周期的なB-スプライン - - + + Create a periodic B-spline by control points 制御点による周期的なB-スプラインを作成 @@ -6313,36 +6304,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error エラー @@ -6362,45 +6353,45 @@ The grid spacing change if it becomes smaller than this number of pixel.この拘束には無効なインデックス情報が含まれており、形式が正しくありません。 - - - - - - - - - - + + + + + + + + + + Invalid Constraint 拘束が正しくありません。 - - - + + + Failed to add arc 円弧を追加できませんでした。 - + Failed to add arc of ellipse 楕円弧を追加できませんでした。 - + Cannot create arc of hyperbola from invalid angles, try again! 角度が正しくないため双曲線の円弧を作成できません。再度、試してください! - + Cannot create arc of hyperbola 双曲線の円弧を作成できません。 - + Cannot create arc of parabola 放物線の円弧を作成できません。 @@ -6410,18 +6401,18 @@ The grid spacing change if it becomes smaller than this number of pixel.B-スプラインの極の追加エラー - + Error creating B-spline pole B-スプラインの極の作成エラー - - + + Error creating B-spline B-スプラインの作成エラー - + Error deleting last pole 最後の極の削除エラー @@ -6431,49 +6422,49 @@ The grid spacing change if it becomes smaller than this number of pixel.ノット点を追加できません。 - + Cannot add internal alignment points 内部配置点を追加できません。 - + Error removing knot ノット削除エラー - + Failed to add carbon copy カーボンコピーを追加できませんでした。 - - + + Failed to add circle 円を追加できませんでした。 - + Failed to add an ellipse 楕円を追加できませんでした。 - + Failed to extend edge エッジを延長できませんでした。 - + Failed to add external geometry 外部ジオメトリーを追加できませんでした。 - + Failed to create fillet フィレットを作成できませんでした。 - + Failed to add line 線を追加できませんでした。 @@ -6483,7 +6474,7 @@ The grid spacing change if it becomes smaller than this number of pixel.点を追加できませんでした。 - + Failed to add polygon 多角形を追加できませんでした。 @@ -6493,27 +6484,27 @@ The grid spacing change if it becomes smaller than this number of pixel.長方形を追加できませんでした。 - + Failed to add rounded rectangle 角丸長方形を追加できませんでした。 - + Failed to add slot 長円を追加できませんでした。 - + Failed to add edge エジイを追加できませんでした。 - + Failed to trim edge エッジをトリムできませんでした。 - + Value Error @@ -6523,13 +6514,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots ノットによるB-スプライン - - + + Create a B-spline by knots ノットによるB-スプラインを作成 @@ -6537,13 +6528,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots ノットによる周期的なB-スプライン - - + + Create a periodic B-spline by knots ノットによる周期的なB-スプラインを作成 @@ -6649,12 +6640,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots ノットによるB-スプラインを作成 - + Create a B-spline by knots, i.e. by interpolation, in the sketch. ノット、つまり補間によってスケッチにB-スプラインを作成。 @@ -6662,12 +6653,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots ノットによる周期的なB-スプラインを作成 - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. ノット、つまり補間によってスケッチに周期的なB-スプラインを作成。 @@ -6675,12 +6666,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 寸法 - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6692,14 +6683,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + 寸法 + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts index 20368e345c..7cc30af8e8 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy ზუსტი ასლის შექმნა - + Copy the geometry of another sketch სხვა ესკიზის გეომეტრიის კოპირება @@ -100,27 +100,27 @@ B-სპლაინის ინფორმაციის ფენის ჩვენების ჩართ/გამორთ - + Show/hide B-spline degree B-სპლაინის დონის ჩვენების ჩართ/გამორთ - + Show/hide B-spline control polygon B-სპლაინის კონტროლის პოლიგონის ჩვენების ჩართ/გამორთ - + Show/hide B-spline curvature comb B-სპლაინის სიმრუდის ჩვენება/დამალვა - + Show/hide B-spline knot multiplicity B-სპლაინის კვანძის გაყოფადობის ჩვენების ჩართ/გამორთ - + Show/hide B-spline control point weight B-სპლაინის საკონტროლო წერტილის წონის ჩვენების ჩართ/გამორთ @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle რკალის ან წრის შეზღუდვა - + Constrain an arc or a circle რკალის ან წრის შეზღუდვა - + Constrain radius რადიუსის სეზღუდვა - + Constrain diameter დიამეტრის შეზღუდვა - + Constrain auto radius/diameter ავტომატური რადიუსის/დიამეტრის შეზღუდვა @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc რკალის შექმნა - + Create an arc in the sketcher ესკიზზე რკალის შექმნა - + Center and end points ცენტრი და საბოლოო წერტილები - + End points and rim point რკალის შექმნა ბოლო წერტილებით და მხების წერტილით @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline B-სპლაინის შექმნა - + Create a B-spline in the sketch ესკიზზე B-სპლაინის შექმნა @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle წრის შექმნა - + Create a circle in the sketcher ესკიზზე წრეწირის შექმნა - + Center and rim point ცენტრი და მხების წერტილი - + 3 rim points სამი წერტილის მიხედვით @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic კონუსის ტიპის ფიგურის შექმნა - + Create a conic in the sketch ესკიზზე კონუსის შექმნა - + Ellipse by center, major radius, point ოვალი ცენტრით, ძირითადი რადიუსით და წერტილით - + Ellipse by periapsis, apoapsis, minor radius ოვალი პერიაფსისით, აპოაფსისით და მცირე რადიუსით - + Arc of ellipse by center, major radius, endpoints ოვალის რკალი ცენტრის, ძირითადი რადიუსის და ბოლო წერტილების მიხედვით - + Arc of hyperbola by center, major radius, endpoints ჰიპერბოლის რკალი ცენტრის, ძირითადი რადიუსის და ბოლო წერტილების მიხედვით - + Arc of parabola by focus, vertex, endpoints პარაბოლის რკალის აგება ფოკუსით, წვეროთი და ბოლო წერტილებით @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet მომრგვალების შექმნა - + Create a fillet between two lines ორ ხაზს შუა მომრგვალების შექმნა - + Sketch fillet დამრგვალება - + Constraint-preserving sketch fillet მომრგვალება შეზღუდვის შენახვით @@ -299,17 +299,17 @@ ესკიზზე მართკუთხედის შექმნა - + Rectangle მართკუთხედი - + Centered rectangle მართკუთხედის ცენტრზე სწორება - + Rounded rectangle მომრგვალებული მართკუთხედი @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon ჩვეულებრივი მრავალკუთხედის შექმნა - + Create a regular polygon in the sketcher ესკიზზე ჩვეულებრივი მრავალკუთხედის შექმნა - + Triangle სამკუთხედი - + Square კვადრატი - + Pentagon ხუთკუთხედი - + Hexagon ექვსკუთხედი - + Heptagon შვიდკუთხედი - + Octagon რვაკუთხედი - + Regular polygon ჩვეულებრივი მრავალკუთხედი @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity კვანძების გაყოფადობის შეცვლა - + Modifies the multiplicity of the selected knot of a B-spline B-სპლაინის მონიშნული კვანძის სიმრავლის შეცვლა - + Increase knot multiplicity კვანძის ჯერადობის გაზრდა - + Decrease knot multiplicity კვანძის ჯერადობის შემცირება @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle კუთხის შეზღუდვა - + Fix the angle of a line or the angle between two lines ხაზის ან ორ ხაზს შორს კუთხის დაფიქსირება @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block შეზღუდვის ბლოკირება - + Block the selected edge from moving მონიშნული წიბოს გადაადგილების დაბლოკვა @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident დამთხვევის შეზღუდვა - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses წერტილებს შორის დამთხვევის ან წრეწირებს, რკალებსა და ოვალებს შორის კონცენტრულობის შეზღუდვის შექმნა @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter დიამეტრის შეზღუდვა - + Fix the diameter of a circle or an arc წრის ან რკალის რადიუსის გასწორება @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance დაშორების შეზღუდვა - + Fix a length of a line or the distance between a line and a vertex or between two circles დააყენეთ ხაზის სიგრძე ან მანძილი ხაზსა და წვეროს ან ორ წრეწირს შორის @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance ჰორიზონტალური დაშორების შეზღუდვა - + Fix the horizontal distance between two points or line ends ორ წერტილს ან ხაზის ბოლოებს შორის ჰორიზონტალური დაშორების ფიქსირება @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance ვერტიკალური დაშორების შეზღუდვა - + Fix the vertical distance between two points or line ends ორ წერტილს ან ხაზის ბოლოებს შუა დაშორების ფიქსირება @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal ტოლობით შეზღუდვა - + Create an equality constraint between two lines or between circles and arcs ორ ხაზს ან წრეწირსა და რკალებს შორის თანასწორობის შეზღუდვის შექმნა @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally ჰორიზონტალურობის შეზღუდვა - + Create a horizontal constraint on the selected item არჩეულ ელემენტზე ჰორიზონტალური შეზღუდვის შექმნა @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock მდებარეობის ჩაკეტვა - + Create both a horizontal and a vertical distance constraint on the selected vertex ორივე, ჰორიზონტალური და ვერტიკალური შეზღუდვების შექმნა @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel პარალელურობის შეზღუდვა - + Create a parallel constraint between two lines ორ ხაზს შორის პარალელურობის შეზღუდვის შექმნა @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular მართობულობის შეზღუდვა - + Create a perpendicular constraint between two lines ორ ხაზს შორის მართობის შეზღუდვის შექმნა @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object წერტილის ობიექტზე დამაგრება - + Fix a point onto an object წერტილის ობიექტზე მიმაგრება @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter ავტომატური რადიუსის/დიამეტრის შეზღუდვა - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen თუ წრეწირს აირჩევთ, დიამეტრი უცვლელი იქნება, თუ რკალს/სპლაინის პოლუსი - რადიუსი @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight რადიუსის ან წონის შეზღუდვა - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline წრის ან რკალის რადიუსის ან B-სპლაინს პოლუსის სიმძიმის დაფიქსირება @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) არეკვლის შეზღუდვა (სნელის კანონი) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. სხივების ორ ბოლო წერტილსა და წიბოს, როგორც საკონტაქტო ზედაპირს შორის გარდატეხის კანონის (სნელის კანონი) შეზღუდვის შექმნა. @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical სიმეტრიულობის შეზღუდვა - + Create a symmetry constraint between two points with respect to a line or a third point სიმეტრიის შეზღუდვის შექმნა ორ წერტილს შორის @@ -614,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent მხების შეზღუდვა - + Create a tangent constraint between two entities ორი ობიექტს შორის მხების შეზღუდვის შექმნა @@ -627,12 +627,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically ვერტიკალურობის შეზღუდვა - + Create a vertical constraint on the selected item არჩეულ ელემენტზე ვერტიკალური შეზღუდვის შექმნა @@ -640,12 +640,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline გეომეტრიის B-სპლაინად გარდაქმნა - + Converts the selected geometry to a B-spline მონიშნული გეომეტრიის B-სპლაინად გარდაქმნა @@ -666,12 +666,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points რკალის სამი წერტილით შექმნა - + Create an arc by its end points and a point along the arc რკალის შექმნა მისი საბოლოო წერტილებითა და გაყოლებაზე ერთი წერტილით @@ -679,12 +679,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points წრეწირის შექმნა სამი წერტილით - + Create a circle by 3 perimeter points სამ პერიმეტრულ წერტილზე გამავალი წრეწირის შექმნა @@ -692,12 +692,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center რკალის ცენტრის გარშემო შექმნა - + Create an arc by its center and by its end points რკალის შექმნა მისი ცენტრითა და ბოლო წერტილებით @@ -705,12 +705,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse ოვალის რკალის შექმნა - + Create an arc of ellipse in the sketch ესკიზში ოვალის რკალის შექმნა @@ -718,12 +718,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola ჰიპერბოლის რკალის შექმნა - + Create an arc of hyperbola in the sketch ესკიზში ჰიპერბოლის რკალის შექმნა @@ -731,12 +731,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola რკალის ან პარაბოლის შექმნა - + Create an arc of parabola in the sketch ესკიზში პარაბოლის რკალის შექმნა @@ -744,12 +744,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline B-სპლაინის შექმნა - + Create a B-spline by control points in the sketch. ესკიზში B-სპლაინის საკონტროლო წერტილებით შექმნა. @@ -757,12 +757,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle წრის შექმნა - + Create a circle in the sketch ესკიზზე წრეწირის შექმნა @@ -770,12 +770,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points ოვალის სამი წერტილით შექმნა - + Create an ellipse by 3 points in the sketch ესკიზზე ოვალის 3 წერტილით შექმნა @@ -783,12 +783,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center ოვალის ცენტრით შექმნა - + Create an ellipse by center in the sketch ესკიზში ოვალის ცენტრით შექმნა @@ -796,12 +796,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet მომრგვალებული ნაზოლის შექმნა - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon შვიდკუთხედის შექმნა - + Create a heptagon in the sketch ესკიზზე შვიდკუთხედის შექმნა @@ -822,12 +822,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon ექვსკუთხედის შექმნა - + Create a hexagon in the sketch ესკიზში ექვსკუთხედის შექმნა @@ -861,12 +861,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon რვაკუთხედის შექმნა - + Create an octagon in the sketch ესკიზზე რვაკუთხედის შექმნა @@ -874,12 +874,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon ხუთკუთხედის შექმნა - + Create a pentagon in the sketch ესკიზზე ხუთკუთხედის შექმნა @@ -887,12 +887,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline პერიოდული B-სპლაინის შექნა - + Create a periodic B-spline by control points in the sketch. ესკიზში პერიოდული B-სპლაინის საკონტროლო წერტილებით შექმნა. @@ -900,12 +900,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point წერტილის შექმნა - + Create a point in the sketch ესკიზზე წერტილის შექმნა @@ -913,12 +913,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet მომრგვალების შექმნა კვეთის წერტილის შენახვით - + Fillet that preserves intersection point and most constraints მომრგვალება, რომელიც ინარჩუნებს კვეთის წერტილებს და შეზღუდვების უმრავლესობას @@ -926,12 +926,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline პოლიხაზის შექმნა - + Create a polyline in the sketch. 'M' Key cycles behaviour ესკიზში პოლიხაზის შექმნა რეჟიმის შეცვლა ხდება ღილაკით "M" @@ -965,12 +965,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon ჩვეულებრივი მრავალკუთხედის შექმნა - + Create a regular polygon in the sketch ესკიზზე ჩვეულებრივი მრავალკუთხედის შექმნა @@ -978,12 +978,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot სლოტის შექმნა - + Create a slot in the sketch ესკიზზე ღარის შექმნა @@ -991,12 +991,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square კვადრატის შექმნა - + Create a square in the sketch ესკიზზე ოთხკუთხედის შექმნა @@ -1004,12 +1004,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle ტოლგვერდა სამკუთხედის შექმნა - + Create an equilateral triangle in the sketch ესკიზზე ტოლფერდა სამკუთხედის შექმნა @@ -1017,12 +1017,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree B-სპლაინის კუთხის შემცირება - + Decreases the degree of the B-spline B-სპლაინის დონის დაწევა @@ -1030,12 +1030,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity კვანძის გამრავლებადობის შემცირება - + Decreases the multiplicity of the selected knot of a B-spline B-სპლაინის მონიშნული კვანძის სიმრავლის შემცირება @@ -1082,12 +1082,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge წიბოს გაფართოვება - + Extend an edge with respect to the picked position წიბოს მონიშნული მდებარეობისკენ გაგრძელება @@ -1095,12 +1095,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry გარე გეომეტრიის შექმნა - + Create an edge linked to an external geometry გარე გეომეტრიაზე მიბმული წიბოს შექმნა @@ -1108,12 +1108,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree B-სპლაინის კუთხის გაზრდა - + Increases the degree of the B-spline B-სპლაინის დონის აწევა @@ -1121,12 +1121,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity კვანძის გამრავლებადობის გაზრდა - + Increases the multiplicity of the selected knot of a B-spline B-სპლაინის მონიშნული კვანძის სიმრავლის გაზრდა @@ -1134,12 +1134,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot კვანძის ჩასმა - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. კვანძის მითითებულ პარამეტრთან ჩასმა. თუ მითითებულ პარამეტრთან კვანძი უკვე არსებობს, მისი მამრავლი ერთით გაიზრდება. @@ -1147,12 +1147,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves მრუდების შეერთება - + Join two curves at selected end points ორი მრუდის მონიშნული ბოლო წერტილების შეერთება @@ -1438,12 +1438,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge წიბოს გაყოფა - + Splits an edge into two while preserving constraints წიბოს ორად გაყოფა შეზღუდვების შენარჩუნებით @@ -1464,12 +1464,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space ვირტუალური სივრცის გადართვა - + Switches the selected constraints or the view to the other virtual space მონიშნული შეზღუდვების ან ხედების სხვა ვირტუალურ სივრცეზე გადართვა @@ -1490,12 +1490,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint შეზღუდვის აქტივაცია/დეაქტივაცია - + Activates or deactivates the selected constraints მონიშნული შეზღუდვების ჩართ/გამორთ @@ -1516,12 +1516,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint მშენებლობის/მიმართვის შეზღუდვის გადართვა - + Set the toolbar, or the selected constraints, into driving or reference mode ხელსაწყოთა პანელის, ან მონიშნული შეზღუდვების @@ -1531,12 +1531,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge წიბოს გაჭრა - + Trim an edge with respect to the picked position წიბოს მონიშნული პოზიციის გასწვრივ წაჭრა @@ -1595,369 +1595,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint ჰორიზონტალურობის შეზღუდვის დამატება - - - + + + Add horizontal alignment ჰორიზონტალური სწორების დამატება - - + + Add vertical constraint ვერტიკალურობის შეზღუდვის დამატება - + Add vertical alignment ვერტიკალური სწორების დამატება - + Add 'Lock' constraint "მბლოკავი" შეზღუდვის დამატება - + Add relative 'Lock' constraint ფარდობითი „დაბლოკვის“ შეზღუდვის დამატება - + Add fixed constraint ფიქსირებული შეზღუდვის დამატება - + Add 'Block' constraint 'ბლოკის' ტიპის შეზღუდვის დამატება - + Add block constraint ბლოკის შეზღუდვის დამატება - - - + + + Add coincident constraint დამთხვევის შეზღუდვის დამატება - - + + Add distance from horizontal axis constraint ჰორიზონტალური ღერძის შეზღუდვამდე მანძილის დამატება - - + + Add distance from vertical axis constraint ვერიკალურ ღერძამდე მანძილის შეზღუდვის დამატება - - + + Add point to point distance constraint წერტილიდან წერტილამდე მანძილის შეზღუდვის დამატება - - - + + + Add point to line Distance constraint წერტილიდან ხაზამდე დაშორების შეზღუდვის დამატება - - + + Add circle to circle distance constraint წრეწირიდან წრეწირამდე მანძილის შეზღუდვის დამატება - + Add circle to line distance constraint წრეწირიდან ხაზამდე მანძილის შეზღუდვის დამატება - - - - - + + + + + + Add length constraint სიგრძის შეზღუდვის დამატება - - + + Dimension ზომა - + Add lock constraint - Add lock constraint + დაბლოკვის შეზღუდვის დამატება - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + 'წყარომდე დაშორების' შეზღუდვის დამატება - - - + + + Add Distance constraint - Add Distance constraint + დაშორების შეზღუდვის დამატება - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + 'ჰორიზონტალური' შეზღუდვების დამატება - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + 'ვერტიკალური' შეზღუდვების დამატება + + Add Symmetry constraint + სიმეტრიის შეზღუდვის დამატება + + + + + Add Symmetry constraints + სიმეტრიის შეზღუდვების დამატება + + + + + Add Distance constraints + დაშორების შეზღუდვების დამატება + + + + Add Horizontal constraint + ჰორიზონტალური შეზღუდვის დამატება + + + + Add Vertical constraint + ვერტიკალური შეზღუდვის დამატება + + + Add Block constraint - Add Block constraint + ბლოკის შეზღუდვის დამატება - + Add Angle constraint - Add Angle constraint + კუთხის შეზღუდვის დამატება - - - + + + Add Equality constraint - Add Equality constraint + ტოლობის შეზღუდვის დამატება - + Add Equality constraints - Add Equality constraints + ტოლობის შეზღუდვების დამატება - + Add Radius constraint - Add Radius constraint + რადიუსის შეზღუდვის დამატება - + Add concentric and length constraint - Add concentric and length constraint + კონცენტრირებული და სიგრძის შეზღუდვის დამატებ - + Add DistanceX constraint - Add DistanceX constraint + X დაშორების შეზღუდვის დამატება - + Add DistanceY constraint - Add DistanceY constraint + Y დაშორების შეზღუდვის დამატება - + Add point to circle Distance constraint - Add point to circle Distance constraint + წერტილიდან წრეწირამდე დაშორების შეზღუდვის დამატება - - + + Add point on object constraint ობექტის შეზღუდვაზე წერტილის დამატება - - + + Add point to point horizontal distance constraint წერტილიდან წერტილამდე ჰორიზონტალური მანძილის შეზღუდვის დამატება - + Add fixed x-coordinate constraint X-კოორდინატის ფიქსირებული შეზღუდვის დამატება - - + + Add point to point vertical distance constraint წერტილიდან წერტილამდე ვერტიკალური მანძილის შეზღუდვის დამატება - + Add fixed y-coordinate constraint Y-კოორდინატის ფიქსირებული შეზღუდვის დამატება - - + + Add parallel constraint პარალელურობის შეზღუდვის დამატება - - - - - - - + + + + + + + Add perpendicular constraint მართკუთხა შეზღუდვის დამატება - + Add perpendicularity constraint მართკუთხობის სეზღუდვის დამატება - + Swap coincident+tangency with ptp tangency დამთხვევის+მხების ptp მხებთან მიმოცვლა - + Swap PointOnObject+tangency with point to curve tangency PointOnObject+მხების მიმოცვლა მრუდის მხების წერტილთან - - - - - - - + + + + + + + Add tangent constraint მხების შეზღუდვის დამატება - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point მხების შეზღუდვის წერტილის დამატება - - - - + + + + Add radius constraint რადიუსის შეზღუდვის დამატება - - - - + + + + Add diameter constraint დიამეტრის შეზღუდვის დამატება - - - - + + + + Add radiam constraint რადიამის შეზღუდვის დამატება - - - - - - + + + + + + Add angle constraint კუთხის შეზღუდვის დამატება - - + + Add equality constraint ტოლობის შეზღუდვის დამატება - - - - - + + + + + Add symmetric constraint სიმეტრიულობის შეზღუდვის დამატება - + Add Snell's law constraint სნელის კანონის შეზღუდვის დამატება - + Toggle constraint to driving/reference მშენებლობის/მიმართვის შეზღუდვის გადართვა - + Activate/Deactivate constraint შეზღუდვის აქტივაცია/დეაქტივაცია @@ -2017,44 +2018,44 @@ invalid constraints, degenerated geometry, etc. დაცენტრებული ესკიზის ყუთის დამატება - + Add rounded rectangle მომრგვალებული ოთხკუთხედის დამატება - + Add line to sketch wire ესკიზის პოლიხაზებისთვის ხაზის დამატება - + Add arc to sketch wire ესკიზის პოლიხაზზე რკალის დამატება - - + + Add sketch arc ესკიზზე რკალის დამატება - - + + Add sketch circle ესკიზზე წრეწირის დამატება - + Add sketch ellipse ესკიზზე ოვალის დამატება - + Add sketch arc of ellipse ესკიზზე ოვალის რკალის დამატება - + Add sketch arc of hyperbola ჰიპერბოლის ესკიზური რკალის დამატება @@ -2074,33 +2075,33 @@ invalid constraints, degenerated geometry, etc. ესკიზზე წერტილის დამატება - - + + Create fillet მომრგვალების შექმნა - + Trim edge წიბოს გაჭრა - + Extend edge წიბოს გაფართოვება - + Split edge წიბოს გაყოფა - + Add external geometry გარე გეომეტრიის დამატება - + Add slot სლოტის დამატება @@ -2110,37 +2111,37 @@ invalid constraints, degenerated geometry, etc. ექვსკუთხედის დამატება - + Convert to NURBS NURBS-ში გარდაქმნა - + Increase spline degree სპლაინის კუთხის გაზრდა - + Decrease spline degree სპლაინის კუთხის შემცირება - + Increase knot multiplicity კვანძის ჯერადობის გაზრდა - + Decrease knot multiplicity კვანძის ჯერადობის შემცირება - + Insert knot კვანძის ჩასმა - + Join Curves მრუდების შეერთება @@ -2180,12 +2181,12 @@ invalid constraints, degenerated geometry, etc. ღერძების სწორების მოცილება - + Toggle constraints to the other virtual space შეზღუდვების სხვა ვირტუალურ სივრცეში გადართვა - + @@ -2193,7 +2194,7 @@ invalid constraints, degenerated geometry, etc. შეზღუდვის ვირტუალური სივრცის განახლება - + Add auto constraints ავტომატური შეზღუდვების დამატება @@ -2233,7 +2234,7 @@ invalid constraints, degenerated geometry, etc. კვანძის წერტილის დამატება - + Create a carbon copy ზუსტი ასლის შექმნა @@ -2249,37 +2250,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. ავტომატური შეზღუდვის შეცდომა: დამთხვევის შეზღუდვების გადატარების დროს ესკიზი ამოხსნადი არაა. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. ავტომატური შეზღუდვის შეცდომა: ვერტიკალური/ჰორიზონტალური შეზღუდვების გადატარების დროს ესკიზი ამოხსნადი არაა. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. ავტომატური შეზღუდვის შეცდომა: თანასწორობის შეზღუდვების გადატარების დროს ესკიზი ამოხსნადი არაა. - + Autoconstrain error: Unsolvable sketch without constraints. ავტომატური შეზღუდვის შეცდომა: შეზღუდვების გარეშე ესკიზი ამოხსნადი არაა. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. ავტომატური შეზღუდვის შეცდომა: ჰორიზონტალური და ვერტიკალური შეზღუდვების გადატარების შემდეგ ესკიზი ამოხსნადი არაა. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. ავტომატური შეზღუდვის შეცდომა: წერტილიდან წერტილამდე შეზღუდვების გადატარების შემდეგ ესკიზი ამოხსნადი არაა. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. ავტომატური შეზღუდვის შეცდომა: თანასწორობის შეზღუდვების გადატარების შემდეგ ესკიზი ამოხსნადი არაა. @@ -2404,143 +2405,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2556,9 +2557,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection არასწორი არჩევანი @@ -2579,329 +2580,329 @@ invalid constraints, degenerated geometry, etc. სივრცული შეზღუდვა - + Cannot add a constraint between two external geometries. ორ გარე გეომეტრიას შორის შეზღუდვის დამატება შეუძლებელია. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. ორ დამაგრებულ გეომეტრიას შორის შეზღუდვის დამატება შეუძლებელია. დამაგრებულ გეომეტრიებს მიეკუთვნება გარე გეომეტრია, დაბლოკილი გეომეტრია და ისეთი სპეციალური წერტილები, როგორიცაა B-სპლაინის კვანძის წერტილები. - + Sketcher Constraint Substitution Sketcher-ის შეზღუდვის ჩანაცვლება - + Keep notifying me of constraint substitutions შეზღუდვების ჩანაცვლების შესახებ შეტყობინებების ჩვენების გაგრძელება - - - + + + Only sketch and its support are allowed to be selected. შეიძლება მოინიშნოს მხოლოდ ესკიზი და მისი საყრდენი. - + One of the selected has to be on the sketch. ერთერთი მონიშნული ესკიზზე უნდა იყოს. - - + + Select an edge from the sketch. ესკიზზე წიბოს მონიშვნა. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint შეზღუდვის შეცდომა - - - - + + + + The selected edge is not a line segment. მონიშნული წიბო ხაზის სეგმენტს არ წარმოადგენს. - - - - - - + + + + + + Double constraint ორმაგი შეზღუდვა - - - - - + + + + + The selected edge already has a horizontal constraint! მონიშნულ წიბოს უკვე აქვს ჰორიზონტალური შეზღუდვა! - - - + + + The selected edge already has a vertical constraint! მონიშნულ წიბოს უკვე აქვს ვერტიკალური შეზღუდვა! - - - - - - + + + + + + The selected edge already has a Block constraint! მონიშნულ წიბოს უკვე ადევს შეზღუდვის ბლოკი! - + The selected item(s) can't accept a horizontal constraint! არჩეული ელემენტ(ებ)-ი ვერ მიიღებს ჰორიზონტალურ შეზღუდვას! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! მონიშნულია ერთზე მეტი დამაგრებული წერტილი. მონიშნეთ მაქსიმუმ ერთი დამაგრებული წერტილი! - + The selected item(s) can't accept a vertical constraint! არჩეული ელემენტ(ებ)-ი ვერ მიიღებს ვერტიკალურ შეზღუდვას! - - - + + + Select vertices from the sketch. ესკიზზე წვეროების მონიშვნა. - + Select one vertex from the sketch other than the origin. აირჩიეთ წიბოდან კიდევ ერთი წვერო წყაროს გარდა. - + Select only vertices from the sketch. The last selected vertex may be the origin. ესკიზზე მხოლოდ წვეროები მონიშნეთ. ბოლოს მონიშნული წვერო საწყისი შეიძლება იყოს. - + Wrong solver status ამომხსნელის არასწორი სტატუსი - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. დაბლოკვის შეზღუდვას ვერ დაამატებთ, თუ ესკიზი ამოუხსნელია ან არსებობს დამატებითი, ან ურთიერთგამომრიცხავი შეზღუდვები. - + Select one edge from the sketch. ესკიზიდან მონიშნეთ ერთი წიბო. - + Select only edges from the sketch. ესკიზიდან მონიშნეთ მხოლოდ წიბოები. - + Number of selected objects is not 3 მონიშნული ობიექტების რიცხვი არ უდრის სამს - - - + + + Error შეცდომა - + Unexpected error. More information may be available in the Report View. მოულოდნელი შეცდომა. მეტ ინფორმციას შეიძლება ანგარიშის ხედში მიაგნოთ. - + Endpoint to endpoint tangency was applied instead. სამაგიეროდ გამოყენებულია ბოლო წერტილიდან ბოლო წერტილთან მხები. - + Select two or more points from the sketch. აირჩიეთ ორი ან მეტი წერტილი. - + Select two or more vertices from the sketch. ესკიზიდან აირჩიეთ ორი ან მეტი წვერო. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. დამთხვევის შეზღუდვისთვის ესკიზიდან აირჩიეთ ორი წვერო ან მეტი წვერო, ან, კონცენტრული შეზღუდვისთვის, ორი ან მეტი წრეწირი, ოვალები, რკალები ან ოვალის რკალები. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. დამთხვევის შეზღუდვისთვის ესკიზიდან აირჩიეთ ორი წვერო, ან, კონცენტრული შეზღუდვისთვის, ორი წრეწირი, ოვალები, რკალები ან ოვალის რკალები. - + Select exactly one line or one point and one line or two points from the sketch. ესკიზიდან აირჩიეთ მხოლოდ ერთი ხაზი ან ერთი წერტილი და ერთი ხაზი ან ორი წერტილი. - + Cannot add a length constraint on an axis! ღერძზე სიგრძის შეზღუდვის დაწესება შეუძლებელია! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. ესკიზიდან აირჩიეთ მხოლოდ ერთი ხაზი ან ერთი წერტილი და ერთი ხაზი ან ორი წერტილი ან ორი წრეწირი. - + This constraint does not make sense for non-linear curves. ამ შეზღუდვას აზრი არ აქვს არახაზოვანი მრუდებისთვის. - + Endpoint to edge tangency was applied instead. სამაგიეროდ გამოყენებულია ბოლო წერტილიდან წიბოსთნ მხები. - - - - - - - + + + + + + + Select the right things from the sketch. ესკიზიდან სწორი რამეების არჩევა. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. აირჩიეთ წიბო, რომელიც არაა B-სპლაინის წონა. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. არცერთი მონიშნული წერტილი არ შემოიფარგლება შესაბამის მრუდებზე, რადგან ისინი ერთი და იგივე ელემენტის ნაწილებია, რადგან ორივე გარე გეომეტრიაა, ან იმიტომ, რომ წიბო დაუშვებელია. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. არცერთი მონიშნული წერტილი არ შემოიფარგლება შესაბამის მრუდებზე. ისინი ან ერთი და იგივე ელემენტის ნაწილებია, ან გარე გეომეტრიის ნაწილს წარმოადგენენ. - - - - + + + + Select exactly one line or up to two points from the sketch. ესკიზიდან აირჩიეთ ზუსტად ერთი ხაზი ან ორი წერტილი. - + Cannot add a horizontal length constraint on an axis! ღერძზე ჰორიზონტალური სიგრძის შეზღუდვის დაწესება შეუძლებელია! - + Cannot add a fixed x-coordinate constraint on the origin point! საწყის წერტილზე ფიქსირებული X-კოორდინატის შეზღუდვის დამატება შეუძლებელია! - - + + This constraint only makes sense on a line segment or a pair of points. ამ შეზღუდვას აზრი მხოლოდ ხაზის სეგმენტზე ან წერტილების წყვილზე აქვს. - + Cannot add a vertical length constraint on an axis! ღერძზე ვერტიკალური სიგრძის შეზღუდვის დაწესება შეუძლებელია! - + Cannot add a fixed y-coordinate constraint on the origin point! საწყის წერტილზე ფიქსირებული Y-კოორდინატის შეზღუდვის დამატება შეუძლებელია! - + Select two or more lines from the sketch. ესკიზიდან აირჩიეთ ორი ან მეტი ხაზი. - - + + Select at least two lines from the sketch. მონიშნეთ მინიმუმ 2 ხაზი. - + Select a valid line. აირჩიეთ ნამდვილი ხაზი. - - + + The selected edge is not a valid line. მონიშნული წიბო სწორ ხაზს არ წარმოადგენს. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c მხარდაჭერილი კომბინაციებია: ორი მრუდი; ან ბოლო წერტილი და მრუდი; ან ორი ბოლო წერტილი; ან ორი მრუდი და წერტილი. - + Select some geometry from the sketch. perpendicular constraint ესკიზიდან მონიშნეთ რამე გეომეტრია. - - + + Cannot add a perpendicularity constraint at an unconnected point! დაუკავშირებელ წერტილზე მართობული შეზღუდვის დამატება შეუძლებელია! - - - + + + Perpendicular to B-spline edge currently unsupported. მართობი B-სპლაინის წიბოზე ჯერ მხარდაჭერილი არაა. - - + + One of the selected edges should be a line. ერთი მონიშნული წიბოებიდან ხაზი უნდა იყოს. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. ბოლო წერტილიდან წერტილამდე მხები გადატარებულია. დამთხვევის შეზღუდვა წაშლილია. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. ბოლო წერტილიდან წიბომდე მხები გადატარებულია. წერტილი ობიექტის შეზღუდვაზე წაშლილია. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c მხარდაჭერილი კომბინაციებია: ორი მრუდი; ან ბოლო წერტილი და მრუდი; ან ორი ბოლო წერტილი; ან ორი მრუდი და წერტილი. - + Select some geometry from the sketch. tangent constraint ესკიზიდან მონიშნეთ რამე გეომეტრია. - - - + + + Cannot add a tangency constraint at an unconnected point! დაუკავშირებელ წერტილზე მხების შეზღუდვის დამატება შეუძლებელია! - - + + Tangent constraint at B-spline knot is only supported with lines! მხების მზღუდავი B-სპლაინის კვანძთან მხოლოდ ხაზებითაა მხარდაჭერილი! - + B-spline knot to endpoint tangency was applied instead. სამაგიეროდ გამოყენებულია B-სპლაინის კვანძიდან ბოლო წერტილის მხებამდე. - + Select either one point and several curves, or one curve and several points. აირჩიეთ ან ერთი წერტილი და რამდენიმე მრუდი ან ერთ მრუდი და რამდენიმე წერტილი. - - + + Wrong number of selected objects! მონიშნული ობიექტების არასწორი რაოდენობა! - - + + With 3 objects, there must be 2 curves and 1 point. 3 ობიექტით უნდა იყოს 2 მრუდი და 1 წერტილი. - - - + + + Tangency to B-spline edge currently unsupported. მხების B-სპლაინის წიბომდე ჯერ მხარდაუჭერელია. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. აირჩიეთ ერთი ან მეტი რკალი ან წრეწირი ესკიზიდან. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. ესკიზიდან მონიშნეთ მხოლოდ ერთი ან მეტი B-სპლაინი, რკალები ან წრეწირები, მაგრამ ტიპებს ნუ შეურევთ. - - - + + + Constraint only applies to arcs or circles. შეზღუდვები ეხებამხოლოდ რკალებს და წრეწირებს. - - + + Select one or two lines from the sketch. Or select two edges and a point. ესკიზიდან მონიშნეთ ერთი ან ორი ხაზი ან მონიშნეთ ორი წიბო და წერტილი. - - + + Parallel lines პარალელური ხაზები - - + + An angle constraint cannot be set for two parallel lines. კუთხის შეზღუდვის დაყენება პარალელური ხაზებისთვის შეუძლებელია. - + Cannot add an angle constraint on an axis! ღერძზე კუთხის შეზღუდვის დაწესება შეუძლებელია! - + Select two edges from the sketch. მონიშეთ ორი წიბო ესკიზიდან. - + Select two or more compatible edges. მონიშნეთ ორი ან მეტი თავსებადი წიბო. - + Sketch axes cannot be used in equality constraints. ესკიზის ღერძები არ შეიძლება გამოყენებულ იქნას თანასწორობის შეზღუდვაში. - + Equality for B-spline edge currently unsupported. B-სპლაინის წიბოსთვის თანასწორობა ჯერ მხარდაუჭერელია. - - - - + + + + Select two or more edges of similar type. მონიშნეთ ორი ან მეტი ერთნაირი ტიპის წიბო. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. ესკიზზე მონიშნეთ ორი წერტილი და სიმეტრიის ხაზი, ან ორი წერტილი და სიმეტრიის წერტილი ან ხაზი და სიმეტრიის წერტილი. - - + + Cannot add a symmetry constraint between a line and its end points. არ შეიძლება სიმეტრიის შეზღუდვის დამატება ხაზსა და მის ბოლო წერტილებს შორის. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! არ შეიძლება სიმეტრიის შეზღუდვის დამატება ხაზსა და მის ბოლო წერტილებს შორის! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw აირჩიეთ ხაზის ორი ბოლოწერტილები, რომლებსაც სხივის როლში შეუძლიათ გამოსვლა და წიბო, რომელიც ზღვარს წრმოადგენს. პირველი მონიშნული წერტილი შეესაბამება ინდექსს n1, მეორე n2 და მიბმის მნიშვნელობა შესატყვისობას n2/n1-ზე აყენებს. - + Selected objects are not just geometry from one sketch. მონიშნული ობიექტები არ წარმოადგენენ მხოლიდ გეომეტრიებს ერთი ესკიზიდან. - + Cannot create constraint with external geometry only. შეუძლებელია შეზღუდვის შექმნა მხოლოდ გარე გეომეტრიით. - + Incompatible geometry is selected. არჩეულია შეუთავსებელი გეომეტრია. - + SnellsLaw on B-spline edge is currently unsupported. სნელის კანონი B-სპლაინის წიბოზე ჯერ მხარდაჭერილი არაა. - - - - - + + + + + Select constraints from the sketch. აირჩიეთ შეზღუდვები ესკიზიდან. - - - + + + Select constraint(s) from the sketch. მონიშნეთ შეზღუდვ(ებ)-ი ესკიზიდან. - + B-Spline Degree B-სპლაინის დონე - + Define B-Spline Degree, between 1 and %1: აღწერეთ B-სპლაინის კუთხე, 1-დან %1-მდე: - - - + + + CAD Kernel Error CAD-ის ბირთვის შეცდომა - + None of the selected elements is an edge. არცერთი მონიშნული ელემენტი წიბო არაა. - - + + At least one of the selected objects was not a B-Spline and was ignored. სულ ცოტა ერთი ობიექტი არ წარმოადგენდა B-სპლაინს და იგნორირებული იყო. - - + + The selection comprises more than one item. Please select just one knot. მონიშნული ერთზე მეტი ელემენტისგან შედგება. აირჩიეთ მხოლოდ ერთი კვანძი. - - + + Input Error შეყვანის შეცდომა - - + + None of the selected elements is a knot of a B-spline არცერთი არჩეული ელემენტი არ არის B-სპლაინის კვანძი - - + + Selection is empty მონიშნული ცარიელია - + Nothing is selected. Please select a b-spline. არაფერია მონიშნული. აირჩიეთ B-სპლაინი. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. აირჩიეთ B-სპლაინის მრუდი კვანძის ჩასასმელად (და არა კვანძზე დასასმელად). თუ მრუდი B-სპლაინი არა, ჯერ გადააკეთეთ. - + Nothing is selected. Please select end points of curves. არაფერი მოგინიშნავთ. მონიშნეთ მრუდების ბოლო წერტილები. - + Too many curves on point წერტილზე მეტისმეტად ბევრიმრუდია - - + + Exactly two curves should end at the selected point to be able to join them. იმისათვის, რომ შეგეძლოთ მათი შეერთება, აუცილებელია, ერთ წერტილში ზუსტად ორი მრუდი სრულდებოდეს. - + Too few curves on point წერტილზე მეტისმეტად ცოტა მრუდია - + Two end points, or coincident point should be selected. არჩეული უნდა იყოს ორი ბოლო წერტილი ან დამთხვევის წერტილი. @@ -3306,17 +3307,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c გარე გეომეტრიის სხვა ვიზუალურ ფენაზე გადატანა ამჟამად მხარდაჭერილი არაა. გარე გეომეტრია გამოტოვებული იქნება - + Set knot multiplicity კვანძის გაყოფადობის დაყენება - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details კვანძის გაყოფადობა ბოლო მითითებულ წერტილთან, 1-სა და %1-ს შორის:დაიმახსოვრეთ, რომ გაყოფადობა ზოგიერთ გარემოებაში შეიძლება იგნორირებული იყოს. დეტალებისთვის იხილეთ დოკუმენტაცია - + Value Error მნიშვნელობის შეცდომა @@ -3630,12 +3631,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c სიგრძე: - + Refractive index ratio გარდატეხვის მაჩვენებლების ფარდობა - + Ratio n2/n1: N2/n1 ფარდობა: @@ -3915,8 +3916,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed უსახელო @@ -4138,30 +4139,30 @@ Requires to re-enter edit mode to take effect. Dimension Constraint - Dimension Constraint + განზომილების შეზღუდვა Dimensioning constraints: - Dimensioning constraints: + განზომილების შეზღუდვები: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + აირჩიეთ თქვენი ხელსაწყოს პანელის განზომილების შეზღუდვის ტიპი: +'ერთი ხელსაწყო': ერთი ხელსაწყო ყველა განზომილების შეზღუდვისთვის ხელსაწყოთა ზოლში : დაშრება, დაშორება X / Y, კუთხე, რადიუსი (, დანარჩენები იხილეთ ჩამოსაშლელ სიაში). +'ცალ-ცალკე ხელსაწყო': ცალ-ცალკე ხელსაწყო ყველა განზომილების შეზღუდვისთვის. +'ორივე': გექნებათ ორივე, 'განზომილების' ხელსაწყო და ცალ-ცალკე ხელსაწყოები. +ეს პარამეტრი მხოლოდ ხელსაწყოების პანელისთვისაა. რაც არ უნდა აირჩიოთ, ყველა ხელსაწყო, ასევე, ხელმისაწვდომია მენიუდან და მათი მალსახმობებით. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + განზომილების ხელსაწყოს დიამეტრის/რადიუსის რეჟიმი: @@ -4169,38 +4170,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + როცა განზომილების ხელსაწყოს იყენებთ, ასევე შეგიძლიათ, მიუთითოთ, როგორ დამუშავდება წრეწირები და რკალები: +'ავტომატური': ხელსაწყო გამოიყენებს რადიუსს რკალებისთვის და დიამეტრს წრეწირებისთვის. +'დიამეტრი': ხელსაწყო ორივე, რკალებისთვის და წრეწირებისთვის, დიამეტრს გამოიყენებს. +'რადიუსი': ხელსაწყო ორივე, რკალებისთვის და წრეწირებისთვის, რადიუსს გამოიყენებს. - + Single tool - Single tool + ერთი ხელსაწყო - + Separated tools - Separated tools + გაყოფილი ხელსაწყოები - + Both ორივე - + Auto ავტო - + Diameter დიამეტრი - + Radius რადიუსი @@ -4649,12 +4650,12 @@ Then objects are only visible behind the sketch plane. არსებული ესკიზებზე გადატარება - + Unexpected C++ exception C++-ის გაუთვალისწინებელი შეცდომა - + Sketcher ესკიზმქმნელი @@ -4662,55 +4663,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences ნაკლული შეერთებები ნაპოვნი არაა - + No missing coincidences found ნაკლული შეერთებები ნაპოვნი არაა - + Missing coincidences გამოტოვებული დამთხვევები - + %1 missing coincidences found ნაპოვნია %1 ნაკლული შეერთება - + No invalid constraints არასწორი შეზღუდვები ნაპოვნი არაა - + No invalid constraints found არასწორი შეზღუდვები ნაპოვნი არაა - + Invalid constraints არასწორი შეზღუდვები - + Invalid constraints found ნაპოვნია არასწორი შეზღუდვები - - - + + + Reversed external geometry გადმობრუნებული გარე გეომეტრია - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4723,7 +4724,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only დააწკაპუნეთ ღილაკზე „შეცვალეთ ბოლო წერტილები შეზღუდვებში“ საბოლოო წერტილების ხელახლა მინიჭებისთვის. გააკეთეთ ეს მხოლოდ ერთხელ v0.15-ზე ძველი FreeCAD-ში შექმნილი ესკიზებისთვის - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4732,75 +4733,70 @@ However, no constraints linking to the endpoints were found. მაგრამ შეზღუდვების ბმულები საბოლოო წერტილებთან ნაპოვნი არაა. - + No reversed external-geometry arcs were found. შებრუნებული გარე გეომეტრიის რკალის პოვნა შეუძლებელია. - + %1 changes were made to constraints linking to endpoints of reversed arcs. შემობრუნებული რკალების ბოლო წერტილების დამაკავშირებელ შეზღუდვებზე %1 ცვლილება განხორციელდა. - - + + Constraint orientation locking შეზღუდვის ორიენტაციის ჩაკეტვა - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). ორიენტაციის ჩაკეტვა ჩართული და გადათვლილია %1 შეზღუდვისთვის. შეზღუდვების სია შეგიძლიათ იპოვოთ ანგარიშის მენიუში (მენიუს პუნქტი ხედი -> პანელები -> ანგარიში). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. ორიენტაციის ჩაკეტვა გამოირთო %1 შეზღუდვისთვის. შეზღუდვები ჩამოთვლილია ანგარიშის ხედში (მენიუ ხედი -> პანელები -> ანგარიშის ხედი). გაითვალისწინეთ, რომ ყველა მომავალი შეზღუდვისთვის, ჩაკეტვა კვლავ ნაგულისხმევად არის ჩართული. - - + + Delete constraints to external geom. გარე გეომეტრის შეზღუდვების წაშლა. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? აპირებთ წაშალოთ ყველა შეზღუდვა, რომელიც ეხება გარე გეომეტრიას. შეიძლება კარგი აზრი იყოს გარე გეომეტრიასთან გაფუჭებული/შეცვლილი ბმულების მქონე ესკიზის გადასარჩენად. დარწმუნებული ხართ, რომ გსურთ წაშალოთ შეზღუდვები? - + All constraints that deal with external geometry were deleted. გარე გეომეტრიასთან დაკავშირებული ყველა შეზღუდვა წაშლილია. - + No degenerated geometry დეგენერატიული გეომეტრია ნაპოვნი არაა - + No degenerated geometry found დეგენერატიული გეომეტრია ნაპოვნი არაა - + Degenerated geometry დეგენერირებული გეომეტრია - + %1 degenerated geometry found ნაპოვნია %1 დეგენერატიული გეომეტრია SketcherGui::TaskSketcherConstraints - - - Form - ფორმა - Check to toggle filters @@ -4875,11 +4871,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - ფორმა - Check to toggle filters @@ -4898,7 +4889,7 @@ However, no constraints linking to the endpoints were found. Settings - გამართვა + მორგება @@ -5065,7 +5056,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control ამომხსნელის დამატებითი პარამეტრები @@ -5356,8 +5347,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines ყველა B-სპლაინის მრუდების ჩვენების ჩართ/გამორთ @@ -5365,8 +5356,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline B-სპლაინის მონიშნული კვანძის სიმრავლის შემცირება @@ -5374,8 +5365,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines ყველა B-ს ხაზებისთვის დონის ჩვენების ჩართ/გამორთ @@ -5383,8 +5374,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline B-სპლაინის მონიშნული კვანძის სიმრავლის გაზრდა @@ -5392,8 +5383,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines ყველა B-ს ხაზებისთვის კვანძის სიმრავლის ჩვენების ჩართ/გამორთ @@ -5401,8 +5392,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines ყველა B-სპლაინების საკონტროლო წერტილის ჩვენების ჩართ/გამორთ @@ -5410,8 +5401,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines ყველა B-სპლაინის საკონტროლო მრავალკუთხედების ჩვენების ჩართ/გამორთ @@ -5446,8 +5437,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc წრის ან რკალის რადიუსის გასწორება @@ -5455,7 +5446,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc წრის ან რკალის რადიუსის/დიამეტრის გასწორება @@ -5463,8 +5454,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc წრეწირის ან რკალის რადიუსის გამუდმივება @@ -5472,7 +5463,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc წრის ან რკალის რადიუსის/დიამეტრის გასწორება @@ -5489,8 +5480,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc რკალის შექმნა მისი საბოლოო წერტილებითა და გაყოლებაზე ერთი წერტილით @@ -5498,8 +5489,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points სამ მხებ წერტილზე გამავალი წრეწირის შექმნა @@ -5507,8 +5498,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points რკალის შექმნა მისი ცენტრითა და ბოლო წერტილებით @@ -5516,8 +5507,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints ოვალის რკალის შექმნა მისი ცენტრით, ძირითადი რადიუსითა და ბოლო წერტილებით @@ -5525,8 +5516,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints ჰიპერბოლის რკალის შექმნა მისი ცენტრით, ძირითადი რადიუსითა და ბოლო წერტილებით @@ -5534,8 +5525,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints რკალის მისი ფოკუსის პარაბოლით, წვეროთი და საბოლოო წერტილებით შექმნა @@ -5543,13 +5534,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-სპლაინის საკონტროლო წერტილებით შექმნა - - + + Create a B-spline by control points B-სპლაინის საკონტროლო წერტილებით შექმნა @@ -5557,8 +5548,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point წრეწირის შექმნა მისი ცენტრითა და გარე წერტილით @@ -5566,8 +5557,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius ოვალი პერიაფსისით, აპოაფსისით და მცირე რადიუსით @@ -5575,8 +5566,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point ოვალის ცენტრის, ძირითადი რადიუსის და წერტილის მიხედვით შექმნა @@ -5584,8 +5575,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines რადიუსის ორ ხაზს შუა შექმნა @@ -5593,8 +5584,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner შვიდკუთხედის შექმნა მისი ცენტრითა და ერთი კუთხით @@ -5602,8 +5593,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner ექვსკუთხედის შექმნა მისი ცენტრითა და ერთი კუთხით @@ -5611,7 +5602,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle მომრგვალებული ოთხკუთხედის შექმნა @@ -5619,14 +5610,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner რვაკუთხედის შექმნა მისი ცენტრითა და ერთი კუთხით - - + + Create a regular polygon by its center and by one corner ჩვეულებრივი მრავალკუთხედის შექმნა მისი ცენტრითა და ერთი კუთხით @@ -5634,8 +5625,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner ხუთკუთხედის შექმნა მისი ცენტრითა და ერთი კუთხით @@ -5643,8 +5634,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point მომრგვალება, რომელიც ინარჩუნებს შეზღუდვებს და კვეთის წერტილს @@ -5652,7 +5643,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle მართკუთხედის შექმნა @@ -5660,7 +5651,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle ცენტრზე სწორებული მართკუთხედის შექმნა @@ -5668,8 +5659,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner ოთხკუთხედის შექმნა ცენტრითა და ერთი კუთხით @@ -5677,8 +5668,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner ტოლფერდა სამკუთხედის მისი ცენტრითა და 1 ფერდით შექმნა @@ -5686,13 +5677,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points პერიოდული B-სპლაინი საკონტროლო წერტილებით - - + + Create a periodic B-spline by control points საკონტროლო წერტილებით პერიოდული B-სპლაინის შექმნა @@ -6326,36 +6317,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error შეცდომა @@ -6375,45 +6366,45 @@ The grid spacing change if it becomes smaller than this number of pixel.შეზღუდვას ინდექსის ინფორმაცია არასწორია და ის მიუღებელია. - - - - - - - - - - + + + + + + + + + + Invalid Constraint არასწორი შეზღუდვა - - - + + + Failed to add arc რკალის დამატების შეცდომა - + Failed to add arc of ellipse ოვალის რკალის დამატების შეცდომა - + Cannot create arc of hyperbola from invalid angles, try again! არასწორი კუთხეებიდან ჰიპერბოლის რკალის შექმნა შეუძლებელია. თავიდან სცადეთ! - + Cannot create arc of hyperbola ჰიპერბოლის რკალის შექმნის შეცდომა - + Cannot create arc of parabola პარაბოლის რკალის შექმნის შეცდომა @@ -6423,18 +6414,18 @@ The grid spacing change if it becomes smaller than this number of pixel.B-სპლაინის პოლუსის დამატების შეცდომა - + Error creating B-spline pole B-სპლაინის პოლუსის შექმნის შეცდომა - - + + Error creating B-spline B-სპლაინის შექმნის შეცდომა - + Error deleting last pole ბოლო პოლუსის წაშლის შეცდომა @@ -6444,49 +6435,49 @@ The grid spacing change if it becomes smaller than this number of pixel.კვანძის წერტილის დამატების შეცდომა - + Cannot add internal alignment points შიდა სწორების წერტილების დამატება შეუძლებელია - + Error removing knot კვანძის წაშლის შეცდომა - + Failed to add carbon copy ზუსტი ასლის დამატების შეცდომა - - + + Failed to add circle წრეწირის დამატების შეცდომა - + Failed to add an ellipse ოვალის დამატების შეცდომა - + Failed to extend edge წიბოს გაფართოების შეცდომა - + Failed to add external geometry გარე გეომეტრის დამატების შეცდომა - + Failed to create fillet მომრგვალებული ნაზოლის შექმნის შეცდომა - + Failed to add line ხაზის დამატების შეცდომა @@ -6496,7 +6487,7 @@ The grid spacing change if it becomes smaller than this number of pixel.წერტილის დამატების შეცდომა - + Failed to add polygon მრავალკუთხედის დამატების შეცდომა @@ -6506,27 +6497,27 @@ The grid spacing change if it becomes smaller than this number of pixel.ჩარჩოს დამატების შეცდომა - + Failed to add rounded rectangle მომრგვალებული ოთხკუთხედის შექმნის შეცდომა - + Failed to add slot სლოტის დამატების შეცდომა - + Failed to add edge წიბოს დამატების შეცდომა - + Failed to trim edge წიბოს წაკვეთის შეცდომა - + Value Error @@ -6536,13 +6527,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-სპლაინი კვანძებით - - + + Create a B-spline by knots B-სპლაინის კვანძებით შექმნა @@ -6550,13 +6541,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots პერიოდული B-სპლაინი კვანძებით - - + + Create a periodic B-spline by knots კვანძებით პერიოდული B-სპლაინის შექმნა @@ -6662,12 +6653,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots B-სპლაინის კვანძებით შექმნა - + Create a B-spline by knots, i.e. by interpolation, in the sketch. ესკიზში B-სპლაინის კვანძებით (მაგ: ინტერპოლაციით) შექმნა. @@ -6675,12 +6666,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots კვანძებით პერიოდული B-სპლაინის შექმნა - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. ესკიზში პერიოდული B-სპლაინის კვანძებით (მაგ: ინტერპოლაციით) შექმნა. @@ -6688,12 +6679,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension ზომა - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6705,14 +6696,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + რკალების წრიული დამხმარის ჩვენება/დამალვა - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + წრიული დამხმარის ყველა რკალისთვის ჩართვასა და გამორთვას შორის გადართვა + + + + CmdSketcherCompDimensionTools + + + Dimension + ზომა + + + + Dimension tools. + განზომილების ხელსაწყოები. diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts index c25f88ae55..b00a0bca1b 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch 다른 스케치의 도형 복사 @@ -100,27 +100,27 @@ B-spline 정보 창 보기/숨기기 - + Show/hide B-spline degree B-스플라인 차수 표시/숨기기 - + Show/hide B-spline control polygon B-스플라인 제어 다각형 보기/숨기기 - + Show/hide B-spline curvature comb B-스플라인 곡률 빗 표시/숨기기 - + Show/hide B-spline knot multiplicity B-스플라인 knot multiplicity 보기/숨기기 - + Show/hide B-spline control point weight B-스플라인 제어점 가중치 보기/숨기기 @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 호 또는 원 구속 - + Constrain an arc or a circle 호 또는 원을 구속함 - + Constrain radius 제약조건: 반지름 - + Constrain diameter 직경 구속 - + Constrain auto radius/diameter 자동 반지름/직경 구속 @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc 호를 생성합니다 - + Create an arc in the sketcher 호를 생성 - + Center and end points 중점과 끝점 - + End points and rim point 끝점과 호의 한 점 @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline 생성: B-spline - + Create a B-spline in the sketch B-spline 생성 @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle 생성: 원 - + Create a circle in the sketcher 원 생성 - + Center and rim point 중점과 원호의 한 점 - + 3 rim points 세 점(3 points) @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch 타원 생성 - + Ellipse by center, major radius, point 중점, 장축, 단축을 이용하여 타원 생성 - + Ellipse by periapsis, apoapsis, minor radius Ellipse by periapsis, apoapsis, minor radius - + Arc of ellipse by center, major radius, endpoints 중점, 장축, 단축으로 구성된 타원의 호 생성 - + Arc of hyperbola by center, major radius, endpoints 중점, 장축, 단축으로 구성된 쌍곡선의 호 생성 - + Arc of parabola by focus, vertex, endpoints 중점, 장축, 단축으로 구성된 포물선의 호 생성 @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet 수정: 필렛(Fillet) - + Create a fillet between two lines 두 선 사이에 모깎기 생성 - + Sketch fillet 스케치 모깎기 - + Constraint-preserving sketch fillet 구속조건을 유지하는 스케치 모깎기 생성 @@ -299,17 +299,17 @@ 스케치에 사각형을 생성함 - + Rectangle 사각형 - + Centered rectangle 중심이 있는 사각형 - + Rounded rectangle 둥근 사각형 @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon 생성: 다각형 - + Create a regular polygon in the sketcher 스케치에 일반 다각형을 생성 - + Triangle 삼각형 - + Square 사각형 - + Pentagon 오각형 - + Hexagon 육각형 - + Heptagon 칠각형 - + Octagon 팔각형 - + Regular polygon 일반 다각형 @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity 매듭 반복횟수(Knot multiplicity) 수정 - + Modifies the multiplicity of the selected knot of a B-spline B-spline에서 선택된 매듭의 반복횟수 수정 - + Increase knot multiplicity 매듭 반복횟수(Knot multiplicity) 증가 - + Decrease knot multiplicity 매듭 반복횟수(Knot multiplicity) 감소 @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 제약조건: 각도 - + Fix the angle of a line or the angle between two lines 단일 선의 각도(수평축 기준) 또는 두선 사이의 각도 고정 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block 블록 구속조건 - + Block the selected edge from moving 선택 모서리가 움직이지 않도록 차단 @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 제약조건: 점 일치 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses 점들 사이의 일치 구속 또는 원, 호, 타원 사이의 동심 구속을 생성함 @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 직경 구속 - + Fix the diameter of a circle or an arc 원이나 호의 지름을 수정합니다 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 제약조건: 거리 - + Fix a length of a line or the distance between a line and a vertex or between two circles 선의 길이 또는 선과 꼭짓점 사이 또는 두 원 사이의 거리를 고정함 @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 수평 거리를 구속합니다 - + Fix the horizontal distance between two points or line ends 두 점 또는 선의 수평거리 고정 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 수직 거리 구속 - + Fix the vertical distance between two points or line ends 두 점 또는 선의 수직거리 고정 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 제약조건: 동일 - + Create an equality constraint between two lines or between circles and arcs 두 선 또는 원과 원/호와 호/원과 호에 동일한 치수 부가 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 제약조건: 수평 - + Create a horizontal constraint on the selected item 선택한 요소를 수평하게 고정 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock 제약조건: 고정 - + Create both a horizontal and a vertical distance constraint on the selected vertex 선택 꼭짓점에 수평 및 수직 거리 구속을 생성함 @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 제약조건: 평행 - + Create a parallel constraint between two lines 선택한 요소(두 선)를 평행하게 고정 @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 제약조건: 수직 - + Create a perpendicular constraint between two lines 선택한 요소(두 선)를 수직하게 고정 @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object 제약조건: 점을 선에 일치 - + Fix a point onto an object 점을 선에 일치 @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 자동 반지름/직경 구속 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 원을 선택한 경우 지름을, 호/스플라인 폴을 선택한 경우 반지름을 수정합니다. @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight 반지름 또는 중량 구속 - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline 원이나 호의 반지름을 수정하거나 B-스플라인 극의 가중치를 수정합니다. @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. 광선의 두 끝점과 모서리 사이에 굴절 법칙(스넬의 법칙) 구속을 인터페이스interface로 생성합니다. @@ -598,12 +598,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 제약조건: 대칭 - + Create a symmetry constraint between two points with respect to a line or a third point 선 또는 세 번째 점을 기준으로 두 점 사이에 대칭 구속조건을 생성합니다. @@ -612,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 제약조건: 탄젠트 - + Create a tangent constraint between two entities 두 엔티티가 서로 접하도록 고정 @@ -625,12 +625,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 제약조건: 수직 - + Create a vertical constraint on the selected item 선택한 요소를 수직하게 고정 @@ -638,12 +638,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline 도형을 B-스플라인으로 변환 - + Converts the selected geometry to a B-spline 선택한 도형을 B-spline으로 변환하기 @@ -664,12 +664,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points 생성: 3점 호 - + Create an arc by its end points and a point along the arc 양 끝점과 호의 한 점을 이용하여 호를 생성합니다. @@ -677,12 +677,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points 생성: 3점 원 - + Create a circle by 3 perimeter points 세 점을 이용하여 원 생성 @@ -690,12 +690,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center 생성: 중점을 이용한 호 - + Create an arc by its center and by its end points 중점과 양 끝점을 이용하여 호 생성합니다. @@ -703,12 +703,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch 타원의 둘레를 따르는 호 생성 @@ -716,12 +716,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch 쌍공선형태의 호 생성 @@ -729,12 +729,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch 스케치에 포물선형태의 호 생성 @@ -742,12 +742,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline 생성: B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -755,12 +755,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle 생성: 원 - + Create a circle in the sketch 중점과 반지름을 이용하여 원 생성 @@ -768,12 +768,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points 생성: 3점을 이용한 타원 - + Create an ellipse by 3 points in the sketch 3점(장축의 끝점, 단축)을 이용하여 타원 생성 @@ -781,12 +781,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center 생성: 타원 - + Create an ellipse by center in the sketch 중점, 장축, 단축을 이용하여 타원 생성 @@ -794,12 +794,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet 수정: 필렛(Fillet) - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -807,12 +807,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon 생성: 7각형 - + Create a heptagon in the sketch 7각형 생성 @@ -820,12 +820,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon 생성: 6각형 - + Create a hexagon in the sketch 6각형 생성 @@ -859,12 +859,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon 생성: 8각형 - + Create an octagon in the sketch 8각형 생성 @@ -872,12 +872,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon 생성: 5각형 - + Create a pentagon in the sketch 5각형 생성 @@ -885,12 +885,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline 주기적periodic B-스플라인을 생성합니다 - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -898,12 +898,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point 생성: 점 - + Create a point in the sketch 점 생성 @@ -911,12 +911,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet 모서리를 유지하는 모깎기 생성 - + Fillet that preserves intersection point and most constraints 교차점과 대부분의 구속을 유지하는 모깎기 @@ -924,12 +924,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline 생성: 자유곡선(Polyline) - + Create a polyline in the sketch. 'M' Key cycles behaviour 자유곡선(Polyline)을 생성. 'M'키를 눌러 형태 변경 @@ -963,12 +963,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon 생성: 다각형 - + Create a regular polygon in the sketch 스케치에 정다각형을 생성함 @@ -976,12 +976,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot 생성: 직선 홈(Slot) - + Create a slot in the sketch 직선 홈(Slot) 생성 @@ -989,12 +989,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square 생성: 정사각형 - + Create a square in the sketch 중점과 끝점을 이용하여 정사각형 생성 @@ -1002,12 +1002,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle 생성: 정삼각형 - + Create an equilateral triangle in the sketch 중점과 끝점을 이용하여 정삼각형 생성 @@ -1015,12 +1015,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree B-스플라인 각도 감소 - + Decreases the degree of the B-spline B-스플라인의 각도를 감소시킴 @@ -1028,12 +1028,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity 매듭 반복횟수(Knot multiplicity) 감소 - + Decreases the multiplicity of the selected knot of a B-spline B-spline의 선택된 매듭의 반복횟수 감소 @@ -1080,12 +1080,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge 모서리 연장 - + Extend an edge with respect to the picked position 선택된 위치를 기준으로 모서리 연장하기 @@ -1093,12 +1093,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry 외부 형상에서 geometry를 선택하여 현재 스케치에 생성 @@ -1106,12 +1106,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree B-스플라인 각도 증가 - + Increases the degree of the B-spline B-스플라인의 각도를 증가시킴 @@ -1119,12 +1119,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity 매듭 반복횟수(Knot multiplicity) 증가 - + Increases the multiplicity of the selected knot of a B-spline B-스플라인의 선택된 매듭의 다중도를 증가시킴 @@ -1132,12 +1132,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot 매듭 삽입 - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. 주어진 매개변수에 매듭을 삽입합니다. 해당 매개변수에 매듭이 이미 있는 경우, 매듭의 다중도가 1씩 증가됩니다. @@ -1145,12 +1145,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves 곡선을 결합합니다 - + Join two curves at selected end points 선택된 끝점에 두 곡선을 결합합니다 @@ -1435,12 +1435,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge 모서리를 분할합니다. - + Splits an edge into two while preserving constraints 구속을 유지한 채 모서리를 둘로 분할합니다. @@ -1461,12 +1461,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space 가상 공간을 전환합니다. - + Switches the selected constraints or the view to the other virtual space 선택한 구속 또는 뷰를 다른 가상 공간으로 전환합니다. @@ -1487,12 +1487,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 구속을 활성화/비활성화합니다. - + Activates or deactivates the selected constraints 선택한 구속을 활성화하거나 비활성화합니다. @@ -1513,12 +1513,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 구동driving/참조reference 구속을 전환합니다. - + Set the toolbar, or the selected constraints, into driving or reference mode 도구 모음 또는 선택한 제약 조건을 주행 또는 참조 모드로 설정합니다 @@ -1527,12 +1527,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge 잘라내기(Trim) - + Trim an edge with respect to the picked position 선택한 위치의 선을 자릅니다. @@ -1590,369 +1590,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 수평 구속을 추가합니다 - - - + + + Add horizontal alignment 수평 정렬을 추가합니다 - - + + Add vertical constraint 수직 구속을 추가합니다 - + Add vertical alignment 수직 정렬을 추가합니다 - + Add 'Lock' constraint '잠금' 구속을 추가합니다 - + Add relative 'Lock' constraint 상대적 '잠금' 구속을 추가합니다 - + Add fixed constraint 고정fixed 구속을 추가합니다 - + Add 'Block' constraint 'Block' 구속을 추가합니다 - + Add block constraint Block 구속을 추가합니다 - - - + + + Add coincident constraint 일치 구속을 추가합니다 - - + + Add distance from horizontal axis constraint 수평축 구속에서 거리 추가하기 - - + + Add distance from vertical axis constraint 수직축 구속에서 거리 추가하기 - - + + Add point to point distance constraint 점에서 점까지 거리 구속 추가하기 - - - + + + Add point to line Distance constraint 점에서 선까지 거리 구속 추가하기 - - + + Add circle to circle distance constraint 원에서 원까지 거리 구속 추가하기 - + Add circle to line distance constraint 원에서 선까지 거리 구속 추가하기 - - - - - + + + + + + Add length constraint 길이 구속 추가하기 - - + + Dimension 치수 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 점에서 개체까지 구속 추가하기 - - + + Add point to point horizontal distance constraint 점에서 점까지 수평 거리 구속 추가하기 - + Add fixed x-coordinate constraint 고정 x-좌표 구속 추가하기 - - + + Add point to point vertical distance constraint 점에서 점까지 수직 거리 구속 추가하기 - + Add fixed y-coordinate constraint 고정 y-좌표 구속 추가하기 - - + + Add parallel constraint 평행 구속 추가하기 - - - - - - - + + + + + + + Add perpendicular constraint 수직 구속 추가하기 - + Add perpendicularity constraint 수직도 구속 추가하기 - + Swap coincident+tangency with ptp tangency 일치+접선을 ptp 접선으로 바꾸기 - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint 접선 구속 추가하기 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 접선구속 점 추가하기 - - - - + + + + Add radius constraint 반경 구속 추가하기 - - - - + + + + Add diameter constraint 직경 구속 추가하기 - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint 각도 구속 추가하기 - - + + Add equality constraint 동일 구속 추가하기 - - - - - + + + + + Add symmetric constraint 대칭 구속 추가하기 - + Add Snell's law constraint 스넬의 법칙 구속 추가하기 - + Toggle constraint to driving/reference 구동/참조 구속을 전환하기 - + Activate/Deactivate constraint 구속을 활성화/비활성화하기 @@ -2012,44 +2013,44 @@ invalid constraints, degenerated geometry, etc. 중심점이 있는 스케치 상자 추가하기 - + Add rounded rectangle 둥근 사각형 추가하기 - + Add line to sketch wire 스케치 와이어에 선 추가하기 - + Add arc to sketch wire 스케치 와이어에 호 추가하기 - - + + Add sketch arc 스케치 호 추가하기 - - + + Add sketch circle 스케치 원 추가하기 - + Add sketch ellipse 스케치 타원 추가하기 - + Add sketch arc of ellipse 타원의 스케치 호 추가하기 - + Add sketch arc of hyperbola 쌍곡선 스케치 호 추가하기 @@ -2069,33 +2070,33 @@ invalid constraints, degenerated geometry, etc. 스케치 점 추가하기 - - + + Create fillet 수정: 필렛(Fillet) - + Trim edge 잘라내기(Trim) - + Extend edge 모서리 연장 - + Split edge 모서리를 분할합니다. - + Add external geometry 외부 도형 추가하기 - + Add slot 슬롯 추가하기 @@ -2105,37 +2106,37 @@ invalid constraints, degenerated geometry, etc. 육각형 추가하기 - + Convert to NURBS NURBS로 변환하기 - + Increase spline degree 스플라인 각도 증가하기 - + Decrease spline degree 스플라인 각도 감소하기 - + Increase knot multiplicity 매듭 반복횟수(Knot multiplicity) 증가 - + Decrease knot multiplicity 매듭 반복횟수(Knot multiplicity) 감소 - + Insert knot 매듭 삽입 - + Join Curves 곡선 결합하기 @@ -2175,12 +2176,12 @@ invalid constraints, degenerated geometry, etc. 축 정렬 제거하기 - + Toggle constraints to the other virtual space 다른 가상 공간으로 구속 전환하기 - + @@ -2188,7 +2189,7 @@ invalid constraints, degenerated geometry, etc. 구속의 가상 공간을 업데이트하기 - + Add auto constraints 자동 구속 추가하기 @@ -2228,7 +2229,7 @@ invalid constraints, degenerated geometry, etc. 마디점 추가하기 - + Create a carbon copy 복사본carbon copy을 만듭니다 @@ -2244,37 +2245,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. 자동구속 오류: 일치 구속을 적용하면서 해결할 수 없는 스케치 - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. 자동구속 오류: 수직/수평 구속 적용시 해결할 수 없는 스케치 - + Autoconstrain error: Unsolvable sketch while applying equality constraints. 자동구속 오류: 동일 구속을 적용하면서 해결할 수 없는 스케치 - + Autoconstrain error: Unsolvable sketch without constraints. 자동구속 오류: 구속이 없는 해결할 수 없는 스케치 - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. 자동구속 오류: 수평 및 수직 구속 적용 후에 해결할 수 없는 스케치 - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. 자동구속 오류: 동일점 구속 적용 후 해결할 수 없는 스케치 - + Autoconstrain error: Unsolvable sketch after applying equality constraints. 자동구속 오류: 동일 구속 적용 후 해결할 수 없는 스케치 @@ -2399,143 +2400,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2551,9 +2552,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection 잘못 된 선택 @@ -2574,329 +2575,329 @@ invalid constraints, degenerated geometry, etc. 치수 제약조건 - + Cannot add a constraint between two external geometries. 두 외부 형상 사이에 구속을 추가할 수 없습니다. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. 두 고정 형상 사이의 구속을 추가할 수 없습니다. 고정 형상에는 외부 형상, 블럭화된 형상 및 B-스플라인 매듭점과 같은 특별한 점이 포함됩니다. - + Sketcher Constraint Substitution 스케쳐 구속 대체 - + Keep notifying me of constraint substitutions 구속 대체를 계속 알림 - - - + + + Only sketch and its support are allowed to be selected. 스케치와 그 지원만 선택할 수 있습니다. - + One of the selected has to be on the sketch. 선택한 항목 중 하나가 스케치에 있어야 합니다. - - + + Select an edge from the sketch. 스케치에서 하나의 모서리를 선택하세요. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 불가능한 제약조건입니다. - - - - + + + + The selected edge is not a line segment. 선택한 모서리가 선분이 아닙니다. - - - - - - + + + + + + Double constraint 이중 제약조건 - - - - - + + + + + The selected edge already has a horizontal constraint! 선택한 모서리에 이미 수평 구속이 있습니다! - - - + + + The selected edge already has a vertical constraint! The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! The selected edge already has a Block constraint! - + The selected item(s) can't accept a horizontal constraint! 선택된 요소(들)은 수평 제약조건을 적용할 수 없습니다. - - + + There are more than one fixed points selected. Select a maximum of one fixed point! There are more than one fixed points selected. Select a maximum of one fixed point! - + The selected item(s) can't accept a vertical constraint! 선택된 요소(들)은 수직 제약조건을 적용할 수 없습니다. - - - + + + Select vertices from the sketch. 두개 이상의 점을 선택하세요. - + Select one vertex from the sketch other than the origin. 스케치에서 원점이 아닌 다른 점을 선택하세요. - + Select only vertices from the sketch. The last selected vertex may be the origin. 오직 점만 선택이 가능합니다. 마지막에 선택은 원점이어야 합니다. - + Wrong solver status Wrong solver status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Select one edge from the sketch. - + Select only edges from the sketch. Select only edges from the sketch. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error 에러 - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Endpoint to endpoint tangency was applied instead. - + Select two or more points from the sketch. 두개 이상의 점을 선택하세요. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. 한 직선 또는 한 점, 한 직선 또는 두 점을 선택하세요. - + Cannot add a length constraint on an axis! 축에는 길이 제약조건을 적용할 수 없습니다! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. 적절한 것을 선택하세요. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 선택된 점들은 동일한 element에 속해 있거나 외부 geometry이므로 해당 곡선에 제약조건이 적용되지 않았습니다. - - - - + + + + Select exactly one line or up to two points from the sketch. 한 직선 또는 최대 2개의 점을 선택하세요. - + Cannot add a horizontal length constraint on an axis! 축에는 수평 길이 제약조건을 적용할 수 없습니다! - + Cannot add a fixed x-coordinate constraint on the origin point! Cannot add a fixed x-coordinate constraint on the origin point! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! 축에는 수직 길이 제약조건을 적용할 수 없습니다! - + Cannot add a fixed y-coordinate constraint on the origin point! Cannot add a fixed y-coordinate constraint on the origin point! - + Select two or more lines from the sketch. 두개 이상의 직선을 선택하세요. - - + + Select at least two lines from the sketch. 최소한 두개 이상의 직선을 선택하세요. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2906,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 사용가능한 조합: 두개의 곡선, 끝점과 곡선, 두개의 끝점, 두개의 곡선과 한 점. - + Select some geometry from the sketch. perpendicular constraint 스케치에서 geometry를 선택하세요. - - + + Cannot add a perpendicularity constraint at an unconnected point! 연결되지 않은 점에 대하여 수직 제약조건을 적용할 수 없습니다! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular to B-spline edge currently unsupported. - - + + One of the selected edges should be a line. 선택된 선중 하나는 직선이어야 합니다. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Endpoint to endpoint tangency was applied. The coincident constraint was deleted. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2951,277 +2952,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 사용가능한 조합: 두개의 곡선, 끝점과 곡선, 두개의 끝점, 두개의 곡선과 한 점. - + Select some geometry from the sketch. tangent constraint 스케치에서 geometry를 선택하세요. - - - + + + Cannot add a tangency constraint at an unconnected point! 연결되지 않은 점에 대하여 탄젠트 제약조건을 적용할 수 없습니다! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! 선택한 객체의 갯수가 잘못되었습니다! - - + + With 3 objects, there must be 2 curves and 1 point. 3개의 객체(2개의 곡선과 1개의 점)가 있어야합니다. - - - + + + Tangency to B-spline edge currently unsupported. Tangency to B-spline edge currently unsupported. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. 하나 이상의 호나 원을 선택하세요. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. 호 또는 원에만 적용 가능한 제약조건입니다. - - + + Select one or two lines from the sketch. Or select two edges and a point. 하나 이상의 직선을 선택하세요. 또는, 두개의 선과 하나의 점을 선택하세요. - - + + Parallel lines 평행 직선 - - + + An angle constraint cannot be set for two parallel lines. 각도 제약조건은 평행한 두 직선에는 적용할 수 없습니다. - + Cannot add an angle constraint on an axis! 축에는 각도 제약조건을 적용할 수 없습니다! - + Select two edges from the sketch. 두개의 선을 선택하세요. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Equality for B-spline edge currently unsupported. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 1)두 점과 대칭선 2)두 점과 대칭 점 또는 3)하나의 선과 대칭 점을 선택하세요. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 선과 선에 포함된 점에는 대칭 제약조건을 적용할 수 없습니다! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. 선택된 객체는 스케치의 geometry가 아닙니다. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. 구속조건(들)을 선택하세요. - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error CAD 커널 에러 - + None of the selected elements is an edge. 선택된 요소에서 선이 없습니다. - - + + At least one of the selected objects was not a B-Spline and was ignored. At least one of the selected objects was not a B-Spline and was ignored. - - + + The selection comprises more than one item. Please select just one knot. The selection comprises more than one item. Please select just one knot. - - + + Input Error 입력 에러 - - + + None of the selected elements is a knot of a B-spline None of the selected elements is a knot of a B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3301,17 +3302,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3625,12 +3626,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 길이: - + Refractive index ratio Refractive index ratio - + Ratio n2/n1: Ratio n2/n1: @@ -3910,8 +3911,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed 이름없음 @@ -4145,13 +4146,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4172,32 +4173,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both 둘다 - + Auto 자동 - + Diameter 직경 - + Radius Radius @@ -4646,12 +4647,12 @@ Then objects are only visible behind the sketch plane. 기존 스케치에 적용 - + Unexpected C++ exception 예기치 않은 C++ 예외 - + Sketcher 스케쳐 @@ -4659,55 +4660,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences No missing coincidences - + No missing coincidences found No missing coincidences found - + Missing coincidences Missing coincidences - + %1 missing coincidences found %1 missing coincidences found - + No invalid constraints No invalid constraints - + No invalid constraints found No invalid constraints found - + Invalid constraints Invalid constraints - + Invalid constraints found Invalid constraints found - - - + + + Reversed external geometry Reversed external geometry - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4720,7 +4721,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Click "Swap endpoints in constraints" button to reassign endpoints. Do this only once to sketches created in FreeCAD older than v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4729,75 +4730,70 @@ However, no constraints linking to the endpoints were found. However, no constraints linking to the endpoints were found. - + No reversed external-geometry arcs were found. No reversed external-geometry arcs were found. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 changes were made to constraints linking to endpoints of reversed arcs. - - + + Constraint orientation locking Constraint orientation locking - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. - - + + Delete constraints to external geom. 외부 geometry에 적용되어 있는 제약조건을 제거하세요. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? - + All constraints that deal with external geometry were deleted. All constraints that deal with external geometry were deleted. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - 양식 - Check to toggle filters @@ -4872,11 +4868,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - 양식 - Check to toggle filters @@ -5062,7 +5053,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control 고급 솔버 컨트롤 @@ -5352,8 +5343,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines 모든 B-스플라인에 대한 곡률 빗 표시 및 숨기기 전환 @@ -5361,8 +5352,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline B-spline의 선택된 매듭의 반복횟수 감소 @@ -5370,8 +5361,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines 모든 B-스플라인에 대한 각도 표시 및 숨기기를 전환합니다. @@ -5379,8 +5370,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline B-스플라인의 선택된 매듭의 다중도를 증가시킴 @@ -5388,8 +5379,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines 모든 B-스플라인에 대한 매듭점 다중성 표시와 숨김을 전환합니다. @@ -5397,8 +5388,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines 모든 B-스플라인에 대한 제어점 가중치 표시와 숨김을 전환합니다. @@ -5406,8 +5397,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines 모든 B-스플라인에 대한 제어 다각형 표시와 숨김을 전환합니다. @@ -5442,8 +5433,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 원이나 호의 지름을 수정합니다 @@ -5451,7 +5442,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5459,8 +5450,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 원 또는 호의 반지름을 고정 @@ -5468,7 +5459,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5485,8 +5476,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc 양 끝점과 호의 한 점을 이용하여 호를 생성합니다. @@ -5494,8 +5485,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points 3 점을 이용하여 원을 생성합니다. @@ -5503,8 +5494,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points 중점과 양 끝점을 이용하여 호 생성합니다. @@ -5512,8 +5503,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Create an arc of ellipse by its center, major radius, and endpoints @@ -5521,8 +5512,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Create an arc of hyperbola by its center, major radius, and endpoints @@ -5530,8 +5521,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Create an arc of parabola by its focus, vertex, and endpoints @@ -5539,13 +5530,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline by control points - - + + Create a B-spline by control points Create a B-spline by control points @@ -5553,8 +5544,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point 중점과 원의 한 점을 이용하여 원을 생성합니다. @@ -5562,8 +5553,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius 장축(major)의 양 끝점과 단축을 이용하여 타원을 생성합니다. @@ -5571,8 +5562,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point 중점, 장축(major), 단축을 이용하여 타원을 생성합니다. @@ -5580,8 +5571,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Creates a radius between two lines @@ -5589,8 +5580,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner 중점과 모서리 한 점을 이용하여 7각형을 생성합니다. @@ -5598,8 +5589,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner 중점과 모서리 한 점을 이용하여 6각형을 생성합니다. @@ -5607,7 +5598,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Create a rounded rectangle @@ -5615,14 +5606,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner 중점과 모서리 한 점을 이용하여 8각형을 생성합니다. - - + + Create a regular polygon by its center and by one corner Create a regular polygon by its center and by one corner @@ -5630,8 +5621,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner 중점과 모서리 한 점을 이용하여 5각형을 생성합니다. @@ -5639,8 +5630,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Fillet that preserves constraints and intersection point @@ -5648,7 +5639,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Create a rectangle @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Create a centered rectangle @@ -5664,8 +5655,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner 중점과 모서리 한 점을 이용하여 정사각형을 생성합니다. @@ -5673,8 +5664,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner 중점과 모서리 한 점을 이용하여 정삼각형을 생성합니다. @@ -5682,13 +5673,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Periodic B-spline by control points - - + + Create a periodic B-spline by control points Create a periodic B-spline by control points @@ -6322,36 +6313,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error 에러 @@ -6371,45 +6362,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6419,18 +6410,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6440,49 +6431,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6492,7 +6483,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6502,27 +6493,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6532,13 +6523,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6546,13 +6537,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6658,12 +6649,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6671,12 +6662,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6684,12 +6675,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 치수 - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6701,14 +6692,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + 치수 + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_lt.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_lt.ts index fbed51202a..ec31fd1b33 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_lt.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_lt.ts @@ -3094,7 +3094,7 @@ Priimtini deriniai: dvi kreivės; galinis taškas ir kreivė; du galiniai taška Currently internal geometry is only supported for ellipse or arc of ellipse. The last selected element must be an ellipse or an arc of ellipse. - Vidinė geometrija yra naudojama tik elipsėms ir elipsių lankams. Elipsė ar elipsės lankas turi būti pasirinkti + Vidinė geometrija yra naudojama tik elipsėms ir elipsių lankams. Elipsė ar elipsės lankas turi būti pasirinkti žymėjimo pabaigoje. diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts index 9ac9573138..eb6b17a55b 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Kopie maken - + Copy the geometry of another sketch Kopieer de geometrie van een andere schets @@ -100,27 +100,27 @@ Toon/Verberg B-spline informatielaag - + Show/hide B-spline degree Toon/Verberg B-spline graad - + Show/hide B-spline control polygon Toon/Verberg B-spline controle veelhoek - + Show/hide B-spline curvature comb Toon/Verberg B-spline kromming comb - + Show/hide B-spline knot multiplicity Toon/Verberg B-spline knoop multipliciteit - + Show/hide B-spline control point weight Toon/Verberg B-spline controle punt gewicht @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Beperk de boog of de cirkel - + Constrain an arc or a circle Beperk een boog of een cirkel - + Constrain radius Straal bematen - + Constrain diameter Bemaat de diameter - + Constrain auto radius/diameter Bemaat straal/diameter automatisch @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Boog maken - + Create an arc in the sketcher Creëer een boog in de schets - + Center and end points Middelpunt en eindpunten - + End points and rim point Eindpunten en randpunt @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Maak B-spline aan - + Create a B-spline in the sketch Maak een B-spline in de schets @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Cirkel maken - + Create a circle in the sketcher Maak een cirkel in de schetser - + Center and rim point Middelpunt en randpunt - + 3 rim points 3 randpunten @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Maak kegel - + Create a conic in the sketch Creëer een kegel in de schets - + Ellipse by center, major radius, point Ellips bij het midden, hoofdstraal, punt - + Ellipse by periapsis, apoapsis, minor radius Ellips door periapsis, apoapsis, kleine radius - + Arc of ellipse by center, major radius, endpoints Elliptische boog door het midden, hoofdstraal, eindpunten - + Arc of hyperbola by center, major radius, endpoints Hyperbolische boog via het midden, hoofdstraal en eindpunten - + Arc of parabola by focus, vertex, endpoints Paraboolboog door zijn focus, vertex, eindpunten @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Maak afronding - + Create a fillet between two lines Maakt een afronding tussen twee lijnen - + Sketch fillet Schets afronding - + Constraint-preserving sketch fillet Constraint-behoudende schets afronding @@ -299,17 +299,17 @@ Maakt een rechthoek in de schets - + Rectangle Rechthoek - + Centered rectangle Gecentreerde rechthoek - + Rounded rectangle Afgeronde rechthoek @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Regelmatige veelhoek maken - + Create a regular polygon in the sketcher Maak een regelmatige veelhoek in de schetser - + Triangle Driehoek - + Square Vierkant - + Pentagon Vijfhoek - + Hexagon Zeshoek - + Heptagon Zevenkant - + Octagon Achthoek - + Regular polygon Regelmatige veelhoek @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Knoop multipliciteit wijzigen - + Modifies the multiplicity of the selected knot of a B-spline Hiermee wijzigt u de multipliciteit van het geselecteerde knooppunt in een B-spline - + Increase knot multiplicity Verhogen van de multipliciteit van de knoop - + Decrease knot multiplicity Verlagen van de multipliciteit van de knoop @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Beperk hoek - + Fix the angle of a line or the angle between two lines Bemaat de hoek van een lijn of de hoek tussen twee lijnen @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Blok beperkingen - + Block the selected edge from moving Weerhoud de geselecteerde rand van verplaatsen @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Samenvallende beperking - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Maak een samenvallende beperking tussen punten, of een concentrische beperking tussen cirkels, bogen en ellipsen @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Bemaat de diameter - + Fix the diameter of a circle or an arc Bemaat de diameter van een cirkel of een boog @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Afstand beperking - + Fix a length of a line or the distance between a line and a vertex or between two circles Zet de lengte van een lijn vast of de afstand tussen een lijn en een hoekpunt of tussen twee cirkels @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Beperk horizontale afstand - + Fix the horizontal distance between two points or line ends De horizontale afstand tussen twee punten of lijneinden bematen @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Beperk verticale afstand - + Fix the vertical distance between two points or line ends De verticale afstand tussen twee punten of lijneinden bematen @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Gelijke beperken - + Create an equality constraint between two lines or between circles and arcs Maak een Gelijkheidsbeperking tussen twee lijnen of tussen cirkels en bogen @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Horizontale beperking - + Create a horizontal constraint on the selected item Maak een horizontale beperking op het geselecteerde item @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Vastzet beperking - + Create both a horizontal and a vertical distance constraint on the selected vertex Maak zowel een horizontale als een verticale afstandsbeperking op het geselecteerde hoekpunt @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Parallelle-beperking - + Create a parallel constraint between two lines Maak een parallelle beperking tussen twee lijnen @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Beperk loodrecht - + Create a perpendicular constraint between two lines Maak een loodrechte beperking tussen twee lijnen @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Zet punt vast op object - + Fix a point onto an object Een punt op een object vastleggen @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Bemaat straal/diameter automatisch - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Zet de diameter vast als en cirkel is geselecteerd, of de straal als een boog/spline pool is geselecteerd @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Beperking straal of gewicht - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Repareer de straal van een cirkel of een boog of repareer het gewicht van een B-Spline @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Bepaal de refractie (Wet van Snellius) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Maak een beperking volgens de brekingswet (wet van Snellius) tussen twee eindpunten van lichtstralen en een rand als interface. @@ -598,12 +598,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Symmetrische-beperken - + Create a symmetry constraint between two points with respect to a line or a third point Maak een symmetrie beperking tussen twee punten @@ -613,12 +613,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherConstrainTangent - + Constrain tangent Tangent beperken - + Create a tangent constraint between two entities Tangentiële beperkingen tussen twee entiteiten maken @@ -626,12 +626,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherConstrainVertical - + Constrain vertically Verticale beperking - + Create a vertical constraint on the selected item Maak een verticale beperking op het geselecteerde item @@ -639,12 +639,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherConvertToNURBS - + Convert geometry to B-spline Converteer geometrie naar B-spline - + Converts the selected geometry to a B-spline Zet de geselecteerde geometrie om naar een B-spline @@ -665,12 +665,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreate3PointArc - + Create arc by three points Een boog van 3 punten maken - + Create an arc by its end points and a point along the arc Maak een boog door zijn eindpunten en een punt langs de boog @@ -678,12 +678,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreate3PointCircle - + Create circle by three points Een cirkel van 3 punten maken - + Create a circle by 3 perimeter points Een cirkel aanmaken op basis van 3 omtrekpunten @@ -691,12 +691,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateArc - + Create arc by center Creëer boog vanaf center - + Create an arc by its center and by its end points Maak een boog door zijn eindpunten en een punt langs de boog @@ -704,12 +704,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Maak een ellips boog - + Create an arc of ellipse in the sketch Maak Boog of ovaal in de schets @@ -717,12 +717,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Maak een hyperbool - + Create an arc of hyperbola in the sketch Maak een hyperbolische boog aan in de schets @@ -730,12 +730,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateArcOfParabola - + Create arc of parabola Maak een parabool - + Create an arc of parabola in the sketch Maak een parabolische boog aan in de schets @@ -743,12 +743,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateBSpline - + Create B-spline Maak B-spline aan - + Create a B-spline by control points in the sketch. Maak een B-spline door middel van controlepunten in de schets. @@ -756,12 +756,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateCircle - + Create circle Cirkel maken - + Create a circle in the sketch Maak een cirkel in de schets @@ -769,12 +769,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Ovaal van 3 punten maken - + Create an ellipse by 3 points in the sketch Maak een ovaal van 3 punten in de schets @@ -782,12 +782,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateEllipseByCenter - + Create ellipse by center Maak ellips aan via het midden - + Create an ellipse by center in the sketch Maak een ellips aan via het midden in de schets @@ -795,12 +795,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateFillet - + Create fillet Maak afronding - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -808,12 +808,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateHeptagon - + Create heptagon Zevenkant maken - + Create a heptagon in the sketch Maak een zevenkant in de schets @@ -821,12 +821,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateHexagon - + Create hexagon Zeskant maken - + Create a hexagon in the sketch Maak een zeskant in de schets @@ -860,12 +860,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateOctagon - + Create octagon Achtkant maken - + Create an octagon in the sketch Maak een achtkant in de schets @@ -873,12 +873,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreatePentagon - + Create pentagon Vijfkant maken - + Create a pentagon in the sketch Maak vijfkant in de schets @@ -886,12 +886,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Maken van periodieke B-spline - + Create a periodic B-spline by control points in the sketch. Maak een periodieke B-spline door middel van controlepunten in de schets. @@ -899,12 +899,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreatePoint - + Create point Punt maken - + Create a point in the sketch Maak een punt in de schets @@ -912,12 +912,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreatePointFillet - + Create corner-preserving fillet Maak hoek-behoudende afronding - + Fillet that preserves intersection point and most constraints Afronding dat snijpunt behoudt en meeste constraints @@ -925,12 +925,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreatePolyline - + Create polyline Polylijn aanmaken - + Create a polyline in the sketch. 'M' Key cycles behaviour Maak een polylijn aan in de schets. De 'M-toets' wisselt tussen de verschillende gedragen @@ -964,12 +964,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateRegularPolygon - + Create regular polygon Regelmatige veelhoek maken - + Create a regular polygon in the sketch Maak een regelmatige veelhoek aan in de schets @@ -977,12 +977,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateSlot - + Create slot Sleuf maken - + Create a slot in the sketch Maak sleuf in de schets @@ -990,12 +990,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateSquare - + Create square Vierkant maken - + Create a square in the sketch Maak een vierkant aan in de schets @@ -1003,12 +1003,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherCreateTriangle - + Create equilateral triangle Maak gelijkzijdige driehoek aan - + Create an equilateral triangle in the sketch Maak een gelijkzijdige driehoek aan in de schets @@ -1016,12 +1016,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherDecreaseDegree - + Decrease B-spline degree Verlaag graad van B-spline - + Decreases the degree of the B-spline Vermindert de graad van de B-spline @@ -1029,12 +1029,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Verlagen van de multipliciteit van de knoop - + Decreases the multiplicity of the selected knot of a B-spline Vermindert de multipliciteit van het geselecteerde knooppunt van een B-spline @@ -1081,12 +1081,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherExtend - + Extend edge Breid de rand uit - + Extend an edge with respect to the picked position Breid een rand uit ten opzichte van de geselecteerde positie @@ -1094,12 +1094,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherExternal - + Create external geometry Maak externe geometrie - + Create an edge linked to an external geometry Maak een rand gekoppeld aan een externe geometrie @@ -1107,12 +1107,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherIncreaseDegree - + Increase B-spline degree Verhoog B-spline graad - + Increases the degree of the B-spline Vergroot de hoek van de B-spline @@ -1120,12 +1120,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Verhogen van de multipliciteit van de knoop - + Increases the multiplicity of the selected knot of a B-spline Verhoogt de multipliciteit van de geselecteerde knoop van een B-spline @@ -1133,12 +1133,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherInsertKnot - + Insert knot Knoop invoegen - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Voegt een knooppunt in bij de gegeven parameter. Als het knooppunt reeds bestaat bij die parameter, wordt de multipliciteit verhoogd met 1. @@ -1146,12 +1146,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherJoinCurves - + Join curves Krommen samenvoegen - + Join two curves at selected end points Verbind twee krommen met elkaar bij de geselecteerde eindpunten @@ -1438,12 +1438,12 @@ Dit zal de 'Support' eigenschap verwijderen, indien van toepassing. CmdSketcherSplit - + Split edge Splits rand - + Splits an edge into two while preserving constraints Splitst een rand in twee terwijl je de kaders behoudt @@ -1464,12 +1464,12 @@ Dit zal de 'Support' eigenschap verwijderen, indien van toepassing. CmdSketcherSwitchVirtualSpace - + Switch virtual space Schakel virtuele ruimte om - + Switches the selected constraints or the view to the other virtual space Schakelt de geselecteerde beperkingen of de weergave op de andere virtuele ruimte om @@ -1490,12 +1490,12 @@ Dit zal de 'Support' eigenschap verwijderen, indien van toepassing. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Beperking activeren/deactiveren - + Activates or deactivates the selected constraints Activeert of deactiveert de geselecteerde beperkingen @@ -1516,12 +1516,12 @@ Dit zal de 'Support' eigenschap verwijderen, indien van toepassing. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Schakelt sturende/referentie beperking aan of uit - + Set the toolbar, or the selected constraints, into driving or reference mode Stel de werkbalk of de geselecteerde beperkingen in @@ -1531,12 +1531,12 @@ op sturende of referentie modus CmdSketcherTrimming - + Trim edge Inkorten van rand - + Trim an edge with respect to the picked position Trim een rand ten opzichte van de gekozen positie @@ -1595,369 +1595,370 @@ ongeldige constraints, gedegenereerde geometrie, etc. Command - - + + Add horizontal constraint Voeg horizontale beperking toe - - - + + + Add horizontal alignment Horizontale uitleining toevoegen - - + + Add vertical constraint Voeg verticale beperking toe - + Add vertical alignment Verticale uitlijning toevoegen - + Add 'Lock' constraint Voeg 'vergrendeling' beperking toe - + Add relative 'Lock' constraint Voeg relatieve 'Vergrendeling' beperking toe - + Add fixed constraint Gefixeerde beperking toevoegen - + Add 'Block' constraint Voeg 'Block' beperking toe - + Add block constraint Blok beperking toevoegen - - - + + + Add coincident constraint Voeg samenvallende beperking toe - - + + Add distance from horizontal axis constraint Voeg afstand toe van horizontale as beperking - - + + Add distance from vertical axis constraint Voeg afstand toe van verticale as beperking - - + + Add point to point distance constraint Voeg punt toe aan punt afstand beperking - - - + + + Add point to line Distance constraint Voeg punt toe aan lijnafstand beperking - - + + Add circle to circle distance constraint Voeg cirkel toe aan cirkel afstand beperking - + Add circle to line distance constraint Voeg cirkel toe aan lijnafstand beperking - - - - - + + + + + + Add length constraint Beperking lengte toevoegen - - + + Dimension Afmeting - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Voeg punt toe aan object beperking - - + + Add point to point horizontal distance constraint Voeg punt toe aan punt horizontale afstand beperking - + Add fixed x-coordinate constraint Gefixeerde x-coördinaat beperking toevoegen - - + + Add point to point vertical distance constraint Voeg punt toe aan punt verticale afstand beperking - + Add fixed y-coordinate constraint Gefixeerde y-coördinaat beperking toevoegen - - + + Add parallel constraint Parallelle beperking toevoegen - - - - - - - + + + + + + + Add perpendicular constraint Haakse beperking toevoegen - + Add perpendicularity constraint Voeg haakse beperking toe - + Swap coincident+tangency with ptp tangency Wissel samenvallende+tangent met ptp tangens - + Swap PointOnObject+tangency with point to curve tangency Wissel PointOnObject+raaklijn om met punt op raaklijn van kromme - - - - - - - + + + + + + + Add tangent constraint Voeg tangens beperkgin toe - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Voeg tangens beperking toe - - - - + + + + Add radius constraint Voeg straal beperking toe - - - - + + + + Add diameter constraint Voeg diameter beperking - - - - + + + + Add radiam constraint Voeg straal/diameter beperking toe - - - - - - + + + + + + Add angle constraint Hoek beperking toe - - + + Add equality constraint Voeg gelijkheidsbeperking toe - - - - - + + + + + Add symmetric constraint Symmetrische beperking toevoegen - + Add Snell's law constraint Snell's wet beperking toevoegen - + Toggle constraint to driving/reference Schakel Beperking als sturend of als referentie in-/uit - + Activate/Deactivate constraint Beperking activeren/deactiveren @@ -2017,44 +2018,44 @@ ongeldige constraints, gedegenereerde geometrie, etc. Voeg gecentreerd schetsvak toe - + Add rounded rectangle Afgeronde rechthoek toevoegen - + Add line to sketch wire Lijn toevoegen aan schets draad - + Add arc to sketch wire Boog toevoegen aan schets draad - - + + Add sketch arc Schets boog toevoegen - - + + Add sketch circle Voeg schets cirkel toe - + Add sketch ellipse Voeg schets ellip toe - + Add sketch arc of ellipse Voeg schets boog van ellips toe - + Add sketch arc of hyperbola Voeg schets boog van hyperbola toe @@ -2074,33 +2075,33 @@ ongeldige constraints, gedegenereerde geometrie, etc. Schetspunt toevoegen - - + + Create fillet Maak afronding - + Trim edge Inkorten van rand - + Extend edge Breid de rand uit - + Split edge Splits rand - + Add external geometry Externe geometrie toevoegen - + Add slot Voeg slot toe @@ -2110,37 +2111,37 @@ ongeldige constraints, gedegenereerde geometrie, etc. Zeshoek toevoegen - + Convert to NURBS Converteren naar NURBS - + Increase spline degree Spline-graad verhogen - + Decrease spline degree Verlaag spline-graden - + Increase knot multiplicity Verhogen van de multipliciteit van de knoop - + Decrease knot multiplicity Verlagen van de multipliciteit van de knoop - + Insert knot Knoop invoegen - + Join Curves Krommen verbinden @@ -2180,12 +2181,12 @@ ongeldige constraints, gedegenereerde geometrie, etc. Verwijder assen uitlijning - + Toggle constraints to the other virtual space Beperkingen naar de andere virtuele ruimte in-/uitschakelen - + @@ -2193,7 +2194,7 @@ ongeldige constraints, gedegenereerde geometrie, etc. Update beperking's virtuele ruimte - + Add auto constraints Voeg automatische beperkingen toe @@ -2233,7 +2234,7 @@ ongeldige constraints, gedegenereerde geometrie, etc. Knooppunt toevoegen - + Create a carbon copy Maak een kopie @@ -2249,37 +2250,37 @@ ongeldige constraints, gedegenereerde geometrie, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Autoconstrain error: Defecte schets tijdens aanleggen van coincident constraint. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Autoconstrain error: Defecte schets tijdens aanleggen van vertikaal/horizontaal constraint. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Autoconstrain error: Defecte schets tijdens aanleggen van gelijkheids-constraint. - + Autoconstrain error: Unsolvable sketch without constraints. Autoconstrain error: Defecte schets zonder constraints. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Autoconstrain error: Defecte schets tijdens aanleggen van vertikaal/horizontaal constraints. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Autoconstrain error: Defecte schets tijdens aanleggen van punt-op-punt constraints. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Autoconstrain error: Defecte schets tijdens aanleggen van gelijkheids-constraint. @@ -2404,143 +2405,143 @@ ongeldige constraints, gedegenereerde geometrie, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2556,9 +2557,9 @@ ongeldige constraints, gedegenereerde geometrie, etc. - - - + + + Wrong selection Verkeerde selectie @@ -2579,329 +2580,329 @@ ongeldige constraints, gedegenereerde geometrie, etc. Dimensionale beperking - + Cannot add a constraint between two external geometries. Kan geen beperking toevoegen tussen twee externe geometrieën. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Kan geen beperking toevoegen tussen twee vaste geometrieën. Vaste geometrieën omvatten externe geometrie, geblokkeerde geometrie en speciale punten zoals B-spline knooppunten. - + Sketcher Constraint Substitution Sketcher Beperking Vervanging - + Keep notifying me of constraint substitutions Blijf mij informeren over vervangingen van beperkingen - - - + + + Only sketch and its support are allowed to be selected. Alleen de schets en de ondersteuning ervan mogen worden geselecteerd. - + One of the selected has to be on the sketch. Een van het geselecteerde moet op de schets liggen. - - + + Select an edge from the sketch. Selecteer een rand van de schets. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Onmogelijk beperking - - - - + + + + The selected edge is not a line segment. De geselecteerde rand is geen lijnsegment. - - - - - - + + + + + + Double constraint Dubbele beperking - - - - - + + + + + The selected edge already has a horizontal constraint! De geselecteerde rand heeft al een horizontale constraint! - - - + + + The selected edge already has a vertical constraint! De geselecteerde rand heeft al een vertikale constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! De geselecteerde rand heeft al een blok constraint! - + The selected item(s) can't accept a horizontal constraint! De geselecteerde voorwerp(en) kunnen geen horizontale beperking aannemen! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Er zijn meer dan één vaste punten geselecteerd. Selecteer een maximum van één vast punt! - + The selected item(s) can't accept a vertical constraint! De geselcteerde voorwerp(en) kunnen geen verticale beperking aannemen! - - - + + + Select vertices from the sketch. Selecteer vertexen vanuit de schets. - + Select one vertex from the sketch other than the origin. Kies een andere vertex uit de schets dan de oorsprong. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecteer alleen vertexen uit de schets. De laatst gekozen vertex kan de oorsprong zijn. - + Wrong solver status Verkeerde oplosserstatus - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Een blokbeperking kan niet worden toegevoegd als de schets onopgelost is of er overbodige en tegenstrijdige beperkingen zijn. - + Select one edge from the sketch. Selecteer een rand uit de schets. - + Select only edges from the sketch. Selecteer enkel randen uit de schets. - + Number of selected objects is not 3 Het aantal geselecteerde objecten is niet gelijk aan 3 - - - + + + Error Fout - + Unexpected error. More information may be available in the Report View. Onverwachte fout. Meer informatie is mogelijk beschikbaar in de Report View. - + Endpoint to endpoint tangency was applied instead. Eindpunt tot eindpunttangens werd in plaats daarvan toegepast. - + Select two or more points from the sketch. Selecteer twee of meer punten uit de schets. - + Select two or more vertices from the sketch. Selecteer twee of meer hoekpunten van de schets. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selecteer twee of meer hoekpunten van de schets voor een samenvallende beperking, of twee of meer cirkels, ellipsen, bogen of ellipsbogen voor een concentrische beperking. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selecteer twee hoekpunten van de schets voor een samenvallende beperking, of twee cirkels, ellipsen, bogen of ellipsbogen voor een concentrische beperking. - + Select exactly one line or one point and one line or two points from the sketch. Selecteer precies één lijn of een punt en een lijn of twee punten uit de schets. - + Cannot add a length constraint on an axis! Een lengtebeperking is niet mogelijk op een as! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Selecteer precies één lijn of één punt en één lijn, of twee punten of twee cirkels van de schets. - + This constraint does not make sense for non-linear curves. Deze beperking heeft geen zin voor niet-lineaire krommen. - + Endpoint to edge tangency was applied instead. Eindpunt tot de rand raaklijn werd in plaats daarvan toegepast. - - - - - - - + + + + + + + Select the right things from the sketch. Selecteer de juiste elementen uit de schets. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Selecteer een rand die geen B-spline gewicht is. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Geen van de geselecteerde punten zijn op de respectievelijke curves beperkt, omdat het delen van hetzelfde element zijn, omdat ze allebei externe geometrie zijn, of omdat ze niet voor de rand in aanmerking komen. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Geen van de geselecteerde punten werd beperkt tot de respectievelijke curven, ofwel omdat ze deel uitmaken van hetzelfde element, ofwel omdat ze beide externe geometrie zijn. - - - - + + + + Select exactly one line or up to two points from the sketch. Selecteer precies een lijn of tot twee punten uit de schets. - + Cannot add a horizontal length constraint on an axis! Een horizontale lengtebeperking is niet mogelijk op een as! - + Cannot add a fixed x-coordinate constraint on the origin point! Kan geen gefixeerd x-coördinaat constraint plaatsen op het punt van oorsprong! - - + + This constraint only makes sense on a line segment or a pair of points. Deze beperking heeft alleen zin op een lijnsegment of een tweetal punten. - + Cannot add a vertical length constraint on an axis! Een verticale lengtebeperking is niet mogelijk op een as! - + Cannot add a fixed y-coordinate constraint on the origin point! Kan geen gefixeerd y-coördinaat constraint plaatsen op het punt van oorsprong! - + Select two or more lines from the sketch. Selecteer twee of meer lijnen van de schets. - - + + Select at least two lines from the sketch. Kies tenminste twee lijnen van de schets. - + Select a valid line. Selecteer een geldige lijn. - - + + The selected edge is not a valid line. De geselecteerde rand is geen geldige lijn. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunten; twee curven en een punt. - + Select some geometry from the sketch. perpendicular constraint Selecteer wat geometrie uit schets. - - + + Cannot add a perpendicularity constraint at an unconnected point! Kan geen loodrechtheidsbeperking toevoegen op een niet-verbonden punt! - - - + + + Perpendicular to B-spline edge currently unsupported. Loodrecht op B-splinerand wordt momenteel niet ondersteund. - - + + One of the selected edges should be a line. Eén van de geselecteerde randen moet een lijn zijn. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Endpoint op endpointtangens werd toegepast. De toevallige beperking werd verwijderd. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Eindpunt tot rand raaklijn is toegepast. Het punt op de object beperking is verwijderd. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunten; twee curven en een punt. - + Select some geometry from the sketch. tangent constraint Selecteer wat geometrie uit schets. - - - + + + Cannot add a tangency constraint at an unconnected point! Een raakbeperking kan niet worden toegevoegd aan een los punt! - - + + Tangent constraint at B-spline knot is only supported with lines! Raaklijn beperking bij B-spline knoop wordt alleen ondersteund met lijnen! - + B-spline knot to endpoint tangency was applied instead. B-spline knoop tot eindpunt raaklijn werd in plaats hiervan toegepast. - + Select either one point and several curves, or one curve and several points. Selecteer of één punt en meerdere curves of één curve en meerdere punten. - - + + Wrong number of selected objects! Verkeerd aantal geselecteerde objecten! - - + + With 3 objects, there must be 2 curves and 1 point. Met 3 objecten moeten er 2 curven en 1 punt zijn. - - - + + + Tangency to B-spline edge currently unsupported. Tanges op B-splinerand momenteel niet ondersteund. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selecteer een of meer bogen of cirkels uit de schets. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selecteer slechts één of meer B-Spline polen of slechts één of meer bogen of cirkels van de schaap, maar niet gemengd. - - - + + + Constraint only applies to arcs or circles. Beperkingen gelden alleen voor bogen en cirkels. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selecteer een of twee lijnen uit de schets. Of selecteer twee randen en een punt. - - + + Parallel lines Parallellen lijnen - - + + An angle constraint cannot be set for two parallel lines. Een hoekbeperking kan niet worden ingesteld voor twee parallelle lijnen. - + Cannot add an angle constraint on an axis! Een hoekbeperking op een as is niet mogelijk! - + Select two edges from the sketch. Selecteer twee randen van de schets. - + Select two or more compatible edges. Selecteer twee of meer passende randen. - + Sketch axes cannot be used in equality constraints. Schets assen kunnen niet worden gebruikt voor gelijkheid beperkingen. - + Equality for B-spline edge currently unsupported. Gelijkheid voor B-splinerand momenteel niet ondersteund. - - - - + + + + Select two or more edges of similar type. Selecteer twee of meer randen van een vergelijkbaar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selecteer twee punten en een symmetrie-lijn, twee punten en een symmetrie-punt of een lijn en een symmetrie-punt uit de schets. - - + + Cannot add a symmetry constraint between a line and its end points. Kan geen symmetrie beperking toevoegen tussen een lijn en zijn eindpunten. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Kan geen symmetriebeperking tussen een lijn en zijn eindpunten toevoegen! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selecteer twee eindpunten van lijnen om te fungeren als stralen, en een rand die een grens vertegenwoordigt. Het eerste geselecteerde punt komt overeen met index n1, tweede tot n2, en datum waarde bepaalt de verhouding n2/n1. - + Selected objects are not just geometry from one sketch. Geselecteerde objecten zijn niet slechts geometrie uit één schets. - + Cannot create constraint with external geometry only. Kan geen beperking maken met alleen externe geometrie. - + Incompatible geometry is selected. Incompatibele geometrie is geselecteerd. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw op B-spline rand wordt momenteel niet ondersteund. - - - - - + + + + + Select constraints from the sketch. Selecteer beperking(en) uit de schets. - - - + + + Select constraint(s) from the sketch. Selecteer beperking(en) uit de schets. - + B-Spline Degree B-spline graad - + Define B-Spline Degree, between 1 and %1: Definieer de B-Spline graad, tussen 1 en %1: - - - + + + CAD Kernel Error CAD-kernelfout - + None of the selected elements is an edge. Geen van de geselecteerde elementen is een rand. - - + + At least one of the selected objects was not a B-Spline and was ignored. Ten minste één van de geselecteerde objecten was geen B-Spline en werd genegeerd. - - + + The selection comprises more than one item. Please select just one knot. De selectie bestaat uit meer dan één item. Gelieve slechts één knoop te selecteren. - - + + Input Error Invoerfout - - + + None of the selected elements is a knot of a B-spline Geen van de geselecteerde elementen is een knoop van een B-spline - - + + Selection is empty Selectie is leeg - + Nothing is selected. Please select a b-spline. Er is niets geselecteerd. Selecteer een B-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Selecteer een B-spline-kromme om een knoop in te voegen (selecteer niet een knoop). Als de kromme geen B-spline is, verander deze dan eerst in een B-spline kromme. - + Nothing is selected. Please select end points of curves. Er is niets geselecteerd. Selecteer de eindpunten van de krommen. - + Too many curves on point Te veel krommen op het punt - - + + Exactly two curves should end at the selected point to be able to join them. Precies twee krommen moeten op het geselecteerde punt eindigen om ze te kunnen verbinden. - + Too few curves on point Te weinig krommen op het punt - + Two end points, or coincident point should be selected. Twee eindpunten, of een samenvallend punt, moeten worden geselecteerd. @@ -3306,17 +3307,17 @@ Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunt Het verplaatsen van externe geometrie naar een andere visuele laag wordt momenteel niet ondersteund. Externe geometrie wordt weggelaten - + Set knot multiplicity Multipliciteit van het knooppunt instellen - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Stel de knooppunt multipliciteit in op het laatst verstrekte punt, tussen 1 en %1:Nb: Houd er rekening mee dat de multipliciteit onder bepaalde omstandigheden genegeerd kan worden. Zie documentatie voor details - + Value Error Fout in de waarde @@ -3630,12 +3631,12 @@ Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunt Lengte: - + Refractive index ratio Brekingsindexverhouding - + Ratio n2/n1: Verhouding n2/n1: @@ -3915,8 +3916,8 @@ Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunt SketcherGui::PropertyConstraintListItem - - + + Unnamed Naamloos @@ -4150,13 +4151,13 @@ Hiervoor is het nodig om de bewerkingsmodus opnieuw in te schakelen. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4177,32 +4178,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Beide - + Auto Automatisch - + Diameter Diameter - + Radius Radius @@ -4651,12 +4652,12 @@ Then objects are only visible behind the sketch plane. Toepassen op bestaande schetsen - + Unexpected C++ exception Onverwachte C++ uitzondering - + Sketcher Schetsen @@ -4664,55 +4665,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Geen ontbrekende coïncidenties - + No missing coincidences found Geen ontbrekende coïncidenties gevonden - + Missing coincidences Ontbrekende coïncidenties - + %1 missing coincidences found %1 ontbrekende coïncidenties gevonden - + No invalid constraints Geen ongeldige beperkingen - + No invalid constraints found Geen ongeldige beperkingen gevonden - + Invalid constraints Ongeldige beperkingen - + Invalid constraints found Ongeldige beperkingen gevonden - - - + + + Reversed external geometry Omgekeerde externe geometrie - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,7 +4726,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Klik op "Swap eindpunten in constraints" knop om het opnieuw toewijzen van eindpunten. Doe dit slechts eenmaal bij schetsen gemaakt in FreeCAD ouder dan v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4734,75 +4735,70 @@ However, no constraints linking to the endpoints were found. Er zijn echter geen beperkingen gevonden die verband houden met de eindpunten. - + No reversed external-geometry arcs were found. Er zijn geen omgekeerde externe geometriebogen gevonden. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 wijzigingen werden aangebracht in de beperkingen die verband houden met eindpunten van omgekeerde bogen. - - + + Constraint orientation locking Vergrendeling van de beperkingensoriëntatie - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Oriëntatie vergendeling was ingeschakeld en opnieuw berekend voor %1 constraints. De constraints zijn opgesomd in rapportweergave (menu Weergave-> panelen -> rapportweergave). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Oriëntatie vergrendelen is uitgeschakeld voor %1 constraints. De constraints zijn opgenomen in de rapportweergave bekijken (menu Weergave-> panelen-> rapportweergave). Merk op dat voor alle toekomstige constraints, de vergrendeling nog steeds standaard op AAN. - - + + Delete constraints to external geom. Verwijder beperkingen van de externe geom. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? U staat op het punt om ALLE beperkingen te verwijderen die verband houden met externe geometrie. Dit is nuttig om een schets te redden met gebroken/gewijzigde koppelingen naar externe geometrie. Weet u zeker dat u de beperkingen wilt verwijderen? - + All constraints that deal with external geometry were deleted. Alle beperkingen die verband houden met de externe geometrie werden verwijderd. - + No degenerated geometry Geen gedegenereerde geometrie - + No degenerated geometry found Geen gedegenereerde geometrie gevonden - + Degenerated geometry Niet gegenereerde geometrie - + %1 degenerated geometry found %1 gedegenereerde geometrie gevonden SketcherGui::TaskSketcherConstraints - - - Form - Vorm - Check to toggle filters @@ -4877,11 +4873,6 @@ Er zijn echter geen beperkingen gevonden die verband houden met de eindpunten. SketcherGui::TaskSketcherElements - - - Form - Vorm - Check to toggle filters @@ -5067,7 +5058,7 @@ Er zijn echter geen beperkingen gevonden die verband houden met de eindpunten. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Geavanceerde oplosserinstelling @@ -5358,8 +5349,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Schakelt tussen het tonen en verbergen van de krommingskam voor alle B-splines @@ -5367,8 +5358,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Vermindert de multipliciteit van het geselecteerde knooppunt van een B-spline @@ -5376,8 +5367,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Hiermee schakelt u tussen tonen en verbergen de mate voor alle B-splines @@ -5385,8 +5376,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Verhoogt de multipliciteit van de geselecteerde knoop van een B-spline @@ -5394,8 +5385,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Hiermee schakelt u tussen het weergeven en verbergen van de knoop multipliciteit voor alle B-splines @@ -5403,8 +5394,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Schakelt tussen het weergeven en verbergen van het controlepunt voor alle B-splines @@ -5412,8 +5403,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Hiermee schakelt u tussen het weergeven en verbergen van de knoop multipliciteit voor alle B-splines @@ -5448,8 +5439,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Bemaat de diameter van een cirkel of een boog @@ -5457,7 +5448,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Straal/diameter van een cirkel of boog bepalen @@ -5465,8 +5456,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc De straal van een cirkel of boog bematen @@ -5474,7 +5465,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Straal/diameter van een cirkel of boog bepalen @@ -5491,8 +5482,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Maak een boog door zijn eindpunten en een punt langs de boog @@ -5500,8 +5491,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Maak een cirkel door 3 randpunten @@ -5509,8 +5500,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Maak een boog door zijn eindpunten en een punt langs de boog @@ -5518,8 +5509,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Maak een ellips boog door middel van zijn centrum, grote straal en eindpunten @@ -5527,8 +5518,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Maak een boog van hyperbola doormiddel van zijn centrum, grote radius en eindpunten @@ -5536,8 +5527,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Maak een boog parabool doormiddel van zijn focus, hoekpunten en eindpunten @@ -5545,13 +5536,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline via controlepunten - - + + Create a B-spline by control points Maak een B-spline via controlepunten @@ -5559,8 +5550,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Maak een cirkel door zijn midden en een randpunt @@ -5568,8 +5559,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Maak een ellips door de periapsis, apoapsis en substraal @@ -5577,8 +5568,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Maak een ellips door zijn midden, hoofdstraal en punt @@ -5586,8 +5577,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Maakt een afronding tussen twee lijnen @@ -5595,8 +5586,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Maak een zevenhoek door zijn midden en door een hoek @@ -5604,8 +5595,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Maak een zeshoek door zijn midden en door een hoek @@ -5613,7 +5604,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Maak een afgeronde rechthoek @@ -5621,14 +5612,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Maak een achthoek door zijn midden en door een hoek - - + + Create a regular polygon by its center and by one corner Maak een regelmatige veelhoek door zijn midden en door een hoek @@ -5636,8 +5627,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Maak een vijfhoek door zijn midden en door een hoek @@ -5645,8 +5636,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Afronding dat beperkingen en het snijpunt behoudt @@ -5654,7 +5645,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Maak een rechthoek @@ -5662,7 +5653,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Maak een gecentreerde rechthoek @@ -5670,8 +5661,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Maak een vierkant door zijn midden en door een hoek @@ -5679,8 +5670,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Maak een gelijkzijdige driehoek door zijn midden en door een hoek @@ -5688,13 +5679,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Periodieke B-spline via controlepunten - - + + Create a periodic B-spline by control points Maak een periodieke B-spline via controlepunten @@ -6328,36 +6319,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Fout @@ -6377,45 +6368,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Kon boog niet toevoegen - + Failed to add arc of ellipse Kon boog van de ellips niet toevoegen - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6425,18 +6416,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Fout bij het maken van de B-spline pool - - + + Error creating B-spline Fout bij het maken van de B-spline - + Error deleting last pole Error deleting last pole @@ -6446,49 +6437,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Kon kopie niet toevoegen - - + + Failed to add circle Kon cirkel niet toevoegen - + Failed to add an ellipse Kon ellips niet toevoegen - + Failed to extend edge Kon de rand niet verlengen - + Failed to add external geometry Kon externe geometrie niet toevoegen - + Failed to create fillet Kon afronding niet maken - + Failed to add line Kon lijn niet toevoegen @@ -6498,7 +6489,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Toevoegen van punt mislukt - + Failed to add polygon Polygoon toevoegen mislukt @@ -6508,27 +6499,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Kon rechthoek niet toevoegen - + Failed to add rounded rectangle Kon de afgeronde rechthoek niet toevoegen - + Failed to add slot Kon het slot niet toevoegen - + Failed to add edge Kon de rand niet toevoegen - + Failed to trim edge Kon de rand niet inkorten - + Value Error @@ -6538,13 +6529,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6552,13 +6543,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6664,12 +6655,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6677,12 +6668,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6690,12 +6681,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Afmeting - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6707,14 +6698,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Afmeting + + + + Dimension tools. + Bematingsgereedschappen. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts index 23739502a0..c3a6254406 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Utwórz kalkę techniczną - + Copy the geometry of another sketch Kopiuje geometrię innego szkicu @@ -100,27 +100,27 @@ Pokaż / ukryj warstwę informacyjną krzywej złożonej - + Show/hide B-spline degree Pokaż / ukryj stopień krzywej złożonej - + Show/hide B-spline control polygon Pokaż / ukryj ramkę kontrolną krzywej złożonej - + Show/hide B-spline curvature comb Pokaż / ukryj grzebień krzywizny krzywej złożonej - + Show/hide B-spline knot multiplicity Pokaż / ukryj krotność węzłów krzywej złożonej - + Show/hide B-spline control point weight Pokaż / ukryj wagę punktu kontrolnego krzywej złożonej @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Zwiąż łuk lub okrąg - + Constrain an arc or a circle Zwiąż łuk lub okrąg - + Constrain radius Wiązanie promienia - + Constrain diameter Wiązanie średnicy - + Constrain auto radius/diameter Zwiąż automatycznie promień / średnicę @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Utwórz łuk - + Create an arc in the sketcher Tworzy łuk na szkicu - + Center and end points Punkt środkowy i punkty końcowe - + End points and rim point Punkty końcowe i punkt na obwodzie @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Utwórz krzywą złożoną - + Create a B-spline in the sketch Tworzy krzywą złożoną na szkicu @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Utwórz okrąg - + Create a circle in the sketcher Tworzy okrąg na szkicu - + Center and rim point Przez punkt środkowy i na obwodzie - + 3 rim points Przez trzy punkty na obwodzie @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Utwórz krzywą stożkową - + Create a conic in the sketch Tworzy krzywą stożkową na szkicu - + Ellipse by center, major radius, point Elipsę przez środek, główny promień, punkt - + Ellipse by periapsis, apoapsis, minor radius Elipsę przez periapsis, apoapsis i mniejszy promień - + Arc of ellipse by center, major radius, endpoints Łuk elipsy przez środek, promień główny, punkty końcowe - + Arc of hyperbola by center, major radius, endpoints Łuk hiperboli przez środek, promień główny, punkty końcowe - + Arc of parabola by focus, vertex, endpoints Łuk paraboli przez ogniskową, wierzchołek, punkty końcowe @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Utwórz zaokrąglenie - + Create a fillet between two lines Utwórz zaokrąglenie między dwoma liniami - + Sketch fillet Zaokrąglenie - + Constraint-preserving sketch fillet Zaokrąglenie z zachowaniem wiązań @@ -299,17 +299,17 @@ Tworzy prostokąt na szkicu - + Rectangle Prostokąt - + Centered rectangle Prostokąt wyśrodkowany - + Rounded rectangle Prostokąt zaokrąglony @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Utwórz wielokąt foremny - + Create a regular polygon in the sketcher Tworzy wielokąt foremny na szkicu - + Triangle Trójkąt - + Square Kwadrat - + Pentagon Pięciokąt - + Hexagon Sześciokąt - + Heptagon Siedmiokąt - + Octagon Ośmiokąt - + Regular polygon Wielokąt foremny @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Zmodyfikuj wielokrotność węzłów - + Modifies the multiplicity of the selected knot of a B-spline Modyfikuje wielokrotność wybranego węzła krzywej złożonej - + Increase knot multiplicity Zwiększ liczebność węzłów - + Decrease knot multiplicity Zmniejsz liczbę węzłów @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Wiązanie kąta - + Fix the angle of a line or the angle between two lines Ustaw kąt linii lub kąt pomiędzy 2 liniami @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Wiązanie zablokowania - + Block the selected edge from moving Zablokuj wybraną krawędź przed przeniesieniem @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Wiązanie zbieżności - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Utwórz wiązanie zbieżności między punktami lub wiązanie współśrodkowe między okręgami, łukami i elipsami @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Wiązanie średnicy - + Fix the diameter of a circle or an arc Ustal średnicę okręgu lub łuku @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Wiązanie odległości - + Fix a length of a line or the distance between a line and a vertex or between two circles Ustal długość linii lub odległość między linią a wierzchołkiem lub między dwoma okręgami @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Zwiąż odległość poziomą - + Fix the horizontal distance between two points or line ends Ustal poziomą odległość między dwoma punktami lub końcami linii @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Zwiąż odległość pionową - + Fix the vertical distance between two points or line ends Ustal pionową odległość między dwoma punktami lub końcami linii @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Wiązanie równości - + Create an equality constraint between two lines or between circles and arcs Utwórz wiązanie równości między dwiema liniami lub między okręgami i łukami @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Zwiąż w poziomie - + Create a horizontal constraint on the selected item Utwórz wiązanie poziome na wybranym elemencie @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Wiązanie blokady odległości - + Create both a horizontal and a vertical distance constraint on the selected vertex Wiązanie blokady odległości: utwórz zarówno poziome, jak i pionowe wiązanie odległości @@ -520,12 +520,12 @@ na wybranym wierzchołku CmdSketcherConstrainParallel - + Constrain parallel Wiązanie równoległości - + Create a parallel constraint between two lines Utwórz wiązanie równoległości pomiędzy dwoma liniami @@ -533,12 +533,12 @@ na wybranym wierzchołku CmdSketcherConstrainPerpendicular - + Constrain perpendicular Wiązanie prostopadłości - + Create a perpendicular constraint between two lines Utwórz wiązanie prostopadłości między dwoma liniami @@ -546,12 +546,12 @@ na wybranym wierzchołku CmdSketcherConstrainPointOnObject - + Constrain point onto object Zwiąż punkt na obiekcie - + Fix a point onto an object Ustaw punkt na obiekcie @@ -559,12 +559,12 @@ na wybranym wierzchołku CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Zwiąż automatycznie promień / średnicę - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Ustal średnicę, jeśli wybrano okrąg lub promień, jeśli wybrano łuk lub biegun liniowy @@ -572,12 +572,12 @@ na wybranym wierzchołku CmdSketcherConstrainRadius - + Constrain radius or weight Wiązanie promienia lub wagi - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Ustal promień okręgu lub łuku albo ustal wagę bieguna krzywej złożonej @@ -585,12 +585,12 @@ na wybranym wierzchołku CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Wiązanie refrakcji (prawo Snell'a) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Tworzy wiązanie refrakcji (prawo Snella) pomiędzy dwoma punktami końcowymi promieni @@ -600,12 +600,12 @@ oraz krawędzią jako interfejsem. CmdSketcherConstrainSymmetric - + Constrain symmetrical Wiązanie symetrii - + Create a symmetry constraint between two points with respect to a line or a third point Utwórz wiązanie symetrii pomiędzy dwoma punktami @@ -615,12 +615,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherConstrainTangent - + Constrain tangent Wiązanie styczności - + Create a tangent constraint between two entities Utwórz wiązanie styczności pomiędzy dwoma obiektami @@ -628,12 +628,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherConstrainVertical - + Constrain vertically Zwiąż w pionie - + Create a vertical constraint on the selected item Utwórz wiązanie pionowe na wybranym elemencie @@ -641,12 +641,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherConvertToNURBS - + Convert geometry to B-spline Konwertuj geometrię na krzywą złożoną - + Converts the selected geometry to a B-spline Konwertuje wybraną geometrię do krzywej złożonej @@ -667,12 +667,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreate3PointArc - + Create arc by three points Utwórz łuk przez trzy punkty - + Create an arc by its end points and a point along the arc Utwórz łuk z punktów końcowych i punkt na łuku @@ -680,12 +680,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreate3PointCircle - + Create circle by three points Utwórz okrąg przez trzy punkty - + Create a circle by 3 perimeter points Utwórz okrąg przez trzy punkty na obwodzie @@ -693,12 +693,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateArc - + Create arc by center Utwórz łuk przez środek - + Create an arc by its center and by its end points Utwórz łuk ze środka i punktów końcowych @@ -706,12 +706,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Utwórz łuk na podstawie elipsy - + Create an arc of ellipse in the sketch Tworzy łuk elipsy na szkicu @@ -719,12 +719,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Utwórz łuk na podstawie hiperboli - + Create an arc of hyperbola in the sketch Tworzy łuk hiperboli na szkicu @@ -732,12 +732,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateArcOfParabola - + Create arc of parabola Utwórz łuk na podstawie paraboli - + Create an arc of parabola in the sketch Tworzy łuk paraboli na szkicu @@ -745,12 +745,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateBSpline - + Create B-spline Utwórz krzywą złożoną - + Create a B-spline by control points in the sketch. Utwórz krzywą złożoną poprzez podanie punktów kontrolnych na szkicu. @@ -758,12 +758,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateCircle - + Create circle Utwórz okrąg - + Create a circle in the sketch Tworzy okrąg na szkicu @@ -771,12 +771,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Utwórz elipsę przez trzy punkty - + Create an ellipse by 3 points in the sketch Tworzy elipsę przez trzy punkty na szkicu @@ -784,12 +784,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateEllipseByCenter - + Create ellipse by center Utwórz elipsę przez środek - + Create an ellipse by center in the sketch Tworzy elipsę przez środek na szkicu @@ -797,12 +797,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateFillet - + Create fillet Utwórz zaokrąglenie - + Create a fillet between two lines or at a coincident point Utwórz zaokrąglenie między dwiema liniami lub w punkcie zbieżności @@ -810,12 +810,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateHeptagon - + Create heptagon Utwórz siedmiokąt - + Create a heptagon in the sketch Tworzy siedmiokąt na szkicu @@ -823,12 +823,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateHexagon - + Create hexagon Utwórz sześciokąt - + Create a hexagon in the sketch Tworzy sześciokąt na szkicu @@ -862,12 +862,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateOctagon - + Create octagon Utwórz ośmiokąt - + Create an octagon in the sketch Tworzy ośmiokąt na szkicu @@ -875,12 +875,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreatePentagon - + Create pentagon Utwórz pięciokąt - + Create a pentagon in the sketch Tworzy pięciokąt na szkicu @@ -888,12 +888,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Utwórz okresową krzywą złożoną - + Create a periodic B-spline by control points in the sketch. Utwórz okresową krzywą złożoną przez podanie punktów kontrolnych na szkicu. @@ -901,12 +901,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreatePoint - + Create point Utwórz punkt - + Create a point in the sketch Utwórz punkt na szkicu @@ -914,12 +914,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreatePointFillet - + Create corner-preserving fillet Utwórz zaokrąglenie z zachowaniem narożników - + Fillet that preserves intersection point and most constraints Zaokrąglenie, które zachowuje punkt przecięcia i większość wiązań @@ -927,12 +927,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreatePolyline - + Create polyline Utwórz polilinię - + Create a polyline in the sketch. 'M' Key cycles behaviour Utwórz polilinię w szkicu. Klawisz "M" przełącza zachowanie @@ -966,12 +966,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateRegularPolygon - + Create regular polygon Utwórz wielokąt foremny - + Create a regular polygon in the sketch Tworzy wielokąt foremny na szkicu @@ -979,12 +979,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateSlot - + Create slot Utwórz wpust - + Create a slot in the sketch Utwórz rowek w szkicu @@ -992,12 +992,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateSquare - + Create square Utwórz kwadrat - + Create a square in the sketch Tworzy kwadrat na szkicu @@ -1005,12 +1005,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherCreateTriangle - + Create equilateral triangle Utwórz trójkąt równoboczny - + Create an equilateral triangle in the sketch Tworzy trójkąt równoboczny na szkicu @@ -1018,12 +1018,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherDecreaseDegree - + Decrease B-spline degree Zmniejsz stopień krzywej złożonej - + Decreases the degree of the B-spline Zmniejsza stopień krzywej złożonej @@ -1031,12 +1031,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Zmniejsz liczbę węzłów - + Decreases the multiplicity of the selected knot of a B-spline Zmniejsza wielokrotność wybranego węzła krzywej złożonej @@ -1083,12 +1083,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherExtend - + Extend edge Przedłuż krawędź - + Extend an edge with respect to the picked position Przedłuża krawędź w stosunku do wybranej pozycji @@ -1096,12 +1096,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherExternal - + Create external geometry Utwórz geometrię zewnętrzną - + Create an edge linked to an external geometry Utwórz krawędź związaną z zewnętrzną geometrią @@ -1109,12 +1109,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherIncreaseDegree - + Increase B-spline degree Zwiększ stopień krzywej złożonej - + Increases the degree of the B-spline Zwiększa stopień krzywej złożonej @@ -1122,12 +1122,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Zwiększ liczbę węzłów - + Increases the multiplicity of the selected knot of a B-spline Zwiększa wielokrotność wybranego węzła krzywej złożonej @@ -1135,12 +1135,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherInsertKnot - + Insert knot Wstaw węzeł - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Wstawia węzeł o podanym parametrze. Jeśli węzeł już istnieje przy tym parametrze, jego krotność zwiększa się o jeden. @@ -1148,12 +1148,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherJoinCurves - + Join curves Połącz krzywe - + Join two curves at selected end points Połącz dwie krzywe w wybranych punktach końcowych @@ -1440,12 +1440,12 @@ To usunie właściwość "podparcie", jeśli istnieje. CmdSketcherSplit - + Split edge Podziel krawędź - + Splits an edge into two while preserving constraints Dzieli krawędź na dwie przy zachowaniu wiązań @@ -1466,12 +1466,12 @@ To usunie właściwość "podparcie", jeśli istnieje. CmdSketcherSwitchVirtualSpace - + Switch virtual space Przełącz przestrzeń wirtualną - + Switches the selected constraints or the view to the other virtual space Przełącza wybrane wiązania lub widok na inną przestrzeń wirtualną @@ -1492,12 +1492,12 @@ To usunie właściwość "podparcie", jeśli istnieje. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktywuj / dezaktywuj wiązanie - + Activates or deactivates the selected constraints Aktywuje lub wyłącza zaznaczone wiązania @@ -1518,12 +1518,12 @@ To usunie właściwość "podparcie", jeśli istnieje. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Przełącz kontrolę wiązania - + Set the toolbar, or the selected constraints, into driving or reference mode Ustaw pasek narzędzi lub wybrane więzy wymiarowe @@ -1533,12 +1533,12 @@ w tryb konstrukcyjny lub informacyjny CmdSketcherTrimming - + Trim edge Przytnij krawędź - + Trim an edge with respect to the picked position Przycina krawędź w odniesieniu do wybranej pozycji @@ -1597,369 +1597,370 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Command - - + + Add horizontal constraint Dodaj wiązanie poziome - - - + + + Add horizontal alignment Wyrównaj w poziomie - - + + Add vertical constraint Dodaj wiązanie pionowe - + Add vertical alignment Wyrównaj w pionie - + Add 'Lock' constraint Dodaj wiązanie blokady odległości - + Add relative 'Lock' constraint Dodaj względne wiązanie blokady odległości - + Add fixed constraint Dodaj wiązanie zablokowania - + Add 'Block' constraint Dodaj wiązanie zablokowania - + Add block constraint Dodaj wiązanie zablokowania - - - + + + Add coincident constraint Dodaj wiązanie zbieżności - - + + Add distance from horizontal axis constraint Dodaj odległość od wiązania osi poziomej - - + + Add distance from vertical axis constraint Dodaj odległość od wiązania osi pionowej - - + + Add point to point distance constraint Dodaj ograniczenie odległości punktu od punktu - - - + + + Add point to line Distance constraint Dodaj ograniczeni odległości punktu od linii - - + + Add circle to circle distance constraint Dodaj wiązanie odległości okręgu do okręgu - + Add circle to line distance constraint Dodaj wiązanie odległości okręgu do linii - - - - - + + + + + + Add length constraint Dodaj wiązanie długości - - + + Dimension Wymiar - + Add lock constraint - Add lock constraint + Dodaj wiązanie blokady odległości - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Dodaj wiązanie Odległość do początku układu współrzędnych - - - + + + Add Distance constraint - Add Distance constraint + Dodaj wiązanie odległości - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Dodaj wiązanie poziome - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Dodaj wiązanie pionowe + + Add Symmetry constraint + Dodaj wiązanie symetrii + + + + + Add Symmetry constraints + Dodaj wiązania symetrii + + + + + Add Distance constraints + Dodaj wiązania odległości + + + + Add Horizontal constraint + Dodaj wiązanie poziome + + + + Add Vertical constraint + Dodaj wiązanie pionowe + + + Add Block constraint - Add Block constraint + Dodaj wiązanie zablokowania - + Add Angle constraint - Add Angle constraint + Dodaj wiązanie kąta - - - + + + Add Equality constraint - Add Equality constraint + Dodaj wiązanie równości - + Add Equality constraints - Add Equality constraints + Dodaj wiązania równości - + Add Radius constraint - Add Radius constraint + Dodaj wiązanie promienia - + Add concentric and length constraint - Add concentric and length constraint + Dodaj wiązanie współosiowości i długości - + Add DistanceX constraint - Add DistanceX constraint + Dodaj wiązanie odległości X - + Add DistanceY constraint - Add DistanceY constraint + Dodaj wiązanie odległości Y - + Add point to circle Distance constraint - Add point to circle Distance constraint + Dodaj wiązanie odległości punktu od okręgu - - + + Add point on object constraint Dodaj punkt w miejscu wiązania obiektu - - + + Add point to point horizontal distance constraint Dodaj poziome wiązanie odległości, pomiędzy punktami - + Add fixed x-coordinate constraint Dodaj wiązanie ze stałą współrzędną x - - + + Add point to point vertical distance constraint Dodaj pionowe wiązanie odległości pomiędzy punktami - + Add fixed y-coordinate constraint Dodaj wiązanie ze stałą współrzędną y - - + + Add parallel constraint Dodaj wiązanie równoległości - - - - - - - + + + + + + + Add perpendicular constraint Dodaj wiązanie prostopadłości - + Add perpendicularity constraint Dodaj wiązanie prostopadłości - + Swap coincident+tangency with ptp tangency Zamień styczność krawędzi na styczność od punktu do punktu - + Swap PointOnObject+tangency with point to curve tangency Zamień wiązanie Punkt na obiekcie+styczna z punktem na wiązanie Styczna do krzywej - - - - - - - + + + + + + + Add tangent constraint Dodaj wiązanie kąta - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodaj punkt dostępny dla wiązania styczności - - - - + + + + Add radius constraint Dodaj wiązanie promienia - - - - + + + + Add diameter constraint Dodaj wiązanie średnicy - - - - + + + + Add radiam constraint Dodaj wiązanie promienia - - - - - - + + + + + + Add angle constraint Dodaj wiązanie kąta - - + + Add equality constraint Dodaj wiązanie równości - - - - - + + + + + Add symmetric constraint Dodaj wiązanie symetryczności - + Add Snell's law constraint Dodaj wiązanie prawa Snella - + Toggle constraint to driving/reference Przełączanie wiązania między konstrukcyjnym i informacyjnym - + Activate/Deactivate constraint Aktywuj / dezaktywuj wiązanie @@ -2019,44 +2020,44 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Dodaj wyśrodkowane pole szkicu - + Add rounded rectangle Dodaj zaokrąglony prostokąt - + Add line to sketch wire Dodaj linię do szkicu linii łamanej - + Add arc to sketch wire Dodaj łuk do szkicu polilinii - - + + Add sketch arc Dodaj szkic łuku - - + + Add sketch circle Dodaj okrąg na szkicu - + Add sketch ellipse Dodaj elipsę na szkicu - + Add sketch arc of ellipse Dodaj szkic łuku elipsy - + Add sketch arc of hyperbola Dodaj szkic łuku hiperboli @@ -2076,33 +2077,33 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Dodaj punkt na szkicu - - + + Create fillet Utwórz zaokrąglenie - + Trim edge Przytnij krawędź - + Extend edge Przedłuż krawędź - + Split edge Podziel krawędź - + Add external geometry Dodaj geometrię zewnętrzną - + Add slot Dodaj kieszeń @@ -2112,37 +2113,37 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Dodaj sześciokąt - + Convert to NURBS Konwertuj na NURBS - + Increase spline degree Zwiększ stopień splajnu - + Decrease spline degree Zmniejsz stopień krzywej złożonej - + Increase knot multiplicity Zwiększ liczebność węzłów - + Decrease knot multiplicity Zmniejsz liczbę węzłów - + Insert knot Wstaw węzeł - + Join Curves Połącz krzywe @@ -2182,12 +2183,12 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Usuń wyrównanie osi - + Toggle constraints to the other virtual space Przełącz wiązania na inną przestrzeń wirtualną - + @@ -2195,7 +2196,7 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Aktualizuj wiązania przestrzeni wirtualnej - + Add auto constraints Dodaj wiązania automatycznie @@ -2235,7 +2236,7 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Dodaj punkt węzła - + Create a carbon copy Utwórz kalkę techniczną @@ -2251,37 +2252,37 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Błąd wiązań automatycznych: Nierozwiązywalny szkic przy stosowaniu wiązania zbieżności. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Błąd więzów automatycznych: Nierozwiązywalny szkic przy stosowaniu wiązania pionowego / poziomego. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Błąd wiązań automatycznych: Nierozwiązywalny szkic przy stosowaniu wiązania równości. - + Autoconstrain error: Unsolvable sketch without constraints. Błąd wiązań automatycznych: Nierozwiązywalny szkic bez wiązań. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Błąd wiązań automatycznych: Nierozwiązywalny szkic po zastosowaniu wiązań poziomych i pionowych. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Błąd wiązań automatycznych: Nierozwiązywalny szkic po zastosowaniu wiązania zbieżności punktów. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Błąd wiązań automatycznych: Nierozwiązywalny szkic przy stosowaniu wiązania równości. @@ -2406,143 +2407,143 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. - - - + + + Wrong selection Niewłaściwy wybór @@ -2581,329 +2582,329 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Wiązanie wymiaru - + Cannot add a constraint between two external geometries. Nie można dodać wiązania pomiędzy dwoma geometriami zewnętrznymi. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nie można dodać wiązania między dwiema w pełni zdefiniowanymi geometriami. Geometrie te obejmują geometrię zewnętrzną, geometrię blokującą oraz punkty specjalne, takie jak punkty węzłów krzywej złożonej. - + Sketcher Constraint Substitution Zastępowanie wiązania szkicownika - + Keep notifying me of constraint substitutions Powiadamiaj mnie o zastępowaniu wiązań - - - + + + Only sketch and its support are allowed to be selected. Dozwolone jest wybieranie tylko szkicu i jego wsparcia. - + One of the selected has to be on the sketch. Jeden z wyborów musi znajdować się na szkicu. - - + + Select an edge from the sketch. Wybierz krawędź ze szkicu. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Wiązanie niemożliwe do ustalenia - - - - + + + + The selected edge is not a line segment. Wybrana krawędź nie jest odcinkiem linii. - - - - - - + + + + + + Double constraint Zdublowane wiązanie - - - - - + + + + + The selected edge already has a horizontal constraint! Wybrana krawędź ma już wiązanie poziome! - - - + + + The selected edge already has a vertical constraint! Wybrana krawędź ma już wiązanie pionowe! - - - - - - + + + + + + The selected edge already has a Block constraint! Wybrana krawędź ma już wiązanie zablokowania! - + The selected item(s) can't accept a horizontal constraint! Wybrane detale nie mogą zaakceptować ograniczenia poziomego! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Wybrano więcej niż jeden ustalony punkt. Wybierz maksymalnie jeden ustalony punkt! - + The selected item(s) can't accept a vertical constraint! Wybrane detale nie mogą zaakceptować ograniczenia pionowego! - - - + + + Select vertices from the sketch. Wybierz wierzchołki ze szkicu. - + Select one vertex from the sketch other than the origin. Zaznacz jeden wierzchołek ze szkicu inny niż odniesienie położenia. - + Select only vertices from the sketch. The last selected vertex may be the origin. Ze szkicu wybierz tylko wierzchołki. Ostatni wybrany wierzchołek może być odniesieniem położenia. - + Wrong solver status Nieprawidłowy status solvera - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Nie można dodać wiązania zablokowania, jeśli rysunek nie został rozwiązany lub istnieją wiązania zbędne i/lub sprzeczne. - + Select one edge from the sketch. Zaznacz jedną krawędź ze szkicu. - + Select only edges from the sketch. Zaznacz tylko krawędzie ze szkicu. - + Number of selected objects is not 3 Liczba wybranych obiektów nie jest równa 3 - - - + + + Error Błąd - + Unexpected error. More information may be available in the Report View. Nieoczekiwany błąd. Więcej informacji może być dostępnych w Widoku raportu. - + Endpoint to endpoint tangency was applied instead. Zamiast tego zastosowano styczne między punktami końcowymi. - + Select two or more points from the sketch. Zaznacz dwa lub więcej punktów ze szkicu. - + Select two or more vertices from the sketch. Wybierz dwa lub więcej wierzchołków ze szkicu. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wybierz dwa lub więcej wierzchołków ze szkicu dla wiązania zbieżności albo co najmniej dwa koła, elipsy, łuki lub łuki eliptyczne do wiązania współśrodkowego. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wybierz dwa wierzchołki ze szkicu dla wiązania zbieżności albo dwa koła, elipsy, łuki lub łuki eliptyczne do wiązania współśrodkowego. - + Select exactly one line or one point and one line or two points from the sketch. Wybierz dokładnie jedną linię lub jeden punkt i jedną linię lub dwa punkty ze szkicu. - + Cannot add a length constraint on an axis! Nie można dodać ograniczenia długości osi! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Wybierz ze szkicu dokładnie jedną linię lub jeden punkt i jedną linię lub dwa punkty lub dwa okręgi. - + This constraint does not make sense for non-linear curves. Takie wiązanie nie ma sensu w przypadku krzywych nieliniowych. - + Endpoint to edge tangency was applied instead. Zamiast tego zastosowano styczność punktu końcowego do krawędzi. - - - - - - - + + + + + + + Select the right things from the sketch. Wybierz prawidłowe obiekty ze szkicu. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Wybierz krawędź, która nie jest wagą krzywej złożonej. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Żaden z wybranych punktów nie został związany z odpowiednimi krzywymi, ponieważ są one częściami tego samego elementu, ponieważ są geometrią zewnętrzną lub ponieważ krawędź nie kwalifikuje się. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Żaden z wybranych punktów nie został związany na odpowiednich krzywych, albo są one częścią tego samego elementu albo obie są zewnętrzną geometrią. - - - - + + + + Select exactly one line or up to two points from the sketch. Wybierz dokładnie jedną linię lub do dwa punkty ze szkicu. - + Cannot add a horizontal length constraint on an axis! Nie można dodać ograniczenia długości osi w poziomie! - + Cannot add a fixed x-coordinate constraint on the origin point! Nie można dodać określonego wiązania współrzędnych x w punkcie odniesienia położenia! - - + + This constraint only makes sense on a line segment or a pair of points. Takie wiązanie ma sens tylko w przypadku odcinka lub pary punktów. - + Cannot add a vertical length constraint on an axis! Nie można dodać ograniczenia długości osi w pionie! - + Cannot add a fixed y-coordinate constraint on the origin point! Nie można dodać określonego wiązania współrzędnych y w punkcie odniesienia położenia! - + Select two or more lines from the sketch. Wybierz dwie lub więcej linii ze szkicu. - - + + Select at least two lines from the sketch. Wybierz co najmniej dwie linie ze szkicu. - + Select a valid line. Wybierz prawidłową linię. - - + + The selected edge is not a valid line. Wybrana krawędź nie jest prawidłową linią. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2914,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Akceptowane kombinacje: dwie krzywe; punkt końcowy i krzywej; dwa punkty końcowe; dwie krzywe i punkt. - + Select some geometry from the sketch. perpendicular constraint Wybierz dowolną geometrię ze szkicu. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nie można dodać wiązania prostopadłości w niepołączonym punkcie! - - - + + + Perpendicular to B-spline edge currently unsupported. Prostopadła do krawędzi krzywej złozonej obecnie nie jest obsługiwana. - - + + One of the selected edges should be a line. Jedna z zaznaczonych krawędzi powinna być linią. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Zastosowano styczność punktu końcowego do punktu końcowego. Wiązanie zbieżności zostało usunięte. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Zastosowano wiązanie styczności punktu końcowego do krawędzi. Usunięto wiązanie punktu na obiekcie. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2958,277 +2959,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Akceptowane kombinacje: dwie krzywe; punkt końcowy i krzywa; dwa punkty końcowe; dwie krzywe i punkt. - + Select some geometry from the sketch. tangent constraint Wybierz dowolną geometrię ze szkicu. - - - + + + Cannot add a tangency constraint at an unconnected point! Nie można dodać wiązanie styczności w niepołączonym punkcie! - - + + Tangent constraint at B-spline knot is only supported with lines! Wiązanie styczne w węźle krzywej złożonej jest obsługiwane tylko z liniami! - + B-spline knot to endpoint tangency was applied instead. Zamiast tego zastosowano styczność węzła krzywej złożonej do punktu końcowego. - + Select either one point and several curves, or one curve and several points. Wybierz albo jeden punkt i kilka krzywych, albo jedną krzywą i kilka punktów. - - + + Wrong number of selected objects! Niewłaściwa liczba wybranych obiektów! - - + + With 3 objects, there must be 2 curves and 1 point. Z trzech (3) obiektów, dwa (2) muszą być krzywymi i jeden (1) musi być punktem. - - - + + + Tangency to B-spline edge currently unsupported. Styczna do krawędzi krzywej złożonej nie jest obecnie obsługiwana. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Wybierz jeden lub więcej łuków lub okręgów ze szkicu. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Wybierz tylko jeden lub więcej biegunów krzywej złożonej, albo tylko jeden lub więcej łuków lub okręgów ze szkicu, ale nie ich kombinację. - - - + + + Constraint only applies to arcs or circles. Wiązanie dotyczy tylko łuków lub okręgów. - - + + Select one or two lines from the sketch. Or select two edges and a point. Zaznacz jedną lub dwie linie ze szkicu. Albo zaznacz dwie krawędzie oraz punkt. - - + + Parallel lines Linie równoległe - - + + An angle constraint cannot be set for two parallel lines. Nie można zdefiniować wiązania kąta dla dwóch linii równoległych. - + Cannot add an angle constraint on an axis! Nie można dodać ustalonego wiązania kąta na osi! - + Select two edges from the sketch. Zaznacz dwie krawędzie ze szkicu. - + Select two or more compatible edges. Zaznacz dwie lub więcej zgodnych krawędzi. - + Sketch axes cannot be used in equality constraints. Osie szkiców nie mogą być używane z wiązaniami równości. - + Equality for B-spline edge currently unsupported. Równość pomiędzy krawędziami krzywej złożonej obecnie nie jest obsługiwana. - - - - + + + + Select two or more edges of similar type. Wybierz dwie lub więcej krawędzi podobnego typu. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Wybierz dwa punkty i linię symetrii, dwa punkty i punkt symetrii lub linię i punkt symetrii ze szkicu. - - + + Cannot add a symmetry constraint between a line and its end points. Nie można dodać wiązania symetrii między linią i jej punktami końcowymi. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nie można dodać wiązania symetrii między linią i jego punktami końcowymi! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Wybierz dwa końce linii, które mają działać jak półproste, oraz krawędź reprezentującą granicę. Pierwszy wybrany punkt odpowiada indeksowi n1, drugi n2, a wartość odniesienia określa stosunek n2 / n1. - + Selected objects are not just geometry from one sketch. Wybrane obiekty są nie tylko geometrią z jednego szkicu. - + Cannot create constraint with external geometry only. Nie można tworzyć wiązań tylko przy użyciu geometrii zewnętrznej. - + Incompatible geometry is selected. Wybrano niekompatybilną geometrię. - + SnellsLaw on B-spline edge is currently unsupported. Prawo Snell'a na krawędzi krzywej złożonej jest obecnie nieobsługiwana. - - - - - + + + + + Select constraints from the sketch. Wybierz wiązania ze szkicu. - - - + + + Select constraint(s) from the sketch. Wybiera wiązanie(a) ze szkicu. - + B-Spline Degree Stopień krzywej złożonej - + Define B-Spline Degree, between 1 and %1: Zdefiniuj stopień krzywej złożonej między 1 a %1: - - - + + + CAD Kernel Error Błąd jądra CAD - + None of the selected elements is an edge. Żaden z wybranych elementów nie jest krawędzią. - - + + At least one of the selected objects was not a B-Spline and was ignored. Co najmniej jeden z wybranych obiektów nie był krzywą złożoną i został zignorowany. - - + + The selection comprises more than one item. Please select just one knot. Wybór obejmuje więcej niż jeden element. Proszę wybrać tylko jeden węzeł. - - + + Input Error Błąd danych wejściowych - - + + None of the selected elements is a knot of a B-spline Żaden z wybranych elementów nie jest węzłem B-spline - - + + Selection is empty Obszar zaznaczenia nie zawiera obiektów - + Nothing is selected. Please select a b-spline. Nic nie zostało wybrane. Wybierz krzywą złożoną. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Wybierz krzywą złożoną, aby wstawić węzeł (a nie węzeł na nią). Jeśli krzywa nie jest krzywą złożoną, najpierw ją przekształć. - + Nothing is selected. Please select end points of curves. Nic nie zostało wybrane. Proszę wybrać punkty końcowe krzywych - + Too many curves on point Zbyt wiele krzywych w punkcie - - + + Exactly two curves should end at the selected point to be able to join them. Dokładnie dwie krzywe powinny kończyć się w wybranym punkcie, aby można było je połączyć. - + Too few curves on point Zbyt mało krzywych w punkcie - + Two end points, or coincident point should be selected. Należy wybrać dwa punkty końcowe lub punkt pokrywający się. @@ -3308,17 +3309,17 @@ Akceptowane kombinacje: dwie krzywe; punkt końcowy i krzywa; dwa punkty końcow Obecnie nie jest obsługiwane przenoszenie geometrii zewnętrznej do innej warstwy wizualnej. Geometria zewnętrzna zostanie pominięta - + Set knot multiplicity Ustaw wielokrotność węzła - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Ustaw krotność węzła w ostatnim podanym punkcie, pomiędzy 1 a %1:Uwaga, krotność może być ignorowana w pewnych okolicznościach. Szczegóły można znaleźć w dokumentacji - + Value Error Błąd wartości @@ -3633,12 +3634,12 @@ Przytrzymaj Ctrl + Alt, aby to zignorować. Długość: - + Refractive index ratio Współczynnik załamania światła - + Ratio n2/n1: Stosunek n2/n1: @@ -3918,8 +3919,8 @@ Przytrzymaj Ctrl + Alt, aby to zignorować. SketcherGui::PropertyConstraintListItem - - + + Unnamed Nienazwany @@ -4141,30 +4142,30 @@ Wymaga ponownego przejścia do trybu edycji, aby mógł być skuteczny. Dimension Constraint - Dimension Constraint + Wiązanie wymiaru Dimensioning constraints: - Dimensioning constraints: + Wiązania wymiarów: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Wybierz typ wiązań wymiarowania dla paska narzędzi: +"Pojedyncze narzędzie": Pojedyncze narzędzie dla wszystkich wiązań wymiarowania: Odległość, Odległość X / Y, Kąt, Promień. +"Oddzielne narzędzia": Oddzielne narzędzia dla każdego wiązania wymiarowania. +"Oba": Dostępne będzie zarówno narzędzie "Wymiar", jak i oddzielne narzędzia. +To ustawienie dotyczy tylko paska narzędzi. Niezależnie od wyboru, wszystkie narzędzia są zawsze dostępne w menu i za pomocą skrótów. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Narzędzie wymiarowania w trybie średnicy / promienia: @@ -4172,38 +4173,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Podczas korzystania z narzędzia wymiarowania można wybrać sposób obsługi okręgów i łuków: +"Automatycznie": Narzędzie zastosuje promień do łuków i średnicę do okręgów. +"Średnica": Narzędzie zastosuje średnicę zarówno do łuków, jak i okręgów. +"Promień": Narzędzie zastosuje promień zarówno do łuków, jak i okręgów. - + Single tool - Single tool + Narzędzie pojedyncze - + Separated tools - Separated tools + Oddzielne narzędzia - + Both Obydwa - + Auto Automatycznie - + Diameter Średnica - + Radius Promień @@ -4652,12 +4653,12 @@ Widoczne będą obiekty tylko za płaszczyzną szkicu. Zastosuj do istniejących szkiców - + Unexpected C++ exception Nieoczekiwany wyjątek C++ - + Sketcher Szkicownik @@ -4665,55 +4666,55 @@ Widoczne będą obiekty tylko za płaszczyzną szkicu. SketcherGui::SketcherValidation - + No missing coincidences Brak brakujących wiązań - + No missing coincidences found Nie znaleziono niezbieżności - + Missing coincidences Brakujące wiązania - + %1 missing coincidences found Znaleziono %1 przypadki brakujących zbieżności - + No invalid constraints Brak nieprawidłowych wiązań - + No invalid constraints found Nie znaleziono nieprawidłowych wiązań - + Invalid constraints Wiązania nieprawidłowe - + Invalid constraints found Znaleziono nieprawidłowe wiązania - - - + + + Reversed external geometry Odwrócona geometria zewnętrzna - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4726,7 +4727,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Kliknij na przycisk "Zamień punkty końcowe na wiązania" aby ponownie przyporządkować punkty końcowe. Zrób to tylko raz na rysunkach utworzonych w programie FreeCAD, starszym niż w wersji 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4735,75 +4736,70 @@ However, no constraints linking to the endpoints were found. Nie znaleziono jednak żadnych powiązań z punktami końcowymi. - + No reversed external-geometry arcs were found. Nie znaleziono odwróconych łuków geometrii zewnętrznej. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Dokonano %1 zmian w wiązaniach łączących z punktami końcowymi odwróconych łuków. - - + + Constraint orientation locking Blokada orientacji wiązania - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Blokada orientacji została włączona i ponownie obliczona dla %1 wiązań. Wiązania zostały wymienione w widoku Raportu (menu Widok -> Panele -> Widok raportu). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Zamykanie orientacji zostało wyłączone dla więzów %1. Wiązania zostały wymienione w widoku Raportu (menu Widok -> Panele -> Widok raportu). Zauważ, że dla wszystkich przyszłych wiązań, zamykanie wciąż jest ustawione na WŁ. - - + + Delete constraints to external geom. Usuń wiązania do zewnętrznej geometrii. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Za chwilę usuniesz WSZYSTKIE wiązania, które dotyczą geometrii zewnętrznej. Jest to przydatne do ratowania rysunku z uszkodzonymi / zmienionymi linkami do geometrii zewnętrznej. Czy na pewno chcesz usunąć wiązania? - + All constraints that deal with external geometry were deleted. Usunięto wszystkie wiązania związane z geometrią zewnętrzną. - + No degenerated geometry Brak nieprawidłowej geometrii - + No degenerated geometry found Nie znaleziono nieprawidłowej geometrii - + Degenerated geometry Nieprawidłowa geometria - + %1 degenerated geometry found Znaleziono nieprawidłową geometrię %1 SketcherGui::TaskSketcherConstraints - - - Form - Formularz - Check to toggle filters @@ -4878,11 +4874,6 @@ Nie znaleziono jednak żadnych powiązań z punktami końcowymi. SketcherGui::TaskSketcherElements - - - Form - Formularz - Check to toggle filters @@ -5068,7 +5059,7 @@ Nie znaleziono jednak żadnych powiązań z punktami końcowymi. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Zaawansowane sterowanie solverem @@ -5361,8 +5352,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Przełączaj widoczność grzebienia krzywizny dla wszystkich łuków krzywej złożonej @@ -5370,8 +5361,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Zmniejsza wielokrotność wybranego węzła krzywej złożonej @@ -5379,8 +5370,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Przełączaj widoczność stopnia dla wszystkich odcinków krzywej złożonej @@ -5388,8 +5379,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Zwiększa wielokrotność wybranego węzła krzywej złożonej @@ -5397,8 +5388,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Przełączaj widoczność wielkości węzłów dla wszystkich odcinków krzywej złożonej @@ -5406,8 +5397,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Przełączaj pomiędzy pokazywaniem a ukrywaniem punktów kontrolnych dla wszystkich B-spline @@ -5415,8 +5406,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Przełącz widoczność ramki kontrolnej dla wszystkich krzywych złożonych @@ -5451,8 +5442,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Ustal średnicę okręgu lub łuku @@ -5460,7 +5451,7 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Określ promień / średnicę okręgu lub łuku @@ -5468,8 +5459,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Ustalenie promienia okręgu lub łuku @@ -5477,7 +5468,7 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Określ promień / średnicę okręgu lub łuku @@ -5494,8 +5485,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Utwórz łuk z punktów końcowych i punkt na łuku @@ -5503,8 +5494,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Tworzy koło w oparciu o 3 punkty na obręczy @@ -5512,8 +5503,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Utwórz łuk ze środka i punktów końcowych @@ -5521,8 +5512,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Utwórz łuk elipsy, wskazując środek, promień główny i punkty końcowe @@ -5530,8 +5521,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Utwórz łuk hiperboli wskazując środek, główny promień i punkty końcowe @@ -5539,8 +5530,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Utwórz łuk paraboli wskazując punkt centralny, wierzchołek i punkty końcowe @@ -5548,13 +5539,13 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateBSpline - + B-spline by control points Krzywa złożona przez punkty kontrolne - - + + Create a B-spline by control points Utwórz krzywą złożoną za pomocą punktów kontrolnych @@ -5562,8 +5553,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Tworzy koło za pomocą jego środka i punku na obręczy @@ -5571,8 +5562,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Elipsę przez periapsis, apoapsis i mniejszy promień @@ -5580,8 +5571,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Elipsę przez środek, główny promień i punkt @@ -5589,8 +5580,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateFillet - - + + Creates a radius between two lines Utwórz łuk pomiędzy dwiema liniami @@ -5598,8 +5589,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Stwórz siedmiokąt przez jego środek i przez jeden narożnik @@ -5607,8 +5598,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Utwórz sześciokąt, przez środek i jeden z rogów @@ -5616,7 +5607,7 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateOblong - + Create a rounded rectangle Utwórz zaokrąglony prostokąt @@ -5624,14 +5615,14 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Utwórz ośmiokąt, przez środek i jeden z rogów - - + + Create a regular polygon by its center and by one corner Utwórz regularny wielokąt przez podanie punktu środka i jednego narożnika @@ -5639,8 +5630,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Utwórz pięciokąt przez środek i jeden z rogów @@ -5648,8 +5639,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Zaokrąglenie zachowujące wiązania i punkt przecięcia @@ -5657,7 +5648,7 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateRectangle - + Create a rectangle Utwórz prostokąt @@ -5665,7 +5656,7 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateRectangle_Center - + Create a centered rectangle Utwórz wyśrodkowany prostokąt @@ -5673,8 +5664,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Utwórz kwadrat przez środek i jeden z rogów @@ -5682,8 +5673,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Utwórz trójkąt równoboczny przez jego środek i przez jeden narożnik @@ -5691,13 +5682,13 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Okresowa krzywa złożona przez punkty kontrolne - - + + Create a periodic B-spline by control points Utwórz okresową krzywą złożoną za pomocą punktów kontrolnych @@ -6330,36 +6321,36 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Błąd @@ -6379,45 +6370,45 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Ograniczenie ma nieprawidłowe informacje o indeksie i jest zniekształcone. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Nieprawidłowe wiązanie - - - + + + Failed to add arc Nie udało się dodać łuku - + Failed to add arc of ellipse Nie udało się dodać łuku elipsy - + Cannot create arc of hyperbola from invalid angles, try again! Nie można utworzyć łuku hiperboli z nieprawidłowych kątów, spróbuj ponownie! - + Cannot create arc of hyperbola Nie można utworzyć łuku hiperboli - + Cannot create arc of parabola Nie można utworzyć łuku paraboli @@ -6427,18 +6418,18 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Błąd podczas dodawania bieguna krzywej złożonej - + Error creating B-spline pole Błąd podczas tworzenia bieguna krzywej złożonej - - + + Error creating B-spline Błąd podczas tworzenia krzywej złożonej - + Error deleting last pole Błąd podczas usuwania ostatniego bieguna @@ -6448,49 +6439,49 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Nie można dodać punktu węzła - + Cannot add internal alignment points Nie można dodać wewnętrznych punktów wyrównania - + Error removing knot Błąd podczas usuwania węzła - + Failed to add carbon copy Nie udało się dodać funkcji kalki technicznej - - + + Failed to add circle Nie udało się dodać okręgu - + Failed to add an ellipse Nie udało się dodać elipsy - + Failed to extend edge Nie udało się rozszerzyć krawędzi - + Failed to add external geometry Nie udało się dodać geometrii zewnętrznej - + Failed to create fillet Nie udało się utworzyć zaokrąglenia - + Failed to add line Nie udało się dodać linii @@ -6500,7 +6491,7 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Nie udało się dodać punktu - + Failed to add polygon Nie udało się dodać wielokąta @@ -6510,27 +6501,27 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Nie udało się dodać prostopadłościanu - + Failed to add rounded rectangle Nie udało się dodać zaokrąglonego prostokąta - + Failed to add slot Nie udało się dodać rowka - + Failed to add edge Nie udało się dodać krawędzi - + Failed to trim edge Nie udało się przyciąć krawędzi - + Value Error @@ -6540,13 +6531,13 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Sketcher_CreateBSplineByInterpolation - + B-spline by knots Krzywa złożona przez węzły - - + + Create a B-spline by knots Utwórz krzywą złożoną przez węzły @@ -6554,13 +6545,13 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Okresowa krzywa złożona przez węzły - - + + Create a periodic B-spline by knots Utwórz okresową krzywą złożoną przez węzły @@ -6667,12 +6658,12 @@ Przytrzymaj CTRL, aby włączyć "Przyciąganie pod kątem". Kąt zaczyna się o CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Utwórz krzywą złożoną przez węzły - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Tworzy krzywą złożoną przez węzły, tzn. interpolację na rysunku. @@ -6680,12 +6671,12 @@ Przytrzymaj CTRL, aby włączyć "Przyciąganie pod kątem". Kąt zaczyna się o CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Utwórz okresową krzywą złożoną przez węzły - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Utwórz okresową krzywą złożoną przez węzły, tzn. interpolację na rysunku. @@ -6693,31 +6684,44 @@ Przytrzymaj CTRL, aby włączyć "Przyciąganie pod kątem". Kąt zaczyna się o CmdSketcherDimension - + Dimension Wymiar - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Ogranicz kontekstowo na podstawie dokonanego wyboru. +W zależności od dokonanego wyboru dostępnych może być kilka rodzajów wiązań. Można je przełączać za pomocą klawisza SHIFT. +Kliknięcie lewym przyciskiem myszy pustego miejsca spowoduje zatwierdzenie bieżącego wiązania. Kliknięcie prawym przyciskiem myszy lub naciśnięcie Esc spowoduje anulowanie. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Pokaż / ukryj okrąg pomocniczy dla łuków - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Wyświetla lub ukrywa okrąg pomocniczy dla wszystkich łuków + + + + CmdSketcherCompDimensionTools + + + Dimension + Wymiar + + + + Dimension tools. + Narzędzie wymiarowania. diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts index 0e67fa43d0..f76c449776 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Mostrar/ocultar a camada de informações da B-spline - + Show/hide B-spline degree Mostrar/ocultar grau de B-spline - + Show/hide B-spline control polygon Mostrar/ocultar polígono de controle de B-spline - + Show/hide B-spline curvature comb Mostrar/ocultar o pente de curvatura de B-spline - + Show/hide B-spline knot multiplicity Mostrar/ocultar multiplicidade de nós de B-spline - + Show/hide B-spline control point weight Mostrar/ocultar o peso dos pontos de controle da B-spline @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir arco ou círculo - + Constrain an arc or a circle Restringir um arco ou um círculo - + Constrain radius Restrição de raio - + Constrain diameter Restringir o diâmetro - + Constrain auto radius/diameter Restringir raio/diâmetro automáticos @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Criar arco - + Create an arc in the sketcher Criar um arco na bancada de esboços - + Center and end points Pontos de centro e extremidades - + End points and rim point Pontos de extremidade e ponto de borda @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Criar B-spline - + Create a B-spline in the sketch Criar uma B-spline no esboço @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Criar círculo - + Create a circle in the sketcher Criar um círculo no esboço - + Center and rim point Ponto de centro e borda - + 3 rim points 3 pontos de borda @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Criar uma cônica no esboço - + Ellipse by center, major radius, point Elipse pelo centro, raio maior, ponto - + Ellipse by periapsis, apoapsis, minor radius Elipse pelo periélio, apoapsis, menor raio - + Arc of ellipse by center, major radius, endpoints Arco de elipse pelo centro, raio principal, pontos de extremidade - + Arc of hyperbola by center, major radius, endpoints Arco de hipérbole pelo centro, raio maior, pontos de extremidade - + Arc of parabola by focus, vertex, endpoints Arco da parábola por foco, vértice, pontos de extremidade @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Criar filete - + Create a fillet between two lines Crie um filete entre duas linhas - + Sketch fillet Filete de esboço - + Constraint-preserving sketch fillet Filete de esboço com preservação de restrições @@ -299,17 +299,17 @@ Criar perfis retangulares no seu esboço - + Rectangle Retângulo - + Centered rectangle Retângulo centralizado - + Rounded rectangle Retângulo arredondado @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Criar polígono regular - + Create a regular polygon in the sketcher Criar um polígono regular no esboço - + Triangle Triângulo - + Square Quadrado - + Pentagon Pentágono - + Hexagon Hexágono - + Heptagon Heptágono - + Octagon Octógono - + Regular polygon Polígono regular @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modificar a multiplicidade de nós - + Modifies the multiplicity of the selected knot of a B-spline Modifica a multiplicidade do nós selecionados de uma B-spline - + Increase knot multiplicity Aumentar a multiplicidade de nós - + Decrease knot multiplicity Diminuir a multiplicidade de nós @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ângulo de restrição - + Fix the angle of a line or the angle between two lines Fixar o ângulo de uma linha ou o ângulo entre duas linhas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restrição de bloqueio - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restrição de coincidência - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir o diâmetro - + Fix the diameter of a circle or an arc Corrigir o diâmetro de um círculo ou arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restrição de distância - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Restrição de distância horizontal - + Fix the horizontal distance between two points or line ends Fixar a distância horizontal entre dois pontos ou extremidades de linha @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restringir a distância vertical - + Fix the vertical distance between two points or line ends Fixar a distância vertical entre dois pontos ou extremidades de linha @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restrição igual - + Create an equality constraint between two lines or between circles and arcs Criar uma restrição de igualdade entre duas linhas ou círculos e arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Criar uma restrição horizontal sobre o item selecionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restrição de bloqueio - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restrição paralela - + Create a parallel constraint between two lines Criar uma restrição paralela entre duas linhas @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restrição perpendicular - + Create a perpendicular constraint between two lines Criar uma restrição perpendicular entre duas linhas @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir um ponto sobre um objeto - + Fix a point onto an object Fixar um ponto sobre um objeto @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restringir raio/diâmetro automáticos - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Restrição de raio ou peso - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Bloquea o raio de um círculo ou arco ou o peso de um polo de um B-Spline @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restrição simétrica - + Create a symmetry constraint between two points with respect to a line or a third point Criar uma restrição de simetria entre dois pontos @@ -615,12 +615,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherConstrainTangent - + Constrain tangent Restrição tangente - + Create a tangent constraint between two entities Criar uma restrição tangente entre duas entidades @@ -628,12 +628,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Criar uma restrição vertical sobre o item selecionado @@ -641,12 +641,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherConvertToNURBS - + Convert geometry to B-spline Converter geometria para B-spline - + Converts the selected geometry to a B-spline Converte a geometria selecionada em uma B-spline @@ -667,12 +667,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreate3PointArc - + Create arc by three points Criar um arco a partir de três pontos - + Create an arc by its end points and a point along the arc Criar um arco a partir de seus pontos de extremidade e um ponto ao longo do arco @@ -680,12 +680,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreate3PointCircle - + Create circle by three points Criar um círculo a partir de três pontos - + Create a circle by 3 perimeter points Criar um círculo a partir de 3 pontos do perímetro @@ -693,12 +693,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateArc - + Create arc by center Criar um arco pelo centro - + Create an arc by its center and by its end points Criar um arco a partir do seu centro e por seus pontos de extremidade @@ -706,12 +706,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Criar um arco de elipse no esboço @@ -719,12 +719,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Cria um arco de hipérbole no esboço @@ -732,12 +732,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Criar um arco de parábola no Esboço @@ -745,12 +745,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateBSpline - + Create B-spline Criar B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -758,12 +758,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateCircle - + Create circle Criar círculo - + Create a circle in the sketch Criar um círculo no esboço @@ -771,12 +771,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Criar elipse por 3 pontos - + Create an ellipse by 3 points in the sketch Criar uma elipse por 3 pontos no esboço @@ -784,12 +784,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateEllipseByCenter - + Create ellipse by center Criar elipse pelo centro - + Create an ellipse by center in the sketch Criar uma elipse pelo centro no esboço @@ -797,12 +797,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateFillet - + Create fillet Criar filete - + Create a fillet between two lines or at a coincident point Criar um arredondamento entre duas linhas ou em um ponto de coincidência @@ -810,12 +810,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateHeptagon - + Create heptagon Criar heptágono - + Create a heptagon in the sketch Criar um heptágono no esboço @@ -823,12 +823,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateHexagon - + Create hexagon Criar hexágono - + Create a hexagon in the sketch Criar um hexágono no esboço @@ -862,12 +862,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateOctagon - + Create octagon Criar octógono - + Create an octagon in the sketch Criar um octógono no esboço @@ -875,12 +875,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreatePentagon - + Create pentagon Criar pentágono - + Create a pentagon in the sketch Criar um pentágono no esboço @@ -888,12 +888,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Criar B-spline periódica - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -901,12 +901,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreatePoint - + Create point Criar ponto - + Create a point in the sketch Criar um ponto no esboço @@ -914,12 +914,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreatePointFillet - + Create corner-preserving fillet Criar filete de preservação de canto - + Fillet that preserves intersection point and most constraints Filete que preserva o ponto de interseção e a maioria das restrições @@ -927,12 +927,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreatePolyline - + Create polyline Criar polígono - + Create a polyline in the sketch. 'M' Key cycles behaviour Criar um polígono no esboço. A tecla 'M' alterna os modos de desenho @@ -966,12 +966,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateRegularPolygon - + Create regular polygon Criar polígono regular - + Create a regular polygon in the sketch Criar um polígono regular no esboço @@ -979,12 +979,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateSlot - + Create slot Criar uma fresta - + Create a slot in the sketch Criar uma fresta no esboço @@ -992,12 +992,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateSquare - + Create square Criar quadrado - + Create a square in the sketch Criar um quadrado no esboço @@ -1005,12 +1005,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherCreateTriangle - + Create equilateral triangle Criar triângulo equilátero - + Create an equilateral triangle in the sketch Criar um triângulo equilátero no esboço @@ -1018,12 +1018,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherDecreaseDegree - + Decrease B-spline degree Diminuir grau B-spline - + Decreases the degree of the B-spline Diminui o grau de uma B-spline @@ -1031,12 +1031,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Diminuir a multiplicidade de nós - + Decreases the multiplicity of the selected knot of a B-spline Diminui a multiplicidade do nó selecionado de uma B-spline @@ -1083,12 +1083,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherExtend - + Extend edge Prolongar aresta - + Extend an edge with respect to the picked position Estende uma aresta em relação à posição escolhida @@ -1096,12 +1096,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Criar uma aresta ligada a uma geometria externa @@ -1109,12 +1109,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherIncreaseDegree - + Increase B-spline degree Aumentar grau B-spline - + Increases the degree of the B-spline Aumenta o grau da B-spline @@ -1122,12 +1122,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Aumentar a multiplicidade de nós - + Increases the multiplicity of the selected knot of a B-spline Aumenta a multiplicidade do nó selecionado de uma B-spline @@ -1135,12 +1135,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1148,12 +1148,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1440,12 +1440,12 @@ Isto irá limpar a propriedade 'Suporte', se houver. CmdSketcherSplit - + Split edge Dividir aresta - + Splits an edge into two while preserving constraints Divide uma aresta em duas preservando as restrições @@ -1466,12 +1466,12 @@ Isto irá limpar a propriedade 'Suporte', se houver. CmdSketcherSwitchVirtualSpace - + Switch virtual space Alternar espaço virtual - + Switches the selected constraints or the view to the other virtual space Alterna as restrições selecionadas para um outro espaço virtual @@ -1492,12 +1492,12 @@ Isto irá limpar a propriedade 'Suporte', se houver. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Ativar/desativar restrição - + Activates or deactivates the selected constraints Ativa ou desativa as restrições selecionadas @@ -1518,12 +1518,12 @@ Isto irá limpar a propriedade 'Suporte', se houver. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ativar/desativar restrição atuante ou de referência - + Set the toolbar, or the selected constraints, into driving or reference mode Colocar a barra de ferramentas, ou as restrições selecionadas, @@ -1533,12 +1533,12 @@ no modo atuante ou de referência CmdSketcherTrimming - + Trim edge Recortar aresta - + Trim an edge with respect to the picked position Aparar uma aresta em relação a posição escolhida @@ -1597,369 +1597,370 @@ restrições inválidas, geometria corrompida, etc. Command - - + + Add horizontal constraint Adicionar restrição horizontal - - - + + + Add horizontal alignment Adicionar alinhamento horizontal - - + + Add vertical constraint Adicionar restrição vertical - + Add vertical alignment Adicionar alinhamento vertical - + Add 'Lock' constraint Adicionar restrição 'Travar' - + Add relative 'Lock' constraint Adicionar restrição 'Travar' relativa - + Add fixed constraint Adicionar restrição fixa - + Add 'Block' constraint Adicionar restrição 'Bloquear' - + Add block constraint Adicionar restrição 'Bloquear' - - - + + + Add coincident constraint Adicionar restrição coincidente - - + + Add distance from horizontal axis constraint Adiciona restrição na distância ao eixo horizontal - - + + Add distance from vertical axis constraint Adiciona restrição na distância ao eixo vertical - - + + Add point to point distance constraint Adiciona restrição na distância ponto a ponto - - - + + + Add point to line Distance constraint Adicionar restrição na distância entre ponto e linha - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Adiciona restrição de comprimento - - + + Dimension Dimensão - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Adiciona restrição tipo 'ponto-no-objeto' - - + + Add point to point horizontal distance constraint Adicionar restrição de distância horizontal ponto a ponto - + Add fixed x-coordinate constraint Adiciona restrição de coordenada x fixa - - + + Add point to point vertical distance constraint Adiciona restrição de distância vertical ponto a ponto - + Add fixed y-coordinate constraint Adiciona restrição de coordenada y fixa - - + + Add parallel constraint Adiciona restrição paralela - - - - - - - + + + + + + + Add perpendicular constraint Adiciona restrição perpendicular - + Add perpendicularity constraint Adicionar restrição de perpendicularidade - + Swap coincident+tangency with ptp tangency Trocar coincidência+tangência por tangência ponto-a-ponto - + Swap PointOnObject+tangency with point to curve tangency Trocar PointOnObject+tangência por tangência de ponto para curva - - - - - - - + + + + + + + Add tangent constraint Adiciona restrição tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Adiciona ponto de tangência - - - - + + + + Add radius constraint Adicionar restrição de raio - - - - + + + + Add diameter constraint Adicionar restrição de diâmetro - - - - + + + + Add radiam constraint Adicionar restrição de raio - - - - - - + + + + + + Add angle constraint Adicionar restrição de ângulo - - + + Add equality constraint Adicionar restrição de igualdade - - - - - + + + + + Add symmetric constraint Adicionar restrição simétrica - + Add Snell's law constraint Adicionar restrição lei de Snell - + Toggle constraint to driving/reference Alternar o tipo da restrição entre motriz ou referência - + Activate/Deactivate constraint Ativar/desativar restrição @@ -2019,44 +2020,44 @@ restrições inválidas, geometria corrompida, etc. Adicionar uma caixa de esboço centralizada - + Add rounded rectangle Adicionar retângulo abaulado - + Add line to sketch wire Adicionar linha ao arame do esboço - + Add arc to sketch wire Adicionar arco ao arame do esboço - - + + Add sketch arc Adicionar esboço de arco - - + + Add sketch circle Adicionar esboço de círculo - + Add sketch ellipse Adicionar esboço de elipse - + Add sketch arc of ellipse Adicionar esboço de arco de elipse - + Add sketch arc of hyperbola Adicionar esboço de arco de hipérbole @@ -2076,33 +2077,33 @@ restrições inválidas, geometria corrompida, etc. Adicionar ponto - - + + Create fillet Criar filete - + Trim edge Recortar aresta - + Extend edge Prolongar aresta - + Split edge Dividir aresta - + Add external geometry Adicionar geometria externa - + Add slot Adicionar fresta @@ -2112,37 +2113,37 @@ restrições inválidas, geometria corrompida, etc. Adicionar hexágono - + Convert to NURBS Converter para NURBS - + Increase spline degree Aumentar grau de spline - + Decrease spline degree Diminuir grau de spline - + Increase knot multiplicity Aumentar a multiplicidade de nós - + Decrease knot multiplicity Diminuir a multiplicidade de nós - + Insert knot Insert knot - + Join Curves Join Curves @@ -2182,12 +2183,12 @@ restrições inválidas, geometria corrompida, etc. Remover Alinhamento dos Eixos - + Toggle constraints to the other virtual space Enviar restrições para o outro espaço virtual - + @@ -2195,7 +2196,7 @@ restrições inválidas, geometria corrompida, etc. Atualizar espaço virtual das restrições - + Add auto constraints Adicionar restrições automáticas @@ -2235,7 +2236,7 @@ restrições inválidas, geometria corrompida, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2251,37 +2252,37 @@ restrições inválidas, geometria corrompida, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Erro de restrição automática: esboço insolúvel ao aplicar restrições coincidentes. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Erro de restrição automática: esboço insolúvel ao aplicar restrições verticais/horizontais. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Erro de restrição automática: esboço insolúvel ao aplicar restrições de igualdade. - + Autoconstrain error: Unsolvable sketch without constraints. Erro de restrição automática: esboço insolúvel sem restrições. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Erro de restrição automática: esboço irresolvível após a aplicação de restrições horizontais e verticais. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Erro de restrição automática: esboço insolúvel após a aplicação de restrições de ponto-em-ponto. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Erro de restrição automática: esboço insolúvel após a aplicação de restrições de igualdade. @@ -2406,143 +2407,143 @@ restrições inválidas, geometria corrompida, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ restrições inválidas, geometria corrompida, etc. - - - + + + Wrong selection Seleção errada @@ -2581,329 +2582,329 @@ restrições inválidas, geometria corrompida, etc. Restrição de dimensão - + Cannot add a constraint between two external geometries. Não é possível adicionar uma restrição entre duas geometrias externas. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Substituição de restrição do Esboço - + Keep notifying me of constraint substitutions Continuar me avisando sobre substituições de restrições - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Selecione uma aresta do esboço. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restrição impossível - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Restrição dupla - - - - - + + + + + The selected edge already has a horizontal constraint! A aresta selecionada já tem uma restrição horizontal! - - - + + + The selected edge already has a vertical constraint! A aresta selecionada já tem uma restrição vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! A aresta selecionada já possui uma restrição de Bloqueio! - + The selected item(s) can't accept a horizontal constraint! Os itens selecionados não podem aceitar uma restrição horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Há mais de um ponto fixo selecionado. Selecione no máximo um ponto fixo! - + The selected item(s) can't accept a vertical constraint! Os itens selecionados não podem aceitar uma restrição vertical! - - - + + + Select vertices from the sketch. Selecione vértices do esboço. - + Select one vertex from the sketch other than the origin. Selecione um vértice do esboço que não seja a origem. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecione somente os vértices do esboço. O último vértice selecionado pode ser a origem. - + Wrong solver status Erro no status do calculador - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Uma restrição de bloqueio não pode ser adicionada se o esboço não estiver resolvido ou se existirem restrições redundantes e/ou conflitantes. - + Select one edge from the sketch. Selecione uma aresta do esboço. - + Select only edges from the sketch. Selecione somente arestas do esboço. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Erro - + Unexpected error. More information may be available in the Report View. Erro inesperado. Mais informações podem estar disponíveis na visualização do relatório. - + Endpoint to endpoint tangency was applied instead. Uma tangência de ponto a ponto de extremidade foi aplicado em vez disso. - + Select two or more points from the sketch. Selecione dois ou mais pontos no esboço. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Selecione exatamente uma linha ou um ponto e uma linha ou dois pontos no esboço. - + Cannot add a length constraint on an axis! Não é possível adicionar uma restrição de comprimento em um eixo! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Uma tangência de ponto de extremidade a aresta foi aplicada em vez disso. - - - - - - - + + + + + + + Select the right things from the sketch. Selecione as coisas corretas no esboço. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nenhum dos pontos selecionados foi restrito sobre as respectivas curvas, porque elas são partes do mesmo elemento, porque são ambos geometria externa, ou porque a aresta não é elegível. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nenhum dos pontos selecionados foi restringido para as respectivas curvas, eles são partes do mesmo elemento, ou ambos são geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Selecione exatamente uma linha ou até dois pontos no esboço. - + Cannot add a horizontal length constraint on an axis! Não é possível adicionar uma restrição de comprimento horizontal em um eixo! - + Cannot add a fixed x-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-x fixa no ponto de origem! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Não é possível adicionar uma restrição de comprimento vertical em um eixo! - + Cannot add a fixed y-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-y fixa no ponto de origem! - + Select two or more lines from the sketch. Selecione duas ou mais linhas no esboço. - - + + Select at least two lines from the sketch. Selecione pelo menos duas linhas no esboço. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2914,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. perpendicular constraint Selecione alguma geometria do esboço. - - + + Cannot add a perpendicularity constraint at an unconnected point! Não é possível adicionar uma restrição de perpendicularidade em um ponto não conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular à aresta de Bspline ainda não está suportado. - - + + One of the selected edges should be a line. Uma das arestas selecionadas deve ser uma linha. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uma tangência de ponto a ponto foi aplicada. A restrição de coincidência foi excluída. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Uma tangência de ponto de extremidade a aresta foi aplicada. A restrição de ponto no objeto foi excluída. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2958,277 +2959,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. tangent constraint Selecione alguma geometria do esboço. - - - + + + Cannot add a tangency constraint at an unconnected point! Não é possível adicionar uma restrição de tangência em um ponto não conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Número errado de objetos selecionados! - - + + With 3 objects, there must be 2 curves and 1 point. Com 3 objetos, deve haver 2 curvas e 1 ponto. - - - + + + Tangency to B-spline edge currently unsupported. Tangência à aresta de Bspline ainda não está suportado. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selecione um ou mais arcos ou círculos no esboço. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selecione somente um ou mais polos B-Spline ou apenas um ou mais arcos ou círculos do esboço, mas não misturados. - - - + + + Constraint only applies to arcs or circles. Restrição aplicável somente em arcos ou círculos. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selecione uma ou duas linhas no esboço. Ou selecione um ponto e duas arestas. - - + + Parallel lines Linhas paralelas - - + + An angle constraint cannot be set for two parallel lines. Uma restrição de ângulo não pode ser aplicada em duas linhas paralelas. - + Cannot add an angle constraint on an axis! Não é possível adicionar uma restrição de ângulo em um eixo! - + Select two edges from the sketch. Selecione duas arestas no esboço. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Igualdade para aresta de Bspline ainda não está suportada. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selecione dois pontos e uma linha de simetria, dois pontos e um ponto de simetria ou uma linha e um ponto de simetria no esboço. - - + + Cannot add a symmetry constraint between a line and its end points. Não é possível adicionar uma restrição de simetria entre uma linha e seus pontos finais. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Não é possível adicionar uma restrição de simetria entre uma linha e seus pontos finais! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selecione dois pontos finais de linhas para agir como raios e uma aresta que representa um limite. O primeiro ponto selecionado corresponde ao índice n1, o segundo ao n2, e o valor de datum define a proporção n2/n1. - + Selected objects are not just geometry from one sketch. Objetos selecionados não são apenas geometria de um esboço só. - + Cannot create constraint with external geometry only. Não é possível criar restrições somente com geometria externa. - + Incompatible geometry is selected. Geometria incompatível selecionada. - + SnellsLaw on B-spline edge is currently unsupported. Restrições SnellsLaw em arestas de Bspline ainda não são suportadas. - - - - - + + + + + Select constraints from the sketch. Selecione restrições do esboço. - - - + + + Select constraint(s) from the sketch. Selecione restrições do desenho. - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error Erro de Kernel CAD - + None of the selected elements is an edge. Nenhum dos elementos selecionados é uma aresta. - - + + At least one of the selected objects was not a B-Spline and was ignored. Pelo menos um dos objetos selecionados não era um B-Spline e foi ignorado. - - + + The selection comprises more than one item. Please select just one knot. A seleção engloba mais de um item. Por favor, selecione apenas um nó. - - + + Input Error Erro de entrada - - + + None of the selected elements is a knot of a B-spline Nenhum dos elementos selecionados é um nó de uma B-spline - - + + Selection is empty A seleção está vazia - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3308,17 +3309,17 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Erro de Valor @@ -3632,12 +3633,12 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois Comprimento: - + Refractive index ratio Relação de índice de refração - + Ratio n2/n1: Relação n2/n1: @@ -3917,8 +3918,8 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois SketcherGui::PropertyConstraintListItem - - + + Unnamed Sem nome @@ -4152,15 +4153,15 @@ Necessita sair e reentrar no modo de edição para ter efeito. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Selecione o tipo de restrições de dimensionamento para a sua barra de ferramentas: +'Ferramenta única': Uma única ferramenta para todas as restrições de dimensionamento na barra de ferramentas: Distância, Distância X / Y, Ângulo, Raio. (Outros em suspensão) +'Ferramentas separadas': Ferramentas individuais para cada restrição de dimensionamento. +'Ambos': Você terá tanto a ferramenta de 'dimensão' quanto as ferramentas separadas. +Essa configuração é apenas para a barra de ferramentas. Seja o que for que você escolher, todas as ferramentas estão sempre disponíveis no menu e através de atalhos. @@ -4179,32 +4180,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Ambos - + Auto Auto - + Diameter Diâmetro - + Radius Raio @@ -4653,12 +4654,12 @@ Em seguida, os objetos são visíveis somente por trás do plano de esboço.Aplicar aos esboços existentes - + Unexpected C++ exception Exceção inesperada de C++ - + Sketcher Esboço @@ -4666,55 +4667,55 @@ Em seguida, os objetos são visíveis somente por trás do plano de esboço. SketcherGui::SketcherValidation - + No missing coincidences Nenhum coincidência faltante - + No missing coincidences found Nenhuma coincidência faltante foi encontrada - + Missing coincidences Coincidências faltantes - + %1 missing coincidences found %1 coincidências faltantes encontradas - + No invalid constraints Nenhuma restrição inválida - + No invalid constraints found Nenhuma restrição inválida encontrada - + Invalid constraints Restrições inválidas - + Invalid constraints found Restrições inválidas encontradas - - - + + + Reversed external geometry Geometria externa invertida - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4727,7 +4728,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Clique em "Trocar pontos de extremidade em restrições" para reatribuir os pontos de extremidade. Faça isto apenas uma vez em esboços criados com versões de FreeCAD anteriores à 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4736,75 +4737,70 @@ However, no constraints linking to the endpoints were found. No entanto, nenhuma restrição foi encontrada nos pontos de extremidade. - + No reversed external-geometry arcs were found. Nenhum arco invertido foi encontrado na geometria externa. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 alterações foram feitas nas restrições ligadas a pontos de extremidade de arcos invertidos. - - + + Constraint orientation locking Restrição de bloqueio de orientação - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). O bloqueio de orientação foi habilitado e recalculado para %1 restrições. Essas restrições estão indicadas no relatório (menu Vista -> Painéis -> Relatório). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. O bloqueio de orientação foi desativado para %1 restrições. Essas restrições estão indicadas no relatório (menu Vista -> Painéis -> Relatório). Note que para todas as futuras restrições, o bloqueio permanece ativado por padrão. - - + + Delete constraints to external geom. Excluir restrições para geometria externa - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Você está prestes a excluir todas as restrições conectadas com geometria externa. Isso é útil para resgatar um esboço com links para geometria externa quebrados ou alterados. Tem certeza que deseja excluir essas restrições? - + All constraints that deal with external geometry were deleted. Todas as restrições conectadas com geometria externa foram eliminadas. - + No degenerated geometry Nenhuma geometria corrompida - + No degenerated geometry found Nenhuma geometria corrompida encontrada - + Degenerated geometry Geometria corrompida - + %1 degenerated geometry found %1 geometrias corrompidas encontradas SketcherGui::TaskSketcherConstraints - - - Form - Formulário - Check to toggle filters @@ -4879,11 +4875,6 @@ No entanto, nenhuma restrição foi encontrada nos pontos de extremidade. SketcherGui::TaskSketcherElements - - - Form - Formulário - Check to toggle filters @@ -5069,7 +5060,7 @@ No entanto, nenhuma restrição foi encontrada nos pontos de extremidade. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Controle avançado do Solver @@ -5360,8 +5351,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Alterna entre mostrar e ocultar o pente de curvatura para todas as B-splines @@ -5369,8 +5360,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Diminui a multiplicidade do nó selecionado de uma B-spline @@ -5378,8 +5369,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Alterna entre mostrar e ocultar o grau para todas os B-splines @@ -5387,8 +5378,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Aumenta a multiplicidade do nó selecionado de uma B-spline @@ -5396,8 +5387,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Alterna entre mostrar e ocultar a multiplicidade de nós para todas as B-splines @@ -5405,8 +5396,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Alterna entre mostrar e ocultar o peso dos pontos de controle para todas as B-splines @@ -5414,8 +5405,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Alterna entre mostrar e ocultar os polígonos de controle para todas as B-splines @@ -5450,8 +5441,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Corrigir o diâmetro de um círculo ou arco @@ -5459,7 +5450,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Corrigir o raio / diâmetro de um círculo ou um arco @@ -5467,8 +5458,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixar o raio de um círculo ou um arco @@ -5476,7 +5467,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Corrigir o raio / diâmetro de um círculo ou um arco @@ -5493,8 +5484,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Criar um arco a partir de seus pontos de extremidade e um ponto ao longo do arco @@ -5502,8 +5493,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Criar um círculo a partir de 3 pontos de borda @@ -5511,8 +5502,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Criar um arco a partir do seu centro e por seus pontos de extremidade @@ -5520,8 +5511,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Criar um arco de elipse pelo centro, raio principal e pontos de extremidade @@ -5529,8 +5520,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Criar um arco de hipérbole pelo centro, raio principal e pontos de extremidade @@ -5538,8 +5529,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Criar um arco de parábola pelo foco, vértice e pontos de extremidade @@ -5547,13 +5538,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline por pontos de controle - - + + Create a B-spline by control points Criar uma B-spline por pontos de controle @@ -5561,8 +5552,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Criar um círculo a partir do seu centro e por um ponto de borda @@ -5570,8 +5561,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Criar uma elipse por periapsis apoapsis e menor raio @@ -5579,8 +5570,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Criar uma elipse pelo centro, raio maior e ponto @@ -5588,8 +5579,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Cria um raio entre duas linhas @@ -5597,8 +5588,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Criar um heptágono pelo seu centro e por um canto @@ -5606,8 +5597,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Criar um hexágono por seu centro e um canto @@ -5615,7 +5606,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Criar um retângulo arredondado @@ -5623,14 +5614,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Criar um octógono pelo seu centro e por um canto - - + + Create a regular polygon by its center and by one corner Criar um polígono regular pelo seu centro e por um vértice @@ -5638,8 +5629,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Criar um pentágono pelo seu centro e por um canto @@ -5647,8 +5638,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Filete que preserva restrições e ponto de interseção @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Criar um retângulo @@ -5664,7 +5655,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Criar um retângulo centralizado @@ -5672,8 +5663,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Criar um quadrado pelo seu centro e por um canto @@ -5681,8 +5672,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Criar um triângulo equilátero, pelo seu centro e por um canto @@ -5690,13 +5681,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periódica por pontos de controle - - + + Create a periodic B-spline by control points Criar uma B-spline periódica por pontos de controle @@ -6328,36 +6319,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Erro @@ -6377,45 +6368,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Restrição inválida - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6425,18 +6416,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6446,49 +6437,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Não é possível adicionar ponto de nó - + Cannot add internal alignment points Não é possível adicionar pontos de alinhamento internos - + Error removing knot Erro ao remover nó - + Failed to add carbon copy Falha ao adicionar cópia carbono - - + + Failed to add circle Falha ao adicionar círculo - + Failed to add an ellipse Falha ao adicionar uma elipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Falha ao adicionar geometria externa - + Failed to create fillet Failed to create fillet - + Failed to add line Falha ao adicionar linha @@ -6498,7 +6489,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Falha ao adicionar ponto - + Failed to add polygon Falha ao adicionar polígono @@ -6508,27 +6499,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Falha ao adicionar caixa - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Falha ao adicionar aresta - + Failed to trim edge Falha ao aparar aresta - + Value Error @@ -6538,13 +6529,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6552,13 +6543,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6664,12 +6655,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6677,12 +6668,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6690,12 +6681,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensão - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6707,14 +6698,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimensão + + + + Dimension tools. + Ferramentas de dimensão. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts index 3192b0a984..ebc539ae51 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Mostrar/ocultar a camada de informações da B-spline - + Show/hide B-spline degree Show/hide B-spline degree - + Show/hide B-spline control polygon Show/hide B-spline control polygon - + Show/hide B-spline curvature comb Show/hide B-spline curvature comb - + Show/hide B-spline knot multiplicity Show/hide B-spline knot multiplicity - + Show/hide B-spline control point weight Show/hide B-spline control point weight @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir o arco ou círculo - + Constrain an arc or a circle Restringir um arco ou um círculo - + Constrain radius Restringir o raio - + Constrain diameter Restringir o diâmetro - + Constrain auto radius/diameter Restringir raio/diâmetro automático @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Criar Arco - + Create an arc in the sketcher Criar um arco na bancada esboço (Sketcher) - + Center and end points Pontos central e final - + End points and rim point Pontos de extremidade e ponto de borda @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Criar B-spline - + Create a B-spline in the sketch Criar uma B-spline no esboço @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Criar Círculo - + Create a circle in the sketcher Criar um círculo na bancada esboço sketcher - + Center and rim point Ponto do centro e borda - + 3 rim points 3 pontos na circunferência @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Criar uma curva cónica no esboço - + Ellipse by center, major radius, point Elipse pelo centro, raio maior, ponto - + Ellipse by periapsis, apoapsis, minor radius Ellipse by periapsis, apoapsis, minor radius - + Arc of ellipse by center, major radius, endpoints Arco da elipse pelo centro, raio maior, extremidades - + Arc of hyperbola by center, major radius, endpoints Arco de hipérbole pelo centro, raio maior, pontos de extremidade - + Arc of parabola by focus, vertex, endpoints Arco da parábola por foco, vértice, pontos de extremidade @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Criar Boleado (fillet) - + Create a fillet between two lines Criar um boleado entre duas linhas - + Sketch fillet Sketch fillet - + Constraint-preserving sketch fillet Constraint-preserving sketch fillet @@ -299,17 +299,17 @@ Cria um retângulo no esboço - + Rectangle Retângulo - + Centered rectangle Retângulo centrado - + Rounded rectangle Retângulo arredondado @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Criar polígono regular - + Create a regular polygon in the sketcher Criar um polígono regular na bancada esboço (sketcher) - + Triangle Triângulo - + Square Quadrado - + Pentagon Pentágono - + Hexagon Hexágono - + Heptagon Heptágono - + Octagon Octógono - + Regular polygon Polígono regular @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modificar a multiplicidade de nós - + Modifies the multiplicity of the selected knot of a B-spline Modifica a multiplicidade do nós selecionados de uma B-spline - + Increase knot multiplicity Aumentar a multiplicidade de nós - + Decrease knot multiplicity Diminuir a multiplicidade de nós @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restringir o ângulo - + Fix the angle of a line or the angle between two lines Corrigir o ângulo de uma linha ou o ângulo entre duas linhas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restringir coincidentes - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir o diâmetro - + Fix the diameter of a circle or an arc Fixar o diâmetro de um círculo ou arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restringir distância - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Corrigir a distância horizontal entre dois pontos ou extremidades de linha @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Corrigir a distância vertical entre dois pontos ou extremidades de linha @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restringir igualdade - + Create an equality constraint between two lines or between circles and arcs Criar uma restrição de igualdade entre duas linhas ou entre círculos e arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Criar uma restrição horizontal no item selecionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restrição de bloqueio - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restringir paralelo - + Create a parallel constraint between two lines Criar uma restrição paralela entre duas linhas @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restringir perpendicular - + Create a perpendicular constraint between two lines Criar uma restrição perpendicular entre duas linhas @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir um ponto sobre um objeto - + Fix a point onto an object Fixar um ponto num objeto @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restringir raio/diâmetro automático - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Restringir raio ou peso - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Restringir refração (lei de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restringir simetria - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -615,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Restringir a tangente - + Create a tangent constraint between two entities Criar uma restrição de tangência entre duas entidades @@ -628,12 +628,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Criar uma restrição vertical no item selecionado @@ -641,12 +641,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convert geometry to B-spline - + Converts the selected geometry to a B-spline Converts the selected geometry to a B-spline @@ -667,12 +667,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Criar um arco baseado em três pontos - + Create an arc by its end points and a point along the arc Criar um arco a partir dos seus pontos de extremidade e de um ponto ao longo do arco @@ -680,12 +680,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Criar um círculo baseado em três pontos - + Create a circle by 3 perimeter points Criar um arco baseado em três pontos do perímetro @@ -693,12 +693,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Criar um arco baseado no centro - + Create an arc by its center and by its end points Criar um arco a partir do seu centro e por seus pontos de extremidade @@ -706,12 +706,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Criar um arco de elipse no esboço @@ -719,12 +719,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Criar um arco de hipérbole no esboço @@ -732,12 +732,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Criar um arco de parábola no Esboço @@ -745,12 +745,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Criar B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -758,12 +758,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Criar Círculo - + Create a circle in the sketch Criar um círculo no esboço @@ -771,12 +771,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Criar elipse com 3 pontos - + Create an ellipse by 3 points in the sketch Criar uma elipse com 3 pontos no esboço @@ -784,12 +784,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Criar elipse pelo centro - + Create an ellipse by center in the sketch Criar uma elipse pelo centro no esboço @@ -797,12 +797,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Criar Boleado (fillet) - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -810,12 +810,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Criar heptágono - + Create a heptagon in the sketch Criar um heptágono no esboço @@ -823,12 +823,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Criar hexágono - + Create a hexagon in the sketch Criar um hexágono no esboço @@ -862,12 +862,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Criar octógono - + Create an octagon in the sketch Criar um octógono no esboço @@ -875,12 +875,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Criar pentágono - + Create a pentagon in the sketch Criar um pentágono no esboço @@ -888,12 +888,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Criar B-spline periódica - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -901,12 +901,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Criar Ponto - + Create a point in the sketch Criar um ponto no esboço @@ -914,12 +914,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Create corner-preserving fillet - + Fillet that preserves intersection point and most constraints Fillet that preserves intersection point and most constraints @@ -927,12 +927,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Criar polilinha - + Create a polyline in the sketch. 'M' Key cycles behaviour Criar uma polilinha no esboço. Tecla 'M' alterna o comportamento @@ -966,12 +966,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Criar polígono regular - + Create a regular polygon in the sketch Criar um polígono regular no esboço @@ -979,12 +979,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Criar uma ranhura (slot) - + Create a slot in the sketch Criar uma ranhura (slot) no esboço @@ -992,12 +992,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Criar quadrado - + Create a square in the sketch Criar um quadrado no esboço @@ -1005,12 +1005,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Criar triângulo equilátero - + Create an equilateral triangle in the sketch Criar um triângulo equilátero no esboço @@ -1018,12 +1018,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Decrease B-spline degree - + Decreases the degree of the B-spline Decreases the degree of the B-spline @@ -1031,12 +1031,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Diminuir a multiplicidade de nós - + Decreases the multiplicity of the selected knot of a B-spline Diminui a multiplicidade do nó selecionado de uma B-spline @@ -1083,12 +1083,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Prolongar aresta - + Extend an edge with respect to the picked position Estende uma aresta em relação à posição escolhida @@ -1096,12 +1096,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Criar uma aresta ligada a uma geometria externa @@ -1109,12 +1109,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Increase B-spline degree - + Increases the degree of the B-spline Aumenta o grau da B-spline @@ -1122,12 +1122,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Aumentar a multiplicidade de nós - + Increases the multiplicity of the selected knot of a B-spline Aumenta a multiplicidade do nó selecionado de uma B-spline @@ -1135,12 +1135,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1148,12 +1148,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1440,12 +1440,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Split edge - + Splits an edge into two while preserving constraints Splits an edge into two while preserving constraints @@ -1466,12 +1466,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Alternar espaço virtual - + Switches the selected constraints or the view to the other virtual space Alterna as restrições selecionadas para um outro espaço virtual @@ -1492,12 +1492,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Ativar/desativar restrição - + Activates or deactivates the selected constraints Ativa ou desativa as restrições selecionadas @@ -1518,12 +1518,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ativar/desativar restrição dominante/referência - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1533,12 +1533,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Aparar aresta - + Trim an edge with respect to the picked position Aparar uma aresta em relação à posição escolhida @@ -1597,369 +1597,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Adicionar restrição horizontal - - - + + + Add horizontal alignment Adicionar alinhamento horizontal - - + + Add vertical constraint Adicionar restrição vertical - + Add vertical alignment Adicionar alinhamento vertical - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Adicionar restrição fixa - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Adicionar restrição de comprimento - - + + Dimension Dimensão - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Adicionar restrição perpendicular - + Add perpendicularity constraint Adicionar restrição de perpendicularidade - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Adicionar restrição tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2019,44 +2020,44 @@ invalid constraints, degenerated geometry, etc. Add centered sketch box - + Add rounded rectangle Adicionar retângulo arredondado - + Add line to sketch wire Add line to sketch wire - + Add arc to sketch wire Add arc to sketch wire - - + + Add sketch arc Add sketch arc - - + + Add sketch circle Add sketch circle - + Add sketch ellipse Add sketch ellipse - + Add sketch arc of ellipse Add sketch arc of ellipse - + Add sketch arc of hyperbola Add sketch arc of hyperbola @@ -2076,33 +2077,33 @@ invalid constraints, degenerated geometry, etc. Add sketch point - - + + Create fillet Criar Boleado (fillet) - + Trim edge Aparar aresta - + Extend edge Prolongar aresta - + Split edge Split edge - + Add external geometry Add external geometry - + Add slot Add slot @@ -2112,37 +2113,37 @@ invalid constraints, degenerated geometry, etc. Add hexagon - + Convert to NURBS Convert to NURBS - + Increase spline degree Increase spline degree - + Decrease spline degree Decrease spline degree - + Increase knot multiplicity Aumentar a multiplicidade de nós - + Decrease knot multiplicity Diminuir a multiplicidade de nós - + Insert knot Insert knot - + Join Curves Join Curves @@ -2182,12 +2183,12 @@ invalid constraints, degenerated geometry, etc. Remover Alinhamento dos Eixos - + Toggle constraints to the other virtual space Toggle constraints to the other virtual space - + @@ -2195,7 +2196,7 @@ invalid constraints, degenerated geometry, etc. Update constraint's virtual space - + Add auto constraints Add auto constraints @@ -2235,7 +2236,7 @@ invalid constraints, degenerated geometry, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2251,37 +2252,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Erro de restrição automática: esboço insolúvel ao aplicar restrições coincidentes. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Erro de restrição automática: esboço insolúvel ao aplicar restrições verticais/horizontais. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Erro de restrição automática: esboço insolúvel ao aplicar restrições de igualdade. - + Autoconstrain error: Unsolvable sketch without constraints. Erro de restrição automática: esboço insolúvel sem restrições. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Erro de restrição automática: esboço insolúvel após a aplicação de restrições verticais e horizontais. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Erro de restrição automática: esboço insolúvel após a aplicação de restrições de ponto-em-ponto. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Erro de restrição automática: esboço insolúvel após a aplicação de restrições de igualdade. @@ -2406,143 +2407,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Seleção errada @@ -2581,329 +2582,329 @@ invalid constraints, degenerated geometry, etc. Restrição dimensional - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Selecione uma aresta do sketch. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restrição impossível - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Dupla restrição - - - - - + + + + + The selected edge already has a horizontal constraint! A aresta selecionada já tem uma restrição horizontal! - - - + + + The selected edge already has a vertical constraint! A aresta selecionada já tem uma restrição vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! A aresta selecionada já possui uma restrição de Bloqueio! - + The selected item(s) can't accept a horizontal constraint! Os items selecionados não podem aceitar uma restrição horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Há mais de um ponto fixo selecionado. Selecione no máximo um ponto fixo! - + The selected item(s) can't accept a vertical constraint! Os itens selecionados não podem aceitar uma restrição vertical! - - - + + + Select vertices from the sketch. Selecione vértices do esboço. - + Select one vertex from the sketch other than the origin. Selecione um vértice do esboço que não seja a origem. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecione somente vértices do esboço. O último vértice selecionado deve ser a origem. - + Wrong solver status Erro no estado do calculador - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Selecione uma aresta do esboço. - + Select only edges from the sketch. Selecione somente arestas do esboço. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Erro - + Unexpected error. More information may be available in the Report View. Erro inesperado. Mais informações podem estar disponíveis na Visualização do Relatório. - + Endpoint to endpoint tangency was applied instead. Uma tangência de ponto a ponto de extremidade foi aplicada como alternativa. - + Select two or more points from the sketch. Selecione dois ou mais pontos no esboço. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Selecione exatamente uma linha ou uma linha e um ponto ou dois pontos do esboço. - + Cannot add a length constraint on an axis! Não é possível adicionar uma restrição de comprimento num eixo! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Selecione as coisas corretas no esboço. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nenhum dos pontos selecionados foi restringido para as respectivas curvas, eles são partes do mesmo elemento, ou são ambos geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Selecione exatamente uma linha ou até dois pontos do esboço. - + Cannot add a horizontal length constraint on an axis! Não é possível adicionar uma restrição de comprimento horizontal num eixo! - + Cannot add a fixed x-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-x fixa no ponto de origem! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Não é possível adicionar uma restrição de comprimento vertical a um eixo! - + Cannot add a fixed y-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-y fixa no ponto de origem! - + Select two or more lines from the sketch. Selecione duas ou mais linhas do esboço. - - + + Select at least two lines from the sketch. Selecione pelo menos duas linhas do esboço. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2914,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. perpendicular constraint Selecione alguma geometria do esboço (sketch). - - + + Cannot add a perpendicularity constraint at an unconnected point! Não é possível adicionar uma restrição de perpendicularidade num ponto não conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular à aresta da Bspline atualmente sem suporte. - - + + One of the selected edges should be a line. Uma das arestas selecionadas deve ser uma linha. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uma tangência de ponto a ponto foi aplicada. A restrição de coincidência foi excluída. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2958,277 +2959,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. tangent constraint Selecione alguma geometria do esboço (sketch). - - - + + + Cannot add a tangency constraint at an unconnected point! Não é possível adicionar uma restrição de tangência num ponto não conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Número errado de objetos selecionados! - - + + With 3 objects, there must be 2 curves and 1 point. Com 3 objetos, deve haver 2 curvas e 1 ponto. - - - + + + Tangency to B-spline edge currently unsupported. Tangência à aresta da Bspline atualmente sem suporte. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selecione um ou mais arcos ou círculos no esboço. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Restrição só aplicável a arcos ou círculos. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selecione uma ou duas linhas de desenho (sketch). Ou selecione um ponto e duas arestas. - - + + Parallel lines Linhas paralelas - - + + An angle constraint cannot be set for two parallel lines. Uma restrição de ângulo não pode ser aplicada a duas linhas paralelas. - + Cannot add an angle constraint on an axis! Não é possível adicionar uma restrição de ângulo num eixo! - + Select two edges from the sketch. Selecione duas arestas do esboço. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Igualdade para aresta da Bspline atualmente sem suporte. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selecione dois pontos e uma linha de simetria, dois pontos e um ponto de simetria ou uma linha e um ponto de simetria do esboço. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Não é possível adicionar uma restrição de simetria entre uma linha e seus pontos extremos! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Objetos selecionados não são geometria de apenas um esboço (sketch). - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. Selecione restrições do esboço. - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error Erro de Kernel de CAD - + None of the selected elements is an edge. Nenhum dos elementos selecionados é uma aresta. - - + + At least one of the selected objects was not a B-Spline and was ignored. Pelo menos um dos objetos selecionados não era uma B-Spline e foi ignorado. - - + + The selection comprises more than one item. Please select just one knot. A seleção engloba mais de um item. Por favor, selecione apenas um nó. - - + + Input Error Erro de entrada - - + + None of the selected elements is a knot of a B-spline Nenhum dos elementos selecionados é um nó de uma B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3308,17 +3309,17 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Erro de Valor @@ -3632,12 +3633,12 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois Comprimento: - + Refractive index ratio Rácio do índice de refração - + Ratio n2/n1: Rácio n2/n1: @@ -3917,8 +3918,8 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois SketcherGui::PropertyConstraintListItem - - + + Unnamed Sem nome @@ -4152,13 +4153,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4179,32 +4180,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Ambos - + Auto Auto - + Diameter Diâmetro - + Radius Raio @@ -4653,12 +4654,12 @@ Then objects are only visible behind the sketch plane. Aplicar aos esboços existentes - + Unexpected C++ exception Exceção inesperada de C++ - + Sketcher Sketcher @@ -4666,55 +4667,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Nenhuma coincidência em falta - + No missing coincidences found Não foi encontrada nenhuma coincidência em falta - + Missing coincidences Coincidências em falta - + %1 missing coincidences found %1 coincidências em falta encontradas - + No invalid constraints Sem restrições inválidas - + No invalid constraints found Nenhuma restrição inválida encontrada - + Invalid constraints Restrições inválidas - + Invalid constraints found Restrições inválidas encontradas - - - + + + Reversed external geometry Geometria externa invertida - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4727,7 +4728,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Clique em "Trocar pontos de extremidade em restrições" para reatribuir os pontos de extremidade. Faça isto apenas uma vez em esboços criados com versões de FreeCAD anteriores à 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4736,75 +4737,70 @@ However, no constraints linking to the endpoints were found. No entanto, nenhuma restrição foi encontrada nos pontos de extremidade. - + No reversed external-geometry arcs were found. Nenhum arco invertido foi encontrado na geometria externa. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 foram feitas alterações nas restrições ligadas a pontos de extremidade de arcos invertidos. - - + + Constraint orientation locking Bloqueio de restrição de orientação - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). O bloqueio de orientação foi Ativado e recalculado para %1 restrições. As restrições estão listadas no relatório (menu Vista -> Vistas -> Relatório). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. O bloqueio de orientação foi desativado para %1 restrições. As restrições estão listadas no relatório (menu Vista -> Vistas -> Relatório). Note que para todas as futuras restrições, o bloqueio permanece ativado por predefinição. - - + + Delete constraints to external geom. Eliminar restrições para geometria externa. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Está prestes a excluir todas as restrições relacionadas com geometria externa. Isto é útil para recuperar um esboço com ligações a geometria externa quebradas ou alteradas. Tem certeza que deseja apagar essas restrições? - + All constraints that deal with external geometry were deleted. Todas as restrições relacionadas com geometria externa foram eliminadas. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - Formulário - Check to toggle filters @@ -4879,11 +4875,6 @@ No entanto, nenhuma restrição foi encontrada nos pontos de extremidade. SketcherGui::TaskSketcherElements - - - Form - Formulário - Check to toggle filters @@ -5069,7 +5060,7 @@ No entanto, nenhuma restrição foi encontrada nos pontos de extremidade. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Controlo avançado do Solver @@ -5360,8 +5351,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Alterna entre mostrar e ocultar o pente de curvatura para todas as B-splines @@ -5369,8 +5360,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Diminui a multiplicidade do nó selecionado de uma B-spline @@ -5378,8 +5369,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Alterna entre mostrar e ocultar o grau para todas os B-splines @@ -5387,8 +5378,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Aumenta a multiplicidade do nó selecionado de uma B-spline @@ -5396,8 +5387,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Alterna entre mostrar e ocultar a multiplicidade de nós para todas as B-splines @@ -5405,8 +5396,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Switches between showing and hiding the control point weight for all B-splines @@ -5414,8 +5405,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Alterna entre mostrar e ocultar os polígonos de controle para todas as B-splines @@ -5450,8 +5441,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixar o diâmetro de um círculo ou arco @@ -5459,7 +5450,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5467,8 +5458,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Corrigir o raio de um círculo ou arco @@ -5476,7 +5467,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5493,8 +5484,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Criar um arco a partir dos seus pontos de extremidade e de um ponto ao longo do arco @@ -5502,8 +5493,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Criar um círculo a partir de 3 pontos @@ -5511,8 +5502,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Criar um arco a partir do seu centro e por seus pontos de extremidade @@ -5520,8 +5511,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Create an arc of ellipse by its center, major radius, and endpoints @@ -5529,8 +5520,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Create an arc of hyperbola by its center, major radius, and endpoints @@ -5538,8 +5529,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Create an arc of parabola by its focus, vertex, and endpoints @@ -5547,13 +5538,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline por pontos de controle - - + + Create a B-spline by control points Criar uma B-spline por pontos de controle @@ -5561,8 +5552,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Cria um círculo pelo seu centro e por um ponto na circunferência @@ -5570,8 +5561,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Criar uma elipse por periapsis apoapsis e menor raio @@ -5579,8 +5570,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Criar uma elipse pelo centro, raio maior e ponto @@ -5588,8 +5579,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Creates a radius between two lines @@ -5597,8 +5588,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Criar um heptágono pelo seu centro e por um vértice @@ -5606,8 +5597,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Criar um hexágono pelo seu centro e um vértice @@ -5615,7 +5606,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Criar um retângulo arredondado @@ -5623,14 +5614,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Criar um octógono pelo seu centro e por um vértice - - + + Create a regular polygon by its center and by one corner Criar um polígono regular pelo seu centro e por um vértice @@ -5638,8 +5629,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Criar um pentágono pelo seu centro e por um vértice @@ -5647,8 +5638,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Fillet that preserves constraints and intersection point @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Criar um retângulo @@ -5664,7 +5655,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Criar um retângulo centrado @@ -5672,8 +5663,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Criar um quadrado pelo seu centro e por um vértice @@ -5681,8 +5672,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Criar um triângulo equilátero, pelo seu centro e por um vértice @@ -5690,13 +5681,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periódica por pontos de controle - - + + Create a periodic B-spline by control points Criar uma B-spline periódica por pontos de controle @@ -6329,36 +6320,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Erro @@ -6378,45 +6369,45 @@ The grid spacing change if it becomes smaller than this number of pixel.A restrição tem informações de índice inválidas e está formatada incorretamente. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Restrição invalida - - - + + + Failed to add arc Falha ao adicionar arco - + Failed to add arc of ellipse Falha ao adicionar um arco de elipse - + Cannot create arc of hyperbola from invalid angles, try again! Não é possível criar arco de hipérbole a partir de ângulos inválidos, tente novamente! - + Cannot create arc of hyperbola Não é possível criar arco de hipérbole - + Cannot create arc of parabola Não é possível criar arco de parábola @@ -6426,18 +6417,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Erro ao adicionar polo B-Spline - + Error creating B-spline pole Erro ao criar o polo da B-spline - - + + Error creating B-spline Erro ao criar a B-spline - + Error deleting last pole Erro ao eliminar último polo @@ -6447,49 +6438,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Impossível adicionar ponto de nó - + Cannot add internal alignment points Impossível adicionar pontos de alinhamento internos - + Error removing knot Erro ao remover nó - + Failed to add carbon copy Falha ao adicionar cópia carbono - - + + Failed to add circle Falha ao adicionar círculo - + Failed to add an ellipse Falha ao adicionar uma elipse - + Failed to extend edge Falha ao estender a borda - + Failed to add external geometry Falha ao adicionar geometria externa - + Failed to create fillet Failed to create fillet - + Failed to add line Falha ao adicionar linha @@ -6499,7 +6490,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Falha ao adicionar ponto - + Failed to add polygon Falha ao adicionar polígono @@ -6509,27 +6500,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Falha ao adicionar caixa - + Failed to add rounded rectangle Falha ao adicionar retângulo arredondado - + Failed to add slot Falha ao adicionar ranhura - + Failed to add edge Falha ao adicionar aresta - + Failed to trim edge Falha ao aparar a aresta - + Value Error @@ -6539,13 +6530,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6553,13 +6544,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6665,12 +6656,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6678,12 +6669,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6691,12 +6682,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensão - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6708,14 +6699,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimensão + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts index 38c6e63495..954f1bfdc4 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copiați geometria altei schițe @@ -100,27 +100,27 @@ Afișare/Ascundere layer de informaţii B-spline - + Show/hide B-spline degree Arată/ascunde gradul B-spline - + Show/hide B-spline control polygon Arată/ascunde poligonul de control B-spline - + Show/hide B-spline curvature comb Arată/ascunde curbura B-spline - + Show/hide B-spline knot multiplicity Arată/ascunde multiplicitatea nodului B-spline - + Show/hide B-spline control point weight Afișare/ascundere control punct B-spline @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Constrânge un arc de cerc sau un cerc - + Constrain an arc or a circle Constrânge un arc de cerc sau un cerc - + Constrain radius Rază constrânsă - + Constrain diameter Constrângere diametru - + Constrain auto radius/diameter Constrângere automată radius/diametru @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Creeaza un arc de cerc - + Create an arc in the sketcher Crearea unui arc de cerc în schiţă - + Center and end points Puncte de centru și de sfârșit - + End points and rim point Puncte de sfarșit și punct de margine @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Creează o Bspline - + Create a B-spline in the sketch Creaţi B-spline în schiţă @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Crează cerc - + Create a circle in the sketcher Creați un cerc în schiță - + Center and rim point Creați un cerc definit de centru și un punct pe margine - + 3 rim points Cerc definit prin 3 puncte @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Crează o secțiune conică în schiţă - + Ellipse by center, major radius, point Crează o Elipsă prin definirea centrului, razei majore și a unui punct - + Ellipse by periapsis, apoapsis, minor radius Elipse prin periapză, apoapoză, rază minoră - + Arc of ellipse by center, major radius, endpoints Arc de elipsă cu centru, rază majoră, puncte de sfârșit - + Arc of hyperbola by center, major radius, endpoints Arc de hiperbolă cu centru, rază majoră, puncte de sfârșit - + Arc of parabola by focus, vertex, endpoints Arc de parabolă cu axă, vârf, puncte de sfârșit @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Crează panglică - + Create a fillet between two lines Creați un fillet între două linii - + Sketch fillet Filet schita - + Constraint-preserving sketch fillet Fillet de schiță constrâns @@ -299,17 +299,17 @@ Crează un dreptunghi în schiţă - + Rectangle Dreptunghi - + Centered rectangle Dreptunghi centrat - + Rounded rectangle Dreptunghi rotunjit @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Creează poligon regulat - + Create a regular polygon in the sketcher Creaţi un poligon regulat în Desenator - + Triangle Triunghi - + Square Pătrat - + Pentagon Pentagon - + Hexagon Hexagon - + Heptagon Heptagon - + Octagon Octogon - + Regular polygon Poligon regulat @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modifică multiplicitatea nodului - + Modifies the multiplicity of the selected knot of a B-spline Modifică multiplicitatea nodului selectat a unui B-spline - + Increase knot multiplicity Creşte multiplicitatea nodului - + Decrease knot multiplicity Reduce multiplicitatea nodului @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Unghi constrans - + Fix the angle of a line or the angle between two lines Repară unghiul unei drepte sau unghiul dintre două linii @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Bloc: Constrângere - + Block the selected edge from moving Blochează muchia selectată să se miște @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Constrângere coincidentă - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Creează o constrângere între puncte, sau o constrângere concentrată între cercuri, arcuri și elipse @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Constrângere diametru - + Fix the diameter of a circle or an arc Fixează diametrul unui cerc sau arc de cerc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Distanţă constrânsă - + Fix a length of a line or the distance between a line and a vertex or between two circles Repară lungimea unei linii sau distanța dintre o linie și un nod sau între două cercuri @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrânge distanța orizontală - + Fix the horizontal distance between two points or line ends Bate în cuie distanţa orizontală dintre doua puncte sau capete de linii @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrângere distanţă verticală - + Fix the vertical distance between two points or line ends Bate în cuie distanţa verticală dintre două puncte sau capete de linie @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Egalitate constransă - + Create an equality constraint between two lines or between circles and arcs Crează o egalitate constrânsă între două linii, cercuri sau arce @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Constrângere orizontală - + Create a horizontal constraint on the selected item Crează o constrângere orizontală pentru obiectul selectat @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Constrângere fixă - + Create both a horizontal and a vertical distance constraint on the selected vertex Creați atât o constrângere de distanță orizontală, cât și una verticală @@ -520,12 +520,12 @@ pe vârful selectat CmdSketcherConstrainParallel - + Constrain parallel Constrângere paralelă - + Create a parallel constraint between two lines Crează o constrângere paralelă între două linii @@ -533,12 +533,12 @@ pe vârful selectat CmdSketcherConstrainPerpendicular - + Constrain perpendicular Constrângere perpendiculară - + Create a perpendicular constraint between two lines Crează o constrângere perpendiculară între două linii @@ -546,12 +546,12 @@ pe vârful selectat CmdSketcherConstrainPointOnObject - + Constrain point onto object Constrânge punct pe obiect - + Fix a point onto an object Fixează un punct de un obiect @@ -559,12 +559,12 @@ pe vârful selectat CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrângere automată radius/diametru - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Repară diametrul dacă este ales un cerc sau raza dacă este ales un stâlp ar/splină @@ -572,12 +572,12 @@ pe vârful selectat CmdSketcherConstrainRadius - + Constrain radius or weight Raza de constrângere sau greutatea - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Repară raza unui cerc sau a unui arc sau fixează greutatea unui stâlp de B-Spline @@ -585,12 +585,12 @@ pe vârful selectat CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Creați o constrângere de lege de refracție (Legea lui Snell) între două puncte finale ale razelor @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Constrângere simetrică - + Create a symmetry constraint between two points with respect to a line or a third point Creați o constrângere de simetrie între două puncte @@ -615,12 +615,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherConstrainTangent - + Constrain tangent Constrângere tangentă - + Create a tangent constraint between two entities Crează o constrângere tangentă între două entităţi @@ -628,12 +628,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherConstrainVertical - + Constrain vertically Constrângere verticală - + Create a vertical constraint on the selected item Crează o constrângere verticală pe obiectul selectat @@ -641,12 +641,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convertește geometria în B-spline - + Converts the selected geometry to a B-spline Converteşte geometria selectată într-o curbă B-spline @@ -667,12 +667,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreate3PointArc - + Create arc by three points Creaţi arc de trei puncte - + Create an arc by its end points and a point along the arc Creează un arc de la punctul său final și un punct de-a lungul arcului @@ -680,12 +680,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreate3PointCircle - + Create circle by three points Creați cerc de trei puncte - + Create a circle by 3 perimeter points Creați un cerc cu 3 puncte pe circumferință @@ -693,12 +693,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateArc - + Create arc by center Creați arc cu centrul - + Create an arc by its center and by its end points Creează un arc cu propiul centru și cu propiile puncte finale @@ -706,12 +706,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Creaţi un arc de elipsă în schiţă @@ -719,12 +719,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Creaţi un arc de hiperbolă în schiţă @@ -732,12 +732,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Creaţi un arc de parabolă în schiţă @@ -745,12 +745,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateBSpline - + Create B-spline Creează o Bspline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -758,12 +758,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateCircle - + Create circle Crează cerc - + Create a circle in the sketch Crează un cerc în schiţă @@ -771,12 +771,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Creați o elipsă din trei puncte - + Create an ellipse by 3 points in the sketch Creaţi în schiță o elipsă definită prin 3 puncte @@ -784,12 +784,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateEllipseByCenter - + Create ellipse by center Creați o elipsă cu centru - + Create an ellipse by center in the sketch Creaţi în schiță o elipsa definită prin centru @@ -797,12 +797,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateFillet - + Create fillet Crează panglică - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -810,12 +810,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateHeptagon - + Create heptagon Creează heptagon - + Create a heptagon in the sketch Creați un heptagon în schiță @@ -823,12 +823,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateHexagon - + Create hexagon Creează hexagon - + Create a hexagon in the sketch Creaţi un hexagon în schiţă @@ -862,12 +862,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateOctagon - + Create octagon Creează octogon - + Create an octagon in the sketch Creaţi un octogon în schiţă @@ -875,12 +875,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreatePentagon - + Create pentagon Creează pentagon - + Create a pentagon in the sketch Creați un pentagon în schiță @@ -888,12 +888,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Crează funcții B-spline periodice - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -901,12 +901,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreatePoint - + Create point Crează punct - + Create a point in the sketch Crează un punct în schiţă @@ -914,12 +914,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreatePointFillet - + Create corner-preserving fillet Crează fillet de tip colț-conservator - + Fillet that preserves intersection point and most constraints Filet care păstrează punctul de intersecție și majoritatea constrângerilor @@ -927,12 +927,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreatePolyline - + Create polyline Crează polilinie - + Create a polyline in the sketch. 'M' Key cycles behaviour Creaţi o polilinie în schiţă. Apăsarea repetată a tastei ”M” permite navigarea între componente @@ -966,12 +966,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateRegularPolygon - + Create regular polygon Creează poligon regulat - + Create a regular polygon in the sketch Creați un poligon regulat în schiţă @@ -979,12 +979,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateSlot - + Create slot Crează o canelură - + Create a slot in the sketch Creați o canelură în schiță @@ -992,12 +992,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateSquare - + Create square Creează pătrat - + Create a square in the sketch Crea un pătrat în schiţă @@ -1005,12 +1005,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherCreateTriangle - + Create equilateral triangle Creează triunghi echilateral - + Create an equilateral triangle in the sketch Creați un triunghi echilater în schiță @@ -1018,12 +1018,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherDecreaseDegree - + Decrease B-spline degree Scade gradul B-spline - + Decreases the degree of the B-spline Reduce gradul curbei B-spline @@ -1031,12 +1031,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Reduce multiplicitatea nodului - + Decreases the multiplicity of the selected knot of a B-spline Descrește multiplicitatea nodului selectat a unui B-spline @@ -1083,12 +1083,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherExtend - + Extend edge Prelungirea muchiei - + Extend an edge with respect to the picked position Prelungiți o muchie în raport cu poziția selctată @@ -1096,12 +1096,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Crează o muchie legată de o geometrie externă @@ -1109,12 +1109,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherIncreaseDegree - + Increase B-spline degree Crește gradul B-spline - + Increases the degree of the B-spline Măriâi gradul curbei Bezier B-spline @@ -1122,12 +1122,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Creşte multiplicitatea nodului - + Increases the multiplicity of the selected knot of a B-spline Creşte multitudinea de nodul selectat de un B-spline @@ -1135,12 +1135,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherInsertKnot - + Insert knot Inserare Robot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserează în parametrul dat. Dacă un nod există deja la acel parametru, multiplicitatea este mărită cu unul. @@ -1148,12 +1148,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherJoinCurves - + Join curves Alătură-te curbelor - + Join two curves at selected end points Alătură-te celor două curbe la punctele finale selectate @@ -1440,12 +1440,12 @@ Acest lucru va șterge proprietatea 'Support', dacă este cazul. CmdSketcherSplit - + Split edge Selectează marginea - + Splits an edge into two while preserving constraints Împarte o margine în două, păstrând în același timp constrângerile @@ -1466,12 +1466,12 @@ Acest lucru va șterge proprietatea 'Support', dacă este cazul. CmdSketcherSwitchVirtualSpace - + Switch virtual space Comutator spaţiu virtual - + Switches the selected constraints or the view to the other virtual space Comută între spațiul virtual al constrângerile selectate sau vizualizarea @@ -1492,12 +1492,12 @@ Acest lucru va șterge proprietatea 'Support', dacă este cazul. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activează/Dezactivează constrângerea - + Activates or deactivates the selected constraints Activează sau dezactivează constrângerile selectate @@ -1518,12 +1518,12 @@ Acest lucru va șterge proprietatea 'Support', dacă este cazul. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Comută constrângerea de condus/referință - + Set the toolbar, or the selected constraints, into driving or reference mode Setează bara de instrumente sau constrângerile selectate, @@ -1533,12 +1533,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Taie marginea - + Trim an edge with respect to the picked position Taie o margine relativ la pozitia aleasa @@ -1597,369 +1597,370 @@ constrângeri nevalide, geometrie degenerată, etc. Command - - + + Add horizontal constraint Adaugă o constrângere orizontală - - - + + + Add horizontal alignment Adaugă aliniere orizontală - - + + Add vertical constraint Adaugă constrângere verticală - + Add vertical alignment Adaugă aliniere verticală - + Add 'Lock' constraint Adaugă constrângere 'Blocare' - + Add relative 'Lock' constraint Adaugă constrângere 'Blocare' - + Add fixed constraint Adaugă o constrângere fixă - + Add 'Block' constraint Adaugă constrângere 'Blocare' - + Add block constraint Adaugă constrângere 'Blocare' - - - + + + Add coincident constraint Adaugă constrângere de coincident - - + + Add distance from horizontal axis constraint Adăugați distanța de la constrângerea axei orizontale - - + + Add distance from vertical axis constraint Adăugați distanța față de constrângerea axei verticale - - + + Add point to point distance constraint Adăugați o constrângere de distanță punct la punct - - - + + + Add point to line Distance constraint Adăugați punct la linie Constrângere de distanță - - + + Add circle to circle distance constraint Adăugați restricție de distanță cerc la cerc - + Add circle to line distance constraint Adăugați cerc la constrângere de distanță pe linie - - - - - + + + + + + Add length constraint Adăugați o constrângere de lungime - - + + Dimension Dimensiune - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Adăugați punct asupra constrângerii obiectului - - + + Add point to point horizontal distance constraint Adăugați constrângere de distanță orizontală punct la punct - + Add fixed x-coordinate constraint Adaugă o constrângere fixă la coordonatele x - - + + Add point to point vertical distance constraint Adaugă punct la punctul de distanță verticală constrângere - + Add fixed y-coordinate constraint Adaugă o constrângere fixă la coordonatele y - - + + Add parallel constraint Adaugă o constrângere paralelă - - - - - - - + + + + + + + Add perpendicular constraint Adaugă constrângere perpendiculară - + Add perpendicularity constraint Adaugă constrângere perpendiculară - + Swap coincident+tangency with ptp tangency Schimbă coincidentul+tangență cu tangență ptp - + Swap PointOnObject+tangency with point to curve tangency Schimbă PointOnObject+tangență cu tangență în curbă - - - - - - - + + + + + + + Add tangent constraint Adaugă constrângere tangentă - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Adaugă punct tangent de constrângere - - - - + + + + Add radius constraint Adaugă constrângere rază - - - - + + + + Add diameter constraint Adaugă o constrângere pentru diametru - - - - + + + + Add radiam constraint Adaugă constrângere de rază - - - - - - + + + + + + Add angle constraint Adaugă o constrângere de unghi - - + + Add equality constraint Adaugă constrângere pentru egalitate - - - - - + + + + + Add symmetric constraint Adaugă constrângere simetrică - + Add Snell's law constraint Adaugă constrângere legii lui Snell - + Toggle constraint to driving/reference Comută constrângerea pentru condus/referință - + Activate/Deactivate constraint Activează/Dezactivează constrângerea @@ -2019,44 +2020,44 @@ constrângeri nevalide, geometrie degenerată, etc. Adăugă o căsuță de schiță centrată - + Add rounded rectangle Adaugă un dreptunghi rotunjit - + Add line to sketch wire Adaugă linie la cablul schiţei - + Add arc to sketch wire Adauga arc la polilinie - - + + Add sketch arc Adaugă arc de schiță - - + + Add sketch circle Adaugă cerc schiță - + Add sketch ellipse Adaugă elipsă schiță - + Add sketch arc of ellipse Adaugă un arc de elipsă - + Add sketch arc of hyperbola Adăugați arc de schiță de hiperbolă @@ -2076,33 +2077,33 @@ constrângeri nevalide, geometrie degenerată, etc. Adaugă punct de schiță - - + + Create fillet Crează panglică - + Trim edge Taie marginea - + Extend edge Prelungirea muchiei - + Split edge Selectează marginea - + Add external geometry Adaugă geometrie externă - + Add slot Adăugare slot @@ -2112,37 +2113,37 @@ constrângeri nevalide, geometrie degenerată, etc. Adaugă hexagon - + Convert to NURBS Convertește în NURBS - + Increase spline degree Crește gradul B-spline - + Decrease spline degree Scade gradul curbei - + Increase knot multiplicity Creşte multiplicitatea nodului - + Decrease knot multiplicity Reduce multiplicitatea nodului - + Insert knot Inserare Robot - + Join Curves Alătură-te curbelor @@ -2182,12 +2183,12 @@ constrângeri nevalide, geometrie degenerată, etc. Elimină Alinierea Axelor - + Toggle constraints to the other virtual space Comută constrângerile la celălalt spațiu virtual - + @@ -2195,7 +2196,7 @@ constrângeri nevalide, geometrie degenerată, etc. Actualizează spațiul virtual al constrângerilor - + Add auto constraints Adaugă Auto-Constrângeri @@ -2235,7 +2236,7 @@ constrângeri nevalide, geometrie degenerată, etc. Adaugă punct nod - + Create a carbon copy Creează o copie de carbon @@ -2251,37 +2252,37 @@ constrângeri nevalide, geometrie degenerată, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Eroare de autoconstrângere: schiță nerezolvabilă în timp ce se aplică constrângeri de coincidență. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Eroare de autoconstrângere: schiță nerezolvată în timp ce se aplică constrângeri verticale/orizontale. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Eroare de autoconstrângere: schiță nerezolvabilă în timp ce se aplică constrângeri privind egalitatea. - + Autoconstrain error: Unsolvable sketch without constraints. Eroare de autoconstrângere: schiță fără soluție fără constrângeri. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Eroare de autoconstrângere: schiță nerezolvabilă după aplicarea constrângerilor orizontale și verticale. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Eroare de autoconstrângere: schiță nerezolvabilă după aplicarea constrângerilor punct-la-punct. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Eroare de autoconstrângere: schiță nerezolvabilă după aplicarea constrângerilor de egalitate. @@ -2406,143 +2407,143 @@ constrângeri nevalide, geometrie degenerată, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ constrângeri nevalide, geometrie degenerată, etc. - - - + + + Wrong selection Selecţie greşită @@ -2581,329 +2582,329 @@ constrângeri nevalide, geometrie degenerată, etc. Constrângere dimensională - + Cannot add a constraint between two external geometries. Nu se poate adăuga o constrângere între două geometrii externe. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nu se poate adăuga o constrângere între două geometrii fixe. Geometriile fixe includ geometrii externe, geometriei blocate și puncte speciale cum ar fi puncte de nod B-spline. - + Sketcher Constraint Substitution Constrângere Schiță Substituție - + Keep notifying me of constraint substitutions Continuă să mă notifici cu privire la substituțiile constrângerilor - - - + + + Only sketch and its support are allowed to be selected. Doar schița și suportul său sunt permise pentru a fi selectate. - + One of the selected has to be on the sketch. Una dintre cele selectate trebuie să fie pe schiță. - - + + Select an edge from the sketch. Selectati o margine din schita. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Constrangere imposibila - - - - + + + + The selected edge is not a line segment. Marginea selectată nu este un segment de linie. - - - - - - + + + + + + Double constraint Constrangere dubla - - - - - + + + + + The selected edge already has a horizontal constraint! Marginea selectată are deja o constrângere orizontală! - - - + + + The selected edge already has a vertical constraint! Marginea selectată are deja o constrângere verticală! - - - - - - + + + + + + The selected edge already has a Block constraint! Marginea selectată are deja o constrângere de bloc! - + The selected item(s) can't accept a horizontal constraint! Obiectele selectate nu accepta o constrangere orizontala! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Există mai mult de un punct fix selectat. Selectați maxim un punct fix! - + The selected item(s) can't accept a vertical constraint! Obiectele selectate nu accepta o constrangere verticala! - - - + + + Select vertices from the sketch. Selectează nodurile din Schiță. - + Select one vertex from the sketch other than the origin. Selectează un nod din schiţa altul decât originea. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selectaţi doar nodurile din schiță. Ultimul punct selectat poate fi originea. - + Wrong solver status Status de greşit ak Rezolvitor - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. O constrângere de blocare nu poate fi adăugată dacă schița nu este rezolvată sau există constrângeri redundante și contradictorii. - + Select one edge from the sketch. Selectaţi o margine din Schiță. - + Select only edges from the sketch. Selectaţi o margine din Schiță. - + Number of selected objects is not 3 Numărul de obiecte selectate nu este 3 - - - + + + Error Eroare - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Punct final la punctul final de tangenţă a fost aplicat în schimb. - + Select two or more points from the sketch. Selectaţi două sau mai multe puncte din schita. - + Select two or more vertices from the sketch. Selectaţi două sau mai multe noduri din schiţă. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selectați două sau mai multe noduri din schiță pentru o constrângere de coincident, sau două sau mai multe cercuri, elipsuri, arcuri sau arcuri de elipsă pentru o constrângere concentrată. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selectaţi două vârfuri din schiţă pentru o constrângere de incident, sau două cercuri, elipse, arcuri sau arcuri de elipsă pentru o constrângere concentrată. - + Select exactly one line or one point and one line or two points from the sketch. Selectati exact o linie sau un punct si o linie sau două puncte din schita. - + Cannot add a length constraint on an axis! Nu se poate adauga o constrangere de lungime pentru o axa! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Selectaţi exact o linie sau un punct şi o linie sau două puncte sau două cercuri din schiţă. - + This constraint does not make sense for non-linear curves. Această constrângere nu are sens pentru curbe neliniare. - + Endpoint to edge tangency was applied instead. Tangența la margine a fost aplicată în schimb. - - - - - - - + + + + + + + Select the right things from the sketch. Selectaţi lucruri corecte din schiță. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Selectaţi o muchie care nu este o greutate B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Niciunul dintre punctele selectate nu a fost constrâns pe curbele respective, deoarece acestea sunt părți ale aceluiași element, pentru că sunt atât geometrie externă, cât şi pentru că marginea nu este eligibilă. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nici unul dintre punctele selectate nu trece prin curbele respective, sau pentru că ele fac parte din același element sau pentru că ele sunt amândouă exterioare din punct de vedere geometric. - - - - + + + + Select exactly one line or up to two points from the sketch. Selectati exact o linie sau maxim doua puncte din schita. - + Cannot add a horizontal length constraint on an axis! Nu se poate adauga o constrangere de lungime orizontala pentru o axa! - + Cannot add a fixed x-coordinate constraint on the origin point! Nu se poate adăuga o constrângere fixă la coordonatele x pe punctul de origine! - - + + This constraint only makes sense on a line segment or a pair of points. Această constrângere are sens doar pe un segment de linie sau pe o pereche de puncte. - + Cannot add a vertical length constraint on an axis! Nu se poate adauga o constrangere verticala pentru o axa! - + Cannot add a fixed y-coordinate constraint on the origin point! Nu se poate adăuga o constrângere fixă la coordonatele y pe punctul de origine! - + Select two or more lines from the sketch. Selectati doua sau mai multe linii din schita. - - + + Select at least two lines from the sketch. Selectati cel putin doua linii din schita. - + Select a valid line. Selectați o linie validă. - - + + The selected edge is not a valid line. Marginea selectată nu este o linie validă. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2913,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Se acceptă combinațiile: două curbe; un punct extrem şi o curbă; două puncte extreme; două curbe şi un punct. - + Select some geometry from the sketch. perpendicular constraint Selectaţi o geometrie din schiță. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nu pot adauga o constrângere perpendiculară pentru un punct neconectat! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular pe marginea B-spline neacceptată în prezent. - - + + One of the selected edges should be a line. Una dintre marginile selectate trebuie sa fie o linie. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Punct final la punctul final de tangenţă a fost aplicat. Coincident restricţia a fost şters. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. A fost aplicat punctul final de la margine tangenței. Punctul de pe obiect a fost șters. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,277 +2956,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Există un număr de moduri în care se poate aplica această constrângere. Se accepta combinațiile: două curbe; un punct extrem şi o curbă; două puncte extreme; două curbe şi un punct. - + Select some geometry from the sketch. tangent constraint Selectaţi o geometrie din schiță. - - - + + + Cannot add a tangency constraint at an unconnected point! Nu pot adauga constrângere tangenţială pentru un punct neconectat! - - + + Tangent constraint at B-spline knot is only supported with lines! Constrângerea tangentă la nodul B-spline este suportată doar cu linii! - + B-spline knot to endpoint tangency was applied instead. Tangenţa B-spline până la final a fost aplicată. - + Select either one point and several curves, or one curve and several points. Selectaţi fie un punct şi mai multe curbe, fie o curbă şi mai multe puncte. - - + + Wrong number of selected objects! Număr greșit al obiectelor selectate! - - + + With 3 objects, there must be 2 curves and 1 point. Cu 3 obiecte, trebuie să existe 2 curbe și un punct. - - - + + + Tangency to B-spline edge currently unsupported. Tangenţă la marginea B-spline neacceptată în prezent. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selectaţi doar un arc sau un cerc din schiţă. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selectaţi fie unul sau mai mulţi poli B-Spline sau doar unul sau mai multe arcuri sau cercuri din schiţă, dar nu amestecate. - - - + + + Constraint only applies to arcs or circles. Restricţia se aplică numai pentru arce de cerc sau cercuri. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selectaţi una sau două linii din schiță, sau selectaţi două margini şi un punct. - - + + Parallel lines Linii paralele - - + + An angle constraint cannot be set for two parallel lines. O constrângere unghiulară nu poate fi aplicată la două linii paralele. - + Cannot add an angle constraint on an axis! Nu pot adăuga o constrângere de unghi pe o axă! - + Select two edges from the sketch. Selectaţi două margini din schiţă. - + Select two or more compatible edges. Selectaţi două sau mai multe margini compatibile. - + Sketch axes cannot be used in equality constraints. Axele schiţei nu pot fi folosite în constrângerile de egalitate. - + Equality for B-spline edge currently unsupported. Egalitate pentru muchiile curbelor B-spline, în prezent, nu sunt suportate. - - - - + + + + Select two or more edges of similar type. Selectaţi două sau mai multe margini de tip similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selectaţi două puncte şi o linie de simetrie, două puncte şi un punct de simetrie sau o linie si un punct de simetrie din schiță. - - + + Cannot add a symmetry constraint between a line and its end points. Nu se poate adăuga o constrângere de simetrie între o linie și punctele sale de sfârșit. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nu se poate adăuga o constrângere de simetrie între o linie şi punctele ei de capăt! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selectaţi două puncte finale ale liniilor pentru a acţiona ca raze, şi o margine reprezentând o limită. Primul punct selectat corespunde indicelui n1, secundă la n2, iar valoarea de referință setează raportul n2/n1. - + Selected objects are not just geometry from one sketch. Obiectele selectate nu sunt geometria doar unui sketch. - + Cannot create constraint with external geometry only. Nu se poate crea constrângere doar cu geometrie externă. - + Incompatible geometry is selected. Geometria incompatibilă este selectată. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw pe marginea curbei B-spline este în prezent neacceptat. - - - - - + + + + + Select constraints from the sketch. Selectează constrângerile din schiță. - - - + + + Select constraint(s) from the sketch. Selectați constrângerile din schiță. - + B-Spline Degree Grad B-Spline - + Define B-Spline Degree, between 1 and %1: Defineste grade B-Spline intre 1 si %1: - - - + + + CAD Kernel Error Eroare a nucleului CAD - + None of the selected elements is an edge. Nici unul dintre obiectele selectate nu este o muchie. - - + + At least one of the selected objects was not a B-Spline and was ignored. Cel puțin unul dintre obiectele selectate nu a fost o curbă Bezier (B-Spline) și a fost ignorat. - - + + The selection comprises more than one item. Please select just one knot. Selecția include mai mult de un element. Selectați numai un singur nod. - - + + Input Error Eroarea de introducere a datelor - - + + None of the selected elements is a knot of a B-spline Nici unul dintre elementele selectate este un nod de curbă B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nimic nu este selectat. Vă rugăm să selectaţi o curbă b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Vă rugăm să selectaţi o curbă b-spline pentru a insera un nod (nu un nod pe acesta). Dacă curba nu este o curbă b-spline, vă rugăm să o convertiți mai întâi într-una singură. - + Nothing is selected. Please select end points of curves. Nu se selectează nimic. Te rugăm să selectezi punctele finale ale curbelor. - + Too many curves on point Prea multe curbe la punct - - + + Exactly two curves should end at the selected point to be able to join them. Exact două curbe ar trebui să se termine în punctul selectat pentru a putea să li se alăture. - + Too few curves on point Prea multe curbe la punct - + Two end points, or coincident point should be selected. Trebuie selectate două puncte finale sau punctul de incident. @@ -3305,18 +3306,18 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Momentan nu este suportat să mutați geometria externă într-un alt strat vizual. Geometria externă va fi omisă - + Set knot multiplicity Setați multiplicitatea nodurilor - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Setați multiplicitatea nodurilor în ultimul punct furnizat, între 1 și %1:Rețineți că multiplicitatea poate fi ignorată în anumite circumstanțe. Vă rugăm să consultați documentația pentru detalii - + Value Error Value Error @@ -3630,12 +3631,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Lungime: - + Refractive index ratio Procentul indicelui de refracție - + Ratio n2/n1: Raportul n2/n1: @@ -3915,8 +3916,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Nedenumit @@ -4150,13 +4151,13 @@ Necesită reintroducerea modului de editare pentru a avea efect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4177,32 +4178,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Ambele - + Auto Automat - + Diameter Diametru - + Radius Raza @@ -4651,12 +4652,12 @@ Apoi obiectele sunt vizibile doar în spatele planului schiței. Aplică schițelor existente - + Unexpected C++ exception Excepție neașteptată de C++ - + Sketcher Schiță @@ -4664,55 +4665,55 @@ Apoi obiectele sunt vizibile doar în spatele planului schiței. SketcherGui::SketcherValidation - + No missing coincidences Nu lipsesc coincidențe - + No missing coincidences found Nu s-au găsit coincidențe lipsă - + Missing coincidences Lipsesc coincidente - + %1 missing coincidences found %1 coincidența lipsă găsită - + No invalid constraints Nicio constrîngere nu este invalidă - + No invalid constraints found Nu s-au găsit Constrângeri nevalide - + Invalid constraints Constrângeri nevalide - + Invalid constraints found S-au găsit Constrângerile nevalide - - - + + + Reversed external geometry Geometrie externă inversă - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,82 +4726,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Apăsați butonul "Swap endpoints" pentru a realoca punctele de sfârșit. Faceți acest lucru o singură dată pentru schițele create în FreeCAD mai vechi de v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. %1 arc inversat s-au găsit în geometria externă. Extremitățile lor sunt puse în evidență într-o vedere 3D. - + No reversed external-geometry arcs were found. Nici un arc inversat nu s-a găsit în geometria externă. - + %1 changes were made to constraints linking to endpoints of reversed arcs. % 1 au fost făcute modificări la constrângerile legate de punctele finale ale marginilor arcadei inversate. - - + + Constraint orientation locking Constrângeri de zăvorâre a orientării - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Blocarea orientării a fost activată şi recalculate pentru %1 constrângeri. Aceste Constrângeri au fost enumerate în vizualizarea raport (meniu Affichage-> View-> Report View). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Blocarea de orientare a fost dezactivată pentru% 1 constrângeri. Aceste constrângeri sunt afișate în vizualizarea Raport (meniul Vizualizare -> Vizualizare -> Raport). Rețineți că pentru toate constrângerile viitoare, blocarea este în continuare activă. - - + + Delete constraints to external geom. Elimină constrângerile privind geometria externă. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Sunteți pe punctul de a elimina toate constrângerile care se ocupă de geometria exterioară. Acest lucru este util pentru salvarea unei schițe care conține legături către geometria externă întrerupte sau modificată. Sigur doriți să eliminați constrângerile? - + All constraints that deal with external geometry were deleted. Toate constrângerile referitoare la geometria externă au fost șterse. - + No degenerated geometry Nicio geometrie degenerată - + No degenerated geometry found Nicio geometrie degenerată găsită - + Degenerated geometry Geometrie degenerată - + %1 degenerated geometry found %1 geometrie degenerată găsită SketcherGui::TaskSketcherConstraints - - - Form - Formular - Check to toggle filters @@ -4875,11 +4871,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Formular - Check to toggle filters @@ -5065,7 +5056,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Control avansat al Rezolvitorului @@ -5357,8 +5348,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Comută între afişarea şi ascunderea gradului de curvatură pentru toate B-spline-urile @@ -5366,8 +5357,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Descrește multiplicitatea nodului selectat a unui B-spline @@ -5375,8 +5366,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Comută între afişarea şi ascunderea gradului de curbură pentru toate B-spline-urile @@ -5384,8 +5375,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Creşte multitudinea de nodul selectat de un B-spline @@ -5393,8 +5384,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Comută între afişarea şi ascunderea multiplicității de nod pentru toate B-spline-urile @@ -5402,8 +5393,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Comută între afişarea şi ascunderea greutăţii punctului de control pentru toate B-splines @@ -5411,8 +5402,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Comută între afişarea şi ascunderea poligoane de control pentru toate B-spline-urile @@ -5447,8 +5438,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixează diametrul unui cerc sau arc de cerc @@ -5456,7 +5447,7 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Repară raza/diametrul unui cerc sau al unui arc @@ -5464,8 +5455,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixează raza unui cerc sau arc @@ -5473,7 +5464,7 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Repară raza/diametrul unui cerc sau al unui arc @@ -5490,8 +5481,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Creează un arc de la punctul său final și un punct de-a lungul arcului @@ -5499,8 +5490,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Creeați un cerc definit prin 3 puncte pe circumferință @@ -5508,8 +5499,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateArc - - + + Create an arc by its center and by its end points Creează un arc cu propiul centru și cu propiile puncte finale @@ -5517,8 +5508,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Creaţi un arc de elipsă definit prin centrul său, raza majoră şi puncte finale @@ -5526,8 +5517,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Creaţi un arc de hiperbolă definit prin centrul său, raza majoră şi puncte finale @@ -5535,8 +5526,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Creaţi un arc de parabolă prin focalizarea, nodul şi punctele sale finale @@ -5544,13 +5535,13 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateBSpline - + B-spline by control points B-spline definită prin punctele de control - - + + Create a B-spline by control points Creaţi un B-spline definită prin punctele de control @@ -5558,8 +5549,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Creează un cerc definit prin centrul propriu și cu un punct pe circumferință @@ -5567,8 +5558,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Creează o elipsă definită prin punctele din extremitățile axei mari și raza minoră @@ -5576,8 +5567,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Creează o Elipsă definită prin centru, raza majoră și un punct @@ -5585,8 +5576,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateFillet - - + + Creates a radius between two lines Creează o rază între două linii @@ -5594,8 +5585,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Creați un heptagon definit prin centrul său şi a unui colţ @@ -5603,8 +5594,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Creați un hexagon definit prin centrul său şi un colţ @@ -5612,7 +5603,7 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateOblong - + Create a rounded rectangle Creează un dreptunghi rotunjit @@ -5620,14 +5611,14 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Creați un octogon definit prin centrul său şi a un colţ - - + + Create a regular polygon by its center and by one corner Creați unui poligon regulat definit prin centrul său şi un colţ @@ -5635,8 +5626,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Creați unui pentagon definit prin centrul său şi a un colţ @@ -5644,8 +5635,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Fillet care păstrează constrângerile și punctul de intersecție @@ -5653,7 +5644,7 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateRectangle - + Create a rectangle Creează un dreptunghi @@ -5661,7 +5652,7 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateRectangle_Center - + Create a centered rectangle Creaţi un dreptunghi centrat @@ -5669,8 +5660,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateSquare - - + + Create a square by its center and by one corner Creați un pătrat definit prin centrul său şi un colţ @@ -5678,8 +5669,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Creați un unui triunghi echilateral definit prin centrul său şi un colţ @@ -5687,13 +5678,13 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Creaţi o curbă B-spline periodică prin punctele de control - - + + Create a periodic B-spline by control points Creaţi o curbă B-spline periodică prin punctele de control @@ -6326,36 +6317,36 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Eroare @@ -6375,45 +6366,45 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6423,18 +6414,18 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6444,49 +6435,49 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Eșuare creare fillet - + Failed to add line Failed to add line @@ -6496,7 +6487,7 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Failed to add point - + Failed to add polygon Failed to add polygon @@ -6506,27 +6497,27 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6536,13 +6527,13 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline definită prin noduri - - + + Create a B-spline by knots Creaţi o curbă B-spline cu noduri @@ -6550,13 +6541,13 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots B-spline periodic cu noduri - - + + Create a periodic B-spline by knots Creaţi o curbă B-spline periodică cu noduri @@ -6662,12 +6653,12 @@ Punctele trebuie să fie mai apropiate de o cincime din spațierea grilei de o l CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6675,12 +6666,12 @@ Punctele trebuie să fie mai apropiate de o cincime din spațierea grilei de o l CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6688,12 +6679,12 @@ Punctele trebuie să fie mai apropiate de o cincime din spațierea grilei de o l CmdSketcherDimension - + Dimension Dimensiune - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6705,14 +6696,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimensiune + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts index 25c70829a1..4635a394e7 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Создать копию - + Copy the geometry of another sketch Копировать геометрию другого эскиза @@ -100,27 +100,27 @@ Показать/скрыть информационный уровень В-сплайн - + Show/hide B-spline degree Показать/скрыть степень B-сплайна - + Show/hide B-spline control polygon Показать/скрыть полигон управления B-сплайном - + Show/hide B-spline curvature comb Показать/скрыть гребень кривизны B-сплайна - + Show/hide B-spline knot multiplicity Показать/скрыть кратность узлов B-сплайна - + Show/hide B-spline control point weight Показать/скрыть контрольную точку веса B-сплайна @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ограничение дуги или окружности - + Constrain an arc or a circle Ограничение дуги или окружности - + Constrain radius Ограничение радиуса - + Constrain diameter Ограничение диаметра - + Constrain auto radius/diameter Ограничение радиуса/диаметра автоматически @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Создать дугу - + Create an arc in the sketcher Создать дугу на эскизе - + Center and end points По центру и конечным точкам - + End points and rim point По конечным точкам и касательной @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Создать B-сплайн - + Create a B-spline in the sketch Создать B-сплайн на эскизе @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Создать окружность - + Create a circle in the sketcher Создать окружность на эскизе - + Center and rim point По центру и точке окружности - + 3 rim points По трём точкам @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Создать фигуру конического сечения - + Create a conic in the sketch Создать конус на эскизе - + Ellipse by center, major radius, point Эллипс по центру, большому радиусу, точке - + Ellipse by periapsis, apoapsis, minor radius Эллипс по периапсиде, апоапсиде, малому радиусу - + Arc of ellipse by center, major radius, endpoints Дуга эллипса по центру, большому радиусу, концевым точкам - + Arc of hyperbola by center, major radius, endpoints Дуга гиперболы по центру, большому радиусу, конечным точкам - + Arc of parabola by focus, vertex, endpoints Дуга параболы по фокусу, вершине, конечным точкам @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Создать скругление - + Create a fillet between two lines Создать скругление между двумя отрезками - + Sketch fillet Скругление - + Constraint-preserving sketch fillet Скругление с сохранением ограничений @@ -299,17 +299,17 @@ Создаёт прямоугольник на эскизе - + Rectangle Прямоугольник - + Centered rectangle Центрированный прямоугольник - + Rounded rectangle Скруглённый прямоугольник @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Создать правильный многоугольник - + Create a regular polygon in the sketcher Создать правильный многоугольник на эскизе - + Triangle Треугольник - + Square Квадрат - + Pentagon Пятиугольник - + Hexagon Шестиугольник - + Heptagon Семиугольник - + Octagon Восьмиугольник - + Regular polygon Правильный многоугольник @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Изменение кратности узлов - + Modifies the multiplicity of the selected knot of a B-spline Изменение кратности выбранного узла B-сплайна - + Increase knot multiplicity Увеличение кратности узлов - + Decrease knot multiplicity Уменьшение кратности узлов @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ограничение угла - + Fix the angle of a line or the angle between two lines Фиксировать угол отрезка или угол между двумя отрезками @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Ограничение перемещения - + Block the selected edge from moving Блокировать выбранный край от перемещения @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ограничение наложения точек - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Создать ограничение совпадения между точками или ограничение концентричности между кругами, дугами и эллипсами @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ограничение диаметра - + Fix the diameter of a circle or an arc Задать диаметр окружности или дуги @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ограничение расстояния - + Fix a length of a line or the distance between a line and a vertex or between two circles Исправить длину линии или расстояние между линией и вершиной или между двумя кругами @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ограничение расстояния по горизонтали - + Fix the horizontal distance between two points or line ends Фиксировать расстояние по горизонтали между двумя точками или концами отрезка @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ограничение расстояния по вертикали - + Fix the vertical distance between two points or line ends Фиксировать расстояние по вертикали между двумя точками или концами отрезка @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ограничение эквивалентностью - + Create an equality constraint between two lines or between circles and arcs Создать ограничение равенства между двумя отрезками или между окружностями и дугами @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ограничение горизонтальности - + Create a horizontal constraint on the selected item Создать ограничение горизонтальности для выбранных линий @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Ограничение положения - + Create both a horizontal and a vertical distance constraint on the selected vertex Создать ограничение расстояния горизонтального и вертикального расстояния @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Ограничение параллельности - + Create a parallel constraint between two lines Создать ограничение параллельности между двумя линиями @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ограничение перпендикулярности - + Create a perpendicular constraint between two lines Создать ограничение перпендикулярности между двумя линиями @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Ограничить точку на объекте - + Fix a point onto an object Привязать точку к объекту @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Ограничение радиуса/диаметра автоматически - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Назначает диаметр, если выбран круг или радиус, если выбран полюс дуга/сплайн @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Ограничение радиуса или веса - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Зафиксировать радиус окружности или дуги или зафиксировать вес полюса В-сплайна @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ограничение преломления (закон Снеллиуса) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Создать ограничение по закону преломления света (закон Снеллиуса) между двумя конечными точками лучей и отрезком в качестве границы раздела сред. @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ограничение симметричности - + Create a symmetry constraint between two points with respect to a line or a third point Создать ограничение симметрии между двумя точками относительно линии или третьей точки @@ -613,12 +613,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Ограничение касательности - + Create a tangent constraint between two entities Создать ограничение касательности между двумя объектами @@ -626,12 +626,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Ограничение вертикальности - + Create a vertical constraint on the selected item Создать ограничение вертикальности для выделенных линий @@ -639,12 +639,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Преобразовать геометрию в B-сплайн - + Converts the selected geometry to a B-spline Преобразовать выбранную геометрию в B-сплайн @@ -665,12 +665,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Создать дугу по трём точкам - + Create an arc by its end points and a point along the arc Создать дугу, указав её конечные точки и точку вдоль дуги @@ -678,12 +678,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Создать окружность по трём точкам - + Create a circle by 3 perimeter points Создать окружность по трём точкам периметра @@ -691,12 +691,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Создать дугу от центра - + Create an arc by its center and by its end points Создать дугу по её центру и её конечным точкам @@ -704,12 +704,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Создать эллиптическую дугу - + Create an arc of ellipse in the sketch Создать дугу эллипса на эскизе @@ -717,12 +717,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Создать гиперболическую дугу - + Create an arc of hyperbola in the sketch Создать дугу гиперболы на эскизе @@ -730,12 +730,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Создать параболическую дугу - + Create an arc of parabola in the sketch Создать дугу параболы на эскизе @@ -743,12 +743,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Создать B-сплайн - + Create a B-spline by control points in the sketch. Создать B-сплайн по контрольным точкам на эскизе. @@ -756,12 +756,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Создать окружность - + Create a circle in the sketch Создать окружность на эскизе @@ -769,12 +769,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Создать эллипс по трём точкам - + Create an ellipse by 3 points in the sketch Создать эллипс по трём точкам на эскизе @@ -782,12 +782,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Создать эллипс от центра - + Create an ellipse by center in the sketch Создать эллипс от центра в эскизе @@ -795,12 +795,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Создать скругление - + Create a fillet between two lines or at a coincident point Скруглить угол между двумя линиями, или соединить две линии дугой окружности @@ -808,12 +808,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Создать семиугольник - + Create a heptagon in the sketch Создать семиугольник на эскизе @@ -821,12 +821,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Создать шестиугольник - + Create a hexagon in the sketch Создать шестиугольник в эскизе @@ -860,12 +860,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Создать восьмиугольник - + Create an octagon in the sketch Создать восьмиугольник на эскизе @@ -873,12 +873,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Создать пятиугольник - + Create a pentagon in the sketch Создать пятиугольник на эскизе @@ -886,12 +886,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Создать периодический B-сплайн - + Create a periodic B-spline by control points in the sketch. Создать периодический B-сплайн по контрольным точкам на эскизе. @@ -899,12 +899,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Создать точку - + Create a point in the sketch Создать точку на эскизе @@ -912,12 +912,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Создать скругление с сохранением точки пересечения - + Fillet that preserves intersection point and most constraints Скругление, которое сохраняет точку пересечения и большинство ограничений @@ -925,12 +925,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Создать линию по точкам - + Create a polyline in the sketch. 'M' Key cycles behaviour Создать полилинию на эскизе. 'M' - смена режима @@ -964,12 +964,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Создать правильный многоугольник - + Create a regular polygon in the sketch Создать правильный многоугольник на эскизе @@ -977,12 +977,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Создать паз - + Create a slot in the sketch Создать паз на эскизе @@ -990,12 +990,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Создать квадрат - + Create a square in the sketch Создать квадрат на эскизе @@ -1003,12 +1003,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Создать равносторонний треугольник - + Create an equilateral triangle in the sketch Создать равнобедренный треугольник на эскизе @@ -1016,12 +1016,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Уменьшить степень B-сплайна - + Decreases the degree of the B-spline Уменьшает степень B-сплайна @@ -1029,12 +1029,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Уменьшение кратности узлов - + Decreases the multiplicity of the selected knot of a B-spline Уменьшение кратности выбранного узла B-сплайна @@ -1081,12 +1081,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Продлить грань - + Extend an edge with respect to the picked position Продлить грань до ближайшего пересечения @@ -1094,12 +1094,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Создать внешнюю геометрию - + Create an edge linked to an external geometry Добавить внешнюю геометрию @@ -1107,12 +1107,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Увеличить степень B-сплайна - + Increases the degree of the B-spline Увеличить степень B-сплайна @@ -1120,12 +1120,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Увеличение кратности узлов - + Increases the multiplicity of the selected knot of a B-spline Увеличение кратности выбранного узла B-сплайна @@ -1133,12 +1133,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Вставить узел - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Вставляет узел с заданным параметром. Если узел уже существует с этим параметром, то его кратность увеличивается на единицу. @@ -1146,12 +1146,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Объединить кривые - + Join two curves at selected end points Объединить две кривые в выбранных конечных точках @@ -1436,12 +1436,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Разделить ребро - + Splits an edge into two while preserving constraints Разделить ребро на две части с сохранением ограничений @@ -1462,12 +1462,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Переключение виртуального пространства - + Switches the selected constraints or the view to the other virtual space Переключает выбранные ограничения или вид в другое виртуальное пространство @@ -1488,12 +1488,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Вкл/выкл ограничение - + Activates or deactivates the selected constraints Вкл/выкл выбранные ограничения @@ -1514,12 +1514,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Переключить ограничения в построительные/основные - + Set the toolbar, or the selected constraints, into driving or reference mode Переключает панель инструментов или преобразует выбранные ограничения, в режим построительной/основной геометрии @@ -1528,12 +1528,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Обрезать линию - + Trim an edge with respect to the picked position Обрезать часть линии до указанной позиции @@ -1592,369 +1592,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Добавить ограничение по горизонтали - - - + + + Add horizontal alignment Добавить горизонтальное выравнивание - - + + Add vertical constraint Добавить ограничение по вертикали - + Add vertical alignment Добавить вертикальное выравнивание - + Add 'Lock' constraint Добавить 'Блокирующее' ограничение - + Add relative 'Lock' constraint Добавить относительное ограничение 'Блокировка' - + Add fixed constraint Добавить фиксированное ограничение - + Add 'Block' constraint Добавить ограничение 'Блок' - + Add block constraint Добавить ограничение блока - - - + + + Add coincident constraint Добавить ограничение совпадения - - + + Add distance from horizontal axis constraint Добавить ограничение расстояния от горизонтальной оси - - + + Add distance from vertical axis constraint Добавить ограничение расстояния от вертикальной оси - - + + Add point to point distance constraint Добавить точку к ограничению расстояния до точки - - - + + + Add point to line Distance constraint Добавить точку к ограничению расстояния до линии - - + + Add circle to circle distance constraint Добавить круг к ограничениям расстояния круга - + Add circle to line distance constraint Добавить круг к ограниченияю линейного расстояния - - - - - + + + + + + Add length constraint Добавить ограничение длины - - + + Dimension Размер - + Add lock constraint - Add lock constraint + Добавить ограничение блокировки - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Добавить ограничение "Расстояние до базовой точки" - - - + + + Add Distance constraint - Add Distance constraint + Добавить ограничение по расстоянию - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Добавить ограничение "горизонтальность" - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Добавить ограничение "вертикальность" + + Add Symmetry constraint + Добавить ограничение симметричности + + + + + Add Symmetry constraints + Добавить ограничения симметричности + + + + + Add Distance constraints + Добавить ограничения по расстоянию + + + + Add Horizontal constraint + Добавить ограничение "горизонтальность" + + + + Add Vertical constraint + Добавить ограничение "вертикальность" + + + Add Block constraint - Add Block constraint + Добавить ограничение "блокировка" - + Add Angle constraint - Add Angle constraint + Добавить ограничение угла - - - + + + Add Equality constraint - Add Equality constraint + Добавить ограничение равенства - + Add Equality constraints - Add Equality constraints + Добавить ограничения равенства - + Add Radius constraint - Add Radius constraint + Добавить ограничение радиуса - + Add concentric and length constraint - Add concentric and length constraint + Добавить ограничения концентричность и равенство длины - + Add DistanceX constraint - Add DistanceX constraint + Добавить ограничение расстояния по X - + Add DistanceY constraint - Add DistanceY constraint + Добавить ограничение расстояния по Y - + Add point to circle Distance constraint - Add point to circle Distance constraint + Добавить точку в Ограничение расстояния круга - - + + Add point on object constraint Добавить точку на ограничение объекта - - + + Add point to point horizontal distance constraint Добавить точку к ограничению расстояния по горизонтали - + Add fixed x-coordinate constraint Добавить фиксированное ограничение X-координаты - - + + Add point to point vertical distance constraint Добавить точку к ограничению расстояния по вертикали - + Add fixed y-coordinate constraint Добавить фиксированное ограничение Y-координаты - - + + Add parallel constraint Добавить ограничение параллельности - - - - - - - + + + + + + + Add perpendicular constraint Добавить ограничение перпендикулярности - + Add perpendicularity constraint Добавить ограничение перпендикулярности - + Swap coincident+tangency with ptp tangency Поменять совпадение + касание на ptp касание - + Swap PointOnObject+tangency with point to curve tangency Поменять точка на объекте + касательная на касательную к кривой - - - - - - - + + + + + + + Add tangent constraint Добавить касательное ограничение - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Добавить точку касательного ограничения - - - - + + + + Add radius constraint Добавить ограничение радиуса - - - - + + + + Add diameter constraint Добавить ограничение диаметра - - - - + + + + Add radiam constraint Добавить ограничение радиуса - - - - - - + + + + + + Add angle constraint Добавить ограничение угла - - + + Add equality constraint Добавить ограничение равенства - - - - - + + + + + Add symmetric constraint Добавить ограничение симметричности - + Add Snell's law constraint Добавить ограничение по закону Снеллиуса - + Toggle constraint to driving/reference Переключить ограничения в построительные/основные - + Activate/Deactivate constraint Вкл/выкл ограничение @@ -2014,44 +2015,44 @@ invalid constraints, degenerated geometry, etc. Добавить блок по центру эскиза - + Add rounded rectangle Добавить скруглённый прямоугольник - + Add line to sketch wire Добавить линию к эскизу ломаной линии - + Add arc to sketch wire Добавить дугу к ломаной линии эскиза - - + + Add sketch arc Добавить эскиз дуги - - + + Add sketch circle Добавить эскиз окружности - + Add sketch ellipse Добавить эскиз эллипса - + Add sketch arc of ellipse Добавить эскиз дуги эллипса - + Add sketch arc of hyperbola Добавить эскиз дуги гиперболы @@ -2071,33 +2072,33 @@ invalid constraints, degenerated geometry, etc. Добавить точку эскиза - - + + Create fillet Создать скругление - + Trim edge Обрезать линию - + Extend edge Продлить грань - + Split edge Разделить ребро - + Add external geometry Добавить внешнюю геометрию - + Add slot Добавить слот @@ -2107,37 +2108,37 @@ invalid constraints, degenerated geometry, etc. Добавить шестиугольник - + Convert to NURBS Преобразовать в NURBS - + Increase spline degree Увеличить степень сплайна - + Decrease spline degree Уменьшить степень сплайна - + Increase knot multiplicity Увеличение кратности узлов - + Decrease knot multiplicity Уменьшение кратности узлов - + Insert knot Вставить узел - + Join Curves Объединить кривые @@ -2177,12 +2178,12 @@ invalid constraints, degenerated geometry, etc. Удалить выравнивание осей - + Toggle constraints to the other virtual space Переключить ограничения на другое виртуальное пространство - + @@ -2190,7 +2191,7 @@ invalid constraints, degenerated geometry, etc. Обновить ограничения виртуального пространства - + Add auto constraints Добавить автоматические ограничения @@ -2230,7 +2231,7 @@ invalid constraints, degenerated geometry, etc. Добавить точку узла - + Create a carbon copy Создать копию @@ -2246,37 +2247,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Ошибка автоограничения: Эскиз нерешаем при добавлении ограничения совпадения. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Ошибка автоограничения: Эскиз нерешаем при добавлении вертикального/горизонтального ограничения. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Ошибка автоограничения: Эскиз нерешаем при добавлении ограничения равенства. - + Autoconstrain error: Unsolvable sketch without constraints. Ошибка автоограничения: Эскиз нерешаем без ограничений. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Ошибка автоограничения: Эскиз нерешаем после добавления вертикального и горизонтального ограничений. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Ошибка автоограничения: Эскиз нерешаем при добавлении ограничения совпадения точек. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Ошибка автоограничения: Эскиз нерешаем после добавлении ограничения равенства. @@ -2401,143 +2402,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2553,9 +2554,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Неправильный выбор @@ -2576,329 +2577,329 @@ invalid constraints, degenerated geometry, etc. Размерное ограничение - + Cannot add a constraint between two external geometries. Невозможно добавить ограничение между двумя внешними геометриями. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Невозможно добавить ограничение между двумя фиксированными геометриями. Фиксированная геометрия включает в себя внешнюю геометрию, заблокированную геометрию или специальные точки в качестве точек узла B-сплайна. - + Sketcher Constraint Substitution Замена ограничения эскиза - + Keep notifying me of constraint substitutions Продолжайте уведомлять меня о заменах ограничений - - - + + + Only sketch and its support are allowed to be selected. Только эскиз и его поддержка разрешены. - + One of the selected has to be on the sketch. Один из выбранных должен находиться на эскизе. - - + + Select an edge from the sketch. Выбирите ребро в эскизе. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Ограничение невозможно - - - - + + + + The selected edge is not a line segment. Выбранное ребро не является сегментом линии. - - - - - - + + + + + + Double constraint Избыточное ограничение - - - - - + + + + + The selected edge already has a horizontal constraint! Выбранная линия уже имеет ограничение горизонтальности! - - - + + + The selected edge already has a vertical constraint! Выбранная линия уже имеет ограничение вертикальности! - - - - - - + + + + + + The selected edge already has a Block constraint! Выбранная линия уже имеет Блочное ограничение! - + The selected item(s) can't accept a horizontal constraint! На выбранные элемент(ы) нельзя наложить ограничение горизонтальности! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Выбрано несколько фиксированных точек. Выберите максимум одну фиксированную точку! - + The selected item(s) can't accept a vertical constraint! На выбранные элемент(ы) нельзя наложить ограничение вертикальности! - - - + + + Select vertices from the sketch. Выберите вершины из эскиза. - + Select one vertex from the sketch other than the origin. Выберите одну вершину из эскиза, кроме начальной. - + Select only vertices from the sketch. The last selected vertex may be the origin. Выберите только вершины из эскиза. Последняя выбранная вершина может быть начальной. - + Wrong solver status Неправильный статус решателя - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Блокирующее ограничение не может быть добавлено, если эскиз не решаем или имеются избыточные или конфликтующие ограничения. - + Select one edge from the sketch. Выберите одну линию из эскиза. - + Select only edges from the sketch. Выберите линии из эскиза. - + Number of selected objects is not 3 Количество выбранных объектов не 3 - - - + + + Error Ошибка - + Unexpected error. More information may be available in the Report View. Неожиданная ошибка. Дополнительные сведения могут быть доступны в представлении отчета. - + Endpoint to endpoint tangency was applied instead. Вместо конечной точки применена касательная. - + Select two or more points from the sketch. Выберите две или более точек на эскизе. - + Select two or more vertices from the sketch. Выберите не менее двух вершин на эскизе. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Выберите две или более вершины из эскиза для ограничения совпадения, или два или более кругов, эллипсов, дуг или дуг эллипса для концентрационного ограничения. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Выберите две вершины из эскиза для ограничения совпадения, или два круга, эллипса, дуги или дуги эллипса для ограничения концентрации. - + Select exactly one line or one point and one line or two points from the sketch. Выделите либо один отрезок, либо точку и отрезок, либо две точки. - + Cannot add a length constraint on an axis! Нельзя наложить ограничение длины на ось! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Выделить ровно одну линию или одну точку и одну линию или две точки или два круга из эскиза. - + This constraint does not make sense for non-linear curves. Это ограничение не имеет смысла для нелинейных кривых. - + Endpoint to edge tangency was applied instead. Вместо этого было применено касание конечной точки к краю. - - - - - - - + + + + + + + Select the right things from the sketch. Выберите нужные объекты из эскиза. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Выберите край, который не является B-сплайном. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ни одна из выбранных точек не была ограничена на соответствующие кривые, поскольку они являются частями одного и того же элемента, потому что они и внешняя геометрия, или потому, что край не является допустимым. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ни одна из выбранных точек не была ограничена соответствующими кривыми либо потому, что они являются частями одного и того же элемента, либо потому, что они являются внешней геометрией. - - - - + + + + Select exactly one line or up to two points from the sketch. Выберите один отрезок или две точки эскиза. - + Cannot add a horizontal length constraint on an axis! Нельзя наложить ограничение длины на ось! - + Cannot add a fixed x-coordinate constraint on the origin point! Невозможно ограничить X-координату точки начала координат! - - + + This constraint only makes sense on a line segment or a pair of points. Это ограничение имеет смысл только для сегмента линии или пары точек. - + Cannot add a vertical length constraint on an axis! Нельзя наложить ограничение длины на ось! - + Cannot add a fixed y-coordinate constraint on the origin point! Невозможно ограничить Y-координату точки начала координат! - + Select two or more lines from the sketch. Выберите два или более отрезков эскиза. - - + + Select at least two lines from the sketch. Нужно выделить как минимум две линии. - + Select a valid line. Выберите правильную линию. - - + + The selected edge is not a valid line. Выделенное ребро некорректно. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2908,42 +2909,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Допустимы следующие комбинации: две кривые; концевая точка и кривая; две концевых точки; две кривых и точка. - + Select some geometry from the sketch. perpendicular constraint Выделите геометрические элементы на эскизе. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не удаётся наложить ограничение перпендикулярности на точку, так как выделенная точка не является концом кривой. - - - + + + Perpendicular to B-spline edge currently unsupported. Перпендикуляр к кромке B-сплайна в настоящее время не поддерживается. - - + + One of the selected edges should be a line. Один из выбранных элементов должен быть линией. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Применена касательность конечной точки к конечной точке. Ограничение совпадения было удалено. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Было применено касание конечной точки к краю. Точка ограничения объекта удалена. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2951,277 +2952,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Существует несколько способов применения этого ограничения. Допустимые комбинации: две кривые; конечная точка и кривая; две конечные точки; две кривые и точка. - + Select some geometry from the sketch. tangent constraint Выделите геометрические элементы на эскизе. - - - + + + Cannot add a tangency constraint at an unconnected point! Не удаётся наложить ограничение касательности на точку, так как выделенная точка не является концом кривой. - - + + Tangent constraint at B-spline knot is only supported with lines! Зависимость касательной в узле B-сплайн поддерживается только линиями! - + B-spline knot to endpoint tangency was applied instead. Вместо этого был применен узел B-сплайна к касанию конечной точки. - + Select either one point and several curves, or one curve and several points. Выберите либо одну точку, либо несколько кривых, либо одну кривую и несколько точек. - - + + Wrong number of selected objects! Неправильное количество выбранных объектов! - - + + With 3 objects, there must be 2 curves and 1 point. С 3 объектами должно быть 2 кривых и 1 точка. - - - + + + Tangency to B-spline edge currently unsupported. Касательность к краю B-сплайна в настоящее время не поддерживается. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Сначала выделите одну или несколько окружностей или дуг окружности из эскиза. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Выберите либо только один или несколько полюсов B-сплайна, либо только одну или несколько дуг или окружностей из эскиза, но не смешивайте их. - - - + + + Constraint only applies to arcs or circles. Ограничение применимо только к дугам или окружностям. - - + + Select one or two lines from the sketch. Or select two edges and a point. Нужно выделить одну линию, или две линии, или две кривые и точку. - - + + Parallel lines Параллельные линии - - + + An angle constraint cannot be set for two parallel lines. Задать ограничение угла между параллельными линиями невозможно. - + Cannot add an angle constraint on an axis! Наложить ограничение угла на ось невозможно! - + Select two edges from the sketch. Выберите два ребра в эскизе. - + Select two or more compatible edges. Выберите совместимые рёбра, два или более. - + Sketch axes cannot be used in equality constraints. Оси эскиза нельзя использовать в ограничениях равенства. - + Equality for B-spline edge currently unsupported. Равенство для края B-сплайна в настоящее время не поддерживается. - - - - + + + + Select two or more edges of similar type. Выберите рёбра аналогичного типа, два или более. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Выделите две точки и линию симметрии, либо две точки и точку симметрии, либо линию и точку симметрии. - - + + Cannot add a symmetry constraint between a line and its end points. Невозможно добавить ограничение симметрии между линией и её конечными точками. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Не удается добавить ограничение симметрии, так как обе точки являются концами линии, задающей ось симметрии. - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Выберите две конечные точки линий, которые будут выступать в качестве лучей, и ребро, представляющее собой границу. Первая выбранная точка соответствует индексу n1, вторая — n2, а значение привязки задает отношение n2/n1. - + Selected objects are not just geometry from one sketch. Выбранные объекты не являются только геометрией из одного эскиза. - + Cannot create constraint with external geometry only. Невозможно создать ограничение с использованием только внешней геометрии. - + Incompatible geometry is selected. Выбрана несовместимая геометрия. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw на кромке B-сплайна в настоящее время не поддерживается. - - - - - + + + + + Select constraints from the sketch. Выделить ограничения в эскизе. - - - + + + Select constraint(s) from the sketch. Выберите ограничения в эскизе. - + B-Spline Degree Степень B-сплайна - + Define B-Spline Degree, between 1 and %1: Укажите степень B-сплайна, между 1 и %1: - - - + + + CAD Kernel Error Ошибка ядра CAD - + None of the selected elements is an edge. Ни один из выбранных элементов не является ребром. - - + + At least one of the selected objects was not a B-Spline and was ignored. По крайней мере один из выбранных объектов не B-сплайн и был проигнорирован. - - + + The selection comprises more than one item. Please select just one knot. Выбор состоит из нескольких элементов. Пожалуйста, выберите только один узел. - - + + Input Error Ошибка ввода - - + + None of the selected elements is a knot of a B-spline Ни один из выбранных элементов не является узлом B-сплайна - - + + Selection is empty Пустое выделение - + Nothing is selected. Please select a b-spline. Ничего не выбрано. Пожалуйста, выберите B-сплайн. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Выберите кривую b-сплайна, чтобы вставить узел (не узел на ней). Если кривая не является b-сплайном, сначала преобразуйте ее в один. - + Nothing is selected. Please select end points of curves. Ничего не выбрано. Пожалуйста, выберите конечные точки кривых. - + Too many curves on point Слишком много кривых в точке - - + + Exactly two curves should end at the selected point to be able to join them. Ровно две кривые должны заканчиваться в выбранной точке, чтобы их можно было соединить. - + Too few curves on point Слишком мало кривых в точке - + Two end points, or coincident point should be selected. Следует выбрать две конечные точки или совпадающие точки. @@ -3301,17 +3302,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c В настоящее время не поддерживается перемещение внешней геометрии на другой визуальный слой. Внешняя геометрия будет опущена - + Set knot multiplicity Установить кратность узла - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Установите кратность узла в последней указанной точке, между 1 и %1: Обратите внимание, что кратность может быть проигнорирована при определенных обстоятельствах. Подробную информацию см. в документации. - + Value Error Ошибка значения @@ -3625,12 +3626,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Длина: - + Refractive index ratio Отношение показателей преломления - + Ratio n2/n1: Отношение n2/n1: @@ -3910,8 +3911,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Безымянный @@ -4132,30 +4133,30 @@ Requires to re-enter edit mode to take effect. Dimension Constraint - Dimension Constraint + Ограничение размера Dimensioning constraints: - Dimensioning constraints: + Ограничения по размерам: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Выберите тип размерных ограничений для панели инструментов: +«Один инструмент»: один инструмент для всех размерных ограничений на панели инструментов: Расстояние, Расстояние X / Y, Угол, Радиус. (Другие в раскрывающемся списке) +«Отдельные инструменты»: отдельные инструменты для каждого размерного ограничения. +«Оба»: у вас будет как инструмент «Измерение», так и отдельные инструменты. +Этот параметр предназначен только для панели инструментов. Что бы вы ни выбрали, все инструменты всегда доступны в меню и через ярлыки. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Режим измерения диаметра/радиуса инструмента: @@ -4163,38 +4164,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + При использовании инструмента «Размер» вы можете выбрать способ обработки окружностей и дуг: +«Авто»: инструмент применит радиус к дугам и диаметр к кругам. +«Диаметр»: инструмент применяет диаметр как к дугам, так и к окружностям. +«Радиус»: инструмент применит радиус как к дугам, так и к окружностям. - + Single tool - Single tool + Одиночный инструмент - + Separated tools - Separated tools + Отдельные инструменты - + Both Оба варианта одновременно (три панели) - + Auto Авто - + Diameter Диаметр - + Radius Радиус @@ -4643,12 +4644,12 @@ Then objects are only visible behind the sketch plane. Применить к существующим эскизам - + Unexpected C++ exception Неожиданное исключение C++ - + Sketcher Набросок @@ -4656,55 +4657,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Недостающих стыков нет - + No missing coincidences found Недостающих ограничений коинцидентности не найдено - + Missing coincidences Пропущенные коинцидентности - + %1 missing coincidences found Недостающих ограничений коинцидентности: %1 - + No invalid constraints Нет неисправных ограничений - + No invalid constraints found Неисправных ограничений не найдено - + Invalid constraints Неисправные ограничения - + Invalid constraints found Обнаружены неисправные ограничения - - - + + + Reversed external geometry Перевёрнутая внешняя геометрия - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4717,7 +4718,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Нажмите кнопку "Поменять конц. точки в ограничениях", чтобы поменять ссылки в ограничениях на противоположные точки. Это нужно сделать для исправления эскизов, созданных во FreeCAD версий старее, чем v0.15, причем только один раз - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4726,75 +4727,70 @@ However, no constraints linking to the endpoints were found. Однако, ни одно ограничение не ссылается на концевые точки этих дуг. - + No reversed external-geometry arcs were found. Не найдено ни одной перевёрнутой дуги окружности. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Было сделано %1 изменений в ограничениях, ссылающихся на концевые точки перевёрнутых дуг. - - + + Constraint orientation locking Фиксация ориентации ограничения - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Блокировка ориентации была включена и пересчитана для %1 ограничений. Эти ограничения были перечислены в окне просмотра отчёта (меню Вид -> Виды -> Просмотр отчёта). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Блокировка ориентации была отключена для %1 ограничений. Эти ограничения были перечислены в окне просмотра отчёта (меню Вид -> Виды -> Просмотр отчёта). Обратите внимание, что для всех новых ограничений, блокировка будет всё равно по умолчанию включаться. - - + + Delete constraints to external geom. Удалить ограничения к геом. извне - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Вы собираетесь удалить ВСЕ ограничения, которые связаны с внешней геометрией. Это полезно для восстановления эскиза с поврежденными/изменёнными ссылками на внешнюю геометрию. Вы уверены, что хотите удалить эти ограничения? - + All constraints that deal with external geometry were deleted. Все ограничения, связанные с внешней геометрией, были удалены. - + No degenerated geometry Нет вырождающейся геометрии - + No degenerated geometry found Не найдено вырождающейся геометрии - + Degenerated geometry Вырождающаяся геометрия - + %1 degenerated geometry found Найдено вырождающейся геометрии %1 SketcherGui::TaskSketcherConstraints - - - Form - Форма - Check to toggle filters @@ -4869,11 +4865,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Форма - Check to toggle filters @@ -5059,7 +5050,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Дополнительное управление решателем @@ -5352,8 +5343,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Показать/скрыть кривизну всех B-сплайнов @@ -5361,8 +5352,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Уменьшение кратности выбранного узла B-сплайна @@ -5370,8 +5361,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Переключение между показом и скрытием степени для всех B-сплайнов @@ -5379,8 +5370,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Увеличение кратности выбранного узла B-сплайна @@ -5388,8 +5379,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Переключение между отображением и сокрытием мультипликативных узлов для всех B-сплайнов @@ -5397,8 +5388,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Переключает между отображением и скрытием контрольной точки для всех B-сплайнов @@ -5406,8 +5397,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Показать/скрыть управляющие полигоны всех B-сплайнов @@ -5442,8 +5433,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Задать диаметр окружности или дуги @@ -5451,7 +5442,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Исправляет радиус/диаметр окружности или дуги @@ -5459,8 +5450,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Зафиксировать радиус окружности или дуги @@ -5468,7 +5459,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Исправляет радиус/диаметр окружности или дуги @@ -5485,8 +5476,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Создать дугу, указав её конечные точки и точку вдоль дуги @@ -5494,8 +5485,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Создать окружность, проходящую через три точки @@ -5503,8 +5494,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Создать дугу по её центру и её конечным точкам @@ -5512,8 +5503,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Создать дугу эллипса по центру, большому радиусу и конечным точкам @@ -5521,8 +5512,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Создать дугу гиперболы по ее центру, большому радиусу и конечным точкам @@ -5530,8 +5521,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Создать дугу параболы по её фокусу, вершине и конечным точкам @@ -5539,13 +5530,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-сплайн по контрольным точкам - - + + Create a B-spline by control points Создать B-сплайн по контрольным точкам @@ -5553,8 +5544,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Создать круг, используя его центр и периферийную точку @@ -5562,8 +5553,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Создать дугу эллипса по большому диаметру и точке @@ -5571,8 +5562,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Создать эллипс по центру и двум радиусам @@ -5580,8 +5571,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Создает скругление между двумя линиями @@ -5589,8 +5580,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Создать правильный семиугольник @@ -5598,8 +5589,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Создать правильный шестиугольник @@ -5607,7 +5598,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Создать скруглённый прямоугольник @@ -5615,14 +5606,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Создать правильный восьмиугольник - - + + Create a regular polygon by its center and by one corner Создать правильный многоугольник по центру и одному углу @@ -5630,8 +5621,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Создать правильный пятиугольник @@ -5639,8 +5630,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Скругление с сохранением ограничений и точки пересечения @@ -5648,7 +5639,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Создать прямоугольник @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Создать центрированный прямоугольник @@ -5664,8 +5655,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Создать квадрат @@ -5673,8 +5664,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Создать правильный треугольник @@ -5682,13 +5673,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Периодический B-сплайн по контрольным точкам - - + + Create a periodic B-spline by control points Создать периодический B-сплайн по контрольным точкам @@ -6107,7 +6098,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster Sketcher - Набросок + Sketcher @@ -6320,38 +6311,38 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error - Ошибки + Ошибка @@ -6369,45 +6360,45 @@ The grid spacing change if it becomes smaller than this number of pixel.Ограничение имеет неверную индексную информацию и является неправильным. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Недопустимое ограничение - - - + + + Failed to add arc Не удалось добавить дугу - + Failed to add arc of ellipse Не удалось добавить дугу эллипса - + Cannot create arc of hyperbola from invalid angles, try again! Невозможно создать дугу гиперболы с недействительными углами. Попробуйте еще раз! - + Cannot create arc of hyperbola Нельзя создать дугу гиперболы - + Cannot create arc of parabola Невозможно создать дугу параболы @@ -6417,18 +6408,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Ошибка при добавлении полюса B-Spline - + Error creating B-spline pole Ошибка при создании полюса B-сплайна - - + + Error creating B-spline Ошибка создания B-сплайна - + Error deleting last pole Ошибка удаления последнего полюса @@ -6438,49 +6429,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Не удается добавить точку узла - + Cannot add internal alignment points Не удается добавить внутренние точки выравнивания - + Error removing knot Ошибка удаления узла - + Failed to add carbon copy Не удалось добавить копию - - + + Failed to add circle Не удалось добавить круг - + Failed to add an ellipse Не удалось добавить эллипс - + Failed to extend edge Не удалось расширить ребро - + Failed to add external geometry Не удалось добавить внешнюю геометрию - + Failed to create fillet Не удалось создать кромку - + Failed to add line Не удалось добавить строку @@ -6490,7 +6481,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Не удалось добавить точку - + Failed to add polygon Не удалось добавить многоугольник @@ -6500,27 +6491,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Не удалось добавить коробку - + Failed to add rounded rectangle Не удалось добавить округленный прямоугольник - + Failed to add slot Не удалось добавить паз - + Failed to add edge Не удалось добавить ребро - + Failed to trim edge Не удалось обрезать ребро - + Value Error @@ -6530,13 +6521,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-сплайн узлами - - + + Create a B-spline by knots Создать B-сплайн с помощью узлов @@ -6544,13 +6535,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Периодический B-сплайн узлами - - + + Create a periodic B-spline by knots Создать периодический B-сплайн узлами @@ -6656,12 +6647,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Создать B-сплайн по узлам - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Создать B-сплайн по узлам, т.е. путем интерполяции, в эскизе. @@ -6669,12 +6660,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Создать периодический B-сплайн по узлам - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Создайте периодический B-сплайн по узлам, т.е. путем интерполяции, в эскизе. @@ -6682,31 +6673,44 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Размер - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Ограничьте контекстуально на основе вашего выбора. +В зависимости от вашего выбора у вас может быть несколько доступных ограничений. Вы можете переключаться между ними, используя клавишу SHIFT. +Щелчок левой кнопкой мыши по пустому пространству подтвердит текущее ограничение. Щелчок правой кнопкой мыши или нажатие Esc приведет к отмене. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Показать/скрыть помощник по окружности для дуг - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Переключает между отображением и скрытием кругового помощника для всех дуг + + + + CmdSketcherCompDimensionTools + + + Dimension + Размер + + + + Dimension tools. + Инструменты измерения. diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts index 9431cb2077..bb3584b6e0 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Ustvari dvojnika - + Copy the geometry of another sketch Kopiraj geometrijo drugega očrta @@ -100,27 +100,27 @@ Prikaži/skrij podatkovni sloj B-zlepka - + Show/hide B-spline degree Prikaži/skrij stopnjo B-zlepka - + Show/hide B-spline control polygon Prikaži/skrij nadzorni mnogokotnik B-zlepka - + Show/hide B-spline curvature comb Prikaži/skrij glavnikast prikaz ukrivljenosti B-zlepka - + Show/hide B-spline knot multiplicity Prikaži/skrij večkratnost vozla B-zlepka - + Show/hide B-spline control point weight Prikaži/skrij utežitev krmilnih točk B-zlepka @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Omeji krožni lok ali krožnico - + Constrain an arc or a circle Omeji krožni lok ali krožnico - + Constrain radius Omeji polmer - + Constrain diameter Omeji premer - + Constrain auto radius/diameter Samodejno omeji polmer/premer @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Ustvari lok - + Create an arc in the sketcher Ustvari lok v očrtovalniku - + Center and end points Središče in krajišči - + End points and rim point Krajišči in točka na obodu @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Ustvari B-zlepek - + Create a B-spline in the sketch Ustvari B-zlepek v očrtu @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Ustvari krog - + Create a circle in the sketcher Ustvari krog v očrtovalniku - + Center and rim point Središče in točka na obodu - + 3 rim points 3 točke na obodu @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Ustvari stožnico - + Create a conic in the sketch Ustvari stožnico v očrtu - + Ellipse by center, major radius, point Elipsa s središčem, velikim polmerom in točko - + Ellipse by periapsis, apoapsis, minor radius Elipsa s periapsido, apoapsido in malim polmerom - + Arc of ellipse by center, major radius, endpoints Lok elipse s središčem, velikim polmerom in končnima točkama - + Arc of hyperbola by center, major radius, endpoints Lok hiperbole s središčem, velikim polmerom in končnima točkama - + Arc of parabola by focus, vertex, endpoints Lok parabole z goriščem, temenom in končnima točkama @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Ustvari zaokrožitev - + Create a fillet between two lines Ustvari zaokrožitev med dvema daljicama - + Sketch fillet Očrtna zaokrožitev - + Constraint-preserving sketch fillet Očrtna zaokrožitev z ohranitvijo omejila @@ -299,17 +299,17 @@ V očrtu naredi pravokotnik - + Rectangle Pravokotnik - + Centered rectangle Usredinjen pravokotnik - + Rounded rectangle Zaobljen pravokotnik @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Ustvari preprosti mnogokotnik - + Create a regular polygon in the sketcher Ustvari pravilni mnogokotnik v očrtovalniku - + Triangle Trikotnik - + Square Kvadrat - + Pentagon Petkotnik - + Hexagon Šestkotnik - + Heptagon Sedemkotnik - + Octagon Osemkotnik - + Regular polygon Pravilni mnogokotnik @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Spremeni večkratnost vozla - + Modifies the multiplicity of the selected knot of a B-spline Spremeni večkratnost izbranih vozlov B-zlepka - + Increase knot multiplicity Povečaj večkratnost vozla - + Decrease knot multiplicity Zmanjšaj večkratnost vozla @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Kotno omejilo - + Fix the angle of a line or the angle between two lines Določi kót daljice ali kót med dvema daljicama @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Omeji zbir - + Block the selected edge from moving Prepreči premikanje izbranega robu @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Omeji sovpadanje - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Ustvari sovpadno omejilo za točke ali sosrediščno omejilo za kroge, loke in elipse @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Omeji premer - + Fix the diameter of a circle or an arc Določi premer krožnice ali krožnega loka @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Omeji razdaljo - + Fix a length of a line or the distance between a line and a vertex or between two circles Določi dolžino daljice ali razdaljo med daljico in ogliščem oz. med dvema krogoma @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Omeji vodoravno razdaljo - + Fix the horizontal distance between two points or line ends Določi vodoravno razdaljo med dvema točkama ali krajiščema @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Omeji navpično razdaljo - + Fix the vertical distance between two points or line ends Določi navpično razdaljo med dvema točkama ali krajiščema @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Omeji na enakost - + Create an equality constraint between two lines or between circles and arcs Ustvari enakostno omejilo med dvema črtama ali med krogi in loki @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Omeji na vodoravnost - + Create a horizontal constraint on the selected item Ustvari vodoravno omejilo na izbranem predmetu @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Zaklenjeno omejilo - + Create both a horizontal and a vertical distance constraint on the selected vertex Ustvari omejilo navpične in vodoravne oddaljenosti izbranega oglišča @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Omeji z vzporednostjo - + Create a parallel constraint between two lines Ustvari omejilo vzporednosti med dvema črtama @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Omeji s pravokotnostjo - + Create a perpendicular constraint between two lines Ustvari pravokotno omejilo med dvema črtama @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Omeji točko na predmet - + Fix a point onto an object Pritrdi točko na predmet @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Samodejno omeji polmer/premer - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Zakleni premer, če izbran krog, oz. polmer, če je izbran lok/tečaj zlepka @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Omeji polmer ali utežitev - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Zakleni polmer kroga oz. loka ali zakleni utežitev tečaja B-zlepka @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Lomno omejilo (lomni zakon) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Ustvari omejitev lomnega zakona med dvema končnima točkama žarkov @@ -599,12 +599,12 @@ in robom, ki predstavlja mejo. CmdSketcherConstrainSymmetric - + Constrain symmetrical Omeji s somernostjo - + Create a symmetry constraint between two points with respect to a line or a third point Ustvari omejitev somernosti med dvema točkama @@ -614,12 +614,12 @@ glede na črto ali tretjo točko CmdSketcherConstrainTangent - + Constrain tangent Omeji z dotikalnostjo - + Create a tangent constraint between two entities Ustvari dotikalno omejilo med dvema prvinama @@ -627,12 +627,12 @@ glede na črto ali tretjo točko CmdSketcherConstrainVertical - + Constrain vertically Omeji na navpičnost - + Create a vertical constraint on the selected item Ustvari navpičnostno omejilo na izbranem predmetu @@ -640,12 +640,12 @@ glede na črto ali tretjo točko CmdSketcherConvertToNURBS - + Convert geometry to B-spline Pretvori geometrijo v B-zlepek - + Converts the selected geometry to a B-spline Pretvori izbrano geometrijo v B-zlepek @@ -666,12 +666,12 @@ glede na črto ali tretjo točko CmdSketcherCreate3PointArc - + Create arc by three points Ustvari lok s tremi točkami - + Create an arc by its end points and a point along the arc Ustvari lok s končnima točkama in točko na njem @@ -679,12 +679,12 @@ glede na črto ali tretjo točko CmdSketcherCreate3PointCircle - + Create circle by three points Ustvari krog s tremi točkami - + Create a circle by 3 perimeter points Ustvari krog s trem točkami na obodu @@ -692,12 +692,12 @@ glede na črto ali tretjo točko CmdSketcherCreateArc - + Create arc by center Ustvari lok s središčem - + Create an arc by its center and by its end points Ustvari lok s središčem in končnima točkama @@ -705,12 +705,12 @@ glede na črto ali tretjo točko CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Ustvari eliptični lok - + Create an arc of ellipse in the sketch Ustvari eliptični lok v očrtu @@ -718,12 +718,12 @@ glede na črto ali tretjo točko CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Ustvari hiperbolični lok - + Create an arc of hyperbola in the sketch Ustvari lok hiperbole v očrtu @@ -731,12 +731,12 @@ glede na črto ali tretjo točko CmdSketcherCreateArcOfParabola - + Create arc of parabola Ustvari metnični (paraboličen) lok - + Create an arc of parabola in the sketch Ustvari lok parabole v očrtu @@ -744,12 +744,12 @@ glede na črto ali tretjo točko CmdSketcherCreateBSpline - + Create B-spline Ustvari B-zlepek - + Create a B-spline by control points in the sketch. Ustvari B-zlepek z nadzornimi točkami v očrtu. @@ -757,12 +757,12 @@ glede na črto ali tretjo točko CmdSketcherCreateCircle - + Create circle Ustvari krog - + Create a circle in the sketch Ustvari krog v očrtu @@ -770,12 +770,12 @@ glede na črto ali tretjo točko CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Ustvari elipso s tremi točkami - + Create an ellipse by 3 points in the sketch Ustvari elipso s tremi točkami v očrtu @@ -783,12 +783,12 @@ glede na črto ali tretjo točko CmdSketcherCreateEllipseByCenter - + Create ellipse by center Ustvari elipso s središčem - + Create an ellipse by center in the sketch Ustvari v očrtu elipso s središčem @@ -796,12 +796,12 @@ glede na črto ali tretjo točko CmdSketcherCreateFillet - + Create fillet Ustvari zaokrožitev - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ glede na črto ali tretjo točko CmdSketcherCreateHeptagon - + Create heptagon Ustvari sedemkotnik - + Create a heptagon in the sketch Ustvari sedemkotnik v očrtu @@ -822,12 +822,12 @@ glede na črto ali tretjo točko CmdSketcherCreateHexagon - + Create hexagon Ustvari šestkotnik - + Create a hexagon in the sketch Ustvari šestkotnik v očrtu @@ -861,12 +861,12 @@ glede na črto ali tretjo točko CmdSketcherCreateOctagon - + Create octagon Ustvari osemkotnik - + Create an octagon in the sketch Ustvari osemkotnik v očrtu @@ -874,12 +874,12 @@ glede na črto ali tretjo točko CmdSketcherCreatePentagon - + Create pentagon Ustvari petkotnik - + Create a pentagon in the sketch Ustvari petkotnik v očrtu @@ -887,12 +887,12 @@ glede na črto ali tretjo točko CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Ustvari sklenjeni B-zlepek - + Create a periodic B-spline by control points in the sketch. Ustvari sklenjeni B-zlepek z nadzornimi točkami v očrtu. @@ -900,12 +900,12 @@ glede na črto ali tretjo točko CmdSketcherCreatePoint - + Create point Ustvari točko - + Create a point in the sketch Ustvari točko v očrtu @@ -913,12 +913,12 @@ glede na črto ali tretjo točko CmdSketcherCreatePointFillet - + Create corner-preserving fillet Ustvari zaokrožitev z ohranitvijo kota - + Fillet that preserves intersection point and most constraints Zaokrožitev, ki ohranja presečno točko in večino omejil @@ -926,12 +926,12 @@ glede na črto ali tretjo točko CmdSketcherCreatePolyline - + Create polyline Ustvari črtovje - + Create a polyline in the sketch. 'M' Key cycles behaviour Ustvari črtovje v očrtu. Tipka 'M' preklaplja med obnašanji @@ -965,12 +965,12 @@ glede na črto ali tretjo točko CmdSketcherCreateRegularPolygon - + Create regular polygon Ustvari preprosti mnogokotnik - + Create a regular polygon in the sketch Ustvari pravilni mnogokotnik v očrtu @@ -978,12 +978,12 @@ glede na črto ali tretjo točko CmdSketcherCreateSlot - + Create slot Ustvari utor - + Create a slot in the sketch Ustvari utor v očrtu @@ -991,12 +991,12 @@ glede na črto ali tretjo točko CmdSketcherCreateSquare - + Create square Ustvari kvadrat - + Create a square in the sketch Ustvari kvadrat v očrtu @@ -1004,12 +1004,12 @@ glede na črto ali tretjo točko CmdSketcherCreateTriangle - + Create equilateral triangle Ustvari enakostranični trikotnik - + Create an equilateral triangle in the sketch Ustvari enakostranični trikotnik v očrtu @@ -1017,12 +1017,12 @@ glede na črto ali tretjo točko CmdSketcherDecreaseDegree - + Decrease B-spline degree Znižaj stopnjo B-zlepka - + Decreases the degree of the B-spline Zniža stopnjo B-zlepka @@ -1030,12 +1030,12 @@ glede na črto ali tretjo točko CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Zmanjšaj večkratnost vozla - + Decreases the multiplicity of the selected knot of a B-spline Zmanjša večkratnost izbranih vozlov B-zlepka @@ -1082,12 +1082,12 @@ glede na črto ali tretjo točko CmdSketcherExtend - + Extend edge Podaljšaj rob - + Extend an edge with respect to the picked position Podaljšaj rob glede na izbran položaj @@ -1095,12 +1095,12 @@ glede na črto ali tretjo točko CmdSketcherExternal - + Create external geometry Ustvari zunanjo geometrijo - + Create an edge linked to an external geometry Ustvari rob povezan z zunanjo geometrijo @@ -1108,12 +1108,12 @@ glede na črto ali tretjo točko CmdSketcherIncreaseDegree - + Increase B-spline degree Povišaj stopnjo B-zlepka - + Increases the degree of the B-spline Poveča stopnjo B-zlepka @@ -1121,12 +1121,12 @@ glede na črto ali tretjo točko CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Povečaj večkratnost vozla - + Increases the multiplicity of the selected knot of a B-spline Poveča večkratnost izbranih vozlov B-zlepka @@ -1134,12 +1134,12 @@ glede na črto ali tretjo točko CmdSketcherInsertKnot - + Insert knot Vstavi vozel - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Vstavi vozel na podani določilki. Če vozel na tej določilki že obstaja, se njegova večkratnost poveča za ena. @@ -1147,12 +1147,12 @@ glede na črto ali tretjo točko CmdSketcherJoinCurves - + Join curves Združi krivulje - + Join two curves at selected end points Združi krvulji v izbranih krajiščih @@ -1438,12 +1438,12 @@ To bo izbrisalo lastnosti "Podpore", če sploh obstajajo. CmdSketcherSplit - + Split edge Presekaj rob - + Splits an edge into two while preserving constraints Razdeli rob na dva dela in ohrani omejila @@ -1464,12 +1464,12 @@ To bo izbrisalo lastnosti "Podpore", če sploh obstajajo. CmdSketcherSwitchVirtualSpace - + Switch virtual space Preklopi navidezni prostor - + Switches the selected constraints or the view to the other virtual space Preklopi izbrana omejila ali pogled v drugi navidezni prostor @@ -1490,12 +1490,12 @@ To bo izbrisalo lastnosti "Podpore", če sploh obstajajo. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Omogoči/onemogoči omejilo - + Activates or deactivates the selected constraints Omogoči ali onemogoči izbrana omejila @@ -1516,12 +1516,12 @@ To bo izbrisalo lastnosti "Podpore", če sploh obstajajo. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Preklopi med gonilnim in sklicnim omejilom - + Set the toolbar, or the selected constraints, into driving or reference mode Nastavi orodno vrstico ali mejilo @@ -1531,12 +1531,12 @@ na gnani oz. sklicni način CmdSketcherTrimming - + Trim edge Prireži rob - + Trim an edge with respect to the picked position Prireži rob glede na izbrani položaj @@ -1595,369 +1595,370 @@ neveljavna omejila, izrojene geometrije, ... Command - - + + Add horizontal constraint Dodaj vodoravnostno omejilo - - - + + + Add horizontal alignment Dodaj vodoravno poravnavo - - + + Add vertical constraint Dodaj navpičnostno omejilo - + Add vertical alignment Dodaj navpično poravnavo - + Add 'Lock' constraint Dodaj zaklepno omejilo - + Add relative 'Lock' constraint Dodaj odnosno zaklepno omejilo - + Add fixed constraint Dodaj pritrditveno omejilo - + Add 'Block' constraint Dodaj zbirno omejilo - + Add block constraint Dodaj zbirno omejilo - - - + + + Add coincident constraint Dodaj omejilo sovpadanja - - + + Add distance from horizontal axis constraint Dodaj omejilo oddaljenosti od vodoravne osi - - + + Add distance from vertical axis constraint Dodaj omejilo oddaljenosti od navpične osi - - + + Add point to point distance constraint Dodaj omejilo razdalje med točkama - - - + + + Add point to line Distance constraint Dodaj omejilo razdalje med točko in daljico - - + + Add circle to circle distance constraint Dodaj omejilo razdalje med krogoma - + Add circle to line distance constraint Dodaj omejilo razdalje med krogom in črto - - - - - + + + + + + Add length constraint Dodaj dolžinsko omejilo - - + + Dimension Mera - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Dodaj omejilo oddaljenosti od izhodišča - - - + + + Add Distance constraint - Add Distance constraint + Dodaj omejilo razdalje - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Dodaj vodoravnostna omejila - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Dodaj navpičnostna omejila + + Add Symmetry constraint + Dodaj somernostno omejilo + + + + + Add Symmetry constraints + Dodaj somernostna omejila + + + + + Add Distance constraints + Dodaj omejila razdalje + + + + Add Horizontal constraint + Dodaj vodoravnostno omejilo + + + + Add Vertical constraint + Dodaj navpičnostno omejilo + + + Add Block constraint - Add Block constraint + Dodaj zbirno omejilo - + Add Angle constraint - Add Angle constraint + Dodaj kotno omejilo - - - + + + Add Equality constraint - Add Equality constraint + Dodaj enakostno omejilo - + Add Equality constraints - Add Equality constraints + Dodaj enakostna omejila - + Add Radius constraint - Add Radius constraint + Dodaj polmerno omejilo - + Add concentric and length constraint - Add concentric and length constraint + Dodaj sosrediščno in dolžinsko omejilo - + Add DistanceX constraint - Add DistanceX constraint + Dodaj omejilo razdalje po X-u - + Add DistanceY constraint - Add DistanceY constraint + Dodaj omejilo razdalje po Y-u - + Add point to circle Distance constraint - Add point to circle Distance constraint + Dodaj omejilo razdalje med točko in krožnico - - + + Add point on object constraint Dodaj točko predmetnemu omejilu - - + + Add point to point horizontal distance constraint Dodaj omejilo vodoravne razdalje med točkama - + Add fixed x-coordinate constraint Dodaj omejilo nespremelnjive sorednice x - - + + Add point to point vertical distance constraint Dodaj omejilo navpične razdalje med točkama - + Add fixed y-coordinate constraint Dodaj omejilo nespremelnjive sorednice y - - + + Add parallel constraint Dodaj vzporednostno omejilo - - - - - - - + + + + + + + Add perpendicular constraint Dodaj pravokotnostno omejilo - + Add perpendicularity constraint Dodaj pravokotnostno omejilo - + Swap coincident+tangency with ptp tangency Zamenjaj sovpadanje + dotikalnost z dotikalnostjo vzporednice skozi točko - + Swap PointOnObject+tangency with point to curve tangency Zamenjaj TočkaNaPredmetu+dotikalnost s točka v dotikalnost na krivuljo - - - - - - - + + + + + + + Add tangent constraint Dodaj dotikalnostno omejilo - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodaj točko dotikalnega omejila - - - - + + + + Add radius constraint Dodaj polmerno omejilo - - - - + + + + Add diameter constraint Dodaj premerno omejilo - - - - + + + + Add radiam constraint Dodaj polmer-premerno omejilo - - - - - - + + + + + + Add angle constraint Dodaj kotno omejilo - - + + Add equality constraint Dodaj enakostno omejilo - - - - - + + + + + Add symmetric constraint Dodaj somernostno omejilo - + Add Snell's law constraint Dodaj lomno omejilo - + Toggle constraint to driving/reference Preklapi med gonilnostjo/gnanostjo omejila - + Activate/Deactivate constraint Omogoči/onemogoči omejilo @@ -2017,44 +2018,44 @@ neveljavna omejila, izrojene geometrije, ... Dodaj usredinjen očrtni kvader - + Add rounded rectangle Dodaj zaobljen pravokotnik - + Add line to sketch wire Dodaj očrtnemu črtovju daljico - + Add arc to sketch wire Dodaj očrtnemu črtovju lok - - + + Add sketch arc Dodaj očrtni lok - - + + Add sketch circle Dodaj očrtni krog - + Add sketch ellipse Dodaj očrtne elipso - + Add sketch arc of ellipse Dodaj očrtni eliptični lok - + Add sketch arc of hyperbola Dodaj očrtni kosatični (hiperbolični) lok @@ -2074,33 +2075,33 @@ neveljavna omejila, izrojene geometrije, ... Dodaj očrtno točko - - + + Create fillet Ustvari zaokrožitev - + Trim edge Prireži rob - + Extend edge Podaljšaj rob - + Split edge Presekaj rob - + Add external geometry Dodaj zunanjo geometrijo - + Add slot Dodaj žlebič @@ -2110,37 +2111,37 @@ neveljavna omejila, izrojene geometrije, ... Dodaj šestkotnik - + Convert to NURBS Pretvori v NURBS - + Increase spline degree Povišaj stopnjo zlepka - + Decrease spline degree Znižaj stopnjo zlepka - + Increase knot multiplicity Povečaj večkratnost vozla - + Decrease knot multiplicity Zmanjšaj večkratnost vozla - + Insert knot Vstavi vozel - + Join Curves Združi krivulje @@ -2180,12 +2181,12 @@ neveljavna omejila, izrojene geometrije, ... Ukini poravnavo z osmi - + Toggle constraints to the other virtual space Preklopi omejila v drug navidezni prostor - + @@ -2193,7 +2194,7 @@ neveljavna omejila, izrojene geometrije, ... Posodobi navidezni prostor omejila - + Add auto constraints Dodaj samodejna omejila @@ -2233,7 +2234,7 @@ neveljavna omejila, izrojene geometrije, ... Dodaj vozliščno točko - + Create a carbon copy Ustvari dvojnika @@ -2249,37 +2250,37 @@ neveljavna omejila, izrojene geometrije, ... Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Napaka samodejnega omejila: Nerešljiv očrt pri uveljavitvi omejil sovpadanja. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Napaka samodejnega omejila: Nerešljiv očrt pri uveljavitvi navpičnostnih/vodoravnostnih omejil. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Napaka samodejnega omejila: Nerešljiv očrt pri uporabi enakostnih omejil. - + Autoconstrain error: Unsolvable sketch without constraints. Napaka samodejnega omejila: Nerešljiv načrt brez omejil. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Napaka samodejnega omejila: Nerešljiv očrt po uveljavitivi vodoravnostnih in navpičnostnih omejil. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Napaka samodejnega omejila: Nerešljiv očrt po uveljavitivi omejila točka-na-točko. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Napaka samodejnega omejila: Nerešljiv očrt po uveljavitiv enakostnega omejila. @@ -2404,143 +2405,143 @@ neveljavna omejila, izrojene geometrije, ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2556,9 +2557,9 @@ neveljavna omejila, izrojene geometrije, ... - - - + + + Wrong selection Napačna izbira @@ -2579,329 +2580,329 @@ neveljavna omejila, izrojene geometrije, ... Merska omejitev - + Cannot add a constraint between two external geometries. Ni mogoče dodati omejila med dvema zunanjima geometrijama. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Ni mogoče dodati omejila med dvema nespremenljivima geometrijama. Med nespremenljive geometrije spadajo zunanje geometrije, zamrznjene geometrije in posebne točke, kot so vozlišča B-zlepka. - + Sketcher Constraint Substitution Zamenjava omejila očrtovalnika - + Keep notifying me of constraint substitutions Obveščaj me o zamenjavah omejil - - - + + + Only sketch and its support are allowed to be selected. Izberete lahko le očrt in njegovo podporo. - + One of the selected has to be on the sketch. Eden izmed izbranih mora biti v očrtu. - - + + Select an edge from the sketch. Izberite rob z očrta. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemogočo omejilo - - - - + + + + The selected edge is not a line segment. Izbrani rob ni črtni odsek. - - - - - - + + + + + + Double constraint Dvojna omejitev - - - - - + + + + + The selected edge already has a horizontal constraint! Izbran rob je že omejen na vodoravnost! - - - + + + The selected edge already has a vertical constraint! Izbran rob je že omejen na navpičnost! - - - - - - + + + + + + The selected edge already has a Block constraint! Izbran rob je že zbirno omejen! - + The selected item(s) can't accept a horizontal constraint! Izbranih predmetov ni mogoče vodoravnostno omejiti! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Izbrana je več kot ena nepremična točka. Izberite največ eno nepremično točko! - + The selected item(s) can't accept a vertical constraint! Izbranih predmetov ni mogoče navpičnostno omejiti! - - - + + + Select vertices from the sketch. Izberite oglišča z očrta. - + Select one vertex from the sketch other than the origin. Izberite oglišče z očrta, ki ni izhodišče. - + Select only vertices from the sketch. The last selected vertex may be the origin. Izberite le oglišča z očrta. Zadnje izbrano oglišče je lahko izhodišče. - + Wrong solver status Napačen stanje reševalnika - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Zbirnega omejila ni mogoče dodati, če očrt ni rešen ali ima čezmerna in nasprotujoča si omejila. - + Select one edge from the sketch. Izberite en rob na očrtu. - + Select only edges from the sketch. Izberite le robove z očrta. - + Number of selected objects is not 3 Niso izbrani 3 predmeti - - - + + + Error Napaka - + Unexpected error. More information may be available in the Report View. Nepričakovana napaka. Več lahko najdete v poročevalnem pogledu. - + Endpoint to endpoint tangency was applied instead. Namesto tega je bila uporabljena tangentnost med končnima točkama. - + Select two or more points from the sketch. Izberite dve ali več točk na očrtu. - + Select two or more vertices from the sketch. Izberite na očrtu dve ali več oglišč. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izberite dve ali več oglišč na očrtu za sovpadno omejilo ali dva kroga, loka, eliptična loka ali dve elipsi za sosrediščno omejilo. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izberite na očrtu dve oglišči za sovpadno omejilo ali dva kroga, loka, eliptična loka ali dve elipsi za sosrediščno omejilo. - + Select exactly one line or one point and one line or two points from the sketch. Izberite natanko eno črto ali točko in eno črto ali dve točki na skici. - + Cannot add a length constraint on an axis! Omejitve dolžine ni mogoče dodati na os! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Izberite na očrtu natanko eno črto ali točko in eno črto ali dve točki ali pa dva kroga. - + This constraint does not make sense for non-linear curves. To omejilo ni smiselno za nepreme krivulje. - + Endpoint to edge tangency was applied instead. Namesto tega je bila uporabljena dotikalnost iz krajišča na rob. - - - - - - - + + + + + + + Select the right things from the sketch. Izberite prave stvari na skici. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Izberite rob, ki ni utež B-zlepka. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nobena od izbranih točk ni bila omejena na ustrezne krivulje, ker so bodisi del istega predmeta, bodisi so oboji zunanje geometrije, ali pa rob ni izberljiv. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nobena od izbranih točk ni bila omejena na ustrezno krivuljo, ker ali so del istega elementa ali sta obe zunanji geometriji. - - - - + + + + Select exactly one line or up to two points from the sketch. Izberite v očrtu natanko eno daljico ali največ dve točki. - + Cannot add a horizontal length constraint on an axis! Omejitve vodoravne dolžine ni mogoče dodati na os! - + Cannot add a fixed x-coordinate constraint on the origin point! Omejila z nespremenljivo sorednico x ni mogoče dodati na izhodiščno točko! - - + + This constraint only makes sense on a line segment or a pair of points. To omejilo je smiselno le za raven odsek ali par točk. - + Cannot add a vertical length constraint on an axis! Omejitve navpične dolžine ni mogoče dodati na os! - + Cannot add a fixed y-coordinate constraint on the origin point! Omejila z nespremenljivo sorednico y ni mogoče dodati na izhodiščno točko! - + Select two or more lines from the sketch. Izberite v očrtu dve daljici ali več. - - + + Select at least two lines from the sketch. Izberite v očrtu vsaj dve daljici. - + Select a valid line. Izberite veljavno črto. - - + + The selected edge is not a valid line. Izbrani rob ni veljavna črta. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Dovoljene kombinacije: dve krivulji, končna točka in krivulja, dve končni točki, dve krivulji in točka. - + Select some geometry from the sketch. perpendicular constraint Izberite v očrtu neko geometrijo. - - + + Cannot add a perpendicularity constraint at an unconnected point! Pravokotne omejitve ni mogoče dodati na nepovezano točko! - - - + + + Perpendicular to B-spline edge currently unsupported. Pravokotno na B-zlepek rob je trenutno nepodprto. - - + + One of the selected edges should be a line. En od izbranih robov mora biti črta. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uporabljena je bla dotikalnost med krajiščema. Omejilo sovpadanja je bilo izbrisano. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Uporabljena je bila dotikalnost med krajiščem in robom. Omejitev točke na predmet je bila izbrisana. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Dovoljene kombinacije: dve krivulji, končna točka in krivulja, dve končni točki, dve krivulji in točka. - + Select some geometry from the sketch. tangent constraint Izberite v očrtu neko geometrijo. - - - + + + Cannot add a tangency constraint at an unconnected point! Tangentne omejitve ni mogoče dodati na nepovezano točko! - - + + Tangent constraint at B-spline knot is only supported with lines! Dotikalno omejilo v vozlu B-zlepka je podprto le za daljice! - + B-spline knot to endpoint tangency was applied instead. Namesto tega je bila uporabljena dotikalnost vozla B-zlepka na krajišče. - + Select either one point and several curves, or one curve and several points. Izberite bodisi eno točko in več krivulj, bodisi eno krivuljo in več točk. - - + + Wrong number of selected objects! Napačno število izbranih objektov! - - + + With 3 objects, there must be 2 curves and 1 point. Pri 3-h objektih morata obstajati 2 krivulji in 1 točka. - - - + + + Tangency to B-spline edge currently unsupported. Tangentnost na B-zlepek rob je trenutno nepodprta. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Izberite v očrtu enega ali več lokov oz. krogov. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Izberite bodisi enega ali več tečajev B-zlepka, bodisi enega ali več lokov ali krogov skice, toda ne mešano. - - - + + + Constraint only applies to arcs or circles. Omejitev velja samo za loke ali krožnice. - - + + Select one or two lines from the sketch. Or select two edges and a point. Izberite v očrtu bodisi eno ali dve daljici, bodisi dva robova in točko. - - + + Parallel lines Vzporedne črte - - + + An angle constraint cannot be set for two parallel lines. Kotnega omejila ni mogoče nastaviti za dve vzporedni črti. - + Cannot add an angle constraint on an axis! Kotne omejitve ni mogoče dodati na os! - + Select two edges from the sketch. Izberite v očrtu dva robova. - + Select two or more compatible edges. Izberite dva ali več primernih robov. - + Sketch axes cannot be used in equality constraints. Osi očrta ni mogoče uporabiti z enakostnimi omejili. - + Equality for B-spline edge currently unsupported. Enakost za B-zlepek rob je trenutno nepodprta. - - - - + + + + Select two or more edges of similar type. Izberite dva ali več robov podobne vrste. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Izberite dve točki in somernico, dve točki in točko somernosti ali črto in točko somernosti na očrtu. - - + + Cannot add a symmetry constraint between a line and its end points. Somernostnega omejila ni mogoče dati med črto in njenima krajiščema. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Omejitve somernosti ni mogoče dodati med črto in njenima krajiščema! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Izberite dve krajišči daljic, ki naj predstavljata žarka, in rob, ki naj predstavlja mejo. Prva izbrana točka ustreza kazalu n1, druga kazalu n2 in sklicna vrednost nastavi razmerje n2/n1. - + Selected objects are not just geometry from one sketch. Izbrani predmeti niso le geometrija v očrtu. - + Cannot create constraint with external geometry only. Omejila ni mogoče ustvariti le z zunanjimi geometrijami. - + Incompatible geometry is selected. Izbrana je nezdružljiva geometrija. - + SnellsLaw on B-spline edge is currently unsupported. B-zlepkov rob trenutno ne podpira lomnega zakona. - - - - - + + + + + Select constraints from the sketch. Izberite omejila v očrtu. - - - + + + Select constraint(s) from the sketch. Izberite omejila v očrtu. - + B-Spline Degree Stopnja B-zlepka - + Define B-Spline Degree, between 1 and %1: Določite stopnjo B-zlepka, ki naj bo med 1 in %1: - - - + + + CAD Kernel Error Napaka CAD Jedra - + None of the selected elements is an edge. Nobena izmed izbranih prvin ni rob. - - + + At least one of the selected objects was not a B-Spline and was ignored. Vsaj en izmed izbranih objektov ni bil B-zlepek in je bil prezrt. - - + + The selection comprises more than one item. Please select just one knot. Izbor vsebuje več kot en predmet. Prosimo izberite samo en vozel. - - + + Input Error Napaka Vnosa - - + + None of the selected elements is a knot of a B-spline Noben izmed izbranih elementov ni vozel B-zlepka - - + + Selection is empty Nič ni izbrano - + Nothing is selected. Please select a b-spline. Nič ni izbrano. Izberite B-zlepek. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Izberite B-zlepek za ustavitev vozla (ne vozla nanj). Če krivulja ni B-zlepek, jo vanj najprej pretvorite. - + Nothing is selected. Please select end points of curves. Nič ni izbrano. Izberiti krajišči krvulj. - + Too many curves on point Preveč krivulj na točki - - + + Exactly two curves should end at the selected point to be able to join them. V izbrani točki se morata končati natanko dve krivulji, da bi ju mogli združiti. - + Too few curves on point Premalo krivulj na točki - + Two end points, or coincident point should be selected. Izbrani bi morali biti dve krajišči ali sovpadna točka. @@ -3306,19 +3307,19 @@ Dovoljene kombinacije: dve krivulji, končna točka in krivulja, dve končni to Trenutno ni podprto premikanje zunanjih geometrij v drugo videzno plast. Zunanje gometrije bodo opuščene - + Set knot multiplicity Nastavi večkranost vozla - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Določi v zadnji podani točki večkratnost vozla med 1 in %1: Vedite, da se lahko v določenih okoliščinah večkratnost prezre. Za več podrobnosti si preberite dokumentacijo - + Value Error - Value Error + Napaka vrednosti @@ -3379,7 +3380,7 @@ Dovoljene kombinacije: dve krivulji, končna točka in krivulja, dve končni to Coincident - Coincident + Sovpaden @@ -3450,7 +3451,7 @@ Zaustavljati, Zapirati (pot), Zastirati (svetlobo, pogled) Distance - Distance + Razdalja @@ -3631,12 +3632,12 @@ Zaustavljati, Zapirati (pot), Zastirati (svetlobo, pogled) Dolžina: - + Refractive index ratio Lomni količnik - + Ratio n2/n1: Razmerje n2/n1: @@ -3916,8 +3917,8 @@ Zaustavljati, Zapirati (pot), Zastirati (svetlobo, pogled) SketcherGui::PropertyConstraintListItem - - + + Unnamed Neimenovan @@ -4140,30 +4141,30 @@ Veljati začne pri ponovnem prehodu v urejevalni način. Dimension Constraint - Dimension Constraint + Merska omejitev Dimensioning constraints: - Dimensioning constraints: + Kotirna omejila: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Izberite vrsto velikostnih omejil vašega orodja: +"Eno samo orodje": Eno orodje v orodni vrstici za vsa velikostna omejila: razdalja, razdalja X/Y, kót, polmer, (ostalo v padajočem meniju) +"Ločena orodja": Posamično orodje za vsako velikostno omejilo +"Oboje": Imeli boste tako orodje "Kote" kot ločena orodja +To je le nastavitev za orodno vrstico. Ne glede na to, katero nastavitev izberete, bodo vsa orodja vedno na voljo preko menija in preko bližnjic. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Premerno/polmerni način kotirnega orodja: @@ -4171,38 +4172,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Pri uporabi kotirnega orodja lahko določite način obravnavanja krožnic in lokov: +"Samodejno": Samodejno bo izbran pri lokih polmer in pri krožnicah premer. +"Premer": Premer bo uporabljen tako pri lokih kot pri krožnicah. +"Polmer": Polmer bo uporabljen tako pri lokih kot pri krožnicah. - + Single tool - Single tool + Eno samo orodje - + Separated tools - Separated tools + Ločena orodja - + Both Oboje - + Auto Samodejno - + Diameter Premer - + Radius Polmer @@ -4286,7 +4287,7 @@ This setting is only for the toolbar. Whichever you chose, all tools are always Vertex - Vertex + Oglišče @@ -4651,12 +4652,12 @@ V tem primeru je predmete mogoče videti le za očrtno ravnino. Uporabi za obstoječe očrte - + Unexpected C++ exception Nepričakovana izjema C++ - + Sketcher Očrtovalnik @@ -4664,55 +4665,55 @@ V tem primeru je predmete mogoče videti le za očrtno ravnino. SketcherGui::SketcherValidation - + No missing coincidences Ni manjkajočih sovpadanj - + No missing coincidences found Nobenega manjkajočega sovpadanja ni bilo mogoče najti - + Missing coincidences Manjkajoča sovpadanja - + %1 missing coincidences found Najdenih %1 manjkajočih sovpadanj - + No invalid constraints Ni neveljavnih omejil - + No invalid constraints found Nobenega neveljavnega omejila ni bilo mogoče najti - + Invalid constraints Neveljavna omejila - + Invalid constraints found Najdena neveljavna omejila - - - + + + Reversed external geometry Obrnjena zunanja geometrija - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,82 +4726,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Kliknite na "Zamenjaj krajišča v omejilih", da ponovno dodelite krajišča. Za skice, ki so bile ustvarjene v FreeCADu, starejšem od v0.15, naredite to le enkrat - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. Najdenih %1 obrnjenih lokov zunanje geometrije. Njihove končne točke so obkrožene v pogledu 3D. - + No reversed external-geometry arcs were found. Nobenega obrnjenega loka zunanje geometrije ni bilo mogoče najti. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Narejenih je bilo %1 sprememb omejil, ki se povezujejo s končnimi točkami obrnjenih lokov. - - + + Constraint orientation locking Zaklepanje usmerjenosti omejil - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Zaklepanje usmeritve je bilo omogočeno in ponovno izračunano za %1 omejil. Omejila so bile navedene v poročilnem podoknu (meni Pogled -> Podokna -> Poročilno podokno). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Zaklepanje usmerjenosti je bilo onemogočeno za %1 omejil. Omejila so bila navedena v poročilnem pogledu (meni Pogled -> Podokna -> Poročini pogled). Upoštevajte, da je za vsa prihodnja omejila zaklepanje privzeto še vedno VKLOPLJENO. - - + + Delete constraints to external geom. Izbriši omejila na zunanjo geometrijo. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Izbrisali boste VSA omejila, ki imajo opravka z zunanjo geometrijo. To je uporabno za reševanje skice z poškodovanimi/spremenjenimi povezavami z zunanjo geometrijo. Ali res želite izbrisati omejila? - + All constraints that deal with external geometry were deleted. Vsa omejila, ki so povezane z zunanjo geometrijo, so bila izbrisana. - + No degenerated geometry Nobene izrojene geometrije - + No degenerated geometry found Nobene izrojene geometrije ni bilo mogoče najti - + Degenerated geometry Izrojena geometrija - + %1 degenerated geometry found %1 najdenih izrojenih geometrij SketcherGui::TaskSketcherConstraints - - - Form - Oblika - Check to toggle filters @@ -4875,11 +4871,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Oblika - Check to toggle filters @@ -5065,7 +5056,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Nadzorni gumbi naprednega reševalnika @@ -5358,8 +5349,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Preklopi med prikazanim in skritim glavnikastim prikazom ukrivljenosti za vse B-zlepke @@ -5367,8 +5358,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Zmanjša večkratnost izbranih vozlov B-zlepka @@ -5376,8 +5367,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Preklopi med prikazano in skrito stopnjo za vse B-zlepke @@ -5385,8 +5376,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Poveča večkratnost izbranih vozlov B-zlepka @@ -5394,8 +5385,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Preklopi med prikazano in skrito večkratnostjo vozla za vse B-zlepke @@ -5403,8 +5394,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Preklopi med prikazano in skrito utežitvijo krmilnih točk za vse B-lepke @@ -5412,8 +5403,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Preklopi med prikazanimi in skritimi nadzornimi mnogokotniki za vse B-zlepke @@ -5448,8 +5439,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Določi premer krožnice ali krožnega loka @@ -5457,7 +5448,7 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Določi polmer oz. premer loka oz. kroga @@ -5465,8 +5456,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Določi polmer kroga ali loka @@ -5474,7 +5465,7 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Določi polmer oz. premer loka oz. kroga @@ -5491,8 +5482,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Ustvari lok s končnima točkama in točko na njem @@ -5500,8 +5491,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Ustvari krog s tremi točkami na obodu @@ -5509,8 +5500,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Ustvari lok s središčem in končnima točkama @@ -5518,8 +5509,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Ustvari eliptični lok s središčem, velikim polmerom in krajiščema @@ -5527,8 +5518,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Ustvari lok hiperbole s središčem, velikim polmerom in krajiščema @@ -5536,8 +5527,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Ustvari lok parabole z goriščem, ogliščem in krajiščema @@ -5545,13 +5536,13 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateBSpline - + B-spline by control points B-zlepek z nadzornimi točkami - - + + Create a B-spline by control points Ustvari B-zlepek z nadzornimi točkami @@ -5559,8 +5550,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Ustvari krog s središčem in točko na obodu @@ -5568,8 +5559,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Ustvari elipso z periapsido, apoapsido in malim polmerom @@ -5577,8 +5568,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Ustvari elipso s središčem, velikim polmerom in točko @@ -5586,8 +5577,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateFillet - - + + Creates a radius between two lines Ustvari lok me dvema daljicama @@ -5595,8 +5586,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Ustvari sedemkotnik s središčem in enim ogliščem @@ -5604,8 +5595,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Ustvari šestkotnik s središčem in enim ogliščem @@ -5613,7 +5604,7 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateOblong - + Create a rounded rectangle Ustvari zaobljen pravokotnik @@ -5621,14 +5612,14 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Ustvari osemkotnik s središčem in enim ogliščem - - + + Create a regular polygon by its center and by one corner Ustvari pravilni večkotnik z določitvijo središča in enega oglišča @@ -5636,8 +5627,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Ustvari petkotnik s središčem in enim ogliščem @@ -5645,8 +5636,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Zaokrožitev, ki ohrani omejila in presečne točke @@ -5654,7 +5645,7 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateRectangle - + Create a rectangle Ustvari pravokotnik @@ -5662,7 +5653,7 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateRectangle_Center - + Create a centered rectangle Ustvari usredinjen pravokotnik @@ -5670,8 +5661,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Ustvari kvadrat s središčem in enim ogliščem @@ -5679,8 +5670,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Ustvari enakostranični trikotnik s središčem in enim ogliščem @@ -5688,13 +5679,13 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Sklenjeni B-zlepek z nadzornimi točkami - - + + Create a periodic B-spline by control points Ustvari sklenjeni B-zlepek z nadzornimi točkami @@ -6328,36 +6319,36 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Napaka @@ -6377,45 +6368,45 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Omejilo ima neveljavno informacijo kazala in je narobe oblikovano. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Neveljavno omejilo - - - + + + Failed to add arc Dodajanje loka je spodletelo - + Failed to add arc of ellipse Dodajanje eliptičnega loka spodletelo - + Cannot create arc of hyperbola from invalid angles, try again! Hiperboličnega loka ni mogoče ustvariti iz neveljavnih kotov. Poskusite ponovno! - + Cannot create arc of hyperbola Ni mogoče ustvariti hiperboličnega loka - + Cannot create arc of parabola Ni mogoče ustvariti paraboličnega loka @@ -6425,18 +6416,18 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Napaka pri dodajanju B-zlepkovega tečaja - + Error creating B-spline pole Napaka pri ustvarjanju B-zlepkovega tečaja - - + + Error creating B-spline Napaka pri ustvarjanju B-zlepka - + Error deleting last pole Napaka pri brisanju zadnjega tečaja @@ -6446,49 +6437,49 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Vozliščne točke ni mogoče dodati - + Cannot add internal alignment points Točk notranje poravnave ni mogoče dodati - + Error removing knot Napaka pri odstranjevanju vozla - + Failed to add carbon copy Dodajanje dvojnika spodletelo - - + + Failed to add circle Dodajanje kroga spodletelo - + Failed to add an ellipse Dodajanje elipse spodletelo - + Failed to extend edge Podaljšanje roba spodletelo - + Failed to add external geometry Dodajanje zunanje geometrije spodletelo - + Failed to create fillet Zaokroževanje spodletelo - + Failed to add line Dodajanje daljice spodletelo @@ -6498,7 +6489,7 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Dodajanje točke spoletelo - + Failed to add polygon Dodajanje mnogokotnika spodletelo @@ -6508,43 +6499,43 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Dodajanje kvadra spodletelo - + Failed to add rounded rectangle Dodajanje zaokroženega pravokotnika spodletelo - + Failed to add slot Dodajanje utora spodletelo - + Failed to add edge Dodajanje roba spodletelo - + Failed to trim edge Prirezovanje roba spodletelo - + Value Error - Value Error + Napaka vrednosti Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-zlepek z vozli - - + + Create a B-spline by knots Ustvari B-zlepek z vozli @@ -6552,13 +6543,13 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Sklenjeni B-zlepek z vozli - - + + Create a periodic B-spline by knots Ustvari sklenjeni B-zlepek skozi vozle @@ -6578,7 +6569,7 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Snap to grid - Snap to grid + Pripni na mrežo @@ -6627,12 +6618,12 @@ Da bi se pripele, morajo biti točke oddaljene od črte do eno petino polja mre Configure rendering order - Configure rendering order + Nastavite zaporede izrisovanja Reorder the items in the list to configure rendering order. - Reorder the items in the list to configure rendering order. + Določite zaporedje izrisovanja s prerazvrstitvijo predmetov v seznamu. @@ -6653,7 +6644,7 @@ Da bi se pripele, morajo biti točke oddaljene od črte do eno petino polja mre Toggle snap - Toggle snap + Preklopi pripenjanje @@ -6664,12 +6655,12 @@ Da bi se pripele, morajo biti točke oddaljene od črte do eno petino polja mre CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Ustvari B-zlepek z vozli - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Ustvari B-zlepek z vozli, tj. z interpolacijo, na očrtu. @@ -6677,12 +6668,12 @@ Da bi se pripele, morajo biti točke oddaljene od črte do eno petino polja mre CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Ustvari sklenjeni B-zlepek z vozli - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Ustvari sklenjeni B-zlepek z vozli, tj. z interpolacijo, na očrtu. @@ -6690,31 +6681,44 @@ Da bi se pripele, morajo biti točke oddaljene od črte do eno petino polja mre CmdSketcherDimension - + Dimension Mera - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Omeji glede na svoj izbor. +Glede na izbrane predmete imate lahko na voljo več omejil. Med njimi se lahko pRemikate s tipko "PREMAKNI". +Z levim klikom v prazno potrdite trenutno omejilo, prekličete pa z desnim klikom ali Esc. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Prikaži/skrij pomočnika za loke - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Preklopi med prikazanim in skritim pomočnikom za loke + + + + CmdSketcherCompDimensionTools + + + Dimension + Mera + + + + Dimension tools. + Kotirna orodja. diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts index 2498830174..16f0282b93 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Napravi indigo kopiju - + Copy the geometry of another sketch Kopira geometriju druge skice @@ -100,27 +100,27 @@ Show/hide B-spline information layer - + Show/hide B-spline degree Prikaži/sakrij stepen B-splajn krive - + Show/hide B-spline control polygon Prikaži/sakrij linije B-splajn krive - + Show/hide B-spline curvature comb Prikaži/sakrij dijagram zakrivljenosti B-splajn krive - + Show/hide B-spline knot multiplicity Prikaži/sakrij višestrukost čvorova B-splajn krive - + Show/hide B-spline control point weight Prikaži/sakrij težinu kontrolne tačke B-splajn krive @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ograničenje kružnog luka ili kruga - + Constrain an arc or a circle Kotiraj kružni luk ili krug - + Constrain radius Ograničenje poluprečnika - + Constrain diameter Ograničenje prečnika - + Constrain auto radius/diameter Automatsko ograničenje poluprečnika i prečnika @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Napravi luk - + Create an arc in the sketcher Napravi kružni luk na skici - + Center and end points Kružni luk pomoću centra - + End points and rim point Kružni luk pomoću 3 tačke @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Napravi B-splajn krivu - + Create a B-spline in the sketch Napravi B-splajn krivu na skici @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Napravi kružnicu - + Create a circle in the sketcher Napravi kružnicu - + Center and rim point Kružnica pomoću centra - + 3 rim points Kružnica pomoću 3 tačke @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Napravi konusne preseke - + Create a conic in the sketch Napravi konusne preseke u skici - + Ellipse by center, major radius, point Elipsa pomoću centra, velike poluose, tačke - + Ellipse by periapsis, apoapsis, minor radius Elipsa pomoću periapse, apoapse, male poluose - + Arc of ellipse by center, major radius, endpoints Luk elipse pomoću centra, velike poluose, krajnjih tačaka - + Arc of hyperbola by center, major radius, endpoints Luk hiperbole pomoću centra, realne poluose i krajnjih tačaka - + Arc of parabola by focus, vertex, endpoints Luk parabole pomoću fokusa, temena i krajnjih tačaka @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Napravi zaobljenje - + Create a fillet between two lines Napravi zaobljenje između dve linije - + Sketch fillet Zaobljenje skice - + Constraint-preserving sketch fillet Zaobljenje koje čuva ograničenja @@ -299,17 +299,17 @@ Napravi pravougaonik na skici - + Rectangle Pravougaonik - + Centered rectangle Centrirani pravougaonik - + Rounded rectangle Zaobljeni pravougaonik @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Napravi pravilni mnogougao - + Create a regular polygon in the sketcher Napravi pravilni mnogougao na skici - + Triangle Trougao - + Square Kvadrat - + Pentagon Petougao - + Hexagon Šestougao - + Heptagon Sedmougao - + Octagon Osmougao - + Regular polygon Pravilan mnogougao @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Izmeni višestrukost čvora - + Modifies the multiplicity of the selected knot of a B-spline Modifikuje višestrukost izabranog čvora B-splajn krive - + Increase knot multiplicity Povećaj višestrukost čvora - + Decrease knot multiplicity Smanji višestrukost čvora @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ograničenje ugla - + Fix the angle of a line or the angle between two lines Kotiraj ugao linije ili ugao između dve linije @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Ograničavanje blokiranjem - + Block the selected edge from moving Blokira pomeranje izabrane ivice @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ograničenje podudarnosti - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Napravi ograničenje podudarnosti između tačaka, ili koncentrično ograničenje između krugova, lukova i elipsa @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ograničenje prečnika - + Fix the diameter of a circle or an arc Kotiraj prečnik kruga ili luka @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ograničenje rastojanja - + Fix a length of a line or the distance between a line and a vertex or between two circles Kotiraj dužinu linije, rastojanje između linije i temena ili rastojanje između dva kruga @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ograničenje horizontalnog rastojanja - + Fix the horizontal distance between two points or line ends Kotiraj horizontalno rastojanje između dve tačke ili krajeva linija @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ograničenje vertikalnog rastojanja - + Fix the vertical distance between two points or line ends Kotiraj vertikalno rastojanje između dve tačke ili krajeva linija @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ograničenje jednakosti - + Create an equality constraint between two lines or between circles and arcs Napravi ograničenje jednakosti između dve linije ili između krugova i lukova @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ograničenje horizontalnosti - + Create a horizontal constraint on the selected item Napravi ograničenje horizontalnosti na izabranoj stavki @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Ograničavanje zaključavanjem - + Create both a horizontal and a vertical distance constraint on the selected vertex Napravi ograničenje horizontalnog i vertikalnog rastojanja na izabranom temenu @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Ograničenje paralelnosti - + Create a parallel constraint between two lines Napravi ograničenje paralelnosti između dve linije @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ograničenje upravnosti - + Create a perpendicular constraint between two lines Napravi ograničenje upravnosti između dva geometrijska elementa @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Ograničenje tačka na objektu - + Fix a point onto an object Ograničenje tačke da bude vezana za objekat @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Automatsko ograničenje poluprečnika i prečnika - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Kotiraj prečnik ako izabereš krug ili poluprečnik ako izabereš luk ili pol splajna @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Kotiraj poluprečnik - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Kotiraj poluprečnik kruga ili luka ili kotirajte krug težine pola B-splajn krive @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ograničenje refrakcije (Snellov zakon) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Napravi ograničenje refrakcije (Snellov zakon) između dve krajnje tačke zraka @@ -599,12 +599,12 @@ i neke ivice koja predstavlja granicu. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ograničenje simetričnosti - + Create a symmetry constraint between two points with respect to a line or a third point Napravi ograničenje simetričnosti između dve tačke @@ -614,12 +614,12 @@ u odnosu na pravu ili treću tačku CmdSketcherConstrainTangent - + Constrain tangent Ograničenje tangentnosti - + Create a tangent constraint between two entities Napravi tangentno ograničenje između dva entiteta @@ -627,12 +627,12 @@ u odnosu na pravu ili treću tačku CmdSketcherConstrainVertical - + Constrain vertically Ograničenje vertikalnosti - + Create a vertical constraint on the selected item Napravi ograničenje vertikalnosti na izabranoj stavki @@ -640,12 +640,12 @@ u odnosu na pravu ili treću tačku CmdSketcherConvertToNURBS - + Convert geometry to B-spline Pretvorite geometriju u B-splajn krivu - + Converts the selected geometry to a B-spline Pretvorite izabranu geometriju u B-splajn krivu @@ -666,12 +666,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreate3PointArc - + Create arc by three points Napravi kružni luk pomoću 3 tačke - + Create an arc by its end points and a point along the arc Napravi luk pomoću krajnjih tačaka i tačke na luku @@ -679,12 +679,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreate3PointCircle - + Create circle by three points Napravi kružnicu pomoću 3 tačke - + Create a circle by 3 perimeter points Napravi kružnicu pomoću 3 tačke na obimu @@ -692,12 +692,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateArc - + Create arc by center Napravi kružni luk pomoću centra - + Create an arc by its center and by its end points Napravi kružni luk pomoću centra i krajnjih tačaka @@ -705,12 +705,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Napravi luk elipse - + Create an arc of ellipse in the sketch Napravi luk elipse na skici @@ -718,12 +718,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Napravi luk hiperbole - + Create an arc of hyperbola in the sketch Napravi luk hiperbole na skici @@ -731,12 +731,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateArcOfParabola - + Create arc of parabola Napravi luk parabole - + Create an arc of parabola in the sketch Napravi luk parabole na skici @@ -744,12 +744,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateBSpline - + Create B-spline Napravi B-splajn krivu - + Create a B-spline by control points in the sketch. Napravi B-splajn krivu pomoću kontrolnih tačaka sa skice. @@ -757,12 +757,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateCircle - + Create circle Napravi kružnicu - + Create a circle in the sketch Napravi kružnicu na skici @@ -770,12 +770,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Napravi elipsu pomoću 3 tačke - + Create an ellipse by 3 points in the sketch Napravi elipsu pomoću 3 tačke na skici @@ -783,12 +783,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateEllipseByCenter - + Create ellipse by center Napravi elipsu pomoću centra - + Create an ellipse by center in the sketch Napravi elipsu pomoću centra na skici @@ -796,12 +796,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateFillet - + Create fillet Napravi zaobljenje - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateHeptagon - + Create heptagon Napravi sedmougao - + Create a heptagon in the sketch Napravi sedmougao na skici @@ -822,12 +822,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateHexagon - + Create hexagon Napravi šestougao - + Create a hexagon in the sketch Napravi šestougao na skici @@ -861,12 +861,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateOctagon - + Create octagon Napravi osmougao - + Create an octagon in the sketch Napravi osmougao na skici @@ -874,12 +874,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreatePentagon - + Create pentagon Napravi petougao - + Create a pentagon in the sketch Napravi petougao na skici @@ -887,12 +887,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Napravi periodičnu B-splajn krivu - + Create a periodic B-spline by control points in the sketch. Napravi periodičnu B-splajn krivu pomoću kontrolnih tačaka sa skice. @@ -900,12 +900,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreatePoint - + Create point Napravi tačku - + Create a point in the sketch Napravi tačku na skici @@ -913,12 +913,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreatePointFillet - + Create corner-preserving fillet Napravi zaobljenje koje čuva ugao - + Fillet that preserves intersection point and most constraints Zaobljenje koje čuva presečnu tačku i većinu ograničenja @@ -926,12 +926,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreatePolyline - + Create polyline Napravi povezane linije - + Create a polyline in the sketch. 'M' Key cycles behaviour Napravi povezane linije na skici. 'M' tipka menja ponašanje @@ -965,12 +965,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateRegularPolygon - + Create regular polygon Napravi pravilni mnogougao - + Create a regular polygon in the sketch Napravi pravilni mnogougao na skici @@ -978,12 +978,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateSlot - + Create slot Napravi žljeb - + Create a slot in the sketch Napravi žljeb na skici @@ -991,12 +991,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateSquare - + Create square Napravi kvadrat - + Create a square in the sketch Napravi kvadrat na skici @@ -1004,12 +1004,12 @@ u odnosu na pravu ili treću tačku CmdSketcherCreateTriangle - + Create equilateral triangle Napravi jednakostranični trougao - + Create an equilateral triangle in the sketch Napravi jednakostranični trougao na skici @@ -1017,12 +1017,12 @@ u odnosu na pravu ili treću tačku CmdSketcherDecreaseDegree - + Decrease B-spline degree Smanji stepen B-splajn krive - + Decreases the degree of the B-spline Umanjuje stepen B-splajn krive @@ -1030,12 +1030,12 @@ u odnosu na pravu ili treću tačku CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Smanji višestrukost čvora - + Decreases the multiplicity of the selected knot of a B-spline Smanjuje višestrukost izabranog čvora B-splajn krive @@ -1082,12 +1082,12 @@ u odnosu na pravu ili treću tačku CmdSketcherExtend - + Extend edge Produži ivicu - + Extend an edge with respect to the picked position Produži ivicu u odnosu na izabran položaj @@ -1095,12 +1095,12 @@ u odnosu na pravu ili treću tačku CmdSketcherExternal - + Create external geometry Napravi spoljašnju geometriju - + Create an edge linked to an external geometry Napravi ivicu vezanu za spoljašnju geometriju @@ -1108,12 +1108,12 @@ u odnosu na pravu ili treću tačku CmdSketcherIncreaseDegree - + Increase B-spline degree Povećati stepen B-splajn krive - + Increases the degree of the B-spline Povećava stepen B-splajn krive @@ -1121,12 +1121,12 @@ u odnosu na pravu ili treću tačku CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Povećaj višestrukost čvora - + Increases the multiplicity of the selected knot of a B-spline Povećava višestrukost izabranog čvora B-splajn krive @@ -1134,12 +1134,12 @@ u odnosu na pravu ili treću tačku CmdSketcherInsertKnot - + Insert knot Umetni čvor - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Umeće čvor na datom parametru. Ako čvor već postoji na tom parametru, njegova višestrukost se povećava za jedan. @@ -1147,12 +1147,12 @@ u odnosu na pravu ili treću tačku CmdSketcherJoinCurves - + Join curves Spoji krive - + Join two curves at selected end points Spoji dve krive u izabranim krajnjim tačkama @@ -1438,12 +1438,12 @@ Ovo će obrisati osobinu 'Osnova', ako postoji. CmdSketcherSplit - + Split edge Podeli ivicu - + Splits an edge into two while preserving constraints Deli ivicu na dva dela uz očuvanje ograničenja @@ -1464,12 +1464,12 @@ Ovo će obrisati osobinu 'Osnova', ako postoji. CmdSketcherSwitchVirtualSpace - + Switch virtual space Promeni virtualni prostor - + Switches the selected constraints or the view to the other virtual space Prebacuje izabrana ograničenja ili pogled na drugi virtuelni prostor @@ -1490,12 +1490,12 @@ Ovo će obrisati osobinu 'Osnova', ako postoji. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktiviraj/deaktiviraj ograničenje - + Activates or deactivates the selected constraints Aktivira ili deaktivira izabrana ograničenja @@ -1516,12 +1516,12 @@ Ovo će obrisati osobinu 'Osnova', ako postoji. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ograničavajuće/referentne kote - + Set the toolbar, or the selected constraints, into driving or reference mode Podesite paletu sa alatkama ili izabrana ograničenja, @@ -1531,12 +1531,12 @@ u referentni ili režim ograničavanja CmdSketcherTrimming - + Trim edge Opseci ivice - + Trim an edge with respect to the picked position Opseci ivicu u odnosu na izabrani položaj @@ -1595,369 +1595,370 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Command - - + + Add horizontal constraint Dodaj horizontalno ograničenje - - - + + + Add horizontal alignment Dodaj horizontalno poravnanje - - + + Add vertical constraint Dodaj vertikalno ograničenje - + Add vertical alignment Dodaj vertikalno poravnanje - + Add 'Lock' constraint Dodaj ograničavanje zaključavanjem - + Add relative 'Lock' constraint Dodaj relativno ograničenje zaključavanjem - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Dodaj ograničavanje blokiranjem - + Add block constraint Dodaj ograničavanje blokiranjem - - - + + + Add coincident constraint Dodaj ograničenje podudarnosti - - + + Add distance from horizontal axis constraint Dodaj kotu rastojanja od horizontalne ose - - + + Add distance from vertical axis constraint Dodaj kotu rastojanja od vertikalne ose - - + + Add point to point distance constraint Dodaj kotu vertikalnog rastojanja od tačke do tačke - - - + + + Add point to line Distance constraint Dodaj kotu rastojanja od tačke do linije - - + + Add circle to circle distance constraint Dodaj ograničenje između dva kruga - + Add circle to line distance constraint Dodaj ograničenje rastojanja od kruga do linije - - - - - + + + + + + Add length constraint Dodaj ograničenje dužine - - + + Dimension Kota - + Add lock constraint - Add lock constraint + Dodaj ograničenje zaključavanjem - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Dodaj ograničenje 'Rastojanje od koordinatnog početka' - - - + + + Add Distance constraint - Add Distance constraint + Dodaj ograničenje rastojanja - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Dodaj 'horizontalna' ograničenja - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Dodaj 'vertikalna' ograničenja + + Add Symmetry constraint + Dodaj ograničenje simetričnosti + + + + + Add Symmetry constraints + Dodaj ograničenja simetričnosti + + + + + Add Distance constraints + Dodaj ograničenja rastojanja + + + + Add Horizontal constraint + Dodaj horizontalno ograničenje + + + + Add Vertical constraint + Dodaj vertikalno ograničenje + + + Add Block constraint - Add Block constraint + Dodaj ograničenje blokiranjem - + Add Angle constraint - Add Angle constraint + Dodaj ograničenje ugla - - - + + + Add Equality constraint - Add Equality constraint + Dodaj ograničenje jednakosti - + Add Equality constraints - Add Equality constraints + Dodaj ograničenja jednakosti - + Add Radius constraint - Add Radius constraint + Dodaj ograničenje poluprečnika - + Add concentric and length constraint - Add concentric and length constraint + Dodaj ograničenje koncentričnosti i rastojanja - + Add DistanceX constraint - Add DistanceX constraint + Dodaj ograničenje rastojanje X - + Add DistanceY constraint - Add DistanceY constraint + Dodaj ograničenje rastojanje Y - + Add point to circle Distance constraint - Add point to circle Distance constraint + Dodaj ograničenje rastojanja od tačke do kružnice - - + + Add point on object constraint Dodaj tačku na ograničenje objekta - - + + Add point to point horizontal distance constraint Dodaj ograničenje horizontalnog rastojanja od tačke do tačke - + Add fixed x-coordinate constraint Dodaj ograničenje fiksne x-koordinate - - + + Add point to point vertical distance constraint Dodaj ograničenje vertikalnog rastojanja od tačke do tačke - + Add fixed y-coordinate constraint Dodaj ograničenje fiksne y-koordinate - - + + Add parallel constraint Dodaj ograničenje paralelnosti - - - - - - - + + + + + + + Add perpendicular constraint Dodaj ograničenje upravnosti - + Add perpendicularity constraint Dodaj ograničenje upravnosti - + Swap coincident+tangency with ptp tangency Zameni podudarnost+tangentnost na tangentnost tačaka - + Swap PointOnObject+tangency with point to curve tangency Zameni tačka na objektu+tangentnost sa tangentnost tačke na krivu - - - - - - - + + + + + + + Add tangent constraint Dodaj ograničenje tangentnosti - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodaj tačku ograničenja tangentnosti - - - - + + + + Add radius constraint Dodaj ograničenje poluprečnika - - - - + + + + Add diameter constraint Dodaj ograničenje prečnika - - - - + + + + Add radiam constraint Dodaj ograničenje poluprečnik-prečnik - - - - - - + + + + + + Add angle constraint Dodaj ograničenje ugla - - + + Add equality constraint Dodaj ograničenje jednakosti - - - - - + + + + + Add symmetric constraint Dodaj ograničenje simetričnosti - + Add Snell's law constraint Dodaj ograničenje na osnovu Snellovog zakona - + Toggle constraint to driving/reference Prebaci između referentnog i ograničavajućeg režima kota - + Activate/Deactivate constraint Aktiviraj/deaktiviraj ograničenje @@ -2017,44 +2018,44 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Dodaj skicu centriranog pravougaonika - + Add rounded rectangle Dodaj skicu zaobljenog pravougaonika - + Add line to sketch wire Dodaj liniju žičanoj skici - + Add arc to sketch wire Dodaj luk žičanoj skici - - + + Add sketch arc Dodaj skicu kružnog luka - - + + Add sketch circle Dodaj skicu kružnice - + Add sketch ellipse Dodaj skicu elipse - + Add sketch arc of ellipse Dodaj skicu luka elipse - + Add sketch arc of hyperbola Dodaj skicu luka hiperbole @@ -2074,33 +2075,33 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Dodaj skicu tačke - - + + Create fillet Napravi zaobljenje - + Trim edge Opseci ivice - + Extend edge Produži ivicu - + Split edge Podeli ivicu - + Add external geometry Dodaj spoljašnju geometriju - + Add slot Dodaj žljeb @@ -2110,37 +2111,37 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Dodaj šestougao - + Convert to NURBS Konvertuj u NURBS - + Increase spline degree Povećaj stepen B-splajn krive - + Decrease spline degree Smanji stepen B-splajn krive - + Increase knot multiplicity Povećaj višestrukost čvora - + Decrease knot multiplicity Smanji višestrukost čvora - + Insert knot Umetni čvor - + Join Curves Spoji krive @@ -2180,12 +2181,12 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Ukloni poravnanje osa - + Toggle constraints to the other virtual space Prebaci ograničenja na drugi virtuelni prostor - + @@ -2193,7 +2194,7 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Ažuriraj virtuelni prostor ograničenja - + Add auto constraints Dodaj automatska ograničenja @@ -2233,7 +2234,7 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Dodaj čvor - + Create a carbon copy Napravi indigo kopiju @@ -2249,37 +2250,37 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Greška automatskog ograničavanja: Nerešiva skica dok se primenjuju ograničenja podudarnosti. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Greška automatskog ograničavanja: Nerešiva skica dok se primenjuju vertikalna/horizontalna ograničenja. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Greška automatskog ograničavanja: Nerešiva skica dok se primenjuje ograničenje jednakosti. - + Autoconstrain error: Unsolvable sketch without constraints. Greška automatskog ograničavanja: Skica je nerešiva bez ograničenja. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Greška automatskog ograničavanja: Nerešiva skica posle primene vertikalnih i horizontalnih ograničenja. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Greška automatskog ograničavanja: Nerešiva skica posle primene ograničenja tačka na tačku. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Greška automatskog ograničavanja: Nerešiva skica posle primene ograničenja jednakosti. @@ -2404,143 +2405,143 @@ nevažeća ograničenja, degenerisanu geometriju, itd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2556,9 +2557,9 @@ nevažeća ograničenja, degenerisanu geometriju, itd. - - - + + + Wrong selection Pogrešan izbor @@ -2579,329 +2580,329 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Dimenzionalno ograničenje - + Cannot add a constraint between two external geometries. Nije moguće dodati ograničenje između dve spoljne geometrije. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nije moguće dodati ograničenje između dve fiksne geometrije. Pod fiksnom geometrijom podrazumevamo spoljašnju geometriju, blokiranu geometriju i posebne tačke kao što su tačke čvorova B-splajn krive. - + Sketcher Constraint Substitution Zamena Sketcher ograničenja - + Keep notifying me of constraint substitutions Nastavi da me obaveštavaš o zamenama ograničenja - - - + + + Only sketch and its support are allowed to be selected. Dozvoljeno je da se izabere samo skica i njena osnova. - + One of the selected has to be on the sketch. Jedan od izabranih mora biti na skici. - - + + Select an edge from the sketch. Izaberi ivicu sa skice. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemoguće ograničenje - - - - + + + + The selected edge is not a line segment. Izabrana ivica nije linijski segment. - - - - - - + + + + + + Double constraint Duplo ograničenje - - - - - + + + + + The selected edge already has a horizontal constraint! Izabrana ivica već ima horizontalno ograničenje! - - - + + + The selected edge already has a vertical constraint! Izabrana ivica već ima vertikalno ograničenje! - - - - - - + + + + + + The selected edge already has a Block constraint! Izabrana ivica je već ograničena blokiranjem! - + The selected item(s) can't accept a horizontal constraint! Izabrane stavke(a) ne mogu prihvatiti horizontalno ograničenje! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Izabrano je više od jedne fiksne tačke. Izaberi najviše jednu fiksnu tačku! - + The selected item(s) can't accept a vertical constraint! Izabrane stavke(a) ne mogu prihvatiti vertikalno ograničenje! - - - + + + Select vertices from the sketch. Izaberi temena sa skice. - + Select one vertex from the sketch other than the origin. Izaberi jedno teme sa skice osim koordinatnog početka. - + Select only vertices from the sketch. The last selected vertex may be the origin. Izaberi samo temena sa skice. Poslednje izabrano teme može biti koordinatni početak. - + Wrong solver status Pogrešan status algoritma za rešavanje - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Ograničenje blokiranjem se ne može dodati ako je skica nerešena ili postoje suvišna i konfliktna ograničenja. - + Select one edge from the sketch. Izaberi jednu ivicu sa skice. - + Select only edges from the sketch. Izaberi samo ivice sa skice. - + Number of selected objects is not 3 Broj izabranih objekata nije 3 - - - + + + Error Greška - + Unexpected error. More information may be available in the Report View. Neočekivana greška. Potražite više informacija u Pregledaču objava. - + Endpoint to endpoint tangency was applied instead. Umesto toga je primenjena tangentnost u krajnjim tačkama. - + Select two or more points from the sketch. Izaberi dve ili više tačke sa skice. - + Select two or more vertices from the sketch. Izaberi dva ili više temena sa skice. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izaberi dva ili više temena sa skice za ograničenje podudarnosti, ili dva ili više krugova, elipsa, lukova ili lukova elipse za ograničenje koncentričnosti. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izaberi dva temena sa skice za ograničenje podudarnosti, ili dva kruga, elipse, lukove ili lukove elipse za ograničenje koncentričnosti. - + Select exactly one line or one point and one line or two points from the sketch. Izaberi tačno jednu liniju ili jednu tačku i jednu liniju, ili dve tačke sa skice. - + Cannot add a length constraint on an axis! Ne može se dodati ograničenje dužine na osu! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Izaberi tačno jednu liniju, jednu tačku i jednu liniju, dve tačke ili dva kruga na skici. - + This constraint does not make sense for non-linear curves. Ovo ograničenje nema smisla za nelinearne krive. - + Endpoint to edge tangency was applied instead. Umesto toga je primenjena tangentnost ivice u krajnjoj tački. - - - - - - - + + + + + + + Select the right things from the sketch. Izaberi prave stvari sa skice. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Izaberi ivicu koja nije težina B-splajn kontrolne tačke. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nijedna od izabranih tačaka nije bila ograničena na dotične krive, jer su delovi istog elementa, jer su obe spoljašnje geometrije ili zato što ivica nije prihvatljiva. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nijedna od izabranih tačaka nije bila ograničena na odgovarajuće krive, bilo zato što su delovi istog elementa, ili zato što su obe spoljašnje geometrije. - - - - + + + + Select exactly one line or up to two points from the sketch. Izaberi tačno jednu liniju ili najviše dve tačke sa skice. - + Cannot add a horizontal length constraint on an axis! Ne može se primeniti ograničenje horizontalno rastojanje na osu! - + Cannot add a fixed x-coordinate constraint on the origin point! Nije moguće ograničiti x-koordinatu koordinatnog početka! - - + + This constraint only makes sense on a line segment or a pair of points. Ovo ograničenje ima smisla samo na segmentu linije ili paru tačaka. - + Cannot add a vertical length constraint on an axis! Ne može se primeniti ograničenje vertikalno rastojanje na osu! - + Cannot add a fixed y-coordinate constraint on the origin point! Nije moguće ograničiti y-koordinatu koordinatnog početka! - + Select two or more lines from the sketch. Izaberi dve ili više linija sa skice. - - + + Select at least two lines from the sketch. Izaberi najmanje dve linije sa skice. - + Select a valid line. Izaberi važeću ivicu. - - + + The selected edge is not a valid line. Izabrana ivica nije važeća linija. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvatljive kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; dve krive i tačka. - + Select some geometry from the sketch. perpendicular constraint Izaberi neku geometriju sa skice. - - + + Cannot add a perpendicularity constraint at an unconnected point! Ne može se dodati ograničenje upravnosti na tačku pošto ona nije krajnja tačka! - - - + + + Perpendicular to B-spline edge currently unsupported. Primena ograničenja upravnosti na B-splajn krivu trenutno nije podržana. - - + + One of the selected edges should be a line. Jedna od izabranih ivica bi trebala biti linija. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Primenjena je tangentnost na krajnje tačke. Ograničenje podudarnosti je izbrisano. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Primenjena je tangentnost između krajnje tačke i ivice. Ograničenje tačka na objektu je obrisano. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; dve krive i tačka. - + Select some geometry from the sketch. tangent constraint Izaberi neku geometriju sa skice. - - - + + + Cannot add a tangency constraint at an unconnected point! Ne može se dodati ograničenje tangentnosti u tačkama koje se ne poklapaju! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. Umesto toga je primenjena tangentnost između čvora B-splajna i krajnje tačke. - + Select either one point and several curves, or one curve and several points. Izaberi ili jednu tačku i nekoliko krivih, ili jednu krivu i nekoliko tačaka. - - + + Wrong number of selected objects! Pogrešan broj izabranih objekata! - - + + With 3 objects, there must be 2 curves and 1 point. Kod 3 objekta, moraju postojati 2 krive i 1 tačka. - - - + + + Tangency to B-spline edge currently unsupported. Primena ograničenja tangentnosti na B-splajn krivu trenutno nije podržana. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Izaberi jedan ili više lukova ili krugova sa skice. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Izaberi samo jedan ili više polova B-splajn krive ili samo jedan ili više lukova ili krugova sa skice, ali ne pomešano. - - - + + + Constraint only applies to arcs or circles. Ograničenje se odnosi samo na lukove i kružnice. - - + + Select one or two lines from the sketch. Or select two edges and a point. Izaberi jednu ili dve linije sa skice, ili izaberi dve ivice i tačku. - - + + Parallel lines Paralelne linije - - + + An angle constraint cannot be set for two parallel lines. Za dve paralelne prave ne može se postaviti ograničenje ugla. - + Cannot add an angle constraint on an axis! Ne možete dodati ograničenje ugla na osu! - + Select two edges from the sketch. Izaberi dve ivice sa skice. - + Select two or more compatible edges. Izaberi dve ili više kompatibilnih ivica. - + Sketch axes cannot be used in equality constraints. Na ose skice se ne može primeniti ograničenje jednakosti. - + Equality for B-spline edge currently unsupported. Primena ograničenja jednakosti na B-splajn krivu trenutno nije podržana. - - - - + + + + Select two or more edges of similar type. Izaberi dve ili više ivica sličnog tipa. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Izaberi dve tačke i liniju simetrije, dve tačke i tačku simetrije ili pravu i tačku simetrije sa skice. - - + + Cannot add a symmetry constraint between a line and its end points. Nije moguće dodati ograničenje simetričnosti između linije i njenih krajnjih tačaka. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nije moguće dodati ograničenje simetričnosti između linije i njenih krajnjih tačaka! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Izaberi dve krajnje tačke linija koje će delovati kao zraci i ivicu koja predstavlja granicu. Prva izabrana tačka odgovara indeksu loma n1, druga n2, a odnos n2/n1 je relativni indeks loma. - + Selected objects are not just geometry from one sketch. Izabrani objekti nisu samo geometrija iz jedne skice. - + Cannot create constraint with external geometry only. Nije moguće kreirati ograničenje samo sa spoljnom geometrijom. - + Incompatible geometry is selected. Izabrana je nekompatibilna geometrija. - + SnellsLaw on B-spline edge is currently unsupported. Primena ograničenja refrakcije (Snellov zakon) na B-splajn krivu trenutno nije podržana. - - - - - + + + + + Select constraints from the sketch. Izaberi ograničenja sa skice. - - - + + + Select constraint(s) from the sketch. Izaberi ograničenje(a) sa skice. - + B-Spline Degree Stepen B-splajn krive - + Define B-Spline Degree, between 1 and %1: Podesi stepen B-splajn krive, između 1 i %1: - - - + + + CAD Kernel Error Greška CAD jezgra - + None of the selected elements is an edge. Nijedan od izabranih elemenata nije ivica. - - + + At least one of the selected objects was not a B-Spline and was ignored. Najmanje jedan od izabranih objekata nije bio B-splajn i ignorisan je. - - + + The selection comprises more than one item. Please select just one knot. Izbor obuhvata više od jedne stavke. Izaberi samo jedan čvor. - - + + Input Error Greška prilikom unosa - - + + None of the selected elements is a knot of a B-spline Nijedan od izabranih elemenata nije čvor B-splajn krive - - + + Selection is empty Nisi ništa izabrao - + Nothing is selected. Please select a b-spline. Ništa nije izabrano. Izaberi B-splajn krivu. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Izaberi B-splajn krivu da bi dodao čvor (ne čvor na njoj). Ako kriva nije B-splajn, prvo je konvertuj. - + Nothing is selected. Please select end points of curves. Ništa nije izabrano. Izaberi krajnje tačke krivih. - + Too many curves on point Previše krivih u tački - - + + Exactly two curves should end at the selected point to be able to join them. Tačno dve krive treba da se završe u izabranoj tački da bi se mogle spojiti. - + Too few curves on point Premalo krivih u tački - + Two end points, or coincident point should be selected. Treba izabrati dve krajnje tačke ili podudarnu tačku. @@ -3306,17 +3307,17 @@ Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Greška vrednosti @@ -3379,7 +3380,7 @@ Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; Coincident - Coincident + Podudarnost @@ -3424,7 +3425,7 @@ Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; Block - Blok + Blokiranje @@ -3449,7 +3450,7 @@ Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; Distance - Distance + Rastojanje @@ -3630,12 +3631,12 @@ Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; Length: - + Refractive index ratio Relativni indeks loma - + Ratio n2/n1: Odnos n2/n1: @@ -3915,8 +3916,8 @@ Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; SketcherGui::PropertyConstraintListItem - - + + Unnamed Bez imena @@ -4140,30 +4141,30 @@ Potrebno je ponovo ući u režim uređivanja da bi stupio na snagu. Dimension Constraint - Dimension Constraint + Dimenzionalno ograničenje Dimensioning constraints: - Dimensioning constraints: + Dimenzionalna ograničenja: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Izaberi vrstu alatke za kotiranje za vašu traku sa alatkama: +'Pojedinačni alat': Jedan alat za sve vrste kotiranja na traci sa alatkama: Rastojanje, Rastojanje X/Y, Ugao, Poluprečnik. (Drugi u padajućem meniju) +'Razdvojeni alati': Individualni alati za sve vrste kotiranja. +'Oba': Imaćete i alatku 'Kota' i razdvojene alate. +Ovo podešavanje je samo za traku sa alatkama. Šta god bude izabrano, svi alati su uvek dostupni u meniju i preko prečica. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Režim prečnik/poluprečnik alatke za kotiranje: @@ -4171,38 +4172,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Dok se koristi alatka za kotiranje, moguće je birati tretiranje krugova i lukova: +'Auto': Alatka će primeniti poluprečnik na lukove i prečnik na krugove. +'Prečnik': Alatka će primeniti prečnik i na lukove i na krugove. +'Poluprečnik': Alatka će primeniti radijus i na lukove i na krugove. - + Single tool - Single tool + Pojedinačni alat - + Separated tools - Separated tools + Razdvojeni alati - + Both Oba - + Auto Automatski - + Diameter Prečnik - + Radius Poluprečnik @@ -4651,12 +4652,12 @@ Tada su objekti vidljivi samo iza ravni skice. Primeni na postojeće skice - + Unexpected C++ exception Neočekivani C++ izuzetak - + Sketcher Sketcher @@ -4664,55 +4665,55 @@ Tada su objekti vidljivi samo iza ravni skice. SketcherGui::SketcherValidation - + No missing coincidences Postoje sva ograničenje poklapanja - + No missing coincidences found Pronađeno je da postoje sva ograničenje poklapanja - + Missing coincidences Ograničenje poklapanja koja nedostaju - + %1 missing coincidences found %1 je pronađeno ograničenja poklapanja koja nedostaju - + No invalid constraints Nema nevažećih ograničenja - + No invalid constraints found Nisu pronađena nevažeća ograničenja - + Invalid constraints Neispravna ograničenja - + Invalid constraints found Pronađena neispravna ograničenja - - - + + + Reversed external geometry Preokrenuta spoljašnja geometrija - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,7 +4726,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Klikni na dugme „Zameni krajnje tačke u ograničenjima“ da bi ponovo dodelio krajnje tačke. Uradi ovo samo jednom za skice napravljene u FreeCAD-u starijem od verzije 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4734,75 +4735,70 @@ However, no constraints linking to the endpoints were found. Međutim, nisu pronađena nikakva ograničenja vezana za krajnje tačke. - + No reversed external-geometry arcs were found. Nije pronađen preokrenuti luk spoljašnje geometrije. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 izmene su napravljene u ograničenjima koja se povezuju sa krajnjim tačkama preokrenutih lukova. - - + + Constraint orientation locking Ograničenje zaključavanjem orijentacije - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Zaključavanje orijentacije je omogućeno i ponovo izračunato za ograničenja %1. Ograničenja su navedena u Pregledaču objava (meni Pogled -> Paneli -> Pregledač objava). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Zaključavanje orijentacije je onemogućeno za %1 ograničenja. Ograničenja su navedena u Pregledaču objava (meni Pogled -> Paneli -> Pregledaču objava). Imaj na umu da je za sva buduća ograničenja zaključavanje i dalje podrazumevano. - - + + Delete constraints to external geom. Izbriši ograničenja za spoljnu geometriju. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Spremaš se da izbrišeš SVA ograničenja koja se tiču spoljne geometrije. Ovo je korisno za spasavanje skice sa pokvarenim/promenjenim vezama ka spoljnoj geometriji. Da li si siguran da želiš da izbrišeš ograničenja? - + All constraints that deal with external geometry were deleted. Sva ograničenja koja se tiču spoljne geometrije su izbrisana. - + No degenerated geometry Nema degenerisane geometrije - + No degenerated geometry found Nije nađena degenerisana geometrija - + Degenerated geometry Degenerisana geometrija - + %1 degenerated geometry found %1 degenerisane geometrije pronađeno SketcherGui::TaskSketcherConstraints - - - Form - Obrazac - Check to toggle filters @@ -4877,11 +4873,6 @@ Međutim, nisu pronađena nikakva ograničenja vezana za krajnje tačke. SketcherGui::TaskSketcherElements - - - Form - Obrazac - Check to toggle filters @@ -5067,7 +5058,7 @@ Međutim, nisu pronađena nikakva ograničenja vezana za krajnje tačke. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Napredne kontrole algoritma za rešavanje @@ -5359,8 +5350,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Prebacuje između prikazivanja i sakrivanja dijagram zakrivljenosti za sve B-splajn krive @@ -5368,8 +5359,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Smanjuje višestrukost izabranog čvora B-splajn krive @@ -5377,8 +5368,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Prebacuje između prikazivanja i skrivanja stepena za sve B-splajn krive @@ -5386,8 +5377,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Povećava višestrukost izabranog čvora B-splajn krive @@ -5395,8 +5386,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Prebacuje između prikazivanja i sakrivanja višestrukosti čvorova za sve B-splajn krive @@ -5404,8 +5395,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Prebacuje između prikazivanja i sakrivanja težine kontrolne tačke za sve B-splajn krive @@ -5413,8 +5404,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Prebacuje između prikazivanja i sakrivanja linija kontrolnih tačaka za sve B-splajn krive @@ -5449,8 +5440,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Kotiraj prečnik kruga ili luka @@ -5458,7 +5449,7 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Kotiraj poluprečnik/prečnik krugova ili lukova @@ -5466,8 +5457,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Kotiraj poluprečnik kruga ili luka @@ -5475,7 +5466,7 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Kotiraj poluprečnik/prečnik krugova ili lukova @@ -5492,8 +5483,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Napravi luk pomoću krajnjih tačaka i tačke na luku @@ -5501,8 +5492,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Napravi kružnicu pomoću 3 tačke @@ -5510,8 +5501,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Napravi kružni luk pomoću centra i krajnjih tačaka @@ -5519,8 +5510,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Napravi luk elipse pomoću centra, veće poluose i krajnjih tačaka @@ -5528,8 +5519,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Napravi luk hiperbole pomoću centra, realne poluose i krajnjih tačaka @@ -5537,8 +5528,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Napravi luk parabole pomoću fokusa, temena i krajnjih tačaka @@ -5546,13 +5537,13 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateBSpline - + B-spline by control points B-splajn kriva pomoću kontrolnih tačaka - - + + Create a B-spline by control points Napravi B-splajn krivu pomoću kontrolnih tačaka @@ -5560,8 +5551,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Napravi kružnicu pomoću centra i tačke na kružnici @@ -5569,8 +5560,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Napravi elipsu pomoću periapse, apoapse i male poluose @@ -5578,8 +5569,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Napravi elipsu pomoću centra, veće poluose i tačke @@ -5587,8 +5578,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateFillet - - + + Creates a radius between two lines Napravi zaobljenje između dve linije @@ -5596,8 +5587,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Napravi sedmougao pomoću njegovog centra i ugla @@ -5605,8 +5596,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Napravi šestougao pomoću njegovog centra i ugla @@ -5614,7 +5605,7 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateOblong - + Create a rounded rectangle Napravi zaobljeni pravougaonik @@ -5622,14 +5613,14 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Napravi osmougao pomoću njegovog centra i ugla - - + + Create a regular polygon by its center and by one corner Napravi pravilni mnogougao pomoću njegovog centra i ugla @@ -5637,8 +5628,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Napravi petougao pomoću njegovog centra i ugla @@ -5646,8 +5637,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Zaobljenje koje čuva ograničenja i presečnu tačku @@ -5655,7 +5646,7 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateRectangle - + Create a rectangle Napravi pravougaonik @@ -5663,7 +5654,7 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateRectangle_Center - + Create a centered rectangle Napravi centrirani pravougaonik @@ -5671,8 +5662,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Napravi kvadrat pomoću centra i jednog temena @@ -5680,8 +5671,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Napravi jednakostranični trougao pomoću centra i jednog temena @@ -5689,13 +5680,13 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Periodična B-splajn kriva pomoću kontrolnih tačaka - - + + Create a periodic B-spline by control points Napravi periodičnu B-splajn krivu pomoću kontrolnih tačaka @@ -6329,36 +6320,36 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Greška @@ -6378,45 +6369,45 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Ograničenje ima pogrešne indeksne informacije tako da je neispravno. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Neispravno ograničenje - - - + + + Failed to add arc Dodavanje luka nije uspelo - + Failed to add arc of ellipse Dodavanje eliptičnog luka nije uspelo - + Cannot create arc of hyperbola from invalid angles, try again! Nije moguće napraviti hiperbolični luk zbog pogrešnih uglova, pokušajte ponovo! - + Cannot create arc of hyperbola Nije moguće napraviti hiperbolični luk - + Cannot create arc of parabola Nije moguće napraviti parabolični luk @@ -6426,18 +6417,18 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Greška prilikom dodavanja pola B-Splajn krive - + Error creating B-spline pole Greška prilikom pravljenja pola B-Splajn krive - - + + Error creating B-spline Greška prilikom pravljenja B-Splajn krive - + Error deleting last pole Greška prilikom brisanja zadnjeg pola B-Splajn krive @@ -6447,49 +6438,49 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Nije moguće dodati čvor - + Cannot add internal alignment points Nije moguće dodati tačke unutrašnjeg poravnanja - + Error removing knot Greška pri uklanjanju čvora - + Failed to add carbon copy Dodavanje indigo kopije nije uspelo - - + + Failed to add circle Dodavanje kruga nije uspelo - + Failed to add an ellipse Dodavanje elipse nije uspelo - + Failed to extend edge Produživanje ivice nije uspelo - + Failed to add external geometry Dodavanje spoljašnje geometrije nije uspelo - + Failed to create fillet Nije uspelo pravljenje zaobljenja - + Failed to add line Dodavanje linije nije uspelo @@ -6499,7 +6490,7 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Dodavanje tačke nije uspelo - + Failed to add polygon Dodavanje mnogougla nije uspelo @@ -6509,27 +6500,27 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Dodavanje kutije nije uspelo - + Failed to add rounded rectangle Dodavanje zaobljenog pravougaonika nije uspelo - + Failed to add slot Dodavanje žjeba nije uspelo - + Failed to add edge Dodavanje ivice nije uspelo - + Failed to trim edge Opsecanje ivice nije uspelo - + Value Error @@ -6539,13 +6530,13 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-splajn kriva pomoću čvorova - - + + Create a B-spline by knots Napravi B-splajn krivu pomoću čvorova @@ -6553,13 +6544,13 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodična B-splajn kriva pomoću čvorova - - + + Create a periodic B-spline by knots Napravi periodičnu B-splajn krivu pomoću čvorova @@ -6665,12 +6656,12 @@ Tačke se moraju nalaziti na udaljenosti manjoj od 1/5 razmaka linija mreže da CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Napravi B-splajn krivu pomoću čvorova - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Napravi B-splajn krivu pomoću čvorova, tj. interpolacijom, na skici. @@ -6678,12 +6669,12 @@ Tačke se moraju nalaziti na udaljenosti manjoj od 1/5 razmaka linija mreže da CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Napravi periodičnu B-splajn krivu pomoću čvorova - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Napravi periodičnu B-splajn krivu pomoću čvorova, tj. interpolacijom, na skici. @@ -6691,31 +6682,44 @@ Tačke se moraju nalaziti na udaljenosti manjoj od 1/5 razmaka linija mreže da CmdSketcherDimension - + Dimension Kota - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Ograniči kontekstualno na osnovu izbora. +U zavisnosti od izbora, moguće je na raspolaganju imati nekoliko vrsta ograničenja. Možeš da se krećeš kroz njih pomoću tastera SHIFT. +Levi klik na prazan prostor potvrdiće trenutno ograničenje. Desni klik ili pritisak na Esc će poništiti. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Prikaži/sakrij kružnog pomoćnika za lukove - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Prebacuje između prikazivanja i sakrivanja kružnog pomoćnika za lukove + + + + CmdSketcherCompDimensionTools + + + Dimension + Kota + + + + Dimension tools. + Alatke za kotiranje. diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts index 12a8c76cf1..2d0630fb06 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Направи индиго копију - + Copy the geometry of another sketch Копира геометрију друге скице @@ -100,27 +100,27 @@ Show/hide B-spline information layer - + Show/hide B-spline degree Прикажи/сакриј степен Б-сплајн криве - + Show/hide B-spline control polygon Прикажи/сакриј линије Б-сплајн криве - + Show/hide B-spline curvature comb Прикажи/сакриј дијаграм закривљености Б-сплајн криве - + Show/hide B-spline knot multiplicity Прикажи/сакриј вишеструкост чворова Б-сплајн криве - + Show/hide B-spline control point weight Прикажи/сакриј тежину контролне тачке Б-сплајн криве @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ограничење кружног лука или круга - + Constrain an arc or a circle Котирај кружни лук или круг - + Constrain radius Ограничење полупречника - + Constrain diameter Ограничење пречника - + Constrain auto radius/diameter Аутоматско ограничење полупречника и пречника @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Направи лук - + Create an arc in the sketcher Направи кружни лук на скици - + Center and end points Кружни лук помоћу центра - + End points and rim point Кружни лук помоћу 3 тачке @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Направи Б-сплајн криву - + Create a B-spline in the sketch Направи Б-сплајн криву на скици @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Направи кружницу - + Create a circle in the sketcher Направи кружницу - + Center and rim point Кружница помоћу центра - + 3 rim points Кружница помоћу 3 тачке @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Направи конусне пресеке - + Create a conic in the sketch Направи конусне пресеке у скици - + Ellipse by center, major radius, point Елипса помоћу центра, велике полуосе, тачке - + Ellipse by periapsis, apoapsis, minor radius Елипса помоћу периапсе, апоапсе, мале полуосе - + Arc of ellipse by center, major radius, endpoints Лук елипсе помоћу центра, велике полуосе, крајњих тачака - + Arc of hyperbola by center, major radius, endpoints Лук хиперболе помоћу центра, реалне полуосе и крајњих тачака - + Arc of parabola by focus, vertex, endpoints Лук параболе помоћу fokusa, темена и крајњих тачака @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Направи заобљење - + Create a fillet between two lines Направи заобљење између две линије - + Sketch fillet Заобљење скице - + Constraint-preserving sketch fillet Заобљење које чува ограничења @@ -299,17 +299,17 @@ Направи правоугаоник на скици - + Rectangle Правоугаоник - + Centered rectangle Центрирани правоугаоник - + Rounded rectangle Заобљени правоугаоник @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Направи правилни многоугао - + Create a regular polygon in the sketcher Направи правилни многоугао на скици - + Triangle Троугао - + Square Квадрат - + Pentagon Петоугао - + Hexagon Шестоугао - + Heptagon Седмоугао - + Octagon Осмоугао - + Regular polygon Правилан многоугао @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Измени вишеструкост чвора - + Modifies the multiplicity of the selected knot of a B-spline Модификује вишеструкост изабраног чвора Б-сплајн криве - + Increase knot multiplicity Повећај вишеструкост чвора - + Decrease knot multiplicity Смањи вишеструкост чвора @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ограничење угла - + Fix the angle of a line or the angle between two lines Котирај угао линије или угао између две линије @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Ограничавање блокирањем - + Block the selected edge from moving Блокира померање изабране ивице @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ограничење подударности - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Направи ограничење подударности између тачака или концентрично ограничење између кругова, лукова и елипса @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ограничење пречника - + Fix the diameter of a circle or an arc Котирај пречник круга или лука @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ограничење растојања - + Fix a length of a line or the distance between a line and a vertex or between two circles Котирај дужину линије, растојање између линије и темена или растојање између два круга @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ограничење хоризонталног растојања - + Fix the horizontal distance between two points or line ends Котирај хоризонтално растојање између две тачке или крајева линија @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ограничење вертикалног растојања - + Fix the vertical distance between two points or line ends Котирај вертикално растојање између две тачке или крајева линија @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ограничење једнакости - + Create an equality constraint between two lines or between circles and arcs Направи ограничење једнакости између две линије или између кругова и лукова @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ограничење хоризонталности - + Create a horizontal constraint on the selected item Направи ограничење хоризонталности на изабраној ставки @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Ограничавање закључавањем - + Create both a horizontal and a vertical distance constraint on the selected vertex Направи ограничење хоризонталног и вертикалног растојања на изабраном темену @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Ограничење паралелности - + Create a parallel constraint between two lines Направи ограничење паралелности између две линије @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ограничење управности - + Create a perpendicular constraint between two lines Направи ограничење управности између два геометријска елемента @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Ограничење тачка на објекту - + Fix a point onto an object Ограничење тачке да буде везана за објекат @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Аутоматско ограничење полупречника и пречника - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Котирај пречник ако изабереш круг или полупречник ако изабереш лук или пол сплајна @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Котирај полупречник - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Котирај полупречник круга или лука или котирајте круг тежине пола Б-сплајн криве @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ограничење рефракције (Снеллов закон) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Направи ограничење рефракције (Снеллов закон) између две крајње тачке зрака @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ограничење симетричности - + Create a symmetry constraint between two points with respect to a line or a third point Направи ограничење симетричности између две тачке @@ -614,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Ограничење тангентности - + Create a tangent constraint between two entities Направи тангентно ограничење између два ентитета @@ -627,12 +627,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Ограничење вертикалности - + Create a vertical constraint on the selected item Направи ограничење вертикалности на изабраној ставки @@ -640,12 +640,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Претвори геометрију у Б-сплајн криву - + Converts the selected geometry to a B-spline Претвара изабрану геометрију у Б-сплајн криву @@ -666,12 +666,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Направи кружни лук помоћу 3 тачке - + Create an arc by its end points and a point along the arc Направи лук помоћу крајњих тачака и тачке на луку @@ -679,12 +679,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Направи кружницу помоћу 3 тачке - + Create a circle by 3 perimeter points Направи кружницу помоћу 3 тачке на обиму @@ -692,12 +692,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Направи кружни лук помоћу центра - + Create an arc by its center and by its end points Направи кружни лук помоћу центра и крајњих тачака @@ -705,12 +705,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Направи лук елипсе - + Create an arc of ellipse in the sketch Направи лук елипсе на скици @@ -718,12 +718,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Направи лук хиперболе - + Create an arc of hyperbola in the sketch Направи лук хиперболе на скици @@ -731,12 +731,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Направи лук параболе - + Create an arc of parabola in the sketch Направи лук параболе на скици @@ -744,12 +744,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Направи Б-сплајн криву - + Create a B-spline by control points in the sketch. Направи Б-сплајн криву помоћу контролних тачака са скице. @@ -757,12 +757,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Направи кружницу - + Create a circle in the sketch Направи кружницу на скици @@ -770,12 +770,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Направи елипсу помоћу 3 тачке - + Create an ellipse by 3 points in the sketch Направи елипсу помоћу 3 тачке на скици @@ -783,12 +783,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Направи елипсу помоћу центра - + Create an ellipse by center in the sketch Направи елипсу помоћу центра на скици @@ -796,12 +796,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Направи заобљење - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Направи седмоугао - + Create a heptagon in the sketch Направи седмоугао на скици @@ -822,12 +822,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Направи шестоугао - + Create a hexagon in the sketch Направи шестоугао на скици @@ -861,12 +861,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Направи осмоугао - + Create an octagon in the sketch Направи осмоугао на скици @@ -874,12 +874,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Направи петоугао - + Create a pentagon in the sketch Направи петоугао на скици @@ -887,12 +887,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Направи периодичну Б-сплајн криву - + Create a periodic B-spline by control points in the sketch. Направи периодичну Б-сплајн криву помоћу контролних тачака на скици. @@ -900,12 +900,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Направи тачку - + Create a point in the sketch Направи тачку на скици @@ -913,12 +913,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Направи заобљење које чува угао - + Fillet that preserves intersection point and most constraints Заобљење које чува пресечну тачку и већину ограничења @@ -926,12 +926,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Направи повезане линије - + Create a polyline in the sketch. 'M' Key cycles behaviour Направи повезане линије на скици. 'M' типка мења понашање @@ -965,12 +965,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Направи правилни многоугао - + Create a regular polygon in the sketch Направи правилни многоугао на скици @@ -978,12 +978,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Направи жљеб - + Create a slot in the sketch Направи жљеб на скици @@ -991,12 +991,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Направи квадрат - + Create a square in the sketch Направи квадрат на скици @@ -1004,12 +1004,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Направи једнакостранични троугао - + Create an equilateral triangle in the sketch Направи једнакостранични троугао на cкици @@ -1017,12 +1017,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Смањи степен Б-сплајн криве - + Decreases the degree of the B-spline Умањује степен Б-сплајн криве @@ -1030,12 +1030,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Смањи вишеструкост чвора - + Decreases the multiplicity of the selected knot of a B-spline Смањује вишеструкост изабраног чвора Б-сплајн криве @@ -1082,12 +1082,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Продужи ивицу - + Extend an edge with respect to the picked position Продужи ивицу у односу на изабрани положај @@ -1095,12 +1095,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Направи спољашњу геометрију - + Create an edge linked to an external geometry Направи ивицу везану за спољашњу геометрију @@ -1108,12 +1108,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Повећајте степен Б-сплајн криве - + Increases the degree of the B-spline Повећава степен Б-сплајн криве @@ -1121,12 +1121,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Повећај вишеструкост чвора - + Increases the multiplicity of the selected knot of a B-spline Повећава вишеструкост изабраног чвора Б-сплајн криве @@ -1134,12 +1134,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Уметни чвор - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Умеће чвор на датом параметру. Ако чвор већ постоји на том параметру, његова вишеструкост се повећава за један. @@ -1147,12 +1147,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Споји криве - + Join two curves at selected end points Споји две криве у изабраним крајњим тачкама @@ -1438,12 +1438,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Подели ивицу - + Splits an edge into two while preserving constraints Дели ивицу на два дела уз очување ограничења @@ -1464,12 +1464,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Промени виртуални простор - + Switches the selected constraints or the view to the other virtual space Пребацује изабрана ограничења или поглед на други виртуелни простор @@ -1490,12 +1490,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Активирај/деактивирај ограничење - + Activates or deactivates the selected constraints Активира или деактивира изабрана ограничења @@ -1516,12 +1516,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ограничавајуће/референтне коте - + Set the toolbar, or the selected constraints, into driving or reference mode Подеси палету са алаткама или изабрана ограничења, @@ -1531,12 +1531,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Опсеци ивице - + Trim an edge with respect to the picked position Опсеци ивицу у односу на изабрани положај @@ -1595,369 +1595,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Додај хоризонтално ограничење - - - + + + Add horizontal alignment Додај хоризонтално поравнање - - + + Add vertical constraint Додај вертикално ограничење - + Add vertical alignment Додај вертикално поравнање - + Add 'Lock' constraint Додај ограничавање закључавањем - + Add relative 'Lock' constraint Додај релативно ограничење закључавањем - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Додај ограничавање блокирањем - + Add block constraint Додај ограничавање блокирањем - - - + + + Add coincident constraint Додај ограничење подударности - - + + Add distance from horizontal axis constraint Додај коту растојања од хоризонталне осе - - + + Add distance from vertical axis constraint Додај коту растојања од вертикалне осе - - + + Add point to point distance constraint Додај коту вертикалног растојања од тачке до тачке - - - + + + Add point to line Distance constraint Додај коту растојања од тачке до линије - - + + Add circle to circle distance constraint Додај ограничење између два круга - + Add circle to line distance constraint Додај ограничење растојања од круга до линије - - - - - + + + + + + Add length constraint Додај ограничење дужине - - + + Dimension Кота - + Add lock constraint - Add lock constraint + Додај ограничење закључавањем - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Додај ограничење 'Растојање од координатног почетка' - - - + + + Add Distance constraint - Add Distance constraint + Додај ограничење растојања - - - + + + Add 'Horizontal' constraints - Add 'Horizontal' constraints + Додај 'хоризонтална' ограничења - - - + + + Add 'Vertical' constraints - Add 'Vertical' constraints - - - - - Add Symmetry constraint - Add Symmetry constraint - - - - - Add Symmetry constraints - Add Symmetry constraints - - - - - Add Distance constraints - Add Distance constraints - - - - Add Horizontal constraint - Add Horizontal constraint - - - - Add Vertical constraint - Add Vertical constraint + Додај 'вертикална' ограничења + + Add Symmetry constraint + Додај ограничење симетричности + + + + + Add Symmetry constraints + Додај ограничења симетричности + + + + + Add Distance constraints + Додај ограничења растојања + + + + Add Horizontal constraint + Додај хоризонтално ограничење + + + + Add Vertical constraint + Додај вертикално ограничење + + + Add Block constraint - Add Block constraint + Додај ограничење блокирањем - + Add Angle constraint - Add Angle constraint + Додај ограничење угла - - - + + + Add Equality constraint - Add Equality constraint + Додај ограничење једнакости - + Add Equality constraints - Add Equality constraints + Додај ограничења једнакости - + Add Radius constraint - Add Radius constraint + Додај ограничење полупречника - + Add concentric and length constraint - Add concentric and length constraint + Додај ограничење концентричности и растојања - + Add DistanceX constraint - Add DistanceX constraint + Додај ограничење растојање X - + Add DistanceY constraint - Add DistanceY constraint + Додај ограничење растојање Y - + Add point to circle Distance constraint - Add point to circle Distance constraint + Додај ограничење растојања од тачке до кружнице - - + + Add point on object constraint Додај тачку на ограничење објекта - - + + Add point to point horizontal distance constraint Додај ограничење хоризонталног растојања од тачке до тачке - + Add fixed x-coordinate constraint Додај ограничење фиксне x-координате - - + + Add point to point vertical distance constraint Додај ограничење вертикалног растојања од тачке до тачке - + Add fixed y-coordinate constraint Додај ограничење фиксне y-координате - - + + Add parallel constraint Додај ограничење паралелности - - - - - - - + + + + + + + Add perpendicular constraint Додај ограничење управности - + Add perpendicularity constraint Додај ограничење управности - + Swap coincident+tangency with ptp tangency Замени подударност+тангентност на тангентност тачака - + Swap PointOnObject+tangency with point to curve tangency Замени тачка на објекту+тангентност са тангентност тачке на криву - - - - - - - + + + + + + + Add tangent constraint Додај ограничење тангентности - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Додај тачку ограничења тангентности - - - - + + + + Add radius constraint Додај ограничење полупречника - - - - + + + + Add diameter constraint Додај ограничење пречника - - - - + + + + Add radiam constraint Додај ограничење полупречник-пречник - - - - - - + + + + + + Add angle constraint Додај ограничење угла - - + + Add equality constraint Додај ограничење једнакости - - - - - + + + + + Add symmetric constraint Додај ограничење симетричности - + Add Snell's law constraint Додај ограничење на основу Снелловог закона - + Toggle constraint to driving/reference Пребаци између референтног и ограничавајућег режима кота - + Activate/Deactivate constraint Активирај/деактивирај ограничење @@ -2017,44 +2018,44 @@ invalid constraints, degenerated geometry, etc. Додај скицу центрираног правоугаоника - + Add rounded rectangle Додај скицу заобљеног правоугаоника - + Add line to sketch wire Додај линију жичаној скици - + Add arc to sketch wire Додај лук жичаној скици - - + + Add sketch arc Додај скицу кружног лука - - + + Add sketch circle Додај скицу кружнице - + Add sketch ellipse Додај скицу елипсе - + Add sketch arc of ellipse Додај скицу лука елипсе - + Add sketch arc of hyperbola Додај скицу лука хиперболе @@ -2074,33 +2075,33 @@ invalid constraints, degenerated geometry, etc. Додај скицу тачке - - + + Create fillet Направи заобљење - + Trim edge Опсеци ивице - + Extend edge Продужи ивицу - + Split edge Подели ивицу - + Add external geometry Додај спољашњу геометрију - + Add slot Додај жљеб @@ -2110,37 +2111,37 @@ invalid constraints, degenerated geometry, etc. Додај шестоугао - + Convert to NURBS Конвертуј у NURBS - + Increase spline degree Повећај степен Б-сплајн криве - + Decrease spline degree Смањи степен Б-сплајн криве - + Increase knot multiplicity Повећај вишеструкост чвора - + Decrease knot multiplicity Смањи вишеструкост чвора - + Insert knot Уметни чвор - + Join Curves Споји криве @@ -2180,12 +2181,12 @@ invalid constraints, degenerated geometry, etc. Уклони поравнање оса - + Toggle constraints to the other virtual space Пребаци ограничења на други виртуелни простор - + @@ -2193,7 +2194,7 @@ invalid constraints, degenerated geometry, etc. Ажурирај виртуелни простор ограничења - + Add auto constraints Додај аутоматска ограничења @@ -2233,7 +2234,7 @@ invalid constraints, degenerated geometry, etc. Додај чвор - + Create a carbon copy Направи индиго копију @@ -2249,37 +2250,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Грешка аутоматског ограничавања: Нерешива скица док се примењују ограничења подударности. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Грешка аутоматског ограничавања: Нерешива скица док се примењују вертикална/хоризонтална ограничења. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Грешка аутоматског ограничавања: Нерешива скица док се примењује ограничење једнакости. - + Autoconstrain error: Unsolvable sketch without constraints. Грешка аутоматског ограничавања: Скица је нерешива без ограничења. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Грешка аутоматског ограничавања: Нерешива скица после примене вертикалних и хоризонталних ограничења. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Грешка аутоматског ограничавања: Нерешива скица после примене ограничења тачка на тачку. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Грешка аутоматског ограничавања: Нерешива скица после примене ограничења једнакости. @@ -2404,143 +2405,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2556,9 +2557,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Погрешан избор @@ -2579,329 +2580,329 @@ invalid constraints, degenerated geometry, etc. Димензионално ограничење - + Cannot add a constraint between two external geometries. Није могуће додати ограничење између две спољне геометрије. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Није могуће додати ограничење између две фиксне геометрије. Под фиксном геометријом подразумевамо спољашњу геометрију, блокирану геометрију и посебне тачке као што су тачке чворова Б-сплајн криве. - + Sketcher Constraint Substitution Замена Sketcher ограничења - + Keep notifying me of constraint substitutions Настави да ме обавештаваш о заменама ограничења - - - + + + Only sketch and its support are allowed to be selected. Дозвољено је да се изабере само скица и њена основа. - + One of the selected has to be on the sketch. Један од изабраних мора бити на скици. - - + + Select an edge from the sketch. Изабери ивицу из скице. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Немогуће ограничење - - - - + + + + The selected edge is not a line segment. Изабрана ивица није линијски сегмент. - - - - - - + + + + + + Double constraint Дупло ограничење - - - - - + + + + + The selected edge already has a horizontal constraint! Изабрана ивица већ има хоризонтално ограничење! - - - + + + The selected edge already has a vertical constraint! Изабрана ивица већ има вертикално ограничење! - - - - - - + + + + + + The selected edge already has a Block constraint! Изабрана ивица је већ ограничена блокирањем! - + The selected item(s) can't accept a horizontal constraint! Изабране ставке(а) не могу прихватити хоризонтално ограничење! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Изабрано је више од једне фиксне тачке. Изабери највише једну фиксну тачку! - + The selected item(s) can't accept a vertical constraint! Изабране ставке(а) не могу прихватити вертикално ограничење! - - - + + + Select vertices from the sketch. Изабери темена са скице. - + Select one vertex from the sketch other than the origin. Изабери једно теме са скице осим координатног почетка. - + Select only vertices from the sketch. The last selected vertex may be the origin. Изабери само темена са скице. Последње изабрано теме може бити координатни почетак. - + Wrong solver status Погрешан статус алгоритма за решавање - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Ограничење блокирањем се не може додати ако је скица нерешена или постоје сувишна и конфликтна ограничења. - + Select one edge from the sketch. Изабери једну ивицу са скице. - + Select only edges from the sketch. Изабери само ивице са скице. - + Number of selected objects is not 3 Број изабраних објеката није 3 - - - + + + Error Грешка - + Unexpected error. More information may be available in the Report View. Неочекивана грешка. Потражите више информација у Прегледачу објава. - + Endpoint to endpoint tangency was applied instead. Уместо тога је примењена тангентност у крајњим тачкама. - + Select two or more points from the sketch. Изабери две или више тачке са скице. - + Select two or more vertices from the sketch. Изабери два или више темена са скице. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Изабери два или више темена са скице за ограничење подударности, или два или више кругова, елипса, лукова или лукова елипсе за ограничење концентричности. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Изабери два темена са скице за ограничење подударности, или два круга, елипсе, лукове или лукове елипсе за ограничење концентричности. - + Select exactly one line or one point and one line or two points from the sketch. Изабери тачно једну линију или једну тачку и једну линију, или две тачке из скице. - + Cannot add a length constraint on an axis! Не може се додати ограничење дужине на осу! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Изабери тачно једну линију, једну тачку и једну линију, две тачке или два круга на скици. - + This constraint does not make sense for non-linear curves. Ово ограничење нема смисла за нелинеарне криве. - + Endpoint to edge tangency was applied instead. Уместо тога је примењена тангентност ивице у крајњој тачки. - - - - - - - + + + + + + + Select the right things from the sketch. Изабери праве ствари са скице. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Изабери ивицу која није тежина Б-сплајн контролне тачке. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ниједна од изабраних тачака није била ограничена на дотичне криве, јер су делови истог елемента, јер су обе спољашње геометрије или зато што ивица није прихватљива. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ниједна од изабраних тачака није била ограничена на одговарајуће криве, било зато што су делови истог елемента, или зато што су обе спољашње геометрије. - - - - + + + + Select exactly one line or up to two points from the sketch. Изабери тачно једну линију или највише две тачке са скице. - + Cannot add a horizontal length constraint on an axis! Не може се применити ограничење хоризонтално растојање на осу! - + Cannot add a fixed x-coordinate constraint on the origin point! Није могуће ограничити x-координату координатног почетка! - - + + This constraint only makes sense on a line segment or a pair of points. Ово ограничење има смисла само на сегменту линије или пару тачака. - + Cannot add a vertical length constraint on an axis! Не може се применити ограничење вертикално растојање на осу! - + Cannot add a fixed y-coordinate constraint on the origin point! Није могуће ограничити y-координату координатног почетка! - + Select two or more lines from the sketch. Изабери две или више линија са скице. - - + + Select at least two lines from the sketch. Изабери најмање две линије са скице. - + Select a valid line. Изабери важећу ивицу. - - + + The selected edge is not a valid line. Изабрана ивица није важећа линија. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Прихватљиве комбинације: две криве; крајња тачка и крива; две крајње тачке; две криве и тачка. - + Select some geometry from the sketch. perpendicular constraint Изабери неку геометрију из скице. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не може се додати ограничење управности на тачку пошто она није крајња тачка! - - - + + + Perpendicular to B-spline edge currently unsupported. Примена ограничења управности на Б-сплајн криву тренутно није подржана. - - + + One of the selected edges should be a line. Једна од изабраних ивица би требала бити линија. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Примењена је тангентност на крајње тачке. Ограничење подударности је избрисано. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Примењена је тангентност између крајње тачке и ивице. Ограничење тачка на објекту је обрисано. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,277 +2957,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Прихваћене комбинације: две криве; крајња тачка и крива; две крајње тачке; две криве и тачка. - + Select some geometry from the sketch. tangent constraint Изабери неку геометрију из скице. - - - + + + Cannot add a tangency constraint at an unconnected point! Не може се додати ограничење тангентности у тачкама које се не поклапају! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. Уместо тога је примењена тангентност између чвора Б-сплајна и крајње тачке. - + Select either one point and several curves, or one curve and several points. Изабери или једну тачку и неколико кривих, или једну криву и неколико тачака. - - + + Wrong number of selected objects! Погрешан број изабраних објеката! - - + + With 3 objects, there must be 2 curves and 1 point. Код 3 објекта, морају постојати 2 криве и 1 тачка. - - - + + + Tangency to B-spline edge currently unsupported. Примена ограничења тангентности на Б-сплајн криву тренутно није подржана. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Изабери један или више лукова или кругова са скице. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Изабери само један или више полова Б-сплајн криве или само један или више лукова или кругова са скице, али не помешано. - - - + + + Constraint only applies to arcs or circles. Ограничење се односи само на лукове и кружнице. - - + + Select one or two lines from the sketch. Or select two edges and a point. Изабери једну или две линије са скице, или изаберите две ивице и тачку. - - + + Parallel lines Паралелне линије - - + + An angle constraint cannot be set for two parallel lines. За две паралелне праве не може се поставити ограничење угла. - + Cannot add an angle constraint on an axis! Не можете додати ограничење угла на осу! - + Select two edges from the sketch. Изабери две ивице са скице. - + Select two or more compatible edges. Изабери две или више компатибилних ивица. - + Sketch axes cannot be used in equality constraints. На осе скице се не може применити ограничење једнакости. - + Equality for B-spline edge currently unsupported. Примена ограничења једнакости на Б-сплајн криву тренутно није подржана. - - - - + + + + Select two or more edges of similar type. Изабери две или више ивица сличног типа. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Изабери две тачке и линију симетрије, две тачке и тачку симетрије или праву и тачку симетрије са скице. - - + + Cannot add a symmetry constraint between a line and its end points. Није могуће додати ограничење симетричности између линије и њених крајњих тачака. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Није могуће додати ограничење симетричности између линије и њених крајњих тачака! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Изабери две крајње тачке линија које ће деловати као зраци и ивицу која представља границу. Прва изабрана тачка одговара индексу лома н1, друга н2, а однос н2/н1 је релативни индекс лома. - + Selected objects are not just geometry from one sketch. Изабрани објекти нису само геометрија из једне скице. - + Cannot create constraint with external geometry only. Није могуће креирати ограничење само са спољном геометријом. - + Incompatible geometry is selected. Изабрана је некомпатибилна геометрија. - + SnellsLaw on B-spline edge is currently unsupported. Примена ограничења рефракције (Снеллов закон) на Б-сплајн криву тренутно није подржана. - - - - - + + + + + Select constraints from the sketch. Изабери ограничења са скице. - - - + + + Select constraint(s) from the sketch. Изабери ограничење(а) из скице. - + B-Spline Degree Степен Б-сплајн криве - + Define B-Spline Degree, between 1 and %1: Задај степен Б-сплајн криве, између 1 и %1: - - - + + + CAD Kernel Error Грешка CAD језгра - + None of the selected elements is an edge. Ниједан од изабраних елемената није ивица. - - + + At least one of the selected objects was not a B-Spline and was ignored. Најмање један од изабраних објеката није био Б-сплајн и игнорисан је. - - + + The selection comprises more than one item. Please select just one knot. Избор обухвата више од једне ставке. Изабери само један чвор. - - + + Input Error Грешка приликом уноса - - + + None of the selected elements is a knot of a B-spline Ниједан од изабраних елемената није чвор Б-сплајн криве - - + + Selection is empty Ниси ништа изабрао - + Nothing is selected. Please select a b-spline. Ништа није изабрано. Изабери Б-сплајн криву. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Изабери Б-сплајн криву да би додао чвор (не чвор на њој). Ако крива није Б-сплајн, прво је конвертуј. - + Nothing is selected. Please select end points of curves. Ништа није изабрано. Изабери крајње тачке кривих. - + Too many curves on point Превише кривих у тачки - - + + Exactly two curves should end at the selected point to be able to join them. Тачно две криве треба да се заврше у изабраној тачки да би се могле спојити. - + Too few curves on point Премало кривих у тачки - + Two end points, or coincident point should be selected. Треба изабрати две крајње тачке или подударну тачку. @@ -3306,17 +3307,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Грешка вредности @@ -3379,7 +3380,7 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Coincident - Coincident + Подударност @@ -3424,7 +3425,7 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Block - Блок + Блокирање @@ -3449,7 +3450,7 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Distance - Distance + Растојање @@ -3630,12 +3631,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Дужина: - + Refractive index ratio Релативни индекс лома - + Ratio n2/n1: Однос n2/n1: @@ -3915,8 +3916,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Без имена @@ -4140,30 +4141,30 @@ Requires to re-enter edit mode to take effect. Dimension Constraint - Dimension Constraint + Димензионално ограничење Dimensioning constraints: - Dimensioning constraints: + Димензионална ограничења: Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. -'Both': You will have both the 'Dimension' tool and the separated tools. -This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. + Изабери врсту алатке за котирање за вашу траку са алаткама: +'Појединачни алат': Један алат за све врсте котирања на траци са алаткама: Растојање, Растојање X/Y, Угао, Полупречник. (Други у падајуц́ем менију) +'Раздвојени алати': Индивидуални алати за све врсте котирања. +'Оба': Имаћете и алатку 'Кота' и раздвојене алате. +Ово подешавање је само за траку са алаткама. Шта год буде изабрано, сви алати су увек доступни у менију и преко пречица. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Режим пречник/полупречник алатке за котирање: @@ -4171,38 +4172,38 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Док се користи алатка за котирање, могуће је бирати третирање кругова и лукова: +'Ауто': Алатка ће применити полупречник на лукове и пречник на кругове. +'Пречник': Алатка ће применити пречник и на лукове и на кругове. +'Полупречник': Алатка ће применити радијус и на лукове и на кругове. - + Single tool - Single tool + Појединачни алат - + Separated tools - Separated tools + Раздвојени алати - + Both Оба - + Auto Аутоматски - + Diameter Пречник - + Radius Полупречник @@ -4651,12 +4652,12 @@ Then objects are only visible behind the sketch plane. Примени на постојеће скице - + Unexpected C++ exception Неочекивани Ц++ изузетак - + Sketcher Sketcher @@ -4664,55 +4665,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Постоје сва ограничење поклапања - + No missing coincidences found Пронађено је да постоје сва ограничење поклапања - + Missing coincidences Ограничење поклапања која недостају - + %1 missing coincidences found %1 је пронађено ограничења поклапања која недостају - + No invalid constraints Нема неважећих ограничења - + No invalid constraints found Ниcу пронађена неважећа ограничења - + Invalid constraints Неисправна ограничења - + Invalid constraints found Пронађена неисправна ограничења - - - + + + Reversed external geometry Преокренута спољашња геометрија - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4725,7 +4726,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Кликни на дугме „Замени крајње тачке у ограничењима“ да би поново доделио крајње тачке. Уради ово само једном за скице направљене у FreeCAD-у старијем од верзије 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4734,75 +4735,70 @@ However, no constraints linking to the endpoints were found. Међутим, нису пронађена никаква ограничења везана за крајње тачке. - + No reversed external-geometry arcs were found. Није пронађен преокренути лук спољашње геометрије. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 измене су направљене у ограничењима која се повезују са крајњим тачкама преокренутих лукова. - - + + Constraint orientation locking Ограничење закључавањем оријентације - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Закључавање оријентације је омогућено и поново израчунато за ограничења %1. Ограничења су наведена у Прегледачу објава (мени Поглед -> Панели -> Прегледач објава). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Закључавање оријентације је онемогућено за %1 ограничења. Ограничења су наведена у Прегледачу објава (мени Поглед -> Панели -> Прегледачу објава). Имај на уму да је за сва будућа ограничења закључавање и даље подразумевано. - - + + Delete constraints to external geom. Избриши ограничења за спољну геометрију. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Спремаш се да избришеш СВА ограничења која се тичу спољне геометрије. Ово је корисно за спасавање скице са поквареним/промењеним везама ка спољној геометрији. Да ли си сигуран да желиш да избришеш ограничења? - + All constraints that deal with external geometry were deleted. Сва ограничења која се тичу спољне геометрије су избрисана. - + No degenerated geometry Нема дегенерисане геометрије - + No degenerated geometry found Није нађена дегенерисана геометрија - + Degenerated geometry Дегенерисана геометрија - + %1 degenerated geometry found %1 дегенерисане геометрије пронађено SketcherGui::TaskSketcherConstraints - - - Form - Образац - Check to toggle filters @@ -4877,11 +4873,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Образац - Check to toggle filters @@ -5067,7 +5058,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Напредне контроле алгоритам за решавање @@ -5359,8 +5350,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Пребацује између приказивања и сакривања дијаграм закривљености за све Б-сплајн криве @@ -5368,8 +5359,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Смањује вишеструкост изабраног чвора Б-сплајн криве @@ -5377,8 +5368,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Пребацује између приказивања и скривања степена за све Б-сплајн криве @@ -5386,8 +5377,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Повећава вишеструкост изабраног чвора Б-сплајн криве @@ -5395,8 +5386,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Пребацује између приказивања и сакривања вишеструкости чворова за све Б-сплајн криве @@ -5404,8 +5395,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Пребацује између приказивања и сакривања тежине контролне тачке за све Б-сплајн криве @@ -5413,8 +5404,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Пребацује између приказивања и сакривања линија контролних тачака за све Б-сплајн криве @@ -5449,8 +5440,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Котирај пречник круга или лука @@ -5458,7 +5449,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Котирај полупречник/пречник кругова или лукова @@ -5466,8 +5457,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Котирај полупречник круга или лука @@ -5475,7 +5466,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Котирај полупречник/пречник кругова или лукова @@ -5492,8 +5483,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Направи лук помоћу крајњих тачака и тачке на луку @@ -5501,8 +5492,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Направи кружницу помоћу 3 тачке @@ -5510,8 +5501,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Направи кружни лук помоћу центра и крајњих тачака @@ -5519,8 +5510,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Направи лук елипсе помоћу центра, веће полуосе и крајњих тачака @@ -5528,8 +5519,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Направи лук хиперболе помоћу центра, реалне полуосе и крајњих тачака @@ -5537,8 +5528,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Направи лук параболе помоћу фокуса, темена и крајњих тачака @@ -5546,13 +5537,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points Б-сплајн крива помоћу контролних тачака - - + + Create a B-spline by control points Направи Б-сплајн криву помоћу контролних тачака @@ -5560,8 +5551,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Направи кружницу помоћу центра и тачке на кружници @@ -5569,8 +5560,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Направи елипсу помоћу периапсе, апоапсе и мале полуосе @@ -5578,8 +5569,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Направи елипсу помоћу центра, веће полуосе и тачке @@ -5587,8 +5578,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Направизаобљење између две линије @@ -5596,8 +5587,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Направи седмоугао помоћу његовог центра и угла @@ -5605,8 +5596,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Направи шестоугао помоћу његовог центра и угла @@ -5614,7 +5605,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Направи заобљени правоугаоник @@ -5622,14 +5613,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Направи осмоугао помоћу његовог центра и угла - - + + Create a regular polygon by its center and by one corner Направи правилни многоугао помоћу његовог центра и угла @@ -5637,8 +5628,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Направи петоугао помоћу његовог центра и угла @@ -5646,8 +5637,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Заобљење које чува ограничења и пресечну тачку @@ -5655,7 +5646,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Направи правоугаоник @@ -5663,7 +5654,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Направи центрирани правоугаоник @@ -5671,8 +5662,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Направи квадрат помоћу центра и једног темена @@ -5680,8 +5671,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Направи једнакостранични троугао помоћу центра и једног темена @@ -5689,13 +5680,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Периодична Б-сплајн крива помоћу контролних тачака - - + + Create a periodic B-spline by control points Направи периодичну Б-сплајн криву помоћу контролних тачака @@ -6329,36 +6320,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Грешка @@ -6378,45 +6369,45 @@ The grid spacing change if it becomes smaller than this number of pixel.Ограничење има погрешне индексне информације тако да је неисправно. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Неисправно ограничење - - - + + + Failed to add arc Додавање лука није успело - + Failed to add arc of ellipse Додавање елиптичног лука није успело - + Cannot create arc of hyperbola from invalid angles, try again! Није могуће направити хиперболични лук због погрешних углова, покушајте поново! - + Cannot create arc of hyperbola Није могуће направити хиперболични лук - + Cannot create arc of parabola Није могуће направити параболични лук @@ -6426,18 +6417,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Грешка приликом додавања пола Б-Сплајн криве - + Error creating B-spline pole Грешка приликом прављења пола Б-Сплајн криве - - + + Error creating B-spline Грешка приликом прављења Б-Сплајн криве - + Error deleting last pole Грешка приликом брисања задњег пола Б-Сплајн криве @@ -6447,49 +6438,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Није могуће додати чвор - + Cannot add internal alignment points Није могуће додати тачке унутрашњег поравнања - + Error removing knot Грешка при уклањању чвора - + Failed to add carbon copy Додавање индиго копије није успело - - + + Failed to add circle Додавање круга није успело - + Failed to add an ellipse Додавање елипсе није успело - + Failed to extend edge Продуживање ивице није успело - + Failed to add external geometry Додавање спољашње геометрије није успело - + Failed to create fillet Није успело прављење заобљења - + Failed to add line Додавање линије није успело @@ -6499,7 +6490,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Додавање тачке није успело - + Failed to add polygon Додавање многоугла није успело @@ -6509,27 +6500,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Додавање кутије није успело - + Failed to add rounded rectangle Додавање заобљеног правоугаоника није успело - + Failed to add slot Додавање жљеба није успело - + Failed to add edge Додавање ивице није успело - + Failed to trim edge Опсецање ивице није успело - + Value Error @@ -6539,13 +6530,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots Б-сплајн крива помоћу чворова - - + + Create a B-spline by knots Направи Б-сплајн криву помоћу чворова @@ -6553,13 +6544,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Периодична Б-сплајн крива помоћу чворова - - + + Create a periodic B-spline by knots Направи периодичну Б-сплајн криву помоћу чворова @@ -6665,12 +6656,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Направи Б-сплајн криву помоћу чворова - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Направи Б-сплајн криву помоћу чворова, тј. интерполацијом, на скици. @@ -6678,12 +6669,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Направи периодичну Б-сплајн криву помоћу чворова - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Направи периодичну Б-сплајн криву помоћу чворова, тј. интерполацијом, на скици. @@ -6691,31 +6682,44 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Кота - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. -Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. + Ограничи контекстуално на основу избора. +У зависности од избора, могуће је на располагању имати неколико врста ограничења. Можеш да се крећеш кроз њих помоћу тастера SHIFT. +Леви клик на празан простор потврдиће тренутно ограничење. Десни клик или притисак на Esc ће поништити. CmdSketcherArcOverlay - + Show/hide circular helper for arcs - Show/hide circular helper for arcs + Прикажи/сакриј кружног помоћника за лукове - + Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Пребацује између приказивања и сакривања кружног помоћника за лукове + + + + CmdSketcherCompDimensionTools + + + Dimension + Кота + + + + Dimension tools. + Алатке за котирање. diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts index cebb256a25..0b1a4fa3f1 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Visa/dölj B-spline-informationslager - + Show/hide B-spline degree Visa/dölj gradtal för B-splines - + Show/hide B-spline control polygon Show/hide B-spline control polygon - + Show/hide B-spline curvature comb Show/hide B-spline curvature comb - + Show/hide B-spline knot multiplicity Show/hide B-spline knot multiplicity - + Show/hide B-spline control point weight Show/hide B-spline control point weight @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Begränsa båge eller cirkel - + Constrain an arc or a circle Begränsa en båge eller cirkel - + Constrain radius Begränsa radie - + Constrain diameter Begränsa diameter - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Skapa cirkelbåge - + Create an arc in the sketcher Skapa en båge i skissen - + Center and end points Centrum- och slutpunkter - + End points and rim point Slutpunkter och perifer punkt @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Skapa B-spline - + Create a B-spline in the sketch Skapa en B-spline i skissen @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Skapa en cirkel - + Create a circle in the sketcher Skapa en cirkel i skissen - + Center and rim point Centrum- och perifer punkt - + 3 rim points Tre randpunkter @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Skapa en konisk form i skissen - + Ellipse by center, major radius, point Ellips utifrån centrumpunkt, storaxel och punkt - + Ellipse by periapsis, apoapsis, minor radius Ellips utifrån periapsis, apoapsis och lillaxel - + Arc of ellipse by center, major radius, endpoints Elliptisk båge utifrån centrumpunkt, storaxel och slutpunkter - + Arc of hyperbola by center, major radius, endpoints Hyperbolisk båge från centrumpunkt, storaxel och slutpunkter - + Arc of parabola by focus, vertex, endpoints Parabelisk båge angiven med brännpunkt, hörnpunkt och slutpunkter @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Skapa avrundning - + Create a fillet between two lines Skapa avrundning mellan två linjer - + Sketch fillet Sketch fillet - + Constraint-preserving sketch fillet Constraint-preserving sketch fillet @@ -299,17 +299,17 @@ Creates a rectangle in the sketch - + Rectangle Rektangel - + Centered rectangle Centered rectangle - + Rounded rectangle Rounded rectangle @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Skapa liksidig polygon - + Create a regular polygon in the sketcher Skapa en liksidig polygon i skissaren - + Triangle Triangel - + Square Kvadrat - + Pentagon Pentagon - + Hexagon Hexagon - + Heptagon Heptagon - + Octagon Oktogon - + Regular polygon Regelbunden polygon @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Ändra knut-multiplicitet - + Modifies the multiplicity of the selected knot of a B-spline Ändrar multipliciteten på den valda knuten i en B-spline - + Increase knot multiplicity Öka knutmultiplicitet - + Decrease knot multiplicity Minska knutmultiplicitet @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Begränsa vinkel - + Fix the angle of a line or the angle between two lines Fixera en linjes vinkel eller vinkeln mellan två linjer @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Begränsa sammanfallande - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Begränsa diameter - + Fix the diameter of a circle or an arc Fixera diametern av en cirkel eller en båge @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Begränsningsavstånd - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Begränsa horisontellt avstånd - + Fix the horizontal distance between two points or line ends Fixera det horisontella avståndet mellan två punkter eller linjeändar @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Begränsa vertikalt avstånd - + Fix the vertical distance between two points or line ends Fixera det vertikala avståndet mellan två punkter eller linjeändar @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Begränsa lika - + Create an equality constraint between two lines or between circles and arcs Skapa en jämlikhetsbegränsning mellan två linjer eller mellan cirklar och cirkelbågar @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Begränsa horisontellt - + Create a horizontal constraint on the selected item Skapa en horisontell begränsning på den valda detaljen @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Begränsa lås - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Begränsa parallellt - + Create a parallel constraint between two lines Skapa en parallell begränsning mellan två linjer @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Begränsa vinkelrätt - + Create a perpendicular constraint between two lines Skapa en vinkelrät begränsning mellan två linjer @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Begränsa punkt på objekt - + Fix a point onto an object Fixera en punkt på ett objekt @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Constrain radius or weight - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Begränsa symmetriskt - + Create a symmetry constraint between two points with respect to a line or a third point Skapa en symmetribegränsning mellan två punkter @@ -615,12 +615,12 @@ med avseende på en linje eller tredje punkt CmdSketcherConstrainTangent - + Constrain tangent Begränsa tangens - + Create a tangent constraint between two entities Skapa en tangentbegränsning mellan två föremål @@ -628,12 +628,12 @@ med avseende på en linje eller tredje punkt CmdSketcherConstrainVertical - + Constrain vertically Begränsa vertikalt - + Create a vertical constraint on the selected item Skapa en vertikal begränsning på den markerade detaljen @@ -641,12 +641,12 @@ med avseende på en linje eller tredje punkt CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convert geometry to B-spline - + Converts the selected geometry to a B-spline Converts the selected geometry to a B-spline @@ -667,12 +667,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreate3PointArc - + Create arc by three points Skapa båge utifrån tre punkter - + Create an arc by its end points and a point along the arc Skapa en båge utifrån dess slutpunkter och en punkt längs bågen @@ -680,12 +680,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreate3PointCircle - + Create circle by three points Skapa en cirkel utifrån tre punkter - + Create a circle by 3 perimeter points Skapa en cirkel utifrån tre perifera punkter @@ -693,12 +693,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateArc - + Create arc by center Skapa båge utifrån centrumpunkt - + Create an arc by its center and by its end points Skapa en båge utifrån dess centrum- och slutpunkter @@ -706,12 +706,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Skapa en elliptisk båge i skissen @@ -719,12 +719,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Skapar en hyperblisk båge i skissen @@ -732,12 +732,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Skapa en parabelisk båge i skissen @@ -745,12 +745,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateBSpline - + Create B-spline Skapa B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -758,12 +758,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateCircle - + Create circle Skapa en cirkel - + Create a circle in the sketch Skapa en cirkel i skissen @@ -771,12 +771,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Skapa ellips utifrån tre punkter - + Create an ellipse by 3 points in the sketch Skapa en ellips utifrån tre punkter i skissen @@ -784,12 +784,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateEllipseByCenter - + Create ellipse by center Skapa ellips utifrån en centrumpunkt - + Create an ellipse by center in the sketch Skapa en ellips utifrån en centrumpunkt i skissen @@ -797,12 +797,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateFillet - + Create fillet Skapa avrundning - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -810,12 +810,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateHeptagon - + Create heptagon Skapa heptagon - + Create a heptagon in the sketch Skapa en heptagon i skissen @@ -823,12 +823,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateHexagon - + Create hexagon Skapa hexagon - + Create a hexagon in the sketch Skapa en hexagon i skissen @@ -862,12 +862,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateOctagon - + Create octagon Skapa oktagon - + Create an octagon in the sketch Skapa en oktagon i skissen @@ -875,12 +875,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreatePentagon - + Create pentagon Skapa pentagon - + Create a pentagon in the sketch Skapa en pentagon i skissen @@ -888,12 +888,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Skapa periodisk B-spline - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -901,12 +901,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreatePoint - + Create point Skapa punkt - + Create a point in the sketch Skapa en punkt i skissen @@ -914,12 +914,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreatePointFillet - + Create corner-preserving fillet Skapa hörnbevarande avrundning - + Fillet that preserves intersection point and most constraints Avrundning som bevarar skärningspunkten och de flesta begränsningar @@ -927,12 +927,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreatePolyline - + Create polyline Skapa polylinje - + Create a polyline in the sketch. 'M' Key cycles behaviour Skapa en polylinje i skissen. 'M'-knappen växlar beteende @@ -966,12 +966,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateRegularPolygon - + Create regular polygon Skapa liksidig polygon - + Create a regular polygon in the sketch Skapa en regelbunden polygon i skissen @@ -979,12 +979,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateSlot - + Create slot Skapa skåra - + Create a slot in the sketch Skapa en skåra i skissen @@ -992,12 +992,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateSquare - + Create square Skapa kvadrat - + Create a square in the sketch Skapa en kvadrat i skissen @@ -1005,12 +1005,12 @@ med avseende på en linje eller tredje punkt CmdSketcherCreateTriangle - + Create equilateral triangle Skapa liksidig triangel - + Create an equilateral triangle in the sketch Skapa en liksidig triangel i skissen @@ -1018,12 +1018,12 @@ med avseende på en linje eller tredje punkt CmdSketcherDecreaseDegree - + Decrease B-spline degree Decrease B-spline degree - + Decreases the degree of the B-spline Decreases the degree of the B-spline @@ -1031,12 +1031,12 @@ med avseende på en linje eller tredje punkt CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Minska knutmultiplicitet - + Decreases the multiplicity of the selected knot of a B-spline Minskar multipliciteten på den markerade knuten i en B-spline @@ -1083,12 +1083,12 @@ med avseende på en linje eller tredje punkt CmdSketcherExtend - + Extend edge Förläng kant - + Extend an edge with respect to the picked position Förläng en kant med avseende på den valda positionen @@ -1096,12 +1096,12 @@ med avseende på en linje eller tredje punkt CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Skapa en kant länkad till en extern geometri @@ -1109,12 +1109,12 @@ med avseende på en linje eller tredje punkt CmdSketcherIncreaseDegree - + Increase B-spline degree Increase B-spline degree - + Increases the degree of the B-spline Ökar graden på B-spline:n @@ -1122,12 +1122,12 @@ med avseende på en linje eller tredje punkt CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Öka knutmultiplicitet - + Increases the multiplicity of the selected knot of a B-spline Ökar multipliciteten på den valda knuten i en B-spline @@ -1135,12 +1135,12 @@ med avseende på en linje eller tredje punkt CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1148,12 +1148,12 @@ med avseende på en linje eller tredje punkt CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1440,12 +1440,12 @@ Detta kommer att rensa "stöd"-egenskapen, om den finns. CmdSketcherSplit - + Split edge Dela kant - + Splits an edge into two while preserving constraints Delar en kant i två delar och bevarar begränsningar @@ -1466,12 +1466,12 @@ Detta kommer att rensa "stöd"-egenskapen, om den finns. CmdSketcherSwitchVirtualSpace - + Switch virtual space Växla virtuellt utrymme - + Switches the selected constraints or the view to the other virtual space Växlar de valda begränsningarna eller vyn till det andra virtuella utrymmet @@ -1492,12 +1492,12 @@ Detta kommer att rensa "stöd"-egenskapen, om den finns. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Aktiverar eller deaktiverar markerade begränsningar @@ -1518,12 +1518,12 @@ Detta kommer att rensa "stöd"-egenskapen, om den finns. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1533,12 +1533,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Trimma kant - + Trim an edge with respect to the picked position Trimma en kant i förhållande till den markerade positionen @@ -1597,369 +1597,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Add length constraint - - + + Dimension Dimension - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2019,44 +2020,44 @@ invalid constraints, degenerated geometry, etc. Add centered sketch box - + Add rounded rectangle Add rounded rectangle - + Add line to sketch wire Add line to sketch wire - + Add arc to sketch wire Add arc to sketch wire - - + + Add sketch arc Add sketch arc - - + + Add sketch circle Add sketch circle - + Add sketch ellipse Add sketch ellipse - + Add sketch arc of ellipse Add sketch arc of ellipse - + Add sketch arc of hyperbola Add sketch arc of hyperbola @@ -2076,33 +2077,33 @@ invalid constraints, degenerated geometry, etc. Add sketch point - - + + Create fillet Skapa avrundning - + Trim edge Trimma kant - + Extend edge Förläng kant - + Split edge Dela kant - + Add external geometry Add external geometry - + Add slot Add slot @@ -2112,37 +2113,37 @@ invalid constraints, degenerated geometry, etc. Lägg till hexagon - + Convert to NURBS Konvertera till NURBS - + Increase spline degree Increase spline degree - + Decrease spline degree Decrease spline degree - + Increase knot multiplicity Öka knutmultiplicitet - + Decrease knot multiplicity Minska knutmultiplicitet - + Insert knot Insert knot - + Join Curves Join Curves @@ -2182,12 +2183,12 @@ invalid constraints, degenerated geometry, etc. Remove Axes Alignment - + Toggle constraints to the other virtual space Toggle constraints to the other virtual space - + @@ -2195,7 +2196,7 @@ invalid constraints, degenerated geometry, etc. Update constraint's virtual space - + Add auto constraints Add auto constraints @@ -2235,7 +2236,7 @@ invalid constraints, degenerated geometry, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2251,37 +2252,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Auto-begränsningsfel: Olösbar skiss vid tillämpning av sammanfallningsbegränsningar. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Auto-begränsningsfel: Olösbar skiss vid tillämpning av vertikala/horisontella begränsningar. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Auto-begränsningsfel: Olösbar skiss vid tillämpning av likhetsbegränsningar. - + Autoconstrain error: Unsolvable sketch without constraints. Auto-begränsningsfel: Olösbar skiss utan begränsningar. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Auto-begränsningsfel: Olösbar skiss efter tillämpning av vertikala/horisontella begränsningar. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Auto-begränsningsfel: Olösbar skiss efter tillämpning av punkt-på-punkt-begränsningar. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Auto-begränsningsfel: Olösbar skiss efter tillämpning av likhetsbegränsningar. @@ -2406,143 +2407,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Fel val @@ -2581,329 +2582,329 @@ invalid constraints, degenerated geometry, etc. Dimensionell begränsning - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Välj en kant från skissen. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Omöjlig begränsning - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Dubbelbegränsning - - - - - + + + + + The selected edge already has a horizontal constraint! Den valda kanten har redan en horisontell begränsning! - - - + + + The selected edge already has a vertical constraint! Den valda kanten har redan en vertikal begränsning! - - - - - - + + + + + + The selected edge already has a Block constraint! Den valda kanten har redan en blockeringsbegränsning! - + The selected item(s) can't accept a horizontal constraint! Markerade objekt kan inte acceptera en horisontell begränsning! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Mer än en fast punkt är vald. Välj högst en fast punkt! - + The selected item(s) can't accept a vertical constraint! Markerade objekt kan inte acceptera en vertikal begränsning! - - - + + + Select vertices from the sketch. Välj hörnpunkter från skissen. - + Select one vertex from the sketch other than the origin. Välj en hörnpunkt från skissen som inte är origo. - + Select only vertices from the sketch. The last selected vertex may be the origin. Välj endast hörnpunkter från skissen. Den sist valda hörnpunkten kan vara origo. - + Wrong solver status Ogiltig status från problemlösaren - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Välj en kant i skissen. - + Select only edges from the sketch. Välj endast kanter i skissen. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Fel - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Slutpunkt till slutpunkt-tangering tillämpades istället. - + Select two or more points from the sketch. Välj två eller fler punkter från skissen. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Välj exakt en linje eller en punkt och en linje eller två punkter från skissen. - + Cannot add a length constraint on an axis! Kan inte lägga till längdbegränsning på en axel! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Välj de rätta sakerna från skissen. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ingen av de valda punkterna begränsades till de respektive kurvorna, antingen för att de är delar av samma element eller för att båda är yttre geometri. - - - - + + + + Select exactly one line or up to two points from the sketch. Välj exakt en linje eller upp till två punkter från skissen. - + Cannot add a horizontal length constraint on an axis! Kan inte lägga till en horisontell längdbegränsning på en axel! - + Cannot add a fixed x-coordinate constraint on the origin point! Kan inte lägga till en fast x-koordinatsbegränsning på origo! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Kan inte lägga till en vertikal längdbegränsning på en axel! - + Cannot add a fixed y-coordinate constraint on the origin point! Kan inte lägga till en fast y-koordinatsbegränsning på origo! - + Select two or more lines from the sketch. Välj två eller flera linjer från skissen. - - + + Select at least two lines from the sketch. Välj åtminstone två linjer från skissen. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2914,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunkter; två kurvor och en punkt. - + Select some geometry from the sketch. perpendicular constraint Välj geometri(er) från skissen. - - + + Cannot add a perpendicularity constraint at an unconnected point! Kan inte lägga till en vinkelräthetsbegränsning vid en oansluten punkt! - - - + + + Perpendicular to B-spline edge currently unsupported. Normal till en B-spline-kant stöds inte just nu. - - + + One of the selected edges should be a line. En av de markerade kanterna ska vara en linje. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Slutpunkt till slutpunkt-tangering tillämpades. Sammanfallningsbegränsningen raderades. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2958,277 +2959,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunkter; två kurvor och en punkt. - + Select some geometry from the sketch. tangent constraint Välj geometri(er) från skissen. - - - + + + Cannot add a tangency constraint at an unconnected point! Kan inte lägga till ett tangensbegränsning vid en oansluten punkt! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Felaktigt antal valda objekt! - - + + With 3 objects, there must be 2 curves and 1 point. Med tre objekt måste det vara två kurvor och en punkt. - - - + + + Tangency to B-spline edge currently unsupported. Tangering till B-spline-kant stöds inte just nu. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Markera en eller fler bågar eller cirklar från skissen. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Begränsning tillämpas bara på bågar eller cirklar. - - + + Select one or two lines from the sketch. Or select two edges and a point. Välj en eller två linjer från skissen, eller två kanter och en punkt. - - + + Parallel lines Parallella linjer - - + + An angle constraint cannot be set for two parallel lines. En vinkelbegränsning kan inte tillämpas på två parallella linjer. - + Cannot add an angle constraint on an axis! Kan inte lägga till vinkelbegränsning på en axel! - + Select two edges from the sketch. Välj två kanter från skissen. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Likhet för B-spline-kant stöds inte just nu. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Välj två punkter och en symmetrilinje, två punkter och en symmetripunkt eller en linje och en symmetripunkt från skissen. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Kan inte lägga till symmetribegränsning mellan en linje och dess ändpunkter! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Valda objekt är inte geometri från endast en skiss. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. Välj begränsning(ar) från skissen. - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error CAD-kärnfel - + None of the selected elements is an edge. Inget av de valda elementen är en kant. - - + + At least one of the selected objects was not a B-Spline and was ignored. Minst ett av de valda objekten är inte en B-spline och ignorerades. - - + + The selection comprises more than one item. Please select just one knot. Markeringen innefattar mer än ett föremål. Vänligen välj endast en knut. - - + + Input Error Inmatningsfel - - + + None of the selected elements is a knot of a B-spline Inget av de valda elementen är en knut från en B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3308,17 +3309,17 @@ Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunk It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3632,12 +3633,12 @@ Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunk Längd: - + Refractive index ratio Brytningsindexsförhållande - + Ratio n2/n1: Förhållande n2/n1: @@ -3917,8 +3918,8 @@ Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunk SketcherGui::PropertyConstraintListItem - - + + Unnamed Namnlös @@ -4152,13 +4153,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4179,32 +4180,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Båda - + Auto Automatisk - + Diameter Diameter - + Radius Radie @@ -4653,12 +4654,12 @@ Then objects are only visible behind the sketch plane. Tillämpa på existerande skisser - + Unexpected C++ exception Oväntat C++-undantag - + Sketcher Skissare @@ -4666,55 +4667,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Inga sammanfallningar saknas - + No missing coincidences found Inga saknade sammanfallningar hittades - + Missing coincidences Saknade sammanfallningar - + %1 missing coincidences found %1 saknade sammanfallningar hittade - + No invalid constraints Inga ogiltiga begränsningar - + No invalid constraints found Inga ogiltiga begränsningar hittades - + Invalid constraints Ogiltiga begränsningar - + Invalid constraints found Ogiltiga begränsningar hittades - - - + + + Reversed external geometry Omvänd yttre geometri - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4727,7 +4728,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Klicka på knappen "Kasta om slutpunkter i begränsningar" för att återtilldela slutpunkter. Gör detta endast i skisser skapade i FreeCAD-versioner äldre än v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4736,75 +4737,70 @@ However, no constraints linking to the endpoints were found. Inga begränsningar länkade till slutpunkterna hittades däremot. - + No reversed external-geometry arcs were found. Inga omvänd yttre geometri-bågar hittades. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 ändringar gjordes på begränsningar länkade till slutpunkter i omvända bågar. - - + + Constraint orientation locking Lås begränsningsriktning - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Riktningslåsning var aktiverat och omberäknades för %1 begränsningar. Begränsningarna har listats i rapportvyn (menyn Visa -> Paneler -> Rapportvy). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Riktningslåsning avaktiverades för %1 begränsningar. Begränsningarna har listats i rapportvyn (menyn Visa -> Paneler -> Rapportvy). Notera att för framtida begränsningar är riktningslåsning fortfarande PÅ som standard. - - + + Delete constraints to external geom. Radera begränsningar till yttre geometri. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Du är på väg att radera ALLA begränsningar som hanterar yttre geometri. Detta är användbart för att rädda en skiss med trasiga/ändrade länkar till yttre geometri. Är du säker på att du vill radera begränsningarna? - + All constraints that deal with external geometry were deleted. Alla begränsningar som hanterar yttre geometri raderades. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - Form - Check to toggle filters @@ -4879,11 +4875,6 @@ Inga begränsningar länkade till slutpunkterna hittades däremot. SketcherGui::TaskSketcherElements - - - Form - Form - Check to toggle filters @@ -5069,7 +5060,7 @@ Inga begränsningar länkade till slutpunkterna hittades däremot. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Avancerat läge för problemlösare @@ -5360,8 +5351,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Växlar mellan att visa och dölja böjningskammen för alla B-splines @@ -5369,8 +5360,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Minskar multipliciteten på den markerade knuten i en B-spline @@ -5378,8 +5369,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Växlar mellan att visa och dölja gradtalet för alla B-splines @@ -5387,8 +5378,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Ökar multipliciteten på den valda knuten i en B-spline @@ -5396,8 +5387,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Växlar mellan att visa och dölja knutmultipliciteten för alla B-splines @@ -5405,8 +5396,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Switches between showing and hiding the control point weight for all B-splines @@ -5414,8 +5405,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Växlar mellan att visa och dölja kontrollpolygonerna för alla B-splines @@ -5450,8 +5441,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixera diametern av en cirkel eller en båge @@ -5459,7 +5450,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5467,8 +5458,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixera cirkelns eller cirkelbågens radie @@ -5476,7 +5467,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5493,8 +5484,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Skapa en båge utifrån dess slutpunkter och en punkt längs bågen @@ -5502,8 +5493,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Skapa en cirkel från tre perifera punkter @@ -5511,8 +5502,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Skapa en båge utifrån dess centrum- och slutpunkter @@ -5520,8 +5511,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Create an arc of ellipse by its center, major radius, and endpoints @@ -5529,8 +5520,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Create an arc of hyperbola by its center, major radius, and endpoints @@ -5538,8 +5529,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Create an arc of parabola by its focus, vertex, and endpoints @@ -5547,13 +5538,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline utifrån kontrollpunkter - - + + Create a B-spline by control points Skapa en B-spline utifrån kontrollpunkter @@ -5561,8 +5552,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Skapa en cirkel utifrån dess centrumpunkt och en kantpunkt @@ -5570,8 +5561,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Skapa en ellips utifrån periapsis, apoapsis och lillaxel @@ -5579,8 +5570,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Skapa en ellips utifrån centrumpunkt, storaxel och punkt @@ -5588,8 +5579,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Creates a radius between two lines @@ -5597,8 +5588,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Skapa en heptagon utifrån dess centrumpunkt och ett hörn @@ -5606,8 +5597,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Skapa en hexagon utifrån dess centrumpunkt och ett hörn @@ -5615,7 +5606,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Skapa en rundad rektangel @@ -5623,14 +5614,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Skapa en oktogon utifrån dess centrumpunkt och ett hörn - - + + Create a regular polygon by its center and by one corner Skapa en regelbunden polygon utifrån dess centrumpunkt och ett hörn @@ -5638,8 +5629,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Skapa en pentagon utifrån dess centrumpunkt och ett hörn @@ -5647,8 +5638,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Fillet that preserves constraints and intersection point @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Skapa en rektangel @@ -5664,7 +5655,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Skapa en centrerad rektangel @@ -5672,8 +5663,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Skapa en kvadrat utifrån dess mittpunkt och ett hörn @@ -5681,8 +5672,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Skapa en liksidig triangel utifrån dess centrumpunkt och ett hörn @@ -5690,13 +5681,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Periodisk B-spline utifrån kontrollpunkter - - + + Create a periodic B-spline by control points Skapa en periodisk B-spline utifrån kontrollpunkter @@ -6330,36 +6321,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Fel @@ -6379,45 +6370,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6427,18 +6418,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6448,49 +6439,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6500,7 +6491,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6510,27 +6501,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6540,13 +6531,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6554,13 +6545,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6666,12 +6657,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6679,12 +6670,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6692,12 +6683,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimension - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6709,14 +6700,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimension + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts index 2892acdbba..0b8dec6b3f 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ B-spline bilgi katmanı göster / gizle - + Show/hide B-spline degree B-spline derecesini göster/gizle - + Show/hide B-spline control polygon B-spline kontrol çokgenini göster/gizle - + Show/hide B-spline curvature comb B-serbest eğri eğrilik tarağını Göster/Gizle - + Show/hide B-spline knot multiplicity B-spline düğüm çeşitliliğini göster/gizle - + Show/hide B-spline control point weight B-spline kontrol noktası kalınlığını göster/gizle @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Yay ya da çemberi kısıtla - + Constrain an arc or a circle Bir yayı ya da bir çemberi kısıtla - + Constrain radius Yarıçapı sınırla - + Constrain diameter Çapı sınırla - + Constrain auto radius/diameter Yarı çapı/çapı otomatik kısıtla @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Yay oluştur - + Create an arc in the sketcher Sketcher içinde bir yay oluştur - + Center and end points Merkez ve uç noktalar - + End points and rim point Uç noktalar ve çember noktası @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline B-spline'ı yarat - + Create a B-spline in the sketch Eskizde bir B-spline oluşturun @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Çember oluştur - + Create a circle in the sketcher Sketcher içinde bir çember oluştur - + Center and rim point Merkez ve çember noktalar - + 3 rim points 3 kenar noktası @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Eskizde bir koni oluşturun - + Ellipse by center, major radius, point Merkez, büyük yarıçap ve nokta ile Elips - + Ellipse by periapsis, apoapsis, minor radius Periapsis, apoapsis, küçük yarıçap ile elips - + Arc of ellipse by center, major radius, endpoints Merkez, büyük yarıçap ve uç noktalar ile Elips Yayı oluştur - + Arc of hyperbola by center, major radius, endpoints Merkeze göre hiperbol yayı, ana yarıçap, uç noktalar - + Arc of parabola by focus, vertex, endpoints Merkez, köşe ve uç noktalar ile parabol yayı @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Fileto oluştur - + Create a fillet between two lines İki çizgi arasında bir yarıçap oluştur - + Sketch fillet Eskiz yuvarla - + Constraint-preserving sketch fillet Kısıtlamayı koruyan eskiz kavisi @@ -299,17 +299,17 @@ Eskiz içerisinde bir dikdörtgen oluşturur - + Rectangle Dikdörtgen - + Centered rectangle Merkezden dikdörtgen - + Rounded rectangle Yuvarlatılmış dikdörtgen @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Düzenli çokgen oluşturma - + Create a regular polygon in the sketcher Sketcher içinde bir düzenli çokgen oluşturun - + Triangle Üçgen - + Square Kare - + Pentagon Beşgen - + Hexagon Altıgen - + Heptagon Yedigen - + Octagon Sekizgen - + Regular polygon Düzenli poligon @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Düğüm çokluğunu değiştir - + Modifies the multiplicity of the selected knot of a B-spline Seçilen bir B-spline düğümünün çarpımını değiştirir - + Increase knot multiplicity Düğüm çokluluğunu arttır - + Decrease knot multiplicity Düğüm çokluluğunu azalt @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Açı sınırlandır - + Fix the angle of a line or the angle between two lines Bir çizginin açısını veya iki çizgi arasındaki açıyı düzeltin @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Kısıtlamayı Engelle - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Çakıştır - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Çapı sınırla - + Fix the diameter of a circle or an arc Bir çemberin veya bir yayın yarıçapını düzelt @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Mesafeyi sınırla - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends İki nokta veya çizgi uçları arasındaki yatay mesafeyi sabitleyin @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Dikey mesafeyi kısıtla - + Fix the vertical distance between two points or line ends İki nokta veya çizgi ucu arasındaki dikey mesafeyi düzeltin @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Eşitle - + Create an equality constraint between two lines or between circles and arcs İki çizginin veya dairelerin ve yayların değerlerini eşitleyin (kısıtlaması oluşturun) @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Yatay yap - + Create a horizontal constraint on the selected item Seçili öğede yatay bir sınırlama oluşturur @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Kısıtlama kilidi - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Paralel yap - + Create a parallel constraint between two lines İki çizgi arasında paralel kısıtlama oluşturun @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Dikey yap - + Create a perpendicular constraint between two lines İki çizgi arasında dikey bir kısıtlama oluşturun @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Noktayı nesneye çakıştır - + Fix a point onto an object Teğetsel kısıtlama oluştur @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Yarı çapı/çapı otomatik kısıtla - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Yarıçapı veya ağırlığı sınırlayın - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Bir çemberin veya bir yayın yarıçapını düzeltin veya bir B-Spline'ın bir ucunun kalınlığını sabitleyin @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Simetrik kısıtlama - + Create a symmetry constraint between two points with respect to a line or a third point Bir çizgi veya üçüncü bir noktaya göre, iki nokta arasında simetri sınırlaması oluştur @@ -614,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Teğet yap - + Create a tangent constraint between two entities İki öğe arasında teğetsel kısıtlama oluşturun @@ -627,12 +627,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Dikey yap - + Create a vertical constraint on the selected item Seçilen öğeye dikey kısıtlama oluşturun @@ -640,12 +640,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Geometriyi B-spline'a dönüştür - + Converts the selected geometry to a B-spline Seçili geometriyi bir B-spline'a dönüştürür @@ -666,12 +666,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Yay üç nokta ile oluştur - + Create an arc by its end points and a point along the arc Uç noktaları ve yay boyunca bir nokta ile bir yay oluşturma @@ -679,12 +679,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Üç noktayla daire oluştur - + Create a circle by 3 perimeter points 3 çevre noktası ile bir daire oluşturun @@ -692,12 +692,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Yay merkezince yarat - + Create an arc by its center and by its end points Merkezini ve uç noktalarını belirterek bir yay oluşturun @@ -705,12 +705,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Eskizde bir elips yayı oluştur @@ -718,12 +718,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Eskizde bir hiperbol yayı oluştur @@ -731,12 +731,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Eskizde bir parabol yayı oluştur @@ -744,12 +744,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline B-spline'ı yarat - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -757,12 +757,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Çember oluştur - + Create a circle in the sketch Eskizde bir çember oluştur @@ -770,12 +770,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points 3 noktalı elips oluşturun - + Create an ellipse by 3 points in the sketch Eskizde 3 noktadan geçen bir elips oluştur @@ -783,12 +783,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Merkezine göre elips oluştur - + Create an ellipse by center in the sketch Eskizde merkez temelli bir elips oluştur @@ -796,12 +796,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Fileto oluştur - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Yedigen oluştur - + Create a heptagon in the sketch Eskizde bir yedigen oluştur @@ -822,12 +822,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Altıgen oluştur - + Create a hexagon in the sketch Eskizde bir altıgen oluşturun @@ -861,12 +861,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Sekizgen oluştur - + Create an octagon in the sketch Eskizde sekizgen oluşturun @@ -874,12 +874,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Beşgen oluştur - + Create a pentagon in the sketch Eskizde bir beşgen oluşturun @@ -887,12 +887,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Eskizde bir beşgen oluşturun - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -900,12 +900,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Nokta oluştur - + Create a point in the sketch Eskizde bir nokta oluştur @@ -913,12 +913,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Köşeyi koruyan kavis oluşturun - + Fillet that preserves intersection point and most constraints Kesişme noktasını ve çoğu kısıtlamayı koruyan kavis @@ -926,12 +926,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Çoklu çizgi oluştur - + Create a polyline in the sketch. 'M' Key cycles behaviour Eskizde bir çokluçizgi oluştur. 'M' tuşu davranış dönüşümlerini ayarlar @@ -965,12 +965,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Düzenli çokgen oluşturma - + Create a regular polygon in the sketch Eskizde düzenli bir çokgen oluştur @@ -978,12 +978,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Yuva oluştur - + Create a slot in the sketch Eskizde bir boşluk oluşturun @@ -991,12 +991,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Kare oluştur - + Create a square in the sketch Eskizde bir kare oluştur @@ -1004,12 +1004,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Eşkenar üçgen oluştur - + Create an equilateral triangle in the sketch Eskizde bir eşkenar üçgen oluşturun @@ -1017,12 +1017,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree B-spline derecesini azaltın - + Decreases the degree of the B-spline B-spline'ın derecesini azaltır @@ -1030,12 +1030,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Düğüm çokluluğunu azalt - + Decreases the multiplicity of the selected knot of a B-spline Seçilen bir B-spline düğümünün çokluğunu azaltır @@ -1082,12 +1082,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Kenarı uzat - + Extend an edge with respect to the picked position Bir kenarı seçilen konuma göre uzatın @@ -1095,12 +1095,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Harici bir geometriye bağlı bir kenar oluştur @@ -1108,12 +1108,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree B-spline derecesini artırın - + Increases the degree of the B-spline B-spline derecesini arttırır @@ -1121,12 +1121,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Düğüm çokluluğunu arttır - + Increases the multiplicity of the selected knot of a B-spline Seçilen bir B-spline düğümünün çoğaltılmasını arttırır @@ -1134,12 +1134,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Düğüm ekle - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1147,12 +1147,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1436,12 +1436,12 @@ Bu, eğer varsa, 'Destek' özelliğini temizler. CmdSketcherSplit - + Split edge Kenarı böl - + Splits an edge into two while preserving constraints Kısıtlamaları koruyarak bir kenarı ikiye böl @@ -1462,12 +1462,12 @@ Bu, eğer varsa, 'Destek' özelliğini temizler. CmdSketcherSwitchVirtualSpace - + Switch virtual space Sanal Uzayı değiştir - + Switches the selected constraints or the view to the other virtual space Seçilen kısıtlamaları veya görünümü diğer sanal uzaya geçirir @@ -1488,12 +1488,12 @@ Bu, eğer varsa, 'Destek' özelliğini temizler. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Kısıtlamayı etkinleştir / devre dışı bırak - + Activates or deactivates the selected constraints Seçili kısıtlamaları etkinleştirir veya devre dışı bırakır @@ -1514,12 +1514,12 @@ Bu, eğer varsa, 'Destek' özelliğini temizler. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Sevk / referans kısıtlamasını değiştir - + Set the toolbar, or the selected constraints, into driving or reference mode Araç çubuğunu veya seçili kısıtlamaları, @@ -1529,12 +1529,12 @@ sevk veya referans moduna ayarlayın CmdSketcherTrimming - + Trim edge Kenar düzeltin - + Trim an edge with respect to the picked position Bir kenarı seçilen konuma göre kırpın @@ -1593,369 +1593,370 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Command - - + + Add horizontal constraint Yataylık sınırlaması ekle - - - + + + Add horizontal alignment Yatay hizalama ekle - - + + Add vertical constraint Dikeylik sınırlaması ekle - + Add vertical alignment Dikey hizalama ekle - + Add 'Lock' constraint 'Kilitleme' sınırlaması ekle - + Add relative 'Lock' constraint Bağıl 'Kilitleme' sınırlaması ekle - + Add fixed constraint Sabitleme sınırlaması ekle - + Add 'Block' constraint 'Blok' kısıtlaması ekle - + Add block constraint Blok kısıtlaması ekle - - - + + + Add coincident constraint Çakışıklık sınırlaması ekle - - + + Add distance from horizontal axis constraint Yatay eksen sınırlamasından mesafe ekle - - + + Add distance from vertical axis constraint Dikey eksen sınırlamasından mesafe ekle - - + + Add point to point distance constraint 'Noktadan noktaya mesafe' sınırlaması ekle - - - + + + Add point to line Distance constraint 'Noktadan çizgiye mesafe' sınırlaması ekle - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Uzunluk sınırlaması ekle - - + + Dimension Boyut - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 'Nesne üzerindeki bir nokta' sınırlaması ekle - - + + Add point to point horizontal distance constraint 'Noktadan noktaya yatay mesafe' sınırlaması ekle - + Add fixed x-coordinate constraint Sabit x koordinatı sınırlaması ekle - - + + Add point to point vertical distance constraint 'Noktadan noktaya dikey mesafe' sınırlaması ekle - + Add fixed y-coordinate constraint Sabit y koordinatı sınırlaması ekle - - + + Add parallel constraint Paralellik sınırlaması ekle - - - - - - - + + + + + + + Add perpendicular constraint Diklik sınırlaması ekle - + Add perpendicularity constraint Diklik kısıtlaması ekle - + Swap coincident+tangency with ptp tangency Çakışıklık+teğetliği noktadan noktaya teğetlik ile değiştir - + Swap PointOnObject+tangency with point to curve tangency NesneÜzerindeNokta+teğetlik işlevini eğri teğetliğine nokta işlevi ile değiştir - - - - - - - + + + + + + + Add tangent constraint Teğetlik sınırlaması ekle - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Teğetlik sınırlama noktası ekle - - - - + + + + Add radius constraint Yarıçap sınırlaması ekle - - - - + + + + Add diameter constraint Çap sınırlaması ekle - - - - + + + + Add radiam constraint Yarıçap kısıtlaması ekle - - - - - - + + + + + + Add angle constraint Açı sınırlaması ekle - - + + Add equality constraint Eşitlik sınırlaması ekle - - - - - + + + + + Add symmetric constraint Simetriklik sınırlaması ekle - + Add Snell's law constraint 'Snell kanunu' sınırlaması ekle - + Toggle constraint to driving/reference Kısıtlamayı sevk/referans olarak değiştir - + Activate/Deactivate constraint Kısıtlamayı etkinleştir / devre dışı bırak @@ -2015,44 +2016,44 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Merkezden eskiz çerçevesi ekle - + Add rounded rectangle Yuvarlatılmış dikdörtgen ekle - + Add line to sketch wire Eskiz teline çizgi ekle - + Add arc to sketch wire Eskiz teline yay ekle - - + + Add sketch arc Eskiz yayı ekle - - + + Add sketch circle Eskiz çemberi ekle - + Add sketch ellipse Eskiz elipsi ekle - + Add sketch arc of ellipse Eskiz elips yayı ekle - + Add sketch arc of hyperbola Eskiz hiperbol yayı ekleyin @@ -2072,33 +2073,33 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Eskiz noktası ekle - - + + Create fillet Fileto oluştur - + Trim edge Kenar düzeltin - + Extend edge Kenarı uzat - + Split edge Kenarı böl - + Add external geometry Harici geometri ekle - + Add slot Yuva ekle @@ -2108,37 +2109,37 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Altıgen ekle - + Convert to NURBS NURBS biçimine dönüştür - + Increase spline degree Eğri derecesini artır - + Decrease spline degree Eğri derecesini azalt - + Increase knot multiplicity Düğüm çokluluğunu arttır - + Decrease knot multiplicity Düğüm çokluluğunu azalt - + Insert knot Düğüm ekle - + Join Curves Join Curves @@ -2178,12 +2179,12 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Eksen Hizalamayı Kaldır - + Toggle constraints to the other virtual space Kısıtlamaları diğer sanal alanla değiştirin - + @@ -2191,7 +2192,7 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Kısıtlamanın sanal alanını güncelleyin - + Add auto constraints Otomatik kısıtlamalar ekleyin @@ -2231,7 +2232,7 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2247,37 +2248,37 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Otomatik kısıtlama hatası: Çakışma kısıtlamaları uygulanırken eskiz çözülemez. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Otomatik kısıtlama hatası: Dikey / yatay kısıtlamalar uygulanırken eskiz çözülemez. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Otomatik kısıtlama hatası: Eşitlik kısıtlamaları uygulanırken eskiz çözülemez. - + Autoconstrain error: Unsolvable sketch without constraints. Otomatik kısıtlama hatası: Kısıtlamalar olmaksızın eskiz çözülemez. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Otomatik kısıtlama hatası: Yatay ve dikey kısıtlamalar uyguladıktan sonra eskiz çözülemez. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Otomatik kısıtlama hatası: Nokta noktaya (çakışık) kısıtlamalar uygulandıktan sonra eskiz çözülemez. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Otomatik kısıtlama hatası: Eşitlik kısıtlamaları uygulandıktan sonra eskiz çözülemez. @@ -2402,143 +2403,143 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2554,9 +2555,9 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. - - - + + + Wrong selection Yanlış seçim @@ -2577,329 +2578,329 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Boyutsal kısıtlama - + Cannot add a constraint between two external geometries. İki harici geometri arasına bir sınırlama eklenemez. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Kısıtlaması Değişimi - + Keep notifying me of constraint substitutions Kısıtlama yer değişikliklerinde beni uyarmaya devam et - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Taslaktan bir kenar seç - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint İmkansız kısıt - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Çift kısıtlama - - - - - + + + + + The selected edge already has a horizontal constraint! Seçilen kenar zaten yatay bir kısıtlamaya sahip! - - - + + + The selected edge already has a vertical constraint! Seçilen kenar zaten dikey bir kısıtlamaya sahip! - - - - - - + + + + + + The selected edge already has a Block constraint! Seçilen kenarın zaten bir Blok kısıtlaması var! - + The selected item(s) can't accept a horizontal constraint! Seçilen öğeler yatay bir sınırlamayı kabul edemez! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Seçilen birden fazla sabit nokta vardır. En fazla bir tane sabit nokta seçin! - + The selected item(s) can't accept a vertical constraint! Seçilen öğeler dikey kısıtlamayı kabul edemez! - - - + + + Select vertices from the sketch. Eskiden krokileri seçin. - + Select one vertex from the sketch other than the origin. Köşeden başka bir taslaktan bir köşe seçin. - + Select only vertices from the sketch. The last selected vertex may be the origin. Eskiden sadece köşeleri seçin. Son seçilen köşe orijin olabili. - + Wrong solver status Yanlış çözücü durumu - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Çizim çözülmediyse veya gereksiz ve çelişen kısıtlamalar varsa bir Blok kısıtlaması eklenemez. - + Select one edge from the sketch. Eskizden bir kenar seçin. - + Select only edges from the sketch. Eskizden sadece kenarları seçin. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Hata - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Bunun yerine, uç noktalar arasında teğetsel bir kısıtlama uygulandı. - + Select two or more points from the sketch. Eskiden iki veya daha fazla nokta seçin. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Çizimden tam olarak bir çizgi veya bir nokta ve bir çizgi veya iki nokta seçin. - + Cannot add a length constraint on an axis! Bir eksende bir uzunluk sınırlaması eklenemiyor! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Bunun yerine, kenar teğetliğine bitiş noktası uygulandı. - - - - - - - + + + + + + + Select the right things from the sketch. Eskiden eskizlerden birini seçin. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Seçilen noktaların hiçbiri, aynı elemanın parçaları oldukları, her ikisi de harici geometri oldukları için veya kenar uygun olmadığı için ilgili eğrilerle sınırlandırılmadı. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Seçilen noktalardan hiçbiri ilgili eğrilere aynı elemanın parçaları olduğu için ya da ikisi de harici geometri olduğu için kısıtlanmış değildi. - - - - + + + + Select exactly one line or up to two points from the sketch. Çizimden tam olarak bir çizgi veya en fazla iki nokta seçin. - + Cannot add a horizontal length constraint on an axis! Bir eksene yatay uzunluk kısıtlaması eklenemez! - + Cannot add a fixed x-coordinate constraint on the origin point! Orijin noktasına sabit bir x-koordinat kısıtlaması eklenemiyor! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Bir eksene dikey uzunluk kısıtı eklenemiyor! - + Cannot add a fixed y-coordinate constraint on the origin point! Orijin noktasına sabit bir y-koordinat kısıtlaması eklenemiyor! - + Select two or more lines from the sketch. Eskizden iki veya daha fazla çizgi seçin. - - + + Select at least two lines from the sketch. Çizimden en az iki satır seçin. - + Select a valid line. Geçerli bir çizgi seçin. - - + + The selected edge is not a valid line. Seçilen kenar geçerli bir çizgi değil. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2909,42 +2910,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokta; iki eğri ve bir nokta. - + Select some geometry from the sketch. perpendicular constraint Eskizden bazı geometriyi seçin. - - + + Cannot add a perpendicularity constraint at an unconnected point! Bağlantısız bir noktaya diklik kısıtı eklenemiyor! - - - + + + Perpendicular to B-spline edge currently unsupported. B-spline kenarına dikey şu anda desteklenmiyor. - - + + One of the selected edges should be a line. Seçilen kenarlardan bir tanesi bir çizgi olmalıdır. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uç noktalar arasında teğetsel bir kısıtlama uygulandı. Çakışık kısıtlama silindi. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Kenar teğetliğine bitiş noktası uygulandı. 'Nesne üzerinde nokta' kısıtlaması silindi. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2954,277 +2955,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokta; iki eğri ve bir nokta. - + Select some geometry from the sketch. tangent constraint Eskizden bazı geometriyi seçin. - - - + + + Cannot add a tangency constraint at an unconnected point! Bağlantısız bir noktaya bir teğet sınırlaması eklenemiyor! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Seçilen nesnelerin sayısı yanlış! - - + + With 3 objects, there must be 2 curves and 1 point. 3 nesneyle 2 eğri ve 1 nokta olmalıdır. - - - + + + Tangency to B-spline edge currently unsupported. Şu anda desteklenmeyen B-spline kenarlığı için teğet. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Eskizden bir veya daha fazla yay veya daire seçin. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Yalnızca bir veya daha fazla B-Spline kutbu veya eskizden yalnızca bir veya daha fazla yay veya daire seçin, ancak karıştırmayın. - - - + + + Constraint only applies to arcs or circles. Kısıtlama yalnızca yaylar veya daireler için geçerlidir. - - + + Select one or two lines from the sketch. Or select two edges and a point. Çizimden bir veya iki çizgi seçin. Ya da iki kenar ve bir nokta seçin. - - + + Parallel lines Paralel çizgiler - - + + An angle constraint cannot be set for two parallel lines. İki paralel çizgi için açı sınırlaması ayarlanamaz. - + Cannot add an angle constraint on an axis! Bir eksene açı sınırlaması eklenemiyor! - + Select two edges from the sketch. Eskizden iki kenar seçin. - + Select two or more compatible edges. İki veya daha fazla uyumlu kenar seçin. - + Sketch axes cannot be used in equality constraints. Eskiz ekseni eşitlik kısıtlamalarında kullanılamaz. - + Equality for B-spline edge currently unsupported. B-spline kenarı için eşitlik şu anda desteklenmiyor. - - - - + + + + Select two or more edges of similar type. Benzer tipte iki veya daha fazla kenar seçin. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Eskizden iki nokta ve bir simetri çizgisi, iki nokta ve bir simetri noktası veya bir çizgi ve bir simetri noktası seçin. - - + + Cannot add a symmetry constraint between a line and its end points. Bir çizgi ve uç noktaları arasına simetrik kısıtlama eklenemez. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Bir çizgi ile bitiş noktaları arasında bir simetri kısıtı eklenemez! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Işınlar olarak işlev görecek iki çizgi uç noktası ve bir sınırı temsil eden bir kenar seçin. İlk seçilen nokta indeks n1'e, ikincisi n2'ye karşılık gelir ve sıfır değeri n2 / n1 oranını ayarlar. - + Selected objects are not just geometry from one sketch. Seçilen nesneler sadece bir taslaktaki geometri değildir. - + Cannot create constraint with external geometry only. Sadece dış geometri ile kısıtlama oluşturulamaz. - + Incompatible geometry is selected. Uyumsuz geometri seçildi. - + SnellsLaw on B-spline edge is currently unsupported. B-serbest eğri kenarı üzerinde Snell Kanunu şu an desteklenmiyor. - - - - - + + + + + Select constraints from the sketch. Eskizden sınırlamaları seçin. - - - + + + Select constraint(s) from the sketch. Eskizden kısıtlamaları seçin. - + B-Spline Degree B-Spline Derecesi - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error CAD Çekirdek Hatası - + None of the selected elements is an edge. Seçilen öğelerden hiçbiri kenar değildir. - - + + At least one of the selected objects was not a B-Spline and was ignored. Seçilen nesnelerden en az biri, bir B-Spline değildi ve göz ardı edildi. - - + + The selection comprises more than one item. Please select just one knot. Seçim birden fazla öğe içerir. Lütfen sadece bir düğüm seçin. - - + + Input Error Giriş hatası - - + + None of the selected elements is a knot of a B-spline Hiçbiri seçilmiş unsurları a, düğüm a, B-spline - - + + Selection is empty Seçim boş - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3304,17 +3305,17 @@ Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokt It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3628,12 +3629,12 @@ Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokt Uzunluk: - + Refractive index ratio Refraktif indeks oranı - + Ratio n2/n1: Oran n2/n1: @@ -3913,8 +3914,8 @@ Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokt SketcherGui::PropertyConstraintListItem - - + + Unnamed Adsız @@ -4144,13 +4145,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4171,32 +4172,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both İkisi - + Auto Otomatik - + Diameter Çap - + Radius Yarıçap @@ -4645,12 +4646,12 @@ O zaman nesneler sadece eskiz düzleminin arkasında görünür. Mevcut eskizlere uygula - + Unexpected C++ exception Beklenmedik C ++ özel durumu - + Sketcher Taslakçı @@ -4658,55 +4659,55 @@ O zaman nesneler sadece eskiz düzleminin arkasında görünür. SketcherGui::SketcherValidation - + No missing coincidences Eksik raslantılar yok - + No missing coincidences found Eksik çakışma bulunamadı - + Missing coincidences Eksik çakışmalar - + %1 missing coincidences found %1 eksik çakışma bulundu - + No invalid constraints Geçersiz kısıtlama yok - + No invalid constraints found Geçersiz kısıtlama bulunamadı - + Invalid constraints Geçersiz kısıtlamalar - + Invalid constraints found Geçersiz kısıtlamalar bulundu - - - + + + Reversed external geometry Ters çevrilmiş Harici geometri - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4719,7 +4720,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Bitiş noktalarını yeniden atamak için "Kısıtlamalardaki uç noktaları değiştir" düğmesini tıklayın. Bunu FreeCAD'de v0.15'ten daha eski oluşturulan çizimlere yalnızca bir kez yapın - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4728,75 +4729,70 @@ However, no constraints linking to the endpoints were found. Ancak, uç noktalara bağlanan hiçbir kısıtlama bulunamadı. - + No reversed external-geometry arcs were found. Ters harici geometri yayları bulunamadı. - + %1 changes were made to constraints linking to endpoints of reversed arcs. Ters yayların uç noktalarına bağlanan kısıtlamalarda %1 değişiklik yapıldı. - - + + Constraint orientation locking Kısıtlama yönü kilitleme - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Oryantasyon kilitleme etkinleştirildi ve %1 kısıtlama için yeniden hesaplandı. Kısıtlamalar, Rapor görünümünde listelenmiştir (Görünüm Menüsü -> Paneller -> Rapor görünümü). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Yönlendirme kilidi %1 kısıtlama için devre dışı bırakıldı. Kısıtlamalar Rapor görünümünde listelenmiştir (Görünüm Menüsü -> Paneller -> Rapor görünümü). Gelecekteki tüm kısıtlamalar için kilitlemenin varsayılan olarak hala AÇIK olduğunu unutmayın. - - + + Delete constraints to external geom. Kısıtlamaları harici coğrafyaya sil. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Harici geometriyle uğraşan TÜM kısıtlamaları silmek üzeresiniz. Bu, harici geometriye kırık / değiştirilmiş bağlantılar içeren bir eskizin kurtarılması için yararlıdır. Kısıtlamaları silmek istediğinizden emin misiniz? - + All constraints that deal with external geometry were deleted. Dış geometri ile ilgilenen tüm kısıtlamalar silindi. - + No degenerated geometry Bozulmuş geometri yok - + No degenerated geometry found Bozulmuş geometri bulunamadı - + Degenerated geometry Bozulmuş geometri - + %1 degenerated geometry found %1 bozulmuş geometri bulundu SketcherGui::TaskSketcherConstraints - - - Form - Şekil: - Check to toggle filters @@ -4871,11 +4867,6 @@ Ancak, uç noktalara bağlanan hiçbir kısıtlama bulunamadı. SketcherGui::TaskSketcherElements - - - Form - Şekil: - Check to toggle filters @@ -5061,7 +5052,7 @@ Ancak, uç noktalara bağlanan hiçbir kısıtlama bulunamadı. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Gelişmiş çözücü kontrolü @@ -5352,8 +5343,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Tüm B-spline'lar için eğrilik tarağını gösterme ve gizleme arasında geçiş yapar @@ -5361,8 +5352,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Seçilen bir B-spline düğümünün çokluğunu azaltır @@ -5370,8 +5361,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Tüm B-spline derecelerini gösterme ve gizleme arasında geçiş yapar @@ -5379,8 +5370,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Seçilen bir B-spline düğümünün çoğaltılmasını arttırır @@ -5388,8 +5379,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Tüm B-spline'lar için düğüm çokluğunu gösterme ve gizleme arasında geçiş yapar @@ -5397,8 +5388,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Tüm B-spline'lar için kontrol noktası kalınlığını gösterme ve gizleme arasında geçiş yapar @@ -5406,8 +5397,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Tüm B-kamaları için kontrol çokgenlerini gösterme ve gizleme arasında geçiş yapar @@ -5442,8 +5433,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Bir çemberin veya bir yayın yarıçapını düzelt @@ -5451,7 +5442,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Bir çember veya yayın yarı çapını/çapını onar @@ -5459,8 +5450,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Bir dairenin veya bir yayın yarıçapını düzeltme @@ -5468,7 +5459,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Bir çember veya yayın yarı çapını/çapını onar @@ -5485,8 +5476,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Uç noktaları ve yay boyunca bir nokta ile bir yay oluşturma @@ -5494,8 +5485,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points 3 kenar noktası ile bir daire oluşturun @@ -5503,8 +5494,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Merkezini ve uç noktalarını belirterek bir yay oluşturun @@ -5512,8 +5503,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Merkez, ana yarıçap ve bitiş noktalarına göre bir elips yayı oluşturun @@ -5521,8 +5512,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Merkez, ana yarıçap ve bitiş noktalarına göre bir hiperbol yayı oluşturun @@ -5530,8 +5521,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Merkez, tepe ve bitiş noktalarına göre bir parabol yayı oluşturun @@ -5539,13 +5530,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points Kontrol noktalarıyla B-spline - - + + Create a B-spline by control points Kontrol noktalarına göre B-spline oluşturma @@ -5553,8 +5544,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Merkezi ve bir kenar noktası ile bir daire oluşturun @@ -5562,8 +5553,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Periapsis, apoapsis ve küçük yarıçap ile elips oluşturun @@ -5571,8 +5562,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Merkez, büyük yarıçap ve nokta ile bir elips oluşturun @@ -5580,8 +5571,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines İki çizgi arasında bir yarıçap oluşturur @@ -5589,8 +5580,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Merkezinden ve bir köşeden bir heptagon oluşturun @@ -5598,8 +5589,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Merkezinden ve bir köşeden bir altıgen oluşturun @@ -5607,7 +5598,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Yuvarlatılmış dikdörtgen oluştur @@ -5615,14 +5606,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Merkezinden ve bir köşeden bir sekizgen oluşturun - - + + Create a regular polygon by its center and by one corner Merkezinden ve bir köşeden düzenli çokgen oluşturma @@ -5630,8 +5621,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Merkezinden ve bir köşeden bir beşgen oluştur @@ -5639,8 +5630,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Kısıtlamaları ve kesişme noktasını koruyan kavis @@ -5648,7 +5639,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Dikdörtgen oluştur @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Merkezden dikdörtgen oluştur @@ -5664,8 +5655,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Merkezini ve bir köşesini belirterek bir kare oluşturun @@ -5673,8 +5664,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Merkezinden ve bir köşeden eşkenar üçgen oluşturun @@ -5682,13 +5673,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Kontrol noktalarıyla periyodik B-spline - - + + Create a periodic B-spline by control points Kontrol noktalarına göre periyodik B-spline oluşturma @@ -6322,36 +6313,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Hata @@ -6371,45 +6362,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6419,18 +6410,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6440,49 +6431,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Yuvarlama oluşturma hatası - + Failed to add line Failed to add line @@ -6492,7 +6483,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6502,27 +6493,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6532,13 +6523,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6546,13 +6537,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6658,12 +6649,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6671,12 +6662,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6684,12 +6675,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Boyut - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6701,14 +6692,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Boyut + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts index f47b9b6892..6826e1697a 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Створити копію - + Copy the geometry of another sketch Копіює геометрію іншого ескізу @@ -100,27 +100,27 @@ Показати/приховати інформаційний шар B-сплайну - + Show/hide B-spline degree Показати/приховати ступінь B-сплайну - + Show/hide B-spline control polygon Показати/приховати полігон керування B-сплайном - + Show/hide B-spline curvature comb Показати/приховати гребінець кривизни B-сплайнів - + Show/hide B-spline knot multiplicity Показати/приховати кратність вузлів B-сплайну - + Show/hide B-spline control point weight Показати/приховати вагу контрольних точок B-сплайну @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Обмеження для дуги або кола - + Constrain an arc or a circle Створює обмеження для дуги чи кола - + Constrain radius Обмеження за радіусом - + Constrain diameter Обмеження за діаметром - + Constrain auto radius/diameter Автоматичне обмеження за радіусом/діаметром @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Створення дуги - + Create an arc in the sketcher Створює дугу на ескізі - + Center and end points Центральна та кінцеві точки - + End points and rim point Кінцеві та точка периметру @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Створити B-сплайн - + Create a B-spline in the sketch Створює B-сплайн на ескізі @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Створити коло - + Create a circle in the sketcher Створює коло на ескізі - + Center and rim point Центральна та точка периметру - + 3 rim points Три точки периметру @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Створити конус - + Create a conic in the sketch Створює конус на ескізі - + Ellipse by center, major radius, point Еліпс за центром, великим радіусом, точкою - + Ellipse by periapsis, apoapsis, minor radius Еліпс за періапсидою, апоапсидою, малому радіусу - + Arc of ellipse by center, major radius, endpoints Дуга еліпсу за центром, великому радіусу та кінцевими точками - + Arc of hyperbola by center, major radius, endpoints Дуга гіперболи за центром, великому радіусу та кінцевими точками - + Arc of parabola by focus, vertex, endpoints Дуга параболи за фокусом, вершинами та кінцевими точками @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Створити заокруглення - + Create a fillet between two lines Створює заокруглення між двома лініями - + Sketch fillet Заокруглення ескізу - + Constraint-preserving sketch fillet Заокруглення ескізу зі збереженням обмежень @@ -299,17 +299,17 @@ Створює прямокутник на ескізі - + Rectangle Прямокутник - + Centered rectangle Прямокутник за центром - + Rounded rectangle Прямокутник з заокругленими кутами @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Створити правильний багатокутник - + Create a regular polygon in the sketcher Створює правильний багатокутник на ескізі - + Triangle Трикутник - + Square Квадрат - + Pentagon Пʼятикутник - + Hexagon Шестикутник - + Heptagon Семикутник - + Octagon Восьмикутник - + Regular polygon Правильний багатокутник @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Зміна кратності вузлів - + Modifies the multiplicity of the selected knot of a B-spline Змінює кратність вибраного вузла B-сплайну - + Increase knot multiplicity Збільшення кратності вузлів - + Decrease knot multiplicity Зменшення кратності вузлів @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Кутове обмеження - + Fix the angle of a line or the angle between two lines Задає кут нахилу лінії або кут між двома лініями @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Обмеження переміщення - + Block the selected edge from moving Блокує переміщення вибраного ребра @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Обмеження збігу - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Створити обмеження збігу між точками або концентричне обмеження між колами, дугами та еліпсами @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Обмеження за діаметром - + Fix the diameter of a circle or an arc Задає діаметр кола або дуги @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Обмеження відстані - + Fix a length of a line or the distance between a line and a vertex or between two circles Фіксує довжину лінії або відстань між лінією і вершиною або між двома колами @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Обмеження відстані по горизонталі - + Fix the horizontal distance between two points or line ends Задає відстань по горизонталі між двома точками або кінцями відрізку @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Обмеження відстані по вертикалі - + Fix the vertical distance between two points or line ends Задає відстань по вертикалі між двома точками або кінцями відрізку @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Еквівалентне обмеження - + Create an equality constraint between two lines or between circles and arcs Створює обмеження еквівалентності між двома лініями, колами або дугами @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Горизонтальне обмеження - + Create a horizontal constraint on the selected item Створює обмеження горизонтальності для вибраного елементу @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Обмеження фіксації - + Create both a horizontal and a vertical distance constraint on the selected vertex Створює обмеження на горизонтальну і вертикальну відстань для обраної вершини @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Паралельне обмеження - + Create a parallel constraint between two lines Створює обмеження паралельності між двома лініями @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Перпендикулярне обмеження - + Create a perpendicular constraint between two lines Створює обмеження перпендикулярності між двома лініями @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Зафіксувати точку на обʼєкті - + Fix a point onto an object Фіксує точку на обʼєкті @@ -558,12 +558,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Автоматичне обмеження за радіусом/діаметром - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Задає діаметр, якщо вибрано коло, або радіус, якщо вибрано полюс дуги/сплайна @@ -571,12 +571,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Обмежити радіус або вагу - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Задає радіус кола чи дуги або задає вагу полюса В-сплайну @@ -584,12 +584,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Обмеження за законом заломлення (закон Снеліуса) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Створює обмеження за законом заломлення (закон Снеліуса) між @@ -599,12 +599,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Симетричне обмеження - + Create a symmetry constraint between two points with respect to a line or a third point Створює обмеження симетричності між двома @@ -614,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Обмеження дотичності - + Create a tangent constraint between two entities Створює обмеження дотичності між двома обʼєктами @@ -627,12 +627,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Вертикальне обмеження - + Create a vertical constraint on the selected item Створює обмеження вертикальності для вибраного елементу @@ -640,12 +640,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Перетворити геометрію на B-сплайн - + Converts the selected geometry to a B-spline Перетворює виділену геометрію на B-сплайн @@ -666,12 +666,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Створити дугу за трьома точками - + Create an arc by its end points and a point along the arc Створює дугу за кінцевими точками та точкою на дузі @@ -679,12 +679,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Створити коло за трьома точками - + Create a circle by 3 perimeter points Створює коло за трьома точками периметра @@ -692,12 +692,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Створити дугу за центром - + Create an arc by its center and by its end points Створює дугу за центром та кінцевими точками @@ -705,12 +705,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Створити дугу еліпса - + Create an arc of ellipse in the sketch Створює дугу еліпса на ескізі @@ -718,12 +718,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Створити дугу гіперболи - + Create an arc of hyperbola in the sketch Створює дугу гіперболи на ескізі @@ -731,12 +731,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Створити дугу параболи - + Create an arc of parabola in the sketch Створює дугу параболи на ескізі @@ -744,12 +744,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Створити B-сплайн - + Create a B-spline by control points in the sketch. Створити B-сплайн за контрольними точками креслення. @@ -757,12 +757,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Створити коло - + Create a circle in the sketch Створює коло на ескізі @@ -770,12 +770,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Створити еліпс за трьома точками - + Create an ellipse by 3 points in the sketch Створює еліпс за 3 точками на ескізі @@ -783,12 +783,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Створити еліпс за центром - + Create an ellipse by center in the sketch Створює еліпс за центром та двома радіусами @@ -796,12 +796,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Створити заокруглення - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Створити семикутник - + Create a heptagon in the sketch Створює семикутник на ескізі @@ -822,12 +822,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Створити шестикутник - + Create a hexagon in the sketch Створює шестикутник на ескізі @@ -861,12 +861,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Створити восьмикутник - + Create an octagon in the sketch Створює восьмикутник на ескізі @@ -874,12 +874,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Створити п’ятикутник - + Create a pentagon in the sketch Створює п’ятикутник на ескізі @@ -887,12 +887,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Створити періодичний B-сплайн - + Create a periodic B-spline by control points in the sketch. Створити періодичний B-сплайн за контрольними точками креслення. @@ -900,12 +900,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Створити точку - + Create a point in the sketch Створює точку на ескізі @@ -913,12 +913,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Створити заокруглення зі збереженням точки перетину - + Fillet that preserves intersection point and most constraints Створює заокруглення, яке зберігає точку перетину та більшість обмежень @@ -926,12 +926,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Створити ламану лінію - + Create a polyline in the sketch. 'M' Key cycles behaviour Створює ламану лінію на ескізі. Циклічна зміна режиму - клавіша 'M' @@ -965,12 +965,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Створити правильний багатокутник - + Create a regular polygon in the sketch Створює правильний багатокутник на ескізі @@ -978,12 +978,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Створити паз - + Create a slot in the sketch Створює паз на ескізі @@ -991,12 +991,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Створити квадрат - + Create a square in the sketch Створює квадрат на ескізі @@ -1004,12 +1004,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Створити рівнобічний трикутник - + Create an equilateral triangle in the sketch Створює рівнобічний трикутник на ескізі @@ -1017,12 +1017,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Зменшити ступінь B-сплайну - + Decreases the degree of the B-spline Зменшує ступінь B-сплайну @@ -1030,12 +1030,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Зменшення кратності вузлів - + Decreases the multiplicity of the selected knot of a B-spline Зменшення кратності вибраного вузла B-сплайну @@ -1082,12 +1082,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Продовжити ребро - + Extend an edge with respect to the picked position Продовжує ребро до найближчої точки перетину @@ -1095,12 +1095,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Створити зовнішню геометрію - + Create an edge linked to an external geometry Створює ребро, яке прив’язане до зовнішньої геометрії @@ -1108,12 +1108,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Збільшити ступінь B-сплайну - + Increases the degree of the B-spline Збільшує ступінь B-сплайну @@ -1121,12 +1121,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Збільшення кратності вузлів - + Increases the multiplicity of the selected knot of a B-spline Збільшує кратність вибраного вузла B-сплайну @@ -1134,12 +1134,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Вставити вузол - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Вставляє вузол в заданий параметр. Якщо вузол вже існує, його кратність збільшується на одиницю. @@ -1147,12 +1147,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Об'єднати криві - + Join two curves at selected end points Обєднує дві криві за обраними кінцевими точками @@ -1438,12 +1438,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Розділити ребро - + Splits an edge into two while preserving constraints Ділить ребро на два зі збереженням обмежень @@ -1464,12 +1464,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Перемикання віртуального простору - + Switches the selected constraints or the view to the other virtual space Перемикає виділені обмеження або вид на інший віртуальний простір @@ -1490,12 +1490,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Активувати/деактивувати обмеження - + Activates or deactivates the selected constraints Активує або деактивує виділені обмеження @@ -1516,12 +1516,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Перемкнути обмеження між допоміжними/основними - + Set the toolbar, or the selected constraints, into driving or reference mode Перемикає панель інструментів в режим допоміжної/основної геометрії або перетворює виділені обмеження в допоміжні/основні @@ -1530,12 +1530,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Обрізати ребро - + Trim an edge with respect to the picked position Обрізає ребро до найближчої точки перетину @@ -1594,369 +1594,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Додати горизонтальне обмеження - - - + + + Add horizontal alignment Додати горизонтальне вирівнювання - - + + Add vertical constraint Додати вертикальне обмеження - + Add vertical alignment Додати вертикальне вирівнювання - + Add 'Lock' constraint Додати обмеження 'Фіксація' - + Add relative 'Lock' constraint Додайте обмеження відносна 'Фіксація' - + Add fixed constraint Додати фіксуюче обмеження - + Add 'Block' constraint Додати обмеження 'Блокування' - + Add block constraint Додати обмеження блокування - - - + + + Add coincident constraint Додати обмеження збігу - - + + Add distance from horizontal axis constraint Додати обмеження відстані від горизонтальної осі - - + + Add distance from vertical axis constraint Додати обмеження відстані від вертикальної осі - - + + Add point to point distance constraint Додати обмеження відстані між двома точками - - - + + + Add point to line Distance constraint Додати обмеження відстані між точкою та лінією - - + + Add circle to circle distance constraint Додати обмеження відстані між двома колами - + Add circle to line distance constraint Додати обмеження відстані між колом та лінією - - - - - + + + + + + Add length constraint Додати обмеження довжини - - + + Dimension Розмірність - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Додати обмеження точки на об’єкті - - + + Add point to point horizontal distance constraint Додати обмеження відстані за горизонталлю між двома точками - + Add fixed x-coordinate constraint Додати обмеження фіксованої X-координати - - + + Add point to point vertical distance constraint Додати обмеження відстані за вертикаллю між двома точками - + Add fixed y-coordinate constraint Додати обмеження фіксованої Y-координати - - + + Add parallel constraint Додати обмеження паралельності - - - - - - - + + + + + + + Add perpendicular constraint Додати обмеження перпендикуляру - + Add perpendicularity constraint Додати обмеження перпендикулярності - + Swap coincident+tangency with ptp tangency Перетворити збіг+дотик у дотик точка-точка - + Swap PointOnObject+tangency with point to curve tangency Перетворіть обмеження «Точка на обʼєкті» + дотик на обмеження «Дотик до кривої» - - - - - - - + + + + + + + Add tangent constraint Додати обмеження дотику - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Додати обмеження дотику до точки - - - - + + + + Add radius constraint Додати обмеження радіусу - - - - + + + + Add diameter constraint Додати обмеження діаметру - - - - + + + + Add radiam constraint Додати обмеження радіусу/діаметру - - - - - - + + + + + + Add angle constraint Додати обмеження кута - - + + Add equality constraint Додати обмеження рівності - - - - - + + + + + Add symmetric constraint Додати обмеження симетрії - + Add Snell's law constraint Додати обмеження за законом заломлення Снеліуса - + Toggle constraint to driving/reference Перемкнути обмеження між допоміжними/основними - + Activate/Deactivate constraint Активувати/деактивувати обмеження @@ -2016,44 +2017,44 @@ invalid constraints, degenerated geometry, etc. Додати центровану коробку для ескізу - + Add rounded rectangle Додати прямокутник з заокругленими кутами - + Add line to sketch wire Додати лінію до ламаної лінії ескізу - + Add arc to sketch wire Додати дугу до ламаної лінії ескізу - - + + Add sketch arc Додати ескіз дуги - - + + Add sketch circle Додати ескіз кола - + Add sketch ellipse Додати ескіз еліпсу - + Add sketch arc of ellipse Додати ескіз дуги еліпса - + Add sketch arc of hyperbola Додати ескіз дуги гіперболи @@ -2073,33 +2074,33 @@ invalid constraints, degenerated geometry, etc. Додати точку ескізу - - + + Create fillet Створити заокруглення - + Trim edge Обрізати ребро - + Extend edge Продовжити ребро - + Split edge Розділити ребро - + Add external geometry Додати зовнішню геометрію - + Add slot Додати паз @@ -2109,37 +2110,37 @@ invalid constraints, degenerated geometry, etc. Додати шестикутник - + Convert to NURBS Перетворити на NURBS - + Increase spline degree Збільшити ступінь сплайна - + Decrease spline degree Зменшити ступінь сплайна - + Increase knot multiplicity Збільшення кратності вузлів - + Decrease knot multiplicity Зменшення кратності вузлів - + Insert knot Вставити вузол - + Join Curves Об'єднати Криві @@ -2179,12 +2180,12 @@ invalid constraints, degenerated geometry, etc. Видалити вирівнювання осей - + Toggle constraints to the other virtual space Перемкнути обмеження в інший віртуальний простір - + @@ -2192,7 +2193,7 @@ invalid constraints, degenerated geometry, etc. Оновити віртуальний простір обмеження - + Add auto constraints Додати автообмеження @@ -2232,7 +2233,7 @@ invalid constraints, degenerated geometry, etc. Додати вузлову точку - + Create a carbon copy Створити копію @@ -2248,37 +2249,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Помилка автообмеження: Ескіз не вирішується при додаванні обмеження збігу. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Помилка автообмеження: Ескіз не вирішується при додаванні вертикального/горизонтального обмеження. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Помилка автообмеження: Ескіз не вирішується при додаванні обмеження рівності. - + Autoconstrain error: Unsolvable sketch without constraints. Помилка автообмеження: Ескіз не вирішується без обмежень. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Помилка автообмеження: Ескіз не вирішується після додавання вертикального та горизонтального обмежень. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Помилка автообмеження: Ескіз не вирішується при додаванні обмеження збігу точок. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Помилка автообмеження: Ескіз не вирішується після додавання обмеження рівності. @@ -2403,143 +2404,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2555,9 +2556,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Невірний вибір @@ -2578,329 +2579,329 @@ invalid constraints, degenerated geometry, etc. Обмеження розміру - + Cannot add a constraint between two external geometries. Неможливо додати обмеження між двома зовнішніми геометріями. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Неможливо додати обмеження між двома фіксованими геометріями. Фіксована геометрія включає зовнішню геометрію, заблоковану геометрію або спеціальні точки такі як вузли B-сплайну. - + Sketcher Constraint Substitution Заміна обмеження ескізу - + Keep notifying me of constraint substitutions Сповіщайте мене про заміни обмежень - - - + + + Only sketch and its support are allowed to be selected. Дозволено вибрати лише ескіз та його базу. - + One of the selected has to be on the sketch. Один із вибраних має бути на ескізі. - - + + Select an edge from the sketch. Виділіть ребро на ескізі. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Неможливі обмеження - - - - + + + + The selected edge is not a line segment. Виділене ребро не є сегментом лінії. - - - - - - + + + + + + Double constraint Подвійне обмеження - - - - - + + + + + The selected edge already has a horizontal constraint! Виділене ребро вже має обмеження по горизонталі! - - - + + + The selected edge already has a vertical constraint! Виділене ребро вже має обмеження по вертикалі! - - - - - - + + + + + + The selected edge already has a Block constraint! Виділене ребро вже заблоковане! - + The selected item(s) can't accept a horizontal constraint! Виділений елемент(и) не може прийняти горизонтальне обмеження! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Виділено декілька фіксованих точок. Оберіть максимум одну фіксовану точку! - + The selected item(s) can't accept a vertical constraint! Виділений елемент(и) не може прийняти вертикальне обмеження! - - - + + + Select vertices from the sketch. Виділіть вершини на ескізі. - + Select one vertex from the sketch other than the origin. Виділіть одну вершину на ескізі, крім початкової. - + Select only vertices from the sketch. The last selected vertex may be the origin. Виділіть тільки вершини на ескізі. Остання виділена вершина може бути початковою. - + Wrong solver status Неправильний статус вирішувача - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Блокуюче обмеження не може бути додано, якщо ескіз не можна вирішати або є надлишкові/конфліктуючі обмеження. - + Select one edge from the sketch. Виділіть одне ребро на ескізі. - + Select only edges from the sketch. Виділіть лише ребра на ескізі. - + Number of selected objects is not 3 Кількість виділених об'єктів не 3 - - - + + + Error Помилка - + Unexpected error. More information may be available in the Report View. Неочікувана помилка. Більш детальна інформація доступна у Виді Звіт. - + Endpoint to endpoint tangency was applied instead. Замість кінцевої точки застосовано дотичну. - + Select two or more points from the sketch. Виділіть на ескізі принаймні дві точки. - + Select two or more vertices from the sketch. Виділіть на ескізі принаймні дві вершини. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Виберіть дві або більше вершин з ескізу для обмеження збігу, або два або більше кіл, еліпсів, дуг або дуг еліпса для концентричного обмеження. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Виберіть дві вершини з ескізу для обмеження збігу, або два кола, еліпси, дуги або дуги еліпса для концентричного обмеження. - + Select exactly one line or one point and one line or two points from the sketch. Виділіть на ескізі лише одну лінію, або одну точку та лінію, або дві точки. - + Cannot add a length constraint on an axis! Не можу додати обмеження довжини на вісь! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Виділіть на ескізі рівно одну лінію або одну точку і одну лінію або дві точки, або два кола. - + This constraint does not make sense for non-linear curves. Це обмеження не має сенсу для нелінійних кривих. - + Endpoint to edge tangency was applied instead. Замість кінцевої точки застосовано дотичну до ребра. - - - - - - - + + + + + + + Select the right things from the sketch. Виділіть потрібні обʼєкти на ескізі. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Виділіть ребро, яке не є вагою B-сплайну. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Жодна з виділених точок не була обмежена відповідними кривими тому, що вони є частинами того ж елементу; вони є зовнішньою геометрією або тому, що ребро не підходить. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Жодна з виділених точок не була обмежена відповідними кривими тому, що вони є частинами того ж елементу або вони є зовнішньою геометрією. - - - - + + + + Select exactly one line or up to two points from the sketch. Виділіть на ескізі лише одну лінію або не більше двох точок. - + Cannot add a horizontal length constraint on an axis! Не можу додати горизонтального обмеження довжини на вісь! - + Cannot add a fixed x-coordinate constraint on the origin point! Не можна обмежити X-координату точки початку координат! - - + + This constraint only makes sense on a line segment or a pair of points. Це обмеження має сенс лише для відрізка або пари точок. - + Cannot add a vertical length constraint on an axis! Не можу додати вертикального обмеження довжини на вісь! - + Cannot add a fixed y-coordinate constraint on the origin point! Не можна обмежити Y-координату точки початку координат! - + Select two or more lines from the sketch. Виділіть на ескізі дві або більше ліній. - - + + Select at least two lines from the sketch. Виділіть на ескізі принаймні дві лінії. - + Select a valid line. Виділіть правильну лінію. - - + + The selected edge is not a valid line. Виділене ребро не є правильною лінією. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2910,42 +2911,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Допустимі комбінації: дві криві; кінцева точка і крива; дві кінцевих точки; дві криві та точка. - + Select some geometry from the sketch. perpendicular constraint Виділіть деяку геометрію ескізу. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не вдалося застосувати обмеження перпендикулярності, бо виділена точка не є частиною кривої! - - - + + + Perpendicular to B-spline edge currently unsupported. Перпендикуляр до ребра B-сплайну не підтримується. - - + + One of the selected edges should be a line. Одне з виділених ребер повинне бути лінією. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Застосовано обмеження дотичності між кінцевими точками. Обмеження збігу видалено. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Застосовано обмеження дотичності кінцевої точки до ребра. Обмеження точки на об’єкті було видалено. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,277 +2956,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Допустимі комбінації: дві криві; кінцева точка та крива; дві кінцеві точки; дві криві та точка. - + Select some geometry from the sketch. tangent constraint Виділіть деяку геометрію ескізу. - - - + + + Cannot add a tangency constraint at an unconnected point! Не можу додати обмеження дотичної у точці, що не належить кривій! - - + + Tangent constraint at B-spline knot is only supported with lines! Дотичне обмеження на вузлі B-сплайна підтримується лише лініями! - + B-spline knot to endpoint tangency was applied instead. Замість цього застосовано дотичну вузла B-сплайна до кінцевої точки. - + Select either one point and several curves, or one curve and several points. Виберіть або одну точку і кілька кривих, або одну криву і кілька точок. - - + + Wrong number of selected objects! Неправильна кількість виділених обʼєктів! - - + + With 3 objects, there must be 2 curves and 1 point. Коли вибрано 3 елементи, це повинні бути 2 криві та одна точка. - - - + + + Tangency to B-spline edge currently unsupported. Дотичність до ребра B-сплайну не підтримується. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Виділіть одну або кілька дуг чи кіл на ескізі. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Виділіть на ескізі лише один чи декілька полюсів B-сплайну або лише одну чи декілька дуг чи кіл, але не змішуйте сплайни та дуги. - - - + + + Constraint only applies to arcs or circles. Обмеження можна застосовувати лише до дуг або кіл. - - + + Select one or two lines from the sketch. Or select two edges and a point. Виділіть одну або дві лінії на ескізі. Або виділіть два ребра і точку. - - + + Parallel lines Паралельні лінії - - + + An angle constraint cannot be set for two parallel lines. Обмеження кута не можна застосувати до паралельних ліній. - + Cannot add an angle constraint on an axis! Не можу додати обмеження кута на вісі! - + Select two edges from the sketch. Виділіть два ребра на ескізі. - + Select two or more compatible edges. Виділіть два або більше сумісних ребра. - + Sketch axes cannot be used in equality constraints. Вісі ескізу не можна використовувати в обмеженнях еквівалентності. - + Equality for B-spline edge currently unsupported. Обмеження рівності ребра B-сплайну не підтримується. - - - - + + + + Select two or more edges of similar type. Виділіть два або більше ребра однакового типу. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Виділіть на ескізі лише один чи декілька полюсів B-сплайну або лише одну чи декілька дуг чи кіл, але не змішуйте сплайни та дуги. - - + + Cannot add a symmetry constraint between a line and its end points. Неможливо додати обмеження симетрії між лінією та її кінцевими точками. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Неможливо додати обмеження симетрії між лінією та її кінцевими точками! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Виділіть два кінці ліній, які будуть виконувати роль променів, і ребро, що представляє межу розподілу середовищ. Перша обрана точка відповідає індексу n1, друга n2, а опорне значення визначається співвідношенням n2 / n1. - + Selected objects are not just geometry from one sketch. Виділені обʼєкти з різних ескізів. - + Cannot create constraint with external geometry only. Неможливо створити обмеження з використанням тільки зовнішньої геометрії. - + Incompatible geometry is selected. Виділено несумісну геометрію. - + SnellsLaw on B-spline edge is currently unsupported. Обмеження за законом заломлення на ребрі B-сплайна наразі не підтримується. - - - - - + + + + + Select constraints from the sketch. Виділіть обмеження на ескізі. - - - + + + Select constraint(s) from the sketch. Виділіть обмеження на ескізі. - + B-Spline Degree Ступінь B-сплайну - + Define B-Spline Degree, between 1 and %1: Визначте ступінь B-сплайну між 1 та %1: - - - + + + CAD Kernel Error Помилка ядра CAD - + None of the selected elements is an edge. Жоден з виділених елементів не є ребром. - - + + At least one of the selected objects was not a B-Spline and was ignored. Принаймні один з вибраних обʼєктів не є B-сплайн і був проігнорований. - - + + The selection comprises more than one item. Please select just one knot. Виділення містить декілька елементів. Будь ласка, виділіть лише один вузол. - - + + Input Error Помилка введення - - + + None of the selected elements is a knot of a B-spline Жоден із виділених елементів не є вузлом B-сплайну - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Нічого не виділено. Виділіть B-сплайн. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Виділіть криву b-сплайна, щоб вставити вузол (а не вузол на ній). Конвертуйте її, якщо крива не є B-сплайном. - + Nothing is selected. Please select end points of curves. Нічого не вибрано. Виберіть кінцеві точки кривих. - + Too many curves on point Занадто багато кривих в одній точці - - + + Exactly two curves should end at the selected point to be able to join them. Рівно дві криві повинні закінчуватися у вибраній точці, щоб їх можна було з'єднати. - + Too few curves on point Занадто мало кривих у точці - + Two end points, or coincident point should be selected. Необхідно вибрати дві кінцеві точки або точки, що збігаються. @@ -3305,17 +3306,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Переміщення зовнішньої геометрії на інший візуальний шар наразі не підтримується. Зовнішню геометрію буде пропущена - + Set knot multiplicity Встановити кратність вузлів - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Встановіть кратність вузла в останній точці від 1 до %1:Зверніть увагу, що кратність може бути проігнорована за певних обставин.Будь ласка, зверніться до документації для отримання детальної інформації - + Value Error Помилка в значенні @@ -3629,12 +3630,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Довжина: - + Refractive index ratio Коефіцієнт заломлення - + Ratio n2/n1: Співвідношення n2/n1: @@ -3914,8 +3915,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Без назви @@ -4149,13 +4150,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4176,32 +4177,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Обидві - + Auto Автоматично - + Diameter Діаметр - + Radius Радіус @@ -4650,12 +4651,12 @@ Then objects are only visible behind the sketch plane. Застосувати до наявних ескізів - + Unexpected C++ exception Несподіване виключення C++ - + Sketcher Редактор Ескізів @@ -4663,55 +4664,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences Жодних відсутніх збігів - + No missing coincidences found Не знайдено відсутніх збігів - + Missing coincidences Збіги відсутні - + %1 missing coincidences found Відсутніх обмежень збігу: %1 - + No invalid constraints Неприпустимих обмежень немає - + No invalid constraints found Неприпустимих обмежень не виявлено - + Invalid constraints Неприпустимі обмеження - + Invalid constraints found Знайдені неприпустимі обмеження - - - + + + Reversed external geometry Перевернута зовнішня геометрія - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4724,7 +4725,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only Натисніть кнопку «Поміняти кінцеві точки в обмеженнях», щоб перепризначити кінцеві точки. Зробіть це лише один раз для ескізів, створених у FreeCAD старше версії 0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4733,75 +4734,70 @@ However, no constraints linking to the endpoints were found. Проте жодних обмежень, пов’язаних із кінцевими точками, не виявлено. - + No reversed external-geometry arcs were found. Не знайдено жодної перевернутої дуги кола. - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 змін було внесено до обмежень, пов’язаних із кінцевими точками перевернутих дуг. - - + + Constraint orientation locking Обмеження блокування орієнтації - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Блокування орієнтації було ввімкнено та перераховано для %1 обмежень. Ці обмеження наведено у вікні Вид Звіту (меню Вид -> Панелі -> Вид Звіту). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. Блокування орієнтації було вимкнено для %1 обмежень. Ці обмеження наведено у вікні Вид Звіту (меню Вид -> Панелі -> Вид Звіту). Зверніть увагу, що для всіх нових обмежень блокування вмикається за замовчуванням. - - + + Delete constraints to external geom. Видалити обмеження до зовнішньої геометрії. - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Ви збираєтеся видалити ВСІ обмеження, повʼязані із зовнішньою геометрією. Це корисно для відновлення ескізу із пошкодженими/зміненими посиланнями на зовнішню геометрію. Ви впевнені, що хочете видалити ці обмеження? - + All constraints that deal with external geometry were deleted. Усі обмеження, повʼязані із зовнішньою геометрією, були видалені. - + No degenerated geometry Немає виродженої геометрії - + No degenerated geometry found Не знайдено виродженої геометрії - + Degenerated geometry Вироджена геометрія - + %1 degenerated geometry found Знайдено %1 вироджену(их) геометрію(ій) SketcherGui::TaskSketcherConstraints - - - Form - Форма - Check to toggle filters @@ -4876,11 +4872,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Форма - Check to toggle filters @@ -5066,7 +5057,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Додаткові налаштування вирішувача @@ -5360,8 +5351,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Показує/приховує гребінець кривизни всіх B-сплайнів @@ -5369,8 +5360,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Зменшення кратності вибраного вузла B-сплайну @@ -5378,8 +5369,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Показує або приховує ступінь для всіх B-сплайнів @@ -5387,8 +5378,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Збільшує кратність вибраного вузла B-сплайну @@ -5396,8 +5387,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Показує або приховує кратність вузлів для всіх B-сплайнів @@ -5405,8 +5396,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Показує або приховує контрольні точки для всіх B-сплайнів @@ -5414,8 +5405,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Показує або приховує полігони керування всіх B-сплайнів @@ -5450,8 +5441,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Задає діаметр кола або дуги @@ -5459,7 +5450,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Задає радіус/діаметр кола або дуги @@ -5467,8 +5458,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Задає радіус кола або дуги @@ -5476,7 +5467,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Задає радіус/діаметр кола або дуги @@ -5493,8 +5484,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Створює дугу за кінцевими точками та точкою на дузі @@ -5502,8 +5493,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Створити коло за трьома точками @@ -5511,8 +5502,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Створює дугу за центром та кінцевими точками @@ -5520,8 +5511,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Створює дугу еліпса за її центром, великому радіусу та кінцевими точками @@ -5529,8 +5520,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Створює дугу гіперболи за її центром, великому радіусу та кінцевими точками @@ -5538,8 +5529,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Створити дугу параболи за фокусом, вершиною та кінцевими точками @@ -5547,13 +5538,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-сплайн за контрольними точками - - + + Create a B-spline by control points Створити B-сплайн за контрольними точками @@ -5561,8 +5552,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Створює коло за його центром та точкою периметра @@ -5570,8 +5561,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Створює еліпс за периапсисом, апоапсисом і малим радіусом @@ -5579,8 +5570,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Створіть еліпс за центром, великим радіусом і точкою @@ -5588,8 +5579,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Створює заокруглення між двома лініями @@ -5597,8 +5588,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Створює семикутник за його центром та одному куту @@ -5606,8 +5597,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Створює шестикутник за його центром та одному куту @@ -5615,7 +5606,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Створити прямокутник з заокругленими кутами @@ -5623,14 +5614,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Створює восьмикутник за його центром та одному куту - - + + Create a regular polygon by its center and by one corner Створити правильний багатокутник за центром та одному куту @@ -5638,8 +5629,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Створює пʼятикутник за його центром та одному куту @@ -5647,8 +5638,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Заокруглення зі збереженням обмежень та точки перетину @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Створити прямокутник @@ -5664,7 +5655,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Створити прямокутник за центром @@ -5672,8 +5663,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Створює квадрат за його центром та одному куту @@ -5681,8 +5672,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Створює рівнобічний трикутник за його центром та одному куту @@ -5690,13 +5681,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points Періодичний B-сплайн за контрольними точками - - + + Create a periodic B-spline by control points Створити періодичний B-сплайн за допомогою контрольних точок @@ -6329,36 +6320,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Помилка @@ -6378,45 +6369,45 @@ The grid spacing change if it becomes smaller than this number of pixel.Обмеження має невірну індексну інформацію та є помилковим. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Неприпустиме обмеження - - - + + + Failed to add arc Не вдалося додати дугу - + Failed to add arc of ellipse Не вдалося додати дугу еліпса - + Cannot create arc of hyperbola from invalid angles, try again! Не вдається створити дугу гіперболи з невірних кутів, спробуйте ще раз! - + Cannot create arc of hyperbola Не вдається створити дугу гіперболи - + Cannot create arc of parabola Не вдається створити дугу параболи @@ -6426,18 +6417,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Помилка додавання полюса B-сплайна - + Error creating B-spline pole Помилка створення полюса B-сплайна - - + + Error creating B-spline Помилка при створенні B-сплайна - + Error deleting last pole Помилка видалення останнього полюса @@ -6447,49 +6438,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Не вдається додати точку вузла - + Cannot add internal alignment points Не вдається додати внутрішні точки вирівнювання - + Error removing knot Помилка видалення вузла - + Failed to add carbon copy Не вдалося додати копію - - + + Failed to add circle Не вдалося додати коло - + Failed to add an ellipse Не вдалося додати еліпс - + Failed to extend edge Не вдалося подовжити ребро - + Failed to add external geometry Не вдалося додати зовнішню геометрію - + Failed to create fillet Failed to create fillet - + Failed to add line Не вдалося додати лінію @@ -6499,7 +6490,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Не вдалося додати точку - + Failed to add polygon Не вдалося додати полігон @@ -6509,27 +6500,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Не вдалося додати коробку - + Failed to add rounded rectangle Не вдалося додати заокруглений прямокутник - + Failed to add slot Не вдалося додати гніздо - + Failed to add edge Не вдалося додати ребро - + Failed to trim edge Не вдалося обрізати ребро - + Value Error @@ -6539,13 +6530,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots Створити B-сплайн за вузлами - - + + Create a B-spline by knots Створює B-сплайн за вузлами @@ -6553,13 +6544,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Створити періодичний B-сплайн за вузлами - - + + Create a periodic B-spline by knots Створює періодичний B-сплайн за вузлами @@ -6665,12 +6656,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Створює B-сплайн за вузлами - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Створює на ескізі B-сплайн за вузлами, тобто шляхом інтерполяції. @@ -6678,12 +6669,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Створює періодичний B-сплайн за вузлами - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Створює на ескізі періодичний B-сплайн за вузлами, тобто шляхом інтерполяції. @@ -6691,12 +6682,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Розмірність - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6708,14 +6699,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Розмірність + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts index 3029783b77..35216e827c 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ Mostra/Amaga la capa d'informació del B-spline - + Show/hide B-spline degree Show/hide B-spline degree - + Show/hide B-spline control polygon Show/hide B-spline control polygon - + Show/hide B-spline curvature comb Show/hide B-spline curvature comb - + Show/hide B-spline knot multiplicity Show/hide B-spline knot multiplicity - + Show/hide B-spline control point weight Show/hide B-spline control point weight @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringeix l'arc o el cercle - + Constrain an arc or a circle Restringeix un arc o un cercle - + Constrain radius Restricció del radi - + Constrain diameter Restringeix el diàmetre - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc Create arc - + Create an arc in the sketcher Crear un arc en l'esbós - + Center and end points Centre i extrems - + End points and rim point Extrems i punt sobre la vora @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline Crea un B-spline - + Create a B-spline in the sketch Crea un B-spline en l'esbós @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle Crea un cercle - + Create a circle in the sketcher Crea un cercle en el dibuix - + Center and rim point Centre i punt sobre la vora - + 3 rim points 3 punts sobre la vora @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch Crea una cònica en l'esbós - + Ellipse by center, major radius, point El·lipse donats el centre, el radi major i un punt - + Ellipse by periapsis, apoapsis, minor radius Ellipse by periapsis, apoapsis, minor radius - + Arc of ellipse by center, major radius, endpoints Arc d'el·lipse donats el centre, el radi major i els extrems - + Arc of hyperbola by center, major radius, endpoints Arc d'hipèrbola donats el centre, el radi major i els extrems - + Arc of parabola by focus, vertex, endpoints Arc de paràbola pel focus, el vèrtex i els extrems @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet Crea un arredoniment - + Create a fillet between two lines Create a fillet between two lines - + Sketch fillet Sketch fillet - + Constraint-preserving sketch fillet Constraint-preserving sketch fillet @@ -299,17 +299,17 @@ Creates a rectangle in the sketch - + Rectangle Rectangle - + Centered rectangle Centered rectangle - + Rounded rectangle Rounded rectangle @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon Crea un polígon regular - + Create a regular polygon in the sketcher Crea un polígon regular en l'entorn de l'esbós - + Triangle Triangle - + Square Quadrat - + Pentagon Pentàgon - + Hexagon Hexàgon - + Heptagon Heptàgon - + Octagon Octàgon - + Regular polygon Polígon regular @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity Modifica la multiplicitat del nus - + Modifies the multiplicity of the selected knot of a B-spline Modifica la multiplicitat del nus seleccionat d'un B-spline - + Increase knot multiplicity Augmenta la multiplicitat del nus - + Decrease knot multiplicity Redueix la multiplicitat del nus @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restricció d'angle - + Fix the angle of a line or the angle between two lines Fixa l'angle d'una línia o l'angle entre dues línies @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restricció coincident - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringeix el diàmetre - + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restricció de distància - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Fixa la distància horitzontal entre dos punts o extrems de línia @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Fixa la distància vertical entre dos punts o extrems de línia @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restricció d'igualtat - + Create an equality constraint between two lines or between circles and arcs Crea una restricció d'igualtat entre dues línies o entre cercles i arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restricció horitzontal - + Create a horizontal constraint on the selected item Crea una restricció horitzontal en l'element seleccionat @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restricció de bloqueig - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restricció de parel·lelisme - + Create a parallel constraint between two lines Crea una restricció de paral·lelisme entre dues línies @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restricció de perpendicularitat - + Create a perpendicular constraint between two lines Crea una restricció de perpendicularitat entre dues línies @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restricció d'un punt sobre l'objecte - + Fix a point onto an object Fixa un punt sobre un objecte @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight Constrain radius or weight - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restricció de simetria - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -615,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Restricció tangent - + Create a tangent constraint between two entities Crea una restricció tangent entre dues entitats @@ -628,12 +628,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Restricció veertical - + Create a vertical constraint on the selected item Crea una restricció vertical en l'element seleccionat @@ -641,12 +641,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline Convert geometry to B-spline - + Converts the selected geometry to a B-spline Converts the selected geometry to a B-spline @@ -667,12 +667,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points Crea un arc donats tres punts - + Create an arc by its end points and a point along the arc Crea un arc donats els extrems i un punt al llarg de l'arc @@ -680,12 +680,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points Crea un cercle donats tres punts - + Create a circle by 3 perimeter points Crea un cercle donats tres punts del perímetre @@ -693,12 +693,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center Crea un arc donat el centre - + Create an arc by its center and by its end points Crea un arc donats el centre i els extrems @@ -706,12 +706,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch Crea un arc d'el·lipse en l'esbós @@ -719,12 +719,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch Crea un arc d'hipèrbola en l'esbós @@ -732,12 +732,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch Crea un arc de paràbola en l'esbós @@ -745,12 +745,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline Crea un B-spline - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -758,12 +758,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle Crea un cercle - + Create a circle in the sketch Crea un cercle en el dibuix @@ -771,12 +771,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points Crear l'el·lipse per 3 punts - + Create an ellipse by 3 points in the sketch Crea una el·lipse per 3 punts en el dibuix @@ -784,12 +784,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center Crea el·lipse donat el centre - + Create an ellipse by center in the sketch Crea una el·lipse donat el centre en el dibuix @@ -797,12 +797,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet Crea un arredoniment - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -810,12 +810,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon Crea un heptàgon - + Create a heptagon in the sketch Crea un heptàgon en el dibuix @@ -823,12 +823,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon Crea un hexàgon - + Create a hexagon in the sketch Crea un hexàgon en el dibuix @@ -862,12 +862,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon Crea un octàgon - + Create an octagon in the sketch Crea un octàgon en el dibuix @@ -875,12 +875,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon Crea un pentàgon - + Create a pentagon in the sketch Crea un pentàgon en el dibuix @@ -888,12 +888,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline Crea un B-spline periòdic - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -901,12 +901,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point Crea un punt - + Create a point in the sketch Crea un punt en el dibuix @@ -914,12 +914,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet Create corner-preserving fillet - + Fillet that preserves intersection point and most constraints Fillet that preserves intersection point and most constraints @@ -927,12 +927,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline Crea una polilínia - + Create a polyline in the sketch. 'M' Key cycles behaviour Crea una polilínia en l'esbós. La tecla 'M' commuta el comportament. @@ -966,12 +966,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon Crea un polígon regular - + Create a regular polygon in the sketch Crea un polígon regular en l'esbós @@ -979,12 +979,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot Crea una ranura - + Create a slot in the sketch Crea una ranura en el dibuix @@ -992,12 +992,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square Crea un quadrat - + Create a square in the sketch Crea un quadrat en el dibuix @@ -1005,12 +1005,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle Crea un triangle equilàter - + Create an equilateral triangle in the sketch Crea un triangle equilàter en el dibuix @@ -1018,12 +1018,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree Decrease B-spline degree - + Decreases the degree of the B-spline Decreases the degree of the B-spline @@ -1031,12 +1031,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity Redueix la multiplicitat del nus - + Decreases the multiplicity of the selected knot of a B-spline Redueix la multiplicitat del nus seleccionat d'un B-spline @@ -1083,12 +1083,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge Estén una aresta - + Extend an edge with respect to the picked position Estén una aresta respecte a la posició seleccionada @@ -1096,12 +1096,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry Crea una aresta vinculada a una geometria externa @@ -1109,12 +1109,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree Increase B-spline degree - + Increases the degree of the B-spline Augmenta el grau del B-spline @@ -1122,12 +1122,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity Augmenta la multiplicitat del nus - + Increases the multiplicity of the selected knot of a B-spline Augmenta la multiplicitat del nus seleccionat d'un B-spline @@ -1135,12 +1135,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot Insert knot - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. @@ -1148,12 +1148,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1440,12 +1440,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge Split edge - + Splits an edge into two while preserving constraints Splits an edge into two while preserving constraints @@ -1466,12 +1466,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space Canvia l'espai virtual - + Switches the selected constraints or the view to the other virtual space Canvia les restriccions seleccionades o la vista d'altre espai virtual @@ -1492,12 +1492,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Activates or deactivates the selected constraints @@ -1518,12 +1518,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1533,12 +1533,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge Retalla l'aresta - + Trim an edge with respect to the picked position Retalla una aresta respecte a la posició seleccionada @@ -1597,369 +1597,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint Add length constraint - - + + Dimension Dimensió - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2019,44 +2020,44 @@ invalid constraints, degenerated geometry, etc. Add centered sketch box - + Add rounded rectangle Add rounded rectangle - + Add line to sketch wire Add line to sketch wire - + Add arc to sketch wire Add arc to sketch wire - - + + Add sketch arc Add sketch arc - - + + Add sketch circle Add sketch circle - + Add sketch ellipse Add sketch ellipse - + Add sketch arc of ellipse Add sketch arc of ellipse - + Add sketch arc of hyperbola Add sketch arc of hyperbola @@ -2076,33 +2077,33 @@ invalid constraints, degenerated geometry, etc. Add sketch point - - + + Create fillet Crea un arredoniment - + Trim edge Retalla l'aresta - + Extend edge Estén una aresta - + Split edge Split edge - + Add external geometry Add external geometry - + Add slot Add slot @@ -2112,37 +2113,37 @@ invalid constraints, degenerated geometry, etc. Add hexagon - + Convert to NURBS Convert to NURBS - + Increase spline degree Increase spline degree - + Decrease spline degree Decrease spline degree - + Increase knot multiplicity Augmenta la multiplicitat del nus - + Decrease knot multiplicity Redueix la multiplicitat del nus - + Insert knot Insert knot - + Join Curves Join Curves @@ -2182,12 +2183,12 @@ invalid constraints, degenerated geometry, etc. Remove Axes Alignment - + Toggle constraints to the other virtual space Toggle constraints to the other virtual space - + @@ -2195,7 +2196,7 @@ invalid constraints, degenerated geometry, etc. Update constraint's virtual space - + Add auto constraints Add auto constraints @@ -2235,7 +2236,7 @@ invalid constraints, degenerated geometry, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2251,37 +2252,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. Error de restricció automàtica: esbós irresoluble si s'apliquen restriccions coincidents. - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. Error de restricció automàtica: esbós irresoluble si s'apliquen restriccions verticals/horitzontals. - + Autoconstrain error: Unsolvable sketch while applying equality constraints. Error de restricció automàtica: esbós irresoluble si s'apliquen restriccions d'igualtat. - + Autoconstrain error: Unsolvable sketch without constraints. Error de restricció: esbós irresoluble sense restriccions. - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. Error de restricció: esbós irresoluble després d'aplicar restriccions verticals i horitzontals. - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. Error de restricció: esbós irresoluble si s'apliquen restriccions de punt a punt. - + Autoconstrain error: Unsolvable sketch after applying equality constraints. Error de restricció: esbós irresoluble si s'apliquen restriccions d'igualtat. @@ -2406,143 +2407,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2558,9 +2559,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection Selecció incorrecta @@ -2581,329 +2582,329 @@ invalid constraints, degenerated geometry, etc. Restricció de dimensió - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Seleccioneu una aresta de l'esbós - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricció impossible - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Restricció doble - - - - - + + + + + The selected edge already has a horizontal constraint! L'aresta seleccionada ja té una restricció horitzontal. - - - + + + The selected edge already has a vertical constraint! L'aresta seleccionada ja té una restricció vertical. - - - - - - + + + + + + The selected edge already has a Block constraint! L'aresta seleccionada ja té una restricció de Bloc. - + The selected item(s) can't accept a horizontal constraint! Els elements seleccionats no poden acceptar una restricció horitzontal. - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hi ha més d'un punt fixe seleccionat! Seleccioneu-ne com a màxim un de fixe. - + The selected item(s) can't accept a vertical constraint! Els elements seleccionats no poden acceptar una restricció vertical. - - - + + + Select vertices from the sketch. Seleccioneu vèrtexs de l'esbós - + Select one vertex from the sketch other than the origin. Seleccioneu un vèrtex de l'esbós diferent de l'origen - + Select only vertices from the sketch. The last selected vertex may be the origin. Seleccioneu només vèrtexs de l'esbós. L'últim vèrtex seleccionat pot ser l'origen. - + Wrong solver status Estat de sistema de resolució incorrecte - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Seleccioneu una aresta de l'esbós. - + Select only edges from the sketch. Seleccioneu sols arestes de l'esbós. - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error Error - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. En el seu lloc s'ha aplicat una tangència entre extrems. - + Select two or more points from the sketch. Seleccioneu una o més punts de l'esbós - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Seleccioneu únicament una línia o un punt i una línia o dos punts de l'esbós - + Cannot add a length constraint on an axis! No es pot afegir una restricció de longitud sobre un eix. - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccioneu els elements correctes de l'esbós - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Cap dels punts seleccionats s'han restringit a les corbes respectives, perquè són peces del mateix element o perquè ambdues són de geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccioneu únicament una línia o fins a dos punts de l'esbós - + Cannot add a horizontal length constraint on an axis! No es pot afegir una restricció de longitud horitzontal sobre un eix. - + Cannot add a fixed x-coordinate constraint on the origin point! No es pot afegir una restricció de coordenada x fixa sobre el punt d'origen. - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! No es pot afegir una restricció de longitud vertical sobre un eix. - + Cannot add a fixed y-coordinate constraint on the origin point! No es pot afegir una restricció de coordenada y fixa sobre el punt d'origen. - + Select two or more lines from the sketch. Seleccioneu una o més línies de l'esbós - - + + Select at least two lines from the sketch. Seleccioneu almenys dues línies de l'esbós - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2912,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. perpendicular constraint Seleccioneu alguna geometria de l'esbós - - + + Cannot add a perpendicularity constraint at an unconnected point! No es pot afegir una restricció de perpendicularitat en un punt no connectat. - - - + + + Perpendicular to B-spline edge currently unsupported. Una perpendicular a la vora del B-spline no s'admet actualment. - - + + One of the selected edges should be a line. Una de les arestes seleccionades ha de ser una línia. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. S'ha aplicat una tangència entre extrems. S'han suprimit les restriccions coincidents. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2954,277 +2955,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. tangent constraint Seleccioneu alguna geometria de l'esbós - - - + + + Cannot add a tangency constraint at an unconnected point! No es pot afegir una restricció de tangència en un punt no connectat. - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! El nombre d'objectes seleccionats és incorrecte. - - + + With 3 objects, there must be 2 curves and 1 point. Amb 3 objectes, hi ha d'haver 2 corbes i 1 punt. - - - + + + Tangency to B-spline edge currently unsupported. La tangència a la vora del B-spline no s'admet actualment. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccioneu un o diversos arcs o cercles de l'esbós - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. La restricció només s'aplica a arcs i cercles. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccioneu una o dues línies de l'esbós. O seleccioneu dues arestes i un punt - - + + Parallel lines Línies paral·leles - - + + An angle constraint cannot be set for two parallel lines. Una restricció d'angle no es pot definir per dues línies paral·leles. - + Cannot add an angle constraint on an axis! No es pot afegir una restricció d'angle sobre un eix. - + Select two edges from the sketch. Seleccioneu dues arestes de l'esbós - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. La igualtat per a la vora del B-spline no s'admet actualment. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccioneu de l'esbós dos punts i una línia de simetria, dos punts i un punt de simetria o una línia i un punt de simetria - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! No es pot afegir una restricció de simetria entre una línia i els seus extrems. - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Els objectes seleccionats no són només geometria d'un esbós. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. Seleccioneu restriccions de l'esbós - + B-Spline Degree B-Spline Degree - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error Error del nucli del CAD - + None of the selected elements is an edge. No és una vora cap dels elements seleccionats. - - + + At least one of the selected objects was not a B-Spline and was ignored. Com a mínim, un els objectes seleccionats no és una B-Spline i s'ha ignorat. - - + + The selection comprises more than one item. Please select just one knot. La selecció inclou més d'un element. Seleccioneu només un nus. - - + + Input Error Error d'entrada - - + + None of the selected elements is a knot of a B-spline Cap dels elements seleccionats no és un nus d'un B-spline - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3304,17 +3305,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3628,12 +3629,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Length: - + Refractive index ratio Índex de refracció - + Ratio n2/n1: Relació n2/n1: @@ -3913,8 +3914,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed Sense nom @@ -4143,13 +4144,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4170,32 +4171,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both Ambdós - + Auto Auto - + Diameter Diàmetre - + Radius Radi @@ -4643,12 +4644,12 @@ Then objects are only visible behind the sketch plane. Aplica als esbossos existents - + Unexpected C++ exception S'ha produït una excepció inesperada de C++ - + Sketcher Sketcher @@ -4656,55 +4657,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences No hi ha cap coincidència perduda. - + No missing coincidences found No s'ha trobat cap coincidència perduda. - + Missing coincidences Coincidències perdudes - + %1 missing coincidences found S'han trobat %1 coincidències perdudes - + No invalid constraints No hi ha cap restricció no vàlida. - + No invalid constraints found No s'ha trobat cap restricció no vàlida. - + Invalid constraints Restriccions no vàlides - + Invalid constraints found S'han trobat restriccions no vàlides. - - - + + + Reversed external geometry Geometria externa inversa - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4713,82 +4714,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only S'han trobat %1 arcs de geometria externa inversa. Els seus extrems estan encerclats en la vista 3D. %2 restriccions s'apliquen als extrems. Les restriccions s'han llistat en la vista d'informe (menú Vista -> Panells -> Vista d'informe). Feu clic a «Intercanvia els extrems en les restriccions» per a reassignar els extrems. Feu això només una vegada en esbossos creats en una versió del FreeCAD anterior a la v0.15 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. S'han trobat %1 arcs de geometria externa inversa. Els seus extrems estan encerclats en la vista 3D. Tanmateix, no s'ha trobat cap restricció vinculada als extrems. - + No reversed external-geometry arcs were found. No s'ha trobat cap arc de geometria externa inversa. - + %1 changes were made to constraints linking to endpoints of reversed arcs. S'han realitzat %1 canvis en les restriccions vinculades als extrems dels arcs inversos. - - + + Constraint orientation locking Restricció de bloqueig d'orientació - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). El bloqueig d'orientació s'ha activat i recalculat per a %1 restriccions. Les restriccions s'han llistat en la vista d'informe (menú Vista -> Panells -> Vista d'informe). - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. El bloqueig d'orientació s'ha desactivat per a %1 restriccions. Les restriccions s'han llistat en la vista d'informe (menú Vista -> Panells -> Vista d'informe). Tingueu en compte que per a restriccions futures, el bloqueig per defecte sempre és Activat. - - + + Delete constraints to external geom. Suprimeix les restriccions vinculades a la geometria externa - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? Ara suprimireu TOTES les restriccions vinculades a la geometria externa. Això és útil per a reparar un esbós amb enllaços a la geometria externa trencats o canviats. Esteu segur que voleu suprimir les restriccions? - + All constraints that deal with external geometry were deleted. Totes les restriccions vinculades a una geometria externa s'han suprimit. - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - Forma - Check to toggle filters @@ -4863,11 +4859,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - Forma - Check to toggle filters @@ -5053,7 +5044,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control Control avançat del solucionador @@ -5344,8 +5335,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines Canvia entre mostrar i amagar l'ansa de curvatura per a tots els B-splines @@ -5353,8 +5344,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline Redueix la multiplicitat del nus seleccionat d'un B-spline @@ -5362,8 +5353,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines Canvia entre mostrar i amagar el grau per a tots els B-splines @@ -5371,8 +5362,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline Augmenta la multiplicitat del nus seleccionat d'un B-spline @@ -5380,8 +5371,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines Canvia entre mostrar i amagar la multiplicitat del nus per a tots els B-splines @@ -5389,8 +5380,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines Switches between showing and hiding the control point weight for all B-splines @@ -5398,8 +5389,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines Canvia entre mostrar i amagar els polígons de control per a tots els B-splines @@ -5434,8 +5425,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -5443,7 +5434,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5451,8 +5442,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixa el radi d'un cercle o arc @@ -5460,7 +5451,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5477,8 +5468,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc Crea un arc donats els extrems i un punt al llarg de l'arc @@ -5486,8 +5477,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points Crea un cercle donats tres punts de la vora @@ -5495,8 +5486,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points Crea un arc donats el centre i els extrems @@ -5504,8 +5495,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Create an arc of ellipse by its center, major radius, and endpoints @@ -5513,8 +5504,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Create an arc of hyperbola by its center, major radius, and endpoints @@ -5522,8 +5513,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Create an arc of parabola by its focus, vertex, and endpoints @@ -5531,13 +5522,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points B-spline per punts de control - - + + Create a B-spline by control points Crea un B-spline donats els punts de control @@ -5545,8 +5536,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point Crea un cercle donats el centre i un punt de la vora @@ -5554,8 +5545,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius Crea una el·lipse donats el periàpside, l'apoàpside i el radi menor @@ -5563,8 +5554,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point Crea una el·lipse donats el centre, el radi major i un punt @@ -5572,8 +5563,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines Creates a radius between two lines @@ -5581,8 +5572,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner Crea un heptàgon donats el centre i un vèrtex @@ -5590,8 +5581,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner Crea un hexàgon donats el centre i un vèrtex @@ -5599,7 +5590,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle Create a rounded rectangle @@ -5607,14 +5598,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner Crea un octàgon donats el centre i un vèrtex - - + + Create a regular polygon by its center and by one corner Crea un polígon regular donats el centre i un vèrtex @@ -5622,8 +5613,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner Crea un pentàgon donats el centre i un vèrtex @@ -5631,8 +5622,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point Fillet that preserves constraints and intersection point @@ -5640,7 +5631,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle Create a rectangle @@ -5648,7 +5639,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Create a centered rectangle @@ -5656,8 +5647,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner Crea un quadrat donats el centre i un vèrtex @@ -5665,8 +5656,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner Crea un triangle equilàter donats el centre i un vèrtex @@ -5674,13 +5665,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points B-spline periòdic per punts de control - - + + Create a periodic B-spline by control points Crea un B-spline periòdic donats els punts de control @@ -6311,36 +6302,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error Error @@ -6360,45 +6351,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6408,18 +6399,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6429,49 +6420,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6481,7 +6472,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6491,27 +6482,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6521,13 +6512,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6535,13 +6526,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6647,12 +6638,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6660,12 +6651,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6673,12 +6664,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensió - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6690,14 +6681,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + Dimensió + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts index 44a43da8f6..b68b72b87e 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy Create carbon copy - + Copy the geometry of another sketch Copy the geometry of another sketch @@ -100,27 +100,27 @@ 显示/隐藏B样条信息层 - + Show/hide B-spline degree 显示/隐藏B样条角度数 - + Show/hide B-spline control polygon 显示/隐藏B样条曲线控制多边形 - + Show/hide B-spline curvature comb 显示/隐藏B样条曲率梳形图 - + Show/hide B-spline knot multiplicity 显示/隐藏 B-样条节点多重性 - + Show/hide B-spline control point weight 显示/隐藏B样条曲线控制多边形 @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 约束圆弧或圆 - + Constrain an arc or a circle 约束圆弧或圆 - + Constrain radius 半径约束 - + Constrain diameter 约束直径 - + Constrain auto radius/diameter 约束自动半径/直径 @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc 创建弧 - + Create an arc in the sketcher 在草图中创建圆弧 - + Center and end points 中心点和端点 - + End points and rim point 端点和边缘点 @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline 创建B样条曲线 - + Create a B-spline in the sketch 在草图中创建 B-样条 @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle 创建圆 - + Create a circle in the sketcher 在草图中创建圆 - + Center and rim point 圆心和边缘点 - + 3 rim points 3个边缘点 @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic Create conic - + Create a conic in the sketch 在草图中创建圆锥形 - + Ellipse by center, major radius, point 通过中心,主要半径,点确定椭圆形状 - + Ellipse by periapsis, apoapsis, minor radius 通过近拱点,远拱点和短半径创建椭圆 - + Arc of ellipse by center, major radius, endpoints 通过中心点,大半径和端点创建椭圆弧 - + Arc of hyperbola by center, major radius, endpoints 通过中心点,大半径和端点创建椭圆弧 - + Arc of parabola by focus, vertex, endpoints 焦点,顶点,终结点定义的抛物线弧 @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet 创建圆角 - + Create a fillet between two lines 在两条线间创建圆角。 - + Sketch fillet 草图圆角 - + Constraint-preserving sketch fillet 保留约束的草图圆角 @@ -299,17 +299,17 @@ 在草图中创建矩形 - + Rectangle 矩形 - + Centered rectangle 中心矩形 - + Rounded rectangle 圆角矩形 @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon 创建正多边形 - + Create a regular polygon in the sketcher 在草图设计中创建正多边形 - + Triangle 三角形 - + Square 正方形 - + Pentagon 五边形 - + Hexagon 六边形 - + Heptagon 七边形 - + Octagon 八边形 - + Regular polygon 正多边形 @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity 修改重复性节点 - + Modifies the multiplicity of the selected knot of a B-spline 修改B样条曲线选定的重复性节点 - + Increase knot multiplicity 提高结多重性 - + Decrease knot multiplicity 减少结多重性 @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 角度约束 - + Fix the angle of a line or the angle between two lines 固定一直线角度或两直线夹角 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block 约束块 - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 重合约束 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses 在点之间创建重合约束,或在圆、弧和椭圆之间的同心约束 @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 约束直径 - + Fix the diameter of a circle or an arc 固定圆或圆弧的直径 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 距离约束 - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 水平距离约束 - + Fix the horizontal distance between two points or line ends 固定两点(或线端点)之间的水平距离 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 限制垂直距离 - + Fix the vertical distance between two points or line ends 固定两点(或线端点)之间的垂直距离 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 相等约束 - + Create an equality constraint between two lines or between circles and arcs 两直线或圆与圆弧间创建相等约束 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 水平约束 - + Create a horizontal constraint on the selected item 在所选对象上创建水平约束 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock 锁定约束 - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 平行约束 - + Create a parallel constraint between two lines 两条线之间创建平行约束 @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 垂直约束 - + Create a perpendicular constraint between two lines 为两条直线创建垂直约束 @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object 点约束至对象 - + Fix a point onto an object 固定点至对象 @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 约束自动半径/直径 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 如果选中了圆,则固定直径,如果选中了圆弧/样条 极点,则固定半径 @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight 约束半径和权重 - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline 修复圆或弧的半径或修复B样条曲线的极限。 @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 对称约束 - + Create a symmetry constraint between two points with respect to a line or a third point 对两点作关于一条直线或第三点的对称约束 @@ -614,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 相切约束 - + Create a tangent constraint between two entities 在两实体间创建相切约束 @@ -627,12 +627,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 垂直约束 - + Create a vertical constraint on the selected item 在所选对象上创建垂直约束 @@ -640,12 +640,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline 将几何体转换为B样条曲线 - + Converts the selected geometry to a B-spline 将选中的几何形状转换为B样条曲线 @@ -666,12 +666,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points 通过三点创建圆弧 - + Create an arc by its end points and a point along the arc 通过端点和圆弧上的一点创建一个圆弧 @@ -679,12 +679,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points 通过三点创建圆 - + Create a circle by 3 perimeter points 通过三个边界点创建圆 @@ -692,12 +692,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center 通过圆心创建圆弧 - + Create an arc by its center and by its end points 通过圆心和端点创建一个圆弧 @@ -705,12 +705,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse Create arc of ellipse - + Create an arc of ellipse in the sketch 在草图中创建椭圆弧 @@ -718,12 +718,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola Create arc of hyperbola - + Create an arc of hyperbola in the sketch 在草图中创建椭圆弧 @@ -731,12 +731,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola Create arc of parabola - + Create an arc of parabola in the sketch 在草图中创建椭圆弧 @@ -744,12 +744,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline 创建B样条曲线 - + Create a B-spline by control points in the sketch. Create a B-spline by control points in the sketch. @@ -757,12 +757,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle 创建圆 - + Create a circle in the sketch 在草图中创建一个圆 @@ -770,12 +770,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points 通过三点创建椭圆 - + Create an ellipse by 3 points in the sketch 通过三点在草图中创建椭圆 @@ -783,12 +783,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center 通过中心创建椭圆 - + Create an ellipse by center in the sketch 通过中心在草图中创建椭圆 @@ -796,12 +796,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet 创建圆角 - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon 创建正七边形 - + Create a heptagon in the sketch 在草图中创建正七边形 @@ -822,12 +822,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon 创建正六边形 - + Create a hexagon in the sketch 在草图中创建正六边型 @@ -861,12 +861,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon 创建正八边形 - + Create an octagon in the sketch 在草绘中创建正八边形 @@ -874,12 +874,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon 创建正五边形 - + Create a pentagon in the sketch 在草绘中创建正五边形 @@ -887,12 +887,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline 创建周期B样条曲线 - + Create a periodic B-spline by control points in the sketch. Create a periodic B-spline by control points in the sketch. @@ -900,12 +900,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point 创建点 - + Create a point in the sketch 在草图中创建一个点 @@ -913,12 +913,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet 创建保留角点的圆角 - + Fillet that preserves intersection point and most constraints 保留交点和大多数约束的圆角 @@ -926,12 +926,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline 创建折线 - + Create a polyline in the sketch. 'M' Key cycles behaviour 在草绘中创建一条折线。“M”键循环切换行为 @@ -965,12 +965,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon 创建正多边形 - + Create a regular polygon in the sketch 在草绘中创建正多边形 @@ -978,12 +978,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot 创建圆槽 - + Create a slot in the sketch 在草图中创建长圆槽 @@ -991,12 +991,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square 创建正方形 - + Create a square in the sketch 在草图中绘制一个正方形 @@ -1004,12 +1004,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle 创建等边三角形 - + Create an equilateral triangle in the sketch 在草图中创建一个等边三角形 @@ -1017,12 +1017,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree 减少B样条曲线次数 - + Decreases the degree of the B-spline 降低B-样条的次数 @@ -1030,12 +1030,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity 减少结多重性 - + Decreases the multiplicity of the selected knot of a B-spline 减少贝B样条曲线选定节点的多重性 @@ -1082,12 +1082,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge 延长边 - + Extend an edge with respect to the picked position 延长与选择位置对应的边 @@ -1095,12 +1095,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry Create external geometry - + Create an edge linked to an external geometry 创建一条与外部参考几何体关联的边 @@ -1108,12 +1108,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree 增加B样条曲线次数 - + Increases the degree of the B-spline 增加B样条的度数 @@ -1121,12 +1121,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity 提高结多重性 - + Increases the multiplicity of the selected knot of a B-spline 增加 B 样条所选节点的多重性 @@ -1134,12 +1134,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot 插入节点 - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. 在指定参数处插入节点。 如果指定参数处已存在节点,则将该节点的多重性增加一。 @@ -1147,12 +1147,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves Join curves - + Join two curves at selected end points Join two curves at selected end points @@ -1437,12 +1437,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge 分割边 - + Splits an edge into two while preserving constraints 将一条边分成两段并保留约束 @@ -1463,12 +1463,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space 切换虚拟空间 - + Switches the selected constraints or the view to the other virtual space 将所选约束或视图切换到其他虚拟空间 @@ -1489,12 +1489,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 激活/停用约束 - + Activates or deactivates the selected constraints 激活或停用选定的约束 @@ -1515,12 +1515,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 切换驱动/参考约束 - + Set the toolbar, or the selected constraints, into driving or reference mode 设置工具栏或选定的约束, @@ -1530,12 +1530,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge 修剪边缘 - + Trim an edge with respect to the picked position 根据点取位置修剪边 @@ -1593,369 +1593,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 添加水平约束 - - - + + + Add horizontal alignment 添加水平对齐 - - + + Add vertical constraint 添加垂直约束 - + Add vertical alignment 添加垂直对齐 - + Add 'Lock' constraint 添加“锁定”约束 - + Add relative 'Lock' constraint 添加相对的“锁定”约束 - + Add fixed constraint 添加固定约束 - + Add 'Block' constraint 添加“块”约束 - + Add block constraint 添加块约束 - - - + + + Add coincident constraint 添加并发约束 - - + + Add distance from horizontal axis constraint 从水平轴约束添加距离 - - + + Add distance from vertical axis constraint 从垂直轴约束添加距离 - - + + Add point to point distance constraint 添加点到点距离约束 - - - + + + Add point to line Distance constraint 添加点到线距离约束 - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint 添加长度约束 - - + + Dimension 尺寸标注 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 添加对象上点约束 - - + + Add point to point horizontal distance constraint 添加点到点水平距离约束 - + Add fixed x-coordinate constraint 添加固定x坐标约束 - - + + Add point to point vertical distance constraint 添加点到点垂直距离约束 - + Add fixed y-coordinate constraint 添加固定Y坐标约束 - - + + Add parallel constraint 添加平行约束 - - - - - - - + + + + + + + Add perpendicular constraint 添加垂直约束 - + Add perpendicularity constraint 添加垂直约束 - + Swap coincident+tangency with ptp tangency 切换边相切与ptp相切 - + Swap PointOnObject+tangency with point to curve tangency 将点与对象相切与点到曲线相切交换 - - - - - - - + + + + + + + Add tangent constraint 添加切线约束 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 添加正切约束点 - - - - + + + + Add radius constraint 添加半径约束 - - - - + + + + Add diameter constraint 添加直径约束 - - - - + + + + Add radiam constraint 添加半径约束 - - - - - - + + + + + + Add angle constraint 添加角度约束 - - + + Add equality constraint 添加相等约束 - - - - - + + + + + Add symmetric constraint 添加对称约束 - + Add Snell's law constraint 添加斯内尔定律约束 - + Toggle constraint to driving/reference 将约束切换到作用/参考 - + Activate/Deactivate constraint 激活/停用约束 @@ -2015,44 +2016,44 @@ invalid constraints, degenerated geometry, etc. 添加居中草绘盒 - + Add rounded rectangle 圆角矩形 - + Add line to sketch wire Add line to sketch wire - + Add arc to sketch wire Add arc to sketch wire - - + + Add sketch arc 添加草绘圆弧 - - + + Add sketch circle 添加草绘圆 - + Add sketch ellipse 添加草绘椭圆 - + Add sketch arc of ellipse Add sketch arc of ellipse - + Add sketch arc of hyperbola Add sketch arc of hyperbola @@ -2072,33 +2073,33 @@ invalid constraints, degenerated geometry, etc. Add sketch point - - + + Create fillet 创建圆角 - + Trim edge 修剪边缘 - + Extend edge 延长边 - + Split edge 分割边 - + Add external geometry Add external geometry - + Add slot 创建跑道圆 @@ -2108,37 +2109,37 @@ invalid constraints, degenerated geometry, etc. Add hexagon - + Convert to NURBS 转换为 NURBS - + Increase spline degree 增加样条次数 - + Decrease spline degree 减少样条次数 - + Increase knot multiplicity 提高结多重性 - + Decrease knot multiplicity 减少结多重性 - + Insert knot 插入节点 - + Join Curves Join Curves @@ -2178,12 +2179,12 @@ invalid constraints, degenerated geometry, etc. Remove Axes Alignment - + Toggle constraints to the other virtual space Toggle constraints to the other virtual space - + @@ -2191,7 +2192,7 @@ invalid constraints, degenerated geometry, etc. Update constraint's virtual space - + Add auto constraints Add auto constraints @@ -2231,7 +2232,7 @@ invalid constraints, degenerated geometry, etc. Add Knot Point - + Create a carbon copy Create a carbon copy @@ -2247,37 +2248,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. 自动约束错误: 应用重合约束时草图无法求解。 - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. 自动约束错误: 应用垂直/水平约束时草图无法求解。 - + Autoconstrain error: Unsolvable sketch while applying equality constraints. 自动约束错误: 应用相等约束时草图无法求解。 - + Autoconstrain error: Unsolvable sketch without constraints. 自动约束错误: 无约束的不可解草图。 - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. 自动约束错误: 应用垂直和水平约束后草图无法求解。 - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. 自动约束错误: 应用点到点约束后草图无法求解。 - + Autoconstrain error: Unsolvable sketch after applying equality constraints. 自动约束错误: 应用相等约束后草图无法求解。 @@ -2402,143 +2403,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2554,9 +2555,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection 选择错误 @@ -2577,329 +2578,329 @@ invalid constraints, degenerated geometry, etc. 尺寸约束 - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. 从草图中选择边. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 不可约束 - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint 双重约束 - - - - - + + + + + The selected edge already has a horizontal constraint! 所选边已有水平约束! - - - + + + The selected edge already has a vertical constraint! 所选边已有垂直约束! - - - - - - + + + + + + The selected edge already has a Block constraint! 所选边已有块约束! - + The selected item(s) can't accept a horizontal constraint! 所选项目无法应用水平约束! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! 选取了多个固定点。最多只能选择一个固定点! - + The selected item(s) can't accept a vertical constraint! 所选项目无法应用垂直约束! - - - + + + Select vertices from the sketch. 从草绘选择顶点。 - + Select one vertex from the sketch other than the origin. 从草图中选取一个非原点的顶点。 - + Select only vertices from the sketch. The last selected vertex may be the origin. 从草图中仅选取顶点。最后选定的顶点可能是原点。 - + Wrong solver status 错误的求解状态 - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. 从草绘中选取一个边。 - + Select only edges from the sketch. 仅从草绘中选择边。 - + Number of selected objects is not 3 Number of selected objects is not 3 - - - + + + Error 错误 - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. 已应用端点到端点相切作为替代方案。 - + Select two or more points from the sketch. 从草绘选择两个或更多点。 - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. 从草图仅选取一直线, 或一点和一直线, 或两点. - + Cannot add a length constraint on an axis! 无法在坐标轴上添加长度约束! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. 从草绘选择正确的对象。 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 所选的点没有一个被约束到各自的曲线上,因为它们是在同一元素上的一部分,或是它们都是外部几何形状。 - - - - + + + + Select exactly one line or up to two points from the sketch. 从草图选择一根线或两个点. - + Cannot add a horizontal length constraint on an axis! 无法在坐标轴上添加水平长度约束! - + Cannot add a fixed x-coordinate constraint on the origin point! 无法于原点加入固定x座标的约束! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! 无法在坐标轴上添加垂直长度约束! - + Cannot add a fixed y-coordinate constraint on the origin point! 无法于原点加入固定y座标的约束! - + Select two or more lines from the sketch. 从草图选择两条或两条以上直线. - - + + Select at least two lines from the sketch. 至少从草图选择两直线. - + Select a valid line. 选择一条有效的直线 - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2909,42 +2910,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 接受的组合: 两条曲线; 一个端点和一个曲线; 两个端点; 两条曲线和一个点。 - + Select some geometry from the sketch. perpendicular constraint 从草图中选取一些几何属性 - - + + Cannot add a perpendicularity constraint at an unconnected point! 不能对没有连接点的两条线段添加"垂直"约束 - - - + + + Perpendicular to B-spline edge currently unsupported. 目前不支持垂直于的贝塞尔曲线边缘。 - - + + One of the selected edges should be a line. 所选边之一须为直线. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. 已应用端点到端点相切。已删除重合约束。 - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2954,277 +2955,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 接受的组合: 两条曲线; 一个端点和一个曲线; 两个端点; 两条曲线和一个点。 - + Select some geometry from the sketch. tangent constraint 从草图中选取一些几何属性 - - - + + + Cannot add a tangency constraint at an unconnected point! 不能对没有连接点的两条线段添加"相切"约束 - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! 选取对象的数量有误! - - + + With 3 objects, there must be 2 curves and 1 point. 3个对象时至少需有2条曲线及1个点。 - - - + + + Tangency to B-spline edge currently unsupported. 目前不支持与贝塞尔曲线边缘相切。 - - - - - - + + + + + + Select one or more arcs or circles from the sketch. 从草图中选择一个或多个弧或圆。 - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. 约束只适用于圆弧或圆。 - - + + Select one or two lines from the sketch. Or select two edges and a point. 从草图中选择一或两条直线。或选择两条边和一个点。 - - + + Parallel lines 平行线 - - + + An angle constraint cannot be set for two parallel lines. 不能为两条平行线设置角度约束。 - + Cannot add an angle constraint on an axis! 无法在坐标轴上添加角度约束! - + Select two edges from the sketch. 从草图选择两条边. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. 草图轴无法用于相等约束. - + Equality for B-spline edge currently unsupported. 目前不支持贝塞尔曲线条边缘的等值约束。 - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 请从草图中选取2个点及对称线, 2个点及对称点或1条线及1对称点。 - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 无法在直线及其端点间添加对称约束! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. 选取的物件并非来自于草图的几何形状。 - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. - - - + + + Select constraint(s) from the sketch. 从草图中选择约束。 - + B-Spline Degree B样条次数 - + Define B-Spline Degree, between 1 and %1: Define B-Spline Degree, between 1 and %1: - - - + + + CAD Kernel Error CAD 内核错误 - + None of the selected elements is an edge. 被选中的元素没有一个是边缘。 - - + + At least one of the selected objects was not a B-Spline and was ignored. 至少有一个所选对象不是 B 样条曲线, 被忽略。 - - + + The selection comprises more than one item. Please select just one knot. 所选内容包括多个项目。请只选择一个节点。 - - + + Input Error 输入错误 - - + + None of the selected elements is a knot of a B-spline 所选元素都不是B样条的节点 - - + + Selection is empty Selection is empty - + Nothing is selected. Please select a b-spline. Nothing is selected. Please select a b-spline. - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point Too many curves on point - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point Too few curves on point - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3304,17 +3305,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity Set knot multiplicity - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error Value Error @@ -3628,12 +3629,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 长度: - + Refractive index ratio 折射率比 - + Ratio n2/n1: 比例 n2/n1: @@ -3913,8 +3914,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed 未命名 @@ -4145,13 +4146,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4172,32 +4173,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both 两者都是 - + Auto 自动 - + Diameter 直径 - + Radius 半径 @@ -4646,12 +4647,12 @@ Then objects are only visible behind the sketch plane. 套用于现有草图 - + Unexpected C++ exception 未知C++异常 - + Sketcher 草图设计 @@ -4659,55 +4660,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences 无未一致处 - + No missing coincidences found 未发现未一致处 - + Missing coincidences 未一致 - + %1 missing coincidences found 发现未一致处%1 - + No invalid constraints 没有无效约束 - + No invalid constraints found 没有发现无效约束 - + Invalid constraints 无效的约束 - + Invalid constraints found 发现无效约束 - - - + + + Reversed external geometry 反向的外部几何 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4720,7 +4721,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only 单击 "在约束中交换端点" 按钮以重新分配端点。仅在 FreeCAD 中创建的草图是 v0.15以下旧版本时使用。 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. @@ -4729,75 +4730,70 @@ However, no constraints linking to the endpoints were found. 但是, 未找到链接到端点的约束。 - + No reversed external-geometry arcs were found. 未找到反向外部几何圆弧。 - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 对链接到反转弧端点的约束被更改。 - - + + Constraint orientation locking 约束方向锁定 - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). 已启用方向锁定并重新计算%1 约束。这些约束已在报告视图 (菜单视图->> 视图->> 报告视图) 中列出。 - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. 对%1 约束禁用了方向锁定。这些约束已在报告视图 (菜单视图->> 面板->> 报告视图) 中列出。请注意, 对于未来所有的约束, 锁定仍然默认为 ON。 - - + + Delete constraints to external geom. 删除外部几何元素的拘束。 - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? 您将删除处理外部几何的所有约束。这在挽救一个草图与外部几何断开/更改的链接时有帮助。是否确实要删除约束? - + All constraints that deal with external geometry were deleted. 所有与外部几何有关的约束都将被删除。 - + No degenerated geometry No degenerated geometry - + No degenerated geometry found No degenerated geometry found - + Degenerated geometry Degenerated geometry - + %1 degenerated geometry found %1 degenerated geometry found SketcherGui::TaskSketcherConstraints - - - Form - 窗体 - Check to toggle filters @@ -4872,11 +4868,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - 窗体 - Check to toggle filters @@ -5062,7 +5053,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control 进阶求解器控制 @@ -5352,8 +5343,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines 切换所有 B-样条曲线曲率梳的显示和隐藏 @@ -5361,8 +5352,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline 减少贝B样条曲线选定节点的多重性 @@ -5370,8 +5361,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines 切换所有 B-样条曲线角度数的显示和隐藏 @@ -5379,8 +5370,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline 增加 B 样条所选节点的多重性 @@ -5388,8 +5379,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines 切换所有 B-样条曲线节点多重性的显示和隐藏 @@ -5397,8 +5388,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines 切换所有B样条曲线曲线控制多边形的显示和隐藏 @@ -5406,8 +5397,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines 切换所有B样条曲线控制多边形的显示和隐藏 @@ -5442,8 +5433,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 固定圆或圆弧的直径 @@ -5451,7 +5442,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc 固定圆或圆弧的半径/直径 @@ -5459,8 +5450,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 固定圆或圆弧的半径 @@ -5468,7 +5459,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc 固定圆或圆弧的半径/直径 @@ -5485,8 +5476,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc 通过端点和圆弧上的一点创建一个圆弧 @@ -5494,8 +5485,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points 通过三个边缘点创建圆 @@ -5503,8 +5494,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points 通过圆心和端点创建一个圆弧 @@ -5512,8 +5503,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints Create an arc of ellipse by its center, major radius, and endpoints @@ -5521,8 +5512,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints Create an arc of hyperbola by its center, major radius, and endpoints @@ -5530,8 +5521,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints Create an arc of parabola by its focus, vertex, and endpoints @@ -5539,13 +5530,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points 由控制点生成的B 样条 - - + + Create a B-spline by control points 由控制点创建 B 样条 @@ -5553,8 +5544,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point 通过圆心和一个边缘点创建一个圆 @@ -5562,8 +5553,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius 通过近拱点、远拱点和小半径创建一个椭圆 @@ -5571,8 +5562,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point 通过中心点、大半径和点创建一个椭圆 @@ -5580,8 +5571,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines 在两条线间创建圆角。 @@ -5589,8 +5580,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner 通过中心点和一个角创建一个七边形 @@ -5598,8 +5589,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner 通过中心点和一个角创建一个六边形 @@ -5607,7 +5598,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle 创建一个圆角矩形 @@ -5615,14 +5606,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner 通过中心点和一个角创建一个八边形 - - + + Create a regular polygon by its center and by one corner 通过中心点和一个角创建一个正方形 @@ -5630,8 +5621,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner 通过中心点和一个角创建一个五边形 @@ -5639,8 +5630,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point 保留约束和交点的圆角 @@ -5648,7 +5639,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle 创建一个矩形 @@ -5656,7 +5647,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle Create a centered rectangle @@ -5664,8 +5655,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner 通过中心点和一个角创建一个正方形 @@ -5673,8 +5664,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner 通过中心点和一个角创建一个等边三角形 @@ -5682,13 +5673,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points 周期 B 样条的控制点 - - + + Create a periodic B-spline by control points 由控制点创建周期贝塞尔曲线 @@ -6321,36 +6312,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error 错误 @@ -6370,45 +6361,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6418,18 +6409,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6439,49 +6430,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy Failed to add carbon copy - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6491,7 +6482,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6501,27 +6492,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6531,13 +6522,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6545,13 +6536,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6657,12 +6648,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6670,12 +6661,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6683,12 +6674,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 尺寸标注 - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6700,14 +6691,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + 尺寸标注 + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts index 57c1427c9c..c194525090 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts @@ -69,12 +69,12 @@ CmdSketcherCarbonCopy - + Create carbon copy 建立副本 - + Copy the geometry of another sketch 自其它草圖複製幾何 @@ -100,27 +100,27 @@ 顯示/隱藏 B 雲形線資訊層 - + Show/hide B-spline degree 顯示/隱藏 B 雲形線的多項式次數 - + Show/hide B-spline control polygon 顯示/隱藏 B 雲形線的控制多邊形 - + Show/hide B-spline curvature comb 顯示/隱藏 B 雲形線的曲率梳形圖 - + Show/hide B-spline knot multiplicity 顯示/隱藏 B 雲形線結點多重性 - + Show/hide B-spline control point weight 顯示/隱藏 B 雲形線的控制點權重 @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 約束弧或圓的直/半徑 - + Constrain an arc or a circle 約束單一圓弧或圓的直/半徑 - + Constrain radius 半徑拘束 - + Constrain diameter 直徑拘束 - + Constrain auto radius/diameter 自動拘束半徑/直徑 @@ -169,22 +169,22 @@ CmdSketcherCompCreateArc - + Create arc 建立弧線 - + Create an arc in the sketcher 於草圖中建立一個弧 - + Center and end points 圓心和起/終點定弧 - + End points and rim point 3點定弧 @@ -192,12 +192,12 @@ CmdSketcherCompCreateBSpline - + Create B-spline 建立B雲形線 - + Create a B-spline in the sketch 在草圖中建立B雲形線 @@ -205,22 +205,22 @@ CmdSketcherCompCreateCircle - + Create circle 建立圓 - + Create a circle in the sketcher 於草圖中建立一個圓 - + Center and rim point 圓心及半徑定圓 - + 3 rim points 3點建立圓 @@ -228,37 +228,37 @@ CmdSketcherCompCreateConic - + Create conic 建立圓錐 - + Create a conic in the sketch 於草圖中建立圓錐 - + Ellipse by center, major radius, point 由圓心及長短軸來建立橢圓 - + Ellipse by periapsis, apoapsis, minor radius 由近心點、遠心點及最小半徑建立橢圓 - + Arc of ellipse by center, major radius, endpoints 以圓心,長軸中點,起/終點建立橢圓弧 - + Arc of hyperbola by center, major radius, endpoints 以中心,主要半徑及終點建立雙曲線弧 - + Arc of parabola by focus, vertex, endpoints 由焦點/頂點/端點 建立拋物線弧 @@ -266,22 +266,22 @@ CmdSketcherCompCreateFillets - + Create fillet 建立圓角 - + Create a fillet between two lines 在兩條線間建立圓角 - + Sketch fillet 草圖圓角 - + Constraint-preserving sketch fillet 保留拘束之草圖圓角 @@ -299,17 +299,17 @@ 於草圖中建立矩形 - + Rectangle 矩形 - + Centered rectangle 矩形置中 - + Rounded rectangle 圓角矩形 @@ -317,47 +317,47 @@ CmdSketcherCompCreateRegularPolygon - + Create regular polygon 建立正多邊形 - + Create a regular polygon in the sketcher 於草圖中建立正多邊形 - + Triangle 三角形 - + Square 正方形 - + Pentagon 五角形 - + Hexagon 六角形 - + Heptagon 七角形 - + Octagon 八角形 - + Regular polygon 正多邊形 @@ -365,22 +365,22 @@ CmdSketcherCompModifyKnotMultiplicity - + Modify knot multiplicity 修改結點多重性 - + Modifies the multiplicity of the selected knot of a B-spline 修改自一 B 雲形線所選定結點之多重性 - + Increase knot multiplicity 增加結點多重性 - + Decrease knot multiplicity 減少結點多重性 @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 角度拘束 - + Fix the angle of a line or the angle between two lines 固定線之角度或兩線間角度 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block 定位拘束 - + Block the selected edge from moving 阻止選定邊的移動 @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 共點拘束 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 直徑拘束 - + Fix the diameter of a circle or an arc 固定一個圓或弧的直徑 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 距離拘束 - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 水平距離拘束 - + Fix the horizontal distance between two points or line ends 固定兩點或線段的水平距離 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 垂直距離拘束 - + Fix the vertical distance between two points or line ends 固定兩點或線段的垂直距離 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 相等拘束 - + Create an equality constraint between two lines or between circles and arcs 於兩線/圓/弧之間建立等長拘束 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 水平拘束 - + Create a horizontal constraint on the selected item 於所選項目建立水平拘束 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock 鎖定拘束 - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 平行拘束 - + Create a parallel constraint between two lines 於兩條線間建立平行拘束 @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 垂直拘束 - + Create a perpendicular constraint between two lines 於兩條線間建立垂直拘束 @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object 拘束點於物件上 - + Fix a point onto an object 固定點於物件上 @@ -559,12 +559,12 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 自動拘束半徑/直徑 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 如果選擇圓,則固定直徑,如果選擇圓弧/spline 極點,則固定半徑 @@ -572,12 +572,12 @@ on the selected vertex CmdSketcherConstrainRadius - + Constrain radius or weight 半徑或權重拘束 - + Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline 修正圓或弧之半徑或是修正 B 雲形線一個極點之權重 @@ -585,12 +585,12 @@ on the selected vertex CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +600,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 對稱拘束 - + Create a symmetry constraint between two points with respect to a line or a third point 於兩個點間藉由一條線或第3點建立一個對稱拘束 @@ -614,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 相切拘束 - + Create a tangent constraint between two entities 於兩個實體間建立相切拘束 @@ -627,12 +627,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 垂直拘束 - + Create a vertical constraint on the selected item 建立垂直拘束 @@ -640,12 +640,12 @@ with respect to a line or a third point CmdSketcherConvertToNURBS - + Convert geometry to B-spline 轉換幾何線條為 B 雲形線 - + Converts the selected geometry to a B-spline 將選定的幾何轉換為B雲形線 @@ -666,12 +666,12 @@ with respect to a line or a third point CmdSketcherCreate3PointArc - + Create arc by three points 3點建立弧 - + Create an arc by its end points and a point along the arc 由終點及弧上一點建立一個弧 @@ -679,12 +679,12 @@ with respect to a line or a third point CmdSketcherCreate3PointCircle - + Create circle by three points 3點建立圓 - + Create a circle by 3 perimeter points 3邊緣點建立圓 @@ -692,12 +692,12 @@ with respect to a line or a third point CmdSketcherCreateArc - + Create arc by center 由中心點建立弧 - + Create an arc by its center and by its end points 由中心點及其終點建立一個弧 @@ -705,12 +705,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfEllipse - + Create arc of ellipse 建立橢圓弧 - + Create an arc of ellipse in the sketch 於草圖建立橢圓之弧 @@ -718,12 +718,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfHyperbola - + Create arc of hyperbola 建立雙曲線弧 - + Create an arc of hyperbola in the sketch 於草圖中建立雙曲線弧 @@ -731,12 +731,12 @@ with respect to a line or a third point CmdSketcherCreateArcOfParabola - + Create arc of parabola 建立拋物線弧 - + Create an arc of parabola in the sketch 於草圖中建立拋物線弧 @@ -744,12 +744,12 @@ with respect to a line or a third point CmdSketcherCreateBSpline - + Create B-spline 建立B雲形線 - + Create a B-spline by control points in the sketch. 由草圖中的控制點建立B雲形線 @@ -757,12 +757,12 @@ with respect to a line or a third point CmdSketcherCreateCircle - + Create circle 建立圓 - + Create a circle in the sketch 於草圖中建立圓形 @@ -770,12 +770,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseBy3Points - + Create ellipse by 3 points 由3點建立一橢圓 - + Create an ellipse by 3 points in the sketch 於草圖中由3點建立一橢圓 @@ -783,12 +783,12 @@ with respect to a line or a third point CmdSketcherCreateEllipseByCenter - + Create ellipse by center 由中心點建立橢圓 - + Create an ellipse by center in the sketch 於草圖中由中心點建立橢圓 @@ -796,12 +796,12 @@ with respect to a line or a third point CmdSketcherCreateFillet - + Create fillet 建立圓角 - + Create a fillet between two lines or at a coincident point Create a fillet between two lines or at a coincident point @@ -809,12 +809,12 @@ with respect to a line or a third point CmdSketcherCreateHeptagon - + Create heptagon 建立七角形 - + Create a heptagon in the sketch 於草圖中建立七角形 @@ -822,12 +822,12 @@ with respect to a line or a third point CmdSketcherCreateHexagon - + Create hexagon 建立六角形 - + Create a hexagon in the sketch 於草圖中建立六角形 @@ -861,12 +861,12 @@ with respect to a line or a third point CmdSketcherCreateOctagon - + Create octagon 建立八角形 - + Create an octagon in the sketch 於草圖中建立八角形 @@ -874,12 +874,12 @@ with respect to a line or a third point CmdSketcherCreatePentagon - + Create pentagon 建立五角形 - + Create a pentagon in the sketch 於草圖中建立五角形 @@ -887,12 +887,12 @@ with respect to a line or a third point CmdSketcherCreatePeriodicBSpline - + Create periodic B-spline 建立週期性B雲形線 - + Create a periodic B-spline by control points in the sketch. 在草圖中使用控制點創建週期性B雲形線。 @@ -900,12 +900,12 @@ with respect to a line or a third point CmdSketcherCreatePoint - + Create point 建立點 - + Create a point in the sketch 於草圖中建立點 @@ -913,12 +913,12 @@ with respect to a line or a third point CmdSketcherCreatePointFillet - + Create corner-preserving fillet 創建角落保留之圓角 - + Fillet that preserves intersection point and most constraints 保留相交點及大多數拘束之圓角 @@ -926,12 +926,12 @@ with respect to a line or a third point CmdSketcherCreatePolyline - + Create polyline 建立聚合線 - + Create a polyline in the sketch. 'M' Key cycles behaviour 於草圖中建立聚合線,「M」鍵可循環切換 @@ -965,12 +965,12 @@ with respect to a line or a third point CmdSketcherCreateRegularPolygon - + Create regular polygon 建立正多邊形 - + Create a regular polygon in the sketch 於草圖中建立正多邊形 @@ -978,12 +978,12 @@ with respect to a line or a third point CmdSketcherCreateSlot - + Create slot 建立跑道圖型 - + Create a slot in the sketch 於草圖中建立跑道圖型 @@ -991,12 +991,12 @@ with respect to a line or a third point CmdSketcherCreateSquare - + Create square 建立正方形 - + Create a square in the sketch 於草圖中建立正方形 @@ -1004,12 +1004,12 @@ with respect to a line or a third point CmdSketcherCreateTriangle - + Create equilateral triangle 建立正三角形 - + Create an equilateral triangle in the sketch 於草圖中建立正三角形 @@ -1017,12 +1017,12 @@ with respect to a line or a third point CmdSketcherDecreaseDegree - + Decrease B-spline degree 減少 B 雲形線之多項式次數 - + Decreases the degree of the B-spline 增加 B 雲形線的多項式次數 @@ -1030,12 +1030,12 @@ with respect to a line or a third point CmdSketcherDecreaseKnotMultiplicity - + Decrease knot multiplicity 減少結點多重性 - + Decreases the multiplicity of the selected knot of a B-spline 減少自一 B 雲形線所選定結點之多重性 @@ -1082,12 +1082,12 @@ with respect to a line or a third point CmdSketcherExtend - + Extend edge 延伸邊緣 - + Extend an edge with respect to the picked position 相對於拾取的位置延伸一條邊 @@ -1095,12 +1095,12 @@ with respect to a line or a third point CmdSketcherExternal - + Create external geometry 建立外部幾何 - + Create an edge linked to an external geometry 與外部幾何建立相連之邊 @@ -1108,12 +1108,12 @@ with respect to a line or a third point CmdSketcherIncreaseDegree - + Increase B-spline degree 增加 B 雲形線之多項式次數 - + Increases the degree of the B-spline 增加B雲形線的多項式次數 @@ -1121,12 +1121,12 @@ with respect to a line or a third point CmdSketcherIncreaseKnotMultiplicity - + Increase knot multiplicity 增加結點多重性 - + Increases the multiplicity of the selected knot of a B-spline 增加自一 B 雲形線所選定結點之多重性 @@ -1134,12 +1134,12 @@ with respect to a line or a third point CmdSketcherInsertKnot - + Insert knot 插入結點 - + Inserts knot at given parameter. If a knot already exists at that parameter, it's multiplicity is increased by one. 在給定參數處插入結點。如果結果在參數處出現,其多重性增加一。 @@ -1147,12 +1147,12 @@ with respect to a line or a third point CmdSketcherJoinCurves - + Join curves 連接曲線 - + Join two curves at selected end points 將兩個曲線在選定的端點處連接起來 @@ -1437,12 +1437,12 @@ This will clear the 'Support' property, if any. CmdSketcherSplit - + Split edge 分割邊緣 - + Splits an edge into two while preserving constraints 當保留拘束時將一個邊分成二個。 @@ -1463,12 +1463,12 @@ This will clear the 'Support' property, if any. CmdSketcherSwitchVirtualSpace - + Switch virtual space 切換到虛擬草圖空間 - + Switches the selected constraints or the view to the other virtual space 將選定的拘束或視圖切換到另一個虛擬空間 @@ -1489,12 +1489,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 啟動/關閉拘束 - + Activates or deactivates the selected constraints 啟用或關閉選擇拘束 @@ -1515,12 +1515,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 切換驅動/參考拘束 - + Set the toolbar, or the selected constraints, into driving or reference mode 設置工具列,或選定的拘束,進入驅動或參考模式 @@ -1529,12 +1529,12 @@ into driving or reference mode CmdSketcherTrimming - + Trim edge 修剪邊 - + Trim an edge with respect to the picked position 依選取位置修剪邊 @@ -1592,369 +1592,370 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 添加水平約束 - - - + + + Add horizontal alignment 添加水平對齊 - - + + Add vertical constraint 創建垂直約束 - + Add vertical alignment 垂直對齊 - + Add 'Lock' constraint 添加定位拘束 - + Add relative 'Lock' constraint 添加相對定位拘束 - + Add fixed constraint 添加固定拘束 - + Add 'Block' constraint 添加定位拘束 - + Add block constraint 添加定位拘束 - - - + + + Add coincident constraint 添加共點約束 - - + + Add distance from horizontal axis constraint 添加與水平軸拘束的距離 - - + + Add distance from vertical axis constraint 添加與垂直軸拘束的距離 - - + + Add point to point distance constraint 添加點到點的距離約束 - - - + + + Add point to line Distance constraint 添加點到線的距離約束 - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - + + + + + + Add length constraint 添加長度拘束 - - + + Dimension 標註 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 在物件拘束上添加點 - - + + Add point to point horizontal distance constraint 添加點到點的水平距離約束 - + Add fixed x-coordinate constraint 添加固定的 x 座標拘束 - - + + Add point to point vertical distance constraint 添加點到點的垂直距離約束 - + Add fixed y-coordinate constraint 添加固定的 y 座標拘束 - - + + Add parallel constraint 添加平行拘束 - - - - - - - + + + + + + + Add perpendicular constraint 添加垂直拘束 - + Add perpendicularity constraint 添加垂直度拘束 - + Swap coincident+tangency with ptp tangency 以 ptp 相切交換共點+相切 - + Swap PointOnObject+tangency with point to curve tangency 以點對曲線相切交換物件上點(PoingOnObject)+相切 - - - - - - - + + + + + + + Add tangent constraint 添加切線拘束 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 添加切線拘束點 - - - - + + + + Add radius constraint 添加半徑拘束 - - - - + + + + Add diameter constraint 添加直徑拘束 - - - - + + + + Add radiam constraint 添加半徑拘束 - - - - - - + + + + + + Add angle constraint 添加角度拘束 - - + + Add equality constraint 添加相等拘束 - - - - - + + + + + Add symmetric constraint 添加對稱拘束 - + Add Snell's law constraint 添加司乃耳定律拘束 - + Toggle constraint to driving/reference 切換拘束以作驅動/參考 - + Activate/Deactivate constraint 啟動/關閉拘束 @@ -2014,44 +2015,44 @@ invalid constraints, degenerated geometry, etc. 添加置中草圖框 - + Add rounded rectangle 建立圓角矩形 - + Add line to sketch wire 將線添加到草圖線 - + Add arc to sketch wire 將弧添加到草圖線 - - + + Add sketch arc 添加弧線草圖 - - + + Add sketch circle 添加圓形草圖 - + Add sketch ellipse 添加橢圓草圖 - + Add sketch arc of ellipse 添加橢圓弧形草圖 - + Add sketch arc of hyperbola 添加雙曲線圓弧草圖 @@ -2071,33 +2072,33 @@ invalid constraints, degenerated geometry, etc. 添加草圖點 - - + + Create fillet 建立圓角 - + Trim edge 修剪邊 - + Extend edge 延伸邊緣 - + Split edge 分割邊緣 - + Add external geometry 添加外部幾何 - + Add slot 添加凹槽 @@ -2107,37 +2108,37 @@ invalid constraints, degenerated geometry, etc. 建立六角形 - + Convert to NURBS 轉換至 NURBS - + Increase spline degree 增加 B 雲形線之多項式次數 - + Decrease spline degree 減少 B 雲形線之多項式次數 - + Increase knot multiplicity 增加結點多重性 - + Decrease knot multiplicity 減少結點多重性 - + Insert knot 插入結點 - + Join Curves 連接曲線 @@ -2177,12 +2178,12 @@ invalid constraints, degenerated geometry, etc. 移除軸對齊 - + Toggle constraints to the other virtual space 將拘束切換到其他虛擬空間 - + @@ -2190,7 +2191,7 @@ invalid constraints, degenerated geometry, etc. 更新拘束的虛擬空間 - + Add auto constraints 添加自動拘束 @@ -2230,7 +2231,7 @@ invalid constraints, degenerated geometry, etc. 添加節點 - + Create a carbon copy 建立一個副本 @@ -2246,37 +2247,37 @@ invalid constraints, degenerated geometry, etc. Exceptions - + Autoconstrain error: Unsolvable sketch while applying coincident constraints. 自動拘束錯誤: 套用共點拘束時無法解出此草圖 - + Autoconstrain error: Unsolvable sketch while applying vertical/horizontal constraints. 自動拘束錯誤: 套用垂直/水平拘束時無法解出此草圖 - + Autoconstrain error: Unsolvable sketch while applying equality constraints. 自動拘束錯誤: 套用等長拘束時無法解出此草圖 - + Autoconstrain error: Unsolvable sketch without constraints. 自動拘束錯誤: 無拘束時無法解出此草圖 - + Autoconstrain error: Unsolvable sketch after applying horizontal and vertical constraints. 自動拘束錯誤: 套用水平及垂直拘束後無法解出此草圖 - + Autoconstrain error: Unsolvable sketch after applying point-on-point constraints. 自動拘束錯誤: 套用共點拘束後無法解出此草圖 - + Autoconstrain error: Unsolvable sketch after applying equality constraints. 自動拘束錯誤: 套用對稱拘束後無法解出此草圖 @@ -2401,143 +2402,143 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2553,9 +2554,9 @@ invalid constraints, degenerated geometry, etc. - - - + + + Wrong selection 錯誤的選取 @@ -2576,329 +2577,329 @@ invalid constraints, degenerated geometry, etc. 尺度拘束 - + Cannot add a constraint between two external geometries. 於兩個外部幾何間無法建立拘束. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. 無法在兩個固定幾何之間添加拘束。固定幾何包括外部幾何、區塊幾何和特殊點例如 B 雲形線之結點。 - + Sketcher Constraint Substitution 草圖拘束替換 - + Keep notifying me of constraint substitutions 繼續通知我拘束替換 - - - + + + Only sketch and its support are allowed to be selected. 只允許選擇草圖及其支撐。 - + One of the selected has to be on the sketch. 被選擇之一必須在草圖上。 - - + + Select an edge from the sketch. 於草圖中選擇邊 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 無法拘束 - - - - + + + + The selected edge is not a line segment. 所選之邊非為線段. - - - - - - + + + + + + Double constraint 雙重拘束 - - - - - + + + + + The selected edge already has a horizontal constraint! 選取的邊線已經有水平拘束! - - - + + + The selected edge already has a vertical constraint! 選取的邊線已經有垂直拘束! - - - - - - + + + + + + The selected edge already has a Block constraint! 所選邊線已套用定位拘束! - + The selected item(s) can't accept a horizontal constraint! 所選項目無法使用水平拘束! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! 選取超過一個固定點. 請選取最多一個固定點! - + The selected item(s) can't accept a vertical constraint! 所選項目無法使用垂直拘束! - - - + + + Select vertices from the sketch. 從草圖中選取頂點 - + Select one vertex from the sketch other than the origin. 從草圖中選取一個非原點之頂點 - + Select only vertices from the sketch. The last selected vertex may be the origin. 從草圖中只選擇端點。 最後選擇的頂點可能是原點。 - + Wrong solver status 求解器狀態錯誤 - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. 如果草圖中的求解器無法解出或存在冗餘、衝突的約束,則不能再添加定位約束。 - + Select one edge from the sketch. 從草圖中選取一邊線 - + Select only edges from the sketch. 僅有邊線能從草圖中被選取 - + Number of selected objects is not 3 選取之物件數量非為3 - - - + + + Error 錯誤 - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. 已被取代為終點對終點相切 - + Select two or more points from the sketch. 從草圖中選取二個或更多點 - + Select two or more vertices from the sketch. 從草圖中選取兩個或更多頂點。 - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. 由草圖中選取一條線或一個點,以及一條線或兩個點。 - + Cannot add a length constraint on an axis! 無法於軸上增加長度拘束! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. 此拘束條件在非線性曲線上並不合理. - + Endpoint to edge tangency was applied instead. 改為應用端點到邊相切。 - - - - - - - + + + + + + + Select the right things from the sketch. 從草圖中選取正確的圖元 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. 選擇不是 B 雲形線權重的邊 - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. 沒有任何被選擇點被拘束在其個別的曲線上,因為它們是同一個元件的一部份,因為它們都是外部幾何,或是因為其邊不符合條件。 - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 沒有任何被選擇點被拘束在其個別的曲線上,要麼因為它們都是同一元件的一部份,或是因為他們都是外部幾何。 - - - - + + + + Select exactly one line or up to two points from the sketch. 於草圖中選取一條線或最多兩個點。 - + Cannot add a horizontal length constraint on an axis! 無法於軸上增加水平長度拘束! - + Cannot add a fixed x-coordinate constraint on the origin point! 在原點上無法加入固定X軸拘束! - - + + This constraint only makes sense on a line segment or a pair of points. 此拘束只針對線段或是一對點有意義。 - + Cannot add a vertical length constraint on an axis! 無法於軸上增加垂直長度拘束! - + Cannot add a fixed y-coordinate constraint on the origin point! 在原點上無法加入固定Y軸拘束! - + Select two or more lines from the sketch. 由草圖中選取兩條或以上線條。 - - + + Select at least two lines from the sketch. 由草圖中選取至少兩條線。 - + Select a valid line. 選擇一條有效的線。 - - + + The selected edge is not a valid line. 所選之邊非為有效線段. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2906,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 此拘束尚有許多方式可以使用,可用的組合有:兩條曲線、兩個端點、兩條曲線及一個點。 - + Select some geometry from the sketch. perpendicular constraint 從草圖中選取一些幾何。 - - + + Cannot add a perpendicularity constraint at an unconnected point! 無法於未連接點上建立垂直拘束! - - - + + + Perpendicular to B-spline edge currently unsupported. B雲形線的邊線目前並不支援垂直拘束 - - + + One of the selected edges should be a line. 所選之邊中需有一條線。 - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. 已套用點對點相切拘束,共點拘束已被刪除 - + Endpoint to edge tangency was applied. The point on object constraint was deleted. 終點到邊已套用相切(拘束)。因此點到物件之拘束被刪除。 - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2951,277 +2952,277 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 可接受的組合:二條曲線; 一個終止點及一條曲線;二個終主點;二條曲線及一點。 - + Select some geometry from the sketch. tangent constraint 從草圖中選取一些幾何。 - - - + + + Cannot add a tangency constraint at an unconnected point! 無法於未連接點上建立相切拘束! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! 選取之物件數量有誤! - - + + With 3 objects, there must be 2 curves and 1 point. 三個物件時至少需有2條曲線及1個點。 - - - + + + Tangency to B-spline edge currently unsupported. 切線到 B 雲形線之邊緣目前並不支援 - - - - - - + + + + + + Select one or more arcs or circles from the sketch. 從草圖中選取一個或多個弧或圓。 - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. 從草圖中僅選擇一個或多個 B 雲形線極點或僅選擇一個或多個圓弧或圓,但不要混合。 - - - + + + Constraint only applies to arcs or circles. 拘束僅能用在圓弧或圓上 - - + + Select one or two lines from the sketch. Or select two edges and a point. 從草圖中選取一或兩條線條,或選取兩個邊及一個點。 - - + + Parallel lines 平行線 - - + + An angle constraint cannot be set for two parallel lines. 無法於兩條平行線間建立角度拘束。 - + Cannot add an angle constraint on an axis! 無法於軸上建立角度拘束! - + Select two edges from the sketch. 由草圖中選取兩個邊。 - + Select two or more compatible edges. 選擇兩個或更多相容之邊. - + Sketch axes cannot be used in equality constraints. 草圖軸不能用在同等拘束。 - + Equality for B-spline edge currently unsupported. 不支援B雲形線的等長拘束。 - - - - + + + + Select two or more edges of similar type. 選取兩個或更多相似類型之邊. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 請從草圖中選取兩個點及對稱線,兩個點及對稱點或一條線擊對稱點。 - - + + Cannot add a symmetry constraint between a line and its end points. 無法在一條線及其端點間添加對稱拘束。 - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 無法於線及其終點建立對稱拘束! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw 選取線段之兩個端點做為光線,以及一個邊緣做為邊界,先選的點會編號為n1,後選的點則編號為n2,基準值設定為n2/n1。 - + Selected objects are not just geometry from one sketch. 選取之物件並非來自於草圖之幾何。 - + Cannot create constraint with external geometry only. 僅用外部幾何無法建立拘束. - + Incompatible geometry is selected. 選取了不相容的幾何. - + SnellsLaw on B-spline edge is currently unsupported. B雲形線邊緣上的司乃耳定律目前不支援。 - - - - - + + + + + Select constraints from the sketch. 從草圖中選取拘束 - - - + + + Select constraint(s) from the sketch. 從草圖中選取拘束 - + B-Spline Degree B 雲形線多項式次數 - + Define B-Spline Degree, between 1 and %1: 定義 B 雲形線多項式次數,介於 1 及 %1 之間: - - - + + + CAD Kernel Error CAD核心錯誤 - + None of the selected elements is an edge. 所選元件中並無邊線。 - - + + At least one of the selected objects was not a B-Spline and was ignored. 所選物件中至少有一個不是B雲形線故被忽略 - - + + The selection comprises more than one item. Please select just one knot. 該選擇包括不止一個項目。請選擇單一個結點 - - + + Input Error 輸入錯誤 - - + + None of the selected elements is a knot of a B-spline 被選取的元件都不是B雲形線的結點 - - + + Selection is empty 選擇為空。 - + Nothing is selected. Please select a b-spline. 沒有選取任何物件。請選取 B 雲形線。 - + Please select a b-spline curve to insert a knot (not a knot on it). If the curve is not a b-spline, please convert it into one first. 請選擇一條 B 雲形線曲線來插入結點(不是其上的結點)。如果曲線還不是 B 雲形線,請先將其轉換為 B 雲形線。 - + Nothing is selected. Please select end points of curves. Nothing is selected. Please select end points of curves. - + Too many curves on point 點上的曲線過多 - - + + Exactly two curves should end at the selected point to be able to join them. Exactly two curves should end at the selected point to be able to join them. - + Too few curves on point 點上的曲線過少 - + Two end points, or coincident point should be selected. Two end points, or coincident point should be selected. @@ -3301,17 +3302,17 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c It is currently unsupported to move external geometry to another visual layer. External geometry will be omitted - + Set knot multiplicity 設定節點多重性 - + Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details Set knot multiplicity at the last point provided, between 1 and %1:Note that multiplicity may be ignored under certain circumstances.Please refer to documentation for details - + Value Error 錯誤的值 @@ -3625,12 +3626,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 長度: - + Refractive index ratio 折射率比例 - + Ratio n2/n1: 比例 n2/n1: @@ -3910,8 +3911,8 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c SketcherGui::PropertyConstraintListItem - - + + Unnamed 未命名 @@ -4142,13 +4143,13 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. @@ -4169,32 +4170,32 @@ This setting is only for the toolbar. Whichever you chose, all tools are always 'Radius': The tool will apply radius to both arcs and circles. - + Single tool Single tool - + Separated tools Separated tools - + Both 兩者 - + Auto 自動 - + Diameter 直徑 - + Radius 半徑 @@ -4642,12 +4643,12 @@ Then objects are only visible behind the sketch plane. 套用於現有草圖 - + Unexpected C++ exception 未知C++異常 - + Sketcher 草圖 @@ -4655,55 +4656,55 @@ Then objects are only visible behind the sketch plane. SketcherGui::SketcherValidation - + No missing coincidences 沒有不一致處 - + No missing coincidences found 未發現不一致處 - + Missing coincidences 不一致 - + %1 missing coincidences found 發現不一致處%1 - + No invalid constraints 無錯誤之拘束 - + No invalid constraints found 未發現錯誤之拘束 - + Invalid constraints 錯誤之拘束 - + Invalid constraints found 發現錯誤之拘束 - - - + + + Reversed external geometry 反向之外部幾何 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. %2 constraints are linking to the endpoints. The constraints have been listed in Report view (menu View -> Panels -> Report view). @@ -4714,82 +4715,77 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only 點擊「互換拘束中之端點」鈕來重新配置端點,但僅可於較FreeCAD v0.15版舊所建立的草圖可以使用。 - + %1 reversed external-geometry arcs were found. Their endpoints are encircled in 3d view. However, no constraints linking to the endpoints were found. 發現 %1 反向之弧於外部幾何中,其端點包含於3d視圖中,但其端點並未發現有任何拘束設定。 - + No reversed external-geometry arcs were found. 無反向外部幾何之弧。 - + %1 changes were made to constraints linking to endpoints of reversed arcs. %1 個改變被用來與反向弧之端點拘束相連結。 - - + + Constraint orientation locking 已鎖定拘束之方向 - + Orientation locking was enabled and recomputed for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). 已開啟定向鎖定並對%1個拘束重新計算,這些拘束已被列於報告檢視(選單檢視 -> 檢視 -> 報告檢視)。 - + Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. 已對%1個拘束關閉定向鎖定,這些拘束已被列於報告檢視(選單檢視 -> 檢視 -> 報告檢視)。請注意,未來所有的拘束都仍預設不鎖定。 - - + + Delete constraints to external geom. 刪除外部幾何之拘束。 - + You are about to delete ALL constraints that deal with external geometry. This is useful to rescue a sketch with broken/changed links to external geometry. Are you sure you want to delete the constraints? 您即將刪除所有處理外部幾何的拘束。這對於修復與外部幾何圖形的連結斷掉/更改的草圖很有用。您確定要刪除拘束嗎? - + All constraints that deal with external geometry were deleted. 所有與外部幾何有關的拘束都將被刪除。 - + No degenerated geometry 沒有退化幾何 - + No degenerated geometry found 找不到退化幾何 - + Degenerated geometry 退化幾何 - + %1 degenerated geometry found 找到 %1 退化幾何 SketcherGui::TaskSketcherConstraints - - - Form - 格式 - Check to toggle filters @@ -4864,11 +4860,6 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherElements - - - Form - 格式 - Check to toggle filters @@ -5054,7 +5045,7 @@ However, no constraints linking to the endpoints were found. SketcherGui::TaskSketcherSolverAdvanced - + Advanced solver control 進階求解器控制 @@ -5344,8 +5335,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineComb - - + + Switches between showing and hiding the curvature comb for all B-splines 切換顯示/隱藏 所有B雲形線的曲率梳形圖 @@ -5353,8 +5344,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDecreaseKnotMultiplicity - - + + Decreases the multiplicity of the selected knot of a B-spline 減少自一 B 雲形線所選定結點之多重性 @@ -5362,8 +5353,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineDegree - - + + Switches between showing and hiding the degree for all B-splines 切換顯示/隱藏 所有B雲形線的控制項次數 @@ -5371,8 +5362,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineIncreaseKnotMultiplicity - - + + Increases the multiplicity of the selected knot of a B-spline 增加自一 B 雲形線所選定結點之多重性 @@ -5380,8 +5371,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplineKnotMultiplicity - - + + Switches between showing and hiding the knot multiplicity for all B-splines 切換顯示/隱藏所有B雲形線的結點多重性 @@ -5389,8 +5380,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePoleWeight - - + + Switches between showing and hiding the control point weight for all B-splines 切換顯示/隱藏所有B雲形線的控制點權重 @@ -5398,8 +5389,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_BSplinePolygon - - + + Switches between showing and hiding the control polygons for all B-splines 切換顯示/隱藏 所有B雲形線的控制多邊形 @@ -5434,8 +5425,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 固定一個圓或弧的直徑 @@ -5443,7 +5434,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + Fix the radius/diameter of a circle or an arc 固定一個圓或弧的半徑/直徑 @@ -5451,8 +5442,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 固定圓或弧之半徑 @@ -5460,7 +5451,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstraintRadiam - + Fix the radius/diameter of a circle or an arc 固定一個圓或弧的半徑/直徑 @@ -5477,8 +5468,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointArc - - + + Create an arc by its end points and a point along the arc 由終點及弧上一點建立一個弧 @@ -5486,8 +5477,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create3PointCircle - - + + Create a circle by 3 rim points 由3圓弧點建立一個圓 @@ -5495,8 +5486,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArc - - + + Create an arc by its center and by its end points 由中心點及其終點建立一個弧 @@ -5504,8 +5495,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfEllipse - - + + Create an arc of ellipse by its center, major radius, and endpoints 由中心點、主半徑及終點來建立橢圓之弧 @@ -5513,8 +5504,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfHyperbola - - + + Create an arc of hyperbola by its center, major radius, and endpoints 以中心點,主要半徑及終點建立雙曲線弧 @@ -5522,8 +5513,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateArcOfParabola - - + + Create an arc of parabola by its focus, vertex, and endpoints 通過焦點、頂點和端點創建拋物線弧 @@ -5531,13 +5522,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateBSpline - + B-spline by control points 以控制點建立 B 雲形線 - - + + Create a B-spline by control points 以控制點建立 B 雲形線 @@ -5545,8 +5536,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateCircle - - + + Create a circle by its center and by a rim point 由中心點及一個圓弧點建立一個圓 @@ -5554,8 +5545,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseBy3Points - - + + Create a ellipse by periapsis, apoapsis, and minor radius 由近心點、遠心點及次半徑建立橢圓 @@ -5563,8 +5554,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateEllipseByCenter - - + + Create an ellipse by center, major radius and point 由中心點、主半徑及終點來建立橢圓 @@ -5572,8 +5563,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateFillet - - + + Creates a radius between two lines 在兩條線間建立半徑 @@ -5581,8 +5572,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHeptagon - - + + Create a heptagon by its center and by one corner 以中心點及一角來建立七角形 @@ -5590,8 +5581,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateHexagon - - + + Create a hexagon by its center and by one corner 以中心點及一角來建立六角形 @@ -5599,7 +5590,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOblong - + Create a rounded rectangle 建立一個圓角矩形 @@ -5607,14 +5598,14 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateOctagon - - + + Create an octagon by its center and by one corner 以中心點及一角來建立八角形 - - + + Create a regular polygon by its center and by one corner 以中心點及一角來建立正多邊形 @@ -5622,8 +5613,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePentagon - - + + Create a pentagon by its center and by one corner 以中心點及一角來建立五角形 @@ -5631,8 +5622,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreatePointFillet - - + + Fillet that preserves constraints and intersection point 保留拘束與交叉點的圓角 @@ -5640,7 +5631,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle - + Create a rectangle 建立矩形 @@ -5648,7 +5639,7 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateRectangle_Center - + Create a centered rectangle 建立置中矩形 @@ -5656,8 +5647,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateSquare - - + + Create a square by its center and by one corner 以中心點及一角來建立正方形 @@ -5665,8 +5656,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_CreateTriangle - - + + Create an equilateral triangle by its center and by one corner 以中心點及一角來建立正三角形 @@ -5674,13 +5665,13 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_Create_Periodic_BSpline - + Periodic B-spline by control points 由控制點建立週期性B雲形線 - - + + Create a periodic B-spline by control points 由控制點建立週期性B雲形線 @@ -6311,36 +6302,36 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - + + - + - - - - + + + + Error 錯誤 @@ -6360,45 +6351,45 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - - - - + + + + + + + + + + Invalid Constraint Invalid Constraint - - - + + + Failed to add arc Failed to add arc - + Failed to add arc of ellipse Failed to add arc of ellipse - + Cannot create arc of hyperbola from invalid angles, try again! Cannot create arc of hyperbola from invalid angles, try again! - + Cannot create arc of hyperbola Cannot create arc of hyperbola - + Cannot create arc of parabola Cannot create arc of parabola @@ -6408,18 +6399,18 @@ The grid spacing change if it becomes smaller than this number of pixel.Error adding B-Spline pole - + Error creating B-spline pole Error creating B-spline pole - - + + Error creating B-spline Error creating B-spline - + Error deleting last pole Error deleting last pole @@ -6429,49 +6420,49 @@ The grid spacing change if it becomes smaller than this number of pixel.Cannot add knot point - + Cannot add internal alignment points Cannot add internal alignment points - + Error removing knot Error removing knot - + Failed to add carbon copy 建立副本失敗 - - + + Failed to add circle Failed to add circle - + Failed to add an ellipse Failed to add an ellipse - + Failed to extend edge Failed to extend edge - + Failed to add external geometry Failed to add external geometry - + Failed to create fillet Failed to create fillet - + Failed to add line Failed to add line @@ -6481,7 +6472,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add point - + Failed to add polygon Failed to add polygon @@ -6491,27 +6482,27 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle - + Failed to add slot Failed to add slot - + Failed to add edge Failed to add edge - + Failed to trim edge Failed to trim edge - + Value Error @@ -6521,13 +6512,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_CreateBSplineByInterpolation - + B-spline by knots B-spline by knots - - + + Create a B-spline by knots Create a B-spline by knots @@ -6535,13 +6526,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Sketcher_Create_Periodic_BSplineByInterpolation - + Periodic B-spline by knots Periodic B-spline by knots - - + + Create a periodic B-spline by knots Create a periodic B-spline by knots @@ -6647,12 +6638,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreateBSplineByInterpolation - + Create B-spline by knots Create B-spline by knots - + Create a B-spline by knots, i.e. by interpolation, in the sketch. Create a B-spline by knots, i.e. by interpolation, in the sketch. @@ -6660,12 +6651,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherCreatePeriodicBSplineByInterpolation - + Create periodic B-spline by knots Create periodic B-spline by knots - + Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. @@ -6673,12 +6664,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 標註 - + Constrain contextually based on your selection. Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6690,14 +6681,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherArcOverlay - + Show/hide circular helper for arcs Show/hide circular helper for arcs - + Switches between showing and hiding the circular helper for all arcs Switches between showing and hiding the circular helper for all arcs + + CmdSketcherCompDimensionTools + + + Dimension + 標註 + + + + Dimension tools. + Dimension tools. + + diff --git a/src/Mod/Sketcher/Gui/ShortcutListener.h b/src/Mod/Sketcher/Gui/ShortcutListener.h index 6991859f90..414da71fa3 100644 --- a/src/Mod/Sketcher/Gui/ShortcutListener.h +++ b/src/Mod/Sketcher/Gui/ShortcutListener.h @@ -54,7 +54,7 @@ protected: ViewProviderSketch* pViewProvider; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_SHORTCUTLISTENER_H +#endif // SKETCHERGUI_SHORTCUTLISTENER_H diff --git a/src/Mod/Sketcher/Gui/SketchMirrorDialog.h b/src/Mod/Sketcher/Gui/SketchMirrorDialog.h index e8e00a61d6..acf3b6de4e 100644 --- a/src/Mod/Sketcher/Gui/SketchMirrorDialog.h +++ b/src/Mod/Sketcher/Gui/SketchMirrorDialog.h @@ -49,6 +49,6 @@ private: std::unique_ptr ui; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_SketchMirrorDialog_H +#endif // SKETCHERGUI_SketchMirrorDialog_H diff --git a/src/Mod/Sketcher/Gui/SketchOrientationDialog.cpp b/src/Mod/Sketcher/Gui/SketchOrientationDialog.cpp index 5c7d84e3b8..7d53d70fd1 100644 --- a/src/Mod/Sketcher/Gui/SketchOrientationDialog.cpp +++ b/src/Mod/Sketcher/Gui/SketchOrientationDialog.cpp @@ -95,22 +95,28 @@ void SketchOrientationDialog::onPreview() std::string icon; bool reverse = ui->Reverse_checkBox->isChecked(); if (ui->XY_radioButton->isChecked()) { - if (reverse) + if (reverse) { icon = "view-bottom"; - else + } + else { icon = "view-top"; + } } else if (ui->XZ_radioButton->isChecked()) { - if (reverse) + if (reverse) { icon = "view-rear"; - else + } + else { icon = "view-front"; + } } else if (ui->YZ_radioButton->isChecked()) { - if (reverse) + if (reverse) { icon = "view-left"; - else + } + else { icon = "view-right"; + } } ui->previewLabel->setPixmap( diff --git a/src/Mod/Sketcher/Gui/SketchOrientationDialog.h b/src/Mod/Sketcher/Gui/SketchOrientationDialog.h index 0713329536..66aa603c1f 100644 --- a/src/Mod/Sketcher/Gui/SketchOrientationDialog.h +++ b/src/Mod/Sketcher/Gui/SketchOrientationDialog.h @@ -53,6 +53,6 @@ private: std::unique_ptr ui; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_SketchOrientationDialog_H +#endif // SKETCHERGUI_SketchOrientationDialog_H diff --git a/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.h b/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.h index b2f7ad7253..75ca9ea266 100644 --- a/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.h +++ b/src/Mod/Sketcher/Gui/SketchRectangularArrayDialog.h @@ -53,6 +53,6 @@ private: std::unique_ptr ui; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_SketchRectangularArrayDialog_H +#endif // SKETCHERGUI_SketchRectangularArrayDialog_H diff --git a/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.h b/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.h index 2bd78100c1..d3b32421bc 100644 --- a/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.h +++ b/src/Mod/Sketcher/Gui/SketcherRegularPolygonDialog.h @@ -49,6 +49,6 @@ private: std::unique_ptr ui; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_SketcherRegularPolygonDialog_H +#endif // SKETCHERGUI_SketcherRegularPolygonDialog_H diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.cpp b/src/Mod/Sketcher/Gui/SketcherSettings.cpp index 17b4deb15f..152afdd05b 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.cpp +++ b/src/Mod/Sketcher/Gui/SketcherSettings.cpp @@ -67,33 +67,36 @@ void SketcherSettings::saveSettings() ui->checkBoxNotifyConstraintSubstitutions->onSave(); ui->checkBoxAutoRemoveRedundants->onSave(); - enum { + enum + { DimensionSingleTool, DimensionSeparateTools, DimensionBoth }; // Dimensioning constraints mode - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/dimensioning"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Sketcher/dimensioning"); bool singleTool = true; bool SeparatedTools = false; int index = ui->dimensioningMode->currentIndex(); switch (index) { - case DimensionSeparateTools: - singleTool = false; - SeparatedTools = true; - break; - case DimensionBoth: - singleTool = true; - SeparatedTools = true; - break; + case DimensionSeparateTools: + singleTool = false; + SeparatedTools = true; + break; + case DimensionBoth: + singleTool = true; + SeparatedTools = true; + break; } hGrp->SetBool("SingleDimensioningTool", singleTool); hGrp->SetBool("SeparatedDimensioningTools", SeparatedTools); ui->radiusDiameterMode->setEnabled(index != 1); - enum { + enum + { DimensionAutoRadiusDiam, DimensionDiameter, DimensionRadius @@ -103,14 +106,14 @@ void SketcherSettings::saveSettings() bool Radius = true; index = ui->radiusDiameterMode->currentIndex(); switch (index) { - case DimensionDiameter: - Diameter = true; - Radius = false; - break; - case DimensionRadius: - Diameter = false; - Radius = true; - break; + case DimensionDiameter: + Diameter = true; + Radius = false; + break; + case DimensionRadius: + Diameter = false; + Radius = true; + break; } hGrp->SetBool("DimensioningDiameter", Diameter); hGrp->SetBool("DimensioningRadius", Radius); @@ -131,12 +134,16 @@ void SketcherSettings::loadSettings() ui->dimensioningMode->addItem(tr("Separated tools")); ui->dimensioningMode->addItem(tr("Both")); - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/dimensioning"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Sketcher/dimensioning"); bool singleTool = hGrp->GetBool("SingleDimensioningTool", true); bool SeparatedTools = hGrp->GetBool("SeparatedDimensioningTools", false); int index = SeparatedTools ? (singleTool ? 2 : 1) : 0; ui->dimensioningMode->setCurrentIndex(index); - connect(ui->dimensioningMode, QOverload::of(&QComboBox::currentIndexChanged), this, &SketcherSettings::dimensioningModeChanged); + connect(ui->dimensioningMode, + QOverload::of(&QComboBox::currentIndexChanged), + this, + &SketcherSettings::dimensioningModeChanged); ui->radiusDiameterMode->setEnabled(index != 1); @@ -248,13 +255,15 @@ void SketcherSettingsGrid::loadSettings() "User parameter:BaseApp/Preferences/Mod/Sketcher/General"); int pattern = hGrp->GetInt("GridLinePattern", 0x0f0f); int index = ui->gridLinePattern->findData(QVariant(pattern)); - if (index < 0) + if (index < 0) { index = 1; + } ui->gridLinePattern->setCurrentIndex(index); pattern = hGrp->GetInt("GridDivLinePattern", 0xffff); index = ui->gridDivLinePattern->findData(QVariant(pattern)); - if (index < 0) + if (index < 0) { index = 0; + } ui->gridDivLinePattern->setCurrentIndex(index); } @@ -279,8 +288,10 @@ SketcherSettingsDisplay::SketcherSettingsDisplay(QWidget* parent) { ui->setupUi(this); - connect( - ui->btnTVApply, &QPushButton::clicked, this, &SketcherSettingsDisplay::onBtnTVApplyClicked); + connect(ui->btnTVApply, + &QPushButton::clicked, + this, + &SketcherSettingsDisplay::onBtnTVApplyClicked); } /** diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.h b/src/Mod/Sketcher/Gui/SketcherSettings.h index 01a6018f10..1d3f52effc 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.h +++ b/src/Mod/Sketcher/Gui/SketcherSettings.h @@ -125,6 +125,6 @@ private: std::unique_ptr ui; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_SKETCHERSETTINGS_H +#endif // SKETCHERGUI_SKETCHERSETTINGS_H diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.ui b/src/Mod/Sketcher/Gui/SketcherSettings.ui index a189572028..effbb7ff66 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.ui +++ b/src/Mod/Sketcher/Gui/SketcherSettings.ui @@ -185,8 +185,8 @@ Requires to re-enter edit mode to take effect. Select the type of dimensioning constraints for your toolbar: -'Single tool': A single tool for all dimensioning constraints : Distance, Distance X / Y, Angle, Radius. -'Separated tools': Separated tools for each dimensioning constraint. +'Single tool': A single tool for all dimensioning constraints in the toolbar : Distance, Distance X / Y, Angle, Radius. (Others in dropdown) +'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. diff --git a/src/Mod/Sketcher/Gui/SnapManager.cpp b/src/Mod/Sketcher/Gui/SnapManager.cpp index d12793cf29..02c3a6cc55 100644 --- a/src/Mod/Sketcher/Gui/SnapManager.cpp +++ b/src/Mod/Sketcher/Gui/SnapManager.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ #include -#endif// #ifndef _PreComp_ +#endif // #ifndef _PreComp_ #include @@ -131,8 +131,8 @@ void SnapManager::ParameterObserver::subscribeToParameters() ParameterGrp::handle hGrp = getParameterGrpHandle(); hGrp->Attach(this); } - catch (const Base::ValueError& e) {// ensure that if parameter strings are not well-formed, the - // exception is not propagated + catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, + // the exception is not propagated Base::Console().DeveloperError("SnapManager", "Malformed parameter string: %s\n", e.what()); } } @@ -144,8 +144,8 @@ void SnapManager::ParameterObserver::unsubscribeToParameters() hGrp->Detach(this); } catch (const Base::ValueError& - e) {// ensure that if parameter strings are not well-formed, the program is not - // terminated when calling the noexcept destructor. + e) { // ensure that if parameter strings are not well-formed, the program is not + // terminated when calling the noexcept destructor. Base::Console().DeveloperError("SnapManager", "Malformed parameter string: %s\n", e.what()); } } @@ -207,9 +207,9 @@ bool SnapManager::snap(double& x, double& y) } // 3 - Snap to grid - if (snapToGridRequested /*&& viewProvider.ShowGrid.getValue() */) {// Snap to grid is enabled - // even if the grid is not - // visible. + if (snapToGridRequested /*&& viewProvider.ShowGrid.getValue() */) { // Snap to grid is enabled + // even if the grid is not + // visible. return snapToGrid(x, y); } @@ -256,15 +256,15 @@ bool SnapManager::snapToObject(double& x, double& y) y = Obj->getPoint(geoId, posId).y; return true; } - else if (CrsId == 1) {// H_Axis + else if (CrsId == 1) { // H_Axis y = 0; return true; } - else if (CrsId == 2) {// V_Axis + else if (CrsId == 2) { // V_Axis x = 0; return true; } - else if (CrvId >= 0 || CrvId <= Sketcher::GeoEnum::RefExt) {// Curves + else if (CrvId >= 0 || CrvId <= Sketcher::GeoEnum::RefExt) { // Curves const Part::Geometry* geo = Obj->getGeometry(CrvId); @@ -317,13 +317,13 @@ bool SnapManager::snapToGrid(double& x, double& y) // Check if x within snap tolerance if (x < tmpX + snapTol && x > tmpX - snapTol) { - x = tmpX;// Snap X Mouse Position + x = tmpX; // Snap X Mouse Position snapped = true; } // Check if y within snap tolerance if (y < tmpY + snapTol && y > tmpY - snapTol) { - y = tmpY;// Snap Y Mouse Position + y = tmpY; // Snap Y Mouse Position snapped = true; } @@ -367,8 +367,9 @@ bool SnapManager::snapToArcMiddle(Base::Vector3d& pointToOverride, const Part::G double u, v; arc->getRange(u, v, true); - if (v < u) + if (v < u) { v += 2 * M_PI; + } double angle = v - u; int revert = angle < M_PI ? 1 : -1; diff --git a/src/Mod/Sketcher/Gui/SnapManager.h b/src/Mod/Sketcher/Gui/SnapManager.h index a02936b11c..7b1e1af1c3 100644 --- a/src/Mod/Sketcher/Gui/SnapManager.h +++ b/src/Mod/Sketcher/Gui/SnapManager.h @@ -121,7 +121,7 @@ private: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_SnapManager_H +#endif // SKETCHERGUI_SnapManager_H diff --git a/src/Mod/Sketcher/Gui/SoZoomTranslation.h b/src/Mod/Sketcher/Gui/SoZoomTranslation.h index a951b0b105..8cc8b21ae5 100644 --- a/src/Mod/Sketcher/Gui/SoZoomTranslation.h +++ b/src/Mod/Sketcher/Gui/SoZoomTranslation.h @@ -61,5 +61,5 @@ protected: mutable float scaleFactor; }; -}// namespace SketcherGui -#endif// SKETCHERGUI_SOZOOMTRANSLATION_H +} // namespace SketcherGui +#endif // SKETCHERGUI_SOZOOMTRANSLATION_H diff --git a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp index 02a530d51f..9a7627b88f 100644 --- a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp +++ b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.cpp @@ -58,14 +58,18 @@ TaskDlgEditSketch::TaskDlgEditSketch(ViewProviderSketch* sketchView) Content.push_back(Constraints); Content.push_back(Elements); - if (!hGrp->GetBool("ExpandedMessagesWidget", true)) + if (!hGrp->GetBool("ExpandedMessagesWidget", true)) { Messages->hideGroupBox(); - if (!hGrp->GetBool("ExpandedSolverAdvancedWidget", false)) + } + if (!hGrp->GetBool("ExpandedSolverAdvancedWidget", false)) { SolverAdvanced->hideGroupBox(); - if (!hGrp->GetBool("ExpandedConstraintsWidget", true)) + } + if (!hGrp->GetBool("ExpandedConstraintsWidget", true)) { Constraints->hideGroupBox(); - if (!hGrp->GetBool("ExpandedElementsWidget", true)) + } + if (!hGrp->GetBool("ExpandedElementsWidget", true)) { Elements->hideGroupBox(); + } } TaskDlgEditSketch::~TaskDlgEditSketch() @@ -73,8 +77,9 @@ TaskDlgEditSketch::~TaskDlgEditSketch() // to make sure to delete the advanced solver panel // it must be part to the 'Content' array std::vector::iterator it = std::find(Content.begin(), Content.end(), SolverAdvanced); - if (it == Content.end()) + if (it == Content.end()) { Content.push_back(SolverAdvanced); + } } //==== calls from the TaskView =============================================================== @@ -104,11 +109,13 @@ bool TaskDlgEditSketch::reject() sketchView->purgeHandler(); } - std::string document = getDocumentName();// needed because resetEdit() deletes this instance - Gui::Command::doCommand( - Gui::Command::Gui, "Gui.getDocument('%s').resetEdit()", document.c_str()); - Gui::Command::doCommand( - Gui::Command::Doc, "App.getDocument('%s').recompute()", document.c_str()); + std::string document = getDocumentName(); // needed because resetEdit() deletes this instance + Gui::Command::doCommand(Gui::Command::Gui, + "Gui.getDocument('%s').resetEdit()", + document.c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.getDocument('%s').recompute()", + document.c_str()); return true; } diff --git a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.h b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.h index 55c1b7a3d6..dc558d0b33 100644 --- a/src/Mod/Sketcher/Gui/TaskDlgEditSketch.h +++ b/src/Mod/Sketcher/Gui/TaskDlgEditSketch.h @@ -86,6 +86,6 @@ protected: }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_TaskDlgEditSketch_H +#endif // SKETCHERGUI_TaskDlgEditSketch_H diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.h b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.h index 3072162c59..8d5cb2bf0a 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstraints.h +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstraints.h @@ -94,7 +94,7 @@ public: FilterValueBitset getMultiFilter(); - int normalFilterCount;// All filters but selected and associated + int normalFilterCount; // All filters but selected and associated int selectedFilterIndex; int associatedFilterIndex; @@ -104,7 +104,7 @@ protected: private: using filterItemRepr = - std::pair;// {filter item text, filter item level} + std::pair; // {filter item text, filter item level} inline static const std::vector filterItems = { {QT_TR_NOOP("All"), 0}, {QT_TR_NOOP("Geometric"), 0}, @@ -207,16 +207,16 @@ private: bool inEditMode; std::unique_ptr ui; ConstraintFilter::FilterValueBitset - multiFilterStatus;// Stores the filters to be aggregated to form the multifilter. + multiFilterStatus; // Stores the filters to be aggregated to form the multifilter. std::vector - selectionFilter;// holds the constraint ids of the selected constraints + selectionFilter; // holds the constraint ids of the selected constraints std::vector - associatedConstraintsFilter;// holds the constraint ids of the constraints associated with - // the selected geometry + associatedConstraintsFilter; // holds the constraint ids of the constraints associated with + // the selected geometry ConstraintFilterList* filterList; boost::signals2::scoped_connection changedSketchView; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h b/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h index 69c47e39e7..e3cb000111 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h +++ b/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h @@ -60,7 +60,7 @@ private: // QWidget* proxy; }; -}// namespace TaskView -}// namespace Gui +} // namespace TaskView +} // namespace Gui -#endif// GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Sketcher/Gui/TaskSketcherElements.h b/src/Mod/Sketcher/Gui/TaskSketcherElements.h index 53a62429f1..1284a804d2 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherElements.h +++ b/src/Mod/Sketcher/Gui/TaskSketcherElements.h @@ -161,6 +161,6 @@ private: bool isNamingBoxChecked; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// GUI_TASKVIEW_TASKAPPERANCE_H +#endif // GUI_TASKVIEW_TASKAPPERANCE_H diff --git a/src/Mod/Sketcher/Gui/TaskSketcherMessages.h b/src/Mod/Sketcher/Gui/TaskSketcherMessages.h index 881d79b9a5..8a1138d9e2 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherMessages.h +++ b/src/Mod/Sketcher/Gui/TaskSketcherMessages.h @@ -49,7 +49,9 @@ public: explicit TaskSketcherMessages(ViewProviderSketch* sketchView); ~TaskSketcherMessages() override; - void slotSetUp(const QString& state, const QString& msg, const QString& link, + void slotSetUp(const QString& state, + const QString& msg, + const QString& link, const QString& linkText); private: @@ -69,6 +71,6 @@ private: std::unique_ptr ui; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// GUI_TASKVIEW_TaskSketcherMessages_H +#endif // GUI_TASKVIEW_TaskSketcherMessages_H diff --git a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp index 595285ff3f..a23d6e12ed 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.cpp @@ -42,19 +42,21 @@ #define DL_TOLF 1E-10 #define CONVERGENCE 1E-10 #define MAX_ITER 100 -#define DEFAULT_SOLVER 2 // DL=2, LM=1, BFGS=0 -#define DEFAULT_RSOLVER 2 // DL=2, LM=1, BFGS=0 -#define DEFAULT_QRSOLVER 1 // DENSE=0, SPARSEQR=1 -#define QR_PIVOT_THRESHOLD 1E-13// under this value a Jacobian value is regarded as zero -#define DEFAULT_SOLVER_DEBUG 1 // None=0, Minimal=1, IterationLevel=2 +#define DEFAULT_SOLVER 2 // DL=2, LM=1, BFGS=0 +#define DEFAULT_RSOLVER 2 // DL=2, LM=1, BFGS=0 +#define DEFAULT_QRSOLVER 1 // DENSE=0, SPARSEQR=1 +#define QR_PIVOT_THRESHOLD 1E-13 // under this value a Jacobian value is regarded as zero +#define DEFAULT_SOLVER_DEBUG 1 // None=0, Minimal=1, IterationLevel=2 #define MAX_ITER_MULTIPLIER false -#define DEFAULT_DOGLEG_GAUSS_STEP 0// FullPivLU = 0, LeastNormFullPivLU = 1, LeastNormLdlt = 2 +#define DEFAULT_DOGLEG_GAUSS_STEP 0 // FullPivLU = 0, LeastNormFullPivLU = 1, LeastNormLdlt = 2 using namespace SketcherGui; using namespace Gui::TaskView; TaskSketcherSolverAdvanced::TaskSketcherSolverAdvanced(ViewProviderSketch* sketchView) - : TaskBox(Gui::BitmapFactory().pixmap("document-new"), tr("Advanced solver control"), true, + : TaskBox(Gui::BitmapFactory().pixmap("document-new"), + tr("Advanced solver control"), + true, nullptr) , sketchView(sketchView) , ui(new Ui_TaskSketcherSolverAdvanced) @@ -177,13 +179,15 @@ void TaskSketcherSolverAdvanced::updateDefaultMethodParameters() int currentindex = ui->comboBoxDefaultSolver->currentIndex(); int redundantcurrentindex = ui->comboBoxRedundantDefaultSolver->currentIndex(); - if (redundantcurrentindex == 2 || currentindex == 2) + if (redundantcurrentindex == 2 || currentindex == 2) { ui->comboBoxDogLegGaussStep->setEnabled(true); - else + } + else { ui->comboBoxDogLegGaussStep->setEnabled(false); + } switch (currentindex) { - case 0:// BFGS + case 0: // BFGS ui->labelSolverParam1->setText(QString::fromLatin1("")); ui->labelSolverParam2->setText(QString::fromLatin1("")); ui->labelSolverParam3->setText(QString::fromLatin1("")); @@ -194,7 +198,7 @@ void TaskSketcherSolverAdvanced::updateDefaultMethodParameters() ui->lineEditSolverParam2->setDisabled(true); ui->lineEditSolverParam3->setDisabled(true); break; - case 1:// LM + case 1: // LM { ui->labelSolverParam1->setText(QString::fromLatin1("Eps")); ui->labelSolverParam2->setText(QString::fromLatin1("Eps1")); @@ -231,7 +235,7 @@ void TaskSketcherSolverAdvanced::updateDefaultMethodParameters() .setLM_tau(tau); break; } - case 2:// DogLeg + case 2: // DogLeg { ui->labelSolverParam1->setText(QString::fromLatin1("Tolg")); ui->labelSolverParam2->setText(QString::fromLatin1("Tolx")); @@ -276,13 +280,15 @@ void TaskSketcherSolverAdvanced::updateRedundantMethodParameters() int currentindex = ui->comboBoxDefaultSolver->currentIndex(); int redundantcurrentindex = ui->comboBoxRedundantDefaultSolver->currentIndex(); - if (redundantcurrentindex == 2 || currentindex == 2) + if (redundantcurrentindex == 2 || currentindex == 2) { ui->comboBoxDogLegGaussStep->setEnabled(true); - else + } + else { ui->comboBoxDogLegGaussStep->setEnabled(false); + } switch (redundantcurrentindex) { - case 0:// BFGS + case 0: // BFGS ui->labelRedundantSolverParam1->setText(QString::fromLatin1("")); ui->labelRedundantSolverParam2->setText(QString::fromLatin1("")); ui->labelRedundantSolverParam3->setText(QString::fromLatin1("")); @@ -293,7 +299,7 @@ void TaskSketcherSolverAdvanced::updateRedundantMethodParameters() ui->lineEditRedundantSolverParam2->setDisabled(true); ui->lineEditRedundantSolverParam3->setDisabled(true); break; - case 1:// LM + case 1: // LM { ui->labelRedundantSolverParam1->setText(QString::fromLatin1("R.Eps")); ui->labelRedundantSolverParam2->setText(QString::fromLatin1("R.Eps1")); @@ -327,7 +333,7 @@ void TaskSketcherSolverAdvanced::updateRedundantMethodParameters() .setLM_tauRedundant(eps1); break; } - case 2:// DogLeg + case 2: // DogLeg { ui->labelRedundantSolverParam1->setText(QString::fromLatin1("R.Tolg")); ui->labelRedundantSolverParam2->setText(QString::fromLatin1("R.Tolx")); @@ -374,7 +380,7 @@ void TaskSketcherSolverAdvanced::onLineEditSolverParam1EditingFinished() ui->lineEditSolverParam1->setText(sci.toUpper()); switch (ui->comboBoxDefaultSolver->currentIndex()) { - case 1:// LM + case 1: // LM { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setLM_eps(val); @@ -382,7 +388,7 @@ void TaskSketcherSolverAdvanced::onLineEditSolverParam1EditingFinished() ui->lineEditSolverParam1->onSave(); break; } - case 2:// DogLeg + case 2: // DogLeg { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setDL_tolg(val); @@ -403,7 +409,7 @@ void TaskSketcherSolverAdvanced::onLineEditRedundantSolverParam1EditingFinished( ui->lineEditRedundantSolverParam1->setText(sci.toUpper()); switch (ui->comboBoxDefaultSolver->currentIndex()) { - case 1:// LM + case 1: // LM { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setLM_epsRedundant(val); @@ -411,7 +417,7 @@ void TaskSketcherSolverAdvanced::onLineEditRedundantSolverParam1EditingFinished( ui->lineEditRedundantSolverParam1->onSave(); break; } - case 2:// DogLeg + case 2: // DogLeg { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setDL_tolgRedundant(val); @@ -432,7 +438,7 @@ void TaskSketcherSolverAdvanced::onLineEditSolverParam2EditingFinished() ui->lineEditSolverParam2->setText(sci.toUpper()); switch (ui->comboBoxDefaultSolver->currentIndex()) { - case 1:// LM + case 1: // LM { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setLM_eps1(val); @@ -440,7 +446,7 @@ void TaskSketcherSolverAdvanced::onLineEditSolverParam2EditingFinished() ui->lineEditSolverParam2->onSave(); break; } - case 2:// DogLeg + case 2: // DogLeg { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setDL_tolx(val); @@ -461,7 +467,7 @@ void TaskSketcherSolverAdvanced::onLineEditRedundantSolverParam2EditingFinished( ui->lineEditRedundantSolverParam2->setText(sci.toUpper()); switch (ui->comboBoxDefaultSolver->currentIndex()) { - case 1:// LM + case 1: // LM { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setLM_eps1Redundant(val); @@ -469,7 +475,7 @@ void TaskSketcherSolverAdvanced::onLineEditRedundantSolverParam2EditingFinished( ui->lineEditRedundantSolverParam2->onSave(); break; } - case 2:// DogLeg + case 2: // DogLeg { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setDL_tolxRedundant(val); @@ -490,7 +496,7 @@ void TaskSketcherSolverAdvanced::onLineEditSolverParam3EditingFinished() ui->lineEditSolverParam3->setText(sci.toUpper()); switch (ui->comboBoxDefaultSolver->currentIndex()) { - case 1:// LM + case 1: // LM { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setLM_tau(val); @@ -498,7 +504,7 @@ void TaskSketcherSolverAdvanced::onLineEditSolverParam3EditingFinished() ui->lineEditSolverParam3->onSave(); break; } - case 2:// DogLeg + case 2: // DogLeg { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setDL_tolf(val); @@ -519,7 +525,7 @@ void TaskSketcherSolverAdvanced::onLineEditRedundantSolverParam3EditingFinished( ui->lineEditRedundantSolverParam3->setText(sci.toUpper()); switch (ui->comboBoxDefaultSolver->currentIndex()) { - case 1:// LM + case 1: // LM { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setLM_tauRedundant(val); @@ -527,7 +533,7 @@ void TaskSketcherSolverAdvanced::onLineEditRedundantSolverParam3EditingFinished( ui->lineEditRedundantSolverParam3->onSave(); break; } - case 2:// DogLeg + case 2: // DogLeg { const_cast(sketchView->getSketchObject()->getSolvedSketch()) .setDL_tolfRedundant(val); diff --git a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.h b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.h index dfb4a2331b..9644e75f29 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.h +++ b/src/Mod/Sketcher/Gui/TaskSketcherSolverAdvanced.h @@ -82,6 +82,6 @@ private: std::unique_ptr ui; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// GUI_TASKVIEW_TaskSketcherSolverAdvanced_H +#endif // GUI_TASKVIEW_TaskSketcherSolverAdvanced_H diff --git a/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp b/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp index c10b9793c7..0db1bb55d6 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp @@ -107,10 +107,14 @@ void SketcherValidation::setupConnections() &QPushButton::clicked, this, &SketcherValidation::onFixConstraintClicked); - connect( - ui->findReversed, &QPushButton::clicked, this, &SketcherValidation::onFindReversedClicked); - connect( - ui->swapReversed, &QPushButton::clicked, this, &SketcherValidation::onSwapReversedClicked); + connect(ui->findReversed, + &QPushButton::clicked, + this, + &SketcherValidation::onFindReversedClicked); + connect(ui->swapReversed, + &QPushButton::clicked, + this, + &SketcherValidation::onSwapReversedClicked); connect(ui->orientLockEnable, &QPushButton::clicked, this, @@ -143,8 +147,9 @@ void SketcherValidation::changeEvent(QEvent* e) void SketcherValidation::onFindButtonClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } double prec = Precision::Confusion(); bool ok; @@ -163,7 +168,8 @@ void SketcherValidation::onFindButtonClicked() } sketchAnalyser.detectMissingPointOnPointConstraints( - prec, !ui->checkBoxIgnoreConstruction->isChecked()); + prec, + !ui->checkBoxIgnoreConstruction->isChecked()); std::vector& vertexConstraints = sketchAnalyser.getMissingPointOnPointConstraints(); @@ -177,8 +183,9 @@ void SketcherValidation::onFindButtonClicked() hidePoints(); if (vertexConstraints.empty()) { - Gui::TranslatedNotification( - *sketch, tr("No missing coincidences"), tr("No missing coincidences found")); + Gui::TranslatedNotification(*sketch, + tr("No missing coincidences"), + tr("No missing coincidences found")); ui->fixButton->setEnabled(false); } @@ -195,8 +202,9 @@ void SketcherValidation::onFindButtonClicked() void SketcherValidation::onFixButtonClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } // undo command open App::Document* doc = sketch->getDocument(); @@ -215,32 +223,37 @@ void SketcherValidation::onFixButtonClicked() void SketcherValidation::onHighlightButtonClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } std::vector points; points = sketchAnalyser.getOpenVertices(); hidePoints(); - if (!points.empty()) + if (!points.empty()) { showPoints(points); + } } void SketcherValidation::onFindConstraintClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } if (sketch->evaluateConstraints()) { - Gui::TranslatedNotification( - *sketch, tr("No invalid constraints"), tr("No invalid constraints found")); + Gui::TranslatedNotification(*sketch, + tr("No invalid constraints"), + tr("No invalid constraints found")); ui->fixConstraint->setEnabled(false); } else { - Gui::TranslatedUserError( - *sketch, tr("Invalid constraints"), tr("Invalid constraints found")); + Gui::TranslatedUserError(*sketch, + tr("Invalid constraints"), + tr("Invalid constraints found")); ui->fixConstraint->setEnabled(true); } @@ -248,8 +261,9 @@ void SketcherValidation::onFindConstraintClicked() void SketcherValidation::onFixConstraintClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } sketch->validateConstraints(); ui->fixConstraint->setEnabled(false); @@ -257,8 +271,9 @@ void SketcherValidation::onFixConstraintClicked() void SketcherValidation::onFindReversedClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } std::vector points; const std::vector& geom = sketch->getExternalGeometry(); @@ -314,8 +329,9 @@ void SketcherValidation::onFindReversedClicked() void SketcherValidation::onSwapReversedClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } App::Document* doc = sketch->getDocument(); doc->openTransaction("Sketch porting"); @@ -334,8 +350,9 @@ void SketcherValidation::onSwapReversedClicked() void SketcherValidation::onOrientLockEnableClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } App::Document* doc = sketch->getDocument(); doc->openTransaction("Constraint orientation lock"); @@ -354,8 +371,9 @@ void SketcherValidation::onOrientLockEnableClicked() void SketcherValidation::onOrientLockDisableClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } App::Document* doc = sketch->getDocument(); doc->openTransaction("Constraint orientation unlock"); @@ -375,8 +393,9 @@ void SketcherValidation::onOrientLockDisableClicked() void SketcherValidation::onDelConstrExtrClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } int reply; reply = QMessageBox::question( @@ -387,8 +406,9 @@ void SketcherValidation::onDelConstrExtrClicked() "you want to delete the constraints?"), QMessageBox::No | QMessageBox::Yes, QMessageBox::No); - if (reply != QMessageBox::Yes) + if (reply != QMessageBox::Yes) { return; + } App::Document* doc = sketch->getDocument(); doc->openTransaction("Delete constraints"); @@ -461,21 +481,24 @@ void SketcherValidation::hidePoints() void SketcherValidation::onFindDegeneratedClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } double prec = Precision::Confusion(); int count = sketchAnalyser.detectDegeneratedGeometries(prec); if (count == 0) { - Gui::TranslatedNotification( - *sketch, tr("No degenerated geometry"), tr("No degenerated geometry found")); + Gui::TranslatedNotification(*sketch, + tr("No degenerated geometry"), + tr("No degenerated geometry found")); ui->fixDegenerated->setEnabled(false); } else { - Gui::TranslatedUserWarning( - *sketch, tr("Degenerated geometry"), tr("%1 degenerated geometry found").arg(count)); + Gui::TranslatedUserWarning(*sketch, + tr("Degenerated geometry"), + tr("%1 degenerated geometry found").arg(count)); ui->fixDegenerated->setEnabled(true); } @@ -483,8 +506,9 @@ void SketcherValidation::onFindDegeneratedClicked() void SketcherValidation::onFixDegeneratedClicked() { - if (sketch.expired()) + if (sketch.expired()) { return; + } // undo command open App::Document* doc = sketch->getDocument(); diff --git a/src/Mod/Sketcher/Gui/TaskSketcherValidation.h b/src/Mod/Sketcher/Gui/TaskSketcherValidation.h index 310e1f046c..610b4b7255 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherValidation.h +++ b/src/Mod/Sketcher/Gui/TaskSketcherValidation.h @@ -92,6 +92,6 @@ public: } }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_TASKSKETCHERVALIDATION_H +#endif // SKETCHERGUI_TASKSKETCHERVALIDATION_H diff --git a/src/Mod/Sketcher/Gui/Utils.cpp b/src/Mod/Sketcher/Gui/Utils.cpp index ebab5ccd39..8f8bfb0c77 100644 --- a/src/Mod/Sketcher/Gui/Utils.cpp +++ b/src/Mod/Sketcher/Gui/Utils.cpp @@ -48,6 +48,51 @@ using namespace std; using namespace SketcherGui; using namespace Sketcher; +bool Sketcher::isCircle(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomCircle::getClassTypeId(); +} + +bool Sketcher::isArcOfCircle(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomArcOfCircle::getClassTypeId(); +} + +bool Sketcher::isEllipse(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomEllipse::getClassTypeId(); +} + +bool Sketcher::isArcOfEllipse(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomArcOfEllipse::getClassTypeId(); +} + +bool Sketcher::isLineSegment(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomLineSegment::getClassTypeId(); +} + +bool Sketcher::isArcOfHyperbola(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId(); +} + +bool Sketcher::isArcOfParabola(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomArcOfParabola::getClassTypeId(); +} + +bool Sketcher::isBSplineCurve(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomBSplineCurve::getClassTypeId(); +} + +bool Sketcher::isPoint(const Part::Geometry& geom) +{ + return geom.getTypeId() == Part::GeomPoint::getClassTypeId(); +} + bool SketcherGui::tryAutoRecompute(Sketcher::SketchObject* obj, bool& autoremoveredundants) { ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( @@ -57,14 +102,17 @@ bool SketcherGui::tryAutoRecompute(Sketcher::SketchObject* obj, bool& autoremove // We need to make sure the solver has right redundancy information before trying to remove the // redundants. for example if a non-driving constraint has been added. - if (autoRemoveRedundants && autoRecompute) + if (autoRemoveRedundants && autoRecompute) { obj->solve(); + } - if (autoRemoveRedundants) + if (autoRemoveRedundants) { obj->autoRemoveRedundants(); + } - if (autoRecompute) + if (autoRecompute) { Gui::Command::updateActive(); + } autoremoveredundants = autoRemoveRedundants; @@ -98,8 +146,9 @@ std::string SketcherGui::getStrippedPythonExceptionString(const Base::Exception& if (msg.length() > 26 && msg.substr(0, 26) == "FreeCAD exception thrown (") { return msg.substr(26, msg.length() - 27); } - else + else { return msg; + } } bool SketcherGui::ReleaseHandler(Gui::Document* doc) @@ -121,8 +170,10 @@ bool SketcherGui::ReleaseHandler(Gui::Document* doc) return false; } -void SketcherGui::getIdsFromName(const std::string& name, const Sketcher::SketchObject* Obj, - int& GeoId, PointPos& PosId) +void SketcherGui::getIdsFromName(const std::string& name, + const Sketcher::SketchObject* Obj, + int& GeoId, + PointPos& PosId) { GeoId = GeoEnum::GeoUndef; PosId = Sketcher::PointPos::none; @@ -134,12 +185,15 @@ void SketcherGui::getIdsFromName(const std::string& name, const Sketcher::Sketch GeoId = Sketcher::GeoEnum::RtPnt; PosId = Sketcher::PointPos::start; } - else if (name.size() == 6 && name.substr(0, 6) == "H_Axis") + else if (name.size() == 6 && name.substr(0, 6) == "H_Axis") { GeoId = Sketcher::GeoEnum::HAxis; - else if (name.size() == 6 && name.substr(0, 6) == "V_Axis") + } + else if (name.size() == 6 && name.substr(0, 6) == "V_Axis") { GeoId = Sketcher::GeoEnum::VAxis; - else if (name.size() > 12 && name.substr(0, 12) == "ExternalEdge") + } + else if (name.size() > 12 && name.substr(0, 12) == "ExternalEdge") { GeoId = Sketcher::GeoEnum::RefExt + 1 - std::atoi(name.substr(12, 4000).c_str()); + } else if (name.size() > 6 && name.substr(0, 6) == "Vertex") { int VtId = std::atoi(name.substr(6, 4000).c_str()) - 1; Obj->getGeoVertexIndex(VtId, GeoId, PosId); @@ -176,65 +230,80 @@ std::vector SketcherGui::getGeoIdsOfEdgesFromNames(const Sketcher::SketchOb bool SketcherGui::checkBothExternal(int GeoId1, int GeoId2) { - if (GeoId1 == GeoEnum::GeoUndef || GeoId2 == GeoEnum::GeoUndef) + if (GeoId1 == GeoEnum::GeoUndef || GeoId2 == GeoEnum::GeoUndef) { return false; - else + } + else { return (GeoId1 < 0 && GeoId2 < 0); + } } bool SketcherGui::isPointOrSegmentFixed(const Sketcher::SketchObject* Obj, int GeoId) { const std::vector& vals = Obj->Constraints.getValues(); - if (GeoId == GeoEnum::GeoUndef) + if (GeoId == GeoEnum::GeoUndef) { return false; - else + } + else { return checkConstraint(vals, Sketcher::Block, GeoId, Sketcher::PointPos::none) || GeoId <= Sketcher::GeoEnum::RtPnt; + } } -bool SketcherGui::areBothPointsOrSegmentsFixed(const Sketcher::SketchObject* Obj, int GeoId1, +bool SketcherGui::areBothPointsOrSegmentsFixed(const Sketcher::SketchObject* Obj, + int GeoId1, int GeoId2) { const std::vector& vals = Obj->Constraints.getValues(); - if (GeoId1 == GeoEnum::GeoUndef || GeoId2 == GeoEnum::GeoUndef) + if (GeoId1 == GeoEnum::GeoUndef || GeoId2 == GeoEnum::GeoUndef) { return false; - else + } + else { return ((checkConstraint(vals, Sketcher::Block, GeoId1, Sketcher::PointPos::none) || GeoId1 <= Sketcher::GeoEnum::RtPnt) && (checkConstraint(vals, Sketcher::Block, GeoId2, Sketcher::PointPos::none) || GeoId2 <= Sketcher::GeoEnum::RtPnt)); + } } -bool SketcherGui::areAllPointsOrSegmentsFixed(const Sketcher::SketchObject* Obj, int GeoId1, - int GeoId2, int GeoId3) +bool SketcherGui::areAllPointsOrSegmentsFixed(const Sketcher::SketchObject* Obj, + int GeoId1, + int GeoId2, + int GeoId3) { const std::vector& vals = Obj->Constraints.getValues(); - if (GeoId1 == GeoEnum::GeoUndef || GeoId2 == GeoEnum::GeoUndef || GeoId3 == GeoEnum::GeoUndef) + if (GeoId1 == GeoEnum::GeoUndef || GeoId2 == GeoEnum::GeoUndef || GeoId3 == GeoEnum::GeoUndef) { return false; - else + } + else { return ((checkConstraint(vals, Sketcher::Block, GeoId1, Sketcher::PointPos::none) || GeoId1 <= Sketcher::GeoEnum::RtPnt) && (checkConstraint(vals, Sketcher::Block, GeoId2, Sketcher::PointPos::none) || GeoId2 <= Sketcher::GeoEnum::RtPnt) && (checkConstraint(vals, Sketcher::Block, GeoId3, Sketcher::PointPos::none) || GeoId3 <= Sketcher::GeoEnum::RtPnt)); + } } bool SketcherGui::isSimpleVertex(const Sketcher::SketchObject* Obj, int GeoId, PointPos PosId) { if (PosId == Sketcher::PointPos::start - && (GeoId == Sketcher::GeoEnum::HAxis || GeoId == Sketcher::GeoEnum::VAxis)) + && (GeoId == Sketcher::GeoEnum::HAxis || GeoId == Sketcher::GeoEnum::VAxis)) { return true; + } const Part::Geometry* geo = Obj->getGeometry(GeoId); - if (geo->getTypeId() == Part::GeomPoint::getClassTypeId()) + if (geo->getTypeId() == Part::GeomPoint::getClassTypeId()) { return true; - else if (PosId == Sketcher::PointPos::mid) + } + else if (PosId == Sketcher::PointPos::mid) { return true; - else + } + else { return false; + } } bool SketcherGui::isBsplineKnot(const Sketcher::SketchObject* Obj, int GeoId) @@ -243,24 +312,29 @@ bool SketcherGui::isBsplineKnot(const Sketcher::SketchObject* Obj, int GeoId) return (gf && gf->getInternalType() == Sketcher::InternalType::BSplineKnotPoint); } -bool SketcherGui::isBsplineKnotOrEndPoint(const Sketcher::SketchObject* Obj, int GeoId, +bool SketcherGui::isBsplineKnotOrEndPoint(const Sketcher::SketchObject* Obj, + int GeoId, Sketcher::PointPos PosId) { // check first using geometry facade - if (isBsplineKnot(Obj, GeoId)) + if (isBsplineKnot(Obj, GeoId)) { return true; + } const Part::Geometry* geo = Obj->getGeometry(GeoId); // end points of B-Splines are also knots if (geo->getTypeId() == Part::GeomBSplineCurve::getClassTypeId() - && (PosId == Sketcher::PointPos::start || PosId == Sketcher::PointPos::end)) + && (PosId == Sketcher::PointPos::start || PosId == Sketcher::PointPos::end)) { return true; + } return false; } -bool SketcherGui::IsPointAlreadyOnCurve(int GeoIdCurve, int GeoIdPoint, - Sketcher::PointPos PosIdPoint, Sketcher::SketchObject* Obj) +bool SketcherGui::IsPointAlreadyOnCurve(int GeoIdCurve, + int GeoIdPoint, + Sketcher::PointPos PosIdPoint, + Sketcher::SketchObject* Obj) { // This func is a "smartness" behind three-element tangent-, perp.- and angle-via-point. // We want to find out, if the point supplied by user is already on @@ -279,8 +353,9 @@ bool SketcherGui::IsPointAlreadyOnCurve(int GeoIdCurve, int GeoIdPoint, const std::vector& constraints = Obj->Constraints.getValues(); for (const auto& constraint : constraints) { if (constraint->Type == Sketcher::ConstraintType::InternalAlignment - && constraint->First == GeoIdPoint && constraint->Second == GeoIdCurve) + && constraint->First == GeoIdPoint && constraint->Second == GeoIdCurve) { return true; + } } } } @@ -293,8 +368,9 @@ bool SketcherGui::isBsplinePole(const Part::Geometry* geo) { auto gf = GeometryFacade::getFacade(geo); - if (gf) + if (gf) { return gf->getInternalType() == InternalType::BSplineControlPoint; + } THROWM(Base::ValueError, "Null geometry in isBsplinePole - please report") } @@ -308,7 +384,9 @@ bool SketcherGui::isBsplinePole(const Sketcher::SketchObject* Obj, int GeoId) } bool SketcherGui::checkConstraint(const std::vector& vals, - ConstraintType type, int geoid, PointPos pos) + ConstraintType type, + int geoid, + PointPos pos) { for (std::vector::const_iterator itc = vals.begin(); itc != vals.end(); ++itc) { @@ -333,7 +411,8 @@ double SketcherGui::GetPointAngle(const Base::Vector2d& p1, const Base::Vector2d // Set the two points on circles at minimal distance // in concentric case set points on relative X axis void SketcherGui::GetCirclesMinimalDistance(const Part::GeomCircle* circle1, - const Part::GeomCircle* circle2, Base::Vector3d& point1, + const Part::GeomCircle* circle2, + Base::Vector3d& point1, Base::Vector3d& point2) { double radius1 = circle1->getRadius(); @@ -345,13 +424,13 @@ void SketcherGui::GetCirclesMinimalDistance(const Part::GeomCircle* circle1, Base::Vector3d v = point2 - point1; double length = v.Length(); - if (length == 0) {// concentric case + if (length == 0) { // concentric case point1.x += radius1; point2.x += radius2; } else { v = v.Normalize(); - if (length <= std::max(radius1, radius2)) {// inner case + if (length <= std::max(radius1, radius2)) { // inner case if (radius1 > radius2) { point1 += v * radius1; point2 += v * radius2; @@ -361,7 +440,7 @@ void SketcherGui::GetCirclesMinimalDistance(const Part::GeomCircle* circle1, point2 += -v * radius2; } } - else {// outer case + else { // outer case point1 += v * radius1; point2 += -v * radius2; } @@ -422,12 +501,14 @@ bool SketcherGui::isSketcherBSplineActive(Gui::Document* doc, bool actsOnSelecti && doc->getInEdit()->isDerivedFrom(SketcherGui::ViewProviderSketch::getClassTypeId())) { if (static_cast(doc->getInEdit())->getSketchMode() == ViewProviderSketch::STATUS_NONE) { - if (!actsOnSelection) + if (!actsOnSelection) { return true; + } else if (Gui::Selection().countObjectsOfType( Sketcher::SketchObject::getClassTypeId()) - > 0) + > 0) { return true; + } } } } @@ -484,12 +565,13 @@ void SketcherGui::removeRedundantHorizontalVertical(Sketcher::SketchObject* pske geoId1iterator = coincidents.find(-1); if (geoId1iterator != coincidents.end()) { - if ((*geoId1iterator).second == Sketcher::PointPos::start) + if ((*geoId1iterator).second == Sketcher::PointPos::start) { orig = true; + } } } - else {// it may be that there is no constraint at all, but there is external - // geometry + else { // it may be that there is no constraint at all, but there is + // external geometry ext = (*it).GeoId < 0; orig = ((*it).GeoId == -1 && (*it).PosId == Sketcher::PointPos::start); } @@ -508,9 +590,10 @@ void SketcherGui::removeRedundantHorizontalVertical(Sketcher::SketchObject* pske detectredundant(sug2, secondext, secondorig, secondaxis); - rmvhorvert = ((firstext && secondext) || // coincident with external on both endpoints - (firstorig && secondaxis) ||// coincident origin and point on object on other - (secondorig && firstaxis)); + rmvhorvert = + ((firstext && secondext) || // coincident with external on both endpoints + (firstorig && secondaxis) || // coincident origin and point on object on other + (secondorig && firstaxis)); if (rmvhorvert) { for (std::vector::reverse_iterator it = sug2.rbegin(); @@ -518,7 +601,7 @@ void SketcherGui::removeRedundantHorizontalVertical(Sketcher::SketchObject* pske ++it) { if ((*it).Type == Sketcher::Horizontal || (*it).Type == Sketcher::Vertical) { sug2.erase(std::next(it).base()); - it = sug2.rbegin();// erase invalidates the iterator + it = sug2.rbegin(); // erase invalidates the iterator } } } @@ -526,7 +609,8 @@ void SketcherGui::removeRedundantHorizontalVertical(Sketcher::SketchObject* pske } void SketcherGui::ConstraintToAttachment(Sketcher::GeoElementId element, - Sketcher::GeoElementId attachment, double distance, + Sketcher::GeoElementId attachment, + double distance, App::DocumentObject* obj) { if (distance == 0.) { @@ -584,7 +668,7 @@ bool SketcherGui::showCursorCoords() .GetGroup("BaseApp") ->GetGroup("Preferences") ->GetGroup("Mod/Sketcher"); - return hGrp->GetBool("ShowCursorCoords", true);// true for testing. set to false for prod. + return hGrp->GetBool("ShowCursorCoords", true); // true for testing. set to false for prod. } bool SketcherGui::useSystemDecimals() @@ -622,13 +706,13 @@ std::string SketcherGui::lengthToDisplayFormat(double value, int digits) // get the numeric part of the user string QRegularExpression rxNoUnits( - QString::fromUtf8("(.*) \\D*$"));// text before space + any non digits at end of string + QString::fromUtf8("(.*) \\D*$")); // text before space + any non digits at end of string QRegularExpressionMatch match = rxNoUnits.match(qUserString); if (!match.hasMatch()) { // no units in userString? return Base::Tools::toStdString(qUserString); } - QString matched = match.captured(1);// matched is the numeric part of user string + QString matched = match.captured(1); // matched is the numeric part of user string int dpPos = matched.indexOf(QLocale().decimalPoint()); if (dpPos < 0) { // no decimal separator (ie an integer), return all the digits @@ -673,10 +757,10 @@ std::string SketcherGui::angleToDisplayFormat(double value, int digits) if (Base::UnitsApi::isMultiUnitAngle()) { // just return the user string // Coin SbString doesn't handle utf8 well, so we convert to ascii - QString schemeMinute = QString::fromUtf8("\xE2\x80\xB2");// prime symbol - QString schemeSecond = QString::fromUtf8("\xE2\x80\xB3");// double prime symbol - QString escapeMinute = QString::fromLatin1("\'"); // substitute ascii single quote - QString escapeSecond = QString::fromLatin1("\""); // substitute ascii double quote + QString schemeMinute = QString::fromUtf8("\xE2\x80\xB2"); // prime symbol + QString schemeSecond = QString::fromUtf8("\xE2\x80\xB3"); // double prime symbol + QString escapeMinute = QString::fromLatin1("\'"); // substitute ascii single quote + QString escapeSecond = QString::fromLatin1("\""); // substitute ascii double quote QString displayString = qUserString.replace(schemeMinute, escapeMinute); displayString = displayString.replace(schemeSecond, escapeSecond); return Base::Tools::toStdString(displayString); @@ -689,13 +773,13 @@ std::string SketcherGui::angleToDisplayFormat(double value, int digits) // get the numeric part of the user string QRegularExpression rxNoUnits(QString::fromUtf8("(\\d*\\%1?\\d*)(\\D*)$") - .arg(decimalSep));// number + non digits at end of string + .arg(decimalSep)); // number + non digits at end of string QRegularExpressionMatch match = rxNoUnits.match(qUserString); if (!match.hasMatch()) { // no units in userString? return Base::Tools::toStdString(qUserString); } - QString matched = match.captured(1);// matched is the numeric part of user string + QString matched = match.captured(1); // matched is the numeric part of user string int dpPos = matched.indexOf(decimalSep); if (dpPos < 0) { // no decimal separator (ie an integer), return all the digits diff --git a/src/Mod/Sketcher/Gui/Utils.h b/src/Mod/Sketcher/Gui/Utils.h index 1ce611e270..f191c8171b 100644 --- a/src/Mod/Sketcher/Gui/Utils.h +++ b/src/Mod/Sketcher/Gui/Utils.h @@ -41,7 +41,7 @@ namespace Gui { class DocumentObject; class Document; -}// namespace Gui +} // namespace Gui namespace Part { @@ -51,7 +51,18 @@ namespace Sketcher { enum class PointPos : int; class SketchObject; -}// namespace Sketcher + +bool isCircle(const Part::Geometry&); +bool isArcOfCircle(const Part::Geometry&); +bool isEllipse(const Part::Geometry&); +bool isArcOfEllipse(const Part::Geometry&); +bool isLineSegment(const Part::Geometry&); +bool isArcOfHyperbola(const Part::Geometry&); +bool isArcOfParabola(const Part::Geometry&); +bool isBSplineCurve(const Part::Geometry&); +bool isPoint(const Part::Geometry&); + +} // namespace Sketcher namespace SketcherGui { @@ -75,7 +86,9 @@ bool ReleaseHandler(Gui::Document* doc); std::string getStrippedPythonExceptionString(const Base::Exception&); -void getIdsFromName(const std::string& name, const Sketcher::SketchObject* Obj, int& GeoId, +void getIdsFromName(const std::string& name, + const Sketcher::SketchObject* Obj, + int& GeoId, Sketcher::PointPos& PosId); /// Returns ONLY the geometry elements when the "Edge" is selected (including GeomPoints) @@ -88,7 +101,9 @@ bool isPointOrSegmentFixed(const Sketcher::SketchObject* Obj, int GeoId); bool areBothPointsOrSegmentsFixed(const Sketcher::SketchObject* Obj, int GeoId1, int GeoId2); -bool areAllPointsOrSegmentsFixed(const Sketcher::SketchObject* Obj, int GeoId1, int GeoId2, +bool areAllPointsOrSegmentsFixed(const Sketcher::SketchObject* Obj, + int GeoId1, + int GeoId2, int GeoId3); bool inline isVertex(int GeoId, Sketcher::PointPos PosId); @@ -101,10 +116,13 @@ bool isSimpleVertex(const Sketcher::SketchObject* Obj, int GeoId, Sketcher::Poin bool isBsplineKnot(const Sketcher::SketchObject* Obj, int GeoId); /// Checks if the (`GeoId`, `PosId`) pair corresponds to a B-Spline knot, including first and last /// knots -bool isBsplineKnotOrEndPoint(const Sketcher::SketchObject* Obj, int GeoId, +bool isBsplineKnotOrEndPoint(const Sketcher::SketchObject* Obj, + int GeoId, Sketcher::PointPos PosId); -bool IsPointAlreadyOnCurve(int GeoIdCurve, int GeoIdPoint, Sketcher::PointPos PosIdPoint, +bool IsPointAlreadyOnCurve(int GeoIdCurve, + int GeoIdPoint, + Sketcher::PointPos PosIdPoint, Sketcher::SketchObject* Obj); bool isBsplinePole(const Part::Geometry* geo); @@ -113,8 +131,10 @@ bool isBsplinePole(const Sketcher::SketchObject* Obj, int GeoId); /// Checks whether there is a constraint of the given type with a First element geoid and a FirstPos /// PosId -bool checkConstraint(const std::vector& vals, Sketcher::ConstraintType type, - int geoid, Sketcher::PointPos pos); +bool checkConstraint(const std::vector& vals, + Sketcher::ConstraintType type, + int geoid, + Sketcher::PointPos pos); inline bool isVertex(int GeoId, Sketcher::PointPos PosId) { @@ -133,8 +153,10 @@ inline bool isEdge(int GeoId, Sketcher::PointPos PosId) double GetPointAngle(const Base::Vector2d& p1, const Base::Vector2d& p2); // Set the two points on circles at minimal distance -void GetCirclesMinimalDistance(const Part::GeomCircle* circle1, const Part::GeomCircle* circle2, - Base::Vector3d& point1, Base::Vector3d& point2); +void GetCirclesMinimalDistance(const Part::GeomCircle* circle1, + const Part::GeomCircle* circle2, + Base::Vector3d& point1, + Base::Vector3d& point2); void ActivateHandler(Gui::Document* doc, DrawSketchHandler* handler); @@ -155,8 +177,10 @@ void removeRedundantHorizontalVertical(Sketcher::SketchObject* psketch, std::vector& sug1, std::vector& sug2); -void ConstraintToAttachment(Sketcher::GeoElementId element, Sketcher::GeoElementId attachment, - double distance, App::DocumentObject* obj); +void ConstraintToAttachment(Sketcher::GeoElementId element, + Sketcher::GeoElementId attachment, + double distance, + App::DocumentObject* obj); // convenience functions for cursor coordinates bool hideUnits(); @@ -165,7 +189,7 @@ bool useSystemDecimals(); std::string lengthToDisplayFormat(double value, int digits); std::string angleToDisplayFormat(double value, int digits); -}// namespace SketcherGui +} // namespace SketcherGui /// converts a 2D vector into a 3D vector in the XY plane inline Base::Vector3d toVector3d(const Base::Vector2d& vector2d) @@ -228,4 +252,4 @@ void setSafeGeomLayerId(T geom, int layerindex) vpext->setVisualLayerId(layerindex); } -#endif// SKETCHERGUI_Recompute_H +#endif // SKETCHERGUI_Recompute_H diff --git a/src/Mod/Sketcher/Gui/ViewProviderPython.cpp b/src/Mod/Sketcher/Gui/ViewProviderPython.cpp index da2b2fee76..1200c73cfc 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderPython.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderPython.cpp @@ -97,4 +97,4 @@ PROPERTY_SOURCE_TEMPLATE(SketcherGui::ViewProviderCustomPython, SketcherGui::Vie // explicit template instantiation template class SketcherGuiExport ViewProviderPythonFeatureT; -}// namespace Gui +} // namespace Gui diff --git a/src/Mod/Sketcher/Gui/ViewProviderPython.h b/src/Mod/Sketcher/Gui/ViewProviderPython.h index ba67cec9ce..a331f49758 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderPython.h +++ b/src/Mod/Sketcher/Gui/ViewProviderPython.h @@ -49,7 +49,7 @@ protected: using ViewProviderPython = Gui::ViewProviderPythonFeatureT; using ViewProviderCustomPython = Gui::ViewProviderPythonFeatureT; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SketcherGui_VIEWPROVIDERPYTHON_H +#endif // SketcherGui_VIEWPROVIDERPYTHON_H diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.h b/src/Mod/Sketcher/Gui/ViewProviderSketch.h index 9bf7c3e068..911e51b99c 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.h +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.h @@ -83,7 +83,7 @@ namespace Sketcher class Constraint; class Sketch; class SketchObject; -}// namespace Sketcher +} // namespace Sketcher namespace SketcherGui { @@ -175,14 +175,17 @@ private: void OnChange(Base::Subject& rCaller, const char* sReason) override; private: - void updateBoolProperty(const std::string& string, App::Property* property, - bool defaultvalue); + void + updateBoolProperty(const std::string& string, App::Property* property, bool defaultvalue); void updateGridSize(const std::string& string, App::Property* property); // Only for colors outside of edit mode, edit mode colors are handled by // EditModeCoinManager. - void updateColorProperty(const std::string& string, App::Property* property, float r, - float g, float b); + void updateColorProperty(const std::string& string, + App::Property* property, + float r, + float g, + float b); void updateEscapeKeyBehaviour(const std::string& string, App::Property* property); @@ -291,14 +294,14 @@ private: return DragCurve > InvalidCurve; } - double xInit, yInit;// starting point of the dragging operation - bool relative; // whether the dragging move vector is relative or absolute + double xInit, yInit; // starting point of the dragging operation + bool relative; // whether the dragging move vector is relative or absolute - int DragPoint;// dragged point id (only positive integers) - int DragCurve;// dragged curve id (only positive integers), negative external curves cannot - // be dragged. - std::set DragConstraintSet;// dragged constraints ids + int DragPoint; // dragged point id (only positive integers) + int DragCurve; // dragged curve id (only positive integers), negative external curves + // cannot be dragged. + std::set DragConstraintSet; // dragged constraints ids }; // TODO: Selection and Preselection should use a same structure. Probably Drag should use the @@ -388,12 +391,12 @@ private: return -PreselectCurve - 2; } - int PreselectPoint;// VertexN, with N = PreselectPoint + 1, same as DragPoint indexing (NOTE - // -1 is NOT the root point) - int PreselectCurve;// EdgeN, with N = PreselectCurve + 1 for positive values ; - // ExternalEdgeN, with N = -PreselectCurve - 2 - Axes PreselectCross; // 0 => rootPoint, 1 => HAxis, 2 => VAxis - std::set PreselectConstraintSet;// ConstraintN, N = index + 1 + int PreselectPoint; // VertexN, with N = PreselectPoint + 1, same as DragPoint indexing + // (NOTE -1 is NOT the root point) + int PreselectCurve; // EdgeN, with N = PreselectCurve + 1 for positive values ; + // ExternalEdgeN, with N = -PreselectCurve - 2 + Axes PreselectCross; // 0 => rootPoint, 1 => HAxis, 2 => VAxis + std::set PreselectConstraintSet; // ConstraintN, N = index + 1 bool blockedPreselection; }; @@ -430,9 +433,9 @@ private: SelConstraintSet.clear(); } - std::set SelPointSet; // Indices as PreselectPoint (and -1 for rootpoint) - std::set SelCurvSet; // also holds cross axes at -1 and -2 - std::set SelConstraintSet;// ConstraintN, N = index + 1. + std::set SelPointSet; // Indices as PreselectPoint (and -1 for rootpoint) + std::set SelCurvSet; // also holds cross axes at -1 and -2 + std::set SelConstraintSet; // ConstraintN, N = index + 1. }; //@} @@ -441,7 +444,7 @@ private: struct DoubleClick { static SbTime prvClickTime; - static SbVec2s prvClickPos;// used by double-click-detector + static SbVec2s prvClickPos; // used by double-click-detector static SbVec2s prvCursorPos; static SbVec2s newCursorPos; }; @@ -454,8 +457,9 @@ private: bool autoRecompute = false; bool recalculateInitialSolutionWhileDragging = false; - bool isShownVirtualSpace = false;// indicates whether the present virtual space view is the - // Real Space or the Virtual Space (virtual space 1 or 2) + bool isShownVirtualSpace = + false; // indicates whether the present virtual space view is the + // Real Space or the Virtual Space (virtual space 1 or 2) bool buttonPress = false; }; @@ -624,9 +628,12 @@ public: /// is called when the Provider is in edit and a key event ocours. Only ESC ends edit. bool keyPressed(bool pressed, int key) override; /// is called when the Provider is in edit and the mouse is clicked - bool mouseButtonPressed(int Button, bool pressed, const SbVec2s& cursorPos, + bool mouseButtonPressed(int Button, + bool pressed, + const SbVec2s& cursorPos, const Gui::View3DInventorViewer* viewer) override; - bool mouseWheelEvent(int delta, const SbVec2s& cursorPos, + bool mouseWheelEvent(int delta, + const SbVec2s& cursorPos, const Gui::View3DInventorViewer* viewer) override; //@} @@ -639,8 +646,8 @@ public: /// signals if the constraints list has changed boost::signals2::signal signalConstraintsChanged; /// signals if the sketch has been set up - boost::signals2::signal + boost::signals2::signal< + void(const QString& state, const QString& msg, const QString& url, const QString& linkText)> signalSetUp; /// signals if the elements list has changed boost::signals2::signal signalElementsChanged; @@ -660,7 +667,7 @@ protected: void unsetEdit(int ModNum) override; void setEditViewer(Gui::View3DInventorViewer*, int ModNum) override; void unsetEditViewer(Gui::View3DInventorViewer*) override; - static void camSensCB(void* data, SoSensor*);// camera sensor callback + static void camSensCB(void* data, SoSensor*); // camera sensor callback void onCameraChanged(SoCamera* cam); //@} @@ -679,7 +686,8 @@ protected: /// Auxiliary function to generate messages about conflicting, redundant and malformed /// constraints - static QString appendConstraintMsg(const QString& singularmsg, const QString& pluralmsg, + static QString appendConstraintMsg(const QString& singularmsg, + const QString& pluralmsg, const std::vector& vector); //@} @@ -699,13 +707,14 @@ protected: private: /// function to handle OCCT BSpline weight calculation singularities and representation void scaleBSplinePoleCirclesAndUpdateSolverAndSketchObjectGeometry( - GeoListFacade& geolist, bool geometrywithmemoryallocation); + GeoListFacade& geolist, + bool geometrywithmemoryallocation); /** @name geometry and coordinates auxiliary functions */ //@{ /// give the coordinates of a line on the sketch plane in sketcher (2D) coordinates - void getCoordsOnSketchPlane(const SbVec3f& point, const SbVec3f& normal, double& u, - double& v) const; + void + getCoordsOnSketchPlane(const SbVec3f& point, const SbVec3f& normal, double& u, double& v) const; /// give projecting line of position void getProjectingLine(const SbVec2s&, const Gui::View3DInventorViewer* viewer, SbLine&) const; @@ -728,7 +737,8 @@ private: /** @name Selection functions */ //@{ /// box selection method - void doBoxSelection(const SbVec2s& startPos, const SbVec2s& endPos, + void doBoxSelection(const SbVec2s& startPos, + const SbVec2s& endPos, const Gui::View3DInventorViewer* viewer); void addSelectPoint(int SelectPoint); @@ -875,10 +885,10 @@ private: ViewProviderParameters viewProviderParameters; SoNodeSensor cameraSensor; - int viewOrientationFactor;// stores if sketch viewed from front or back + int viewOrientationFactor; // stores if sketch viewed from front or back }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_VIEWPROVIDERSKETCH_H +#endif // SKETCHERGUI_VIEWPROVIDERSKETCH_H diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketchCoinAttorney.h b/src/Mod/Sketcher/Gui/ViewProviderSketchCoinAttorney.h index a99db9462a..9e2296b562 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketchCoinAttorney.h +++ b/src/Mod/Sketcher/Gui/ViewProviderSketchCoinAttorney.h @@ -41,7 +41,7 @@ class Vector3; class Vector2d; class Placement; -}// namespace Base +} // namespace Base namespace Part { @@ -52,7 +52,7 @@ namespace Sketcher { class Constraint; class PropertyConstraintList; -};// namespace Sketcher +}; // namespace Sketcher namespace SketcherGui { @@ -183,7 +183,8 @@ inline QFont ViewProviderSketchCoinAttorney::getApplicationFont(const ViewProvid } inline double ViewProviderSketchCoinAttorney::getRotation(const ViewProviderSketch& vp, - SbVec3f pos0, SbVec3f pos1) + SbVec3f pos0, + SbVec3f pos1) { return vp.getRotation(pos0, pos1); } @@ -271,12 +272,13 @@ inline bool ViewProviderSketchCoinAttorney::isConstraintSelected(const ViewProvi } inline void ViewProviderSketchCoinAttorney::executeOnSelectionPointSet( - const ViewProviderSketch& vp, std::function&& operation) + const ViewProviderSketch& vp, + std::function&& operation) { vp.executeOnSelectionPointSet(std::move(operation)); } -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_ViewProviderSketchCoinAttorney_H +#endif // SKETCHERGUI_ViewProviderSketchCoinAttorney_H diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.cpp index 2b6f5185b8..05feb2c345 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.cpp @@ -68,8 +68,9 @@ void ViewProviderSketchGeometryExtension::restoreAttributes(Base::XMLReader& rea { Part::GeometryPersistenceExtension::restoreAttributes(reader); - if (reader.hasAttribute("visualLayerId")) + if (reader.hasAttribute("visualLayerId")) { VisualLayerId = reader.getAttributeAsInteger("visualLayerId"); + } } void ViewProviderSketchGeometryExtension::saveAttributes(Base::Writer& writer) const diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.h b/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.h index ba1753232e..000b508318 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.h +++ b/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtension.h @@ -82,7 +82,7 @@ private: int VisualLayerId; }; -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHER_VIEWPROVIDERSKETCHGEOMETRYEXTENSION_H +#endif // SKETCHER_VIEWPROVIDERSKETCHGEOMETRYEXTENSION_H diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPyImp.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPyImp.cpp index b236c3b426..391d4be7f8 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPyImp.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketchGeometryExtensionPyImp.cpp @@ -39,8 +39,9 @@ std::string ViewProviderSketchGeometryExtensionPy::representation() const return str.str(); } -PyObject* ViewProviderSketchGeometryExtensionPy::PyMake(struct _typeobject*, PyObject*, - PyObject*)// Python wrapper +PyObject* ViewProviderSketchGeometryExtensionPy::PyMake(struct _typeobject*, + PyObject*, + PyObject*) // Python wrapper { // create a new instance of PointPy and the Twin object return new ViewProviderSketchGeometryExtensionPy(new ViewProviderSketchGeometryExtension); diff --git a/src/Mod/Sketcher/Gui/VisualLayer.h b/src/Mod/Sketcher/Gui/VisualLayer.h index 2ab6374647..dad9b0129f 100644 --- a/src/Mod/Sketcher/Gui/VisualLayer.h +++ b/src/Mod/Sketcher/Gui/VisualLayer.h @@ -37,7 +37,8 @@ namespace SketcherGui class VisualLayer { public: - explicit VisualLayer(unsigned int linePattern = 0xFFFF, float lineWidth = 3.0, + explicit VisualLayer(unsigned int linePattern = 0xFFFF, + float lineWidth = 3.0, bool visible = true); unsigned int getLinePattern() const; @@ -68,7 +69,7 @@ bool operator==(VisualLayer const& lhs, VisualLayer const& rhs) && (lhs.visible == rhs.visible); } -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHERGUI_VisualLayer_H +#endif // SKETCHERGUI_VisualLayer_H diff --git a/src/Mod/Sketcher/Gui/Workbench.cpp b/src/Mod/Sketcher/Gui/Workbench.cpp index 8ad91a07dd..251717fb28 100644 --- a/src/Mod/Sketcher/Gui/Workbench.cpp +++ b/src/Mod/Sketcher/Gui/Workbench.cpp @@ -32,7 +32,7 @@ using namespace SketcherGui; -#if 0// needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("CommandGroup", "Sketcher"); qApp->translate("Workbench","P&rofiles"); qApp->translate("Workbench","S&ketch"); @@ -172,7 +172,7 @@ inline const QStringList nonEditModeToolbarNames() { return QStringList {QString::fromLatin1("Structure"), QString::fromLatin1("Sketcher")}; } -}// namespace +} // namespace void Workbench::activated() { @@ -441,15 +441,20 @@ inline void SketcherAddWorkbenchConstraints(Gui::ToolBarItem& << "Sketcher_ConstrainBlock" << "Separator"; if (hGrp->GetBool("SingleDimensioningTool", true)) { - cons << "Sketcher_Dimension"; + if (!hGrp->GetBool("SeparatedDimensioningTools", false)) { + cons << "Sketcher_CompDimensionTools"; + } + else { + cons << "Sketcher_Dimension"; + } } if (hGrp->GetBool("SeparatedDimensioningTools", false)) { cons << "Sketcher_ConstrainLock" - << "Sketcher_ConstrainDistanceX" - << "Sketcher_ConstrainDistanceY" - << "Sketcher_ConstrainDistance" - << "Sketcher_CompConstrainRadDia" - << "Sketcher_ConstrainAngle"; + << "Sketcher_ConstrainDistanceX" + << "Sketcher_ConstrainDistanceY" + << "Sketcher_ConstrainDistance" + << "Sketcher_CompConstrainRadDia" + << "Sketcher_ConstrainAngle"; // << "Sketcher_ConstrainSnellsLaw" // Rarely used, show only in menu } cons << "Separator" @@ -488,8 +493,9 @@ inline void SketcherAddWorkbenchTools(Gui::MenuItem& consaccel) template<> inline void SketcherAddWorkbenchTools(Gui::ToolBarItem& consaccel) { - consaccel//<< "Sketcher_SelectElementsWithDoFs" //rarely used, it is usually accessed by solver - // message. + consaccel //<< "Sketcher_SelectElementsWithDoFs" //rarely used, it is usually accessed by + // solver + // message. << "Sketcher_SelectConstraints" << "Sketcher_SelectElementsAssociatedWithConstraints" //<< "Sketcher_SelectRedundantConstraints" //rarely used, it is usually accessed by solver diff --git a/src/Mod/Sketcher/Gui/Workbench.h b/src/Mod/Sketcher/Gui/Workbench.h index ca78a23640..04ec4edc60 100644 --- a/src/Mod/Sketcher/Gui/Workbench.h +++ b/src/Mod/Sketcher/Gui/Workbench.h @@ -71,6 +71,6 @@ SketcherGuiExport void addSketcherWorkbenchBSplines(Gui::ToolBarItem& bspline); SketcherGuiExport void addSketcherWorkbenchVisual(Gui::ToolBarItem& visual); SketcherGuiExport void addSketcherWorkbenchEditTools(Gui::ToolBarItem& edittools); -}// namespace SketcherGui +} // namespace SketcherGui -#endif// SKETCHER_WORKBENCH_H +#endif // SKETCHER_WORKBENCH_H diff --git a/src/Mod/Sketcher/InitGui.py b/src/Mod/Sketcher/InitGui.py index 1b2ae6f8a0..f1395481e3 100644 --- a/src/Mod/Sketcher/InitGui.py +++ b/src/Mod/Sketcher/InitGui.py @@ -33,8 +33,7 @@ class SketcherWorkbench(Workbench): def __init__(self): self.__class__.Icon = ( - FreeCAD.getResourceDir() - + "Mod/Sketcher/Resources/icons/SketcherWorkbench.svg" + FreeCAD.getResourceDir() + "Mod/Sketcher/Resources/icons/SketcherWorkbench.svg" ) self.__class__.MenuText = "Sketcher" self.__class__.ToolTip = "Sketcher workbench" diff --git a/src/Mod/Sketcher/ProfileLib/Hexagon.py b/src/Mod/Sketcher/ProfileLib/Hexagon.py index 0b881e9412..7c34d536c9 100644 --- a/src/Mod/Sketcher/ProfileLib/Hexagon.py +++ b/src/Mod/Sketcher/ProfileLib/Hexagon.py @@ -1,64 +1,64 @@ -#*************************************************************************** -#* Copyright (c) 2014 Juergen Riegel * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2014 Juergen Riegel * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import FreeCAD, FreeCADGui, Sketcher, Part -__title__="Hexagon profile lib" +__title__ = "Hexagon profile lib" __author__ = "Juergen Riegel" __url__ = "http://www.freecad.org" App = FreeCAD Gui = FreeCADGui + def makeHexagonSimple(sketchName=None): if not sketchName: - sketch = App.ActiveDocument.addObject("Sketcher::SketchObject","Hexagon") + sketch = App.ActiveDocument.addObject("Sketcher::SketchObject", "Hexagon") else: sketch = App.ActiveDocument.getObject(sketchName) geoList = [] - geoList.append(Part.LineSegment(App.Vector(-20.00,34.64,0),App.Vector(20.00,34.64,0))) - geoList.append(Part.LineSegment(App.Vector(20.00,34.64,0),App.Vector(47.082363,0.00,0))) - geoList.append(Part.LineSegment(App.Vector(40.00,0.00,0),App.Vector(20.00,-34.64,0))) - geoList.append(Part.LineSegment(App.Vector(20.00,-34.64,0),App.Vector(-20.00,-34.64,0))) - geoList.append(Part.LineSegment(App.Vector(-20.00,-34.64,0),App.Vector(-40.00,0.00,0))) - geoList.append(Part.LineSegment(App.Vector(-40.00,0.00,0),App.Vector(-20.00,34.64,0))) - (l1,l2,l3,l4,l5,l6) = sketch.addGeometry(geoList) + geoList.append(Part.LineSegment(App.Vector(-20.00, 34.64, 0), App.Vector(20.00, 34.64, 0))) + geoList.append(Part.LineSegment(App.Vector(20.00, 34.64, 0), App.Vector(47.082363, 0.00, 0))) + geoList.append(Part.LineSegment(App.Vector(40.00, 0.00, 0), App.Vector(20.00, -34.64, 0))) + geoList.append(Part.LineSegment(App.Vector(20.00, -34.64, 0), App.Vector(-20.00, -34.64, 0))) + geoList.append(Part.LineSegment(App.Vector(-20.00, -34.64, 0), App.Vector(-40.00, 0.00, 0))) + geoList.append(Part.LineSegment(App.Vector(-40.00, 0.00, 0), App.Vector(-20.00, 34.64, 0))) + (l1, l2, l3, l4, l5, l6) = sketch.addGeometry(geoList) conList = [] - conList.append(Sketcher.Constraint('Coincident',l1,2,l2,1)) - conList.append(Sketcher.Constraint('Coincident',l2,2,l3,1)) - conList.append(Sketcher.Constraint('Coincident',l3,2,l4,1)) - conList.append(Sketcher.Constraint('Coincident',l4,2,l5,1)) - conList.append(Sketcher.Constraint('Coincident',l5,2,l6,1)) - conList.append(Sketcher.Constraint('Coincident',l6,2,l1,1)) - conList.append(Sketcher.Constraint('Equal',l1,l2)) - conList.append(Sketcher.Constraint('Equal',l2,l3)) - conList.append(Sketcher.Constraint('Equal',l3,l4)) - conList.append(Sketcher.Constraint('Equal',l4,l5)) - conList.append(Sketcher.Constraint('Equal',l5,l6)) - conList.append(Sketcher.Constraint('Angle',l1,2,l2,1,App.Units.Quantity('120.000000 deg'))) - conList.append(Sketcher.Constraint('Angle',l3,2,l4,1,App.Units.Quantity('120.000000 deg'))) - conList.append(Sketcher.Constraint('Angle',l5,2,l6,1,App.Units.Quantity('120.000000 deg'))) + conList.append(Sketcher.Constraint("Coincident", l1, 2, l2, 1)) + conList.append(Sketcher.Constraint("Coincident", l2, 2, l3, 1)) + conList.append(Sketcher.Constraint("Coincident", l3, 2, l4, 1)) + conList.append(Sketcher.Constraint("Coincident", l4, 2, l5, 1)) + conList.append(Sketcher.Constraint("Coincident", l5, 2, l6, 1)) + conList.append(Sketcher.Constraint("Coincident", l6, 2, l1, 1)) + conList.append(Sketcher.Constraint("Equal", l1, l2)) + conList.append(Sketcher.Constraint("Equal", l2, l3)) + conList.append(Sketcher.Constraint("Equal", l3, l4)) + conList.append(Sketcher.Constraint("Equal", l4, l5)) + conList.append(Sketcher.Constraint("Equal", l5, l6)) + conList.append(Sketcher.Constraint("Angle", l1, 2, l2, 1, App.Units.Quantity("120.000000 deg"))) + conList.append(Sketcher.Constraint("Angle", l3, 2, l4, 1, App.Units.Quantity("120.000000 deg"))) + conList.append(Sketcher.Constraint("Angle", l5, 2, l6, 1, App.Units.Quantity("120.000000 deg"))) sketch.addConstraint(conList) return - diff --git a/src/Mod/Sketcher/ProfileLib/RegularPolygon.py b/src/Mod/Sketcher/ProfileLib/RegularPolygon.py index 2eb3cc2ba5..7ec90e1b16 100644 --- a/src/Mod/Sketcher/ProfileLib/RegularPolygon.py +++ b/src/Mod/Sketcher/ProfileLib/RegularPolygon.py @@ -1,41 +1,43 @@ -#*************************************************************************** -#* Copyright (c) 2014 Johan Kristensen * -#* Copyright (c) 2014 Juergen Riegel * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2014 Johan Kristensen * +# * Copyright (c) 2014 Juergen Riegel * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import FreeCAD, FreeCADGui, Sketcher, Part, math -__title__="Regular polygon profile lib" +__title__ = "Regular polygon profile lib" __author__ = "Johan Kristensen" __url__ = "http://www.freecad.org" App = FreeCAD Gui = FreeCADGui + def makeRegularPolygon( - sketch, - sides, - centerPoint=App.Vector(0,0,0), - firstCornerPoint=App.Vector(-20.00,34.64,0), - construction=False): + sketch, + sides, + centerPoint=App.Vector(0, 0, 0), + firstCornerPoint=App.Vector(-20.00, 34.64, 0), + construction=False, +): if not sketch: App.Console.PrintError("No sketch specified in 'makeRegularPolygon'") @@ -46,40 +48,34 @@ def makeRegularPolygon( diffVec = firstCornerPoint - centerPoint diffVec.z = 0 - angular_diff = 2*math.pi/sides + angular_diff = 2 * math.pi / sides pointList = [] - for i in range(0,sides): - cos_v = math.cos( angular_diff * i ) - sin_v = math.sin( angular_diff * i ) - pointList.append( centerPoint+ - App.Vector( - cos_v * diffVec.x - sin_v * diffVec.y, - cos_v * diffVec.y + sin_v * diffVec.x, - 0 )) + for i in range(0, sides): + cos_v = math.cos(angular_diff * i) + sin_v = math.sin(angular_diff * i) + pointList.append( + centerPoint + + App.Vector( + cos_v * diffVec.x - sin_v * diffVec.y, cos_v * diffVec.y + sin_v * diffVec.x, 0 + ) + ) geoList = [] - for i in range(0,sides-1): - geoList.append(Part.LineSegment(pointList[i],pointList[i+1])) - geoList.append(Part.LineSegment(pointList[sides-1],pointList[0])) - geoList.append(Part.Circle(centerPoint,App.Vector(0,0,1),diffVec.Length)) - geoIndices = sketch.addGeometry(geoList,construction) + for i in range(0, sides - 1): + geoList.append(Part.LineSegment(pointList[i], pointList[i + 1])) + geoList.append(Part.LineSegment(pointList[sides - 1], pointList[0])) + geoList.append(Part.Circle(centerPoint, App.Vector(0, 0, 1), diffVec.Length)) + geoIndices = sketch.addGeometry(geoList, construction) - sketch.setConstruction(geoIndices[-1],True) + sketch.setConstruction(geoIndices[-1], True) conList = [] - for i in range(0,sides-1): - conList.append(Sketcher.Constraint( - 'Coincident', - geoIndices[i],2, - geoIndices[i+1],1)) - conList.append(Sketcher.Constraint( - 'Coincident', - geoIndices[sides-1],2, - geoIndices[0],1)) - for i in range(0,sides-1): - conList.append(Sketcher.Constraint('Equal',geoIndices[0],geoIndices[i+1])) - for i in range(0,sides): - conList.append(Sketcher.Constraint('PointOnObject',geoIndices[i],2,geoIndices[-1])) + for i in range(0, sides - 1): + conList.append(Sketcher.Constraint("Coincident", geoIndices[i], 2, geoIndices[i + 1], 1)) + conList.append(Sketcher.Constraint("Coincident", geoIndices[sides - 1], 2, geoIndices[0], 1)) + for i in range(0, sides - 1): + conList.append(Sketcher.Constraint("Equal", geoIndices[0], geoIndices[i + 1])) + for i in range(0, sides): + conList.append(Sketcher.Constraint("PointOnObject", geoIndices[i], 2, geoIndices[-1])) sketch.addConstraint(conList) return - diff --git a/src/Mod/Sketcher/Profiles.py b/src/Mod/Sketcher/Profiles.py index 3f1528cf22..7ee77a5ea1 100644 --- a/src/Mod/Sketcher/Profiles.py +++ b/src/Mod/Sketcher/Profiles.py @@ -69,9 +69,7 @@ class _CommandProfileHexagon1: FreeCADGui.addModule("ProfileLib.Hexagon") sketch = getSketch() if not sketch is None: - FreeCADGui.doCommand( - "ProfileLib.Hexagon.makeHexagonSimple('%s')" % (sketch.Name) - ) + FreeCADGui.doCommand("ProfileLib.Hexagon.makeHexagonSimple('%s')" % (sketch.Name)) else: FreeCADGui.doCommand("ProfileLib.Hexagon.makeHexagonSimple()") FreeCAD.ActiveDocument.recompute() diff --git a/src/Mod/Sketcher/SketcherGlobal.h b/src/Mod/Sketcher/SketcherGlobal.h index adb3517a93..ac7544489b 100644 --- a/src/Mod/Sketcher/SketcherGlobal.h +++ b/src/Mod/Sketcher/SketcherGlobal.h @@ -44,4 +44,4 @@ #endif #endif -#endif// SKETCHER_GLOBAL_H +#endif // SKETCHER_GLOBAL_H diff --git a/src/Mod/Sketcher/Templates/Sketch.skf b/src/Mod/Sketcher/Templates/Sketch.skf index 9edf1a21ae..cdf06d0e81 100644 --- a/src/Mod/Sketcher/Templates/Sketch.skf +++ b/src/Mod/Sketcher/Templates/Sketch.skf @@ -8,4 +8,3 @@ PARAM 83ff0001 0.000000000 LAYER 00000001 Layer00000001 1 - diff --git a/src/Mod/Sketcher/sketcher.dox b/src/Mod/Sketcher/sketcher.dox index 16d05619e5..8390e4c77c 100644 --- a/src/Mod/Sketcher/sketcher.dox +++ b/src/Mod/Sketcher/sketcher.dox @@ -2,4 +2,3 @@ * \ingroup CWORKBENCHES * \brief Constrained 2D objects */ - diff --git a/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp b/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp index 8b1ac253ed..d6a58b01cd 100644 --- a/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp +++ b/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp @@ -30,13 +30,15 @@ #include "Sheet.h" -namespace Spreadsheet { -class Module : public Py::ExtensionModule +namespace Spreadsheet +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Spreadsheet") + Module() + : Py::ExtensionModule("Spreadsheet") { - initialize("This module is the Spreadsheet module."); // register with Python + initialize("This module is the Spreadsheet module."); // register with Python } private: @@ -46,7 +48,7 @@ PyObject* initModule() { return Base::Interpreter().addModule(new Module); } -} // namespace Spreadsheet +} // namespace Spreadsheet /* Python entry */ PyMOD_INIT_FUNC(Spreadsheet) diff --git a/src/Mod/Spreadsheet/App/Cell.cpp b/src/Mod/Spreadsheet/App/Cell.cpp index 298250fac6..cfa099f8c1 100644 --- a/src/Mod/Spreadsheet/App/Cell.cpp +++ b/src/Mod/Spreadsheet/App/Cell.cpp @@ -23,11 +23,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -55,19 +55,22 @@ using namespace Spreadsheet; ///////////////////////////////////////////////////////// // expose the read() function for simpler partial xml reading in setExpression() -class ReaderPrivate: public Base::XMLReader { +class ReaderPrivate: public Base::XMLReader +{ public: - ReaderPrivate(const char* FileName, std::istream &is) - :XMLReader(FileName,is) + ReaderPrivate(const char* FileName, std::istream& is) + : XMLReader(FileName, is) {} - bool read() { + bool read() + { return XMLReader::read(); } }; /////////////////////////////////////////////////////////// +// clang-format off const int Cell::EXPRESSION_SET = 1; const int Cell::ALIGNMENT_SET = 4; const int Cell::STYLE_SET = 8; @@ -93,15 +96,16 @@ const int Cell::ALIGNMENT_VCENTER = 0x20; const int Cell::ALIGNMENT_BOTTOM = 0x40; const int Cell::ALIGNMENT_VIMPLIED = 0x80; const int Cell::ALIGNMENT_VERTICAL = 0xf0; +// clang-format on /** - * Construct a CellContent object. - * @param _address The address of the cell (i.e. row and column) - * @param _owner The spreadsheet that owns this cell. - * - */ + * Construct a CellContent object. + * @param _address The address of the cell (i.e. row and column) + * @param _owner The spreadsheet that owns this cell. + * + */ -Cell::Cell(const CellAddress &_address, PropertySheet *_owner) +Cell::Cell(const CellAddress& _address, PropertySheet* _owner) : address(_address) , owner(_owner) , used(0) @@ -119,7 +123,7 @@ Cell::Cell(const CellAddress &_address, PropertySheet *_owner) assert(address.isValid()); } -Cell::Cell(PropertySheet *_owner, const Cell &other) +Cell::Cell(PropertySheet* _owner, const Cell& other) : address(other.address) , owner(_owner) , used(other.used) @@ -138,7 +142,7 @@ Cell::Cell(PropertySheet *_owner, const Cell &other) setDirty(); } -Cell &Cell::operator =(const Cell &rhs) +Cell& Cell::operator=(const Cell& rhs) { PropertySheet::AtomicPropertyChange signaller(*owner); @@ -162,18 +166,18 @@ Cell &Cell::operator =(const Cell &rhs) } /** - * Destroy a CellContent object. - * - */ + * Destroy a CellContent object. + * + */ Cell::~Cell() = default; /** - * Set the expression tree to \a expr. - * - */ + * Set the expression tree to \a expr. + * + */ -void Cell::setExpression(App::ExpressionPtr &&expr) +void Cell::setExpression(App::ExpressionPtr&& expr) { PropertySheet::AtomicPropertyChange signaller(*owner); @@ -182,21 +186,23 @@ void Cell::setExpression(App::ExpressionPtr &&expr) /* Remove dependencies */ owner->removeDependencies(address); - if(expr && !expr->comment.empty()) { - if(!boost::starts_with(expr->comment,"sheet()->getFullName() << '.' << address.toString()); + if (expr && !expr->comment.empty()) { + if (!boost::starts_with(expr->comment, "sheet()->getFullName() << '.' + << address.toString()); + } else { try { std::istringstream in(expr->comment); ReaderPrivate reader("", in); reader.read(); - restore(reader,true); - }catch(Base::Exception &e) { + restore(reader, true); + } + catch (Base::Exception& e) { e.ReportException(); - FC_ERR("Failed to restore style of cell " - << owner->sheet()->getFullName() << '.' - << address.toString() << ": " << e.what()); + FC_ERR("Failed to restore style of cell " << owner->sheet()->getFullName() << '.' + << address.toString() << ": " + << e.what()); } } expr->comment.clear(); @@ -212,23 +218,18 @@ void Cell::setExpression(App::ExpressionPtr &&expr) } /** - * Get the expression tree. - * - */ + * Get the expression tree. + * + */ -const App::Expression *Cell::getExpression(bool withFormat) const +const App::Expression* Cell::getExpression(bool withFormat) const { - if(withFormat && expression) { - if((used & (ALIGNMENT_SET - | STYLE_SET - | FOREGROUND_COLOR_SET - | BACKGROUND_COLOR_SET - | DISPLAY_UNIT_SET - | ALIAS_SET - | SPANS_SET))) - { + if (withFormat && expression) { + if ((used + & (ALIGNMENT_SET | STYLE_SET | FOREGROUND_COLOR_SET | BACKGROUND_COLOR_SET + | DISPLAY_UNIT_SET | ALIAS_SET | SPANS_SET))) { std::ostringstream ss; - save(ss,"",true); + save(ss, "", true); expression->comment = ss.str(); } } @@ -236,26 +237,30 @@ const App::Expression *Cell::getExpression(bool withFormat) const } /** - * Get string content. - * - */ + * Get string content. + * + */ -bool Cell::getStringContent(std::string & s, bool persistent) const +bool Cell::getStringContent(std::string& s, bool persistent) const { if (expression) { s.clear(); - if(expression->hasComponent()) + if (expression->hasComponent()) { s = "=" + expression->toString(persistent); + } else if (freecad_dynamic_cast(expression.get())) { s = static_cast(expression.get())->getText(); s = "'" + s; } - else if (freecad_dynamic_cast(expression.get())) + else if (freecad_dynamic_cast(expression.get())) { s = "=" + expression->toString(); - else if (freecad_dynamic_cast(expression.get())) + } + else if (freecad_dynamic_cast(expression.get())) { s = expression->toString(); - else + } + else { s = "=" + expression->toString(persistent); + } return true; } @@ -265,13 +270,15 @@ bool Cell::getStringContent(std::string & s, bool persistent) const } } -void Cell::afterRestore() { +void Cell::afterRestore() +{ auto expr = freecad_dynamic_cast(expression.get()); - if(expr) + if (expr) { setContent(expr->getText().c_str()); + } } -void Cell::setContent(const char * value) +void Cell::setContent(const char* value) { PropertySheet::AtomicPropertyChange signaller(*owner); ExpressionPtr newExpr; @@ -279,8 +286,9 @@ void Cell::setContent(const char * value) clearException(); if (value) { if (owner->sheet()->isRestoring()) { - if (value[0] == '\0' || (value[0] == '\'' && value[1] == '\0')) + if (value[0] == '\0' || (value[0] == '\'' && value[1] == '\0')) { return; + } expression = std::make_unique(owner->sheet(), value); setUsed(EXPRESSION_SET, true); return; @@ -289,26 +297,29 @@ void Cell::setContent(const char * value) try { newExpr = ExpressionPtr(App::ExpressionParser::parse(owner->sheet(), value + 1)); } - catch (Base::Exception & e) { + catch (Base::Exception& e) { newExpr = std::make_unique(owner->sheet(), value); setParseException(e.what()); } } else if (*value == '\'') { - if (value[1] == '\0') + if (value[1] == '\0') { value = nullptr; - else + } + else { newExpr = std::make_unique(owner->sheet(), value + 1); + } } else if (*value != '\0') { // check if value is just a number - char * end; + char* end; errno = 0; const double float_value = strtod(value, &end); if (errno == 0) { const bool isEndEmpty = *end == '\0' || strspn(end, " \t\n\r") == strlen(end); if (isEndEmpty) { - newExpr = std::make_unique(owner->sheet(), Quantity(float_value)); + newExpr = std::make_unique(owner->sheet(), + Quantity(float_value)); } } @@ -318,10 +329,13 @@ void Cell::setContent(const char * value) try { ExpressionPtr parsedExpr(App::ExpressionParser::parse(owner->sheet(), value)); - if (const auto fraction = freecad_dynamic_cast(parsedExpr.get())) { + if (const auto fraction = + freecad_dynamic_cast(parsedExpr.get())) { if (fraction->getOperator() == OperatorExpression::UNIT) { - const auto left = freecad_dynamic_cast(fraction->getLeft()); - const auto right = freecad_dynamic_cast(fraction->getRight()); + const auto left = + freecad_dynamic_cast(fraction->getLeft()); + const auto right = + freecad_dynamic_cast(fraction->getRight()); if (left && right) { newExpr = std::move(parsedExpr); } @@ -331,33 +345,44 @@ void Cell::setContent(const char * value) // 1/2, 1m/2, 1/2s, 1m/2s, 1/m // check for numbers in (de)nominator - const bool isNumberNom = freecad_dynamic_cast(fraction->getLeft()); - const bool isNumberDenom = freecad_dynamic_cast(fraction->getRight()); + const bool isNumberNom = + freecad_dynamic_cast(fraction->getLeft()); + const bool isNumberDenom = + freecad_dynamic_cast(fraction->getRight()); // check for numbers with units in (de)nominator - const auto opNom = freecad_dynamic_cast(fraction->getLeft()); - const auto opDenom = freecad_dynamic_cast(fraction->getRight()); - const bool isQuantityNom = opNom && opNom->getOperator() == OperatorExpression::UNIT; - const bool isQuantityDenom = opDenom && opDenom->getOperator() == OperatorExpression::UNIT; + const auto opNom = + freecad_dynamic_cast(fraction->getLeft()); + const auto opDenom = + freecad_dynamic_cast(fraction->getRight()); + const bool isQuantityNom = + opNom && opNom->getOperator() == OperatorExpression::UNIT; + const bool isQuantityDenom = + opDenom && opDenom->getOperator() == OperatorExpression::UNIT; // check for units in denomainator - const auto uDenom = freecad_dynamic_cast(fraction->getRight()); - const bool isUnitDenom = uDenom && uDenom->getTypeId() == UnitExpression::getClassTypeId(); + const auto uDenom = + freecad_dynamic_cast(fraction->getRight()); + const bool isUnitDenom = + uDenom && uDenom->getTypeId() == UnitExpression::getClassTypeId(); const bool isNomValid = isNumberNom || isQuantityNom; - const bool isDenomValid = isNumberDenom || isQuantityDenom || isUnitDenom; + const bool isDenomValid = + isNumberDenom || isQuantityDenom || isUnitDenom; if (isNomValid && isDenomValid) { newExpr = std::move(parsedExpr); } } } - else if (const auto number = freecad_dynamic_cast(parsedExpr.get())) { + else if (const auto number = + freecad_dynamic_cast(parsedExpr.get())) { // NumbersExpressions can accept more than can be parsed with strtod. // Example: 12.34 and 12,34 are both valid NumberExpressions newExpr = std::move(parsedExpr); } } - catch (...) {} + catch (...) { + } } } @@ -368,17 +393,18 @@ void Cell::setContent(const char * value) // trying to add an empty string will make newExpr = nullptr } - // set expression, or delete the current expression by setting nullptr if empty string was entered + // set expression, or delete the current expression by setting nullptr if empty string was + // entered setExpression(std::move(newExpr)); signaller.tryInvoke(); } /** - * Set alignment of this cell. Alignment is the or'ed value of - * vertical and horizontal alignment, given by the constants - * defined in the class. - * - */ + * Set alignment of this cell. Alignment is the or'ed value of + * vertical and horizontal alignment, given by the constants + * defined in the class. + * + */ void Cell::setAlignment(int _alignment) { @@ -386,29 +412,32 @@ void Cell::setAlignment(int _alignment) PropertySheet::AtomicPropertyChange signaller(*owner); alignment = _alignment; - setUsed(ALIGNMENT_SET, alignment != (ALIGNMENT_HIMPLIED | ALIGNMENT_LEFT | ALIGNMENT_VIMPLIED | ALIGNMENT_VCENTER)); + setUsed( + ALIGNMENT_SET, + alignment + != (ALIGNMENT_HIMPLIED | ALIGNMENT_LEFT | ALIGNMENT_VIMPLIED | ALIGNMENT_VCENTER)); setDirty(); signaller.tryInvoke(); } } /** - * Get alignment. - * - */ + * Get alignment. + * + */ -bool Cell::getAlignment(int & _alignment) const +bool Cell::getAlignment(int& _alignment) const { _alignment = alignment; return isUsed(ALIGNMENT_SET); } /** - * Set style to the given set \a _style. - * - */ + * Set style to the given set \a _style. + * + */ -void Cell::setStyle(const std::set & _style) +void Cell::setStyle(const std::set& _style) { if (_style != style) { PropertySheet::AtomicPropertyChange signaller(*owner); @@ -422,22 +451,22 @@ void Cell::setStyle(const std::set & _style) } /** - * Get the style of the cell. - * - */ + * Get the style of the cell. + * + */ -bool Cell::getStyle(std::set & _style) const +bool Cell::getStyle(std::set& _style) const { _style = style; return isUsed(STYLE_SET); } /** - * Set foreground (i.e text) color of the cell to \a color. - * - */ + * Set foreground (i.e text) color of the cell to \a color. + * + */ -void Cell::setForeground(const App::Color &color) +void Cell::setForeground(const App::Color& color) { if (color != foregroundColor) { PropertySheet::AtomicPropertyChange signaller(*owner); @@ -451,22 +480,22 @@ void Cell::setForeground(const App::Color &color) } /** - * Get foreground color of the cell. - * - */ + * Get foreground color of the cell. + * + */ -bool Cell::getForeground(App::Color &color) const +bool Cell::getForeground(App::Color& color) const { color = foregroundColor; return isUsed(FOREGROUND_COLOR_SET); } /** - * Set background color of the cell to \a color. - * - */ + * Set background color of the cell to \a color. + * + */ -void Cell::setBackground(const App::Color &color) +void Cell::setBackground(const App::Color& color) { if (color != backgroundColor) { PropertySheet::AtomicPropertyChange signaller(*owner); @@ -480,31 +509,33 @@ void Cell::setBackground(const App::Color &color) } /** - * Get the background color of the cell into \a color. - * - * @returns true if the background color was previously set. - * - */ + * Get the background color of the cell into \a color. + * + * @returns true if the background color was previously set. + * + */ -bool Cell::getBackground(App::Color &color) const +bool Cell::getBackground(App::Color& color) const { color = backgroundColor; return isUsed(BACKGROUND_COLOR_SET); } /** - * Set the display unit for the cell. - * - */ + * Set the display unit for the cell. + * + */ -void Cell::setDisplayUnit(const std::string &unit) +void Cell::setDisplayUnit(const std::string& unit) { DisplayUnit newDisplayUnit; if (!unit.empty()) { - std::shared_ptr e(ExpressionParser::parseUnit(owner->sheet(), unit.c_str())); + std::shared_ptr e( + ExpressionParser::parseUnit(owner->sheet(), unit.c_str())); - if (!e) + if (!e) { throw Base::UnitsMismatchError("Invalid unit"); + } newDisplayUnit = DisplayUnit(unit, e->getUnit(), e->getScaler()); } @@ -520,19 +551,19 @@ void Cell::setDisplayUnit(const std::string &unit) } /** - * Get the display unit for the cell into unit. - * - * @returns true if the display unit was previously set. - * - */ + * Get the display unit for the cell into unit. + * + * @returns true if the display unit was previously set. + * + */ -bool Cell::getDisplayUnit(DisplayUnit &unit) const +bool Cell::getDisplayUnit(DisplayUnit& unit) const { unit = displayUnit; return isUsed(DISPLAY_UNIT_SET); } -void Cell::setAlias(const std::string &n) +void Cell::setAlias(const std::string& n) { if (alias != n) { PropertySheet::AtomicPropertyChange signaller(*owner); @@ -550,7 +581,7 @@ void Cell::setAlias(const std::string &n) if (!alias.empty()) { // The property may have been added in Sheet::updateAlias - auto * docObj = static_cast(owner->getContainer()); + auto* docObj = static_cast(owner->getContainer()); docObj->removeDynamicProperty(alias.c_str()); } @@ -563,18 +594,18 @@ void Cell::setAlias(const std::string &n) } } -bool Cell::getAlias(std::string &n) const +bool Cell::getAlias(std::string& n) const { n = alias; return isUsed(ALIAS_SET); } /** - * Set the computed unit for the cell to \a unit. - * - */ + * Set the computed unit for the cell to \a unit. + * + */ -void Cell::setComputedUnit(const Base::Unit &unit) +void Cell::setComputedUnit(const Base::Unit& unit) { PropertySheet::AtomicPropertyChange signaller(*owner); @@ -586,23 +617,23 @@ void Cell::setComputedUnit(const Base::Unit &unit) } /** - * Get the computed unit into \a unit. - * - * @returns true if the computed unit was previously set. - * - */ + * Get the computed unit into \a unit. + * + * @returns true if the computed unit was previously set. + * + */ -bool Cell::getComputedUnit(Base::Unit & unit) const +bool Cell::getComputedUnit(Base::Unit& unit) const { unit = computedUnit; return isUsed(COMPUTED_UNIT_SET); } /** - * Set the cell's row and column span to \a rows and \a columns. This - * is done when cells are merged. - * - */ + * Set the cell's row and column span to \a rows and \a columns. This + * is done when cells are merged. + * + */ void Cell::setSpans(int rows, int columns) { @@ -611,49 +642,46 @@ void Cell::setSpans(int rows, int columns) rowSpan = (rows == -1 ? 1 : rows); colSpan = (columns == -1 ? 1 : columns); - setUsed(SPANS_SET, (rowSpan != 1 || colSpan != 1) ); + setUsed(SPANS_SET, (rowSpan != 1 || colSpan != 1)); setDirty(); signaller.tryInvoke(); } } /** - * Get the row and column spans for the cell into \a rows and \a columns. - * - */ + * Get the row and column spans for the cell into \a rows and \a columns. + * + */ -bool Cell::getSpans(int &rows, int &columns) const +bool Cell::getSpans(int& rows, int& columns) const { rows = rowSpan; columns = colSpan; return isUsed(SPANS_SET); } -void Cell::setException(const std::string &e, bool silent) +void Cell::setException(const std::string& e, bool silent) { - if(!silent && !e.empty() && owner && owner->sheet()) { - FC_ERR(owner->sheet()->getFullName() << '.' - << address.toString() << ": " << e); + if (!silent && !e.empty() && owner && owner->sheet()) { + FC_ERR(owner->sheet()->getFullName() << '.' << address.toString() << ": " << e); } exceptionStr = e; setUsed(EXCEPTION_SET); } -void Cell::setParseException(const std::string &e) +void Cell::setParseException(const std::string& e) { - if(!e.empty() && owner && owner->sheet()) { - FC_ERR(owner->sheet()->getFullName() << '.' - << address.toString() << ": " << e); + if (!e.empty() && owner && owner->sheet()) { + FC_ERR(owner->sheet()->getFullName() << '.' << address.toString() << ": " << e); } exceptionStr = e; setUsed(PARSE_EXCEPTION_SET); } -void Cell::setResolveException(const std::string &e) +void Cell::setResolveException(const std::string& e) { - if(!e.empty() && owner && owner->sheet()) { - FC_LOG(owner->sheet()->getFullName() << '.' - << address.toString() << ": " << e); + if (!e.empty() && owner && owner->sheet()) { + FC_LOG(owner->sheet()->getFullName() << '.' << address.toString() << ": " << e); } exceptionStr = e; setUsed(RESOLVE_EXCEPTION_SET); @@ -674,20 +702,22 @@ void Cell::clearException() void Cell::clearDirty() { - if(owner) + if (owner) { owner->clearDirty(address); + } } void Cell::setDirty() { - if(owner) + if (owner) { owner->setDirty(address); + } } /** - * Move the cell to a new position given by \a _row and \a _col. - * - */ + * Move the cell to a new position given by \a _row and \a _col. + * + */ void Cell::moveAbsolute(CellAddress newAddress) { @@ -695,23 +725,28 @@ void Cell::moveAbsolute(CellAddress newAddress) } /** - * Restore cell contents from \a reader. - * - */ + * Restore cell contents from \a reader. + * + */ -void Cell::restore(Base::XMLReader &reader, bool checkAlias) +void Cell::restore(Base::XMLReader& reader, bool checkAlias) { const char* style = reader.hasAttribute("style") ? reader.getAttribute("style") : nullptr; - const char* alignment = reader.hasAttribute("alignment") ? reader.getAttribute("alignment") : nullptr; + const char* alignment = + reader.hasAttribute("alignment") ? reader.getAttribute("alignment") : nullptr; const char* content = reader.hasAttribute("content") ? reader.getAttribute("content") : ""; - const char* foregroundColor = reader.hasAttribute("foregroundColor") ? reader.getAttribute("foregroundColor") : nullptr; - const char* backgroundColor = reader.hasAttribute("backgroundColor") ? reader.getAttribute("backgroundColor") : nullptr; - const char* displayUnit = reader.hasAttribute("displayUnit") ? reader.getAttribute("displayUnit") : nullptr; + const char* foregroundColor = + reader.hasAttribute("foregroundColor") ? reader.getAttribute("foregroundColor") : nullptr; + const char* backgroundColor = + reader.hasAttribute("backgroundColor") ? reader.getAttribute("backgroundColor") : nullptr; + const char* displayUnit = + reader.hasAttribute("displayUnit") ? reader.getAttribute("displayUnit") : nullptr; const char* alias = reader.hasAttribute("alias") ? reader.getAttribute("alias") : nullptr; const char* rowSpan = reader.hasAttribute("rowSpan") ? reader.getAttribute("rowSpan") : nullptr; const char* colSpan = reader.hasAttribute("colSpan") ? reader.getAttribute("colSpan") : nullptr; - // Don't trigger multiple updates below; wait until everything is loaded by calling unfreeze() below. + // Don't trigger multiple updates below; wait until everything is loaded by calling unfreeze() + // below. PropertySheet::AtomicPropertyChange signaller(*owner); if (content) { @@ -723,10 +758,12 @@ void Cell::restore(Base::XMLReader &reader, bool checkAlias) escaped_list_separator e('\0', '|', '\0'); std::string line = std::string(style); - tokenizer > tok(line, e); + tokenizer> tok(line, e); - for(tokenizer >::iterator i = tok.begin(); i != tok.end();++i) + for (tokenizer>::iterator i = tok.begin(); i != tok.end(); + ++i) { styleSet.insert(*i); + } setStyle(styleSet); } if (alignment) { @@ -735,10 +772,12 @@ void Cell::restore(Base::XMLReader &reader, bool checkAlias) escaped_list_separator e('\0', '|', '\0'); std::string line = std::string(alignment); - tokenizer > tok(line, e); + tokenizer> tok(line, e); - for(tokenizer >::iterator i = tok.begin(); i != tok.end();++i) + for (tokenizer>::iterator i = tok.begin(); i != tok.end(); + ++i) { alignmentCode = decodeAlignment(*i, alignmentCode); + } setAlignment(alignmentCode); } @@ -752,10 +791,12 @@ void Cell::restore(Base::XMLReader &reader, bool checkAlias) setBackground(color); } - if (displayUnit) + if (displayUnit) { setDisplayUnit(displayUnit); - if (alias && (!checkAlias || !owner->revAliasProp.count(alias))) + } + if (alias && (!checkAlias || !owner->revAliasProp.count(alias))) { setAlias(alias); + } if (rowSpan || colSpan) { int rs = rowSpan ? atoi(rowSpan) : 1; @@ -766,75 +807,87 @@ void Cell::restore(Base::XMLReader &reader, bool checkAlias) } /** - * Save cell contents into \a writer. - * - */ + * Save cell contents into \a writer. + * + */ -void Cell::save(Base::Writer &writer) const { - save(writer.Stream(),writer.ind(),false); +void Cell::save(Base::Writer& writer) const +{ + save(writer.Stream(), writer.ind(), false); } -void Cell::save(std::ostream &os, const char *indent, bool noContent) const { - if (!isUsed()) +void Cell::save(std::ostream& os, const char* indent, bool noContent) const +{ + if (!isUsed()) { return; + } os << indent << ""; - if(!noContent) + if (!noContent) { os << std::endl; + } } /** - * Update the \a used member variable with mask (bitwise or'ed). - * - */ + * Update the \a used member variable with mask (bitwise or'ed). + * + */ void Cell::setUsed(int mask, bool state) { - if (state) + if (state) { used |= mask; - else + } + else { used &= ~mask; + } } /** - * Determine whether the bits in \a mask are set in the \a used member variable. - * - */ + * Determine whether the bits in \a mask are set in the \a used member variable. + * + */ bool Cell::isUsed(int mask) const { @@ -842,128 +895,148 @@ bool Cell::isUsed(int mask) const } /** - * Determine if the any of the contents of the cell is set a non-default value. - * - */ + * Determine if the any of the contents of the cell is set a non-default value. + * + */ bool Cell::isUsed() const { return used != 0; } -void Cell::visit(App::ExpressionVisitor &v) +void Cell::visit(App::ExpressionVisitor& v) { - if (expression) + if (expression) { expression->visit(v); + } } /** - * Decode alignment into its internal value. - * - * @param itemStr Alignment as a string - * @param alignment Current alignment. This is or'ed with the one in \a itemStr. - * - * @returns New alignment. - * - */ + * Decode alignment into its internal value. + * + * @param itemStr Alignment as a string + * @param alignment Current alignment. This is or'ed with the one in \a itemStr. + * + * @returns New alignment. + * + */ -int Cell::decodeAlignment(const std::string & itemStr, int alignment) +int Cell::decodeAlignment(const std::string& itemStr, int alignment) { if (itemStr == "himplied") { - if(!(alignment & ALIGNMENT_HORIZONTAL)) + if (!(alignment & ALIGNMENT_HORIZONTAL)) { alignment |= ALIGNMENT_LEFT; + } alignment |= Cell::ALIGNMENT_HIMPLIED; - } else if (itemStr == "left") + } + else if (itemStr == "left") { alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_LEFT; - else if (itemStr == "center") + } + else if (itemStr == "center") { alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_HCENTER; - else if (itemStr == "right") + } + else if (itemStr == "right") { alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_RIGHT; + } else if (itemStr == "vimplied") { - if(!(alignment & ALIGNMENT_VERTICAL)) + if (!(alignment & ALIGNMENT_VERTICAL)) { alignment |= ALIGNMENT_VCENTER; + } alignment |= Cell::ALIGNMENT_VIMPLIED; - } else if (itemStr == "top") + } + else if (itemStr == "top") { alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_TOP; - else if (itemStr == "vcenter") + } + else if (itemStr == "vcenter") { alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_VCENTER; - else if (itemStr == "bottom") + } + else if (itemStr == "bottom") { alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_BOTTOM; - else if(!itemStr.empty()) + } + else if (!itemStr.empty()) { throw Base::ValueError("Invalid alignment."); + } return alignment; } /** - * Encode internal alignment value as a string. - * - * @param alignment Alignment as a binary value. - * - * @returns Alignment represented as a string. - * - */ + * Encode internal alignment value as a string. + * + * @param alignment Alignment as a binary value. + * + * @returns Alignment represented as a string. + * + */ std::string Cell::encodeAlignment(int alignment) { std::string s; - if (alignment & Cell::ALIGNMENT_LEFT) + if (alignment & Cell::ALIGNMENT_LEFT) { s += "left"; - if (alignment & Cell::ALIGNMENT_HCENTER) + } + if (alignment & Cell::ALIGNMENT_HCENTER) { s += "center"; - if (alignment & Cell::ALIGNMENT_RIGHT) + } + if (alignment & Cell::ALIGNMENT_RIGHT) { s += "right"; - if (alignment & Cell::ALIGNMENT_HIMPLIED) + } + if (alignment & Cell::ALIGNMENT_HIMPLIED) { s += "|himplied"; + } - if (alignment & Cell::ALIGNMENT_VERTICAL) + if (alignment & Cell::ALIGNMENT_VERTICAL) { s += "|"; + } - if (alignment & Cell::ALIGNMENT_TOP) + if (alignment & Cell::ALIGNMENT_TOP) { s += "top"; - if (alignment & Cell::ALIGNMENT_VCENTER) + } + if (alignment & Cell::ALIGNMENT_VCENTER) { s += "vcenter"; - if (alignment & Cell::ALIGNMENT_BOTTOM) + } + if (alignment & Cell::ALIGNMENT_BOTTOM) { s += "bottom"; - if (alignment & Cell::ALIGNMENT_VIMPLIED) + } + if (alignment & Cell::ALIGNMENT_VIMPLIED) { s += "|vimplied"; + } return s; } /** - * Encode \a color as a \#rrggbbaa string. - * - * @param color Color to encode. - * - * @returns String with encoded color. - * - */ + * Encode \a color as a \#rrggbbaa string. + * + * @param color Color to encode. + * + * @returns String with encoded color. + * + */ -std::string Cell::encodeColor(const App::Color & color) +std::string Cell::encodeColor(const App::Color& color) { std::stringstream tmp; - tmp << "#" - << std::hex << std::setw(2) << std::setfill('0') << int(color.r * 255.0) - << std::hex << std::setw(2) << std::setfill('0') << int(color.g * 255.0) - << std::hex << std::setw(2) << std::setfill('0') << int(color.b * 255.0) - << std::hex << std::setw(2) << std::setfill('0') << int(color.a * 255.0); + tmp << "#" << std::hex << std::setw(2) << std::setfill('0') << int(color.r * 255.0) << std::hex + << std::setw(2) << std::setfill('0') << int(color.g * 255.0) << std::hex << std::setw(2) + << std::setfill('0') << int(color.b * 255.0) << std::hex << std::setw(2) + << std::setfill('0') << int(color.a * 255.0); return tmp.str(); } /** - * Encode set of styles as a string. - * - * @param style Set of string describing the style. - * - * @returns Set encoded as a string. - * - */ + * Encode set of styles as a string. + * + * @param style Set of string describing the style. + * + * @returns Set encoded as a string. + * + */ -std::string Cell::encodeStyle(const std::set & style) +std::string Cell::encodeStyle(const std::set& style) { std::string s; std::set::const_iterator j = style.begin(); @@ -972,43 +1045,47 @@ std::string Cell::encodeStyle(const std::set & style) while (j != j_end) { s += *j; ++j; - if (j != j_end) + if (j != j_end) { s += "|"; + } } return s; } /** - * Decode a string of the format \#rrggbb or \#rrggbbaa into a Color. - * - * @param color The color to decode. - * @param defaultColor A default color in case the decoding fails. - * - * @returns Decoded color. - * - */ + * Decode a string of the format \#rrggbb or \#rrggbbaa into a Color. + * + * @param color The color to decode. + * @param defaultColor A default color in case the decoding fails. + * + * @returns Decoded color. + * + */ -App::Color Cell::decodeColor(const std::string & color, const App::Color & defaultColor) +App::Color Cell::decodeColor(const std::string& color, const App::Color& defaultColor) { if (color.size() == 7 || color.size() == 9) { App::Color c; - if (color[0] != '#') + if (color[0] != '#') { return defaultColor; + } unsigned int value = strtoul(color.c_str() + 1, nullptr, 16); - if (color.size() == 7) + if (color.size() == 7) { value = (value << 8) | 0xff; + } c.setPackedValue(value); return c; } - else + else { return defaultColor; + } } -//roughly based on Spreadsheet/Gui/SheetModel.cpp +// roughly based on Spreadsheet/Gui/SheetModel.cpp std::string Cell::getFormattedQuantity() { std::string result; @@ -1017,36 +1094,38 @@ std::string Cell::getFormattedQuantity() Property* prop = owner->sheet()->getPropertyByName(thisCell.toString().c_str()); if (prop->isDerivedFrom(App::PropertyString::getClassTypeId())) { - const App::PropertyString * stringProp = static_cast(prop); + const App::PropertyString* stringProp = static_cast(prop); qFormatted = QString::fromUtf8(stringProp->getValue()); - - } else if (prop->isDerivedFrom(App::PropertyQuantity::getClassTypeId())) { + } + else if (prop->isDerivedFrom(App::PropertyQuantity::getClassTypeId())) { double rawVal = static_cast(prop)->getValue(); - const App::PropertyQuantity * floatProp = static_cast(prop); + const App::PropertyQuantity* floatProp = static_cast(prop); DisplayUnit du; bool hasDisplayUnit = getDisplayUnit(du); double duScale = du.scaler; const Base::Unit& computedUnit = floatProp->getUnit(); - qFormatted = QLocale().toString(rawVal,'f',Base::UnitsApi::getDecimals()); + qFormatted = QLocale().toString(rawVal, 'f', Base::UnitsApi::getDecimals()); if (hasDisplayUnit) { if (computedUnit.isEmpty() || computedUnit == du.unit) { QString number = - QLocale().toString(rawVal / duScale,'f',Base::UnitsApi::getDecimals()); + QLocale().toString(rawVal / duScale, 'f', Base::UnitsApi::getDecimals()); qFormatted = number + Base::Tools::fromStdString(" " + displayUnit.stringRep); } } - - } else if (prop->isDerivedFrom(App::PropertyFloat::getClassTypeId())){ + } + else if (prop->isDerivedFrom(App::PropertyFloat::getClassTypeId())) { double rawVal = static_cast(prop)->getValue(); DisplayUnit du; bool hasDisplayUnit = getDisplayUnit(du); double duScale = du.scaler; - qFormatted = QLocale().toString(rawVal,'f',Base::UnitsApi::getDecimals()); + qFormatted = QLocale().toString(rawVal, 'f', Base::UnitsApi::getDecimals()); if (hasDisplayUnit) { - QString number = QLocale().toString(rawVal / duScale, 'f',Base::UnitsApi::getDecimals()); + QString number = + QLocale().toString(rawVal / duScale, 'f', Base::UnitsApi::getDecimals()); qFormatted = number + Base::Tools::fromStdString(" " + displayUnit.stringRep); } - } else if (prop->isDerivedFrom(App::PropertyInteger::getClassTypeId())) { + } + else if (prop->isDerivedFrom(App::PropertyInteger::getClassTypeId())) { double rawVal = static_cast(prop)->getValue(); DisplayUnit du; bool hasDisplayUnit = getDisplayUnit(du); @@ -1054,11 +1133,11 @@ std::string Cell::getFormattedQuantity() int iRawVal = std::round(rawVal); qFormatted = QLocale().toString(iRawVal); if (hasDisplayUnit) { - QString number = QLocale().toString(rawVal / duScale, 'f',Base::UnitsApi::getDecimals()); + QString number = + QLocale().toString(rawVal / duScale, 'f', Base::UnitsApi::getDecimals()); qFormatted = number + Base::Tools::fromStdString(" " + displayUnit.stringRep); } } result = Base::Tools::toStdString(qFormatted); return result; } - diff --git a/src/Mod/Spreadsheet/App/Cell.h b/src/Mod/Spreadsheet/App/Cell.h index 214eebf48b..5917908a37 100644 --- a/src/Mod/Spreadsheet/App/Cell.h +++ b/src/Mod/Spreadsheet/App/Cell.h @@ -23,8 +23,8 @@ #ifndef CELL_H #define CELL_H -#include #include +#include #include #include @@ -33,61 +33,64 @@ #include "Utils.h" -namespace Base { +namespace Base +{ class Unit; class XMLReader; class Writer; -} +} // namespace Base -namespace Spreadsheet { +namespace Spreadsheet +{ class PropertySheet; class DisplayUnit; -class SpreadsheetExport Cell { +class SpreadsheetExport Cell +{ private: - Cell(const Cell & other); + Cell(const Cell& other); + public: + Cell(const App::CellAddress& _address, PropertySheet* _owner); - Cell(const App::CellAddress & _address, PropertySheet * _owner); + Cell(PropertySheet* _owner, const Cell& other); - Cell(PropertySheet * _owner, const Cell & other); - - Cell& operator=( const Cell& rhs ); + Cell& operator=(const Cell& rhs); ~Cell(); - const App::Expression * getExpression(bool withFormat=false) const; + const App::Expression* getExpression(bool withFormat = false) const; - bool getStringContent(std::string & s, bool persistent=false) const; + bool getStringContent(std::string& s, bool persistent = false) const; - void setContent(const char * value); + void setContent(const char* value); void setAlignment(int _alignment); - bool getAlignment(int & _alignment) const; + bool getAlignment(int& _alignment) const; - void setStyle(const std::set & _style); - bool getStyle(std::set & style) const; + void setStyle(const std::set& _style); + bool getStyle(std::set& style) const; - void setForeground(const App::Color &color); - bool getForeground(App::Color &color) const; + void setForeground(const App::Color& color); + bool getForeground(App::Color& color) const; - void setBackground(const App::Color &color); - bool getBackground(App::Color &color) const; + void setBackground(const App::Color& color); + bool getBackground(App::Color& color) const; - void setDisplayUnit(const std::string & unit); - bool getDisplayUnit(DisplayUnit &unit) const; + void setDisplayUnit(const std::string& unit); + bool getDisplayUnit(DisplayUnit& unit) const; - void setAlias(const std::string & n); - bool getAlias(std::string & n ) const; + void setAlias(const std::string& n); + bool getAlias(std::string& n) const; - void setComputedUnit(const Base::Unit & unit); - bool getComputedUnit(Base::Unit & unit) const; + void setComputedUnit(const Base::Unit& unit); + bool getComputedUnit(Base::Unit& unit) const; void setSpans(int rows, int columns); - bool getSpans(int & rows, int & columns) const; + bool getSpans(int& rows, int& columns) const; - void setException(const std::string & e, bool silent=false); + void setException(const std::string& e, bool silent = false); void clearException(); @@ -95,32 +98,48 @@ public: void setDirty(); - void setResolveException(const std::string &e); + void setResolveException(const std::string& e); void clearResolveException(); - const std::string &getException() const { return exceptionStr; } + const std::string& getException() const + { + return exceptionStr; + } - bool hasException() const { return isUsed(EXCEPTION_SET) || isUsed(PARSE_EXCEPTION_SET) || isUsed(RESOLVE_EXCEPTION_SET); } + bool hasException() const + { + return isUsed(EXCEPTION_SET) || isUsed(PARSE_EXCEPTION_SET) + || isUsed(RESOLVE_EXCEPTION_SET); + } void moveAbsolute(App::CellAddress newAddress); - void restore(Base::XMLReader &reader, bool checkAlias=false); + void restore(Base::XMLReader& reader, bool checkAlias = false); void afterRestore(); - void save(Base::Writer &writer) const; - void save(std::ostream &os, const char *indent, bool noContent) const; + void save(Base::Writer& writer) const; + void save(std::ostream& os, const char* indent, bool noContent) const; bool isUsed() const; - void mark() { setUsed(MARK_SET); } + void mark() + { + setUsed(MARK_SET); + } - bool isMarked() const { return isUsed(MARK_SET); } + bool isMarked() const + { + return isUsed(MARK_SET); + } - void visit(App::ExpressionVisitor & v); + void visit(App::ExpressionVisitor& v); - App::CellAddress getAddress() const { return address; } + App::CellAddress getAddress() const + { + return address; + } std::string getFormattedQuantity(); @@ -137,19 +156,18 @@ public: static const int ALIGNMENT_VIMPLIED; /* Static functions */ - static int decodeAlignment(const std::string &itemStr, int alignment); + static int decodeAlignment(const std::string& itemStr, int alignment); static std::string encodeAlignment(int alignment); - static std::string encodeStyle(const std::set &style); + static std::string encodeStyle(const std::set& style); - static std::string encodeColor(const App::Color &color); - static App::Color decodeColor(const std::string &color, const App::Color &defaultColor); + static std::string encodeColor(const App::Color& color); + static App::Color decodeColor(const std::string& color, const App::Color& defaultColor); private: + void setParseException(const std::string& e); - void setParseException(const std::string & e); - - void setExpression(App::ExpressionPtr &&expr); + void setExpression(App::ExpressionPtr&& expr); void setUsed(int mask, bool state = true); @@ -175,7 +193,7 @@ private: static const int RESOLVE_EXCEPTION_SET; App::CellAddress address; - PropertySheet * owner; + PropertySheet* owner; int used; mutable App::ExpressionPtr expression; @@ -193,6 +211,6 @@ private: friend class PropertySheet; }; -} +} // namespace Spreadsheet -#endif // CELL_H +#endif // CELL_H diff --git a/src/Mod/Spreadsheet/App/DisplayUnit.h b/src/Mod/Spreadsheet/App/DisplayUnit.h index 25089e5fa7..a5ec4011f6 100644 --- a/src/Mod/Spreadsheet/App/DisplayUnit.h +++ b/src/Mod/Spreadsheet/App/DisplayUnit.h @@ -23,24 +23,26 @@ #ifndef DISPLAYUNIT_H #define DISPLAYUNIT_H -#include #include +#include -namespace Spreadsheet { +namespace Spreadsheet +{ -class DisplayUnit { +class DisplayUnit +{ public: - std::string stringRep; Base::Unit unit; double scaler; - explicit DisplayUnit(const std::string _stringRep = "", const Base::Unit _unit = Base::Unit(), double _scaler = 0.0) + explicit DisplayUnit(const std::string _stringRep = "", + const Base::Unit _unit = Base::Unit(), + double _scaler = 0.0) : stringRep(_stringRep) , unit(_unit) , scaler(_scaler) - { - } + {} bool operator==(const DisplayUnit& c) const { @@ -52,10 +54,12 @@ public: return !operator==(c); } - bool isEmpty() const { return stringRep.empty(); } - + bool isEmpty() const + { + return stringRep.empty(); + } }; -} +} // namespace Spreadsheet -#endif // DISPLAYUNIT_H +#endif // DISPLAYUNIT_H diff --git a/src/Mod/Spreadsheet/App/PreCompiled.h b/src/Mod/Spreadsheet/App/PreCompiled.h index c9b558b336..5d2143af58 100644 --- a/src/Mod/Spreadsheet/App/PreCompiled.h +++ b/src/Mod/Spreadsheet/App/PreCompiled.h @@ -28,10 +28,10 @@ // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning( disable : 4251 ) -# pragma warning( disable : 4275 ) -# pragma warning( disable : 4503 ) -# pragma warning( disable : 4786 ) // specifier longer then 255 chars +#pragma warning(disable : 4251) +#pragma warning(disable : 4275) +#pragma warning(disable : 4503) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif #ifdef _PreComp_ @@ -47,15 +47,15 @@ #include // boost -#include -#include #include #include #include +#include +#include // Qt #include -#endif//_PreComp_ +#endif //_PreComp_ -#endif // SPREADSHEET_PRECOMPILED_H +#endif // SPREADSHEET_PRECOMPILED_H diff --git a/src/Mod/Spreadsheet/App/PropertyColumnWidths.cpp b/src/Mod/Spreadsheet/App/PropertyColumnWidths.cpp index 8f155e076d..8658dc8772 100644 --- a/src/Mod/Spreadsheet/App/PropertyColumnWidths.cpp +++ b/src/Mod/Spreadsheet/App/PropertyColumnWidths.cpp @@ -36,12 +36,13 @@ using namespace Spreadsheet; const int PropertyColumnWidths::defaultWidth = 100; const int PropertyColumnWidths::defaultHeaderWidth = 50; -TYPESYSTEM_SOURCE(Spreadsheet::PropertyColumnWidths , App::Property) +TYPESYSTEM_SOURCE(Spreadsheet::PropertyColumnWidths, App::Property) PropertyColumnWidths::PropertyColumnWidths() = default; -PropertyColumnWidths::PropertyColumnWidths(const PropertyColumnWidths &other) - : Property(), std::map(other) +PropertyColumnWidths::PropertyColumnWidths(const PropertyColumnWidths& other) + : Property() + , std::map(other) { std::map::const_iterator i = other.begin(); @@ -51,19 +52,20 @@ PropertyColumnWidths::PropertyColumnWidths(const PropertyColumnWidths &other) } } -App::Property *PropertyColumnWidths::Copy() const +App::Property* PropertyColumnWidths::Copy() const { - PropertyColumnWidths * prop = new PropertyColumnWidths(*this); + PropertyColumnWidths* prop = new PropertyColumnWidths(*this); return prop; } -void PropertyColumnWidths::Paste(const App::Property &from) +void PropertyColumnWidths::Paste(const App::Property& from) { setValues(dynamic_cast(from).getValues()); } -void PropertyColumnWidths::setValues(const std::map &values) { +void PropertyColumnWidths::setValues(const std::map& values) +{ aboutToSetValue(); std::map::const_iterator i; @@ -89,12 +91,12 @@ void PropertyColumnWidths::setValues(const std::map &values) { } /** - * Set the width (in pixels) of column \a col to \a width. - * - * @param col Column to set - * @param width Width in pixels - * - */ + * Set the width (in pixels) of column \a col to \a width. + * + * @param col Column to set + * @param width Width in pixels + * + */ void PropertyColumnWidths::setValue(int col, int width) { @@ -106,21 +108,22 @@ void PropertyColumnWidths::setValue(int col, int width) } } -void PropertyColumnWidths::Save(Base::Writer &writer) const +void PropertyColumnWidths::Save(Base::Writer& writer) const { - // Save column information + // Save column information writer.Stream() << writer.ind() << "" << std::endl; - writer.incInd(); // indentation for 'ColumnInfo' + writer.incInd(); // indentation for 'ColumnInfo' std::map::const_iterator coli = begin(); while (coli != end()) { - writer.Stream() << writer.ind() << "first) << "\" width=\"" << coli->second << "\" />" << std::endl; + writer.Stream() << writer.ind() << "first) + << "\" width=\"" << coli->second << "\" />" << std::endl; ++coli; } - writer.decInd(); // indentation for 'ColumnInfo' + writer.decInd(); // indentation for 'ColumnInfo' writer.Stream() << writer.ind() << "" << std::endl; } -void PropertyColumnWidths::Restore(Base::XMLReader &reader) +void PropertyColumnWidths::Restore(Base::XMLReader& reader) { int Cnt; @@ -130,7 +133,7 @@ void PropertyColumnWidths::Restore(Base::XMLReader &reader) for (int i = 0; i < Cnt; i++) { reader.readElement("Column"); const char* name = reader.hasAttribute("name") ? reader.getAttribute("name") : nullptr; - const char * width = reader.hasAttribute("width") ? reader.getAttribute("width") : nullptr; + const char* width = reader.hasAttribute("width") ? reader.getAttribute("width") : nullptr; try { if (name && width) { @@ -143,16 +146,15 @@ void PropertyColumnWidths::Restore(Base::XMLReader &reader) catch (...) { // Something is wrong, skip this column } - } reader.readEndElement("ColumnInfo"); } -PyObject *PropertyColumnWidths::getPyObject() +PyObject* PropertyColumnWidths::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new PropertyColumnWidthsPy(this),true); + PythonObject = Py::Object(new PropertyColumnWidthsPy(this), true); } return Py::new_reference_to(PythonObject); } @@ -165,5 +167,5 @@ void PropertyColumnWidths::clear() dirty.insert(i->first); ++i; } - std::map::clear(); + std::map::clear(); } diff --git a/src/Mod/Spreadsheet/App/PropertyColumnWidths.h b/src/Mod/Spreadsheet/App/PropertyColumnWidths.h index 7426fcc05c..33591f4b34 100644 --- a/src/Mod/Spreadsheet/App/PropertyColumnWidths.h +++ b/src/Mod/Spreadsheet/App/PropertyColumnWidths.h @@ -23,49 +23,63 @@ #ifndef PROPERTYCOLUMNWIDTHS_H #define PROPERTYCOLUMNWIDTHS_H -#include #include #include #include +#include -namespace Spreadsheet { +namespace Spreadsheet +{ -class SpreadsheetExport PropertyColumnWidths : public App::Property, std::map +class SpreadsheetExport PropertyColumnWidths: public App::Property, std::map { TYPESYSTEM_HEADER_WITH_OVERRIDE(); + public: PropertyColumnWidths(); - void setValue() { } + void setValue() + {} void setValue(int col, int width); - void setValues(const std::map &); + void setValues(const std::map&); - std::map getValues() const { + std::map getValues() const + { return *this; } - int getValue(int column) const { + int getValue(int column) const + { std::map::const_iterator i = find(column); return i != end() ? i->second : defaultWidth; } - Property *Copy() const override; + Property* Copy() const override; - void Paste(const Property &from) override; + void Paste(const Property& from) override; - void Save (Base::Writer & writer) const override; + void Save(Base::Writer& writer) const override; - void Restore(Base::XMLReader & reader) override; + void Restore(Base::XMLReader& reader) override; - bool isDirty() const { return !dirty.empty(); } + bool isDirty() const + { + return !dirty.empty(); + } - void clearDirty() { dirty.clear(); } + void clearDirty() + { + dirty.clear(); + } - const std::set & getDirty() const { return dirty; } + const std::set& getDirty() const + { + return dirty; + } - PyObject *getPyObject() override; + PyObject* getPyObject() override; void clear(); @@ -73,14 +87,13 @@ public: static const int defaultHeaderWidth; private: - - PropertyColumnWidths(const PropertyColumnWidths & other); + PropertyColumnWidths(const PropertyColumnWidths& other); std::set dirty; Py::Object PythonObject; }; -} +} // namespace Spreadsheet -#endif // PROPERTYCOLUMNWIDTHS_H +#endif // PROPERTYCOLUMNWIDTHS_H diff --git a/src/Mod/Spreadsheet/App/PropertyColumnWidthsPy.xml b/src/Mod/Spreadsheet/App/PropertyColumnWidthsPy.xml index 36b7905a07..fb1fdce762 100644 --- a/src/Mod/Spreadsheet/App/PropertyColumnWidthsPy.xml +++ b/src/Mod/Spreadsheet/App/PropertyColumnWidthsPy.xml @@ -10,7 +10,6 @@ FatherInclude="Base/PersistencePy.h" FatherNamespace="Base" Constructor="true"> - Internal spreadsheet object diff --git a/src/Mod/Spreadsheet/App/PropertyColumnWidthsPyImp.cpp b/src/Mod/Spreadsheet/App/PropertyColumnWidthsPyImp.cpp index 62301901ef..2b23495cfe 100644 --- a/src/Mod/Spreadsheet/App/PropertyColumnWidthsPyImp.cpp +++ b/src/Mod/Spreadsheet/App/PropertyColumnWidthsPyImp.cpp @@ -24,8 +24,10 @@ #include "PropertyColumnWidths.h" // inclusion of the generated files (generated out of PropertyColumnWidthsPy.xml) +// clang-format off #include "PropertyColumnWidthsPy.h" #include "PropertyColumnWidthsPy.cpp" +// clang-format on using namespace Spreadsheet; @@ -36,7 +38,8 @@ std::string PropertyColumnWidthsPy::representation() const return {""}; } -PyObject *PropertyColumnWidthsPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* +PropertyColumnWidthsPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of PropertyColumnWidthsPy and the Twin object return new PropertyColumnWidthsPy(new PropertyColumnWidths); @@ -48,7 +51,7 @@ int PropertyColumnWidthsPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/) return 0; } -PyObject *PropertyColumnWidthsPy::getCustomAttributes(const char* /*attr*/) const +PyObject* PropertyColumnWidthsPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Spreadsheet/App/PropertyRowHeights.cpp b/src/Mod/Spreadsheet/App/PropertyRowHeights.cpp index a07836dd70..f8742244f0 100644 --- a/src/Mod/Spreadsheet/App/PropertyRowHeights.cpp +++ b/src/Mod/Spreadsheet/App/PropertyRowHeights.cpp @@ -35,28 +35,29 @@ using namespace Spreadsheet; const int PropertyRowHeights::defaultHeight = 30; -TYPESYSTEM_SOURCE(Spreadsheet::PropertyRowHeights , App::Property) +TYPESYSTEM_SOURCE(Spreadsheet::PropertyRowHeights, App::Property) PropertyRowHeights::PropertyRowHeights() = default; -PropertyRowHeights::PropertyRowHeights(const PropertyRowHeights &other) - : Property(), std::map(other) -{ -} +PropertyRowHeights::PropertyRowHeights(const PropertyRowHeights& other) + : Property() + , std::map(other) +{} -App::Property *PropertyRowHeights::Copy() const +App::Property* PropertyRowHeights::Copy() const { - PropertyRowHeights * prop = new PropertyRowHeights(*this); + PropertyRowHeights* prop = new PropertyRowHeights(*this); return prop; } -void PropertyRowHeights::Paste(const Property &from) +void PropertyRowHeights::Paste(const Property& from) { setValues(dynamic_cast(from).getValues()); } -void PropertyRowHeights::setValues(const std::map &values) { +void PropertyRowHeights::setValues(const std::map& values) +{ aboutToSetValue(); std::map::const_iterator i; @@ -81,28 +82,29 @@ void PropertyRowHeights::setValues(const std::map &values) { hasSetValue(); } -void PropertyRowHeights::Save(Base::Writer &writer) const +void PropertyRowHeights::Save(Base::Writer& writer) const { // Save row information writer.Stream() << writer.ind() << "" << std::endl; - writer.incInd(); // indentation for 'RowInfo' + writer.incInd(); // indentation for 'RowInfo' std::map::const_iterator ri = begin(); while (ri != end()) { - writer.Stream() << writer.ind() << "first) << "\" height=\"" << ri->second << "\" />" << std::endl; + writer.Stream() << writer.ind() << "first) << "\" height=\"" + << ri->second << "\" />" << std::endl; ++ri; } - writer.decInd(); // indentation for 'RowInfo' + writer.decInd(); // indentation for 'RowInfo' writer.Stream() << writer.ind() << "" << std::endl; } /** - * Set height of row given by \a row to \a height in pixels. - * - * @param row Address of row - * @param height Height in pixels - * - */ + * Set height of row given by \a row to \a height in pixels. + * + * @param row Address of row + * @param height Height in pixels + * + */ void PropertyRowHeights::setValue(int row, int height) { @@ -114,7 +116,7 @@ void PropertyRowHeights::setValue(int row, int height) } } -void PropertyRowHeights::Restore(Base::XMLReader &reader) +void PropertyRowHeights::Restore(Base::XMLReader& reader) { int Cnt; @@ -124,7 +126,8 @@ void PropertyRowHeights::Restore(Base::XMLReader &reader) for (int i = 0; i < Cnt; i++) { reader.readElement("Row"); const char* name = reader.hasAttribute("name") ? reader.getAttribute("name") : nullptr; - const char * height = reader.hasAttribute("height") ? reader.getAttribute("height") : nullptr; + const char* height = + reader.hasAttribute("height") ? reader.getAttribute("height") : nullptr; try { if (name && height) { @@ -141,11 +144,11 @@ void PropertyRowHeights::Restore(Base::XMLReader &reader) reader.readEndElement("RowInfo"); } -PyObject *PropertyRowHeights::getPyObject() +PyObject* PropertyRowHeights::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new PropertyRowHeightsPy(this),true); + PythonObject = Py::Object(new PropertyRowHeightsPy(this), true); } return Py::new_reference_to(PythonObject); } @@ -158,5 +161,5 @@ void PropertyRowHeights::clear() dirty.insert(i->first); ++i; } - std::map::clear(); + std::map::clear(); } diff --git a/src/Mod/Spreadsheet/App/PropertyRowHeights.h b/src/Mod/Spreadsheet/App/PropertyRowHeights.h index 005ca185f4..d5eb026006 100644 --- a/src/Mod/Spreadsheet/App/PropertyRowHeights.h +++ b/src/Mod/Spreadsheet/App/PropertyRowHeights.h @@ -23,63 +23,76 @@ #ifndef PROPERTYROWHEIGHTS_H #define PROPERTYROWHEIGHTS_H -#include #include #include #include +#include -namespace Spreadsheet { +namespace Spreadsheet +{ -class SpreadsheetExport PropertyRowHeights : public App::Property, std::map +class SpreadsheetExport PropertyRowHeights: public App::Property, std::map { TYPESYSTEM_HEADER_WITH_OVERRIDE(); + public: PropertyRowHeights(); - void setValue() { } + void setValue() + {} void setValue(int row, int height); - void setValues(const std::map &); + void setValues(const std::map&); - int getValue(int row) const { + int getValue(int row) const + { std::map::const_iterator i = find(row); return i != end() ? i->second : defaultHeight; } - std::map getValues() const { + std::map getValues() const + { return *this; } - App::Property *Copy() const override; + App::Property* Copy() const override; - void Paste(const App::Property &from) override; + void Paste(const App::Property& from) override; - void Save (Base::Writer & writer) const override; + void Save(Base::Writer& writer) const override; - void Restore(Base::XMLReader & reader) override; + void Restore(Base::XMLReader& reader) override; - bool isDirty() const { return dirty.size() > 0; } + bool isDirty() const + { + return dirty.size() > 0; + } - void clearDirty() { dirty.clear(); } + void clearDirty() + { + dirty.clear(); + } - const std::set & getDirty() const { return dirty; } + const std::set& getDirty() const + { + return dirty; + } - PyObject *getPyObject() override; + PyObject* getPyObject() override; static const int defaultHeight; void clear(); private: - - PropertyRowHeights(const PropertyRowHeights & other); + PropertyRowHeights(const PropertyRowHeights& other); std::set dirty; Py::Object PythonObject; }; -} +} // namespace Spreadsheet -#endif // PROPERTYROWHEIGHTS_H +#endif // PROPERTYROWHEIGHTS_H diff --git a/src/Mod/Spreadsheet/App/PropertyRowHeightsPy.xml b/src/Mod/Spreadsheet/App/PropertyRowHeightsPy.xml index 59779dfbb1..95b1c6e0ba 100644 --- a/src/Mod/Spreadsheet/App/PropertyRowHeightsPy.xml +++ b/src/Mod/Spreadsheet/App/PropertyRowHeightsPy.xml @@ -10,7 +10,6 @@ FatherInclude="Base/PersistencePy.h" FatherNamespace="Base" Constructor="true"> - Internal spreadsheet object diff --git a/src/Mod/Spreadsheet/App/PropertyRowHeightsPyImp.cpp b/src/Mod/Spreadsheet/App/PropertyRowHeightsPyImp.cpp index 8c0754b0ff..bccc4c89a3 100644 --- a/src/Mod/Spreadsheet/App/PropertyRowHeightsPyImp.cpp +++ b/src/Mod/Spreadsheet/App/PropertyRowHeightsPyImp.cpp @@ -24,8 +24,10 @@ #include "PropertyRowHeights.h" // inclusion of the generated files (generated out of PropertyRowHeightsPy.xml) +// clang-format off #include "PropertyRowHeightsPy.h" #include "PropertyRowHeightsPy.cpp" +// clang-format on using namespace Spreadsheet; @@ -36,7 +38,7 @@ std::string PropertyRowHeightsPy::representation() const return {""}; } -PyObject *PropertyRowHeightsPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* PropertyRowHeightsPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of PropertyRowHeightsPy and the Twin object return new PropertyRowHeightsPy(new PropertyRowHeights); @@ -48,7 +50,7 @@ int PropertyRowHeightsPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/) return 0; } -PyObject *PropertyRowHeightsPy::getCustomAttributes(const char* /*attr*/) const +PyObject* PropertyRowHeightsPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Spreadsheet/App/PropertySheet.cpp b/src/Mod/Spreadsheet/App/PropertySheet.cpp index 78651564f1..8ef0de5b48 100644 --- a/src/Mod/Spreadsheet/App/PropertySheet.cpp +++ b/src/Mod/Spreadsheet/App/PropertySheet.cpp @@ -22,11 +22,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include +#include +#include +#include #endif #include @@ -53,12 +53,12 @@ using namespace Base; using namespace Spreadsheet; namespace sp = std::placeholders; -TYPESYSTEM_SOURCE(Spreadsheet::PropertySheet , App::PropertyExpressionContainer) +TYPESYSTEM_SOURCE(Spreadsheet::PropertySheet, App::PropertyExpressionContainer) void PropertySheet::clear() { /* Clear cells */ - for (auto & it : data) { + for (auto& it : data) { delete it.second; setDirty(it.first); } @@ -78,75 +78,87 @@ void PropertySheet::clear() clearDeps(); } -Cell *PropertySheet::getValue(CellAddress key) +Cell* PropertySheet::getValue(CellAddress key) { std::map::const_iterator i = data.find(key); - if (i == data.end()) + if (i == data.end()) { return nullptr; - else + } + else { return i->second; + } } -const Cell *PropertySheet::getValue(CellAddress key) const +const Cell* PropertySheet::getValue(CellAddress key) const { std::map::const_iterator i = data.find(key); - if (i == data.end()) + if (i == data.end()) { return nullptr; - else + } + else { return i->second; + } } -Cell * PropertySheet::getValueFromAlias(const std::string &alias) +Cell* PropertySheet::getValueFromAlias(const std::string& alias) { std::map::const_iterator it = revAliasProp.find(alias); - if (it != revAliasProp.end()) + if (it != revAliasProp.end()) { return getValue(it->second); - else + } + else { return nullptr; + } } -const Cell * PropertySheet::getValueFromAlias(const std::string &alias) const +const Cell* PropertySheet::getValueFromAlias(const std::string& alias) const { std::map::const_iterator it = revAliasProp.find(alias); - if (it != revAliasProp.end()) + if (it != revAliasProp.end()) { return getValue(it->second); - else + } + else { return nullptr; + } } -bool PropertySheet::isValidAlias(const std::string &candidate) +bool PropertySheet::isValidAlias(const std::string& candidate) { static const boost::regex gen("^[A-Za-z][_A-Za-z0-9]*$"); boost::cmatch cm; /* Check if it is used before */ - if (getValueFromAlias(candidate)) + if (getValueFromAlias(candidate)) { return false; + } /* Check to make sure it doesn't clash with a predefined unit */ - if (ExpressionParser::isTokenAUnit(candidate)) + if (ExpressionParser::isTokenAUnit(candidate)) { return false; + } /* Check to make sure it doesn't match a cell reference */ if (boost::regex_match(candidate.c_str(), cm, gen)) { static const boost::regex e("\\${0,1}([A-Z]{1,2})\\${0,1}([0-9]{1,5})"); if (boost::regex_match(candidate.c_str(), cm, e)) { - const boost::sub_match colstr = cm[1]; - const boost::sub_match rowstr = cm[2]; + const boost::sub_match colstr = cm[1]; + const boost::sub_match rowstr = cm[2]; // A valid cell address? - if (App::validRow(rowstr.str()) >= 0 && App::validColumn(colstr.str())) + if (App::validRow(rowstr.str()) >= 0 && App::validColumn(colstr.str())) { return false; + } } return true; } - else + else { return false; + } } namespace @@ -157,11 +169,11 @@ namespace // has data in it, but operating on all cells in the inclusive range specified by the tuple // is guaranteed to include all cells in the passed-in vector, and no cells exist to the // left, right, above, or below the block specified. -std::tuple extractRange(const std::vector &cells) +std::tuple extractRange(const std::vector& cells) { CellAddress firstRowAndColumn; CellAddress lastRowAndColumn; - for (const auto & cell : cells) { + for (const auto& cell : cells) { int row = cell.row(); int column = cell.col(); if (row < firstRowAndColumn.row() || !firstRowAndColumn.isValid()) { @@ -179,15 +191,16 @@ std::tuple extractRange(const std::vector } return std::make_tuple(firstRowAndColumn, lastRowAndColumn); } -}// namespace +} // namespace std::vector PropertySheet::getUsedCells() const { std::vector usedSet; for (const auto& i : data) { - if (i.second->isUsed()) + if (i.second->isUsed()) { usedSet.push_back(i.first); + } } return usedSet; @@ -206,8 +219,9 @@ std::vector PropertySheet::getNonEmptyCells() const std::string str; for (const auto& i : data) { str.clear(); - if (i.second->isUsed() && i.second->getStringContent(str) && !str.empty()) + if (i.second->isUsed() && i.second->getStringContent(str) && !str.empty()) { usedSet.push_back(i.first); + } } return usedSet; @@ -224,8 +238,9 @@ void PropertySheet::setDirty(CellAddress address) /* Merged cells will automatically force an update of the top left cell to be consistent. */ std::map::const_iterator i = mergedCells.find(address); - if (i != mergedCells.end()) + if (i != mergedCells.end()) { address = i->second; + } dirty.insert(address); } @@ -233,30 +248,29 @@ void PropertySheet::setDirty(CellAddress address) void PropertySheet::setDirty() { AtomicPropertyChange signaller(*this); - for(auto &address : getNonEmptyCells()) { + for (auto& address : getNonEmptyCells()) { auto cell = cellAt(address); std::string content; - if(cell && cell->getStringContent(content,false)) { + if (cell && cell->getStringContent(content, false)) { cell->setContent(content.c_str()); } } } -Cell * PropertySheet::createCell(CellAddress address) +Cell* PropertySheet::createCell(CellAddress address) { - Cell * cell = new Cell(address, this); + Cell* cell = new Cell(address, this); data[address] = cell; return cell; } -PropertySheet::PropertySheet(Sheet *_owner) +PropertySheet::PropertySheet(Sheet* _owner) : owner(_owner) -{ -} +{} -PropertySheet::PropertySheet(const PropertySheet &other) +PropertySheet::PropertySheet(const PropertySheet& other) : dirty(other.dirty) , mergedCells(other.mergedCells) , owner(other.owner) @@ -268,7 +282,7 @@ PropertySheet::PropertySheet(const PropertySheet &other) , revAliasProp(other.revAliasProp) , updateCount(other.updateCount) { - std::map::const_iterator i = other.data.begin(); + std::map::const_iterator i = other.data.begin(); /* Copy cells */ while (i != other.data.end()) { @@ -282,18 +296,18 @@ PropertySheet::~PropertySheet() clear(); } -App::Property *PropertySheet::Copy() const +App::Property* PropertySheet::Copy() const { return new PropertySheet(*this); } -void PropertySheet::Paste(const Property &from) +void PropertySheet::Paste(const Property& from) { - const PropertySheet &froms = dynamic_cast(from); + const PropertySheet& froms = dynamic_cast(from); AtomicPropertyChange signaller(*this); - std::map::iterator icurr = data.begin(); + std::map::iterator icurr = data.begin(); /* Mark all first */ while (icurr != data.end()) { @@ -301,24 +315,27 @@ void PropertySheet::Paste(const Property &from) ++icurr; } - std::map::const_iterator ifrom = froms.data.begin(); + std::map::const_iterator ifrom = froms.data.begin(); std::vector spanChanges; int rows, cols; while (ifrom != froms.data.end()) { - auto &cell = data[ifrom->first]; + auto& cell = data[ifrom->first]; if (cell) { - int r,c; - cell->getSpans(rows,cols); + int r, c; + cell->getSpans(rows, cols); ifrom->second->getSpans(r, c); - if (rows != r || cols != c) + if (rows != r || cols != c) { spanChanges.push_back(ifrom->first); - *cell = *(ifrom->second); // Exists; assign cell directly + } + *cell = *(ifrom->second); // Exists; assign cell directly } else { - cell = new Cell(this, *(ifrom->second)); // Doesn't exist, copy using Cell's copy constructor - if (cell->getSpans(rows, cols)) + cell = new Cell(this, + *(ifrom->second)); // Doesn't exist, copy using Cell's copy constructor + if (cell->getSpans(rows, cols)) { spanChanges.push_back(ifrom->first); + } } recomputeDependencies(ifrom->first); @@ -330,46 +347,49 @@ void PropertySheet::Paste(const Property &from) /* Remove all that are still marked */ icurr = data.begin(); while (icurr != data.end()) { - Cell * cell = icurr->second; + Cell* cell = icurr->second; if (cell->isMarked()) { - if (cell->getSpans(rows, cols)) + if (cell->getSpans(rows, cols)) { spanChanges.push_back(icurr->first); + } - std::map::iterator next = icurr; + std::map::iterator next = icurr; ++next; clear(icurr->first); icurr = next; } - else + else { ++icurr; + } } if (!spanChanges.empty()) { mergedCells = froms.mergedCells; if (auto sheet = Base::freecad_dynamic_cast(getContainer())) { - for (const auto &addr : spanChanges) + for (const auto& addr : spanChanges) { sheet->cellSpanChanged(addr); + } } } signaller.tryInvoke(); } -void PropertySheet::Save(Base::Writer &writer) const +void PropertySheet::Save(Base::Writer& writer) const { // Save cell contents int count = 0; std::map::const_iterator ci = data.begin(); while (ci != data.end()) { - if (ci->second->isUsed()) + if (ci->second->isUsed()) { ++count; + } ++ci; } - writer.Stream() << writer.ind() << ")" << std::endl; + writer.Stream() << writer.ind() << ")" << std::endl; writer.incInd(); @@ -385,7 +405,7 @@ void PropertySheet::Save(Base::Writer &writer) const writer.Stream() << writer.ind() << "" << std::endl; } -void PropertySheet::Restore(Base::XMLReader &reader) +void PropertySheet::Restore(Base::XMLReader& reader) { int Cnt; @@ -394,26 +414,29 @@ void PropertySheet::Restore(Base::XMLReader &reader) reader.readElement("Cells"); Cnt = reader.getAttributeAsInteger("Count"); - if(reader.hasAttribute("xlink") && reader.getAttributeAsInteger("xlink")) + if (reader.hasAttribute("xlink") && reader.getAttributeAsInteger("xlink")) { PropertyExpressionContainer::Restore(reader); + } for (int i = 0; i < Cnt; i++) { reader.readElement("Cell"); - const char* strAddress = reader.hasAttribute("address") ? reader.getAttribute("address") : ""; + const char* strAddress = + reader.hasAttribute("address") ? reader.getAttribute("address") : ""; try { CellAddress address(strAddress); - Cell * cell = createCell(address); + Cell* cell = createCell(address); cell->restore(reader); int rows, cols; if (cell->getSpans(rows, cols) && (rows > 1 || cols > 1)) { - mergeCells(address, CellAddress(address.row() + rows - 1, address.col() + cols - 1)); + mergeCells(address, + CellAddress(address.row() + rows - 1, address.col() + cols - 1)); } } - catch (const Base::Exception &) { + catch (const Base::Exception&) { // Something is wrong, skip this cell } catch (...) { @@ -423,7 +446,8 @@ void PropertySheet::Restore(Base::XMLReader &reader) signaller.tryInvoke(); } -void PropertySheet::copyCells(Base::Writer& writer, const std::vector& ranges) const { +void PropertySheet::copyCells(Base::Writer& writer, const std::vector& ranges) const +{ writer.Stream() << "" << std::endl; writer.Stream() << "" << std::endl; writer.incInd(); @@ -432,11 +456,12 @@ void PropertySheet::copyCells(Base::Writer& writer, const std::vector& ra int count = 0; do { auto cell = getValue(*r); - if(cell && cell->isUsed()) + if (cell && cell->isUsed()) { ++count; - }while(r.next()); - writer.Stream() << writer.ind() << "" << std::endl; + } + } while (r.next()); + writer.Stream() << writer.ind() << "" << std::endl; writer.incInd(); do { auto cell = getValue(*range); @@ -451,59 +476,66 @@ void PropertySheet::copyCells(Base::Writer& writer, const std::vector& ra writer.Stream() << "" << std::endl; } -void PropertySheet::pasteCells(XMLReader &reader, Range dstRange) { +void PropertySheet::pasteCells(XMLReader& reader, Range dstRange) +{ reader.readElement("Cells"); int rangeCount = reader.getAttributeAsInteger("count"); - if(rangeCount<=0) + if (rangeCount <= 0) { return; + } int dstRows = dstRange.rowCount(); int dstCols = dstRange.colCount(); CellAddress dstFrom = dstRange.from(); - int roffset=0,coffset=0; + int roffset = 0, coffset = 0; AtomicPropertyChange signaller(*this); - for(int ri=0; ri < rangeCount; ++ri) { + for (int ri = 0; ri < rangeCount; ++ri) { reader.readElement("Range"); CellAddress from(reader.getAttribute("from")); CellAddress to(reader.getAttribute("to")); int cellCount = reader.getAttributeAsInteger("count"); - Range range(from,to); + Range range(from, to); CellAddress addr(dstFrom); - if(ri == 0) { + if (ri == 0) { roffset = addr.row() - from.row(); coffset = addr.col() - from.col(); } - int rcount,ccount; - if(rangeCount>1) { + int rcount, ccount; + if (rangeCount > 1) { rcount = 1; ccount = 1; - } else { - rcount = dstRows/range.rowCount(); - if(rcount == 0) - rcount = 1; - ccount = dstCols/range.colCount(); - if(ccount == 0) - ccount = 1; } - for(int ci=0; ci < cellCount; ++ci) { + else { + rcount = dstRows / range.rowCount(); + if (rcount == 0) { + rcount = 1; + } + ccount = dstCols / range.colCount(); + if (ccount == 0) { + ccount = 1; + } + } + for (int ci = 0; ci < cellCount; ++ci) { reader.readElement("Cell"); CellAddress src(reader.getAttribute("address")); - if(ci) + if (ci) { range.next(); + } - while(src!=*range) { - for(int r=0; r < rcount; ++r) { - for(int c=0; c < ccount; ++c) { - CellAddress dst(range.row()+roffset+r*range.rowCount(), - range.column()+coffset+c*range.colCount()); - if(!dst.isValid()) + while (src != *range) { + for (int r = 0; r < rcount; ++r) { + for (int c = 0; c < ccount; ++c) { + CellAddress dst(range.row() + roffset + r * range.rowCount(), + range.column() + coffset + c * range.colCount()); + if (!dst.isValid()) { continue; + } owner->clear(dst); } } @@ -511,63 +543,72 @@ void PropertySheet::pasteCells(XMLReader &reader, Range dstRange) { } CellAddress newCellAddr; - for(int r=0; r < rcount; ++r) { - for(int c=0; c < ccount; ++c) { - CellAddress dst(src.row()+roffset+r*range.rowCount(), - src.col()+coffset+c*range.colCount()); - if(!dst.isValid()) + for (int r = 0; r < rcount; ++r) { + for (int c = 0; c < ccount; ++c) { + CellAddress dst(src.row() + roffset + r * range.rowCount(), + src.col() + coffset + c * range.colCount()); + if (!dst.isValid()) { continue; + } auto cell = owner->getNewCell(dst); splitCell(dst); int roffset_cur, coffset_cur; - if(!newCellAddr.isValid()) { + if (!newCellAddr.isValid()) { roffset_cur = roffset; coffset_cur = coffset; newCellAddr = dst; - cell->restore(reader,true); - } else { - roffset_cur = r*range.rowCount(); - coffset_cur = c*range.colCount(); + cell->restore(reader, true); + } + else { + roffset_cur = r * range.rowCount(); + coffset_cur = c * range.colCount(); auto newCell = owner->getCell(newCellAddr); - const Expression *expr; - if(!newCell || !(expr=newCell->getExpression(true))) { - FC_THROWM(Base::RuntimeError, "Failed to copy cell " - << getFullName() << '.' << dst.toString() - << " from " << newCellAddr.toString()); + const Expression* expr; + if (!newCell || !(expr = newCell->getExpression(true))) { + FC_THROWM(Base::RuntimeError, + "Failed to copy cell " << getFullName() << '.' + << dst.toString() << " from " + << newCellAddr.toString()); } cell->setExpression(ExpressionPtr(expr->copy())); } int rows, cols; - if (cell->getSpans(rows, cols)) + if (cell->getSpans(rows, cols)) { mergeCells(dst, CellAddress(dst.row() + rows - 1, dst.col() + cols - 1)); - else + } + else { splitCell(dst); + } - if(roffset_cur || coffset_cur) { - OffsetCellsExpressionVisitor visitor(*this, roffset_cur, coffset_cur); + if (roffset_cur || coffset_cur) { + OffsetCellsExpressionVisitor visitor(*this, + roffset_cur, + coffset_cur); cell->visit(visitor); - if(visitor.changed()) + if (visitor.changed()) { recomputeDependencies(dst); + } } dirty.insert(dst); } } } - if(cellCount == 0 || range.next()) { + if (cellCount == 0 || range.next()) { do { - for(int r=0; r < rcount; ++r) { - for(int c=0; c < ccount; ++c) { - CellAddress dst(range.row()+roffset+r*range.rowCount(), - range.column()+coffset+c*range.colCount()); - if(!dst.isValid()) + for (int r = 0; r < rcount; ++r) { + for (int c = 0; c < ccount; ++c) { + CellAddress dst(range.row() + roffset + r * range.rowCount(), + range.column() + coffset + c * range.colCount()); + if (!dst.isValid()) { continue; + } owner->clear(dst); } } - }while(range.next()); + } while (range.next()); } owner->rangeUpdated(Range(from, to)); } @@ -575,7 +616,7 @@ void PropertySheet::pasteCells(XMLReader &reader, Range dstRange) { } -Cell * PropertySheet::cellAt(CellAddress address) +Cell* PropertySheet::cellAt(CellAddress address) { std::map::const_iterator j = mergedCells.find(address); @@ -589,13 +630,15 @@ Cell * PropertySheet::cellAt(CellAddress address) std::map::const_iterator i = data.find(address); - if (i == data.end()) + if (i == data.end()) { return nullptr; - else + } + else { return i->second; + } } -const Cell * PropertySheet::cellAt(CellAddress address) const +const Cell* PropertySheet::cellAt(CellAddress address) const { std::map::const_iterator j = mergedCells.find(address); @@ -609,101 +652,113 @@ const Cell * PropertySheet::cellAt(CellAddress address) const std::map::const_iterator i = data.find(address); - if (i == data.end()) + if (i == data.end()) { return nullptr; - else + } + else { return i->second; + } } -Cell * PropertySheet::nonNullCellAt(CellAddress address) +Cell* PropertySheet::nonNullCellAt(CellAddress address) { std::map::const_iterator j = mergedCells.find(address); if (j != mergedCells.end()) { std::map::const_iterator i = data.find(j->second); - if (i == data.end()) + if (i == data.end()) { return createCell(address); - else + } + else { return i->second; + } } std::map::const_iterator i = data.find(address); - if (i == data.end()) + if (i == data.end()) { return createCell(address); - else + } + else { return i->second; + } } -void PropertySheet::setContent(CellAddress address, const char *value) +void PropertySheet::setContent(CellAddress address, const char* value) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); cell->setContent(value); } void PropertySheet::setAlignment(CellAddress address, int _alignment) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); - if (cell->address != address) //Reject alignment change for merged cell except top-left one + if (cell->address != address) { // Reject alignment change for merged cell except top-left one return; + } cell->setAlignment(_alignment); } -void PropertySheet::setStyle(CellAddress address, const std::set &_style) +void PropertySheet::setStyle(CellAddress address, const std::set& _style) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); cell->setStyle(_style); } -void PropertySheet::setForeground(CellAddress address, const App::Color &color) +void PropertySheet::setForeground(CellAddress address, const App::Color& color) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); cell->setForeground(color); } -void PropertySheet::setBackground(CellAddress address, const App::Color &color) +void PropertySheet::setBackground(CellAddress address, const App::Color& color) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); cell->setBackground(color); } -void PropertySheet::setDisplayUnit(CellAddress address, const std::string &unit) +void PropertySheet::setDisplayUnit(CellAddress address, const std::string& unit) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); cell->setDisplayUnit(unit); } -void PropertySheet::setAlias(CellAddress address, const std::string &alias) +void PropertySheet::setAlias(CellAddress address, const std::string& alias) { - if (!alias.empty() && !isValidAlias(alias)) + if (!alias.empty() && !isValidAlias(alias)) { throw Base::ValueError("Invalid alias"); + } - const Cell * aliasedCell = getValueFromAlias(alias); - Cell * cell = nonNullCellAt(address); + const Cell* aliasedCell = getValueFromAlias(alias); + Cell* cell = nonNullCellAt(address); assert(cell); - if(aliasedCell == cell) + if (aliasedCell == cell) { return; + } - if (aliasedCell) + if (aliasedCell) { throw Base::ValueError("Alias already defined."); + } AtomicPropertyChange signaller(*this); - /* Mark cells depending on this cell dirty; they need to be resolved when an alias changes or disappears */ + /* Mark cells depending on this cell dirty; they need to be resolved when an alias changes or + * disappears */ std::string fullName = owner->getFullName() + "." + address.toString(); - std::map >::const_iterator j = propertyNameToCellMap.find(fullName); + std::map>::const_iterator j = + propertyNameToCellMap.find(fullName); if (j != propertyNameToCellMap.end()) { - std::set< CellAddress >::const_iterator k = j->second.begin(); + std::set::const_iterator k = j->second.begin(); while (k != j->second.end()) { setDirty(*k); @@ -719,7 +774,7 @@ void PropertySheet::setAlias(CellAddress address, const std::string &alias) std::map m; App::ObjectIdentifier key(owner, oldAlias); - App::ObjectIdentifier value(owner, alias.empty()?address.toString():alias); + App::ObjectIdentifier value(owner, alias.empty() ? address.toString() : alias); m[key] = value; @@ -729,16 +784,16 @@ void PropertySheet::setAlias(CellAddress address, const std::string &alias) signaller.tryInvoke(); } -void PropertySheet::setComputedUnit(CellAddress address, const Base::Unit &unit) +void PropertySheet::setComputedUnit(CellAddress address, const Base::Unit& unit) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); cell->setComputedUnit(unit); } void PropertySheet::setSpans(CellAddress address, int rows, int columns) { - Cell * cell = nonNullCellAt(address); + Cell* cell = nonNullCellAt(address); assert(cell); cell->setSpans(rows, columns); owner->cellSpanChanged(address); @@ -758,8 +813,9 @@ void PropertySheet::clear(CellAddress address, bool toClearAlias) { std::map::iterator i = data.find(address); - if (i == data.end()) + if (i == data.end()) { return; + } AtomicPropertyChange signaller(*this); @@ -773,8 +829,9 @@ void PropertySheet::clear(CellAddress address, bool toClearAlias) // Mark as dirty dirty.insert(i->first); - if (toClearAlias) + if (toClearAlias) { clearAlias(address); + } // Erase from internal struct data.erase(i); @@ -791,7 +848,9 @@ void PropertySheet::moveAlias(CellAddress currPos, CellAddress newPos) } } -void PropertySheet::moveCell(CellAddress currPos, CellAddress newPos, std::map & renames) +void PropertySheet::moveCell(CellAddress currPos, + CellAddress newPos, + std::map& renames) { std::map::const_iterator i = data.find(currPos); std::map::const_iterator j = data.find(newPos); @@ -804,7 +863,7 @@ void PropertySheet::moveCell(CellAddress currPos, CellAddress newPos, std::mapsecond; + Cell* cell = i->second; int rows, columns; // Get merged cell data @@ -831,7 +890,8 @@ void PropertySheet::moveCell(CellAddress currPos, CellAddress newPos, std::map renames; /* Copy all keys from cells map */ - boost::copy( data | boost::adaptors::map_keys, std::back_inserter(keys)); + boost::copy(data | boost::adaptors::map_keys, std::back_inserter(keys)); /* Sort them */ - std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2)); //NOLINT + std::sort(keys.begin(), + keys.end(), + std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2)); // NOLINT MoveCellsExpressionVisitor visitor(*this, - CellAddress(row, CellAddress::MAX_COLUMNS), count, 0); + CellAddress(row, CellAddress::MAX_COLUMNS), + count, + 0); AtomicPropertyChange signaller(*this); // move all the aliases first so dependencies can be calculated correctly - for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); ++i) { - if (i->row() >= row) + for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); + ++i) { + if (i->row() >= row) { moveAlias(*i, CellAddress(i->row() + count, i->col())); + } } - for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); ++i) { + for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); + ++i) { std::map::iterator j = data.find(*i); assert(j != data.end()); - Cell * cell = j->second; + Cell* cell = j->second; // Visit each cell to make changes to expressions if necessary visitor.reset(); @@ -873,35 +940,43 @@ void PropertySheet::insertRows(int row, int count) recomputeDependencies(*i); } - if (i->row() >= row) + if (i->row() >= row) { moveCell(*i, CellAddress(i->row() + count, i->col()), renames); + } } - const App::DocumentObject * docObj = static_cast(getContainer()); - owner->getDocument()->renameObjectIdentifiers(renames, [docObj](const App::DocumentObject * obj) { return obj != docObj; }); + const App::DocumentObject* docObj = static_cast(getContainer()); + owner->getDocument()->renameObjectIdentifiers(renames, + [docObj](const App::DocumentObject* obj) { + return obj != docObj; + }); signaller.tryInvoke(); } /** - * Sort function to sort two cell positions according to their row position. - * - */ + * Sort function to sort two cell positions according to their row position. + * + */ -bool PropertySheet::rowSortFunc(const CellAddress & a, const CellAddress & b) { - if (a.row() < b.row()) +bool PropertySheet::rowSortFunc(const CellAddress& a, const CellAddress& b) +{ + if (a.row() < b.row()) { return true; - else + } + else { return false; + } } std::vector PropertySheet::getRows(int row, int count) const { std::vector keys; - for (const auto &i : data) { + for (const auto& i : data) { auto key = i.first; - if (key.row() >= row && key.row() < row + count) + if (key.row() >= row && key.row() < row + count) { keys.push_back(key); + } } return keys; } @@ -915,19 +990,26 @@ void PropertySheet::removeRows(int row, int count) boost::copy(data | boost::adaptors::map_keys, std::back_inserter(keys)); /* Sort them */ - std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2)); + std::sort(keys.begin(), + keys.end(), + std::bind(&PropertySheet::rowSortFunc, this, sp::_1, sp::_2)); - MoveCellsExpressionVisitor visitor(*this, - CellAddress(row + count - 1, CellAddress::MAX_COLUMNS), -count, 0); + MoveCellsExpressionVisitor visitor( + *this, + CellAddress(row + count - 1, CellAddress::MAX_COLUMNS), + -count, + 0); AtomicPropertyChange signaller(*this); // move all the aliases first so dependencies can be calculated correctly for (const auto& key : keys) { - if (key.row() >= row && key.row() < row + count) + if (key.row() >= row && key.row() < row + count) { clearAlias(key); - else if (key.row() >= row + count) + } + else if (key.row() >= row + count) { moveAlias(key, CellAddress(key.row() - count, key.col())); + } } int spanRows, spanCols; @@ -936,7 +1018,7 @@ void PropertySheet::removeRows(int row, int count) assert(j != data.end()); - Cell * cell = j->second; + Cell* cell = j->second; // Visit each cell to make changes to expressions if necessary visitor.reset(); @@ -946,21 +1028,29 @@ void PropertySheet::removeRows(int row, int count) recomputeDependencies(key); } - if (key.row() >= row && key.row() < row + count) + if (key.row() >= row && key.row() < row + count) { clear(key, false); // aliases were cleared earlier - else if (key.row() >= row + count) + } + else if (key.row() >= row + count) { moveCell(key, CellAddress(key.row() - count, key.col()), renames); + } else if (cell->getSpans(spanRows, spanCols) && key.row() + spanRows >= row) { - if (key.row() + spanRows >= row + count) + if (key.row() + spanRows >= row + count) { spanRows -= count; - else + } + else { spanRows = key.row() - row; - mergeCells(j->first, CellAddress(j->first.row()+spanRows-1, j->first.col()+spanCols-1)); + } + mergeCells(j->first, + CellAddress(j->first.row() + spanRows - 1, j->first.col() + spanCols - 1)); } } - const App::DocumentObject * docObj = static_cast(getContainer()); - owner->getDocument()->renameObjectIdentifiers(renames, [docObj](const App::DocumentObject * obj) { return obj != docObj; }); + const App::DocumentObject* docObj = static_cast(getContainer()); + owner->getDocument()->renameObjectIdentifiers(renames, + [docObj](const App::DocumentObject* obj) { + return obj != docObj; + }); signaller.tryInvoke(); } @@ -976,22 +1066,27 @@ void PropertySheet::insertColumns(int col, int count) std::sort(keys.begin(), keys.end()); MoveCellsExpressionVisitor visitor(*this, - CellAddress(CellAddress::MAX_ROWS, col), 0, count); + CellAddress(CellAddress::MAX_ROWS, col), + 0, + count); AtomicPropertyChange signaller(*this); // move all the aliases first so dependencies can be calculated correctly - for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); ++i) { - if (i->col() >= col) + for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); + ++i) { + if (i->col() >= col) { moveAlias(*i, CellAddress(i->row(), i->col() + count)); + } } - for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); ++i) { + for (std::vector::const_reverse_iterator i = keys.rbegin(); i != keys.rend(); + ++i) { std::map::iterator j = data.find(*i); assert(j != data.end()); - Cell * cell = j->second; + Cell* cell = j->second; // Visit each cell to make changes to expressions if necessary visitor.reset(); @@ -1001,35 +1096,43 @@ void PropertySheet::insertColumns(int col, int count) recomputeDependencies(*i); } - if (i->col() >= col) + if (i->col() >= col) { moveCell(*i, CellAddress(i->row(), i->col() + count), renames); + } } - const App::DocumentObject * docObj = static_cast(getContainer()); - owner->getDocument()->renameObjectIdentifiers(renames, [docObj](const App::DocumentObject * obj) { return obj != docObj; }); + const App::DocumentObject* docObj = static_cast(getContainer()); + owner->getDocument()->renameObjectIdentifiers(renames, + [docObj](const App::DocumentObject* obj) { + return obj != docObj; + }); signaller.tryInvoke(); } /** - * Sort function to sort two cell positions according to their column position. - * - */ + * Sort function to sort two cell positions according to their column position. + * + */ -bool PropertySheet::colSortFunc(const CellAddress & a, const CellAddress & b) { - if (a.col() < b.col()) +bool PropertySheet::colSortFunc(const CellAddress& a, const CellAddress& b) +{ + if (a.col() < b.col()) { return true; - else + } + else { return false; + } } std::vector PropertySheet::getColumns(int column, int count) const { std::vector keys; - for (const auto &i : data) { + for (const auto& i : data) { auto key = i.first; - if (key.col() >= column && key.col() < column + count) + if (key.col() >= column && key.col() < column + count) { keys.push_back(key); + } } return keys; } @@ -1043,19 +1146,26 @@ void PropertySheet::removeColumns(int col, int count) boost::copy(data | boost::adaptors::map_keys, std::back_inserter(keys)); /* Sort them */ - std::sort(keys.begin(), keys.end(), std::bind(&PropertySheet::colSortFunc, this, sp::_1, sp::_2)); //NOLINT + std::sort(keys.begin(), + keys.end(), + std::bind(&PropertySheet::colSortFunc, this, sp::_1, sp::_2)); // NOLINT - MoveCellsExpressionVisitor visitor(*this, - CellAddress(CellAddress::MAX_ROWS, col + count - 1), 0, -count); + MoveCellsExpressionVisitor visitor( + *this, + CellAddress(CellAddress::MAX_ROWS, col + count - 1), + 0, + -count); AtomicPropertyChange signaller(*this); // move all the aliases first so dependencies can be calculated correctly for (const auto& key : keys) { - if (key.col() >= col && key.col() < col + count) + if (key.col() >= col && key.col() < col + count) { clearAlias(key); - else if (key.col() >= col + count) + } + else if (key.col() >= col + count) { moveAlias(key, CellAddress(key.row(), key.col() - count)); + } } int spanRows, spanCols; @@ -1064,7 +1174,7 @@ void PropertySheet::removeColumns(int col, int count) assert(j != data.end()); - Cell * cell = j->second; + Cell* cell = j->second; // Visit each cell to make changes to expressions if necessary visitor.reset(); @@ -1074,21 +1184,29 @@ void PropertySheet::removeColumns(int col, int count) recomputeDependencies(key); } - if (key.col() >= col && key.col() < col + count) + if (key.col() >= col && key.col() < col + count) { clear(key, false); // aliases were cleared earlier - else if (key.col() >= col + count) + } + else if (key.col() >= col + count) { moveCell(key, CellAddress(key.row(), key.col() - count), renames); + } else if (cell->getSpans(spanRows, spanCols) && key.col() + spanCols >= col) { - if (key.col() + spanCols >= col + count) + if (key.col() + spanCols >= col + count) { spanCols -= count; - else + } + else { spanCols = key.col() - col; - mergeCells(j->first, CellAddress(j->first.row()+spanRows-1, j->first.col()+spanCols-1)); + } + mergeCells(j->first, + CellAddress(j->first.row() + spanRows - 1, j->first.col() + spanCols - 1)); } } - const App::DocumentObject * docObj = static_cast(getContainer()); - owner->getDocument()->renameObjectIdentifiers(renames, [docObj](const App::DocumentObject * obj) { return obj != docObj; } ); + const App::DocumentObject* docObj = static_cast(getContainer()); + owner->getDocument()->renameObjectIdentifiers(renames, + [docObj](const App::DocumentObject* obj) { + return obj != docObj; + }); signaller.tryInvoke(); } @@ -1109,9 +1227,9 @@ bool PropertySheet::mergeCells(CellAddress from, CellAddress to) if (it != mergedCells.end()) { int rows, cols; cellAt(it->second)->getSpans(rows, cols); - if (to.row() - from.row() + 1 == rows - && to.col() - from.col() + 1 == cols) + if (to.row() - from.row() + 1 == rows && to.col() - from.col() + 1 == cols) { return false; + } } AtomicPropertyChange signaller(*this); @@ -1126,8 +1244,9 @@ bool PropertySheet::mergeCells(CellAddress from, CellAddress to) // Clear cells that will be hidden by the merge for (int r = from.row(); r <= to.row(); ++r) { for (int c = from.col(); c <= to.col(); ++c) { - if ( !(r == from.row() && c == from.col()) ) + if (!(r == from.row() && c == from.col())) { clear(CellAddress(r, c)); + } } } @@ -1151,8 +1270,9 @@ void PropertySheet::splitCell(CellAddress address) int rows, cols; std::map::const_iterator i = mergedCells.find(address); - if (i == mergedCells.end()) + if (i == mergedCells.end()) { return; + } CellAddress anchor = i->second; AtomicPropertyChange signaller(*this); @@ -1170,17 +1290,19 @@ void PropertySheet::splitCell(CellAddress address) signaller.tryInvoke(); } -void PropertySheet::getSpans(CellAddress address, int & rows, int & cols) const +void PropertySheet::getSpans(CellAddress address, int& rows, int& cols) const { std::map::const_iterator i = mergedCells.find(address); if (i != mergedCells.end()) { CellAddress anchor = i->second; - if (anchor == address) + if (anchor == address) { cellAt(anchor)->getSpans(rows, cols); - else + } + else { rows = cols = 1; + } } else { rows = cols = 1; @@ -1189,10 +1311,12 @@ void PropertySheet::getSpans(CellAddress address, int & rows, int & cols) const App::CellAddress Spreadsheet::PropertySheet::getAnchor(App::CellAddress address) const { - if (auto anchor = mergedCells.find(address); anchor != mergedCells.end()) + if (auto anchor = mergedCells.find(address); anchor != mergedCells.end()) { return anchor->second; - else + } + else { return address; + } } bool PropertySheet::isMergedCell(CellAddress address) const @@ -1208,30 +1332,32 @@ bool PropertySheet::isHidden(CellAddress address) const } /** - * Update dependencies of \a expression for cell at \a key. - * - * @param expression Expression to extract dependencies from - * @param key Address of cell containing the expression. - */ + * Update dependencies of \a expression for cell at \a key. + * + * @param expression Expression to extract dependencies from + * @param key Address of cell containing the expression. + */ void PropertySheet::addDependencies(CellAddress key) { - Cell * cell = getValue(key); + Cell* cell = getValue(key); - if (!cell) + if (!cell) { return; + } cell->clearResolveException(); - const Expression * expression = cell->getExpression(); + const Expression* expression = cell->getExpression(); - if (!expression) + if (!expression) { return; + } - for(auto &var : expression->getIdentifiers()) { - for(auto &dep : var.first.getDep(true)) { - App::DocumentObject *docObj = dep.first; - App::Document *doc = docObj->getDocument(); + for (auto& var : expression->getIdentifiers()) { + for (auto& dep : var.first.getDep(true)) { + App::DocumentObject* docObj = dep.first; + App::Document* doc = docObj->getDocument(); std::string docObjName = docObj->getFullName(); @@ -1241,7 +1367,7 @@ void PropertySheet::addDependencies(CellAddress key) cellToDocumentObjectMap[key].insert(docObjName); ++updateCount; - for(auto &name : dep.second) { + for (auto& name : dep.second) { std::string propName = docObjName + "." + name; FC_LOG("dep " << key.toString() << " -> " << name); @@ -1269,28 +1395,30 @@ void PropertySheet::addDependencies(CellAddress key) } /** - * Remove dependencies given by \a expression for cell at \a key. - * - * @param expression Expression to extract dependencies from - * @param key Address of cell containing the expression - * - */ + * Remove dependencies given by \a expression for cell at \a key. + * + * @param expression Expression to extract dependencies from + * @param key Address of cell containing the expression + * + */ void PropertySheet::removeDependencies(CellAddress key) { /* Remove from Property <-> Key maps */ - std::map >::iterator i1 = cellToPropertyNameMap.find(key); + std::map>::iterator i1 = cellToPropertyNameMap.find(key); if (i1 != cellToPropertyNameMap.end()) { - std::set< std::string >::const_iterator j = i1->second.begin(); + std::set::const_iterator j = i1->second.begin(); while (j != i1->second.end()) { - std::map >::iterator k = propertyNameToCellMap.find(*j); + std::map>::iterator k = + propertyNameToCellMap.find(*j); - //assert(k != propertyNameToCellMap.end()); - if (k != propertyNameToCellMap.end()) + // assert(k != propertyNameToCellMap.end()); + if (k != propertyNameToCellMap.end()) { k->second.erase(key); + } ++j; } @@ -1299,20 +1427,22 @@ void PropertySheet::removeDependencies(CellAddress key) /* Remove from DocumentObject <-> Key maps */ - std::map >::iterator i2 = cellToDocumentObjectMap.find(key); + std::map>::iterator i2 = cellToDocumentObjectMap.find(key); if (i2 != cellToDocumentObjectMap.end()) { - std::set< std::string >::const_iterator j = i2->second.begin(); + std::set::const_iterator j = i2->second.begin(); while (j != i2->second.end()) { - std::map >::iterator k = documentObjectToCellMap.find(*j); + std::map>::iterator k = + documentObjectToCellMap.find(*j); - //assert(k != documentObjectToCellMap.end()); + // assert(k != documentObjectToCellMap.end()); if (k != documentObjectToCellMap.end()) { k->second.erase(key); - if (k->second.empty()) + if (k->second.empty()) { documentObjectToCellMap.erase(*j); + } } ++j; @@ -1324,21 +1454,22 @@ void PropertySheet::removeDependencies(CellAddress key) } /** - * Recompute any cells that depend on \a prop. - * - */ + * Recompute any cells that depend on \a prop. + * + */ -void PropertySheet::recomputeDependants(const App::DocumentObject *owner, const char *propName) +void PropertySheet::recomputeDependants(const App::DocumentObject* owner, const char* propName) { auto itD = _Deps.find(const_cast(owner)); - if(itD!=_Deps.end() && itD->second) { + if (itD != _Deps.end() && itD->second) { // Check for hidden reference. Because a hidden reference is not // protected by cyclic dependency checking, we need to take special // care to prevent it from misbehave. - Sheet *sheet = Base::freecad_dynamic_cast(getContainer()); - if(!sheet || sheet->testStatus(App::ObjectStatus::Recompute2) - || !owner || owner->testStatus(App::ObjectStatus::Recompute2)) + Sheet* sheet = Base::freecad_dynamic_cast(getContainer()); + if (!sheet || sheet->testStatus(App::ObjectStatus::Recompute2) || !owner + || owner->testStatus(App::ObjectStatus::Recompute2)) { return; + } } // First, search without actual property name for sub-object/link @@ -1349,91 +1480,102 @@ void PropertySheet::recomputeDependants(const App::DocumentObject *owner, const std::string fullName = owner->getFullName() + "."; auto it = propertyNameToCellMap.find(fullName); if (it != propertyNameToCellMap.end()) { - for(auto &cell : it->second) + for (auto& cell : it->second) { setDirty(cell); + } } if (propName && *propName) { // Now, we check for direct property references it = propertyNameToCellMap.find(fullName + propName); if (it != propertyNameToCellMap.end()) { - for(auto &cell : it->second) + for (auto& cell : it->second) { setDirty(cell); + } } } } -void PropertySheet::breakLink(App::DocumentObject *obj, bool clear) { - AtomicPropertyChange signaller(*this,false); - PropertyExpressionContainer::breakLink(obj,clear); +void PropertySheet::breakLink(App::DocumentObject* obj, bool clear) +{ + AtomicPropertyChange signaller(*this, false); + PropertyExpressionContainer::breakLink(obj, clear); } -void PropertySheet::onBreakLink(App::DocumentObject *obj) { +void PropertySheet::onBreakLink(App::DocumentObject* obj) +{ invalidateDependants(obj); } -void PropertySheet::hasSetChildValue(App::Property &prop) { +void PropertySheet::hasSetChildValue(App::Property& prop) +{ ++updateCount; PropertyExpressionContainer::hasSetChildValue(prop); } -void PropertySheet::invalidateDependants(const App::DocumentObject *docObj) +void PropertySheet::invalidateDependants(const App::DocumentObject* docObj) { depConnections.erase(docObj); // Recompute cells that depend on this cell auto iter = documentObjectToCellMap.find(docObj->getFullName()); - if (iter == documentObjectToCellMap.end()) + if (iter == documentObjectToCellMap.end()) { return; + } // Touch to force recompute touch(); AtomicPropertyChange signaller(*this); - for(const auto &address : iter->second) { - Cell * cell = getValue(address); + for (const auto& address : iter->second) { + Cell* cell = getValue(address); cell->setResolveException("Unresolved dependency"); setDirty(address); } } -void PropertySheet::slotChangedObject(const App::DocumentObject &obj, const App::Property &prop) +void PropertySheet::slotChangedObject(const App::DocumentObject& obj, const App::Property& prop) { if (&obj == getContainer()) { - if (&prop == this || !prop.getName() || revAliasProp.count(prop.getName())) + if (&prop == this || !prop.getName() || revAliasProp.count(prop.getName())) { return; - if (stringToAddress(prop.getName(), true).isValid()) + } + if (stringToAddress(prop.getName(), true).isValid()) { return; + } } recomputeDependants(&obj, prop.getName()); } -void PropertySheet::onAddDep(App::DocumentObject *obj) { - //NOLINTBEGIN - depConnections[obj] = obj->signalChanged.connect(std::bind( - &PropertySheet::slotChangedObject, this, sp::_1, sp::_2)); - //NOLINTEND +void PropertySheet::onAddDep(App::DocumentObject* obj) +{ + // NOLINTBEGIN + depConnections[obj] = obj->signalChanged.connect( + std::bind(&PropertySheet::slotChangedObject, this, sp::_1, sp::_2)); + // NOLINTEND } -void PropertySheet::onRemoveDep(App::DocumentObject *obj) { +void PropertySheet::onRemoveDep(App::DocumentObject* obj) +{ depConnections.erase(obj); } -void PropertySheet::renamedDocumentObject(const App::DocumentObject * docObj) +void PropertySheet::renamedDocumentObject(const App::DocumentObject* docObj) { #if 1 (void)docObj; #else - if (documentObjectName.find(docObj) == documentObjectName.end()) + if (documentObjectName.find(docObj) == documentObjectName.end()) { return; + } - std::map::iterator i = data.begin(); + std::map::iterator i = data.begin(); while (i != data.end()) { RelabelDocumentObjectExpressionVisitor v(*this, docObj); i->second->visit(v); - if(v.changed()) { + if (v.changed()) { v.reset(); recomputeDependencies(i->first); setDirty(i->first); @@ -1443,19 +1585,21 @@ void PropertySheet::renamedDocumentObject(const App::DocumentObject * docObj) #endif } -void PropertySheet::onRelabeledDocument(const App::Document &doc) +void PropertySheet::onRelabeledDocument(const App::Document& doc) { RelabelDocumentExpressionVisitor v(doc); - for(auto &c : data) + for (auto& c : data) { c.second->visit(v); + } } -void PropertySheet::renameObjectIdentifiers(const std::map &paths) +void PropertySheet::renameObjectIdentifiers( + const std::map& paths) { RenameObjectIdentifierExpressionVisitor v {*this, paths, *this}; - for(auto &c : data) { + for (auto& c : data) { c.second->visit(v); - if(v.changed()) { + if (v.changed()) { v.reset(); recomputeDependencies(c.first); setDirty(c.first); @@ -1463,14 +1607,15 @@ void PropertySheet::renameObjectIdentifiers(const std::map(docObj))) { - // const App::DocumentObject * docObj = dynamic_cast(getContainer()); - // if(docObj && docObj->getDocument()!=docObj->getDocument()) { + // const App::DocumentObject * docObj = dynamic_cast(getContainer()); if(docObj && + // docObj->getDocument()!=docObj->getDocument()) { // for(auto it=xlinks.begin();it!=xlinks.end();++it) { // if(it->getValue() == docObj) { // xlinks.erase(it); @@ -1482,29 +1627,34 @@ void PropertySheet::deletedDocumentObject(const App::DocumentObject *docObj) } void PropertySheet::documentSet() -{ -} +{} -const std::set &PropertySheet::getDeps(const std::string &name) const +const std::set& PropertySheet::getDeps(const std::string& name) const { static std::set empty; - std::map >::const_iterator i = propertyNameToCellMap.find(name); + std::map>::const_iterator i = + propertyNameToCellMap.find(name); - if (i != propertyNameToCellMap.end()) + if (i != propertyNameToCellMap.end()) { return i->second; - else + } + else { return empty; + } } -const std::set &PropertySheet::getDeps(CellAddress pos) const +const std::set& PropertySheet::getDeps(CellAddress pos) const { static std::set empty; - std::map >::const_iterator i = cellToPropertyNameMap.find(pos); + std::map>::const_iterator i = + cellToPropertyNameMap.find(pos); - if (i != cellToPropertyNameMap.end()) + if (i != cellToPropertyNameMap.end()) { return i->second; - else + } + else { return empty; + } } void PropertySheet::recomputeDependencies(CellAddress key) @@ -1518,27 +1668,25 @@ void PropertySheet::recomputeDependencies(CellAddress key) void PropertySheet::hasSetValue() { - if(updateCount == 0 || - !owner || !owner->getNameInDocument() || owner->isRestoring() || - this!=&owner->cells || - testFlag(LinkDetached)) - { + if (updateCount == 0 || !owner || !owner->getNameInDocument() || owner->isRestoring() + || this != &owner->cells || testFlag(LinkDetached)) { PropertyExpressionContainer::hasSetValue(); return; } updateCount = 0; - std::map deps; + std::map deps; std::vector labels; unregisterElementReference(); UpdateElementReferenceExpressionVisitor v(*this); - for(auto &d : data) { + for (auto& d : data) { auto expr = d.second->expression.get(); - if(expr) { - expr->getDepObjects(deps,&labels); - if(!restoring) + if (expr) { + expr->getDepObjects(deps, &labels); + if (!restoring) { expr->visit(v); + } } } registerLabelReferences(std::move(labels)); @@ -1548,50 +1696,57 @@ void PropertySheet::hasSetValue() PropertyExpressionContainer::hasSetValue(); } -PyObject *PropertySheet::getPyObject() +PyObject* PropertySheet::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new PropertySheetPy(this),true); + PythonObject = Py::Object(new PropertySheetPy(this), true); } return Py::new_reference_to(PythonObject); } -void PropertySheet::setPyObject(PyObject *obj) { - if(!obj || !PyObject_TypeCheck(obj, &PropertySheetPy::Type)) +void PropertySheet::setPyObject(PyObject* obj) +{ + if (!obj || !PyObject_TypeCheck(obj, &PropertySheetPy::Type)) { throw Base::TypeError("Invalid type"); - if(obj != PythonObject.ptr()) + } + if (obj != PythonObject.ptr()) { Paste(*static_cast(obj)->getPropertySheetPtr()); + } } -PyObject *PropertySheet::getPyValue(PyObject *key) { +PyObject* PropertySheet::getPyValue(PyObject* key) +{ assert(key); - PY_TRY { + PY_TRY + { std::string addr = Py::Object(key).as_string(); - CellAddress caddr = getCellAddress(addr.c_str(),true); - if(caddr.isValid()) { + CellAddress caddr = getCellAddress(addr.c_str(), true); + if (caddr.isValid()) { auto prop = owner->getPropertyByName(caddr.toString().c_str()); - if(prop) + if (prop) { return prop->getPyObject(); + } Py_Return; } Range range = getRange(Py::Object(key).as_string().c_str(), false); - if(!range.from().isValid() || !range.to().isValid()) + if (!range.from().isValid() || !range.to().isValid()) { return Py::new_reference_to(Py::Tuple()); + } Py::Tuple res(range.size()); int i = 0; do { addr = range.address(); auto prop = owner->getPropertyByName(addr.c_str()); - res.setItem(i++,prop?Py::asObject(prop->getPyObject()):Py::Object()); - } while(range.next()); + res.setItem(i++, prop ? Py::asObject(prop->getPyObject()) : Py::Object()); + } while (range.next()); return Py::new_reference_to(res); - - } PY_CATCH + } + PY_CATCH } void PropertySheet::afterRestore() @@ -1602,54 +1757,63 @@ void PropertySheet::afterRestore() PropertyExpressionContainer::afterRestore(); { ObjectIdentifier::DocumentMapper mapper(this->_DocMap); - for(auto &d : data) + for (auto& d : data) { d.second->afterRestore(); + } } - for(auto &v : _XLinks) { - auto &xlink = *v.second; - if(!xlink.checkRestore()) + for (auto& v : _XLinks) { + auto& xlink = *v.second; + if (!xlink.checkRestore()) { continue; + } auto iter = documentObjectToCellMap.find(xlink.getValue()->getFullName()); - if(iter == documentObjectToCellMap.end()) + if (iter == documentObjectToCellMap.end()) { continue; + } touch(); - for(const auto &address : iter->second) + for (const auto& address : iter->second) { setDirty(address); + } } signaller.tryInvoke(); } -void PropertySheet::onContainerRestored() { +void PropertySheet::onContainerRestored() +{ Base::FlagToggler flag(restoring); unregisterElementReference(); UpdateElementReferenceExpressionVisitor v(*this); - for(auto &d : data) { + for (auto& d : data) { auto expr = d.second->expression.get(); - if(expr) + if (expr) { expr->visit(v); + } } } -bool PropertySheet::adjustLink(const std::set &inList) { - AtomicPropertyChange signaller(*this,false); +bool PropertySheet::adjustLink(const std::set& inList) +{ + AtomicPropertyChange signaller(*this, false); bool changed = false; - for(auto &d : data) { + for (auto& d : data) { auto expr = d.second->expression.get(); - if(!expr) + if (!expr) { continue; + } try { bool need_adjust = false; - for(auto &v : expr->getDepObjects()) { + for (auto& v : expr->getDepObjects()) { auto docObj = v.first; - if (v.second && docObj && docObj!=owner && inList.count(docObj)) { + if (v.second && docObj && docObj != owner && inList.count(docObj)) { need_adjust = true; break; } } - if(!need_adjust) + if (!need_adjust) { continue; + } signaller.aboutToChange(); changed = true; @@ -1657,297 +1821,342 @@ bool PropertySheet::adjustLink(const std::set &inList) { removeDependencies(d.first); expr->adjustLinks(inList); addDependencies(d.first); - - }catch(Base::Exception &e) { + } + catch (Base::Exception& e) { addDependencies(d.first); std::ostringstream ss; ss << "Failed to adjust link for " << owner->getFullName() << " in expression " - << expr->toString() << ": " << e.what(); + << expr->toString() << ": " << e.what(); throw Base::RuntimeError(ss.str()); } } return changed; } -void PropertySheet::updateElementReference(DocumentObject *feature,bool reverse,bool notify) +void PropertySheet::updateElementReference(DocumentObject* feature, bool reverse, bool notify) { (void)notify; - if(!feature) + if (!feature) { unregisterElementReference(); - UpdateElementReferenceExpressionVisitor visitor(*this,feature,reverse); - for(auto &d : data) { + } + UpdateElementReferenceExpressionVisitor visitor(*this, feature, reverse); + for (auto& d : data) { auto expr = d.second->expression.get(); - if(!expr) + if (!expr) { continue; + } expr->visit(visitor); } - if(feature && visitor.changed()) { + if (feature && visitor.changed()) { auto owner = dynamic_cast(getContainer()); - if(owner) + if (owner) { owner->onUpdateElementReference(this); + } } } -bool PropertySheet::referenceChanged() const { +bool PropertySheet::referenceChanged() const +{ return false; } -Property *PropertySheet::CopyOnImportExternal( - const std::map &nameMap) const +Property* +PropertySheet::CopyOnImportExternal(const std::map& nameMap) const { - std::map > changed; - for(auto &d : data) { + std::map> changed; + for (auto& d : data) { auto e = d.second->expression.get(); - if(!e) continue; + if (!e) { + continue; + } auto expr = e->importSubNames(nameMap); - if(!expr) + if (!expr) { continue; + } changed[d.first] = std::move(expr); } - if(changed.empty()) + if (changed.empty()) { return nullptr; + } std::unique_ptr copy(new PropertySheet(*this)); - for(auto &change : changed) + for (auto& change : changed) { copy->data[change.first]->setExpression(std::move(change.second)); + } return copy.release(); } -Property *PropertySheet::CopyOnLabelChange(App::DocumentObject *obj, - const std::string &ref, const char *newLabel) const +Property* PropertySheet::CopyOnLabelChange(App::DocumentObject* obj, + const std::string& ref, + const char* newLabel) const { - std::map > changed; - for(auto &d : data) { + std::map> changed; + for (auto& d : data) { auto e = d.second->expression.get(); - if(!e) continue; - auto expr = e->updateLabelReference(obj,ref,newLabel); - if(!expr) + if (!e) { continue; + } + auto expr = e->updateLabelReference(obj, ref, newLabel); + if (!expr) { + continue; + } changed[d.first] = std::move(expr); } - if(changed.empty()) + if (changed.empty()) { return nullptr; + } std::unique_ptr copy(new PropertySheet(*this)); - for(auto &change : changed) + for (auto& change : changed) { copy->data[change.first]->setExpression(std::move(change.second)); + } return copy.release(); } -Property *PropertySheet::CopyOnLinkReplace(const App::DocumentObject *parent, - App::DocumentObject *oldObj, App::DocumentObject *newObj) const +Property* PropertySheet::CopyOnLinkReplace(const App::DocumentObject* parent, + App::DocumentObject* oldObj, + App::DocumentObject* newObj) const { - std::map > changed; - for(auto &d : data) { + std::map> changed; + for (auto& d : data) { auto e = d.second->expression.get(); - if(!e) continue; - auto expr = e->replaceObject(parent,oldObj,newObj); - if(!expr) + if (!e) { continue; + } + auto expr = e->replaceObject(parent, oldObj, newObj); + if (!expr) { + continue; + } changed[d.first] = std::move(expr); } - if(changed.empty()) + if (changed.empty()) { return nullptr; + } std::unique_ptr copy(new PropertySheet(*this)); - for(auto &change : changed) + for (auto& change : changed) { copy->data[change.first]->setExpression(std::move(change.second)); + } return copy.release(); } -std::map PropertySheet::getExpressions() const { +std::map PropertySheet::getExpressions() const +{ std::map res; - for(auto &d : data) { - if(d.second->expression) { - res[ObjectIdentifier(owner,d.first.toString())] = d.second->getExpression(true); + for (auto& d : data) { + if (d.second->expression) { + res[ObjectIdentifier(owner, d.first.toString())] = d.second->getExpression(true); } } return res; } -void PropertySheet::setExpressions( - std::map &&exprs) +void PropertySheet::setExpressions(std::map&& exprs) { AtomicPropertyChange signaller(*this); - for(auto &v : exprs) { + for (auto& v : exprs) { CellAddress addr(v.first.getPropertyName().c_str()); - auto &cell = data[addr]; - if(!cell) { - if(!v.second) + auto& cell = data[addr]; + if (!cell) { + if (!v.second) { continue; - cell = new Cell(addr,this); + } + cell = new Cell(addr, this); } - if(!v.second) + if (!v.second) { clear(addr); - else + } + else { cell->setExpression(std::move(v.second)); + } } signaller.tryInvoke(); } -App::CellAddress PropertySheet::getCellAddress(const char *addr, bool silent) const { +App::CellAddress PropertySheet::getCellAddress(const char* addr, bool silent) const +{ assert(addr); CellAddress caddr; - const Cell * cell = getValueFromAlias(addr); - if(cell) + const Cell* cell = getValueFromAlias(addr); + if (cell) { return cell->getAddress(); - else - return stringToAddress(addr,silent); + } + else { + return stringToAddress(addr, silent); + } } -App::Range PropertySheet::getRange(const char *range, bool silent) const { +App::Range PropertySheet::getRange(const char* range, bool silent) const +{ assert(range); - const char *sep = strchr(range,':'); - CellAddress from,to; - if(!sep) - from = to = getCellAddress(range,silent); + const char* sep = strchr(range, ':'); + CellAddress from, to; + if (!sep) { + from = to = getCellAddress(range, silent); + } else { - std::string addr(range,sep); + std::string addr(range, sep); auto findCell = [this, &addr](CellAddress caddr, int r, int c) -> CellAddress { - if(!getValue(caddr)) + if (!getValue(caddr)) { return CellAddress(); - if(addr == "-") - r = 0; - else - c = 0; - for(;;) { - caddr.setRow(caddr.row()+r); - caddr.setCol(caddr.col()+c); - if(!caddr.isValid() || !getValue(caddr)) - break; } - caddr.setRow(caddr.row()-r); - caddr.setCol(caddr.col()-c); + if (addr == "-") { + r = 0; + } + else { + c = 0; + } + for (;;) { + caddr.setRow(caddr.row() + r); + caddr.setCol(caddr.col() + c); + if (!caddr.isValid() || !getValue(caddr)) { + break; + } + } + caddr.setRow(caddr.row() - r); + caddr.setCol(caddr.col() - c); return caddr; }; - if(addr == "-" || addr == "|") { - to = getCellAddress(sep+1,silent); - return Range(findCell(to,-1,-1), from); - } else { - from = getCellAddress(addr.c_str(),silent); - addr = sep+1; - if(addr == "-" || addr == "|") - return Range(from, findCell(from,1,1)); - to = getCellAddress(addr.c_str(),silent); + if (addr == "-" || addr == "|") { + to = getCellAddress(sep + 1, silent); + return Range(findCell(to, -1, -1), from); + } + else { + from = getCellAddress(addr.c_str(), silent); + addr = sep + 1; + if (addr == "-" || addr == "|") { + return Range(from, findCell(from, 1, 1)); + } + to = getCellAddress(addr.c_str(), silent); } } - if(!from.isValid() || !to.isValid()) - return App::Range(App::CellAddress(),App::CellAddress()); - return App::Range(from,to); + if (!from.isValid() || !to.isValid()) { + return App::Range(App::CellAddress(), App::CellAddress()); + } + return App::Range(from, to); } -bool PropertySheet::isBindingPath(const ObjectIdentifier &path, - CellAddress *from, CellAddress *to, bool *href) const +bool PropertySheet::isBindingPath(const ObjectIdentifier& path, + CellAddress* from, + CellAddress* to, + bool* href) const { - const auto &comps = path.getComponents(); - if (comps.size()!=4 - || !comps[2].isSimple() - || !comps[3].isSimple() - || (comps[1].getName()!="Bind" - && comps[1].getName()!="BindHREF" - && comps[1].getName()!="BindHiddenRef") - || path.getProperty() != this) - { + const auto& comps = path.getComponents(); + if (comps.size() != 4 || !comps[2].isSimple() || !comps[3].isSimple() + || (comps[1].getName() != "Bind" && comps[1].getName() != "BindHREF" + && comps[1].getName() != "BindHiddenRef") + || path.getProperty() != this) { return false; } - if(href) - *href = (comps[1].getName()=="BindHREF" || comps[1].getName()=="BindHiddenRef"); - if(from) + if (href) { + *href = (comps[1].getName() == "BindHREF" || comps[1].getName() == "BindHiddenRef"); + } + if (from) { *from = CellAddress(comps[2].getName()); - if(to) + } + if (to) { *to = CellAddress(comps[3].getName()); + } return true; } -PropertySheet::BindingType -PropertySheet::getBinding(const Range &range, - ExpressionPtr *pStart, - ExpressionPtr *pEnd, - App::ObjectIdentifier *pTarget) const +PropertySheet::BindingType PropertySheet::getBinding(const Range& range, + ExpressionPtr* pStart, + ExpressionPtr* pEnd, + App::ObjectIdentifier* pTarget) const { - if(!owner) + if (!owner) { return BindingNone; + } - for(int href=0;href<2;++href) { + for (int href = 0; href < 2; ++href) { ObjectIdentifier path(*this); - path << ObjectIdentifier::SimpleComponent(href?"BindHiddenRef":"Bind"); + path << ObjectIdentifier::SimpleComponent(href ? "BindHiddenRef" : "Bind"); path << ObjectIdentifier::SimpleComponent(range.from().toString().c_str()); path << ObjectIdentifier::SimpleComponent(range.to().toString().c_str()); auto res = owner->getExpression(path); - if(res.expression && res.expression->isDerivedFrom(FunctionExpression::getClassTypeId())) - { + if (res.expression && res.expression->isDerivedFrom(FunctionExpression::getClassTypeId())) { auto expr = static_cast(res.expression.get()); - if(href) { - if((expr->getFunction()!=FunctionExpression::HIDDENREF - && expr->getFunction()!=FunctionExpression::HREF) - || expr->getArgs().size()!=1 - || !expr->getArgs().front()->isDerivedFrom(FunctionExpression::getClassTypeId())) + if (href) { + if ((expr->getFunction() != FunctionExpression::HIDDENREF + && expr->getFunction() != FunctionExpression::HREF) + || expr->getArgs().size() != 1 + || !expr->getArgs().front()->isDerivedFrom( + FunctionExpression::getClassTypeId())) { continue; + } expr = static_cast(expr->getArgs().front()); } - if(expr->getFunction() == FunctionExpression::TUPLE && expr->getArgs().size()==3) { + if (expr->getFunction() == FunctionExpression::TUPLE && expr->getArgs().size() == 3) { if (pTarget) { - if (auto e = Base::freecad_dynamic_cast(expr->getArgs()[0])) + if (auto e = + Base::freecad_dynamic_cast(expr->getArgs()[0])) { *pTarget = e->getPath(); + } } - if(pStart) + if (pStart) { pStart->reset(expr->getArgs()[1]->copy()); - if(pEnd) + } + if (pEnd) { pEnd->reset(expr->getArgs()[2]->copy()); - return href?BindingHiddenRef:BindingNormal; + } + return href ? BindingHiddenRef : BindingNormal; } } } return BindingNone; } -void PropertySheet::setPathValue(const ObjectIdentifier &path, const boost::any &value) +void PropertySheet::setPathValue(const ObjectIdentifier& path, const boost::any& value) { - if(!owner) + if (!owner) { FC_THROWM(Base::RuntimeError, "Invalid state"); + } bool href = false; - CellAddress from,to; - if(!isBindingPath(path,&from,&to,&href)) { - FC_THROWM(Base::IndexError, "Invalid binding of '" << path.toString() - << "' in " << getFullName()); + CellAddress from, to; + if (!isBindingPath(path, &from, &to, &href)) { + FC_THROWM(Base::IndexError, + "Invalid binding of '" << path.toString() << "' in " << getFullName()); } Base::PyGILStateLocker lock; Py::Object pyValue = pyObjectFromAny(value); - if(pyValue.isSequence()) { + if (pyValue.isSequence()) { Py::Sequence seq(pyValue); - if(seq.size()==3 - && PyObject_TypeCheck(seq[0].ptr(),&PropertySheetPy::Type) - && Py::Object(seq[1].ptr()).isString() - && Py::Object(seq[2].ptr()).isString()) - { - AtomicPropertyChange signaller(*this,false); + if (seq.size() == 3 && PyObject_TypeCheck(seq[0].ptr(), &PropertySheetPy::Type) + && Py::Object(seq[1].ptr()).isString() && Py::Object(seq[2].ptr()).isString()) { + AtomicPropertyChange signaller(*this, false); auto other = static_cast(seq[0].ptr())->getPropertySheetPtr(); - auto otherOwner = Base::freecad_dynamic_cast(other->getContainer()); - if(!otherOwner) - FC_THROWM(Base::RuntimeError, "Invalid binding of '" << other->getFullName() - << " in " << getFullName()); + auto otherOwner = + Base::freecad_dynamic_cast(other->getContainer()); + if (!otherOwner) { + FC_THROWM(Base::RuntimeError, + "Invalid binding of '" << other->getFullName() << " in " + << getFullName()); + } - App::CellAddress targetFrom = other->getCellAddress( - Py::Object(seq[1].ptr()).as_string().c_str(), false); + App::CellAddress targetFrom = + other->getCellAddress(Py::Object(seq[1].ptr()).as_string().c_str(), false); - App::CellAddress targetTo = other->getCellAddress( - Py::Object(seq[2].ptr()).as_string().c_str(), false); + App::CellAddress targetTo = + other->getCellAddress(Py::Object(seq[2].ptr()).as_string().c_str(), false); - std::string expr(href?"hiddenref(":""); - if(other != this) { - if(otherOwner->getDocument() == owner->getDocument()) + std::string expr(href ? "hiddenref(" : ""); + if (other != this) { + if (otherOwner->getDocument() == owner->getDocument()) { expr += otherOwner->getNameInDocument(); - else + } + else { expr += otherOwner->getFullName(); + } } expr += "."; std::size_t exprSize = expr.size(); - auto normalize = [](CellAddress &from, CellAddress &to) { + auto normalize = [](CellAddress& from, CellAddress& to) { if (from.row() > to.row()) { int tmp = from.row(); from.setRow(to.row()); @@ -1965,92 +2174,97 @@ void PropertySheet::setPathValue(const ObjectIdentifier &path, const boost::any App::Range totalRange(from, to); std::set touched; - while(from.row() <= to.row() - && from.col() <= to.col() - && targetFrom.row() <= targetTo.row() - && targetFrom.col() <= targetTo.col()) - { + while (from.row() <= to.row() && from.col() <= to.col() + && targetFrom.row() <= targetTo.row() && targetFrom.col() <= targetTo.col()) { App::Range range(from, to); App::Range rangeTarget(targetFrom, targetTo); int rowCount = std::min(range.rowCount(), rangeTarget.rowCount()); int colCount = std::min(range.colCount(), rangeTarget.colCount()); - if (rowCount == range.rowCount()) + if (rowCount == range.rowCount()) { from.setCol(from.col() + colCount); - else if (colCount == range.colCount()) + } + else if (colCount == range.colCount()) { from.setRow(from.row() + rowCount); - if (rowCount == rangeTarget.rowCount()) + } + if (rowCount == rangeTarget.rowCount()) { targetFrom.setCol(targetFrom.col() + colCount); - else if (colCount == rangeTarget.colCount()) + } + else if (colCount == rangeTarget.colCount()) { targetFrom.setRow(targetFrom.row() + rowCount); + } range = App::Range(range.from().row(), range.from().col(), - range.from().row()+rowCount-1, - range.from().col()+colCount-1); + range.from().row() + rowCount - 1, + range.from().col() + colCount - 1); rangeTarget = App::Range(rangeTarget.from().row(), rangeTarget.from().col(), - rangeTarget.from().row()+rowCount-1, - rangeTarget.from().col()+colCount-1); + rangeTarget.from().row() + rowCount - 1, + rangeTarget.from().col() + colCount - 1); do { CellAddress target(*rangeTarget); CellAddress source(*range); - if(other == this && source.row() >= rangeTarget.from().row() - && source.row() <= rangeTarget.to().row() - && source.col() >= rangeTarget.from().col() - && source.col() <= rangeTarget.to().col()) + if (other == this && source.row() >= rangeTarget.from().row() + && source.row() <= rangeTarget.to().row() + && source.col() >= rangeTarget.from().col() + && source.col() <= rangeTarget.to().col()) { continue; + } - Cell *dst = other->getValue(target); - Cell *src = getValue(source); - if(!dst || !dst->getExpression()) + Cell* dst = other->getValue(target); + Cell* src = getValue(source); + if (!dst || !dst->getExpression()) { continue; + } touched.insert(source); - if(!src) { + if (!src) { signaller.aboutToChange(); src = createCell(source); } std::string alias; - if(this!=other && dst->getAlias(alias)) { - auto *oldCell = getValueFromAlias(alias); - if(oldCell && oldCell!=dst) { + if (this != other && dst->getAlias(alias)) { + auto* oldCell = getValueFromAlias(alias); + if (oldCell && oldCell != dst) { signaller.aboutToChange(); oldCell->setAlias(""); } std::string oldAlias; - if(!src->getAlias(oldAlias) || oldAlias!=alias) { + if (!src->getAlias(oldAlias) || oldAlias != alias) { signaller.aboutToChange(); - setAlias(source,alias); + setAlias(source, alias); } } expr.resize(exprSize); expr += rangeTarget.address(); - if(href) + if (href) { expr += ")"; - auto e = App::ExpressionPtr(App::Expression::parse(owner,expr)); + } + auto e = App::ExpressionPtr(App::Expression::parse(owner, expr)); auto e2 = src->getExpression(); - if(!e2 || !e->isSame(*e2,false)) { + if (!e2 || !e->isSame(*e2, false)) { signaller.aboutToChange(); src->setExpression(std::move(e)); } - } while(range.next() && rangeTarget.next()); + } while (range.next() && rangeTarget.next()); } if (totalRange.size() != (int)touched.size()) { do { CellAddress addr(*totalRange); - if (touched.count(addr)) + if (touched.count(addr)) { continue; - Cell *src = getValue(addr); + } + Cell* src = getValue(addr); if (src && src->getExpression()) { signaller.aboutToChange(); src->setExpression(nullptr); } - } while(totalRange.next()); + } while (totalRange.next()); } owner->rangeUpdated(totalRange); @@ -2059,13 +2273,16 @@ void PropertySheet::setPathValue(const ObjectIdentifier &path, const boost::any } } - FC_THROWM(Base::TypeError, "Invalid path value '" - << "' for " << getFullName()); + FC_THROWM(Base::TypeError, + "Invalid path value '" + << "' for " << getFullName()); } -const boost::any PropertySheet::getPathValue(const App::ObjectIdentifier & path) const { - if(isBindingPath(path)) +const boost::any PropertySheet::getPathValue(const App::ObjectIdentifier& path) const +{ + if (isBindingPath(path)) { return boost::any(); + } return path.getValue(); } diff --git a/src/Mod/Spreadsheet/App/PropertySheet.h b/src/Mod/Spreadsheet/App/PropertySheet.h index 21b9621b12..09c80c857b 100644 --- a/src/Mod/Spreadsheet/App/PropertySheet.h +++ b/src/Mod/Spreadsheet/App/PropertySheet.h @@ -38,80 +38,86 @@ class Sheet; class PropertySheet; class SheetObserver; -class SpreadsheetExport PropertySheet : public App::PropertyExpressionContainer - , private App::AtomicPropertyChangeInterface { +class SpreadsheetExport PropertySheet: public App::PropertyExpressionContainer, + private App::AtomicPropertyChangeInterface +{ TYPESYSTEM_HEADER_WITH_OVERRIDE(); -public: - explicit PropertySheet(Sheet * _owner = nullptr); +public: + explicit PropertySheet(Sheet* _owner = nullptr); ~PropertySheet() override; std::map getExpressions() const override; - void setExpressions(std::map &&exprs) override; - void onRelabeledDocument(const App::Document &doc) override; + void setExpressions(std::map&& exprs) override; + void onRelabeledDocument(const App::Document& doc) override; - void updateElementReference( - App::DocumentObject *feature,bool reverse=false,bool notify=false) override; + void updateElementReference(App::DocumentObject* feature, + bool reverse = false, + bool notify = false) override; bool referenceChanged() const override; - bool adjustLink(const std::set &inList) override; - Property *CopyOnImportExternal(const std::map &nameMap) const override; - Property *CopyOnLabelChange(App::DocumentObject *obj, - const std::string &ref, const char *newLabel) const override; - Property *CopyOnLinkReplace(const App::DocumentObject *parent, - App::DocumentObject *oldObj, App::DocumentObject *newObj) const override; - void breakLink(App::DocumentObject *obj, bool clear) override; + bool adjustLink(const std::set& inList) override; + Property* + CopyOnImportExternal(const std::map& nameMap) const override; + Property* CopyOnLabelChange(App::DocumentObject* obj, + const std::string& ref, + const char* newLabel) const override; + Property* CopyOnLinkReplace(const App::DocumentObject* parent, + App::DocumentObject* oldObj, + App::DocumentObject* newObj) const override; + void breakLink(App::DocumentObject* obj, bool clear) override; void afterRestore() override; void onContainerRestored() override; - Property *Copy() const override; + Property* Copy() const override; - void Paste(const Property &from) override; + void Paste(const Property& from) override; - void Save (Base::Writer & writer) const override; + void Save(Base::Writer& writer) const override; - void Restore(Base::XMLReader & reader) override; + void Restore(Base::XMLReader& reader) override; - void copyCells(Base::Writer &writer, const std::vector &ranges) const; + void copyCells(Base::Writer& writer, const std::vector& ranges) const; - void pasteCells(Base::XMLReader &reader, App::Range dstRange); + void pasteCells(Base::XMLReader& reader, App::Range dstRange); - Cell *createCell(App::CellAddress address); + Cell* createCell(App::CellAddress address); - void setValue() { } + void setValue() + {} - void setContent(App::CellAddress address, const char * value); + void setContent(App::CellAddress address, const char* value); void setAlignment(App::CellAddress address, int _alignment); - void setStyle(App::CellAddress address, const std::set & _style); + void setStyle(App::CellAddress address, const std::set& _style); - void setForeground(App::CellAddress address, const App::Color &color); + void setForeground(App::CellAddress address, const App::Color& color); - void setBackground(App::CellAddress address, const App::Color &color); + void setBackground(App::CellAddress address, const App::Color& color); - void setDisplayUnit(App::CellAddress address, const std::string & unit); + void setDisplayUnit(App::CellAddress address, const std::string& unit); - void setAlias(App::CellAddress address, const std::string &alias); + void setAlias(App::CellAddress address, const std::string& alias); - void setComputedUnit(App::CellAddress address, const Base::Unit & unit); + void setComputedUnit(App::CellAddress address, const Base::Unit& unit); void setSpans(App::CellAddress address, int rows, int columns); - void clear(App::CellAddress address, bool toClearAlias=true); + void clear(App::CellAddress address, bool toClearAlias = true); void clear(); - Cell * getValue(App::CellAddress key); + Cell* getValue(App::CellAddress key); - const Cell * getValue(App::CellAddress key) const; + const Cell* getValue(App::CellAddress key) const; - Cell * getValueFromAlias(const std::string &alias); + Cell* getValueFromAlias(const std::string& alias); - const Cell * getValueFromAlias(const std::string &alias) const; + const Cell* getValueFromAlias(const std::string& alias) const; - bool isValidAlias(const std::string &candidate); + bool isValidAlias(const std::string& candidate); std::vector getUsedCells() const; @@ -121,21 +127,38 @@ public: std::tuple getNonEmptyRange() const; - Sheet * sheet() const { return owner; } + Sheet* sheet() const + { + return owner; + } - const std::set & getDirty() { return dirty; } + const std::set& getDirty() + { + return dirty; + } void setDirty(App::CellAddress address); void setDirty(); - void clearDirty(App::CellAddress key) { dirty.erase(key); } + void clearDirty(App::CellAddress key) + { + dirty.erase(key); + } - void clearDirty() { dirty.clear(); purgeTouched(); } + void clearDirty() + { + dirty.clear(); + purgeTouched(); + } - bool isDirty() const { return dirty.size() > 0; } + bool isDirty() const + { + return dirty.size() > 0; + } - void pasteCells(const std::map &cells, int rowOffset, int colOffset); + void + pasteCells(const std::map& cells, int rowOffset, int colOffset); void insertRows(int row, int count); @@ -149,13 +172,13 @@ public: void removeColumns(int col, int count); - unsigned int getMemSize () const override; + unsigned int getMemSize() const override; bool mergeCells(App::CellAddress from, App::CellAddress to); void splitCell(App::CellAddress address); - void getSpans(App::CellAddress address, int &rows, int &cols) const; + void getSpans(App::CellAddress address, int& rows, int& cols) const; bool hasSpan() const; @@ -165,62 +188,65 @@ public: bool isHidden(App::CellAddress address) const; - const std::set< App::CellAddress > & getDeps(const std::string & name) const; + const std::set& getDeps(const std::string& name) const; - const std::set &getDeps(App::CellAddress pos) const; + const std::set& getDeps(App::CellAddress pos) const; void recomputeDependencies(App::CellAddress key); - PyObject *getPyObject() override; - void setPyObject(PyObject *) override; + PyObject* getPyObject() override; + void setPyObject(PyObject*) override; - PyObject *getPyValue(PyObject *key); + PyObject* getPyValue(PyObject* key); - void invalidateDependants(const App::DocumentObject *docObj); + void invalidateDependants(const App::DocumentObject* docObj); - void renamedDocumentObject(const App::DocumentObject *docObj); - void renameObjectIdentifiers(const std::map &paths); + void renamedDocumentObject(const App::DocumentObject* docObj); + void + renameObjectIdentifiers(const std::map& paths); - void deletedDocumentObject(const App::DocumentObject *docObj); + void deletedDocumentObject(const App::DocumentObject* docObj); void documentSet(); - App::CellAddress getCellAddress(const char *addr, bool silent=false) const; - App::Range getRange(const char *range, bool silent=false) const; + App::CellAddress getCellAddress(const char* addr, bool silent = false) const; + App::Range getRange(const char* range, bool silent = false) const; - std::string getRow(int offset=0) const; + std::string getRow(int offset = 0) const; - std::string getColumn(int offset=0) const; + std::string getColumn(int offset = 0) const; - void setPathValue(const App::ObjectIdentifier & path, const boost::any & value) override; - const boost::any getPathValue(const App::ObjectIdentifier & path) const override; + void setPathValue(const App::ObjectIdentifier& path, const boost::any& value) override; + const boost::any getPathValue(const App::ObjectIdentifier& path) const override; unsigned getBindingBorder(App::CellAddress address) const; - bool isBindingPath(const App::ObjectIdentifier &path, - App::CellAddress *from=nullptr, App::CellAddress *to=nullptr, bool *href=nullptr) const; + bool isBindingPath(const App::ObjectIdentifier& path, + App::CellAddress* from = nullptr, + App::CellAddress* to = nullptr, + bool* href = nullptr) const; - enum BindingType { + enum BindingType + { BindingNone, BindingNormal, BindingHiddenRef, }; - BindingType getBinding(const App::Range &range, - App::ExpressionPtr *pStart=nullptr, - App::ExpressionPtr *pEnd=nullptr, - App::ObjectIdentifier *pTarget=nullptr) const; + BindingType getBinding(const App::Range& range, + App::ExpressionPtr* pStart = nullptr, + App::ExpressionPtr* pEnd = nullptr, + App::ObjectIdentifier* pTarget = nullptr) const; protected: void hasSetValue() override; - void hasSetChildValue(App::Property &prop) override; - void onBreakLink(App::DocumentObject *obj) override; - void onAddDep(App::DocumentObject *obj) override; - void onRemoveDep(App::DocumentObject *obj) override; + void hasSetChildValue(App::Property& prop) override; + void onBreakLink(App::DocumentObject* obj) override; + void onAddDep(App::DocumentObject* obj) override; + void onRemoveDep(App::DocumentObject* obj) override; private: - - PropertySheet(const PropertySheet & other); - PropertySheet& operator= (const PropertySheet&); + PropertySheet(const PropertySheet& other); + PropertySheet& operator=(const PropertySheet&); /* friends */ @@ -232,15 +258,15 @@ private: friend class Sheet; - Cell *cellAt(App::CellAddress address); + Cell* cellAt(App::CellAddress address); - Cell *nonNullCellAt(App::CellAddress address); + Cell* nonNullCellAt(App::CellAddress address); - const Cell *cellAt(App::CellAddress address) const; + const Cell* cellAt(App::CellAddress address) const; - bool colSortFunc(const App::CellAddress &a, const App::CellAddress &b); + bool colSortFunc(const App::CellAddress& a, const App::CellAddress& b); - bool rowSortFunc(const App::CellAddress &a, const App::CellAddress &b); + bool rowSortFunc(const App::CellAddress& a, const App::CellAddress& b); /*! Set of cells that have been marked dirty */ std::set dirty; @@ -252,13 +278,15 @@ private: std::map mergedCells; /*! Owner of this property */ - Sheet * owner; + Sheet* owner; void clearAlias(App::CellAddress address); void moveAlias(App::CellAddress currPos, App::CellAddress newPos); - void moveCell(App::CellAddress currPos, App::CellAddress newPos, std::map &renames); + void moveCell(App::CellAddress currPos, + App::CellAddress newPos, + std::map& renames); /* * Cell dependency tracking @@ -268,24 +296,24 @@ private: void removeDependencies(App::CellAddress key); - void slotChangedObject(const App::DocumentObject &obj, const App::Property &prop); - void recomputeDependants(const App::DocumentObject *obj, const char *propName); + void slotChangedObject(const App::DocumentObject& obj, const App::Property& prop); + void recomputeDependants(const App::DocumentObject* obj, const char* propName); /*! Cell dependencies, i.e when a change occurs to property given in key, the set of addresses needs to be recomputed. */ - std::map > propertyNameToCellMap; + std::map> propertyNameToCellMap; /*! Properties this cell depends on */ - std::map > cellToPropertyNameMap; + std::map> cellToPropertyNameMap; /*! Cell dependencies, i.e when a change occurs to documentObject given in key, the set of addresses needs to be recomputed. */ - std::map > documentObjectToCellMap; + std::map> documentObjectToCellMap; /*! DocumentObject this cell depends on */ - std::map > cellToDocumentObjectMap; + std::map> cellToDocumentObjectMap; /*! Mapping of cell position to alias property */ std::map aliasProp; @@ -302,5 +330,5 @@ private: bool restoring = false; }; -} -#endif // PROPERTYSHEET_H +} // namespace Spreadsheet +#endif // PROPERTYSHEET_H diff --git a/src/Mod/Spreadsheet/App/PropertySheetPy.xml b/src/Mod/Spreadsheet/App/PropertySheetPy.xml index 4ee484140d..c739b3353e 100644 --- a/src/Mod/Spreadsheet/App/PropertySheetPy.xml +++ b/src/Mod/Spreadsheet/App/PropertySheetPy.xml @@ -10,7 +10,6 @@ FatherInclude="Base/PersistencePy.h" FatherNamespace="Base" Constructor="true"> - Internal spreadsheet object diff --git a/src/Mod/Spreadsheet/App/PropertySheetPyImp.cpp b/src/Mod/Spreadsheet/App/PropertySheetPyImp.cpp index c0bf240ed2..1a014ebf0d 100644 --- a/src/Mod/Spreadsheet/App/PropertySheetPyImp.cpp +++ b/src/Mod/Spreadsheet/App/PropertySheetPyImp.cpp @@ -24,8 +24,10 @@ #include "PropertySheet.h" // inclusion of the generated files (generated out of PropertySheetPy.xml) +// clang-format off #include "PropertySheetPy.h" #include "PropertySheetPy.cpp" +// clang-format on using namespace Spreadsheet; @@ -36,7 +38,7 @@ std::string PropertySheetPy::representation() const return {""}; } -PyObject *PropertySheetPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* PropertySheetPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of PropertySheetPy and the Twin object return new PropertySheetPy(new PropertySheet); @@ -48,12 +50,12 @@ int PropertySheetPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/) return 0; } -PyObject * PropertySheetPy::mapping_subscript(PyObject * o, PyObject *key) +PyObject* PropertySheetPy::mapping_subscript(PyObject* o, PyObject* key) { return static_cast(o)->getPropertySheetPtr()->getPyValue(key); } -PyObject *PropertySheetPy::getCustomAttributes(const char* /*attr*/) const +PyObject* PropertySheetPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Spreadsheet/App/Sheet.cpp b/src/Mod/Spreadsheet/App/Sheet.cpp index c4b2c6940f..dc7adef493 100644 --- a/src/Mod/Spreadsheet/App/Sheet.cpp +++ b/src/Mod/Spreadsheet/App/Sheet.cpp @@ -23,10 +23,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -53,22 +53,22 @@ using namespace Spreadsheet; PROPERTY_SOURCE(Spreadsheet::Sheet, App::DocumentObject) -using DependencyList = boost::adjacency_list < -boost::vecS, // class OutEdgeListS : a Sequence or an AssociativeContainer -boost::vecS, // class VertexListS : a Sequence or a RandomAccessContainer -boost::directedS, // class DirectedS : This is a directed graph -boost::no_property, // class VertexProperty: -boost::no_property, // class EdgeProperty: -boost::no_property, // class GraphProperty: -boost::listS // class EdgeListS: ->; +using DependencyList = boost::adjacency_list< + boost::vecS, // class OutEdgeListS : a Sequence or an AssociativeContainer + boost::vecS, // class VertexListS : a Sequence or a RandomAccessContainer + boost::directedS, // class DirectedS : This is a directed graph + boost::no_property, // class VertexProperty: + boost::no_property, // class EdgeProperty: + boost::no_property, // class GraphProperty: + boost::listS // class EdgeListS: + >; using Traits = boost::graph_traits; using Vertex = Traits::vertex_descriptor; using Edge = Traits::edge_descriptor; /** - * Construct a new Sheet object. - */ + * Construct a new Sheet object. + */ Sheet::Sheet() : DocumentObject() @@ -76,10 +76,22 @@ Sheet::Sheet() , cells(this) { ADD_PROPERTY_TYPE(cells, (), "Spreadsheet", (PropertyType)(Prop_Hidden), "Cell contents"); - ADD_PROPERTY_TYPE(columnWidths, (), "Spreadsheet", (PropertyType)(Prop_ReadOnly|Prop_Hidden|Prop_Output), "Column widths"); - ADD_PROPERTY_TYPE(rowHeights, (), "Spreadsheet", (PropertyType)(Prop_ReadOnly|Prop_Hidden|Prop_Output), "Row heights"); - ADD_PROPERTY_TYPE(rowHeights, (), "Spreadsheet", (PropertyType)(Prop_ReadOnly|Prop_Hidden), "Row heights"); - ExpressionEngine.expressionChanged.connect([this](const App::ObjectIdentifier &) { + ADD_PROPERTY_TYPE(columnWidths, + (), + "Spreadsheet", + (PropertyType)(Prop_ReadOnly | Prop_Hidden | Prop_Output), + "Column widths"); + ADD_PROPERTY_TYPE(rowHeights, + (), + "Spreadsheet", + (PropertyType)(Prop_ReadOnly | Prop_Hidden | Prop_Output), + "Row heights"); + ADD_PROPERTY_TYPE(rowHeights, + (), + "Spreadsheet", + (PropertyType)(Prop_ReadOnly | Prop_Hidden), + "Row heights"); + ExpressionEngine.expressionChanged.connect([this](const App::ObjectIdentifier&) { this->updateBindings(); }); } @@ -97,8 +109,8 @@ Sheet::~Sheet() } /** - * Clear all cells in the sheet. - */ + * Clear all cells in the sheet. + */ void Sheet::clearAll() { @@ -106,7 +118,7 @@ void Sheet::clearAll() std::vector propNames = props.getDynamicPropertyNames(); - for (const auto & propName : propNames) { + for (const auto& propName : propNames) { this->removeDynamicProperty(propName.c_str()); } @@ -115,44 +127,55 @@ void Sheet::clearAll() columnWidths.clear(); rowHeights.clear(); - for (auto & observer : observers) { + for (auto& observer : observers) { delete observer.second; } observers.clear(); } -//validate import/export parameters -bool Sheet::getCharsFromPrefs(char &delim, char "e, char &escape, std::string &errMsg){ +// validate import/export parameters +bool Sheet::getCharsFromPrefs(char& delim, char& quote, char& escape, std::string& errMsg) +{ bool isValid = true; - ParameterGrp::handle group = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Spreadsheet"); - QString delimiter = QString::fromStdString(group->GetASCII("ImportExportDelimiter","tab")); - QString quoteChar = QString::fromStdString(group->GetASCII("ImportExportQuoteCharacter","\"")); - QString escapeChar = QString::fromStdString(group->GetASCII("ImportExportEscapeCharacter","\\")); + ParameterGrp::handle group = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Spreadsheet"); + QString delimiter = QString::fromStdString(group->GetASCII("ImportExportDelimiter", "tab")); + QString quoteChar = QString::fromStdString(group->GetASCII("ImportExportQuoteCharacter", "\"")); + QString escapeChar = + QString::fromStdString(group->GetASCII("ImportExportEscapeCharacter", "\\")); delim = delimiter.size() == 1 ? delimiter[0].toLatin1() : '\0'; - if (delimiter.compare(QLatin1String("tab"), Qt::CaseInsensitive) == 0 || delimiter.compare(QLatin1String("\\t"),Qt::CaseInsensitive) == 0){ + if (delimiter.compare(QLatin1String("tab"), Qt::CaseInsensitive) == 0 + || delimiter.compare(QLatin1String("\\t"), Qt::CaseInsensitive) == 0) { delim = '\t'; - } else if (delimiter.compare(QLatin1String("comma"), Qt::CaseInsensitive) == 0){ + } + else if (delimiter.compare(QLatin1String("comma"), Qt::CaseInsensitive) == 0) { delim = ','; - } else if (delimiter.compare(QLatin1String("semicolon"), Qt::CaseInsensitive) == 0){ + } + else if (delimiter.compare(QLatin1String("semicolon"), Qt::CaseInsensitive) == 0) { delim = ';'; } - if(delim != '\0' && quoteChar.size() == 1 && escapeChar.size() == 1){ + if (delim != '\0' && quoteChar.size() == 1 && escapeChar.size() == 1) { quote = quoteChar[0].toLatin1(); escape = escapeChar[0].toLatin1(); - } else { + } + else { isValid = false; std::string importExport = errMsg; std::stringstream errStream; errStream << "Invalid spreadsheet Import/Export parameter.\n"; if (delim == '\0') { - errStream << "Unrecognized delimiter: " << delimiter.toStdString() << " (recognized tokens: \\t, tab, semicolon, comma, or any single character)\n"; + errStream + << "Unrecognized delimiter: " << delimiter.toStdString() + << " (recognized tokens: \\t, tab, semicolon, comma, or any single character)\n"; } - if (quoteChar.size() != 1){ - errStream << "Invalid quote character: " << quoteChar.toStdString() << " (quote character must be one single character)\n"; + if (quoteChar.size() != 1) { + errStream << "Invalid quote character: " << quoteChar.toStdString() + << " (quote character must be one single character)\n"; } - if (escapeChar.size() != 1){ - errStream << "Invalid escape character: " << escapeChar.toStdString() << " (escape character must be one single character)\n"; + if (escapeChar.size() != 1) { + errStream << "Invalid escape character: " << escapeChar.toStdString() + << " (escape character must be one single character)\n"; } errStream << importExport << " not done.\n"; errMsg = errStream.str(); @@ -162,17 +185,20 @@ bool Sheet::getCharsFromPrefs(char &delim, char "e, char &escape, std::strin /** - * Import a file into the spreadsheet object. - * - * @param filename Name of file to import - * @param delimiter The field delimiter character used. - * @param quoteChar Quote character, if any (set to '\0' to disable). - * @param escapeChar The escape character used, if any (set to '0' to disable). - * - * @returns True if successful, false if something failed. - */ + * Import a file into the spreadsheet object. + * + * @param filename Name of file to import + * @param delimiter The field delimiter character used. + * @param quoteChar Quote character, if any (set to '\0' to disable). + * @param escapeChar The escape character used, if any (set to '0' to disable). + * + * @returns True if successful, false if something failed. + */ -bool Sheet::importFromFile(const std::string &filename, char delimiter, char quoteChar, char escapeChar) +bool Sheet::importFromFile(const std::string& filename, + char delimiter, + char quoteChar, + char escapeChar) { Base::FileInfo fi(filename); Base::ifstream file(fi, std::ios::in); @@ -192,16 +218,21 @@ bool Sheet::importFromFile(const std::string &filename, char delimiter, char quo escaped_list_separator e; int col = 0; - if (quoteChar) + if (quoteChar) { e = escaped_list_separator(escapeChar, delimiter, quoteChar); - else + } + else { e = escaped_list_separator('\0', delimiter, '\0'); + } - tokenizer > tok(line, e); + tokenizer> tok(line, e); - for(tokenizer >::iterator i = tok.begin(); i != tok.end();++i) { - if (!i->empty()) + for (tokenizer>::iterator i = tok.begin(); + i != tok.end(); + ++i) { + if (!i->empty()) { setCell(CellAddress(row, col), (*i).c_str()); + } col++; } } @@ -216,46 +247,52 @@ bool Sheet::importFromFile(const std::string &filename, char delimiter, char quo signaller.tryInvoke(); return true; } - else - return false; -} - -/** - * Write an escaped version of the string \a s to the stream \a out. - * - * @param s The string to write. - * @param quoteChar The quote character. - * @param escapeChar The escape character. - * @param stream The stream to output the escaped string to. - * - */ - -static void writeEscaped(std::string const& s, char quoteChar, char escapeChar, std::ostream & out) { - out << quoteChar; - for (unsigned char c : s) { - if (c != quoteChar) - out << c; else { - out << escapeChar; - out << c; + return false; } - } - out << quoteChar; } /** - * Export spreadsheet data to file. - * - * @param filename Filename to store data to. - * @param delimiter Field delimiter - * @param quoteChar Quote character ('\0' to disable) - * @param escapeChar Escape character ('\0' to disable) - * - * @returns True if store is successful, false if something failed. - * - */ + * Write an escaped version of the string \a s to the stream \a out. + * + * @param s The string to write. + * @param quoteChar The quote character. + * @param escapeChar The escape character. + * @param stream The stream to output the escaped string to. + * + */ -bool Sheet::exportToFile(const std::string &filename, char delimiter, char quoteChar, char escapeChar) const +static void writeEscaped(std::string const& s, char quoteChar, char escapeChar, std::ostream& out) +{ + out << quoteChar; + for (unsigned char c : s) { + if (c != quoteChar) { + out << c; + } + else { + out << escapeChar; + out << c; + } + } + out << quoteChar; +} + +/** + * Export spreadsheet data to file. + * + * @param filename Filename to store data to. + * @param delimiter Field delimiter + * @param quoteChar Quote character ('\0' to disable) + * @param escapeChar Escape character ('\0' to disable) + * + * @returns True if store is successful, false if something failed. + * + */ + +bool Sheet::exportToFile(const std::string& filename, + char delimiter, + char quoteChar, + char escapeChar) const { Base::ofstream file; int prevRow = -1, prevCol = -1; @@ -263,44 +300,54 @@ bool Sheet::exportToFile(const std::string &filename, char delimiter, char quote Base::FileInfo fi(filename); file.open(fi, std::ios::out | std::ios::ate | std::ios::binary); - if (!file.is_open()) + if (!file.is_open()) { return false; + } auto usedCells = cells.getNonEmptyCells(); auto i = usedCells.begin(); while (i != usedCells.end()) { - Property * prop = getProperty(*i); + Property* prop = getProperty(*i); if (prevRow != -1 && prevRow != i->row()) { - for (int j = prevRow; j < i->row(); ++j) + for (int j = prevRow; j < i->row(); ++j) { file << std::endl; + } prevCol = usedCells.begin()->col(); } if (prevCol != -1 && i->col() != prevCol) { - for (int j = prevCol; j < i->col(); ++j) + for (int j = prevCol; j < i->col(); ++j) { file << delimiter; + } } std::stringstream field; - if (prop->isDerivedFrom((PropertyQuantity::getClassTypeId()))) + if (prop->isDerivedFrom((PropertyQuantity::getClassTypeId()))) { field << static_cast(prop)->getValue(); - else if (prop->isDerivedFrom((PropertyFloat::getClassTypeId()))) + } + else if (prop->isDerivedFrom((PropertyFloat::getClassTypeId()))) { field << static_cast(prop)->getValue(); - else if (prop->isDerivedFrom((PropertyInteger::getClassTypeId()))) + } + else if (prop->isDerivedFrom((PropertyInteger::getClassTypeId()))) { field << static_cast(prop)->getValue(); - else if (prop->isDerivedFrom((PropertyString::getClassTypeId()))) + } + else if (prop->isDerivedFrom((PropertyString::getClassTypeId()))) { field << static_cast(prop)->getValue(); - else + } + else { assert(0); + } std::string str = field.str(); - if (quoteChar && str.find(quoteChar) != std::string::npos) + if (quoteChar && str.find(quoteChar) != std::string::npos) { writeEscaped(str, quoteChar, escapeChar, file); - else + } + else { file << str; + } prevRow = i->row(); prevCol = i->col(); @@ -313,26 +360,26 @@ bool Sheet::exportToFile(const std::string &filename, char delimiter, char quote } /** - * Merge a rectangle specified by \a range into one logical cell. - * Data in all but the upper right cell are cleared when the cells are merged. - * - * @param range Range to merge. - * @returns True if the cells were merged, false if the merge was unsuccessful. - * - */ + * Merge a rectangle specified by \a range into one logical cell. + * Data in all but the upper right cell are cleared when the cells are merged. + * + * @param range Range to merge. + * @returns True if the cells were merged, false if the merge was unsuccessful. + * + */ -bool Sheet::mergeCells(const Range & range) +bool Sheet::mergeCells(const Range& range) { return cells.mergeCells(range.from(), range.to()); } /** - * Split a previously merged cell specified by \a address into its individual cells. - * The address can point to any of the cells that make up the merged cell. - * - * @param address Address of cell to split - * - */ + * Split a previously merged cell specified by \a address into its individual cells. + * The address can point to any of the cells that make up the merged cell. + * + * @param address Address of cell to split + * + */ void Sheet::splitCell(CellAddress address) { @@ -340,41 +387,42 @@ void Sheet::splitCell(CellAddress address) } /** - * Get contents of the cell specified by \a address, or 0 if it is not defined - * - * @returns A CellContent object or 0. - */ + * Get contents of the cell specified by \a address, or 0 if it is not defined + * + * @returns A CellContent object or 0. + */ -Cell *Sheet::getCell(CellAddress address) +Cell* Sheet::getCell(CellAddress address) { return cells.getValue(address); } /** - * Get cell contents specified by \a address. - * - * @param address - */ + * Get cell contents specified by \a address. + * + * @param address + */ -Cell *Sheet::getNewCell(CellAddress address) +Cell* Sheet::getNewCell(CellAddress address) { - Cell * cell = getCell(address); + Cell* cell = getCell(address); - if (!cell) + if (!cell) { cell = cells.createCell(address); + } return cell; } /** - * Set cell given by \a address to \a contents. - * - * @param address Address of cell to set. - * @param contents New contents of given cell. - * - */ + * Set cell given by \a address to \a contents. + * + * @param address Address of cell to set. + * @param contents New contents of given cell. + * + */ -void Sheet::setCell(const char * address, const char * contents) +void Sheet::setCell(const char* address, const char* contents) { assert(address && contents); @@ -382,15 +430,15 @@ void Sheet::setCell(const char * address, const char * contents) } /** - * Set cell at \a address to \a value. If a merged cell is specified, the upper right corner of the - * merged cell must be specified. - * - * @param address Row position of cell. - * @param value String value of expression. - * - */ + * Set cell at \a address to \a value. If a merged cell is specified, the upper right corner of the + * merged cell must be specified. + * + * @param address Row position of cell. + * @param value String value of expression. + * + */ -void Sheet::setCell(CellAddress address, const char * value) +void Sheet::setCell(CellAddress address, const char* value) { assert(value); @@ -404,28 +452,28 @@ void Sheet::setCell(CellAddress address, const char * value) } /** - * Get the Python object for the Sheet. - * - * @returns The Python object. - */ + * Get the Python object for the Sheet. + * + * @returns The Python object. + */ -PyObject *Sheet::getPyObject() +PyObject* Sheet::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new SheetPy(this),true); + PythonObject = Py::Object(new SheetPy(this), true); } return Py::new_reference_to(PythonObject); } /** - * Get the Cell Property for the cell at \a key. - * - * @returns The Property object. - * - */ + * Get the Cell Property for the cell at \a key. + * + * @returns The Property object. + * + */ -Property * Sheet::getProperty(CellAddress key) const +Property* Sheet::getProperty(CellAddress key) const { return props.getDynamicPropertyByName(key.toString(CellAddress::Cell::ShowRowColumn).c_str()); } @@ -436,20 +484,20 @@ Property * Sheet::getProperty(CellAddress key) const * @return Pointer to property, or 0 if it does not exist. */ -Property * Sheet::getProperty(const char * addr) const +Property* Sheet::getProperty(const char* addr) const { return props.getDynamicPropertyByName(addr); } /** - * Get the address as \a address of the Property \a prop. This function - * throws an exception if the property is not found. - * - */ + * Get the address as \a address of the Property \a prop. This function + * throws an exception if the property is not found. + * + */ -bool Sheet::getCellAddress(const Property *prop, CellAddress & address) +bool Sheet::getCellAddress(const Property* prop, CellAddress& address) { - std::map::const_iterator i = propAddress.find(prop); + std::map::const_iterator i = propAddress.find(prop); if (i != propAddress.end()) { address = i->second; @@ -458,12 +506,14 @@ bool Sheet::getCellAddress(const Property *prop, CellAddress & address) return false; } -App::CellAddress Sheet::getCellAddress(const char *name, bool silent) const { - return cells.getCellAddress(name,silent); +App::CellAddress Sheet::getCellAddress(const char* name, bool silent) const +{ + return cells.getCellAddress(name, silent); } -App::Range Sheet::getRange(const char *name, bool silent) const { - return cells.getRange(name,silent); +App::Range Sheet::getRange(const char* name, bool silent) const +{ + return cells.getRange(name, silent); } /** @@ -497,29 +547,36 @@ void Sheet::onSettingDocument() } /** - * Set the property for cell \p key to a PropertyFloat with the value \a value. - * If the Property exists, but of wrong type, the previous Property is destroyed and recreated as the correct type. - * - * @param key The address of the cell we want to create a Property for - * @param value The value we want to assign to the Property. - * - */ + * Set the property for cell \p key to a PropertyFloat with the value \a value. + * If the Property exists, but of wrong type, the previous Property is destroyed and recreated as + * the correct type. + * + * @param key The address of the cell we want to create a Property for + * @param value The value we want to assign to the Property. + * + */ -Property * Sheet::setFloatProperty(CellAddress key, double value) +Property* Sheet::setFloatProperty(CellAddress key, double value) { std::string name = key.toString(CellAddress::Cell::ShowRowColumn); - Property * prop = props.getDynamicPropertyByName(name.c_str()); - PropertyFloat * floatProp; + Property* prop = props.getDynamicPropertyByName(name.c_str()); + PropertyFloat* floatProp; if (!prop || prop->getTypeId() != PropertyFloat::getClassTypeId()) { if (prop) { this->removeDynamicProperty(name.c_str()); propAddress.erase(prop); } - floatProp = freecad_dynamic_cast(addDynamicProperty("App::PropertyFloat", name.c_str(), nullptr, nullptr, Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); + floatProp = freecad_dynamic_cast( + addDynamicProperty("App::PropertyFloat", + name.c_str(), + nullptr, + nullptr, + Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); } - else + else { floatProp = static_cast(prop); + } propAddress[floatProp] = key; floatProp->setValue(value); @@ -527,23 +584,27 @@ Property * Sheet::setFloatProperty(CellAddress key, double value) return floatProp; } -Property * Sheet::setIntegerProperty(CellAddress key, long value) +Property* Sheet::setIntegerProperty(CellAddress key, long value) { std::string name = key.toString(CellAddress::Cell::ShowRowColumn); - Property * prop = props.getDynamicPropertyByName(name.c_str()); - PropertyInteger * intProp; + Property* prop = props.getDynamicPropertyByName(name.c_str()); + PropertyInteger* intProp; if (!prop || prop->getTypeId() != PropertyInteger::getClassTypeId()) { if (prop) { this->removeDynamicProperty(name.c_str()); propAddress.erase(prop); } - intProp = freecad_dynamic_cast(addDynamicProperty( - "App::PropertyInteger", name.c_str(), nullptr, nullptr, - Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); + intProp = freecad_dynamic_cast( + addDynamicProperty("App::PropertyInteger", + name.c_str(), + nullptr, + nullptr, + Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); } - else + else { intProp = static_cast(prop); + } propAddress[intProp] = key; intProp->setValue(value); @@ -553,31 +614,37 @@ Property * Sheet::setIntegerProperty(CellAddress key, long value) /** - * Set the property for cell \p key to a PropertyQuantity with \a value and \a unit. - * If the Property exists, but of wrong type, the previous Property is destroyed and recreated as the correct type. - * - * @param key The address of the cell we want to create a Property for - * @param value The value we want to assign to the Property. - * @param unit The associated unit for \a value. - * - */ + * Set the property for cell \p key to a PropertyQuantity with \a value and \a unit. + * If the Property exists, but of wrong type, the previous Property is destroyed and recreated as + * the correct type. + * + * @param key The address of the cell we want to create a Property for + * @param value The value we want to assign to the Property. + * @param unit The associated unit for \a value. + * + */ -Property * Sheet::setQuantityProperty(CellAddress key, double value, const Base::Unit & unit) +Property* Sheet::setQuantityProperty(CellAddress key, double value, const Base::Unit& unit) { std::string name = key.toString(CellAddress::Cell::ShowRowColumn); - Property * prop = props.getDynamicPropertyByName(name.c_str()); - PropertySpreadsheetQuantity * quantityProp; + Property* prop = props.getDynamicPropertyByName(name.c_str()); + PropertySpreadsheetQuantity* quantityProp; if (!prop || prop->getTypeId() != PropertySpreadsheetQuantity::getClassTypeId()) { if (prop) { this->removeDynamicProperty(name.c_str()); propAddress.erase(prop); } - Property * p = addDynamicProperty("Spreadsheet::PropertySpreadsheetQuantity", name.c_str(), nullptr, nullptr, Prop_ReadOnly | Prop_Hidden | Prop_NoPersist); + Property* p = addDynamicProperty("Spreadsheet::PropertySpreadsheetQuantity", + name.c_str(), + nullptr, + nullptr, + Prop_ReadOnly | Prop_Hidden | Prop_NoPersist); quantityProp = freecad_dynamic_cast(p); } - else - quantityProp = static_cast(prop); + else { + quantityProp = static_cast(prop); + } propAddress[quantityProp] = key; quantityProp->setValue(value); @@ -589,26 +656,32 @@ Property * Sheet::setQuantityProperty(CellAddress key, double value, const Base: } /** - * Set the property for cell \p key to a PropertyString with \a value. - * If the Property exists, but of wrong type, the previous Property is destroyed and recreated as the correct type. - * - * @param key The address of the cell we want to create a Property for - * @param value The value we want to assign to the Property. - * - */ + * Set the property for cell \p key to a PropertyString with \a value. + * If the Property exists, but of wrong type, the previous Property is destroyed and recreated as + * the correct type. + * + * @param key The address of the cell we want to create a Property for + * @param value The value we want to assign to the Property. + * + */ -Property * Sheet::setStringProperty(CellAddress key, const std::string & value) +Property* Sheet::setStringProperty(CellAddress key, const std::string& value) { std::string name = key.toString(CellAddress::Cell::ShowRowColumn); - Property * prop = props.getDynamicPropertyByName(name.c_str()); - PropertyString * stringProp = freecad_dynamic_cast(prop); + Property* prop = props.getDynamicPropertyByName(name.c_str()); + PropertyString* stringProp = freecad_dynamic_cast(prop); if (!stringProp) { if (prop) { this->removeDynamicProperty(name.c_str()); propAddress.erase(prop); } - stringProp = freecad_dynamic_cast(addDynamicProperty("App::PropertyString", name.c_str(), nullptr, nullptr, Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); + stringProp = freecad_dynamic_cast( + addDynamicProperty("App::PropertyString", + name.c_str(), + nullptr, + nullptr, + Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); } propAddress[stringProp] = key; @@ -617,18 +690,23 @@ Property * Sheet::setStringProperty(CellAddress key, const std::string & value) return stringProp; } -Property * Sheet::setObjectProperty(CellAddress key, Py::Object object) +Property* Sheet::setObjectProperty(CellAddress key, Py::Object object) { std::string name = key.toString(CellAddress::Cell::ShowRowColumn); - Property * prop = props.getDynamicPropertyByName(name.c_str()); - PropertyPythonObject * pyProp = freecad_dynamic_cast(prop); + Property* prop = props.getDynamicPropertyByName(name.c_str()); + PropertyPythonObject* pyProp = freecad_dynamic_cast(prop); if (!pyProp) { if (prop) { this->removeDynamicProperty(name.c_str()); propAddress.erase(prop); } - pyProp = freecad_dynamic_cast(addDynamicProperty("App::PropertyPythonObject", name.c_str(), nullptr, nullptr, Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); + pyProp = freecad_dynamic_cast( + addDynamicProperty("App::PropertyPythonObject", + name.c_str(), + nullptr, + nullptr, + Prop_ReadOnly | Prop_Hidden | Prop_NoPersist)); } propAddress[pyProp] = key; @@ -637,46 +715,51 @@ Property * Sheet::setObjectProperty(CellAddress key, Py::Object object) return pyProp; } -struct CurrentAddressLock { - CurrentAddressLock(int &r, int &c, const CellAddress &addr) - :row(r),col(c) +struct CurrentAddressLock +{ + CurrentAddressLock(int& r, int& c, const CellAddress& addr) + : row(r) + , col(c) { row = addr.row(); col = addr.col(); } - ~CurrentAddressLock() { + ~CurrentAddressLock() + { row = -1; col = -1; } - int &row; - int &col; + int& row; + int& col; }; /** - * Update the Property given by \a key. This will also eventually trigger recomputations of cells depending on \a key. - * - * @param key The address of the cell we want to recompute. - * - */ + * Update the Property given by \a key. This will also eventually trigger recomputations of cells + * depending on \a key. + * + * @param key The address of the cell we want to recompute. + * + */ void Sheet::updateProperty(CellAddress key) { - Cell * cell = getCell(key); + Cell* cell = getCell(key); if (cell) { std::unique_ptr output; - const Expression * input = cell->getExpression(); + const Expression* input = cell->getExpression(); if (input) { - CurrentAddressLock lock(currentRow,currentCol,key); + CurrentAddressLock lock(currentRow, currentCol, key); output.reset(input->eval()); } else { std::string s; - if (cell->getStringContent(s) && !s.empty()) + if (cell->getStringContent(s) && !s.empty()) { output = std::make_unique(this, s); + } else { this->removeDynamicProperty(key.toString().c_str()); return; @@ -686,90 +769,110 @@ void Sheet::updateProperty(CellAddress key) /* Eval returns either NumberExpression or StringExpression, or * PyObjectExpression objects */ auto number = freecad_dynamic_cast(output.get()); - if(number) { + if (number) { long l; auto constant = freecad_dynamic_cast(output.get()); - if(constant && !constant->isNumber()) { + if (constant && !constant->isNumber()) { Base::PyGILStateLocker lock; setObjectProperty(key, constant->getPyValue()); - } else if (!number->getUnit().isEmpty()) + } + else if (!number->getUnit().isEmpty()) { setQuantityProperty(key, number->getValue(), number->getUnit()); - else if(number->isInteger(&l)) - setIntegerProperty(key,l); - else + } + else if (number->isInteger(&l)) { + setIntegerProperty(key, l); + } + else { setFloatProperty(key, number->getValue()); - }else{ + } + } + else { auto str_expr = freecad_dynamic_cast(output.get()); - if(str_expr) + if (str_expr) { setStringProperty(key, str_expr->getText().c_str()); + } else { Base::PyGILStateLocker lock; auto py_expr = freecad_dynamic_cast(output.get()); - if(py_expr) + if (py_expr) { setObjectProperty(key, py_expr->getPyValue()); - else + } + else { setObjectProperty(key, Py::Object()); + } } } } - else + else { clear(key); + } cellUpdated(key); } /** - * Retrieve a specific Property given by \a name. - * This function might throw an exception if something fails, but might also - * return 0 in case the property is not found. - * - * @returns The property, or 0 if not found. - * - */ + * Retrieve a specific Property given by \a name. + * This function might throw an exception if something fails, but might also + * return 0 in case the property is not found. + * + * @returns The property, or 0 if not found. + * + */ -Property *Sheet::getPropertyByName(const char* name) const +Property* Sheet::getPropertyByName(const char* name) const { - CellAddress addr = getCellAddress(name,true); - Property *prop = nullptr; - if(addr.isValid()) + CellAddress addr = getCellAddress(name, true); + Property* prop = nullptr; + if (addr.isValid()) { prop = getProperty(addr); - if (prop) + } + if (prop) { return prop; - else + } + else { return DocumentObject::getPropertyByName(name); -} - -Property *Sheet::getDynamicPropertyByName(const char* name) const { - CellAddress addr = getCellAddress(name,true); - Property *prop = nullptr; - if(addr.isValid()) - prop = getProperty(addr); - if (prop) - return prop; - else - return DocumentObject::getDynamicPropertyByName(name); -} - -void Sheet::getPropertyNamedList(std::vector > &List) const { - DocumentObject::getPropertyNamedList(List); - List.reserve(List.size()+cells.aliasProp.size()); - for(auto &v : cells.aliasProp) { - auto prop = getProperty(v.first); - if(prop) - List.emplace_back(v.second.c_str(),prop); } } -void Sheet::touchCells(Range range) { - do { - cells.setDirty(*range); - }while(range.next()); +Property* Sheet::getDynamicPropertyByName(const char* name) const +{ + CellAddress addr = getCellAddress(name, true); + Property* prop = nullptr; + if (addr.isValid()) { + prop = getProperty(addr); + } + if (prop) { + return prop; + } + else { + return DocumentObject::getDynamicPropertyByName(name); + } } -void Sheet::recomputeCells(Range range) { +void Sheet::getPropertyNamedList(std::vector>& List) const +{ + DocumentObject::getPropertyNamedList(List); + List.reserve(List.size() + cells.aliasProp.size()); + for (auto& v : cells.aliasProp) { + auto prop = getProperty(v.first); + if (prop) { + List.emplace_back(v.second.c_str(), prop); + } + } +} + +void Sheet::touchCells(Range range) +{ + do { + cells.setDirty(*range); + } while (range.next()); +} + +void Sheet::recomputeCells(Range range) +{ do { recomputeCell(*range); - }while(range.next()); + } while (range.next()); } /** @@ -779,7 +882,7 @@ void Sheet::recomputeCells(Range range) { void Sheet::recomputeCell(CellAddress p) { - Cell * cell = cells.getValue(p); + Cell* cell = cells.getValue(p); try { if (cell && cell->hasException()) { @@ -790,87 +893,91 @@ void Sheet::recomputeCell(CellAddress p) updateProperty(p); - if(!cell || !cell->hasException()) { + if (!cell || !cell->hasException()) { cells.clearDirty(p); cellErrors.erase(p); } } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { QString msg = QString::fromUtf8("ERR: %1").arg(QString::fromUtf8(e.what())); setStringProperty(p, Base::Tools::toStdString(msg)); - if (cell) + if (cell) { cell->setException(e.what()); - else + } + else { e.ReportException(); + } // Mark as erroneous cellErrors.insert(p); cellUpdated(p); - if(e.isDerivedFrom(Base::AbortException::getClassTypeId())) + if (e.isDerivedFrom(Base::AbortException::getClassTypeId())) { throw; + } } } -PropertySheet::BindingType -Sheet::getCellBinding(Range &range, - ExpressionPtr *pStart, - ExpressionPtr *pEnd, - App::ObjectIdentifier *pTarget) const +PropertySheet::BindingType Sheet::getCellBinding(Range& range, + ExpressionPtr* pStart, + ExpressionPtr* pEnd, + App::ObjectIdentifier* pTarget) const { range.normalize(); do { CellAddress addr = *range; - for(const auto &r : boundRanges) { - if(addr.row()>=r.from().row() - && addr.row()<=r.to().row() - && addr.col()>=r.from().col() - && addr.col()<=r.to().col()) - { - auto res = cells.getBinding(r,pStart,pEnd,pTarget); - if(res != PropertySheet::BindingNone) { + for (const auto& r : boundRanges) { + if (addr.row() >= r.from().row() && addr.row() <= r.to().row() + && addr.col() >= r.from().col() && addr.col() <= r.to().col()) { + auto res = cells.getBinding(r, pStart, pEnd, pTarget); + if (res != PropertySheet::BindingNone) { range = r; return res; } } } - } while(range.next()); + } while (range.next()); return PropertySheet::BindingNone; } -static inline unsigned _getBorder(const Sheet *sheet, - const std::vector &ranges, - const App::CellAddress &address) +static inline unsigned _getBorder(const Sheet* sheet, + const std::vector& ranges, + const App::CellAddress& address) { unsigned flags = 0; int rows, cols; sheet->getSpans(address, rows, cols); --rows; --cols; - for(auto &range : ranges) { + for (auto& range : ranges) { auto from = range.from(); auto to = range.to(); - if(address.row() < from.row() - || address.row() + rows > to.row() - || address.col() < from.col() - || address.col() + cols > to.col()) + if (address.row() < from.row() || address.row() + rows > to.row() + || address.col() < from.col() || address.col() + cols > to.col()) { continue; - if(address.row() == from.row()) + } + if (address.row() == from.row()) { flags |= Sheet::BorderTop; - if(address.row() == to.row() || address.row() + rows == to.row()) + } + if (address.row() == to.row() || address.row() + rows == to.row()) { flags |= Sheet::BorderBottom; - if(address.col() == from.col()) + } + if (address.col() == from.col()) { flags |= Sheet::BorderLeft; - if(address.col() == to.col() || address.col() + cols == to.col()) + } + if (address.col() == to.col() || address.col() + cols == to.col()) { flags |= Sheet::BorderRight; - if(flags == Sheet::BorderAll) + } + if (flags == Sheet::BorderAll) { break; + } } return flags; } -unsigned Sheet::getCellBindingBorder(App::CellAddress address) const { +unsigned Sheet::getCellBindingBorder(App::CellAddress address) const +{ return _getBorder(this, boundRanges, address); } @@ -880,29 +987,33 @@ void Sheet::updateBindings() std::set newRangeSet; std::set rangeSet; boundRanges.clear(); - for(const auto &v : ExpressionEngine.getExpressions()) { - CellAddress from,to; - if(!cells.isBindingPath(v.first,&from,&to)) + for (const auto& v : ExpressionEngine.getExpressions()) { + CellAddress from, to; + if (!cells.isBindingPath(v.first, &from, &to)) { continue; - App::Range range(from,to,true); - if(!oldRangeSet.erase(range)) + } + App::Range range(from, to, true); + if (!oldRangeSet.erase(range)) { newRangeSet.insert(range); + } rangeSet.insert(range); } boundRanges.reserve(rangeSet.size()); - boundRanges.insert(boundRanges.end(),rangeSet.begin(),rangeSet.end()); - for(const auto &range : oldRangeSet) + boundRanges.insert(boundRanges.end(), rangeSet.begin(), rangeSet.end()); + for (const auto& range : oldRangeSet) { rangeUpdated(range); - for(const auto &range : newRangeSet) + } + for (const auto& range : newRangeSet) { rangeUpdated(range); + } } /** - * Update the document properties. - * - */ + * Update the document properties. + * + */ -DocumentObjectExecReturn *Sheet::execute() +DocumentObjectExecReturn* Sheet::execute() { updateBindings(); @@ -911,33 +1022,34 @@ DocumentObjectExecReturn *Sheet::execute() // Always recompute cells that have failed for (auto cellError : cellErrors) { - cells.recomputeDependencies(cellError); - dirtyCells.insert(cellError); + cells.recomputeDependencies(cellError); + dirtyCells.insert(cellError); } DependencyList graph; std::map VertexList; std::map VertexIndexList; - std::deque workQueue(dirtyCells.begin(),dirtyCells.end()); - while(!workQueue.empty()) { + std::deque workQueue(dirtyCells.begin(), dirtyCells.end()); + while (!workQueue.empty()) { CellAddress currPos = workQueue.front(); workQueue.pop_front(); // Insert into map of CellPos -> Index, if it doesn't exist already - auto res = VertexList.emplace(currPos,Vertex()); - if(res.second) { + auto res = VertexList.emplace(currPos, Vertex()); + if (res.second) { res.first->second = add_vertex(graph); VertexIndexList[res.first->second] = currPos; } // Process cells that depend on the current cell - for(auto &dep : providesTo(currPos)) { - auto resDep = VertexList.emplace(dep,Vertex()); - if(resDep.second) { + for (auto& dep : providesTo(currPos)) { + auto resDep = VertexList.emplace(dep, Vertex()); + if (resDep.second) { resDep.first->second = add_vertex(graph); VertexIndexList[resDep.first->second] = dep; - if(dirtyCells.insert(dep).second) + if (dirtyCells.insert(dep).second) { workQueue.push_back(dep); + } } // Add edge to graph to signal dependency add_edge(res.first->second, resDep.first->second, graph); @@ -950,24 +1062,25 @@ DocumentObjectExecReturn *Sheet::execute() boost::topological_sort(graph, std::front_inserter(make_order)); // Recompute cells FC_LOG("recomputing " << getFullName()); - for(auto &pos : make_order) { - const auto &addr = VertexIndexList[pos]; + for (auto& pos : make_order) { + const auto& addr = VertexIndexList[pos]; FC_TRACE(addr.toString()); recomputeCell(addr); } - } catch (std::exception &) { - for(auto &v : VertexList) { - Cell * cell = cells.getValue(v.first); + } + catch (std::exception&) { + for (auto& v : VertexList) { + Cell* cell = cells.getValue(v.first); // Mark as erroneous - if(cell) { + if (cell) { cellErrors.insert(v.first); - cell->setException("Pending computation due to cyclic dependency",true); + cell->setException("Pending computation due to cyclic dependency", true); cellUpdated(v.first); } } // Try to be more user friendly by finding individual loops - while(!dirtyCells.empty()) { + while (!dirtyCells.empty()) { std::deque workQueue; DependencyList graph; @@ -983,16 +1096,16 @@ DocumentObjectExecReturn *Sheet::execute() workQueue.pop_front(); // Insert into map of CellPos -> Index, if it doesn't exist already - auto res = VertexList.emplace(currPos,Vertex()); - if(res.second) { + auto res = VertexList.emplace(currPos, Vertex()); + if (res.second) { res.first->second = add_vertex(graph); VertexIndexList[res.first->second] = currPos; } // Process cells that depend on the current cell - for(auto &dep : providesTo(currPos)) { - auto resDep = VertexList.emplace(dep,Vertex()); - if(resDep.second) { + for (auto& dep : providesTo(currPos)) { + auto resDep = VertexList.emplace(dep, Vertex()); + if (resDep.second) { resDep.first->second = add_vertex(graph); VertexIndexList[resDep.first->second] = dep; workQueue.push_back(dep); @@ -1006,24 +1119,28 @@ DocumentObjectExecReturn *Sheet::execute() std::list make_order; try { boost::topological_sort(graph, std::front_inserter(make_order)); - } catch (std::exception&) { //TODO: evaluate using a more specific exception (not_a_dag) + } + catch (std::exception&) { // TODO: evaluate using a more specific exception (not_a_dag) // Cycle detected; flag all with errors - Base::Console().Error("Cyclic dependency detected in spreadsheet : %s\n", *pcNameInDocument); + Base::Console().Error("Cyclic dependency detected in spreadsheet : %s\n", + *pcNameInDocument); std::ostringstream ss; ss << "Cyclic dependency"; int count = 0; - for(auto &v : VertexList) { - if(count++%20 == 0) + for (auto& v : VertexList) { + if (count++ % 20 == 0) { ss << std::endl; - else + } + else { ss << ", "; + } ss << v.first.toString(); } std::string msg = ss.str(); - for(auto &v : VertexList) { - Cell * cell = cells.getValue(v.first); + for (auto& v : VertexList) { + Cell* cell = cells.getValue(v.first); if (cell) { - cell->setException(msg.c_str(),true); + cell->setException(msg.c_str(), true); cellUpdated(v.first); } } @@ -1032,59 +1149,63 @@ DocumentObjectExecReturn *Sheet::execute() } // Signal update of column widths - const std::set & dirtyColumns = columnWidths.getDirty(); + const std::set& dirtyColumns = columnWidths.getDirty(); for (int dirtyColumn : dirtyColumns) { columnWidthChanged(dirtyColumn, columnWidths.getValue(dirtyColumn)); } // Signal update of row heights - const std::set & dirtyRows = rowHeights.getDirty(); + const std::set& dirtyRows = rowHeights.getDirty(); - for (int dirtyRow : dirtyRows) + for (int dirtyRow : dirtyRows) { rowHeightChanged(dirtyRow, rowHeights.getValue(dirtyRow)); + } - //cells.clearDirty(); + // cells.clearDirty(); rowHeights.clearDirty(); columnWidths.clearDirty(); - if (cellErrors.empty()) + if (cellErrors.empty()) { return DocumentObject::StdReturn; - else + } + else { return new DocumentObjectExecReturn("One or more cells failed contains errors.", this); + } } /** - * Determine whether this object needs to be executed to update internal structures. - * - */ + * Determine whether this object needs to be executed to update internal structures. + * + */ short Sheet::mustExecute() const { - if (!cellErrors.empty() || cells.isDirty()) + if (!cellErrors.empty() || cells.isDirty()) { return 1; + } return DocumentObject::mustExecute(); } - /** - * Clear the cell at \a address. If \a all is false, only the text or expression - * contents are cleared. If \a all is true everything in the cell - * is cleared, including color, style, etc. - * - * @param address Address of cell to clear - * @param all Whether we should clear all or not. - * - */ + * Clear the cell at \a address. If \a all is false, only the text or expression + * contents are cleared. If \a all is true everything in the cell + * is cleared, including color, style, etc. + * + * @param address Address of cell to clear + * @param all Whether we should clear all or not. + * + */ void Sheet::clear(CellAddress address, bool /*all*/) { if (auto cell = getCell(address)) { // Remove alias, if defined std::string aliasStr; - if (cell->getAlias(aliasStr)) + if (cell->getAlias(aliasStr)) { this->removeDynamicProperty(aliasStr.c_str()); + } cells.clear(address); } @@ -1096,27 +1217,27 @@ void Sheet::clear(CellAddress address, bool /*all*/) } /** - * Get row an column span for the cell at (row, col). - * - * @param address Address of cell - * @param rows The number of unit cells this cell spans - * @param cols The number of unit rows this cell spans - * - */ + * Get row an column span for the cell at (row, col). + * + * @param address Address of cell + * @param rows The number of unit cells this cell spans + * @param cols The number of unit rows this cell spans + * + */ -void Sheet::getSpans(CellAddress address, int &rows, int &cols) const +void Sheet::getSpans(CellAddress address, int& rows, int& cols) const { return cells.getSpans(address, rows, cols); } /** - * Determine whether this cell is merged with another or not. - * - * @param address - * - * @returns True if cell is merged, false if not. - * - */ + * Determine whether this cell is merged with another or not. + * + * @param address + * + * @returns True if cell is merged, false if not. + * + */ bool Sheet::isMergedCell(CellAddress address) const { @@ -1173,115 +1294,122 @@ int Sheet::getRowHeight(int row) const } /** - * Get a vector of strings with addresses of all used cells. - * - * @returns vector of strings. - * - */ + * Get a vector of strings with addresses of all used cells. + * + * @returns vector of strings. + * + */ std::vector Sheet::getUsedCells() const { std::vector usedCells; - for (const auto &addr : cells.getUsedCells()) + for (const auto& addr : cells.getUsedCells()) { usedCells.push_back(addr.toString()); + } return usedCells; } -void Sheet::updateColumnsOrRows(bool horizontal, int section, int count) +void Sheet::updateColumnsOrRows(bool horizontal, int section, int count) { - const auto &sizes = horizontal?columnWidths.getValues():rowHeights.getValues(); + const auto& sizes = horizontal ? columnWidths.getValues() : rowHeights.getValues(); auto iter = sizes.lower_bound(section); - if(iter!=sizes.end()) { - std::map newsizes(sizes.begin(),iter); - if(count>0) { - for(;iter!=sizes.end();++iter) + if (iter != sizes.end()) { + std::map newsizes(sizes.begin(), iter); + if (count > 0) { + for (; iter != sizes.end(); ++iter) { newsizes.emplace(iter->first + count, iter->second); - } else { - iter = sizes.lower_bound(section-count); - if(iter!=sizes.end()) { - for(;iter!=sizes.end();++iter) - newsizes.emplace(iter->first+count, iter->second); } } - if(horizontal) { + else { + iter = sizes.lower_bound(section - count); + if (iter != sizes.end()) { + for (; iter != sizes.end(); ++iter) { + newsizes.emplace(iter->first + count, iter->second); + } + } + } + if (horizontal) { columnWidths.setValues(newsizes); - } else { + } + else { rowHeights.setValues(newsizes); } } } /** - * Insert \a count columns at before column \a col in the spreadsheet. - * - * @param col Address of column where the columns are inserted. - * @param count Number of columns to insert - * - */ + * Insert \a count columns at before column \a col in the spreadsheet. + * + * @param col Address of column where the columns are inserted. + * @param count Number of columns to insert + * + */ void Sheet::insertColumns(int col, int count) { cells.insertColumns(col, count); - updateColumnsOrRows(true,col,count); + updateColumnsOrRows(true, col, count); } /** - * Remove \a count columns at column \a col. - * - * @param col Address of first column to remove. - * @param count Number of columns to remove. - * - */ + * Remove \a count columns at column \a col. + * + * @param col Address of first column to remove. + * @param count Number of columns to remove. + * + */ void Sheet::removeColumns(int col, int count) { // Remove aliases, if defined - for (const auto &address : cells.getColumns(col, count)) { + for (const auto& address : cells.getColumns(col, count)) { auto cell = getCell(address); std::string aliasStr; - if (cell && cell->getAlias(aliasStr)) + if (cell && cell->getAlias(aliasStr)) { removeDynamicProperty(aliasStr.c_str()); + } } cells.removeColumns(col, count); - updateColumnsOrRows(true,col,-count); + updateColumnsOrRows(true, col, -count); } /** - * Insert \a count rows at row \a row. - * - * @param row Address of row where the rows are inserted. - * @param count Number of rows to insert. - * - */ + * Insert \a count rows at row \a row. + * + * @param row Address of row where the rows are inserted. + * @param count Number of rows to insert. + * + */ void Sheet::insertRows(int row, int count) { cells.insertRows(row, count); - updateColumnsOrRows(false,row,count); + updateColumnsOrRows(false, row, count); } /** - * Remove \a count rows starting at \a row from the spreadsheet. - * - * @param row Address of first row to remove. - * @param count Number of rows to remove. - * - */ + * Remove \a count rows starting at \a row from the spreadsheet. + * + * @param row Address of first row to remove. + * @param count Number of rows to remove. + * + */ void Sheet::removeRows(int row, int count) { // Remove aliases, if defined - for (const auto &address : cells.getRows(row, count)) { + for (const auto& address : cells.getRows(row, count)) { auto cell = getCell(address); std::string aliasStr; - if (cell && cell->getAlias(aliasStr)) + if (cell && cell->getAlias(aliasStr)) { removeDynamicProperty(aliasStr.c_str()); + } } cells.removeRows(row, count); - updateColumnsOrRows(false,row,-count); + updateColumnsOrRows(false, row, -count); } /** @@ -1290,7 +1418,7 @@ void Sheet::removeRows(int row, int count) * @param value New value */ -void Sheet::setContent(CellAddress address, const char *value) +void Sheet::setContent(CellAddress address, const char* value) { cells.setContent(address, value); } @@ -1312,7 +1440,7 @@ void Sheet::setAlignment(CellAddress address, int alignment) * @param style New style */ -void Sheet::setStyle(CellAddress address, const std::set &style) +void Sheet::setStyle(CellAddress address, const std::set& style) { cells.setStyle(address, style); } @@ -1323,7 +1451,7 @@ void Sheet::setStyle(CellAddress address, const std::set &style) * @param color New color */ -void Sheet::setForeground(CellAddress address, const Color &color) +void Sheet::setForeground(CellAddress address, const Color& color) { cells.setForeground(address, color); } @@ -1334,7 +1462,7 @@ void Sheet::setForeground(CellAddress address, const Color &color) * @param color New color */ -void Sheet::setBackground(CellAddress address, const Color &color) +void Sheet::setBackground(CellAddress address, const Color& color) { cells.setBackground(address, color); } @@ -1345,7 +1473,7 @@ void Sheet::setBackground(CellAddress address, const Color &color) * @param unit New unit */ -void Sheet::setDisplayUnit(CellAddress address, const std::string &unit) +void Sheet::setDisplayUnit(CellAddress address, const std::string& unit) { cells.setDisplayUnit(address, unit); } @@ -1356,7 +1484,7 @@ void Sheet::setDisplayUnit(CellAddress address, const std::string &unit) * @param unit New unit. */ -void Sheet::setComputedUnit(CellAddress address, const Base::Unit &unit) +void Sheet::setComputedUnit(CellAddress address, const Base::Unit& unit) { cells.setComputedUnit(address, unit); } @@ -1368,22 +1496,27 @@ void Sheet::setComputedUnit(CellAddress address, const Base::Unit &unit) * @param alias New alias. */ -void Sheet::setAlias(CellAddress address, const std::string &alias) +void Sheet::setAlias(CellAddress address, const std::string& alias) { std::string existingAlias = getAddressFromAlias(alias); if (!existingAlias.empty()) { - if (existingAlias == address.toString()) // Same as old? + if (existingAlias == address.toString()) { // Same as old? return; - else + } + else { throw Base::ValueError("Alias already defined"); + } } - else if (alias.empty()) // Empty? + else if (alias.empty()) { // Empty? cells.setAlias(address, ""); - else if (isValidAlias(alias)) // Valid? + } + else if (isValidAlias(alias)) { // Valid? cells.setAlias(address, alias); - else + } + else { throw Base::ValueError("Invalid alias"); + } } /** @@ -1393,12 +1526,13 @@ void Sheet::setAlias(CellAddress address, const std::string &alias) * @returns Name of cell, or empty string if not defined */ -std::string Sheet::getAddressFromAlias(const std::string &alias) const +std::string Sheet::getAddressFromAlias(const std::string& alias) const { - const Cell * cell = cells.getValueFromAlias(alias); + const Cell* cell = cells.getValueFromAlias(alias); - if (cell) + if (cell) { return cell->getAddress().toString(); + } return {}; } @@ -1410,21 +1544,25 @@ std::string Sheet::getAddressFromAlias(const std::string &alias) const * */ -bool Sheet::isValidAlias(const std::string & candidate) +bool Sheet::isValidAlias(const std::string& candidate) { // Valid syntactically? - if (!cells.isValidAlias(candidate)) + if (!cells.isValidAlias(candidate)) { return false; + } // Existing alias? Then it's ok - if (!getAddressFromAlias(candidate).empty() ) + if (!getAddressFromAlias(candidate).empty()) { return true; + } // Check to see that is does not crash with any other property in the Sheet object. - if (getPropertyByName(candidate.c_str())) + if (getPropertyByName(candidate.c_str())) { return false; - else + } + else { return true; + } } /** @@ -1456,7 +1594,7 @@ std::set Sheet::dependsOn(CellAddress address) const * @param result Set of links. */ -void Sheet::providesTo(CellAddress address, std::set & result) const +void Sheet::providesTo(CellAddress address, std::set& result) const { std::string fullName = getFullName() + "."; std::set tmpResult = cells.getDeps(fullName + address.toString()); @@ -1472,15 +1610,15 @@ void Sheet::providesTo(CellAddress address, std::set & result) cons * @param result Set of links. */ -std::set Sheet::providesTo(CellAddress address) const +std::set Sheet::providesTo(CellAddress address) const { - return cells.getDeps(getFullName()+"."+address.toString()); + return cells.getDeps(getFullName() + "." + address.toString()); } void Sheet::onDocumentRestored() { auto ret = execute(); - if(ret!=DocumentObject::StdReturn) { + if (ret != DocumentObject::StdReturn) { FC_ERR("Failed to restore " << getFullName() << ": " << ret->Why); delete ret; } @@ -1491,7 +1629,7 @@ void Sheet::onDocumentRestored() * @param document document to observer. */ -void Sheet::observeDocument(Document * document) +void Sheet::observeDocument(Document* document) { // observer is no longer required as PropertySheet is now derived from // PropertyLinkBase and will handle all the link related behavior @@ -1506,44 +1644,52 @@ void Sheet::observeDocument(Document * document) } else { // Create a new observer - SheetObserver * observer = new SheetObserver(document, &cells); + SheetObserver* observer = new SheetObserver(document, &cells); observers[document->getName()] = observer; } #endif } -void Sheet::renameObjectIdentifiers(const std::map &paths) +void Sheet::renameObjectIdentifiers(const std::map& paths) { DocumentObject::renameObjectIdentifiers(paths); cells.renameObjectIdentifiers(paths); } -bool Sheet::hasCell(const std::vector &ranges) const { - for(auto range : ranges) { +bool Sheet::hasCell(const std::vector& ranges) const +{ + for (auto range : ranges) { do { - if(cells.getValue(*range)) + if (cells.getValue(*range)) { return true; - }while(range.next()); + } + } while (range.next()); } return false; } -std::string Sheet::getRow(int offset) const { - if(currentRow < 0) +std::string Sheet::getRow(int offset) const +{ + if (currentRow < 0) { throw Base::RuntimeError("No current row"); + } int row = currentRow + offset; - if(row<0 || row>CellAddress::MAX_ROWS) + if (row < 0 || row > CellAddress::MAX_ROWS) { throw Base::ValueError("Out of range"); - return std::to_string(row+1); + } + return std::to_string(row + 1); } -std::string Sheet::getColumn(int offset) const { - if(currentCol < 0) +std::string Sheet::getColumn(int offset) const +{ + if (currentCol < 0) { throw Base::RuntimeError("No current column"); + } int col = currentCol + offset; - if(col<0 || col>CellAddress::MAX_COLUMNS) + if (col < 0 || col > CellAddress::MAX_COLUMNS) { throw Base::ValueError("Out of range"); + } if (col < 26) { char txt[2]; txt[0] = (char)('A' + col); @@ -1559,40 +1705,46 @@ std::string Sheet::getColumn(int offset) const { return txt; } -void Sheet::onChanged(const App::Property *prop) { - if(prop == &cells) { +void Sheet::onChanged(const App::Property* prop) +{ + if (prop == &cells) { decltype(copyCutRanges) tmp; tmp.swap(copyCutRanges); - for(auto &range : tmp) + for (auto& range : tmp) { rangeUpdated(range); + } } - else + else { cells.slotChangedObject(*this, *prop); + } App::DocumentObject::onChanged(prop); } -void Sheet::setCopyOrCutRanges(const std::vector &ranges, bool copy) +void Sheet::setCopyOrCutRanges(const std::vector& ranges, bool copy) { std::set rangeSet(copyCutRanges.begin(), copyCutRanges.end()); copyCutRanges = ranges; rangeSet.insert(copyCutRanges.begin(), copyCutRanges.end()); - for(const auto &range : rangeSet) + for (const auto& range : rangeSet) { rangeUpdated(range); + } hasCopyRange = copy; } -const std::vector &Sheet::getCopyOrCutRange(bool copy) const +const std::vector& Sheet::getCopyOrCutRange(bool copy) const { static const std::vector nullRange; - if(hasCopyRange != copy) + if (hasCopyRange != copy) { return nullRange; + } return copyCutRanges; } unsigned Sheet::getCopyOrCutBorder(CellAddress address, bool copy) const { - if(hasCopyRange != copy) + if (hasCopyRange != copy) { return 0; + } return _getBorder(this, copyCutRanges, address); } @@ -1600,9 +1752,9 @@ unsigned Sheet::getCopyOrCutBorder(CellAddress address, bool copy) const TYPESYSTEM_SOURCE(Spreadsheet::PropertySpreadsheetQuantity, App::PropertyQuantity) -Property *PropertySpreadsheetQuantity::Copy() const +Property* PropertySpreadsheetQuantity::Copy() const { - PropertySpreadsheetQuantity * obj = new PropertySpreadsheetQuantity(); + PropertySpreadsheetQuantity* obj = new PropertySpreadsheetQuantity(); obj->_dValue = _dValue; obj->_Unit = _Unit; @@ -1610,9 +1762,9 @@ Property *PropertySpreadsheetQuantity::Copy() const return obj; } -void PropertySpreadsheetQuantity::Paste(const Property &from) +void PropertySpreadsheetQuantity::Paste(const Property& from) { - const auto &src = dynamic_cast(from); + const auto& src = dynamic_cast(from); aboutToSetValue(); _dValue = src._dValue; _Unit = src._Unit; @@ -1621,16 +1773,21 @@ void PropertySpreadsheetQuantity::Paste(const Property &from) // Python sheet feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Spreadsheet::SheetPython, Spreadsheet::Sheet) -template<> const char* Spreadsheet::SheetPython::getViewProviderName() const { +template<> +const char* Spreadsheet::SheetPython::getViewProviderName() const +{ return "SpreadsheetGui::ViewProviderSheet"; } -template<> PyObject* Spreadsheet::SheetPython::getPyObject() { +template<> +PyObject* Spreadsheet::SheetPython::getPyObject() +{ if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new FeaturePythonPyT(this),true); + PythonObject = Py::Object(new FeaturePythonPyT(this), true); } return Py::new_reference_to(PythonObject); } @@ -1638,4 +1795,4 @@ template<> PyObject* Spreadsheet::SheetPython::getPyObject() { // explicit template instantiation template class SpreadsheetExport FeaturePythonT; -} +} // namespace App diff --git a/src/Mod/Spreadsheet/App/Sheet.h b/src/Mod/Spreadsheet/App/Sheet.h index 8c7388d169..29ebe3528a 100644 --- a/src/Mod/Spreadsheet/App/Sheet.h +++ b/src/Mod/Spreadsheet/App/Sheet.h @@ -24,8 +24,8 @@ #define Spreadsheet_Spreadsheet_H #ifdef signals -# undef signals -# define signals signals +#undef signals +#define signals signals #endif #include @@ -54,47 +54,55 @@ class SheetObserver; * Copy() and Paste() methods. It is used by the spreadsheet to * create aliases in a generic way. */ -class SpreadsheetExport PropertySpreadsheetQuantity : public App::PropertyQuantity +class SpreadsheetExport PropertySpreadsheetQuantity: public App::PropertyQuantity { TYPESYSTEM_HEADER_WITH_OVERRIDE(); + public: PropertySpreadsheetQuantity() = default; ~PropertySpreadsheetQuantity() override = default; - Property *Copy() const override; - void Paste(const Property &from) override; + Property* Copy() const override; + void Paste(const Property& from) override; }; -class SpreadsheetExport Sheet : public App::DocumentObject +class SpreadsheetExport Sheet: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Spreadsheet::Sheet); public: - /// Constructor Sheet(); ~Sheet() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "SpreadsheetGui::ViewProviderSheet"; } - bool importFromFile(const std::string & filename, char delimiter = '\t', char quoteChar = '\0', char escapeChar = '\\'); + bool importFromFile(const std::string& filename, + char delimiter = '\t', + char quoteChar = '\0', + char escapeChar = '\\'); - bool getCharsFromPrefs(char &delimiter, char "e, char &escape, std::string &errMsg); + bool getCharsFromPrefs(char& delimiter, char& quote, char& escape, std::string& errMsg); - bool exportToFile(const std::string & filename, char delimiter = '\t', char quoteChar = '\0', char escapeChar = '\\') const; + bool exportToFile(const std::string& filename, + char delimiter = '\t', + char quoteChar = '\0', + char escapeChar = '\\') const; - bool mergeCells(const App::Range &range); + bool mergeCells(const App::Range& range); void splitCell(App::CellAddress address); - Cell * getCell(App::CellAddress address); + Cell* getCell(App::CellAddress address); - Cell *getNewCell(App::CellAddress address); + Cell* getNewCell(App::CellAddress address); - enum Border { + enum Border + { BorderTop = 1, BorderLeft = 2, BorderBottom = 4, @@ -103,20 +111,20 @@ public: }; unsigned getCellBindingBorder(App::CellAddress address) const; - PropertySheet::BindingType getCellBinding(App::Range &range, - App::ExpressionPtr *pStart=nullptr, - App::ExpressionPtr *pEnd=nullptr, - App::ObjectIdentifier *pTarget=nullptr) const; + PropertySheet::BindingType getCellBinding(App::Range& range, + App::ExpressionPtr* pStart = nullptr, + App::ExpressionPtr* pEnd = nullptr, + App::ObjectIdentifier* pTarget = nullptr) const; - void setCell(const char *address, const char *value); + void setCell(const char* address, const char* value); - void setCell(App::CellAddress address, const char *value); + void setCell(App::CellAddress address, const char* value); void clearAll(); void clear(App::CellAddress address, bool all = true); - void getSpans(App::CellAddress address, int & rows, int & cols) const; + void getSpans(App::CellAddress address, int& rows, int& cols) const; bool isMergedCell(App::CellAddress address) const; @@ -140,60 +148,64 @@ public: void removeRows(int row, int count); - void setContent(App::CellAddress address, const char * value); + void setContent(App::CellAddress address, const char* value); void setAlignment(App::CellAddress address, int alignment); - void setStyle(App::CellAddress address, const std::set & style); + void setStyle(App::CellAddress address, const std::set& style); - void setForeground(App::CellAddress address, const App::Color &color); + void setForeground(App::CellAddress address, const App::Color& color); - void setBackground(App::CellAddress address, const App::Color &color); + void setBackground(App::CellAddress address, const App::Color& color); - void setDisplayUnit(App::CellAddress address, const std::string & unit); + void setDisplayUnit(App::CellAddress address, const std::string& unit); - void setComputedUnit(App::CellAddress address, const Base::Unit & unit); + void setComputedUnit(App::CellAddress address, const Base::Unit& unit); - void setAlias(App::CellAddress address, const std::string & alias); + void setAlias(App::CellAddress address, const std::string& alias); - std::string getAddressFromAlias(const std::string & alias) const; + std::string getAddressFromAlias(const std::string& alias) const; - bool isValidAlias(const std::string &candidate); + bool isValidAlias(const std::string& candidate); void setSpans(App::CellAddress address, int rows, int columns); std::set dependsOn(App::CellAddress address) const; - void providesTo(App::CellAddress address, std::set & result) const; + void providesTo(App::CellAddress address, std::set& result) const; - bool hasCell(const std::vector &ranges) const; - PyObject *getPyObject() override; + bool hasCell(const std::vector& ranges) const; + PyObject* getPyObject() override; - PropertySheet *getCells() { return &cells; } + PropertySheet* getCells() + { + return &cells; + } - App::Property *getPropertyByName(const char *name) const override; + App::Property* getPropertyByName(const char* name) const override; - App::Property *getDynamicPropertyByName(const char* name) const override; + App::Property* getDynamicPropertyByName(const char* name) const override; - void getPropertyNamedList(std::vector > &List) const override; + void + getPropertyNamedList(std::vector>& List) const override; short mustExecute() const override; - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; - bool getCellAddress(const App::Property *prop, App::CellAddress &address); + bool getCellAddress(const App::Property* prop, App::CellAddress& address); - App::CellAddress getCellAddress(const char *name, bool silent=false) const; + App::CellAddress getCellAddress(const char* name, bool silent = false) const; - App::Range getRange(const char *name, bool silent=false) const; + App::Range getRange(const char* name, bool silent = false) const; std::map getColumnWidths() const; std::map getRowHeights() const; - std::string getRow(int offset=0) const; + std::string getRow(int offset = 0) const; - std::string getColumn(int offset=0) const; + std::string getColumn(int offset = 0) const; void touchCells(App::Range range); @@ -201,29 +213,29 @@ public: // Signals - boost::signals2::signal cellUpdated; + boost::signals2::signal cellUpdated; - boost::signals2::signal rangeUpdated; + boost::signals2::signal rangeUpdated; - boost::signals2::signal cellSpanChanged; + boost::signals2::signal cellSpanChanged; - boost::signals2::signal columnWidthChanged; + boost::signals2::signal columnWidthChanged; - boost::signals2::signal rowHeightChanged; + boost::signals2::signal rowHeightChanged; - void observeDocument(App::Document *document); + void observeDocument(App::Document* document); - void renameObjectIdentifiers(const std::map & paths) override; + void renameObjectIdentifiers( + const std::map& paths) override; - void setCopyOrCutRanges(const std::vector &ranges, bool copy=true); - const std::vector &getCopyOrCutRange(bool copy=true) const; - unsigned getCopyOrCutBorder(App::CellAddress address, bool copy=true) const; + void setCopyOrCutRanges(const std::vector& ranges, bool copy = true); + const std::vector& getCopyOrCutRange(bool copy = true) const; + unsigned getCopyOrCutBorder(App::CellAddress address, bool copy = true) const; protected: + void onChanged(const App::Property* prop) override; - void onChanged(const App::Property *prop) override; - - void updateColumnsOrRows(bool horizontal, int section, int count) ; + void updateColumnsOrRows(bool horizontal, int section, int count); std::set providesTo(App::CellAddress address) const; @@ -231,31 +243,31 @@ protected: void recomputeCell(App::CellAddress p); - App::Property *getProperty(App::CellAddress key) const; + App::Property* getProperty(App::CellAddress key) const; - App::Property *getProperty(const char * addr) const; + App::Property* getProperty(const char* addr) const; void updateProperty(App::CellAddress key); - App::Property *setStringProperty(App::CellAddress key, const std::string & value) ; + App::Property* setStringProperty(App::CellAddress key, const std::string& value); - App::Property *setObjectProperty(App::CellAddress key, Py::Object obj) ; + App::Property* setObjectProperty(App::CellAddress key, Py::Object obj); - App::Property *setFloatProperty(App::CellAddress key, double value); + App::Property* setFloatProperty(App::CellAddress key, double value); - App::Property *setIntegerProperty(App::CellAddress key, long value); + App::Property* setIntegerProperty(App::CellAddress key, long value); - App::Property *setQuantityProperty(App::CellAddress key, double value, const Base::Unit &unit); + App::Property* setQuantityProperty(App::CellAddress key, double value, const Base::Unit& unit); void onSettingDocument() override; void updateBindings(); /* Properties for used cells */ - App::DynamicProperty &props; + App::DynamicProperty& props; /* Mapping of properties to cell position */ - std::map propAddress; + std::map propAddress; /* Set of cells with errors */ std::set cellErrors; @@ -272,7 +284,7 @@ protected: PropertyRowHeights rowHeights; /* Document observers to track changes to external properties */ - using ObserverMap = std::map; + using ObserverMap = std::map; ObserverMap observers; int currentRow = -1; @@ -290,7 +302,7 @@ protected: using SheetPython = App::FeaturePythonT; -} //namespace Spreadsheet +} // namespace Spreadsheet -#endif // Spreadsheet_Spreadsheet_H +#endif // Spreadsheet_Spreadsheet_H diff --git a/src/Mod/Spreadsheet/App/SheetObserver.cpp b/src/Mod/Spreadsheet/App/SheetObserver.cpp index 169481a8bd..a3e84b7fb9 100644 --- a/src/Mod/Spreadsheet/App/SheetObserver.cpp +++ b/src/Mod/Spreadsheet/App/SheetObserver.cpp @@ -22,76 +22,78 @@ #include "PreCompiled.h" -#include "SheetObserver.h" #include "PropertySheet.h" +#include "SheetObserver.h" using namespace Spreadsheet; using namespace App; /** - * The SheetObserver constructor. - * - * @param document The Document we are observing - * @param _sheet The sheet owning this observer. - * - */ + * The SheetObserver constructor. + * + * @param document The Document we are observing + * @param _sheet The sheet owning this observer. + * + */ -SheetObserver::SheetObserver(App::Document * document, PropertySheet *_sheet) +SheetObserver::SheetObserver(App::Document* document, PropertySheet* _sheet) : DocumentObserver(document) , sheet(_sheet) -{ -} +{} /** - * Invalidate cells that depend on this document object. - * - */ + * Invalidate cells that depend on this document object. + * + */ -void SheetObserver::slotCreatedObject(const DocumentObject &Obj) +void SheetObserver::slotCreatedObject(const DocumentObject& Obj) { sheet->invalidateDependants(&Obj); } /** - * Invalidate cells that depend on this document object. - * - */ + * Invalidate cells that depend on this document object. + * + */ -void SheetObserver::slotDeletedObject(const DocumentObject &Obj) +void SheetObserver::slotDeletedObject(const DocumentObject& Obj) { sheet->invalidateDependants(&Obj); sheet->deletedDocumentObject(&Obj); } /** - * Invoke the sheets recomputeDependants when a change to a Property occurs. - * - */ + * Invoke the sheets recomputeDependants when a change to a Property occurs. + * + */ -void SheetObserver::slotChangedObject(const DocumentObject &Obj, const Property &Prop) +void SheetObserver::slotChangedObject(const DocumentObject& Obj, const Property& Prop) { - if (&Prop == &Obj.Label) + if (&Prop == &Obj.Label) { sheet->renamedDocumentObject(&Obj); + } else { - const char * name = Obj.getPropertyName(&Prop); + const char* name = Obj.getPropertyName(&Prop); - if (!name) + if (!name) { return; + } - if (isUpdating.find(name) != isUpdating.end()) + if (isUpdating.find(name) != isUpdating.end()) { return; + } isUpdating.insert(name); - sheet->recomputeDependants(&Obj,Prop.getName()); + sheet->recomputeDependants(&Obj, Prop.getName()); isUpdating.erase(name); } } /** - * Increase reference count. - * - */ + * Increase reference count. + * + */ void SheetObserver::ref() { @@ -99,13 +101,12 @@ void SheetObserver::ref() } /** - * Decrease reference count. - * - */ + * Decrease reference count. + * + */ bool SheetObserver::unref() { refCount--; return refCount; } - diff --git a/src/Mod/Spreadsheet/App/SheetObserver.h b/src/Mod/Spreadsheet/App/SheetObserver.h index ade38fe829..c4d4122f18 100644 --- a/src/Mod/Spreadsheet/App/SheetObserver.h +++ b/src/Mod/Spreadsheet/App/SheetObserver.h @@ -25,27 +25,33 @@ #include -namespace Spreadsheet { +namespace Spreadsheet +{ class PropertySheet; // SheetObserver is obsolete as PropertySheet is now derived from PropertyLinkBase -class SheetObserver : public App::DocumentObserver { +class SheetObserver: public App::DocumentObserver +{ public: - SheetObserver(App::Document* document, PropertySheet *_sheet); + SheetObserver(App::Document* document, PropertySheet* _sheet); ~SheetObserver() override = default; void slotCreatedObject(const App::DocumentObject& Obj) override; void slotDeletedObject(const App::DocumentObject& Obj) override; void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop) override; void ref(); bool unref(); - App::Document* getDocument() const { return App::DocumentObserver::getDocument(); } + App::Document* getDocument() const + { + return App::DocumentObserver::getDocument(); + } + private: std::set isUpdating; - unsigned int refCount{1}; - PropertySheet * sheet; + unsigned int refCount {1}; + PropertySheet* sheet; }; -} +} // namespace Spreadsheet -#endif // SHEETOBSERVER_H +#endif // SHEETOBSERVER_H diff --git a/src/Mod/Spreadsheet/App/SheetPy.xml b/src/Mod/Spreadsheet/App/SheetPy.xml index ede5106970..6e31e8eec4 100644 --- a/src/Mod/Spreadsheet/App/SheetPy.xml +++ b/src/Mod/Spreadsheet/App/SheetPy.xml @@ -10,7 +10,6 @@ FatherInclude="App/DocumentObjectPy.h" FatherNamespace="App" Constructor="true"> - With this object you can manipulate spreadsheets @@ -180,7 +179,7 @@ following dependency order. - + @@ -191,7 +190,7 @@ or may not have a non-empty string content. - + @@ -201,7 +200,7 @@ Get a list of the names of all cells with data in them. - + @@ -214,7 +213,7 @@ of the block are not necessarily used. - + @@ -227,6 +226,6 @@ of the block do not necessarily contain anything. - + diff --git a/src/Mod/Spreadsheet/App/SheetPyImp.cpp b/src/Mod/Spreadsheet/App/SheetPyImp.cpp index 65c22eeb2c..0e37c5644b 100644 --- a/src/Mod/Spreadsheet/App/SheetPyImp.cpp +++ b/src/Mod/Spreadsheet/App/SheetPyImp.cpp @@ -30,8 +30,10 @@ #include "Sheet.h" // inclusion of the generated files (generated out of SheetPy.xml) +// clang-format off #include "SheetPy.h" #include "SheetPy.cpp" +// clang-format on using namespace Spreadsheet; @@ -43,7 +45,7 @@ std::string SheetPy::representation() const return {""}; } -PyObject *SheetPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* SheetPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of SheetPy and the Twin object return new SheetPy(new Sheet()); @@ -57,22 +59,24 @@ int SheetPy::PyInit(PyObject* /*args*/, PyObject* /*kwd*/) // +++ methods implementer ++++++++++++++++++++++++++++++++++++++++++++++++ -PyObject* SheetPy::set(PyObject *args) +PyObject* SheetPy::set(PyObject* args) { - char *address; - char *contents; + char* address; + char* contents; - if (!PyArg_ParseTuple(args, "ss:set", &address, &contents)) + if (!PyArg_ParseTuple(args, "ss:set", &address, &contents)) { return nullptr; + } try { - Sheet * sheet = getSheetPtr(); + Sheet* sheet = getSheetPtr(); std::string cellAddress = sheet->getAddressFromAlias(address).c_str(); /* Check to see if address is really an alias first */ - if (!cellAddress.empty()) + if (!cellAddress.empty()) { sheet->setCell(cellAddress.c_str(), contents); + } else { Range rangeIter(address); @@ -81,7 +85,7 @@ PyObject* SheetPy::set(PyObject *args) } while (rangeIter.next()); } } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } @@ -89,88 +93,102 @@ PyObject* SheetPy::set(PyObject *args) Py_Return; } -PyObject* SheetPy::get(PyObject *args) +PyObject* SheetPy::get(PyObject* args) { - const char *address; - const char *address2=nullptr; + const char* address; + const char* address2 = nullptr; - if (!PyArg_ParseTuple(args, "s|s:get", &address, &address2)) + if (!PyArg_ParseTuple(args, "s|s:get", &address, &address2)) { return nullptr; + } - PY_TRY { - if(address2) { + PY_TRY + { + if (address2) { auto a1 = getSheetPtr()->getAddressFromAlias(address); - if(a1.empty()) + if (a1.empty()) { a1 = address; + } auto a2 = getSheetPtr()->getAddressFromAlias(address2); - if(a2.empty()) + if (a2.empty()) { a2 = address2; - Range range(a1.c_str(),a2.c_str()); + } + Range range(a1.c_str(), a2.c_str()); Py::Tuple tuple(range.size()); - int i=0; + int i = 0; do { - App::Property *prop = getSheetPtr()->getPropertyByName(range.address().c_str()); - if(!prop) { - PyErr_Format(PyExc_ValueError, "Invalid address '%s' in range %s:%s", - range.address().c_str(), address, address2); + App::Property* prop = getSheetPtr()->getPropertyByName(range.address().c_str()); + if (!prop) { + PyErr_Format(PyExc_ValueError, + "Invalid address '%s' in range %s:%s", + range.address().c_str(), + address, + address2); return nullptr; } - tuple.setItem(i++,Py::Object(prop->getPyObject(),true)); - }while(range.next()); + tuple.setItem(i++, Py::Object(prop->getPyObject(), true)); + } while (range.next()); return Py::new_reference_to(tuple); } - }PY_CATCH; + } + PY_CATCH; - App::Property * prop = this->getSheetPtr()->getPropertyByName(address); + App::Property* prop = this->getSheetPtr()->getPropertyByName(address); if (!prop) { - PyErr_Format(PyExc_ValueError, - "Invalid cell address or property: %s",address); + PyErr_Format(PyExc_ValueError, "Invalid cell address or property: %s", address); return nullptr; } return prop->getPyObject(); } -PyObject* SheetPy::getContents(PyObject *args) +PyObject* SheetPy::getContents(PyObject* args) { - char *strAddress; + char* strAddress; CellAddress address; - if (!PyArg_ParseTuple(args, "s:getContents", &strAddress)) + if (!PyArg_ParseTuple(args, "s:getContents", &strAddress)) { return nullptr; + } - PY_TRY { - try { - Sheet * sheet = getSheetPtr(); + PY_TRY + { + try { + Sheet* sheet = getSheetPtr(); std::string addr = sheet->getAddressFromAlias(strAddress); - if (addr.empty()) + if (addr.empty()) { address = stringToAddress(strAddress); - else + } + else { address = stringToAddress(addr.c_str()); + } } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } std::string contents; - const Cell * cell = this->getSheetPtr()->getCell(address); + const Cell* cell = this->getSheetPtr()->getCell(address); - if (cell) - cell->getStringContent( contents ); + if (cell) { + cell->getStringContent(contents); + } - return Py::new_reference_to( Py::String( contents ) ); - } PY_CATCH + return Py::new_reference_to(Py::String(contents)); + } + PY_CATCH } -PyObject* SheetPy::clear(PyObject *args) +PyObject* SheetPy::clear(PyObject* args) { - const char * strAddress; + const char* strAddress; int all = 1; - if (!PyArg_ParseTuple(args, "s|p:clear", &strAddress, &all)) + if (!PyArg_ParseTuple(args, "s|p:clear", &strAddress, &all)) { return nullptr; + } try { Range rangeIter(strAddress); @@ -178,7 +196,7 @@ PyObject* SheetPy::clear(PyObject *args) this->getSheetPtr()->clear(*rangeIter, all); } while (rangeIter.next()); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } @@ -186,70 +204,89 @@ PyObject* SheetPy::clear(PyObject *args) Py_Return; } -PyObject* SheetPy::clearAll(PyObject *args) +PyObject* SheetPy::clearAll(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } this->getSheetPtr()->clearAll(); Py_Return; } -PyObject* SheetPy::importFile(PyObject *args) +PyObject* SheetPy::importFile(PyObject* args) { - const char * filename; - const char * delimiter = "\t"; - const char * quoteChar = "\""; - const char * escapeChar = "\\"; + const char* filename; + const char* delimiter = "\t"; + const char* quoteChar = "\""; + const char* escapeChar = "\\"; - if (!PyArg_ParseTuple(args, "s|sss:importFile", &filename, &delimiter, "eChar, &escapeChar)) + if (!PyArg_ParseTuple(args, + "s|sss:importFile", + &filename, + &delimiter, + "eChar, + &escapeChar)) { return nullptr; + } - if (getSheetPtr()->importFromFile(filename, delimiter[0], quoteChar[0], escapeChar[0])) - return Py::new_reference_to( Py::Boolean(true) ); - else - return Py::new_reference_to( Py::Boolean(false) ); + if (getSheetPtr()->importFromFile(filename, delimiter[0], quoteChar[0], escapeChar[0])) { + return Py::new_reference_to(Py::Boolean(true)); + } + else { + return Py::new_reference_to(Py::Boolean(false)); + } } -PyObject* SheetPy::exportFile(PyObject *args) +PyObject* SheetPy::exportFile(PyObject* args) { - const char * filename; - const char * delimiter = "\t"; - const char * quoteChar = "\""; - const char * escapeChar = "\\"; + const char* filename; + const char* delimiter = "\t"; + const char* quoteChar = "\""; + const char* escapeChar = "\\"; - if (!PyArg_ParseTuple(args, "s|sss:exportFile", &filename, &delimiter, "eChar, &escapeChar)) + if (!PyArg_ParseTuple(args, + "s|sss:exportFile", + &filename, + &delimiter, + "eChar, + &escapeChar)) { return nullptr; + } - if (getSheetPtr()->exportToFile(filename, delimiter[0], quoteChar[0], escapeChar[0])) - return Py::new_reference_to( Py::Boolean(true) ); - else - return Py::new_reference_to( Py::Boolean(false) ); + if (getSheetPtr()->exportToFile(filename, delimiter[0], quoteChar[0], escapeChar[0])) { + return Py::new_reference_to(Py::Boolean(true)); + } + else { + return Py::new_reference_to(Py::Boolean(false)); + } } -PyObject* SheetPy::mergeCells(PyObject *args) +PyObject* SheetPy::mergeCells(PyObject* args) { - const char * range; + const char* range; - if (!PyArg_ParseTuple(args, "s:mergeCells", &range)) + if (!PyArg_ParseTuple(args, "s:mergeCells", &range)) { return nullptr; + } getSheetPtr()->mergeCells(Range(range)); Py_Return; } -PyObject* SheetPy::splitCell(PyObject *args) +PyObject* SheetPy::splitCell(PyObject* args) { - const char * strAddress; + const char* strAddress; - if (!PyArg_ParseTuple(args, "s:splitCell", &strAddress)) + if (!PyArg_ParseTuple(args, "s:splitCell", &strAddress)) { return nullptr; + } CellAddress address; try { address = stringToAddress(strAddress); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } @@ -258,75 +295,82 @@ PyObject* SheetPy::splitCell(PyObject *args) Py_Return; } -PyObject* SheetPy::insertColumns(PyObject *args) +PyObject* SheetPy::insertColumns(PyObject* args) { - const char * column; + const char* column; int count; - if (!PyArg_ParseTuple(args, "si:insertColumns", &column, &count)) + if (!PyArg_ParseTuple(args, "si:insertColumns", &column, &count)) { return nullptr; + } getSheetPtr()->insertColumns(decodeColumn(column), count); Py_Return; } -PyObject* SheetPy::removeColumns(PyObject *args) +PyObject* SheetPy::removeColumns(PyObject* args) { - const char * column; + const char* column; int count; - if (!PyArg_ParseTuple(args, "si:removeColumns", &column, &count)) + if (!PyArg_ParseTuple(args, "si:removeColumns", &column, &count)) { return nullptr; + } getSheetPtr()->removeColumns(decodeColumn(column), count); Py_Return; } -PyObject* SheetPy::insertRows(PyObject *args) +PyObject* SheetPy::insertRows(PyObject* args) { - const char * row; + const char* row; int count; - if (!PyArg_ParseTuple(args, "si:insertRows", &row, &count)) + if (!PyArg_ParseTuple(args, "si:insertRows", &row, &count)) { return nullptr; + } getSheetPtr()->insertRows(decodeRow(std::string(row)), count); Py_Return; } -PyObject* SheetPy::removeRows(PyObject *args) +PyObject* SheetPy::removeRows(PyObject* args) { - const char * row; + const char* row; int count; - if (!PyArg_ParseTuple(args, "si:removeRows", &row, &count)) + if (!PyArg_ParseTuple(args, "si:removeRows", &row, &count)) { return nullptr; + } getSheetPtr()->removeRows(decodeRow(std::string(row)), count); Py_Return; } -PyObject* SheetPy::setStyle(PyObject *args) +PyObject* SheetPy::setStyle(PyObject* args) { - const char * cell; - PyObject * value; + const char* cell; + PyObject* value; std::set style; - const char * options = "replace"; + const char* options = "replace"; - if (!PyArg_ParseTuple(args, "sO|s:setStyle", &cell, &value, &options)) + if (!PyArg_ParseTuple(args, "sO|s:setStyle", &cell, &value, &options)) { return nullptr; + } if (PySet_Check(value)) { - PyObject * copy = PySet_New(value); + PyObject* copy = PySet_New(value); while (PySet_Size(copy) > 0) { - PyObject * item = PySet_Pop(copy); + PyObject* item = PySet_Pop(copy); // check on the key: - if (PyUnicode_Check(item)) + if (PyUnicode_Check(item)) { style.insert(PyUnicode_AsUTF8(item)); + } else { - std::string error = std::string("type of the set need to be a string, not ") + item->ob_type->tp_name; + std::string error = std::string("type of the set need to be a string, not ") + + item->ob_type->tp_name; PyErr_SetString(PyExc_TypeError, error.c_str()); Py_DECREF(copy); return nullptr; @@ -339,13 +383,16 @@ PyObject* SheetPy::setStyle(PyObject *args) escaped_list_separator e('\0', '|', '\0'); std::string line = PyUnicode_AsUTF8(value); - tokenizer > tok(line, e); + tokenizer> tok(line, e); - for(tokenizer >::iterator i = tok.begin(); i != tok.end();++i) + for (tokenizer>::iterator i = tok.begin(); i != tok.end(); + ++i) { style.insert(*i); + } } else { - std::string error = std::string("style must be either set or string, not ") + value->ob_type->tp_name; + std::string error = + std::string("style must be either set or string, not ") + value->ob_type->tp_name; PyErr_SetString(PyExc_TypeError, error.c_str()); return nullptr; } @@ -361,13 +408,14 @@ PyObject* SheetPy::setStyle(PyObject *args) do { std::set oldStyle; - const Cell * cell = getSheetPtr()->getCell(*rangeIter); + const Cell* cell = getSheetPtr()->getCell(*rangeIter); // Get old styles first - if (cell) + if (cell) { cell->getStyle(oldStyle); + } - for (const auto & it : oldStyle) { + for (const auto& it : oldStyle) { style.insert(it); } @@ -380,13 +428,14 @@ PyObject* SheetPy::setStyle(PyObject *args) do { std::set oldStyle; - const Cell * cell = getSheetPtr()->getCell(*rangeIter); + const Cell* cell = getSheetPtr()->getCell(*rangeIter); // Get old styles first - if (cell) + if (cell) { cell->getStyle(oldStyle); + } - for (const auto & it : style) { + for (const auto& it : style) { oldStyle.erase(it); } @@ -400,7 +449,7 @@ PyObject* SheetPy::setStyle(PyObject *args) do { std::set oldStyle; std::set newStyle; - const Cell * cell = getSheetPtr()->getCell(*rangeIter); + const Cell* cell = getSheetPtr()->getCell(*rangeIter); // Get old styles first if (cell) { @@ -408,7 +457,7 @@ PyObject* SheetPy::setStyle(PyObject *args) newStyle = oldStyle; } - for (const auto & i : style) { + for (const auto& i : style) { if (oldStyle.find(i) == oldStyle.end()) { // Not found in oldstyle; add it to newStyle newStyle.insert(i); @@ -424,36 +473,39 @@ PyObject* SheetPy::setStyle(PyObject *args) } while (rangeIter.next()); } else { - PyErr_SetString(PyExc_ValueError, "Optional parameter must be either 'replace', 'add', 'remove', or 'invert'"); + PyErr_SetString( + PyExc_ValueError, + "Optional parameter must be either 'replace', 'add', 'remove', or 'invert'"); return nullptr; } Py_Return; } -PyObject* SheetPy::getStyle(PyObject *args) +PyObject* SheetPy::getStyle(PyObject* args) { - const char * strAddress; + const char* strAddress; CellAddress address; - if (!PyArg_ParseTuple(args, "s:getStyle", &strAddress)) + if (!PyArg_ParseTuple(args, "s:getStyle", &strAddress)) { return nullptr; + } try { address = stringToAddress(strAddress); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } std::set style; - const Cell * cell = getSheetPtr()->getCell(address); + const Cell* cell = getSheetPtr()->getCell(address); if (cell && cell->getStyle(style)) { - PyObject * s = PySet_New(nullptr); + PyObject* s = PySet_New(nullptr); - for (const auto & i : style) { + for (const auto& i : style) { PySet_Add(s, PyUnicode_FromString(i.c_str())); } @@ -465,13 +517,14 @@ PyObject* SheetPy::getStyle(PyObject *args) } } -PyObject* SheetPy::setDisplayUnit(PyObject *args) +PyObject* SheetPy::setDisplayUnit(PyObject* args) { - const char * cell; - const char * value; + const char* cell; + const char* value; - if (!PyArg_ParseTuple(args, "ss:setDisplayUnit", &cell, &value)) + if (!PyArg_ParseTuple(args, "ss:setDisplayUnit", &cell, &value)) { return nullptr; + } try { Range rangeIter(cell); @@ -480,7 +533,7 @@ PyObject* SheetPy::setDisplayUnit(PyObject *args) getSheetPtr()->setDisplayUnit(*rangeIter, value); } while (rangeIter.next()); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } @@ -488,14 +541,15 @@ PyObject* SheetPy::setDisplayUnit(PyObject *args) Py_Return; } -PyObject* SheetPy::setAlias(PyObject *args) +PyObject* SheetPy::setAlias(PyObject* args) { CellAddress address; - const char * strAddress; - PyObject * value; + const char* strAddress; + PyObject* value; - if (!PyArg_ParseTuple(args, "sO:setAlias", &strAddress, &value)) + if (!PyArg_ParseTuple(args, "sO:setAlias", &strAddress, &value)) { return nullptr; + } try { address = stringToAddress(strAddress); @@ -503,104 +557,116 @@ PyObject* SheetPy::setAlias(PyObject *args) getSheetPtr()->setAlias(address, value ? PyUnicode_AsUTF8(value) : ""); Py_Return; } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::getAlias(PyObject *args) +PyObject* SheetPy::getAlias(PyObject* args) { - const char * strAddress; + const char* strAddress; - if (!PyArg_ParseTuple(args, "s:getAlias", &strAddress)) + if (!PyArg_ParseTuple(args, "s:getAlias", &strAddress)) { return nullptr; + } try { CellAddress address(strAddress); - const Cell * cell = getSheetPtr()->getCell(address); + const Cell* cell = getSheetPtr()->getCell(address); std::string alias; - if (cell && cell->getAlias(alias)) - return Py::new_reference_to( Py::String( alias ) ); - else + if (cell && cell->getAlias(alias)) { + return Py::new_reference_to(Py::String(alias)); + } + else { Py_Return; + } } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::getCellFromAlias(PyObject *args) +PyObject* SheetPy::getCellFromAlias(PyObject* args) { - const char * alias; + const char* alias; - if (!PyArg_ParseTuple(args, "s:getAlias", &alias)) + if (!PyArg_ParseTuple(args, "s:getAlias", &alias)) { return nullptr; + } try { std::string address = getSheetPtr()->getAddressFromAlias(alias); - if (!address.empty()) - return Py::new_reference_to( Py::String( address ) ); - else + if (!address.empty()) { + return Py::new_reference_to(Py::String(address)); + } + else { Py_Return; + } } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::getDisplayUnit(PyObject *args) +PyObject* SheetPy::getDisplayUnit(PyObject* args) { - const char * strAddress; + const char* strAddress; CellAddress address; - if (!PyArg_ParseTuple(args, "s:getDisplayUnit", &strAddress)) + if (!PyArg_ParseTuple(args, "s:getDisplayUnit", &strAddress)) { return nullptr; + } try { address = stringToAddress(strAddress); Spreadsheet::DisplayUnit unit; - const Cell * cell = getSheetPtr()->getCell(address); + const Cell* cell = getSheetPtr()->getCell(address); - if ( cell && cell->getDisplayUnit(unit) ) - return Py::new_reference_to( Py::String( unit.stringRep ) ); - else + if (cell && cell->getDisplayUnit(unit)) { + return Py::new_reference_to(Py::String(unit.stringRep)); + } + else { Py_Return; + } } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::setAlignment(PyObject *args) +PyObject* SheetPy::setAlignment(PyObject* args) { - const char * cell; - PyObject * value; + const char* cell; + PyObject* value; int alignment = 0; - const char * options = "replace"; + const char* options = "replace"; - if (!PyArg_ParseTuple(args, "sO|s:setAlignment", &cell, &value, &options)) + if (!PyArg_ParseTuple(args, "sO|s:setAlignment", &cell, &value, &options)) { return nullptr; + } if (PySet_Check(value)) { // Argument is a set of strings - PyObject * copy = PySet_New(value); + PyObject* copy = PySet_New(value); int n = PySet_Size(copy); while (n-- > 0) { - PyObject * item = PySet_Pop(copy); + PyObject* item = PySet_Pop(copy); - if (PyUnicode_Check(item)) + if (PyUnicode_Check(item)) { alignment = Cell::decodeAlignment(PyUnicode_AsUTF8(item), alignment); + } else { - std::string error = std::string("type of the key need to be a string, not") + item->ob_type->tp_name; + std::string error = std::string("type of the key need to be a string, not") + + item->ob_type->tp_name; PyErr_SetString(PyExc_TypeError, error.c_str()); Py_DECREF(copy); return nullptr; @@ -615,15 +681,18 @@ PyObject* SheetPy::setAlignment(PyObject *args) escaped_list_separator e('\0', '|', '\0'); std::string line = PyUnicode_AsUTF8(value); - tokenizer > tok(line, e); + tokenizer> tok(line, e); - for(tokenizer >::iterator i = tok.begin(); i != tok.end();++i) { - if(!i->empty()) + for (tokenizer>::iterator i = tok.begin(); i != tok.end(); + ++i) { + if (!i->empty()) { alignment = Cell::decodeAlignment(*i, alignment); + } } } else { - std::string error = std::string("style must be either set or string, not ") + value->ob_type->tp_name; + std::string error = + std::string("style must be either set or string, not ") + value->ob_type->tp_name; PyErr_SetString(PyExc_TypeError, error.c_str()); return nullptr; } @@ -641,15 +710,18 @@ PyObject* SheetPy::setAlignment(PyObject *args) do { int oldAlignment = 0; - const Cell * cell = getSheetPtr()->getCell(*rangeIter); + const Cell* cell = getSheetPtr()->getCell(*rangeIter); - if (cell) + if (cell) { cell->getAlignment(oldAlignment); + } - if (alignment & Cell::ALIGNMENT_VERTICAL) + if (alignment & Cell::ALIGNMENT_VERTICAL) { oldAlignment &= ~Cell::ALIGNMENT_VERTICAL; - if (alignment & Cell::ALIGNMENT_HORIZONTAL) + } + if (alignment & Cell::ALIGNMENT_HORIZONTAL) { oldAlignment &= ~Cell::ALIGNMENT_HORIZONTAL; + } getSheetPtr()->setAlignment(*rangeIter, alignment | oldAlignment); } while (rangeIter.next()); @@ -661,40 +733,47 @@ PyObject* SheetPy::setAlignment(PyObject *args) Py_Return; } -PyObject* SheetPy::getAlignment(PyObject *args) +PyObject* SheetPy::getAlignment(PyObject* args) { - const char * strAddress; + const char* strAddress; CellAddress address; - if (!PyArg_ParseTuple(args, "s:getAlignment", &strAddress)) + if (!PyArg_ParseTuple(args, "s:getAlignment", &strAddress)) { return nullptr; + } try { address = stringToAddress(strAddress); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } int alignment; - const Cell * cell = getSheetPtr()->getCell(address); + const Cell* cell = getSheetPtr()->getCell(address); if (cell && cell->getAlignment(alignment)) { - PyObject * s = PySet_New(nullptr); + PyObject* s = PySet_New(nullptr); - if (alignment & Cell::ALIGNMENT_LEFT) + if (alignment & Cell::ALIGNMENT_LEFT) { PySet_Add(s, PyUnicode_FromString("left")); - if (alignment & Cell::ALIGNMENT_HCENTER) + } + if (alignment & Cell::ALIGNMENT_HCENTER) { PySet_Add(s, PyUnicode_FromString("center")); - if (alignment & Cell::ALIGNMENT_RIGHT) + } + if (alignment & Cell::ALIGNMENT_RIGHT) { PySet_Add(s, PyUnicode_FromString("right")); - if (alignment & Cell::ALIGNMENT_TOP) + } + if (alignment & Cell::ALIGNMENT_TOP) { PySet_Add(s, PyUnicode_FromString("top")); - if (alignment & Cell::ALIGNMENT_VCENTER) + } + if (alignment & Cell::ALIGNMENT_VCENTER) { PySet_Add(s, PyUnicode_FromString("vcenter")); - if (alignment & Cell::ALIGNMENT_BOTTOM) + } + if (alignment & Cell::ALIGNMENT_BOTTOM) { PySet_Add(s, PyUnicode_FromString("bottom")); + } return s; } @@ -704,20 +783,23 @@ PyObject* SheetPy::getAlignment(PyObject *args) } } -static float decodeFloat(const PyObject * obj) +static float decodeFloat(const PyObject* obj) { - if (PyFloat_Check(obj)) - return PyFloat_AsDouble((PyObject *)obj); - else if (PyLong_Check(obj)) - return PyLong_AsLong((PyObject *)obj); + if (PyFloat_Check(obj)) { + return PyFloat_AsDouble((PyObject*)obj); + } + else if (PyLong_Check(obj)) { + return PyLong_AsLong((PyObject*)obj); + } throw Base::TypeError("Float or integer expected"); } -static void decodeColor(PyObject * value, Color & c) +static void decodeColor(PyObject* value, Color& c) { if (PyTuple_Check(value)) { - if (PyTuple_Size(value) < 3 || PyTuple_Size(value) > 4) + if (PyTuple_Size(value) < 3 || PyTuple_Size(value) > 4) { throw Base::TypeError("Tuple must be either of 3 or 4 floats/ints."); + } c.r = decodeFloat(PyTuple_GetItem(value, 0)); c.g = decodeFloat(PyTuple_GetItem(value, 1)); @@ -726,22 +808,25 @@ static void decodeColor(PyObject * value, Color & c) c.a = decodeFloat(PyTuple_GetItem(value, 3)); return; } - else + else { c.a = 1.0; + } } - else + else { throw Base::TypeError("Tuple required."); + } } -PyObject* SheetPy::setForeground(PyObject *args) +PyObject* SheetPy::setForeground(PyObject* args) { try { - const char * range; - PyObject * value; + const char* range; + PyObject* value; Color c; - if (!PyArg_ParseTuple(args, "sO:setForeground", &range, &value)) + if (!PyArg_ParseTuple(args, "sO:setForeground", &range, &value)) { return nullptr; + } decodeColor(value, c); @@ -751,41 +836,42 @@ PyObject* SheetPy::setForeground(PyObject *args) } while (rangeIter.next()); Py_Return; } - catch (const Base::TypeError & e) { + catch (const Base::TypeError& e) { PyErr_SetString(PyExc_TypeError, e.what()); return nullptr; } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::getForeground(PyObject *args) +PyObject* SheetPy::getForeground(PyObject* args) { - const char * strAddress; + const char* strAddress; CellAddress address; - if (!PyArg_ParseTuple(args, "s:getForeground", &strAddress)) + if (!PyArg_ParseTuple(args, "s:getForeground", &strAddress)) { return nullptr; + } try { address = stringToAddress(strAddress); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } Color c; - const Cell * cell = getSheetPtr()->getCell(address); + const Cell* cell = getSheetPtr()->getCell(address); if (cell && cell->getForeground(c)) { - PyObject * t = PyTuple_New(4); + PyObject* t = PyTuple_New(4); - PyTuple_SetItem(t, 0, Py::new_reference_to( Py::Float(c.r) )); - PyTuple_SetItem(t, 1, Py::new_reference_to( Py::Float(c.g) )); - PyTuple_SetItem(t, 2, Py::new_reference_to( Py::Float(c.b) )); - PyTuple_SetItem(t, 3, Py::new_reference_to( Py::Float(c.a) )); + PyTuple_SetItem(t, 0, Py::new_reference_to(Py::Float(c.r))); + PyTuple_SetItem(t, 1, Py::new_reference_to(Py::Float(c.g))); + PyTuple_SetItem(t, 2, Py::new_reference_to(Py::Float(c.b))); + PyTuple_SetItem(t, 3, Py::new_reference_to(Py::Float(c.a))); return t; } @@ -795,15 +881,16 @@ PyObject* SheetPy::getForeground(PyObject *args) } } -PyObject* SheetPy::setBackground(PyObject *args) +PyObject* SheetPy::setBackground(PyObject* args) { try { - const char * strAddress; - PyObject * value; + const char* strAddress; + PyObject* value; Color c; - if (!PyArg_ParseTuple(args, "sO:setBackground", &strAddress, &value)) + if (!PyArg_ParseTuple(args, "sO:setBackground", &strAddress, &value)) { return nullptr; + } decodeColor(value, c); Range rangeIter(strAddress); @@ -813,41 +900,42 @@ PyObject* SheetPy::setBackground(PyObject *args) } while (rangeIter.next()); Py_Return; } - catch (const Base::TypeError & e) { + catch (const Base::TypeError& e) { PyErr_SetString(PyExc_TypeError, e.what()); return nullptr; } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::getBackground(PyObject *args) +PyObject* SheetPy::getBackground(PyObject* args) { - const char * strAddress; + const char* strAddress; CellAddress address; - if (!PyArg_ParseTuple(args, "s:setStyle", &strAddress)) + if (!PyArg_ParseTuple(args, "s:setStyle", &strAddress)) { return nullptr; + } try { address = stringToAddress(strAddress); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } Color c; - const Cell * cell = getSheetPtr()->getCell(address); + const Cell* cell = getSheetPtr()->getCell(address); if (cell && cell->getBackground(c)) { - PyObject * t = PyTuple_New(4); + PyObject* t = PyTuple_New(4); - PyTuple_SetItem(t, 0, Py::new_reference_to( Py::Float(c.r) )); - PyTuple_SetItem(t, 1, Py::new_reference_to( Py::Float(c.g) )); - PyTuple_SetItem(t, 2, Py::new_reference_to( Py::Float(c.b) )); - PyTuple_SetItem(t, 3, Py::new_reference_to( Py::Float(c.a) )); + PyTuple_SetItem(t, 0, Py::new_reference_to(Py::Float(c.r))); + PyTuple_SetItem(t, 1, Py::new_reference_to(Py::Float(c.g))); + PyTuple_SetItem(t, 2, Py::new_reference_to(Py::Float(c.b))); + PyTuple_SetItem(t, 3, Py::new_reference_to(Py::Float(c.a))); return t; } @@ -857,14 +945,15 @@ PyObject* SheetPy::getBackground(PyObject *args) } } -PyObject* SheetPy::setColumnWidth(PyObject *args) +PyObject* SheetPy::setColumnWidth(PyObject* args) { - const char * columnStr; + const char* columnStr; int width; CellAddress address; - if (!PyArg_ParseTuple(args, "si:setColumnWidth", &columnStr, &width)) + if (!PyArg_ParseTuple(args, "si:setColumnWidth", &columnStr, &width)) { return nullptr; + } try { std::string cellAddr = std::string(columnStr) + "1"; @@ -873,37 +962,39 @@ PyObject* SheetPy::setColumnWidth(PyObject *args) getSheetPtr()->setColumnWidth(address.col(), width); Py_Return; } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::getColumnWidth(PyObject *args) +PyObject* SheetPy::getColumnWidth(PyObject* args) { - const char * columnStr; + const char* columnStr; - if (!PyArg_ParseTuple(args, "s:getColumnWidth", &columnStr)) + if (!PyArg_ParseTuple(args, "s:getColumnWidth", &columnStr)) { return nullptr; + } try { CellAddress address(std::string(columnStr) + "1"); - return Py::new_reference_to( Py::Long( getSheetPtr()->getColumnWidth(address.col()) ) ); + return Py::new_reference_to(Py::Long(getSheetPtr()->getColumnWidth(address.col()))); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::setRowHeight(PyObject *args) +PyObject* SheetPy::setRowHeight(PyObject* args) { - const char * rowStr; + const char* rowStr; int height; - if (!PyArg_ParseTuple(args, "si:setRowHeight", &rowStr, &height)) + if (!PyArg_ParseTuple(args, "si:setRowHeight", &rowStr, &height)) { return nullptr; + } try { CellAddress address("A" + std::string(rowStr)); @@ -911,94 +1002,109 @@ PyObject* SheetPy::setRowHeight(PyObject *args) getSheetPtr()->setRowHeight(address.row(), height); Py_Return; } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject* SheetPy::getRowHeight(PyObject *args) +PyObject* SheetPy::getRowHeight(PyObject* args) { - const char * rowStr; + const char* rowStr; - if (!PyArg_ParseTuple(args, "s:getRowHeight", &rowStr)) + if (!PyArg_ParseTuple(args, "s:getRowHeight", &rowStr)) { return nullptr; + } try { CellAddress address("A" + std::string(rowStr)); - return Py::new_reference_to( Py::Long( getSheetPtr()->getRowHeight(address.row()) ) ); + return Py::new_reference_to(Py::Long(getSheetPtr()->getRowHeight(address.row()))); } - catch (const Base::Exception & e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr; } } -PyObject *SheetPy::touchCells(PyObject *args) { - const char *address; - const char *address2=nullptr; +PyObject* SheetPy::touchCells(PyObject* args) +{ + const char* address; + const char* address2 = nullptr; - if (!PyArg_ParseTuple(args, "s|s:touchCells", &address, &address2)) + if (!PyArg_ParseTuple(args, "s|s:touchCells", &address, &address2)) { return nullptr; + } - PY_TRY { + PY_TRY + { std::string a1 = getSheetPtr()->getAddressFromAlias(address); - if(a1.empty()) + if (a1.empty()) { a1 = address; + } std::string a2; - if(!address2) { + if (!address2) { a2 = a1; - } else { - a2 = getSheetPtr()->getAddressFromAlias(address2); - if(a2.empty()) - a2 = address2; } - getSheetPtr()->touchCells(Range(a1.c_str(),a2.c_str())); + else { + a2 = getSheetPtr()->getAddressFromAlias(address2); + if (a2.empty()) { + a2 = address2; + } + } + getSheetPtr()->touchCells(Range(a1.c_str(), a2.c_str())); Py_Return; - }PY_CATCH; + } + PY_CATCH; } -PyObject *SheetPy::recomputeCells(PyObject *args) { - const char *address; - const char *address2=nullptr; +PyObject* SheetPy::recomputeCells(PyObject* args) +{ + const char* address; + const char* address2 = nullptr; - if (!PyArg_ParseTuple(args, "s|s:touchCells", &address, &address2)) + if (!PyArg_ParseTuple(args, "s|s:touchCells", &address, &address2)) { return nullptr; + } - PY_TRY { + PY_TRY + { std::string a1 = getSheetPtr()->getAddressFromAlias(address); - if(a1.empty()) + if (a1.empty()) { a1 = address; + } std::string a2; - if(!address2) { + if (!address2) { a2 = a1; - } else { - a2 = getSheetPtr()->getAddressFromAlias(address2); - if(a2.empty()) - a2 = address2; } - getSheetPtr()->recomputeCells(Range(a1.c_str(),a2.c_str())); + else { + a2 = getSheetPtr()->getAddressFromAlias(address2); + if (a2.empty()) { + a2 = address2; + } + } + getSheetPtr()->recomputeCells(Range(a1.c_str(), a2.c_str())); Py_Return; - }PY_CATCH; + } + PY_CATCH; } -PyObject *SheetPy::getUsedCells(PyObject *args) +PyObject* SheetPy::getUsedCells(PyObject* args) { if (!PyArg_ParseTuple(args, "")) { return nullptr; } auto usedCells = getSheetPtr()->getCells()->getUsedCells(); Py::List pyCellList; - for (const auto &cell : usedCells) { + for (const auto& cell : usedCells) { pyCellList.append(Py::String(cell.toString())); } return Py::new_reference_to(pyCellList); } -PyObject *SheetPy::getUsedRange(PyObject *args) +PyObject* SheetPy::getUsedRange(PyObject* args) { if (!PyArg_ParseTuple(args, "")) { return nullptr; @@ -1010,20 +1116,20 @@ PyObject *SheetPy::getUsedRange(PyObject *args) return Py::new_reference_to(pyTuple); } -PyObject *SheetPy::getNonEmptyCells(PyObject *args) +PyObject* SheetPy::getNonEmptyCells(PyObject* args) { if (!PyArg_ParseTuple(args, "")) { return nullptr; } auto nonEmptyCells = getSheetPtr()->getCells()->getNonEmptyCells(); Py::List pyCellList; - for (const auto &cell : nonEmptyCells) { - pyCellList.append(Py::String(cell.toString())); + for (const auto& cell : nonEmptyCells) { + pyCellList.append(Py::String(cell.toString())); } return Py::new_reference_to(pyCellList); } -PyObject *SheetPy::getNonEmptyRange(PyObject *args) +PyObject* SheetPy::getNonEmptyRange(PyObject* args) { if (!PyArg_ParseTuple(args, "")) { return nullptr; @@ -1038,12 +1144,12 @@ PyObject *SheetPy::getNonEmptyRange(PyObject *args) // +++ custom attributes implementer ++++++++++++++++++++++++++++++++++++++++ -PyObject *SheetPy::getCustomAttributes(const char*) const +PyObject* SheetPy::getCustomAttributes(const char*) const { return nullptr; } -int SheetPy::setCustomAttributes(const char* , PyObject* ) +int SheetPy::setCustomAttributes(const char*, PyObject*) { return 0; } diff --git a/src/Mod/Spreadsheet/App/Utils.cpp b/src/Mod/Spreadsheet/App/Utils.cpp index 8e2f6783c9..e31d4a8962 100644 --- a/src/Mod/Spreadsheet/App/Utils.cpp +++ b/src/Mod/Spreadsheet/App/Utils.cpp @@ -23,42 +23,45 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif -#include "Utils.h" #include "Sheet.h" +#include "Utils.h" /** - * Encode \a col as a string. - * - * @param col Column given as a 0-based column position. - * - * @returns String with column position, with "A" being the first column, "B" being the second and so on. - * - */ + * Encode \a col as a string. + * + * @param col Column given as a 0-based column position. + * + * @returns String with column position, with "A" being the first column, "B" being the second and + * so on. + * + */ std::string Spreadsheet::columnName(int col) { std::stringstream s; - if (col < 26) + if (col < 26) { s << ((char)('A' + col)); - else - s << ((char)('A' + (col - 26) / 26 )) << ((char)('A' + (col - 26) % 26)); + } + else { + s << ((char)('A' + (col - 26) / 26)) << ((char)('A' + (col - 26) % 26)); + } return s.str(); } /** - * Encode \a row as a string. - * - * @param row Row given as a 0-based row position. - * - * @returns String with row position, with "1" being the first row. - * - */ + * Encode \a row as a string. + * + * @param row Row given as a 0-based row position. + * + * @returns String with row position, with "1" being the first row. + * + */ std::string Spreadsheet::rowName(int row) { @@ -70,7 +73,8 @@ std::string Spreadsheet::rowName(int row) } -void Spreadsheet::createRectangles(std::set > & cells, std::map, std::pair > & rectangles) +void Spreadsheet::createRectangles(std::set>& cells, + std::map, std::pair>& rectangles) { while (!cells.empty()) { int row, col; @@ -82,8 +86,9 @@ void Spreadsheet::createRectangles(std::set > & cells, std:: col = (*cells.begin()).second; // Expand right first - while (cells.find(std::make_pair(row, col + cols)) != cells.end()) + while (cells.find(std::make_pair(row, col + cols)) != cells.end()) { ++cols; + } // Expand left while (cells.find(std::make_pair(row, col + cols)) != cells.end()) { @@ -91,11 +96,12 @@ void Spreadsheet::createRectangles(std::set > & cells, std:: ++cols; } - // Try to expand cell up (the complete row above from [col,col + cols> needs to be in the cells variable) + // Try to expand cell up (the complete row above from [col,col + cols> needs to be in the + // cells variable) bool ok = true; while (ok) { for (int i = col; i < col + cols; ++i) { - if ( cells.find(std::make_pair(row - 1, i)) == cells.end()) { + if (cells.find(std::make_pair(row - 1, i)) == cells.end()) { ok = false; break; } @@ -105,17 +111,19 @@ void Spreadsheet::createRectangles(std::set > & cells, std:: row--; rows++; } - else + else { break; + } } - // Try to expand down (the complete row below from [col,col + cols> needs to be in the cells variable) + // Try to expand down (the complete row below from [col,col + cols> needs to be in the cells + // variable) ok = true; while (ok) { for (int i = col; i < col + cols; ++i) { - if ( cells.find(std::make_pair(orgRow + 1, i)) == cells.end()) { - ok = false; - break; + if (cells.find(std::make_pair(orgRow + 1, i)) == cells.end()) { + ok = false; + break; } } if (ok) { @@ -123,21 +131,24 @@ void Spreadsheet::createRectangles(std::set > & cells, std:: orgRow++; rows++; } - else + else { break; + } } // Remove entries from cell set for this rectangle - for (int r = row; r < row + rows; ++r) - for (int c = col; c < col + cols; ++c) + for (int r = row; r < row + rows; ++r) { + for (int c = col; c < col + cols; ++c) { cells.erase(std::make_pair(r, c)); + } + } // Insert into output variable rectangles[std::make_pair(row, col)] = std::make_pair(rows, cols); } } -std::string Spreadsheet::quote(const std::string &input) +std::string Spreadsheet::quote(const std::string& input) { std::stringstream output; @@ -147,29 +158,29 @@ std::string Spreadsheet::quote(const std::string &input) output << "<<"; while (cur != end) { switch (*cur) { - case '\t': - output << "\\t"; - break; - case '\n': - output << "\\n"; - break; - case '\r': - output << "\\r"; - break; - case '\\': - output << "\\\\"; - break; - case '\'': - output << "\\'"; - break; - case '"': - output << "\\\""; - break; - case '>': - output << "\\>"; - break; - default: - output << *cur; + case '\t': + output << "\\t"; + break; + case '\n': + output << "\\n"; + break; + case '\r': + output << "\\r"; + break; + case '\\': + output << "\\\\"; + break; + case '\'': + output << "\\'"; + break; + case '"': + output << "\\\""; + break; + case '>': + output << "\\>"; + break; + default: + output << *cur; } ++cur; } @@ -178,7 +189,7 @@ std::string Spreadsheet::quote(const std::string &input) return output.str(); } -std::string Spreadsheet::unquote(const std::string & input) +std::string Spreadsheet::unquote(const std::string& input) { assert(input.size() >= 4); @@ -192,32 +203,34 @@ std::string Spreadsheet::unquote(const std::string & input) while (cur != end) { if (escaped) { switch (*cur) { - case 't': - output += '\t'; - break; - case 'n': - output += '\n'; - break; - case 'r': - output += '\r'; - break; - case '\\': - output += '\\'; - break; - case '\'': - output += '\''; - break; - case '"': - output += '"'; - break; + case 't': + output += '\t'; + break; + case 'n': + output += '\n'; + break; + case 'r': + output += '\r'; + break; + case '\\': + output += '\\'; + break; + case '\'': + output += '\''; + break; + case '"': + output += '"'; + break; } escaped = false; } else { - if (*cur == '\\') + if (*cur == '\\') { escaped = true; - else + } + else { output += *cur; + } } ++cur; } diff --git a/src/Mod/Spreadsheet/App/Utils.h b/src/Mod/Spreadsheet/App/Utils.h index c75830270b..ae5bbfe1af 100644 --- a/src/Mod/Spreadsheet/App/Utils.h +++ b/src/Mod/Spreadsheet/App/Utils.h @@ -31,15 +31,18 @@ #include -namespace Spreadsheet { +namespace Spreadsheet +{ SpreadsheetExport std::string columnName(int col); SpreadsheetExport std::string rowName(int row); -SpreadsheetExport void createRectangles(std::set > & cells, std::map, std::pair > & rectangles); -SpreadsheetExport std::string quote(const std::string &input); -SpreadsheetExport std::string unquote(const std::string & input); +SpreadsheetExport void +createRectangles(std::set>& cells, + std::map, std::pair>& rectangles); +SpreadsheetExport std::string quote(const std::string& input); +SpreadsheetExport std::string unquote(const std::string& input); -} +} // namespace Spreadsheet -#endif // UTILS_H +#endif // UTILS_H diff --git a/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp b/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp index 2702032b9d..eefa60b724 100644 --- a/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp +++ b/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp @@ -30,18 +30,18 @@ #include #include #include +#include #include #include -#include #include #include "DlgSettingsImp.h" -#include "SpreadsheetView.h" #include "SheetTableViewAccessibleInterface.h" +#include "SpreadsheetView.h" #include "ViewProviderSpreadsheet.h" #include "Workbench.h" - // use a different name to CreateCommand() +// use a different name to CreateCommand() void CreateSpreadsheetCommands(); void loadSpreadsheetResource() @@ -52,49 +52,53 @@ void loadSpreadsheetResource() Gui::Translator::instance()->refresh(); } -namespace SpreadsheetGui { - class Module : public Py::ExtensionModule +namespace SpreadsheetGui +{ +class Module: public Py::ExtensionModule +{ +public: + Module() + : Py::ExtensionModule("SpreadsheetGui") { - public: - Module() : Py::ExtensionModule("SpreadsheetGui") - { - add_varargs_method("open",&Module::open - ); - initialize("This module is the SpreadsheetGui module."); // register with Python - } - - private: - Py::Object open(const Py::Tuple& args) - { - char* Name; - const char* DocName=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&DocName)) - throw Py::Exception(); - std::string EncodedName = std::string(Name); - PyMem_Free(Name); - - try { - Base::FileInfo file(EncodedName); - App::Document *pcDoc = App::GetApplication().newDocument(DocName ? DocName : QT_TR_NOOP("Unnamed")); - Spreadsheet::Sheet *pcSheet = static_cast(pcDoc->addObject("Spreadsheet::Sheet", file.fileNamePure().c_str())); - - pcSheet->importFromFile(EncodedName, '\t', '"', '\\'); - pcSheet->execute(); - } - catch (const Base::Exception& e) { - throw Py::RuntimeError(e.what()); - } - - return Py::None(); - } - }; - - PyObject* initModule() - { - return Base::Interpreter().addModule(new Module); + add_varargs_method("open", &Module::open); + initialize("This module is the SpreadsheetGui module."); // register with Python } -} // namespace SpreadsheetGui +private: + Py::Object open(const Py::Tuple& args) + { + char* Name; + const char* DocName = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &DocName)) { + throw Py::Exception(); + } + std::string EncodedName = std::string(Name); + PyMem_Free(Name); + + try { + Base::FileInfo file(EncodedName); + App::Document* pcDoc = + App::GetApplication().newDocument(DocName ? DocName : QT_TR_NOOP("Unnamed")); + Spreadsheet::Sheet* pcSheet = static_cast( + pcDoc->addObject("Spreadsheet::Sheet", file.fileNamePure().c_str())); + + pcSheet->importFromFile(EncodedName, '\t', '"', '\\'); + pcSheet->execute(); + } + catch (const Base::Exception& e) { + throw Py::RuntimeError(e.what()); + } + + return Py::None(); + } +}; + +PyObject* initModule() +{ + return Base::Interpreter().addModule(new Module); +} + +} // namespace SpreadsheetGui /* Python entry */ PyMOD_INIT_FUNC(SpreadsheetGui) @@ -116,7 +120,8 @@ PyMOD_INIT_FUNC(SpreadsheetGui) SpreadsheetGui::SheetViewPy::init_type(); // register preference page - new Gui::PrefPageProducer (QT_TRANSLATE_NOOP("QObject","Spreadsheet")); + new Gui::PrefPageProducer( + QT_TRANSLATE_NOOP("QObject", "Spreadsheet")); // add resources and reloads the translators loadSpreadsheetResource(); diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index f4719390c6..6bc7ab5adb 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -22,11 +22,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #if defined(FC_OS_WIN32) -# include +#include #endif #include @@ -53,15 +53,15 @@ using namespace App; DEF_STD_CMD_A(CmdSpreadsheetMergeCells) CmdSpreadsheetMergeCells::CmdSpreadsheetMergeCells() - : Command("Spreadsheet_MergeCells") + : Command("Spreadsheet_MergeCells") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Merge cells"); - sToolTipText = QT_TR_NOOP("Merge selected cells"); - sWhatsThis = "Spreadsheet_MergeCells"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetMergeCells"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Merge cells"); + sToolTipText = QT_TR_NOOP("Merge selected cells"); + sWhatsThis = "Spreadsheet_MergeCells"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetMergeCells"; } void CmdSpreadsheetMergeCells::activated(int iMsg) @@ -69,20 +69,25 @@ void CmdSpreadsheetMergeCells::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); // Execute mergeCells commands if (!ranges.empty()) { Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Merge cells")); std::vector::const_iterator i = ranges.begin(); - for (; i != ranges.end(); ++i) - if (i->size() > 1) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.mergeCells('%s')", sheet->getNameInDocument(), + for (; i != ranges.end(); ++i) { + if (i->size() > 1) { + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.mergeCells('%s')", + sheet->getNameInDocument(), i->rangeString().c_str()); + } + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -94,7 +99,8 @@ bool CmdSpreadsheetMergeCells::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { return (sheetView->selectedIndexesRaw().size() > 1); @@ -108,15 +114,15 @@ bool CmdSpreadsheetMergeCells::isActive() DEF_STD_CMD_A(CmdSpreadsheetSplitCell) CmdSpreadsheetSplitCell::CmdSpreadsheetSplitCell() - : Command("Spreadsheet_SplitCell") + : Command("Spreadsheet_SplitCell") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Split cell"); - sToolTipText = QT_TR_NOOP("Split previously merged cells"); - sWhatsThis = "Spreadsheet_SplitCell"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetSplitCell"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Split cell"); + sToolTipText = QT_TR_NOOP("Split previously merged cells"); + sWhatsThis = "Spreadsheet_SplitCell"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetSplitCell"; } void CmdSpreadsheetSplitCell::activated(int iMsg) @@ -124,16 +130,19 @@ void CmdSpreadsheetSplitCell::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); QModelIndex current = sheetView->currentIndex(); if (current.isValid()) { std::string address = CellAddress(current.row(), current.column()).toString(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Split cell")); - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.splitCell('%s')", sheet->getNameInDocument(), + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.splitCell('%s')", + sheet->getNameInDocument(), address.c_str()); Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -146,16 +155,16 @@ bool CmdSpreadsheetSplitCell::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { QModelIndex current = sheetView->currentIndex(); - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); - if (current.isValid()) - { - return (sheetView->selectedIndexesRaw().size() == 1 && - sheet->isMergedCell(CellAddress(current.row(), current.column()))); + if (current.isValid()) { + return (sheetView->selectedIndexesRaw().size() == 1 + && sheet->isMergedCell(CellAddress(current.row(), current.column()))); } } } @@ -167,15 +176,15 @@ bool CmdSpreadsheetSplitCell::isActive() DEF_STD_CMD_A(CmdSpreadsheetImport) CmdSpreadsheetImport::CmdSpreadsheetImport() - : Command("Spreadsheet_Import") + : Command("Spreadsheet_Import") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Import spreadsheet"); - sToolTipText = QT_TR_NOOP("Import CSV file into spreadsheet"); - sWhatsThis = "Spreadsheet_Import"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetImport"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Import spreadsheet"); + sToolTipText = QT_TR_NOOP("Import CSV file into spreadsheet"); + sWhatsThis = "Spreadsheet_Import"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetImport"; } void CmdSpreadsheetImport::activated(int iMsg) @@ -190,16 +199,19 @@ void CmdSpreadsheetImport::activated(int iMsg) &selectedFilter); if (!fileName.isEmpty()) { std::string FeatName = getUniqueObjectName("Spreadsheet"); - Sheet * sheet = freecad_dynamic_cast(App::GetApplication().getActiveDocument()->addObject("Spreadsheet::Sheet", FeatName.c_str())); - if (sheet){ + Sheet* sheet = freecad_dynamic_cast( + App::GetApplication().getActiveDocument()->addObject("Spreadsheet::Sheet", + FeatName.c_str())); + if (sheet) { char delim, quote, escape; std::string errMsg = "Import"; bool isValid = sheet->getCharsFromPrefs(delim, quote, escape, errMsg); - if (isValid){ + if (isValid) { sheet->importFromFile(fileName.toStdString(), delim, quote, escape); sheet->execute(); - } else { + } + else { Base::Console().Error(errMsg.c_str()); return; } @@ -217,15 +229,15 @@ bool CmdSpreadsheetImport::isActive() DEF_STD_CMD_A(CmdSpreadsheetExport) CmdSpreadsheetExport::CmdSpreadsheetExport() - : Command("Spreadsheet_Export") + : Command("Spreadsheet_Export") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Export spreadsheet"); - sToolTipText = QT_TR_NOOP("Export spreadsheet to CSV file"); - sWhatsThis = "Spreadsheet_Export"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetExport"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Export spreadsheet"); + sToolTipText = QT_TR_NOOP("Export spreadsheet to CSV file"); + sWhatsThis = "Spreadsheet_Export"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetExport"; } void CmdSpreadsheetExport::activated(int iMsg) @@ -233,10 +245,11 @@ void CmdSpreadsheetExport::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); QString selectedFilter; QString formatList = QObject::tr("All (*)"); QString fileName = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), @@ -244,15 +257,16 @@ void CmdSpreadsheetExport::activated(int iMsg) QString(), formatList, &selectedFilter); - if (!fileName.isEmpty()){ - if (sheet){ + if (!fileName.isEmpty()) { + if (sheet) { char delim, quote, escape; std::string errMsg = "Export"; bool isValid = sheet->getCharsFromPrefs(delim, quote, escape, errMsg); - if (isValid){ + if (isValid) { sheet->exportToFile(fileName.toStdString(), delim, quote, escape); - } else { + } + else { Base::Console().Error(errMsg.c_str()); return; } @@ -266,9 +280,9 @@ bool CmdSpreadsheetExport::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -278,15 +292,15 @@ bool CmdSpreadsheetExport::isActive() DEF_STD_CMD_A(CmdSpreadsheetAlignLeft) CmdSpreadsheetAlignLeft::CmdSpreadsheetAlignLeft() - : Command("Spreadsheet_AlignLeft") + : Command("Spreadsheet_AlignLeft") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align left"); - sToolTipText = QT_TR_NOOP("Left-align contents of selected cells"); - sWhatsThis = "Spreadsheet_AlignLeft"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetAlignLeft"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Align left"); + sToolTipText = QT_TR_NOOP("Left-align contents of selected cells"); + sWhatsThis = "Spreadsheet_AlignLeft"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetAlignLeft"; } void CmdSpreadsheetAlignLeft::activated(int iMsg) @@ -294,19 +308,24 @@ void CmdSpreadsheetAlignLeft::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); if (!ranges.empty()) { std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Left-align cell")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'left', 'keep')", sheet->getNameInDocument(), - i->rangeString().c_str()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setAlignment('%s', 'left', 'keep')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -318,9 +337,9 @@ bool CmdSpreadsheetAlignLeft::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -330,15 +349,15 @@ bool CmdSpreadsheetAlignLeft::isActive() DEF_STD_CMD_A(CmdSpreadsheetAlignCenter) CmdSpreadsheetAlignCenter::CmdSpreadsheetAlignCenter() - : Command("Spreadsheet_AlignCenter") + : Command("Spreadsheet_AlignCenter") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align center"); - sToolTipText = QT_TR_NOOP("Center-align contents of selected cells"); - sWhatsThis = "Spreadsheet_AlignCenter"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetAlignCenter"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Align center"); + sToolTipText = QT_TR_NOOP("Center-align contents of selected cells"); + sWhatsThis = "Spreadsheet_AlignCenter"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetAlignCenter"; } void CmdSpreadsheetAlignCenter::activated(int iMsg) @@ -346,19 +365,24 @@ void CmdSpreadsheetAlignCenter::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); if (!ranges.empty()) { std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Center cell")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'center', 'keep')", sheet->getNameInDocument(), - i->rangeString().c_str()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setAlignment('%s', 'center', 'keep')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -370,9 +394,9 @@ bool CmdSpreadsheetAlignCenter::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -382,15 +406,15 @@ bool CmdSpreadsheetAlignCenter::isActive() DEF_STD_CMD_A(CmdSpreadsheetAlignRight) CmdSpreadsheetAlignRight::CmdSpreadsheetAlignRight() - : Command("Spreadsheet_AlignRight") + : Command("Spreadsheet_AlignRight") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align right"); - sToolTipText = QT_TR_NOOP("Right-align contents of selected cells"); - sWhatsThis = "Spreadsheet_AlignRight"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetAlignRight"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Align right"); + sToolTipText = QT_TR_NOOP("Right-align contents of selected cells"); + sWhatsThis = "Spreadsheet_AlignRight"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetAlignRight"; } void CmdSpreadsheetAlignRight::activated(int iMsg) @@ -398,19 +422,24 @@ void CmdSpreadsheetAlignRight::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); if (!ranges.empty()) { std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Right-align cell")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'right', 'keep')", sheet->getNameInDocument(), - i->rangeString().c_str()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setAlignment('%s', 'right', 'keep')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -422,9 +451,9 @@ bool CmdSpreadsheetAlignRight::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -434,15 +463,15 @@ bool CmdSpreadsheetAlignRight::isActive() DEF_STD_CMD_A(CmdSpreadsheetAlignTop) CmdSpreadsheetAlignTop::CmdSpreadsheetAlignTop() - : Command("Spreadsheet_AlignTop") + : Command("Spreadsheet_AlignTop") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align top"); - sToolTipText = QT_TR_NOOP("Top-align contents of selected cells"); - sWhatsThis = "Spreadsheet_AlignTop"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetAlignTop"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Align top"); + sToolTipText = QT_TR_NOOP("Top-align contents of selected cells"); + sWhatsThis = "Spreadsheet_AlignTop"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetAlignTop"; } void CmdSpreadsheetAlignTop::activated(int iMsg) @@ -450,19 +479,24 @@ void CmdSpreadsheetAlignTop::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); if (!ranges.empty()) { std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Top-align cell")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'top', 'keep')", sheet->getNameInDocument(), - i->rangeString().c_str()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setAlignment('%s', 'top', 'keep')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -474,9 +508,9 @@ bool CmdSpreadsheetAlignTop::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -486,15 +520,15 @@ bool CmdSpreadsheetAlignTop::isActive() DEF_STD_CMD_A(CmdSpreadsheetAlignBottom) CmdSpreadsheetAlignBottom::CmdSpreadsheetAlignBottom() - : Command("Spreadsheet_AlignBottom") + : Command("Spreadsheet_AlignBottom") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Align bottom"); - sToolTipText = QT_TR_NOOP("Bottom-align contents of selected cells"); - sWhatsThis = "Spreadsheet_AlignBottom"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetAlignBottom"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Align bottom"); + sToolTipText = QT_TR_NOOP("Bottom-align contents of selected cells"); + sWhatsThis = "Spreadsheet_AlignBottom"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetAlignBottom"; } void CmdSpreadsheetAlignBottom::activated(int iMsg) @@ -502,19 +536,24 @@ void CmdSpreadsheetAlignBottom::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); if (!ranges.empty()) { std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Bottom-align cell")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'bottom', 'keep')", sheet->getNameInDocument(), - i->rangeString().c_str()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setAlignment('%s', 'bottom', 'keep')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -526,9 +565,9 @@ bool CmdSpreadsheetAlignBottom::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -538,15 +577,15 @@ bool CmdSpreadsheetAlignBottom::isActive() DEF_STD_CMD_A(CmdSpreadsheetAlignVCenter) CmdSpreadsheetAlignVCenter::CmdSpreadsheetAlignVCenter() - : Command("Spreadsheet_AlignVCenter") + : Command("Spreadsheet_AlignVCenter") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Vertically center-align"); - sToolTipText = QT_TR_NOOP("Vertically center-align contents of selected cells"); - sWhatsThis = "Spreadsheet_AlignVCenter"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetAlignVCenter"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Vertically center-align"); + sToolTipText = QT_TR_NOOP("Vertically center-align contents of selected cells"); + sWhatsThis = "Spreadsheet_AlignVCenter"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetAlignVCenter"; } void CmdSpreadsheetAlignVCenter::activated(int iMsg) @@ -554,19 +593,24 @@ void CmdSpreadsheetAlignVCenter::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); if (!ranges.empty()) { std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Vertically center cells")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setAlignment('%s', 'vcenter', 'keep')", sheet->getNameInDocument(), - i->rangeString().c_str()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setAlignment('%s', 'vcenter', 'keep')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -578,9 +622,9 @@ bool CmdSpreadsheetAlignVCenter::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -590,15 +634,15 @@ bool CmdSpreadsheetAlignVCenter::isActive() DEF_STD_CMD_A(CmdSpreadsheetStyleBold) CmdSpreadsheetStyleBold::CmdSpreadsheetStyleBold() - : Command("Spreadsheet_StyleBold") + : Command("Spreadsheet_StyleBold") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Bold text"); - sToolTipText = QT_TR_NOOP("Set text in selected cells bold"); - sWhatsThis = "Spreadsheet_StyleBold"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetStyleBold"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Bold text"); + sToolTipText = QT_TR_NOOP("Set text in selected cells bold"); + sWhatsThis = "Spreadsheet_StyleBold"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetStyleBold"; } void CmdSpreadsheetStyleBold::activated(int iMsg) @@ -606,17 +650,18 @@ void CmdSpreadsheetStyleBold::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); QModelIndexList selection = sheetView->selectedIndexes(); if (!selection.empty()) { bool allBold = true; for (const auto& it : selection) { - const Cell * cell = sheet->getCell(CellAddress(it.row(), it.column())); + const Cell* cell = sheet->getCell(CellAddress(it.row(), it.column())); if (cell) { std::set style; @@ -634,12 +679,20 @@ void CmdSpreadsheetStyleBold::activated(int iMsg) Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set bold text")); for (; i != ranges.end(); ++i) { - if (!allBold) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'bold', 'add')", sheet->getNameInDocument(), - i->rangeString().c_str()); - else - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'bold', 'remove')", sheet->getNameInDocument(), - i->rangeString().c_str()); + if (!allBold) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setStyle('%s', 'bold', 'add')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } + else { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setStyle('%s', 'bold', 'remove')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -652,9 +705,9 @@ bool CmdSpreadsheetStyleBold::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -664,15 +717,15 @@ bool CmdSpreadsheetStyleBold::isActive() DEF_STD_CMD_A(CmdSpreadsheetStyleItalic) CmdSpreadsheetStyleItalic::CmdSpreadsheetStyleItalic() - : Command("Spreadsheet_StyleItalic") + : Command("Spreadsheet_StyleItalic") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Italic text"); - sToolTipText = QT_TR_NOOP("Set text in selected cells italic"); - sWhatsThis = "Spreadsheet_StyleItalic"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetStyleItalic"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Italic text"); + sToolTipText = QT_TR_NOOP("Set text in selected cells italic"); + sWhatsThis = "Spreadsheet_StyleItalic"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetStyleItalic"; } void CmdSpreadsheetStyleItalic::activated(int iMsg) @@ -680,17 +733,18 @@ void CmdSpreadsheetStyleItalic::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); QModelIndexList selection = sheetView->selectedIndexes(); if (!selection.empty()) { bool allItalic = true; for (const auto& it : selection) { - const Cell * cell = sheet->getCell(CellAddress(it.row(), it.column())); + const Cell* cell = sheet->getCell(CellAddress(it.row(), it.column())); if (cell) { std::set style; @@ -708,12 +762,20 @@ void CmdSpreadsheetStyleItalic::activated(int iMsg) Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set italic text")); for (; i != ranges.end(); ++i) { - if (!allItalic) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'italic', 'add')", sheet->getNameInDocument(), - i->rangeString().c_str()); - else - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'italic', 'remove')", sheet->getNameInDocument(), - i->rangeString().c_str()); + if (!allItalic) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setStyle('%s', 'italic', 'add')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } + else { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setStyle('%s', 'italic', 'remove')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -726,9 +788,9 @@ bool CmdSpreadsheetStyleItalic::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; - + } } return false; } @@ -738,15 +800,15 @@ bool CmdSpreadsheetStyleItalic::isActive() DEF_STD_CMD_A(CmdSpreadsheetStyleUnderline) CmdSpreadsheetStyleUnderline::CmdSpreadsheetStyleUnderline() - : Command("Spreadsheet_StyleUnderline") + : Command("Spreadsheet_StyleUnderline") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Underline text"); - sToolTipText = QT_TR_NOOP("Underline text in selected cells"); - sWhatsThis = "Spreadsheet_StyleUnderline"; - sStatusTip = sToolTipText; - sPixmap = "SpreadsheetStyleUnderline"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Underline text"); + sToolTipText = QT_TR_NOOP("Underline text in selected cells"); + sWhatsThis = "Spreadsheet_StyleUnderline"; + sStatusTip = sToolTipText; + sPixmap = "SpreadsheetStyleUnderline"; } void CmdSpreadsheetStyleUnderline::activated(int iMsg) @@ -754,17 +816,18 @@ void CmdSpreadsheetStyleUnderline::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); QModelIndexList selection = sheetView->selectedIndexes(); if (!selection.empty()) { bool allUnderline = true; for (const auto& it : selection) { - const Cell * cell = sheet->getCell(CellAddress(it.row(), it.column())); + const Cell* cell = sheet->getCell(CellAddress(it.row(), it.column())); if (cell) { std::set style; @@ -782,12 +845,20 @@ void CmdSpreadsheetStyleUnderline::activated(int iMsg) Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set underline text")); for (; i != ranges.end(); ++i) { - if (!allUnderline) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'underline', 'add')", sheet->getNameInDocument(), - i->rangeString().c_str()); - else - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setStyle('%s', 'underline', 'remove')", sheet->getNameInDocument(), - i->rangeString().c_str()); + if (!allUnderline) { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setStyle('%s', 'underline', 'add')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } + else { + Gui::Command::doCommand( + Gui::Command::Doc, + "App.ActiveDocument.%s.setStyle('%s', 'underline', 'remove')", + sheet->getNameInDocument(), + i->rangeString().c_str()); + } } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -800,8 +871,9 @@ bool CmdSpreadsheetStyleUnderline::isActive() { if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - if (activeWindow && freecad_dynamic_cast(activeWindow)) + if (activeWindow && freecad_dynamic_cast(activeWindow)) { return true; + } } return false; } @@ -811,16 +883,16 @@ bool CmdSpreadsheetStyleUnderline::isActive() DEF_STD_CMD_A(CmdSpreadsheetSetAlias) CmdSpreadsheetSetAlias::CmdSpreadsheetSetAlias() - : Command("Spreadsheet_SetAlias") + : Command("Spreadsheet_SetAlias") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Set alias"); - sToolTipText = QT_TR_NOOP("Set alias for selected cell"); - sWhatsThis = "Spreadsheet_SetAlias"; - sStatusTip = sToolTipText; - sAccel = "Ctrl+Shift+A"; - sPixmap = "SpreadsheetAlias"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Set alias"); + sToolTipText = QT_TR_NOOP("Set alias for selected cell"); + sWhatsThis = "Spreadsheet_SetAlias"; + sStatusTip = sToolTipText; + sAccel = "Ctrl+Shift+A"; + sPixmap = "SpreadsheetAlias"; } void CmdSpreadsheetSetAlias::activated(int iMsg) @@ -828,24 +900,29 @@ void CmdSpreadsheetSetAlias::activated(int iMsg) Q_UNUSED(iMsg); if (getActiveGuiDocument()) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); QModelIndexList selection = sheetView->selectedIndexes(); if (selection.size() == 1) { std::vector range; - range.emplace_back(selection[0].row(), selection[0].column(), - selection[0].row(), selection[0].column()); + range.emplace_back(selection[0].row(), + selection[0].column(), + selection[0].row(), + selection[0].column()); - std::unique_ptr dialog(new PropertiesDialog(sheet, range, sheetView)); + std::unique_ptr dialog( + new PropertiesDialog(sheet, range, sheetView)); dialog->selectAlias(); - if (dialog->exec() == QDialog::Accepted) + if (dialog->exec() == QDialog::Accepted) { dialog->apply(); + } } } } @@ -857,13 +934,15 @@ bool CmdSpreadsheetSetAlias::isActive() Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); if (activeWindow) { - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { QModelIndexList selection = sheetView->selectedIndexes(); - if (selection.size() == 1) + if (selection.size() == 1) { return true; + } } } } @@ -875,15 +954,15 @@ bool CmdSpreadsheetSetAlias::isActive() DEF_STD_CMD_A(CmdCreateSpreadsheet) CmdCreateSpreadsheet::CmdCreateSpreadsheet() - :Command("Spreadsheet_CreateSheet") + : Command("Spreadsheet_CreateSheet") { - sAppModule = "Spreadsheet"; - sGroup = QT_TR_NOOP("Spreadsheet"); - sMenuText = QT_TR_NOOP("Create spreadsheet"); - sToolTipText = QT_TR_NOOP("Create a new spreadsheet"); - sWhatsThis = "Spreadsheet_CreateSheet"; - sStatusTip = sToolTipText; - sPixmap = "Spreadsheet"; + sAppModule = "Spreadsheet"; + sGroup = QT_TR_NOOP("Spreadsheet"); + sMenuText = QT_TR_NOOP("Create spreadsheet"); + sToolTipText = QT_TR_NOOP("Create a new spreadsheet"); + sWhatsThis = "Spreadsheet_CreateSheet"; + sStatusTip = sToolTipText; + sPixmap = "Spreadsheet"; } void CmdCreateSpreadsheet::activated(int iMsg) @@ -892,9 +971,9 @@ void CmdCreateSpreadsheet::activated(int iMsg) std::string FeatName = getUniqueObjectName("Spreadsheet"); openCommand(QT_TRANSLATE_NOOP("Command", "Create Spreadsheet")); - doCommand(Doc,"App.activeDocument().addObject('Spreadsheet::Sheet','%s\')",FeatName.c_str()); - doCommand(Gui,"Gui.Selection.clearSelection()\n"); - doCommand(Gui,"Gui.Selection.addSelection(App.activeDocument().Name,'%s\')",FeatName.c_str()); + doCommand(Doc, "App.activeDocument().addObject('Spreadsheet::Sheet','%s\')", FeatName.c_str()); + doCommand(Gui, "Gui.Selection.clearSelection()\n"); + doCommand(Gui, "Gui.Selection.addSelection(App.activeDocument().Name,'%s\')", FeatName.c_str()); commitCommand(); } @@ -907,7 +986,7 @@ bool CmdCreateSpreadsheet::isActive() void CreateSpreadsheetCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdCreateSpreadsheet()); diff --git a/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp b/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp index d1a3cf9531..02013e2e65 100644 --- a/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp +++ b/src/Mod/Spreadsheet/Gui/DlgBindSheet.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" -#include #include +#include #include #include @@ -39,42 +39,49 @@ using namespace App; using namespace Spreadsheet; using namespace SpreadsheetGui; -DlgBindSheet::DlgBindSheet(Sheet *sheet, const std::vector &ranges, QWidget *parent) - : QDialog(parent), sheet(sheet), range(ranges.front()), ui(new Ui::DlgBindSheet) +DlgBindSheet::DlgBindSheet(Sheet* sheet, const std::vector& ranges, QWidget* parent) + : QDialog(parent) + , sheet(sheet) + , range(ranges.front()) + , ui(new Ui::DlgBindSheet) { ui->setupUi(this); // remove the automatic help button in dialog title since we don't use it setWindowFlag(Qt::WindowContextHelpButtonHint, false); - std::string toStart,toEnd; + std::string toStart, toEnd; ExpressionPtr pStart, pEnd; App::ObjectIdentifier bindingTarget; - PropertySheet::BindingType type = sheet->getCellBinding(range,&pStart,&pEnd,&bindingTarget); - if(type == PropertySheet::BindingNone) { - if(ranges.size()>1) { + PropertySheet::BindingType type = sheet->getCellBinding(range, &pStart, &pEnd, &bindingTarget); + if (type == PropertySheet::BindingNone) { + if (ranges.size() > 1) { toStart = ranges.back().from().toString(); toEnd = ranges.back().to().toString(); - } else { - CellAddress target(range.to().row()?0:range.to().row()+1,range.from().col()); + } + else { + CellAddress target(range.to().row() ? 0 : range.to().row() + 1, range.from().col()); toStart = target.toString(); target.setRow(target.row() + range.to().row() - range.from().row()); target.setCol(target.col() + range.to().col() - range.from().col()); toEnd = target.toString(); } ui->btnDiscard->setDisabled(true); - } else { + } + else { ui->lineEditFromStart->setReadOnly(true); ui->lineEditFromEnd->setReadOnly(true); - ui->checkBoxHREF->setChecked(type==PropertySheet::BindingHiddenRef); + ui->checkBoxHREF->setChecked(type == PropertySheet::BindingHiddenRef); assert(pStart && pEnd); - if(!pStart->hasComponent() && pStart->isDerivedFrom(StringExpression::getClassTypeId())) + if (!pStart->hasComponent() && pStart->isDerivedFrom(StringExpression::getClassTypeId())) { toStart = static_cast(pStart.get())->getText(); + } else { toStart = "="; toStart += pStart->toString(); } - if(!pEnd->hasComponent() && pEnd->isDerivedFrom(StringExpression::getClassTypeId())) + if (!pEnd->hasComponent() && pEnd->isDerivedFrom(StringExpression::getClassTypeId())) { toEnd = static_cast(pEnd.get())->getText(); + } else { toEnd = "="; toEnd += pEnd->toString(); @@ -84,49 +91,59 @@ DlgBindSheet::DlgBindSheet(Sheet *sheet, const std::vector &ranges, QWidg ui->lineEditFromStart->setText(QString::fromLatin1(range.from().toString().c_str())); ui->lineEditFromEnd->setText(QString::fromLatin1(range.to().toString().c_str())); - ui->lineEditToStart->setDocumentObject(sheet,false); + ui->lineEditToStart->setDocumentObject(sheet, false); ui->lineEditToStart->setPrefix('='); - ui->lineEditToEnd->setDocumentObject(sheet,false); + ui->lineEditToEnd->setDocumentObject(sheet, false); ui->lineEditToEnd->setPrefix('='); ui->lineEditToStart->setText(QLatin1String(toStart.c_str())); ui->lineEditToEnd->setText(QLatin1String(toEnd.c_str())); - ui->comboBox->addItem(QString::fromLatin1(". (%1)").arg( - QString::fromUtf8(sheet->Label.getValue())), QByteArray("")); + ui->comboBox->addItem( + QString::fromLatin1(". (%1)").arg(QString::fromUtf8(sheet->Label.getValue())), + QByteArray("")); - App::DocumentObject *target = bindingTarget.getDocumentObject(); - for(auto obj : sheet->getDocument()->getObjectsOfType()) { - if(obj == sheet) + App::DocumentObject* target = bindingTarget.getDocumentObject(); + for (auto obj : sheet->getDocument()->getObjectsOfType()) { + if (obj == sheet) { continue; + } QString label; - if(obj->Label.getStrValue() != obj->getNameInDocument()) - label = QString::fromLatin1("%1 (%2)").arg( - QString::fromLatin1(obj->getNameInDocument()), - QString::fromUtf8(obj->Label.getValue())); - else + if (obj->Label.getStrValue() != obj->getNameInDocument()) { + label = + QString::fromLatin1("%1 (%2)").arg(QString::fromLatin1(obj->getNameInDocument()), + QString::fromUtf8(obj->Label.getValue())); + } + else { label = QLatin1String(obj->getNameInDocument()); + } ui->comboBox->addItem(label, QByteArray(obj->getNameInDocument())); - if (obj == target) - ui->comboBox->setCurrentIndex(ui->comboBox->count()-1); + if (obj == target) { + ui->comboBox->setCurrentIndex(ui->comboBox->count() - 1); + } } - for(auto doc : GetApplication().getDocuments()) { - if(doc == sheet->getDocument()) + for (auto doc : GetApplication().getDocuments()) { + if (doc == sheet->getDocument()) { continue; - for(auto obj : sheet->getDocument()->getObjectsOfType()) { - if(obj == sheet) + } + for (auto obj : sheet->getDocument()->getObjectsOfType()) { + if (obj == sheet) { continue; + } std::string fullname = obj->getFullName(); QString label; - if(obj->Label.getStrValue() != obj->getNameInDocument()) - label = QString::fromLatin1("%1 (%2)").arg( - QString::fromLatin1(fullname.c_str()), - QString::fromUtf8(obj->Label.getValue())); - else + if (obj->Label.getStrValue() != obj->getNameInDocument()) { + label = + QString::fromLatin1("%1 (%2)").arg(QString::fromLatin1(fullname.c_str()), + QString::fromUtf8(obj->Label.getValue())); + } + else { label = QLatin1String(fullname.c_str()); + } ui->comboBox->addItem(label, QByteArray(fullname.c_str())); - if (obj == target) - ui->comboBox->setCurrentIndex(ui->comboBox->count()-1); + if (obj == target) { + ui->comboBox->setCurrentIndex(ui->comboBox->count() - 1); + } } } @@ -142,23 +159,29 @@ void DlgBindSheet::accept() { bool commandActive = false; try { - const char *ref = ui->comboBox->itemData(ui->comboBox->currentIndex()).toByteArray().constData(); // clazy:exclude=returning-data-from-temporary + const char* ref = ui->comboBox->itemData(ui->comboBox->currentIndex()) + .toByteArray() + .constData(); // clazy:exclude=returning-data-from-temporary auto obj = sheet; - if(ref[0]) { - const char *sep = strchr(ref,'#'); - if(sep) { - std::string docname(ref,sep); + if (ref[0]) { + const char* sep = strchr(ref, '#'); + if (sep) { + std::string docname(ref, sep); auto doc = GetApplication().getDocument(docname.c_str()); - if(!doc) + if (!doc) { FC_THROWM(Base::RuntimeError, "Cannot find document " << docname); - obj = Base::freecad_dynamic_cast(doc->getObject(sep+1)); - } else + } + obj = Base::freecad_dynamic_cast(doc->getObject(sep + 1)); + } + else { obj = Base::freecad_dynamic_cast(sheet->getDocument()->getObject(ref)); - if(!obj) + } + if (!obj) { FC_THROWM(Base::RuntimeError, "Cannot find Spreadsheet '" << ref << "'"); + } } - auto checkAddress = [](std::string &addr, CellAddress &cell, bool quote) { + auto checkAddress = [](std::string& addr, CellAddress& cell, bool quote) { std::string copy(addr); boost::to_upper(copy); cell = App::stringToAddress(copy.c_str(), true); @@ -167,10 +190,12 @@ void DlgBindSheet::accept() msg += addr; throw Base::ValueError(msg.c_str()); } - if (quote) + if (quote) { addr = std::string("<<") + copy + ">>"; - else + } + else { addr = copy; + } }; CellAddress fromCellStart, fromCellEnd, toCellStart, toCellEnd; @@ -180,25 +205,32 @@ void DlgBindSheet::accept() checkAddress(fromEnd, fromCellEnd, false); std::string toStart(ui->lineEditToStart->text().trimmed().toLatin1().constData()); - if(boost::starts_with(toStart,"=")) + if (boost::starts_with(toStart, "=")) { toStart.erase(toStart.begin()); - else + } + else { checkAddress(toStart, toCellStart, true); + } std::string toEnd(ui->lineEditToEnd->text().trimmed().toLatin1().constData()); - if(boost::starts_with(toEnd,"=")) + if (boost::starts_with(toEnd, "=")) { toEnd.erase(toEnd.begin()); + } else { checkAddress(toEnd, toCellEnd, true); if (toCellStart.isValid()) { App::Range fromRange(fromCellStart, fromCellEnd, true); App::Range toRange(toCellStart, toCellEnd, true); if (fromRange.size() != toRange.size()) { - auto res = QMessageBox::warning(this, tr("Bind cells"), - tr("Source and target cell count mismatch. Partial binding may still work.\n\n" - "Do you want to continue?"), QMessageBox::Yes|QMessageBox::No); - if (res == QMessageBox::No) + auto res = QMessageBox::warning(this, + tr("Bind cells"), + tr("Source and target cell count mismatch. " + "Partial binding may still work.\n\n" + "Do you want to continue?"), + QMessageBox::Yes | QMessageBox::No); + if (res == QMessageBox::No) { return; + } } } } @@ -206,39 +238,67 @@ void DlgBindSheet::accept() Gui::Command::openCommand("Bind cells"); commandActive = true; - if(ui->checkBoxHREF->isChecked()) { - Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.Bind.%s.%s', None)", fromStart, fromEnd); + if (ui->checkBoxHREF->isChecked()) { Gui::cmdAppObjectArgs(sheet, - "setExpression('.cells.BindHiddenRef.%s.%s', 'hiddenref(tuple(%s.cells, %s, %s))')", - fromStart, fromEnd, ref, toStart, toEnd); - } else { - Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.BindHiddenRef.%s.%s', None)", fromStart, fromEnd); + "setExpression('.cells.Bind.%s.%s', None)", + fromStart, + fromEnd); + Gui::cmdAppObjectArgs( + sheet, + "setExpression('.cells.BindHiddenRef.%s.%s', 'hiddenref(tuple(%s.cells, %s, %s))')", + fromStart, + fromEnd, + ref, + toStart, + toEnd); + } + else { Gui::cmdAppObjectArgs(sheet, - "setExpression('.cells.Bind.%s.%s', 'tuple(%s.cells, %s, %s)')", - fromStart, fromEnd, ref, toStart, toEnd); + "setExpression('.cells.BindHiddenRef.%s.%s', None)", + fromStart, + fromEnd); + Gui::cmdAppObjectArgs(sheet, + "setExpression('.cells.Bind.%s.%s', 'tuple(%s.cells, %s, %s)')", + fromStart, + fromEnd, + ref, + toStart, + toEnd); } Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); Gui::Command::commitCommand(); QDialog::accept(); - } catch(Base::Exception &e) { + } + catch (Base::Exception& e) { e.ReportException(); - QMessageBox::critical(this, tr("Bind Spreadsheet Cells"), tr("Error: \n") + QString::fromUtf8(e.what())); - if(commandActive) + QMessageBox::critical(this, + tr("Bind Spreadsheet Cells"), + tr("Error:\n") + QString::fromUtf8(e.what())); + if (commandActive) { Gui::Command::abortCommand(); + } } } -void DlgBindSheet::onDiscard() { +void DlgBindSheet::onDiscard() +{ try { std::string fromStart(ui->lineEditFromStart->text().trimmed().toLatin1().constData()); std::string fromEnd(ui->lineEditFromEnd->text().trimmed().toLatin1().constData()); Gui::Command::openCommand("Unbind cells"); - Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.Bind.%s.%s', None)", fromStart, fromEnd); - Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.BindHiddenRef.%s.%s', None)", fromStart, fromEnd); + Gui::cmdAppObjectArgs(sheet, + "setExpression('.cells.Bind.%s.%s', None)", + fromStart, + fromEnd); + Gui::cmdAppObjectArgs(sheet, + "setExpression('.cells.BindHiddenRef.%s.%s', None)", + fromStart, + fromEnd); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); Gui::Command::commitCommand(); reject(); - } catch(Base::Exception &e) { + } + catch (Base::Exception& e) { e.ReportException(); QMessageBox::critical(this, tr("Unbind cells"), QString::fromUtf8(e.what())); Gui::Command::abortCommand(); diff --git a/src/Mod/Spreadsheet/Gui/DlgBindSheet.h b/src/Mod/Spreadsheet/Gui/DlgBindSheet.h index eab41e1509..c70f3c59cb 100644 --- a/src/Mod/Spreadsheet/Gui/DlgBindSheet.h +++ b/src/Mod/Spreadsheet/Gui/DlgBindSheet.h @@ -23,21 +23,25 @@ #ifndef DLG_BINDSHEET_H #define DLG_BINDSHEET_H -#include #include +#include -namespace Ui { +namespace Ui +{ class DlgBindSheet; } -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ -class DlgBindSheet : public QDialog +class DlgBindSheet: public QDialog { Q_OBJECT public: - explicit DlgBindSheet(Spreadsheet::Sheet *sheet, const std::vector &range, QWidget *parent = nullptr); + explicit DlgBindSheet(Spreadsheet::Sheet* sheet, + const std::vector& range, + QWidget* parent = nullptr); ~DlgBindSheet() override; void accept() override; @@ -46,11 +50,11 @@ public Q_SLOTS: void onDiscard(); private: - Spreadsheet::Sheet * sheet; + Spreadsheet::Sheet* sheet; App::Range range; - Ui::DlgBindSheet *ui; + Ui::DlgBindSheet* ui; }; -} +} // namespace SpreadsheetGui -#endif // DLG_BINDSHEET_H +#endif // DLG_BINDSHEET_H diff --git a/src/Mod/Spreadsheet/Gui/DlgSettingsImp.cpp b/src/Mod/Spreadsheet/Gui/DlgSettingsImp.cpp index cc17195f63..d90e4fc54b 100644 --- a/src/Mod/Spreadsheet/Gui/DlgSettingsImp.cpp +++ b/src/Mod/Spreadsheet/Gui/DlgSettingsImp.cpp @@ -32,15 +32,14 @@ using namespace SpreadsheetGui; /* TRANSLATOR SpreadsheetGui::DlgSettingsImp */ -DlgSettingsImp::DlgSettingsImp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgSettings) +DlgSettingsImp::DlgSettingsImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgSettings) { ui->setupUi(this); - } -/** +/** * Destroys the object and frees any allocated resources */ DlgSettingsImp::~DlgSettingsImp() = default; @@ -51,7 +50,8 @@ void DlgSettingsImp::saveSettings() /** use whatever the user has entered here * we'll check for validity during import/export */ - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Spreadsheet"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Spreadsheet"); QString delimiter = ui->delimiterComboBox->currentText(); hGrp->SetASCII("ImportExportDelimiter", delimiter.toStdString().c_str()); ui->quoteCharLineEdit->onSave(); @@ -66,21 +66,26 @@ void DlgSettingsImp::loadSettings() * we'll recognize a few tokens: comma, semicolon, tab, and \t */ - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Spreadsheet"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Spreadsheet"); QString delimiter = QString::fromStdString(hGrp->GetASCII("ImportExportDelimiter", "tab")); int idx = ui->delimiterComboBox->findText(delimiter, Qt::MatchFixedString); - if(idx != -1){ + if (idx != -1) { ui->delimiterComboBox->setCurrentIndex(idx); - } else if(delimiter.compare(QLatin1String("\\t"), Qt::CaseInsensitive) == 0){ + } + else if (delimiter.compare(QLatin1String("\\t"), Qt::CaseInsensitive) == 0) { idx = ui->delimiterComboBox->findText(QLatin1String("tab"), Qt::MatchFixedString); ui->delimiterComboBox->setCurrentIndex(idx); - } else if(delimiter.compare(QLatin1String("semicolon"), Qt::CaseInsensitive) == 0){ + } + else if (delimiter.compare(QLatin1String("semicolon"), Qt::CaseInsensitive) == 0) { idx = ui->delimiterComboBox->findText(QLatin1String(";"), Qt::MatchFixedString); ui->delimiterComboBox->setCurrentIndex(idx); - } else if(delimiter.compare(QLatin1String("comma"), Qt::CaseInsensitive) == 0){ + } + else if (delimiter.compare(QLatin1String("comma"), Qt::CaseInsensitive) == 0) { idx = ui->delimiterComboBox->findText(QLatin1String(","), Qt::MatchFixedString); ui->delimiterComboBox->setCurrentIndex(idx); - } else { + } + else { ui->delimiterComboBox->addItem(delimiter); idx = ui->delimiterComboBox->findText(delimiter, Qt::MatchFixedString); ui->delimiterComboBox->setCurrentIndex(idx); @@ -95,7 +100,7 @@ void DlgSettingsImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsImp::changeEvent(QEvent *e) +void DlgSettingsImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Spreadsheet/Gui/DlgSettingsImp.h b/src/Mod/Spreadsheet/Gui/DlgSettingsImp.h index 3aa365e81e..c02cb8e46b 100644 --- a/src/Mod/Spreadsheet/Gui/DlgSettingsImp.h +++ b/src/Mod/Spreadsheet/Gui/DlgSettingsImp.h @@ -27,7 +27,8 @@ #include #include -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ class Ui_DlgSettings; /** @@ -35,23 +36,23 @@ class Ui_DlgSettings; * for the Spreadsheet workbench. * /author TheMarkster, based on work by Jürgen Riegel */ -class DlgSettingsImp : public Gui::Dialog::PreferencePage +class DlgSettingsImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsImp( QWidget* parent = nullptr ); + explicit DlgSettingsImp(QWidget* parent = nullptr); ~DlgSettingsImp() override; protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace SpreadsheetGui +} // namespace SpreadsheetGui -#endif // SPREADSHEETGUI_DLGSETTINGSIMP_H +#endif // SPREADSHEETGUI_DLGSETTINGSIMP_H diff --git a/src/Mod/Spreadsheet/Gui/DlgSheetConf.cpp b/src/Mod/Spreadsheet/Gui/DlgSheetConf.cpp index 4781b70f55..3b18db875f 100644 --- a/src/Mod/Spreadsheet/Gui/DlgSheetConf.cpp +++ b/src/Mod/Spreadsheet/Gui/DlgSheetConf.cpp @@ -39,32 +39,35 @@ using namespace App; using namespace Spreadsheet; using namespace SpreadsheetGui; -DlgSheetConf::DlgSheetConf(Sheet *sheet, Range range, QWidget *parent) - : QDialog(parent), sheet(sheet), ui(new Ui::DlgSheetConf) +DlgSheetConf::DlgSheetConf(Sheet* sheet, Range range, QWidget* parent) + : QDialog(parent) + , sheet(sheet) + , ui(new Ui::DlgSheetConf) { ui->setupUi(this); - if(range.colCount()==1) { + if (range.colCount() == 1) { auto to = range.to(); - to.setCol(CellAddress::MAX_COLUMNS-1); - range = Range(range.from(),to); + to.setCol(CellAddress::MAX_COLUMNS - 1); + range = Range(range.from(), to); } ui->lineEditStart->setText(QString::fromLatin1(range.from().toString().c_str())); ui->lineEditEnd->setText(QString::fromLatin1(range.to().toString().c_str())); - ui->lineEditProp->setDocumentObject(sheet,false); + ui->lineEditProp->setDocumentObject(sheet, false); connect(ui->btnDiscard, &QPushButton::clicked, this, &DlgSheetConf::onDiscard); - CellAddress from,to; + CellAddress from, to; std::string rangeConf; ObjectIdentifier path; - auto prop = prepare(from,to,rangeConf,path,true); - if(prop) { + auto prop = prepare(from, to, rangeConf, path, true); + if (prop) { ui->lineEditProp->setText(QString::fromUtf8(path.toString().c_str())); - if (auto group = prop->getGroup()) + if (auto group = prop->getGroup()) { ui->lineEditGroup->setText(QString::fromUtf8(group)); + } } ui->lineEditStart->setText(QString::fromLatin1(from.toString().c_str())); @@ -76,21 +79,23 @@ DlgSheetConf::~DlgSheetConf() delete ui; } -App::Property *DlgSheetConf::prepare(CellAddress &from, CellAddress &to, - std::string &rangeConf, ObjectIdentifier &path, bool init) +App::Property* DlgSheetConf::prepare(CellAddress& from, + CellAddress& to, + std::string& rangeConf, + ObjectIdentifier& path, + bool init) { - from = sheet->getCellAddress( - ui->lineEditStart->text().trimmed().toLatin1().constData()); - to = sheet->getCellAddress( - ui->lineEditEnd->text().trimmed().toLatin1().constData()); + from = sheet->getCellAddress(ui->lineEditStart->text().trimmed().toLatin1().constData()); + to = sheet->getCellAddress(ui->lineEditEnd->text().trimmed().toLatin1().constData()); - if(from.col()>=to.col()) + if (from.col() >= to.col()) { FC_THROWM(Base::RuntimeError, "Invalid cell range"); + } // Setup row as parameters, and column as configurations to.setRow(from.row()); - CellAddress confFrom(from.row()+1,from.col()); + CellAddress confFrom(from.row() + 1, from.col()); rangeConf = confFrom.toString(); // rangeConf is supposed to hold the range of string cells, each // holding the name of a configuration. The '|' below indicates a @@ -100,52 +105,59 @@ App::Property *DlgSheetConf::prepare(CellAddress &from, CellAddress &to, // configuration. rangeConf += ":|"; - if(!init) { + if (!init) { std::string exprTxt(ui->lineEditProp->text().trimmed().toUtf8().constData()); ExpressionPtr expr; try { - expr.reset(App::Expression::parse(sheet,exprTxt)); - } catch (Base::Exception &e) { + expr.reset(App::Expression::parse(sheet, exprTxt)); + } + catch (Base::Exception& e) { e.ReportException(); FC_THROWM(Base::RuntimeError, "Failed to parse expression for property"); } - if(expr->hasComponent() || !expr->isDerivedFrom(App::VariableExpression::getClassTypeId())) + if (expr->hasComponent() + || !expr->isDerivedFrom(App::VariableExpression::getClassTypeId())) { FC_THROWM(Base::RuntimeError, "Invalid property expression: " << expr->toString()); + } path = static_cast(expr.get())->getPath(); auto obj = path.getDocumentObject(); - if(!obj) + if (!obj) { FC_THROWM(Base::RuntimeError, "Invalid object referenced in: " << expr->toString()); + } int pseudoType; auto prop = path.getProperty(&pseudoType); - if(pseudoType || (prop && (!prop->isDerivedFrom(App::PropertyEnumeration::getClassTypeId()) - || !prop->testStatus(App::Property::PropDynamic)))) - { + if (pseudoType + || (prop + && (!prop->isDerivedFrom(App::PropertyEnumeration::getClassTypeId()) + || !prop->testStatus(App::Property::PropDynamic)))) { FC_THROWM(Base::RuntimeError, "Invalid property referenced in: " << expr->toString()); } return prop; } - Cell *cell = sheet->getCell(from); - if(cell && cell->getExpression()) { + Cell* cell = sheet->getCell(from); + if (cell && cell->getExpression()) { auto expr = cell->getExpression(); - if(expr->isDerivedFrom(FunctionExpression::getClassTypeId())) { + if (expr->isDerivedFrom(FunctionExpression::getClassTypeId())) { auto fexpr = Base::freecad_dynamic_cast(cell->getExpression()); - if(fexpr && (fexpr->getFunction()==FunctionExpression::HREF - || fexpr->getFunction()==FunctionExpression::HIDDENREF) - && fexpr->getArgs().size()==1) + if (fexpr + && (fexpr->getFunction() == FunctionExpression::HREF + || fexpr->getFunction() == FunctionExpression::HIDDENREF) + && fexpr->getArgs().size() == 1) { expr = fexpr->getArgs().front(); + } } auto vexpr = Base::freecad_dynamic_cast(expr); - if(vexpr) { - auto prop = Base::freecad_dynamic_cast( - vexpr->getPath().getProperty()); - if(prop) { + if (vexpr) { + auto prop = + Base::freecad_dynamic_cast(vexpr->getPath().getProperty()); + if (prop) { auto obj = Base::freecad_dynamic_cast(prop->getContainer()); if (obj && prop->hasName()) { path = ObjectIdentifier(sheet); - path.setDocumentObjectName(obj,true); + path.setDocumentObjectName(obj, true); path << ObjectIdentifier::SimpleComponent(prop->getName()); return prop; } @@ -160,63 +172,78 @@ void DlgSheetConf::accept() bool commandActive = false; try { std::string rangeConf; - CellAddress from,to; + CellAddress from, to; ObjectIdentifier path; - App::Property *prop = prepare(from,to,rangeConf,path,false); + App::Property* prop = prepare(from, to, rangeConf, path, false); - Range range(from,to); + Range range(from, to); // check rangeConf, make sure it is a sequence of string only Range r(sheet->getRange(rangeConf.c_str())); do { auto cell = sheet->getCell(*r); - if(cell && cell->getExpression()) { + if (cell && cell->getExpression()) { ExpressionPtr expr(cell->getExpression()->eval()); - if(expr->isDerivedFrom(StringExpression::getClassTypeId())) + if (expr->isDerivedFrom(StringExpression::getClassTypeId())) { continue; + } } - FC_THROWM(Base::RuntimeError, "Expects cell " - << r.address() << " evaluates to string.\n" - << rangeConf << " is supposed to contain a list of configuration names"); - } while(r.next()); + FC_THROWM(Base::RuntimeError, + "Expects cell " << r.address() << " evaluates to string.\n" + << rangeConf + << " is supposed to contain a list of configuration names"); + } while (r.next()); std::string exprTxt(ui->lineEditProp->text().trimmed().toUtf8().constData()); - App::ExpressionPtr expr(App::Expression::parse(sheet,exprTxt)); - if(expr->hasComponent() || !expr->isDerivedFrom(App::VariableExpression::getClassTypeId())) + App::ExpressionPtr expr(App::Expression::parse(sheet, exprTxt)); + if (expr->hasComponent() + || !expr->isDerivedFrom(App::VariableExpression::getClassTypeId())) { FC_THROWM(Base::RuntimeError, "Invalid property expression: " << expr->toString()); + } AutoTransaction guard("Setup conf table"); commandActive = true; // unbind any previous binding int count = range.rowCount() * range.colCount(); - for (int i=0; igetCellBinding(r); - if(!binding) + if (!binding) { break; - Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.%s.%s.%s', None)", - binding==PropertySheet::BindingNormal?"Bind":"BindHiddenRef", - r.from().toString(), r.to().toString()); + } + Gui::cmdAppObjectArgs(sheet, + "setExpression('.cells.%s.%s.%s', None)", + binding == PropertySheet::BindingNormal ? "Bind" + : "BindHiddenRef", + r.from().toString(), + r.to().toString()); } auto obj = path.getDocumentObject(); - if(!obj) + if (!obj) { FC_THROWM(Base::RuntimeError, "Object not found"); + } // Add a dynamic PropertyEnumeration for user to switch the configuration std::string propName = path.getPropertyName(); QString groupName = ui->lineEditGroup->text().trimmed(); - if(!prop) { - prop = obj->addDynamicProperty("App::PropertyEnumeration", propName.c_str(), - groupName.toUtf8().constData()); - } else if (groupName.size()) + if (!prop) { + prop = obj->addDynamicProperty("App::PropertyEnumeration", + propName.c_str(), + groupName.toUtf8().constData()); + } + else if (groupName.size()) { obj->changeDynamicProperty(prop, groupName.toUtf8().constData(), nullptr); - prop->setStatus(App::Property::CopyOnChange,true); + } + prop->setStatus(App::Property::CopyOnChange, true); // Bind the enumeration items to the column of configuration names - Gui::cmdAppObjectArgs(obj, "setExpression('%s.Enum', '%s.cells[<<%s>>]')", - propName, sheet->getFullName(), rangeConf); + Gui::cmdAppObjectArgs(obj, + "setExpression('%s.Enum', '%s.cells[<<%s>>]')", + propName, + sheet->getFullName(), + rangeConf); Gui::cmdAppObjectArgs(obj, "recompute()"); @@ -224,76 +251,97 @@ void DlgSheetConf::accept() // could have just bind the entire row as below, but binding the first // cell separately using a simpler expression can make it easy for us // to extract the name of the PropertyEnumeration for editing or unsetup. - Gui::cmdAppObjectArgs(sheet, "set('%s', '=hiddenref(%s.String)')", - from.toString(CellAddress::Cell::ShowRowColumn), prop->getFullName()); + Gui::cmdAppObjectArgs(sheet, + "set('%s', '=hiddenref(%s.String)')", + from.toString(CellAddress::Cell::ShowRowColumn), + prop->getFullName()); // Adjust the range to skip the first cell - range = Range(from.row(),from.col()+1,to.row(),to.col()); + range = Range(from.row(), from.col() + 1, to.row(), to.col()); // Formulate expression to calculate the row binding using // PropertyEnumeration - Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.Bind.%s.%s', " + Gui::cmdAppObjectArgs( + sheet, + "setExpression('.cells.Bind.%s.%s', " "'tuple(.cells, <<%s>> + str(hiddenref(%s)+%d), <<%s>> + str(hiddenref(%s)+%d))')", range.from().toString(CellAddress::Cell::ShowRowColumn), range.to().toString(CellAddress::Cell::ShowRowColumn), - range.from().toString(CellAddress::Cell::ShowColumn), prop->getFullName(), from.row()+2, - range.to().toString(CellAddress::Cell::ShowColumn), prop->getFullName(), from.row()+2); + range.from().toString(CellAddress::Cell::ShowColumn), + prop->getFullName(), + from.row() + 2, + range.to().toString(CellAddress::Cell::ShowColumn), + prop->getFullName(), + from.row() + 2); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); Gui::Command::commitCommand(); QDialog::accept(); - } catch(Base::Exception &e) { + } + catch (Base::Exception& e) { e.ReportException(); QMessageBox::critical(this, tr("Setup configuration table"), QString::fromUtf8(e.what())); - if(commandActive) + if (commandActive) { Gui::Command::abortCommand(); + } } } -void DlgSheetConf::onDiscard() { +void DlgSheetConf::onDiscard() +{ bool commandActive = false; try { std::string rangeConf; - CellAddress from,to; + CellAddress from, to; ObjectIdentifier path; - auto prop = prepare(from,to,rangeConf,path,true); + auto prop = prepare(from, to, rangeConf, path, true); - Range range(from,to); + Range range(from, to); AutoTransaction guard("Unsetup conf table"); commandActive = true; // unbind any previous binding int count = range.rowCount() * range.colCount(); - for (int i=0; igetCellBinding(r); - if(!binding) + if (!binding) { break; - Gui::cmdAppObjectArgs(sheet, "setExpression('.cells.%s.%s.%s', None)", - binding==PropertySheet::BindingNormal?"Bind":"BindHiddenRef", - r.from().toString(), r.to().toString()); + } + Gui::cmdAppObjectArgs(sheet, + "setExpression('.cells.%s.%s.%s', None)", + binding == PropertySheet::BindingNormal ? "Bind" + : "BindHiddenRef", + r.from().toString(), + r.to().toString()); } - Gui::cmdAppObjectArgs(sheet, "clear('%s')", from.toString(CellAddress::Cell::ShowRowColumn)); + Gui::cmdAppObjectArgs(sheet, + "clear('%s')", + from.toString(CellAddress::Cell::ShowRowColumn)); - if(prop && prop->getName()) { + if (prop && prop->getName()) { auto obj = path.getDocumentObject(); - if(!obj) + if (!obj) { FC_THROWM(Base::RuntimeError, "Object not found"); + } Gui::cmdAppObjectArgs(obj, "setExpression('%s.Enum', None)", prop->getName()); - if(prop->testStatus(Property::PropDynamic)) + if (prop->testStatus(Property::PropDynamic)) { Gui::cmdAppObjectArgs(obj, "removeProperty('%s')", prop->getName()); + } } Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); Gui::Command::commitCommand(); QDialog::accept(); - } catch(Base::Exception &e) { + } + catch (Base::Exception& e) { e.ReportException(); QMessageBox::critical(this, tr("Unsetup configuration table"), QString::fromUtf8(e.what())); - if(commandActive) + if (commandActive) { Gui::Command::abortCommand(); + } } } diff --git a/src/Mod/Spreadsheet/Gui/DlgSheetConf.h b/src/Mod/Spreadsheet/Gui/DlgSheetConf.h index 7555339f79..fda5a4f550 100644 --- a/src/Mod/Spreadsheet/Gui/DlgSheetConf.h +++ b/src/Mod/Spreadsheet/Gui/DlgSheetConf.h @@ -23,36 +23,41 @@ #ifndef DLG_SHEETCONF_H #define DLG_SHEETCONF_H -#include #include +#include -namespace Ui { +namespace Ui +{ class DlgSheetConf; } -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ -class DlgSheetConf : public QDialog +class DlgSheetConf: public QDialog { Q_OBJECT public: - explicit DlgSheetConf(Spreadsheet::Sheet *sheet, App::Range range, QWidget *parent = nullptr); + explicit DlgSheetConf(Spreadsheet::Sheet* sheet, App::Range range, QWidget* parent = nullptr); ~DlgSheetConf() override; void accept() override; - App::Property *prepare(App::CellAddress &from, App::CellAddress &to, - std::string &rangeConf, App::ObjectIdentifier &path, bool init); + App::Property* prepare(App::CellAddress& from, + App::CellAddress& to, + std::string& rangeConf, + App::ObjectIdentifier& path, + bool init); public Q_SLOTS: void onDiscard(); private: - Spreadsheet::Sheet * sheet; - Ui::DlgSheetConf *ui; + Spreadsheet::Sheet* sheet; + Ui::DlgSheetConf* ui; }; -} +} // namespace SpreadsheetGui -#endif // DLG_SHEETCONF_H +#endif // DLG_SHEETCONF_H diff --git a/src/Mod/Spreadsheet/Gui/LineEdit.cpp b/src/Mod/Spreadsheet/Gui/LineEdit.cpp index 3908f146c4..ea17ad024d 100644 --- a/src/Mod/Spreadsheet/Gui/LineEdit.cpp +++ b/src/Mod/Spreadsheet/Gui/LineEdit.cpp @@ -23,9 +23,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include "LineEdit.h" @@ -33,7 +33,7 @@ using namespace SpreadsheetGui; -LineEdit::LineEdit(QWidget *parent) +LineEdit::LineEdit(QWidget* parent) : Gui::ExpressionLineEdit(parent, false, '=', true) , lastKeyPressed(0) { @@ -46,12 +46,12 @@ bool LineEdit::eventFilter(QObject* object, QEvent* event) if (event && event->type() == QEvent::KeyPress) { QKeyEvent* keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_Tab) { - // Special tab handling -- must be done via a QApplication event filter, otherwise the widget - // system will always grab the tab events + // Special tab handling -- must be done via a QApplication event filter, otherwise the + // widget system will always grab the tab events if (completerActive()) { hideCompleter(); event->accept(); - return true; // To make sure this tab press doesn't do anything else + return true; // To make sure this tab press doesn't do anything else } else { lastKeyPressed = keyEvent->key(); @@ -59,22 +59,23 @@ bool LineEdit::eventFilter(QObject* object, QEvent* event) } } } - return false; // We don't usually actually "handle" the tab event, we just keep track of it + return false; // We don't usually actually "handle" the tab event, we just keep track of it } -bool LineEdit::event(QEvent *event) +bool LineEdit::event(QEvent* event) { if (event && event->type() == QEvent::FocusIn) { qApp->installEventFilter(this); } else if (event && event->type() == QEvent::FocusOut) { qApp->removeEventFilter(this); - if (lastKeyPressed) + if (lastKeyPressed) { Q_EMIT finishedWithKey(lastKeyPressed, lastModifiers); + } lastKeyPressed = 0; } else if (event && event->type() == QEvent::KeyPress && !completerActive()) { - QKeyEvent * kevent = static_cast(event); + QKeyEvent* kevent = static_cast(event); lastKeyPressed = kevent->key(); lastModifiers = kevent->modifiers(); } diff --git a/src/Mod/Spreadsheet/Gui/LineEdit.h b/src/Mod/Spreadsheet/Gui/LineEdit.h index 3f508f8048..b81ef60ac0 100644 --- a/src/Mod/Spreadsheet/Gui/LineEdit.h +++ b/src/Mod/Spreadsheet/Gui/LineEdit.h @@ -23,19 +23,20 @@ #ifndef LINEEDIT_H #define LINEEDIT_H -#include #include +#include -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ -class LineEdit : public Gui::ExpressionLineEdit +class LineEdit: public Gui::ExpressionLineEdit { Q_OBJECT public: - explicit LineEdit(QWidget *parent = nullptr); + explicit LineEdit(QWidget* parent = nullptr); - bool event(QEvent *event) override; + bool event(QEvent* event) override; Q_SIGNALS: void finishedWithKey(int key, Qt::KeyboardModifiers modifiers); @@ -49,6 +50,6 @@ private: Qt::KeyboardModifiers lastModifiers; }; -} +} // namespace SpreadsheetGui -#endif // LINEEDIT_H +#endif // LINEEDIT_H diff --git a/src/Mod/Spreadsheet/Gui/PreCompiled.h b/src/Mod/Spreadsheet/Gui/PreCompiled.h index 29cd0ed332..3d83053a37 100644 --- a/src/Mod/Spreadsheet/Gui/PreCompiled.h +++ b/src/Mod/Spreadsheet/Gui/PreCompiled.h @@ -28,10 +28,10 @@ // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning(disable : 4005) -# pragma warning(disable : 4251) -# pragma warning(disable : 4503) -# pragma warning(disable : 4786) // specifier longer then 255 chars +#pragma warning(disable : 4005) +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif #ifdef _PreComp_ @@ -43,14 +43,14 @@ #include #ifdef FC_OS_WIN32 -# include +#include #endif // Qt Toolkit #ifndef __QtAll__ -# include +#include #endif -#endif //_PreComp_ +#endif //_PreComp_ -#endif // SPREADSHEET_PRECOMPILED_H +#endif // SPREADSHEET_PRECOMPILED_H diff --git a/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp b/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp index 50bf6d124e..a2fb26d722 100644 --- a/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp +++ b/src/Mod/Spreadsheet/Gui/PropertiesDialog.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" -#include #include #include +#include #include #include @@ -36,14 +36,16 @@ using namespace App; using namespace Spreadsheet; using namespace SpreadsheetGui; -PropertiesDialog::PropertiesDialog(Sheet *_sheet, const std::vector &_ranges, QWidget *parent) : - QDialog(parent), - sheet(_sheet), - ranges(_ranges), - ui(new Ui::PropertiesDialog), - alignment(0), - displayUnitOk(true), - aliasOk(true) +PropertiesDialog::PropertiesDialog(Sheet* _sheet, + const std::vector& _ranges, + QWidget* parent) + : QDialog(parent) + , sheet(_sheet) + , ranges(_ranges) + , ui(new Ui::PropertiesDialog) + , alignment(0) + , displayUnitOk(true) + , aliasOk(true) { ui->setupUi(this); ui->foregroundColor->setStandardColors(); @@ -52,7 +54,7 @@ PropertiesDialog::PropertiesDialog(Sheet *_sheet, const std::vector &_ran assert(ranges.size() > 0); Range range = ranges[0]; - Cell * cell = sheet->getNewCell(*range); + Cell* cell = sheet->getNewCell(*range); assert(cell); @@ -79,34 +81,49 @@ PropertiesDialog::PropertiesDialog(Sheet *_sheet, const std::vector &_ran backgroundColor.b, backgroundColor.a)); - if (alignment & Cell::ALIGNMENT_LEFT) + if (alignment & Cell::ALIGNMENT_LEFT) { ui->alignLeft->setChecked(true); - else if (alignment & Cell::ALIGNMENT_HCENTER) + } + else if (alignment & Cell::ALIGNMENT_HCENTER) { ui->alignHCenter->setChecked(true); - else if (alignment & Cell::ALIGNMENT_RIGHT) + } + else if (alignment & Cell::ALIGNMENT_RIGHT) { ui->alignRight->setChecked(true); + } - if (alignment & Cell::ALIGNMENT_TOP) + if (alignment & Cell::ALIGNMENT_TOP) { ui->alignTop->setChecked(true); - else if (alignment & Cell::ALIGNMENT_VCENTER) + } + else if (alignment & Cell::ALIGNMENT_VCENTER) { ui->alignVCenter->setChecked(true); - else if (alignment & Cell::ALIGNMENT_BOTTOM) + } + else if (alignment & Cell::ALIGNMENT_BOTTOM) { ui->alignBottom->setChecked(true); + } - if (style.find("bold") != style.end()) + if (style.find("bold") != style.end()) { ui->styleBold->setChecked(true); - if (style.find("italic") != style.end()) + } + if (style.find("italic") != style.end()) { ui->styleItalic->setChecked(true); - if (style.find("underline") != style.end()) + } + if (style.find("underline") != style.end()) { ui->styleUnderline->setChecked(true); + } ui->displayUnit->setText(Base::Tools::fromStdString(displayUnit.stringRep)); ui->alias->setText(Base::Tools::fromStdString(alias)); // Colors - connect(ui->foregroundColor, &QtColorPicker::colorChanged, this, &PropertiesDialog::foregroundColorChanged); - connect(ui->backgroundColor, &QtColorPicker::colorChanged, this, &PropertiesDialog::backgroundColorChanged); + connect(ui->foregroundColor, + &QtColorPicker::colorChanged, + this, + &PropertiesDialog::foregroundColorChanged); + connect(ui->backgroundColor, + &QtColorPicker::colorChanged, + this, + &PropertiesDialog::backgroundColorChanged); // Alignment connect(ui->alignLeft, &QRadioButton::clicked, this, &PropertiesDialog::alignmentChanged); @@ -134,55 +151,67 @@ PropertiesDialog::PropertiesDialog(Sheet *_sheet, const std::vector &_ran ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(displayUnitOk && aliasOk); } -void PropertiesDialog::foregroundColorChanged(const QColor & color) +void PropertiesDialog::foregroundColorChanged(const QColor& color) { foregroundColor = App::Color(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } -void PropertiesDialog::backgroundColorChanged(const QColor & color) +void PropertiesDialog::backgroundColorChanged(const QColor& color) { backgroundColor = App::Color(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } void PropertiesDialog::alignmentChanged() { - if (sender() == ui->alignLeft) + if (sender() == ui->alignLeft) { alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_LEFT; - else if (sender() == ui->alignHCenter) + } + else if (sender() == ui->alignHCenter) { alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_HCENTER; - else if (sender() == ui->alignRight) + } + else if (sender() == ui->alignRight) { alignment = (alignment & ~Cell::ALIGNMENT_HORIZONTAL) | Cell::ALIGNMENT_RIGHT; - else if (sender() == ui->alignTop) + } + else if (sender() == ui->alignTop) { alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_TOP; - else if (sender() == ui->alignVCenter) + } + else if (sender() == ui->alignVCenter) { alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_VCENTER; - else if (sender() == ui->alignBottom) + } + else if (sender() == ui->alignBottom) { alignment = (alignment & ~Cell::ALIGNMENT_VERTICAL) | Cell::ALIGNMENT_BOTTOM; + } } void PropertiesDialog::styleChanged() { if (sender() == ui->styleBold) { - if (ui->styleBold->isChecked()) + if (ui->styleBold->isChecked()) { style.insert("bold"); - else + } + else { style.erase("bold"); + } } else if (sender() == ui->styleItalic) { - if (ui->styleItalic->isChecked()) + if (ui->styleItalic->isChecked()) { style.insert("italic"); - else + } + else { style.erase("italic"); + } } else if (sender() == ui->styleUnderline) { - if (ui->styleUnderline->isChecked()) + if (ui->styleUnderline->isChecked()) { style.insert("underline"); - else + } + else { style.erase("underline"); + } } } -void PropertiesDialog::displayUnitChanged(const QString & text) +void PropertiesDialog::displayUnitChanged(const QString& text) { if (text.isEmpty()) { displayUnit = DisplayUnit(); @@ -192,7 +221,8 @@ void PropertiesDialog::displayUnitChanged(const QString & text) QPalette palette = ui->displayUnit->palette(); try { - std::unique_ptr e(App::ExpressionParser::parseUnit(sheet, text.toUtf8().constData())); + std::unique_ptr e( + App::ExpressionParser::parseUnit(sheet, text.toUtf8().constData())); displayUnit = DisplayUnit(text.toUtf8().constData(), e->getUnit(), e->getScaler()); palette.setColor(QPalette::Text, Qt::black); @@ -207,7 +237,7 @@ void PropertiesDialog::displayUnitChanged(const QString & text) ui->displayUnit->setPalette(palette); } -void PropertiesDialog::aliasChanged(const QString & text) +void PropertiesDialog::aliasChanged(const QString& text) { QPalette palette = ui->alias->palette(); @@ -233,42 +263,53 @@ void PropertiesDialog::apply() for (; i != ranges.end(); ++i) { if (orgAlignment != alignment) { - Gui::cmdAppObjectArgs(sheet, "setAlignment('%s', '%s')", - i->rangeString().c_str(), Cell::encodeAlignment(alignment).c_str()); + Gui::cmdAppObjectArgs(sheet, + "setAlignment('%s', '%s')", + i->rangeString().c_str(), + Cell::encodeAlignment(alignment).c_str()); changes = true; } if (orgStyle != style) { - Gui::cmdAppObjectArgs(sheet, "setStyle('%s', '%s')", - i->rangeString().c_str(), Cell::encodeStyle(style).c_str()); + Gui::cmdAppObjectArgs(sheet, + "setStyle('%s', '%s')", + i->rangeString().c_str(), + Cell::encodeStyle(style).c_str()); changes = true; } if (orgForegroundColor != foregroundColor) { - Gui::cmdAppObjectArgs(sheet, "setForeground('%s', (%f,%f,%f,%f))", - i->rangeString().c_str(), - foregroundColor.r, - foregroundColor.g, - foregroundColor.b, - foregroundColor.a); + Gui::cmdAppObjectArgs(sheet, + "setForeground('%s', (%f,%f,%f,%f))", + i->rangeString().c_str(), + foregroundColor.r, + foregroundColor.g, + foregroundColor.b, + foregroundColor.a); changes = true; } if (orgBackgroundColor != backgroundColor) { - Gui::cmdAppObjectArgs(sheet, "setBackground('%s', (%f,%f,%f,%f))", - i->rangeString().c_str(), - backgroundColor.r, - backgroundColor.g, - backgroundColor.b, - backgroundColor.a); + Gui::cmdAppObjectArgs(sheet, + "setBackground('%s', (%f,%f,%f,%f))", + i->rangeString().c_str(), + backgroundColor.r, + backgroundColor.g, + backgroundColor.b, + backgroundColor.a); changes = true; } if (orgDisplayUnit != displayUnit) { - std::string escapedstr = Base::Tools::escapedUnicodeFromUtf8(displayUnit.stringRep.c_str()); - Gui::cmdAppObjectArgs(sheet, "setDisplayUnit('%s', '%s')", - i->rangeString().c_str(), escapedstr.c_str()); + std::string escapedstr = + Base::Tools::escapedUnicodeFromUtf8(displayUnit.stringRep.c_str()); + Gui::cmdAppObjectArgs(sheet, + "setDisplayUnit('%s', '%s')", + i->rangeString().c_str(), + escapedstr.c_str()); changes = true; } if (ranges.size() == 1 && ranges[0].size() == 1 && orgAlias != alias) { - Gui::cmdAppObjectArgs(sheet, "setAlias('%s', '%s')", - i->address().c_str(), alias.c_str()); + Gui::cmdAppObjectArgs(sheet, + "setAlias('%s', '%s')", + i->address().c_str(), + alias.c_str()); changes = true; } } @@ -276,8 +317,9 @@ void PropertiesDialog::apply() Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } - else + else { Gui::Command::abortCommand(); + } } } diff --git a/src/Mod/Spreadsheet/Gui/PropertiesDialog.h b/src/Mod/Spreadsheet/Gui/PropertiesDialog.h index d688975ea0..5877218177 100644 --- a/src/Mod/Spreadsheet/Gui/PropertiesDialog.h +++ b/src/Mod/Spreadsheet/Gui/PropertiesDialog.h @@ -23,37 +23,42 @@ #ifndef PROPERTIESDIALOG_H #define PROPERTIESDIALOG_H -#include #include +#include -namespace Ui { +namespace Ui +{ class PropertiesDialog; } -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ -class PropertiesDialog : public QDialog +class PropertiesDialog: public QDialog { Q_OBJECT public: - explicit PropertiesDialog(Spreadsheet::Sheet *_sheet, const std::vector & _ranges, QWidget *parent = nullptr); + explicit PropertiesDialog(Spreadsheet::Sheet* _sheet, + const std::vector& _ranges, + QWidget* parent = nullptr); ~PropertiesDialog() override; void apply(); void selectAlias(); private Q_SLOTS: - void foregroundColorChanged(const QColor &color); - void backgroundColorChanged(const QColor &color); + void foregroundColorChanged(const QColor& color); + void backgroundColorChanged(const QColor& color); void alignmentChanged(); void styleChanged(); - void displayUnitChanged(const QString &text); - void aliasChanged(const QString &text); + void displayUnitChanged(const QString& text); + void aliasChanged(const QString& text); + private: - Spreadsheet::Sheet * sheet; + Spreadsheet::Sheet* sheet; std::vector ranges; - Ui::PropertiesDialog *ui; + Ui::PropertiesDialog* ui; App::Color foregroundColor; App::Color backgroundColor; int alignment; @@ -72,6 +77,6 @@ private: bool aliasOk; }; -} +} // namespace SpreadsheetGui -#endif // PROPERTIESDIALOG_H +#endif // PROPERTIESDIALOG_H diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts index 7b7d5a46bb..5d1d2368d1 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts @@ -872,7 +872,7 @@ Do you want to continue? - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts index da66651caa..6712ee1a45 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts @@ -894,9 +894,9 @@ Do you want to continue? - Error: + Error: - Памылка: + Памылка: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts index 2084fc3ca2..d3b7f2590b 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts @@ -897,7 +897,7 @@ Vols continuar? - Error: + Error: Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts index 03436f1fc6..471e9a7014 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts @@ -899,9 +899,9 @@ Chcete pokračovat? - Error: + Error: - Chyba: + Chyba: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts index f6b6f0ec9f..efc4b09ee8 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts @@ -896,9 +896,9 @@ Möchten Sie fortfahren? - Error: + Error: - Fehler: + Fehler: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts index d853d3d588..3a531e699f 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts @@ -378,12 +378,12 @@ Set foreground color - Set foreground color + Ορισμός χρώματος προσκηνίου Set background color - Set background color + Ορισμός χρώματος φόντου @@ -391,84 +391,82 @@ Bind Spreadsheet Cells - Bind Spreadsheet Cells + Δέσμευση Κελιών Φύλλων To cells: - To cells: + Σε κελιά: Sheet: - Sheet: + Φύλλα: First cell in range - First cell in range + Πρώτο κελί στην περιοχή Last cell in range - Last cell in range + Τελευταίο κελί στην περιοχή Bind cells: - Bind cells: + Δεσμευμένα κελιά: Start cell address - Start cell address + Έναρξη διεύθυνση κελιού End cell address - End cell address + Διεύθυνση τελικού κελιού Start cell address to bind to. Type '=' if you want to use an expression. The expression must evaluate to a string of some cell address. - Start cell address to bind to. -Type '=' if you want to use an expression. -The expression must evaluate to a string of some cell address. + Ξεκινήστε τη σύνδεση της διεύθυνσης κελιού στο. +Πληκτρολογήστε '=' αν θέλετε να χρησιμοποιήσετε μια έκφραση. +Η έκφραση πρέπει να αξιολογηθεί σε μια συμβολοσειρά κάποιας διεύθυνσης κελιού. End cell address to bind to. Type '=' if you want to use an expression. The expression must evaluate to a string of some cell address. - End cell address to bind to. -Type '=' if you want to use an expression. -The expression must evaluate to a string of some cell address. + Δώστε τη διεύθυνση κελιού στο οποίο θα συνδεθείτε. +Πληκτρολογήστε '=' αν θέλετε να χρησιμοποιήσετε μια έκφραση. +Η έκφραση πρέπει να αξιολογηθεί σε μια συμβολοσειρά κάποιας διεύθυνσης κελιού. Which spread sheet to bind to - Which spread sheet to bind to + Ποιο φύλλο να συνδεθεί με The dependency with the referenced spreadsheet will be hidden to the dependency checking. Useful to avoid cyclic dependencies, but use with caution! - The dependency with the referenced spreadsheet will -be hidden to the dependency checking. -Useful to avoid cyclic dependencies, but use with caution! + Η εξάρτηση με το αναφερόμενο υπολογιστικό φύλλο θα κρυφτεί στον έλεγχο εξάρτησης. Χρήσιμο για να αποφύγετε τις κυκλικές εξαρτήσεις, αλλά χρησιμοποιήστε το με προσοχή! Hide dependency of binding - Hide dependency of binding + Απόκρυψη εξάρτησης από τη σύνδεση Unbind - Unbind + Αποσύνδεση @@ -486,12 +484,12 @@ Useful to avoid cyclic dependencies, but use with caution! Setup Configuration Table - Setup Configuration Table + Ρύθμιση Πίνακα Διαμόρφωσης Cell range: - Cell range: + Περιοχή κελιών: @@ -504,14 +502,11 @@ property for user to dynamically switch configuration. The first row of the range will be bound to whatever row (indirectly) selected by that property. - Starting cell address. + Διεύθυνση κελιού έναρξης. -The first column of the range is assumed to contain a list of configuration -names, which will be used to generate a string list and bind to the given -property for user to dynamically switch configuration. +Η πρώτη στήλη του εύρους θεωρείται ότι περιέχει μια λίστα ονομάτων διαμόρφωσης, η οποία θα χρησιμοποιηθεί για τη δημιουργία μιας λίστας συμβολοσειρών και τη δέσμευση στη δεδομένη ιδιότητα, προκειμένου ο χρήστης να αλλάξει δυναμικά τη διαμόρφωση. -The first row of the range will be bound to whatever row (indirectly) selected -by that property. +Η πρώτη γραμμή του εύρους θα δεσμευτεί σε οποιαδήποτε σειρά (έμμεσα) επιλεγεί από αυτήν την ιδιότητα. @@ -525,20 +520,14 @@ property for user to dynamically switch configuration. The first row of the range will be bound to whatever row (indirectly) selected by that property. - Ending cell address. + Η πρώτη στήλη του εύρους θεωρείται ότι περιέχει μια λίστα ονομάτων διαμόρφωσης, η οποία θα χρησιμοποιηθεί για τη δημιουργία μιας λίστας συμβολοσειρών και τη δέσμευση στη δεδομένη ιδιότητα ώστε ο χρήστης να αλλάξει δυναμικά τη διαμόρφωση. -The first column of the range is assumed to contain a list of configuration -names, which will be used to generate a string list and bind to the given -property for user to dynamically switch configuration. - -The first row of the range will be bound to whatever row (indirectly) selected -by that property. - +Η πρώτη σειρά του εύρους θα δεσμευτεί σε οποιαδήποτε σειρά (έμμεσα) επιλεγεί από αυτήν την ιδιότητα. Property: - Property: + Ιδιότητα: @@ -550,17 +539,17 @@ switch the design configuration. The property will be created if not exist. Group: - Group: + Ομάδα: Optional property group name. - Optional property group name. + Προαιρετικό όνομα ομάδας ιδιοτήτων. Unsetup - Unsetup + Κατάργηση @@ -603,7 +592,7 @@ switch the design configuration. The property will be created if not exist. Horizontal - Horizontal + Οριζόντια @@ -624,7 +613,7 @@ switch the design configuration. The property will be created if not exist. Vertical - Vertical + Κατακόρυφα @@ -725,19 +714,19 @@ switch the design configuration. The property will be created if not exist. Copy & Paste failed - Copy & Paste failed + Η αντιγραφή & επικόλληση απέτυχε Alias contains invalid characters! - Alias contains invalid characters! + Το ψευδώνυμο περιέχει μη έγκυρους χαρακτήρες! Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 - Refer to cell by alias, for example -Spreadsheet.my_alias_name instead of Spreadsheet.B1 + Ανατρέξτε στο κελί με το ψευδώνυμο, για παράδειγμα +Spreadsheet.my_alias_name αντί του Spreadsheet.B1 @@ -861,7 +850,7 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 &Content: - &Content: + &Περιεχόμενο: @@ -872,8 +861,8 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 - Refer to cell by alias, for example -Spreadsheet.my_alias_name instead of Spreadsheet.B1 + Ανατρέξτε στο κελί με το ψευδώνυμο, για παράδειγμα +Spreadsheet.my_alias_name αντί του Spreadsheet.B1 @@ -881,33 +870,33 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 Bind cells - Bind cells + Δέσμευση κελιών Source and target cell count mismatch. Partial binding may still work. Do you want to continue? - Source and target cell count mismatch. Partial binding may still work. + Αναντιστοιχία αριθμού κυττάρων πηγής και στόχου. Μερική σύνδεση μπορεί να συνεχίσει να λειτουργεί. -Do you want to continue? +Θέλετε να συνεχίσετε; Bind Spreadsheet Cells - Bind Spreadsheet Cells + Δέσμευση Κελιών Φύλλων - Error: + Error: - Error: + Σφάλμα: Unbind cells - Unbind cells + Αποσύνδεση κελιών @@ -920,17 +909,17 @@ Do you want to continue? Display Settings - Display Settings + Ρυθμίσεις Εμφάνισης If checked, use the custom presentation to display cell string. - If checked, use the custom presentation to display cell string. + Εάν είναι επιλεγμένο, χρησιμοποιήστε την προσαρμοσμένη παρουσίαση για να εμφανίσετε τη συμβολοσειρά κελιού. Show alias in cell with format - Show alias in cell with format + Εμφάνιση ψευδώνυμου σε κελί με μορφή @@ -939,51 +928,51 @@ Defaults to: %V = %A %A - alias name %V - cell value - The format of the custom cell string presentation. -Defaults to: %V = %A + Η μορφή της προσαρμοσμένης συμβολοσειράς κελιών παρουσίασης. +Προκαθορισμένα σε: %V = %A -%A - alias name -%V - cell value +%A - ψευδώνυμο +%V - τιμή κελιού Import/Export Settings - Import/Export Settings + Ρυθμίσεις Εισαγωγής/Εξαγωγής Delimiter Character: - Delimiter Character: + Χαρακτήρας Οριοθέτησης: <html><head/><body><p>Character to use as field delimiter. Default is tab, but also commonly used are commas (,) and semicolons (;). Select from the list or enter your own in the field. Must be a single character or the words <span style=" font-style:italic;">tab</span>, <span style=" font-style:italic;">comma</span>, or <span style=" font-style:italic;">semicolon</span>.</p></body></html> - <html><head/><body><p>Character to use as field delimiter. Default is tab, but also commonly used are commas (,) and semicolons (;). Select from the list or enter your own in the field. Must be a single character or the words <span style=" font-style:italic;">tab</span>, <span style=" font-style:italic;">comma</span>, or <span style=" font-style:italic;">semicolon</span>.</p></body></html> + <html><head/><body><p>Χαρακτήρας για χρήση ως οριοθέτης πεδίου. Η προεπιλογή είναι η καρτέλα, αλλά επίσης χρησιμοποιούνται συνήθως κόμματα (,) και ερωτηματικά (;). Επιλέξτε από τη λίστα ή εισάγετε τη δική σας στο πεδίο. Πρέπει να είναι ένας μόνο χαρακτήρας ή η καρτέλα <span style=" font-style:italic;">των λέξεων</span>, <span style=" font-style:italic;">κόμμα</span>ή <span style=" font-style:italic;">ερωτηματικό</span>.</p></body></html> tab - tab + tab Quote Character: - Quote Character: + Χαρακτήρας απόσπασμα: <html><head/><body><p>Character used to delimit strings, typically is single quote (') or double quote (&quot;). Must be a single character.</p></body></html> - <html><head/><body><p>Character used to delimit strings, typically is single quote (') or double quote (&quot;). Must be a single character.</p></body></html> + <html><head/><body><p>Ο χαρακτήρας που χρησιμοποιείται για την οριοθέτηση συμβολοσειρών, είναι συνήθως μονό εισαγωγικό (') ή διπλό εισαγωγικό (&quot;). Πρέπει να είναι ένας χαρακτήρας.</p></body></html> Escape Character: - Escape Character: + Χαρακτήρας Διαφυγής: <html><head/><body><p>Escape character, typically the backslash (\), used to indicate special unprintable characters, e.g. \t = tab. Must be a single character.</p></body></html> - <html><head/><body><p>Escape character, typically the backslash (\), used to indicate special unprintable characters, e.g. \t = tab. Must be a single character.</p></body></html> + <html><head/><body><p>Χαρακτήρας διαφυγής, συνήθως η αντίστροφη κάθετος (\), που χρησιμοποιείται για να υποδείξει ειδικούς μη εκτυπώσιμους χαρακτήρες, e.. \t = καρτέλα. Πρέπει να είναι ένας μόνο χαρακτήρας.</p></body></html> @@ -991,12 +980,12 @@ Defaults to: %V = %A Setup configuration table - Setup configuration table + Ρύθμιση πίνακα ρυθμίσεων Unsetup configuration table - Unsetup configuration table + Κατάργηση ρυθμίσεων παραμέτρων πίνακα @@ -1005,7 +994,7 @@ Defaults to: %V = %A Insert %n row(s) above - Insert %n row(s) above + Εισαγωγή %n γραμμής(ών) παραπάνω Insert %n row(s) above @@ -1013,7 +1002,7 @@ Defaults to: %V = %A Insert %n row(s) below - Insert %n row(s) below + Εισάγετε %n γραμμή(ές) παρακάτω Insert %n row(s) below @@ -1021,7 +1010,7 @@ Defaults to: %V = %A Insert %n non-contiguous rows - Insert %n non-contiguous rows + Εισαγάγετε %n μη συνεχόμενες στήλες Insert %n non-contiguous rows @@ -1029,7 +1018,7 @@ Defaults to: %V = %A Remove row(s) - Remove row(s) + Αφαίρεση σειράς(ών) Remove row(s) @@ -1037,7 +1026,7 @@ Defaults to: %V = %A Insert %n column(s) left - Insert %n column(s) left + Εισαγωγή στήλης %n αριστερά Insert %n column(s) left @@ -1045,7 +1034,7 @@ Defaults to: %V = %A Insert %n column(s) right - Insert %n column(s) right + Εισαγωγή %n στήλης δεξιά Insert %n column(s) right @@ -1053,7 +1042,7 @@ Defaults to: %V = %A Insert %n non-contiguous columns - Insert %n non-contiguous columns + Εισαγάγετε %n μη συνεχόμενες στήλες Insert %n non-contiguous columns @@ -1061,7 +1050,7 @@ Defaults to: %V = %A Remove column(s) - Remove column(s) + Αφαίρεση στηλών(η) Remove column(s) @@ -1075,19 +1064,19 @@ Defaults to: %V = %A Recompute - Recompute + Υπολογίστε ξανά Bind... - Bind... + Δεσμεύω... Configuration table... - Configuration table... + Πίνακας διαμόρφωσης... @@ -1099,7 +1088,7 @@ Defaults to: %V = %A Split cells - Split cells + Διαίρεση κελιών @@ -1117,7 +1106,7 @@ Defaults to: %V = %A Paste - Paste + Επικόλληση @@ -1149,7 +1138,7 @@ Defaults to: %V = %A &Spreadsheet - &Spreadsheet + &Υπολογιστικό Φύλλο @@ -1159,7 +1148,7 @@ Defaults to: %V = %A &Styles - &Styles + &Στυλ diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts index b815be06f6..c9012dd110 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts @@ -433,7 +433,7 @@ Start cell address to bind to. Type '=' if you want to use an expression. The expression must evaluate to a string of some cell address. - Dirección de celda inicial a vincular. + Dirección de celda inicial a vincular. Escriba '=' si desea utilizar una expresión. La expresión debe evaluar a una cadena de alguna dirección de celda. @@ -901,9 +901,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts index ed8883e56d..acb34e028c 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts @@ -433,7 +433,7 @@ Start cell address to bind to. Type '=' if you want to use an expression. The expression must evaluate to a string of some cell address. - Dirección de celda inicial a enlazar. + Dirección de celda inicial a enlazar. Escriba '=' si desea utilizar una expresión. La expresión debe evaluar a una cadena de alguna dirección de celda. @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts index 46fe452090..33b96030bb 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts @@ -899,9 +899,9 @@ Jarraitu? - Error: + Error: - Errorea: + Errorea: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts index 86d5f39aad..6101a3326a 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts @@ -899,7 +899,7 @@ Do you want to continue? - Error: + Error: Virhe: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fil.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fil.ts index 575ba02f30..c3db493b18 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fil.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fil.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts index f6d6e03f06..536e9ffbbe 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts @@ -896,7 +896,7 @@ Voulez-vous continuer ? - Error: + Error: Erreur : diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts index 5e34888e64..a4e615b08e 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts index 0d3d7aaaa0..1452c5896e 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts @@ -907,7 +907,7 @@ Do you want to continue? - Error: + Error: Greška: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts index b2c4c67039..a4fd157f87 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts @@ -899,7 +899,7 @@ Szeretné folytatni? - Error: + Error: Hiba: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts index bff25940db..8396cd4d45 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts index 0a5f0732b8..5d9e90c327 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts @@ -897,9 +897,9 @@ Vuoi continuare? - Error: + Error: - Errore: + Errore: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts index b3d9fc2ea4..a455a38b6f 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts @@ -892,7 +892,7 @@ Do you want to continue? - Error: + Error: エラー: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts index bf03ba1cea..8f673e4e84 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts @@ -890,7 +890,7 @@ Do you want to continue? - Error: + Error: შეცდომა: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts index 41bfe0869b..e8ecacfb86 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - 오류: + 오류: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_lt.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_lt.ts index 5afd6c0e57..6244c78c9b 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_lt.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_lt.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts index 9fa770fb39..f8b190c017 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts @@ -391,7 +391,7 @@ Bind Spreadsheet Cells - Bind Spreadsheet Cells + Verbind spreadsheet cellen @@ -416,54 +416,52 @@ Bind cells: - Bind cells: + Verbind cellen: Start cell address - Start cell address + Eerste cel adres End cell address - End cell address + Laatste cel adres Start cell address to bind to. Type '=' if you want to use an expression. The expression must evaluate to a string of some cell address. - Start cell address to bind to. -Type '=' if you want to use an expression. -The expression must evaluate to a string of some cell address. + Eerste adres in het bereik van cellen om mee te verbinden. +Typ '=' als je hier een formule voor wilt gebruiken. +De formule moet leiden tot de tekenreeks van een cel adres (Hoofdletter kolom + rijnummer). End cell address to bind to. Type '=' if you want to use an expression. The expression must evaluate to a string of some cell address. - End cell address to bind to. -Type '=' if you want to use an expression. -The expression must evaluate to a string of some cell address. + Laatste adres in het bereik van cellen om mee te verbinden. +Typ '=' als je hier een formule voor wilt gebruiken. +De formule moet leiden tot de waarde van een cel adres (Hoofdletter kolom + rijnummer). Which spread sheet to bind to - Which spread sheet to bind to + Het rekenblad om mee te verbinden The dependency with the referenced spreadsheet will be hidden to the dependency checking. Useful to avoid cyclic dependencies, but use with caution! - The dependency with the referenced spreadsheet will -be hidden to the dependency checking. -Useful to avoid cyclic dependencies, but use with caution! + De afhankelijkheid met het gerefereerde rekenblad wordt niet meegenomen in de afhankelijkheidscheck. Handig om cyclische afhankelijkheden te vermijden, maar wees voorzichtig! Hide dependency of binding - Hide dependency of binding + Verberg de afhankelijkheden van de verbinding @@ -486,7 +484,7 @@ Useful to avoid cyclic dependencies, but use with caution! Setup Configuration Table - Setup Configuration Table + Opzet van de configuratie tabel @@ -504,15 +502,11 @@ property for user to dynamically switch configuration. The first row of the range will be bound to whatever row (indirectly) selected by that property. - Starting cell address. + Eerste cel in het bereik -The first column of the range is assumed to contain a list of configuration -names, which will be used to generate a string list and bind to the given -property for user to dynamically switch configuration. +De eerste kolom (van het bereik) moet worden gebruikt voor een lijst met namen van configuraties. De namen worden gebruikt om een set gegevens te genereren en die te verbinden met de eigenschappen en waarden van de objecten. -The first row of the range will be bound to whatever row (indirectly) selected -by that property. - +De eerste rij van het bereik geeft de waarden aan van de rij die geselecteerd is. @@ -525,15 +519,11 @@ property for user to dynamically switch configuration. The first row of the range will be bound to whatever row (indirectly) selected by that property. - Ending cell address. + Laatste cel in het bereik -The first column of the range is assumed to contain a list of configuration -names, which will be used to generate a string list and bind to the given -property for user to dynamically switch configuration. +De eerste kolom (van het bereik) moet worden gebruikt voor een lijst met namen van configuraties. De namen worden gebruikt om een set gegevens te genereren en die te verbinden met de eigenschappen en waarden van de objecten. -The first row of the range will be bound to whatever row (indirectly) selected -by that property. - +De eerste rij van het bereik geeft de waarden aan van de rij die geselecteerd is. @@ -544,8 +534,7 @@ by that property. Type in an expression to specify the object and property name to dynamically switch the design configuration. The property will be created if not exist. - Type in an expression to specify the object and property name to dynamically -switch the design configuration. The property will be created if not exist. + Typ hier een expressie om de object- en eigenschapsnaam op te geven (object.eigenschap) om daarmee de ontwerpconfiguratie te kunnen veranderen. De eigenschap zal worden aangemaakt als deze nog niet bestaat (tip: objectnaam.configuratie). @@ -555,12 +544,12 @@ switch the design configuration. The property will be created if not exist. Optional property group name. - Optional property group name. + Optionele naam voor de eigenschap groep naam. Unsetup - Unsetup + Verwijder de opzet @@ -881,25 +870,25 @@ Spreadsheet.mijn_alias_naam in plaats van Spreadsheet.B1 Bind cells - Bind cells + Verbind cellen Source and target cell count mismatch. Partial binding may still work. Do you want to continue? - Source and target cell count mismatch. Partial binding may still work. + Het aantal bron- en doelcellen komt niet overeen. Gedeeltelijke verbinding zou nog kunnen werken. -Do you want to continue? +Wilt u doorgaan? Bind Spreadsheet Cells - Bind Spreadsheet Cells + Verbind spreadsheet cellen - Error: + Error: Fout: @@ -907,7 +896,7 @@ Do you want to continue? Unbind cells - Unbind cells + Verbinding verwijderen @@ -925,12 +914,12 @@ Do you want to continue? If checked, use the custom presentation to display cell string. - If checked, use the custom presentation to display cell string. + Indien aangevinkt, toont ook de alias in de cel. Show alias in cell with format - Show alias in cell with format + Toon de alias in de cel (inclusief opmaak) @@ -939,11 +928,11 @@ Defaults to: %V = %A %A - alias name %V - cell value - The format of the custom cell string presentation. -Defaults to: %V = %A - -%A - alias name -%V - cell value + De opmaak van de cel wordt dan: +Standaard: %V = %A +waarbij: +%A - naam van de alias +%V - waarde in de cel @@ -953,12 +942,12 @@ Defaults to: %V = %A Delimiter Character: - Delimiter Character: + Scheidingsteken: <html><head/><body><p>Character to use as field delimiter. Default is tab, but also commonly used are commas (,) and semicolons (;). Select from the list or enter your own in the field. Must be a single character or the words <span style=" font-style:italic;">tab</span>, <span style=" font-style:italic;">comma</span>, or <span style=" font-style:italic;">semicolon</span>.</p></body></html> - <html><head/><body><p>Character to use as field delimiter. Default is tab, but also commonly used are commas (,) and semicolons (;). Select from the list or enter your own in the field. Must be a single character or the words <span style=" font-style:italic;">tab</span>, <span style=" font-style:italic;">comma</span>, or <span style=" font-style:italic;">semicolon</span>.</p></body></html> + Teken om te gebruiken als veldscheidingsteken. Standaard is de -tab-, maar ook vaak gebruikt is de komma (,) en puntkomma (;). Selecteer uit de lijst of voer uw eigen teken in het veld in. Moet een enkel teken zijn of de woorden -tab-, -comma- of -semicolon- @@ -973,7 +962,7 @@ Defaults to: %V = %A <html><head/><body><p>Character used to delimit strings, typically is single quote (') or double quote (&quot;). Must be a single character.</p></body></html> - <html><head/><body><p>Character used to delimit strings, typically is single quote (') or double quote (&quot;). Must be a single character.</p></body></html> + Teken dat wordt gebruikt om tekenreeksen te scheiden, meestal is het een enkele aanhalingsteken (') of een dubbel aanhalingsteken ("). Het moet een enkel teken zijn @@ -983,7 +972,7 @@ Defaults to: %V = %A <html><head/><body><p>Escape character, typically the backslash (\), used to indicate special unprintable characters, e.g. \t = tab. Must be a single character.</p></body></html> - <html><head/><body><p>Escape character, typically the backslash (\), used to indicate special unprintable characters, e.g. \t = tab. Must be a single character.</p></body></html> + -Escape- teken, meestal de backslash (\), gebruikt om speciale niet af te drukken tekens aan te geven, bijvoorbeeld: \t = tab. Moet een enkel teken zijn. @@ -991,12 +980,12 @@ Defaults to: %V = %A Setup configuration table - Setup configuration table + Opzet van de configuratie tabel Unsetup configuration table - Unsetup configuration table + Configuratie tabel verwijderen @@ -1021,7 +1010,7 @@ Defaults to: %V = %A Insert %n non-contiguous rows - Insert %n non-contiguous rows + Voeg %n afzonderlijke kolommen in Insert %n non-contiguous rows @@ -1053,7 +1042,7 @@ Defaults to: %V = %A Insert %n non-contiguous columns - Insert %n non-contiguous columns + Voeg %n afzonderlijke kolommen in Insert %n non-contiguous columns @@ -1105,7 +1094,7 @@ Defaults to: %V = %A Cut - Snijden + Knippen @@ -1149,7 +1138,7 @@ Defaults to: %V = %A &Spreadsheet - &Spreadsheet + &Spreadsheet diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts index 11ddb8c3dd..e10916d766 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts @@ -898,7 +898,7 @@ Czy chcesz kontynuować? - Error: + Error: Błąd: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts index effb286f80..c905e0b0ff 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts @@ -898,7 +898,7 @@ Do you want to continue? - Error: + Error: Erro: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts index e27a3ac41c..f9d6eceec1 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts index 935ab8403f..852cf5550d 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts @@ -897,9 +897,9 @@ Doriţi să continuaţi? - Error: + Error: - Eroare: + Eroare: @@ -1012,7 +1012,7 @@ Implicit la: %V = %A Insert %n row(s) below - Introduceți i%n rânduri mai (jos) + Introduceți rânduri mai jos Introduceți i%n rânduri mai jos Insert %n row(s) below @@ -1123,7 +1123,7 @@ Implicit la: %V = %A Paste - Paste + Lipește diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts index 90922c539e..d23e010c19 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts @@ -896,7 +896,7 @@ Do you want to continue? - Error: + Error: Ошибка: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sk.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sk.ts index 9e1d09518d..0d1eff2414 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sk.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sk.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts index f420ede6b6..ce8145b973 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts @@ -897,7 +897,7 @@ Ali želite nadaljevati? - Error: + Error: Napaka: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts index c74f48fdab..f66fb9a32c 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts @@ -899,7 +899,7 @@ Da li želiš da nastaviš? - Error: + Error: Greška: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts index e98e87122b..59b8aa2675 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts @@ -899,7 +899,7 @@ Do you want to continue? - Error: + Error: Грешка: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts index 4f7ddff45b..6838d8c497 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts index 078258f80b..ec453552da 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts @@ -897,7 +897,7 @@ Do you want to continue? - Error: + Error: Hata: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts index 3b4787486f..2a287e97d5 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts @@ -506,10 +506,10 @@ by that property. Початкова адреса комірки. Передбачається, що перший стовпець діапазону містить список імен конфігурації, -які будуть використовуватися для створення списку рядків та привʼязки до цієї +які будуть використовуватися для створення списку рядків та привʼязки до цієї властивості, щоб користувач міг динамічно перемикати конфігурації. -Перший рядок діапазону буде привʼязаний до будь-якого рядка (непрямо), +Перший рядок діапазону буде привʼязаний до будь-якого рядка (непрямо), обраного за допомогою цієї властивості. @@ -527,10 +527,10 @@ by that property. Кінцева адреса комірки. Передбачається, що перший стовпець діапазону містить список імен конфігурації, -які будуть використовуватися для створення списку рядків та привʼязки до цієї +які будуть використовуватися для створення списку рядків та привʼязки до цієї властивості, щоб користувач міг динамічно перемикати конфігурації. -Перший рядок діапазону буде привʼязаний до будь-якого рядка (непрямо), +Перший рядок діапазону буде привʼязаний до будь-якого рядка (непрямо), обраного за допомогою цієї властивості. @@ -543,7 +543,7 @@ by that property. Type in an expression to specify the object and property name to dynamically switch the design configuration. The property will be created if not exist. - Введіть вираз, щоб вказати назву обʼєкта та властивості, щоб динамічно + Введіть вираз, щоб вказати назву обʼєкта та властивості, щоб динамічно змінювати конфігурацію проєкту. Якщо властивість не існує, вона буде створена. @@ -898,9 +898,9 @@ Do you want to continue? - Error: + Error: - Помилка: + Помилка: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts index 2da1746002..eb8554b4e3 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_vi.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_vi.ts index 77f52c2606..8212324654 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_vi.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_vi.ts @@ -897,9 +897,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts index 869f7c4d31..1be5a0a8da 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts index 8e5b28dd11..c3bc7b43bc 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts @@ -899,9 +899,9 @@ Do you want to continue? - Error: + Error: - Error: + Error: diff --git a/src/Mod/Spreadsheet/Gui/SheetModel.cpp b/src/Mod/Spreadsheet/Gui/SheetModel.cpp index 86cd2f099d..10f6b365eb 100644 --- a/src/Mod/Spreadsheet/Gui/SheetModel.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetModel.cpp @@ -43,14 +43,16 @@ using namespace Spreadsheet; using namespace App; namespace sp = std::placeholders; -SheetModel::SheetModel(Sheet* _sheet, QObject* parent) : QAbstractTableModel(parent), sheet(_sheet) +SheetModel::SheetModel(Sheet* _sheet, QObject* parent) + : QAbstractTableModel(parent) + , sheet(_sheet) { - //NOLINTBEGIN + // NOLINTBEGIN cellUpdatedConnection = sheet->cellUpdated.connect(std::bind(&SheetModel::cellUpdated, this, sp::_1)); rangeUpdatedConnection = sheet->rangeUpdated.connect(std::bind(&SheetModel::rangeUpdated, this, sp::_1)); - //NOLINTEND + // NOLINTEND ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Spreadsheet"); @@ -99,7 +101,7 @@ QVariant formatCellDisplay(QString value, const Cell* cell) } return QVariant(value); } -}// namespace +} // namespace QVariant SheetModel::data(const QModelIndex& index, int role) const { @@ -108,10 +110,11 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const int col = index.column(); const Cell* cell = sheet->getCell(CellAddress(row, col)); - if (!cell) + if (!cell) { cell = emptyCell; + } -//#define DEBUG_DEPS +// #define DEBUG_DEPS #ifdef DEBUG_DEPS if (role == Qt::ToolTipRole) { QString v; @@ -123,15 +126,17 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const if (deps.size() > 0) { v += QString::fromUtf8("Depends on:"); - for (std::set::const_iterator i = deps.begin(); i != deps.end(); ++i) + for (std::set::const_iterator i = deps.begin(); i != deps.end(); ++i) { v += QString::fromUtf8("\n\t") + Tools::fromStdString(*i); + } v += QString::fromUtf8("\n"); } if (provides.size() > 0) { v += QString::fromUtf8("Used by:"); for (std::set::const_iterator i = provides.begin(); i != provides.end(); - ++i) + ++i) { v += QString::fromUtf8("\n\t") + Tools::fromStdString(*i); + } v += QString::fromUtf8("\n"); } return QVariant(v); @@ -139,8 +144,9 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const #else if (!cell->hasException() && role == Qt::ToolTipRole) { std::string alias; - if (cell->getAlias(alias)) + if (cell->getAlias(alias)) { return QVariant(Base::Tools::fromStdString(alias)); + } } #endif @@ -156,8 +162,9 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const QString::fromUtf8("#ERR: %1").arg(Tools::fromStdString(cell->getException()))); #else std::string str; - if (cell->getStringContent(str)) + if (cell->getStringContent(str)) { return QVariant::fromValue(QString::fromUtf8(str.c_str())); + } return QVariant::fromValue(QString::fromUtf8("#ERR")); #endif } @@ -174,8 +181,9 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const if (role == Qt::EditRole || role == Qt::StatusTipRole) { std::string str; - if (cell->getStringContent(str)) + if (cell->getStringContent(str)) { return QVariant(QString::fromUtf8(str.c_str())); + } return {}; } @@ -186,9 +194,10 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const if (role == Qt::BackgroundRole) { Color color; - if (cell->getBackground(color)) + if (cell->getBackground(color)) { return QVariant::fromValue( QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)); + } else { std::string alias; if (cell->getAlias(alias)) { @@ -203,30 +212,39 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const int alignment; cell->getAlignment(alignment); - if (alignment & Cell::ALIGNMENT_LEFT) + if (alignment & Cell::ALIGNMENT_LEFT) { qtAlignment |= Qt::AlignLeft; - if (alignment & Cell::ALIGNMENT_HCENTER) + } + if (alignment & Cell::ALIGNMENT_HCENTER) { qtAlignment |= Qt::AlignHCenter; - if (alignment & Cell::ALIGNMENT_RIGHT) + } + if (alignment & Cell::ALIGNMENT_RIGHT) { qtAlignment |= Qt::AlignRight; - if (alignment & Cell::ALIGNMENT_TOP) + } + if (alignment & Cell::ALIGNMENT_TOP) { qtAlignment |= Qt::AlignTop; - if (alignment & Cell::ALIGNMENT_VCENTER) + } + if (alignment & Cell::ALIGNMENT_VCENTER) { qtAlignment |= Qt::AlignVCenter; - if (alignment & Cell::ALIGNMENT_BOTTOM) + } + if (alignment & Cell::ALIGNMENT_BOTTOM) { qtAlignment |= Qt::AlignBottom; + } std::set style; if (role == Qt::FontRole && cell->getStyle(style)) { QFont f; for (const auto& i : style) { - if (i == "bold") + if (i == "bold") { f.setBold(true); - else if (i == "italic") + } + else if (i == "italic") { f.setItalic(true); - else if (i == "underline") + } + else if (i == "underline") { f.setUnderline(true); + } } return QVariant::fromValue(f); @@ -238,8 +256,9 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const if (!prop || dirty) { switch (role) { case Qt::ForegroundRole: { - return QColor(0, 0, - 255.0);// TODO: Remove this hardcoded color, replace with preference + return QColor(0, + 0, + 255.0); // TODO: Remove this hardcoded color, replace with preference } case Qt::TextAlignmentRole: { qtAlignment = Qt::AlignHCenter | Qt::AlignVCenter; @@ -275,11 +294,13 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const case Qt::ForegroundRole: { Color color; - if (cell->getForeground(color)) + if (cell->getForeground(color)) { return QVariant::fromValue( QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)); - else + } + else { return QVariant(QColor(textFgColor)); + } } case Qt::DisplayRole: { QString v = QString::fromUtf8(stringProp->getValue()); @@ -308,14 +329,17 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const case Qt::ForegroundRole: { Color color; - if (cell->getForeground(color)) + if (cell->getForeground(color)) { return QVariant::fromValue( QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)); + } else { - if (floatProp->getValue() < 0) + if (floatProp->getValue() < 0) { return QVariant::fromValue(QColor(negativeFgColor)); - else + } + else { return QVariant::fromValue(QColor(positiveFgColor)); + } } } case Qt::TextAlignmentRole: { @@ -338,9 +362,11 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const if (cell->getDisplayUnit(displayUnit)) { if (computedUnit.isEmpty() || computedUnit == displayUnit.unit) { QString number = - QLocale().toString(floatProp->getValue() / displayUnit.scaler, 'f', + QLocale().toString(floatProp->getValue() / displayUnit.scaler, + 'f', Base::UnitsApi::getDecimals()); - //QString number = QString::number(floatProp->getValue() / displayUnit.scaler); + // QString number = QString::number(floatProp->getValue() / + // displayUnit.scaler); v = number + Base::Tools::fromStdString(" " + displayUnit.stringRep); } else { @@ -366,8 +392,9 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const double d; long l; bool isInteger = false; - if (prop->isDerivedFrom(App::PropertyFloat::getClassTypeId())) + if (prop->isDerivedFrom(App::PropertyFloat::getClassTypeId())) { d = static_cast(prop)->getValue(); + } else { isInteger = true; l = static_cast(prop)->getValue(); @@ -378,14 +405,17 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const case Qt::ForegroundRole: { Color color; - if (cell->getForeground(color)) + if (cell->getForeground(color)) { return QVariant::fromValue( QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)); + } else { - if (d < 0) + if (d < 0) { return QVariant::fromValue(QColor(negativeFgColor)); - else + } + else { return QVariant::fromValue(QColor(positiveFgColor)); + } } } case Qt::TextAlignmentRole: { @@ -405,17 +435,19 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const // Display locale specific decimal separator (#0003875,#0003876) if (cell->getDisplayUnit(displayUnit)) { - QString number = QLocale().toString(d / displayUnit.scaler, 'f', + QString number = QLocale().toString(d / displayUnit.scaler, + 'f', Base::UnitsApi::getDecimals()); - //QString number = QString::number(d / displayUnit.scaler); + // QString number = QString::number(d / displayUnit.scaler); v = number + Base::Tools::fromStdString(" " + displayUnit.stringRep); } else if (!isInteger) { v = QLocale::system().toString(d, 'f', Base::UnitsApi::getDecimals()); - //v = QString::number(d); + // v = QString::number(d); } - else + else { v = QString::number(l); + } return formatCellDisplay(v, cell); } default: @@ -429,11 +461,13 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const case Qt::ForegroundRole: { Color color; - if (cell->getForeground(color)) + if (cell->getForeground(color)) { return QVariant::fromValue( QColor(255.0 * color.r, 255.0 * color.g, 255.0 * color.b, 255.0 * color.a)); - else + } + else { return QVariant(QColor(textFgColor)); + } } case Qt::TextAlignmentRole: { if (alignment & Cell::ALIGNMENT_HIMPLIED) { @@ -478,12 +512,14 @@ QVariant SheetModel::data(const QModelIndex& index, int role) const QVariant SheetModel::headerData(int section, Qt::Orientation orientation, int role) const { if (role == Qt::SizeHintRole) { - if (orientation == Qt::Horizontal) + if (orientation == Qt::Horizontal) { return QVariant( QSize(sheet->getColumnWidth(section), PropertyRowHeights::defaultHeight)); - else + } + else { return QVariant( QSize(PropertyColumnWidths::defaultHeaderWidth, sheet->getRowHeight(section))); + } } if (role == Qt::DisplayRole) { if (orientation == Qt::Horizontal) { @@ -537,12 +573,16 @@ bool SheetModel::setData(const QModelIndex& index, const QVariant& value, int ro if (cell) { std::string oldContent; cell->getStringContent(oldContent); - if (str == QString::fromStdString(oldContent)) + if (str == QString::fromStdString(oldContent)) { return true; + } } - QMetaObject::invokeMethod(this, "setCellData", Qt::QueuedConnection, - Q_ARG(QModelIndex, index), Q_ARG(QString, str)); + QMetaObject::invokeMethod(this, + "setCellData", + Qt::QueuedConnection, + Q_ARG(QModelIndex, index), + Q_ARG(QString, str)); } return true; } diff --git a/src/Mod/Spreadsheet/Gui/SheetModel.h b/src/Mod/Spreadsheet/Gui/SheetModel.h index db8d5cd865..f3a44f7b60 100644 --- a/src/Mod/Spreadsheet/Gui/SheetModel.h +++ b/src/Mod/Spreadsheet/Gui/SheetModel.h @@ -28,43 +28,45 @@ #include -namespace Spreadsheet { +namespace Spreadsheet +{ class Sheet; } -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ -class SheetModel : public QAbstractTableModel +class SheetModel: public QAbstractTableModel { Q_OBJECT public: - explicit SheetModel(Spreadsheet::Sheet * _sheet, QObject *parent = nullptr); + explicit SheetModel(Spreadsheet::Sheet* _sheet, QObject* parent = nullptr); ~SheetModel() override; - explicit SheetModel(QObject *parent); - int rowCount(const QModelIndex &parent = QModelIndex()) const override ; - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + explicit SheetModel(QObject* parent); + int rowCount(const QModelIndex& parent = QModelIndex()) const override; + int columnCount(const QModelIndex& parent = QModelIndex()) const override; + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; QVariant headerData(int section, Qt::Orientation orientation, int role) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role) override; - Qt::ItemFlags flags(const QModelIndex &) const override; + bool setData(const QModelIndex& index, const QVariant& value, int role) override; + Qt::ItemFlags flags(const QModelIndex&) const override; private Q_SLOTS: void setCellData(QModelIndex index, QString str); private: void cellUpdated(App::CellAddress address); - void rangeUpdated(const App::Range &range); + void rangeUpdated(const App::Range& range); boost::signals2::scoped_connection cellUpdatedConnection; boost::signals2::scoped_connection rangeUpdatedConnection; - Spreadsheet::Sheet * sheet; + Spreadsheet::Sheet* sheet; QColor aliasBgColor; QColor textFgColor; QColor positiveFgColor; QColor negativeFgColor; }; -} +} // namespace SpreadsheetGui -#endif // SHEETMODEL_H +#endif // SHEETMODEL_H diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp index 46e9ead2d4..ff891b4708 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.cpp @@ -23,15 +23,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include #endif -# include +#include #include #include @@ -45,11 +45,11 @@ #include #include -#include "SheetTableView.h" #include "DlgBindSheet.h" #include "DlgSheetConf.h" #include "LineEdit.h" #include "PropertiesDialog.h" +#include "SheetTableView.h" using namespace SpreadsheetGui; @@ -57,23 +57,25 @@ using namespace Spreadsheet; using namespace App; namespace sp = std::placeholders; -void SheetViewHeader::mouseReleaseEvent(QMouseEvent *event) +void SheetViewHeader::mouseReleaseEvent(QMouseEvent* event) { QHeaderView::mouseReleaseEvent(event); Q_EMIT resizeFinished(); } -bool SheetViewHeader::viewportEvent(QEvent *e) { - if(e->type() == QEvent::ContextMenu) { - auto *ce = static_cast(e); +bool SheetViewHeader::viewportEvent(QEvent* e) +{ + if (e->type() == QEvent::ContextMenu) { + auto* ce = static_cast(e); int section = logicalIndexAt(ce->pos()); - if(section>=0) { - if(orientation() == Qt::Horizontal) { - if(!owner->selectionModel()->isColumnSelected(section,owner->rootIndex())) { + if (section >= 0) { + if (orientation() == Qt::Horizontal) { + if (!owner->selectionModel()->isColumnSelected(section, owner->rootIndex())) { owner->clearSelection(); owner->selectColumn(section); } - }else if(!owner->selectionModel()->isRowSelected(section,owner->rootIndex())) { + } + else if (!owner->selectionModel()->isRowSelected(section, owner->rootIndex())) { owner->clearSelection(); owner->selectRow(section); } @@ -86,7 +88,7 @@ static std::pair selectedMinMaxRows(QModelIndexList list) { int min = std::numeric_limits::max(); int max = 0; - for (const auto & item : list) { + for (const auto& item : list) { int row = item.row(); min = std::min(row, min); max = std::max(row, max); @@ -98,7 +100,7 @@ static std::pair selectedMinMaxColumns(QModelIndexList list) { int min = std::numeric_limits::max(); int max = 0; - for (const auto & item : list) { + for (const auto& item : list) { int column = item.column(); min = std::min(column, min); max = std::max(column, max); @@ -106,65 +108,71 @@ static std::pair selectedMinMaxColumns(QModelIndexList list) return {min, max}; } -SheetTableView::SheetTableView(QWidget *parent) +SheetTableView::SheetTableView(QWidget* parent) : QTableView(parent) , sheet(nullptr) , tabCounter(0) { - setHorizontalHeader(new SheetViewHeader(this,Qt::Horizontal)); - setVerticalHeader(new SheetViewHeader(this,Qt::Vertical)); + setHorizontalHeader(new SheetViewHeader(this, Qt::Horizontal)); + setVerticalHeader(new SheetViewHeader(this, Qt::Vertical)); setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel); - connect(verticalHeader(), &QWidget::customContextMenuRequested, - [this](const QPoint &point){ - QMenu menu(this); - const auto selection = selectionModel()->selectedRows(); - const auto & [min, max] = selectedMinMaxRows(selection); - if (bool isContiguous = max - min == selection.size() - 1) { - Q_UNUSED(isContiguous) - /*: This is shown in the context menu for the vertical header in a spreadsheet. - The number refers to how many lines are selected and will be inserted. */ - auto insertBefore = menu.addAction(tr("Insert %n row(s) above", "", selection.size())); - connect(insertBefore, &QAction::triggered, this, &SheetTableView::insertRows); + connect(verticalHeader(), &QWidget::customContextMenuRequested, [this](const QPoint& point) { + QMenu menu(this); + const auto selection = selectionModel()->selectedRows(); + const auto& [min, max] = selectedMinMaxRows(selection); + if (bool isContiguous = max - min == selection.size() - 1) { + Q_UNUSED(isContiguous) + /*: This is shown in the context menu for the vertical header in a spreadsheet. + The number refers to how many lines are selected and will be inserted. */ + auto insertBefore = menu.addAction(tr("Insert %n row(s) above", "", selection.size())); + connect(insertBefore, &QAction::triggered, this, &SheetTableView::insertRows); - if (max < model()->rowCount() - 1) { - auto insertAfter = menu.addAction(tr("Insert %n row(s) below", "", selection.size())); - connect(insertAfter, &QAction::triggered, this, &SheetTableView::insertRowsAfter); - } - } else { - auto insert = menu.addAction(tr("Insert %n non-contiguous rows", "", selection.size())); - connect(insert, &QAction::triggered, this, &SheetTableView::insertRows); + if (max < model()->rowCount() - 1) { + auto insertAfter = + menu.addAction(tr("Insert %n row(s) below", "", selection.size())); + connect(insertAfter, &QAction::triggered, this, &SheetTableView::insertRowsAfter); } - auto remove = menu.addAction(tr("Remove row(s)", "", selection.size())); - connect(remove, &QAction::triggered, this, &SheetTableView::removeRows); - menu.exec(verticalHeader()->mapToGlobal(point)); - }); + } + else { + auto insert = menu.addAction(tr("Insert %n non-contiguous rows", "", selection.size())); + connect(insert, &QAction::triggered, this, &SheetTableView::insertRows); + } + auto remove = menu.addAction(tr("Remove row(s)", "", selection.size())); + connect(remove, &QAction::triggered, this, &SheetTableView::removeRows); + menu.exec(verticalHeader()->mapToGlobal(point)); + }); - connect(horizontalHeader(), &QWidget::customContextMenuRequested, - [this](const QPoint &point){ - QMenu menu(this); - const auto selection = selectionModel()->selectedColumns(); - const auto & [min, max] = selectedMinMaxColumns(selection); - if (bool isContiguous = max - min == selection.size() - 1) { - Q_UNUSED(isContiguous) - /*: This is shown in the context menu for the horizontal header in a spreadsheet. - The number refers to how many lines are selected and will be inserted. */ - auto insertAbove = menu.addAction(tr("Insert %n column(s) left", "", selection.size())); - connect(insertAbove, &QAction::triggered, this, &SheetTableView::insertColumns); + connect(horizontalHeader(), &QWidget::customContextMenuRequested, [this](const QPoint& point) { + QMenu menu(this); + const auto selection = selectionModel()->selectedColumns(); + const auto& [min, max] = selectedMinMaxColumns(selection); + if (bool isContiguous = max - min == selection.size() - 1) { + Q_UNUSED(isContiguous) + /*: This is shown in the context menu for the horizontal header in a spreadsheet. + The number refers to how many lines are selected and will be inserted. */ + auto insertAbove = menu.addAction(tr("Insert %n column(s) left", "", selection.size())); + connect(insertAbove, &QAction::triggered, this, &SheetTableView::insertColumns); - if (max < model()->columnCount() - 1) { - auto insertAfter = menu.addAction(tr("Insert %n column(s) right", "", selection.size())); - connect(insertAfter, &QAction::triggered, this, &SheetTableView::insertColumnsAfter); - } - } else { - auto insert = menu.addAction(tr("Insert %n non-contiguous columns", "", selection.size())); - connect(insert, &QAction::triggered, this, &SheetTableView::insertColumns); + if (max < model()->columnCount() - 1) { + auto insertAfter = + menu.addAction(tr("Insert %n column(s) right", "", selection.size())); + connect(insertAfter, + &QAction::triggered, + this, + &SheetTableView::insertColumnsAfter); } - auto remove = menu.addAction(tr("Remove column(s)", "", selection.size())); - connect(remove, &QAction::triggered, this, &SheetTableView::removeColumns); - menu.exec(horizontalHeader()->mapToGlobal(point)); - }); + } + else { + auto insert = + menu.addAction(tr("Insert %n non-contiguous columns", "", selection.size())); + connect(insert, &QAction::triggered, this, &SheetTableView::insertColumns); + } + auto remove = menu.addAction(tr("Remove column(s)", "", selection.size())); + connect(remove, &QAction::triggered, this, &SheetTableView::removeColumns); + menu.exec(horizontalHeader()->mapToGlobal(point)); + }); actionProperties = new QAction(tr("Properties..."), this); addAction(actionProperties); @@ -178,15 +186,15 @@ SheetTableView::SheetTableView(QWidget *parent) connect(actionProperties, &QAction::triggered, this, &SheetTableView::cellProperties); contextMenu->addSeparator(); - actionRecompute = new QAction(tr("Recompute"),this); + actionRecompute = new QAction(tr("Recompute"), this); connect(actionRecompute, &QAction::triggered, this, &SheetTableView::onRecompute); contextMenu->addAction(actionRecompute); - actionBind = new QAction(tr("Bind..."),this); + actionBind = new QAction(tr("Bind..."), this); connect(actionBind, &QAction::triggered, this, &SheetTableView::onBind); contextMenu->addAction(actionBind); - actionConf = new QAction(tr("Configuration table..."),this); + actionConf = new QAction(tr("Configuration table..."), this); connect(actionConf, &QAction::triggered, this, &SheetTableView::onConfSetup); contextMenu->addAction(actionConf); @@ -212,31 +220,39 @@ SheetTableView::SheetTableView(QWidget *parent) setTabKeyNavigation(false); timer.setSingleShot(true); - QObject::connect(&timer, &QTimer::timeout, [this](){updateCellSpan();}); + QObject::connect(&timer, &QTimer::timeout, [this]() { + updateCellSpan(); + }); } -void SheetTableView::onRecompute() { +void SheetTableView::onRecompute() +{ Gui::Command::openCommand("Recompute cells"); - for(auto &range : selectedRanges()) { - Gui::cmdAppObjectArgs(sheet, "recomputeCells('%s', '%s')", - range.fromCellString(), range.toCellString()); + for (auto& range : selectedRanges()) { + Gui::cmdAppObjectArgs(sheet, + "recomputeCells('%s', '%s')", + range.fromCellString(), + range.toCellString()); } Gui::Command::commitCommand(); } -void SheetTableView::onBind() { +void SheetTableView::onBind() +{ auto ranges = selectedRanges(); - if(!ranges.empty() && ranges.size()<=2) { - DlgBindSheet dlg(sheet,ranges,this); + if (!ranges.empty() && ranges.size() <= 2) { + DlgBindSheet dlg(sheet, ranges, this); dlg.exec(); } } -void SheetTableView::onConfSetup() { +void SheetTableView::onConfSetup() +{ auto ranges = selectedRanges(); - if(ranges.empty()) + if (ranges.empty()) { return; - DlgSheetConf dlg(sheet,ranges.back(),this); + } + DlgSheetConf dlg(sheet, ranges.back(), this); dlg.exec(); } @@ -254,9 +270,11 @@ std::vector SheetTableView::selectedRanges() const std::vector result; if (!sheet->getCells()->hasSpan()) { - for (const auto &sel : selectionModel()->selection()) + for (const auto& sel : selectionModel()->selection()) { result.emplace_back(sel.top(), sel.left(), sel.bottom(), sel.right()); - } else { + } + } + else { // If there is spanning cell, QItemSelection returned by // QTableView::selection() does not merge selected indices into ranges. // So we have to do it by ourselves. Qt records selection in the order @@ -267,32 +285,28 @@ std::vector SheetTableView::selectedRanges() const // together. For example, consecutive single column selections that // form a rectangle will be merged together, but single row selections // will not be merged. - for (const auto &sel : selectionModel()->selection()) { + for (const auto& sel : selectionModel()->selection()) { if (!result.empty() && sel.bottom() == sel.top() && sel.right() == sel.left()) { - auto &last = result.back(); - if (last.colCount() == 1 - && last.from().col() == sel.left() - && sel.top() == last.to().row() + 1) - { + auto& last = result.back(); + if (last.colCount() == 1 && last.from().col() == sel.left() + && sel.top() == last.to().row() + 1) { // This is the case of rectangle selection. We keep // accumulating the last column, and try to merge the // column to previous range whenever possible. last = Range(last.from(), CellAddress(sel.top(), sel.left())); if (result.size() > 1) { - auto &secondLast = result[result.size()-2]; + auto& secondLast = result[result.size() - 2]; if (secondLast.to().col() + 1 == last.to().col() - && secondLast.from().row() == last.from().row() - && secondLast.rowCount() == last.rowCount()) { + && secondLast.from().row() == last.from().row() + && secondLast.rowCount() == last.rowCount()) { secondLast = Range(secondLast.from(), last.to()); result.pop_back(); } } continue; } - else if (last.rowCount() == 1 - && last.from().row() == sel.top() - && last.to().col() + 1 == sel.left()) - { + else if (last.rowCount() == 1 && last.from().row() == sel.top() + && last.to().col() + 1 == sel.left()) { // This is the case of single row selection last = Range(last.from(), CellAddress(sel.top(), sel.left())); continue; @@ -337,8 +351,9 @@ void SheetTableView::insertRows() ++count; ++it; } - else + else { break; + } } Gui::cmdAppObjectArgs(sheet, "insertRows('%s', %d)", rowName(prev).c_str(), count); @@ -351,7 +366,7 @@ void SheetTableView::insertRowsAfter() { assert(sheet); const auto rows = selectionModel()->selectedRows(); - const auto & [min, max] = selectedMinMaxRows(rows); + const auto& [min, max] = selectedMinMaxRows(rows); assert(max - min == rows.size() - 1); Q_UNUSED(min) @@ -411,12 +426,12 @@ void SheetTableView::insertColumns() ++count; ++it; } - else + else { break; + } } - Gui::cmdAppObjectArgs(sheet, "insertColumns('%s', %d)", - columnName(prev).c_str(), count); + Gui::cmdAppObjectArgs(sheet, "insertColumns('%s', %d)", columnName(prev).c_str(), count); } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -431,7 +446,10 @@ void SheetTableView::insertColumnsAfter() Q_UNUSED(min) Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Insert columns")); - Gui::cmdAppObjectArgs(sheet, "insertColumns('%s', %d)", columnName(max + 1).c_str(), columns.size()); + Gui::cmdAppObjectArgs(sheet, + "insertColumns('%s', %d)", + columnName(max + 1).c_str(), + columns.size()); Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -452,8 +470,7 @@ void SheetTableView::removeColumns() /* Remove columns */ Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Remove rows")); for (const auto& it : sortedColumns) { - Gui::cmdAppObjectArgs(sheet, "removeColumns('%s', %d)", - columnName(it).c_str(), 1); + Gui::cmdAppObjectArgs(sheet, "removeColumns('%s', %d)", columnName(it).c_str(), 1); } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -466,15 +483,17 @@ void SheetTableView::updateCellSpan() int rows, cols; // Unspan first to avoid overlap - for (const auto &addr : spanChanges) { - if (rowSpan(addr.row(), addr.col()) > 1 || columnSpan(addr.row(), addr.col()) > 1) + for (const auto& addr : spanChanges) { + if (rowSpan(addr.row(), addr.col()) > 1 || columnSpan(addr.row(), addr.col()) > 1) { setSpan(addr.row(), addr.col(), 1, 1); + } } - for (const auto &addr : spanChanges) { + for (const auto& addr : spanChanges) { sheet->getSpans(addr, rows, cols); - if (rows > 1 || cols > 1) + if (rows > 1 || cols > 1) { setSpan(addr.row(), addr.col(), rows, cols); + } } spanChanges.clear(); } @@ -482,7 +501,7 @@ void SheetTableView::updateCellSpan() void SheetTableView::setSheet(Sheet* _sheet) { sheet = _sheet; - cellSpanChangedConnection = sheet->cellSpanChanged.connect([&](const CellAddress &addr) { + cellSpanChangedConnection = sheet->cellSpanChanged.connect([&](const CellAddress& addr) { spanChanges.insert(addr); timer.start(10); }); @@ -505,18 +524,19 @@ void SheetTableView::setSheet(Sheet* _sheet) for (std::map::const_iterator i = columWidths.begin(); i != columWidths.end(); ++i) { int newSize = i->second; - if (newSize > 0 && horizontalHeader()->sectionSize(i->first) != newSize) + if (newSize > 0 && horizontalHeader()->sectionSize(i->first) != newSize) { setColumnWidth(i->first, newSize); + } } std::map rowHeights = sheet->getRowHeights(); for (std::map::const_iterator i = rowHeights.begin(); i != rowHeights.end(); ++i) { int newSize = i->second; - if (newSize > 0 && verticalHeader()->sectionSize(i->first) != newSize) + if (newSize > 0 && verticalHeader()->sectionSize(i->first) != newSize) { setRowHeight(i->first, newSize); + } } - } void SheetTableView::commitData(QWidget* editor) @@ -526,8 +546,11 @@ void SheetTableView::commitData(QWidget* editor) bool SheetTableView::edit(const QModelIndex& index, EditTrigger trigger, QEvent* event) { - if (trigger & (QAbstractItemView::DoubleClicked | QAbstractItemView::AnyKeyPressed | QAbstractItemView::EditKeyPressed)) + if (trigger + & (QAbstractItemView::DoubleClicked | QAbstractItemView::AnyKeyPressed + | QAbstractItemView::EditKeyPressed)) { currentEditIndex = index; + } return QTableView::edit(index, trigger, event); } @@ -538,27 +561,36 @@ bool SheetTableView::event(QEvent* event) // and handle them. QKeyEvent* kevent = static_cast(event); switch (kevent->key()) { - case Qt::Key_Return: [[fallthrough]]; - case Qt::Key_Enter: [[fallthrough]]; - case Qt::Key_Home: [[fallthrough]]; - case Qt::Key_End: [[fallthrough]]; - case Qt::Key_Left: [[fallthrough]]; - case Qt::Key_Right: [[fallthrough]]; - case Qt::Key_Up: [[fallthrough]]; - case Qt::Key_Down: [[fallthrough]]; - case Qt::Key_Tab: [[fallthrough]]; - case Qt::Key_Backtab: - finishEditWithMove(kevent->key(), kevent->modifiers(), true); - return true; - // Also handle the delete key here: - case Qt::Key_Delete: - deleteSelection(); - return true; - case Qt::Key_Escape: - sheet->setCopyOrCutRanges({}); - return true; - default: - break; + case Qt::Key_Return: + [[fallthrough]]; + case Qt::Key_Enter: + [[fallthrough]]; + case Qt::Key_Home: + [[fallthrough]]; + case Qt::Key_End: + [[fallthrough]]; + case Qt::Key_Left: + [[fallthrough]]; + case Qt::Key_Right: + [[fallthrough]]; + case Qt::Key_Up: + [[fallthrough]]; + case Qt::Key_Down: + [[fallthrough]]; + case Qt::Key_Tab: + [[fallthrough]]; + case Qt::Key_Backtab: + finishEditWithMove(kevent->key(), kevent->modifiers(), true); + return true; + // Also handle the delete key here: + case Qt::Key_Delete: + deleteSelection(); + return true; + case Qt::Key_Escape: + sheet->setCopyOrCutRanges({}); + return true; + default: + break; } if (kevent->matches(QKeySequence::Cut)) { cutSelection(); @@ -574,21 +606,30 @@ bool SheetTableView::event(QEvent* event) } } else if (event && event->type() == QEvent::ShortcutOverride) { - QKeyEvent * kevent = static_cast(event); - if (kevent->modifiers() == Qt::NoModifier || - kevent->modifiers() == Qt::ShiftModifier || - kevent->modifiers() == Qt::KeypadModifier) { + QKeyEvent* kevent = static_cast(event); + if (kevent->modifiers() == Qt::NoModifier || kevent->modifiers() == Qt::ShiftModifier + || kevent->modifiers() == Qt::KeypadModifier) { switch (kevent->key()) { - case Qt::Key_Return: [[fallthrough]]; - case Qt::Key_Enter: [[fallthrough]]; - case Qt::Key_Delete: [[fallthrough]]; - case Qt::Key_Home: [[fallthrough]]; - case Qt::Key_End: [[fallthrough]]; - case Qt::Key_Backspace: [[fallthrough]]; - case Qt::Key_Left: [[fallthrough]]; - case Qt::Key_Right: [[fallthrough]]; - case Qt::Key_Up: [[fallthrough]]; - case Qt::Key_Down: [[fallthrough]]; + case Qt::Key_Return: + [[fallthrough]]; + case Qt::Key_Enter: + [[fallthrough]]; + case Qt::Key_Delete: + [[fallthrough]]; + case Qt::Key_Home: + [[fallthrough]]; + case Qt::Key_End: + [[fallthrough]]; + case Qt::Key_Backspace: + [[fallthrough]]; + case Qt::Key_Left: + [[fallthrough]]; + case Qt::Key_Right: + [[fallthrough]]; + case Qt::Key_Up: + [[fallthrough]]; + case Qt::Key_Down: + [[fallthrough]]; case Qt::Key_Tab: kevent->accept(); break; @@ -636,7 +677,9 @@ void SheetTableView::deleteSelection() std::vector::const_iterator i = ranges.begin(); for (; i != ranges.end(); ++i) { - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.clear('%s')", sheet->getNameInDocument(), + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.clear('%s')", + sheet->getNameInDocument(), i->rangeString().c_str()); } Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); @@ -651,13 +694,13 @@ void SheetTableView::copySelection() _copySelection(selectedRanges(), true); } -void SheetTableView::_copySelection(const std::vector &ranges, bool copy) +void SheetTableView::_copySelection(const std::vector& ranges, bool copy) { int minRow = INT_MAX; int maxRow = 0; int minCol = INT_MAX; int maxCol = 0; - for (auto &range : ranges) { + for (auto& range : ranges) { minRow = std::min(minRow, range.from().row()); maxRow = std::max(maxRow, range.to().row()); minCol = std::min(minCol, range.from().col()); @@ -665,23 +708,25 @@ void SheetTableView::_copySelection(const std::vector &ranges, bool } QString selectedText; - for (int i=minRow; i<=maxRow; i++) { - for (int j=minCol; j<=maxCol; j++) { - QModelIndex index = model()->index(i,j); + for (int i = minRow; i <= maxRow; i++) { + for (int j = minCol; j <= maxCol; j++) { + QModelIndex index = model()->index(i, j); QString cell = index.data(Qt::EditRole).toString(); - if (j < maxCol) + if (j < maxCol) { cell.append(QChar::fromLatin1('\t')); + } selectedText += cell; } - if (i < maxRow) + if (i < maxRow) { selectedText.append(QChar::fromLatin1('\n')); + } } Base::StringWriter writer; - sheet->getCells()->copyCells(writer,ranges); - QMimeData *mime = new QMimeData(); + sheet->getCells()->copyCells(writer, ranges); + QMimeData* mime = new QMimeData(); mime->setText(selectedText); - mime->setData(_SheetMime,QByteArray(writer.getString().c_str())); + mime->setData(_SheetMime, QByteArray(writer.getString().c_str())); QApplication::clipboard()->setMimeData(mime); sheet->setCopyOrCutRanges(std::move(ranges), copy); @@ -698,20 +743,22 @@ void SheetTableView::pasteClipboard() try { bool copy = true; auto ranges = sheet->getCopyOrCutRange(copy); - if(ranges.empty()) { + if (ranges.empty()) { copy = false; ranges = sheet->getCopyOrCutRange(copy); } - if(!ranges.empty()) + if (!ranges.empty()) { _copySelection(ranges, copy); + } const QMimeData* mimeData = QApplication::clipboard()->mimeData(); - if(!mimeData || !mimeData->hasText()) + if (!mimeData || !mimeData->hasText()) { return; + } - if(!copy) { - for(auto &range : ranges) { + if (!copy) { + for (auto& range : ranges) { do { sheet->clear(*range); } while (range.next()); @@ -719,46 +766,51 @@ void SheetTableView::pasteClipboard() } ranges = selectedRanges(); - if(ranges.empty()) + if (ranges.empty()) { return; + } Range range = ranges.back(); if (!mimeData->hasFormat(_SheetMime)) { CellAddress current = range.from(); QString text = mimeData->text(); QStringList cells = text.split(QLatin1Char('\n')); - int i=0; + int i = 0; for (const auto& it : cells) { QStringList cols = it.split(QLatin1Char('\t')); - int j=0; + int j = 0; for (const auto& jt : cols) { - QModelIndex index = model()->index(current.row()+i, current.col()+j); + QModelIndex index = model()->index(current.row() + i, current.col() + j); model()->setData(index, jt); j++; } i++; } - }else{ + } + else { QByteArray res = mimeData->data(_SheetMime); Base::ByteArrayIStreambuf buf(res); std::istream in(nullptr); in.rdbuf(&buf); Base::XMLReader reader("", in); - sheet->getCells()->pasteCells(reader,range); + sheet->getCells()->pasteCells(reader, range); } GetApplication().getActiveDocument()->recompute(); - - }catch(Base::Exception &e) { + } + catch (Base::Exception& e) { e.ReportException(); - QMessageBox::critical(Gui::getMainWindow(), QObject::tr("Copy & Paste failed"), - QString::fromLatin1(e.what())); + QMessageBox::critical(Gui::getMainWindow(), + QObject::tr("Copy & Paste failed"), + QString::fromLatin1(e.what())); return; } clearSelection(); } -void SheetTableView::finishEditWithMove(int keyPressed, Qt::KeyboardModifiers modifiers, bool handleTabMotion) +void SheetTableView::finishEditWithMove(int keyPressed, + Qt::KeyboardModifiers modifiers, + bool handleTabMotion) { // A utility lambda for finding the beginning and ending of data regions auto scanForRegionBoundary = [this](int& r, int& c, int dr, int dc) { @@ -797,119 +849,141 @@ void SheetTableView::finishEditWithMove(int keyPressed, Qt::KeyboardModifiers mo int rowSpan; sheet->getSpans(CellAddress(targetRow, targetColumn), rowSpan, colSpan); switch (keyPressed) { - case Qt::Key_Return: - case Qt::Key_Enter: - if (modifiers == Qt::NoModifier) { - targetRow += rowSpan; - targetColumn -= tabCounter; - } - else if (modifiers == Qt::ShiftModifier) { - targetRow -= 1; - targetColumn -= tabCounter; - } - else { - // For an unrecognized modifier, just go down - targetRow += rowSpan; - } - tabCounter = 0; - break; - - case Qt::Key_Home: - // Home: row 1, same column - // Ctrl-Home: row 1, column 1 - targetRow = 0; - if (modifiers == Qt::ControlModifier) - targetColumn = 0; - tabCounter = 0; - break; - - case Qt::Key_End: - { - // End should take you to the last occupied cell in the current column - // Ctrl-End takes you to the last cell in the sheet - auto usedCells = sheet->getCells()->getNonEmptyCells(); - for (const auto& cell : usedCells) { + case Qt::Key_Return: + case Qt::Key_Enter: if (modifiers == Qt::NoModifier) { - if (cell.col() == targetColumn) - targetRow = std::max(targetRow, cell.row()); + targetRow += rowSpan; + targetColumn -= tabCounter; } - else if (modifiers == Qt::ControlModifier) { - targetRow = std::max(targetRow, cell.row()); - targetColumn = std::max(targetColumn, cell.col()); + else if (modifiers == Qt::ShiftModifier) { + targetRow -= 1; + targetColumn -= tabCounter; + } + else { + // For an unrecognized modifier, just go down + targetRow += rowSpan; } - } - tabCounter = 0; - break; - } - - case Qt::Key_Left: - if (targetColumn == 0) - break; // Nothing to do, we're already in the first column - if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) - targetColumn--; - else if (modifiers == Qt::ControlModifier || - modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) - scanForRegionBoundary(targetRow, targetColumn, 0, -1); - else - targetColumn--; //Unrecognized modifier combination: default to just moving one cell - tabCounter = 0; - break; - case Qt::Key_Right: - if (targetColumn >= this->model()->columnCount() - 1) - break; // Nothing to do, we're already in the last column - if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) - targetColumn += colSpan; - else if (modifiers == Qt::ControlModifier || - modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) - scanForRegionBoundary(targetRow, targetColumn, 0, 1); - else - targetColumn += colSpan; //Unrecognized modifier combination: default to just moving one cell - tabCounter = 0; - break; - case Qt::Key_Up: - if (targetRow == 0) - break; // Nothing to do, we're already in the first column - if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) - targetRow--; - else if (modifiers == Qt::ControlModifier || - modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) - scanForRegionBoundary(targetRow, targetColumn, -1, 0); - else - targetRow--; //Unrecognized modifier combination: default to just moving one cell - tabCounter = 0; - break; - case Qt::Key_Down: - if (targetRow >= this->model()->rowCount() - 1) - break; // Nothing to do, we're already in the last row - if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) - targetRow += rowSpan; - else if (modifiers == Qt::ControlModifier || - modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) - scanForRegionBoundary(targetRow, targetColumn, 1, 0); - else - targetRow += rowSpan; //Unrecognized modifier combination: default to just moving one cell - tabCounter = 0; - break; - case Qt::Key_Tab: - if (modifiers == Qt::NoModifier) { - tabCounter++; - if (handleTabMotion) - targetColumn += colSpan; - } - else if (modifiers == Qt::ShiftModifier) { tabCounter = 0; - if (handleTabMotion) + break; + + case Qt::Key_Home: + // Home: row 1, same column + // Ctrl-Home: row 1, column 1 + targetRow = 0; + if (modifiers == Qt::ControlModifier) { + targetColumn = 0; + } + tabCounter = 0; + break; + + case Qt::Key_End: { + // End should take you to the last occupied cell in the current column + // Ctrl-End takes you to the last cell in the sheet + auto usedCells = sheet->getCells()->getNonEmptyCells(); + for (const auto& cell : usedCells) { + if (modifiers == Qt::NoModifier) { + if (cell.col() == targetColumn) { + targetRow = std::max(targetRow, cell.row()); + } + } + else if (modifiers == Qt::ControlModifier) { + targetRow = std::max(targetRow, cell.row()); + targetColumn = std::max(targetColumn, cell.col()); + } + } + tabCounter = 0; + break; + } + + case Qt::Key_Left: + if (targetColumn == 0) { + break; // Nothing to do, we're already in the first column + } + if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) { targetColumn--; - } - break; - case Qt::Key_Backtab: - if (modifiers == Qt::NoModifier) { - targetColumn--; - } - tabCounter = 0; - break; - default: - break; + } + else if (modifiers == Qt::ControlModifier + || modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) { + scanForRegionBoundary(targetRow, targetColumn, 0, -1); + } + else { + targetColumn--; // Unrecognized modifier combination: default to just moving one + // cell + } + tabCounter = 0; + break; + case Qt::Key_Right: + if (targetColumn >= this->model()->columnCount() - 1) { + break; // Nothing to do, we're already in the last column + } + if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) { + targetColumn += colSpan; + } + else if (modifiers == Qt::ControlModifier + || modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) { + scanForRegionBoundary(targetRow, targetColumn, 0, 1); + } + else { + targetColumn += + colSpan; // Unrecognized modifier combination: default to just moving one cell + } + tabCounter = 0; + break; + case Qt::Key_Up: + if (targetRow == 0) { + break; // Nothing to do, we're already in the first column + } + if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) { + targetRow--; + } + else if (modifiers == Qt::ControlModifier + || modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) { + scanForRegionBoundary(targetRow, targetColumn, -1, 0); + } + else { + targetRow--; // Unrecognized modifier combination: default to just moving one cell + } + tabCounter = 0; + break; + case Qt::Key_Down: + if (targetRow >= this->model()->rowCount() - 1) { + break; // Nothing to do, we're already in the last row + } + if (modifiers == Qt::NoModifier || modifiers == Qt::ShiftModifier) { + targetRow += rowSpan; + } + else if (modifiers == Qt::ControlModifier + || modifiers == (Qt::ControlModifier | Qt::ShiftModifier)) { + scanForRegionBoundary(targetRow, targetColumn, 1, 0); + } + else { + targetRow += + rowSpan; // Unrecognized modifier combination: default to just moving one cell + } + tabCounter = 0; + break; + case Qt::Key_Tab: + if (modifiers == Qt::NoModifier) { + tabCounter++; + if (handleTabMotion) { + targetColumn += colSpan; + } + } + else if (modifiers == Qt::ShiftModifier) { + tabCounter = 0; + if (handleTabMotion) { + targetColumn--; + } + } + break; + case Qt::Key_Backtab: + if (modifiers == Qt::NoModifier) { + targetColumn--; + } + tabCounter = 0; + break; + default: + break; } if (this->sheet->isMergedCell(CellAddress(targetRow, targetColumn))) { @@ -924,16 +998,18 @@ void SheetTableView::finishEditWithMove(int keyPressed, Qt::KeyboardModifiers mo targetRow = std::max(0, std::min(targetRow, maxRow)); targetColumn = std::max(0, std::min(targetColumn, maxCol)); - if (!(modifiers & Qt::ShiftModifier) || keyPressed == Qt::Key_Tab || keyPressed == Qt::Key_Enter || keyPressed == Qt::Key_Return) { - // We have to use this method so that Ctrl-modifier combinations don't result in multiple selection + if (!(modifiers & Qt::ShiftModifier) || keyPressed == Qt::Key_Tab || keyPressed == Qt::Key_Enter + || keyPressed == Qt::Key_Return) { + // We have to use this method so that Ctrl-modifier combinations don't result in multiple + // selection this->selectionModel()->setCurrentIndex(model()->index(targetRow, targetColumn), - QItemSelectionModel::ClearAndSelect); + QItemSelectionModel::ClearAndSelect); } else if (modifiers & Qt::ShiftModifier) { - // With shift down, this motion becomes a block selection command, rather than just simple motion: + // With shift down, this motion becomes a block selection command, rather than just simple + // motion: ModifyBlockSelection(targetRow, targetColumn); } - } void SheetTableView::ModifyBlockSelection(int targetRow, int targetCol) @@ -945,23 +1021,29 @@ void SheetTableView::ModifyBlockSelection(int targetRow, int targetCol) auto selection = this->selectionModel()->selection(); for (const auto& range : selection) { if (range.contains(currentIndex())) { - // This range contains the current cell, so it's the one we're going to modify (assuming we're at one of the corners) + // This range contains the current cell, so it's the one we're going to modify (assuming + // we're at one of the corners) int rangeMinRow = range.top(); int rangeMaxRow = range.bottom(); int rangeMinCol = range.left(); int rangeMaxCol = range.right(); - if ((startingRow == rangeMinRow || startingRow == rangeMaxRow) && - (startingCol == rangeMinCol || startingCol == rangeMaxCol)) { + if ((startingRow == rangeMinRow || startingRow == rangeMaxRow) + && (startingCol == rangeMinCol || startingCol == rangeMaxCol)) { if (range.contains(model()->index(targetRow, targetCol))) { - // If the range already contains the target cell, then we're making the range smaller - if (startingRow == rangeMinRow) + // If the range already contains the target cell, then we're making the range + // smaller + if (startingRow == rangeMinRow) { rangeMinRow = targetRow; - if (startingRow == rangeMaxRow) + } + if (startingRow == rangeMaxRow) { rangeMaxRow = targetRow; - if (startingCol == rangeMinCol) + } + if (startingCol == rangeMinCol) { rangeMinCol = targetCol; - if (startingCol == rangeMaxCol) + } + if (startingCol == rangeMaxCol) { rangeMaxCol = targetCol; + } } else { // We're making the range bigger @@ -972,25 +1054,29 @@ void SheetTableView::ModifyBlockSelection(int targetRow, int targetCol) } QItemSelection oldRange(range.topLeft(), range.bottomRight()); this->selectionModel()->select(oldRange, QItemSelectionModel::Deselect); - QItemSelection newRange(model()->index(rangeMinRow, rangeMinCol), model()->index(rangeMaxRow, rangeMaxCol)); + QItemSelection newRange(model()->index(rangeMinRow, rangeMinCol), + model()->index(rangeMaxRow, rangeMaxCol)); this->selectionModel()->select(newRange, QItemSelectionModel::Select); } break; } } - this->selectionModel()->setCurrentIndex(model()->index(targetRow, targetCol), QItemSelectionModel::Current); + this->selectionModel()->setCurrentIndex(model()->index(targetRow, targetCol), + QItemSelectionModel::Current); } -void SheetTableView::mergeCells() { +void SheetTableView::mergeCells() +{ Gui::Application::Instance->commandManager().runCommandByName("Spreadsheet_MergeCells"); } -void SheetTableView::splitCell() { +void SheetTableView::splitCell() +{ Gui::Application::Instance->commandManager().runCommandByName("Spreadsheet_SplitCell"); } -void SheetTableView::closeEditor(QWidget * editor, QAbstractItemDelegate::EndEditHint hint) +void SheetTableView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) { QTableView::closeEditor(editor, hint); } @@ -1001,19 +1087,20 @@ void SheetTableView::mousePressEvent(QMouseEvent* event) QTableView::mousePressEvent(event); } -void SheetTableView::selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) +void SheetTableView::selectionChanged(const QItemSelection& selected, + const QItemSelection& deselected) { Gui::getMainWindow()->updateActions(); QTableView::selectionChanged(selected, deselected); } -void SheetTableView::edit ( const QModelIndex & index ) +void SheetTableView::edit(const QModelIndex& index) { currentEditIndex = index; QTableView::edit(index); } -void SheetTableView::contextMenuEvent(QContextMenuEvent *) +void SheetTableView::contextMenuEvent(QContextMenuEvent*) { const QMimeData* mimeData = QApplication::clipboard()->mimeData(); if (!selectionModel()->hasSelection()) { @@ -1029,13 +1116,14 @@ void SheetTableView::contextMenuEvent(QContextMenuEvent *) actionCut->setEnabled(true); actionCopy->setEnabled(true); actionDel->setEnabled(true); - actionSplit->setEnabled(selectedIndexesRaw().size() == 1 && - sheet->isMergedCell(CellAddress(currentIndex().row(),currentIndex().column()))); + actionSplit->setEnabled( + selectedIndexesRaw().size() == 1 + && sheet->isMergedCell(CellAddress(currentIndex().row(), currentIndex().column()))); actionMerge->setEnabled(selectedIndexesRaw().size() > 1); } auto ranges = selectedRanges(); - actionBind->setEnabled(!ranges.empty() && ranges.size()<=2); + actionBind->setEnabled(!ranges.empty() && ranges.size() <= 2); contextMenu->exec(QCursor::pos()); } @@ -1076,11 +1164,11 @@ QString SheetTableView::toHtml() const QTextCharFormat bgFormat; bgFormat.setBackground(QBrush(bgColor)); - QTextTable *table = cursor.insertTable(rowCount + 2, colCount + 2, tableFormat); + QTextTable* table = cursor.insertTable(rowCount + 2, colCount + 2, tableFormat); // The header cells of the rows for (int row = 0; row < rowCount + 1; row++) { - QTextTableCell headerCell = table->cellAt(row+1, 0); + QTextTableCell headerCell = table->cellAt(row + 1, 0); headerCell.setFormat(bgFormat); QTextCursor headerCellCursor = headerCell.firstCursorPosition(); QString data = model()->headerData(row, Qt::Vertical).toString(); @@ -1089,7 +1177,7 @@ QString SheetTableView::toHtml() const // The header cells of the columns for (int col = 0; col < colCount + 1; col++) { - QTextTableCell headerCell = table->cellAt(0, col+1); + QTextTableCell headerCell = table->cellAt(0, col + 1); headerCell.setFormat(bgFormat); QTextCursor headerCellCursor = headerCell.firstCursorPosition(); QTextBlockFormat blockFormat = headerCellCursor.blockFormat(); diff --git a/src/Mod/Spreadsheet/Gui/SheetTableView.h b/src/Mod/Spreadsheet/Gui/SheetTableView.h index 311df2852b..4c41900974 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableView.h +++ b/src/Mod/Spreadsheet/Gui/SheetTableView.h @@ -30,34 +30,39 @@ #include -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ -class SheetViewHeader : public QHeaderView { +class SheetViewHeader: public QHeaderView +{ Q_OBJECT public: - SheetViewHeader(QTableView *owner, Qt::Orientation o) - : QHeaderView(o),owner(owner) + SheetViewHeader(QTableView* owner, Qt::Orientation o) + : QHeaderView(o) + , owner(owner) { setSectionsClickable(true); } Q_SIGNALS: void resizeFinished(); + protected: - void mouseReleaseEvent(QMouseEvent * event) override; - bool viewportEvent(QEvent *e) override; + void mouseReleaseEvent(QMouseEvent* event) override; + bool viewportEvent(QEvent* e) override; + private: - QTableView *owner; + QTableView* owner; }; -class SheetTableView : public QTableView +class SheetTableView: public QTableView { Q_OBJECT public: - explicit SheetTableView(QWidget *parent = nullptr); + explicit SheetTableView(QWidget* parent = nullptr); ~SheetTableView() override; - void edit(const QModelIndex &index); - void setSheet(Spreadsheet::Sheet *_sheet); + void edit(const QModelIndex& index); + void setSheet(Spreadsheet::Sheet* _sheet); std::vector selectedRanges() const; QModelIndexList selectedIndexesRaw() const; QString toHtml() const; @@ -69,11 +74,13 @@ public Q_SLOTS: void copySelection(); void cutSelection(); void pasteClipboard(); - void finishEditWithMove(int keyPressed, Qt::KeyboardModifiers modifiers, bool handleTabMotion = false); + void finishEditWithMove(int keyPressed, + Qt::KeyboardModifiers modifiers, + bool handleTabMotion = false); void ModifyBlockSelection(int targetRow, int targetColumn); protected Q_SLOTS: - void commitData(QWidget *editor) override; + void commitData(QWidget* editor) override; void updateCellSpan(); void insertRows(); void insertRowsAfter(); @@ -87,32 +94,33 @@ protected Q_SLOTS: void onConfSetup(); protected: - bool edit(const QModelIndex &index, EditTrigger trigger, QEvent *event) override; - bool event(QEvent *event) override; - void closeEditor(QWidget *editor, QAbstractItemDelegate::EndEditHint hint) override; + bool edit(const QModelIndex& index, EditTrigger trigger, QEvent* event) override; + bool event(QEvent* event) override; + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) override; void mousePressEvent(QMouseEvent* event) override; - void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override; + void selectionChanged(const QItemSelection& selected, + const QItemSelection& deselected) override; - void contextMenuEvent (QContextMenuEvent * e) override; + void contextMenuEvent(QContextMenuEvent* e) override; - void _copySelection(const std::vector &ranges, bool copy); + void _copySelection(const std::vector& ranges, bool copy); QModelIndex currentEditIndex; - Spreadsheet::Sheet * sheet; + Spreadsheet::Sheet* sheet; int tabCounter; - QMenu *contextMenu; + QMenu* contextMenu; - QAction *actionProperties; - QAction *actionRecompute; - QAction *actionConf; - QAction *actionMerge; - QAction *actionSplit; - QAction *actionCopy; - QAction *actionPaste; - QAction *actionCut; - QAction *actionDel; - QAction *actionBind; + QAction* actionProperties; + QAction* actionRecompute; + QAction* actionConf; + QAction* actionMerge; + QAction* actionSplit; + QAction* actionCopy; + QAction* actionPaste; + QAction* actionCut; + QAction* actionDel; + QAction* actionBind; QTimer timer; @@ -120,6 +128,6 @@ protected: std::set spanChanges; }; -} +} // namespace SpreadsheetGui -#endif // SHEETTABLEVIEW_H +#endif // SHEETTABLEVIEW_H diff --git a/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.cpp b/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.cpp index eec525e35c..cfb4320c24 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.cpp +++ b/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.cpp @@ -24,65 +24,67 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include #endif #include "SheetTableViewAccessibleInterface.h" -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ - SheetTableViewAccessibleInterface::SheetTableViewAccessibleInterface( +SheetTableViewAccessibleInterface::SheetTableViewAccessibleInterface( SpreadsheetGui::SheetTableView* view) : QAccessibleWidget(view) - { - } +{} - QString SheetTableViewAccessibleInterface::text(QAccessible::Text txt) const - { - if (txt == QAccessible::Help) - return QString::fromLatin1("Implement me"); - return QAccessibleWidget::text(txt); - } - - QAccessibleInterface* SheetTableViewAccessibleInterface::childAt(int x, int y) const - { - Q_UNUSED(x) - Q_UNUSED(y) - return (QAccessibleInterface*)this; - } - - int SheetTableViewAccessibleInterface::indexOfChild(const QAccessibleInterface*) const - { - return 0; - } - - int SheetTableViewAccessibleInterface::childCount() const - { - return 0; - } - - QAccessibleInterface* SheetTableViewAccessibleInterface::focusChild() const - { - return (QAccessibleInterface*)this; - } - - QAccessibleInterface* SheetTableViewAccessibleInterface::child(int index) const - { - Q_UNUSED(index) - return (QAccessibleInterface*)this; - } - - QAccessibleInterface* SheetTableViewAccessibleInterface::ifactory(const QString& key, QObject* obj) - { - if (key == QString::fromUtf8("SpreadsheetGui::SheetTableView")) - return new SheetTableViewAccessibleInterface( - static_cast(obj)); - return nullptr; +QString SheetTableViewAccessibleInterface::text(QAccessible::Text txt) const +{ + if (txt == QAccessible::Help) { + return QString::fromLatin1("Implement me"); } + return QAccessibleWidget::text(txt); } + +QAccessibleInterface* SheetTableViewAccessibleInterface::childAt(int x, int y) const +{ + Q_UNUSED(x) + Q_UNUSED(y) + return (QAccessibleInterface*)this; +} + +int SheetTableViewAccessibleInterface::indexOfChild(const QAccessibleInterface*) const +{ + return 0; +} + +int SheetTableViewAccessibleInterface::childCount() const +{ + return 0; +} + +QAccessibleInterface* SheetTableViewAccessibleInterface::focusChild() const +{ + return (QAccessibleInterface*)this; +} + +QAccessibleInterface* SheetTableViewAccessibleInterface::child(int index) const +{ + Q_UNUSED(index) + return (QAccessibleInterface*)this; +} + +QAccessibleInterface* SheetTableViewAccessibleInterface::ifactory(const QString& key, QObject* obj) +{ + if (key == QString::fromUtf8("SpreadsheetGui::SheetTableView")) { + return new SheetTableViewAccessibleInterface( + static_cast(obj)); + } + return nullptr; +} +} // namespace SpreadsheetGui diff --git a/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.h b/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.h index fa63c52e58..c8eb94c03f 100644 --- a/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.h +++ b/src/Mod/Spreadsheet/Gui/SheetTableViewAccessibleInterface.h @@ -27,32 +27,33 @@ #include #include -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ - // Currently SheetTableViewAccessibleInterface below deactivates the - // built-in QAccessibleTable interface, and all the accessibility - // features. - // - // For a proper implementation, start by extending that - // and ensure you're not queue-ing empty cells, or counting empty cells - // - // Otherwise it will hang - https://github.com/FreeCAD/FreeCAD/issues/8265 +// Currently SheetTableViewAccessibleInterface below deactivates the +// built-in QAccessibleTable interface, and all the accessibility +// features. +// +// For a proper implementation, start by extending that +// and ensure you're not queue-ing empty cells, or counting empty cells +// +// Otherwise it will hang - https://github.com/FreeCAD/FreeCAD/issues/8265 - class SheetTableViewAccessibleInterface : public QAccessibleWidget - { - public: - explicit SheetTableViewAccessibleInterface(SpreadsheetGui::SheetTableView* view); +class SheetTableViewAccessibleInterface: public QAccessibleWidget +{ +public: + explicit SheetTableViewAccessibleInterface(SpreadsheetGui::SheetTableView* view); - QString text(QAccessible::Text txt) const override; + QString text(QAccessible::Text txt) const override; - QAccessibleInterface* childAt(int x, int y) const override; - int indexOfChild(const QAccessibleInterface*) const override; - int childCount() const override; - QAccessibleInterface* focusChild() const override; - QAccessibleInterface* child(int index) const override; + QAccessibleInterface* childAt(int x, int y) const override; + int indexOfChild(const QAccessibleInterface*) const override; + int childCount() const override; + QAccessibleInterface* focusChild() const override; + QAccessibleInterface* child(int index) const override; - static QAccessibleInterface* ifactory(const QString& key, QObject* obj); - }; -} + static QAccessibleInterface* ifactory(const QString& key, QObject* obj); +}; +} // namespace SpreadsheetGui -#endif // SHEETTABLEVIEW_INTERFACE_H +#endif // SHEETTABLEVIEW_INTERFACE_H diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp index 862d9ebe81..f0ae0de079 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.cpp @@ -25,16 +25,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include #include #include -#include "SpreadsheetDelegate.h" #include "LineEdit.h" +#include "SpreadsheetDelegate.h" FC_LOG_LEVEL_INIT("Spreadsheet", true, true) @@ -42,43 +42,45 @@ FC_LOG_LEVEL_INIT("Spreadsheet", true, true) using namespace Spreadsheet; using namespace SpreadsheetGui; -SpreadsheetDelegate::SpreadsheetDelegate(Spreadsheet::Sheet * _sheet, QWidget *parent) +SpreadsheetDelegate::SpreadsheetDelegate(Spreadsheet::Sheet* _sheet, QWidget* parent) : QStyledItemDelegate(parent) , sheet(_sheet) -{ -} +{} -QWidget *SpreadsheetDelegate::createEditor(QWidget *parent, - const QStyleOptionViewItem &, - const QModelIndex &index) const +QWidget* SpreadsheetDelegate::createEditor(QWidget* parent, + const QStyleOptionViewItem&, + const QModelIndex& index) const { - App::CellAddress addr(index.row(),index.column()); - App::Range range(addr,addr); - if(sheet && sheet->getCellBinding(range)) { + App::CellAddress addr(index.row(), index.column()); + App::Range range(addr, addr); + if (sheet && sheet->getCellBinding(range)) { FC_ERR("Bound cell " << addr.toString() << " cannot be edited"); return nullptr; } - SpreadsheetGui::LineEdit *editor = new SpreadsheetGui::LineEdit(parent); + SpreadsheetGui::LineEdit* editor = new SpreadsheetGui::LineEdit(parent); editor->setDocumentObject(sheet); - connect(editor, &SpreadsheetGui::LineEdit::finishedWithKey, this, &SpreadsheetDelegate::onEditorFinishedWithKey); + connect(editor, + &SpreadsheetGui::LineEdit::finishedWithKey, + this, + &SpreadsheetDelegate::onEditorFinishedWithKey); return editor; } -void SpreadsheetDelegate::setEditorData(QWidget *editor, - const QModelIndex &index) const +void SpreadsheetDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const { - QLineEdit *edit = qobject_cast(editor); + QLineEdit* edit = qobject_cast(editor); if (edit) { edit->setText(index.model()->data(index, Qt::EditRole).toString()); return; } } -void SpreadsheetDelegate::setModelData(QWidget *editor, - QAbstractItemModel *model, const QModelIndex &index) const +void SpreadsheetDelegate::setModelData(QWidget* editor, + QAbstractItemModel* model, + const QModelIndex& index) const { - QLineEdit *edit = qobject_cast(editor); + QLineEdit* edit = qobject_cast(editor); if (edit) { model->setData(index, edit->text()); return; @@ -90,49 +92,59 @@ void SpreadsheetDelegate::onEditorFinishedWithKey(int key, Qt::KeyboardModifiers Q_EMIT finishedWithKey(key, modifiers); } -QSize SpreadsheetDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const +QSize SpreadsheetDelegate::sizeHint(const QStyleOptionViewItem& option, + const QModelIndex& index) const { Q_UNUSED(option); Q_UNUSED(index); return {}; } -static inline void drawBorder(QPainter *painter, const QStyleOptionViewItem &option, - unsigned flags, QColor color, Qt::PenStyle style) +static inline void drawBorder(QPainter* painter, + const QStyleOptionViewItem& option, + unsigned flags, + QColor color, + Qt::PenStyle style) { - if(!flags) + if (!flags) { return; + } QPen pen(color); pen.setWidth(2); pen.setStyle(style); painter->setPen(pen); - QRect rect = option.rect.adjusted(1,1,0,0); - if(flags == Sheet::BorderAll) { - painter->drawRect(rect.adjusted(0,0,-1,-1)); + QRect rect = option.rect.adjusted(1, 1, 0, 0); + if (flags == Sheet::BorderAll) { + painter->drawRect(rect.adjusted(0, 0, -1, -1)); return; } - if(flags & Sheet::BorderLeft) + if (flags & Sheet::BorderLeft) { painter->drawLine(rect.topLeft(), rect.bottomLeft()); - if(flags & Sheet::BorderTop) + } + if (flags & Sheet::BorderTop) { painter->drawLine(rect.topLeft(), rect.topRight()); - if(flags & Sheet::BorderRight) + } + if (flags & Sheet::BorderRight) { painter->drawLine(rect.topRight(), rect.bottomRight()); - if(flags & Sheet::BorderBottom) + } + if (flags & Sheet::BorderBottom) { painter->drawLine(rect.bottomLeft(), rect.bottomRight()); + } } -void SpreadsheetDelegate::paint(QPainter *painter, - const QStyleOptionViewItem &option, const QModelIndex &index ) const +void SpreadsheetDelegate::paint(QPainter* painter, + const QStyleOptionViewItem& option, + const QModelIndex& index) const { QStyledItemDelegate::paint(painter, option, index); - if(!sheet) + if (!sheet) { return; + } App::CellAddress addr(index.row(), index.column()); drawBorder(painter, option, sheet->getCellBindingBorder(addr), Qt::blue, Qt::SolidLine); - drawBorder(painter, option, sheet->getCopyOrCutBorder(addr,true), Qt::green, Qt::DashLine); - drawBorder(painter, option, sheet->getCopyOrCutBorder(addr,false), Qt::red, Qt::DashLine); + drawBorder(painter, option, sheet->getCopyOrCutBorder(addr, true), Qt::green, Qt::DashLine); + drawBorder(painter, option, sheet->getCopyOrCutBorder(addr, false), Qt::red, Qt::DashLine); } #include "moc_SpreadsheetDelegate.cpp" - diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.h b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.h index c05f761279..7036ffd3e5 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.h +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetDelegate.h @@ -27,35 +27,42 @@ #include -namespace Spreadsheet { +namespace Spreadsheet +{ class Sheet; } -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ -class SpreadsheetDelegate : public QStyledItemDelegate +class SpreadsheetDelegate: public QStyledItemDelegate { Q_OBJECT public: - explicit SpreadsheetDelegate(Spreadsheet::Sheet * sheet, QWidget *parent = nullptr); - QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &, - const QModelIndex &index) const override; - void setEditorData(QWidget *editor, const QModelIndex &index) const override; - void setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const override; + explicit SpreadsheetDelegate(Spreadsheet::Sheet* sheet, QWidget* parent = nullptr); + QWidget* createEditor(QWidget* parent, + const QStyleOptionViewItem&, + const QModelIndex& index) const override; + void setEditorData(QWidget* editor, const QModelIndex& index) const override; + void setModelData(QWidget* editor, + QAbstractItemModel* model, + const QModelIndex& index) const override; - QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override; - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const override; + QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override; + void paint(QPainter* painter, + const QStyleOptionViewItem& option, + const QModelIndex& index) const override; Q_SIGNALS: void finishedWithKey(int key, Qt::KeyboardModifiers modifiers); private: void onEditorFinishedWithKey(int key, Qt::KeyboardModifiers modifiers); + private: - Spreadsheet::Sheet * sheet; + Spreadsheet::Sheet* sheet; }; -} +} // namespace SpreadsheetGui -#endif // SPREADSHEETDELEGATE_H +#endif // SPREADSHEETDELEGATE_H diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index c4586c4602..b720f526f6 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -23,12 +23,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #include @@ -44,11 +44,11 @@ #include #include -#include "SpreadsheetView.h" -#include "ui_Sheet.h" #include "LineEdit.h" -#include "qtcolorpicker.h" #include "SpreadsheetDelegate.h" +#include "SpreadsheetView.h" +#include "qtcolorpicker.h" +#include "ui_Sheet.h" using namespace SpreadsheetGui; @@ -61,7 +61,7 @@ namespace sp = std::placeholders; TYPESYSTEM_SOURCE_ABSTRACT(SpreadsheetGui::SheetView, Gui::MDIView) -SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWidget *parent) +SheetView::SheetView(Gui::Document* pcDocument, App::DocumentObject* docObj, QWidget* parent) : MDIView(pcDocument, parent) , sheet(static_cast(docObj)) { @@ -70,7 +70,7 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi model = new SheetModel(static_cast(docObj)); ui = new Ui::Sheet(); - QWidget * w = new QWidget(this); + QWidget* w = new QWidget(this); ui->setupUi(w); setCentralWidget(w); @@ -80,43 +80,66 @@ SheetView::SheetView(Gui::Document *pcDocument, App::DocumentObject *docObj, QWi ui->cells->setSheet(sheet); // Connect signals - connect(ui->cells->selectionModel(), &QItemSelectionModel::currentChanged, - this, &SheetView::currentChanged); + connect(ui->cells->selectionModel(), + &QItemSelectionModel::currentChanged, + this, + &SheetView::currentChanged); - connect(dynamic_cast(ui->cells->horizontalHeader()), &SheetViewHeader::resizeFinished, - this, &SheetView::columnResizeFinished); - connect(ui->cells->horizontalHeader(), &QHeaderView::sectionResized, - this, &SheetView::columnResized); + connect(dynamic_cast(ui->cells->horizontalHeader()), + &SheetViewHeader::resizeFinished, + this, + &SheetView::columnResizeFinished); + connect(ui->cells->horizontalHeader(), + &QHeaderView::sectionResized, + this, + &SheetView::columnResized); - connect(dynamic_cast(ui->cells->verticalHeader()), &SheetViewHeader::resizeFinished, - this, &SheetView::rowResizeFinished); - connect(ui->cells->verticalHeader(), &QHeaderView::sectionResized, - this, &SheetView::rowResized); + connect(dynamic_cast(ui->cells->verticalHeader()), + &SheetViewHeader::resizeFinished, + this, + &SheetView::rowResizeFinished); + connect(ui->cells->verticalHeader(), + &QHeaderView::sectionResized, + this, + &SheetView::rowResized); - connect(delegate, &SpreadsheetDelegate::finishedWithKey, this, &SheetView::editingFinishedWithKey); - connect(ui->cellContent, &ExpressionLineEdit::returnPressed, this, [this]() {confirmContentChanged(ui->cellContent->text()); }); - connect(ui->cellAlias, &ExpressionLineEdit::editingFinished, this, [this]() {confirmAliasChanged(ui->cellAlias->text()); }); + connect(delegate, + &SpreadsheetDelegate::finishedWithKey, + this, + &SheetView::editingFinishedWithKey); + connect(ui->cellContent, &ExpressionLineEdit::returnPressed, this, [this]() { + confirmContentChanged(ui->cellContent->text()); + }); + connect(ui->cellAlias, &ExpressionLineEdit::editingFinished, this, [this]() { + confirmAliasChanged(ui->cellAlias->text()); + }); connect(ui->cellAlias, &LineEdit::textEdited, this, &SheetView::aliasChanged); - //NOLINTBEGIN - columnWidthChangedConnection = sheet->columnWidthChanged.connect(std::bind(&SheetView::resizeColumn, this, sp::_1, sp::_2)); - rowHeightChangedConnection = sheet->rowHeightChanged.connect(std::bind(&SheetView::resizeRow, this, sp::_1, sp::_2)); - //NOLINTEND + // NOLINTBEGIN + columnWidthChangedConnection = sheet->columnWidthChanged.connect( + std::bind(&SheetView::resizeColumn, this, sp::_1, sp::_2)); + rowHeightChangedConnection = + sheet->rowHeightChanged.connect(std::bind(&SheetView::resizeRow, this, sp::_1, sp::_2)); + // NOLINTEND - connect( model, &QAbstractItemModel::dataChanged, this, &SheetView::modelUpdated); + connect(model, &QAbstractItemModel::dataChanged, this, &SheetView::modelUpdated); QPalette palette = ui->cells->palette(); palette.setColor(QPalette::Base, QColor(255, 255, 255)); palette.setColor(QPalette::Text, QColor(0, 0, 0)); ui->cells->setPalette(palette); - QList bgList = Gui::getMainWindow()->findChildren(QString::fromLatin1("Spreadsheet_BackgroundColor")); - if (!bgList.empty()) + QList bgList = Gui::getMainWindow()->findChildren( + QString::fromLatin1("Spreadsheet_BackgroundColor")); + if (!bgList.empty()) { bgList[0]->setCurrentColor(palette.color(QPalette::Base)); + } - QList fgList = Gui::getMainWindow()->findChildren(QString::fromLatin1("Spreadsheet_ForegroundColor")); - if (!fgList.empty()) + QList fgList = Gui::getMainWindow()->findChildren( + QString::fromLatin1("Spreadsheet_ForegroundColor")); + if (!fgList.empty()) { fgList[0]->setCurrentColor(palette.color(QPalette::Text)); + } // Set document object to create auto completer ui->cellContent->setDocumentObject(sheet); @@ -131,31 +154,33 @@ SheetView::~SheetView() delete delegate; } -bool SheetView::onMsg(const char *pMsg, const char **) +bool SheetView::onMsg(const char* pMsg, const char**) { - if(strcmp("Undo",pMsg) == 0 ) { + if (strcmp("Undo", pMsg) == 0) { getGuiDocument()->undo(1); App::Document* doc = getAppDocument(); - if (doc) + if (doc) { doc->recompute(); + } return true; } - else if(strcmp("Redo",pMsg) == 0 ) { + else if (strcmp("Redo", pMsg) == 0) { getGuiDocument()->redo(1); App::Document* doc = getAppDocument(); - if (doc) + if (doc) { doc->recompute(); + } return true; } - else if (strcmp("Save",pMsg) == 0) { + else if (strcmp("Save", pMsg) == 0) { getGuiDocument()->save(); return true; } - else if (strcmp("SaveAs",pMsg) == 0) { + else if (strcmp("SaveAs", pMsg) == 0) { getGuiDocument()->saveAs(); return true; } - else if(strcmp("Std_Delete",pMsg) == 0) { + else if (strcmp("Std_Delete", pMsg) == 0) { std::vector ranges = selectedRanges(); if (sheet->hasCell(ranges)) { Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Clear cell(s)")); @@ -168,48 +193,57 @@ bool SheetView::onMsg(const char *pMsg, const char **) } return true; } - else if (strcmp("Cut",pMsg) == 0) { + else if (strcmp("Cut", pMsg) == 0) { ui->cells->cutSelection(); return true; } - else if (strcmp("Copy",pMsg) == 0) { + else if (strcmp("Copy", pMsg) == 0) { ui->cells->copySelection(); return true; } - else if (strcmp("Paste",pMsg) == 0) { + else if (strcmp("Paste", pMsg) == 0) { ui->cells->pasteClipboard(); return true; } - else + else { return false; + } } -bool SheetView::onHasMsg(const char *pMsg) const +bool SheetView::onHasMsg(const char* pMsg) const { - if (strcmp("Undo",pMsg) == 0) { + if (strcmp("Undo", pMsg) == 0) { App::Document* doc = getAppDocument(); return doc && doc->getAvailableUndos() > 0; } - if (strcmp("Redo",pMsg) == 0) { + if (strcmp("Redo", pMsg) == 0) { App::Document* doc = getAppDocument(); return doc && doc->getAvailableRedos() > 0; } - if (strcmp("Save",pMsg) == 0) + if (strcmp("Save", pMsg) == 0) { return true; - if (strcmp("SaveAs",pMsg) == 0) + } + if (strcmp("SaveAs", pMsg) == 0) { return true; - if (strcmp("Cut",pMsg) == 0) + } + if (strcmp("Cut", pMsg) == 0) { return true; - if (strcmp("Copy",pMsg) == 0) + } + if (strcmp("Copy", pMsg) == 0) { return true; - if (strcmp("Paste",pMsg) == 0) + } + if (strcmp("Paste", pMsg) == 0) { return true; - if (strcmp(pMsg, "Print") == 0) + } + if (strcmp(pMsg, "Print") == 0) { return true; - if (strcmp(pMsg, "PrintPreview") == 0) + } + if (strcmp(pMsg, "PrintPreview") == 0) { return true; - if (strcmp(pMsg, "PrintPdf") == 0) + } + if (strcmp(pMsg, "PrintPdf") == 0) { return true; + } return false; } @@ -233,8 +267,10 @@ void SheetView::printPreview() QPrinter printer(QPrinter::ScreenResolution); printer.setPageOrientation(QPageLayout::Landscape); QPrintPreviewDialog dlg(&printer, this); - connect(&dlg, &QPrintPreviewDialog::paintRequested, - this, qOverload(&SheetView::print)); + connect(&dlg, + &QPrintPreviewDialog::paintRequested, + this, + qOverload(&SheetView::print)); dlg.exec(); } @@ -253,11 +289,15 @@ void SheetView::print(QPrinter* printer) */ void SheetView::printPdf() { - QString filename = FileDialog::getSaveFileName(this, tr("Export PDF"), QString(), - QString::fromLatin1("%1 (*.pdf)").arg(tr("PDF file"))); + QString filename = + FileDialog::getSaveFileName(this, + tr("Export PDF"), + QString(), + QString::fromLatin1("%1 (*.pdf)").arg(tr("PDF file"))); if (!filename.isEmpty()) { QPrinter printer(QPrinter::ScreenResolution); - // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/ + // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: + // https://www.kdab.com/creating-pdfa-documents-qt/ printer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b); printer.setPageOrientation(QPageLayout::Landscape); printer.setOutputFormat(QPrinter::PdfFormat); @@ -279,12 +319,14 @@ void SheetView::updateContentLine() if (i.isValid()) { std::string str; - if (const auto * cell = sheet->getCell(CellAddress(i.row(), i.column()))) + if (const auto* cell = sheet->getCell(CellAddress(i.row(), i.column()))) { (void)cell->getStringContent(str); + } ui->cellContent->setText(QString::fromUtf8(str.c_str())); ui->cellContent->setEnabled(true); - // Update completer model; for the time being, we do this by setting the document object of the input line. + // Update completer model; for the time being, we do this by setting the document object of + // the input line. ui->cellContent->setDocumentObject(sheet); } } @@ -295,46 +337,53 @@ void SheetView::updateAliasLine() if (i.isValid()) { std::string str; - if (const auto * cell = sheet->getCell(CellAddress(i.row(), i.column()))) + if (const auto* cell = sheet->getCell(CellAddress(i.row(), i.column()))) { (void)cell->getAlias(str); + } ui->cellAlias->setText(QString::fromUtf8(str.c_str())); ui->cellAlias->setEnabled(true); - // Update completer model; for the time being, we do this by setting the document object of the input line. + // Update completer model; for the time being, we do this by setting the document object of + // the input line. ui->cellAlias->setDocumentObject(sheet); } } void SheetView::columnResizeFinished() { - if (newColumnSizes.empty()) + if (newColumnSizes.empty()) { return; + } blockSignals(true); - for(auto &v : newColumnSizes) - sheet->setColumnWidth(v.first,v.second); + for (auto& v : newColumnSizes) { + sheet->setColumnWidth(v.first, v.second); + } blockSignals(false); newColumnSizes.clear(); } void SheetView::rowResizeFinished() { - if (newRowSizes.empty()) + if (newRowSizes.empty()) { return; + } blockSignals(true); - for(auto &v : newRowSizes) - sheet->setRowHeight(v.first,v.second); + for (auto& v : newRowSizes) { + sheet->setRowHeight(v.first, v.second); + } blockSignals(false); newRowSizes.clear(); } -void SheetView::modelUpdated(const QModelIndex &topLeft, const QModelIndex &bottomRight) +void SheetView::modelUpdated(const QModelIndex& topLeft, const QModelIndex& bottomRight) { - const QModelIndex & current = ui->cells->currentIndex(); + const QModelIndex& current = ui->cells->currentIndex(); - if (current < topLeft || bottomRight < current) + if (current < topLeft || bottomRight < current) { return; + } updateContentLine(); updateAliasLine(); @@ -354,14 +403,16 @@ void SheetView::rowResized(int row, int oldSize, int newSize) void SheetView::resizeColumn(int col, int newSize) { - if (ui->cells->horizontalHeader()->sectionSize(col) != newSize) + if (ui->cells->horizontalHeader()->sectionSize(col) != newSize) { ui->cells->setColumnWidth(col, newSize); + } } void SheetView::resizeRow(int col, int newSize) { - if (ui->cells->verticalHeader()->sectionSize(col) != newSize) + if (ui->cells->verticalHeader()->sectionSize(col) != newSize) { ui->cells->setRowHeight(col, newSize); + } } void SheetView::editingFinishedWithKey(int key, Qt::KeyboardModifiers modifiers) @@ -385,17 +436,18 @@ void SheetView::confirmAliasChanged(const QString& text) QModelIndex i = ui->cells->currentIndex(); if (const auto* cell = sheet->getNewCell(CellAddress(i.row(), i.column()))) { if (!aliasOkay) { - //do not show error message if failure to set new alias is because it is already the same string + // do not show error message if failure to set new alias is because it is already the + // same string std::string current_alias; (void)cell->getAlias(current_alias); if (text != QString::fromUtf8(current_alias.c_str())) { - Base::Console().Error("Unable to set alias: %s\n", Base::Tools::toStdString(text).c_str()); + Base::Console().Error("Unable to set alias: %s\n", + Base::Tools::toStdString(text).c_str()); } } else { std::string address = CellAddress(i.row(), i.column()).toString(); - Gui::cmdAppObjectArgs(sheet, "setAlias('%s', '%s')", - address, text.toStdString()); + Gui::cmdAppObjectArgs(sheet, "setAlias('%s', '%s')", address, text.toStdString()); Gui::cmdAppDocument(sheet->getDocument(), "recompute()"); ui->cells->setFocus(); } @@ -417,13 +469,16 @@ void SheetView::aliasChanged(const QString& text) bool aliasOk = true; static auto originalStylesheet = ui->cellAlias->styleSheet(); QString warningColor; - if (qApp->styleSheet().contains(QLatin1String("dark"), Qt::CaseInsensitive)) - warningColor = QLatin1String("rgb(255,90,90)"); // Light red for dark mode - else - warningColor = QLatin1String("rgb(200,0,0)"); // Dark red for light mode + if (qApp->styleSheet().contains(QLatin1String("dark"), Qt::CaseInsensitive)) { + warningColor = QLatin1String("rgb(255,90,90)"); // Light red for dark mode + } + else { + warningColor = QLatin1String("rgb(200,0,0)"); // Dark red for light mode + } - if (!text.isEmpty() && !sheet->isValidAlias(Base::Tools::toStdString(text))) + if (!text.isEmpty() && !sheet->isValidAlias(Base::Tools::toStdString(text))) { aliasOk = false; + } if (!aliasOk) { // change tooltip and make text color red @@ -433,12 +488,13 @@ void SheetView::aliasChanged(const QString& text) else { // go back to normal ui->cellAlias->setToolTip( - QObject::tr("Refer to cell by alias, for example\nSpreadsheet.my_alias_name instead of Spreadsheet.B1")); + QObject::tr("Refer to cell by alias, for example\nSpreadsheet.my_alias_name instead of " + "Spreadsheet.B1")); ui->cellAlias->setStyleSheet(originalStylesheet); } } -void SheetView::currentChanged ( const QModelIndex & current, const QModelIndex & previous ) +void SheetView::currentChanged(const QModelIndex& current, const QModelIndex& previous) { Q_UNUSED(current); Q_UNUSED(previous); @@ -446,7 +502,7 @@ void SheetView::currentChanged ( const QModelIndex & current, const QModelIndex updateAliasLine(); } -void SheetView::updateCell(const App::Property *prop) +void SheetView::updateCell(const App::Property* prop) { try { if (prop == &sheet->Label) { @@ -455,10 +511,11 @@ void SheetView::updateCell(const App::Property *prop) } CellAddress address; - if(!sheet->getCellAddress(prop, address)) + if (!sheet->getCellAddress(prop, address)) { return; + } - if (currentIndex().row() == address.row() && currentIndex().column() == address.col() ){ + if (currentIndex().row() == address.row() && currentIndex().column() == address.col()) { updateContentLine(); updateAliasLine(); } @@ -484,14 +541,20 @@ QModelIndexList SheetView::selectedIndexesRaw() const return ui->cells->selectedIndexesRaw(); } -void SpreadsheetGui::SheetView::select(App::CellAddress cell, QItemSelectionModel::SelectionFlags flags) +void SpreadsheetGui::SheetView::select(App::CellAddress cell, + QItemSelectionModel::SelectionFlags flags) { ui->cells->selectionModel()->select(model->index(cell.row(), cell.col()), flags); } -void SpreadsheetGui::SheetView::select(App::CellAddress topLeft, App::CellAddress bottomRight, QItemSelectionModel::SelectionFlags flags) +void SpreadsheetGui::SheetView::select(App::CellAddress topLeft, + App::CellAddress bottomRight, + QItemSelectionModel::SelectionFlags flags) { - ui->cells->selectionModel()->select(QItemSelection(model->index(topLeft.row(), topLeft.col()), model->index(bottomRight.row(), bottomRight.col())), flags); + ui->cells->selectionModel()->select( + QItemSelection(model->index(topLeft.row(), topLeft.col()), + model->index(bottomRight.row(), bottomRight.col())), + flags); } void SheetView::deleteSelection() @@ -509,10 +572,11 @@ void SpreadsheetGui::SheetView::setCurrentIndex(App::CellAddress cell) const ui->cells->setCurrentIndex(model->index(cell.row(), cell.col())); } -PyObject *SheetView::getPyObject() +PyObject* SheetView::getPyObject() { - if (!pythonObject) + if (!pythonObject) { pythonObject = new SheetViewPy(this); + } Py_INCREF(pythonObject); return pythonObject; @@ -534,29 +598,45 @@ void SheetViewPy::init_type() behaviors().supportGetattr(); behaviors().supportSetattr(); - add_varargs_method("selectedRanges", &SheetViewPy::selectedRanges, "selectedRanges(): Get a list of all selected ranges"); - add_varargs_method("selectedCells", &SheetViewPy::selectedCells, "selectedCells(): Get a list of all selected cells"); - add_varargs_method("select", &SheetViewPy::select, "select(cell,flags): Select (or deselect) the given cell, applying QItemSelectionModel.SelectionFlags\nselect(topLeft,bottomRight,flags): Select (or deselect) the given range, applying QItemSelectionModel.SelectionFlags"); - add_varargs_method("currentIndex", &SheetViewPy::currentIndex, "currentIndex(): Get the current index"); - add_varargs_method("setCurrentIndex", &SheetViewPy::setCurrentIndex, "setCurrentIndex(cell): Set the current index to the named cell (e.g. 'A1')"); + add_varargs_method("selectedRanges", + &SheetViewPy::selectedRanges, + "selectedRanges(): Get a list of all selected ranges"); + add_varargs_method("selectedCells", + &SheetViewPy::selectedCells, + "selectedCells(): Get a list of all selected cells"); + add_varargs_method( + "select", + &SheetViewPy::select, + "select(cell,flags): Select (or deselect) the given cell, applying " + "QItemSelectionModel.SelectionFlags\nselect(topLeft,bottomRight,flags): Select (or " + "deselect) the given range, applying QItemSelectionModel.SelectionFlags"); + add_varargs_method("currentIndex", + &SheetViewPy::currentIndex, + "currentIndex(): Get the current index"); + add_varargs_method( + "setCurrentIndex", + &SheetViewPy::setCurrentIndex, + "setCurrentIndex(cell): Set the current index to the named cell (e.g. 'A1')"); add_varargs_method("getSheet", &SheetViewPy::getSheet, "getSheet()"); - add_varargs_method("cast_to_base", &SheetViewPy::cast_to_base, "cast_to_base() cast to MDIView class"); + add_varargs_method("cast_to_base", + &SheetViewPy::cast_to_base, + "cast_to_base() cast to MDIView class"); behaviors().readyType(); } -SheetViewPy::SheetViewPy(SheetView *mdi) - : base(mdi) -{ -} +SheetViewPy::SheetViewPy(SheetView* mdi) + : base(mdi) +{} SheetViewPy::~SheetViewPy() = default; Py::Object SheetViewPy::repr() { std::ostringstream s_out; - if (!getSheetViewPtr()) + if (!getSheetViewPtr()) { throw Py::RuntimeError("Cannot print representation of deleted object"); + } s_out << "SheetView"; return Py::String(s_out.str()); } @@ -565,14 +645,14 @@ Py::Object SheetViewPy::repr() // a trick is to use MDIViewPy as class member and override getattr() to // join the attributes of both classes. This way all methods of MDIViewPy // appear for SheetViewPy, too. -Py::Object SheetViewPy::getattr(const char * attr) +Py::Object SheetViewPy::getattr(const char* attr) { if (!getSheetViewPtr()) { std::ostringstream s_out; s_out << "Cannot access attribute '" << attr << "' of deleted object"; throw Py::RuntimeError(s_out.str()); } - std::string name( attr ); + std::string name(attr); if (name == "__dict__" || name == "__class__") { Py::Dict dict_self(BaseType::getattr("__dict__")); Py::Dict dict_base(base.getattr("__dict__")); @@ -598,8 +678,9 @@ SheetView* SheetViewPy::getSheetViewPtr() Py::Object SheetViewPy::getSheet(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::asObject(new Spreadsheet::SheetPy(getSheetViewPtr()->getSheet())); } @@ -610,13 +691,13 @@ Py::Object SheetViewPy::cast_to_base(const Py::Tuple&) Py::Object SheetViewPy::selectedRanges(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } SheetView* sheetView = getSheetViewPtr(); std::vector ranges = sheetView->selectedRanges(); Py::List list; - for (const auto& range : ranges) - { + for (const auto& range : ranges) { list.append(Py::String(range.rangeString())); } @@ -625,8 +706,9 @@ Py::Object SheetViewPy::selectedRanges(const Py::Tuple& args) Py::Object SheetViewPy::selectedCells(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } SheetView* sheetView = getSheetViewPtr(); QModelIndexList cells = sheetView->selectedIndexes(); Py::List list; @@ -648,26 +730,37 @@ Py::Object SheetViewPy::select(const Py::Tuple& _args) const char* bottomRight; int flags = 0; if (args.size() == 2 && PyArg_ParseTuple(_args.ptr(), "si", &cell, &flags)) { - sheetView->select(App::CellAddress(cell), static_cast(flags)); + sheetView->select(App::CellAddress(cell), + static_cast(flags)); } - else if (args.size() == 3 && PyArg_ParseTuple(_args.ptr(), "ssi", &topLeft, &bottomRight, &flags)) { - sheetView->select(App::CellAddress(topLeft), App::CellAddress(bottomRight), static_cast(flags)); + else if (args.size() == 3 + && PyArg_ParseTuple(_args.ptr(), "ssi", &topLeft, &bottomRight, &flags)) { + sheetView->select(App::CellAddress(topLeft), + App::CellAddress(bottomRight), + static_cast(flags)); } else { - if (args.size() == 2) - throw Base::TypeError("Expects the arguments to be a cell name (e.g. 'A1') and QItemSelectionModel.SelectionFlags"); - else if (args.size() == 3) - throw Base::TypeError("Expects the arguments to be a cell name (e.g. 'A1'), a second cell name (e.g. 'B5'), and QItemSelectionModel.SelectionFlags"); - else - throw Base::TypeError("Wrong arguments to select: specify either a cell, or two cells (for a range), and QItemSelectionModel.SelectionFlags"); + if (args.size() == 2) { + throw Base::TypeError("Expects the arguments to be a cell name (e.g. 'A1') and " + "QItemSelectionModel.SelectionFlags"); + } + else if (args.size() == 3) { + throw Base::TypeError("Expects the arguments to be a cell name (e.g. 'A1'), a second " + "cell name (e.g. 'B5'), and QItemSelectionModel.SelectionFlags"); + } + else { + throw Base::TypeError("Wrong arguments to select: specify either a cell, or two cells " + "(for a range), and QItemSelectionModel.SelectionFlags"); + } } return Py::None(); } Py::Object SheetViewPy::currentIndex(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } SheetView* sheetView = getSheetViewPtr(); auto index = sheetView->currentIndex(); Py::String str(App::CellAddress(index.row(), index.column()).toString()); diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.h b/src/Mod/Spreadsheet/Gui/SpreadsheetView.h index 44117e83f6..4ec2620041 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.h +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.h @@ -38,12 +38,14 @@ class QActionGroup; class QPopupMenu; class QToolBar; -namespace App { +namespace App +{ class DocumentObject; class Property; -} +} // namespace App -namespace Ui { +namespace Ui +{ class Sheet; } @@ -54,7 +56,7 @@ namespace SpreadsheetGui class SpreadsheetDelegate; -class SpreadsheetGuiExport SheetView : public Gui::MDIView +class SpreadsheetGuiExport SheetView: public Gui::MDIView { Q_OBJECT @@ -64,9 +66,12 @@ public: SheetView(Gui::Document* pcDocument, App::DocumentObject* docObj, QWidget* parent); ~SheetView() override; - const char *getName() const override {return "SheetView";} + const char* getName() const override + { + return "SheetView"; + } - bool onMsg(const char* pMsg,const char** ppReturn) override; + bool onMsg(const char* pMsg, const char** ppReturn) override; bool onHasMsg(const char* pMsg) const override; /** @name Printing */ @@ -77,9 +82,12 @@ public: void print(QPrinter*) override; //@} - void updateCell(const App::Property * prop); + void updateCell(const App::Property* prop); - Spreadsheet::Sheet * getSheet() { return sheet; } + Spreadsheet::Sheet* getSheet() + { + return sheet; + } std::vector selectedRanges() const; @@ -88,7 +96,9 @@ public: void select(App::CellAddress cell, QItemSelectionModel::SelectionFlags flags); - void select(App::CellAddress topLeft, App::CellAddress bottomRight, QItemSelectionModel::SelectionFlags flags); + void select(App::CellAddress topLeft, + App::CellAddress bottomRight, + QItemSelectionModel::SelectionFlags flags); QModelIndex currentIndex() const; @@ -96,7 +106,7 @@ public: void deleteSelection(); - PyObject *getPyObject() override; + PyObject* getPyObject() override; void deleteSelf() override; @@ -105,12 +115,13 @@ protected Q_SLOTS: void confirmAliasChanged(const QString& text); void aliasChanged(const QString& text); void confirmContentChanged(const QString& text); - void currentChanged( const QModelIndex & current, const QModelIndex & previous ); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); void columnResized(int col, int oldSize, int newSize); void rowResized(int row, int oldSize, int newSize); void columnResizeFinished(); void rowResizeFinished(); - void modelUpdated(const QModelIndex & topLeft, const QModelIndex & bottomRight); + void modelUpdated(const QModelIndex& topLeft, const QModelIndex& bottomRight); + protected: void updateContentLine(); void updateAliasLine(); @@ -118,10 +129,10 @@ protected: void resizeColumn(int col, int newSize); void resizeRow(int col, int newSize); - Ui::Sheet * ui; - Spreadsheet::Sheet * sheet; - SpreadsheetDelegate * delegate; - SheetModel * model; + Ui::Sheet* ui; + Spreadsheet::Sheet* sheet; + SpreadsheetDelegate* delegate; + SheetModel* model; boost::signals2::scoped_connection columnWidthChangedConnection; boost::signals2::scoped_connection rowHeightChangedConnection; boost::signals2::scoped_connection positionChangedConnection; @@ -130,20 +141,20 @@ protected: std::map newRowSizes; }; -class SheetViewPy : public Py::PythonExtension +class SheetViewPy: public Py::PythonExtension { public: using BaseType = Py::PythonExtension; static void init_type(); - explicit SheetViewPy(SheetView *mdi); + explicit SheetViewPy(SheetView* mdi); ~SheetViewPy() override; Py::Object repr() override; - Py::Object getattr(const char *) override; + Py::Object getattr(const char*) override; Py::Object getSheet(const Py::Tuple&); Py::Object cast_to_base(const Py::Tuple&); - + Py::Object selectedRanges(const Py::Tuple&); Py::Object selectedCells(const Py::Tuple&); Py::Object select(const Py::Tuple&); @@ -156,6 +167,6 @@ protected: Gui::MDIViewPy base; }; -} // namespace SpreadsheetModGui +} // namespace SpreadsheetGui -#endif // SpreadsheetView_H +#endif // SpreadsheetView_H diff --git a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp index b8dfebee15..4a85a159b5 100644 --- a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp +++ b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp @@ -24,9 +24,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -37,9 +37,9 @@ #include #include +#include "SpreadsheetView.h" #include "ViewProviderSpreadsheet.h" #include "ViewProviderSpreadsheetPy.h" -#include "SpreadsheetView.h" using namespace Base; @@ -52,14 +52,13 @@ PROPERTY_SOURCE(SpreadsheetGui::ViewProviderSheet, Gui::ViewProviderDocumentObje ViewProviderSheet::ViewProviderSheet() : Gui::ViewProviderDocumentObject() -{ -} +{} ViewProviderSheet::~ViewProviderSheet() { if (!view.isNull()) { Gui::getMainWindow()->removeWindow(view); -// delete view; + // delete view; } } @@ -77,27 +76,12 @@ std::vector ViewProviderSheet::getDisplayModes() const QIcon ViewProviderSheet::getIcon() const { - static const char * const Points_Feature_xpm[] = { - "16 16 3 1", - " c None", - ". c #000000", - "+ c #FFFFFF", - " ", - " ", - "................", - ".++++.++++.++++.", - ".++++.++++.++++.", - "................", - ".++++.++++.++++.", - ".++++.++++.++++.", - "................", - ".++++.++++.++++.", - ".++++.++++.++++.", - "................", - ".++++.++++.++++.", - ".++++.++++.++++.", - "................", - " "}; + static const char* const Points_Feature_xpm[] = { + "16 16 3 1", " c None", ". c #000000", "+ c #FFFFFF", + " ", " ", "................", ".++++.++++.++++.", + ".++++.++++.++++.", "................", ".++++.++++.++++.", ".++++.++++.++++.", + "................", ".++++.++++.++++.", ".++++.++++.++++.", "................", + ".++++.++++.++++.", ".++++.++++.++++.", "................", " "}; QPixmap px(Points_Feature_xpm); return px; } @@ -124,14 +108,14 @@ bool ViewProviderSheet::doubleClicked() return true; } -void ViewProviderSheet::setupContextMenu(QMenu * menu, QObject *receiver, const char *member) +void ViewProviderSheet::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { QAction* act; act = menu->addAction(QObject::tr("Show spreadsheet"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); } -Sheet *ViewProviderSheet::getSpreadsheetObject() const +Sheet* ViewProviderSheet::getSpreadsheetObject() const { return freecad_dynamic_cast(pcObject); } @@ -139,21 +123,23 @@ Sheet *ViewProviderSheet::getSpreadsheetObject() const void ViewProviderSheet::beforeDelete() { ViewProviderDocumentObject::beforeDelete(); - if(!view) + if (!view) { return; - if(view==Gui::getMainWindow()->activeWindow()) - getDocument()->setActiveView(nullptr,Gui::View3DInventor::getClassTypeId()); + } + if (view == Gui::getMainWindow()->activeWindow()) { + getDocument()->setActiveView(nullptr, Gui::View3DInventor::getClassTypeId()); + } Gui::getMainWindow()->removeWindow(view); } -SheetView *ViewProviderSheet::showSpreadsheetView() +SheetView* ViewProviderSheet::showSpreadsheetView() { - if (!view){ - Gui::Document* doc = Gui::Application::Instance->getDocument - (this->pcObject->getDocument()); + if (!view) { + Gui::Document* doc = Gui::Application::Instance->getDocument(this->pcObject->getDocument()); view = new SheetView(doc, this->pcObject, Gui::getMainWindow()); view->setWindowIcon(Gui::BitmapFactory().pixmap(":icons/Spreadsheet.svg")); - view->setWindowTitle(QString::fromUtf8(pcObject->Label.getValue()) + QString::fromLatin1("[*]")); + view->setWindowTitle(QString::fromUtf8(pcObject->Label.getValue()) + + QString::fromLatin1("[*]")); Gui::getMainWindow()->addWindow(view); startEditing(); } @@ -161,32 +147,35 @@ SheetView *ViewProviderSheet::showSpreadsheetView() return view; } -Gui::MDIView *ViewProviderSheet::getMDIView() const +Gui::MDIView* ViewProviderSheet::getMDIView() const { return const_cast(this)->showSpreadsheetView(); } void ViewProviderSheet::updateData(const App::Property* prop) { - if (view) + if (view) { view->updateCell(prop); + } } -PyObject *ViewProviderSheet::getPyObject() +PyObject* ViewProviderSheet::getPyObject() { - if (!pyViewObject) + if (!pyViewObject) { pyViewObject = new ViewProviderSpreadsheetPy(this); + } pyViewObject->IncRef(); return pyViewObject; } // Python feature ----------------------------------------------------------------------- -namespace Gui { +namespace Gui +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(SpreadsheetGui::ViewProviderSheetPython, SpreadsheetGui::ViewProviderSheet) /// @endcond // explicit template instantiation template class SpreadsheetGuiExport ViewProviderPythonFeatureT; -} +} // namespace Gui diff --git a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.h b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.h index c695e30dd8..564898a9fe 100644 --- a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.h +++ b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.h @@ -31,7 +31,8 @@ #include -namespace Spreadsheet { +namespace Spreadsheet +{ class Sheet; } @@ -40,7 +41,7 @@ namespace SpreadsheetGui class SheetView; -class SpreadsheetGuiExport ViewProviderSheet : public Gui::ViewProviderDocumentObject +class SpreadsheetGuiExport ViewProviderSheet: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(SpreadsheetGui::ViewProviderSheet); @@ -52,7 +53,10 @@ public: ~ViewProviderSheet() override; void setDisplayMode(const char* ModeName) override; - bool useNewSelectionModel() const override {return false;} + bool useNewSelectionModel() const override + { + return false; + } std::vector getDisplayModes() const override; bool doubleClicked() override; @@ -66,24 +70,31 @@ public: bool setEdit(int ModNum) override; - bool isShow() const override { return true; } + bool isShow() const override + { + return true; + } - Gui::MDIView *getMDIView() const override; + Gui::MDIView* getMDIView() const override; - inline SheetView* getView() const { return view; } + inline SheetView* getView() const + { + return view; + } - PyObject *getPyObject() override; + PyObject* getPyObject() override; protected: SheetView* showSpreadsheetView(); - void updateData(const App::Property *prop) override; + void updateData(const App::Property* prop) override; + private: QPointer view; }; using ViewProviderSheetPython = Gui::ViewProviderPythonFeatureT; -} //namespace Spreadsheet +} // namespace SpreadsheetGui -#endif // SPREADSHEET_ViewProviderSpreadsheet_H +#endif // SPREADSHEET_ViewProviderSpreadsheet_H diff --git a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheetPyImp.cpp b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheetPyImp.cpp index b8b2783dd9..f1efc61d6d 100644 --- a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheetPyImp.cpp +++ b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheetPyImp.cpp @@ -22,9 +22,11 @@ #include "PreCompiled.h" +// clang-format off #include "SpreadsheetView.h" #include "ViewProviderSpreadsheetPy.h" #include "ViewProviderSpreadsheetPy.cpp" +// clang-format on using namespace SpreadsheetGui; @@ -37,17 +39,19 @@ std::string ViewProviderSpreadsheetPy::representation() const PyObject* ViewProviderSpreadsheetPy::getView(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } ViewProviderSheet* vp = this->getViewProviderSheetPtr(); SheetView* sheetView = vp->getView(); - if (sheetView) + if (sheetView) { return sheetView->getPyObject(); + } Py_RETURN_NONE; } -PyObject *ViewProviderSpreadsheetPy::getCustomAttributes(const char* /*attr*/) const +PyObject* ViewProviderSpreadsheetPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Spreadsheet/Gui/Workbench.cpp b/src/Mod/Spreadsheet/Gui/Workbench.cpp index e079d99956..33889e7457 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.cpp +++ b/src/Mod/Spreadsheet/Gui/Workbench.cpp @@ -24,18 +24,18 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif +#include "Mod/Spreadsheet/App/Sheet.h" +#include "Mod/Spreadsheet/Gui/SpreadsheetView.h" #include #include #include #include #include #include -#include "Mod/Spreadsheet/App/Sheet.h" -#include "Mod/Spreadsheet/Gui/SpreadsheetView.h" #include "Workbench.h" #include "qtcolorpicker.h" @@ -46,7 +46,7 @@ using namespace App; using namespace SpreadsheetGui; using namespace Spreadsheet; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Spreadsheet"); qApp->translate("Workbench", "&Spreadsheet"); qApp->translate("Workbench", "&Alignment"); @@ -60,49 +60,61 @@ Workbench::Workbench() : Gui::StdWorkbench() , initialized(false) , workbenchHelper(new WorkbenchHelper) -{ -} +{} Workbench::~Workbench() = default; void Workbench::activated() { if (!initialized) { - QList bars = Gui::getMainWindow()->findChildren(QString::fromLatin1("Spreadsheet")); + QList bars = + Gui::getMainWindow()->findChildren(QString::fromLatin1("Spreadsheet")); if (bars.size() == 1) { - QToolBar * bar = bars[0]; - QtColorPicker * foregroundColor; - QtColorPicker * backgroundColor; + QToolBar* bar = bars[0]; + QtColorPicker* foregroundColor; + QtColorPicker* backgroundColor; QPalette palette = Gui::getMainWindow()->palette(); - QList fgList = Gui::getMainWindow()->findChildren(QString::fromLatin1("Spreadsheet_ForegroundColor")); - if (!fgList.empty()) + QList fgList = Gui::getMainWindow()->findChildren( + QString::fromLatin1("Spreadsheet_ForegroundColor")); + if (!fgList.empty()) { foregroundColor = fgList[0]; + } else { foregroundColor = new QtColorPicker(bar); foregroundColor->setObjectName(QString::fromLatin1("Spreadsheet_ForegroundColor")); foregroundColor->setStandardColors(); foregroundColor->setCurrentColor(palette.color(QPalette::WindowText)); - QObject::connect(foregroundColor, &QtColorPicker::colorSet, workbenchHelper.get(), &WorkbenchHelper::setForegroundColor); + QObject::connect(foregroundColor, + &QtColorPicker::colorSet, + workbenchHelper.get(), + &WorkbenchHelper::setForegroundColor); } foregroundColor->setToolTip(QObject::tr("Set cell(s) foreground color")); - foregroundColor->setWhatsThis(QObject::tr("Sets the Spreadsheet cell(s) foreground color")); + foregroundColor->setWhatsThis( + QObject::tr("Sets the Spreadsheet cell(s) foreground color")); foregroundColor->setStatusTip(QObject::tr("Set cell(s) foreground color")); bar->addWidget(foregroundColor); - QList bgList = Gui::getMainWindow()->findChildren(QString::fromLatin1("Spreadsheet_BackgroundColor")); - if (!bgList.empty()) + QList bgList = Gui::getMainWindow()->findChildren( + QString::fromLatin1("Spreadsheet_BackgroundColor")); + if (!bgList.empty()) { backgroundColor = bgList[0]; + } else { backgroundColor = new QtColorPicker(bar); backgroundColor->setObjectName(QString::fromLatin1("Spreadsheet_BackgroundColor")); backgroundColor->setStandardColors(); backgroundColor->setCurrentColor(palette.color(QPalette::Base)); - QObject::connect(backgroundColor, &QtColorPicker::colorSet, workbenchHelper.get(), &WorkbenchHelper::setBackgroundColor); + QObject::connect(backgroundColor, + &QtColorPicker::colorSet, + workbenchHelper.get(), + &WorkbenchHelper::setBackgroundColor); } backgroundColor->setToolTip(QObject::tr("Set cell(s) background color")); - backgroundColor->setWhatsThis(QObject::tr("Sets the Spreadsheet cell(s) background color")); + backgroundColor->setWhatsThis( + QObject::tr("Sets the Spreadsheet cell(s) background color")); backgroundColor->setStatusTip(QObject::tr("Set cell(s) background color")); bar->addWidget(backgroundColor); @@ -111,16 +123,17 @@ void Workbench::activated() } } -void WorkbenchHelper::setForegroundColor(const QColor & color) +void WorkbenchHelper::setForegroundColor(const QColor& color) { - Gui::Document * doc = Gui::Application::Instance->activeDocument(); + Gui::Document* doc = Gui::Application::Instance->activeDocument(); if (doc) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); // Execute mergeCells commands @@ -128,9 +141,15 @@ void WorkbenchHelper::setForegroundColor(const QColor & color) std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set foreground color")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setForeground('%s', (%f,%f,%f))", sheet->getNameInDocument(), - i->rangeString().c_str(), color.redF(), color.greenF(), color.blueF()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.setForeground('%s', (%f,%f,%f))", + sheet->getNameInDocument(), + i->rangeString().c_str(), + color.redF(), + color.greenF(), + color.blueF()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -138,16 +157,17 @@ void WorkbenchHelper::setForegroundColor(const QColor & color) } } -void WorkbenchHelper::setBackgroundColor(const QColor & color) +void WorkbenchHelper::setBackgroundColor(const QColor& color) { - Gui::Document * doc = Gui::Application::Instance->activeDocument(); + Gui::Document* doc = Gui::Application::Instance->activeDocument(); if (doc) { Gui::MDIView* activeWindow = Gui::getMainWindow()->activeWindow(); - SpreadsheetGui::SheetView * sheetView = freecad_dynamic_cast(activeWindow); + SpreadsheetGui::SheetView* sheetView = + freecad_dynamic_cast(activeWindow); if (sheetView) { - Sheet * sheet = sheetView->getSheet(); + Sheet* sheet = sheetView->getSheet(); std::vector ranges = sheetView->selectedRanges(); // Execute mergeCells commands @@ -155,9 +175,15 @@ void WorkbenchHelper::setBackgroundColor(const QColor & color) std::vector::const_iterator i = ranges.begin(); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Set background color")); - for (; i != ranges.end(); ++i) - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.setBackground('%s', (%f,%f,%f))", sheet->getNameInDocument(), - i->rangeString().c_str(), color.redF(), color.greenF(), color.blueF()); + for (; i != ranges.end(); ++i) { + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.setBackground('%s', (%f,%f,%f))", + sheet->getNameInDocument(), + i->rangeString().c_str(), + color.redF(), + color.greenF(), + color.blueF()); + } Gui::Command::commitCommand(); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); } @@ -165,7 +191,7 @@ void WorkbenchHelper::setBackgroundColor(const QColor & color) } } -Gui::MenuItem *Workbench::setupMenuBar() const +Gui::MenuItem* Workbench::setupMenuBar() const { Gui::MenuItem* root = StdWorkbench::setupMenuBar(); Gui::MenuItem* item = root->findItem("&Windows"); @@ -176,35 +202,28 @@ Gui::MenuItem *Workbench::setupMenuBar() const // utilities Gui::MenuItem* alignments = new Gui::MenuItem; alignments->setCommand("&Alignment"); - *alignments - << "Spreadsheet_AlignLeft" - << "Spreadsheet_AlignCenter" - << "Spreadsheet_AlignRight" - << "Spreadsheet_AlignTop" - << "Spreadsheet_AlignVCenter" - << "Spreadsheet_AlignBottom" - ; + *alignments << "Spreadsheet_AlignLeft" + << "Spreadsheet_AlignCenter" + << "Spreadsheet_AlignRight" + << "Spreadsheet_AlignTop" + << "Spreadsheet_AlignVCenter" + << "Spreadsheet_AlignBottom"; Gui::MenuItem* styles = new Gui::MenuItem; styles->setCommand("&Styles"); - *styles - << "Spreadsheet_StyleBold" + *styles << "Spreadsheet_StyleBold" << "Spreadsheet_StyleItalic" - << "Spreadsheet_StyleUnderline" - ; + << "Spreadsheet_StyleUnderline"; spreadsheet->setCommand("&Spreadsheet"); *spreadsheet << "Spreadsheet_CreateSheet" - << "Separator" - << "Spreadsheet_Import" - << "Spreadsheet_Export" - << "Separator" - << "Spreadsheet_MergeCells" - << "Spreadsheet_SplitCell" - << "Separator" - << alignments - << styles - ; + << "Separator" + << "Spreadsheet_Import" + << "Spreadsheet_Export" + << "Separator" + << "Spreadsheet_MergeCells" + << "Spreadsheet_SplitCell" + << "Separator" << alignments << styles; return root; } @@ -234,8 +253,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "Spreadsheet_StyleUnderline" << "Separator" << "Spreadsheet_SetAlias" - << "Separator" - ; + << "Separator"; return root; } diff --git a/src/Mod/Spreadsheet/Gui/Workbench.h b/src/Mod/Spreadsheet/Gui/Workbench.h index 7d91f7b541..b7942ad8e6 100644 --- a/src/Mod/Spreadsheet/Gui/Workbench.h +++ b/src/Mod/Spreadsheet/Gui/Workbench.h @@ -31,41 +31,42 @@ class QtColorPicker; class QColor; -namespace SpreadsheetGui { +namespace SpreadsheetGui +{ /** * @author Eivind Kvedalen */ -class SpreadsheetGuiExport WorkbenchHelper : public QObject +class SpreadsheetGuiExport WorkbenchHelper: public QObject { Q_OBJECT public Q_SLOTS: - void setForegroundColor(const QColor &color); - void setBackgroundColor(const QColor &color); + void setForegroundColor(const QColor& color); + void setBackgroundColor(const QColor& color); }; -class SpreadsheetGuiExport Workbench : public Gui::StdWorkbench +class SpreadsheetGuiExport Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - Workbench(); - ~Workbench() override; - void activated() override; + Workbench(); + ~Workbench() override; + void activated() override; private: - bool initialized; - std::unique_ptr workbenchHelper; + bool initialized; + std::unique_ptr workbenchHelper; protected: - Gui::MenuItem *setupMenuBar() const override; - Gui::ToolBarItem* setupToolBars() const override; - Gui::ToolBarItem* setupCommandBars() const override; + Gui::MenuItem* setupMenuBar() const override; + Gui::ToolBarItem* setupToolBars() const override; + Gui::ToolBarItem* setupCommandBars() const override; }; -} // namespace SpreadsheetModGui +} // namespace SpreadsheetGui -#endif // SPREADSHEET_WORKBENCH_H +#endif // SPREADSHEET_WORKBENCH_H diff --git a/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp b/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp index 838e79b220..3845342dff 100644 --- a/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp +++ b/src/Mod/Spreadsheet/Gui/qtcolorpicker.cpp @@ -47,30 +47,30 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include "qtcolorpicker.h" - +// clang-format off /*! \class QtColorPicker \brief The QtColorPicker class provides a widget for selecting @@ -1164,6 +1164,6 @@ void ColorPickerButton::paintEvent(QPaintEvent *e) p.end(); } - +// clang-format on #include "moc_qtcolorpicker.cpp" #include diff --git a/src/Mod/Spreadsheet/Gui/qtcolorpicker.h b/src/Mod/Spreadsheet/Gui/qtcolorpicker.h index 391435839d..34af87ddf6 100644 --- a/src/Mod/Spreadsheet/Gui/qtcolorpicker.h +++ b/src/Mod/Spreadsheet/Gui/qtcolorpicker.h @@ -1,17 +1,17 @@ /**************************************************************************** ** ** This file is part of a Qt Solutions component. -** +** ** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -** +** ** Contact: Qt Software Information (qt-info@nokia.com) -** -** Commercial Usage +** +** Commercial Usage ** Licensees holding valid Qt Commercial licenses may use this file in ** accordance with the Qt Solutions Commercial License Agreement provided ** with the Software or, alternatively, in accordance with the terms ** contained in a written agreement between you and Nokia. -** +** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software @@ -19,31 +19,32 @@ ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** +** ** In addition, as a special exception, Nokia gives you certain ** additional rights. These rights are described in the Nokia Qt LGPL ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this ** package. -** -** GNU General Public License Usage +** +** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. -** +** ** Please note Third Party Software included with Qt Solutions may impose ** additional restrictions and it is the user's responsibility to ensure ** that they have met the licensing requirements of the GPL, LGPL, or Qt ** Solutions Commercial license and the relevant license of the Third ** Party Software they are using. -** +** ** If you are unsure which license is appropriate for your use, please ** contact the sales department at qt-sales@nokia.com. -** +** ****************************************************************************/ +// clang-format off #ifndef QTCOLORPICKER_H #define QTCOLORPICKER_H #include @@ -120,3 +121,4 @@ private: }; #endif +// clang-format on diff --git a/src/Mod/Spreadsheet/Init.py b/src/Mod/Spreadsheet/Init.py index 5654dca637..0c8cc4c1b2 100644 --- a/src/Mod/Spreadsheet/Init.py +++ b/src/Mod/Spreadsheet/Init.py @@ -1,27 +1,27 @@ -#*************************************************************************** -#* Copyright (c) 2001,2002 Juergen Riegel * -#* Copyright (c) 2013 Yorik van Havre * -#* Copyright (c) 2013 Eivind Kvedalen * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2001,2002 Juergen Riegel * +# * Copyright (c) 2013 Yorik van Havre * +# * Copyright (c) 2013 Eivind Kvedalen * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # FreeCAD init script of the Spreadsheet module @@ -30,12 +30,11 @@ ParGrp = App.ParamGet("System parameter:Modules").GetGroup("Spreadsheet") # Set the needed information -ParGrp.SetString("HelpIndex", "Spreadsheet/Help/index.html") -ParGrp.SetString("WorkBenchName", "Spreadsheet") -ParGrp.SetString("WorkBenchModule", "SpreadsheetWorkbench.py") +ParGrp.SetString("HelpIndex", "Spreadsheet/Help/index.html") +ParGrp.SetString("WorkBenchName", "Spreadsheet") +ParGrp.SetString("WorkBenchModule", "SpreadsheetWorkbench.py") # add Import/Export types -App.addImportType("Excel spreadsheet (*.xlsx)","importXLSX") - -App.__unit_test__ += [ "TestSpreadsheet" ] +App.addImportType("Excel spreadsheet (*.xlsx)", "importXLSX") +App.__unit_test__ += ["TestSpreadsheet"] diff --git a/src/Mod/Spreadsheet/InitGui.py b/src/Mod/Spreadsheet/InitGui.py index 8a8b7b2a1e..225695b920 100644 --- a/src/Mod/Spreadsheet/InitGui.py +++ b/src/Mod/Spreadsheet/InitGui.py @@ -1,25 +1,25 @@ -#*************************************************************************** -#* Copyright (c) 2002,2003 Juergen Riegel * -#* Copyright (c) 2013 Eivind Kvedalen * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License (GPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002,2003 Juergen Riegel * +# * Copyright (c) 2013 Eivind Kvedalen * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU General Public License (GPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# ***************************************************************************/ # Spreadsheet gui init module # @@ -28,10 +28,13 @@ # runs when the gui is up -class SpreadsheetWorkbench ( Workbench ): +class SpreadsheetWorkbench(Workbench): "Spreadsheet workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Spreadsheet/Resources/icons/SpreadsheetWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Spreadsheet/Resources/icons/SpreadsheetWorkbench.svg" + ) self.__class__.MenuText = "Spreadsheet" self.__class__.ToolTip = "Spreadsheet workbench" @@ -42,7 +45,8 @@ class SpreadsheetWorkbench ( Workbench ): def GetClassName(self): return "SpreadsheetGui::Workbench" + Gui.addWorkbench(SpreadsheetWorkbench()) # Append the open handler -FreeCAD.addImportType("Spreadsheet formats (*.csv)","SpreadsheetGui") +FreeCAD.addImportType("Spreadsheet formats (*.csv)", "SpreadsheetGui") diff --git a/src/Mod/Spreadsheet/SpreadsheetGlobal.h b/src/Mod/Spreadsheet/SpreadsheetGlobal.h index 66c47f062c..a8741c9dd0 100644 --- a/src/Mod/Spreadsheet/SpreadsheetGlobal.h +++ b/src/Mod/Spreadsheet/SpreadsheetGlobal.h @@ -29,19 +29,19 @@ // Spreadsheet #ifndef SpreadsheetExport #ifdef Spreadsheet_EXPORTS -# define SpreadsheetExport FREECAD_DECL_EXPORT +#define SpreadsheetExport FREECAD_DECL_EXPORT #else -# define SpreadsheetExport FREECAD_DECL_IMPORT +#define SpreadsheetExport FREECAD_DECL_IMPORT #endif #endif // SpreadsheetGui #ifndef SpreadsheetGuiExport #ifdef SpreadsheetGui_EXPORTS -# define SpreadsheetGuiExport FREECAD_DECL_EXPORT +#define SpreadsheetGuiExport FREECAD_DECL_EXPORT #else -# define SpreadsheetGuiExport FREECAD_DECL_IMPORT +#define SpreadsheetGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //SPREADSHEET_GLOBAL_H +#endif // SPREADSHEET_GLOBAL_H diff --git a/src/Mod/Spreadsheet/TestSpreadsheet.py b/src/Mod/Spreadsheet/TestSpreadsheet.py index 9028b9cdd4..7f6b13bd5d 100644 --- a/src/Mod/Spreadsheet/TestSpreadsheet.py +++ b/src/Mod/Spreadsheet/TestSpreadsheet.py @@ -1,23 +1,23 @@ -#*************************************************************************** -#* Copyright (c) 2016 Werner Mayer * -#* Copyright (c) 2016 Eivind Kvedalen * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License (GPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2016 Werner Mayer * +# * Copyright (c) 2016 Eivind Kvedalen * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU General Public License (GPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# ***************************************************************************/ import os import sys @@ -33,77 +33,77 @@ from FreeCAD import Units v = Base.Vector -#---------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------- # define the functions to test the FreeCAD Spreadsheet module and expression engine -#---------------------------------------------------------------------------------- +# ---------------------------------------------------------------------------------- class SpreadsheetCases(unittest.TestCase): def setUp(self): self.doc = FreeCAD.newDocument() self.TempPath = tempfile.gettempdir() - FreeCAD.Console.PrintLog( ' Using temp path: ' + self.TempPath + '\n') + FreeCAD.Console.PrintLog(" Using temp path: " + self.TempPath + "\n") def testAggregates(self): - """ Test all aggregate functions """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('B13', '4') - sheet.set('B14', '5') - sheet.set('B15', '6') - sheet.set('C13', '4mm') - sheet.set('C14', '5mm') - sheet.set('C15', '6mm') - sheet.set('C16', '6') + """Test all aggregate functions""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("B13", "4") + sheet.set("B14", "5") + sheet.set("B15", "6") + sheet.set("C13", "4mm") + sheet.set("C14", "5mm") + sheet.set("C15", "6mm") + sheet.set("C16", "6") - sheet.set('A1', '=sum(1)') - sheet.set('A2', '=sum(1;2)') - sheet.set('A3', '=sum(1;2;3)') - sheet.set('A4', '=sum(1;2;3;B13)') - sheet.set('A5', '=sum(1;2;3;B13:B15)') + sheet.set("A1", "=sum(1)") + sheet.set("A2", "=sum(1;2)") + sheet.set("A3", "=sum(1;2;3)") + sheet.set("A4", "=sum(1;2;3;B13)") + sheet.set("A5", "=sum(1;2;3;B13:B15)") - sheet.set('B1', '=min(1)') - sheet.set('B2', '=min(1;2)') - sheet.set('B3', '=min(1;2;3)') - sheet.set('B4', '=min(1;2;3;B13)') - sheet.set('B5', '=min(1;2;3;B13:B15)') + sheet.set("B1", "=min(1)") + sheet.set("B2", "=min(1;2)") + sheet.set("B3", "=min(1;2;3)") + sheet.set("B4", "=min(1;2;3;B13)") + sheet.set("B5", "=min(1;2;3;B13:B15)") - sheet.set('C1', '=max(1)') - sheet.set('C2', '=max(1;2)') - sheet.set('C3', '=max(1;2;3)') - sheet.set('C4', '=max(1;2;3;B13)') - sheet.set('C5', '=max(1;2;3;B13:B15)') + sheet.set("C1", "=max(1)") + sheet.set("C2", "=max(1;2)") + sheet.set("C3", "=max(1;2;3)") + sheet.set("C4", "=max(1;2;3;B13)") + sheet.set("C5", "=max(1;2;3;B13:B15)") - sheet.set('D1', '=stddev(1)') - sheet.set('D2', '=stddev(1;2)') - sheet.set('D3', '=stddev(1;2;3)') - sheet.set('D4', '=stddev(1;2;3;B13)') - sheet.set('D5', '=stddev(1;2;3;B13:B15)') + sheet.set("D1", "=stddev(1)") + sheet.set("D2", "=stddev(1;2)") + sheet.set("D3", "=stddev(1;2;3)") + sheet.set("D4", "=stddev(1;2;3;B13)") + sheet.set("D5", "=stddev(1;2;3;B13:B15)") - sheet.set('E1', '=count(1)') - sheet.set('E2', '=count(1;2)') - sheet.set('E3', '=count(1;2;3)') - sheet.set('E4', '=count(1;2;3;B13)') - sheet.set('E5', '=count(1;2;3;B13:B15)') + sheet.set("E1", "=count(1)") + sheet.set("E2", "=count(1;2)") + sheet.set("E3", "=count(1;2;3)") + sheet.set("E4", "=count(1;2;3;B13)") + sheet.set("E5", "=count(1;2;3;B13:B15)") - sheet.set('F1', '=average(1)') - sheet.set('F2', '=average(1;2)') - sheet.set('F3', '=average(1;2;3)') - sheet.set('F4', '=average(1;2;3;B13)') - sheet.set('F5', '=average(1;2;3;B13:B15)') + sheet.set("F1", "=average(1)") + sheet.set("F2", "=average(1;2)") + sheet.set("F3", "=average(1;2;3)") + sheet.set("F4", "=average(1;2;3;B13)") + sheet.set("F5", "=average(1;2;3;B13:B15)") - sheet.set('G1', '=average(C13:C15)') - sheet.set('G2', '=min(C13:C15)') - sheet.set('G3', '=max(C13:C15)') - sheet.set('G4', '=count(C13:C15)') - sheet.set('G5', '=stddev(C13:C15)') - sheet.set('G6', '=sum(C13:C15)') + sheet.set("G1", "=average(C13:C15)") + sheet.set("G2", "=min(C13:C15)") + sheet.set("G3", "=max(C13:C15)") + sheet.set("G4", "=count(C13:C15)") + sheet.set("G5", "=stddev(C13:C15)") + sheet.set("G6", "=sum(C13:C15)") - sheet.set('H1', '=average(C13:C16)') - sheet.set('H2', '=min(C13:C16)') - sheet.set('H3', '=max(C13:C16)') - sheet.set('H4', '=count(C13:C16)') - sheet.set('H5', '=stddev(C13:C16)') - sheet.set('H6', '=sum(C13:C16)') + sheet.set("H1", "=average(C13:C16)") + sheet.set("H2", "=min(C13:C16)") + sheet.set("H3", "=max(C13:C16)") + sheet.set("H4", "=count(C13:C16)") + sheet.set("H5", "=stddev(C13:C16)") + sheet.set("H6", "=sum(C13:C16)") self.doc.recompute() self.assertEqual(sheet.A1, 1) @@ -124,7 +124,9 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.C4, 4) self.assertEqual(sheet.C5, 6) - self.assertTrue(sheet.D1.startswith(u'ERR: Invalid number of entries: at least two required.')) + self.assertTrue( + sheet.D1.startswith("ERR: Invalid number of entries: at least two required.") + ) self.assertEqual(sheet.D2, 0.7071067811865476) self.assertEqual(sheet.D3, 1.0) self.assertEqual(sheet.D4, 1.2909944487358056) @@ -142,258 +144,272 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.F4, (1.0 + 2 + 3 + 4) / 4) self.assertEqual(sheet.F5, (1.0 + 2 + 3 + 4 + 5 + 6) / 6) - self.assertEqual(sheet.G1, Units.Quantity('5 mm')) - self.assertEqual(sheet.G2, Units.Quantity('4 mm')) - self.assertEqual(sheet.G3, Units.Quantity('6 mm')) + self.assertEqual(sheet.G1, Units.Quantity("5 mm")) + self.assertEqual(sheet.G2, Units.Quantity("4 mm")) + self.assertEqual(sheet.G3, Units.Quantity("6 mm")) self.assertEqual(sheet.G4, 3) - self.assertEqual(sheet.G5, Units.Quantity('1 mm')) - self.assertEqual(sheet.G6, Units.Quantity('15 mm')) + self.assertEqual(sheet.G5, Units.Quantity("1 mm")) + self.assertEqual(sheet.G6, Units.Quantity("15 mm")) - self.assertTrue(sheet.H1.startswith(u'ERR: Quantity::operator +=(): Unit mismatch in plus operation')) - self.assertTrue(sheet.H2.startswith(u'ERR: Quantity::operator <(): quantities need to have same unit to compare')) - self.assertTrue(sheet.H3.startswith(u'ERR: Quantity::operator >(): quantities need to have same unit to compare')) + self.assertTrue( + sheet.H1.startswith("ERR: Quantity::operator +=(): Unit mismatch in plus operation") + ) + self.assertTrue( + sheet.H2.startswith( + "ERR: Quantity::operator <(): quantities need to have same unit to compare" + ) + ) + self.assertTrue( + sheet.H3.startswith( + "ERR: Quantity::operator >(): quantities need to have same unit to compare" + ) + ) self.assertEqual(sheet.H4, 4) - self.assertTrue(sheet.H5.startswith(u'ERR: Quantity::operator -(): Unit mismatch in minus operation')) - self.assertTrue(sheet.H6.startswith(u'ERR: Quantity::operator +=(): Unit mismatch in plus operation')) + self.assertTrue( + sheet.H5.startswith("ERR: Quantity::operator -(): Unit mismatch in minus operation") + ) + self.assertTrue( + sheet.H6.startswith("ERR: Quantity::operator +=(): Unit mismatch in plus operation") + ) def assertMostlyEqual(self, a, b): if type(a) is Units.Quantity: - self.assertTrue( math.fabs(a.Value - b.Value) < 1e-14) - self.assertTrue( a.Unit == b.Unit) + self.assertTrue(math.fabs(a.Value - b.Value) < 1e-14) + self.assertTrue(a.Unit == b.Unit) else: - self.assertTrue( math.fabs(a - b) < 1e-14) + self.assertTrue(math.fabs(a - b) < 1e-14) def testFunctions(self): - """ Test all built-in simple functions """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '=cos(60)') # Cos - sheet.set('B1', '=cos(60deg)') - sheet.set('C1', '=cos(pi / 2 * 1rad)') - sheet.set('A2', '=sin(30)') # Sin - sheet.set('B2', '=sin(30deg)') - sheet.set('C2', '=sin(pi / 6 * 1rad)') - sheet.set('A3', '=tan(45)') # Tan - sheet.set('B3', '=tan(45deg)') - sheet.set('C3', '=tan(pi / 4 * 1rad)') - sheet.set('A4', '=abs(3)') # Abs - sheet.set('B4', '=abs(-3)') - sheet.set('C4', '=abs(-3mm)') - sheet.set('A5', '=exp(3)') # Exp - sheet.set('B5', '=exp(-3)') - sheet.set('C5', '=exp(-3mm)') - sheet.set('A6', '=log(3)') # Log - sheet.set('B6', '=log(-3)') - sheet.set('C6', '=log(-3mm)') - sheet.set('A7', '=log10(10)') # Log10 - sheet.set('B7', '=log10(-3)') - sheet.set('C7', '=log10(-3mm)') - sheet.set('A8', '=round(3.4)')# Round - sheet.set('B8', '=round(3.6)') - sheet.set('C8', '=round(-3.4)') - sheet.set('D8', '=round(-3.6)') - sheet.set('E8', '=round(3.4mm)') - sheet.set('F8', '=round(3.6mm)') - sheet.set('G8', '=round(-3.4mm)') - sheet.set('H8', '=round(-3.6mm)') - sheet.set('A9', '=trunc(3.4)')# Trunc - sheet.set('B9', '=trunc(3.6)') - sheet.set('C9', '=trunc(-3.4)') - sheet.set('D9', '=trunc(-3.6)') - sheet.set('E9', '=trunc(3.4mm)') - sheet.set('F9', '=trunc(3.6mm)') - sheet.set('G9', '=trunc(-3.4mm)') - sheet.set('H9', '=trunc(-3.6mm)') - sheet.set('A10', '=ceil(3.4)') # Ceil - sheet.set('B10', '=ceil(3.6)') - sheet.set('C10', '=ceil(-3.4)') - sheet.set('D10', '=ceil(-3.6)') - sheet.set('E10', '=ceil(3.4mm)') - sheet.set('F10', '=ceil(3.6mm)') - sheet.set('G10', '=ceil(-3.4mm)') - sheet.set('H10', '=ceil(-3.6mm)') - sheet.set('A11', '=floor(3.4)')# Floor - sheet.set('B11', '=floor(3.6)') - sheet.set('C11', '=floor(-3.4)') - sheet.set('D11', '=floor(-3.6)') - sheet.set('E11', '=floor(3.4mm)') - sheet.set('F11', '=floor(3.6mm)') - sheet.set('G11', '=floor(-3.4mm)') - sheet.set('H11', '=floor(-3.6mm)') - sheet.set('A12', '=asin(0.5)') # Asin - sheet.set('B12', '=asin(0.5mm)') - sheet.set('A13', '=acos(0.5)') # Acos - sheet.set('B13', '=acos(0.5mm)') - sheet.set('A14', '=atan(sqrt(3))') # Atan - sheet.set('B14', '=atan(0.5mm)') - sheet.set('A15', '=sinh(0.5)') # Sinh - sheet.set('B15', '=sinh(0.5mm)') - sheet.set('A16', '=cosh(0.5)') # Cosh - sheet.set('B16', '=cosh(0.5mm)') - sheet.set('A17', '=tanh(0.5)') # Tanh - sheet.set('B17', '=tanh(0.5mm)') - sheet.set('A18', '=sqrt(4)') # Sqrt - sheet.set('B18', '=sqrt(4mm^2)') - sheet.set('A19', '=mod(7; 4)') # Mod - sheet.set('B19', '=mod(-7; 4)') - sheet.set('C19', '=mod(7mm; 4)') - sheet.set('D19', '=mod(7mm; 4mm)') - sheet.set('A20', '=atan2(3; 3)') # Atan2 - sheet.set('B20', '=atan2(-3; 3)') - sheet.set('C20', '=atan2(3mm; 3)') - sheet.set('D20', '=atan2(3mm; 3mm)') - sheet.set('A21', '=pow(7; 4)') # Pow - sheet.set('B21', '=pow(-7; 4)') - sheet.set('C21', '=pow(7mm; 4)') - sheet.set('D21', '=pow(7mm; 4mm)') - sheet.set('A23', '=hypot(3; 4)') # Hypot - sheet.set('B23', '=hypot(-3; 4)') - sheet.set('C23', '=hypot(3mm; 4)') - sheet.set('D23', '=hypot(3mm; 4mm)') - sheet.set('A24', '=hypot(3; 4; 5)') # Hypot - sheet.set('B24', '=hypot(-3; 4; 5)') - sheet.set('C24', '=hypot(3mm; 4; 5)') - sheet.set('D24', '=hypot(3mm; 4mm; 5mm)') - sheet.set('A26', '=cath(5; 3)') # Cath - sheet.set('B26', '=cath(-5; 3)') - sheet.set('C26', '=cath(5mm; 3)') - sheet.set('D26', '=cath(5mm; 3mm)') + """Test all built-in simple functions""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "=cos(60)") # Cos + sheet.set("B1", "=cos(60deg)") + sheet.set("C1", "=cos(pi / 2 * 1rad)") + sheet.set("A2", "=sin(30)") # Sin + sheet.set("B2", "=sin(30deg)") + sheet.set("C2", "=sin(pi / 6 * 1rad)") + sheet.set("A3", "=tan(45)") # Tan + sheet.set("B3", "=tan(45deg)") + sheet.set("C3", "=tan(pi / 4 * 1rad)") + sheet.set("A4", "=abs(3)") # Abs + sheet.set("B4", "=abs(-3)") + sheet.set("C4", "=abs(-3mm)") + sheet.set("A5", "=exp(3)") # Exp + sheet.set("B5", "=exp(-3)") + sheet.set("C5", "=exp(-3mm)") + sheet.set("A6", "=log(3)") # Log + sheet.set("B6", "=log(-3)") + sheet.set("C6", "=log(-3mm)") + sheet.set("A7", "=log10(10)") # Log10 + sheet.set("B7", "=log10(-3)") + sheet.set("C7", "=log10(-3mm)") + sheet.set("A8", "=round(3.4)") # Round + sheet.set("B8", "=round(3.6)") + sheet.set("C8", "=round(-3.4)") + sheet.set("D8", "=round(-3.6)") + sheet.set("E8", "=round(3.4mm)") + sheet.set("F8", "=round(3.6mm)") + sheet.set("G8", "=round(-3.4mm)") + sheet.set("H8", "=round(-3.6mm)") + sheet.set("A9", "=trunc(3.4)") # Trunc + sheet.set("B9", "=trunc(3.6)") + sheet.set("C9", "=trunc(-3.4)") + sheet.set("D9", "=trunc(-3.6)") + sheet.set("E9", "=trunc(3.4mm)") + sheet.set("F9", "=trunc(3.6mm)") + sheet.set("G9", "=trunc(-3.4mm)") + sheet.set("H9", "=trunc(-3.6mm)") + sheet.set("A10", "=ceil(3.4)") # Ceil + sheet.set("B10", "=ceil(3.6)") + sheet.set("C10", "=ceil(-3.4)") + sheet.set("D10", "=ceil(-3.6)") + sheet.set("E10", "=ceil(3.4mm)") + sheet.set("F10", "=ceil(3.6mm)") + sheet.set("G10", "=ceil(-3.4mm)") + sheet.set("H10", "=ceil(-3.6mm)") + sheet.set("A11", "=floor(3.4)") # Floor + sheet.set("B11", "=floor(3.6)") + sheet.set("C11", "=floor(-3.4)") + sheet.set("D11", "=floor(-3.6)") + sheet.set("E11", "=floor(3.4mm)") + sheet.set("F11", "=floor(3.6mm)") + sheet.set("G11", "=floor(-3.4mm)") + sheet.set("H11", "=floor(-3.6mm)") + sheet.set("A12", "=asin(0.5)") # Asin + sheet.set("B12", "=asin(0.5mm)") + sheet.set("A13", "=acos(0.5)") # Acos + sheet.set("B13", "=acos(0.5mm)") + sheet.set("A14", "=atan(sqrt(3))") # Atan + sheet.set("B14", "=atan(0.5mm)") + sheet.set("A15", "=sinh(0.5)") # Sinh + sheet.set("B15", "=sinh(0.5mm)") + sheet.set("A16", "=cosh(0.5)") # Cosh + sheet.set("B16", "=cosh(0.5mm)") + sheet.set("A17", "=tanh(0.5)") # Tanh + sheet.set("B17", "=tanh(0.5mm)") + sheet.set("A18", "=sqrt(4)") # Sqrt + sheet.set("B18", "=sqrt(4mm^2)") + sheet.set("A19", "=mod(7; 4)") # Mod + sheet.set("B19", "=mod(-7; 4)") + sheet.set("C19", "=mod(7mm; 4)") + sheet.set("D19", "=mod(7mm; 4mm)") + sheet.set("A20", "=atan2(3; 3)") # Atan2 + sheet.set("B20", "=atan2(-3; 3)") + sheet.set("C20", "=atan2(3mm; 3)") + sheet.set("D20", "=atan2(3mm; 3mm)") + sheet.set("A21", "=pow(7; 4)") # Pow + sheet.set("B21", "=pow(-7; 4)") + sheet.set("C21", "=pow(7mm; 4)") + sheet.set("D21", "=pow(7mm; 4mm)") + sheet.set("A23", "=hypot(3; 4)") # Hypot + sheet.set("B23", "=hypot(-3; 4)") + sheet.set("C23", "=hypot(3mm; 4)") + sheet.set("D23", "=hypot(3mm; 4mm)") + sheet.set("A24", "=hypot(3; 4; 5)") # Hypot + sheet.set("B24", "=hypot(-3; 4; 5)") + sheet.set("C24", "=hypot(3mm; 4; 5)") + sheet.set("D24", "=hypot(3mm; 4mm; 5mm)") + sheet.set("A26", "=cath(5; 3)") # Cath + sheet.set("B26", "=cath(-5; 3)") + sheet.set("C26", "=cath(5mm; 3)") + sheet.set("D26", "=cath(5mm; 3mm)") - l = math.sqrt(5 * 5 + 4*4 + 3*3) - sheet.set('A27', '=cath(%0.15f; 5; 4)' % l) # Cath - sheet.set('B27', '=cath(%0.15f; -5; 4)' % l) - sheet.set('C27', '=cath(%0.15f mm; 5mm; 4)' % l) - sheet.set('D27', '=cath(%0.15f mm; 5mm; 4mm)' % l) + l = math.sqrt(5 * 5 + 4 * 4 + 3 * 3) + sheet.set("A27", "=cath(%0.15f; 5; 4)" % l) # Cath + sheet.set("B27", "=cath(%0.15f; -5; 4)" % l) + sheet.set("C27", "=cath(%0.15f mm; 5mm; 4)" % l) + sheet.set("D27", "=cath(%0.15f mm; 5mm; 4mm)" % l) self.doc.recompute() - self.assertMostlyEqual(sheet.A1, 0.5) # Cos - self.assertMostlyEqual(sheet.B1, 0.5) - self.assertMostlyEqual(sheet.C1, 0) - self.assertMostlyEqual(sheet.A2, 0.5) # Sin - self.assertMostlyEqual(sheet.B2, 0.5) - self.assertMostlyEqual(sheet.C2, 0.5) - self.assertMostlyEqual(sheet.A3, 1) # Tan - self.assertMostlyEqual(sheet.B3, 1) - self.assertMostlyEqual(sheet.C3, 1 ) - self.assertMostlyEqual(sheet.A4, 3) # Abs - self.assertMostlyEqual(sheet.B4, 3) - self.assertMostlyEqual(sheet.C4, Units.Quantity('3 mm')) - self.assertMostlyEqual(sheet.A5, math.exp(3)) # Exp - self.assertMostlyEqual(sheet.B5, math.exp(-3)) - self.assertTrue(sheet.C5.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A6, math.log(3)) # Log + self.assertMostlyEqual(sheet.A1, 0.5) # Cos + self.assertMostlyEqual(sheet.B1, 0.5) + self.assertMostlyEqual(sheet.C1, 0) + self.assertMostlyEqual(sheet.A2, 0.5) # Sin + self.assertMostlyEqual(sheet.B2, 0.5) + self.assertMostlyEqual(sheet.C2, 0.5) + self.assertMostlyEqual(sheet.A3, 1) # Tan + self.assertMostlyEqual(sheet.B3, 1) + self.assertMostlyEqual(sheet.C3, 1) + self.assertMostlyEqual(sheet.A4, 3) # Abs + self.assertMostlyEqual(sheet.B4, 3) + self.assertMostlyEqual(sheet.C4, Units.Quantity("3 mm")) + self.assertMostlyEqual(sheet.A5, math.exp(3)) # Exp + self.assertMostlyEqual(sheet.B5, math.exp(-3)) + self.assertTrue(sheet.C5.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A6, math.log(3)) # Log self.assertTrue(math.isnan(sheet.B6)) - self.assertTrue(sheet.C6.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A7, math.log10(10)) # Log10 + self.assertTrue(sheet.C6.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A7, math.log10(10)) # Log10 self.assertTrue(math.isnan(sheet.B7)) - self.assertTrue(sheet.C7.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A8, 3) # Round - self.assertMostlyEqual(sheet.B8, 4) - self.assertMostlyEqual(sheet.C8, -3) - self.assertMostlyEqual(sheet.D8, -4) - self.assertEqual(sheet.E8, Units.Quantity('3 mm')) - self.assertEqual(sheet.F8, Units.Quantity('4 mm')) - self.assertEqual(sheet.G8, Units.Quantity('-3 mm')) - self.assertEqual(sheet.H8, Units.Quantity('-4 mm')) - self.assertMostlyEqual(sheet.A9, 3)# Trunc - self.assertMostlyEqual(sheet.B9, 3) - self.assertMostlyEqual(sheet.C9, -3) - self.assertMostlyEqual(sheet.D9, -3) - self.assertEqual(sheet.E9, Units.Quantity('3 mm')) - self.assertEqual(sheet.F9, Units.Quantity('3 mm')) - self.assertEqual(sheet.G9, Units.Quantity('-3 mm')) - self.assertEqual(sheet.H9, Units.Quantity('-3 mm')) - self.assertMostlyEqual(sheet.A10, 4) # Ceil + self.assertTrue(sheet.C7.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A8, 3) # Round + self.assertMostlyEqual(sheet.B8, 4) + self.assertMostlyEqual(sheet.C8, -3) + self.assertMostlyEqual(sheet.D8, -4) + self.assertEqual(sheet.E8, Units.Quantity("3 mm")) + self.assertEqual(sheet.F8, Units.Quantity("4 mm")) + self.assertEqual(sheet.G8, Units.Quantity("-3 mm")) + self.assertEqual(sheet.H8, Units.Quantity("-4 mm")) + self.assertMostlyEqual(sheet.A9, 3) # Trunc + self.assertMostlyEqual(sheet.B9, 3) + self.assertMostlyEqual(sheet.C9, -3) + self.assertMostlyEqual(sheet.D9, -3) + self.assertEqual(sheet.E9, Units.Quantity("3 mm")) + self.assertEqual(sheet.F9, Units.Quantity("3 mm")) + self.assertEqual(sheet.G9, Units.Quantity("-3 mm")) + self.assertEqual(sheet.H9, Units.Quantity("-3 mm")) + self.assertMostlyEqual(sheet.A10, 4) # Ceil self.assertMostlyEqual(sheet.B10, 4) self.assertMostlyEqual(sheet.C10, -3) self.assertMostlyEqual(sheet.D10, -3) - self.assertMostlyEqual(sheet.E10, Units.Quantity('4 mm')) - self.assertMostlyEqual(sheet.F10, Units.Quantity('4 mm')) - self.assertMostlyEqual(sheet.G10, Units.Quantity('-3 mm')) - self.assertMostlyEqual(sheet.H10, Units.Quantity('-3 mm')) - self.assertMostlyEqual(sheet.A11, 3)# Floor + self.assertMostlyEqual(sheet.E10, Units.Quantity("4 mm")) + self.assertMostlyEqual(sheet.F10, Units.Quantity("4 mm")) + self.assertMostlyEqual(sheet.G10, Units.Quantity("-3 mm")) + self.assertMostlyEqual(sheet.H10, Units.Quantity("-3 mm")) + self.assertMostlyEqual(sheet.A11, 3) # Floor self.assertMostlyEqual(sheet.B11, 3) self.assertMostlyEqual(sheet.C11, -4) self.assertMostlyEqual(sheet.D11, -4) - self.assertMostlyEqual(sheet.E11, Units.Quantity('3 mm')) - self.assertMostlyEqual(sheet.F11, Units.Quantity('3 mm')) - self.assertMostlyEqual(sheet.G11, Units.Quantity('-4 mm')) - self.assertMostlyEqual(sheet.H11, Units.Quantity('-4 mm')) - self.assertMostlyEqual(sheet.A12, Units.Quantity('30 deg')) # Asin - self.assertTrue(sheet.B12.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A13, Units.Quantity('60 deg')) # Acos - self.assertTrue(sheet.B13.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A14, Units.Quantity('60 deg')) # Atan - self.assertTrue(sheet.B14.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A15, math.sinh(0.5)) # Sinh - self.assertTrue(sheet.B15.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A16, math.cosh(0.5)) # Cosh - self.assertTrue(sheet.B16.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A17, math.tanh(0.5)) # Tanh - self.assertTrue(sheet.B17.startswith(u'ERR: Unit must be empty.')) - self.assertMostlyEqual(sheet.A18, 2) # Sqrt - self.assertMostlyEqual(sheet.B18, Units.Quantity('2 mm')) - self.assertMostlyEqual(sheet.A19, 3) # Mod + self.assertMostlyEqual(sheet.E11, Units.Quantity("3 mm")) + self.assertMostlyEqual(sheet.F11, Units.Quantity("3 mm")) + self.assertMostlyEqual(sheet.G11, Units.Quantity("-4 mm")) + self.assertMostlyEqual(sheet.H11, Units.Quantity("-4 mm")) + self.assertMostlyEqual(sheet.A12, Units.Quantity("30 deg")) # Asin + self.assertTrue(sheet.B12.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A13, Units.Quantity("60 deg")) # Acos + self.assertTrue(sheet.B13.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A14, Units.Quantity("60 deg")) # Atan + self.assertTrue(sheet.B14.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A15, math.sinh(0.5)) # Sinh + self.assertTrue(sheet.B15.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A16, math.cosh(0.5)) # Cosh + self.assertTrue(sheet.B16.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A17, math.tanh(0.5)) # Tanh + self.assertTrue(sheet.B17.startswith("ERR: Unit must be empty.")) + self.assertMostlyEqual(sheet.A18, 2) # Sqrt + self.assertMostlyEqual(sheet.B18, Units.Quantity("2 mm")) + self.assertMostlyEqual(sheet.A19, 3) # Mod self.assertMostlyEqual(sheet.B19, -3) - self.assertMostlyEqual(sheet.C19, Units.Quantity('3 mm')) + self.assertMostlyEqual(sheet.C19, Units.Quantity("3 mm")) self.assertEqual(sheet.D19, 3) - self.assertMostlyEqual(sheet.A20, Units.Quantity('45 deg')) # Atan2 - self.assertMostlyEqual(sheet.B20, Units.Quantity('-45 deg')) - self.assertTrue(sheet.C20.startswith(u'ERR: Units must be equal')) - self.assertMostlyEqual(sheet.D20, Units.Quantity('45 deg')) - self.assertMostlyEqual(sheet.A21, 2401) # Pow + self.assertMostlyEqual(sheet.A20, Units.Quantity("45 deg")) # Atan2 + self.assertMostlyEqual(sheet.B20, Units.Quantity("-45 deg")) + self.assertTrue(sheet.C20.startswith("ERR: Units must be equal")) + self.assertMostlyEqual(sheet.D20, Units.Quantity("45 deg")) + self.assertMostlyEqual(sheet.A21, 2401) # Pow self.assertMostlyEqual(sheet.B21, 2401) - self.assertMostlyEqual(sheet.C21, Units.Quantity('2401mm^4')) - self.assertTrue(sheet.D21.startswith(u'ERR: Exponent is not allowed to have a unit.')) - self.assertMostlyEqual(sheet.A23, 5) # Hypot + self.assertMostlyEqual(sheet.C21, Units.Quantity("2401mm^4")) + self.assertTrue(sheet.D21.startswith("ERR: Exponent is not allowed to have a unit.")) + self.assertMostlyEqual(sheet.A23, 5) # Hypot self.assertMostlyEqual(sheet.B23, 5) - self.assertTrue(sheet.C23.startswith(u'ERR: Units must be equal')) - self.assertMostlyEqual(sheet.D23, Units.Quantity('5mm')) + self.assertTrue(sheet.C23.startswith("ERR: Units must be equal")) + self.assertMostlyEqual(sheet.D23, Units.Quantity("5mm")) - l = math.sqrt(3*3 + 4*4 + 5*5) - self.assertMostlyEqual(sheet.A24, l) # Hypot + l = math.sqrt(3 * 3 + 4 * 4 + 5 * 5) + self.assertMostlyEqual(sheet.A24, l) # Hypot self.assertMostlyEqual(sheet.B24, l) - self.assertTrue(sheet.C24.startswith(u'ERR: Units must be equal')) + self.assertTrue(sheet.C24.startswith("ERR: Units must be equal")) self.assertMostlyEqual(sheet.D24, Units.Quantity("7.07106781186548 mm")) - self.assertMostlyEqual(sheet.A26, 4) # Cath + self.assertMostlyEqual(sheet.A26, 4) # Cath self.assertMostlyEqual(sheet.B26, 4) - self.assertTrue(sheet.C26.startswith(u'ERR: Units must be equal')) - self.assertMostlyEqual(sheet.D26, Units.Quantity('4mm')) + self.assertTrue(sheet.C26.startswith("ERR: Units must be equal")) + self.assertMostlyEqual(sheet.D26, Units.Quantity("4mm")) - l = math.sqrt(5 * 5 + 4*4 + 3*3) - l = math.sqrt(l * l - 5*5 - 4*4) - self.assertMostlyEqual(sheet.A27, l) # Cath + l = math.sqrt(5 * 5 + 4 * 4 + 3 * 3) + l = math.sqrt(l * l - 5 * 5 - 4 * 4) + self.assertMostlyEqual(sheet.A27, l) # Cath self.assertMostlyEqual(sheet.B27, l) - self.assertTrue(sheet.C27.startswith(u'ERR: Units must be equal')) + self.assertTrue(sheet.C27.startswith("ERR: Units must be equal")) self.assertMostlyEqual(sheet.D27, Units.Quantity("3 mm")) def testRelationalOperators(self): - """ Test relational operators """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') + """Test relational operators""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") # All should be 1 as result - sheet.set('A1', '=1 == 1 ? 1 : 0') - sheet.set('A2', '=1 != 1 ? 0 : 1') - sheet.set('A3', '=1e9 == 1e9 ? 1 : 0') - sheet.set('A4', '=1e9 != 1e9 ? 0 : 1') - sheet.set('A5', '=1 > 1 ? 0 : 1') - sheet.set('A6', '=2 > 1 ? 1 : 0') - sheet.set('A7', '=1 > 2 ? 0 : 1') - sheet.set('A8', '=1 < 1 ? 0 : 1') - sheet.set('A9', '=1 < 2 ? 1 : 0') - sheet.set('A10', '=2 < 1 ? 0 : 1') - sheet.set('A11', '=1 >= 1 ? 1 : 0') - sheet.set('A12', '=2 >= 1 ? 1 : 0') - sheet.set('A13', '=1 >= 2 ? 0 : 1') - sheet.set('A14', '=1 <= 1 ? 1 : 1') - sheet.set('A15', '=1 <= 2 ? 1 : 0') - sheet.set('A16', '=2 <= 1 ? 0 : 1') - sheet.set('A17', '=1 >= 1.000000000000001 ? 0 : 1') - sheet.set('A18', '=1 >= 1.0000000000000001 ? 1 : 0') - sheet.set('A19', '=1 <= 1.000000000000001 ? 1 : 0') - sheet.set('A20', '=1 <= 1.0000000000000001 ? 1 : 0') - sheet.set('A21', '=1 == 1.000000000000001 ? 0 : 1') - sheet.set('A22', '=1 == 1.0000000000000001 ? 1 : 0') - sheet.set('A23', '=1 != 1.000000000000001 ? 1 : 0') - sheet.set('A24', '=1 != 1.0000000000000001 ? 0 : 1') + sheet.set("A1", "=1 == 1 ? 1 : 0") + sheet.set("A2", "=1 != 1 ? 0 : 1") + sheet.set("A3", "=1e9 == 1e9 ? 1 : 0") + sheet.set("A4", "=1e9 != 1e9 ? 0 : 1") + sheet.set("A5", "=1 > 1 ? 0 : 1") + sheet.set("A6", "=2 > 1 ? 1 : 0") + sheet.set("A7", "=1 > 2 ? 0 : 1") + sheet.set("A8", "=1 < 1 ? 0 : 1") + sheet.set("A9", "=1 < 2 ? 1 : 0") + sheet.set("A10", "=2 < 1 ? 0 : 1") + sheet.set("A11", "=1 >= 1 ? 1 : 0") + sheet.set("A12", "=2 >= 1 ? 1 : 0") + sheet.set("A13", "=1 >= 2 ? 0 : 1") + sheet.set("A14", "=1 <= 1 ? 1 : 1") + sheet.set("A15", "=1 <= 2 ? 1 : 0") + sheet.set("A16", "=2 <= 1 ? 0 : 1") + sheet.set("A17", "=1 >= 1.000000000000001 ? 0 : 1") + sheet.set("A18", "=1 >= 1.0000000000000001 ? 1 : 0") + sheet.set("A19", "=1 <= 1.000000000000001 ? 1 : 0") + sheet.set("A20", "=1 <= 1.0000000000000001 ? 1 : 0") + sheet.set("A21", "=1 == 1.000000000000001 ? 0 : 1") + sheet.set("A22", "=1 == 1.0000000000000001 ? 1 : 0") + sheet.set("A23", "=1 != 1.000000000000001 ? 1 : 0") + sheet.set("A24", "=1 != 1.0000000000000001 ? 0 : 1") self.doc.recompute() self.assertEqual(sheet.A1, 1) @@ -422,89 +438,91 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.A24, 1) def testUnits(self): - """ Units -- test unit calculations. """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '=2mm + 3mm') - sheet.set('A2', '=2mm - 3mm') - sheet.set('A3', '=2mm * 3mm') - sheet.set('A4', '=4mm / 2mm') - sheet.set('A5', '=(4mm)^2') - sheet.set('A6', '=5(mm^2)') - sheet.set('A7', '=5mm^2') # ^2 operates on whole number - sheet.set('A8', '=5') - sheet.set('A9', '=5*1/K') # Currently fails - sheet.set('A10', '=5 K^-1') # Currently fails - sheet.set('A11', '=9.8 m/s^2') # Currently fails - sheet.setDisplayUnit('A8', '1/K') + """Units -- test unit calculations.""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "=2mm + 3mm") + sheet.set("A2", "=2mm - 3mm") + sheet.set("A3", "=2mm * 3mm") + sheet.set("A4", "=4mm / 2mm") + sheet.set("A5", "=(4mm)^2") + sheet.set("A6", "=5(mm^2)") + sheet.set("A7", "=5mm^2") # ^2 operates on whole number + sheet.set("A8", "=5") + sheet.set("A9", "=5*1/K") # Currently fails + sheet.set("A10", "=5 K^-1") # Currently fails + sheet.set("A11", "=9.8 m/s^2") # Currently fails + sheet.setDisplayUnit("A8", "1/K") self.doc.recompute() - self.assertEqual(sheet.A1, Units.Quantity('5mm')) - self.assertEqual(sheet.A2, Units.Quantity('-1 mm')) - self.assertEqual(sheet.A3, Units.Quantity('6 mm^2')) - self.assertEqual(sheet.A4, Units.Quantity('2')) - self.assertEqual(sheet.A5, Units.Quantity('16 mm^2')) - self.assertEqual(sheet.A6, Units.Quantity('5 mm^2')) - self.assertEqual(sheet.A7, Units.Quantity('5 mm^2')) - self.assertEqual(sheet.A8, Units.Quantity('5')) - self.assertEqual(sheet.A9, Units.Quantity('5 K^-1')) - self.assertEqual(sheet.A10, Units.Quantity('5 K^-1')) - self.assertEqual(sheet.A11, Units.Quantity('9.8 m/s^2')) + self.assertEqual(sheet.A1, Units.Quantity("5mm")) + self.assertEqual(sheet.A2, Units.Quantity("-1 mm")) + self.assertEqual(sheet.A3, Units.Quantity("6 mm^2")) + self.assertEqual(sheet.A4, Units.Quantity("2")) + self.assertEqual(sheet.A5, Units.Quantity("16 mm^2")) + self.assertEqual(sheet.A6, Units.Quantity("5 mm^2")) + self.assertEqual(sheet.A7, Units.Quantity("5 mm^2")) + self.assertEqual(sheet.A8, Units.Quantity("5")) + self.assertEqual(sheet.A9, Units.Quantity("5 K^-1")) + self.assertEqual(sheet.A10, Units.Quantity("5 K^-1")) + self.assertEqual(sheet.A11, Units.Quantity("9.8 m/s^2")) def testPrecedence(self): - """ Precedence -- test precedence for relational operators and conditional operator. """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '=1 < 2 ? 3 : 4') - sheet.set('A2', '=1 + 2 < 3 + 4 ? 5 + 6 : 7 + 8') - sheet.set('A3', '=1 + 2 * 1 < 3 + 4 ? 5 * 2 + 6 * 3 + 2 ^ 4 : 7 * 2 + 8 * 3 + 2 ^ 3') - sheet.set('A4', '=123') - sheet.set('A5', '=123 + 321') - sheet.set('A6', '=123 * 2 + 321') - sheet.set('A7', '=123 * 2 + 333 / 3') - sheet.set('A8', '=123 * (2 + 321)') - sheet.set('A9', '=3 ^ 4') - sheet.set('A10', '=3 ^ 4 * 2') - sheet.set('A11', '=3 ^ (4 * 2)') - sheet.set('A12', '=3 ^ 4 + 4') - sheet.set('A13', '=1 + 4 / 2 + 5') - sheet.set('A14', '=(3 + 6) / (1 + 2)') - sheet.set('A15', '=1 * 2 / 3 * 4') - sheet.set('A16', '=(1 * 2) / (3 * 4)') + """Precedence -- test precedence for relational operators and conditional operator.""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "=1 < 2 ? 3 : 4") + sheet.set("A2", "=1 + 2 < 3 + 4 ? 5 + 6 : 7 + 8") + sheet.set("A3", "=1 + 2 * 1 < 3 + 4 ? 5 * 2 + 6 * 3 + 2 ^ 4 : 7 * 2 + 8 * 3 + 2 ^ 3") + sheet.set("A4", "=123") + sheet.set("A5", "=123 + 321") + sheet.set("A6", "=123 * 2 + 321") + sheet.set("A7", "=123 * 2 + 333 / 3") + sheet.set("A8", "=123 * (2 + 321)") + sheet.set("A9", "=3 ^ 4") + sheet.set("A10", "=3 ^ 4 * 2") + sheet.set("A11", "=3 ^ (4 * 2)") + sheet.set("A12", "=3 ^ 4 + 4") + sheet.set("A13", "=1 + 4 / 2 + 5") + sheet.set("A14", "=(3 + 6) / (1 + 2)") + sheet.set("A15", "=1 * 2 / 3 * 4") + sheet.set("A16", "=(1 * 2) / (3 * 4)") # Test associativity - sheet.set('A17', '=3 ^ 4 ^ 2') # exponentiation is left-associative; to follow excel, openoffice, matlab, octave - sheet.set('A18', '=3 ^ (4 ^ 2)') # exponentiation is left-associative - sheet.set('A19', '=(3 ^ 4) ^ 2') # exponentiation is left-associative - sheet.set('A20', '=3 + 4 + 2') - sheet.set('A21', '=3 + (4 + 2)') - sheet.set('A22', '=(3 + 4) + 2') - sheet.set('A23', '=3 - 4 - 2') - sheet.set('A24', '=3 - (4 - 2)') - sheet.set('A25', '=(3 - 4) - 2') - sheet.set('A26', '=3 * 4 * 2') - sheet.set('A27', '=3 * (4 * 2)') - sheet.set('A28', '=(3 * 4) * 2') - sheet.set('A29', '=3 / 4 / 2') - sheet.set('A30', '=3 / (4 / 2)') - sheet.set('A31', '=(3 / 4) / 2') - sheet.set('A32', '=pi * 3') - sheet.set('A33', '=A32 / 3') - sheet.set('A34', '=1 < 2 ? <> : <>') - sheet.set('A35', '=min(A32:A33)') - sheet.set('A36', '=(1 < 2 ? 0 : 1) * 3') - sheet.set('A37', '=8/(2^2*2)') - sheet.set('A38', '=(2^2*2)/8') - sheet.set('A39', '=2^(2*2)/8') - sheet.set('A40', '=8/2^(2*2)') - sheet.set('A41', '=-1') - sheet.set('A42', '=-(1)') - sheet.set('A43', '=-(1 + 1)') - sheet.set('A44', '=-(1 - 1)') - sheet.set('A45', '=-(-1 + 1)') - sheet.set('A46', '=-(-1 + -1)') - sheet.set('A47', '=+1') - sheet.set('A48', '=+(1)') - sheet.set('A49', '=+(1 + 1)') - sheet.set('A50', '=+(1 - 1)') - sheet.set('A51', '=+(-1 + 1)') - sheet.set('A52', '=+(-1 + -1)') + sheet.set( + "A17", "=3 ^ 4 ^ 2" + ) # exponentiation is left-associative; to follow excel, openoffice, matlab, octave + sheet.set("A18", "=3 ^ (4 ^ 2)") # exponentiation is left-associative + sheet.set("A19", "=(3 ^ 4) ^ 2") # exponentiation is left-associative + sheet.set("A20", "=3 + 4 + 2") + sheet.set("A21", "=3 + (4 + 2)") + sheet.set("A22", "=(3 + 4) + 2") + sheet.set("A23", "=3 - 4 - 2") + sheet.set("A24", "=3 - (4 - 2)") + sheet.set("A25", "=(3 - 4) - 2") + sheet.set("A26", "=3 * 4 * 2") + sheet.set("A27", "=3 * (4 * 2)") + sheet.set("A28", "=(3 * 4) * 2") + sheet.set("A29", "=3 / 4 / 2") + sheet.set("A30", "=3 / (4 / 2)") + sheet.set("A31", "=(3 / 4) / 2") + sheet.set("A32", "=pi * 3") + sheet.set("A33", "=A32 / 3") + sheet.set("A34", "=1 < 2 ? <> : <>") + sheet.set("A35", "=min(A32:A33)") + sheet.set("A36", "=(1 < 2 ? 0 : 1) * 3") + sheet.set("A37", "=8/(2^2*2)") + sheet.set("A38", "=(2^2*2)/8") + sheet.set("A39", "=2^(2*2)/8") + sheet.set("A40", "=8/2^(2*2)") + sheet.set("A41", "=-1") + sheet.set("A42", "=-(1)") + sheet.set("A43", "=-(1 + 1)") + sheet.set("A44", "=-(1 - 1)") + sheet.set("A45", "=-(-1 + 1)") + sheet.set("A46", "=-(-1 + -1)") + sheet.set("A47", "=+1") + sheet.set("A48", "=+(1)") + sheet.set("A49", "=+(1 + 1)") + sheet.set("A50", "=+(1 - 1)") + sheet.set("A51", "=+(-1 + 1)") + sheet.set("A52", "=+(-1 + -1)") self.doc.addObject("Part::Cylinder", "Cylinder") # We cannot use Thickness, as this feature requires a source shape, @@ -515,14 +533,17 @@ class SpreadsheetCases(unittest.TestCase): self.doc.addObject("Part::Box", "Box") self.doc.Box.Length = 1 - sheet.set('B1', '101') - sheet.set('A53', '=-(-(B1-1)/2)') - sheet.set('A54', '=-(Cylinder.Radius + Box.Length - 1"/2)') + sheet.set("B1", "101") + sheet.set("A53", "=-(-(B1-1)/2)") + sheet.set("A54", '=-(Cylinder.Radius + Box.Length - 1"/2)') self.doc.recompute() self.assertEqual(sheet.getContents("A1"), "=1 < 2 ? 3 : 4") self.assertEqual(sheet.getContents("A2"), "=1 + 2 < 3 + 4 ? 5 + 6 : 7 + 8") - self.assertEqual(sheet.getContents("A3"), "=1 + 2 * 1 < 3 + 4 ? 5 * 2 + 6 * 3 + 2 ^ 4 : 7 * 2 + 8 * 3 + 2 ^ 3") + self.assertEqual( + sheet.getContents("A3"), + "=1 + 2 * 1 < 3 + 4 ? 5 * 2 + 6 * 3 + 2 ^ 4 : 7 * 2 + 8 * 3 + 2 ^ 3", + ) self.assertEqual(sheet.A1, 3) self.assertEqual(sheet.A2, 11) self.assertEqual(sheet.A3, 44) @@ -537,8 +558,8 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.A12, 85) self.assertEqual(sheet.A13, 8) self.assertEqual(sheet.A14, 3) - self.assertEqual(sheet.A15, 8.0/3) - self.assertEqual(sheet.A16, 1.0/6) + self.assertEqual(sheet.A15, 8.0 / 3) + self.assertEqual(sheet.A16, 1.0 / 6) self.assertEqual(sheet.A17, 6561) self.assertEqual(sheet.A18, 43046721) self.assertEqual(sheet.A19, 6561) @@ -551,9 +572,9 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.A26, 24) self.assertEqual(sheet.A27, 24) self.assertEqual(sheet.A28, 24) - self.assertEqual(sheet.A29, 3.0/8) - self.assertEqual(sheet.A30, 3.0/2) - self.assertEqual(sheet.A31, 3.0/8) + self.assertEqual(sheet.A29, 3.0 / 8) + self.assertEqual(sheet.A30, 3.0 / 2) + self.assertEqual(sheet.A31, 3.0 / 8) self.assertEqual(sheet.A37, 1) self.assertEqual(sheet.A38, 1) self.assertEqual(sheet.A39, 2) @@ -571,81 +592,84 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.A51, 0) self.assertEqual(sheet.A52, -2) self.assertEqual(sheet.A53, 50) - self.assertEqual(sheet.A54, Units.Quantity('9.7mm')) - self.assertEqual(sheet.getContents('A1'), '=1 < 2 ? 3 : 4') - self.assertEqual(sheet.getContents('A2'), '=1 + 2 < 3 + 4 ? 5 + 6 : 7 + 8') - self.assertEqual(sheet.getContents('A3'), '=1 + 2 * 1 < 3 + 4 ? 5 * 2 + 6 * 3 + 2 ^ 4 : 7 * 2 + 8 * 3 + 2 ^ 3') - self.assertEqual(sheet.getContents('A4'), '123') - self.assertEqual(sheet.getContents('A5'), '=123 + 321') - self.assertEqual(sheet.getContents('A6'), '=123 * 2 + 321') - self.assertEqual(sheet.getContents('A7'), '=123 * 2 + 333 / 3') - self.assertEqual(sheet.getContents('A8'), '=123 * (2 + 321)') - self.assertEqual(sheet.getContents('A9'), '=3 ^ 4') - self.assertEqual(sheet.getContents('A10'), '=3 ^ 4 * 2') - self.assertEqual(sheet.getContents('A11'), '=3 ^ (4 * 2)') - self.assertEqual(sheet.getContents('A12'), '=3 ^ 4 + 4') - self.assertEqual(sheet.getContents('A13'), '=1 + 4 / 2 + 5') - self.assertEqual(sheet.getContents('A14'), '=(3 + 6) / (1 + 2)') - self.assertEqual(sheet.getContents('A15'), '=1 * 2 / 3 * 4') - self.assertEqual(sheet.getContents('A16'), '=1 * 2 / (3 * 4)') - self.assertEqual(sheet.getContents('A17'), '=3 ^ 4 ^ 2') - self.assertEqual(sheet.getContents('A18'), '=3 ^ (4 ^ 2)') - self.assertEqual(sheet.getContents('A19'), '=3 ^ 4 ^ 2') - self.assertEqual(sheet.getContents('A20'), '=3 + 4 + 2') - self.assertEqual(sheet.getContents('A21'), '=3 + 4 + 2') - self.assertEqual(sheet.getContents('A22'), '=3 + 4 + 2') - self.assertEqual(sheet.getContents('A23'), '=3 - 4 - 2') - self.assertEqual(sheet.getContents('A24'), '=3 - (4 - 2)') - self.assertEqual(sheet.getContents('A25'), '=3 - 4 - 2') - self.assertEqual(sheet.getContents('A26'), '=3 * 4 * 2') - self.assertEqual(sheet.getContents('A27'), '=3 * 4 * 2') - self.assertEqual(sheet.getContents('A28'), '=3 * 4 * 2') - self.assertEqual(sheet.getContents('A29'), '=3 / 4 / 2') - self.assertEqual(sheet.getContents('A30'), '=3 / (4 / 2)') - self.assertEqual(sheet.getContents('A31'), '=3 / 4 / 2') - self.assertEqual(sheet.getContents('A32'), '=pi * 3') - self.assertEqual(sheet.getContents('A33'), '=A32 / 3') - self.assertEqual(sheet.getContents('A34'), '=1 < 2 ? <> : <>') - self.assertEqual(sheet.getContents('A35'), '=min(A32:A33)') - self.assertEqual(sheet.getContents('A36'), '=(1 < 2 ? 0 : 1) * 3') - self.assertEqual(sheet.getContents('A37'), '=8 / (2 ^ 2 * 2)') - self.assertEqual(sheet.getContents('A38'), '=2 ^ 2 * 2 / 8') - self.assertEqual(sheet.getContents('A39'), '=2 ^ (2 * 2) / 8') - self.assertEqual(sheet.getContents('A40'), '=8 / 2 ^ (2 * 2)') - self.assertEqual(sheet.getContents('A41'), '=-1') - self.assertEqual(sheet.getContents('A42'), '=-1') - self.assertEqual(sheet.getContents('A43'), '=-(1 + 1)') - self.assertEqual(sheet.getContents('A44'), '=-(1 - 1)') - self.assertEqual(sheet.getContents('A45'), '=-(-1 + 1)') - self.assertEqual(sheet.getContents('A46'), '=-(-1 + -1)') - self.assertEqual(sheet.getContents('A47'), '=+1') - self.assertEqual(sheet.getContents('A48'), '=+1') - self.assertEqual(sheet.getContents('A49'), '=+(1 + 1)') - self.assertEqual(sheet.getContents('A50'), '=+(1 - 1)') - self.assertEqual(sheet.getContents('A51'), '=+(-1 + 1)') - self.assertEqual(sheet.getContents('A52'), '=+(-1 + -1)') + self.assertEqual(sheet.A54, Units.Quantity("9.7mm")) + self.assertEqual(sheet.getContents("A1"), "=1 < 2 ? 3 : 4") + self.assertEqual(sheet.getContents("A2"), "=1 + 2 < 3 + 4 ? 5 + 6 : 7 + 8") + self.assertEqual( + sheet.getContents("A3"), + "=1 + 2 * 1 < 3 + 4 ? 5 * 2 + 6 * 3 + 2 ^ 4 : 7 * 2 + 8 * 3 + 2 ^ 3", + ) + self.assertEqual(sheet.getContents("A4"), "123") + self.assertEqual(sheet.getContents("A5"), "=123 + 321") + self.assertEqual(sheet.getContents("A6"), "=123 * 2 + 321") + self.assertEqual(sheet.getContents("A7"), "=123 * 2 + 333 / 3") + self.assertEqual(sheet.getContents("A8"), "=123 * (2 + 321)") + self.assertEqual(sheet.getContents("A9"), "=3 ^ 4") + self.assertEqual(sheet.getContents("A10"), "=3 ^ 4 * 2") + self.assertEqual(sheet.getContents("A11"), "=3 ^ (4 * 2)") + self.assertEqual(sheet.getContents("A12"), "=3 ^ 4 + 4") + self.assertEqual(sheet.getContents("A13"), "=1 + 4 / 2 + 5") + self.assertEqual(sheet.getContents("A14"), "=(3 + 6) / (1 + 2)") + self.assertEqual(sheet.getContents("A15"), "=1 * 2 / 3 * 4") + self.assertEqual(sheet.getContents("A16"), "=1 * 2 / (3 * 4)") + self.assertEqual(sheet.getContents("A17"), "=3 ^ 4 ^ 2") + self.assertEqual(sheet.getContents("A18"), "=3 ^ (4 ^ 2)") + self.assertEqual(sheet.getContents("A19"), "=3 ^ 4 ^ 2") + self.assertEqual(sheet.getContents("A20"), "=3 + 4 + 2") + self.assertEqual(sheet.getContents("A21"), "=3 + 4 + 2") + self.assertEqual(sheet.getContents("A22"), "=3 + 4 + 2") + self.assertEqual(sheet.getContents("A23"), "=3 - 4 - 2") + self.assertEqual(sheet.getContents("A24"), "=3 - (4 - 2)") + self.assertEqual(sheet.getContents("A25"), "=3 - 4 - 2") + self.assertEqual(sheet.getContents("A26"), "=3 * 4 * 2") + self.assertEqual(sheet.getContents("A27"), "=3 * 4 * 2") + self.assertEqual(sheet.getContents("A28"), "=3 * 4 * 2") + self.assertEqual(sheet.getContents("A29"), "=3 / 4 / 2") + self.assertEqual(sheet.getContents("A30"), "=3 / (4 / 2)") + self.assertEqual(sheet.getContents("A31"), "=3 / 4 / 2") + self.assertEqual(sheet.getContents("A32"), "=pi * 3") + self.assertEqual(sheet.getContents("A33"), "=A32 / 3") + self.assertEqual(sheet.getContents("A34"), "=1 < 2 ? <> : <>") + self.assertEqual(sheet.getContents("A35"), "=min(A32:A33)") + self.assertEqual(sheet.getContents("A36"), "=(1 < 2 ? 0 : 1) * 3") + self.assertEqual(sheet.getContents("A37"), "=8 / (2 ^ 2 * 2)") + self.assertEqual(sheet.getContents("A38"), "=2 ^ 2 * 2 / 8") + self.assertEqual(sheet.getContents("A39"), "=2 ^ (2 * 2) / 8") + self.assertEqual(sheet.getContents("A40"), "=8 / 2 ^ (2 * 2)") + self.assertEqual(sheet.getContents("A41"), "=-1") + self.assertEqual(sheet.getContents("A42"), "=-1") + self.assertEqual(sheet.getContents("A43"), "=-(1 + 1)") + self.assertEqual(sheet.getContents("A44"), "=-(1 - 1)") + self.assertEqual(sheet.getContents("A45"), "=-(-1 + 1)") + self.assertEqual(sheet.getContents("A46"), "=-(-1 + -1)") + self.assertEqual(sheet.getContents("A47"), "=+1") + self.assertEqual(sheet.getContents("A48"), "=+1") + self.assertEqual(sheet.getContents("A49"), "=+(1 + 1)") + self.assertEqual(sheet.getContents("A50"), "=+(1 - 1)") + self.assertEqual(sheet.getContents("A51"), "=+(-1 + 1)") + self.assertEqual(sheet.getContents("A52"), "=+(-1 + -1)") def testNumbers(self): - """ Test different numbers """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '1') - sheet.set('A2', '1.5') - sheet.set('A3', '.5') - sheet.set('A4', '1e2') - sheet.set('A5', '1E2') - sheet.set('A6', '1e-2') - sheet.set('A7', '1E-2') - sheet.set('A8', '1.5e2') - sheet.set('A9', '1.5E2') - sheet.set('A10', '1.5e-2') - sheet.set('A11', '1.5E-2') - sheet.set('A12', '.5e2') - sheet.set('A13', '.5E2') - sheet.set('A14', '.5e-2') - sheet.set('A15', '.5E-2') - sheet.set('A16', '1/1') - sheet.set('A17', '1/2') - sheet.set('A18', '2/4') + """Test different numbers""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "1") + sheet.set("A2", "1.5") + sheet.set("A3", ".5") + sheet.set("A4", "1e2") + sheet.set("A5", "1E2") + sheet.set("A6", "1e-2") + sheet.set("A7", "1E-2") + sheet.set("A8", "1.5e2") + sheet.set("A9", "1.5E2") + sheet.set("A10", "1.5e-2") + sheet.set("A11", "1.5E-2") + sheet.set("A12", ".5e2") + sheet.set("A13", ".5E2") + sheet.set("A14", ".5e-2") + sheet.set("A15", ".5E-2") + sheet.set("A16", "1/1") + sheet.set("A17", "1/2") + sheet.set("A18", "2/4") self.doc.recompute() self.assertEqual(sheet.A1, 1) self.assertEqual(sheet.A2, 1.5) @@ -667,364 +691,390 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.A18, 0.5) def testQuantitiesAndFractionsAsNumbers(self): - """ Test quantities and simple fractions as numbers """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '1mm') - sheet.set('A2', '1/2') - sheet.set('A3', '4mm/2') - sheet.set('A4', '2/mm') - sheet.set('A5', '4/2mm') - sheet.set('A6', '6mm/3s') + """Test quantities and simple fractions as numbers""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "1mm") + sheet.set("A2", "1/2") + sheet.set("A3", "4mm/2") + sheet.set("A4", "2/mm") + sheet.set("A5", "4/2mm") + sheet.set("A6", "6mm/3s") self.doc.recompute() - self.assertEqual(sheet.A1, Units.Quantity('1 mm')) + self.assertEqual(sheet.A1, Units.Quantity("1 mm")) self.assertEqual(sheet.A2, 0.5) - self.assertEqual(sheet.A3, Units.Quantity('2 mm')) - self.assertEqual(sheet.A4, Units.Quantity('2 1/mm')) - self.assertEqual(sheet.A5, Units.Quantity('2 1/mm')) - self.assertEqual(sheet.A6, Units.Quantity('2 mm/s')) + self.assertEqual(sheet.A3, Units.Quantity("2 mm")) + self.assertEqual(sheet.A4, Units.Quantity("2 1/mm")) + self.assertEqual(sheet.A5, Units.Quantity("2 1/mm")) + self.assertEqual(sheet.A6, Units.Quantity("2 mm/s")) def testRemoveRows(self): - """ Removing rows -- check renaming of internal cells """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A3', '123') - sheet.set('A1', '=A3') - sheet.removeRows('2', 1) - self.assertEqual(sheet.getContents("A1"),"=A2") + """Removing rows -- check renaming of internal cells""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A3", "123") + sheet.set("A1", "=A3") + sheet.removeRows("2", 1) + self.assertEqual(sheet.getContents("A1"), "=A2") def testInsertRows(self): - """ Inserting rows -- check renaming of internal cells """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('B1', '=B2') - sheet.set('B2', '124') + """Inserting rows -- check renaming of internal cells""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("B1", "=B2") + sheet.set("B2", "124") # Calling getContents() here activates ObjectIdentifier internal cache, # which needs to be tested as well. - self.assertEqual(sheet.getContents("B1"),"=B2") - sheet.insertRows('2', 1) - self.assertEqual(sheet.getContents("B1"),"=B3") + self.assertEqual(sheet.getContents("B1"), "=B2") + sheet.insertRows("2", 1) + self.assertEqual(sheet.getContents("B1"), "=B3") def testIssue3225(self): - """ Inserting rows -- check renaming of internal cells """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('B2', '25') - sheet.set('B3', '=B2') - sheet.insertRows('2', 1) - self.assertEqual(sheet.getContents("B4"),"=B3") + """Inserting rows -- check renaming of internal cells""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("B2", "25") + sheet.set("B3", "=B2") + sheet.insertRows("2", 1) + self.assertEqual(sheet.getContents("B4"), "=B3") def testRenameAlias(self): - """ Test renaming of alias1 to alias2 in a spreadsheet """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('B1', '124') - sheet.setAlias('B1', 'alias1') - sheet.set('B2', '=alias1') + """Test renaming of alias1 to alias2 in a spreadsheet""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("B1", "124") + sheet.setAlias("B1", "alias1") + sheet.set("B2", "=alias1") self.doc.recompute() self.assertEqual(sheet.get("alias1"), 124) self.assertEqual(sheet.get("B1"), 124) self.assertEqual(sheet.get("B2"), 124) - sheet.setAlias('B1', 'alias2') + sheet.setAlias("B1", "alias2") self.doc.recompute() self.assertEqual(sheet.get("alias2"), 124) - self.assertEqual(sheet.getContents("B2"),"=alias2") + self.assertEqual(sheet.getContents("B2"), "=alias2") def testRenameAlias2(self): - """ Test renaming of alias1 to alias2 in a spreadsheet, when referenced from another object """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('B1', '124') - sheet.setAlias('B1', 'alias1') - box = self.doc.addObject('Part::Box', 'Box') - box.setExpression('Length', 'Spreadsheet.alias1') - sheet.setAlias('B1', 'alias2') - self.assertEqual(box.ExpressionEngine[0][1], "Spreadsheet.alias2"); + """Test renaming of alias1 to alias2 in a spreadsheet, when referenced from another object""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("B1", "124") + sheet.setAlias("B1", "alias1") + box = self.doc.addObject("Part::Box", "Box") + box.setExpression("Length", "Spreadsheet.alias1") + sheet.setAlias("B1", "alias2") + self.assertEqual(box.ExpressionEngine[0][1], "Spreadsheet.alias2") def testRenameAlias3(self): - """ Test renaming of document object referenced from another object """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('B1', '124') - sheet.setAlias('B1', 'alias1') - box = self.doc.addObject('Part::Box', 'Box') - box.setExpression('Length', 'Spreadsheet.alias1') - box2 = self.doc.addObject('Part::Box', 'Box') - box2.setExpression('Length', '<>.alias1') + """Test renaming of document object referenced from another object""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("B1", "124") + sheet.setAlias("B1", "alias1") + box = self.doc.addObject("Part::Box", "Box") + box.setExpression("Length", "Spreadsheet.alias1") + box2 = self.doc.addObject("Part::Box", "Box") + box2.setExpression("Length", "<>.alias1") sheet.Label = "Params" - self.assertEqual(box.ExpressionEngine[0][1], "Spreadsheet.alias1"); - self.assertEqual(box2.ExpressionEngine[0][1], "<>.alias1"); + self.assertEqual(box.ExpressionEngine[0][1], "Spreadsheet.alias1") + self.assertEqual(box2.ExpressionEngine[0][1], "<>.alias1") def testAlias(self): - """ Playing with aliases """ - sheet = self.doc.addObject("Spreadsheet::Sheet","Calc") - sheet.setAlias("A1","Test") - self.assertEqual(sheet.getAlias("A1"),"Test") + """Playing with aliases""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Calc") + sheet.setAlias("A1", "Test") + self.assertEqual(sheet.getAlias("A1"), "Test") - sheet.set("A1","4711") + sheet.set("A1", "4711") self.doc.recompute() - self.assertEqual(sheet.get("Test"),4711) - self.assertEqual(sheet.get("Test"),sheet.get("A1")) + self.assertEqual(sheet.get("Test"), 4711) + self.assertEqual(sheet.get("Test"), sheet.get("A1")) def testAmbiguousAlias(self): - """ Try to set the same alias twice (bug #2402) """ - sheet = self.doc.addObject("Spreadsheet::Sheet","Calc") - sheet.setAlias("A1","Test") + """Try to set the same alias twice (bug #2402)""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Calc") + sheet.setAlias("A1", "Test") try: - sheet.setAlias("A2","Test") + sheet.setAlias("A2", "Test") self.fail("An ambiguous alias was set which shouldn't be allowed") except Exception: - self.assertEqual(sheet.getAlias("A2"),None) + self.assertEqual(sheet.getAlias("A2"), None) def testClearAlias(self): - """ This was causing a crash """ - sheet = self.doc.addObject("Spreadsheet::Sheet","Calc") - sheet.setAlias("A1","Test") - sheet.setAlias("A1","") - self.assertEqual(sheet.getAlias("A1"),None) + """This was causing a crash""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Calc") + sheet.setAlias("A1", "Test") + sheet.setAlias("A1", "") + self.assertEqual(sheet.getAlias("A1"), None) def testSetInvalidAlias(self): - """ Try to use a cell address as alias name """ - sheet = self.doc.addObject("Spreadsheet::Sheet","Calc") + """Try to use a cell address as alias name""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Calc") try: - sheet.setAlias("A1","B1") + sheet.setAlias("A1", "B1") except Exception: - self.assertEqual(sheet.getAlias("A1"),None) + self.assertEqual(sheet.getAlias("A1"), None) else: self.fail("A cell address was used as alias which shouldn't be allowed") def testSetInvalidAlias2(self): - """ Try to use a unit (reserved word) as alias name """ - sheet = self.doc.addObject("Spreadsheet::Sheet","Calc") + """Try to use a unit (reserved word) as alias name""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Calc") try: - sheet.setAlias("A1","mA") + sheet.setAlias("A1", "mA") except Exception: self.assertEqual(sheet.getAlias("A1"), None) else: self.fail("A unit (reserved word) was used as alias which shouldn't be allowed") def testPlacementName(self): - """ Object name is equal to property name (bug #2389) """ + """Object name is equal to property name (bug #2389)""" if not FreeCAD.GuiUp: return import FreeCADGui - o = self.doc.addObject("Part::FeaturePython","Placement") + + o = self.doc.addObject("Part::FeaturePython", "Placement") FreeCADGui.Selection.addSelection(o) def testInvoluteGear(self): - """ Support of boolean or integer values """ + """Support of boolean or integer values""" try: import InvoluteGearFeature except ImportError: return - InvoluteGearFeature.makeInvoluteGear('InvoluteGear') + InvoluteGearFeature.makeInvoluteGear("InvoluteGear") self.doc.recompute() - sketch=self.doc.addObject('Sketcher::SketchObject','Sketch') - sketch.addGeometry(Part.LineSegment(v(0,0,0),v(10,10,0)),False) - sketch.addConstraint(Sketcher.Constraint('Distance',0,65.285388)) - sketch.setExpression('Constraints[0]', 'InvoluteGear.NumberOfTeeth') + sketch = self.doc.addObject("Sketcher::SketchObject", "Sketch") + sketch.addGeometry(Part.LineSegment(v(0, 0, 0), v(10, 10, 0)), False) + sketch.addConstraint(Sketcher.Constraint("Distance", 0, 65.285388)) + sketch.setExpression("Constraints[0]", "InvoluteGear.NumberOfTeeth") self.doc.recompute() - self.assertIn('Up-to-date',sketch.State) + self.assertIn("Up-to-date", sketch.State) def testSketcher(self): - """ Mixup of Label and Name (bug #2407)""" - sketch=self.doc.addObject('Sketcher::SketchObject','Sketch') - sheet=self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.setAlias('A1', 'Length') + """Mixup of Label and Name (bug #2407)""" + sketch = self.doc.addObject("Sketcher::SketchObject", "Sketch") + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.setAlias("A1", "Length") self.doc.recompute() - sheet.set('A1', '47,11') + sheet.set("A1", "47,11") self.doc.recompute() - index=sketch.addGeometry(Part.LineSegment(v(0,0,0),v(10,10,0)),False) - sketch.addConstraint(Sketcher.Constraint('Distance',index,14.0)) + index = sketch.addGeometry(Part.LineSegment(v(0, 0, 0), v(10, 10, 0)), False) + sketch.addConstraint(Sketcher.Constraint("Distance", index, 14.0)) self.doc.recompute() - sketch.setExpression('Constraints[0]', u'<>.Length') + sketch.setExpression("Constraints[0]", "<>.Length") self.doc.recompute() - sheet.Label="Calc" + sheet.Label = "Calc" self.doc.recompute() - self.assertEqual(sketch.ExpressionEngine[0][1],'<>.Length') - self.assertIn('Up-to-date',sketch.State) + self.assertEqual(sketch.ExpressionEngine[0][1], "<>.Length") + self.assertIn("Up-to-date", sketch.State) def testCrossDocumentLinks(self): - """ Expressions across files are not saved (bug #2442) """ + """Expressions across files are not saved (bug #2442)""" # Create a box - box = self.doc.addObject('Part::Box', 'Box') + box = self.doc.addObject("Part::Box", "Box") # Create a second document with a cylinder doc2 = FreeCAD.newDocument() - cylinder = doc2.addObject('Part::Cylinder', 'Cylinder') - cylinder.setExpression('Radius', 'cube#Cube.Height') + cylinder = doc2.addObject("Part::Cylinder", "Cylinder") + cylinder.setExpression("Radius", "cube#Cube.Height") # Save and close first document - self.doc.saveAs(self.TempPath + os.sep + 'cube.fcstd') + self.doc.saveAs(self.TempPath + os.sep + "cube.fcstd") FreeCAD.closeDocument(self.doc.Name) # Save and close second document - doc2.saveAs(self.TempPath + os.sep + 'cylinder.fcstd') + doc2.saveAs(self.TempPath + os.sep + "cylinder.fcstd") FreeCAD.closeDocument(doc2.Name) # Open both documents again - self.doc = FreeCAD.openDocument(self.TempPath + os.sep + 'cube.fcstd') - doc2 = FreeCAD.openDocument(self.TempPath + os.sep + 'cylinder.fcstd') + self.doc = FreeCAD.openDocument(self.TempPath + os.sep + "cube.fcstd") + doc2 = FreeCAD.openDocument(self.TempPath + os.sep + "cylinder.fcstd") # Check reference between them - self.assertEqual(doc2.getObject('Cylinder').ExpressionEngine[0][1], 'cube#Cube.Height') + self.assertEqual(doc2.getObject("Cylinder").ExpressionEngine[0][1], "cube#Cube.Height") # Close second document FreeCAD.closeDocument(doc2.Name) def testMatrix(self): - ''' Test Matrix/Vector/Placement/Rotation operations''' + """Test Matrix/Vector/Placement/Rotation operations""" def plm_equal(plm1, plm2): from math import sqrt - qpair = zip(plm1.Rotation.Q, plm2.Rotation.Q) - qdiff1 = sqrt(sum([(v1 - v2)**2 for v1,v2 in qpair])) - qdiff2 = sqrt(sum([(v1 + v2)**2 for v1,v2 in qpair])) - return (plm1.Base-plm2.Base).Length < 1e-7 and (qdiff1 < 1e-12 or dqiff2 < 1e-12) - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') + qpair = zip(plm1.Rotation.Q, plm2.Rotation.Q) + qdiff1 = sqrt(sum([(v1 - v2) ** 2 for v1, v2 in qpair])) + qdiff2 = sqrt(sum([(v1 + v2) ** 2 for v1, v2 in qpair])) + return (plm1.Base - plm2.Base).Length < 1e-7 and (qdiff1 < 1e-12 or dqiff2 < 1e-12) + + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") mat = FreeCAD.Matrix() - mat.scale(2,1,2) + mat.scale(2, 1, 2) imat = mat.inverse() - vec = FreeCAD.Vector(2,1,2) + vec = FreeCAD.Vector(2, 1, 2) - rot = FreeCAD.Rotation(FreeCAD.Vector(0,1,0),45) + rot = FreeCAD.Rotation(FreeCAD.Vector(0, 1, 0), 45) irot = rot.inverted() - pla = FreeCAD.Placement(vec,rot) + pla = FreeCAD.Placement(vec, rot) ipla = pla.inverse() - sheet.set('A1', '=vector(2, 1, 2)') + sheet.set("A1", "=vector(2, 1, 2)") # different ways of calling mscale() - sheet.set('B1', '=mscale(create(<>), A1)') - sheet.set('C1', '=mscale(create(<>), tuple(2, 1, 2))') - sheet.set('A2', '=mscale(create(<>), 2, 1, 2)') + sheet.set("B1", "=mscale(create(<>), A1)") + sheet.set("C1", "=mscale(create(<>), tuple(2, 1, 2))") + sheet.set("A2", "=mscale(create(<>), 2, 1, 2)") # test matrix power operation - sheet.set('B2', '=A2^-2') - sheet.set('C2', '=A2^-1') - sheet.set('D2', '=A2^0') - sheet.set('E2', '=A2^1') - sheet.set('F2', '=A2^2') - sheet.set('G2', '=matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)') - sheet.set('H2', '=G2^-1') + sheet.set("B2", "=A2^-2") + sheet.set("C2", "=A2^-1") + sheet.set("D2", "=A2^0") + sheet.set("E2", "=A2^1") + sheet.set("F2", "=A2^2") + sheet.set("G2", "=matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)") + sheet.set("H2", "=G2^-1") - sheet.set('A3', '=rotation(vector(0, 1, 0), 45)') + sheet.set("A3", "=rotation(vector(0, 1, 0), 45)") # test rotation power operation - sheet.set('B3', '=A3^-2') - sheet.set('C3', '=A3^-1') - sheet.set('D3', '=A3^0') - sheet.set('E3', '=A3^1') - sheet.set('F3', '=A3^2') + sheet.set("B3", "=A3^-2") + sheet.set("C3", "=A3^-1") + sheet.set("D3", "=A3^0") + sheet.set("E3", "=A3^1") + sheet.set("F3", "=A3^2") - sheet.set('A4', '=placement(A1, A3)') + sheet.set("A4", "=placement(A1, A3)") # test placement power operation - sheet.set('B4', '=A4^-2') - sheet.set('C4', '=A4^-1') - sheet.set('D4', '=A4^0') - sheet.set('E4', '=A4^1') - sheet.set('F4', '=A4^2') + sheet.set("B4", "=A4^-2") + sheet.set("C4", "=A4^-1") + sheet.set("D4", "=A4^0") + sheet.set("E4", "=A4^1") + sheet.set("F4", "=A4^2") # vector transformation with mixing matrix and placement and rotation - sheet.set('A5', '=A2*A3*A4*A1') - sheet.set('B5', '=B2*B4*B3*A1') - sheet.set('C5', '=C3*C2*C4*A1') - sheet.set('D5', '=D3*D4*D2*A1') - sheet.set('E5', '=E4*E2*E3*A1') - sheet.set('F5', '=F3*F4*F2*A1') + sheet.set("A5", "=A2*A3*A4*A1") + sheet.set("B5", "=B2*B4*B3*A1") + sheet.set("C5", "=C3*C2*C4*A1") + sheet.set("D5", "=D3*D4*D2*A1") + sheet.set("E5", "=E4*E2*E3*A1") + sheet.set("F5", "=F3*F4*F2*A1") # inverse of the above transformation with power -1 and minvert() - sheet.set('A6', '=A4^-1 * minvert(A3) * A2^-1 * A5') - sheet.set('B6', '=minvert(B3) * B4^-1 * minvert(B2) * B5') - sheet.set('C6', '=C4^-1 * C2^-1 * C3^-1 * C5') - sheet.set('D6', '=minvert(D4*D2) * minvert(D3) * D5') - sheet.set('E6', '=(E2 * E3)^-1 * E4^-1 * E5') - sheet.set('F6', '=(F3*F4*F2)^-1 * F5') + sheet.set("A6", "=A4^-1 * minvert(A3) * A2^-1 * A5") + sheet.set("B6", "=minvert(B3) * B4^-1 * minvert(B2) * B5") + sheet.set("C6", "=C4^-1 * C2^-1 * C3^-1 * C5") + sheet.set("D6", "=minvert(D4*D2) * minvert(D3) * D5") + sheet.set("E6", "=(E2 * E3)^-1 * E4^-1 * E5") + sheet.set("F6", "=(F3*F4*F2)^-1 * F5") # Rotate and translate. - sheet.set('A7', '=placement(vector(1; 2; 3), vector(1; 0; 0); 0)') - sheet.set('B7', '=mrotate(A7; vector(1; 0; 0); 90)') - sheet.set('C7', '=mrotatex(A7; 90)') - sheet.set('D7', '=mrotatey(A7; 90)') - sheet.set('E7', '=mrotatez(A7; 90)') - sheet.set('F7', '=mtranslate(A7; vector(1; 2; 3))') - sheet.set('G7', '=mtranslate(A7; 1; 2; 3)') + sheet.set("A7", "=placement(vector(1; 2; 3), vector(1; 0; 0); 0)") + sheet.set("B7", "=mrotate(A7; vector(1; 0; 0); 90)") + sheet.set("C7", "=mrotatex(A7; 90)") + sheet.set("D7", "=mrotatey(A7; 90)") + sheet.set("E7", "=mrotatez(A7; 90)") + sheet.set("F7", "=mtranslate(A7; vector(1; 2; 3))") + sheet.set("G7", "=mtranslate(A7; 1; 2; 3)") # Compatibility with old syntax. - sheet.set('A8', '=create(<>, 2, 1, 2)') - sheet.set('B8', '=create(<>, create(<>, 0, 1, 0), 45)') - sheet.set('C8', '=create(<>, A8, B8)') + sheet.set("A8", "=create(<>, 2, 1, 2)") + sheet.set("B8", "=create(<>, create(<>, 0, 1, 0), 45)") + sheet.set("C8", "=create(<>, A8, B8)") self.doc.recompute() - self.assertEqual(sheet.A1,vec) + self.assertEqual(sheet.A1, vec) - self.assertEqual(sheet.B1,mat) - self.assertEqual(sheet.C1,mat) - self.assertEqual(sheet.A2,mat) + self.assertEqual(sheet.B1, mat) + self.assertEqual(sheet.C1, mat) + self.assertEqual(sheet.A2, mat) - self.assertEqual(sheet.B2,imat*imat) - self.assertEqual(sheet.B2,mat**-2) - self.assertEqual(sheet.C2,imat) - self.assertEqual(sheet.C2,mat**-1) - self.assertEqual(sheet.D2,FreeCAD.Matrix()) - self.assertEqual(sheet.D2,mat**0) - self.assertEqual(sheet.E2,mat) - self.assertEqual(sheet.E2,mat**1) - self.assertEqual(sheet.F2,mat*mat) - self.assertEqual(sheet.F2,mat**2) + self.assertEqual(sheet.B2, imat * imat) + self.assertEqual(sheet.B2, mat**-2) + self.assertEqual(sheet.C2, imat) + self.assertEqual(sheet.C2, mat**-1) + self.assertEqual(sheet.D2, FreeCAD.Matrix()) + self.assertEqual(sheet.D2, mat**0) + self.assertEqual(sheet.E2, mat) + self.assertEqual(sheet.E2, mat**1) + self.assertEqual(sheet.F2, mat * mat) + self.assertEqual(sheet.F2, mat**2) - self.assertTrue(sheet.H2.startswith(u'ERR: Cannot invert singular matrix')) + self.assertTrue(sheet.H2.startswith("ERR: Cannot invert singular matrix")) - self.assertEqual(sheet.A3,rot) + self.assertEqual(sheet.A3, rot) rtol = 1e-12 - self.assertTrue(sheet.B3.isSame(irot*irot,rtol)) - self.assertTrue(sheet.B3.isSame(rot**-2,rtol)) - self.assertTrue(sheet.C3.isSame(irot,rtol)) - self.assertTrue(sheet.C3.isSame(rot**-1,rtol)) - self.assertTrue(sheet.D3.isSame(FreeCAD.Rotation(),rtol)) - self.assertTrue(sheet.D3.isSame(rot**0,rtol)) - self.assertTrue(sheet.E3.isSame(rot,rtol)) - self.assertTrue(sheet.E3.isSame(rot**1,rtol)) - self.assertTrue(sheet.F3.isSame(rot*rot,rtol)) - self.assertTrue(sheet.F3.isSame(rot**2,rtol)) + self.assertTrue(sheet.B3.isSame(irot * irot, rtol)) + self.assertTrue(sheet.B3.isSame(rot**-2, rtol)) + self.assertTrue(sheet.C3.isSame(irot, rtol)) + self.assertTrue(sheet.C3.isSame(rot**-1, rtol)) + self.assertTrue(sheet.D3.isSame(FreeCAD.Rotation(), rtol)) + self.assertTrue(sheet.D3.isSame(rot**0, rtol)) + self.assertTrue(sheet.E3.isSame(rot, rtol)) + self.assertTrue(sheet.E3.isSame(rot**1, rtol)) + self.assertTrue(sheet.F3.isSame(rot * rot, rtol)) + self.assertTrue(sheet.F3.isSame(rot**2, rtol)) - self.assertEqual(sheet.A4,pla) + self.assertEqual(sheet.A4, pla) - self.assertTrue(plm_equal(sheet.B4,ipla*ipla)) - self.assertTrue(plm_equal(sheet.B4,pla**-2)) - self.assertTrue(plm_equal(sheet.C4,ipla)) - self.assertTrue(plm_equal(sheet.C4,pla**-1)) - self.assertTrue(plm_equal(sheet.D4,FreeCAD.Placement())) - self.assertTrue(plm_equal(sheet.D4,pla**0)) - self.assertTrue(plm_equal(sheet.E4,pla)) - self.assertTrue(plm_equal(sheet.E4,pla**1)) - self.assertTrue(plm_equal(sheet.F4,pla*pla)) - self.assertTrue(plm_equal(sheet.F4,pla**2)) + self.assertTrue(plm_equal(sheet.B4, ipla * ipla)) + self.assertTrue(plm_equal(sheet.B4, pla**-2)) + self.assertTrue(plm_equal(sheet.C4, ipla)) + self.assertTrue(plm_equal(sheet.C4, pla**-1)) + self.assertTrue(plm_equal(sheet.D4, FreeCAD.Placement())) + self.assertTrue(plm_equal(sheet.D4, pla**0)) + self.assertTrue(plm_equal(sheet.E4, pla)) + self.assertTrue(plm_equal(sheet.E4, pla**1)) + self.assertTrue(plm_equal(sheet.F4, pla * pla)) + self.assertTrue(plm_equal(sheet.F4, pla**2)) tol = 1e-10 - self.assertLess(sheet.A5.distanceToPoint( - sheet.A2.multiply(sheet.A3.Matrix).multiply(sheet.A4.Matrix).multVec(vec)),tol) - self.assertLess(sheet.B5.distanceToPoint( - sheet.B2.multiply(sheet.B4.Matrix).multiply(sheet.B3.Matrix).multVec(vec)),tol) - self.assertLess(sheet.C5.distanceToPoint( - sheet.C3.Matrix.multiply(sheet.C2).multiply(sheet.C4.Matrix).multVec(vec)),tol) - self.assertLess(sheet.D5.distanceToPoint( - sheet.D3.Matrix.multiply(sheet.D4.Matrix).multiply(sheet.D2).multVec(vec)),tol) - self.assertLess(sheet.E5.distanceToPoint( - sheet.E4.Matrix.multiply(sheet.E2).multiply(sheet.E3.Matrix).multVec(vec)),tol) - self.assertLess(sheet.F5.distanceToPoint( - sheet.F3.Matrix.multiply(sheet.F4.Matrix).multiply(sheet.F2).multVec(vec)),tol) + self.assertLess( + sheet.A5.distanceToPoint( + sheet.A2.multiply(sheet.A3.Matrix).multiply(sheet.A4.Matrix).multVec(vec) + ), + tol, + ) + self.assertLess( + sheet.B5.distanceToPoint( + sheet.B2.multiply(sheet.B4.Matrix).multiply(sheet.B3.Matrix).multVec(vec) + ), + tol, + ) + self.assertLess( + sheet.C5.distanceToPoint( + sheet.C3.Matrix.multiply(sheet.C2).multiply(sheet.C4.Matrix).multVec(vec) + ), + tol, + ) + self.assertLess( + sheet.D5.distanceToPoint( + sheet.D3.Matrix.multiply(sheet.D4.Matrix).multiply(sheet.D2).multVec(vec) + ), + tol, + ) + self.assertLess( + sheet.E5.distanceToPoint( + sheet.E4.Matrix.multiply(sheet.E2).multiply(sheet.E3.Matrix).multVec(vec) + ), + tol, + ) + self.assertLess( + sheet.F5.distanceToPoint( + sheet.F3.Matrix.multiply(sheet.F4.Matrix).multiply(sheet.F2).multVec(vec) + ), + tol, + ) - self.assertLess(sheet.A6.distanceToPoint(vec),tol) - self.assertLess(sheet.B6.distanceToPoint(vec),tol) - self.assertLess(sheet.C6.distanceToPoint(vec),tol) - self.assertLess(sheet.D6.distanceToPoint(vec),tol) - self.assertLess(sheet.E6.distanceToPoint(vec),tol) - self.assertLess(sheet.F6.distanceToPoint(vec),tol) + self.assertLess(sheet.A6.distanceToPoint(vec), tol) + self.assertLess(sheet.B6.distanceToPoint(vec), tol) + self.assertLess(sheet.C6.distanceToPoint(vec), tol) + self.assertLess(sheet.D6.distanceToPoint(vec), tol) + self.assertLess(sheet.E6.distanceToPoint(vec), tol) + self.assertLess(sheet.F6.distanceToPoint(vec), tol) self.assertTrue(sheet.A7.Base.isEqual(FreeCAD.Vector(1, 2, 3), tol)) self.assertTrue(sheet.B7.Base.isEqual(FreeCAD.Vector(1, -3, 2), tol)) @@ -1039,154 +1089,154 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.C8, pla) def testIssue3128(self): - """ Regression test for issue 3128; mod should work with arbitrary units for both arguments """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '=mod(7mm;3mm)') - sheet.set('A2', '=mod(7kg;3mm)') + """Regression test for issue 3128; mod should work with arbitrary units for both arguments""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "=mod(7mm;3mm)") + sheet.set("A2", "=mod(7kg;3mm)") self.doc.recompute() - self.assertEqual(sheet.A1, Units.Quantity('1')) - self.assertEqual(sheet.A2, Units.Quantity('1 kg/mm')) + self.assertEqual(sheet.A1, Units.Quantity("1")) + self.assertEqual(sheet.A2, Units.Quantity("1 kg/mm")) def testIssue3363(self): - """ Regression test for issue 3363; Nested conditionals statement fails with additional conditional statement in false-branch""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '1') - sheet.set('B1', '=A1==1?11:(A1==2?12:13)') - sheet.set('C1', '=A1==1?(A1==2?12:13) : 11') + """Regression test for issue 3363; Nested conditionals statement fails with additional conditional statement in false-branch""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "1") + sheet.set("B1", "=A1==1?11:(A1==2?12:13)") + sheet.set("C1", "=A1==1?(A1==2?12:13) : 11") self.doc.recompute() # Save and close first document - self.doc.saveAs(self.TempPath + os.sep + 'conditionals.fcstd') + self.doc.saveAs(self.TempPath + os.sep + "conditionals.fcstd") FreeCAD.closeDocument(self.doc.Name) # Open documents again - self.doc = FreeCAD.openDocument(self.TempPath + os.sep + 'conditionals.fcstd') + self.doc = FreeCAD.openDocument(self.TempPath + os.sep + "conditionals.fcstd") - sheet = self.doc.getObject('Spreadsheet') - self.assertEqual(sheet.getContents('B1'), '=A1 == 1 ? 11 : (A1 == 2 ? 12 : 13)') - self.assertEqual(sheet.getContents('C1'), '=A1 == 1 ? (A1 == 2 ? 12 : 13) : 11') + sheet = self.doc.getObject("Spreadsheet") + self.assertEqual(sheet.getContents("B1"), "=A1 == 1 ? 11 : (A1 == 2 ? 12 : 13)") + self.assertEqual(sheet.getContents("C1"), "=A1 == 1 ? (A1 == 2 ? 12 : 13) : 11") def testIssue3432(self): - """ Regression test for issue 3432; numbers with units are ignored from aggregates""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '1mm') - sheet.set('B1', '2mm') - sheet.set('C1', '=max(A1:B1;3mm)') + """Regression test for issue 3432; numbers with units are ignored from aggregates""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "1mm") + sheet.set("B1", "2mm") + sheet.set("C1", "=max(A1:B1;3mm)") self.doc.recompute() - self.assertEqual(sheet.get('C1'), Units.Quantity('3 mm')) + self.assertEqual(sheet.get("C1"), Units.Quantity("3 mm")) def testIssue4156(self): - """ Regression test for issue 4156; necessarily use of leading '=' to enter an expression, creates inconsistent behavior depending on the spreadsheet state""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A3', 'A1') - sheet.set('A1', '1000') + """Regression test for issue 4156; necessarily use of leading '=' to enter an expression, creates inconsistent behavior depending on the spreadsheet state""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A3", "A1") + sheet.set("A1", "1000") self.doc.recompute() - sheet.set('A3', '') - sheet.set('A3', 'A1') - self.assertEqual(sheet.getContents('A3'), '\'A1') + sheet.set("A3", "") + sheet.set("A3", "A1") + self.assertEqual(sheet.getContents("A3"), "'A1") def testInsertRowsAlias(self): - """ Regression test for issue 4429; insert rows to sheet with aliases""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A3', '1') - sheet.setAlias('A3', 'alias1') - sheet.set('A4', '=alias1 + 1') - sheet.setAlias('A4', 'alias2') - sheet.set('A5', '=alias2 + 1') + """Regression test for issue 4429; insert rows to sheet with aliases""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A3", "1") + sheet.setAlias("A3", "alias1") + sheet.set("A4", "=alias1 + 1") + sheet.setAlias("A4", "alias2") + sheet.set("A5", "=alias2 + 1") self.doc.recompute() - sheet.insertRows('1', 1) + sheet.insertRows("1", 1) self.doc.recompute() self.assertEqual(sheet.A6, 3) def testInsertColumnsAlias(self): - """ Regression test for issue 4429; insert columns to sheet with aliases""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('C1', '1') - sheet.setAlias('C1', 'alias1') - sheet.set('D1', '=alias1 + 1') - sheet.setAlias('D1', 'alias2') - sheet.set('E1', '=alias2 + 1') + """Regression test for issue 4429; insert columns to sheet with aliases""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("C1", "1") + sheet.setAlias("C1", "alias1") + sheet.set("D1", "=alias1 + 1") + sheet.setAlias("D1", "alias2") + sheet.set("E1", "=alias2 + 1") self.doc.recompute() - sheet.insertColumns('A', 1) + sheet.insertColumns("A", 1) self.doc.recompute() self.assertEqual(sheet.F1, 3) def testRemoveRowsAlias(self): - """ Regression test for issue 4429; remove rows from sheet with aliases""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A3', '1') - sheet.setAlias('A3', 'alias1') - sheet.set('A5', '=alias1 + 1') - sheet.setAlias('A5', 'alias2') - sheet.set('A4', '=alias2 + 1') + """Regression test for issue 4429; remove rows from sheet with aliases""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A3", "1") + sheet.setAlias("A3", "alias1") + sheet.set("A5", "=alias1 + 1") + sheet.setAlias("A5", "alias2") + sheet.set("A4", "=alias2 + 1") self.doc.recompute() - sheet.removeRows('1', 1) + sheet.removeRows("1", 1) self.doc.recompute() self.assertEqual(sheet.A3, 3) def testRemoveRowsAliasReuseName(self): - """ Regression test for issue 4492; deleted aliases remains in database""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.setAlias('B2', 'test') + """Regression test for issue 4492; deleted aliases remains in database""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.setAlias("B2", "test") self.doc.recompute() - sheet.removeRows('2', 1) - sheet.setAlias('B3','test') + sheet.removeRows("2", 1) + sheet.setAlias("B3", "test") def testRemoveColumnsAlias(self): - """ Regression test for issue 4429; remove columns from sheet with aliases""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('C1', '1') - sheet.setAlias('C1', 'alias1') - sheet.set('E1', '=alias1 + 1') - sheet.setAlias('E1', 'alias2') - sheet.set('D1', '=alias2 + 1') + """Regression test for issue 4429; remove columns from sheet with aliases""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("C1", "1") + sheet.setAlias("C1", "alias1") + sheet.set("E1", "=alias1 + 1") + sheet.setAlias("E1", "alias2") + sheet.set("D1", "=alias2 + 1") self.doc.recompute() - sheet.removeColumns('A', 1) + sheet.removeColumns("A", 1) self.doc.recompute() self.assertEqual(sheet.C1, 3) def testRemoveColumnsAliasReuseName(self): - """ Regression test for issue 4492; deleted aliases remains in database""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.setAlias('B2', 'test') + """Regression test for issue 4492; deleted aliases remains in database""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.setAlias("B2", "test") self.doc.recompute() - sheet.removeColumns('B', 1) - sheet.setAlias('C3','test') + sheet.removeColumns("B", 1) + sheet.setAlias("C3", "test") def testUndoAliasCreationReuseName(self): - """ Test deleted aliases by undo remains in database""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') + """Test deleted aliases by undo remains in database""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") self.doc.UndoMode = 1 self.doc.openTransaction("create alias") - sheet.setAlias('B2', 'test') + sheet.setAlias("B2", "test") self.doc.commitTransaction() self.doc.recompute() self.doc.undo() self.doc.recompute() - sheet.setAlias('C3','test') + sheet.setAlias("C3", "test") def testCrossLinkEmptyPropertyName(self): # https://forum.freecad.org/viewtopic.php?f=3&t=58603 base = FreeCAD.newDocument("base") - sheet = base.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.setAlias('A1', 'x') - sheet.set('x', '42mm') + sheet = base.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.setAlias("A1", "x") + sheet.set("x", "42mm") base.recompute() square = FreeCAD.newDocument("square") - body = square.addObject('PartDesign::Body','Body') - box = square.addObject('PartDesign::AdditiveBox','Box') + body = square.addObject("PartDesign::Body", "Body") + box = square.addObject("PartDesign::AdditiveBox", "Box") body.addObject(box) box.Length = 10.00 box.Width = 10.00 box.Height = 10.00 square.recompute() - basePath = self.TempPath + os.sep + 'base.FCStd' + basePath = self.TempPath + os.sep + "base.FCStd" base.saveAs(basePath) - squarePath = self.TempPath + os.sep + 'square.FCStd' + squarePath = self.TempPath + os.sep + "square.FCStd" square.saveAs(squarePath) base.save() @@ -1200,7 +1250,7 @@ class SpreadsheetCases(unittest.TestCase): base = FreeCAD.openDocument(basePath) square = FreeCAD.openDocument(squarePath) - square.Box.setExpression('Length', u'base#Spreadsheet.x') + square.Box.setExpression("Length", "base#Spreadsheet.x") square.recompute() square.save() @@ -1211,17 +1261,17 @@ class SpreadsheetCases(unittest.TestCase): def testExpressionWithAlias(self): # https://forum.freecad.org/viewtopic.php?p=564502#p564502 ss1 = self.doc.addObject("Spreadsheet::Sheet", "Input") - ss1.setAlias('A1', 'one') - ss1.setAlias('A2', 'two') - ss1.set("A1","1") - ss1.set("A2","2") + ss1.setAlias("A1", "one") + ss1.setAlias("A2", "two") + ss1.set("A1", "1") + ss1.set("A2", "2") self.doc.recompute() ss2 = self.doc.addObject("Spreadsheet::Sheet", "Output") - ss2.set("A1","=Input.A1 + Input.A2") - ss2.set("A2","=Input.one + Input.two") - ss2.set("A3","=<>.A1 + <>.A2") - ss2.set("A4","=<>.one + <>.two") + ss2.set("A1", "=Input.A1 + Input.A2") + ss2.set("A2", "=Input.one + Input.two") + ss2.set("A3", "=<>.A1 + <>.A2") + ss2.set("A4", "=<>.one + <>.two") self.doc.recompute() self.assertEqual(ss2.get("A1"), 3) @@ -1229,7 +1279,7 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(ss2.get("A3"), 3) self.assertEqual(ss2.get("A4"), 3) - project_path = self.TempPath + os.sep + 'alias.FCStd' + project_path = self.TempPath + os.sep + "alias.FCStd" self.doc.saveAs(project_path) FreeCAD.closeDocument(self.doc.Name) self.doc = FreeCAD.openDocument(project_path) @@ -1241,7 +1291,7 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(ss2.get("A3"), 3) self.assertEqual(ss2.get("A4"), 3) - ss1.set("A1","2") + ss1.set("A1", "2") self.doc.recompute() self.assertEqual(ss1.get("A1"), 2) @@ -1264,7 +1314,10 @@ class SpreadsheetCases(unittest.TestCase): sheet.body = ["Item1", "Item2", "Item3"] sheet.setExpression(".body.Enum", "cells[<>]") - sheet.setExpression(".cells.Bind.B1.ZZ1", "tuple(.cells; <> + str(hiddenref(Body.Configuration) + 2); <> + str(hiddenref(Body.Configuration) + 2))") + sheet.setExpression( + ".cells.Bind.B1.ZZ1", + "tuple(.cells; <> + str(hiddenref(Body.Configuration) + 2); <> + str(hiddenref(Body.Configuration) + 2))", + ) self.doc.recompute() self.doc.UndoMode = 0 @@ -1283,7 +1336,10 @@ class SpreadsheetCases(unittest.TestCase): sheet.body = ["Item1", "Item2", "Item3"] sheet.setExpression(".body.Enum", "cells[<>]") - sheet.setExpression(".cells.Bind.B1.ZZ1", "tuple(.cells; <> + str(hiddenref(Body.Configuration) + 2); <> + str(hiddenref(Body.Configuration) + 2))") + sheet.setExpression( + ".cells.Bind.B1.ZZ1", + "tuple(.cells; <> + str(hiddenref(Body.Configuration) + 2); <> + str(hiddenref(Body.Configuration) + 2))", + ) self.doc.recompute() self.doc.clearDocument() @@ -1310,7 +1366,7 @@ class SpreadsheetCases(unittest.TestCase): ss2.set("D1", "D1") ss2.set("D2", "D2") - ss1.setExpression('.cells.Bind.A3.C4', 'tuple(Spreadsheet2.cells, <>, <>)') + ss1.setExpression(".cells.Bind.A3.C4", "tuple(Spreadsheet2.cells, <>, <>)") self.doc.recompute() self.assertEqual(ss1.A3, ss2.B1) @@ -1321,7 +1377,7 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(ss1.C4, ss2.D2) self.assertEqual(len(ss1.ExpressionEngine), 1) - ss1.setExpression('.cells.Bind.A3.C4', None) + ss1.setExpression(".cells.Bind.A3.C4", None) self.doc.recompute() def testBindHiddenRefAcrossSheets(self): @@ -1335,22 +1391,24 @@ class SpreadsheetCases(unittest.TestCase): ss2.set("D2", "D2") self.doc.recompute() - ss1.setExpression('.cells.Bind.A3.C4', None) - ss1.setExpression('.cells.BindHiddenRef.A3.C4', 'hiddenref(tuple(Spreadsheet2.cells, <>, <>))') + ss1.setExpression(".cells.Bind.A3.C4", None) + ss1.setExpression( + ".cells.BindHiddenRef.A3.C4", "hiddenref(tuple(Spreadsheet2.cells, <>, <>))" + ) self.doc.recompute() - ss1.recompute() # True + ss1.recompute() # True self.assertEqual(ss1.A3, ss2.B1) - ss1.setExpression('.cells.Bind.A3.C4', None) - ss1.setExpression('.cells.BindHiddenRef.A3.C4', None) + ss1.setExpression(".cells.Bind.A3.C4", None) + ss1.setExpression(".cells.BindHiddenRef.A3.C4", None) self.doc.recompute() self.assertEqual(len(ss1.ExpressionEngine), 0) def testMergeCells(self): ss1 = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet1") - ss1.mergeCells('A1:B4') - ss1.mergeCells('C1:D4') + ss1.mergeCells("A1:B4") + ss1.mergeCells("C1:D4") self.doc.recompute() ss1.set("B1", "fail") self.doc.recompute() @@ -1359,8 +1417,8 @@ class SpreadsheetCases(unittest.TestCase): def testMergeCellsAndBind(self): ss1 = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet1") - ss1.mergeCells('A1:B1') - ss1.setExpression('.cells.Bind.A1.A1', 'tuple(.cells, <>, <>)') + ss1.mergeCells("A1:B1") + ss1.setExpression(".cells.Bind.A1.A1", "tuple(.cells, <>, <>)") ss1.set("A2", "test") self.doc.recompute() self.assertEqual(ss1.A1, ss1.A2) @@ -1370,10 +1428,10 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(ss1.B1, "fail") def testGetUsedCells(self): - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - test_cells = ['B13','C14','D15'] - for i,cell in enumerate(test_cells): - sheet.set(cell,str(i)) + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + test_cells = ["B13", "C14", "D15"] + for i, cell in enumerate(test_cells): + sheet.set(cell, str(i)) used_cells = sheet.getUsedCells() self.assertEqual(len(used_cells), len(test_cells)) @@ -1381,30 +1439,30 @@ class SpreadsheetCases(unittest.TestCase): self.assertTrue(cell in used_cells) for cell in test_cells: - sheet.set(cell,"") - sheet.setAlignment(cell,"center") + sheet.set(cell, "") + sheet.setAlignment(cell, "center") non_empty_cells = sheet.getUsedCells() - self.assertEqual(len(non_empty_cells), len(test_cells)) # Alignment counts as "used" + self.assertEqual(len(non_empty_cells), len(test_cells)) # Alignment counts as "used" def testGetUsedRange(self): - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - test_cells = ['C5','Z3','D10','E20'] - for i,cell in enumerate(test_cells): - sheet.set(cell,str(i)) + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + test_cells = ["C5", "Z3", "D10", "E20"] + for i, cell in enumerate(test_cells): + sheet.set(cell, str(i)) used_range = sheet.getUsedRange() - self.assertEquals(used_range,("C3","Z20")) + self.assertEquals(used_range, ("C3", "Z20")) - for i,cell in enumerate(test_cells): - sheet.set(cell,"") - sheet.setAlignment(cell,"center") + for i, cell in enumerate(test_cells): + sheet.set(cell, "") + sheet.setAlignment(cell, "center") used_range = sheet.getUsedRange() - self.assertEquals(used_range,("C3","Z20")) + self.assertEquals(used_range, ("C3", "Z20")) def testGetNonEmptyCells(self): - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - test_cells = ['B13','C14','D15'] - for i,cell in enumerate(test_cells): - sheet.set(cell,str(i)) + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + test_cells = ["B13", "C14", "D15"] + for i, cell in enumerate(test_cells): + sheet.set(cell, str(i)) non_empty_cells = sheet.getNonEmptyCells() self.assertEqual(len(non_empty_cells), len(test_cells)) @@ -1412,80 +1470,80 @@ class SpreadsheetCases(unittest.TestCase): self.assertTrue(cell in non_empty_cells) for cell in test_cells: - sheet.set(cell,"") - sheet.setAlignment(cell,"center") + sheet.set(cell, "") + sheet.setAlignment(cell, "center") non_empty_cells = sheet.getNonEmptyCells() - self.assertEqual(len(non_empty_cells), 0) # Alignment does not count as "non-empty" + self.assertEqual(len(non_empty_cells), 0) # Alignment does not count as "non-empty" def testGetNonEmptyRange(self): - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - test_cells = ['C5','Z3','D10','E20'] - for i,cell in enumerate(test_cells): - sheet.set(cell,str(i)) + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + test_cells = ["C5", "Z3", "D10", "E20"] + for i, cell in enumerate(test_cells): + sheet.set(cell, str(i)) non_empty_range = sheet.getNonEmptyRange() - self.assertEquals(non_empty_range,("C3","Z20")) + self.assertEquals(non_empty_range, ("C3", "Z20")) - for i,cell in enumerate(test_cells): - sheet.set(cell,"") - sheet.setAlignment(cell,"center") - more_cells = ['D10','X5','E10','K15'] - for i,cell in enumerate(more_cells): - sheet.set(cell,str(i)) + for i, cell in enumerate(test_cells): + sheet.set(cell, "") + sheet.setAlignment(cell, "center") + more_cells = ["D10", "X5", "E10", "K15"] + for i, cell in enumerate(more_cells): + sheet.set(cell, str(i)) non_empty_range = sheet.getNonEmptyRange() - self.assertEquals(non_empty_range,("D5","X15")) + self.assertEquals(non_empty_range, ("D5", "X15")) def testAliasEmptyCell(self): # https://github.com/FreeCAD/FreeCAD/issues/7841 - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.setAlias('A1', 'aliasOfEmptyCell') - self.assertEqual(sheet.getCellFromAlias("aliasOfEmptyCell"),"A1") + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.setAlias("A1", "aliasOfEmptyCell") + self.assertEqual(sheet.getCellFromAlias("aliasOfEmptyCell"), "A1") def testParensAroundCondition(self): - """ Parens around a condition should be accepted """ - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') + """Parens around a condition should be accepted""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") - sheet.set('A1', '=(1 == 1) ? 1 : 0') + sheet.set("A1", "=(1 == 1) ? 1 : 0") self.doc.recompute() - self.assertEqual(sheet.getContents('A1'), '=1 == 1 ? 1 : 0') + self.assertEqual(sheet.getContents("A1"), "=1 == 1 ? 1 : 0") self.assertEqual(sheet.A1, 1) def testIssue6395(self): - """ Testing strings are correctly saved and restored""" - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') - sheet.set('A1', '\'36C') # Use a string that may be parsed as a quantity + """Testing strings are correctly saved and restored""" + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") + sheet.set("A1", "'36C") # Use a string that may be parsed as a quantity self.doc.recompute() - self.doc.saveAs(self.TempPath + os.sep + 'string.fcstd') + self.doc.saveAs(self.TempPath + os.sep + "string.fcstd") FreeCAD.closeDocument(self.doc.Name) - self.doc = FreeCAD.openDocument(self.TempPath + os.sep + 'string.fcstd') + self.doc = FreeCAD.openDocument(self.TempPath + os.sep + "string.fcstd") - sheet = self.doc.getObject('Spreadsheet') - self.assertEqual(sheet.getContents('A1'), '\'36C') - self.assertEqual(sheet.get('A1'), '36C') + sheet = self.doc.getObject("Spreadsheet") + self.assertEqual(sheet.getContents("A1"), "'36C") + self.assertEqual(sheet.get("A1"), "36C") def testVectorFunctions(self): - sheet = self.doc.addObject('Spreadsheet::Sheet','Spreadsheet') + sheet = self.doc.addObject("Spreadsheet::Sheet", "Spreadsheet") - sheet.set('A1', '=vcross(vector(1; 2; 3); vector(1; 5; 7))') + sheet.set("A1", "=vcross(vector(1; 2; 3); vector(1; 5; 7))") - sheet.set('B1', '=vdot(vector(1; 2; 3); vector(4; -5; 6))') + sheet.set("B1", "=vdot(vector(1; 2; 3); vector(4; -5; 6))") - sheet.set('C1', '=vangle(vector(1; 0; 0); vector(0; 1; 0))') + sheet.set("C1", "=vangle(vector(1; 0; 0); vector(0; 1; 0))") - sheet.set('D1', '=vnormalize(vector(1; 0; 0))') - sheet.set('D2', '=vnormalize(vector(1; 1; 1))') + sheet.set("D1", "=vnormalize(vector(1; 0; 0))") + sheet.set("D2", "=vnormalize(vector(1; 1; 1))") - sheet.set('E1', '=vscale(vector(1; 2; 3); 2; 3; 4)') - sheet.set('E2', '=vscalex(vector(1; 2; 3); -2)') - sheet.set('E3', '=vscaley(vector(1; 2; 3); -2)') - sheet.set('E4', '=vscalez(vector(1; 2; 3); -2)') + sheet.set("E1", "=vscale(vector(1; 2; 3); 2; 3; 4)") + sheet.set("E2", "=vscalex(vector(1; 2; 3); -2)") + sheet.set("E3", "=vscaley(vector(1; 2; 3); -2)") + sheet.set("E4", "=vscalez(vector(1; 2; 3); -2)") - sheet.set('F1', '=vlinedist(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))') - sheet.set('F2', '=vlinesegdist(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))') - sheet.set('F3', '=vlineproj(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))') - sheet.set('F4', '=vplanedist(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))') - sheet.set('F5', '=vplaneproj(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))') + sheet.set("F1", "=vlinedist(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))") + sheet.set("F2", "=vlinesegdist(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))") + sheet.set("F3", "=vlineproj(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))") + sheet.set("F4", "=vplanedist(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))") + sheet.set("F5", "=vplaneproj(vector(1; 2; 3); vector(2; 3; 4); vector(3; 4; 5))") self.doc.recompute() @@ -1498,7 +1556,10 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.C1, 90) self.assertEqual(sheet.D1, FreeCAD.Vector(1, 0, 0)) - self.assertLess(sheet.D2.distanceToPoint(FreeCAD.Vector(1/sqrt(3), 1/sqrt(3), 1/sqrt(3))), tolerance) + self.assertLess( + sheet.D2.distanceToPoint(FreeCAD.Vector(1 / sqrt(3), 1 / sqrt(3), 1 / sqrt(3))), + tolerance, + ) self.assertEqual(sheet.E1, FreeCAD.Vector(2, 6, 12)) self.assertEqual(sheet.E2, FreeCAD.Vector(-2, 2, 3)) @@ -1512,5 +1573,5 @@ class SpreadsheetCases(unittest.TestCase): self.assertEqual(sheet.F5, FreeCAD.Vector(1.72, 2.96, 4.2)) def tearDown(self): - #closing doc + # closing doc FreeCAD.closeDocument(self.doc.Name) diff --git a/src/Mod/Spreadsheet/TestSpreadsheetGui.py b/src/Mod/Spreadsheet/TestSpreadsheetGui.py index 3278a1a8a4..156c031205 100644 --- a/src/Mod/Spreadsheet/TestSpreadsheetGui.py +++ b/src/Mod/Spreadsheet/TestSpreadsheetGui.py @@ -40,7 +40,7 @@ class SpreadsheetGuiCases(unittest.TestCase): def tearDown(self): pass - #FreeCAD.closeDocument(self.doc.Name) + # FreeCAD.closeDocument(self.doc.Name) def injectSimpleData(self): """A utility function to initialize a blank sheet with some known data""" diff --git a/src/Mod/Spreadsheet/importXLSX.py b/src/Mod/Spreadsheet/importXLSX.py index 0377cd1f62..6ed01a74b8 100644 --- a/src/Mod/Spreadsheet/importXLSX.py +++ b/src/Mod/Spreadsheet/importXLSX.py @@ -1,31 +1,31 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -#*************************************************************************** -#* Copyright (c) 2016 Ulrich Brammer * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License (GPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2016 Ulrich Brammer * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU General Public License (GPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# ***************************************************************************/ -__title__ = "FreeCAD Spreadsheet Workbench - XLSX importer" +__title__ = "FreeCAD Spreadsheet Workbench - XLSX importer" __author__ = "Ulrich Brammer " -__url__ = ["https://www.freecad.org"] +__url__ = ["https://www.freecad.org"] -''' +""" This library imports an Excel-XLSX-file into FreeCAD. Version 1.1, Nov. 2016: @@ -49,18 +49,21 @@ Features: known issues: - units are not imported - string support is minimal, the same as in FreeCAD -''' +""" import zipfile import xml.dom.minidom import FreeCAD as App -try: import FreeCADGui -except ValueError: gui = False -else: gui = True +try: + import FreeCADGui +except ValueError: + gui = False +else: + gui = True -if open.__module__ in ['__builtin__','io']: +if open.__module__ in ["__builtin__", "io"]: pythonopen = open @@ -69,36 +72,30 @@ if open.__module__ in ['__builtin__','io']: # sepToken defines a search tree for separator tokens with length of 1 to 3 characters # it is also used as a list of separators between other tokens. sepToken = { - '(':None, - '=':None, - '<':'branchLower', - '>':'branchHigher', - ')':None, -# '"':None, -# ';':None, - ' ':None, - ',':None, # Separator on lists - '!':None, #Connector to cells on other Sheets - '+':None, - '-':None, - '*':None, - '/':None, - '^':None - } + "(": None, + "=": None, + "<": "branchLower", + ">": "branchHigher", + ")": None, + # '"':None, + # ';':None, + " ": None, + ",": None, # Separator on lists + "!": None, # Connector to cells on other Sheets + "+": None, + "-": None, + "*": None, + "/": None, + "^": None, +} -branchLower ={ - '>':None, - '=':None - } +branchLower = {">": None, "=": None} -branchHigher = {'=':None} +branchHigher = {"=": None} # Needed to get a reference from a string to a dict -treeDict = { - 'branchLower':branchLower, - 'branchHigher':branchHigher - } +treeDict = {"branchLower": branchLower, "branchHigher": branchHigher} # The tokenDic is used in parseExpr. # The tokenDic contains the following information: @@ -110,380 +107,377 @@ treeDict = { tokenDic = { - '(' :( 1, '(', 0), - '=' :( 0 ,'==', 0), - '<>' :( 0 ,'!=', 0), - '>=' :( 0 ,'>=', 0), - '<=' :( 0 ,'<=', 0), - '<' :( 0 ,'<', 0), - '>' :( 0 ,'>', 0), - ',' :( 0 ,',', 0), - ')' :(-1 ,')', 0), - '!' :( 0 ,'.', 0), #Connector to cells on other Sheets -# '"' :( 2 ,'', 0), - '+' :( 0 ,'+', 0), - '-' :( 0 ,'-', 0), - '*' :( 0 ,'*', 0), - '/' :( 0 ,'/', 0), - '^' :( 0 ,'^', 0), - 'IF' :( 0, '', 3), - 'ABS' :( 0, 'abs', 0), - 'ACOS' :( 0, 'pi/180deg*acos', 0), - 'ASIN' :( 0, 'pi/180deg*asin', 0), - 'ATAN' :( 0, 'pi/180deg*atan', 0), - 'ATAN2':( 0, 'pi/180deg*atan2',0), - 'COS' :( 0, 'cos', 2), - 'COSH' :( 0, 'cosh', 2), - 'EXP' :( 0, 'exp', 0), - 'LOG' :( 0, 'log', 0), - 'LOG10':( 0, 'log10',0), - 'MOD' :( 0, 'mod', 0), - 'POWER':( 0, 'pow', 0), - 'SIN' :( 0, 'sin', 2), - 'SINH' :( 0, 'sinh', 2), - 'SQRT' :( 0, 'sqrt', 0), - 'TAN' :( 0, 'tan', 2), - 'TANH' :( 0, 'tanh', 2), - 'AVERAGE':( 0, 'average', 0), - 'COUNT':( 0, 'count',0), - 'MAX' :( 0, 'max', 0), - 'MIN' :( 0, 'min', 0), - 'STDEVA':( 0, 'stddev',0), - 'SUM' :( 0, 'sum', 0), - 'PI' :( 0, 'pi', 1), - '_xlfn.CEILING.MATH':( 0, 'ceil', 0), - '_xlfn.FLOOR.MATH' :( 0, 'floor', 0) - } + "(": (1, "(", 0), + "=": (0, "==", 0), + "<>": (0, "!=", 0), + ">=": (0, ">=", 0), + "<=": (0, "<=", 0), + "<": (0, "<", 0), + ">": (0, ">", 0), + ",": (0, ",", 0), + ")": (-1, ")", 0), + "!": (0, ".", 0), # Connector to cells on other Sheets + # '"' :( 2 ,'', 0), + "+": (0, "+", 0), + "-": (0, "-", 0), + "*": (0, "*", 0), + "/": (0, "/", 0), + "^": (0, "^", 0), + "IF": (0, "", 3), + "ABS": (0, "abs", 0), + "ACOS": (0, "pi/180deg*acos", 0), + "ASIN": (0, "pi/180deg*asin", 0), + "ATAN": (0, "pi/180deg*atan", 0), + "ATAN2": (0, "pi/180deg*atan2", 0), + "COS": (0, "cos", 2), + "COSH": (0, "cosh", 2), + "EXP": (0, "exp", 0), + "LOG": (0, "log", 0), + "LOG10": (0, "log10", 0), + "MOD": (0, "mod", 0), + "POWER": (0, "pow", 0), + "SIN": (0, "sin", 2), + "SINH": (0, "sinh", 2), + "SQRT": (0, "sqrt", 0), + "TAN": (0, "tan", 2), + "TANH": (0, "tanh", 2), + "AVERAGE": (0, "average", 0), + "COUNT": (0, "count", 0), + "MAX": (0, "max", 0), + "MIN": (0, "min", 0), + "STDEVA": (0, "stddev", 0), + "SUM": (0, "sum", 0), + "PI": (0, "pi", 1), + "_xlfn.CEILING.MATH": (0, "ceil", 0), + "_xlfn.FLOOR.MATH": (0, "floor", 0), +} class exprNode(object): - ''' This defines a tree class for expression parsing. - A tree is built, to step down into the levels of the expression.''' - def __init__(self, parent, state, actIndex): - self.state = state #see comment: State used for Angle-functions and IF-function - self.parent = parent # Parent tree node - self.lIndex = actIndex # Index to the list of tokens - self.result = '' + """This defines a tree class for expression parsing. + A tree is built, to step down into the levels of the expression.""" + + def __init__(self, parent, state, actIndex): + self.state = state # see comment: State used for Angle-functions and IF-function + self.parent = parent # Parent tree node + self.lIndex = actIndex # Index to the list of tokens + self.result = "" class FormulaTranslator(object): - ''' This class translates a cell-formula from Excel to FreeCAD.''' - def __init__(self): - self.tokenList = ['='] + """This class translates a cell-formula from Excel to FreeCAD.""" - def translateForm(self, actExpr): - self.getNextToken(actExpr) - #print("tokenList: ", self.tokenList) - self.resultTree = exprNode(None, 0, 1) - self.resultTree.result = self.tokenList[0] - self.parseExpr(self.resultTree) - #print('parseResult: ', self.resultTree.result) - return self.resultTree.result + def __init__(self): + self.tokenList = ["="] - def getNextToken(self, theExpr): - ''' This is the recursive tokenizer for an excel formula. - It appends all identified tokens to self.tokenList.''' - #print('next Token theExpr: ', theExpr) - #print('actTList: ', self.tokenList) - tokenComplete = False - keyToken = False - if len(theExpr)>0: - theTok = theExpr[0] - theExpr = theExpr[1:] - if theTok in sepToken: - keyToken = True - branch = sepToken[theTok] - while branch: - #print(branch, ' theExpr[0]: ',theExpr[0]) - if theExpr[0] in treeDict[branch]: - branch = treeDict[branch][theExpr[0]] - theTok = theTok + theExpr[0] + def translateForm(self, actExpr): + self.getNextToken(actExpr) + # print("tokenList: ", self.tokenList) + self.resultTree = exprNode(None, 0, 1) + self.resultTree.result = self.tokenList[0] + self.parseExpr(self.resultTree) + # print('parseResult: ', self.resultTree.result) + return self.resultTree.result + + def getNextToken(self, theExpr): + """This is the recursive tokenizer for an excel formula. + It appends all identified tokens to self.tokenList.""" + # print('next Token theExpr: ', theExpr) + # print('actTList: ', self.tokenList) + tokenComplete = False + keyToken = False + if len(theExpr) > 0: + theTok = theExpr[0] theExpr = theExpr[1:] - else: - branch= None - tokenComplete = True - self.tokenList.append(theTok) - self.getNextToken(theExpr) - else: - if len(theExpr)>0: - while (not tokenComplete): - if not self.isKey(theExpr): - theTok = theTok + theExpr[0] - theExpr = theExpr[1:] - if len(theExpr) == 0: + if theTok in sepToken: + keyToken = True + branch = sepToken[theTok] + while branch: + # print(branch, ' theExpr[0]: ',theExpr[0]) + if theExpr[0] in treeDict[branch]: + branch = treeDict[branch][theExpr[0]] + theTok = theTok + theExpr[0] + theExpr = theExpr[1:] + else: + branch = None tokenComplete = True + self.tokenList.append(theTok) + self.getNextToken(theExpr) else: - tokenComplete = True - self.tokenList.append(theTok) - self.getNextToken(theExpr) + if len(theExpr) > 0: + while not tokenComplete: + if not self.isKey(theExpr): + theTok = theTok + theExpr[0] + theExpr = theExpr[1:] + if len(theExpr) == 0: + tokenComplete = True + else: + tokenComplete = True + self.tokenList.append(theTok) + self.getNextToken(theExpr) + def isKey(self, theExpr): + # print('look up: ', theExpr) + keyToken = False + lenExpr = len(theExpr) + if theExpr[0] in sepToken: + branch = sepToken[theExpr[0]] - def isKey(self, theExpr): - #print('look up: ', theExpr) - keyToken = False - lenExpr = len(theExpr) - if theExpr[0] in sepToken: - branch = sepToken[theExpr[0]] + if branch is None: + keyToken = True + else: + # print('There is a branch. look up: ', theExpr[1]) + if (lenExpr > 1) and (theExpr[1] in treeDict[branch]): + branch = treeDict[branch][theExpr[0]] + if branch is None: + keyToken = True + else: + if (lenExpr > 2) and (theExpr[2] in treeDict[branch]): + keyToken = True + else: + keyToken = True + return keyToken - if branch is None: - keyToken = True - else: - #print('There is a branch. look up: ', theExpr[1]) - if (lenExpr > 1) and (theExpr[1] in treeDict[branch]): - branch = treeDict[branch][theExpr[0]] - if branch is None: - keyToken = True - else: - if (lenExpr > 2) and (theExpr[2] in treeDict[branch]): - keyToken = True + def parseExpr(self, treeNode): + token = self.tokenList[treeNode.lIndex] + treeNode.lIndex += 1 + if token in tokenDic: + lChange, newToken, funcState = tokenDic[token] else: - keyToken = True - return keyToken + lChange = 0 + newToken = token + funcState = 0 + # print('treeNode.state: ', treeNode.state, ' my.index: ', treeNode.lIndex-1, ' ', token, ' fState: ', funcState) + if token == ",": + if treeNode.state == 4: + newToken = ":" + treeNode.state = 6 + if treeNode.state == 3: + newToken = "?" + treeNode.state = 4 + if funcState == 3: + funcState = 0 + newNode = exprNode(treeNode, 3, treeNode.lIndex) + self.parseIF(newNode) + else: + treeNode.result = treeNode.result + newToken - def parseExpr(self, treeNode): - token = self.tokenList[treeNode.lIndex] - treeNode.lIndex += 1 - if token in tokenDic: - lChange, newToken, funcState = tokenDic[token] - else: - lChange = 0 - newToken = token - funcState = 0 - #print('treeNode.state: ', treeNode.state, ' my.index: ', treeNode.lIndex-1, ' ', token, ' fState: ', funcState) + if funcState == 2: + funcState = 0 + newNode = exprNode(treeNode, 2, treeNode.lIndex) + self.parseAngle(newNode) + treeNode.result = treeNode.result + ")" + elif funcState == 1: + treeNode.lIndex += 2 # do skip the 2 parentheses of the PI() - if token == ',': - if (treeNode.state == 4): - newToken = ':' - treeNode.state = 6 - if (treeNode.state == 3): - newToken = '?' - treeNode.state = 4 + if lChange == -1: + # print 'state: ', treeNode.state, 'parent.result: ', treeNode.parent.result, ' mine: ', treeNode.result + treeNode.parent.result = treeNode.parent.result + treeNode.result + treeNode.parent.lIndex = treeNode.lIndex + # print('Go one level up, state: ', treeNode.state) + if treeNode.state < 2: + # print(' Look up more token above') + if treeNode.lIndex < len(self.tokenList): + self.parseExpr(treeNode.parent) - if funcState == 3: - funcState = 0 - newNode = exprNode(treeNode, 3, treeNode.lIndex) - self.parseIF(newNode) - else: - treeNode.result = treeNode.result + newToken + elif lChange == 1: + # print('Go one level down') + newNode = exprNode(treeNode, 1, treeNode.lIndex) + self.parseExpr(newNode) + treeNode.lIndex = newNode.lIndex + else: + if treeNode.lIndex < len(self.tokenList): + # print('parse to the end') + self.parseExpr(treeNode) - if funcState == 2: - funcState = 0 - newNode = exprNode(treeNode, 2, treeNode.lIndex) - self.parseAngle(newNode) - treeNode.result = treeNode.result + ')' - elif funcState == 1: - treeNode.lIndex += 2 # do skip the 2 parentheses of the PI() - - if lChange == -1: - #print 'state: ', treeNode.state, 'parent.result: ', treeNode.parent.result, ' mine: ', treeNode.result - treeNode.parent.result = treeNode.parent.result + treeNode.result - treeNode.parent.lIndex = treeNode.lIndex - #print('Go one level up, state: ', treeNode.state) - if (treeNode.state < 2): - #print(' Look up more token above') - if treeNode.lIndex < len(self.tokenList): - self.parseExpr(treeNode.parent) - - elif lChange == 1: - #print('Go one level down') - newNode = exprNode(treeNode, 1, treeNode.lIndex) - self.parseExpr(newNode) - treeNode.lIndex = newNode.lIndex - else: - if treeNode.lIndex < len(self.tokenList): - #print('parse to the end') + def parseIF(self, treeNode): + # print('IF state: ', treeNode.state) + treeNode.result = treeNode.result + "(" + treeNode.lIndex += 1 self.parseExpr(treeNode) + # print('IF result: ', treeNode.result) + return - - - def parseIF(self, treeNode): - #print('IF state: ', treeNode.state) - treeNode.result = treeNode.result + '(' - treeNode.lIndex += 1 - self.parseExpr(treeNode) - #print('IF result: ', treeNode.result) - return - - def parseAngle(self, treeNode): - #print('Angle state: ', treeNode.state) - treeNode.result = treeNode.result + '(1rad*(' - treeNode.lIndex += 1 - self.parseExpr(treeNode) - #print('angle result: ', treeNode.result) - + def parseAngle(self, treeNode): + # print('Angle state: ', treeNode.state) + treeNode.result = treeNode.result + "(1rad*(" + treeNode.lIndex += 1 + self.parseExpr(treeNode) + # print('angle result: ', treeNode.result) def getText(nodelist): - rc = [] - for node in nodelist: - if node.nodeType == node.TEXT_NODE: - rc.append(node.data) - return ''.join(rc) + rc = [] + for node in nodelist: + if node.nodeType == node.TEXT_NODE: + rc.append(node.data) + return "".join(rc) def handleWorkSheet(theDom, actSheet, strList): - rows = theDom.getElementsByTagName("row") - for row in rows: - handleCells(row.getElementsByTagName("c"), actSheet, strList) + rows = theDom.getElementsByTagName("row") + for row in rows: + handleCells(row.getElementsByTagName("c"), actSheet, strList) def handleCells(cellList, actCellSheet, sList): - for cell in cellList: - cellAtts = cell.attributes - refRef = cellAtts.getNamedItem("r") - ref = getText(refRef.childNodes) + for cell in cellList: + cellAtts = cell.attributes + refRef = cellAtts.getNamedItem("r") + ref = getText(refRef.childNodes) - refType = cellAtts.getNamedItem("t") - if refType: - cellType = getText(refType.childNodes) - else: - cellType = 'n' # FIXME: some cells don't have t and s attributes + refType = cellAtts.getNamedItem("t") + if refType: + cellType = getText(refType.childNodes) + else: + cellType = "n" # FIXME: some cells don't have t and s attributes - #print("reference: ", ref, ' Cell type: ', cellType) + # print("reference: ", ref, ' Cell type: ', cellType) - if cellType == 'inlineStr': - iStringList = cell.getElementsByTagName("is") - #print('iString: ', iStringList) - for stringEle in iStringList: - tElement = stringEle.getElementsByTagName('t')[0] - theString = getText(tElement.childNodes) + if cellType == "inlineStr": + iStringList = cell.getElementsByTagName("is") + # print('iString: ', iStringList) + for stringEle in iStringList: + tElement = stringEle.getElementsByTagName("t")[0] + theString = getText(tElement.childNodes) - #print('theString: ', theString) - actCellSheet.set(ref, theString) + # print('theString: ', theString) + actCellSheet.set(ref, theString) - formulaRef = cell.getElementsByTagName("f") - if len(formulaRef)==1: - theFormula = getText(formulaRef[0].childNodes) - #print("theFormula: ", theFormula) - fTrans = FormulaTranslator() - actCellSheet.set(ref, fTrans.translateForm(theFormula)) + formulaRef = cell.getElementsByTagName("f") + if len(formulaRef) == 1: + theFormula = getText(formulaRef[0].childNodes) + # print("theFormula: ", theFormula) + fTrans = FormulaTranslator() + actCellSheet.set(ref, fTrans.translateForm(theFormula)) - else: - valueRef = cell.getElementsByTagName("v") - #print('valueRef: ', valueRef) - if len(valueRef)==1: - valueRef = cell.getElementsByTagName("v")[0] - if valueRef: - theValue = getText(valueRef.childNodes) - #print("theValue: ", theValue) - if cellType == 'n': - actCellSheet.set(ref, theValue) - if cellType == 's': - actCellSheet.set(ref, (sList[int(theValue)])) + else: + valueRef = cell.getElementsByTagName("v") + # print('valueRef: ', valueRef) + if len(valueRef) == 1: + valueRef = cell.getElementsByTagName("v")[0] + if valueRef: + theValue = getText(valueRef.childNodes) + # print("theValue: ", theValue) + if cellType == "n": + actCellSheet.set(ref, theValue) + if cellType == "s": + actCellSheet.set(ref, (sList[int(theValue)])) def handleWorkBook(theBook, sheetDict, Doc): - theSheets = theBook.getElementsByTagName("sheet") - #print("theSheets: ", theSheets) - for sheet in theSheets: - sheetAtts = sheet.attributes - nameRef = sheetAtts.getNamedItem("name") - sheetName = getText(nameRef.childNodes) - #print("table name: ", sheetName) - idRef = sheetAtts.getNamedItem("sheetId") - sheetFile = "sheet" + getText(idRef.childNodes) + '.xml' - #print("sheetFile: ", sheetFile) - # add FreeCAD-spreadsheet - sheetDict[sheetName] = (Doc.addObject('Spreadsheet::Sheet', sheetName), sheetFile) + theSheets = theBook.getElementsByTagName("sheet") + # print("theSheets: ", theSheets) + for sheet in theSheets: + sheetAtts = sheet.attributes + nameRef = sheetAtts.getNamedItem("name") + sheetName = getText(nameRef.childNodes) + # print("table name: ", sheetName) + idRef = sheetAtts.getNamedItem("sheetId") + sheetFile = "sheet" + getText(idRef.childNodes) + ".xml" + # print("sheetFile: ", sheetFile) + # add FreeCAD-spreadsheet + sheetDict[sheetName] = (Doc.addObject("Spreadsheet::Sheet", sheetName), sheetFile) - theAliases = theBook.getElementsByTagName("definedName") - for theAlias in theAliases: - aliAtts = theAlias.attributes - nameRef = aliAtts.getNamedItem("name") - aliasName = getText(nameRef.childNodes) - #print("aliasName: ", aliasName) + theAliases = theBook.getElementsByTagName("definedName") + for theAlias in theAliases: + aliAtts = theAlias.attributes + nameRef = aliAtts.getNamedItem("name") + aliasName = getText(nameRef.childNodes) + # print("aliasName: ", aliasName) + + aliasRef = getText(theAlias.childNodes) # aliasRef can be None + if aliasRef and "$" in aliasRef: + refList = aliasRef.split("!$") + adressList = refList[1].split("$") + # print("aliasRef: ", aliasRef) + # print('Sheet Name: ', refList[0]) + # print('Adress: ', adressList[0] + adressList[1]) + actSheet, sheetFile = sheetDict[refList[0]] + actSheet.setAlias(adressList[0] + adressList[1], aliasName) - aliasRef = getText(theAlias.childNodes) # aliasRef can be None - if aliasRef and '$' in aliasRef: - refList = aliasRef.split('!$') - adressList = refList[1].split('$') - #print("aliasRef: ", aliasRef) - #print('Sheet Name: ', refList[0]) - #print('Adress: ', adressList[0] + adressList[1]) - actSheet, sheetFile = sheetDict[refList[0]] - actSheet.setAlias(adressList[0]+adressList[1], aliasName) def handleStrings(theStr, sList): - print('process Strings: ') - stringElements = theStr.getElementsByTagName('t') - for sElem in stringElements: - print('string: ', getText(sElem.childNodes)) - sList.append(getText(sElem.childNodes)) + print("process Strings: ") + stringElements = theStr.getElementsByTagName("t") + for sElem in stringElements: + print("string: ", getText(sElem.childNodes)) + sList.append(getText(sElem.childNodes)) + def open(nameXLSX): - if len(nameXLSX) > 0: - z=zipfile.ZipFile(nameXLSX) + if len(nameXLSX) > 0: + z = zipfile.ZipFile(nameXLSX) - theDoc = App.newDocument() + theDoc = App.newDocument() + + sheetDict = dict() + stringList = [] + + theBookFile = z.open("xl/workbook.xml") + theBook = xml.dom.minidom.parse(theBookFile) + handleWorkBook(theBook, sheetDict, theDoc) + theBook.unlink() + + if "xl/sharedStrings.xml" in z.namelist(): + theStringFile = z.open("xl/sharedStrings.xml") + theStrings = xml.dom.minidom.parse(theStringFile) + handleStrings(theStrings, stringList) + theStrings.unlink() + + for sheetSpec in sheetDict: + # print("sheetSpec: ", sheetSpec) + theSheet, sheetFile = sheetDict[sheetSpec] + f = z.open("xl/worksheets/" + sheetFile) + myDom = xml.dom.minidom.parse(f) + + handleWorkSheet(myDom, theSheet, stringList) + myDom.unlink() + + z.close() + # This is needed more than once, otherwise some references are not calculated! + theDoc.recompute() + theDoc.recompute() + theDoc.recompute() + return theDoc + + +def insert(nameXLSX, docname): + try: + theDoc = App.getDocument(docname) + except NameError: + theDoc = App.newDocument(docname) + App.ActiveDocument = theDoc sheetDict = dict() stringList = [] - theBookFile=z.open('xl/workbook.xml') + z = zipfile.ZipFile(nameXLSX) + theBookFile = z.open("xl/workbook.xml") theBook = xml.dom.minidom.parse(theBookFile) handleWorkBook(theBook, sheetDict, theDoc) theBook.unlink() - if 'xl/sharedStrings.xml' in z.namelist(): - theStringFile=z.open('xl/sharedStrings.xml') - theStrings = xml.dom.minidom.parse(theStringFile) - handleStrings(theStrings, stringList) - theStrings.unlink() + if "xl/sharedStrings.xml" in z.namelist(): + theStringFile = z.open("xl/sharedStrings.xml") + theStrings = xml.dom.minidom.parse(theStringFile) + handleStrings(theStrings, stringList) + theStrings.unlink() for sheetSpec in sheetDict: - #print("sheetSpec: ", sheetSpec) - theSheet, sheetFile = sheetDict[sheetSpec] - f=z.open('xl/worksheets/' + sheetFile) - myDom = xml.dom.minidom.parse(f) + # print("sheetSpec: ", sheetSpec) + theSheet, sheetFile = sheetDict[sheetSpec] + f = z.open("xl/worksheets/" + sheetFile) + myDom = xml.dom.minidom.parse(f) - handleWorkSheet(myDom, theSheet, stringList) - myDom.unlink() + handleWorkSheet(myDom, theSheet, stringList) + myDom.unlink() z.close() # This is needed more than once, otherwise some references are not calculated! theDoc.recompute() theDoc.recompute() theDoc.recompute() - return theDoc - -def insert(nameXLSX,docname): - try: - theDoc=App.getDocument(docname) - except NameError: - theDoc=App.newDocument(docname) - App.ActiveDocument = theDoc - - sheetDict = dict() - stringList = [] - - z=zipfile.ZipFile(nameXLSX) - theBookFile=z.open('xl/workbook.xml') - theBook = xml.dom.minidom.parse(theBookFile) - handleWorkBook(theBook, sheetDict, theDoc) - theBook.unlink() - - if 'xl/sharedStrings.xml' in z.namelist(): - theStringFile=z.open('xl/sharedStrings.xml') - theStrings = xml.dom.minidom.parse(theStringFile) - handleStrings(theStrings, stringList) - theStrings.unlink() - - for sheetSpec in sheetDict: - #print("sheetSpec: ", sheetSpec) - theSheet, sheetFile = sheetDict[sheetSpec] - f=z.open('xl/worksheets/' + sheetFile) - myDom = xml.dom.minidom.parse(f) - - handleWorkSheet(myDom, theSheet, stringList) - myDom.unlink() - - z.close() - # This is needed more than once, otherwise some references are not calculated! - theDoc.recompute() - theDoc.recompute() - theDoc.recompute() - - diff --git a/src/Mod/Spreadsheet/spreadsheet.dox b/src/Mod/Spreadsheet/spreadsheet.dox index 75bd7cb3e7..740ef37b75 100644 --- a/src/Mod/Spreadsheet/spreadsheet.dox +++ b/src/Mod/Spreadsheet/spreadsheet.dox @@ -5,4 +5,3 @@ See \ref src/Mod/Draft/draft.dox as an example of how to populate this page */ - diff --git a/src/Mod/Start/App/AppStart.cpp b/src/Mod/Start/App/AppStart.cpp index c3933938cc..0e603173fc 100644 --- a/src/Mod/Start/App/AppStart.cpp +++ b/src/Mod/Start/App/AppStart.cpp @@ -27,13 +27,15 @@ #include -namespace Start { -class Module : public Py::ExtensionModule +namespace Start +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Start") + Module() + : Py::ExtensionModule("Start") { - initialize("This module is the Start module."); // register with Python + initialize("This module is the Start module."); // register with Python } private: @@ -44,7 +46,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Start +} // namespace Start /* Python entry */ PyMOD_INIT_FUNC(Start) diff --git a/src/Mod/Start/App/StartConfiguration.h b/src/Mod/Start/App/StartConfiguration.h index 1e238e4ff9..b03ebad9b0 100644 --- a/src/Mod/Start/App/StartConfiguration.h +++ b/src/Mod/Start/App/StartConfiguration.h @@ -28,14 +28,11 @@ // Exporting of App classes #ifdef FC_OS_WIN32 -# define START_SHOW_SKETCHER -# define START_USE_DRAFTING -#else // for Linux -# define START_USE_DRAFTING +#define START_SHOW_SKETCHER +#define START_USE_DRAFTING +#else // for Linux +#define START_USE_DRAFTING #endif - - #endif - diff --git a/src/Mod/Start/Gui/AppStartGui.cpp b/src/Mod/Start/Gui/AppStartGui.cpp index 72a89dfcfd..7015d8ab30 100644 --- a/src/Mod/Start/Gui/AppStartGui.cpp +++ b/src/Mod/Start/Gui/AppStartGui.cpp @@ -26,8 +26,8 @@ #include #include #include -#include #include +#include #include "DlgStartPreferencesImp.h" #include "Workbench.h" @@ -44,13 +44,15 @@ void loadStartResource() Gui::Translator::instance()->refresh(); } -namespace StartGui { -class Module : public Py::ExtensionModule +namespace StartGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("StartGui") + Module() + : Py::ExtensionModule("StartGui") { - initialize("This module is the StartGui module."); // register with Python + initialize("This module is the StartGui module."); // register with Python } private: @@ -61,7 +63,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace StartGui +} // namespace StartGui /* Python entry */ @@ -76,7 +78,7 @@ PyMOD_INIT_FUNC(StartGui) try { Base::Interpreter().runString("import WebGui"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } @@ -97,14 +99,17 @@ PyMOD_INIT_FUNC(StartGui) PyObject* mod = StartGui::initModule(); Base::Console().Log("Loading GUI of Start module... done\n"); + // clang-format off // register preferences pages new Gui::PrefPageProducer (QT_TRANSLATE_NOOP("QObject", "Start")); + new Gui::PrefPageProducer (QT_TRANSLATE_NOOP("QObject", "Start")); + // clang-format on // instantiating the commands CreateStartCommands(); StartGui::Workbench::init(); - // add resources and reloads the translators + // add resources and reloads the translators loadStartResource(); PyMOD_Return(mod); } diff --git a/src/Mod/Start/Gui/CMakeLists.txt b/src/Mod/Start/Gui/CMakeLists.txt index fc1c86391b..7140934b15 100644 --- a/src/Mod/Start/Gui/CMakeLists.txt +++ b/src/Mod/Start/Gui/CMakeLists.txt @@ -14,6 +14,7 @@ set(StartGui_LIBS set(StartGui_UIC_SRCS DlgStartPreferences.ui + DlgStartPreferencesAdvanced.ui ) set (Start_TR_QRC ${CMAKE_CURRENT_BINARY_DIR}/Resources/Start_translation.qrc) @@ -26,6 +27,7 @@ SET(StartGui_SRCS ${Start_QRC_SRCS} ${StartGui_UIC_SRCS} DlgStartPreferences.ui + DlgStartPreferencesAdvanced.ui DlgStartPreferencesImp.cpp DlgStartPreferencesImp.h AppStartGui.cpp diff --git a/src/Mod/Start/Gui/Command.cpp b/src/Mod/Start/Gui/Command.cpp index 72ba20b8af..aa944e1dff 100644 --- a/src/Mod/Start/Gui/Command.cpp +++ b/src/Mod/Start/Gui/Command.cpp @@ -33,15 +33,15 @@ using namespace std; DEF_STD_CMD(CmdStartPage) CmdStartPage::CmdStartPage() - :Command("Start_StartPage") + : Command("Start_StartPage") { - sAppModule = "Start"; - sGroup = QT_TR_NOOP("Start"); - sMenuText = QT_TR_NOOP("Start Page"); - sToolTipText = QT_TR_NOOP("Displays the start page in a browser view"); - sWhatsThis = "Start_StartPage"; - sStatusTip = sToolTipText; - sPixmap = "StartWorkbench"; + sAppModule = "Start"; + sGroup = QT_TR_NOOP("Start"); + sMenuText = QT_TR_NOOP("Start Page"); + sToolTipText = QT_TR_NOOP("Displays the start page in a browser view"); + sWhatsThis = "Start_StartPage"; + sStatusTip = sToolTipText; + sPixmap = "StartWorkbench"; } void CmdStartPage::activated(int iMsg) @@ -53,7 +53,7 @@ void CmdStartPage::activated(int iMsg) void CreateStartCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdStartPage()); - } +} diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui index a88215a6db..8b15978a4b 100644 --- a/src/Mod/Start/Gui/DlgStartPreferences.ui +++ b/src/Mod/Start/Gui/DlgStartPreferences.ui @@ -11,22 +11,75 @@ - Start page options + General - + - Start page template + Options - - - + + + + + Switch workbench after loading + + + + + - An optional HTML template that will be used instead of the default start page. + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + + + + Close start page after loading + + + + + + + If checked, will automatically close the Start page when FreeCAD launches + + + Qt::RightToLeft + + + - Template + closeStart + + + Mod/Start + + + + + + + Close and switch on opening file + + + + + + + If application is started by opening a file, apply the two settings above + + + Qt::RightToLeft + + + + + + DoNotShowOnOpen Mod/Start @@ -42,202 +95,6 @@ Contents - - - - Show tips - - - - - - - Show additional folder - - - - - - - If you want the examples to show on the first page - - - Qt::RightToLeft - - - - - - true - - - ShowExamples - - - Mod/Start - - - - - - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - - - Qt::RightToLeft - - - - - - ShowForum - - - Mod/Start - - - - - - - Qt::RightToLeft - - - - - - true - - - ShowFileThumbnailIcons - - - Mod/Start - - - - - - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - Qt::RightToLeft - - - - - - ShowNotes - - - Mod/Start - - - - - - - Show scrollbars - - - - - - - Show notepad - - - - - - - Show forum - - - - - - - An optional custom folder to be displayed at the bottom of the first page. -By using ";;" to separate paths, you can add several folders here - - - ShowCustomFolder - - - Mod/Start - - - - - - - Qt::RightToLeft - - - - - - true - - - ShowScrollBars - - - Mod/Start - - - - - - - Show file thumbnails - - - - - - - Show examples folder contents - - - - - - - Displays help tips in the Start workbench Documents tab - - - Qt::RightToLeft - - - - - - true - - - ShowTips - - - Mod/Start - - - - - - - - 0 - 0 - - - - File thumbnail size - - - @@ -268,7 +125,7 @@ By using ";;" to separate paths, you can add several folders hereQt::LeftToRight - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter px @@ -292,6 +149,176 @@ By using ";;" to separate paths, you can add several folders here + + + + Qt::RightToLeft + + + + + + true + + + ShowFileThumbnailIcons + + + Mod/Start + + + + + + + If you want the examples to show on the first page + + + Qt::RightToLeft + + + + + + true + + + ShowExamples + + + Mod/Start + + + + + + + Displays help tips in the Start workbench Documents tab + + + Qt::RightToLeft + + + + + + true + + + ShowTips + + + Mod/Start + + + + + + + Show tips + + + + + + + Show forum + + + + + + + Show notepad + + + + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + + + Qt::RightToLeft + + + + + + ShowForum + + + Mod/Start + + + + + + + + 0 + 0 + + + + File thumbnail size + + + + + + + Show examples folder contents + + + + + + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + + + Qt::RightToLeft + + + + + + ShowNotes + + + Mod/Start + + + + + + + Show file thumbnails + + + + + + + An optional custom folder to be displayed at the bottom of the first page. +By using ";;" to separate paths, you can add several folders here + + + ShowCustomFolder + + + Mod/Start + + + + + + + Show additional folder + + + @@ -301,232 +328,8 @@ By using ";;" to separate paths, you can add several folders hereFonts and colors - - - - Use FreeCAD style sheet - - - - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - Qt::RightToLeft - - - - - - UseStyleSheet - - - Mod/Start - - - - - - - Background color - - - - - - - - 60 - 60 - - - - The background color behind the panels - - - - 79 - 88 - 116 - - - - BackgroundColor1 - - - Mod/Start - - - - - - - false - - - Background color down gradient - - - - - - - false - - - - 60 - 60 - - - - The down gradient for the background color (currently unsupported) - - - - 127 - 158 - 181 - - - - BackgroundColor2 - - - Mod/Start - - - - - - - Background image - - - - - - - An optional image to display as background - - - BackgroundImage - - - Mod/Start - - - - - - - Background text color - - - - - - - - 60 - 60 - - - - The color of the version text - - - - 95 - 95 - 95 - - - - BackgroundTextColor - - - Mod/Start - - - - - - - Page background color - - - - - - - - 60 - 60 - - - - The background of the main start page area - - - - 255 - 255 - 255 - - - - PageColor - - - Mod/Start - - - - - - - Page text color - - - - - - - - 60 - 60 - - - - The color of the text on the main pages - - - - 0 - 0 - 0 - - - - PageTextColor - - - Mod/Start - - - - - - - Box background color - - - - - + + 60 @@ -551,15 +354,22 @@ By using ";;" to separate paths, you can add several folders here - - + + - Link color + Page text color - - + + + + Page background color + + + + + 60 @@ -567,83 +377,24 @@ By using ";;" to separate paths, you can add several folders here - The color of the links + The background of the main start page area - 0 - 0 + 255 + 255 255 - LinkColor + PageColor Mod/Start - - - - Font family - - - - - - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - - - - - - Arial,Helvetica,sans - - - FontFamily - - - Mod/Start - - - - - - - The base font size to use for all texts of the Start page - - - px - - - 13 - - - FontSize - - - Mod/Start - - - - - - - - - false - - - Open links - - - - + @@ -682,66 +433,195 @@ By using ";;" to separate paths, you can add several folders here - - - - - - - Options - - - - + + - Switch workbench after loading + Font family - - + + + + false + + + Open links + + + + + + + + 60 + 60 + + - Choose which workbench to switch to after the program launches + The background color behind the panels - - - - - - Close start page after loading - - - - - - - If checked, will automatically close the Start page when FreeCAD launches - - - Qt::RightToLeft - - - + + + 79 + 88 + 116 + - closeStart + BackgroundColor1 Mod/Start + + + + Use FreeCAD style sheet + + + + + + + false + + + Background color down gradient + + + + + + + false + + + + 60 + 60 + + + + The down gradient for the background color (currently unsupported) + + + + 127 + 158 + 181 + + + + BackgroundColor2 + + + Mod/Start + + + + + + + Box background color + + + - + - Close and switch on opening file + Background color - - + + + + Background text color + + + + + + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + + + + + + Arial,Helvetica,sans + + + FontFamily + + + Mod/Start + + + + + + + The base font size to use for all texts of the Start page + + + px + + + 13 + + + FontSize + + + Mod/Start + + + + + + + + + + 60 + 60 + + - If application is started by opening a file, apply the two settings above + The color of the links + + + + 0 + 0 + 255 + + + + LinkColor + + + Mod/Start + + + + + + + Link color + + + + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below Qt::RightToLeft @@ -750,13 +630,85 @@ By using ";;" to separate paths, you can add several folders here - DoNotShowOnOpen + UseStyleSheet Mod/Start + + + + + 60 + 60 + + + + The color of the version text + + + + 95 + 95 + 95 + + + + BackgroundTextColor + + + Mod/Start + + + + + + + + 60 + 60 + + + + The color of the text on the main pages + + + + 0 + 0 + 0 + + + + PageTextColor + + + Mod/Start + + + + + + + An optional image to display as background + + + BackgroundImage + + + Mod/Start + + + + + + + Background image + + + diff --git a/src/Mod/Start/Gui/DlgStartPreferencesAdvanced.ui b/src/Mod/Start/Gui/DlgStartPreferencesAdvanced.ui new file mode 100644 index 0000000000..d97177501e --- /dev/null +++ b/src/Mod/Start/Gui/DlgStartPreferencesAdvanced.ui @@ -0,0 +1,90 @@ + + + DlgStartPreferencesAdvanced + + + + 0 + 0 + 548 + 896 + + + + Advanced + + + + + + Custom HTML Template + + + + + + An optional HTML template that will be used instead of the default start page. + + + Template + + + Mod/Start + + + + + + + + + + Custom CSS + + + + + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + + + true + + + true + + + + + + + false + + + CustomCSS + + + Mod/Start + + + + + + + + + + + Gui::PrefFileChooser + QWidget +
Gui/PrefWidgets.h
+
+ + Gui::PrefTextEdit + QWidget +
Gui/PrefWidgets.h
+
+
+ + +
diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp index eab8120c2b..4a625ecf91 100644 --- a/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp +++ b/src/Mod/Start/Gui/DlgStartPreferencesImp.cpp @@ -26,6 +26,7 @@ #include "DlgStartPreferencesImp.h" #include "ui_DlgStartPreferences.h" +#include "ui_DlgStartPreferencesAdvanced.h" using namespace StartGui; @@ -33,9 +34,9 @@ using namespace StartGui; /** * Constructs a DlgStartPreferencesImp which is a child of 'parent' */ -DlgStartPreferencesImp::DlgStartPreferencesImp( QWidget* parent ) - : PreferencePage( parent ) - , ui(new Ui_DlgStartPreferences) +DlgStartPreferencesImp::DlgStartPreferencesImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgStartPreferences) { ui->setupUi(this); @@ -55,26 +56,26 @@ DlgStartPreferencesImp::DlgStartPreferencesImp( QWidget* parent ) menuText[text] = it; } - { // add special workbench to selection - QPixmap px = Gui::Application::Instance->workbenchIcon(QString::fromLatin1("NoneWorkbench")); - QString key = QString::fromLatin1(""); - QString value = QString::fromLatin1("$LastModule"); - if (px.isNull()) { - ui->AutoloadModuleCombo->addItem(key, QVariant(value)); - } - else { - ui->AutoloadModuleCombo->addItem(px, key, QVariant(value)); - } + // add special workbench to selection + QPixmap px = Gui::Application::Instance->workbenchIcon(QString::fromLatin1("NoneWorkbench")); + QString key = QString::fromLatin1(""); + QString value = QString::fromLatin1("$LastModule"); + if (px.isNull()) { + ui->AutoloadModuleCombo->addItem(key, QVariant(value)); + } + else { + ui->AutoloadModuleCombo->addItem(px, key, QVariant(value)); } for (QMap::Iterator it = menuText.begin(); it != menuText.end(); ++it) { QPixmap px = Gui::Application::Instance->workbenchIcon(it.value()); - if (px.isNull()) + if (px.isNull()) { ui->AutoloadModuleCombo->addItem(it.key(), QVariant(it.value())); - else + } + else { ui->AutoloadModuleCombo->addItem(px, it.key(), QVariant(it.value())); + } } - } /** @@ -87,30 +88,29 @@ void DlgStartPreferencesImp::saveSettings() int index = ui->AutoloadModuleCombo->currentIndex(); QVariant data = ui->AutoloadModuleCombo->itemData(index); QString startWbName = data.toString(); - App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")-> - SetASCII("AutoloadModule", startWbName.toLatin1()); - ui->colorButton_1->onSave(); - ui->colorButton_2->onSave(); - ui->colorButton_3->onSave(); - ui->colorButton_4->onSave(); - ui->colorButton_5->onSave(); - ui->colorButton_6->onSave(); + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start") + ->SetASCII("AutoloadModule", startWbName.toLatin1()); + ui->backgroundColorButton->onSave(); + ui->backgroundTextColorButton->onSave(); + ui->pageBackgroundColorButton->onSave(); + ui->pageTextColorButton->onSave(); + ui->boxBackgroundColorButton->onSave(); + ui->linkColorButton->onSave(); ui->colorButton_7->onSave(); - ui->fileChooser_1->onSave(); - ui->fileChooser_2->onSave(); - ui->fileChooser_3->onSave(); + ui->backgroundImageFileChooser->onSave(); + ui->showAdditionalFolderFileChooser->onSave(); ui->radioButton_1->onSave(); ui->radioButton_2->onSave(); - ui->checkBox->onSave(); - ui->checkBox_1->onSave(); - ui->checkBox_2->onSave(); - ui->checkBox_3->onSave(); - ui->checkBox_4->onSave(); - ui->checkBox_5->onSave(); - ui->checkBox_6->onSave(); - ui->checkBox_7->onSave(); - ui->lineEdit->onSave(); - ui->spinBox->onSave(); + ui->showNotepadCheckBox->onSave(); + ui->showExamplesCheckBox->onSave(); + ui->closeStartCheckBox->onSave(); + ui->closeAndSwitchCheckBox->onSave(); + ui->showForumCheckBox->onSave(); + ui->useStyleSheetCheckBox->onSave(); + ui->showTipsCheckBox->onSave(); + ui->fontLineEdit->onSave(); + ui->fontSizeSpinBox->onSave(); ui->showFileThumbnailIconsCheckBox->onSave(); ui->fileThumbnailIconSizeSpinBox->onSave(); } @@ -118,32 +118,31 @@ void DlgStartPreferencesImp::saveSettings() void DlgStartPreferencesImp::loadSettings() { std::string start = App::Application::Config()["StartWorkbench"]; - start = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start")-> - GetASCII("AutoloadModule", start.c_str()); + start = App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Start") + ->GetASCII("AutoloadModule", start.c_str()); QString startWbName = QLatin1String(start.c_str()); ui->AutoloadModuleCombo->setCurrentIndex(ui->AutoloadModuleCombo->findData(startWbName)); - ui->colorButton_1->onRestore(); - ui->colorButton_2->onRestore(); - ui->colorButton_3->onRestore(); - ui->colorButton_4->onRestore(); - ui->colorButton_5->onRestore(); - ui->colorButton_6->onRestore(); + ui->backgroundColorButton->onRestore(); + ui->backgroundTextColorButton->onRestore(); + ui->pageBackgroundColorButton->onRestore(); + ui->pageTextColorButton->onRestore(); + ui->boxBackgroundColorButton->onRestore(); + ui->linkColorButton->onRestore(); ui->colorButton_7->onRestore(); - ui->fileChooser_1->onRestore(); - ui->fileChooser_2->onRestore(); - ui->fileChooser_3->onRestore(); + ui->backgroundImageFileChooser->onRestore(); + ui->showAdditionalFolderFileChooser->onRestore(); ui->radioButton_1->onRestore(); ui->radioButton_2->onRestore(); - ui->checkBox->onRestore(); - ui->checkBox_1->onRestore(); - ui->checkBox_2->onRestore(); - ui->checkBox_3->onRestore(); - ui->checkBox_4->onRestore(); - ui->checkBox_5->onRestore(); - ui->checkBox_6->onRestore(); - ui->checkBox_7->onRestore(); - ui->lineEdit->onRestore(); - ui->spinBox->onRestore(); + ui->showNotepadCheckBox->onRestore(); + ui->showExamplesCheckBox->onRestore(); + ui->closeStartCheckBox->onRestore(); + ui->closeAndSwitchCheckBox->onRestore(); + ui->showForumCheckBox->onRestore(); + ui->useStyleSheetCheckBox->onRestore(); + ui->showTipsCheckBox->onRestore(); + ui->fontLineEdit->onRestore(); + ui->fontSizeSpinBox->onRestore(); ui->showFileThumbnailIconsCheckBox->onRestore(); ui->fileThumbnailIconSizeSpinBox->onRestore(); } @@ -151,7 +150,48 @@ void DlgStartPreferencesImp::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgStartPreferencesImp::changeEvent(QEvent *ev) +void DlgStartPreferencesImp::changeEvent(QEvent* ev) +{ + if (ev->type() == QEvent::LanguageChange) { + ui->retranslateUi(this); + } + else { + Gui::Dialog::PreferencePage::changeEvent(ev); + } +} + + +/** + * Constructs a DlgStartPreferencesAdvancedImp which is a child of 'parent' + */ +DlgStartPreferencesAdvancedImp::DlgStartPreferencesAdvancedImp(QWidget* parent) + : PreferencePage(parent) + , ui(new Ui_DlgStartPreferencesAdvanced) +{ + ui->setupUi(this); +} + +/** + * Destroys the object and frees any allocated resources + */ +DlgStartPreferencesAdvancedImp::~DlgStartPreferencesAdvancedImp() = default; + +void DlgStartPreferencesAdvancedImp::saveSettings() +{ + ui->templateFileChooser->onSave(); + ui->customCSSTextEdit->onSave(); +} + +void DlgStartPreferencesAdvancedImp::loadSettings() +{ + ui->templateFileChooser->onRestore(); + ui->customCSSTextEdit->onRestore(); +} + +/** + * Sets the strings of the subwidgets using the current language. + */ +void DlgStartPreferencesAdvancedImp::changeEvent(QEvent* ev) { if (ev->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Start/Gui/DlgStartPreferencesImp.h b/src/Mod/Start/Gui/DlgStartPreferencesImp.h index 391e5c3bd9..49cee1122f 100644 --- a/src/Mod/Start/Gui/DlgStartPreferencesImp.h +++ b/src/Mod/Start/Gui/DlgStartPreferencesImp.h @@ -23,29 +23,48 @@ #ifndef STARTGUI_DLGSTARTPREFERENCESIMP_H #define STARTGUI_DLGSTARTPREFERENCESIMP_H -#include #include +#include class Ui_DlgStartPreferences; -namespace StartGui { - class DlgStartPreferencesImp : public Gui::Dialog::PreferencePage - { - Q_OBJECT +class Ui_DlgStartPreferencesAdvanced; +namespace StartGui +{ +class DlgStartPreferencesImp: public Gui::Dialog::PreferencePage +{ + Q_OBJECT - public: - explicit DlgStartPreferencesImp( QWidget* parent = nullptr ); - ~DlgStartPreferencesImp() override; +public: + explicit DlgStartPreferencesImp(QWidget* parent = nullptr); + ~DlgStartPreferencesImp() override; - protected: - void saveSettings() override; - void loadSettings() override; - void changeEvent(QEvent *e) override; +protected: + void saveSettings() override; + void loadSettings() override; + void changeEvent(QEvent* e) override; - private: - std::unique_ptr ui; - }; +private: + std::unique_ptr ui; +}; -} // namespace StartGui +class DlgStartPreferencesAdvancedImp: public Gui::Dialog::PreferencePage +{ + Q_OBJECT -#endif // STARTGUI_DLGSTARTPREFERENCESIMP_H +public: + explicit DlgStartPreferencesAdvancedImp(QWidget* parent = nullptr); + ~DlgStartPreferencesAdvancedImp() override; + +protected: + void saveSettings() override; + void loadSettings() override; + void changeEvent(QEvent* e) override; + +private: + std::unique_ptr ui; +}; + +} // namespace StartGui + +#endif // STARTGUI_DLGSTARTPREFERENCESIMP_H diff --git a/src/Mod/Start/Gui/PreCompiled.h b/src/Mod/Start/Gui/PreCompiled.h index d954ee6301..7480c06a48 100644 --- a/src/Mod/Start/Gui/PreCompiled.h +++ b/src/Mod/Start/Gui/PreCompiled.h @@ -30,6 +30,6 @@ // Qt Toolkit #include -#endif //_PreComp_ +#endif //_PreComp_ -#endif // STARTGUI_PRECOMPILED_H +#endif // STARTGUI_PRECOMPILED_H diff --git a/src/Mod/Start/Gui/Resources/translations/Start.ts b/src/Mod/Start/Gui/Resources/translations/Start.ts deleted file mode 100644 index 8f70fba2ad..0000000000 --- a/src/Mod/Start/Gui/Resources/translations/Start.ts +++ /dev/null @@ -1,587 +0,0 @@ - - - - - CmdStartPage - - - Start - - - - - Start Page - - - - - Displays the start page in a browser view - - - - - DlgStartPreferences - - - Start page options - - - - - Start page template - - - - - An optional HTML template that will be used instead of the default start page. - - - - - Contents - - - - - Show notepad - - - - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - - - Show examples folder contents - - - - - If you want the examples to show on the first page - - - - - Show additional folder - - - - - An optional custom folder to be displayed at the bottom of the first page. -By using ";;" to separate paths, you can add several folders here - - - - - Show forum - - - - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - - - - - Show tips - - - - - Displays help tips in the Start workbench Documents tab - - - - - Show scrollbars - - - - - Show file thumbnails - - - - - File thumbnail size - - - - - The size of file thumbnail icons in recent files and examples sections - - - - - Fonts and colors - - - - - Use FreeCAD style sheet - - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - - Background color - - - - - The background color behind the panels - - - - - Background color down gradient - - - - - The down gradient for the background color (currently unsupported) - - - - - Background image - - - - - An optional image to display as background - - - - - Background text color - - - - - The color of the version text - - - - - Page background color - - - - - The background of the main start page area - - - - - Page text color - - - - - The color of the text on the main pages - - - - - Box background color - - - - - The background color of the boxes inside the pages - - - - - Link color - - - - - The color of the links - - - - - Font family - - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - - - - - Arial,Helvetica,sans - - - - - The base font size to use for all texts of the Start page - - - - - - px - - - - - Open links - - - - - in FreeCAD - - - - - In external browser - - - - - Options - - - - - Switch workbench after loading - - - - - Choose which workbench to switch to after the program launches - - - - - Close start page after loading - - - - - If checked, will automatically close the Start page when FreeCAD launches - - - - - Close and switch on opening file - - - - - If application is started by opening a file, apply the two settings above - - - - - Workbench - - - - Start page - - - - - StartPage - - - Start - - - - - Welcome to FreeCAD - - - - - Documents - - - - - Help - - - - - Activity - - - - - Blog - - - - - Link to the FreeCAD blog - - - - - New file - - - - - Empty File - - - - - Create an empty FreeCAD file - - - - - Import File - - - - - Work on an existing CAD file or 3D model - - - - - Standard Part - - - - - Create a part with the Part Design workbench - - - - - 2D Draft - - - - - Create a 2D draft with the Draft workbench - - - - - BIM/Architecture - - - - - Create an architecture project - - - - - Recent files - - - - - Tip - - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - - - - - Examples - - - - - General documentation - - - - - User hub - - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - - - - - Power users hub - - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - - - - - Developers hub - - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - - - - - Manual - - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - - - - - Workbenches documentation - - - - - These are the help pages of all the workbenches currently installed on this computer. - - - - - Getting help from the community - - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - - Available addons - - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - - - - - Recent commits - - - - - See all commits on github - - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - - - - - version - - - - - build - - - - - Create new... - - - - - Unknown - - - - - Forum - - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - - - - - Creation date - - - - - Last modification - - - - - Notes - - - - - Open start page preferences - - - - - QObject - - - Start - - - - diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage.ts b/src/Mod/Start/Gui/Resources/translations/StartPage.ts index 70542e53ec..5e4e4dd6d9 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage.ts @@ -4,212 +4,282 @@ StartPage - + Start - + + Welcome to FreeCAD + + + + Documents - + Help - + Activity - + + Blog + + + + + Link to the FreeCAD blog + + + + + New file + + + + + Empty File + + + + + Create an empty FreeCAD file + + + + + Open File + + + + + Open an existing CAD file or 3D model + + + + + Standard Part + + + + + Create a part with the Part Design workbench + + + + + 2D Draft + + + + + Create a 2D draft with the Draft workbench + + + + + BIM/Architecture + + + + + Create an architecture project + + + + Recent files - + Tip - + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - + Examples - + General documentation - + User hub - + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - + Power users hub - + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - + Developers hub - + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - + Manual - + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - + Workbenches documentation - + These are the help pages of all the workbenches currently installed on this computer. - + Getting help from the community - - The <a href="http://forum.freecadweb.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecadweb.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecadweb.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - FreeCAD also maintains a public <a href="https://www.freecadweb.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecadweb.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons - + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - + Recent commits - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecadweb.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - + See all commits on github - + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - + version - + build - + Create new... - + Unknown - + Forum - - The latest posts on the <a href="https://forum.freecadweb.org">FreeCAD forum</a>: - - - - + To open any of the links above in your desktop browser, Right-click -> Open in external browser - + Creation date - + Last modification - + Notes - + Open start page preferences @@ -217,7 +287,8 @@ Workbench - + + Start page @@ -225,17 +296,17 @@ CmdStartPage - + Start - + Start Page - + Displays the start page in a browser view @@ -243,255 +314,288 @@ DlgStartPreferences - - Start page options - - - - - Start page template - - - - - An optional HTML template that will be used instead of the default start page. - - - - + Contents - + Show forum - + Show examples folder contents - + Show additional folder - + If you want the examples to show on the first page - + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - + Show notepad - + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips - + + General + + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + + The size of file thumbnail icons in recent files and examples sections + + + + Displays help tips in the Start workbench Documents tab - + + File thumbnail size + + + + + Show file thumbnails + + + + Fonts and colors - + The background of the main start page area - + Background color - + in FreeCAD - + In external browser - + Background color down gradient - + The color of the version text - + Link color - + An optional image to display as background - + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - + Page background color - + The color of the text on the main pages - + Background image - + Page text color - + The color of the links - + The background color of the boxes inside the pages - + Box background color - + The background color behind the panels - + The down gradient for the background color (currently unsupported) - + Open links - + Background text color - + Use FreeCAD style sheet - + Font family - + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - + Arial,Helvetica,sans - + The base font size to use for all texts of the Start page - + + px - - Use gradient for New File icon - - - - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - - - - + Options - - Choose which workbench to switch to after the program launches - - - - + If checked, will automatically close the Start page when FreeCAD launches - + Switch workbench after loading - + Close start page after loading - + Close and switch on opening file - + If application is started by opening a file, apply the two settings above + + DlgStartPreferencesAdvanced + + + Advanced + + + + + Custom HTML Template + + + + + An optional HTML template that will be used instead of the default start page. + + + + + Custom CSS + + + + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + + + + + QObject + + + + Start + + + diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts index e19c6e408f..c5515d2382 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts @@ -96,7 +96,7 @@ By using ";;" to separate paths, you can add several folders here Show scrollbars - Show scrollbars + Εμφάνιση γραμμών κύλισης @@ -313,7 +313,7 @@ By using ";;" to separate paths, you can add several folders here Recent files - Recent files + Πρόσφατα αρχεία @@ -393,27 +393,27 @@ By using ";;" to separate paths, you can add several folders here The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + Το φόρουμ <a href="http://forum.freecad.org">FreeCAD</a> είναι ένα εξαιρετικό μέρος για να λάβετε βοήθεια από άλλους χρήστες και προγραμματιστές του FreeCAD. Το φόρουμ έχει πολλές ενότητες για διαφορετικούς τύπους θεμάτων και θεμάτων συζήτησης. Αν έχετε αμφιβολίες, δημοσιεύστε τη βοήθεια <a href="https://forum.freecad.org/viewforum.php?f=3">στην ενότητα FreeCAD</a>. If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Αν είναι η πρώτη φορά που δημοσιεύετε στο φόρουμ, να είστε βέβαιος να <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">διαβάσετε τις κατευθυντήριες γραμμές</a> πρώτα! FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + Το FreeCAD διατηρεί επίσης ένα δημόσιο <a href="https://www.freecad.org/tracker">bug tracker</a> όπου ο καθένας μπορεί να υποβάλει σφάλματα και να προτείνει νέα χαρακτηριστικά. Για να αποφύγετε την πρόκληση επιπλέον εργασίας και να δώσετε τις καλύτερες πιθανότητες να δείτε το σφάλμα σας να λυθεί, Σιγουρευτείτε ότι διαβάσατε τον οδηγό υποβολής σφαλμάτων <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"></a> πριν δημοσιεύσετε. Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Παρακάτω είναι οι τελευταίες αλλαγές που προστίθενται στον πηγαίο κώδικα <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD</a>. Αυτές οι αλλαγές ενδέχεται να μην αντικατοπτρίζουν ακόμα την έκδοση του FreeCAD που εκτελείτε αυτή τη στιγμή. Ελέγξτε τις <a href="https://www.freecad.org/wiki/Downloads">διαθέσιμες επιλογές</a> αν θέλετε να αποκτήσετε μια έκδοση για ανάπτυξη. The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Οι τελευταίες δημοσιεύσεις στο φόρουμ <a href="https://forum.freecad.org">FreeCAD</a>: diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts index 376a9ca27a..3232e22935 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts @@ -70,8 +70,8 @@ An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - An optional custom folder to be displayed at the bottom of the first page. -By using ";;" to separate paths, you can add several folders here + Lehen orriaren beheko aldean bistaratuko den karpeta pertsonalizatua, aukerakoa. +Bide-izenak bereizteko ";;" erabiliz, karpeta bat baino gehiago gehitu daiteke hemen diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts index 86a2b0f31d..aaa61bdeb6 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts @@ -313,7 +313,7 @@ By using ";;" to separate paths, you can add several folders here Recent files - Recent files + 最近使用したファイル diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts index 0144817b8a..febf81245b 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts @@ -96,7 +96,7 @@ By using ";;" to separate paths, you can add several folders here Show scrollbars - Show scrollbars + 스크롤바 보이게 함 @@ -313,7 +313,7 @@ By using ";;" to separate paths, you can add several folders here Recent files - Recent files + 최근 파일들 @@ -393,12 +393,12 @@ By using ";;" to separate paths, you can add several folders here The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org"> FreeCAD 포럼 </a>은 다른 FreeCAD 사용자 및 개발자의 도움을 받을 수 있는 좋은 곳입니다. 이 포럼에는 다양한 유형의 쟁점과 토론 주제에 대한 섹션이 많이 있습니다. 질문이 있는 경우 <a href="https://forum.freecad.org/viewforum.php?f=3"> FreeCAD 사용에 대한 도움말 </a> 섹션에 게시하십시오. If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + 포럼에 게시물을 올리는 것이 처음 이라면, 그 전에 우선 <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264"> 지침을 읽으십시오</a>. diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts index 043c5ce254..c37e2df2ac 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts @@ -323,7 +323,7 @@ Używając ";;" do rozdzielenia ścieżek, możesz dodać tutaj kilka folderów< Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Dostosuj liczbę wyświetlanych nazw plików w menu Edycja -> Preferencje -> Ogólne -> Rozmiar listy ostatnio otwartych plików + Dostosuj liczbę wyświetlanych nazw plików w menu Edycja → Preferencje → Ogólne → Rozmiar listy ostatnio otwartych plików diff --git a/src/Mod/Start/Gui/Workbench.cpp b/src/Mod/Start/Gui/Workbench.cpp index 6b42e1ac09..667e6bde7f 100644 --- a/src/Mod/Start/Gui/Workbench.cpp +++ b/src/Mod/Start/Gui/Workbench.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -31,8 +31,8 @@ #include #include #include -#include #include +#include #include #include "Workbench.h" @@ -81,23 +81,28 @@ void StartGui::Workbench::loadStartPage() << " def __init__(self):\n" << " self.browser=WebGui.openBrowserWindow(u\"" << escapedstr.c_str() << "\")\n" #if defined(FC_OS_WIN32) - << " self.browser.setHtml(StartPage.handle(), App.getResourceDir() + 'Mod/Start/StartPage/')\n" + << " self.browser.setHtml(StartPage.handle(), App.getResourceDir() + " + "'Mod/Start/StartPage/')\n" #else - << " self.browser.setHtml(StartPage.handle(), 'file://' + App.getResourceDir() + 'Mod/Start/StartPage/')\n" + << " self.browser.setHtml(StartPage.handle(), 'file://' + App.getResourceDir() " + "+ 'Mod/Start/StartPage/')\n" #endif << " def onChange(self, par, reason):\n" << " try:\n" << " if reason == 'RecentFiles':\n" #if defined(FC_OS_WIN32) - << " self.browser.setHtml(StartPage.handle(), App.getResourceDir() + 'Mod/Start/StartPage/')\n\n" + << " self.browser.setHtml(StartPage.handle(), App.getResourceDir() + " + "'Mod/Start/StartPage/')\n\n" #else - << " self.browser.setHtml(StartPage.handle(), 'file://' + App.getResourceDir() + 'Mod/Start/StartPage/')\n\n" + << " self.browser.setHtml(StartPage.handle(), 'file://' + " + "App.getResourceDir() + 'Mod/Start/StartPage/')\n\n" #endif << " except RuntimeError as e:\n" << " pass\n" << "class WebView(object):\n" << " def __init__(self):\n" - << " self.pargrp = FreeCAD.ParamGet('User parameter:BaseApp/Preferences/RecentFiles')\n" + << " self.pargrp = FreeCAD.ParamGet('User " + "parameter:BaseApp/Preferences/RecentFiles')\n" << " self.webPage = WebPage()\n" << " self.pargrp.Attach(self.webPage)\n" << " def __del__(self):\n" @@ -143,7 +148,6 @@ Gui::ToolBarItem* StartGui::Workbench::setupToolBars() const << "Web_BrowserZoomOut"; return root; - } Gui::ToolBarItem* StartGui::Workbench::setupCommandBars() const @@ -155,7 +159,7 @@ Gui::ToolBarItem* StartGui::Workbench::setupCommandBars() const Gui::DockWindowItems* StartGui::Workbench::setupDockWindows() const { Gui::DockWindowItems* root = Gui::StdWorkbench::setupDockWindows(); - root->setVisibility(false); // hide all dock windows by default - root->setVisibility("Std_ComboView",true); // except of the combo view + root->setVisibility(false); // hide all dock windows by default + root->setVisibility("Std_ComboView", true); // except of the combo view return root; } diff --git a/src/Mod/Start/Gui/Workbench.h b/src/Mod/Start/Gui/Workbench.h index 8b545f3a9d..3ad6553568 100644 --- a/src/Mod/Start/Gui/Workbench.h +++ b/src/Mod/Start/Gui/Workbench.h @@ -26,12 +26,13 @@ #include -namespace StartGui { +namespace StartGui +{ /** * @author Werner Mayer */ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -40,7 +41,7 @@ public: ~Workbench() override; /** Defines the standard context menu. */ - void setupContextMenu(const char* recipient,Gui::MenuItem*) const override; + void setupContextMenu(const char* recipient, Gui::MenuItem*) const override; /** Run some actions when the workbench gets activated. */ void activated() override; @@ -56,7 +57,7 @@ protected: /** Returns a DockWindowItems structure of dock windows this workbench. */ Gui::DockWindowItems* setupDockWindows() const override; -}; // namespace StartGui +}; // namespace StartGui -} -#endif // START_WORKBENCH_H +} // namespace StartGui +#endif // START_WORKBENCH_H diff --git a/src/Mod/Start/Init.py b/src/Mod/Start/Init.py index ebe8d28707..12282436dd 100644 --- a/src/Mod/Start/Init.py +++ b/src/Mod/Start/Init.py @@ -1,24 +1,24 @@ -#*************************************************************************** -#* Copyright (c) 2001,2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2001,2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # FreeCAD init script of the Start module diff --git a/src/Mod/Start/InitGui.py b/src/Mod/Start/InitGui.py index cbc185c6c3..8cfb8a4330 100644 --- a/src/Mod/Start/InitGui.py +++ b/src/Mod/Start/InitGui.py @@ -1,25 +1,25 @@ -#*************************************************************************** -#* Copyright (c) 2002,2003 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002,2003 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Start gui init module # @@ -27,10 +27,14 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -class StartWorkbench ( Workbench ): + +class StartWorkbench(Workbench): "Start workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Start/Resources/icons/StartWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Start/Resources/icons/StartWorkbench.svg" + ) self.__class__.MenuText = "Start" self.__class__.ToolTip = "Start workbench" @@ -42,6 +46,7 @@ class StartWorkbench ( Workbench ): def GetClassName(self): return "StartGui::Workbench" + Gui.addWorkbench(StartWorkbench()) -FreeCAD.__unit_test__ += [ "TestStartGui" ] +FreeCAD.__unit_test__ += ["TestStartGui"] diff --git a/src/Mod/Start/StartGlobal.h b/src/Mod/Start/StartGlobal.h index 16c5a67cb7..8422477b63 100644 --- a/src/Mod/Start/StartGlobal.h +++ b/src/Mod/Start/StartGlobal.h @@ -29,19 +29,19 @@ // Start #ifndef StartExport #ifdef Start_EXPORTS -# define StartExport FREECAD_DECL_EXPORT +#define StartExport FREECAD_DECL_EXPORT #else -# define StartExport FREECAD_DECL_IMPORT +#define StartExport FREECAD_DECL_IMPORT #endif #endif // StartGui #ifndef StartGuiExport #ifdef StartGui_EXPORTS -# define StartGuiExport FREECAD_DECL_EXPORT +#define StartGuiExport FREECAD_DECL_EXPORT #else -# define StartGuiExport FREECAD_DECL_IMPORT +#define StartGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //START_GLOBAL_H +#endif // START_GLOBAL_H diff --git a/src/Mod/Start/StartPage/CMakeLists.txt b/src/Mod/Start/StartPage/CMakeLists.txt index b09ccbea0e..5d363bb972 100644 --- a/src/Mod/Start/StartPage/CMakeLists.txt +++ b/src/Mod/Start/StartPage/CMakeLists.txt @@ -27,7 +27,7 @@ SET(StartPage_ImageResources images/new_file_thumbnail.svg images/icon_settings.png images/new_empty_file.png - images/new_import_file.png + images/new_open_file.png images/new_parametric_part.png images/new_csg_part.png images/new_2d_draft.png @@ -68,4 +68,3 @@ INSTALL(FILES ${StartPage_PythonResources} INSTALL(FILES ${StartPage_ImageResources} DESTINATION ${CMAKE_INSTALL_DATADIR}/Mod/Start/StartPage/images ) - diff --git a/src/Mod/Start/StartPage/EnableDownload.py b/src/Mod/Start/StartPage/EnableDownload.py index 1e85c0b9f6..8805066405 100644 --- a/src/Mod/Start/StartPage/EnableDownload.py +++ b/src/Mod/Start/StartPage/EnableDownload.py @@ -1,24 +1,25 @@ -#*************************************************************************** -#* Copyright (c) 2012 Yorik van Havre * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2012 Yorik van Havre * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import FreeCAD + rf = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start") rf.SetBool("AllowDownload", True) diff --git a/src/Mod/Start/StartPage/LoadCustom.py b/src/Mod/Start/StartPage/LoadCustom.py index e2401b2903..bbf1e9f365 100644 --- a/src/Mod/Start/StartPage/LoadCustom.py +++ b/src/Mod/Start/StartPage/LoadCustom.py @@ -41,13 +41,23 @@ if cfolders: mod = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString( "DefaultImport" + ext, "" ) - if ( - ext.lower() in ("fcstd", "stp", "step", "iges", "igs") - ): + if ext.lower() in ("fcstd", "stp", "step", "iges", "igs"): FreeCAD.loadFile(os.path.join(cfolder, f), mod) - elif ( - ext.lower() in ("bmp", "cur", "gif", "ico", "pbm", "pgm", "png", "jpg", - "jpeg", "ppm", "svg", "svgz", "xbm", "xpm") + elif ext.lower() in ( + "bmp", + "cur", + "gif", + "ico", + "pbm", + "pgm", + "png", + "jpg", + "jpeg", + "ppm", + "svg", + "svgz", + "xbm", + "xpm", ): FreeCAD.newDocument() FreeCADGui.insert(os.path.join(cfolder, f), FreeCAD.activeDocument().Name) @@ -57,4 +67,5 @@ if cfolders: FreeCADGui.activeDocument().sendMsgToViews("ViewFit") from StartPage import StartPage + StartPage.postStart() diff --git a/src/Mod/Start/StartPage/LoadExample.py b/src/Mod/Start/StartPage/LoadExample.py index 1b689fb3f5..1cac0fa443 100644 --- a/src/Mod/Start/StartPage/LoadExample.py +++ b/src/Mod/Start/StartPage/LoadExample.py @@ -1,23 +1,23 @@ -#*************************************************************************** -#* Copyright (c) 2016 Bernd Hahnebach * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2016 Bernd Hahnebach * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import os import FreeCAD @@ -28,4 +28,5 @@ FreeCAD.loadFile(os.path.join(FreeCAD.getResourceDir() + "examples", filename)) FreeCADGui.activeDocument().sendMsgToViews("ViewFit") from StartPage import StartPage + StartPage.postStart() diff --git a/src/Mod/Start/StartPage/LoadMRU.py b/src/Mod/Start/StartPage/LoadMRU.py index 4de8c69c8c..86ee7f36d4 100644 --- a/src/Mod/Start/StartPage/LoadMRU.py +++ b/src/Mod/Start/StartPage/LoadMRU.py @@ -1,23 +1,23 @@ -#*************************************************************************** -#* Copyright (c) 2018 Yorik van Havre * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2018 Yorik van Havre * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import os import FreeCAD @@ -25,18 +25,28 @@ import FreeCADGui # MRU will be given before this script is run rf = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/RecentFiles") -filename = rf.GetString("MRU"+str(MRU)) +filename = rf.GetString("MRU" + str(MRU)) ext = os.path.splitext(filename)[1].lower().strip(".") mod = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString( - "DefaultImport"+ext, "" + "DefaultImport" + ext, "" ) -if ( - ext.lower() in ("fcstd", "stp", "step", "iges", "igs") -): +if ext.lower() in ("fcstd", "stp", "step", "iges", "igs"): FreeCAD.loadFile(filename, mod) -elif ( - ext.lower() in ("bmp", "cur", "gif", "ico", "pbm", "pgm", "png", "jpg", - "jpeg", "ppm", "svg", "svgz", "xbm", "xpm") +elif ext.lower() in ( + "bmp", + "cur", + "gif", + "ico", + "pbm", + "pgm", + "png", + "jpg", + "jpeg", + "ppm", + "svg", + "svgz", + "xbm", + "xpm", ): FreeCAD.newDocument() FreeCADGui.insert(filename, FreeCAD.activeDocument().Name) @@ -46,4 +56,5 @@ else: FreeCADGui.activeDocument().sendMsgToViews("ViewFit") from StartPage import StartPage + StartPage.postStart() diff --git a/src/Mod/Start/StartPage/LoadNew.py b/src/Mod/Start/StartPage/LoadNew.py index be697589ae..71b6063c9c 100644 --- a/src/Mod/Start/StartPage/LoadNew.py +++ b/src/Mod/Start/StartPage/LoadNew.py @@ -27,14 +27,16 @@ from StartPage import StartPage template_name = str(template) if template_name == "empty_file": - FreeCADGui.runCommand('Std_New') + FreeCADGui.runCommand("Std_New") StartPage.postStart() -elif template_name == "import_file": - FreeCADGui.runCommand('Std_New') - StartPage.postStart() - FreeCADGui.runCommand("Std_Import") +elif template_name == "open_file": + previous_doc = FreeCADGui.ActiveDocument + FreeCADGui.runCommand("Std_Open") + # workaround to not run postStart() if user cancels the Open dialog + if FreeCADGui.ActiveDocument != previous_doc: + StartPage.postStart() elif template_name == "parametric_part": - FreeCADGui.runCommand('Std_New') + FreeCADGui.runCommand("Std_New") FreeCADGui.activateWorkbench("PartDesignWorkbench") FreeCADGui.runCommand("PartDesign_Body") StartPage.postStart(False) @@ -43,12 +45,12 @@ elif template_name == "parametric_part": # FreeCADGui.activateWorkbench("PartWorkbench") # StartPage.postStart(False) elif template_name == "2d_draft": - FreeCADGui.runCommand('Std_New') + FreeCADGui.runCommand("Std_New") FreeCADGui.activateWorkbench("DraftWorkbench") FreeCADGui.runCommand("Std_ViewTop") StartPage.postStart(False) elif template_name == "architecture": - FreeCADGui.runCommand('Std_New') + FreeCADGui.runCommand("Std_New") try: import BimCommands except Exception: diff --git a/src/Mod/Start/StartPage/OpenSettings.py b/src/Mod/Start/StartPage/OpenSettings.py index fe92339ebb..795e7afae0 100644 --- a/src/Mod/Start/StartPage/OpenSettings.py +++ b/src/Mod/Start/StartPage/OpenSettings.py @@ -1,23 +1,24 @@ -#*************************************************************************** -#* Copyright (c) 2020 Yorik van Havre * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2020 Yorik van Havre * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** import FreeCADGui + FreeCADGui.showPreferences("Start") diff --git a/src/Mod/Start/StartPage/StartPage.css b/src/Mod/Start/StartPage/StartPage.css index 60bb15dfc1..6691267d30 100644 --- a/src/Mod/Start/StartPage/StartPage.css +++ b/src/Mod/Start/StartPage/StartPage.css @@ -24,7 +24,6 @@ body { overflow: hidden; } -OVERFLOW a, a:link, a:visited { @@ -44,6 +43,10 @@ h2 { padding-top: 5px; } +img, a { + -webkit-user-drag: none; +} + .hidden { display: none !important; } @@ -73,7 +76,7 @@ h2 { display: flex; align-items: center; color: TEXTCOLOR; - font-size: 1.3em; + font-size: 1.4em; margin-left: 25px; font-weight: bold; } @@ -113,7 +116,7 @@ ul.tabs { position: absolute; top: 2em; left: 50%; - transform: translateX(-50%); + transform: translateX(calc(-50% - 1em)); } ul.tabs li { @@ -130,7 +133,6 @@ ul.tabs li a { text-decoration: none; outline: 0; font-size: 1.3em; - transition: 100ms; } ul.tabs li a img { @@ -186,6 +188,7 @@ ul.icons { width: 130px; height: THUMBCARDSIZE; background: BOXCOLOR; + border: solid 2px BOXCOLOR; border-radius: 8px; margin: 10px; word-wrap: break-word; @@ -233,6 +236,7 @@ a .caption:visited { width: 18em; height: 5em; background: BOXCOLOR; + border: solid 2px BOXCOLOR; border-radius: 8px; margin: 10px; word-wrap: break-word; @@ -382,4 +386,4 @@ ul.addonslist { background: TEXTCOLOR; background-clip: content-box; border: 6px solid transparent; -} \ No newline at end of file +} diff --git a/src/Mod/Start/StartPage/StartPage.html b/src/Mod/Start/StartPage/StartPage.html index e852d2b616..d48f062fa6 100644 --- a/src/Mod/Start/StartPage/StartPage.html +++ b/src/Mod/Start/StartPage/StartPage.html @@ -6,7 +6,8 @@ @@ -34,7 +35,7 @@
  • - + blog T_BLOG @@ -191,4 +192,4 @@ - \ No newline at end of file + diff --git a/src/Mod/Start/StartPage/StartPage.js b/src/Mod/Start/StartPage/StartPage.js index 286d1cb7c6..c0fd178a5a 100644 --- a/src/Mod/Start/StartPage/StartPage.js +++ b/src/Mod/Start/StartPage/StartPage.js @@ -2,7 +2,8 @@ var allowDownloads = 0; var showForum = 0; var wblist = []; -function toggle(tab) { +function toggle(tab) +{ // switch to the given tab ID ("tab1", "tab2", etc...) @@ -18,46 +19,53 @@ function toggle(tab) { } -function load() { +function load() +{ // run at startup if (localStorage["notepad"]) { - document.getElementById("notepad").value = localStorage["notepad"]; // Load notepad from local storage + document.getElementById("notepad").value = + localStorage["notepad"]; // Load notepad from local storage } - document.getElementById("notepad").addEventListener("input", function () { - localStorage.setItem("notepad", document.getElementById("notepad").value); // Save notepad on type + document.getElementById("notepad").addEventListener("input", function() { + localStorage.setItem("notepad", + document.getElementById("notepad").value); // Save notepad on type }, false); if (allowDownloads == 1) { // load latest commits var ddiv = document.getElementById("commits"); ddiv.innerHTML = "Connecting..."; - var tobj = new JSONscriptRequest('https://api.github.com/repos/FreeCAD/FreeCAD/commits?callback=printCommits'); - tobj.buildScriptTag(); // Build the script tag - tobj.addScriptTag(); // Execute (add) the script tag + var tobj = new JSONscriptRequest( + 'https://api.github.com/repos/FreeCAD/FreeCAD/commits?callback=printCommits'); + tobj.buildScriptTag(); // Build the script tag + tobj.addScriptTag(); // Execute (add) the script tag ddiv.innerHTML = "Downloading latest news..."; // load addons list ddiv = document.getElementById("addons"); ddiv.innerHTML = "Connecting..."; - var tobj = new JSONscriptRequest('https://api.github.com/repos/FreeCAD/FreeCAD-addons/contents?callback=printAddons'); - tobj.buildScriptTag(); // Build the script tag - tobj.addScriptTag(); // Execute (add) the script tag + var tobj = new JSONscriptRequest( + 'https://api.github.com/repos/FreeCAD/FreeCAD-addons/contents?callback=printAddons'); + tobj.buildScriptTag(); // Build the script tag + tobj.addScriptTag(); // Execute (add) the script tag ddiv.innerHTML = "Downloading addons list..."; if (showForum == 1) { // load forum recent posts ddiv = document.getElementById("forum"); ddiv.innerHTML = "Connecting..."; - var tobj = new JSONscriptRequest('https://www.freecad.org/xml-to-json.php?callback=printForum&url=https://forum.freecad.org/feed.php'); - tobj.buildScriptTag(); // Build the script tag - tobj.addScriptTag(); // Execute (add) the script tag + var tobj = new JSONscriptRequest( + 'https://www.freecad.org/xml-to-json.php?callback=printForum&url=https://forum.freecad.org/feed.php'); + tobj.buildScriptTag(); // Build the script tag + tobj.addScriptTag(); // Execute (add) the script tag ddiv.innerHTML = "Downloading addons list..."; } } } -function printCommits(data) { +function printCommits(data) +{ // json callback for git commits @@ -65,14 +73,23 @@ function printCommits(data) { ddiv.innerHTML = "Received"; var html = ['
      ']; for (var i = 0; i < 25; i++) { - html.push('
    • ', data.data[i].commit.message, ' ', data.data[i].commit.committer.date.split("T")[0], ' - ', data.data[i].commit.author.name, '
    • '); + html.push('
    • ', + data.data[i].commit.message, + ' ', + data.data[i].commit.committer.date.split("T")[0], + ' - ', + data.data[i].commit.author.name, + '
    • '); } html.push('
    '); ddiv.innerHTML = html.join(''); } -function printAddons(data) { +function printAddons(data) +{ // json callback for addons list @@ -83,9 +100,18 @@ function printAddons(data) { for (var i = 0; i < data.data.length; i++) { if ((data.data[i].name[0] != ".") && (blacklist.indexOf(data.data[i].name) < 0)) { if (wblist.indexOf(data.data[i].name.toLowerCase()) == -1) { - html.push('
  • ', data.data[i].name, '
  • '); - } else { - html.push('
  • ', data.data[i].name, ' 
  • '); + html.push('
  • ', + data.data[i].name, + '
  • '); + } + else { + html.push('
  • ', + data.data[i].name, + ' 
  • '); } } } @@ -94,7 +120,8 @@ function printAddons(data) { } -function printForum(data) { +function printForum(data) +{ // json callback for forum posts @@ -103,7 +130,13 @@ function printForum(data) { var html = [''); @@ -114,7 +147,8 @@ function printForum(data) { // below are JSON helper functions -function JSONscriptRequest(fullUrl) { +function JSONscriptRequest(fullUrl) +{ // REST request path this.fullUrl = fullUrl; @@ -129,8 +163,8 @@ function JSONscriptRequest(fullUrl) { JSONscriptRequest.scriptCounter = 1; -JSONscriptRequest.prototype.buildScriptTag = function () { - +JSONscriptRequest.prototype.buildScriptTag = + function() { // Create the script tag this.scriptObj = document.createElement("script"); // Add script object attributes @@ -141,12 +175,13 @@ JSONscriptRequest.prototype.buildScriptTag = function () { } -JSONscriptRequest.prototype.removeScriptTag = function () { + JSONscriptRequest.prototype.removeScriptTag = + function() { // Destroy the script tag this.headLoc.removeChild(this.scriptObj); } -JSONscriptRequest.prototype.addScriptTag = function () { + JSONscriptRequest.prototype.addScriptTag = function() { // Create the script tag this.headLoc.appendChild(this.scriptObj); } diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py index 803044d944..09e0506269 100644 --- a/src/Mod/Start/StartPage/StartPage.py +++ b/src/Mod/Start/StartPage/StartPage.py @@ -1,23 +1,23 @@ -#*************************************************************************** -#* Copyright (c) 2018 Yorik van Havre * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2018 Yorik van Havre * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** # This is the start page template. It builds an HTML global variable that @@ -32,12 +32,14 @@ import zipfile import re import FreeCAD import FreeCADGui +import codecs import urllib.parse from . import TranslationTexts from PySide import QtCore, QtGui try: from addonmanager_macro import Macro as AM_Macro + has_am_macro = True except ImportError: has_am_macro = False @@ -47,8 +49,8 @@ FreeCADGui.addLanguagePath(":/translations") FreeCADGui.updateLocale() iconprovider = QtGui.QFileIconProvider() -iconbank = {} # store pre-existing icons so we don't overpollute temp dir -tempfolder = None # store icons inside a subfolder in temp dir +iconbank = {} # store pre-existing icons so we don't overpollute temp dir +tempfolder = None # store icons inside a subfolder in temp dir defaulticon = None # store a default icon for problematic file types @@ -56,11 +58,10 @@ def gethexcolor(color): "returns a color hex value #000000" - r = str(hex(int(((color>>24)&0xFF))))[2:].zfill(2) - g = str(hex(int(((color>>16)&0xFF))))[2:].zfill(2) - b = str(hex(int(((color>>8)&0xFF))))[2:].zfill(2) - return "#"+r+g+b - + r = str(hex(int(((color >> 24) & 0xFF))))[2:].zfill(2) + g = str(hex(int(((color >> 16) & 0xFF))))[2:].zfill(2) + b = str(hex(int(((color >> 8) & 0xFF))))[2:].zfill(2) + return "#" + r + g + b def isOpenableByFreeCAD(filename): @@ -81,25 +82,26 @@ def isOpenableByFreeCAD(filename): return False - def getInfo(filename): "returns available file information" - global iconbank,tempfolder + global iconbank, tempfolder - tformat = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString("TimeFormat","%m/%d/%Y %H:%M:%S") + tformat = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString( + "TimeFormat", "%m/%d/%Y %H:%M:%S" + ) def getLocalTime(timestamp): "returns a local time from a timestamp" - return time.strftime(tformat,time.localtime(timestamp)) + return time.strftime(tformat, time.localtime(timestamp)) def getSize(size): "returns a human-readable size" - if size > 1024*1024: - hsize = str(int(size/(1024*1024))) + "Mb" + if size > 1024 * 1024: + hsize = str(int(size / (1024 * 1024))) + "Mb" elif size > 1024: - hsize = str(int(size/1024)) + "Kb" + hsize = str(int(size / 1024)) + "Kb" else: hsize = str(int(size)) + "b" return hsize @@ -114,8 +116,11 @@ def getInfo(filename): except Exception: # alternative method import hashlib - fhash = hashlib.md5(bytes(urllib.parse.quote("file://"+path,safe=":/"),"ascii")).hexdigest() - thumb = os.path.join(os.path.expanduser("~"),".thumbnails","normal",fhash+".png") + + fhash = hashlib.md5( + bytes(urllib.parse.quote("file://" + path, safe=":/"), "ascii") + ).hexdigest() + thumb = os.path.join(os.path.expanduser("~"), ".thumbnails", "normal", fhash + ".png") else: uri = gnomevfs.get_uri_from_local_path(path) thumb = gnome.ui.thumbnail_path_for_uri(uri, "normal") @@ -123,7 +128,6 @@ def getInfo(filename): return thumb return None - if os.path.exists(filename): if os.path.isdir(filename): @@ -143,41 +147,45 @@ def getInfo(filename): # get additional info from fcstd files if filename.lower().endswith(".fcstd"): try: - zfile=zipfile.ZipFile(filename) + zfile = zipfile.ZipFile(filename) except Exception: - print("Cannot read file: ",filename) + print("Cannot read file: ", filename) return None - files=zfile.namelist() + files = zfile.namelist() # check for meta-file if it's really a FreeCAD document if files[0] == "Document.xml": try: - doc = zfile.read(files[0]).decode('utf-8') + doc = zfile.read(files[0]).decode("utf-8") except OSError as e: - print ("Fail to load corrupted FCStd file: '{0}' with this error: {1}".format(filename, str(e))) + print( + "Fail to load corrupted FCStd file: '{0}' with this error: {1}".format( + filename, str(e) + ) + ) return None - doc = doc.replace("\n"," ") - r = re.findall("Property name=\"CreatedBy.*?String value=\"(.*?)\"/>",doc) + doc = doc.replace("\n", " ") + r = re.findall('Property name="CreatedBy.*?String value="(.*?)"/>', doc) if r: author = r[0] # remove email if present in author field if "<" in author: author = author.split("<")[0].strip() - r = re.findall("Property name=\"Company.*?String value=\"(.*?)\"/>",doc) + r = re.findall('Property name="Company.*?String value="(.*?)"/>', doc) if r: company = r[0] - r = re.findall("Property name=\"License.*?String value=\"(.*?)\"/>",doc) + r = re.findall('Property name="License.*?String value="(.*?)"/>', doc) if r: lic = r[0] - r = re.findall("Property name=\"Comment.*?String value=\"(.*?)\"/>",doc) + r = re.findall('Property name="Comment.*?String value="(.*?)"/>', doc) if r: descr = r[0] if "thumbnails/Thumbnail.png" in files: if filename in iconbank: image = iconbank[filename] else: - imagedata=zfile.read("thumbnails/Thumbnail.png") - image = tempfile.mkstemp(dir=tempfolder,suffix='.png')[1] - thumb = open(image,"wb") + imagedata = zfile.read("thumbnails/Thumbnail.png") + image = tempfile.mkstemp(dir=tempfolder, suffix=".png")[1] + thumb = open(image, "wb") thumb.write(imagedata) thumb.close() iconbank[filename] = image @@ -185,7 +193,7 @@ def getInfo(filename): elif filename.lower().endswith(".fcmacro"): # For FreeCAD macros, use the Macro Editor icon (but we have to have it in a file for # the web view to load it) - image = os.path.join(tempfolder,"fcmacro_icon.svg") + image = os.path.join(tempfolder, "fcmacro_icon.svg") if not os.path.exists(image): f = QtCore.QFile(":/icons/MacroEditor.svg") f.copy(image) @@ -219,19 +227,18 @@ def getInfo(filename): else: icon = iconprovider.icon(i) if icon.availableSizes(): - preferred = icon.actualSize(QtCore.QSize(128,128)) + preferred = icon.actualSize(QtCore.QSize(128, 128)) px = icon.pixmap(preferred) - image = tempfile.mkstemp(dir=tempfolder,suffix='.png')[1] + image = tempfile.mkstemp(dir=tempfolder, suffix=".png")[1] px.save(image) else: image = getDefaultIcon() iconbank[t] = image - return [image,size,author,ctime,mtime,descr,company,lic] + return [image, size, author, ctime, mtime, descr, company, lic] return None - def getDefaultIcon(): "retrieves or creates a default file icon" @@ -239,52 +246,68 @@ def getDefaultIcon(): global defaulticon if not defaulticon: - i = QtCore.QFileInfo(__file__) # MUST provide an existing file in qt5 + i = QtCore.QFileInfo(__file__) # MUST provide an existing file in qt5 icon = iconprovider.icon(i) - preferred = icon.actualSize(QtCore.QSize(128,128)) + preferred = icon.actualSize(QtCore.QSize(128, 128)) px = icon.pixmap(preferred) - image = tempfile.mkstemp(dir=tempfolder,suffix='.png')[1] + image = tempfile.mkstemp(dir=tempfolder, suffix=".png")[1] px.save(image) defaulticon = image return defaulticon - def build_new_file_card(template): """builds an html
  • element representing a new file quick start button""" templates = { - "empty_file": [TranslationTexts.T_TEMPLATE_EMPTYFILE_NAME, TranslationTexts.T_TEMPLATE_EMPTYFILE_DESC], - "import_file": [TranslationTexts.T_TEMPLATE_IMPORTFILE_NAME, TranslationTexts.T_TEMPLATE_IMPORTFILE_DESC], - "parametric_part": [TranslationTexts.T_TEMPLATE_PARAMETRICPART_NAME, TranslationTexts.T_TEMPLATE_PARAMETRICPART_DESC], + "empty_file": [ + TranslationTexts.T_TEMPLATE_EMPTYFILE_NAME, + TranslationTexts.T_TEMPLATE_EMPTYFILE_DESC, + ], + "open_file": [ + TranslationTexts.T_TEMPLATE_OPENFILE_NAME, + TranslationTexts.T_TEMPLATE_OPENFILE_DESC, + ], + "parametric_part": [ + TranslationTexts.T_TEMPLATE_PARAMETRICPART_NAME, + TranslationTexts.T_TEMPLATE_PARAMETRICPART_DESC, + ], # "csg_part": [TranslationTexts.T_TEMPLATE_CSGPART_NAME, TranslationTexts.T_TEMPLATE_CSGPART_DESC], - "2d_draft": [TranslationTexts.T_TEMPLATE_2DDRAFT_NAME, TranslationTexts.T_TEMPLATE_2DDRAFT_DESC], - "architecture": [TranslationTexts.T_TEMPLATE_ARCHITECTURE_NAME, TranslationTexts.T_TEMPLATE_ARCHITECTURE_DESC] + "2d_draft": [ + TranslationTexts.T_TEMPLATE_2DDRAFT_NAME, + TranslationTexts.T_TEMPLATE_2DDRAFT_DESC, + ], + "architecture": [ + TranslationTexts.T_TEMPLATE_ARCHITECTURE_NAME, + TranslationTexts.T_TEMPLATE_ARCHITECTURE_DESC, + ], } if template not in templates: - return + return "" - image = 'file:///'+os.path.join(os.path.join(FreeCAD.getResourceDir(), "Mod", "Start", "StartPage"), 'images/new_'+template+".png").replace('\\','/') + image = "file:///" + os.path.join( + os.path.join(FreeCAD.getResourceDir(), "Mod", "Start", "StartPage"), + "images/new_" + template + ".png", + ).replace("\\", "/") result = "" result += '
  • ' - result += '' - result += ''+template+'' + result += '' + result += '' + template + '' result += '
    ' - result += '

    '+templates[template][0]+'

    ' - result += '

    '+templates[template][1]+'

    ' - result += '
    ' - result += '
    ' - result += '
  • ' + result += "

    " + templates[template][0] + "

    " + result += "

    " + templates[template][1] + "

    " + result += "" + result += "" + result += "" return result - -def buildCard(filename,method,arg=None): +def buildCard(filename, method, arg=None): """builds an html
  • element representing a file. method is a script + a keyword, for ex. url.py?key=""" @@ -299,37 +322,41 @@ def buildCard(filename,method,arg=None): image = finfo[0] size = finfo[1] author = finfo[2] - infostring = TranslationTexts.T_CREATIONDATE+": "+finfo[3] + "\n" - infostring += TranslationTexts.T_LASTMODIFIED+": "+finfo[4] + infostring = TranslationTexts.T_CREATIONDATE + ": " + finfo[3] + "\n" + infostring += TranslationTexts.T_LASTMODIFIED + ": " + finfo[4] if finfo[5]: infostring += "\n\n" + finfo[5] if size: result += '
  • ' - result += '' - result += ''+basename+'' + result += ( + '' + ) + result += ( + '' + basename + '' + ) result += '
    ' - result += '

    '+basename+'

    ' - result += '

    '+author+'

    ' - result += '

    '+size+'

    ' - result += '
    ' - result += '
    ' - result += '
  • ' + result += "

    " + basename + "

    " + result += "

    " + author + "

    " + result += "

    " + size + "

    " + result += "" + result += "" + result += "" return result - def handle(): "builds the HTML code of the start page" - global iconbank,tempfolder + global iconbank, tempfolder # reuse stuff from previous runs to reduce temp dir clutter import Start - if hasattr(Start,"iconbank"): + + if hasattr(Start, "iconbank"): iconbank = Start.iconbank - if hasattr(Start,"tempfolder"): + if hasattr(Start, "tempfolder"): tempfolder = Start.tempfolder else: tempfolder = tempfile.mkdtemp(prefix="FreeCADStartThumbnails") @@ -338,30 +365,40 @@ def handle(): resources_dir = os.path.join(FreeCAD.getResourceDir(), "Mod", "Start", "StartPage") p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start") - template = p.GetString("Template","") + template = p.GetString("Template", "") if template: html_filename = template else: html_filename = os.path.join(resources_dir, "StartPage.html") js_filename = os.path.join(resources_dir, "StartPage.js") - css_filename = p.GetString("CSSFile",os.path.join(resources_dir, "StartPage.css")) - with open(html_filename, 'r') as f: + css_filename = p.GetString("CSSFile", os.path.join(resources_dir, "StartPage.css")) + with open(html_filename, "r") as f: HTML = f.read() - with open(js_filename, 'r') as f: + with open(js_filename, "r") as f: JS = f.read() - with open(css_filename, 'r') as f: + with open(css_filename, "r") as f: CSS = f.read() - HTML = HTML.replace("JS",JS) - HTML = HTML.replace("CSS",CSS) + HTML = HTML.replace("JS", JS) + HTML = HTML.replace("DEFAULT_CSS", CSS) + HTML = HTML.replace( + "CUSTOM_CSS", + FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start") + .GetString("CustomCSS", "") + .replace("\n", ""), + ) # set the language - HTML = HTML.replace("BCP47_LANGUAGE",QtCore.QLocale().bcp47Name()) + HTML = HTML.replace("BCP47_LANGUAGE", QtCore.QLocale().bcp47Name()) # get the stylesheet if we are using one - if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("UseStyleSheet",False): - qssfile = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/MainWindow").GetString("StyleSheet","") + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool( + "UseStyleSheet", False + ): + qssfile = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/MainWindow").GetString( + "StyleSheet", "" + ) if qssfile: # Search for stylesheet in user, system and resources locations user = os.path.join(FreeCAD.getUserAppDataDir(), "Gui", "Stylesheets") @@ -384,38 +421,65 @@ def handle(): f = QtCore.QFile(path) if f.open(QtCore.QIODevice.ReadOnly | QtCore.QFile.Text): ALTCSS = QtCore.QTextStream(f).readAll() - HTML = HTML.replace("","") + HTML = HTML.replace( + "", '" + ) else: - with open(path, 'r') as f: + with codecs.open(path, encoding="utf-8") as f: ALTCSS = f.read() - HTML = HTML.replace("","") + HTML = HTML.replace( + "", '" + ) - # handle file thumbnail icons visiblity and size + # handle file thumbnail icons visibility and size - if not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowFileThumbnailIcons",True): - HTML = HTML.replace("display: block; /* thumb icons display */","display: none; /* thumb icons display */") - HTML = HTML.replace("THUMBCARDSIZE","75px") + if not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool( + "ShowFileThumbnailIcons", True + ): + HTML = HTML.replace( + "display: block; /* thumb icons display */", "display: none; /* thumb icons display */" + ) + HTML = HTML.replace("THUMBCARDSIZE", "75px") - thumb_icons_size = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetInt("FileThumbnailIconsSize", 128) - HTML = HTML.replace("THUMBSIZE",str(thumb_icons_size)+"px") - HTML = HTML.replace("THUMBCARDSIZE",str(thumb_icons_size + 75)+"px") + thumb_icons_size = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetInt( + "FileThumbnailIconsSize", 128 + ) + HTML = HTML.replace("THUMBSIZE", str(thumb_icons_size) + "px") + HTML = HTML.replace("THUMBCARDSIZE", str(thumb_icons_size + 75) + "px") # turn tips off if needed - if not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowTips",True): - HTML = HTML.replace("display: block; /* footnote tips display */","display: none; /* footnote tips display */") + if not FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool( + "ShowTips", True + ): + HTML = HTML.replace( + "display: block; /* footnote tips display */", + "display: none; /* footnote tips display */", + ) # get FreeCAD version v = FreeCAD.Version() - VERSIONSTRING = TranslationTexts.T_VERSION + " " + v[0] + "." + v[1] + "." + v[2] +" " + TranslationTexts.T_BUILD + " " + v[3] - HTML = HTML.replace("VERSIONSTRING",VERSIONSTRING) + VERSIONSTRING = ( + TranslationTexts.T_VERSION + + " " + + v[0] + + "." + + v[1] + + "." + + v[2] + + " " + + TranslationTexts.T_BUILD + + " " + + v[3] + ) + HTML = HTML.replace("VERSIONSTRING", VERSIONSTRING) # translate texts texts = [t for t in dir(TranslationTexts) if t.startswith("T_")] for text in texts: - HTML = HTML.replace(text,getattr(TranslationTexts,text)) + HTML = HTML.replace(text, getattr(TranslationTexts, text)) # build a "create new" icon with the FreeCAD background color gradient @@ -426,90 +490,131 @@ def handle(): gradient = QtGui.QLinearGradient(0, 0, 0, 128) gradient.setColorAt(0.0, QtGui.QColor(c1)) gradient.setColorAt(1.0, QtGui.QColor(c2)) - i = QtGui.QImage(128,128,QtGui.QImage.Format_RGB16) + i = QtGui.QImage(128, 128, QtGui.QImage.Format_RGB16) pa = QtGui.QPainter(i) - pa.fillRect(i.rect(),gradient) + pa.fillRect(i.rect(), gradient) pa.end() - createimg = tempfile.mkstemp(dir=tempfolder,suffix='.png')[1] + createimg = tempfile.mkstemp(dir=tempfolder, suffix=".png")[1] i.save(createimg) iconbank["createimg"] = createimg # build SECTION_NEW_FILE - SECTION_NEW_FILE = "

    "+TranslationTexts.T_NEWFILE+"

    " + SECTION_NEW_FILE = "

    " + TranslationTexts.T_NEWFILE + "

    " SECTION_NEW_FILE += "
      " SECTION_NEW_FILE += build_new_file_card("empty_file") - SECTION_NEW_FILE += build_new_file_card("import_file") + SECTION_NEW_FILE += build_new_file_card("open_file") SECTION_NEW_FILE += build_new_file_card("parametric_part") # SECTION_NEW_FILE += build_new_file_card("csg_part") SECTION_NEW_FILE += build_new_file_card("2d_draft") SECTION_NEW_FILE += build_new_file_card("architecture") - SECTION_NEW_FILE += '
    ' - HTML = HTML.replace("SECTION_NEW_FILE",SECTION_NEW_FILE) + SECTION_NEW_FILE += "" + HTML = HTML.replace("SECTION_NEW_FILE", SECTION_NEW_FILE) # build SECTION_RECENTFILES rf = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/RecentFiles") - rfcount = rf.GetInt("RecentFiles",0) - SECTION_RECENTFILES = "

    "+TranslationTexts.T_RECENTFILES+"

    " + rfcount = rf.GetInt("RecentFiles", 0) + SECTION_RECENTFILES = "

    " + TranslationTexts.T_RECENTFILES + "

    " SECTION_RECENTFILES += "
      " for i in range(rfcount): filename = rf.GetString("MRU%d" % (i)) - SECTION_RECENTFILES += buildCard(filename,method="LoadMRU.py?MRU=",arg=str(i)) - SECTION_RECENTFILES += '
    ' - HTML = HTML.replace("SECTION_RECENTFILES",SECTION_RECENTFILES) + SECTION_RECENTFILES += buildCard(filename, method="LoadMRU.py?MRU=", arg=str(i)) + SECTION_RECENTFILES += "" + HTML = HTML.replace("SECTION_RECENTFILES", SECTION_RECENTFILES) # build SECTION_EXAMPLES SECTION_EXAMPLES = "" - if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowExamples",True): - SECTION_EXAMPLES = "

    "+TranslationTexts.T_EXAMPLES+"

    " + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool( + "ShowExamples", True + ): + SECTION_EXAMPLES = "

    " + TranslationTexts.T_EXAMPLES + "

    " SECTION_EXAMPLES += "
      " - examples_path = FreeCAD.getResourceDir()+"examples" + examples_path = FreeCAD.getResourceDir() + "examples" if os.path.exists(examples_path): examples = os.listdir(examples_path) for basename in examples: - filename = FreeCAD.getResourceDir()+"examples"+os.sep+basename - SECTION_EXAMPLES += buildCard(filename,method="LoadExample.py?filename=") + filename = FreeCAD.getResourceDir() + "examples" + os.sep + basename + SECTION_EXAMPLES += buildCard(filename, method="LoadExample.py?filename=") SECTION_EXAMPLES += "
    " - HTML = HTML.replace("SECTION_EXAMPLES",SECTION_EXAMPLES) + HTML = HTML.replace("SECTION_EXAMPLES", SECTION_EXAMPLES) # build SECTION_CUSTOM SECTION_CUSTOM = "" - cfolders = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString("ShowCustomFolder","") + cfolders = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetString( + "ShowCustomFolder", "" + ) if cfolders: dn = 0 - for cfolder in cfolders.split(";;"): # allow several paths separated by ;; + for cfolder in cfolders.split(";;"): # allow several paths separated by ;; if not os.path.isdir(cfolder): cfolder = os.path.dirname(cfolder) if not os.path.exists(cfolder): FreeCAD.Console.PrintWarning("Custom folder not found: %s" % cfolder) else: - SECTION_CUSTOM += "

    "+os.path.basename(os.path.normpath(cfolder))+"

    " + SECTION_CUSTOM += "

    " + os.path.basename(os.path.normpath(cfolder)) + "

    " SECTION_CUSTOM += "
      " for basename in os.listdir(cfolder): - filename = os.path.join(cfolder,basename) - SECTION_CUSTOM += buildCard(filename,method="LoadCustom.py?filename="+str(dn)+"_") + filename = os.path.join(cfolder, basename) + SECTION_CUSTOM += buildCard( + filename, method="LoadCustom.py?filename=" + str(dn) + "_" + ) SECTION_CUSTOM += "
    " # hide the custom section tooltip if custom section is set (users know about it if they enabled it) - HTML = HTML.replace("id=\"customtip\" class","id=\"customtip\" style=\"display:none;\" class") + HTML = HTML.replace( + 'id="customtip" class', 'id="customtip" style="display:none;" class' + ) dn += 1 - HTML = HTML.replace("SECTION_CUSTOM",SECTION_CUSTOM) + HTML = HTML.replace("SECTION_CUSTOM", SECTION_CUSTOM) # build IMAGE_SRC paths - HTML = HTML.replace("IMAGE_SRC_FREECAD",'file:///'+os.path.join(resources_dir, 'images/freecad.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_ICON_DOCUMENTS",'file:///'+os.path.join(resources_dir, 'images/icon_documents.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_ICON_HELP",'file:///'+os.path.join(resources_dir, 'images/icon_help.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_ICON_ACTIVITY",'file:///'+os.path.join(resources_dir, 'images/icon_activity.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_ICON_BLOG",'file:///'+os.path.join(resources_dir, 'images/icon_blog.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_USERHUB",'file:///'+os.path.join(resources_dir, 'images/userhub.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_POWERHUB",'file:///'+os.path.join(resources_dir, 'images/poweruserhub.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_DEVHUB",'file:///'+os.path.join(resources_dir, 'images/developerhub.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_MANUAL",'file:///'+os.path.join(resources_dir, 'images/manual.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_SETTINGS",'file:///'+os.path.join(resources_dir, 'images/icon_settings.png').replace('\\','/')) - HTML = HTML.replace("IMAGE_SRC_INSTALLED",'file:///'+os.path.join(resources_dir, 'images/installed.png').replace('\\','/')) + HTML = HTML.replace( + "IMAGE_SRC_FREECAD", + "file:///" + os.path.join(resources_dir, "images/freecad.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_ICON_DOCUMENTS", + "file:///" + os.path.join(resources_dir, "images/icon_documents.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_ICON_HELP", + "file:///" + os.path.join(resources_dir, "images/icon_help.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_ICON_ACTIVITY", + "file:///" + os.path.join(resources_dir, "images/icon_activity.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_ICON_BLOG", + "file:///" + os.path.join(resources_dir, "images/icon_blog.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_USERHUB", + "file:///" + os.path.join(resources_dir, "images/userhub.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_POWERHUB", + "file:///" + os.path.join(resources_dir, "images/poweruserhub.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_DEVHUB", + "file:///" + os.path.join(resources_dir, "images/developerhub.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_MANUAL", + "file:///" + os.path.join(resources_dir, "images/manual.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_SETTINGS", + "file:///" + os.path.join(resources_dir, "images/icon_settings.png").replace("\\", "/"), + ) + HTML = HTML.replace( + "IMAGE_SRC_INSTALLED", + "file:///" + os.path.join(resources_dir, "images/installed.png").replace("\\", "/"), + ) # build UL_WORKBENCHES @@ -554,28 +659,43 @@ def handle(): if wb in iconbank: img = iconbank[wb] else: - img = os.path.join(FreeCAD.getResourceDir(),"Mod",wn,"Resources","icons",wn+"Workbench.svg") + img = os.path.join( + FreeCAD.getResourceDir(), "Mod", wn, "Resources", "icons", wn + "Workbench.svg" + ) if not os.path.exists(img): w = FreeCADGui.listWorkbenches()[wb] - if hasattr(w,"Icon") and w.Icon: + if hasattr(w, "Icon") and w.Icon: xpm = w.Icon if "XPM" in xpm: - xpm = xpm.replace("\n ","\n") # some XPMs have some indent that QT doesn't like - r = [s[:-1].strip('"') for s in re.findall("(?s){(.*?)};",xpm)[0].split("\n")[1:]] + xpm = xpm.replace( + "\n ", "\n" + ) # some XPMs have some indent that QT doesn't like + r = [ + s[:-1].strip('"') + for s in re.findall("(?s){(.*?)};", xpm)[0].split("\n")[1:] + ] p = QtGui.QPixmap(r) - p = p.scaled(24,24) - img = tempfile.mkstemp(dir=tempfolder,suffix='.png')[1] + p = p.scaled(24, 24) + img = tempfile.mkstemp(dir=tempfolder, suffix=".png")[1] p.save(img) else: img = xpm else: - img = os.path.join(resources_dir,"images/freecad.png") + img = os.path.join(resources_dir, "images/freecad.png") iconbank[wb] = img - UL_WORKBENCHES += '
  • ' - UL_WORKBENCHES += ''+wn+' ' - UL_WORKBENCHES += ''+wn.replace("Reverse_Engineering","ReverseEng")+'' - UL_WORKBENCHES += '
  • ' - UL_WORKBENCHES += '' + UL_WORKBENCHES += "
  • " + UL_WORKBENCHES += ( + '' + wn + ' ' + ) + UL_WORKBENCHES += ( + '' + + wn.replace("Reverse_Engineering", "ReverseEng") + + "" + ) + UL_WORKBENCHES += "
  • " + UL_WORKBENCHES += "" HTML = HTML.replace("UL_WORKBENCHES", UL_WORKBENCHES) # Detect additional addons that are not a workbench @@ -598,56 +718,65 @@ def handle(): pass else: wblist.append("cadexchanger") - HTML = HTML.replace("var wblist = [];","var wblist = " + str(wblist) + ";") + HTML = HTML.replace("var wblist = [];", "var wblist = " + str(wblist) + ";") # set and replace colors and font settings p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start") - if p.GetString("BackgroundImage",""): - BACKGROUND = gethexcolor(p.GetUnsigned("BackgroundColor1",1331197183))+" url("+p.GetString("BackgroundImage","")+")" + if p.GetString("BackgroundImage", ""): + BACKGROUND = ( + gethexcolor(p.GetUnsigned("BackgroundColor1", 1331197183)) + + " url(" + + p.GetString("BackgroundImage", "") + + ")" + ) else: - BACKGROUND = gethexcolor(p.GetUnsigned("BackgroundColor1",1331197183)) + BACKGROUND = gethexcolor(p.GetUnsigned("BackgroundColor1", 1331197183)) # linear gradient not supported by QT "linear-gradient("+gethexcolor(p.GetUnsigned("BackgroundColor1",1331197183))+","+gethexcolor(p.GetUnsigned("BackgroundColor2",2141107711))+")" - LINKCOLOR = gethexcolor(p.GetUnsigned("LinkColor",65535)) - BASECOLOR = gethexcolor(p.GetUnsigned("PageColor",4294967295)) - BOXCOLOR = gethexcolor(p.GetUnsigned("BoxColor",3722305023)) - TEXTCOLOR = gethexcolor(p.GetUnsigned("PageTextColor",255)) - BGTCOLOR = gethexcolor(p.GetUnsigned("BackgroundTextColor",1600086015)) - OVERFLOW = "" if p.GetBool("ShowScrollBars",True) else "body::-webkit-scrollbar {display: none;}" + LINKCOLOR = gethexcolor(p.GetUnsigned("LinkColor", 65535)) + BASECOLOR = gethexcolor(p.GetUnsigned("PageColor", 4294967295)) + BOXCOLOR = gethexcolor(p.GetUnsigned("BoxColor", 3722305023)) + TEXTCOLOR = gethexcolor(p.GetUnsigned("PageTextColor", 255)) + BGTCOLOR = gethexcolor(p.GetUnsigned("BackgroundTextColor", 1600086015)) SHADOW = "#888888" - if QtGui.QColor(BASECOLOR).valueF() < 0.5: # dark page - we need to make darker shadows + if QtGui.QColor(BASECOLOR).valueF() < 0.5: # dark page - we need to make darker shadows SHADOW = "#000000" - FONTFAMILY = p.GetString("FontFamily","Arial,Helvetica,sans") + FONTFAMILY = p.GetString("FontFamily", "Arial,Helvetica,sans") if not FONTFAMILY: FONTFAMILY = "Arial,Helvetica,sans" - FONTSIZE = p.GetInt("FontSize",13) - HTML = HTML.replace("BASECOLOR",BASECOLOR) - HTML = HTML.replace("BOXCOLOR",BOXCOLOR) - HTML = HTML.replace("LINKCOLOR",LINKCOLOR) - HTML = HTML.replace("TEXTCOLOR",TEXTCOLOR) - HTML = HTML.replace("BGTCOLOR",BGTCOLOR) - HTML = HTML.replace("BACKGROUND",BACKGROUND) - HTML = HTML.replace("SHADOW",SHADOW) - HTML = HTML.replace("FONTFAMILY",FONTFAMILY) - HTML = HTML.replace("FONTSIZE",str(FONTSIZE)+"px") - HTML = HTML.replace("OVERFLOW",OVERFLOW) + FONTSIZE = p.GetInt("FontSize", 13) + HTML = HTML.replace("BASECOLOR", BASECOLOR) + HTML = HTML.replace("BOXCOLOR", BOXCOLOR) + HTML = HTML.replace("LINKCOLOR", LINKCOLOR) + HTML = HTML.replace("TEXTCOLOR", TEXTCOLOR) + HTML = HTML.replace("BGTCOLOR", BGTCOLOR) + HTML = HTML.replace("BACKGROUND", BACKGROUND) + HTML = HTML.replace("SHADOW", SHADOW) + HTML = HTML.replace("FONTFAMILY", FONTFAMILY) + HTML = HTML.replace("FONTSIZE", str(FONTSIZE) + "px") # enable web access if permitted - if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("AllowDownload",False): - HTML = HTML.replace("var allowDownloads = 0;","var allowDownloads = 1;") + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool( + "AllowDownload", False + ): + HTML = HTML.replace("var allowDownloads = 0;", "var allowDownloads = 1;") # enable or disable forum - if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowForum",False): - HTML = HTML.replace("var showForum = 0;","var showForum = 1;") - HTML = HTML.replace("display: none; /* forum display */","display: block; /* forum display */") + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowForum", False): + HTML = HTML.replace("var showForum = 0;", "var showForum = 1;") + HTML = HTML.replace( + "display: none; /* forum display */", "display: block; /* forum display */" + ) # enable or disable notepad - if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowNotes",False): - HTML = HTML.replace("display: none; /* notes display */","display: block; /* notes display */") - HTML = HTML.replace("width: 100%; /* thumbs display */","width: 70%; /* thumbs display */") + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool("ShowNotes", False): + HTML = HTML.replace( + "display: none; /* notes display */", "display: block; /* notes display */" + ) + HTML = HTML.replace("width: 100%; /* thumbs display */", "width: 70%; /* thumbs display */") # store variables for further use @@ -657,18 +786,20 @@ def handle(): return HTML - def exportTestFile(): "Allow to check if everything is Ok" - f = open(os.path.expanduser("~")+os.sep+"freecad-startpage.html","w") - f.write(handle()) - f.close() + with codecs.open( + os.path.expanduser("~") + os.sep + "freecad-startpage.html", + encoding="utf-8", + mode="w", + ) as f: + f.write(handle()) + f.close() - -def postStart(switch_wb = True): +def postStart(switch_wb=True): "executes needed operations after loading a file" @@ -676,18 +807,22 @@ def postStart(switch_wb = True): # switch workbench if switch_wb: - wb = param.GetString("AutoloadModule","") + wb = param.GetString("AutoloadModule", "") if "$LastModule" == wb: - wb = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General").GetString("LastModule","") + wb = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General").GetString( + "LastModule", "" + ) if wb: # don't switch workbenches if we are not in Start anymore - if FreeCADGui.activeWorkbench() and (FreeCADGui.activeWorkbench().name() == "StartWorkbench"): + if FreeCADGui.activeWorkbench() and ( + FreeCADGui.activeWorkbench().name() == "StartWorkbench" + ): FreeCADGui.activateWorkbench(wb) # close start tab - cl = param.GetBool("closeStart",False) + cl = param.GetBool("closeStart", False) if cl: - title = QtGui.QApplication.translate("Workbench","Start page") + title = QtGui.QApplication.translate("Workbench", "Start page") mw = FreeCADGui.getMainWindow() if mw: mdi = mw.findChild(QtGui.QMdiArea) @@ -698,13 +833,15 @@ def postStart(switch_wb = True): subw.close() - def checkPostOpenStartPage(): "on Start WB startup, check if we are loading a file and therefore need to close the StartPage" import Start - if FreeCAD.ParamGet('User parameter:BaseApp/Preferences/Mod/Start').GetBool('DoNotShowOnOpen',False) and (not hasattr(Start,'CanOpenStartPage')): + + if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start").GetBool( + "DoNotShowOnOpen", False + ) and (not hasattr(Start, "CanOpenStartPage")): if len(sys.argv) > 1: postStart() Start.CanOpenStartPage = True diff --git a/src/Mod/Start/StartPage/TranslationTexts.py b/src/Mod/Start/StartPage/TranslationTexts.py index 4e0ee061e1..0750b19d96 100644 --- a/src/Mod/Start/StartPage/TranslationTexts.py +++ b/src/Mod/Start/StartPage/TranslationTexts.py @@ -1,28 +1,28 @@ -#*************************************************************************** -#* Copyright (c) 2012 Yorik van Havre * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#*************************************************************************** +# *************************************************************************** +# * Copyright (c) 2012 Yorik van Havre * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with this program; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# *************************************************************************** from PySide import QtGui -def translate(context,text): +def translate(context, text): "convenience function for the Qt translator" @@ -34,20 +34,23 @@ def translate(context,text): return u.replace(chr(39), "’") + T_TITLE = translate("StartPage", "Start") T_WELCOME = translate("StartPage", "Welcome to FreeCAD") T_DOCUMENTS = translate("StartPage", "Documents") T_HELP = translate("StartPage", "Help") T_ACTIVITY = translate("StartPage", "Activity") T_BLOG = translate("StartPage", "Blog") -T_BLOG_TOOLTIP = translate("StartPage", "Link to the FreeCAD blog") +T_TOOLTIP_BLOG = translate("StartPage", "Link to the FreeCAD blog") T_NEWFILE = translate("StartPage", "New file") T_TEMPLATE_EMPTYFILE_NAME = translate("StartPage", "Empty File") T_TEMPLATE_EMPTYFILE_DESC = translate("StartPage", "Create an empty FreeCAD file") -T_TEMPLATE_IMPORTFILE_NAME = translate("StartPage", "Import File") -T_TEMPLATE_IMPORTFILE_DESC = translate("StartPage", "Work on an existing CAD file or 3D model") +T_TEMPLATE_OPENFILE_NAME = translate("StartPage", "Open File") +T_TEMPLATE_OPENFILE_DESC = translate("StartPage", "Open an existing CAD file or 3D model") T_TEMPLATE_PARAMETRICPART_NAME = translate("StartPage", "Standard Part") -T_TEMPLATE_PARAMETRICPART_DESC = translate("StartPage", "Create a part with the Part Design workbench") +T_TEMPLATE_PARAMETRICPART_DESC = translate( + "StartPage", "Create a part with the Part Design workbench" +) # T_TEMPLATE_CSGPART_NAME = translate("StartPage", "CSG Part") # T_TEMPLATE_CSGPART_DESC = translate("StartPage", "Create a part with the Part workbench") T_TEMPLATE_2DDRAFT_NAME = translate("StartPage", "2D Draft") @@ -56,38 +59,85 @@ T_TEMPLATE_ARCHITECTURE_NAME = translate("StartPage", "BIM/Architecture") T_TEMPLATE_ARCHITECTURE_DESC = translate("StartPage", "Create an architecture project") T_RECENTFILES = translate("StartPage", "Recent files") T_TIP = translate("StartPage", "Tip") -T_ADJUSTRECENT = translate("StartPage", "Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list") +T_ADJUSTRECENT = translate( + "StartPage", + "Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list", +) T_EXAMPLES = translate("StartPage", "Examples") T_GENERALDOCUMENTATION = translate("StartPage", "General documentation") T_USERHUB = translate("StartPage", "User hub") -T_DESCR_USERHUB = translate("StartPage", "This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started.") +T_DESCR_USERHUB = translate( + "StartPage", + "This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started.", +) T_POWERHUB = translate("StartPage", "Power users hub") -T_DESCR_POWERHUB = translate("StartPage", "This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs.") +T_DESCR_POWERHUB = translate( + "StartPage", + "This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs.", +) T_DEVHUB = translate("StartPage", "Developers hub") -T_DESCR_DEVHUB = translate("StartPage", "This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application.") +T_DESCR_DEVHUB = translate( + "StartPage", + "This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application.", +) T_MANUAL = translate("StartPage", "Manual") -T_DESCR_MANUAL = translate("StartPage", "The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. e-book versions are also available.") +T_DESCR_MANUAL = translate( + "StartPage", + 'The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. e-book versions are also available.', +) T_WBHELP = translate("StartPage", "Workbenches documentation") -T_DESCR_WBHELP = translate("StartPage", "These are the help pages of all the workbenches currently installed on this computer.") +T_DESCR_WBHELP = translate( + "StartPage", + "These are the help pages of all the workbenches currently installed on this computer.", +) T_COMMUNITYHELP = translate("StartPage", "Getting help from the community") -T_DESCR_COMMUNITYHELP1 = translate("StartPage", "The FreeCAD forum is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general Help on using FreeCAD section.") -T_DESCR_COMMUNITYHELP2 = translate("StartPage", "If it is the first time you are posting on the forum, be sure to read the guidelines first!") -T_DESCR_COMMUNITYHELP3 = translate("StartPage", "FreeCAD also maintains a public bug tracker where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the bug submission guide before posting.") +T_DESCR_COMMUNITYHELP1 = translate( + "StartPage", + 'The FreeCAD forum is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general Help on using FreeCAD section.', +) +T_DESCR_COMMUNITYHELP2 = translate( + "StartPage", + 'If it is the first time you are posting on the forum, be sure to read the guidelines first!', +) +T_DESCR_COMMUNITYHELP3 = translate( + "StartPage", + 'FreeCAD also maintains a public bug tracker where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the bug submission guide before posting.', +) T_ADDONS = translate("StartPage", "Available addons") -T_DESCR_ADDONS = translate("StartPage", "Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below.") -T_OFFLINEHELP = translate("StartPage", "If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection.") -T_OFFLINEPLACEHOLDER = translate("StartPage", "Cannot fetch information from GitHub. Authorize FreeCAD to access the internet and reload the Start page.") +T_DESCR_ADDONS = translate( + "StartPage", + "Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below.", +) +T_OFFLINEHELP = translate( + "StartPage", + "If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection.", +) +T_OFFLINEPLACEHOLDER = translate( + "StartPage", + 'Cannot fetch information from GitHub. Authorize FreeCAD to access the internet and reload the Start page.', +) T_RECENTCOMMITS = translate("StartPage", "Recent commits") -T_DESCR_RECENTCOMMITS = translate("StartPage", "Below are the latest changes added to the FreeCAD source code. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the available options if you wish to obtain a development version.") +T_DESCR_RECENTCOMMITS = translate( + "StartPage", + 'Below are the latest changes added to the FreeCAD source code. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the available options if you wish to obtain a development version.', +) T_SEEONGITHUB = translate("StartPage", "See all commits on github") -T_CUSTOM = translate("StartPage", "You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder") +T_CUSTOM = translate( + "StartPage", + "You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder", +) T_VERSION = translate("StartPage", "version") T_BUILD = translate("StartPage", "build") T_CREATENEW = translate("StartPage", "Create new...") T_UNKNOWN = translate("StartPage", "Unknown") T_FORUM = translate("StartPage", "Forum") -T_DESCR_FORUM = translate("StartPage", "The latest posts on the FreeCAD forum:") -T_EXTERNALLINKS = translate("StartPage", "To open any of the links above in your desktop browser, Right-click -> Open in external browser") +T_DESCR_FORUM = translate( + "StartPage", 'The latest posts on the FreeCAD forum:' +) +T_EXTERNALLINKS = translate( + "StartPage", + "To open any of the links above in your desktop browser, Right-click -> Open in external browser", +) T_CREATIONDATE = translate("StartPage", "Creation date") T_LASTMODIFIED = translate("StartPage", "Last modification") T_NOTES = translate("StartPage", "Notes") diff --git a/src/Mod/Start/StartPage/images/new_import_file.png b/src/Mod/Start/StartPage/images/new_open_file.png similarity index 100% rename from src/Mod/Start/StartPage/images/new_import_file.png rename to src/Mod/Start/StartPage/images/new_open_file.png diff --git a/src/Mod/Start/TestStart/TestStartPage.py b/src/Mod/Start/TestStart/TestStartPage.py index 01d4b9e6ab..4d65abb748 100644 --- a/src/Mod/Start/TestStart/TestStartPage.py +++ b/src/Mod/Start/TestStart/TestStartPage.py @@ -26,53 +26,96 @@ import Start from StartPage import StartPage import re + class TestStartPage(unittest.TestCase): """Basic validation of the generated Start page.""" - MODULE = 'TestStartPage' # file name without extension - + MODULE = "TestStartPage" # file name without extension def setUp(self): pass - def test_all_css_placeholders_removed(self): """Check to see if all of the CSS placeholders have been replaced.""" - placeholders = ["BACKGROUND","BGTCOLOR","FONTFAMILY","FONTSIZE","LINKCOLOR", - "TEXTCOLOR","BOXCOLOR","BASECOLOR","SHADOW"] + placeholders = [ + "BACKGROUND", + "BGTCOLOR", + "FONTFAMILY", + "FONTSIZE", + "LINKCOLOR", + "TEXTCOLOR", + "BOXCOLOR", + "BASECOLOR", + "SHADOW", + ] page = StartPage.handle() for placeholder in placeholders: - self.assertNotIn (placeholder, page, "{} was not removed from the CSS".format(placeholder)) - + self.assertNotIn( + placeholder, page, "{} was not removed from the CSS".format(placeholder) + ) def test_all_js_placeholders_removed(self): """Check to see if all of the JavaScript placeholders have been replaced.""" placeholders = ["IMAGE_SRC_INSTALLED"] page = StartPage.handle() for placeholder in placeholders: - self.assertNotIn (placeholder, page, "{} was not removed from the JS".format(placeholder)) - + self.assertNotIn( + placeholder, page, "{} was not removed from the JS".format(placeholder) + ) def test_all_html_placeholders_removed(self): """Check to see if all of the HTML placeholders have been replaced.""" - placeholders = ["T_TITLE","VERSIONSTRING","T_DOCUMENTS","T_HELP","T_ACTIVITY", - "SECTION_RECENTFILES","T_TIP","T_ADJUSTRECENT","SECTION_EXAMPLES", - "SECTION_CUSTOM","T_CUSTOM","T_NOTES","T_GENERALDOCUMENTATION", - "IMAGE_SRC_USERHUB", "T_USERHUB", "T_DESCR_USERHUB", - "IMAGE_SRC_POWERHUB","T_POWERHUB","T_DESCR_POWERHUB", - "IMAGE_SRC_DEVHUB", "T_DEVHUB", "T_DESCR_DEVHUB", - "IMAGE_SRC_MANUAL", "T_MANUAL", "T_DESCR_MANUAL", - "T_WBHELP","T_DESCR_WBHELP","UL_WORKBENCHES", - "T_COMMUNITYHELP","T_DESCR_COMMUNITYHELP1","T_DESCR_COMMUNITYHELP2", - "T_DESCR_COMMUNITYHELP3","T_ADDONS","T_DESCR_ADDONS", - "T_OFFLINEPLACEHOLDER","T_OFFLINEHELP","T_EXTERNALLINKS", - "T_RECENTCOMMITS","T_DESCR_RECENTCOMMITS","T_EXTERNALLINKS", - "T_SEEONGITHUB","T_FORUM","T_DESCR_FORUM"] + placeholders = [ + "T_TITLE", + "VERSIONSTRING", + "T_DOCUMENTS", + "T_HELP", + "T_ACTIVITY", + "SECTION_RECENTFILES", + "T_TIP", + "T_ADJUSTRECENT", + "SECTION_EXAMPLES", + "SECTION_CUSTOM", + "T_CUSTOM", + "T_NOTES", + "T_GENERALDOCUMENTATION", + "IMAGE_SRC_USERHUB", + "T_USERHUB", + "T_DESCR_USERHUB", + "IMAGE_SRC_POWERHUB", + "T_POWERHUB", + "T_DESCR_POWERHUB", + "IMAGE_SRC_DEVHUB", + "T_DEVHUB", + "T_DESCR_DEVHUB", + "IMAGE_SRC_MANUAL", + "T_MANUAL", + "T_DESCR_MANUAL", + "T_WBHELP", + "T_DESCR_WBHELP", + "UL_WORKBENCHES", + "T_COMMUNITYHELP", + "T_DESCR_COMMUNITYHELP1", + "T_DESCR_COMMUNITYHELP2", + "T_DESCR_COMMUNITYHELP3", + "T_ADDONS", + "T_DESCR_ADDONS", + "T_OFFLINEPLACEHOLDER", + "T_OFFLINEHELP", + "T_EXTERNALLINKS", + "T_RECENTCOMMITS", + "T_DESCR_RECENTCOMMITS", + "T_EXTERNALLINKS", + "T_SEEONGITHUB", + "T_FORUM", + "T_DESCR_FORUM", + ] page = StartPage.handle() for placeholder in placeholders: - self.assertNotIn (placeholder, page, "{} was not removed from the HTML".format(placeholder)) - + self.assertNotIn( + placeholder, page, "{} was not removed from the HTML".format(placeholder) + ) def test_files_do_not_contain_backslashes(self): # This would be caught by the W3C validator if we didn't sanitize the filenames before sending them. @@ -86,15 +129,19 @@ class TestStartPage(unittest.TestCase): badFilenames.append(result) if len(badFilenames) > 0: - self.fail("The following filenames contain backslashes, which is prohibited in HTML: {}".format(badFilenames)) - + self.fail( + "The following filenames contain backslashes, which is prohibited in HTML: {}".format( + badFilenames + ) + ) def test_html_validates(self): # Send the generated html to the W3C validator for analysis (removing potentially-sensitive data first) import urllib.request import os import json - page = self.sanitize(StartPage.handle()) # Remove potentially sensitive data + + page = self.sanitize(StartPage.handle()) # Remove potentially sensitive data # For debugging, if you want to ensure that the sanitization worked correctly: # from pathlib import Path @@ -104,15 +151,15 @@ class TestStartPage(unittest.TestCase): # f.close() validation_url = "https://validator.w3.org/nu/?out=json" - data = page.encode('utf-8') # data should be bytes + data = page.encode("utf-8") # data should be bytes req = urllib.request.Request(validation_url, data) - req.add_header("Content-type","text/html; charset=utf-8") + req.add_header("Content-type", "text/html; charset=utf-8") errorCount = 0 warningCount = 0 infoCount = 0 validationResultString = "" try: - with urllib.request.urlopen (req) as response: + with urllib.request.urlopen(req) as response: text = response.read() responseJSON = json.loads(text) @@ -123,15 +170,23 @@ class TestStartPage(unittest.TestCase): if "subtype" in message: if message["subtype"] == "warning": warningCount += 1 - validationResultString += "WARNING: {}\n".format(ascii(message["message"])) + validationResultString += "WARNING: {}\n".format( + ascii(message["message"]) + ) else: infoCount += 1 - validationResultString += "INFO: {}\n".format(ascii(message["message"])) + validationResultString += "INFO: {}\n".format( + ascii(message["message"]) + ) elif message["type"] == "error": errorCount += 1 - validationResultString += "ERROR: {}\n".format(ascii(message["message"])) + validationResultString += "ERROR: {}\n".format( + ascii(message["message"]) + ) elif message["type"] == "non-document-error": - FreeCAD.Console.PrintWarning("W3C validator returned a non-document error:\n {}".format(message)) + FreeCAD.Console.PrintWarning( + "W3C validator returned a non-document error:\n {}".format(message) + ) return except urllib.error.HTTPError as e: @@ -142,27 +197,37 @@ class TestStartPage(unittest.TestCase): if errorCount > 0 or warningCount > 0: StartPage.exportTestFile() - FreeCAD.Console.PrintWarning("HTML validation failed: Start page source written to your home directory for analysis.") - self.fail("W3C Validator analysis shows the Start page has {} errors and {} warnings:\n\n{}".format(errorCount, warningCount, validationResultString)) + FreeCAD.Console.PrintWarning( + "HTML validation failed: Start page source written to your home directory for analysis." + ) + self.fail( + "W3C Validator analysis shows the Start page has {} errors and {} warnings:\n\n{}".format( + errorCount, warningCount, validationResultString + ) + ) elif infoCount > 0: - FreeCAD.Console.PrintWarning("The Start page is valid HTML, but the W3C sent back {} informative messages:\n{}.".format(infoCount,validationResultString)) + FreeCAD.Console.PrintWarning( + "The Start page is valid HTML, but the W3C sent back {} informative messages:\n{}.".format( + infoCount, validationResultString + ) + ) - def sanitize (self, html): + def sanitize(self, html): # Anonymize all local filenames fileRE = re.compile(r'"file:///.*?"') html = fileRE.sub(repl=r'"file:///A/B/C"', string=html) # Anonymize titles, which are used for mouseover text and might contain document information - titleRE = re.compile(r'title="[\s\S]*?"') # Some titles have newlines in them + titleRE = re.compile(r'title="[\s\S]*?"') # Some titles have newlines in them html = titleRE.sub(repl=r'title="Y"', string=html) # Anonymize the document names, which we display in

    tags - h4RE = re.compile(r'

    .*?

    ') - html = h4RE.sub(repl=r'

    Z

    ', string=html) + h4RE = re.compile(r"

    .*?

    ") + html = h4RE.sub(repl=r"

    Z

    ", string=html) # Remove any simple single-line paragraphs, which might contain document author information, file size information, etc. - pRE = re.compile(r'

    [^<]*?

    ') - html = pRE.sub(repl=r'

    X

    ', string=html) + pRE = re.compile(r"

    [^<]*?

    ") + html = pRE.sub(repl=r"

    X

    ", string=html) return html diff --git a/src/Mod/Start/start.dox b/src/Mod/Start/start.dox index 00d0df3869..0d1fe3c8c0 100644 --- a/src/Mod/Start/start.dox +++ b/src/Mod/Start/start.dox @@ -5,4 +5,3 @@ See \ref src/Mod/Draft/draft.dox as an example of how to populate this page */ - diff --git a/src/Mod/Surface/App/AppSurface.cpp b/src/Mod/Surface/App/AppSurface.cpp index 8217e88527..0505a788fc 100644 --- a/src/Mod/Surface/App/AppSurface.cpp +++ b/src/Mod/Surface/App/AppSurface.cpp @@ -43,20 +43,21 @@ namespace Surface class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Surface") + Module() + : Py::ExtensionModule("Surface") { - initialize("This module is the Surface module.");// register with Python + initialize("This module is the Surface module."); // register with Python } private: }; -PyObject *initModule() +PyObject* initModule() { return Base::Interpreter().addModule(new Module); } -}// namespace Surface +} // namespace Surface /* Python entry */ PyMOD_INIT_FUNC(Surface) @@ -64,16 +65,17 @@ PyMOD_INIT_FUNC(Surface) try { Base::Interpreter().runString("import Part"); } - catch (const Base::Exception &e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } - PyObject *mod = Surface::initModule(); + PyObject* mod = Surface::initModule(); Base::Console().Log("Loading Surface module... done\n"); Base::Interpreter().addType(&Surface::BlendPointPy::Type, mod, "BlendPoint"); Base::Interpreter().addType(&Surface::BlendCurvePy::Type, mod, "BlendCurve"); + // clang-format off // Add types to module Surface::Filling ::init(); Surface::Sewing ::init(); @@ -82,6 +84,7 @@ PyMOD_INIT_FUNC(Surface) Surface::Extend ::init(); Surface::FeatureBlendCurve ::init(); Surface::Sections ::init(); + // clang-format on PyMOD_Return(mod); } diff --git a/src/Mod/Surface/App/Blending/BlendCurve.cpp b/src/Mod/Surface/App/Blending/BlendCurve.cpp index d6396f2187..fb32c88652 100644 --- a/src/Mod/Surface/App/Blending/BlendCurve.cpp +++ b/src/Mod/Surface/App/Blending/BlendCurve.cpp @@ -71,8 +71,9 @@ Handle(Geom_BezierCurve) BlendCurve::compute() } Handle(Geom_BezierCurve) curve; - if (num_poles > (curve->MaxDegree() + 1))// use Geom_BezierCurve max degree + if (num_poles > (curve->MaxDegree() + 1)) { // use Geom_BezierCurve max degree Standard_Failure::Raise("number of constraints exceeds bezier curve capacity"); + } TColStd_Array1OfReal knots(1, 2 * num_poles); for (int i = 1; i <= num_poles; ++i) { @@ -89,7 +90,13 @@ Handle(Geom_BezierCurve) BlendCurve::compute() for (size_t i = 0; i < nb_pts; ++i) { math_Matrix bezier_eval(1, blendPoints[i].nbVectors(), 1, num_poles, 0.0); Standard_Integer first_non_zero; - BSplCLib::EvalBsplineBasis(blendPoints[i].nbVectors() - 1, num_poles, knots, params(cons_idx), first_non_zero, bezier_eval, Standard_False); + BSplCLib::EvalBsplineBasis(blendPoints[i].nbVectors() - 1, + num_poles, + knots, + params(cons_idx), + first_non_zero, + bezier_eval, + Standard_False); int idx2 = 1; for (int it2 = 0; it2 < blendPoints[i].nbVectors(); ++it2) { OCCmatrix.SetRow(row_idx, bezier_eval.Row(idx2)); @@ -104,14 +111,17 @@ Handle(Geom_BezierCurve) BlendCurve::compute() } math_Gauss gauss(OCCmatrix); gauss.Solve(res_x); - if (!gauss.IsDone()) + if (!gauss.IsDone()) { Standard_Failure::Raise("Failed to solve equations"); + } gauss.Solve(res_y); - if (!gauss.IsDone()) + if (!gauss.IsDone()) { Standard_Failure::Raise("Failed to solve equations"); + } gauss.Solve(res_z); - if (!gauss.IsDone()) + if (!gauss.IsDone()) { Standard_Failure::Raise("Failed to solve equations"); + } TColgp_Array1OfPnt poles(1, num_poles); for (int idx = 1; idx <= num_poles; ++idx) { @@ -120,7 +130,7 @@ Handle(Geom_BezierCurve) BlendCurve::compute() Handle(Geom_BezierCurve) bezier = new Geom_BezierCurve(poles); return bezier; } - catch (Standard_Failure &) { + catch (Standard_Failure&) { PyErr_SetString(Base::PyExc_FC_CADKernelError, "Failed to compute bezier curve"); } return nullptr; @@ -136,7 +146,7 @@ void BlendCurve::setSize(int i, double f, bool relative) } blendPoints[i].setSize(size); } - catch (Standard_Failure &e) { + catch (Standard_Failure& e) { PyErr_SetString(Base::PyExc_FC_CADKernelError, e.GetMessageString()); } } diff --git a/src/Mod/Surface/App/Blending/BlendCurve.h b/src/Mod/Surface/App/Blending/BlendCurve.h index f3da60cf3b..b580406e06 100644 --- a/src/Mod/Surface/App/Blending/BlendCurve.h +++ b/src/Mod/Surface/App/Blending/BlendCurve.h @@ -24,14 +24,14 @@ #define SURFACE_BLEND_CURVE_H #include -#include #include +#include namespace Surface { /*! -* Create a BezierCurve interpolating a list of BlendPoints -*/ + * Create a BezierCurve interpolating a list of BlendPoints + */ class SurfaceExport BlendCurve { public: @@ -39,25 +39,24 @@ public: BlendCurve() = default; /*! - * Constructor - *\param std::vector - */ + * Constructor + *\param std::vector + */ explicit BlendCurve(const std::vector& blendPointsList); ~BlendCurve() = default; /*! - * Perform the interpolate algorithm - *\return the BezierCurve - */ + * Perform the interpolate algorithm + *\return the BezierCurve + */ Handle(Geom_BezierCurve) compute(); /*! - * Set the size of the first derivative of a BlendPoint - *\param int index of the BlendPoint to modify - *\param double new size - *\param bool interpret new size relative to chordlength - */ + * Set the size of the first derivative of a BlendPoint + *\param int index of the BlendPoint to modify + *\param double new size + *\param bool interpret new size relative to chordlength + */ void setSize(int, double, bool); }; -}// namespace Surface +} // namespace Surface #endif - diff --git a/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp b/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp index 46a3de3b7d..a5dfb9eeeb 100644 --- a/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp +++ b/src/Mod/Surface/App/Blending/BlendCurvePyImp.cpp @@ -22,9 +22,11 @@ #include "PreCompiled.h" +// clang-format off #include "Blending/BlendCurvePy.h" #include "Blending/BlendCurvePy.cpp" #include "Blending/BlendPointPy.h" +// clang-format on #include #include @@ -35,44 +37,51 @@ std::string BlendCurvePy::representation() const return "BlendCurve"; } -PyObject *BlendCurvePy::PyMake(struct _typeobject *, PyObject *, PyObject *)// Python wrapper +PyObject* BlendCurvePy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of BlendCurvePy return new BlendCurvePy(new BlendCurve); } -int BlendCurvePy::PyInit(PyObject *args, PyObject * /*kwds*/) +int BlendCurvePy::PyInit(PyObject* args, PyObject* /*kwds*/) { - PyObject *b1; - PyObject *b2; + PyObject* b1; + PyObject* b2; - if (!PyArg_ParseTuple(args, "O!O!", &(Surface::BlendPointPy::Type), &b1, &(Surface::BlendPointPy::Type), &b2)) + if (!PyArg_ParseTuple(args, + "O!O!", + &(Surface::BlendPointPy::Type), + &b1, + &(Surface::BlendPointPy::Type), + &b2)) { return -1; + } std::vector bpList; - BlendPoint *geom1 = static_cast(b1)->getBlendPointPtr(); - BlendPoint *geom2 = static_cast(b2)->getBlendPointPtr(); + BlendPoint* geom1 = static_cast(b1)->getBlendPointPtr(); + BlendPoint* geom2 = static_cast(b2)->getBlendPointPtr(); bpList.emplace_back(*geom1); bpList.emplace_back(*geom2); this->getBlendCurvePtr()->blendPoints = bpList; return 0; } -PyObject *BlendCurvePy::compute(PyObject * args) +PyObject* BlendCurvePy::compute(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - BlendCurve *bc = getBlendCurvePtr(); + BlendCurve* bc = getBlendCurvePtr(); Handle(Geom_BezierCurve) gc = bc->compute(); return new Part::BezierCurvePy(new Part::GeomBezierCurve(gc)); } -PyObject *BlendCurvePy::setSize(PyObject *args) +PyObject* BlendCurvePy::setSize(PyObject* args) { int i; double size; - PyObject *relative = Py_True; + PyObject* relative = Py_True; if (!PyArg_ParseTuple(args, "idO!", &i, &size, &PyBool_Type, &relative)) { return nullptr; } @@ -80,18 +89,18 @@ PyObject *BlendCurvePy::setSize(PyObject *args) getBlendCurvePtr()->setSize(i, size, Base::asBoolean(relative)); Py_Return; } - catch (Standard_Failure &e) { + catch (Standard_Failure& e) { PyErr_SetString(Base::PyExc_FC_CADKernelError, e.GetMessageString()); return nullptr; } } -PyObject *BlendCurvePy::getCustomAttributes(const char * /*attr*/) const +PyObject* BlendCurvePy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } -int BlendCurvePy::setCustomAttributes(const char * /*attr*/, PyObject * /*obj*/) +int BlendCurvePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { return 0; } diff --git a/src/Mod/Surface/App/Blending/BlendPoint.cpp b/src/Mod/Surface/App/Blending/BlendPoint.cpp index 62a4d7b128..8e6f24d99f 100644 --- a/src/Mod/Surface/App/Blending/BlendPoint.cpp +++ b/src/Mod/Surface/App/Blending/BlendPoint.cpp @@ -33,9 +33,8 @@ using namespace Surface; BlendPoint::BlendPoint(const std::vector& vectorList) - : vectors{vectorList} -{ -} + : vectors {vectorList} +{} BlendPoint::BlendPoint() { diff --git a/src/Mod/Surface/App/Blending/BlendPoint.h b/src/Mod/Surface/App/Blending/BlendPoint.h index 20b12706a0..1b53be4539 100644 --- a/src/Mod/Surface/App/Blending/BlendPoint.h +++ b/src/Mod/Surface/App/Blending/BlendPoint.h @@ -24,8 +24,8 @@ #define SURFACE_BLEND_POINT_H -#include #include +#include #include @@ -33,9 +33,9 @@ namespace Surface { /*! -* Create a list of vectors formed by a point and some derivatives -* obtained from a curve or surface -*/ + * Create a list of vectors formed by a point and some derivatives + * obtained from a curve or surface + */ class SurfaceExport BlendPoint { public: @@ -43,34 +43,33 @@ public: BlendPoint(); /*! - * Constructor - *\param std::vector - */ + * Constructor + *\param std::vector + */ explicit BlendPoint(const std::vector& vectorList); ~BlendPoint() = default; /*! - * Scale the blendpoint vectors - *\param double scaling factor - */ + * Scale the blendpoint vectors + *\param double scaling factor + */ void multiply(double f); /*! - * Resize the blendpoint vectors - * by setting the size of the first derivative - *\param double new size - */ + * Resize the blendpoint vectors + * by setting the size of the first derivative + *\param double new size + */ void setSize(double f); /*! - *\return continuity of this BlendPoint - */ + *\return continuity of this BlendPoint + */ int getContinuity(); /*! - *\return Number of vectors of this BlendPoint - */ + *\return Number of vectors of this BlendPoint + */ int nbVectors(); private: }; -}// namespace Surface +} // namespace Surface #endif - diff --git a/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp b/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp index 72f87af857..e7aece13a9 100644 --- a/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp +++ b/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp @@ -25,9 +25,13 @@ #include #include #endif + +// clang-format off #include "Blending/BlendPoint.h" #include "Blending/BlendPointPy.h" #include "Blending/BlendPointPy.cpp" +// clang-format on + #include #include #include @@ -47,15 +51,15 @@ std::string BlendPointPy::representation() const return str.str(); } -PyObject *BlendPointPy::PyMake(struct _typeobject *, PyObject *, PyObject *)// Python wrapper +PyObject* BlendPointPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of BlendPointPy return new BlendPointPy(new BlendPoint); } -int BlendPointPy::PyInit(PyObject *args, PyObject *) +int BlendPointPy::PyInit(PyObject* args, PyObject*) { - PyObject *plist; + PyObject* plist; std::vector vecs; if (PyArg_ParseTuple(args, "O", &plist)) { Py::Sequence list(plist); @@ -82,14 +86,15 @@ int BlendPointPy::PyInit(PyObject *args, PyObject *) double param; int cont; - PyObject *pcObj; + PyObject* pcObj; PyErr_Clear(); // Create a curve with an edge, parameter and continiuity. if (PyArg_ParseTuple(args, "O!di", &(Part::TopoShapePy::Type), &pcObj, ¶m, &cont)) { try { gp_Pnt Pt; - TopoDS_Shape shape = static_cast(pcObj)->getTopoShapePtr()->getShape(); - const TopoDS_Edge &e = TopoDS::Edge(shape); + TopoDS_Shape shape = + static_cast(pcObj)->getTopoShapePtr()->getShape(); + const TopoDS_Edge& e = TopoDS::Edge(shape); BRepAdaptor_Curve adapt(e); if (param < adapt.FirstParameter() || param > adapt.LastParameter()) { PyErr_Warn(PyExc_UserWarning, "BlendPoint: edge is not a closed curve"); @@ -109,39 +114,42 @@ int BlendPointPy::PyInit(PyObject *args, PyObject *) this->getBlendPointPtr()->vectors = vecs; return 0; } - catch (const std::exception &e) { + catch (const std::exception& e) { PyErr_SetString(PyExc_RuntimeError, e.what()); return -1; } } - PyErr_SetString(PyExc_TypeError, "supported signatures:\n" + PyErr_SetString(PyExc_TypeError, + "supported signatures:\n" "BlendPoint()\n" "BlendPoint(list of Vector)\n" "BlendPoint(edge, parameter and continiuity)\n"); return -1; } -PyObject *BlendPointPy::setSize(PyObject *args) +PyObject* BlendPointPy::setSize(PyObject* args) { double size = 1.0; - if (!PyArg_ParseTuple(args, "d", &size)) + if (!PyArg_ParseTuple(args, "d", &size)) { return nullptr; + } try { getBlendPointPtr()->setSize(size); Py_Return; } - catch (Standard_Failure &) { + catch (Standard_Failure&) { PyErr_SetString(Base::PyExc_FC_CADKernelError, "Failed to set size"); return nullptr; } } -PyObject *BlendPointPy::getSize(PyObject *args) +PyObject* BlendPointPy::getSize(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } int nb = getBlendPointPtr()->nbVectors(); if (nb >= 2) { double bpTangentLength = getBlendPointPtr()->vectors[1].Length(); @@ -154,18 +162,18 @@ PyObject *BlendPointPy::getSize(PyObject *args) Py::List BlendPointPy::getVectors() const { - BlendPoint *bp = getBlendPointPtr(); + BlendPoint* bp = getBlendPointPtr(); Py::List vecs; for (const auto& p : bp->vectors) { - Base::VectorPy *vec = new Base::VectorPy(p); + Base::VectorPy* vec = new Base::VectorPy(p); vecs.append(Py::asObject(vec)); } return vecs; } -PyObject *BlendPointPy::setvectors(PyObject *args) +PyObject* BlendPointPy::setvectors(PyObject* args) { - PyObject *plist; + PyObject* plist; if (!PyArg_ParseTuple(args, "O", &plist)) { PyErr_SetString(PyExc_TypeError, "List of vectors required."); return nullptr; @@ -179,17 +187,17 @@ PyObject *BlendPointPy::setvectors(PyObject *args) vecs.emplace_back(pole); } - BlendPoint *bp = getBlendPointPtr(); + BlendPoint* bp = getBlendPointPtr(); bp->vectors = vecs; Py_Return; } -PyObject *BlendPointPy::getCustomAttributes(const char * /*attr*/) const +PyObject* BlendPointPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } -int BlendPointPy::setCustomAttributes(const char * /*attr*/, PyObject * /*obj*/) +int BlendPointPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { return 0; } diff --git a/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp b/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp index c7c1c4c515..41d115f035 100644 --- a/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp +++ b/src/Mod/Surface/App/Blending/FeatureBlendCurve.cpp @@ -30,79 +30,127 @@ #include #endif -#include #include "Mod/Surface/App/Blending/BlendCurve.h" #include "Mod/Surface/App/Blending/BlendPoint.h" +#include #include "FeatureBlendCurve.h" using namespace Surface; -const App::PropertyFloatConstraint::Constraints StartParameterConstraint = {0.0, 1.0, 0.05}; -const App::PropertyFloatConstraint::Constraints EndParameterConstraint = {0.0, 1.0, 0.05}; -const App::PropertyIntegerConstraint::Constraints StartContinuityConstraint = {0, 25, 1}; -const App::PropertyIntegerConstraint::Constraints EndContinuityConstraint = {0, 25, 1}; +const App::PropertyFloatConstraint::Constraints ParameterConstraint = {0.0, 1.0, 0.05}; +const App::PropertyIntegerConstraint::Constraints ContinuityConstraint = {0, 25, 1}; +const App::PropertyFloatConstraint::Constraints SizeConstraint = {-100.0, 100.0, 0.1}; PROPERTY_SOURCE(Surface::FeatureBlendCurve, Part::Spline) FeatureBlendCurve::FeatureBlendCurve() { - ADD_PROPERTY_TYPE(StartEdge, (nullptr), "FirstEdge", App::Prop_None, ""); - ADD_PROPERTY_TYPE(StartContinuity, (2), "FirstEdge", App::Prop_None, ""); - StartContinuity.setConstraints(&StartContinuityConstraint); - ADD_PROPERTY_TYPE(StartParameter, (0.0f), "FirstEdge", App::Prop_None, ""); - StartParameter.setConstraints(&StartParameterConstraint); - ADD_PROPERTY_TYPE(StartSize, (1.0f), "FirstEdge", App::Prop_None, ""); + ADD_PROPERTY_TYPE(StartEdge, + (nullptr), + "FirstEdge", + App::Prop_None, + "Edge support of the start point"); + ADD_PROPERTY_TYPE(StartContinuity, + (2), + "FirstEdge", + App::Prop_None, + "Geometric continuity at start point"); + StartContinuity.setConstraints(&ContinuityConstraint); + ADD_PROPERTY_TYPE(StartParameter, + (0.0f), + "FirstEdge", + App::Prop_None, + "Parameter of start point along edge"); + StartParameter.setConstraints(&ParameterConstraint); + ADD_PROPERTY_TYPE(StartSize, + (1.0f), + "FirstEdge", + App::Prop_None, + "Size of derivatives at start point"); + StartSize.setConstraints(&SizeConstraint); + + ADD_PROPERTY_TYPE(EndEdge, + (nullptr), + "SecondEdge", + App::Prop_None, + "Edge support of the end point"); + ADD_PROPERTY_TYPE(EndContinuity, + (2), + "SecondEdge", + App::Prop_None, + "Geometric continuity at end point"); + EndContinuity.setConstraints(&ContinuityConstraint); + ADD_PROPERTY_TYPE(EndParameter, + (0.0f), + "SecondEdge", + App::Prop_None, + "Parameter of end point along edge"); + EndParameter.setConstraints(&ParameterConstraint); + ADD_PROPERTY_TYPE(EndSize, + (1.0f), + "SecondEdge", + App::Prop_None, + "Size of derivatives at end point"); + EndSize.setConstraints(&SizeConstraint); - ADD_PROPERTY_TYPE(EndEdge, (nullptr), "SecondEdge", App::Prop_None, ""); - ADD_PROPERTY_TYPE(EndContinuity, (2), "SecondEdge", App::Prop_None, ""); - EndContinuity.setConstraints(&EndContinuityConstraint); - ADD_PROPERTY_TYPE(EndParameter, (0.0f), "SecondEdge", App::Prop_None, ""); - EndParameter.setConstraints(&EndParameterConstraint); - ADD_PROPERTY_TYPE(EndSize, (1.0f), "SecondEdge", App::Prop_None, ""); Handle(Geom_BezierCurve) maxDegreeCurve; maxDegree = maxDegreeCurve->MaxDegree(); } short FeatureBlendCurve::mustExecute() const { - if (StartEdge.isTouched()) + if (StartEdge.isTouched()) { return 1; - if (StartParameter.isTouched()) + } + if (StartParameter.isTouched()) { return 1; - if (StartContinuity.isTouched()) + } + if (StartContinuity.isTouched()) { return 1; - if (StartSize.isTouched()) + } + if (StartSize.isTouched()) { return 1; - if (EndEdge.isTouched()) + } + if (EndEdge.isTouched()) { return 1; - if (EndParameter.isTouched()) + } + if (EndParameter.isTouched()) { return 1; - if (EndContinuity.isTouched()) + } + if (EndContinuity.isTouched()) { return 1; - if (EndSize.isTouched()) + } + if (EndSize.isTouched()) { return 1; + } return 0; } -BlendPoint FeatureBlendCurve::GetBlendPoint(App::PropertyLinkSub &link, App::PropertyFloatConstraint ¶m, App::PropertyIntegerConstraint &continuity) +BlendPoint FeatureBlendCurve::GetBlendPoint(App::PropertyLinkSub& link, + App::PropertyFloatConstraint& param, + App::PropertyIntegerConstraint& continuity) { auto linked = link.getValue(); TopoDS_Shape axEdge; if (link.getSubValues().size() > 0 && link.getSubValues()[0].length() > 0) { - axEdge = Feature::getTopoShape(linked, link.getSubValues()[0].c_str(), true /*need element*/).getShape(); + axEdge = + Feature::getTopoShape(linked, link.getSubValues()[0].c_str(), true /*need element*/) + .getShape(); } else { axEdge = Feature::getShape(linked); } - if (axEdge.IsNull()) + if (axEdge.IsNull()) { throw Base::ValueError("DirLink shape is null"); - if (axEdge.ShapeType() != TopAbs_EDGE) + } + if (axEdge.ShapeType() != TopAbs_EDGE) { throw Base::TypeError("DirLink shape is not an edge"); - const TopoDS_Edge &e = TopoDS::Edge(axEdge); + } + const TopoDS_Edge& e = TopoDS::Edge(axEdge); BRepAdaptor_Curve adapt(e); double fp = adapt.FirstParameter(); double lp = adapt.LastParameter(); @@ -127,7 +175,7 @@ BlendPoint FeatureBlendCurve::GetBlendPoint(App::PropertyLinkSub &link, App::Pro return bp; } -App::DocumentObjectExecReturn *FeatureBlendCurve::execute() +App::DocumentObjectExecReturn* FeatureBlendCurve::execute() { BlendPoint bp1 = GetBlendPoint(StartEdge, StartParameter, StartContinuity); BlendPoint bp2 = GetBlendPoint(EndEdge, EndParameter, EndContinuity); @@ -155,26 +203,25 @@ double FeatureBlendCurve::RelativeToRealParameters(double relativeValue, double } -void FeatureBlendCurve::onChanged(const App::Property *prop) +void FeatureBlendCurve::onChanged(const App::Property* prop) { - // using a mutex and lock to protect a recursive calling when setting the new values - if (lockOnChangeMutex) - return; - Base::StateLocker lock(lockOnChangeMutex); - if (prop == &StartContinuity) { - auto changedStartProp = dynamic_cast(prop); - - if (changedStartProp->getValue() > (maxDegree - 2 - EndContinuity.getValue())) { - - StartContinuity.setValue(maxDegree - 2 - EndContinuity.getValue()); + long maxValue = maxDegree - 2 - EndContinuity.getValue(); + if (StartContinuity.getValue() > maxValue) { + StartContinuity.setValue(maxValue); } } else if (prop == &EndContinuity) { - auto changedEndProp = dynamic_cast(prop); - - if (changedEndProp->getValue() > (maxDegree - 2 - StartContinuity.getValue())) { - EndContinuity.setValue(maxDegree - 2 - StartContinuity.getValue()); + long maxValue = maxDegree - 2 - StartContinuity.getValue(); + if (EndContinuity.getValue() > maxValue) { + EndContinuity.setValue(maxValue); + } + } + if (prop == &StartContinuity || prop == &StartParameter || prop == &StartSize + || prop == &EndContinuity || prop == &EndParameter || prop == &EndSize) { + if (!isRestoring()) { + App::DocumentObjectExecReturn* ret = recompute(); + delete ret; } } Part::Spline::onChanged(prop); diff --git a/src/Mod/Surface/App/Blending/FeatureBlendCurve.h b/src/Mod/Surface/App/Blending/FeatureBlendCurve.h index a792e83bca..717a66374a 100644 --- a/src/Mod/Surface/App/Blending/FeatureBlendCurve.h +++ b/src/Mod/Surface/App/Blending/FeatureBlendCurve.h @@ -27,8 +27,8 @@ #include #include #include -#include #include +#include namespace Surface { @@ -38,37 +38,37 @@ class SurfaceExport FeatureBlendCurve: public Part::Spline PROPERTY_HEADER_WITH_OVERRIDE(Surface::FeatureBlendCurve); public: - FeatureBlendCurve(); App::PropertyLinkSub StartEdge; App::PropertyFloatConstraint StartParameter; App::PropertyIntegerConstraint StartContinuity; - App::PropertyFloat StartSize; + App::PropertyFloatConstraint StartSize; App::PropertyLinkSub EndEdge; App::PropertyFloatConstraint EndParameter; App::PropertyIntegerConstraint EndContinuity; - App::PropertyFloat EndSize; + App::PropertyFloatConstraint EndSize; Standard_Integer maxDegree; - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; - const char *getViewProviderName() const override + const char* getViewProviderName() const override { return "SurfaceGui::ViewProviderBlendCurve"; } private: - BlendPoint GetBlendPoint(App::PropertyLinkSub &link, App::PropertyFloatConstraint ¶m, App::PropertyIntegerConstraint &Continuity); + BlendPoint GetBlendPoint(App::PropertyLinkSub& link, + App::PropertyFloatConstraint& param, + App::PropertyIntegerConstraint& Continuity); double RelativeToRealParameters(double, double, double); - bool lockOnChangeMutex{false}; protected: - void onChanged(const App::Property *prop) override; + void onChanged(const App::Property* prop) override; }; -}//Namespace Surface +} // Namespace Surface #endif diff --git a/src/Mod/Surface/App/FeatureCut.cpp b/src/Mod/Surface/App/FeatureCut.cpp index 1d3401728d..c2de5a202c 100644 --- a/src/Mod/Surface/App/FeatureCut.cpp +++ b/src/Mod/Surface/App/FeatureCut.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "FeatureCut.h" @@ -34,41 +34,43 @@ PROPERTY_SOURCE(Surface::Cut, Part::Feature) Cut::Cut() { - ADD_PROPERTY(ShapeList,(nullptr,"TopoDS_Shape")); + ADD_PROPERTY(ShapeList, (nullptr, "TopoDS_Shape")); ShapeList.setScope(App::LinkScope::Global); } -//Check if any components of the surface have been modified +// Check if any components of the surface have been modified short Cut::mustExecute() const { - if (ShapeList.isTouched()) + if (ShapeList.isTouched()) { return 1; + } return 0; } -App::DocumentObjectExecReturn *Cut::execute() +App::DocumentObjectExecReturn* Cut::execute() { - //Perform error checking + // Perform error checking try { std::vector shapes = ShapeList.getValues(); - if (shapes.size() != 2){ - return new App::DocumentObjectExecReturn("Two shapes must be entered at a time for a cut operation"); + if (shapes.size() != 2) { + return new App::DocumentObjectExecReturn( + "Two shapes must be entered at a time for a cut operation"); } Part::TopoShape ts1; Part::TopoShape ts2; - //Get first toposhape + // Get first toposhape if (shapes[0]->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { - ts1 = static_cast(shapes[0])->Shape.getShape(); //Part::TopoShape 1 + ts1 = static_cast(shapes[0])->Shape.getShape(); // Part::TopoShape 1 } else { return new App::DocumentObjectExecReturn("Shape1 not from Part::Feature"); } - //Get second toposhape + // Get second toposhape if (shapes[1]->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { ts2 = static_cast(shapes[1])->Shape.getShape(); } @@ -76,12 +78,12 @@ App::DocumentObjectExecReturn *Cut::execute() return new App::DocumentObjectExecReturn("Shape2 not from Part::Feature"); } - //Cut Shape1 by Shape2 + // Cut Shape1 by Shape2 TopoDS_Shape aCutShape; aCutShape = ts1.cut(ts2.getShape()); - //Check if resulting shell is null - if (aCutShape.IsNull()){ + // Check if resulting shell is null + if (aCutShape.IsNull()) { return new App::DocumentObjectExecReturn("Resulting shape is null"); } diff --git a/src/Mod/Surface/App/FeatureCut.h b/src/Mod/Surface/App/FeatureCut.h index 3f5227dbc0..ae9bba31ed 100644 --- a/src/Mod/Surface/App/FeatureCut.h +++ b/src/Mod/Surface/App/FeatureCut.h @@ -31,25 +31,24 @@ namespace Surface { -class SurfaceExport Cut : public Part::Feature +class SurfaceExport Cut: public Part::Feature { PROPERTY_HEADER_WITH_OVERRIDE(Surface::Cut); public: Cut(); - App::PropertyLinkSubList ShapeList; //Shapes to be cut. + App::PropertyLinkSubList ShapeList; // Shapes to be cut. // recalculate the feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; /// returns the type name of the view provider -// const char* getViewProviderName(void) const { -// return "SurfaceGui::ViewProviderCut"; -// } - + // const char* getViewProviderName(void) const { + // return "SurfaceGui::ViewProviderCut"; + // } }; -}//Namespace Surface +} // Namespace Surface #endif diff --git a/src/Mod/Surface/App/FeatureExtend.cpp b/src/Mod/Surface/App/FeatureExtend.cpp index 31f19f55b2..a887d36733 100644 --- a/src/Mod/Surface/App/FeatureExtend.cpp +++ b/src/Mod/Surface/App/FeatureExtend.cpp @@ -22,17 +22,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -49,7 +49,7 @@ PROPERTY_SOURCE(Surface::Extend, Part::Spline) Extend::Extend() { - ADD_PROPERTY(Face,(nullptr)); + ADD_PROPERTY(Face, (nullptr)); Face.setScope(App::LinkScope::Global); ADD_PROPERTY(Tolerance, (0.1)); Tolerance.setConstraints(&ToleranceRange); @@ -74,32 +74,40 @@ Extend::Extend() short Extend::mustExecute() const { - if (Face.isTouched()) + if (Face.isTouched()) { return 1; - if (ExtendUNeg.isTouched()) + } + if (ExtendUNeg.isTouched()) { return 1; - if (ExtendUPos.isTouched()) - return 1; - if (ExtendVNeg.isTouched()) + } + if (ExtendUPos.isTouched()) { return 1; - if (ExtendVPos.isTouched()) - return 1; + } + if (ExtendVNeg.isTouched()) { + return 1; + } + if (ExtendVPos.isTouched()) { + return 1; + } return 0; } -App::DocumentObjectExecReturn *Extend::execute() +App::DocumentObjectExecReturn* Extend::execute() { App::DocumentObject* part = Face.getValue(); - if (!part || !part->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) + if (!part || !part->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { return new App::DocumentObjectExecReturn("No shape linked."); + } const auto& faces = Face.getSubValues(); - if (faces.size() != 1) + if (faces.size() != 1) { return new App::DocumentObjectExecReturn("Not exactly one sub-shape linked."); + } - TopoDS_Shape shape = static_cast(part) - ->Shape.getShape().getSubShape(faces[0].c_str()); - if (shape.IsNull() || shape.ShapeType() != TopAbs_FACE) + TopoDS_Shape shape = + static_cast(part)->Shape.getShape().getSubShape(faces[0].c_str()); + if (shape.IsNull() || shape.ShapeType() != TopAbs_FACE) { return new App::DocumentObjectExecReturn("Sub-shape is not a face."); + } const TopoDS_Face& face = TopoDS::Face(shape); BRepAdaptor_Surface adapt(face); @@ -110,23 +118,23 @@ App::DocumentObjectExecReturn *Extend::execute() double ur = u2 - u1; double vr = v2 - v1; - double eu1 = u1 - ur*ExtendUNeg.getValue(); - double eu2 = u2 + ur*ExtendUPos.getValue(); - double ev1 = v1 - vr*ExtendVNeg.getValue(); - double ev2 = v2 + vr*ExtendVPos.getValue(); + double eu1 = u1 - ur * ExtendUNeg.getValue(); + double eu2 = u2 + ur * ExtendUPos.getValue(); + double ev1 = v1 - vr * ExtendVNeg.getValue(); + double ev2 = v2 + vr * ExtendVPos.getValue(); double eur = eu2 - eu1; double evr = ev2 - ev1; long numU = SampleU.getValue(); long numV = SampleV.getValue(); TColgp_Array2OfPnt approxPoints(1, numU, 1, numV); - for (long u=0; u(prop); - if (changedValue) - { + if (changedValue) { ExtendUNeg.setValue(changedValue->getValue()); ExtendUPos.setValue(changedValue->getValue()); } } } - if (ExtendVSymetric.getValue()) - { - if (prop == &ExtendVNeg || prop == &ExtendVPos) - { + if (ExtendVSymetric.getValue()) { + if (prop == &ExtendVNeg || prop == &ExtendVPos) { auto changedValue = dynamic_cast(prop); - if (changedValue) - { + if (changedValue) { ExtendVNeg.setValue(changedValue->getValue()); ExtendVPos.setValue(changedValue->getValue()); } @@ -182,18 +185,20 @@ void Extend::onChanged(const App::Property* prop) Part::Spline::onChanged(prop); } -void Extend::handleChangedPropertyName(Base::XMLReader &reader, - const char * TypeName, - const char *PropName) +void Extend::handleChangedPropertyName(Base::XMLReader& reader, + const char* TypeName, + const char* PropName) { Base::Type type = Base::Type::fromName(TypeName); - if (App::PropertyFloatConstraint::getClassTypeId() == type && strcmp(PropName, "ExtendU") == 0) { + if (App::PropertyFloatConstraint::getClassTypeId() == type + && strcmp(PropName, "ExtendU") == 0) { App::PropertyFloatConstraint v; v.Restore(reader); ExtendUNeg.setValue(v.getValue()); ExtendUPos.setValue(v.getValue()); } - else if (App::PropertyFloatConstraint::getClassTypeId() == type && strcmp(PropName, "ExtendV") == 0) { + else if (App::PropertyFloatConstraint::getClassTypeId() == type + && strcmp(PropName, "ExtendV") == 0) { App::PropertyFloatConstraint v; v.Restore(reader); ExtendVNeg.setValue(v.getValue()); diff --git a/src/Mod/Surface/App/FeatureExtend.h b/src/Mod/Surface/App/FeatureExtend.h index c85335b4bb..ed4bfbef54 100644 --- a/src/Mod/Surface/App/FeatureExtend.h +++ b/src/Mod/Surface/App/FeatureExtend.h @@ -31,7 +31,7 @@ namespace Surface { -class SurfaceExport Extend : public Part::Spline +class SurfaceExport Extend: public Part::Spline { PROPERTY_HEADER_WITH_OVERRIDE(Surface::Extend); @@ -42,31 +42,32 @@ public: App::PropertyFloatConstraint Tolerance; App::PropertyFloatConstraint ExtendUNeg; App::PropertyFloatConstraint ExtendUPos; - App::PropertyBool ExtendUSymetric; + App::PropertyBool ExtendUSymetric; App::PropertyFloatConstraint ExtendVNeg; App::PropertyFloatConstraint ExtendVPos; - App::PropertyBool ExtendVSymetric; + App::PropertyBool ExtendVSymetric; App::PropertyIntegerConstraint SampleU; App::PropertyIntegerConstraint SampleV; // recalculate the feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; /// returns the type name of the view provider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "SurfaceGui::ViewProviderExtend"; } protected: void onChanged(const App::Property* prop) override; - void handleChangedPropertyName(Base::XMLReader &reader, - const char * TypeName, - const char *PropName) override; + void handleChangedPropertyName(Base::XMLReader& reader, + const char* TypeName, + const char* PropName) override; private: - bool lockOnChangeMutex{false}; + bool lockOnChangeMutex {false}; }; -}//Namespace Surface +} // Namespace Surface #endif diff --git a/src/Mod/Surface/App/FeatureFilling.cpp b/src/Mod/Surface/App/FeatureFilling.cpp index a3d6512fbf..e5791c761f 100644 --- a/src/Mod/Surface/App/FeatureFilling.cpp +++ b/src/Mod/Surface/App/FeatureFilling.cpp @@ -22,14 +22,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #include "FeatureFilling.h" @@ -39,17 +39,23 @@ using namespace Surface; PROPERTY_SOURCE(Surface::Filling, Part::Spline) -//Initial values +// Initial values Filling::Filling() { - ADD_PROPERTY_TYPE(BoundaryEdges,(nullptr,""), "Filling", App::Prop_None, "Boundary Edges (C0 is required for edges without a corresponding face)"); + // clang-format off + ADD_PROPERTY_TYPE(BoundaryEdges,(nullptr,""), "Filling", App::Prop_None, + "Boundary Edges (C0 is required for edges without a corresponding face)"); ADD_PROPERTY_TYPE(BoundaryFaces,(""), "Filling", App::Prop_None, "Boundary Faces"); - ADD_PROPERTY_TYPE(BoundaryOrder,(-1), "Filling", App::Prop_None, "Order of constraint on boundary faces (C0, G1 and G2 are possible)"); + ADD_PROPERTY_TYPE(BoundaryOrder,(-1), "Filling", App::Prop_None, + "Order of constraint on boundary faces (C0, G1 and G2 are possible)"); - ADD_PROPERTY_TYPE(UnboundEdges,(nullptr,""), "Filling", App::Prop_None, "Unbound constraint edges (C0 is required for edges without a corresponding face)"); - ADD_PROPERTY_TYPE(UnboundFaces,(""), "Filling", App::Prop_None, "Unbound constraint faces"); - ADD_PROPERTY_TYPE(UnboundOrder,(-1), "Filling", App::Prop_None, "Order of constraint on curve faces (C0, G1 and G2 are possible)"); + ADD_PROPERTY_TYPE(UnboundEdges,(nullptr,""), "Filling", App::Prop_None, + "Unbound constraint edges (C0 is required for edges without a corresponding face)"); + ADD_PROPERTY_TYPE(UnboundFaces,(""), "Filling", App::Prop_None, + "Unbound constraint faces"); + ADD_PROPERTY_TYPE(UnboundOrder,(-1), "Filling", App::Prop_None, + "Order of constraint on curve faces (C0, G1 and G2 are possible)"); ADD_PROPERTY_TYPE(FreeFaces,(nullptr,""), "Filling", App::Prop_None, "Free constraint on a face"); ADD_PROPERTY_TYPE(FreeOrder,(0), "Filling", App::Prop_None, "Order of constraint on free faces"); @@ -58,7 +64,8 @@ Filling::Filling() ADD_PROPERTY_TYPE(InitialFace,(nullptr), "Filling", App::Prop_None, "Initial surface to use"); ADD_PROPERTY_TYPE(Degree,(3), "Filling", App::Prop_None, "Starting degree"); - ADD_PROPERTY_TYPE(PointsOnCurve,(15), "Filling", App::Prop_None, "Number of points on an edge for constraint"); + ADD_PROPERTY_TYPE(PointsOnCurve,(15), "Filling", App::Prop_None, + "Number of points on an edge for constraint"); ADD_PROPERTY_TYPE(Iterations,(2), "Filling", App::Prop_None, "Number of iterations"); ADD_PROPERTY_TYPE(Anisotropy,(false), "Filling", App::Prop_None, "Anisotropy"); ADD_PROPERTY_TYPE(Tolerance2d,(0.00001), "Filling", App::Prop_None, "2D Tolerance"); @@ -67,6 +74,7 @@ Filling::Filling() ADD_PROPERTY_TYPE(TolCurvature,(0.1), "Filling", App::Prop_None, "G2 tolerance"); ADD_PROPERTY_TYPE(MaximumDegree,(8), "Filling", App::Prop_None, "Maximum curve degree"); ADD_PROPERTY_TYPE(MaximumSegments,(9), "Filling", App::Prop_None, "Maximum number of segments"); + // clang-format on BoundaryEdges.setScope(App::LinkScope::Global); UnboundEdges.setScope(App::LinkScope::Global); @@ -87,27 +95,15 @@ Filling::Filling() short Filling::mustExecute() const { - if (BoundaryEdges.isTouched() || - BoundaryFaces.isTouched() || - BoundaryOrder.isTouched() || - UnboundEdges.isTouched() || - UnboundFaces.isTouched() || - UnboundOrder.isTouched() || - FreeFaces.isTouched() || - FreeOrder.isTouched() || - Points.isTouched() || - InitialFace.isTouched() || - Degree.isTouched() || - PointsOnCurve.isTouched() || - Iterations.isTouched() || - Anisotropy.isTouched() || - Tolerance2d.isTouched() || - Tolerance3d.isTouched() || - TolAngular.isTouched() || - TolCurvature.isTouched() || - MaximumDegree.isTouched() || - MaximumSegments.isTouched()) + if (BoundaryEdges.isTouched() || BoundaryFaces.isTouched() || BoundaryOrder.isTouched() + || UnboundEdges.isTouched() || UnboundFaces.isTouched() || UnboundOrder.isTouched() + || FreeFaces.isTouched() || FreeOrder.isTouched() || Points.isTouched() + || InitialFace.isTouched() || Degree.isTouched() || PointsOnCurve.isTouched() + || Iterations.isTouched() || Anisotropy.isTouched() || Tolerance2d.isTouched() + || Tolerance3d.isTouched() || TolAngular.isTouched() || TolCurvature.isTouched() + || MaximumDegree.isTouched() || MaximumSegments.isTouched()) { return 1; + } return 0; } @@ -137,7 +133,8 @@ void Filling::addConstraints(BRepFill_Filling& builder, if (edge_obj.size() == edge_sub.size()) { // BRepFill_Filling crashes if the boundary edges are not added in a consecutive order. - // these edges are first added to a test wire to check that they can be securely added to the Filling algo + // these edges are first added to a test wire to check that they can be securely added to + // the Filling algo BRepBuilderAPI_MakeWire testWire; for (std::size_t index = 0; index < edge_obj.size(); index++) { // get the part object @@ -167,7 +164,8 @@ void Filling::addConstraints(BRepFill_Filling& builder, builder.Add(TopoDS::Edge(edge), cont, bnd); } else { - Standard_Failure::Raise("Boundary edges must be added in a consecutive order"); + Standard_Failure::Raise( + "Boundary edges must be added in a consecutive order"); } } } @@ -185,7 +183,8 @@ void Filling::addConstraints(BRepFill_Filling& builder, builder.Add(TopoDS::Edge(edge), TopoDS::Face(face), cont, bnd); } else { - Standard_Failure::Raise("Boundary edges must be added in a consecutive order"); + Standard_Failure::Raise( + "Boundary edges must be added in a consecutive order"); } } } @@ -214,8 +213,7 @@ void Filling::addConstraints(BRepFill_Filling& builder, auto face_sub = faces.getSubValues(); auto contvals = orders.getValues(); - if (face_obj.size() == face_sub.size() && - face_obj.size() == contvals.size()) { + if (face_obj.size() == face_sub.size() && face_obj.size() == contvals.size()) { for (std::size_t index = 0; index < face_obj.size(); index++) { App::DocumentObject* obj = face_obj[index]; const std::string& sub = face_sub[index]; @@ -237,8 +235,7 @@ void Filling::addConstraints(BRepFill_Filling& builder, } } -void Filling::addConstraints(BRepFill_Filling& builder, - const App::PropertyLinkSubList& pointsList) +void Filling::addConstraints(BRepFill_Filling& builder, const App::PropertyLinkSubList& pointsList) { auto points = pointsList.getSubListValues(); for (const auto& it : points) { @@ -257,12 +254,12 @@ void Filling::addConstraints(BRepFill_Filling& builder, } } -App::DocumentObjectExecReturn *Filling::execute() +App::DocumentObjectExecReturn* Filling::execute() { - //Assign Variables - unsigned int degree = Degree.getValue(); + // Assign Variables + unsigned int degree = Degree.getValue(); unsigned int ptsoncurve = PointsOnCurve.getValue(); - unsigned int numIter = Iterations.getValue(); + unsigned int numIter = Iterations.getValue(); bool anisotropy = Anisotropy.getValue(); double tol2d = Tolerance2d.getValue(); double tol3d = Tolerance3d.getValue(); @@ -272,11 +269,20 @@ App::DocumentObjectExecReturn *Filling::execute() unsigned int maxseg = MaximumSegments.getValue(); try { - BRepFill_Filling builder(degree, ptsoncurve, numIter, anisotropy, tol2d, - tol3d, tolG1, tolG2, maxdeg, maxseg); + BRepFill_Filling builder(degree, + ptsoncurve, + numIter, + anisotropy, + tol2d, + tol3d, + tolG1, + tolG2, + maxdeg, + maxseg); if ((BoundaryEdges.getSize()) < 1) { - return new App::DocumentObjectExecReturn("Border must have at least one curve defined."); + return new App::DocumentObjectExecReturn( + "Border must have at least one curve defined."); } // Load the initial surface if set @@ -312,14 +318,15 @@ App::DocumentObjectExecReturn *Filling::execute() addConstraints(builder, Points); } - //Build the face - if (numBoundaries > 1) + // Build the face + if (numBoundaries > 1) { builder.Build(); + } if (!builder.IsDone()) { Standard_Failure::Raise("Failed to create a face from constraints"); } - //Return the face + // Return the face TopoDS_Face aFace = builder.Face(); this->Shape.setValue(aFace); return App::DocumentObject::StdReturn; diff --git a/src/Mod/Surface/App/FeatureFilling.h b/src/Mod/Surface/App/FeatureFilling.h index 902d5f2d46..39140c48d2 100644 --- a/src/Mod/Surface/App/FeatureFilling.h +++ b/src/Mod/Surface/App/FeatureFilling.h @@ -33,42 +33,45 @@ class BRepFill_Filling; namespace Surface { -class SurfaceExport Filling : public Part::Spline +class SurfaceExport Filling: public Part::Spline { PROPERTY_HEADER_WITH_OVERRIDE(Surface::Filling); public: Filling(); - //Properties of Curves - App::PropertyLinkSubList BoundaryEdges; // Boundary Edges (C0 is required for edges without a corresponding face) - App::PropertyStringList BoundaryFaces; // Boundary Faces (C0, G1 and G2 are possible) - App::PropertyIntegerList BoundaryOrder; // Order of constraint on border faces - App::PropertyLinkSubList UnboundEdges; // Unbound constraint edges (C0 is required for edges without a corresponding face) - App::PropertyStringList UnboundFaces; // Unbound constraint faces (C0, G1 and G2 are possible) - App::PropertyIntegerList UnboundOrder; // Order of constraint on curve faces - App::PropertyLinkSubList FreeFaces; // Free constraint faces - App::PropertyIntegerList FreeOrder; // Order of constraint on free faces - App::PropertyLinkSubList Points; // Constraint Points (on Surface) - App::PropertyLinkSub InitialFace; // Initial Face to use + // Properties of Curves + App::PropertyLinkSubList + BoundaryEdges; // Boundary Edges (C0 is required for edges without a corresponding face) + App::PropertyStringList BoundaryFaces; // Boundary Faces (C0, G1 and G2 are possible) + App::PropertyIntegerList BoundaryOrder; // Order of constraint on border faces + App::PropertyLinkSubList UnboundEdges; // Unbound constraint edges (C0 is required for edges + // without a corresponding face) + App::PropertyStringList UnboundFaces; // Unbound constraint faces (C0, G1 and G2 are possible) + App::PropertyIntegerList UnboundOrder; // Order of constraint on curve faces + App::PropertyLinkSubList FreeFaces; // Free constraint faces + App::PropertyIntegerList FreeOrder; // Order of constraint on free faces + App::PropertyLinkSubList Points; // Constraint Points (on Surface) + App::PropertyLinkSub InitialFace; // Initial Face to use - //Algorithm Variables - App::PropertyInteger Degree; //Starting degree - App::PropertyInteger PointsOnCurve; //Number of points on an edge for constraint - App::PropertyInteger Iterations; //Number of iterations - App::PropertyBool Anisotropy; //Anisotropy - App::PropertyFloat Tolerance2d; //2D Tolerance - App::PropertyFloat Tolerance3d; //3D Tolerance - App::PropertyFloat TolAngular; //G1 tolerance - App::PropertyFloat TolCurvature; //G2 tolerance - App::PropertyInteger MaximumDegree; //Maximum curve degree - App::PropertyInteger MaximumSegments; //Maximum number of segments + // Algorithm Variables + App::PropertyInteger Degree; // Starting degree + App::PropertyInteger PointsOnCurve; // Number of points on an edge for constraint + App::PropertyInteger Iterations; // Number of iterations + App::PropertyBool Anisotropy; // Anisotropy + App::PropertyFloat Tolerance2d; // 2D Tolerance + App::PropertyFloat Tolerance3d; // 3D Tolerance + App::PropertyFloat TolAngular; // G1 tolerance + App::PropertyFloat TolCurvature; // G2 tolerance + App::PropertyInteger MaximumDegree; // Maximum curve degree + App::PropertyInteger MaximumSegments; // Maximum number of segments // recalculate the feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; /// returns the type name of the view provider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "SurfaceGui::ViewProviderFilling"; } @@ -81,10 +84,9 @@ private: void addConstraints(BRepFill_Filling& builder, const App::PropertyLinkSubList& faces, const App::PropertyIntegerList& orders); - void addConstraints(BRepFill_Filling& builder, - const App::PropertyLinkSubList& points); + void addConstraints(BRepFill_Filling& builder, const App::PropertyLinkSubList& points); }; -} //Namespace Surface +} // Namespace Surface #endif diff --git a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp index a6d8176c0a..798bf03678 100644 --- a/src/Mod/Surface/App/FeatureGeomFillSurface.cpp +++ b/src/Mod/Surface/App/FeatureGeomFillSurface.cpp @@ -24,22 +24,21 @@ #include "PreCompiled.h" #ifndef _PreComp_ -#include #include #include -#include -#include -#include -#include -#include +#include #include #include -#include #include -#include +#include +#include +#include +#include +#include +#include #include -#include #include +#include #include #include #include @@ -47,6 +46,7 @@ #include #include #include +#include #endif #include "FeatureGeomFillSurface.h" @@ -56,7 +56,7 @@ using namespace Surface; ShapeValidator::ShapeValidator() { - initValidator(); + initValidator(); } void ShapeValidator::initValidator() @@ -72,12 +72,13 @@ void ShapeValidator::checkEdge(const TopoDS_Shape& shape) Standard_Failure::Raise("Shape is not an edge.\n"); } - TopoDS_Edge etmp = TopoDS::Edge(shape); //Curve TopoDS_Edge - TopLoc_Location heloc; // this will be output - Standard_Real u0;// contains output - Standard_Real u1;// contains output - Handle(Geom_Curve) c_geom = BRep_Tool::Curve(etmp,heloc,u0,u1); //The geometric curve - Handle(Geom_BezierCurve) bez_geom = Handle(Geom_BezierCurve)::DownCast(c_geom); //Try to get Bezier curve + TopoDS_Edge etmp = TopoDS::Edge(shape); // Curve TopoDS_Edge + TopLoc_Location heloc; // this will be output + Standard_Real u0; // contains output + Standard_Real u1; // contains output + Handle(Geom_Curve) c_geom = BRep_Tool::Curve(etmp, heloc, u0, u1); // The geometric curve + Handle(Geom_BezierCurve) bez_geom = + Handle(Geom_BezierCurve)::DownCast(c_geom); // Try to get Bezier curve // if not a Bezier then try to create a B-spline surface from the edges if (bez_geom.IsNull()) { @@ -87,7 +88,7 @@ void ShapeValidator::checkEdge(const TopoDS_Shape& shape) edgeCount++; } -void ShapeValidator::checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_WireData) *aWD) +void ShapeValidator::checkAndAdd(const TopoDS_Shape& shape, Handle(ShapeExtend_WireData) * aWD) { checkEdge(shape); if (aWD) { @@ -97,11 +98,13 @@ void ShapeValidator::checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_W } } -void ShapeValidator::checkAndAdd(const Part::TopoShape &ts, const char *subName, Handle(ShapeExtend_WireData) *aWD) +void ShapeValidator::checkAndAdd(const Part::TopoShape& ts, + const char* subName, + Handle(ShapeExtend_WireData) * aWD) { try { if (subName && *subName != '\0') { - //we want only the subshape which is linked + // we want only the subshape which is linked checkAndAdd(ts.getSubShape(subName), aWD); } else if (!ts.getShape().IsNull() && ts.getShape().ShapeType() == TopAbs_WIRE) { @@ -114,7 +117,7 @@ void ShapeValidator::checkAndAdd(const Part::TopoShape &ts, const char *subName, checkAndAdd(ts.getShape(), aWD); } } - catch (Standard_Failure&) { // any OCC exception means an inappropriate shape in the selection + catch (Standard_Failure&) { // any OCC exception means an inappropriate shape in the selection Standard_Failure::Raise("Wrong shape type.\n"); } } @@ -122,9 +125,10 @@ void ShapeValidator::checkAndAdd(const Part::TopoShape &ts, const char *subName, PROPERTY_SOURCE(Surface::GeomFillSurface, Part::Spline) -const char* GeomFillSurface::FillTypeEnums[] = {"Stretched", "Coons", "Curved", nullptr}; +const char* GeomFillSurface::FillTypeEnums[] = {"Stretched", "Coons", "Curved", nullptr}; -GeomFillSurface::GeomFillSurface(): Spline() +GeomFillSurface::GeomFillSurface() + : Spline() { ADD_PROPERTY(FillType, ((long)0)); ADD_PROPERTY(BoundaryList, (nullptr, "Dummy")); @@ -134,12 +138,10 @@ GeomFillSurface::GeomFillSurface(): Spline() } -//Check if any components of the surface have been modified +// Check if any components of the surface have been modified short GeomFillSurface::mustExecute() const { - if (BoundaryList.isTouched() || - ReversedList.isTouched() || - FillType.isTouched()) { + if (BoundaryList.isTouched() || ReversedList.isTouched() || FillType.isTouched()) { return 1; } return Spline::mustExecute(); @@ -158,12 +160,12 @@ void GeomFillSurface::onChanged(const App::Property* prop) Part::Spline::onChanged(prop); } -App::DocumentObjectExecReturn *GeomFillSurface::execute() +App::DocumentObjectExecReturn* GeomFillSurface::execute() { try { TopoDS_Wire aWire; - //Gets the healed wire + // Gets the healed wire if (getWire(aWire)) { createBezierSurface(aWire); } @@ -178,7 +180,8 @@ App::DocumentObjectExecReturn *GeomFillSurface::execute() return new App::DocumentObjectExecReturn("Curves are disjoint."); } catch (StdFail_NotDone&) { - return new App::DocumentObjectExecReturn("A curve was not a B-spline and could not be converted into one."); + return new App::DocumentObjectExecReturn( + "A curve was not a B-spline and could not be converted into one."); } catch (Standard_Failure& e) { return new App::DocumentObjectExecReturn(e.GetMessageString()); @@ -187,15 +190,16 @@ App::DocumentObjectExecReturn *GeomFillSurface::execute() GeomFill_FillingStyle GeomFillSurface::getFillingStyle() { - //Identify filling style + // Identify filling style switch (FillType.getValue()) { - case GeomFill_StretchStyle: - case GeomFill_CoonsStyle: - case GeomFill_CurvedStyle: - return static_cast(FillType.getValue()); - default: - Standard_Failure::Raise("Filling style must be 0 (Stretch), 1 (Coons), or 2 (Curved).\n"); - return GeomFill_StretchStyle; // this is to shut up the compiler + case GeomFill_StretchStyle: + case GeomFill_CoonsStyle: + case GeomFill_CurvedStyle: + return static_cast(FillType.getValue()); + default: + Standard_Failure::Raise( + "Filling style must be 0 (Stretch), 1 (Coons), or 2 (Curved).\n"); + return GeomFill_StretchStyle; // this is to shut up the compiler } } @@ -205,15 +209,16 @@ bool GeomFillSurface::getWire(TopoDS_Wire& aWire) Handle(ShapeExtend_WireData) aWD = new ShapeExtend_WireData; std::vector boundary = BoundaryList.getSubListValues(); - if (boundary.size() > 4) {// if too many not even try + if (boundary.size() > 4) { // if too many not even try Standard_Failure::Raise("Only 2-4 curves are allowed\n"); } ShapeValidator validator; - for(const auto& set : boundary) { + for (const auto& set : boundary) { if (set.first->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { for (const auto& jt : set.second) { - const Part::TopoShape &ts = static_cast(set.first)->Shape.getShape(); + const Part::TopoShape& ts = + static_cast(set.first)->Shape.getShape(); validator.checkAndAdd(ts, jt.c_str(), &aWD); } } @@ -226,16 +231,16 @@ bool GeomFillSurface::getWire(TopoDS_Wire& aWire) Standard_Failure::Raise("Only 2-4 curves are allowed\n"); } - //Reorder the curves and fix the wire if required + // Reorder the curves and fix the wire if required - aShFW->Load(aWD); //Load in the wire - aShFW->FixReorder(); //Fix the order of the edges if required - aShFW->ClosedWireMode() = Standard_True; //Enables closed wire mode - aShFW->FixConnected(); //Fix connection between wires - aShFW->FixSelfIntersection(); //Fix Self Intersection - aShFW->Perform(); //Perform the fixes + aShFW->Load(aWD); // Load in the wire + aShFW->FixReorder(); // Fix the order of the edges if required + aShFW->ClosedWireMode() = Standard_True; // Enables closed wire mode + aShFW->FixConnected(); // Fix connection between wires + aShFW->FixSelfIntersection(); // Fix Self Intersection + aShFW->Perform(); // Perform the fixes - aWire = aShFW->Wire(); //Healed Wire + aWire = aShFW->Wire(); // Healed Wire if (aWire.IsNull()) { Standard_Failure::Raise("Wire unable to be constructed\n"); @@ -244,7 +249,7 @@ bool GeomFillSurface::getWire(TopoDS_Wire& aWire) return validator.isBezier(); } -void GeomFillSurface::createFace(const Handle(Geom_BoundedSurface) &aSurface) +void GeomFillSurface::createFace(const Handle(Geom_BoundedSurface) & aSurface) { BRepBuilderAPI_MakeFace aFaceBuilder; Standard_Real u1, u2, v1, v2; @@ -268,18 +273,19 @@ void GeomFillSurface::createBezierSurface(TopoDS_Wire& aWire) std::vector curves; curves.reserve(4); - Standard_Real u1, u2; // contains output - TopExp_Explorer anExp (aWire, TopAbs_EDGE); + Standard_Real u1, u2; // contains output + TopExp_Explorer anExp(aWire, TopAbs_EDGE); for (; anExp.More(); anExp.Next()) { - const TopoDS_Edge hedge = TopoDS::Edge (anExp.Current()); - TopLoc_Location heloc; // this will be output - Handle(Geom_Curve) c_geom = BRep_Tool::Curve(hedge, heloc, u1, u2); //The geometric curve - Handle(Geom_BezierCurve) bezier = Handle(Geom_BezierCurve)::DownCast(c_geom); //Try to get Bezier curve + const TopoDS_Edge hedge = TopoDS::Edge(anExp.Current()); + TopLoc_Location heloc; // this will be output + Handle(Geom_Curve) c_geom = BRep_Tool::Curve(hedge, heloc, u1, u2); // The geometric curve + Handle(Geom_BezierCurve) bezier = + Handle(Geom_BezierCurve)::DownCast(c_geom); // Try to get Bezier curve if (!bezier.IsNull()) { gp_Trsf transf = heloc.Transformation(); - bezier->Transform(transf); // apply original transformation to control points - //Store Underlying Geometry + bezier->Transform(transf); // apply original transformation to control points + // Store Underlying Geometry curves.push_back(bezier); } else { @@ -288,14 +294,15 @@ void GeomFillSurface::createBezierSurface(TopoDS_Wire& aWire) } GeomFill_FillingStyle fstyle = getFillingStyle(); - GeomFill_BezierCurves aSurfBuilder; //Create Surface Builder + GeomFill_BezierCurves aSurfBuilder; // Create Surface Builder std::size_t edgeCount = curves.size(); const boost::dynamic_bitset<>& booleans = ReversedList.getValues(); if (edgeCount == booleans.size()) { - for (std::size_t i=0; iReverse(); + } } } @@ -316,17 +323,18 @@ void GeomFillSurface::createBSplineSurface(TopoDS_Wire& aWire) { std::vector curves; curves.reserve(4); - Standard_Real u1, u2; // contains output - TopExp_Explorer anExp (aWire, TopAbs_EDGE); + Standard_Real u1, u2; // contains output + TopExp_Explorer anExp(aWire, TopAbs_EDGE); for (; anExp.More(); anExp.Next()) { - const TopoDS_Edge& edge = TopoDS::Edge (anExp.Current()); - TopLoc_Location heloc; // this will be output - Handle(Geom_Curve) c_geom = BRep_Tool::Curve(edge, heloc, u1, u2); //The geometric curve - Handle(Geom_BSplineCurve) bspline = Handle(Geom_BSplineCurve)::DownCast(c_geom); //Try to get BSpline curve + const TopoDS_Edge& edge = TopoDS::Edge(anExp.Current()); + TopLoc_Location heloc; // this will be output + Handle(Geom_Curve) c_geom = BRep_Tool::Curve(edge, heloc, u1, u2); // The geometric curve + Handle(Geom_BSplineCurve) bspline = + Handle(Geom_BSplineCurve)::DownCast(c_geom); // Try to get BSpline curve gp_Trsf transf = heloc.Transformation(); if (!bspline.IsNull()) { - bspline->Transform(transf); // apply original transformation to control points - //Store Underlying Geometry + bspline->Transform(transf); // apply original transformation to control points + // Store Underlying Geometry curves.push_back(bspline); } else { @@ -338,30 +346,34 @@ void GeomFillSurface::createBSplineSurface(TopoDS_Wire& aWire) Convert_ParameterisationType paratype = Convert_Polynomial; Handle(Geom_BSplineCurve) bspline2 = conv.CurveToBSplineCurve(trim, paratype); if (!bspline2.IsNull()) { - bspline2->Transform(transf); // apply original transformation to control points + bspline2->Transform(transf); // apply original transformation to control points curves.push_back(bspline2); } else { // GeomConvert failed, try ShapeConstruct_Curve now ShapeConstruct_Curve scc; - Handle(Geom_BSplineCurve) spline = scc.ConvertToBSpline(c_geom, u1, u2, Precision::Confusion()); - if (spline.IsNull()) - Standard_Failure::Raise("A curve was not a B-spline and could not be converted into one."); - spline->Transform(transf); // apply original transformation to control points + Handle(Geom_BSplineCurve) spline = + scc.ConvertToBSpline(c_geom, u1, u2, Precision::Confusion()); + if (spline.IsNull()) { + Standard_Failure::Raise( + "A curve was not a B-spline and could not be converted into one."); + } + spline->Transform(transf); // apply original transformation to control points curves.push_back(spline); } } } GeomFill_FillingStyle fstyle = getFillingStyle(); - GeomFill_BSplineCurves aSurfBuilder; //Create Surface Builder + GeomFill_BSplineCurves aSurfBuilder; // Create Surface Builder std::size_t edgeCount = curves.size(); const boost::dynamic_bitset<>& booleans = ReversedList.getValues(); if (edgeCount == booleans.size()) { - for (std::size_t i=0; iReverse(); + } } } if (edgeCount == 2) { diff --git a/src/Mod/Surface/App/FeatureGeomFillSurface.h b/src/Mod/Surface/App/FeatureGeomFillSurface.h index bf1dc2974b..bb6bfe8b71 100644 --- a/src/Mod/Surface/App/FeatureGeomFillSurface.h +++ b/src/Mod/Surface/App/FeatureGeomFillSurface.h @@ -28,8 +28,8 @@ #include #include -#include #include +#include #include @@ -46,33 +46,38 @@ public: ShapeValidator(); void initValidator(); void checkEdge(const TopoDS_Shape& shape); - void checkAndAdd(const TopoDS_Shape &shape, Handle(ShapeExtend_WireData) *aWD = nullptr); - void checkAndAdd(const Part::TopoShape &ts, const char *subName, Handle(ShapeExtend_WireData) *aWire = nullptr); + void checkAndAdd(const TopoDS_Shape& shape, Handle(ShapeExtend_WireData) * aWD = nullptr); + void checkAndAdd(const Part::TopoShape& ts, + const char* subName, + Handle(ShapeExtend_WireData) * aWire = nullptr); - bool isBezier() const { + bool isBezier() const + { return willBezier; } - int numEdges() const { + int numEdges() const + { return edgeCount; } }; -class GeomFillSurface : public Part::Spline +class GeomFillSurface: public Part::Spline { - PROPERTY_HEADER_WITH_OVERRIDE(Surface::GeomFillSurface); + PROPERTY_HEADER_WITH_OVERRIDE(Surface::GeomFillSurface); public: GeomFillSurface(); App::PropertyLinkSubList BoundaryList; // Curves to be turned into a face (2-4 curves allowed). App::PropertyBoolList ReversedList; // Booleans to handle orientation of the curves - App::PropertyEnumeration FillType; // Fill method (1, 2, or 3 for Stretch, Coons, and Curved) + App::PropertyEnumeration FillType; // Fill method (1, 2, or 3 for Stretch, Coons, and Curved) short mustExecute() const override; void onChanged(const App::Property*) override; - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the view provider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "SurfaceGui::ViewProviderGeomFillSurface"; } @@ -80,7 +85,7 @@ protected: GeomFill_FillingStyle getFillingStyle(); /// True means that all edges have Bezier curves bool getWire(TopoDS_Wire& aWire); - void createFace(const Handle(Geom_BoundedSurface) &aSurface); + void createFace(const Handle(Geom_BoundedSurface) & aSurface); void createBezierSurface(TopoDS_Wire& aWire); void createBSplineSurface(TopoDS_Wire& aWire); @@ -88,6 +93,6 @@ private: static const char* FillTypeEnums[]; }; -} +} // namespace Surface -#endif // FEATUREGEOMFILLSURFACE_H +#endif // FEATUREGEOMFILLSURFACE_H diff --git a/src/Mod/Surface/App/FeatureSections.cpp b/src/Mod/Surface/App/FeatureSections.cpp index b8b321b150..c7333ed376 100644 --- a/src/Mod/Surface/App/FeatureSections.cpp +++ b/src/Mod/Surface/App/FeatureSections.cpp @@ -22,15 +22,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include "FeatureSections.h" @@ -42,11 +42,11 @@ PROPERTY_SOURCE(Surface::Sections, Part::Spline) Sections::Sections() { - ADD_PROPERTY_TYPE(NSections,(nullptr), "Sections", App::Prop_None, "Section curves"); + ADD_PROPERTY_TYPE(NSections, (nullptr), "Sections", App::Prop_None, "Section curves"); NSections.setScope(App::LinkScope::Global); } -App::DocumentObjectExecReturn *Sections::execute() +App::DocumentObjectExecReturn* Sections::execute() { TColGeom_SequenceOfCurve curveSeq; auto edge_obj = NSections.getValues(); @@ -63,9 +63,10 @@ App::DocumentObjectExecReturn *Sections::execute() if (!edge.IsNull() && edge.ShapeType() == TopAbs_EDGE) { BRepAdaptor_Curve curve_adapt(TopoDS::Edge(edge)); const TopLoc_Location& loc = edge.Location(); - Handle(Geom_TrimmedCurve) hCurve = new Geom_TrimmedCurve(curve_adapt.Curve().Curve(), - curve_adapt.FirstParameter(), - curve_adapt.LastParameter()); + Handle(Geom_TrimmedCurve) hCurve = + new Geom_TrimmedCurve(curve_adapt.Curve().Curve(), + curve_adapt.FirstParameter(), + curve_adapt.LastParameter()); if (!loc.IsIdentity()) { hCurve->Transform(loc.Transformation()); } @@ -75,17 +76,19 @@ App::DocumentObjectExecReturn *Sections::execute() } } - if (curveSeq.Length() < 2) + if (curveSeq.Length() < 2) { return new App::DocumentObjectExecReturn("At least two sections are required."); + } GeomFill_NSections fillOp(curveSeq); fillOp.ComputeSurface(); Handle(Geom_BSplineSurface) aSurf = fillOp.BSplineSurface(); - if (aSurf.IsNull()) + if (aSurf.IsNull()) { return new App::DocumentObjectExecReturn("Failed to create surface from sections."); + } - BRepBuilderAPI_MakeFace mkFace(aSurf, Precision::Confusion() ); + BRepBuilderAPI_MakeFace mkFace(aSurf, Precision::Confusion()); Shape.setValue(mkFace.Face()); return StdReturn; diff --git a/src/Mod/Surface/App/FeatureSections.h b/src/Mod/Surface/App/FeatureSections.h index e80a0a5ea0..905f7ffc40 100644 --- a/src/Mod/Surface/App/FeatureSections.h +++ b/src/Mod/Surface/App/FeatureSections.h @@ -31,7 +31,7 @@ namespace Surface { -class SurfaceExport Sections : public Part::Spline +class SurfaceExport Sections: public Part::Spline { PROPERTY_HEADER_WITH_OVERRIDE(Surface::Sections); @@ -41,13 +41,14 @@ public: App::PropertyLinkSubList NSections; // recalculate the feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the view provider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "SurfaceGui::ViewProviderSections"; } }; -}//Namespace Surface +} // Namespace Surface #endif diff --git a/src/Mod/Surface/App/FeatureSewing.cpp b/src/Mod/Surface/App/FeatureSewing.cpp index 54ec9249ff..d81836f1a2 100644 --- a/src/Mod/Surface/App/FeatureSewing.cpp +++ b/src/Mod/Surface/App/FeatureSewing.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include "FeatureSewing.h" @@ -34,35 +34,40 @@ using namespace Surface; PROPERTY_SOURCE(Surface::Sewing, Part::Feature) -//Initial values +// Initial values Sewing::Sewing() { - ADD_PROPERTY_TYPE(ShapeList,(nullptr,""), "Sewing", App::Prop_None, "Input shapes"); - ADD_PROPERTY_TYPE(Tolerance,(Precision::Confusion()), "Sewing", App::Prop_None, "Sewing tolerance"); - ADD_PROPERTY_TYPE(SewingOption,(true), "Sewing", App::Prop_None, "Sewing option"); - ADD_PROPERTY_TYPE(DegenerateShape,(true), "Sewing", App::Prop_None, "Analysis of degenerated shapes"); - ADD_PROPERTY_TYPE(CutFreeEdges,(true), "Sewing", App::Prop_None, "Cutting of free edges"); - ADD_PROPERTY_TYPE(Nonmanifold,(false), "Sewing", App::Prop_None, "Non-manifold processing"); + ADD_PROPERTY_TYPE(ShapeList, (nullptr, ""), "Sewing", App::Prop_None, "Input shapes"); + ADD_PROPERTY_TYPE(Tolerance, + (Precision::Confusion()), + "Sewing", + App::Prop_None, + "Sewing tolerance"); + ADD_PROPERTY_TYPE(SewingOption, (true), "Sewing", App::Prop_None, "Sewing option"); + ADD_PROPERTY_TYPE(DegenerateShape, + (true), + "Sewing", + App::Prop_None, + "Analysis of degenerated shapes"); + ADD_PROPERTY_TYPE(CutFreeEdges, (true), "Sewing", App::Prop_None, "Cutting of free edges"); + ADD_PROPERTY_TYPE(Nonmanifold, (false), "Sewing", App::Prop_None, "Non-manifold processing"); ShapeList.setScope(App::LinkScope::Global); } short Sewing::mustExecute() const { - if (ShapeList.isTouched() || - Tolerance.isTouched() || - SewingOption.isTouched() || - DegenerateShape.isTouched() || - CutFreeEdges.isTouched() || - Nonmanifold.isTouched()) + if (ShapeList.isTouched() || Tolerance.isTouched() || SewingOption.isTouched() + || DegenerateShape.isTouched() || CutFreeEdges.isTouched() || Nonmanifold.isTouched()) { return 1; + } return 0; } -App::DocumentObjectExecReturn *Sewing::execute() +App::DocumentObjectExecReturn* Sewing::execute() { - //Assign Variables + // Assign Variables double atol = Tolerance.getValue(); bool opt1 = SewingOption.getValue(); bool opt2 = DegenerateShape.getValue(); @@ -70,17 +75,17 @@ App::DocumentObjectExecReturn *Sewing::execute() bool opt4 = Nonmanifold.getValue(); try { - BRepBuilderAPI_Sewing builder(atol,opt1,opt2,opt3,opt4); + BRepBuilderAPI_Sewing builder(atol, opt1, opt2, opt3, opt4); std::vector subset = ShapeList.getSubListValues(); - for(const auto& it : subset) { + for (const auto& it : subset) { // the subset has the documentobject and the element name which belongs to it, // in our case for example the cube object and the "Edge1" string if (it.first->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { - //we get the shape of the document object which resemble the whole box + // we get the shape of the document object which resemble the whole box Part::TopoShape ts = static_cast(it.first)->Shape.getShape(); - //we want only the subshape which is linked + // we want only the subshape which is linked for (const auto& jt : it.second) { TopoDS_Shape sub = ts.getSubShape(jt.c_str()); builder.Add(sub); @@ -91,11 +96,12 @@ App::DocumentObjectExecReturn *Sewing::execute() } } - builder.Perform(); //Perform Sewing + builder.Perform(); // Perform Sewing - TopoDS_Shape aShape = builder.SewedShape(); //Get Shape - if (aShape.IsNull()) + TopoDS_Shape aShape = builder.SewedShape(); // Get Shape + if (aShape.IsNull()) { return new App::DocumentObjectExecReturn("Resulting shape is null"); + } this->Shape.setValue(aShape); return StdReturn; } diff --git a/src/Mod/Surface/App/FeatureSewing.h b/src/Mod/Surface/App/FeatureSewing.h index d2b8cd262f..531f1a83b0 100644 --- a/src/Mod/Surface/App/FeatureSewing.h +++ b/src/Mod/Surface/App/FeatureSewing.h @@ -31,26 +31,26 @@ namespace Surface { -class SurfaceExport Sewing : public Part::Feature +class SurfaceExport Sewing: public Part::Feature { PROPERTY_HEADER_WITH_OVERRIDE(Surface::Sewing); public: Sewing(); - App::PropertyLinkSubList ShapeList; //Shapes to be sewn. + App::PropertyLinkSubList ShapeList; // Shapes to be sewn. App::PropertyFloat Tolerance; - App::PropertyBool SewingOption; //Option for sewing (if false only control) - App::PropertyBool DegenerateShape; //Option for analysis of degenerated shapes - App::PropertyBool CutFreeEdges; //Option for cutting of free edges - App::PropertyBool Nonmanifold; //Option for non-manifold processing + App::PropertyBool SewingOption; // Option for sewing (if false only control) + App::PropertyBool DegenerateShape; // Option for analysis of degenerated shapes + App::PropertyBool CutFreeEdges; // Option for cutting of free edges + App::PropertyBool Nonmanifold; // Option for non-manifold processing // recalculate the feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; }; -}//Namespace Surface +} // Namespace Surface -#endif // SURFACE_FEATURESEWING_H +#endif // SURFACE_FEATURESEWING_H diff --git a/src/Mod/Surface/App/PreCompiled.h b/src/Mod/Surface/App/PreCompiled.h index 0ae0ad59e7..0d80e1fe47 100644 --- a/src/Mod/Surface/App/PreCompiled.h +++ b/src/Mod/Surface/App/PreCompiled.h @@ -30,10 +30,9 @@ // STL #include -//opencascade +// opencascade #include -#endif //_PreComp_ +#endif //_PreComp_ #endif - diff --git a/src/Mod/Surface/Gui/AppSurfaceGui.cpp b/src/Mod/Surface/Gui/AppSurfaceGui.cpp index 1c85515a73..365226ea99 100644 --- a/src/Mod/Surface/Gui/AppSurfaceGui.cpp +++ b/src/Mod/Surface/Gui/AppSurfaceGui.cpp @@ -41,23 +41,26 @@ void CreateSurfaceCommands(); -namespace SurfaceGui { -class Module : public Py::ExtensionModule +namespace SurfaceGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("SurfaceGui") + Module() + : Py::ExtensionModule("SurfaceGui") { - initialize("This module is the SurfaceGui module.");// register with Python + initialize("This module is the SurfaceGui module."); // register with Python } private: }; -PyObject *initModule() { +PyObject* initModule() +{ return Base::Interpreter().addModule(new Module); } -}// namespace SurfaceGui +} // namespace SurfaceGui /* Python entry */ PyMOD_INIT_FUNC(SurfaceGui) @@ -70,6 +73,7 @@ PyMOD_INIT_FUNC(SurfaceGui) Base::Interpreter().runString("import Surface"); Base::Interpreter().runString("import PartGui"); + // clang-format off // instantiating the commands CreateSurfaceCommands(); @@ -80,8 +84,9 @@ PyMOD_INIT_FUNC(SurfaceGui) SurfaceGui::ViewProviderExtend ::init(); SurfaceGui::ViewProviderBlendCurve ::init(); // SurfaceGui::ViewProviderCut::init(); + // clang-format on - PyObject *mod = SurfaceGui::initModule(); + PyObject* mod = SurfaceGui::initModule(); Base::Console().Log("Loading GUI of Surface module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp b/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp index b64893f76a..72f73dd9ad 100644 --- a/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp +++ b/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" -#include #include "ViewProviderBlendCurve.h" +#include PROPERTY_SOURCE(SurfaceGui::ViewProviderBlendCurve, PartGui::ViewProviderSpline) @@ -35,4 +35,4 @@ QIcon ViewProviderBlendCurve::getIcon() const return Gui::BitmapFactory().pixmap("Surface_BlendCurve"); } -}//namespace SurfaceGui +} // namespace SurfaceGui diff --git a/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.h b/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.h index 88f8d6d155..f5ce6d186e 100644 --- a/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.h +++ b/src/Mod/Surface/Gui/Blending/ViewProviderBlendCurve.h @@ -36,6 +36,6 @@ public: QIcon getIcon() const override; }; -}//namespace SurfaceGui +} // namespace SurfaceGui -#endif// SURFACEGUI_VIEWPROVIDEREXTEND_H +#endif // SURFACEGUI_VIEWPROVIDEREXTEND_H diff --git a/src/Mod/Surface/Gui/CMakeLists.txt b/src/Mod/Surface/Gui/CMakeLists.txt index 41e239017b..977c839d6b 100644 --- a/src/Mod/Surface/Gui/CMakeLists.txt +++ b/src/Mod/Surface/Gui/CMakeLists.txt @@ -86,4 +86,3 @@ fc_copy_sources(SurfaceGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Sur install(TARGETS SurfaceGui DESTINATION ${CMAKE_INSTALL_LIBDIR}) INSTALL(FILES ${SurfaceGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Surface/Resources/icons") - diff --git a/src/Mod/Surface/Gui/Command.cpp b/src/Mod/Surface/Gui/Command.cpp index 7a914f8fa0..678bd7db2b 100644 --- a/src/Mod/Surface/Gui/Command.cpp +++ b/src/Mod/Surface/Gui/Command.cpp @@ -23,16 +23,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include +#include +#include +#include +#include #endif +#include "Mod/Part/App/PartFeature.h" #include #include #include @@ -40,7 +41,6 @@ #include #include #include -#include "Mod/Part/App/PartFeature.h" //=========================================================================== @@ -49,76 +49,76 @@ DEF_STD_CMD(CmdSurfaceCut) CmdSurfaceCut::CmdSurfaceCut() - :Command("Surface_Cut") + : Command("Surface_Cut") { - sAppModule = "Surface"; - sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Surface Cut function"); - sToolTipText = QT_TR_NOOP("Cuts a shape with another Shape.\n" - "It returns a modified version of the first shape"); - sWhatsThis = "Surface_Cut"; - sStatusTip = sToolTipText; - sPixmap = "Surface_Cut"; + sAppModule = "Surface"; + sGroup = QT_TR_NOOP("Surface"); + sMenuText = QT_TR_NOOP("Surface Cut function"); + sToolTipText = QT_TR_NOOP("Cuts a shape with another Shape.\n" + "It returns a modified version of the first shape"); + sWhatsThis = "Surface_Cut"; + sStatusTip = sToolTipText; + sPixmap = "Surface_Cut"; // sAccel = "CTRL+H"; } void CmdSurfaceCut::activated(int iMsg) { Q_UNUSED(iMsg); -/* std::vector Sel = getSelection().getSelectionEx(0, Part::Feature::getClassTypeId()); - if (Sel.size() != 2) { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Invalid selection"), - QObject::tr("Select two shapes please.")); - return; - } + /* std::vector Sel = getSelection().getSelectionEx(0, + Part::Feature::getClassTypeId()); if (Sel.size() != 2) { + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Invalid selection"), + QObject::tr("Select two shapes please.")); + return; + } - bool askUser = false; - for (std::vector::iterator it = Sel.begin(); it != Sel.end(); ++it) { - App::DocumentObject* obj = it->getObject(); - if (obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { - const TopoDS_Shape& shape = static_cast(obj)->Shape.getValue(); - if (!PartGui::checkForSolids(shape) && !askUser) { - int ret = QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Non-solids selected"), - QObject::tr("The use of non-solids for boolean operations may lead to unexpected results.\n" - "Do you want to continue?"), QMessageBox::Yes, QMessageBox::No); - if (ret == QMessageBox::No) - return; - askUser = true; + bool askUser = false; + for (std::vector::iterator it = Sel.begin(); it != Sel.end(); ++it) { + App::DocumentObject* obj = it->getObject(); + if (obj->getTypeId().isDerivedFrom(Part::Feature::getClassTypeId())) { + const TopoDS_Shape& shape = static_cast(obj)->Shape.getValue(); + if (!PartGui::checkForSolids(shape) && !askUser) { + int ret = QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Non-solids + selected"), QObject::tr("The use of non-solids for boolean operations may lead to unexpected + results.\n" "Do you want to continue?"), QMessageBox::Yes, QMessageBox::No); if (ret == + QMessageBox::No) return; askUser = true; + } } } - } - std::string FeatName = getUniqueObjectName("Cut"); - std::string BaseName = Sel[0].getFeatName(); - std::string ToolName = Sel[1].getFeatName(); + std::string FeatName = getUniqueObjectName("Cut"); + std::string BaseName = Sel[0].getFeatName(); + std::string ToolName = Sel[1].getFeatName(); - openCommand(QT_TRANSLATE_NOOP("Command", "Part Cut")); - doCommand(Doc,"App.activeDocument().addObject(\"Part::Cut\",\"%s\")",FeatName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Base = App.activeDocument().%s",FeatName.c_str(),BaseName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Tool = App.activeDocument().%s",FeatName.c_str(),ToolName.c_str()); - doCommand(Gui,"Gui.activeDocument().hide('%s')",BaseName.c_str()); - doCommand(Gui,"Gui.activeDocument().hide('%s')",ToolName.c_str()); - copyVisual(FeatName.c_str(), "ShapeColor", BaseName.c_str()); - copyVisual(FeatName.c_str(), "DisplayMode", BaseName.c_str()); - updateActive(); - commitCommand();*/ + openCommand(QT_TRANSLATE_NOOP("Command", "Part Cut")); + doCommand(Doc,"App.activeDocument().addObject(\"Part::Cut\",\"%s\")",FeatName.c_str()); + doCommand(Doc,"App.activeDocument().%s.Base = + App.activeDocument().%s",FeatName.c_str(),BaseName.c_str()); + doCommand(Doc,"App.activeDocument().%s.Tool = + App.activeDocument().%s",FeatName.c_str(),ToolName.c_str()); + doCommand(Gui,"Gui.activeDocument().hide('%s')",BaseName.c_str()); + doCommand(Gui,"Gui.activeDocument().hide('%s')",ToolName.c_str()); + copyVisual(FeatName.c_str(), "ShapeColor", BaseName.c_str()); + copyVisual(FeatName.c_str(), "DisplayMode", BaseName.c_str()); + updateActive(); + commitCommand();*/ } DEF_STD_CMD_A(CmdSurfaceFilling) CmdSurfaceFilling::CmdSurfaceFilling() - :Command("Surface_Filling") + : Command("Surface_Filling") { - sAppModule = "Surface"; - sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Filling..."); - sToolTipText = QT_TR_NOOP("Creates a surface from a series of picked boundary edges.\n" - "Additionally, the surface may be constrained by non-boundary edges\n" - "and non-boundary vertices."); - sStatusTip = sToolTipText; - sWhatsThis = "Surface_Filling"; - sPixmap = "Surface_Filling"; + sAppModule = "Surface"; + sGroup = QT_TR_NOOP("Surface"); + sMenuText = QT_TR_NOOP("Filling..."); + sToolTipText = QT_TR_NOOP("Creates a surface from a series of picked boundary edges.\n" + "Additionally, the surface may be constrained by non-boundary edges\n" + "and non-boundary vertices."); + sStatusTip = sToolTipText; + sWhatsThis = "Surface_Filling"; + sPixmap = "Surface_Filling"; } void CmdSurfaceFilling::activated(int iMsg) @@ -144,13 +144,13 @@ DEF_STD_CMD_A(CmdSurfaceGeomFillSurface) CmdSurfaceGeomFillSurface::CmdSurfaceGeomFillSurface() : Command("Surface_GeomFillSurface") { - sAppModule = "Surface"; - sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Fill boundary curves"); - sToolTipText = QT_TR_NOOP("Creates a surface from two, three or four boundary edges."); - sWhatsThis = "Surface_GeomFillSurface"; - sStatusTip = sToolTipText; - sPixmap = "Surface_GeomFillSurface"; + sAppModule = "Surface"; + sGroup = QT_TR_NOOP("Surface"); + sMenuText = QT_TR_NOOP("Fill boundary curves"); + sToolTipText = QT_TR_NOOP("Creates a surface from two, three or four boundary edges."); + sWhatsThis = "Surface_GeomFillSurface"; + sStatusTip = sToolTipText; + sPixmap = "Surface_GeomFillSurface"; } bool CmdSurfaceGeomFillSurface::isActive() @@ -164,46 +164,48 @@ void CmdSurfaceGeomFillSurface::activated(int iMsg) std::string FeatName = getUniqueObjectName("Surface"); openCommand(QT_TRANSLATE_NOOP("Command", "Create surface")); - doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::GeomFillSurface\",\"%s\")", FeatName.c_str()); + doCommand(Doc, + "App.ActiveDocument.addObject(\"Surface::GeomFillSurface\",\"%s\")", + FeatName.c_str()); doCommand(Doc, "Gui.ActiveDocument.setEdit('%s',0)", FeatName.c_str()); } - - DEF_STD_CMD_A(CmdSurfaceCurveOnMesh) CmdSurfaceCurveOnMesh::CmdSurfaceCurveOnMesh() - : Command("Surface_CurveOnMesh") + : Command("Surface_CurveOnMesh") { - sAppModule = "MeshPart"; - sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Curve on mesh..."); - sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of a mesh.\n" - "This command only works with a 'mesh' object."); - sWhatsThis = "Surface_CurveOnMesh"; - sStatusTip = sToolTipText; - sPixmap = "Surface_CurveOnMesh"; + sAppModule = "MeshPart"; + sGroup = QT_TR_NOOP("Surface"); + sMenuText = QT_TR_NOOP("Curve on mesh..."); + sToolTipText = QT_TR_NOOP("Creates an approximated curve on top of a mesh.\n" + "This command only works with a 'mesh' object."); + sWhatsThis = "Surface_CurveOnMesh"; + sStatusTip = sToolTipText; + sPixmap = "Surface_CurveOnMesh"; } - void CmdSurfaceCurveOnMesh::activated(int) { - doCommand(Doc, "import MeshPartGui, FreeCADGui\n" - "FreeCADGui.runCommand('MeshPart_CurveOnMesh')\n"); + doCommand(Doc, + "import MeshPartGui, FreeCADGui\n" + "FreeCADGui.runCommand('MeshPart_CurveOnMesh')\n"); } bool CmdSurfaceCurveOnMesh::isActive() { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; + } // Check for the selected mesh feature (all Mesh types) Base::Type meshType = Base::Type::fromName("Mesh::Feature"); App::Document* doc = App::GetApplication().getActiveDocument(); - if (doc && doc->countObjectsOfType(meshType) > 0) + if (doc && doc->countObjectsOfType(meshType) > 0) { return true; + } return false; } @@ -231,7 +233,8 @@ void CmdBlendCurve::activated(int) std::string objName[2]; std::string edge[2]; std::string featName = getUniqueObjectName("BlendCurve"); - std::vector sel = getSelection().getSelectionEx(nullptr, Part::Feature::getClassTypeId()); + std::vector sel = + getSelection().getSelectionEx(nullptr, Part::Feature::getClassTypeId()); objName[0] = sel[0].getFeatName(); edge[0] = sel[0].getSubNames()[0]; @@ -245,9 +248,21 @@ void CmdBlendCurve::activated(int) edge[1] = sel[1].getSubNames()[0]; } openCommand(QT_TRANSLATE_NOOP("Command", "Blend Curve")); - doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::FeatureBlendCurve\",\"%s\")", featName.c_str()); - doCommand(Doc, "App.ActiveDocument.%s.StartEdge = (App.getDocument('%s').getObject('%s'),['%s'])", featName.c_str(), docName.c_str(), objName[0].c_str(), edge[0].c_str()); - doCommand(Doc, "App.ActiveDocument.%s.EndEdge = (App.getDocument('%s').getObject('%s'),['%s'])", featName.c_str(), docName.c_str(), objName[1].c_str(), edge[1].c_str()); + doCommand(Doc, + "App.ActiveDocument.addObject(\"Surface::FeatureBlendCurve\",\"%s\")", + featName.c_str()); + doCommand(Doc, + "App.ActiveDocument.%s.StartEdge = (App.getDocument('%s').getObject('%s'),['%s'])", + featName.c_str(), + docName.c_str(), + objName[0].c_str(), + edge[0].c_str()); + doCommand(Doc, + "App.ActiveDocument.%s.EndEdge = (App.getDocument('%s').getObject('%s'),['%s'])", + featName.c_str(), + docName.c_str(), + objName[1].c_str(), + edge[1].c_str()); updateActive(); commitCommand(); } @@ -261,37 +276,42 @@ bool CmdBlendCurve::isActive() DEF_STD_CMD_A(CmdSurfaceExtendFace) CmdSurfaceExtendFace::CmdSurfaceExtendFace() - : Command("Surface_ExtendFace") + : Command("Surface_ExtendFace") { - sAppModule = "Surface"; - sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Extend face"); - sToolTipText = QT_TR_NOOP("Extrapolates the selected face or surface at its boundaries\n" - "with its local U and V parameters."); - sWhatsThis = "Surface_ExtendFace"; - sStatusTip = sToolTipText; - sPixmap = "Surface_ExtendFace"; + sAppModule = "Surface"; + sGroup = QT_TR_NOOP("Surface"); + sMenuText = QT_TR_NOOP("Extend face"); + sToolTipText = QT_TR_NOOP("Extrapolates the selected face or surface at its boundaries\n" + "with its local U and V parameters."); + sWhatsThis = "Surface_ExtendFace"; + sStatusTip = sToolTipText; + sPixmap = "Surface_ExtendFace"; } void CmdSurfaceExtendFace::activated(int) { Gui::SelectionFilter faceFilter("SELECT Part::Feature SUBELEMENT Face COUNT 1"); if (faceFilter.match()) { - const std::vector &sub = faceFilter.Result[0][0].getSubNames(); + const std::vector& sub = faceFilter.Result[0][0].getSubNames(); if (sub.size() == 1) { openCommand(QT_TRANSLATE_NOOP("Command", "Extend surface")); std::string FeatName = getUniqueObjectName("Surface"); std::string supportString = faceFilter.Result[0][0].getAsPropertyLinkSubString(); - doCommand(Doc, "App.ActiveDocument.addObject(\"Surface::Extend\",\"%s\")", FeatName.c_str()); - doCommand(Doc, "App.ActiveDocument.%s.Face = %s", FeatName.c_str(), supportString.c_str()); + doCommand(Doc, + "App.ActiveDocument.addObject(\"Surface::Extend\",\"%s\")", + FeatName.c_str()); + doCommand(Doc, + "App.ActiveDocument.%s.Face = %s", + FeatName.c_str(), + supportString.c_str()); updateActive(); commitCommand(); } } else { QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("Surface_ExtendFace", "Wrong selection"), - qApp->translate("Surface_ExtendFace", "Select a single face")); + qApp->translate("Surface_ExtendFace", "Wrong selection"), + qApp->translate("Surface_ExtendFace", "Select a single face")); } } @@ -303,15 +323,15 @@ bool CmdSurfaceExtendFace::isActive() DEF_STD_CMD_A(CmdSurfaceSections) CmdSurfaceSections::CmdSurfaceSections() - :Command("Surface_Sections") + : Command("Surface_Sections") { - sAppModule = "Surface"; - sGroup = QT_TR_NOOP("Surface"); - sMenuText = QT_TR_NOOP("Sections..."); - sToolTipText = QT_TR_NOOP("Creates a surface from a series of sectional edges."); - sStatusTip = sToolTipText; - sWhatsThis = "Surface_Sections"; - sPixmap = "Surface_Sections"; + sAppModule = "Surface"; + sGroup = QT_TR_NOOP("Surface"); + sMenuText = QT_TR_NOOP("Sections..."); + sToolTipText = QT_TR_NOOP("Creates a surface from a series of sectional edges."); + sStatusTip = sToolTipText; + sWhatsThis = "Surface_Sections"; + sPixmap = "Surface_Sections"; } void CmdSurfaceSections::activated(int iMsg) @@ -331,10 +351,10 @@ bool CmdSurfaceSections::isActive() void CreateSurfaceCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); -/* - rcCmdMgr.addCommand(new CmdSurfaceCut()); -*/ + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); + /* + rcCmdMgr.addCommand(new CmdSurfaceCut()); + */ rcCmdMgr.addCommand(new CmdSurfaceFilling()); rcCmdMgr.addCommand(new CmdSurfaceGeomFillSurface()); rcCmdMgr.addCommand(new CmdSurfaceSections()); diff --git a/src/Mod/Surface/Gui/PreCompiled.h b/src/Mod/Surface/Gui/PreCompiled.h index 0f51743ecf..e5adb0b8c9 100644 --- a/src/Mod/Surface/Gui/PreCompiled.h +++ b/src/Mod/Surface/Gui/PreCompiled.h @@ -39,15 +39,15 @@ // OpenCasCade #include -#include #include +#include #include -#include -#include #include #include #include +#include +#include #endif //_PreComp_ -#endif // GUI_PRECOMPILED_H +#endif // GUI_PRECOMPILED_H diff --git a/src/Mod/Surface/Gui/Resources/Surface.qrc b/src/Mod/Surface/Gui/Resources/Surface.qrc index db576e80ba..e801a7248d 100644 --- a/src/Mod/Surface/Gui/Resources/Surface.qrc +++ b/src/Mod/Surface/Gui/Resources/Surface.qrc @@ -14,4 +14,3 @@ icons/Surface_Workbench.svg - diff --git a/src/Mod/Surface/Gui/Resources/icons/Surface_BlendCurve.svg b/src/Mod/Surface/Gui/Resources/icons/Surface_BlendCurve.svg index aeac6de070..92b529a4e5 100644 --- a/src/Mod/Surface/Gui/Resources/icons/Surface_BlendCurve.svg +++ b/src/Mod/Surface/Gui/Resources/icons/Surface_BlendCurve.svg @@ -27,4 +27,4 @@ - \ No newline at end of file + diff --git a/src/Mod/Surface/Gui/SelectionMode.h b/src/Mod/Surface/Gui/SelectionMode.h index ddf60abf93..a57749f191 100644 --- a/src/Mod/Surface/Gui/SelectionMode.h +++ b/src/Mod/Surface/Gui/SelectionMode.h @@ -38,6 +38,6 @@ enum SelectionMode RemoveVertexConstraint = 7, }; -} //namespace SurfaceGui +} // namespace SurfaceGui -#endif // SURFACEGUI_SELECTIONMODE_H +#endif // SURFACEGUI_SELECTIONMODE_H diff --git a/src/Mod/Surface/Gui/TaskFilling.cpp b/src/Mod/Surface/Gui/TaskFilling.cpp index 122f522eca..07fbbddce0 100644 --- a/src/Mod/Surface/Gui/TaskFilling.cpp +++ b/src/Mod/Surface/Gui/TaskFilling.cpp @@ -22,16 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -45,16 +45,17 @@ #include #include "TaskFilling.h" -#include "ui_TaskFilling.h" #include "TaskFillingEdge.h" #include "TaskFillingVertex.h" +#include "ui_TaskFilling.h" using namespace SurfaceGui; PROPERTY_SOURCE(SurfaceGui::ViewProviderFilling, PartGui::ViewProviderSpline) -namespace SurfaceGui { +namespace SurfaceGui +{ void ViewProviderFilling::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { @@ -66,20 +67,21 @@ void ViewProviderFilling::setupContextMenu(QMenu* menu, QObject* receiver, const bool ViewProviderFilling::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this sketch the // object unsets and sets its edit mode without closing // the task panel - Surface::Filling* obj = static_cast(this->getObject()); + Surface::Filling* obj = static_cast(this->getObject()); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); // start the edit dialog if (dlg) { TaskFilling* tDlg = qobject_cast(dlg); - if (tDlg) + if (tDlg) { tDlg->setEditedObject(obj); + } Gui::Control().showDialog(dlg); } else { @@ -108,72 +110,78 @@ void ViewProviderFilling::highlightReferences(ShapeType type, const References& Part::Feature* base = dynamic_cast(it.first); if (base) { PartGui::ViewProviderPartExt* svp = dynamic_cast( - Gui::Application::Instance->getViewProvider(base)); + Gui::Application::Instance->getViewProvider(base)); if (svp) { switch (type) { - case ViewProviderFilling::Vertex: - if (on) { - std::vector colors; - TopTools_IndexedMapOfShape vMap; - TopExp::MapShapes(base->Shape.getValue(), TopAbs_VERTEX, vMap); - colors.resize(vMap.Extent(), svp->PointColor.getValue()); + case ViewProviderFilling::Vertex: + if (on) { + std::vector colors; + TopTools_IndexedMapOfShape vMap; + TopExp::MapShapes(base->Shape.getValue(), TopAbs_VERTEX, vMap); + colors.resize(vMap.Extent(), svp->PointColor.getValue()); - for (const auto& jt : it.second) { - // check again that the index is in range because it's possible that the - // sub-names are invalid - std::size_t idx = static_cast(std::stoi(jt.substr(6)) - 1); - if (idx < colors.size()) - colors[idx] = App::Color(1.0,0.0,1.0); // magenta + for (const auto& jt : it.second) { + // check again that the index is in range because it's possible that + // the sub-names are invalid + std::size_t idx = + static_cast(std::stoi(jt.substr(6)) - 1); + if (idx < colors.size()) { + colors[idx] = App::Color(1.0, 0.0, 1.0); // magenta + } + } + + svp->setHighlightedPoints(colors); } - - svp->setHighlightedPoints(colors); - } - else { - svp->unsetHighlightedPoints(); - } - break; - case ViewProviderFilling::Edge: - if (on) { - std::vector colors; - TopTools_IndexedMapOfShape eMap; - TopExp::MapShapes(base->Shape.getValue(), TopAbs_EDGE, eMap); - colors.resize(eMap.Extent(), svp->LineColor.getValue()); - - for (const auto& jt : it.second) { - std::size_t idx = static_cast(std::stoi(jt.substr(4)) - 1); - // check again that the index is in range because it's possible that the - // sub-names are invalid - if (idx < colors.size()) - colors[idx] = App::Color(1.0,0.0,1.0); // magenta + else { + svp->unsetHighlightedPoints(); } + break; + case ViewProviderFilling::Edge: + if (on) { + std::vector colors; + TopTools_IndexedMapOfShape eMap; + TopExp::MapShapes(base->Shape.getValue(), TopAbs_EDGE, eMap); + colors.resize(eMap.Extent(), svp->LineColor.getValue()); - svp->setHighlightedEdges(colors); - } - else { - svp->unsetHighlightedEdges(); - } - break; - case ViewProviderFilling::Face: - if (on) { - std::vector colors; - TopTools_IndexedMapOfShape fMap; - TopExp::MapShapes(base->Shape.getValue(), TopAbs_FACE, fMap); - colors.resize(fMap.Extent(), svp->ShapeColor.getValue()); + for (const auto& jt : it.second) { + std::size_t idx = + static_cast(std::stoi(jt.substr(4)) - 1); + // check again that the index is in range because it's possible that + // the sub-names are invalid + if (idx < colors.size()) { + colors[idx] = App::Color(1.0, 0.0, 1.0); // magenta + } + } - for (const auto& jt : it.second) { - std::size_t idx = static_cast(std::stoi(jt.substr(4)) - 1); - // check again that the index is in range because it's possible that the - // sub-names are invalid - if (idx < colors.size()) - colors[idx] = App::Color(1.0,0.0,1.0); // magenta + svp->setHighlightedEdges(colors); } + else { + svp->unsetHighlightedEdges(); + } + break; + case ViewProviderFilling::Face: + if (on) { + std::vector colors; + TopTools_IndexedMapOfShape fMap; + TopExp::MapShapes(base->Shape.getValue(), TopAbs_FACE, fMap); + colors.resize(fMap.Extent(), svp->ShapeColor.getValue()); - svp->setHighlightedFaces(colors); - } - else { - svp->unsetHighlightedFaces(); - } - break; + for (const auto& jt : it.second) { + std::size_t idx = + static_cast(std::stoi(jt.substr(4)) - 1); + // check again that the index is in range because it's possible that + // the sub-names are invalid + if (idx < colors.size()) { + colors[idx] = App::Color(1.0, 0.0, 1.0); // magenta + } + } + + svp->setHighlightedFaces(colors); + } + else { + svp->unsetHighlightedFaces(); + } + break; } } } @@ -182,42 +190,44 @@ void ViewProviderFilling::highlightReferences(ShapeType type, const References& // ---------------------------------------------------------------------------- -class FillingPanel::ShapeSelection : public Gui::SelectionFilterGate +class FillingPanel::ShapeSelection: public Gui::SelectionFilterGate { public: ShapeSelection(FillingPanel::SelectionMode& mode, Surface::Filling* editedObject) : Gui::SelectionFilterGate(nullPointer()) , mode(mode) , editedObject(editedObject) - { - } + {} ~ShapeSelection() override { mode = FillingPanel::None; } /** - * Allow the user to pick only edges. - */ + * Allow the user to pick only edges. + */ bool allow(App::Document*, App::DocumentObject* pObj, const char* sSubName) override { // don't allow references to itself - if (pObj == editedObject) + if (pObj == editedObject) { return false; - if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) { return false; + } - if (!sSubName || sSubName[0] == '\0') + if (!sSubName || sSubName[0] == '\0') { return false; + } switch (mode) { - case FillingPanel::InitFace: - return allowFace(pObj, sSubName); - case FillingPanel::AppendEdge: - return allowEdge(true, pObj, sSubName); - case FillingPanel::RemoveEdge: - return allowEdge(false, pObj, sSubName); - default: - return false; + case FillingPanel::InitFace: + return allowFace(pObj, sSubName); + case FillingPanel::AppendEdge: + return allowEdge(true, pObj, sSubName); + case FillingPanel::RemoveEdge: + return allowEdge(false, pObj, sSubName); + default: + return false; } } @@ -225,22 +235,25 @@ private: bool allowFace(App::DocumentObject*, const char* sSubName) { std::string element(sSubName); - if (element.substr(0,4) != "Face") + if (element.substr(0, 4) != "Face") { return false; + } return true; } bool allowEdge(bool appendEdges, App::DocumentObject* pObj, const char* sSubName) { std::string element(sSubName); - if (element.substr(0,4) != "Edge") + if (element.substr(0, 4) != "Edge") { return false; + } auto links = editedObject->BoundaryEdges.getSubListValues(); for (const auto& it : links) { if (it.first == pObj) { for (const auto& jt : it.second) { - if (jt == sSubName) + if (jt == sSubName) { return !appendEdges; + } } } } @@ -276,7 +289,10 @@ FillingPanel::FillingPanel(ViewProviderFilling* vp, Surface::Filling* obj) connect(action, &QAction::triggered, this, &FillingPanel::onDeleteEdge); ui->listBoundary->setContextMenuPolicy(Qt::ActionsContextMenu); - connect(ui->listBoundary->model(), &QAbstractItemModel::rowsMoved, this, &FillingPanel::onIndexesMoved); + // clang-format off + connect(ui->listBoundary->model(), &QAbstractItemModel::rowsMoved, + this, &FillingPanel::onIndexesMoved); + // clang-format on } /* @@ -290,6 +306,7 @@ FillingPanel::~FillingPanel() void FillingPanel::setupConnections() { + // clang-format off connect(ui->buttonInitFace, &QPushButton::clicked, this, &FillingPanel::onButtonInitFaceClicked); connect(ui->buttonEdgeAdd, &QToolButton::toggled, @@ -304,6 +321,7 @@ void FillingPanel::setupConnections() this, &FillingPanel::onButtonAcceptClicked); connect(ui->buttonIgnore, &QPushButton::clicked, this, &FillingPanel::onButtonIgnoreClicked); + // clang-format on } void FillingPanel::appendButtons(Gui::ButtonGroup* buttonGroup) @@ -322,9 +340,9 @@ void FillingPanel::setEditedObject(Surface::Filling* fea) App::DocumentObject* initFace = editedObject->InitialFace.getValue(); const std::vector& subList = editedObject->InitialFace.getSubValues(); if (initFace && subList.size() == 1) { - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(initFace->Label.getValue()), - QString::fromStdString(subList.front())); + QString text = + QString::fromLatin1("%1.%2").arg(QString::fromUtf8(initFace->Label.getValue()), + QString::fromStdString(subList.front())); ui->lineInitFaceName->setText(text); } @@ -348,7 +366,7 @@ void FillingPanel::setEditedObject(Surface::Filling* fea) } App::Document* doc = editedObject->getDocument(); - for (std::size_t i=0; ilistBoundary); ui->listBoundary->addItem(item); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(obj->Label.getValue()), - QString::fromStdString(edge)); + QString text = QString::fromLatin1("%1.%2").arg(QString::fromUtf8(obj->Label.getValue()), + QString::fromStdString(edge)); item->setText(text); // The user data field of a list widget item @@ -381,7 +398,7 @@ void FillingPanel::setEditedObject(Surface::Filling* fea) attachDocument(Gui::Application::Instance->getDocument(doc)); } -void FillingPanel::changeEvent(QEvent *e) +void FillingPanel::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -397,12 +414,13 @@ void FillingPanel::open() // highlight the boundary edges this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), true); + editedObject->BoundaryEdges.getSubListValues(), + true); // highlight the referenced face std::vector links; links.emplace_back(editedObject->InitialFace.getValue(), - editedObject->InitialFace.getSubValues()); + editedObject->InitialFace.getSubValues()); this->vp->highlightReferences(ViewProviderFilling::Face, links, true); Gui::Selection().clearSelection(); @@ -444,12 +462,13 @@ void FillingPanel::slotDeletedObject(const Gui::ViewProviderDocumentObject& Obj) // referenced part objects. The dialog will be deleted later. if (this->vp == &Obj) { this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), false); + editedObject->BoundaryEdges.getSubListValues(), + false); // unhighlight the referenced face std::vector links; links.emplace_back(editedObject->InitialFace.getValue(), - editedObject->InitialFace.getSubValues()); + editedObject->InitialFace.getSubValues()); this->vp->highlightReferences(ViewProviderFilling::Face, links, false); } } @@ -459,21 +478,24 @@ bool FillingPanel::accept() selectionMode = None; Gui::Selection().rmvSelectionGate(); - if (editedObject->mustExecute()) + if (editedObject->mustExecute()) { editedObject->recomputeFeature(); + } if (!editedObject->isValid()) { - QMessageBox::warning(this, tr("Invalid object"), - QString::fromLatin1(editedObject->getStatusString())); + QMessageBox::warning(this, + tr("Invalid object"), + QString::fromLatin1(editedObject->getStatusString())); return false; } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), false); + editedObject->BoundaryEdges.getSubListValues(), + false); // unhighlight the referenced face std::vector links; links.emplace_back(editedObject->InitialFace.getValue(), - editedObject->InitialFace.getSubValues()); + editedObject->InitialFace.getSubValues()); this->vp->highlightReferences(ViewProviderFilling::Face, links, false); return true; @@ -483,12 +505,13 @@ bool FillingPanel::reject() { if (!editedObject.expired()) { this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), false); + editedObject->BoundaryEdges.getSubListValues(), + false); // unhighlight the referenced face std::vector links; links.emplace_back(editedObject->InitialFace.getValue(), - editedObject->InitialFace.getSubValues()); + editedObject->InitialFace.getSubValues()); this->vp->highlightReferences(ViewProviderFilling::Face, links, false); } @@ -506,7 +529,7 @@ void FillingPanel::onLineInitFaceNameTextChanged(const QString& text) // unhighlight the referenced face std::vector links; links.emplace_back(editedObject->InitialFace.getValue(), - editedObject->InitialFace.getSubValues()); + editedObject->InitialFace.getSubValues()); this->vp->highlightReferences(ViewProviderFilling::Face, links, false); editedObject->InitialFace.setValue(nullptr); @@ -569,7 +592,10 @@ void FillingPanel::onListBoundaryItemDoubleClicked(QListWidgetItem* item) TopTools_IndexedMapOfShape faces; TopExp::MapShapes(shape.getShape(), TopAbs_FACE, faces); TopTools_IndexedDataMapOfShapeListOfShape edge2Face; - TopExp::MapShapesAndAncestors(shape.getShape(), TopAbs_EDGE, TopAbs_FACE, edge2Face); + TopExp::MapShapesAndAncestors(shape.getShape(), + TopAbs_EDGE, + TopAbs_FACE, + edge2Face); const TopTools_ListOfShape& adj_faces = edge2Face.FindFromKey(edge); if (adj_faces.Extent() > 0) { int n = adj_faces.Extent(); @@ -578,9 +604,12 @@ void FillingPanel::onListBoundaryItemDoubleClicked(QListWidgetItem* item) // fill up the combo boxes modifyBoundary(true); ui->comboBoxFaces->addItem(tr("None"), QByteArray("")); - ui->comboBoxCont->addItem(QString::fromLatin1("C0"), static_cast(GeomAbs_C0)); - ui->comboBoxCont->addItem(QString::fromLatin1("G1"), static_cast(GeomAbs_G1)); - ui->comboBoxCont->addItem(QString::fromLatin1("G2"), static_cast(GeomAbs_G2)); + ui->comboBoxCont->addItem(QString::fromLatin1("C0"), + static_cast(GeomAbs_C0)); + ui->comboBoxCont->addItem(QString::fromLatin1("G1"), + static_cast(GeomAbs_G1)); + ui->comboBoxCont->addItem(QString::fromLatin1("G2"), + static_cast(GeomAbs_G2)); TopTools_ListIteratorOfListOfShape it(adj_faces); for (; it.More(); it.Next()) { const TopoDS_Shape& F = it.Value(); @@ -613,16 +642,17 @@ void FillingPanel::onListBoundaryItemDoubleClicked(QListWidgetItem* item) void FillingPanel::onSelectionChanged(const Gui::SelectionChanges& msg) { - if (selectionMode == None) + if (selectionMode == None) { return; + } if (msg.Type == Gui::SelectionChanges::AddSelection) { checkOpenCommand(); if (selectionMode == InitFace) { Gui::SelectionObject sel(msg); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(sel.getObject()->Label.getValue()), - QString::fromLatin1(msg.pSubName)); + QString text = QString::fromLatin1("%1.%2").arg( + QString::fromUtf8(sel.getObject()->Label.getValue()), + QString::fromLatin1(msg.pSubName)); ui->lineInitFaceName->setText(text); std::vector subList; @@ -642,9 +672,9 @@ void FillingPanel::onSelectionChanged(const Gui::SelectionChanges& msg) ui->listBoundary->addItem(item); Gui::SelectionObject sel(msg); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(sel.getObject()->Label.getValue()), - QString::fromLatin1(msg.pSubName)); + QString text = QString::fromLatin1("%1.%2").arg( + QString::fromUtf8(sel.getObject()->Label.getValue()), + QString::fromLatin1(msg.pSubName)); item->setText(text); QList data; @@ -675,7 +705,8 @@ void FillingPanel::onSelectionChanged(const Gui::SelectionChanges& msg) } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), true); + editedObject->BoundaryEdges.getSubListValues(), + true); } else if (selectionMode == RemoveEdge) { Gui::SelectionObject sel(msg); @@ -685,10 +716,10 @@ void FillingPanel::onSelectionChanged(const Gui::SelectionChanges& msg) data << QByteArray(msg.pSubName); // only the three first elements must match - for (int i=0; ilistBoundary->count(); i++) { + for (int i = 0; i < ui->listBoundary->count(); i++) { QListWidgetItem* item = ui->listBoundary->item(i); QList userdata = item->data(Qt::UserRole).toList(); - if (userdata.mid(0,3) == data) { + if (userdata.mid(0, 3) == data) { ui->listBoundary->takeItem(i); delete item; break; @@ -696,7 +727,8 @@ void FillingPanel::onSelectionChanged(const Gui::SelectionChanges& msg) } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), false); + editedObject->BoundaryEdges.getSubListValues(), + false); App::DocumentObject* obj = sel.getObject(); std::string sub = msg.pSubName; auto objects = editedObject->BoundaryEdges.getValues(); @@ -729,7 +761,8 @@ void FillingPanel::onSelectionChanged(const Gui::SelectionChanges& msg) } } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), true); + editedObject->BoundaryEdges.getSubListValues(), + true); } editedObject->recomputeFeature(); @@ -756,7 +789,8 @@ void FillingPanel::onDeleteEdge() auto it = objects.begin(); auto jt = element.begin(); this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), false); + editedObject->BoundaryEdges.getSubListValues(), + false); for (; it != objects.end() && jt != element.end(); ++it, ++jt) { if (*it == obj && *jt == sub) { std::size_t index = std::distance(objects.begin(), it); @@ -782,7 +816,8 @@ void FillingPanel::onDeleteEdge() } } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->BoundaryEdges.getSubListValues(), true); + editedObject->BoundaryEdges.getSubListValues(), + true); editedObject->recomputeFeature(); } @@ -791,8 +826,9 @@ void FillingPanel::onDeleteEdge() void FillingPanel::onIndexesMoved() { QAbstractItemModel* model = qobject_cast(sender()); - if (!model) + if (!model) { return; + } std::vector objects; std::vector element; @@ -909,17 +945,19 @@ TaskFilling::TaskFilling(ViewProviderFilling* vp, Surface::Filling* obj) // first task box widget1 = new FillingPanel(vp, obj); widget1->appendButtons(buttonGroup); - Gui::TaskView::TaskBox* taskbox1 = new Gui::TaskView::TaskBox( - Gui::BitmapFactory().pixmap("Surface_Filling"), - widget1->windowTitle(), true, nullptr); + Gui::TaskView::TaskBox* taskbox1 = + new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("Surface_Filling"), + widget1->windowTitle(), + true, + nullptr); taskbox1->groupLayout()->addWidget(widget1); Content.push_back(taskbox1); // second task box widget2 = new FillingEdgePanel(vp, obj); widget2->appendButtons(buttonGroup); - Gui::TaskView::TaskBox* taskbox2 = new Gui::TaskView::TaskBox( - QPixmap(), widget2->windowTitle(), true, nullptr); + Gui::TaskView::TaskBox* taskbox2 = + new Gui::TaskView::TaskBox(QPixmap(), widget2->windowTitle(), true, nullptr); taskbox2->groupLayout()->addWidget(widget2); Content.push_back(taskbox2); taskbox2->hideGroupBox(); @@ -927,8 +965,8 @@ TaskFilling::TaskFilling(ViewProviderFilling* vp, Surface::Filling* obj) // third task box widget3 = new FillingVertexPanel(vp, obj); widget3->appendButtons(buttonGroup); - Gui::TaskView::TaskBox* taskbox3 = new Gui::TaskView::TaskBox( - QPixmap(), widget3->windowTitle(), true, nullptr); + Gui::TaskView::TaskBox* taskbox3 = + new Gui::TaskView::TaskBox(QPixmap(), widget3->windowTitle(), true, nullptr); taskbox3->groupLayout()->addWidget(widget3); Content.push_back(taskbox3); taskbox3->hideGroupBox(); @@ -958,7 +996,7 @@ bool TaskFilling::accept() widget2->reject(); widget3->reject(); Gui::Command::commitCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); Gui::Command::updateActive(); } @@ -972,13 +1010,13 @@ bool TaskFilling::reject() widget2->reject(); widget3->reject(); Gui::Command::abortCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); Gui::Command::updateActive(); } return ok; } -} +} // namespace SurfaceGui #include "moc_TaskFilling.cpp" diff --git a/src/Mod/Surface/Gui/TaskFilling.h b/src/Mod/Surface/Gui/TaskFilling.h index 94f5784ec2..e54f96a756 100644 --- a/src/Mod/Surface/Gui/TaskFilling.h +++ b/src/Mod/Surface/Gui/TaskFilling.h @@ -46,13 +46,18 @@ class FillingVertexPanel; class FillingEdgePanel; class Ui_TaskFilling; -class ViewProviderFilling : public PartGui::ViewProviderSpline +class ViewProviderFilling: public PartGui::ViewProviderSpline { PROPERTY_HEADER_WITH_OVERRIDE(SurfaceGui::ViewProviderFilling); using References = std::vector; public: - enum ShapeType {Vertex, Edge, Face}; + enum ShapeType + { + Vertex, + Edge, + Face + }; void setupContextMenu(QMenu*, QObject*, const char*) override; bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; @@ -60,15 +65,14 @@ public: void highlightReferences(ShapeType type, const References& refs, bool on); }; -class FillingPanel : public QWidget, - public Gui::SelectionObserver, - public Gui::DocumentObserver +class FillingPanel: public QWidget, public Gui::SelectionObserver, public Gui::DocumentObserver { Q_OBJECT protected: class ShapeSelection; - enum SelectionMode { + enum SelectionMode + { None = SurfaceGui::SelectionMode::None, InitFace = SurfaceGui::SelectionMode::InitFace, AppendEdge = SurfaceGui::SelectionMode::AppendEdge, @@ -91,10 +95,10 @@ public: bool accept(); bool reject(); void setEditedObject(Surface::Filling* obj); - void appendButtons(Gui::ButtonGroup *); + void appendButtons(Gui::ButtonGroup*); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void onSelectionChanged(const Gui::SelectionChanges& msg) override; /** Notifies on undo */ void slotUndoDocument(const Gui::Document& Doc) override; @@ -121,7 +125,7 @@ private: void exitSelectionMode(); }; -class TaskFilling : public Gui::TaskView::TaskDialog +class TaskFilling: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -136,7 +140,9 @@ public: bool reject() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: Gui::ButtonGroup* buttonGroup; @@ -145,6 +151,6 @@ private: FillingVertexPanel* widget3; }; -} //namespace SurfaceGui +} // namespace SurfaceGui -#endif // SURFACEGUI_TASKFILLING_H +#endif // SURFACEGUI_TASKFILLING_H diff --git a/src/Mod/Surface/Gui/TaskFillingEdge.cpp b/src/Mod/Surface/Gui/TaskFillingEdge.cpp index 92bcb44c89..e820cb44e6 100644 --- a/src/Mod/Surface/Gui/TaskFillingEdge.cpp +++ b/src/Mod/Surface/Gui/TaskFillingEdge.cpp @@ -23,15 +23,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -42,49 +42,52 @@ #include #include +#include "TaskFilling.h" #include "TaskFillingEdge.h" #include "ui_TaskFillingEdge.h" -#include "TaskFilling.h" using namespace SurfaceGui; -namespace SurfaceGui { +namespace SurfaceGui +{ -class FillingEdgePanel::ShapeSelection : public Gui::SelectionFilterGate +class FillingEdgePanel::ShapeSelection: public Gui::SelectionFilterGate { public: ShapeSelection(FillingEdgePanel::SelectionMode& mode, Surface::Filling* editedObject) : Gui::SelectionFilterGate(nullPointer()) , mode(mode) , editedObject(editedObject) - { - } + {} ~ShapeSelection() override { mode = FillingEdgePanel::None; } /** - * Allow the user to pick only edges. - */ + * Allow the user to pick only edges. + */ bool allow(App::Document*, App::DocumentObject* pObj, const char* sSubName) override { // don't allow references to itself - if (pObj == editedObject) + if (pObj == editedObject) { return false; - if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) { return false; + } - if (!sSubName || sSubName[0] == '\0') + if (!sSubName || sSubName[0] == '\0') { return false; + } switch (mode) { - case FillingEdgePanel::AppendEdge: - return allowEdge(true, pObj, sSubName); - case FillingEdgePanel::RemoveEdge: - return allowEdge(false, pObj, sSubName); - default: - return false; + case FillingEdgePanel::AppendEdge: + return allowEdge(true, pObj, sSubName); + case FillingEdgePanel::RemoveEdge: + return allowEdge(false, pObj, sSubName); + default: + return false; } } @@ -92,15 +95,17 @@ private: bool allowEdge(bool appendEdges, App::DocumentObject* pObj, const char* sSubName) { std::string element(sSubName); - if (element.substr(0,4) != "Edge") + if (element.substr(0, 4) != "Edge") { return false; + } auto links = editedObject->UnboundEdges.getSubListValues(); for (const auto& it : links) { if (it.first == pObj) { for (const auto& jt : it.second) { - if (jt == sSubName) + if (jt == sSubName) { return !appendEdges; + } } } } @@ -147,16 +152,26 @@ FillingEdgePanel::~FillingEdgePanel() void FillingEdgePanel::setupConnections() { - connect(ui->buttonUnboundEdgeAdd, &QToolButton::toggled, - this, &FillingEdgePanel::onButtonUnboundEdgeAddToggled); - connect(ui->buttonUnboundEdgeRemove, &QToolButton::toggled, - this, &FillingEdgePanel::onButtonUnboundEdgeRemoveToggled); - connect(ui->listUnbound, &QListWidget::itemDoubleClicked, - this, &FillingEdgePanel::onListUnboundItemDoubleClicked); - connect(ui->buttonUnboundAccept, &QPushButton::clicked, - this, &FillingEdgePanel::onButtonUnboundAcceptClicked); - connect(ui->buttonUnboundIgnore, &QPushButton::clicked, - this, &FillingEdgePanel::onButtonUnboundIgnoreClicked); + connect(ui->buttonUnboundEdgeAdd, + &QToolButton::toggled, + this, + &FillingEdgePanel::onButtonUnboundEdgeAddToggled); + connect(ui->buttonUnboundEdgeRemove, + &QToolButton::toggled, + this, + &FillingEdgePanel::onButtonUnboundEdgeRemoveToggled); + connect(ui->listUnbound, + &QListWidget::itemDoubleClicked, + this, + &FillingEdgePanel::onListUnboundItemDoubleClicked); + connect(ui->buttonUnboundAccept, + &QPushButton::clicked, + this, + &FillingEdgePanel::onButtonUnboundAcceptClicked); + connect(ui->buttonUnboundIgnore, + &QPushButton::clicked, + this, + &FillingEdgePanel::onButtonUnboundIgnoreClicked); } void FillingEdgePanel::appendButtons(Gui::ButtonGroup* buttonGroup) @@ -190,7 +205,7 @@ void FillingEdgePanel::setEditedObject(Surface::Filling* fea) } App::Document* doc = editedObject->getDocument(); - for (std::size_t i=0; ilistUnbound); ui->listUnbound->addItem(item); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(obj->Label.getValue()), - QString::fromStdString(edge)); + QString text = QString::fromLatin1("%1.%2").arg(QString::fromUtf8(obj->Label.getValue()), + QString::fromStdString(edge)); item->setText(text); // The user data field of a list widget item @@ -223,7 +237,7 @@ void FillingEdgePanel::setEditedObject(Surface::Filling* fea) attachDocument(Gui::Application::Instance->getDocument(doc)); } -void FillingEdgePanel::changeEvent(QEvent *e) +void FillingEdgePanel::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -239,7 +253,8 @@ void FillingEdgePanel::open() // highlight the boundary edges this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), true); + editedObject->UnboundEdges.getSubListValues(), + true); Gui::Selection().clearSelection(); } @@ -275,7 +290,8 @@ void FillingEdgePanel::slotDeletedObject(const Gui::ViewProviderDocumentObject& // referenced part objects. The dialog will be deleted later. if (this->vp == &Obj) { this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), false); + editedObject->UnboundEdges.getSubListValues(), + false); } } @@ -284,23 +300,27 @@ bool FillingEdgePanel::accept() selectionMode = None; Gui::Selection().rmvSelectionGate(); - if (editedObject->mustExecute()) + if (editedObject->mustExecute()) { editedObject->recomputeFeature(); + } if (!editedObject->isValid()) { - QMessageBox::warning(this, tr("Invalid object"), - QString::fromLatin1(editedObject->getStatusString())); + QMessageBox::warning(this, + tr("Invalid object"), + QString::fromLatin1(editedObject->getStatusString())); return false; } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), false); + editedObject->UnboundEdges.getSubListValues(), + false); return true; } bool FillingEdgePanel::reject() { this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), false); + editedObject->UnboundEdges.getSubListValues(), + false); selectionMode = None; Gui::Selection().rmvSelectionGate(); @@ -356,7 +376,10 @@ void FillingEdgePanel::onListUnboundItemDoubleClicked(QListWidgetItem* item) TopTools_IndexedMapOfShape faces; TopExp::MapShapes(shape.getShape(), TopAbs_FACE, faces); TopTools_IndexedDataMapOfShapeListOfShape edge2Face; - TopExp::MapShapesAndAncestors(shape.getShape(), TopAbs_EDGE, TopAbs_FACE, edge2Face); + TopExp::MapShapesAndAncestors(shape.getShape(), + TopAbs_EDGE, + TopAbs_FACE, + edge2Face); const TopTools_ListOfShape& adj_faces = edge2Face.FindFromKey(edge); if (adj_faces.Extent() > 0) { int n = adj_faces.Extent(); @@ -365,9 +388,12 @@ void FillingEdgePanel::onListUnboundItemDoubleClicked(QListWidgetItem* item) // fill up the combo boxes modifyBoundary(true); ui->comboBoxUnboundFaces->addItem(tr("None"), QByteArray("")); - ui->comboBoxUnboundCont->addItem(QString::fromLatin1("C0"), static_cast(GeomAbs_C0)); - ui->comboBoxUnboundCont->addItem(QString::fromLatin1("G1"), static_cast(GeomAbs_G1)); - ui->comboBoxUnboundCont->addItem(QString::fromLatin1("G2"), static_cast(GeomAbs_G2)); + ui->comboBoxUnboundCont->addItem(QString::fromLatin1("C0"), + static_cast(GeomAbs_C0)); + ui->comboBoxUnboundCont->addItem(QString::fromLatin1("G1"), + static_cast(GeomAbs_G1)); + ui->comboBoxUnboundCont->addItem(QString::fromLatin1("G2"), + static_cast(GeomAbs_G2)); TopTools_ListIteratorOfListOfShape it(adj_faces); for (; it.More(); it.Next()) { const TopoDS_Shape& F = it.Value(); @@ -400,8 +426,9 @@ void FillingEdgePanel::onListUnboundItemDoubleClicked(QListWidgetItem* item) void FillingEdgePanel::onSelectionChanged(const Gui::SelectionChanges& msg) { - if (selectionMode == None) + if (selectionMode == None) { return; + } if (msg.Type == Gui::SelectionChanges::AddSelection) { checkOpenCommand(); @@ -410,9 +437,9 @@ void FillingEdgePanel::onSelectionChanged(const Gui::SelectionChanges& msg) ui->listUnbound->addItem(item); Gui::SelectionObject sel(msg); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(sel.getObject()->Label.getValue()), - QString::fromLatin1(msg.pSubName)); + QString text = QString::fromLatin1("%1.%2").arg( + QString::fromUtf8(sel.getObject()->Label.getValue()), + QString::fromLatin1(msg.pSubName)); item->setText(text); QList data; @@ -443,7 +470,8 @@ void FillingEdgePanel::onSelectionChanged(const Gui::SelectionChanges& msg) } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), true); + editedObject->UnboundEdges.getSubListValues(), + true); } else if (selectionMode == RemoveEdge) { Gui::SelectionObject sel(msg); @@ -453,10 +481,10 @@ void FillingEdgePanel::onSelectionChanged(const Gui::SelectionChanges& msg) data << QByteArray(msg.pSubName); // only the three first elements must match - for (int i=0; ilistUnbound->count(); i++) { + for (int i = 0; i < ui->listUnbound->count(); i++) { QListWidgetItem* item = ui->listUnbound->item(i); QList userdata = item->data(Qt::UserRole).toList(); - if (userdata.mid(0,3) == data) { + if (userdata.mid(0, 3) == data) { ui->listUnbound->takeItem(i); delete item; break; @@ -464,7 +492,8 @@ void FillingEdgePanel::onSelectionChanged(const Gui::SelectionChanges& msg) } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), false); + editedObject->UnboundEdges.getSubListValues(), + false); App::DocumentObject* obj = sel.getObject(); std::string sub = msg.pSubName; auto objects = editedObject->UnboundEdges.getValues(); @@ -497,7 +526,8 @@ void FillingEdgePanel::onSelectionChanged(const Gui::SelectionChanges& msg) } } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), true); + editedObject->UnboundEdges.getSubListValues(), + true); } editedObject->recomputeFeature(); @@ -524,7 +554,8 @@ void FillingEdgePanel::onDeleteUnboundEdge() auto it = objects.begin(); auto jt = element.begin(); this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), false); + editedObject->UnboundEdges.getSubListValues(), + false); for (; it != objects.end() && jt != element.end(); ++it, ++jt) { if (*it == obj && *jt == sub) { std::size_t index = std::distance(objects.begin(), it); @@ -550,7 +581,8 @@ void FillingEdgePanel::onDeleteUnboundEdge() } } this->vp->highlightReferences(ViewProviderFilling::Edge, - editedObject->UnboundEdges.getSubListValues(), true); + editedObject->UnboundEdges.getSubListValues(), + true); editedObject->recomputeFeature(); } @@ -563,7 +595,8 @@ void FillingEdgePanel::onButtonUnboundAcceptClicked() QList data; data = item->data(Qt::UserRole).toList(); - QVariant face = ui->comboBoxUnboundFaces->itemData(ui->comboBoxUnboundFaces->currentIndex()); + QVariant face = + ui->comboBoxUnboundFaces->itemData(ui->comboBoxUnboundFaces->currentIndex()); QVariant cont = ui->comboBoxUnboundCont->itemData(ui->comboBoxUnboundCont->currentIndex()); if (data.size() == 5) { data[3] = face; @@ -620,7 +653,7 @@ void FillingEdgePanel::modifyBoundary(bool on) ui->buttonUnboundAccept->setEnabled(on); ui->buttonUnboundIgnore->setEnabled(on); } -} +} // namespace SurfaceGui void FillingEdgePanel::exitSelectionMode() { diff --git a/src/Mod/Surface/Gui/TaskFillingEdge.h b/src/Mod/Surface/Gui/TaskFillingEdge.h index 0da5730d39..6753c08944 100644 --- a/src/Mod/Surface/Gui/TaskFillingEdge.h +++ b/src/Mod/Surface/Gui/TaskFillingEdge.h @@ -24,11 +24,11 @@ #ifndef SURFACEGUI_TASKFILLINGEDGE_H #define SURFACEGUI_TASKFILLINGEDGE_H -#include #include #include #include #include +#include class QListWidgetItem; @@ -44,15 +44,14 @@ namespace SurfaceGui class ViewProviderFilling; class Ui_TaskFillingEdge; -class FillingEdgePanel : public QWidget, - public Gui::SelectionObserver, - public Gui::DocumentObserver +class FillingEdgePanel: public QWidget, public Gui::SelectionObserver, public Gui::DocumentObserver { Q_OBJECT protected: class ShapeSelection; - enum SelectionMode { + enum SelectionMode + { None = SurfaceGui::SelectionMode::None, AppendEdge = SurfaceGui::SelectionMode::AppendEdgeConstraint, RemoveEdge = SurfaceGui::SelectionMode::RemoveEdgeConstraint @@ -74,10 +73,10 @@ public: bool accept(); bool reject(); void setEditedObject(Surface::Filling* obj); - void appendButtons(Gui::ButtonGroup *); + void appendButtons(Gui::ButtonGroup*); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void onSelectionChanged(const Gui::SelectionChanges& msg) override; /** Notifies on undo */ void slotUndoDocument(const Gui::Document& Doc) override; @@ -101,6 +100,6 @@ private: void exitSelectionMode(); }; -} //namespace SurfaceGui +} // namespace SurfaceGui -#endif // SURFACEGUI_TASKFILLINGEDGE_H +#endif // SURFACEGUI_TASKFILLINGEDGE_H diff --git a/src/Mod/Surface/Gui/TaskFillingVertex.cpp b/src/Mod/Surface/Gui/TaskFillingVertex.cpp index dce8c2477a..18132ef526 100644 --- a/src/Mod/Surface/Gui/TaskFillingVertex.cpp +++ b/src/Mod/Surface/Gui/TaskFillingVertex.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -34,49 +34,52 @@ #include #include +#include "TaskFilling.h" #include "TaskFillingVertex.h" #include "ui_TaskFillingVertex.h" -#include "TaskFilling.h" using namespace SurfaceGui; -namespace SurfaceGui { +namespace SurfaceGui +{ -class FillingVertexPanel::VertexSelection : public Gui::SelectionFilterGate +class FillingVertexPanel::VertexSelection: public Gui::SelectionFilterGate { public: VertexSelection(FillingVertexPanel::SelectionMode& mode, Surface::Filling* editedObject) : Gui::SelectionFilterGate(nullPointer()) , mode(mode) , editedObject(editedObject) - { - } + {} ~VertexSelection() override { mode = FillingVertexPanel::None; } /** - * Allow the user to pick only edges. - */ + * Allow the user to pick only edges. + */ bool allow(App::Document*, App::DocumentObject* pObj, const char* sSubName) override { // don't allow references to itself - if (pObj == editedObject) + if (pObj == editedObject) { return false; - if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) { return false; + } - if (!sSubName || sSubName[0] == '\0') + if (!sSubName || sSubName[0] == '\0') { return false; + } switch (mode) { - case FillingVertexPanel::AppendVertex: - return allowVertex(true, pObj, sSubName); - case FillingVertexPanel::RemoveVertex: - return allowVertex(false, pObj, sSubName); - default: - return false; + case FillingVertexPanel::AppendVertex: + return allowVertex(true, pObj, sSubName); + case FillingVertexPanel::RemoveVertex: + return allowVertex(false, pObj, sSubName); + default: + return false; } } @@ -84,15 +87,17 @@ private: bool allowVertex(bool appendVertex, App::DocumentObject* pObj, const char* sSubName) { std::string element(sSubName); - if (element.substr(0,6) != "Vertex") + if (element.substr(0, 6) != "Vertex") { return false; + } auto links = editedObject->Points.getSubListValues(); for (const auto& it : links) { if (it.first == pObj) { for (const auto& jt : it.second) { - if (jt == sSubName) + if (jt == sSubName) { return !appendVertex; + } } } } @@ -139,11 +144,14 @@ FillingVertexPanel::~FillingVertexPanel() void FillingVertexPanel::setupConnections() { - connect(ui->buttonVertexAdd, &QToolButton::toggled, - this, &FillingVertexPanel::onButtonVertexAddToggled); - connect(ui->buttonVertexRemove, &QToolButton::toggled, - this, &FillingVertexPanel::onButtonVertexRemoveToggled); - + connect(ui->buttonVertexAdd, + &QToolButton::toggled, + this, + &FillingVertexPanel::onButtonVertexAddToggled); + connect(ui->buttonVertexRemove, + &QToolButton::toggled, + this, + &FillingVertexPanel::onButtonVertexRemoveToggled); } void FillingVertexPanel::appendButtons(Gui::ButtonGroup* buttonGroup) @@ -167,9 +175,8 @@ void FillingVertexPanel::setEditedObject(Surface::Filling* obj) QListWidgetItem* item = new QListWidgetItem(ui->listFreeVertex); ui->listFreeVertex->addItem(item); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8((*it)->Label.getValue()), - QString::fromStdString(*jt)); + QString text = QString::fromLatin1("%1.%2").arg(QString::fromUtf8((*it)->Label.getValue()), + QString::fromStdString(*jt)); item->setText(text); QList data; @@ -181,7 +188,7 @@ void FillingVertexPanel::setEditedObject(Surface::Filling* obj) attachDocument(Gui::Application::Instance->getDocument(doc)); } -void FillingVertexPanel::changeEvent(QEvent *e) +void FillingVertexPanel::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -195,14 +202,16 @@ void FillingVertexPanel::open() { checkOpenCommand(); this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), true); + editedObject->Points.getSubListValues(), + true); Gui::Selection().clearSelection(); } void FillingVertexPanel::reject() { this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), false); + editedObject->Points.getSubListValues(), + false); } void FillingVertexPanel::clearSelection() @@ -236,7 +245,8 @@ void FillingVertexPanel::slotDeletedObject(const Gui::ViewProviderDocumentObject // referenced part objects. The dialog will be deleted later. if (this->vp == &Obj) { this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), false); + editedObject->Points.getSubListValues(), + false); } } @@ -266,8 +276,9 @@ void FillingVertexPanel::onButtonVertexRemoveToggled(bool checked) void FillingVertexPanel::onSelectionChanged(const Gui::SelectionChanges& msg) { - if (selectionMode == None) + if (selectionMode == None) { return; + } if (msg.Type == Gui::SelectionChanges::AddSelection) { checkOpenCommand(); @@ -276,9 +287,9 @@ void FillingVertexPanel::onSelectionChanged(const Gui::SelectionChanges& msg) ui->listFreeVertex->addItem(item); Gui::SelectionObject sel(msg); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(sel.getObject()->Label.getValue()), - QString::fromLatin1(msg.pSubName)); + QString text = QString::fromLatin1("%1.%2").arg( + QString::fromUtf8(sel.getObject()->Label.getValue()), + QString::fromLatin1(msg.pSubName)); item->setText(text); QList data; @@ -293,7 +304,8 @@ void FillingVertexPanel::onSelectionChanged(const Gui::SelectionChanges& msg) element.emplace_back(msg.pSubName); editedObject->Points.setValues(objects, element); this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), true); + editedObject->Points.getSubListValues(), + true); } else if (selectionMode == RemoveVertex) { Gui::SelectionObject sel(msg); @@ -301,7 +313,7 @@ void FillingVertexPanel::onSelectionChanged(const Gui::SelectionChanges& msg) data << QByteArray(msg.pDocName); data << QByteArray(msg.pObjectName); data << QByteArray(msg.pSubName); - for (int i=0; ilistFreeVertex->count(); i++) { + for (int i = 0; i < ui->listFreeVertex->count(); i++) { QListWidgetItem* item = ui->listFreeVertex->item(i); if (item && item->data(Qt::UserRole) == data) { ui->listFreeVertex->takeItem(i); @@ -310,7 +322,8 @@ void FillingVertexPanel::onSelectionChanged(const Gui::SelectionChanges& msg) } this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), false); + editedObject->Points.getSubListValues(), + false); App::DocumentObject* obj = sel.getObject(); std::string sub = msg.pSubName; auto objects = editedObject->Points.getValues(); @@ -326,7 +339,8 @@ void FillingVertexPanel::onSelectionChanged(const Gui::SelectionChanges& msg) } } this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), true); + editedObject->Points.getSubListValues(), + true); } editedObject->recomputeFeature(); @@ -353,7 +367,8 @@ void FillingVertexPanel::onDeleteVertex() auto it = objects.begin(); auto jt = element.begin(); this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), false); + editedObject->Points.getSubListValues(), + false); for (; it != objects.end() && jt != element.end(); ++it, ++jt) { if (*it == obj && *jt == sub) { @@ -366,7 +381,8 @@ void FillingVertexPanel::onDeleteVertex() } this->vp->highlightReferences(ViewProviderFilling::Vertex, - editedObject->Points.getSubListValues(), true); + editedObject->Points.getSubListValues(), + true); } } @@ -377,6 +393,6 @@ void FillingVertexPanel::exitSelectionMode() Gui::Selection().rmvSelectionGate(); } -} +} // namespace SurfaceGui #include "moc_TaskFillingVertex.cpp" diff --git a/src/Mod/Surface/Gui/TaskFillingVertex.h b/src/Mod/Surface/Gui/TaskFillingVertex.h index af2164407a..65ec895296 100644 --- a/src/Mod/Surface/Gui/TaskFillingVertex.h +++ b/src/Mod/Surface/Gui/TaskFillingVertex.h @@ -23,11 +23,11 @@ #ifndef SURFACEGUI_TASKFILLINGVERTEX_H #define SURFACEGUI_TASKFILLINGVERTEX_H -#include #include #include #include #include +#include class QListWidgetItem; @@ -43,15 +43,16 @@ namespace SurfaceGui class ViewProviderFilling; class Ui_TaskFillingVertex; -class FillingVertexPanel : public QWidget, - public Gui::SelectionObserver, - public Gui::DocumentObserver +class FillingVertexPanel: public QWidget, + public Gui::SelectionObserver, + public Gui::DocumentObserver { Q_OBJECT protected: class VertexSelection; - enum SelectionMode { + enum SelectionMode + { None = SurfaceGui::SelectionMode::None, AppendVertex = SurfaceGui::SelectionMode::AppendVertexConstraint, RemoveVertex = SurfaceGui::SelectionMode::RemoveVertexConstraint @@ -72,10 +73,10 @@ public: void reject(); void checkOpenCommand(); void setEditedObject(Surface::Filling* obj); - void appendButtons(Gui::ButtonGroup *); + void appendButtons(Gui::ButtonGroup*); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void onSelectionChanged(const Gui::SelectionChanges& msg) override; /** Notifies on undo */ void slotUndoDocument(const Gui::Document& Doc) override; @@ -95,6 +96,6 @@ private: void exitSelectionMode(); }; -} //namespace SurfaceGui +} // namespace SurfaceGui -#endif // SURFACEGUI_TASKFILLINGVERTEX_H +#endif // SURFACEGUI_TASKFILLINGVERTEX_H diff --git a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp index 711e6f2071..8fa5b3408f 100644 --- a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp +++ b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp @@ -23,13 +23,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include - -# include -# include +#include +#include +#include +#include +#include +#include #endif #include @@ -51,9 +50,12 @@ using namespace SurfaceGui; PROPERTY_SOURCE(SurfaceGui::ViewProviderGeomFillSurface, PartGui::ViewProviderSpline) -namespace SurfaceGui { +namespace SurfaceGui +{ -void ViewProviderGeomFillSurface::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) +void ViewProviderGeomFillSurface::setupContextMenu(QMenu* menu, + QObject* receiver, + const char* member) { QAction* act; act = menu->addAction(QObject::tr("Edit filling"), receiver, member); @@ -63,20 +65,21 @@ void ViewProviderGeomFillSurface::setupContextMenu(QMenu* menu, QObject* receive bool ViewProviderGeomFillSurface::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this sketch the // object unsets and sets its edit mode without closing // the task panel - Surface::GeomFillSurface* obj = static_cast(this->getObject()); + Surface::GeomFillSurface* obj = static_cast(this->getObject()); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); // start the edit dialog if (dlg) { TaskGeomFillSurface* tDlg = qobject_cast(dlg); - if (tDlg) + if (tDlg) { tDlg->setEditedObject(obj); + } Gui::Control().showDialog(dlg); } else { @@ -113,7 +116,7 @@ void ViewProviderGeomFillSurface::highlightReferences(bool on) Part::Feature* base = dynamic_cast(it.first); if (base) { PartGui::ViewProviderPartExt* svp = dynamic_cast( - Gui::Application::Instance->getViewProvider(base)); + Gui::Application::Instance->getViewProvider(base)); if (svp) { if (on) { std::vector colors; @@ -123,8 +126,8 @@ void ViewProviderGeomFillSurface::highlightReferences(bool on) for (const auto& jt : it.second) { std::size_t idx = static_cast(std::stoi(jt.substr(4)) - 1); - assert (idx < colors.size()); - colors[idx] = App::Color(1.0,0.0,1.0); // magenta + assert(idx < colors.size()); + colors[idx] = App::Color(1.0, 0.0, 1.0); // magenta } svp->setHighlightedEdges(colors); @@ -139,18 +142,17 @@ void ViewProviderGeomFillSurface::highlightReferences(bool on) // ---------------------------------------------------------------------------- -class GeomFillSurface::EdgeSelection : public Gui::SelectionFilterGate +class GeomFillSurface::EdgeSelection: public Gui::SelectionFilterGate { public: EdgeSelection(bool appendEdges, Surface::GeomFillSurface* editedObject) : Gui::SelectionFilterGate(nullPointer()) , appendEdges(appendEdges) , editedObject(editedObject) - { - } + {} /** - * Allow the user to pick only edges. - */ + * Allow the user to pick only edges. + */ bool allow(App::Document* pDoc, App::DocumentObject* pObj, const char* sSubName) override; private: @@ -158,27 +160,34 @@ private: Surface::GeomFillSurface* editedObject; }; -bool GeomFillSurface::EdgeSelection::allow(App::Document* , App::DocumentObject* pObj, const char* sSubName) +bool GeomFillSurface::EdgeSelection::allow(App::Document*, + App::DocumentObject* pObj, + const char* sSubName) { // don't allow references to itself - if (pObj == editedObject) + if (pObj == editedObject) { return false; - if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) { return false; + } - if (!sSubName || sSubName[0] == '\0') + if (!sSubName || sSubName[0] == '\0') { return false; + } std::string element(sSubName); - if (element.substr(0,4) != "Edge") + if (element.substr(0, 4) != "Edge") { return false; + } auto links = editedObject->BoundaryList.getSubListValues(); for (const auto& it : links) { if (it.first == pObj) { for (const auto& jt : it.second) { - if (jt == sSubName) + if (jt == sSubName) { return !appendEdges; + } } } } @@ -229,38 +238,50 @@ GeomFillSurface::~GeomFillSurface() void GeomFillSurface::setupConnections() { - connect(ui->fillType_stretch, &QRadioButton::clicked, - this, &GeomFillSurface::onFillTypeStretchClicked); - connect(ui->fillType_coons, &QRadioButton::clicked, - this, &GeomFillSurface::onFillTypeCoonsClicked); - connect(ui->fillType_curved, &QRadioButton::clicked, - this, &GeomFillSurface::onFillTypeCurvedClicked); - connect(ui->buttonEdgeAdd, &QToolButton::toggled, - this, &GeomFillSurface::onButtonEdgeAddToggled); - connect(ui->buttonEdgeRemove, &QToolButton::toggled, - this, &GeomFillSurface::onButtonEdgeRemoveToggled); - connect(ui->listWidget, &QListWidget::itemDoubleClicked, - this, &GeomFillSurface::onListWidgetItemDoubleClicked); + connect(ui->fillType_stretch, + &QRadioButton::clicked, + this, + &GeomFillSurface::onFillTypeStretchClicked); + connect(ui->fillType_coons, + &QRadioButton::clicked, + this, + &GeomFillSurface::onFillTypeCoonsClicked); + connect(ui->fillType_curved, + &QRadioButton::clicked, + this, + &GeomFillSurface::onFillTypeCurvedClicked); + connect(ui->buttonEdgeAdd, + &QToolButton::toggled, + this, + &GeomFillSurface::onButtonEdgeAddToggled); + connect(ui->buttonEdgeRemove, + &QToolButton::toggled, + this, + &GeomFillSurface::onButtonEdgeRemoveToggled); + connect(ui->listWidget, + &QListWidget::itemDoubleClicked, + this, + &GeomFillSurface::onListWidgetItemDoubleClicked); } // stores object pointer, its old fill type and adjusts radio buttons according to it. void GeomFillSurface::setEditedObject(Surface::GeomFillSurface* obj) { editedObject = obj; - GeomFill_FillingStyle curtype = static_cast(editedObject->FillType.getValue()); - switch(curtype) - { - case GeomFill_StretchStyle: - ui->fillType_stretch->setChecked(true); - break; - case GeomFill_CoonsStyle: - ui->fillType_coons->setChecked(true); - break; - case GeomFill_CurvedStyle: - ui->fillType_curved->setChecked(true); - break; - default: - break; + GeomFill_FillingStyle curtype = + static_cast(editedObject->FillType.getValue()); + switch (curtype) { + case GeomFill_StretchStyle: + ui->fillType_stretch->setChecked(true); + break; + case GeomFill_CoonsStyle: + ui->fillType_coons->setChecked(true); + break; + case GeomFill_CurvedStyle: + ui->fillType_curved->setChecked(true); + break; + default: + break; } auto objects = editedObject->BoundaryList.getValues(); @@ -277,16 +298,17 @@ void GeomFillSurface::setEditedObject(Surface::GeomFillSurface* obj) for (; it != objects.end() && jt != element.end(); ++it, ++jt, ++index) { QListWidgetItem* item = new QListWidgetItem(ui->listWidget); if (index < boolean.size()) { - if (boolean[index]) + if (boolean[index]) { item->setIcon(rotateLeft); - else + } + else { item->setIcon(rotateRight); + } } ui->listWidget->addItem(item); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8((*it)->Label.getValue()), - QString::fromStdString(*jt)); + QString text = QString::fromLatin1("%1.%2").arg(QString::fromUtf8((*it)->Label.getValue()), + QString::fromStdString(*jt)); item->setText(text); QList data; @@ -299,7 +321,7 @@ void GeomFillSurface::setEditedObject(Surface::GeomFillSurface* obj) attachDocument(Gui::Application::Instance->getDocument(doc)); } -void GeomFillSurface::changeEvent(QEvent *e) +void GeomFillSurface::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -358,29 +380,31 @@ bool GeomFillSurface::accept() int count = ui->listWidget->count(); if (count > 4) { QMessageBox::warning(this, - tr("Too many edges"), - tr("The tool requires two, three or four edges")); + tr("Too many edges"), + tr("The tool requires two, three or four edges")); return false; } else if (count < 2) { QMessageBox::warning(this, - tr("Too less edges"), - tr("The tool requires two, three or four edges")); + tr("Too less edges"), + tr("The tool requires two, three or four edges")); return false; } - if (editedObject->mustExecute()) + if (editedObject->mustExecute()) { editedObject->recomputeFeature(); + } if (!editedObject->isValid()) { - QMessageBox::warning(this, tr("Invalid object"), - QString::fromLatin1(editedObject->getStatusString())); + QMessageBox::warning(this, + tr("Invalid object"), + QString::fromLatin1(editedObject->getStatusString())); return false; } this->vp->highlightReferences(false); Gui::Command::commitCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); Gui::Command::updateActive(); return true; } @@ -392,7 +416,7 @@ bool GeomFillSurface::reject() Gui::Selection().rmvSelectionGate(); Gui::Command::abortCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); Gui::Command::updateActive(); return true; } @@ -414,7 +438,8 @@ void GeomFillSurface::onFillTypeCurvedClicked() void GeomFillSurface::changeFillType(GeomFill_FillingStyle fillType) { - GeomFill_FillingStyle curtype = static_cast(editedObject->FillType.getValue()); + GeomFill_FillingStyle curtype = + static_cast(editedObject->FillType.getValue()); if (curtype != fillType) { checkOpenCommand(); editedObject->FillType.setValue(static_cast(fillType)); @@ -449,8 +474,9 @@ void GeomFillSurface::onButtonEdgeRemoveToggled(bool checked) void GeomFillSurface::onSelectionChanged(const Gui::SelectionChanges& msg) { - if (selectionMode == None) + if (selectionMode == None) { return; + } if (msg.Type == Gui::SelectionChanges::AddSelection) { checkOpenCommand(); @@ -460,9 +486,9 @@ void GeomFillSurface::onSelectionChanged(const Gui::SelectionChanges& msg) ui->listWidget->addItem(item); Gui::SelectionObject sel(msg); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(sel.getObject()->Label.getValue()), - QString::fromLatin1(msg.pSubName)); + QString text = QString::fromLatin1("%1.%2").arg( + QString::fromUtf8(sel.getObject()->Label.getValue()), + QString::fromLatin1(msg.pSubName)); item->setText(text); QList data; @@ -488,7 +514,7 @@ void GeomFillSurface::onSelectionChanged(const Gui::SelectionChanges& msg) data << QByteArray(msg.pDocName); data << QByteArray(msg.pObjectName); data << QByteArray(msg.pSubName); - for (int i=0; ilistWidget->count(); i++) { + for (int i = 0; i < ui->listWidget->count(); i++) { QListWidgetItem* item = ui->listWidget->item(i); if (item && item->data(Qt::UserRole) == data) { row = i; @@ -508,12 +534,13 @@ void GeomFillSurface::onSelectionChanged(const Gui::SelectionChanges& msg) // remove the element of the bitset at position 'row' const boost::dynamic_bitset<>& old_booleans = editedObject->ReversedList.getValues(); boost::dynamic_bitset<> new_booleans = old_booleans >> 1; - new_booleans.resize(objects.size()-1); + new_booleans.resize(objects.size() - 1); // double-check in case 'old_booleans' is out of sync if (new_booleans.size() < old_booleans.size()) { - for (int i=0; i& old_booleans = editedObject->ReversedList.getValues(); boost::dynamic_bitset<> new_booleans = old_booleans >> 1; - new_booleans.resize(objects.size()-1); + new_booleans.resize(objects.size() - 1); // double-check in case 'old_booleans' is out of sync if (new_booleans.size() < old_booleans.size()) { - for (int i=0; isetWindowTitle(QObject::tr("Surface")); - taskbox = new Gui::TaskView::TaskBox( - Gui::BitmapFactory().pixmap("Surface_BSplineSurface"), - widget->windowTitle(), true, nullptr); + taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("Surface_BSplineSurface"), + widget->windowTitle(), + true, + nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } @@ -656,6 +686,6 @@ bool TaskGeomFillSurface::reject() return widget->reject(); } -} +} // namespace SurfaceGui #include "moc_TaskGeomFillSurface.cpp" diff --git a/src/Mod/Surface/Gui/TaskGeomFillSurface.h b/src/Mod/Surface/Gui/TaskGeomFillSurface.h index 1a3025cdd8..3796ee6f63 100644 --- a/src/Mod/Surface/Gui/TaskGeomFillSurface.h +++ b/src/Mod/Surface/Gui/TaskGeomFillSurface.h @@ -44,9 +44,10 @@ namespace SurfaceGui class Ui_GeomFillSurface; -class ViewProviderGeomFillSurface : public PartGui::ViewProviderSpline +class ViewProviderGeomFillSurface: public PartGui::ViewProviderSpline { PROPERTY_HEADER_WITH_OVERRIDE(SurfaceGui::ViewProviderGeomFillSurface); + public: void setupContextMenu(QMenu*, QObject*, const char*) override; bool setEdit(int ModNum) override; @@ -55,15 +56,18 @@ public: void highlightReferences(bool on); }; -class GeomFillSurface : public QWidget, - public Gui::SelectionObserver, - public Gui::DocumentObserver +class GeomFillSurface: public QWidget, public Gui::SelectionObserver, public Gui::DocumentObserver { Q_OBJECT protected: class EdgeSelection; - enum SelectionMode { None, Append, Remove }; + enum SelectionMode + { + None, + Append, + Remove + }; SelectionMode selectionMode; Surface::GeomFillSurface* editedObject; bool checkCommand; @@ -71,7 +75,7 @@ protected: private: Ui_GeomFillSurface* ui; ViewProviderGeomFillSurface* vp; - Gui::ButtonGroup *buttonGroup; + Gui::ButtonGroup* buttonGroup; public: GeomFillSurface(ViewProviderGeomFillSurface* vp, Surface::GeomFillSurface* obj); @@ -84,7 +88,7 @@ public: void setEditedObject(Surface::GeomFillSurface* obj); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void onSelectionChanged(const Gui::SelectionChanges& msg) override; /** Notifies on undo */ void slotUndoDocument(const Gui::Document& Doc) override; @@ -111,7 +115,7 @@ private: void exitSelectionMode(); }; -class TaskGeomFillSurface : public Gui::TaskView::TaskDialog +class TaskGeomFillSurface: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -125,13 +129,15 @@ public: bool reject() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: GeomFillSurface* widget; Gui::TaskView::TaskBox* taskbox; }; -} //namespace SurfaceGui +} // namespace SurfaceGui -#endif // SURFACEGUI_TASKGEOMFILLSURFACE_H +#endif // SURFACEGUI_TASKGEOMFILLSURFACE_H diff --git a/src/Mod/Surface/Gui/TaskSections.cpp b/src/Mod/Surface/Gui/TaskSections.cpp index 6712efa7ad..4470cb9d05 100644 --- a/src/Mod/Surface/Gui/TaskSections.cpp +++ b/src/Mod/Surface/Gui/TaskSections.cpp @@ -22,13 +22,13 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include -# include -# include +#include +#include #endif #include @@ -48,7 +48,8 @@ using namespace SurfaceGui; PROPERTY_SOURCE(SurfaceGui::ViewProviderSections, PartGui::ViewProviderSpline) -namespace SurfaceGui { +namespace SurfaceGui +{ void ViewProviderSections::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { @@ -60,20 +61,21 @@ void ViewProviderSections::setupContextMenu(QMenu* menu, QObject* receiver, cons bool ViewProviderSections::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this sketch the // object unsets and sets its edit mode without closing // the task panel - Surface::Sections* obj = static_cast(this->getObject()); + Surface::Sections* obj = static_cast(this->getObject()); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); // start the edit dialog if (dlg) { TaskSections* tDlg = qobject_cast(dlg); - if (tDlg) + if (tDlg) { tDlg->setEditedObject(obj); + } Gui::Control().showDialog(dlg); } else { @@ -108,72 +110,78 @@ void ViewProviderSections::highlightReferences(ShapeType type, const References& Part::Feature* base = dynamic_cast(it.first); if (base) { PartGui::ViewProviderPartExt* svp = dynamic_cast( - Gui::Application::Instance->getViewProvider(base)); + Gui::Application::Instance->getViewProvider(base)); if (svp) { switch (type) { - case ViewProviderSections::Vertex: - if (on) { - std::vector colors; - TopTools_IndexedMapOfShape vMap; - TopExp::MapShapes(base->Shape.getValue(), TopAbs_VERTEX, vMap); - colors.resize(vMap.Extent(), svp->PointColor.getValue()); + case ViewProviderSections::Vertex: + if (on) { + std::vector colors; + TopTools_IndexedMapOfShape vMap; + TopExp::MapShapes(base->Shape.getValue(), TopAbs_VERTEX, vMap); + colors.resize(vMap.Extent(), svp->PointColor.getValue()); - for (const auto& jt : it.second) { - // check again that the index is in range because it's possible that the - // sub-names are invalid - std::size_t idx = static_cast(std::stoi(jt.substr(6)) - 1); - if (idx < colors.size()) - colors[idx] = App::Color(1.0,0.0,1.0); // magenta + for (const auto& jt : it.second) { + // check again that the index is in range because it's possible that + // the sub-names are invalid + std::size_t idx = + static_cast(std::stoi(jt.substr(6)) - 1); + if (idx < colors.size()) { + colors[idx] = App::Color(1.0, 0.0, 1.0); // magenta + } + } + + svp->setHighlightedPoints(colors); } - - svp->setHighlightedPoints(colors); - } - else { - svp->unsetHighlightedPoints(); - } - break; - case ViewProviderSections::Edge: - if (on) { - std::vector colors; - TopTools_IndexedMapOfShape eMap; - TopExp::MapShapes(base->Shape.getValue(), TopAbs_EDGE, eMap); - colors.resize(eMap.Extent(), svp->LineColor.getValue()); - - for (const auto& jt : it.second) { - std::size_t idx = static_cast(std::stoi(jt.substr(4)) - 1); - // check again that the index is in range because it's possible that the - // sub-names are invalid - if (idx < colors.size()) - colors[idx] = App::Color(1.0,0.0,1.0); // magenta + else { + svp->unsetHighlightedPoints(); } + break; + case ViewProviderSections::Edge: + if (on) { + std::vector colors; + TopTools_IndexedMapOfShape eMap; + TopExp::MapShapes(base->Shape.getValue(), TopAbs_EDGE, eMap); + colors.resize(eMap.Extent(), svp->LineColor.getValue()); - svp->setHighlightedEdges(colors); - } - else { - svp->unsetHighlightedEdges(); - } - break; - case ViewProviderSections::Face: - if (on) { - std::vector colors; - TopTools_IndexedMapOfShape fMap; - TopExp::MapShapes(base->Shape.getValue(), TopAbs_FACE, fMap); - colors.resize(fMap.Extent(), svp->ShapeColor.getValue()); + for (const auto& jt : it.second) { + std::size_t idx = + static_cast(std::stoi(jt.substr(4)) - 1); + // check again that the index is in range because it's possible that + // the sub-names are invalid + if (idx < colors.size()) { + colors[idx] = App::Color(1.0, 0.0, 1.0); // magenta + } + } - for (const auto& jt : it.second) { - std::size_t idx = static_cast(std::stoi(jt.substr(4)) - 1); - // check again that the index is in range because it's possible that the - // sub-names are invalid - if (idx < colors.size()) - colors[idx] = App::Color(1.0,0.0,1.0); // magenta + svp->setHighlightedEdges(colors); } + else { + svp->unsetHighlightedEdges(); + } + break; + case ViewProviderSections::Face: + if (on) { + std::vector colors; + TopTools_IndexedMapOfShape fMap; + TopExp::MapShapes(base->Shape.getValue(), TopAbs_FACE, fMap); + colors.resize(fMap.Extent(), svp->ShapeColor.getValue()); - svp->setHighlightedFaces(colors); - } - else { - svp->unsetHighlightedFaces(); - } - break; + for (const auto& jt : it.second) { + std::size_t idx = + static_cast(std::stoi(jt.substr(4)) - 1); + // check again that the index is in range because it's possible that + // the sub-names are invalid + if (idx < colors.size()) { + colors[idx] = App::Color(1.0, 0.0, 1.0); // magenta + } + } + + svp->setHighlightedFaces(colors); + } + else { + svp->unsetHighlightedFaces(); + } + break; } } } @@ -182,40 +190,42 @@ void ViewProviderSections::highlightReferences(ShapeType type, const References& // ---------------------------------------------------------------------------- -class SectionsPanel::ShapeSelection : public Gui::SelectionFilterGate +class SectionsPanel::ShapeSelection: public Gui::SelectionFilterGate { public: ShapeSelection(SectionsPanel::SelectionMode& mode, Surface::Sections* editedObject) : Gui::SelectionFilterGate(nullPointer()) , mode(mode) , editedObject(editedObject) - { - } + {} ~ShapeSelection() override { mode = SectionsPanel::None; } /** - * Allow the user to pick only edges. - */ + * Allow the user to pick only edges. + */ bool allow(App::Document*, App::DocumentObject* pObj, const char* sSubName) override { // don't allow references to itself - if (pObj == editedObject) + if (pObj == editedObject) { return false; - if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) + } + if (!pObj->isDerivedFrom(Part::Feature::getClassTypeId())) { return false; + } - if (!sSubName || sSubName[0] == '\0') + if (!sSubName || sSubName[0] == '\0') { return false; + } switch (mode) { - case SectionsPanel::AppendEdge: - return allowEdge(true, pObj, sSubName); - case SectionsPanel::RemoveEdge: - return allowEdge(false, pObj, sSubName); - default: - return false; + case SectionsPanel::AppendEdge: + return allowEdge(true, pObj, sSubName); + case SectionsPanel::RemoveEdge: + return allowEdge(false, pObj, sSubName); + default: + return false; } } @@ -223,15 +233,17 @@ private: bool allowEdge(bool appendEdges, App::DocumentObject* pObj, const char* sSubName) { std::string element(sSubName); - if (element.substr(0,4) != "Edge") + if (element.substr(0, 4) != "Edge") { return false; + } auto links = editedObject->NSections.getSubListValues(); for (const auto& it : links) { if (it.first == pObj) { for (const auto& jt : it.second) { - if (jt == sSubName) + if (jt == sSubName) { return !appendEdges; + } } } } @@ -246,7 +258,8 @@ private: // ---------------------------------------------------------------------------- -SectionsPanel::SectionsPanel(ViewProviderSections* vp, Surface::Sections* obj) : ui(new Ui_Sections()) +SectionsPanel::SectionsPanel(ViewProviderSections* vp, Surface::Sections* obj) + : ui(new Ui_Sections()) { ui->setupUi(this); setupConnections(); @@ -270,7 +283,10 @@ SectionsPanel::SectionsPanel(ViewProviderSections* vp, Surface::Sections* obj) : connect(action, &QAction::triggered, this, &SectionsPanel::onDeleteEdge); ui->listSections->setContextMenuPolicy(Qt::ActionsContextMenu); - connect(ui->listSections->model(), &QAbstractItemModel::rowsMoved, this, &SectionsPanel::onIndexesMoved); + connect(ui->listSections->model(), + &QAbstractItemModel::rowsMoved, + this, + &SectionsPanel::onIndexesMoved); } /* @@ -280,11 +296,11 @@ SectionsPanel::~SectionsPanel() = default; void SectionsPanel::setupConnections() { - connect(ui->buttonEdgeAdd, &QToolButton::toggled, - this, &SectionsPanel::onButtonEdgeAddToggled); - connect(ui->buttonEdgeRemove, &QToolButton::toggled, - this, &SectionsPanel::onButtonEdgeRemoveToggled); - + connect(ui->buttonEdgeAdd, &QToolButton::toggled, this, &SectionsPanel::onButtonEdgeAddToggled); + connect(ui->buttonEdgeRemove, + &QToolButton::toggled, + this, + &SectionsPanel::onButtonEdgeRemoveToggled); } // stores object pointer, its old fill type and adjusts radio buttons according to it. @@ -298,16 +314,15 @@ void SectionsPanel::setEditedObject(Surface::Sections* fea) auto count = objects.size(); App::Document* doc = editedObject->getDocument(); - for (std::size_t i=0; ilistSections); ui->listSections->addItem(item); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(obj->Label.getValue()), - QString::fromStdString(edge)); + QString text = QString::fromLatin1("%1.%2").arg(QString::fromUtf8(obj->Label.getValue()), + QString::fromStdString(edge)); item->setText(text); // The user data field of a list widget item @@ -326,7 +341,7 @@ void SectionsPanel::setEditedObject(Surface::Sections* fea) attachDocument(Gui::Application::Instance->getDocument(doc)); } -void SectionsPanel::changeEvent(QEvent *e) +void SectionsPanel::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -342,7 +357,8 @@ void SectionsPanel::open() // highlight the boundary edges this->vp->highlightReferences(ViewProviderSections::Edge, - editedObject->NSections.getSubListValues(), true); + editedObject->NSections.getSubListValues(), + true); Gui::Selection().clearSelection(); } @@ -378,7 +394,8 @@ void SectionsPanel::slotDeletedObject(const Gui::ViewProviderDocumentObject& Obj // referenced part objects. The dialog will be deleted later. if (this->vp == &Obj) { this->vp->highlightReferences(ViewProviderSections::Edge, - editedObject->NSections.getSubListValues(), false); + editedObject->NSections.getSubListValues(), + false); } } @@ -387,16 +404,19 @@ bool SectionsPanel::accept() selectionMode = None; Gui::Selection().rmvSelectionGate(); - if (editedObject->mustExecute()) + if (editedObject->mustExecute()) { editedObject->recomputeFeature(); + } if (!editedObject->isValid()) { - QMessageBox::warning(this, tr("Invalid object"), - QString::fromLatin1(editedObject->getStatusString())); + QMessageBox::warning(this, + tr("Invalid object"), + QString::fromLatin1(editedObject->getStatusString())); return false; } this->vp->highlightReferences(ViewProviderSections::Edge, - editedObject->NSections.getSubListValues(), false); + editedObject->NSections.getSubListValues(), + false); return true; } @@ -404,7 +424,8 @@ bool SectionsPanel::accept() bool SectionsPanel::reject() { this->vp->highlightReferences(ViewProviderSections::Edge, - editedObject->NSections.getSubListValues(), false); + editedObject->NSections.getSubListValues(), + false); selectionMode = None; Gui::Selection().rmvSelectionGate(); @@ -438,8 +459,9 @@ void SectionsPanel::onButtonEdgeRemoveToggled(bool checked) void SectionsPanel::onSelectionChanged(const Gui::SelectionChanges& msg) { - if (selectionMode == None) + if (selectionMode == None) { return; + } if (msg.Type == Gui::SelectionChanges::AddSelection) { checkOpenCommand(); @@ -448,9 +470,9 @@ void SectionsPanel::onSelectionChanged(const Gui::SelectionChanges& msg) ui->listSections->addItem(item); Gui::SelectionObject sel(msg); - QString text = QString::fromLatin1("%1.%2") - .arg(QString::fromUtf8(sel.getObject()->Label.getValue()), - QString::fromLatin1(msg.pSubName)); + QString text = QString::fromLatin1("%1.%2").arg( + QString::fromUtf8(sel.getObject()->Label.getValue()), + QString::fromLatin1(msg.pSubName)); item->setText(text); QList data; @@ -469,10 +491,10 @@ void SectionsPanel::onSelectionChanged(const Gui::SelectionChanges& msg) data << QByteArray(msg.pSubName); // only the three first elements must match - for (int i=0; ilistSections->count(); i++) { + for (int i = 0; i < ui->listSections->count(); i++) { QListWidgetItem* item = ui->listSections->item(i); QList userdata = item->data(Qt::UserRole).toList(); - if (userdata.mid(0,3) == data) { + if (userdata.mid(0, 3) == data) { ui->listSections->takeItem(i); delete item; break; @@ -509,8 +531,9 @@ void SectionsPanel::onDeleteEdge() void SectionsPanel::onIndexesMoved() { QAbstractItemModel* model = qobject_cast(sender()); - if (!model) + if (!model) { return; + } std::vector objects; std::vector element; @@ -542,13 +565,15 @@ void SectionsPanel::appendCurve(App::DocumentObject* obj, const std::string& sub editedObject->NSections.setValues(objects, element); this->vp->highlightReferences(ViewProviderSections::Edge, - editedObject->NSections.getSubListValues(), true); + editedObject->NSections.getSubListValues(), + true); } void SectionsPanel::removeCurve(App::DocumentObject* obj, const std::string& subname) { this->vp->highlightReferences(ViewProviderSections::Edge, - editedObject->NSections.getSubListValues(), false); + editedObject->NSections.getSubListValues(), + false); auto objects = editedObject->NSections.getValues(); auto element = editedObject->NSections.getSubValues(); @@ -564,8 +589,8 @@ void SectionsPanel::removeCurve(App::DocumentObject* obj, const std::string& sub } } this->vp->highlightReferences(ViewProviderSections::Edge, - editedObject->NSections.getSubListValues(), true); - + editedObject->NSections.getSubListValues(), + true); } void SectionsPanel::exitSelectionMode() @@ -581,9 +606,11 @@ TaskSections::TaskSections(ViewProviderSections* vp, Surface::Sections* obj) { // first task box widget1 = new SectionsPanel(vp, obj); - Gui::TaskView::TaskBox* taskbox1 = new Gui::TaskView::TaskBox( - Gui::BitmapFactory().pixmap("Surface_Sections"), - widget1->windowTitle(), true, nullptr); + Gui::TaskView::TaskBox* taskbox1 = + new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("Surface_Sections"), + widget1->windowTitle(), + true, + nullptr); taskbox1->groupLayout()->addWidget(widget1); Content.push_back(taskbox1); } @@ -603,7 +630,7 @@ bool TaskSections::accept() bool ok = widget1->accept(); if (ok) { Gui::Command::commitCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); Gui::Command::updateActive(); } @@ -615,13 +642,13 @@ bool TaskSections::reject() bool ok = widget1->reject(); if (ok) { Gui::Command::abortCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); Gui::Command::updateActive(); } return ok; } -} +} // namespace SurfaceGui #include "moc_TaskSections.cpp" diff --git a/src/Mod/Surface/Gui/TaskSections.h b/src/Mod/Surface/Gui/TaskSections.h index 368a804695..eb957ae03e 100644 --- a/src/Mod/Surface/Gui/TaskSections.h +++ b/src/Mod/Surface/Gui/TaskSections.h @@ -44,13 +44,18 @@ namespace SurfaceGui class Ui_Sections; -class ViewProviderSections : public PartGui::ViewProviderSpline +class ViewProviderSections: public PartGui::ViewProviderSpline { PROPERTY_HEADER_WITH_OVERRIDE(SurfaceGui::ViewProviderSections); using References = std::vector; public: - enum ShapeType {Vertex, Edge, Face}; + enum ShapeType + { + Vertex, + Edge, + Face + }; void setupContextMenu(QMenu*, QObject*, const char*) override; bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; @@ -58,15 +63,18 @@ public: void highlightReferences(ShapeType type, const References& refs, bool on); }; -class SectionsPanel : public QWidget, - public Gui::SelectionObserver, - public Gui::DocumentObserver +class SectionsPanel: public QWidget, public Gui::SelectionObserver, public Gui::DocumentObserver { Q_OBJECT protected: class ShapeSelection; - enum SelectionMode { None, AppendEdge, RemoveEdge }; + enum SelectionMode + { + None, + AppendEdge, + RemoveEdge + }; SelectionMode selectionMode; Surface::Sections* editedObject; bool checkCommand; @@ -74,7 +82,7 @@ protected: private: std::unique_ptr ui; ViewProviderSections* vp; - Gui::ButtonGroup *buttonGroup; + Gui::ButtonGroup* buttonGroup; public: SectionsPanel(ViewProviderSections* vp, Surface::Sections* obj); @@ -87,7 +95,7 @@ public: void setEditedObject(Surface::Sections* obj); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void onSelectionChanged(const Gui::SelectionChanges& msg) override; /** Notifies on undo */ void slotUndoDocument(const Gui::Document& Doc) override; @@ -110,7 +118,7 @@ private: void exitSelectionMode(); }; -class TaskSections : public Gui::TaskView::TaskDialog +class TaskSections: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -124,12 +132,14 @@ public: bool reject() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: SectionsPanel* widget1; }; -} //namespace SurfaceGui +} // namespace SurfaceGui -#endif // SURFACEGUI_TASKSECTIONS_H +#endif // SURFACEGUI_TASKSECTIONS_H diff --git a/src/Mod/Surface/Gui/ViewProviderExtend.cpp b/src/Mod/Surface/Gui/ViewProviderExtend.cpp index 60b4bc6fec..6a5ef3b175 100644 --- a/src/Mod/Surface/Gui/ViewProviderExtend.cpp +++ b/src/Mod/Surface/Gui/ViewProviderExtend.cpp @@ -31,11 +31,12 @@ using namespace SurfaceGui; PROPERTY_SOURCE(SurfaceGui::ViewProviderExtend, PartGui::ViewProviderSpline) -namespace SurfaceGui { +namespace SurfaceGui +{ QIcon ViewProviderExtend::getIcon() const { return Gui::BitmapFactory().pixmap("Surface_ExtendFace"); } -} //namespace SurfaceGui +} // namespace SurfaceGui diff --git a/src/Mod/Surface/Gui/ViewProviderExtend.h b/src/Mod/Surface/Gui/ViewProviderExtend.h index a90a226e65..158a0177df 100644 --- a/src/Mod/Surface/Gui/ViewProviderExtend.h +++ b/src/Mod/Surface/Gui/ViewProviderExtend.h @@ -29,7 +29,7 @@ namespace SurfaceGui { -class ViewProviderExtend : public PartGui::ViewProviderSpline +class ViewProviderExtend: public PartGui::ViewProviderSpline { PROPERTY_HEADER_WITH_OVERRIDE(SurfaceGui::ViewProviderExtend); @@ -37,6 +37,6 @@ public: QIcon getIcon() const override; }; -} //namespace SurfaceGui +} // namespace SurfaceGui -#endif // SURFACEGUI_VIEWPROVIDEREXTEND_H +#endif // SURFACEGUI_VIEWPROVIDEREXTEND_H diff --git a/src/Mod/Surface/Gui/Workbench.cpp b/src/Mod/Surface/Gui/Workbench.cpp index 9229ef6d4b..946efddce1 100644 --- a/src/Mod/Surface/Gui/Workbench.cpp +++ b/src/Mod/Surface/Gui/Workbench.cpp @@ -38,12 +38,12 @@ Workbench::Workbench() = default; Workbench::~Workbench() = default; -Gui::MenuItem *Workbench::setupMenuBar() const +Gui::MenuItem* Workbench::setupMenuBar() const { - Gui::MenuItem *root = StdWorkbench::setupMenuBar(); - Gui::MenuItem *item = root->findItem("&Windows"); + Gui::MenuItem* root = StdWorkbench::setupMenuBar(); + Gui::MenuItem* item = root->findItem("&Windows"); - Gui::MenuItem *surface = new Gui::MenuItem; + Gui::MenuItem* surface = new Gui::MenuItem; root->insertItem(item, surface); surface->setCommand("Surface"); *surface << "Surface_Filling" @@ -53,17 +53,17 @@ Gui::MenuItem *Workbench::setupMenuBar() const << "Surface_CurveOnMesh" << "Surface_BlendCurve"; /* - *surface << "Surface_Cut"; - */ + *surface << "Surface_Cut"; + */ return root; } -Gui::ToolBarItem *Workbench::setupToolBars() const +Gui::ToolBarItem* Workbench::setupToolBars() const { - Gui::ToolBarItem *root = StdWorkbench::setupToolBars(); + Gui::ToolBarItem* root = StdWorkbench::setupToolBars(); - Gui::ToolBarItem *surface = new Gui::ToolBarItem(root); + Gui::ToolBarItem* surface = new Gui::ToolBarItem(root); surface->setCommand("Surface"); *surface << "Surface_Filling" << "Surface_GeomFillSurface" @@ -72,8 +72,8 @@ Gui::ToolBarItem *Workbench::setupToolBars() const << "Surface_CurveOnMesh" << "Surface_BlendCurve"; /* - *surface << "Surface_Cut"; - */ + *surface << "Surface_Cut"; + */ return root; } diff --git a/src/Mod/Surface/Gui/Workbench.h b/src/Mod/Surface/Gui/Workbench.h index 6f384806a4..42e48dfdb6 100644 --- a/src/Mod/Surface/Gui/Workbench.h +++ b/src/Mod/Surface/Gui/Workbench.h @@ -26,9 +26,10 @@ #include -namespace SurfaceGui { +namespace SurfaceGui +{ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -41,7 +42,7 @@ protected: Gui::ToolBarItem* setupToolBars() const override; }; -} // namespace SurfaceGui +} // namespace SurfaceGui -#endif // Surface_WORKBENCH_H +#endif // Surface_WORKBENCH_H diff --git a/src/Mod/Surface/InitGui.py b/src/Mod/Surface/InitGui.py index 492fad9dad..3bbd4c7424 100644 --- a/src/Mod/Surface/InitGui.py +++ b/src/Mod/Surface/InitGui.py @@ -32,9 +32,9 @@ import FreeCADGui as Gui class SurfaceWorkbench(Gui.Workbench): """Surface workbench object.""" - Icon = os.path.join(App.getResourceDir(), - "Mod", "Surface", - "Resources", "icons", "Surface_Workbench.svg") + Icon = os.path.join( + App.getResourceDir(), "Mod", "Surface", "Resources", "icons", "Surface_Workbench.svg" + ) MenuText = "Surface" ToolTip = "Surface workbench: Create and edit complex surfaces" diff --git a/src/Mod/Surface/Surface.dox b/src/Mod/Surface/Surface.dox index 25b214d504..4ac28fb693 100644 --- a/src/Mod/Surface/Surface.dox +++ b/src/Mod/Surface/Surface.dox @@ -5,4 +5,3 @@ See \ref src/Mod/Draft/draft.dox as an example of how to populate this page */ - diff --git a/src/Mod/Surface/SurfaceGlobal.h b/src/Mod/Surface/SurfaceGlobal.h index 5b8ecca779..d180548cfa 100644 --- a/src/Mod/Surface/SurfaceGlobal.h +++ b/src/Mod/Surface/SurfaceGlobal.h @@ -29,19 +29,19 @@ // Surface #ifndef SurfaceExport #ifdef Surface_EXPORTS -# define SurfaceExport FREECAD_DECL_EXPORT +#define SurfaceExport FREECAD_DECL_EXPORT #else -# define SurfaceExport FREECAD_DECL_IMPORT +#define SurfaceExport FREECAD_DECL_IMPORT #endif #endif // SurfaceGui #ifndef SurfaceGuiExport #ifdef SurfaceGui_EXPORTS -# define SurfaceGuiExport FREECAD_DECL_EXPORT +#define SurfaceGuiExport FREECAD_DECL_EXPORT #else -# define SurfaceGuiExport FREECAD_DECL_IMPORT +#define SurfaceGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //SURFACE_GLOBAL_H +#endif // SURFACE_GLOBAL_H diff --git a/src/Mod/Surface/SurfaceTests/TestBlendCurve.py b/src/Mod/Surface/SurfaceTests/TestBlendCurve.py index afc2da7a87..21f89eaebb 100644 --- a/src/Mod/Surface/SurfaceTests/TestBlendCurve.py +++ b/src/Mod/Surface/SurfaceTests/TestBlendCurve.py @@ -51,7 +51,7 @@ class TestBlendCurve(unittest.TestCase): # Create C0 BlendPoint at origin b1 = Surface.BlendPoint() # Create G1 BlendPoint - b2 = Surface.BlendPoint([vec(10,3,6), vec(2,5,6)]) + b2 = Surface.BlendPoint([vec(10, 3, 6), vec(2, 5, 6)]) # BlendCurve between the two BlendPoints bc = Surface.BlendCurve(b1, b2) # Compute the interpolating BezierCurve @@ -60,7 +60,7 @@ class TestBlendCurve(unittest.TestCase): # Create G2 BlendPoint at the end of previous BlendCurve b1 = Surface.BlendPoint(curve1.toShape(), 1, 2) # Create G1 BlendPoint - b2 = Surface.BlendPoint([vec(5,6,2), vec(2,5,6)]) + b2 = Surface.BlendPoint([vec(5, 6, 2), vec(2, 5, 6)]) bc = Surface.BlendCurve(b1, b2) # Compute the interpolating BezierCurve diff --git a/src/Mod/TechDraw/App/CenterLine.cpp b/src/Mod/TechDraw/App/CenterLine.cpp index 47b40a7a1a..66f59d5725 100644 --- a/src/Mod/TechDraw/App/CenterLine.cpp +++ b/src/Mod/TechDraw/App/CenterLine.cpp @@ -198,6 +198,8 @@ CenterLine* CenterLine::CenterLineBuilder(const DrawViewPart* partFeat, Base::Console().Warning("CenterLineBuilder - check V/H/A and/or Flip parameters\n"); return nullptr; } + + TechDraw::CenterLine* cl = new TechDraw::CenterLine(ends.first, ends.second); if (cl) { cl->m_type = type; @@ -214,6 +216,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p { // Base::Console().Message("CL::scaledGeometry() - m_type: %d\n", m_type); double scale = partFeat->getScale(); + double viewAngleDeg = partFeat->Rotation.getValue(); std::pair ends; try { if (m_faces.empty() && @@ -222,7 +225,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p // Base::Console().Message("CL::scaledGeometry - no geometry to scale!\n"); //CenterLine was created by points without a geometry reference, ends = calcEndPointsNoRef(m_start, m_end, scale, m_extendBy, - m_hShift, m_vShift, m_rotate); + m_hShift, m_vShift, m_rotate, viewAngleDeg); } else if (m_type == CLTYPE::FACE) { ends = calcEndPoints(partFeat, m_faces, @@ -307,38 +310,35 @@ void CenterLine::dump(const char* title) Base::Console().Message("CL::dump - %s \n", toString().c_str()); } -std::tuple -CenterLine::rotatePointsAroundMid(const Base::Vector3d& p1, +//! rotate a notional 2d vector from p1 to p2 around its midpoint by angleDeg +std::pair CenterLine::rotatePointsAroundMid(const Base::Vector3d& p1, const Base::Vector3d& p2, const Base::Vector3d& mid, - const double rotate) + const double angleDeg) { - //rotate p1, p2 about mid - double revRotate = -rotate; - double cosTheta = cos(revRotate * M_PI / 180.0); - double sinTheta = sin(revRotate * M_PI / 180.0); - Base::Vector3d toOrg = p1 - mid; - double xRot = toOrg.x * cosTheta - toOrg.y * sinTheta; - double yRot = toOrg.y * cosTheta + toOrg.x * sinTheta; - Base::Vector3d newp1 = Base::Vector3d(xRot, yRot, 0.0) + mid; - toOrg = p2 - mid; - xRot = toOrg.x * cosTheta - toOrg.y * sinTheta; - yRot = toOrg.y * cosTheta + toOrg.x * sinTheta; - Base::Vector3d newp2 = Base::Vector3d(xRot, yRot, 0.0) + mid; + std::pair result; + double angleRad = angleDeg * M_PI / 180.0; - return std::make_tuple(newp1, newp2); + result.first.x = ((p1.x - mid.x) * cos(angleRad)) - ((p1.y - mid.y) * sin(angleRad)) + mid.x; + result.first.y = ((p1.x - mid.x) * sin(angleRad)) + ((p1.y - mid.y) * cos(angleRad)) + mid.y; + result.first.z = 0.0; + + result.second.x = ((p2.x - mid.x) * cos(angleRad)) - ((p2.y - mid.y) * sin(angleRad)) + mid.x; + result.second.y = ((p2.x - mid.x) * sin(angleRad)) + ((p2.y - mid.y) * cos(angleRad)) + mid.y; + result.second.z = 0.0; + + return result; } //end points for centerline with no geometry reference -std::pair CenterLine::calcEndPointsNoRef( - const Base::Vector3d& start, +std::pair CenterLine::calcEndPointsNoRef(const Base::Vector3d& start, const Base::Vector3d& end, const double scale, const double ext, const double hShift, const double vShift, - const double rotate) + const double rotate, const double viewAngleDeg) { // Base::Console().Message("CL::calcEndPointsNoRef()\n"); Base::Vector3d p1 = start; @@ -369,9 +369,14 @@ std::pair CenterLine::calcEndPointsNoRef( p2.y = p2.y + vss; } + // rotate the endpoints so that when the View's Rotation is applied, the + // centerline is aligned correctly std::pair result; result.first = p1 / scale; result.second = p2 / scale; + Base::Vector3d midpoint = (result.first + result.second) / 2.0; + result = rotatePointsAroundMid(result.first, result.second, midpoint, viewAngleDeg * -1.0); + return result; } @@ -395,21 +400,30 @@ std::pair CenterLine::calcEndPoints(const DrawVi double scale = partFeat->getScale(); + std::vector faceEdgesAll; for (auto& fn: faceNames) { if (TechDraw::DrawUtil::getGeomTypeFromName(fn) != "Face") { continue; } int idx = TechDraw::DrawUtil::getIndexFromName(fn); - std::vector faceEdges = + std::vector faceGeoms = partFeat->getFaceEdgesByIndex(idx); - if (!faceEdges.empty()) { - for (auto& fe: faceEdges) { + if (!faceGeoms.empty()) { + for (auto& fe: faceGeoms) { if (!fe->getCosmetic()) { - BRepBndLib::AddOptimal(fe->getOCCEdge(), faceBox); + faceEdgesAll.push_back(fe->getOCCEdge()); } } } } + TopoDS_Shape faceEdgeCompound = DU::vectorToCompound(faceEdgesAll); + if (partFeat->Rotation.getValue() != 0.0) { + // align a copy of the input shape with the cardinal axes so we can use bbox to + // get size measurements + faceEdgeCompound = ShapeUtils::rotateShape(faceEdgeCompound, partFeat->getProjectionCS(), partFeat->Rotation.getValue() * -1.0); + } + + BRepBndLib::AddOptimal(faceEdgeCompound, faceBox); if (faceBox.IsVoid()) { Base::Console().Error("CL::calcEndPoints - faceBox is void!\n"); @@ -466,9 +480,14 @@ std::pair CenterLine::calcEndPoints(const DrawVi p2.y = p2.y + vss; } + // rotate the endpoints so that when the View's Rotation is applied, the + // centerline is aligned correctly std::pair result; result.first = p1 / scale; result.second = p2 / scale; + Base::Vector3d midpoint = (result.first + result.second) / 2.0; + result = rotatePointsAroundMid(result.first, result.second, midpoint, partFeat->Rotation.getValue() * -1.0); + return result; } @@ -568,7 +587,9 @@ std::pair CenterLine::calcEndPoints2Lines(const //rotate if (!DrawUtil::fpCompare(rotate, 0.0)) { //rotate p1, p2 about mid - std::tie(p1, p2) = rotatePointsAroundMid(p1, p2, mid, rotate); + std::pair ends = rotatePointsAroundMid(p1, p2, mid, rotate); + p1 = ends.first; + p2 = ends.second; } //shift @@ -583,8 +604,13 @@ std::pair CenterLine::calcEndPoints2Lines(const p2.y = p2.y + vss; } + // rotate the endpoints so that when the View's Rotation is applied, the + // centerline is aligned correctly result.first = p1 / scale; result.second = p2 / scale; + Base::Vector3d midpoint = (result.first + result.second) / 2.0; + result = rotatePointsAroundMid(result.first, result.second, midpoint, partFeat->Rotation.getValue() * -1.0); + return result; } @@ -688,9 +714,12 @@ std::pair CenterLine::calcEndPoints2Points(const p2.y = p2.y + vss; } + // in the case of points, we do not need to apply a rotation, since the points will + // rotated already std::pair result; result.first = p1 / scale; result.second = p2 / scale; + return result; } @@ -1014,3 +1043,4 @@ bool CenterLine::getFlip() const { return m_flip2Line; } + diff --git a/src/Mod/TechDraw/App/CenterLine.h b/src/Mod/TechDraw/App/CenterLine.h index e0c8f045b4..5086cb324d 100644 --- a/src/Mod/TechDraw/App/CenterLine.h +++ b/src/Mod/TechDraw/App/CenterLine.h @@ -89,7 +89,7 @@ public: const bool flip = false); TechDraw::BaseGeomPtr scaledGeometry(const TechDraw::DrawViewPart* partFeat); - static std::tuple rotatePointsAroundMid( + static std::pair rotatePointsAroundMid( const Base::Vector3d& p1, const Base::Vector3d& p2, const Base::Vector3d& mid, @@ -101,7 +101,8 @@ public: const double ext, const double hShift, const double vShift, - const double rotate); + const double rotate, + const double viewAngleDeg); static std::pair calcEndPoints( const TechDraw::DrawViewPart* partFeat, const std::vector& faceNames, diff --git a/src/Mod/TechDraw/App/DrawGeomHatch.cpp b/src/Mod/TechDraw/App/DrawGeomHatch.cpp index f524d8f1d3..8713999a9d 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatch.cpp +++ b/src/Mod/TechDraw/App/DrawGeomHatch.cpp @@ -64,6 +64,7 @@ using namespace TechDraw; +using DU = DrawUtil; App::PropertyFloatConstraint::Constraints DrawGeomHatch::scaleRange = { Precision::Confusion(), std::numeric_limits::max(), (0.1)}; // increment by 0.1 @@ -577,6 +578,13 @@ TopoDS_Face DrawGeomHatch::extractFace(DrawViewPart* source, int iface ) return TopoDS::Face(temp); } +//! get a translated label string from the context (ex TaskActiveView), the base name (ex ActiveView) and +//! the unique name within the document (ex ActiveView001), and use it to update the Label property. +void DrawGeomHatch::translateLabel(std::string context, std::string baseName, std::string uniqueName) +{ + Label.setValue(DU::translateArbitrary(context, baseName, uniqueName)); +} + //-------------------------------------------------------------------------------------------------- PyObject *DrawGeomHatch::getPyObject() diff --git a/src/Mod/TechDraw/App/DrawGeomHatch.h b/src/Mod/TechDraw/App/DrawGeomHatch.h index 55e8c0fc7d..165696e68b 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatch.h +++ b/src/Mod/TechDraw/App/DrawGeomHatch.h @@ -103,6 +103,8 @@ public: static App::Color prefGeomHatchColor(); static std::vector makeLineSets(std::string fileSpec, std::string myPattern); + void translateLabel(std::string context, std::string baseName, std::string uniqueName); + protected: void replacePatIncluded(std::string newHatchFileName); diff --git a/src/Mod/TechDraw/App/DrawGeomHatchPy.xml b/src/Mod/TechDraw/App/DrawGeomHatchPy.xml index 8cedf84241..c061dd0812 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatchPy.xml +++ b/src/Mod/TechDraw/App/DrawGeomHatchPy.xml @@ -13,6 +13,13 @@ Feature for creating and manipulating Technical Drawing GeomHatch areas + + + translateLabel(translationContext, objectBaseName, objectUniqueName). + No return value. Replace the current label with a translated version where possible. + + + diff --git a/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp index 61c460393e..fc434573f7 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawGeomHatchPyImp.cpp @@ -34,10 +34,48 @@ std::string DrawGeomHatchPy::representation() const return std::string(""); } +//! replace the current Label with a translated version +PyObject* DrawGeomHatchPy::translateLabel(PyObject *args) +{ + PyObject* pyContext; + PyObject* pyBaseName; + PyObject* pyUniqueName; + std::string context; + std::string baseName; + std::string uniqueName; + if (!PyArg_ParseTuple(args, "OOO", &pyContext, &pyBaseName, &pyUniqueName)) { + throw Py::TypeError("Could not translate label - bad parameters."); + } + Py_ssize_t size = 0; + const char* cContext = PyUnicode_AsUTF8AndSize(pyContext, &size); + if (cContext) { + context = std::string(cContext, size); + } else { + throw Py::TypeError("Could not translate label - context not available."); + } + const char* cBaseName = PyUnicode_AsUTF8AndSize(pyBaseName, &size); + if (cBaseName) { + baseName = std::string(cBaseName, size); + } else { + throw Py::TypeError("Could not translate label - base name not available."); + } + const char* cUniqueName = PyUnicode_AsUTF8AndSize(pyUniqueName, &size); + if (cUniqueName) { + uniqueName = std::string(cUniqueName, size); + } else { + throw Py::TypeError("Could not translate label - unique name not available."); + } + + // we have the 3 parameters we need for DrawView::translateLabel + DrawGeomHatch* dgh = getDrawGeomHatchPtr(); + dgh->translateLabel(context, baseName, uniqueName); + + Py_Return; +} PyObject *DrawGeomHatchPy::getCustomAttributes(const char* /*attr*/) const diff --git a/src/Mod/TechDraw/App/DrawHatch.cpp b/src/Mod/TechDraw/App/DrawHatch.cpp index 162988decb..3a7528e224 100644 --- a/src/Mod/TechDraw/App/DrawHatch.cpp +++ b/src/Mod/TechDraw/App/DrawHatch.cpp @@ -41,6 +41,7 @@ using namespace TechDraw; +using DU = DrawUtil; PROPERTY_SOURCE(TechDraw::DrawHatch, App::DocumentObject) @@ -201,6 +202,13 @@ bool DrawHatch::isBitmapHatch(void) const return fi.hasExtension({"bmp", "png", "jpg", "jpeg"}); } +//! get a translated label string from the context (ex TaskActiveView), the base name (ex ActiveView) and +//! the unique name within the document (ex ActiveView001), and use it to update the Label property. +void DrawHatch::translateLabel(std::string context, std::string baseName, std::string uniqueName) +{ + Label.setValue(DU::translateArbitrary(context, baseName, uniqueName)); +} + //standard preference getters std::string DrawHatch::prefSvgHatch(void) { diff --git a/src/Mod/TechDraw/App/DrawHatch.h b/src/Mod/TechDraw/App/DrawHatch.h index 9bf97a4a4b..b856da157d 100644 --- a/src/Mod/TechDraw/App/DrawHatch.h +++ b/src/Mod/TechDraw/App/DrawHatch.h @@ -72,6 +72,8 @@ public: bool isSvgHatch() const; bool isBitmapHatch() const; + void translateLabel(std::string context, std::string baseName, std::string uniqueName); + protected: void onChanged(const App::Property* prop) override; void replaceFileIncluded(std::string newSvgFile); diff --git a/src/Mod/TechDraw/App/DrawHatchPy.xml b/src/Mod/TechDraw/App/DrawHatchPy.xml index 46df058060..835b6acbdc 100644 --- a/src/Mod/TechDraw/App/DrawHatchPy.xml +++ b/src/Mod/TechDraw/App/DrawHatchPy.xml @@ -13,6 +13,13 @@ Feature for creating and manipulating Technical Drawing Hatch areas + + + translateLabel(translationContext, objectBaseName, objectUniqueName). + No return value. Replace the current label with a translated version where possible. + + + diff --git a/src/Mod/TechDraw/App/DrawHatchPyImp.cpp b/src/Mod/TechDraw/App/DrawHatchPyImp.cpp index 14e8a90366..c80f570659 100644 --- a/src/Mod/TechDraw/App/DrawHatchPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawHatchPyImp.cpp @@ -35,6 +35,48 @@ std::string DrawHatchPy::representation() const { return std::string(""); } +//! replace the current Label with a translated version +PyObject* DrawHatchPy::translateLabel(PyObject *args) +{ + PyObject* pyContext; + PyObject* pyBaseName; + PyObject* pyUniqueName; + std::string context; + std::string baseName; + std::string uniqueName; + + if (!PyArg_ParseTuple(args, "OOO", &pyContext, &pyBaseName, &pyUniqueName)) { + throw Py::TypeError("Could not translate label - bad parameters."); + } + + Py_ssize_t size = 0; + const char* cContext = PyUnicode_AsUTF8AndSize(pyContext, &size); + if (cContext) { + context = std::string(cContext, size); + } else { + throw Py::TypeError("Could not translate label - context not available."); + } + + const char* cBaseName = PyUnicode_AsUTF8AndSize(pyBaseName, &size); + if (cBaseName) { + baseName = std::string(cBaseName, size); + } else { + throw Py::TypeError("Could not translate label - base name not available."); + } + + const char* cUniqueName = PyUnicode_AsUTF8AndSize(pyUniqueName, &size); + if (cUniqueName) { + uniqueName = std::string(cUniqueName, size); + } else { + throw Py::TypeError("Could not translate label - unique name not available."); + } + + // we have the 3 parameters we need for DrawView::translateLabel + DrawHatch* dh = getDrawHatchPtr(); + dh->translateLabel(context, baseName, uniqueName); + + Py_Return; +} PyObject *DrawHatchPy::getCustomAttributes(const char* /*attr*/) const { diff --git a/src/Mod/TechDraw/App/DrawUtil.cpp b/src/Mod/TechDraw/App/DrawUtil.cpp index 986c4a43be..cc6a4c225a 100644 --- a/src/Mod/TechDraw/App/DrawUtil.cpp +++ b/src/Mod/TechDraw/App/DrawUtil.cpp @@ -69,6 +69,7 @@ #include "GeometryObject.h" #include "LineGroup.h" #include "Preferences.h" +#include "DrawViewPart.h" using namespace TechDraw; @@ -1625,6 +1626,27 @@ std::string DrawUtil::translateArbitrary(std::string context, std::string baseNa return ssTranslated + suffix; } +// true if owner->element is a cosmetic vertex +bool DrawUtil::isCosmeticVertex(App::DocumentObject* owner, std::string element) +{ + auto ownerView = static_cast(owner); + auto vertex = ownerView->getVertex(element); + if (vertex) { + return vertex->getCosmetic(); + } + return false; +} + +// true if owner->element is a cosmetic edge +bool DrawUtil::isCosmeticEdge(App::DocumentObject* owner, std::string element) +{ + auto ownerView = static_cast(owner); + auto edge = ownerView->getEdge(element); + if (edge) { + return edge->getCosmetic(); + } + return false; +} //============================ // various debugging routines. diff --git a/src/Mod/TechDraw/App/DrawUtil.h b/src/Mod/TechDraw/App/DrawUtil.h index 0933fc909f..bbb7a64120 100644 --- a/src/Mod/TechDraw/App/DrawUtil.h +++ b/src/Mod/TechDraw/App/DrawUtil.h @@ -255,6 +255,8 @@ public: static std::string translateArbitrary(std::string context, std::string baseName, std::string uniqueName); + static bool isCosmeticVertex(App::DocumentObject* owner, std::string element); + static bool isCosmeticEdge(App::DocumentObject* owner, std::string element); //debugging routines static void dumpVertexes(const char* text, const TopoDS_Shape& s); diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index 7e92ee8ab3..f29486b417 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -319,7 +319,7 @@ void DrawViewSection::onChanged(const App::Property* prop) else if (prop == &BaseView) { // if the BaseView is a Section, then the option of using UsePreviousCut is // valid. - if (BaseView.getValue()->getTypeId().isDerivedFrom( + if (BaseView.getValue() && BaseView.getValue()->getTypeId().isDerivedFrom( TechDraw::DrawViewSection::getClassTypeId())) { UsePreviousCut.setStatus(App::Property::ReadOnly, false); } diff --git a/src/Mod/TechDraw/App/ShapeExtractor.cpp b/src/Mod/TechDraw/App/ShapeExtractor.cpp index 0f0f659004..c31af9e1ab 100644 --- a/src/Mod/TechDraw/App/ShapeExtractor.cpp +++ b/src/Mod/TechDraw/App/ShapeExtractor.cpp @@ -341,7 +341,7 @@ TopoDS_Shape ShapeExtractor::getShapesFused(const std::vector shapes2d = getShapes2d(links, true); if (!shapes2d.empty()) { shapes2d.push_back(baseShape); - return DrawUtil::shapeVectorToCompound(shapes2d); + return DrawUtil::shapeVectorToCompound(shapes2d, false); } return baseShape; diff --git a/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp b/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp index 1e82179d1e..2d84b30700 100644 --- a/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp +++ b/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp @@ -42,6 +42,7 @@ #include "QGSPage.h" #include "ViewProviderPage.h" #include "ViewProviderDrawingView.h" +#include "PagePrinter.h" namespace TechDrawGui { @@ -185,12 +186,12 @@ private: if (vpp) { mdi = vpp->getMDIViewPage(); if (mdi) { - mdi->printPdf(filePath); + mdi->savePDF(filePath); } else { vpp->showMDIViewPage(); mdi = vpp->getMDIViewPage(); if (mdi) { - mdi->printPdf(filePath); + mdi->savePDF(filePath); } else { throw Py::TypeError("Page not available! Is it Hidden?"); } diff --git a/src/Mod/TechDraw/Gui/CMakeLists.txt b/src/Mod/TechDraw/Gui/CMakeLists.txt index 6ca0317bff..fb93a034ba 100644 --- a/src/Mod/TechDraw/Gui/CMakeLists.txt +++ b/src/Mod/TechDraw/Gui/CMakeLists.txt @@ -239,6 +239,8 @@ SET(TechDrawGui_SRCS SET(TechDrawGuiView_SRCS MDIViewPage.cpp MDIViewPage.h + PagePrinter.cpp + PagePrinter.h QGVPage.cpp QGVPage.h QGSPage.cpp diff --git a/src/Mod/TechDraw/Gui/DlgStringListEditor.cpp b/src/Mod/TechDraw/Gui/DlgStringListEditor.cpp index 28904c4c71..ead8f68e0b 100644 --- a/src/Mod/TechDraw/Gui/DlgStringListEditor.cpp +++ b/src/Mod/TechDraw/Gui/DlgStringListEditor.cpp @@ -106,6 +106,9 @@ void DlgStringListEditor::slotAddItem() void DlgStringListEditor::slotRemoveItem() { + if (ui->lwTexts->count() < 1) { + return; + } int row = ui->lwTexts->currentRow(); if (row >= 0) { auto item = ui->lwTexts->takeItem(row); @@ -116,6 +119,10 @@ void DlgStringListEditor::slotRemoveItem() std::vector DlgStringListEditor::getTexts() const { std::vector outTexts; + if (ui->lwTexts->count() < 1) { + return outTexts; + } + for (int iRow = 0; iRow < ui->lwTexts->count(); iRow++) { QString itemText = ui->lwTexts->item(iRow)->text(); outTexts.push_back(Base::Tools::toStdString(itemText)); diff --git a/src/Mod/TechDraw/Gui/MDIViewPage.cpp b/src/Mod/TechDraw/Gui/MDIViewPage.cpp index e8f0a99f02..f035ef580f 100644 --- a/src/Mod/TechDraw/Gui/MDIViewPage.cpp +++ b/src/Mod/TechDraw/Gui/MDIViewPage.cpp @@ -75,6 +75,7 @@ #include "QGVPage.h" #include "Rez.h" #include "ViewProviderPage.h" +#include "PagePrinter.h" using namespace TechDrawGui; using namespace TechDraw; @@ -85,8 +86,7 @@ namespace sp = std::placeholders; TYPESYSTEM_SOURCE_ABSTRACT(TechDrawGui::MDIViewPage, Gui::MDIView) MDIViewPage::MDIViewPage(ViewProviderPage* pageVp, Gui::Document* doc, QWidget* parent) - : Gui::MDIView(doc, parent), m_vpPage(pageVp), m_orientation(QPageLayout::Landscape), - m_paperSize(QPageSize::A4), m_pagewidth(0.0), m_pageheight(0.0) + : Gui::MDIView(doc, parent), m_vpPage(pageVp) { setMouseTracking(true); @@ -106,7 +106,7 @@ MDIViewPage::MDIViewPage(ViewProviderPage* pageVp, Gui::Document* doc, QWidget* connect(m_exportPDFAction, &QAction::triggered, this, qOverload<>(&MDIViewPage::savePDF)); m_printAllAction = new QAction(tr("Print All Pages"), this); - connect(m_printAllAction, &QAction::triggered, this, qOverload<>(&MDIViewPage::printAll)); + connect(m_printAllAction, &QAction::triggered, this, qOverload<>(&MDIViewPage::printAllPages)); isSelectionBlocked = false; @@ -120,15 +120,25 @@ MDIViewPage::MDIViewPage(ViewProviderPage* pageVp, Gui::Document* doc, QWidget* auto bnd = std::bind(&MDIViewPage::onDeleteObject, this, sp::_1); connectDeletedObject = appDoc->signalDeletedObject.connect(bnd); //NOLINTEND + + m_pagePrinter = new PagePrinter(m_vpPage); + m_pagePrinter->setOwner(this); } -MDIViewPage::~MDIViewPage() { connectDeletedObject.disconnect(); } +MDIViewPage::~MDIViewPage() +{ + connectDeletedObject.disconnect(); + delete m_pagePrinter; +} void MDIViewPage::setScene(QGSPage* scene, QGVPage* viewWidget) { m_scene = scene; setCentralWidget(viewWidget);//this makes viewWidget a Qt child of MDIViewPage QObject::connect(scene, &QGSPage::selectionChanged, this, &MDIViewPage::sceneSelectionChanged); + if (m_pagePrinter) { + m_pagePrinter->setScene(m_scene); + } } void MDIViewPage::setDocumentObject(const std::string& name) @@ -203,6 +213,14 @@ bool MDIViewPage::onMsg(const char* pMsg, const char**) Gui::Command::updateActive(); return true; } + else if (strcmp("ZoomIn", pMsg) == 0) { + zoomIn(); + return true; + } + else if (strcmp("ZoomOut", pMsg) == 0) { + zoomOut(); + return true; + } return false; } @@ -236,10 +254,28 @@ bool MDIViewPage::onHasMsg(const char* pMsg) const else if (strcmp("PrintAll", pMsg) == 0) { return true; } + else if (strcmp("ZoomIn", pMsg) == 0) { + return true; + } + else if (strcmp("ZoomOut", pMsg) == 0) { + return true; + } return false; } -//called by ViewProvider when Page feature Label changes +// handle a zoomIn message from the menu +void MDIViewPage::zoomIn() +{ + m_vpPage->getQGVPage()->zoomIn(); +} + +// handle a zoomOut message from the menu +void MDIViewPage::zoomOut() +{ + m_vpPage->getQGVPage()->zoomOut(); +} + +// called by ViewProvider when Page feature Label changes void MDIViewPage::setTabText(std::string tabText) { if (!isPassive() && !tabText.empty()) { @@ -258,26 +294,15 @@ void MDIViewPage::fixSceneDependencies() //**** printing routines -void MDIViewPage::getPaperAttributes() -{ - App::DocumentObject* obj = m_vpPage->getDrawPage()->Template.getValue(); - auto pageTemplate(dynamic_cast(obj)); - if (pageTemplate) { - m_pagewidth = pageTemplate->Width.getValue(); - m_pageheight = pageTemplate->Height.getValue(); - } - m_paperSize = QPageSize::id(QSizeF(m_pagewidth, m_pageheight), QPageSize::Millimeter, - QPageSize::FuzzyOrientationMatch); - if (m_pagewidth > m_pageheight) { - m_orientation = QPageLayout::Landscape; - } - else { - m_orientation = QPageLayout::Portrait; - } -} +/// MDIViewPage handles those aspects of printing that require user interaction, such +/// as file name selection and error messages +/// PagePrinter handles the actual printing mechanics. +/// overrides of MDIView print methods so that they print the QGraphicsScene instead +/// of the COIN3d scenegraph. void MDIViewPage::printPdf() { +// Base::Console().Message("MDIVP::printPdf()\n"); QStringList filter; filter << QObject::tr("PDF (*.pdf)"); filter << QObject::tr("All Files (*.*)"); @@ -290,55 +315,29 @@ void MDIViewPage::printPdf() Gui::WaitCursor wc; std::string utf8Content = fn.toUtf8().constData(); - m_scene->setExportingPdf(true); - printPdf(utf8Content); - m_scene->setExportingPdf(false); -} - -void MDIViewPage::printPdf(std::string file) -{ - if (file.empty()) { - Base::Console().Warning("MDIViewPage - no file specified\n"); - return; + if (m_pagePrinter) { + m_pagePrinter->printPdf(utf8Content); } - getPaperAttributes(); - - QString filename = QString::fromUtf8(file.data(), file.size()); - QPrinter printer(QPrinter::HighResolution); - // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/ -// printer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b); - printer.setFullPage(true); - printer.setOutputFileName(filename); - - if (m_paperSize == QPageSize::Ledger) { - printer.setPageOrientation((QPageLayout::Orientation)(1 - m_orientation));//reverse 0/1 - } - else { - printer.setPageOrientation(m_orientation); - } - if (m_paperSize == QPageSize::Custom) { - printer.setPageSize(QPageSize(QSizeF(m_pagewidth, m_pageheight), QPageSize::Millimeter)); - } - else { - printer.setPageSize(QPageSize(m_paperSize)); - } - print(&printer); } void MDIViewPage::print() { - // Base::Console().Message("MDIVP::print()\n"); - getPaperAttributes(); +// Base::Console().Message("MDIVP::print()\n"); + + if (!m_pagePrinter) { + return; + } + m_pagePrinter->getPaperAttributes(); QPrinter printer(QPrinter::HighResolution); printer.setFullPage(true); - if (m_paperSize == QPageSize::Custom) { - printer.setPageSize(QPageSize(QSizeF(m_pagewidth, m_pageheight), QPageSize::Millimeter)); + if (m_pagePrinter->getPaperSize() == QPageSize::Custom) { + printer.setPageSize(QPageSize(QSizeF(m_pagePrinter->getPageWidth(), m_pagePrinter->getPageHeight()), QPageSize::Millimeter)); } else { - printer.setPageSize(QPageSize(m_paperSize)); + printer.setPageSize(QPageSize(m_pagePrinter->getPaperSize())); } - printer.setPageOrientation(m_orientation); + printer.setPageOrientation(m_pagePrinter->getOrientation()); QPrintDialog dlg(&printer, this); if (dlg.exec() == QDialog::Accepted) { @@ -348,17 +347,22 @@ void MDIViewPage::print() void MDIViewPage::printPreview() { - getPaperAttributes(); +// Base::Console().Message("MDIVP::printPreview()\n"); + + if (!m_pagePrinter) { + return; + } + m_pagePrinter->getPaperAttributes(); QPrinter printer(QPrinter::HighResolution); printer.setFullPage(true); - if (m_paperSize == QPageSize::Custom) { - printer.setPageSize(QPageSize(QSizeF(m_pagewidth, m_pageheight), QPageSize::Millimeter)); + if (m_pagePrinter->getPaperSize() == QPageSize::Custom) { + printer.setPageSize(QPageSize(QSizeF(m_pagePrinter->getPageWidth(), m_pagePrinter->getPageHeight()), QPageSize::Millimeter)); } else { - printer.setPageSize(QPageSize(m_paperSize)); + printer.setPageSize(QPageSize(m_pagePrinter->getPaperSize())); } - printer.setPageOrientation(m_orientation); + printer.setPageOrientation(m_pagePrinter->getOrientation()); QPrintPreviewDialog dlg(&printer, this); connect(&dlg, &QPrintPreviewDialog::paintRequested, this, qOverload(&MDIViewPage::print)); @@ -368,9 +372,11 @@ void MDIViewPage::printPreview() void MDIViewPage::print(QPrinter* printer) { - // Base::Console().Message("MDIVP::print(printer)\n"); - getPaperAttributes(); - +// Base::Console().Message("MDIVP::print(printer)\n"); + if (!m_pagePrinter) { + return; + } + m_pagePrinter->getPaperAttributes(); // As size of the render area paperRect() should be used. When performing a real // print pageRect() may also work but the output is cropped at the bottom part. // So, independent whether pageRect() or paperRect() is used there is no scaling effect. @@ -390,7 +396,7 @@ void MDIViewPage::print(QPrinter* printer) // care if it uses wrong printer settings bool doPrint = paintType != QPaintEngine::Picture; - if (doPrint && printer->pageLayout().orientation() != m_orientation) { + if (doPrint && printer->pageLayout().orientation() != m_pagePrinter->getOrientation()) { int ret = QMessageBox::warning( this, tr("Different orientation"), tr("The printer uses a different orientation than the drawing.\n" @@ -400,7 +406,7 @@ void MDIViewPage::print(QPrinter* printer) return; } } - if (doPrint && psPrtSetting != m_paperSize) { + if (doPrint && psPrtSetting != m_pagePrinter->getPaperSize()) { int ret = QMessageBox::warning( this, tr("Different paper size"), tr("The printer uses a different paper size than the drawing.\n" @@ -413,6 +419,7 @@ void MDIViewPage::print(QPrinter* printer) } QPainter p(printer); + // why use a QPainter to determine if we can write to a file? if (!p.isActive() && !printer->outputFileName().isEmpty()) { qApp->setOverrideCursor(Qt::ArrowCursor); QMessageBox::critical( @@ -421,233 +428,20 @@ void MDIViewPage::print(QPrinter* printer) qApp->restoreOverrideCursor(); return; } + // free the printer from the painter + p.end(); - QRect targetRect = printer->pageLayout().fullRectPixels(printer->resolution()); - -#ifdef Q_OS_WIN32 - // On Windows the preview looks broken when using paperRect as render area. - // Although the picture is scaled when using pageRect, it looks just fine. - if (paintType == QPaintEngine::Picture) { - targetRect = printer->pageLayout().paintRectPixels(printer->resolution()); + if (m_pagePrinter) { + m_pagePrinter->print(printer); } -#endif - //bool block = - static_cast(blockSelection(true));// avoid to be notified by itself - Gui::Selection().clearSelection(); - - bool saveState = m_vpPage->getFrameState(); - m_vpPage->setFrameState(false); - m_vpPage->setTemplateMarkers(false); - m_scene->refreshViews(); - - Gui::Selection().clearSelection(); - - App::DocumentObject* obj = m_vpPage->getDrawPage()->Template.getValue(); - auto pageTemplate(dynamic_cast(obj)); - double width = 0.0; - double height = 0.0; - if (pageTemplate) { - width = Rez::guiX(pageTemplate->Width.getValue()); - height = Rez::guiX(pageTemplate->Height.getValue()); - } - QRectF sourceRect(0.0, -height, width, height); - - //scene might be drawn in light text. we need to redraw in normal text. - bool saveLightOnDark = Preferences::lightOnDark(); - if (Preferences::lightOnDark()) { - Preferences::lightOnDark(false); - m_vpPage->getQGSPage()->redrawAllViews(); - m_vpPage->getQTemplate()->updateView(); - } - m_scene->render(&p, targetRect, sourceRect); - - // Reset - m_vpPage->setFrameState(saveState); - m_vpPage->setTemplateMarkers(saveState); - Preferences::lightOnDark(saveLightOnDark); - m_scene->refreshViews(); - m_vpPage->getQTemplate()->updateView(); - //bool block = - static_cast(blockSelection(false)); } //static routine to print all pages in a document void MDIViewPage::printAll(QPrinter* printer, App::Document* doc) { - // Base::Console().Message("MDIVP::printAll()\n"); - QPainter painter(printer); - QPageLayout pageLayout = printer->pageLayout(); - bool firstTime = true; - std::vector docObjs = - doc->getObjectsOfType(TechDraw::DrawPage::getClassTypeId()); - for (auto& obj : docObjs) { - Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(obj); - if (!vp) { - continue;// can't print this one - } - TechDrawGui::ViewProviderPage* vpp = dynamic_cast(vp); - if (!vpp) { - continue;// can't print this one - } - - TechDraw::DrawPage* dp = static_cast(obj); - double width = 297.0;//default to A4 Landscape 297 x 210 - double height = 210.0; - setPageLayout(pageLayout, dp, width, height); - printer->setPageLayout(pageLayout); - - //for some reason the first page doesn't obey the pageLayout, so we have to print - //a sacrificial blank page, but we make it a feature instead of a bug by printing a - //table of contents on the sacrificial page. - if (firstTime) { - firstTime = false; - printBannerPage(printer, painter, pageLayout, doc, docObjs); - } - - printer->newPage(); - QRectF sourceRect(0.0, Rez::guiX(-height), Rez::guiX(width), Rez::guiX(height)); - QRect targetRect = printer->pageLayout().fullRectPixels(printer->resolution()); - - renderPage(vpp, painter, sourceRect, targetRect); - } - painter.end(); -} - -//static routine to print all pages in a document to pdf -void MDIViewPage::printAllPdf(QPrinter* printer, App::Document* doc) -{ - // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/ - printer->setPdfVersion(QPagedPaintDevice::PdfVersion_A1b); - // Base::Console().Message("MDIVP::printAllPdf()\n"); - QString outputFile = printer->outputFileName(); - QString documentName = QString::fromUtf8(doc->getName()); - QPdfWriter pdfWriter(outputFile); - // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/ - pdfWriter.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b); - pdfWriter.setTitle(documentName); - pdfWriter.setResolution(printer->resolution()); - QPainter painter(&pdfWriter); - QPageLayout pageLayout = printer->pageLayout(); - - double dpmm = printer->resolution() / 25.4; - bool firstTime = true; - std::vector docObjs = - doc->getObjectsOfType(TechDraw::DrawPage::getClassTypeId()); - for (auto& obj : docObjs) { - Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(obj); - if (!vp) { - continue;// can't print this one - } - TechDrawGui::ViewProviderPage* vpp = dynamic_cast(vp); - if (!vpp) { - continue;// can't print this one - } - - TechDraw::DrawPage* dp = static_cast(obj); - double width = 297.0;//default to A4 Landscape 297 x 210 - double height = 210.0; - setPageLayout(pageLayout, dp, width, height); - pdfWriter.setPageLayout(pageLayout); - - //for some reason the first page doesn't obey the pageLayout, so we have to print - //a sacrificial blank page, but we make it a feature instead of a bug by printing a - //table of contents on the sacrificial page. - if (firstTime) { - firstTime = false; - printBannerPage(printer, painter, pageLayout, doc, docObjs); - } - pdfWriter.newPage(); - - QRectF sourceRect(0.0, Rez::guiX(-height), Rez::guiX(width), Rez::guiX(height)); - QRect targetRect(0, 0, width * dpmm, height * dpmm); - - renderPage(vpp, painter, sourceRect, targetRect); - } - painter.end(); -} - -//static -void MDIViewPage::printBannerPage(QPrinter* printer, QPainter& painter, QPageLayout& pageLayout, - App::Document* doc, std::vector& docObjs) -{ - QFont savePainterFont = painter.font(); - QFont painterFont; - painterFont.setFamily(Preferences::labelFontQString()); - int fontSizeMM = Preferences::labelFontSizeMM(); - double dpmm = printer->resolution() / 25.4; - int fontSizePx = fontSizeMM * dpmm; - painterFont.setPixelSize(fontSizePx); - painter.setFont(painterFont); - - //print a header - QString docLine = QObject::tr("Document Name: ") + QString::fromUtf8(doc->getName()); - int leftMargin = pageLayout.margins().left() * dpmm + 5 * dpmm; //layout margin + 5mm - int verticalPos = pageLayout.margins().top() * dpmm + 20 * dpmm;//layout margin + 20mm - int verticalSpacing = 2; //double space - painter.drawText(leftMargin, verticalPos, docLine); - - //leave some blank space between document name and page entries - verticalPos += 2 * verticalSpacing * fontSizePx; - for (auto& obj : docObjs) { - //print a line for each page - QString pageLine = QString::fromUtf8(obj->getNameInDocument()) + QString::fromUtf8(" / ") - + QString::fromUtf8(obj->Label.getValue()); - painter.drawText(leftMargin, verticalPos, pageLine); - verticalPos += verticalSpacing * fontSizePx; - } - painter.setFont(savePainterFont);//restore the original font -} - -//static -void MDIViewPage::renderPage(ViewProviderPage* vpp, QPainter& painter, QRectF& sourceRect, - QRect& targetRect) -{ - //turn off view frames for print - bool saveState = vpp->getFrameState(); - vpp->setFrameState(false); - vpp->setTemplateMarkers(false); - - //scene might be drawn in light text. we need to redraw in normal text. - bool saveLightOnDark = Preferences::lightOnDark(); - if (Preferences::lightOnDark()) { - Preferences::lightOnDark(false); - vpp->getQGSPage()->redrawAllViews(); - } - - vpp->getQGSPage()->refreshViews(); - vpp->getQGSPage()->render(&painter, targetRect, sourceRect); - - // Reset - vpp->setFrameState(saveState); - vpp->setTemplateMarkers(saveState); - Preferences::lightOnDark(saveLightOnDark); - - vpp->getQGSPage()->refreshViews(); -} - -//static -void MDIViewPage::setPageLayout(QPageLayout& pageLayout, TechDraw::DrawPage* dPage, double& width, - double& height) -{ - auto pageTemplate(dynamic_cast(dPage->Template.getValue())); - if (pageTemplate) { - width = pageTemplate->Width.getValue(); - height = pageTemplate->Height.getValue(); - } - //Qt's page size determination assumes Portrait orientation. To get the right paper size - //we need to ask in the proper form. - QPageSize::PageSizeId paperSizeID = - QPageSize::id(QSizeF(std::min(width, height), std::max(width, height)), - QPageSize::Millimeter, QPageSize::FuzzyOrientationMatch); - if (paperSizeID == QPageSize::Custom) { - pageLayout.setPageSize(QPageSize(QSizeF(std::min(width, height), std::max(width, height)), - QPageSize::Millimeter)); - } - else { - pageLayout.setPageSize(QPageSize(paperSizeID)); - } - pageLayout.setOrientation((QPageLayout::Orientation)dPage->getOrientation()); +// Base::Console().Message("MDIVP::printAll()\n"); + PagePrinter::printAll(printer, doc); } PyObject* MDIViewPage::getPyObject() @@ -686,6 +480,12 @@ void MDIViewPage::viewAll() m_vpPage->getQGVPage()->fitInView(m_scene->itemsBoundingRect(), Qt::KeepAspectRatio); } +void MDIViewPage::saveSVG(std::string filename) +{ + if (m_pagePrinter) { + m_pagePrinter->saveSVG(filename); + } +} void MDIViewPage::saveSVG() { QStringList filter; @@ -698,18 +498,15 @@ void MDIViewPage::saveSVG() return; } static_cast(blockSelection(true));// avoid to be notified by itself - - m_scene->saveSvg(fn); + saveSVG(Base::Tools::toStdString(fn)); + static_cast(blockSelection(false)); } -void MDIViewPage::saveSVG(std::string file) +void MDIViewPage::saveDXF(std::string filename) { - if (file.empty()) { - Base::Console().Warning("MDIViewPage - no file specified\n"); - return; + if (m_pagePrinter) { + m_pagePrinter->saveDXF(filename); } - QString filename = QString::fromUtf8(file.data(), file.size()); - m_scene->saveSvg(filename); } void MDIViewPage::saveDXF() @@ -726,31 +523,35 @@ void MDIViewPage::saveDXF() saveDXF(sFileName); } -void MDIViewPage::saveDXF(std::string fileName) +void MDIViewPage::savePDF(std::string filename) { - TechDraw::DrawPage* page = m_vpPage->getDrawPage(); - std::string PageName = page->getNameInDocument(); - fileName = Base::Tools::escapeEncodeFilename(fileName); - Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Save page to dxf")); - Gui::Command::doCommand(Gui::Command::Doc, "import TechDraw"); - Gui::Command::doCommand(Gui::Command::Doc, - "TechDraw.writeDXFPage(App.activeDocument().%s, u\"%s\")", - PageName.c_str(), (const char*)fileName.c_str()); - Gui::Command::commitCommand(); + if (m_pagePrinter) { + m_pagePrinter->savePDF(filename); + } } -void MDIViewPage::savePDF() { printPdf(); } +void MDIViewPage::savePDF() +{ + QString defaultDir; + QString fileName = Gui::FileDialog::getSaveFileName( + Gui::getMainWindow(), QString::fromUtf8(QT_TR_NOOP("Save PDF file")), defaultDir, + QString::fromUtf8(QT_TR_NOOP("PDF (*.pdf)"))); + if (fileName.isEmpty()) { + return; + } -void MDIViewPage::savePDF(std::string file) { printPdf(file); } + std::string sFileName = fileName.toUtf8().constData(); + savePDF(sFileName); +} -//mdiviewpage method for printAll action +/// a slot for printing all the pages void MDIViewPage::printAll() { - // Base::Console().Message("MDIVP::printAll()\n"); - printAllPages(); + MDIViewPage::printAllPages(); } //static routine for PrintAll command +/// prints all the pages in the active document void MDIViewPage::printAllPages() { QPrinter printer(QPrinter::HighResolution); @@ -763,10 +564,10 @@ void MDIViewPage::printAllPages() return; } if (printer.outputFileName().isEmpty()) { - printAll(&printer, doc); + PagePrinter::printAll(&printer, doc); } else { - printAllPdf(&printer, doc); + PagePrinter::printAllPdf(&printer, doc); } } } diff --git a/src/Mod/TechDraw/Gui/MDIViewPage.h b/src/Mod/TechDraw/Gui/MDIViewPage.h index d44fdfc9b6..25ba8687f8 100644 --- a/src/Mod/TechDraw/Gui/MDIViewPage.h +++ b/src/Mod/TechDraw/Gui/MDIViewPage.h @@ -47,7 +47,7 @@ class DrawView; namespace TechDrawGui { - +class PagePrinter; class ViewProviderPage; class QGVPage; class QGSPage; @@ -64,7 +64,6 @@ public: void addChildrenToPage(); - /// Observer message from the Tree Selection mechanism void onSelectionChanged(const Gui::SelectionChanges& msg) override; void preSelectionChanged(const QPoint &pos); @@ -87,21 +86,13 @@ public: App::Document* doc); static void printAllPdf(QPrinter* printer, App::Document* doc); - static void printBannerPage(QPrinter* printer, QPainter& painter, - QPageLayout& pageLayout, - App::Document* doc, - std::vector& docObjs); - static void renderPage(ViewProviderPage* vpp, - QPainter& painter, - QRectF& sourceRect, - QRect& targetRect); - static void setPageLayout(QPageLayout& pageLayout, - TechDraw::DrawPage* dPage, - double& width, double& height); - void saveSVG(std::string file); - void saveDXF(std::string file); - void savePDF(std::string file); + void saveSVG(std::string fileName); + void saveDXF(std::string fileName); + void savePDF(std::string fileName); + + void zoomIn(); + void zoomOut(); void setDocumentObject(const std::string&); void setDocumentName(const std::string&); @@ -161,9 +152,7 @@ private: QList m_qgSceneSelected; //items in selection order void getPaperAttributes(); - QPageLayout::Orientation m_orientation; - QPageSize::PageSizeId m_paperSize; - double m_pagewidth, m_pageheight; + PagePrinter* m_pagePrinter; }; diff --git a/src/Mod/TechDraw/Gui/PagePrinter.cpp b/src/Mod/TechDraw/Gui/PagePrinter.cpp new file mode 100644 index 0000000000..8ce9889257 --- /dev/null +++ b/src/Mod/TechDraw/Gui/PagePrinter.cpp @@ -0,0 +1,370 @@ +/*************************************************************************** + * Copyright (c) 2023 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#include "PreCompiled.h" + +#ifndef _PreComp_ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "PagePrinter.h" +#include "QGITemplate.h" +#include "QGSPage.h" +#include "Rez.h" +#include "ViewProviderPage.h" + +using namespace TechDrawGui; +using namespace TechDraw; + +/* TRANSLATOR TechDrawGui::PagePrinter */ + +//TYPESYSTEM_SOURCE_ABSTRACT(TechDrawGui::PagePrinter) + +PagePrinter::PagePrinter(ViewProviderPage* pageVp) + : m_vpPage(pageVp), m_orientation(QPageLayout::Landscape), + m_paperSize(QPageSize::A4), m_pagewidth(0.0), m_pageheight(0.0) +{ +} + +void PagePrinter::setScene(QGSPage* scene) +{ + m_scene = scene; +} + +void PagePrinter::setDocumentName(const std::string& name) { m_documentName = name; } + +//**** printing routines + +void PagePrinter::getPaperAttributes() +{ + App::DocumentObject* obj = m_vpPage->getDrawPage()->Template.getValue(); + auto pageTemplate(dynamic_cast(obj)); + if (pageTemplate) { + m_pagewidth = pageTemplate->Width.getValue(); + m_pageheight = pageTemplate->Height.getValue(); + } + m_paperSize = QPageSize::id(QSizeF(m_pagewidth, m_pageheight), QPageSize::Millimeter, + QPageSize::FuzzyOrientationMatch); + if (m_pagewidth > m_pageheight) { + m_orientation = QPageLayout::Landscape; + } + else { + m_orientation = QPageLayout::Portrait; + } +} + +void PagePrinter::printPdf(std::string file) +{ +// Base::Console().Message("PP::printPdf(%s)\n", file.c_str()); + if (file.empty()) { + Base::Console().Warning("PagePrinter - no file specified\n"); + return; + } + getPaperAttributes(); + + QString filename = QString::fromUtf8(file.data(), file.size()); + QPrinter printer(QPrinter::HighResolution); + // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/ +// printer.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b); + printer.setFullPage(true); + printer.setOutputFileName(filename); + + if (m_paperSize == QPageSize::Ledger) { + printer.setPageOrientation((QPageLayout::Orientation)(1 - m_orientation));//reverse 0/1 + } + else { + printer.setPageOrientation(m_orientation); + } + if (m_paperSize == QPageSize::Custom) { + printer.setPageSize(QPageSize(QSizeF(m_pagewidth, m_pageheight), QPageSize::Millimeter)); + } + else { + printer.setPageSize(QPageSize(m_paperSize)); + } + m_scene->setExportingPdf(true); + print(&printer); + m_scene->setExportingPdf(false); +} + +/// print the Page associated with the parent MDIViewPage +void PagePrinter::print(QPrinter* printer) +{ +// Base::Console().Message("PP::print(printer)\n"); + QPainter painter(printer); + QPageLayout pageLayout = printer->pageLayout(); + + TechDraw::DrawPage* dp = m_vpPage->getDrawPage(); + double width = 297.0;//default to A4 Landscape 297 x 210 + double height = 210.0; + setPageLayout(pageLayout, dp, width, height); + printer->setPageLayout(pageLayout); + + QRect targetRect = printer->pageLayout().fullRectPixels(printer->resolution()); + QRectF sourceRect(0.0, Rez::guiX(-height), Rez::guiX(width), Rez::guiX(height)); + if (!printer->outputFileName().isEmpty()) { + // file name is not empty so we must be printing to pdf? + m_scene->setExportingPdf(true); + } + renderPage(m_vpPage, painter, sourceRect, targetRect); + painter.end(); + if (!printer->outputFileName().isEmpty()) { + // file name is not empty so we must be printing to pdf? + m_scene->setExportingPdf(false); + } +} + +//static routine to print all pages in a document +void PagePrinter::printAll(QPrinter* printer, App::Document* doc) +{ +// Base::Console().Message("PP::printAll()\n"); + QPainter painter(printer); + QPageLayout pageLayout = printer->pageLayout(); + bool firstTime = true; + std::vector docObjs = + doc->getObjectsOfType(TechDraw::DrawPage::getClassTypeId()); + for (auto& obj : docObjs) { + Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(obj); + if (!vp) { + continue;// can't print this one + } + TechDrawGui::ViewProviderPage* vpp = dynamic_cast(vp); + if (!vpp) { + continue;// can't print this one + } + + TechDraw::DrawPage* dp = static_cast(obj); + double width = 297.0;//default to A4 Landscape 297 x 210 + double height = 210.0; + setPageLayout(pageLayout, dp, width, height); + printer->setPageLayout(pageLayout); + + //for some reason the first page doesn't obey the pageLayout, so we have to print + //a sacrificial blank page, but we make it a feature instead of a bug by printing a + //table of contents on the sacrificial page. + if (firstTime) { + firstTime = false; + printBannerPage(printer, painter, pageLayout, doc, docObjs); + } + + printer->newPage(); + QRectF sourceRect(0.0, Rez::guiX(-height), Rez::guiX(width), Rez::guiX(height)); + QRect targetRect = printer->pageLayout().fullRectPixels(printer->resolution()); + + renderPage(vpp, painter, sourceRect, targetRect); + } + painter.end(); +} + +//static routine to print all pages in a document to pdf +void PagePrinter::printAllPdf(QPrinter* printer, App::Document* doc) +{ +// Base::Console().Message("PP::printAllPdf()\n"); + // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/ + printer->setPdfVersion(QPagedPaintDevice::PdfVersion_A1b); + // Base::Console().Message("PP::printAllPdf()\n"); + QString outputFile = printer->outputFileName(); + QString documentName = QString::fromUtf8(doc->getName()); + QPdfWriter pdfWriter(outputFile); + // setPdfVersion sets the printied PDF Version to comply with PDF/A-1b, more details under: https://www.kdab.com/creating-pdfa-documents-qt/ + pdfWriter.setPdfVersion(QPagedPaintDevice::PdfVersion_A1b); + pdfWriter.setTitle(documentName); + pdfWriter.setResolution(printer->resolution()); + QPainter painter(&pdfWriter); + QPageLayout pageLayout = printer->pageLayout(); + + double dpmm = printer->resolution() / 25.4; + bool firstTime = true; + std::vector docObjs = + doc->getObjectsOfType(TechDraw::DrawPage::getClassTypeId()); + for (auto& obj : docObjs) { + Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(obj); + if (!vp) { + continue;// can't print this one + } + TechDrawGui::ViewProviderPage* vpp = dynamic_cast(vp); + if (!vpp) { + continue;// can't print this one + } + + TechDraw::DrawPage* dp = static_cast(obj); + double width = 297.0;//default to A4 Landscape 297 x 210 + double height = 210.0; + setPageLayout(pageLayout, dp, width, height); + pdfWriter.setPageLayout(pageLayout); + + //for some reason the first page doesn't obey the pageLayout, so we have to print + //a sacrificial blank page, but we make it a feature instead of a bug by printing a + //table of contents on the sacrificial page. + if (firstTime) { + firstTime = false; + printBannerPage(printer, painter, pageLayout, doc, docObjs); + } + pdfWriter.newPage(); + + QRectF sourceRect(0.0, Rez::guiX(-height), Rez::guiX(width), Rez::guiX(height)); + QRect targetRect(0, 0, width * dpmm, height * dpmm); + + renderPage(vpp, painter, sourceRect, targetRect); + } + painter.end(); +} + +//static +void PagePrinter::printBannerPage(QPrinter* printer, QPainter& painter, QPageLayout& pageLayout, + App::Document* doc, std::vector& docObjs) +{ + QFont savePainterFont = painter.font(); + QFont painterFont; + painterFont.setFamily(Preferences::labelFontQString()); + int fontSizeMM = Preferences::labelFontSizeMM(); + double dpmm = printer->resolution() / 25.4; + int fontSizePx = fontSizeMM * dpmm; + painterFont.setPixelSize(fontSizePx); + painter.setFont(painterFont); + + //print a header + QString docLine = QObject::tr("Document Name: ") + QString::fromUtf8(doc->getName()); + int leftMargin = pageLayout.margins().left() * dpmm + 5 * dpmm; //layout margin + 5mm + int verticalPos = pageLayout.margins().top() * dpmm + 20 * dpmm;//layout margin + 20mm + int verticalSpacing = 2; //double space + painter.drawText(leftMargin, verticalPos, docLine); + + //leave some blank space between document name and page entries + verticalPos += 2 * verticalSpacing * fontSizePx; + for (auto& obj : docObjs) { + //print a line for each page + QString pageLine = QString::fromUtf8(obj->getNameInDocument()) + QString::fromUtf8(" / ") + + QString::fromUtf8(obj->Label.getValue()); + painter.drawText(leftMargin, verticalPos, pageLine); + verticalPos += verticalSpacing * fontSizePx; + } + painter.setFont(savePainterFont);//restore the original font +} + +//static +void PagePrinter::renderPage(ViewProviderPage* vpp, QPainter& painter, QRectF& sourceRect, + QRect& targetRect) +{ +// Base::Console().Message("PP::renderPage()\n"); + //turn off view frames for print + bool saveState = vpp->getFrameState(); + vpp->setFrameState(false); + vpp->setTemplateMarkers(false); + + //scene might be drawn in light text. we need to redraw in normal text. + bool saveLightOnDark = Preferences::lightOnDark(); + if (Preferences::lightOnDark()) { + Preferences::lightOnDark(false); + vpp->getQGSPage()->redrawAllViews(); + } + + vpp->getQGSPage()->refreshViews(); + vpp->getQGSPage()->render(&painter, targetRect, sourceRect); + + // Reset + vpp->setFrameState(saveState); + vpp->setTemplateMarkers(saveState); + Preferences::lightOnDark(saveLightOnDark); + + vpp->getQGSPage()->refreshViews(); +} + +//static +void PagePrinter::setPageLayout(QPageLayout& pageLayout, TechDraw::DrawPage* dPage, double& width, + double& height) +{ + auto pageTemplate(dynamic_cast(dPage->Template.getValue())); + if (pageTemplate) { + width = pageTemplate->Width.getValue(); + height = pageTemplate->Height.getValue(); + } + //Qt's page size determination assumes Portrait orientation. To get the right paper size + //we need to ask in the proper form. + QPageSize::PageSizeId paperSizeID = + QPageSize::id(QSizeF(std::min(width, height), std::max(width, height)), + QPageSize::Millimeter, QPageSize::FuzzyOrientationMatch); + if (paperSizeID == QPageSize::Custom) { + pageLayout.setPageSize(QPageSize(QSizeF(std::min(width, height), std::max(width, height)), + QPageSize::Millimeter)); + } + else { + pageLayout.setPageSize(QPageSize(paperSizeID)); + } + pageLayout.setOrientation((QPageLayout::Orientation)dPage->getOrientation()); +} + +void PagePrinter::saveSVG(std::string file) +{ + if (file.empty()) { + Base::Console().Warning("PagePrinter - no file specified\n"); + return; + } + QString filename = QString::fromUtf8(file.data(), file.size()); + if (m_scene) { + m_scene->saveSvg(filename); + } +} + +void PagePrinter::saveDXF(std::string fileName) +{ + TechDraw::DrawPage* page = m_vpPage->getDrawPage(); + std::string PageName = page->getNameInDocument(); + fileName = Base::Tools::escapeEncodeFilename(fileName); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Save page to dxf")); + Gui::Command::doCommand(Gui::Command::Doc, "import TechDraw"); + Gui::Command::doCommand(Gui::Command::Doc, + "TechDraw.writeDXFPage(App.activeDocument().%s, u\"%s\")", + PageName.c_str(), (const char*)fileName.c_str()); + Gui::Command::commitCommand(); +} + +void PagePrinter::savePDF(std::string file) +{ +// Base::Console().Message("PP::savePDF(%s)\n", file.c_str()); + printPdf(file); +} + diff --git a/src/Mod/TechDraw/Gui/PagePrinter.h b/src/Mod/TechDraw/Gui/PagePrinter.h new file mode 100644 index 0000000000..d21c8d6394 --- /dev/null +++ b/src/Mod/TechDraw/Gui/PagePrinter.h @@ -0,0 +1,117 @@ +/*************************************************************************** + * Copyright (c) 2023 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#ifndef TECHDRAWGUI_PAGEPRINTER_H +#define TECHDRAWGUI_PAGEPRINTER_H + +#include + + +#include + +#include "ViewProviderPage.h" + +QT_BEGIN_NAMESPACE +class QGraphicsScene; +QT_END_NAMESPACE + +namespace TechDraw { +class DrawPage; +class DrawTemplate; +class DrawView; +} + +namespace TechDrawGui +{ +class MDIViewPage; +class QGVPage; +class QGSPage; +class QGIView; + +class TechDrawGuiExport PagePrinter +{ +public: + PagePrinter(ViewProviderPage *page); + ~PagePrinter() = default; + + void print(QPrinter* printer); + void printPdf(); + void printPdf(std::string file); + void printPreview(); + static void printAllPages(); + static void printAll(QPrinter* printer, + App::Document* doc); + static void printAllPdf(QPrinter* printer, + App::Document* doc); + static void printBannerPage(QPrinter* printer, QPainter& painter, + QPageLayout& pageLayout, + App::Document* doc, + std::vector& docObjs); + static void renderPage(ViewProviderPage* vpp, + QPainter& painter, + QRectF& sourceRect, + QRect& targetRect); + static void setPageLayout(QPageLayout& pageLayout, + TechDraw::DrawPage* dPage, + double& width, double& height); + + void saveSVG(std::string file); + void saveDXF(std::string file); + void savePDF(std::string file); + + void setDocumentName(const std::string&); + void setScene(QGSPage* scene, QGVPage* view); + void setOwner(MDIViewPage* owner) { m_owner = owner; } + void setScene(QGSPage* scene); + + + TechDraw::DrawPage * getPage() { return m_vpPage->getDrawPage(); } + + ViewProviderPage* getViewProviderPage() {return m_vpPage;} + + void getPaperAttributes(); + QPageLayout::Orientation getOrientation() const { return m_orientation; } + QPageSize::PageSizeId getPaperSize() const { return m_paperSize; } + double getPageWidth() const { return m_pagewidth; } + double getPageHeight() const { return m_pageheight; } + +private: + std::string m_objectName; + std::string m_documentName; + QPointer m_scene; + + QString m_currentPath; + ViewProviderPage* m_vpPage; + + QPageLayout::Orientation m_orientation; + QPageSize::PageSizeId m_paperSize; + double m_pagewidth, m_pageheight; + + MDIViewPage* m_owner; + +}; + + +} // namespace PagePrinterGui + +#endif // TECHDRAWGUI_PAGEPRINTER_H + diff --git a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp index adca99a655..7d3137d9f2 100644 --- a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp @@ -507,7 +507,6 @@ QVariant QGIViewDimension::itemChange(GraphicsItemChange change, const QVariant& { if (change == ItemSelectedHasChanged && scene()) { if (isSelected()) { - setSelected(false); datumLabel->setSelected(true); } else { @@ -531,9 +530,8 @@ void QGIViewDimension::setGroupSelection(bool isSelected) void QGIViewDimension::select(bool state) { - Q_UNUSED(state) - // setSelected(state); - // draw(); + setSelected(state); + draw(); } //surrogate for hover enter (true), hover leave (false) events @@ -774,8 +772,14 @@ void QGIViewDimension::draw() drawArrows(0, nullptr, nullptr, false); } - if (!isSelected() && !hasHover) { - setNormalColorAll(); + // reset the colors + if (hasHover && !datumLabel->isSelected()) { + setPrettyPre(); + } + else if (datumLabel->isSelected()) { + setPrettySel(); + } + else { setPrettyNormal(); } diff --git a/src/Mod/TechDraw/Gui/QGVNavStyle.cpp b/src/Mod/TechDraw/Gui/QGVNavStyle.cpp index b8d1794e62..e9185be1a1 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyle.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyle.cpp @@ -109,20 +109,21 @@ void QGVNavStyle::handleFocusOutEvent(QFocusEvent* event) void QGVNavStyle::handleKeyPressEvent(QKeyEvent* event) { +// Base::Console().Message("QGNS::handleKeyPressEvent(%d)\n", event->key()); if (event->modifiers().testFlag(Qt::ControlModifier)) { switch (event->key()) { case Qt::Key_Plus: { - zoom(1.0 + zoomStep); + zoomIn(); event->accept(); - break; + return; } case Qt::Key_Minus: { - zoom(1.0 - zoomStep); + zoomOut(); event->accept(); - break; + return; } default: { - break; + return; } } } @@ -132,35 +133,35 @@ void QGVNavStyle::handleKeyPressEvent(QKeyEvent* event) case Qt::Key_Left: { getViewer()->kbPanScroll(1, 0); event->accept(); - break; + return; } case Qt::Key_Up: { getViewer()->kbPanScroll(0, 1); event->accept(); - break; + return; } case Qt::Key_Right: { getViewer()->kbPanScroll(-1, 0); event->accept(); - break; + return; } case Qt::Key_Down: { getViewer()->kbPanScroll(0, -1); event->accept(); - break; + return; } case Qt::Key_Escape: { getViewer()->cancelBalloonPlacing(); event->accept(); - break; + return; } case Qt::Key_Shift: { this->shiftdown = true; event->accept(); - break; + return; } default: { - break; + return; } } } @@ -337,6 +338,16 @@ double QGVNavStyle::mouseZoomFactor(QPoint p) return factor; } +void QGVNavStyle::zoomIn() +{ + zoom(1.0 + zoomStep); +} + +void QGVNavStyle::zoomOut() +{ + zoom(1.0 - zoomStep); +} + void QGVNavStyle::startPan(QPoint p) { panOrigin = p; diff --git a/src/Mod/TechDraw/Gui/QGVNavStyle.h b/src/Mod/TechDraw/Gui/QGVNavStyle.h index 787aa06c53..56bebb3dba 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyle.h +++ b/src/Mod/TechDraw/Gui/QGVNavStyle.h @@ -85,6 +85,8 @@ public: virtual void zoom(double factor); virtual void stopZoom(); virtual double mouseZoomFactor(QPoint p); + virtual void zoomIn(); + virtual void zoomOut(); virtual void startPan(QPoint p); virtual void pan(QPoint p); diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleTouchpad.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleTouchpad.cpp index fe987ed333..24658e05ea 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleTouchpad.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleTouchpad.cpp @@ -48,16 +48,18 @@ void QGVNavStyleTouchpad::handleKeyPressEvent(QKeyEvent *event) { // Q_UNUSED(event) if (event->key() == Qt::Key_PageUp) { - zoom(1.0 + zoomStep); + zoomIn(); event->accept(); return; } if (event->key() == Qt::Key_PageDown) { - zoom(1.0 - zoomStep); + zoomOut(); event->accept(); return; } + + QGVNavStyle::handleKeyPressEvent(event); } void QGVNavStyleTouchpad::handleKeyReleaseEvent(QKeyEvent *event) @@ -94,6 +96,7 @@ void QGVNavStyleTouchpad::handleMouseMoveEvent(QMouseEvent *event) startPan(event->pos()); } event->accept(); + return; } if (QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier) && @@ -105,7 +108,13 @@ void QGVNavStyleTouchpad::handleMouseMoveEvent(QMouseEvent *event) startZoom(event->pos()); } event->accept(); + return; } + + // if the mouse moves, but we are not zooming or panning, then we should make + // sure that zoom and pan are turned off. + stopPan(); + stopZoom(); } void QGVNavStyleTouchpad::setAnchor() diff --git a/src/Mod/TechDraw/Gui/QGVPage.cpp b/src/Mod/TechDraw/Gui/QGVPage.cpp index 7242a04f01..5c5b05d449 100644 --- a/src/Mod/TechDraw/Gui/QGVPage.cpp +++ b/src/Mod/TechDraw/Gui/QGVPage.cpp @@ -165,7 +165,7 @@ public: QGVPage::QGVPage(ViewProviderPage* vpPage, QGSPage* scenePage, QWidget* parent) : QGraphicsView(parent), m_renderer(Native), drawBkg(true), m_vpPage(nullptr), - m_scene(scenePage), balloonPlacing(false), panningActive(false), m_showGrid(false), + m_scene(scenePage), balloonPlacing(false), m_showGrid(false), m_navStyle(nullptr), d(new Private(this)) { assert(vpPage); @@ -560,6 +560,16 @@ void QGVPage::setPanCursor() { activateCursor(panCursor); } void QGVPage::setZoomCursor() { activateCursor(zoomCursor); } +void QGVPage::zoomIn() +{ + m_navStyle->zoomIn(); +} + +void QGVPage::zoomOut() +{ + m_navStyle->zoomOut(); +} + void QGVPage::drawForeground(QPainter* painter, const QRectF& rect) { Q_UNUSED(rect); diff --git a/src/Mod/TechDraw/Gui/QGVPage.h b/src/Mod/TechDraw/Gui/QGVPage.h index 7ae6a8e486..3b40888650 100644 --- a/src/Mod/TechDraw/Gui/QGVPage.h +++ b/src/Mod/TechDraw/Gui/QGVPage.h @@ -122,6 +122,9 @@ public: TechDraw::DrawView* getBalloonParent() { return m_balloonParent; } + void zoomIn(); + void zoomOut(); + public Q_SLOTS: void setHighQualityAntialiasing(bool highQualityAntialiasing); @@ -179,7 +182,6 @@ private: TechDraw::DrawView* m_balloonParent;//temp field. used during balloon placing. QPoint panOrigin; - bool panningActive; bool m_showGrid; QPainterPath m_gridPath; diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts index 157bd4e331..8eaf9f453c 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts @@ -2015,7 +2015,7 @@ - + Save page to dxf @@ -2071,7 +2071,7 @@ - + Drag Dimension @@ -2928,7 +2928,7 @@ - + @@ -3370,33 +3370,33 @@ - + PDF (*.pdf) - - + + All Files (*.*) - + Export Page As PDF - + Document Name: - + SVG (*.svg) - + Export page as SVG @@ -3723,7 +3723,7 @@ - + Select 2 Vertexes or 1 Edge @@ -5521,49 +5521,59 @@ Fast, but result is a collection of short straight lines. - + Different orientation - + The printer uses a different orientation than the drawing. Do you want to continue? - + Different paper size - + The printer uses a different paper size than the drawing. Do you want to continue? - + Opening file failed - + Can not open file %1 for writing. - + Save DXF file - + DXF (*.dxf) - + + Save PDF file + + + + + PDF (*.pdf) + + + + Selected: diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts index b5eb27e220..c8122fb90c 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Дадаць цэнтральную лінію паміж дзвюма лініямі @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Дадаць цэнтральную лінію паміж дзвюма кропкамі @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw Тэхнічны чарцёж - + Add Centerline between 2 Lines Дадаць цэнтральную лінію паміж дзвюма лініямі @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw Тэхнічны чарцёж - + Add Centerline between 2 Points Дадаць цэнтральную лінію паміж дзвюма кропкамі @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw Тэхнічны чарцёж - + Add Cosmetic Line Through 2 Points Дадаць касметычную лінію праз дзве кропкі @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw Тэхнічны чарцёж - + Insert Active View (3D View) Уставіць бягучы выгляд (трохмернае прадстаўленне) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw Тэхнічны чарцёж - + Insert Arch Workbench Object Уставіць аб'ект варштату Архітэктура - + Insert a View of a Section Plane from Arch Workbench Уставіць выгляд плоскасці перасеку з варштату Архітэктура @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw Тэхнічны чарцёж - + Insert Balloon Annotation Уставіць заметку ў пазіцыйную зноску @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw Тэхнічны чарцёж - + Insert Center Line Уставіць цэнтральную лінію - + Add Centerline to Faces Дадаць цэнтральную лінію на грані @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw Тэхнічны чарцёж - + Insert Clip Group Уставіць суполку выразак @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw Тэхнічны чарцёж - + Add View to Clip Group Дадаць выгляд у суполку выразак @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw Тэхнічны чарцёж - + Remove View from Clip Group Выдаліць выгляд з суполкі выразак @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw Тэхнічны чарцёж - + Insert Complex Section Уставіць складовы перасек - + Insert a Complex Section Уставіць складовы перасек @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw Тэхнічны чарцёж - + Remove Cosmetic Object Выдаліць касметычны аб'ект @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw Тэхнічны чарцёж - + Change Appearance of Lines Змяніць знешні выгляд ліній - + Change Appearance of selected Lines Змяніць знешні выгляд абраных ліній @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw Тэхнічны чарцёж - + Insert Detail View Уставіць вынасны элемент @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw Тэхнічны чарцёж - + Insert Draft Workbench Object Уставіць аб'ект варштату Чарнавік - + Insert a View of a Draft Workbench object Уставіць выгляд аб'ект з варштату Чарнавік @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Файл - + Export Page as DXF Экспартаваць старонку ў DXF - + Save DXF file Захаваць файл DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Файл - + Export Page as SVG Экспартаваць старонку ў SVG @@ -1207,7 +1207,7 @@ Position Section View - Становішча прагляду перасеку + Становішча выгляду перасеку @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw Тэхнічны чарцёж - + Add Centerline to Faces Дадаць цэнтральную лінію на грані @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw Тэхнічны чарцёж - + Insert Bitmap Image Уставіць растравую выяву - - + + Insert Bitmap from a file into a page Уставіць растравую выяву з файла на старонку - + Select an Image File Абраць файл выявы - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Файлы выяў (*.jpg *.jpeg *.png *.bmp);;Усе файлы (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw Тэхнічны чарцёж - + Insert Page using Template Уставіць старонку, з ужываннем шаблону - + Select a Template File Абраць файл шаблону - + Template (*.svg) Шаблон (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw Тэхнічны чарцёж - + Print All Pages Надрукаваць усе старонкі @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw Тэхнічны чарцёж - + Project shape... Праекцыя фігуры... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw Тэхнічны чарцёж - + Insert Projection Group Уставіць суполку праекцый - + Insert multiple linked views of drawable object(s) Уставіць некалькі звязаных выглядаў аб'ектаў чарцяжа @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw Тэхнічны чарцёж - + Redraw Page Абнавіць старонку @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw Тэхнічны чарцёж - + Insert a simple or complex Section View - Устаўка простага ці складовага прагляду перасеку + Устаўка простага ці складовага выгляду перасеку - + Section View Выгляд перасеку - + Complex Section Складовы перасек @@ -1727,25 +1727,25 @@ CmdTechDrawSectionView - + TechDraw Тэхнічны чарцёж - + Insert Section View - Уставіць прагляд перасеку + Уставіць выгляд перасеку CmdTechDrawShowAll - + TechDraw Тэхнічны чарцёж - + Show/Hide Invisible Edges Паказаць/схаваць нябачныя рэбры @@ -1753,19 +1753,19 @@ CmdTechDrawSpreadsheetView - + TechDraw Тэхнічны чарцёж - + Insert Spreadsheet View - Уставіць прагляд аркуша + Уставіць выгляд аркуша - + Insert View to a spreadsheet - Уставіць прагляд аркуша + Уставіць выгляд аркуша @@ -1778,7 +1778,7 @@ Move view to bottom of stack - Перамясціць прагляд у ніз зборкі + Перамясціць выгляд у ніз зборкі @@ -1791,7 +1791,7 @@ Move view down one level - Рухаць прагляд уніз на адзін узровень + Рухаць выгляд уніз на адзін узровень @@ -1804,7 +1804,7 @@ Adjust stacking order of views - Адрэгуляваць парадак зборкі праглядаў + Адрэгуляваць парадак зборкі выглядаў @@ -1837,7 +1837,7 @@ Move view to top of stack - Перамясціць прагляд у верх зборкі + Перамясціць выгляд у верх зборкі @@ -1850,23 +1850,23 @@ Move view up one level - Рухаць прагляд уверх на адзін узровень + Рухаць выгляд уверх на адзін узровень CmdTechDrawSurfaceFinishSymbols - + TechDraw Тэхнічны чарцёж - + Create a Surface Finish Symbol Стварыце знак аздаблення паверхні - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Абярыце выгляд<br> - націсніце кнопку<br> - абярыце атрыбуты знака аздаблення паверхні ў панэлі, якая адчынілася @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw Тэхнічны чарцёж - + Insert SVG Symbol Уставіць знак SVG - + Insert symbol from an SVG file Уставіць знак з файла SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw Тэхнічны чарцёж - - + + Turn View Frames On/Off Уключыць/адключыць рамку для змены чарцяжа @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw Тэхнічны чарцёж - + Insert View Уставіць выгляд - + Insert a View Уставіць выгляд @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw Тэхнічны чарцёж - + Add Welding Information to Leaderline Дадаць інфармацыю аб зварным злучэнні ў зноску @@ -1964,58 +1964,58 @@ Command - + Drawing create page Стварэнне старонкі чарцяжа - + Create view Стварыць выгляд - + Create Projection Group Стварыць суполку праекцыі - + Create Clip Стварыць зрэз - + ClipGroupAdd Дадаць выразку ў суполку - + ClipGroupRemove Выдаліць выразак з суполкі - + Create Symbol Стварыць знак - + Create DraftView Стварыць выгляд Чарнавіка - + Create ArchView Стварыць выгляд Архітэктуры - + Create spreadsheet view Стварыць выгляд Аркуша - - + + Save page to dxf Захаваць старонку ў файл dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Стварыць вымярэнне - + Create Hatch Стварыць штрыхоўку - + Update Hatch Абнавіць штрыхоўку @@ -2056,12 +2056,12 @@ Выдаліць старую штрыхоўку - + Create GeomHatch Стварыць геаметрычную штрыхоўку - + Create Image Стварыць выяву @@ -2071,7 +2071,7 @@ Перацягнуць пазіцыйную зноску - + Drag Dimension Перацягнуць вымярэнне @@ -2081,7 +2081,7 @@ Стварыць пазіцыйную зноску - + Create ActiveView Стварыць бягучы выгляд @@ -2091,12 +2091,12 @@ Стварыць цэнтральную лінію - + Create Cosmetic Line Стварыць касметычную лінію - + Update CosmeticLine Абнавіць касметычную лінію @@ -2106,32 +2106,32 @@ Стварыць вынасны элемент - + Update Detail Абнавіць дэталь - + Create Leader Стварыць зноску - + Edit Leader Змяніць зноску - + Create Anno Стварыць заметку - + Edit Anno Змяніць заметку - + Create SectionView Стварыць выгляд перасеку @@ -2141,23 +2141,23 @@ Стварыць складовы перасек - - + + Edit SectionView Змяніць выгляд перасеку - + Create WeldSymbol Стварыць знак зварнога злучэння - + Edit WeldSymbol Змяніць знак зварнога злучэння - + Add Cosmetic Vertex Дадаць касметычную вяршыню @@ -2432,7 +2432,7 @@ View Direction as Angle - Напрамак прагляду як вугал + Напрамак выгляду як вугал @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Няправільны выбар - - + + No Shapes, Groups or Links in this selection Без фігур, суполак і сувязяў у абраным - - + + Select at least 1 DrawViewPart object as Base. Абярыце хаця б адзін аб'ект выгляду дэталі як асноўны. - + I do not know what base view to use. Я не ведаю, які асноўны выгляд патрэбна ўжываць. - + No Base View, Shapes, Groups or Links in this selection Без асноўнага выгляду, суполак і сувязяў у абраным - + No profile object found in selection Аб'ект профілю не знойдзены ў абраным - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Няправільны выбар - - + + Select an object first Спачатку абярыце аб'ект - - + + Too many objects selected Абрана зашмат аб'ектаў - - + + Create a page first. Спачатку стварыць старонку. - + @@ -2800,87 +2800,87 @@ Без выгляду дэталі ў абраным. - + Select one Clip group and one View. Абярыце адну суполку выразак і адзін выгляд. - + Select exactly one View to add to group. Абярыце толькі адзін выгляд, каб дадаць яго ў суполку. - + Select exactly one Clip group. Абярыце толькі адну суполку выразак. - + Clip and View must be from same Page. Зрэз і выгляд павінны быць на адной старонцы. - + Select exactly one View to remove from Group. Абярыце толькі адзін выгляд, каб выдаліць яго з суполкі. - + View does not belong to a Clip Выгляд не належыць да зрэзу - + Choose an SVG file to open Абраць файл SVG, каб адчыніць - + Scalable Vector Graphic Маштабаваная вектарная графіка (SVG) - + All Files Усе файлы - + Select at least one object. Абярыце хаця б адзін аб'ект. - + Please select only 1 Arch Section. Калі ласка, абярыце толькі адзін перасек Архітэктуры. - + No Arch Sections in selection. Без перасек Архітэктуры ў абраным. - + Select exactly one Spreadsheet object. Абярыце толькі адзін аб'ект Аркуша. - + No Drawing View Без выгляду чарцяжоў - + Open Drawing View before attempting export to SVG. Адчыніце выгляд чарцяжа перад экспартаваннем у SVG. - + Can not export selection Не атрымалася экспартаваць абранае - + Page contains DrawViewArch which will not be exported. Continue? Старонка ўтрымлівае DrawViewArch, які не будзе экспартаваны. Ці працягнуць? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Абярыце два кропкавых аб'екта і адзін выгляд. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Задача ў працэсе - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Няправільны выбар @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Неабходна абраць асноўны выгляд для лініі. @@ -3203,112 +3203,112 @@ Без аб'ектаў DrawViewPart у абраным - - + + No base View in Selection. Без асноўнага выгляду ў абраным. - + You must select Faces or an existing CenterLine. Неабходна абраць грані ці існуючую цэнтральную лінію. - + No CenterLine in selection. Без цэнтральнай лініі ў абраным. - - - + + + Selection is not a CenterLine. Абрана не цэнтральная лінія. - + Selection not understood. Выбар не зразумелы. - + You must select 2 Vertexes or an existing CenterLine. Неабходна абраць дзве вяршыні ці існуючую цэнтральную лінію. - + Need 2 Vertices or 1 CenterLine. Патрэбныя дзве вяршыні ці адна цэнтральная лінія. - + Selection is empty. Выбар пусты. - + Not enough points in selection. Абрана недастаткова кропак. - + Selection is not a Cosmetic Line. Абрана не касметычная лінія. - + You must select 2 Vertexes. Неабходна абраць дзве вяршыні. - - + + Nothing selected Нічога не абрана - + At least 1 object in selection is not a part view Прынамсі, адзін абраны аб'ект не з'яўляецца выглядам дэталі - + Unknown object type in selection Невядомы тып аб'екту ў абраным - + No View in Selection. Без выгляду ў абраным. - + You must select a View and/or lines. Неабходна абраць выгляд і/ці лініі. - + No Part Views in this selection Без выглядаў Дэталі ў абраным - + Select exactly one Leader line or one Weld symbol. Абярыце толькі адну лінію зноскі, альбо адзін сімвал зварнога шва. - - + + SurfaceFinishSymbols Знакі аздаблення паверхні - + No Part View in Selection Без выгляду Дэталі ў абраным - + No %1 in Selection Без %1 у абраным @@ -3323,33 +3323,33 @@ Некаторыя грані ў абраным ужо заштрыхаваныя. Замяніць? - + No TechDraw Page Без старонкі Тэхнічнага чарцяжа - + Need a TechDraw Page for this command Для каманды патрэбна старонка Тэхнічнага чарцяжа - + Select a Face first Спачатку абярыце грань - + No TechDraw object in selection Без аб'екту Тэхнічнага чарцяжа ў абраным - + Create a page to insert. Стварыць старонку каб уставіць. - + No Faces to hatch in this selection Без граняў для штрыхоўкі ў абраным @@ -3370,33 +3370,33 @@ Без старонак Аркуша чарцяжа ў дакуменце. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Усе файлы (*.*) - + Export Page As PDF Экспартаваць старонку ў DXF - + Document Name: Назва дакументу: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Экспартаваць старонку ў SVG @@ -3445,7 +3445,7 @@ Рэдактар адфарматаванага тэксту - + New Cosmetic Vertex Новая касметычная вяршыня @@ -3457,7 +3457,7 @@ ActiveView to TD View - Бягучы прагляд на старонку Тэхнічнага чарцяжа + Бягучы выгляд на старонку Тэхнічнага чарцяжа @@ -3492,12 +3492,12 @@ Create Section View - Стварыць прагляд перасеку + Стварыць выгляд перасеку Edit Section View - Змяніць прагляд перасеку + Змяніць выгляд перасеку @@ -3519,11 +3519,11 @@ The view direction in BaseView coordinates - Напрамак прагляду ў каардынатах асноўнага выгляду + Напрамак выгляду ў каардынатах асноўнага выгляду - - + + Operation Failed Аперацыя завяршылася няўдачай @@ -3538,12 +3538,12 @@ Змяніць знак зварнога злучэння - + Create Cosmetic Line Стварыць касметычную лінію - + Edit Cosmetic Line Змяніць касметычную лінію @@ -3678,7 +3678,7 @@ Без абраных укладзеных элементаў - + @@ -3686,7 +3686,7 @@ Выбар пусты - + No object selected @@ -3705,7 +3705,7 @@ TechDraw Position Section View - Тэхнічны чарцёж: Становішча прагляду перасеку + Тэхнічны чарцёж: Становішча выгляду перасеку @@ -3723,7 +3723,7 @@ Калі ласка, абярыце дзве прамыя лініі - + Select 2 Vertexes or 1 Edge Абярыце дзве вяршыні альбо адно рабро @@ -3903,7 +3903,7 @@ it has a tile weld that would become broken. ActiveView to TD View - Бягучы прагляд на старонку Тэхнічнага чарцяжа + Бягучы выгляд на старонку Тэхнічнага чарцяжа @@ -5557,51 +5557,61 @@ Fast, but result is a collection of short straight lines. Надрукаваць усе старонкі - + Different orientation Адрозная арыентацыя - + The printer uses a different orientation than the drawing. Do you want to continue? Друкарка ўжывае арыентацыю, якая выдатная ад арыентацыі чарцяжа. Ці жадаеце в вы працягнуць? - + Different paper size Адрозны памер паперы - + The printer uses a different paper size than the drawing. Do you want to continue? Друкарка ўжывае памер паперы, які адрозны ад чарцяжа. Ці жадаеце вы працягнуць? - + Opening file failed Немагчыма адчыніць файл - + Can not open file %1 for writing. Не атрымалася адчыніць файл %1 для запісу. - + Save DXF file Захаваць файл у DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Абрана: @@ -6057,7 +6067,7 @@ Do you want to continue? Preview - Папярэдні прагляд + Папярэдні выгляд @@ -6085,7 +6095,12 @@ Do you want to continue? Напрамак не зададзены - + + ComplexSection + Складовы перасек + + + Can not continue. Object * %1 or %2 not found. Не атрымалася прыцягнуць. Аб'ект * %1 ці %2 не знойдзены. @@ -6104,7 +6119,7 @@ Do you want to continue? - + Point Picker Сродак выбару кропкі @@ -6129,28 +6144,28 @@ Do you want to continue? Y - - + + Pick Points Выбраць кропкі - + Pick a point for cosmetic vertex Выбар кропкі для касметычнай вяршыні - + Escape picking Адмена выбару - + Left click to set a point Пстрыкніце <левай кнопкай мышы>, каб задаць кропку - + In progress edit abandoned. Start over. Незавершаная змена пакінутая. Пачаць спачатку. @@ -6508,7 +6523,7 @@ Do you want to continue? Preview: - Папярэдні прагляд: + Папярэдні выгляд: @@ -7054,7 +7069,7 @@ You can pick further points to get line segments. - + Pick Points Выбраць кропкі @@ -7135,51 +7150,51 @@ You can pick further points to get line segments. - - - + + + Edit points Змяніць кропкі - + Edit Points Змяніць кропкі - - + + Pick a starting point for leader line Выберыце пачатковую кропку для лініі зноскі - + Save Points Захаваць кропкі - + Click and drag markers to adjust leader line Націсніце і перацягніце маркеры для рэгулявання лініі зноскі - - + + Save changes Захаваць змены - + Left click to set a point Пстрыкніце <левай кнопкай мышы>, каб задаць кропку - + Press OK or Cancel to continue Націсніце кнопку ОК ці Скасаваць, каб працягнуць - + In progress edit abandoned. Start over. Незавершаная змена пакінутая. Пачаць спачатку. @@ -7708,6 +7723,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Увядзіце тэкст заметкі напрамую, альбо запусціце рэдактар пашыранага тэксту + + + RichTextAnnotation + Заметка з адфарматаваным тэкстам + TechDrawGui::TaskSectionView @@ -7794,7 +7814,7 @@ using the given X/Y Spacing Preview - Папярэдні прагляд + Папярэдні выгляд @@ -7847,7 +7867,7 @@ using the given X/Y Spacing Няма чаго прымяняць. Напрамак перасеку яшчэ не абраны - + Can not continue. Object * %1 or %2 not found. Не атрымалася прыцягнуць. Аб'ект * %1 ці %2 не знойдзены. @@ -8136,6 +8156,11 @@ using the given X/Y Spacing other іншае + + + SectionView + Выгляд перасеку + TechDrawGui::dlgTemplateField @@ -8163,7 +8188,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Дадае цэнтральную лінію паміж дзвюма лініямі @@ -8171,7 +8196,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Дадае цэнтральную лінію паміж двума кропкамі @@ -8179,7 +8204,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Уставіць складовы выгляд перасеку @@ -8208,7 +8233,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Дадае цэнтральную лінію на грані @@ -8240,7 +8265,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Уставіць просты выгляд перасеку @@ -8250,7 +8275,7 @@ using the given X/Y Spacing Move view to bottom of stack - Перамясціць прагляд у ніз зборкі + Перамясціць выгляд у ніз зборкі @@ -8258,7 +8283,7 @@ using the given X/Y Spacing Move view down one level - Рухаць прагляд уніз на адзін узровень + Рухаць выгляд уніз на адзін узровень @@ -8266,7 +8291,7 @@ using the given X/Y Spacing Move view to top of stack - Перамясціць прагляд у верх зборкі + Перамясціць выгляд у верх зборкі @@ -8274,7 +8299,7 @@ using the given X/Y Spacing Move view up one level - Рухаць прагляд уверх на адзін узровень + Рухаць выгляд уверх на адзін узровень @@ -8765,4 +8790,156 @@ there is an open task dialog. Не атрымалася выдаліць + + DrawPage + + + Page + Старонка + + + + DrawSVGTemplate + + + Template + Шаблон + + + + DrawView + + + View + Від + + + + DrawViewPart + + + View + Від + + + + DrawViewSection + + + Section + Перасек + + + + DrawComplexSection + + + Section + Перасек + + + + DrawViewDetail + + + Detail + Падрабязней + + + + DrawActiveView + + + ActiveView + Бягучы выгляд + + + + DrawViewAnnotation + + + Annotation + Заметка + + + + DrawViewImage + + + Image + Выява + + + + DrawViewSymbol + + + Symbol + Знак + + + + DrawViewArch + + + Arch + Архітэктура + + + + DrawViewDraft + + + Draft + Асадка + + + + DrawLeaderLine + + + LeaderLine + Лінія зноскі + + + + DrawViewBalloon + + + Balloon + Пазіцыйная зноска + + + + DrawViewDimension + + + Dimension + Вымярэнне + + + + DrawViewDimExtent + + + Extent + Ступень + + + + DrawHatch + + + Hatch + Штрыхоўка + + + + DrawGeomHatch + + + GeomHatch + Геаметрычная штрыхоўка + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts index bb39ba4280..01e6f940e4 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Afegeix una línia central entre 2 línies @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Afegeix una línia central entre 2 punts @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Afegeix una línia central entre 2 línies @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Afegeix una línia central entre 2 punts @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Afegeix una línia cosmètica amb 2 punts @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Insereix una vista activa (vista 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Insereix un objecte del banc de treball d'arquitectura - + Insert a View of a Section Plane from Arch Workbench Insereix una vista d'un pla de secció des d'un banc de treball d'arquitectura @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Insereix una anotació en un globus @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Insereix Línia Central - + Add Centerline to Faces Afegeix una línia central a les cares @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Insereix un grup clip @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Afegeix una vista al grup clip @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Lleva una vista del ClipGroup @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insereix una secció complexa - + Insert a Complex Section Insereix una secció complexa @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Lleva un objecte cosmètic @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Canvia l'aparença de les línies - + Change Appearance of selected Lines Canvia l'aparença de les línies seleccionades @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Insereix una vista de detall @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Insereix un objecte del banc de treball d'Esbós - + Insert a View of a Draft Workbench object Insereix una vista d'un objecte del banc de treball d'esbós @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Fitxer - + Export Page as DXF Exporta la pàgina com a DXF - + Save DXF file Desa el fitxer DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Fitxer - + Export Page as SVG Exportar una pàgina com a SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Afegeix una línia central a les cares @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Insereix una imatge de mapa de bits - - + + Insert Bitmap from a file into a page Insereix una imatge de mapa de bits d'un fitxer en una pàgina - + Select an Image File Selecciona un fitxer d'imatge - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Insereix una pàgina utilitzant una plantilla - + Select a Template File Selecciona un fitxer de plantilla - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projecta la forma... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Insereix un grup de projeccions - + Insert multiple linked views of drawable object(s) Insereix diverses vistes enllaçades d'objectes dibuixables @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Torna a dibuixar una pàgina @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Insereix una vista de secció @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Mostra/amaga les arestes invisibles @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Insereix una vista de full de càlcul - + Insert View to a spreadsheet Insereix vista a un full de càlcul @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Insereix un símbol SVG - + Insert symbol from an SVG file Insereix un símbol des d'un fitxer SGV @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Activa o desactiva els marcs de la vista @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Insereix vista - + Insert a View Insereix una vista @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Afegeix la informació de soldadura a la línia guia @@ -1964,58 +1964,58 @@ Command - + Drawing create page Crea una pàgina de dibuix - + Create view Crear vista - + Create Projection Group Crear un grup de projeccions - + Create Clip Crea un salt - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Crear Símbol - + Create DraftView Crea una vista d'Esbós - + Create ArchView Crea una vista d'Arquitectura - + Create spreadsheet view Crea una vista de full de càlcul - - + + Save page to dxf Guardar pàgina com dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Crea una cota - + Create Hatch Crear trama - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Crear imatge @@ -2071,7 +2071,7 @@ Arrossegar Globus - + Drag Dimension Arrossegar Dimensió @@ -2081,7 +2081,7 @@ Crea un globus - + Create ActiveView Crea una Vista Activa @@ -2091,12 +2091,12 @@ Crea una línia central - + Create Cosmetic Line Crea una línia cosmètica - + Update CosmeticLine Actualitza la línia cosmètica @@ -2106,32 +2106,32 @@ Crea una vista de detall - + Update Detail Actualitza el detall - + Create Leader Crea una línia de referència - + Edit Leader Edita una línia de referència - + Create Anno Crea una anotació - + Edit Anno Edita una anotació - + Create SectionView Crea una vista de secció @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Crea un Símbol de Soldadura - + Edit WeldSymbol Edita el Símbol de Soldadura - + Add Cosmetic Vertex Afegeix un vèrtex cosmètic @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Selecció incorrecta - - + + No Shapes, Groups or Links in this selection No hi ha cap forma, grup ni enllaç en aquesta selecció - - + + Select at least 1 DrawViewPart object as Base. Seleccioneu com a mínim 1 objecte DrawViewPart com a base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Selecció incorrecta - - + + Select an object first Seleccioneu primer un objecte - - + + Too many objects selected Hi ha masses objectes seleccionats - - + + Create a page first. Crear una pàgina primer. - + @@ -2800,87 +2800,87 @@ No hi ha cap vista d'una peça en la selecció. - + Select one Clip group and one View. Seleccioneu un grup clip i una vista. - + Select exactly one View to add to group. Seleccioneu exactament una vista per a afegir al grup. - + Select exactly one Clip group. Seleccioneu exactament un grup clip. - + Clip and View must be from same Page. Clip i Vista han de ser de la mateixa pàgina. - + Select exactly one View to remove from Group. Seleccioneu exactament una vista per a eliminar del grup. - + View does not belong to a Clip La Vista no pertany a un Clip - + Choose an SVG file to open Triar un fitxer SVG per obrir - + Scalable Vector Graphic Vector grafic escalable - + All Files Tots els fitxers - + Select at least one object. Selecciona com a mínim un objecte. - + Please select only 1 Arch Section. Seleccioneu només 1 secció d'arquitectura. - + No Arch Sections in selection. No hi ha cap secció d'arquitectura en la selecció. - + Select exactly one Spreadsheet object. Selecciona exactament un objecte de full de càlcul. - + No Drawing View Sense vistes de dibuix - + Open Drawing View before attempting export to SVG. Obri les vistes de dibuix abans d'intentar l'exportació a SVG. - + Can not export selection No es pot exportar la selecció - + Page contains DrawViewArch which will not be exported. Continue? La pàgina conté DrawViewArch que no s'exportaran. Voleu continuar? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Seleccioneu 2 objectes punt i una vista. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Tasca en procés - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Selecció incorrecta @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Heu de seleccionar una vista de base per a la línia. @@ -3203,112 +3203,112 @@ No hi ha cap objecte DrawViewPart en aquesta selecció - - + + No base View in Selection. No hi ha cap Vista de base en la selecció. - + You must select Faces or an existing CenterLine. Heu de seleccionar cares o una línia central existent. - + No CenterLine in selection. No hi ha cap línia central en la selecció. - - - + + + Selection is not a CenterLine. La selecció no és una línia central. - + Selection not understood. No s'ha entès la selecció. - + You must select 2 Vertexes or an existing CenterLine. Heu de seleccionar 2 vèrtex o una línia central existent. - + Need 2 Vertices or 1 CenterLine. Es necessiten 2 vèrtexs o 1 línia central. - + Selection is empty. La selecció és buida. - + Not enough points in selection. No hi ha prou punts a la selecció. - + Selection is not a Cosmetic Line. La selecció no és una línia cosmètica. - + You must select 2 Vertexes. S'han de triar 2 vèrtexs. - - + + Nothing selected No s'ha seleccionat res - + At least 1 object in selection is not a part view Com a mínim 1 objecte de la selecció no és una vista de peça - + Unknown object type in selection Tipus d'objecte desconegut en la selecció - + No View in Selection. No hi ha cap vista en la selecció. - + You must select a View and/or lines. Heu de seleccionar una vista i/o línies. - + No Part Views in this selection No hi ha cap vista de peça en la selecció - + Select exactly one Leader line or one Weld symbol. Seleccioneu exactament una única línia guia o un únic símbol de soldadura. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Algunes cares en la selecció ja tenen trama. Voleu reemplaçar-les? - + No TechDraw Page No hi ha cap pàgina TechDraw - + Need a TechDraw Page for this command Es necessita una pàgina TechDraw per a aquesta ordre - + Select a Face first Seleccioneu primer una cara - + No TechDraw object in selection No hi ha cap objecte TechDraw en la selecció - + Create a page to insert. Creeu una pàgina per a inserir. - + No Faces to hatch in this selection No hi ha cares on aplicar el tramat en aquesta selecció @@ -3370,33 +3370,33 @@ No hi ha cap pàgina de dibuix en el document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Tots els arxius (*.*) - + Export Page As PDF Exporta la Pàgina com a PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exporta la Pàgina com a SVG @@ -3445,7 +3445,7 @@ Editor de text enriquit - + New Cosmetic Vertex Vèrtex cosmètic nou @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Ha fallat l'operació @@ -3538,12 +3538,12 @@ Edita un símbol de soldadura - + Create Cosmetic Line Crea una línia cosmètica - + Edit Cosmetic Line Edita la línia cosmètica @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5549,49 +5549,59 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Orientació diferent - + The printer uses a different orientation than the drawing. Do you want to continue? La impressora utilitza una orientació diferent que la del dibuix. Voleu continuar? - + Different paper size Mida de paper diferent - + The printer uses a different paper size than the drawing. Do you want to continue? La impressora utilitza una mida de paper diferent que la del dibuix. Voleu continuar? - + Opening file failed No s'ha pogut obrir el fitxer - + Can not open file %1 for writing. No s'ha pogut obrir el fitxer %1 per a escriure-hi. - + Save DXF file Desa el fitxer DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Seleccionat: @@ -6075,7 +6085,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6094,7 +6109,7 @@ Do you want to continue? - + Point Picker Seleccionador de punts @@ -6119,28 +6134,28 @@ Do you want to continue? Y - - + + Pick Points Selecciona punts - + Pick a point for cosmetic vertex Selecciona un punt per al vèrtex cosmètic - + Escape picking Escape picking - + Left click to set a point Feu clic al botó esquerre per a definir un punt - + In progress edit abandoned. Start over. S'ha abandonat l'edició en procés. Torna a començar. @@ -7048,7 +7063,7 @@ You can pick further points to get line segments. - + Pick Points Selecciona punts @@ -7129,51 +7144,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Trieu un punt inicial per a la línia guia - + Save Points Save Points - + Click and drag markers to adjust leader line Feu clic i arrossegueu els marcadors per a ajustar la línia guia - - + + Save changes Desa els canvis - + Left click to set a point Feu clic al botó esquerre per a definir un punt - + Press OK or Cancel to continue Premeu D'acord o Cancel·la per a continuar - + In progress edit abandoned. Start over. S'ha abandonat l'edició en procés. Torna a començar. @@ -7703,6 +7718,11 @@ usant l'espaiat X/Y donat Input the annotation text directly or start the rich text editor Introduïu directament el text de l’anotació o inicieu l’editor de text enriquit + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7842,7 +7862,7 @@ usant l'espaiat X/Y donat No hi ha res a aplicar. Encara no s'ha triat la direcció de la secció - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8131,6 +8151,11 @@ usant l'espaiat X/Y donat other altres + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8158,7 +8183,7 @@ usant l'espaiat X/Y donat TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Afegeix una línia central entre 2 línies @@ -8166,7 +8191,7 @@ usant l'espaiat X/Y donat TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Afegeix una línia central entre 2 punts @@ -8174,7 +8199,7 @@ usant l'espaiat X/Y donat TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8203,7 +8228,7 @@ usant l'espaiat X/Y donat TechDraw_FaceCenterLine - + Adds a Centerline to Faces Afegeix una línia central a una cara @@ -8235,7 +8260,7 @@ usant l'espaiat X/Y donat TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8762,4 +8787,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Pàgina + + + + DrawSVGTemplate + + + Template + Plantilla + + + + DrawView + + + View + Vista + + + + DrawViewPart + + + View + Vista + + + + DrawViewSection + + + Section + Secció + + + + DrawComplexSection + + + Section + Secció + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Anotació + + + + DrawViewImage + + + Image + Imatge + + + + DrawViewSymbol + + + Symbol + Símbol + + + + DrawViewArch + + + Arch + Arquitectura + + + + DrawViewDraft + + + Draft + Calat + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Globus + + + + DrawViewDimension + + + Dimension + Cota + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Trama + + + + DrawGeomHatch + + + GeomHatch + TramaGeom + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts index 4c2ebac3bd..eacbc7e25a 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Přidat osu mezi 2 přímky @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Přidat osu mezi 2 body @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Přidat osu mezi 2 přímky @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Přidat osu mezi 2 body @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Přidat pomocnou čáru mezi dvěma body @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Vložit aktivní pohled (3D zobrazení) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Vložit objekt pracovního prostředí Arch - + Insert a View of a Section Plane from Arch Workbench Vložit pohled roviny řezu z pracovního prostředí Arch @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Vloží balonový popisek @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Vložit středovou osu - + Add Centerline to Faces Přidat osu na plochu/y @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Vložit sepnutou skupinu pohledů @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Přidat pohled do sepnuté skupiny @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Odebrat pohled ze sepnuté skupiny @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Vložit komplexní sekci - + Insert a Complex Section Vložit komplexní sekci @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Odebrat pomocný objekt @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Změnit vzhled čar - + Change Appearance of selected Lines Změnit vzhled vybraných čar @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Vložit detail pohledu @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Vložit objekt pracovního prostředí Draft - + Insert a View of a Draft Workbench object Vložit zobrazení objektu z pracovního prostředí Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Soubor - + Export Page as DXF Exportovat stránku do DXF - + Save DXF file Uložit soubor DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Soubor - + Export Page as SVG Exportovat stránku do SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Přidat osu na plochu/y @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Vložit bitmapový obrázek - - + + Insert Bitmap from a file into a page Vložit bitmapu ze souboru na stránku - + Select an Image File Vyberte soubor obrázku - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Vložit stránku pomocí šablony - + Select a Template File Vybrat šablonu - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projekce tvaru... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Vložit skupinu promítnutí - + Insert multiple linked views of drawable object(s) Vložit několik propojených pohledů zobrazitelného objektu/ů @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Překreslit stránku @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Pohled řezu - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Vložit pohled řezu @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Zobrazit/skrýt neviditelné hrany @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Vložit zobrazení tabulky - + Insert View to a spreadsheet Vložit pohled do tabulky @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Vložit SVG Symbol - + Insert symbol from an SVG file Vložit symbol z SVG souboru @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Zapnout nebo vypnout zobrazení rámců @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Vložit zobrazení - + Insert a View Vložit pohled @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Přidat svarovou informaci na odkazovou čáru @@ -1964,58 +1964,58 @@ Command - + Drawing create page Vytvořit stránku - + Create view Vytvořit pohled - + Create Projection Group Vytvořit skupinu promítání - + Create Clip Vytvořit výřez - + ClipGroupAdd Přidat do skupiny výřezu - + ClipGroupRemove Odebrat ze skupiny výřezu - + Create Symbol Vytvořit symbol - + Create DraftView Vytvořit Draft pohled - + Create ArchView Vytvořit Arch pohled - + Create spreadsheet view Vytvořit pohled tabulky - - + + Save page to dxf Uložit stránku do dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Vytvořit kótu - + Create Hatch Vytvoří šrafování - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Vytvořit geometrické šrafy - + Create Image Vytvořit obrázek @@ -2071,7 +2071,7 @@ Táhnout balon - + Drag Dimension Táhnout kótu @@ -2081,7 +2081,7 @@ Vytvořit balon - + Create ActiveView Vytvořit aktivní pohled @@ -2091,12 +2091,12 @@ Vytvořit osu - + Create Cosmetic Line Vytvořit pomocnou čáru - + Update CosmeticLine Aktualizovat pomocnou čáru @@ -2106,32 +2106,32 @@ Vytvořit detail pohledu - + Update Detail Aktualizovat detail - + Create Leader Vytvořit odkaz - + Edit Leader Upravit odkaz - + Create Anno Vytvořit popisek - + Edit Anno Upravit popisek - + Create SectionView Vytvořit řez @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Vytvořit symbol svaru - + Edit WeldSymbol Upravit symbol svaru - + Add Cosmetic Vertex Přidat pomocný vrchol @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Neplatný výběr - - + + No Shapes, Groups or Links in this selection Žádné Tvary, Skupiny ani Odkazy v tomto výběru - - + + Select at least 1 DrawViewPart object as Base. Vyberte alespoň 1 objekt zobrazení části jako základnu. - + I do not know what base view to use. Nevím, jaký základní pohled se má použít. - + No Base View, Shapes, Groups or Links in this selection Žádné základní zobrazení, tvary, skupiny nebo odkazy v tomto výběru - + No profile object found in selection Ve výběru nebyl nalezen žádný objekt profilu - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Nesprávný výběr - - + + Select an object first Nejprve vyberte objekt - - + + Too many objects selected Příliš mnoho vybraných objektů - - + + Create a page first. Vytvořte nejprve stránku. - + @@ -2800,87 +2800,87 @@ Ve výběru není zobrazení součásti. - + Select one Clip group and one View. Vyberte jednu Sepnutou skupinu a jeden Pohled. - + Select exactly one View to add to group. Vyberte právě jedno zobrazení pro přidání do skupiny. - + Select exactly one Clip group. Vyberte právě jedno zobrazení sepnuté skupiny. - + Clip and View must be from same Page. Sepnutí a Zobrazení musí být na společné stránce. - + Select exactly one View to remove from Group. Vyberte právě jedno zobrazení pro odstranění ze skupiny. - + View does not belong to a Clip Zobrazení není součástí Sepnutí - + Choose an SVG file to open Zvolte soubor SVG pro otevření - + Scalable Vector Graphic Škálovatelná vektorová grafika - + All Files Všechny soubory - + Select at least one object. Vyberte alespoň jeden objekt. - + Please select only 1 Arch Section. Prosím, vyberte pouze 1 sekci z prostředí Arch. - + No Arch Sections in selection. Žádná sekce z prostředí Arch ve výběru. - + Select exactly one Spreadsheet object. Vyberte právě jeden objekt Tabulky. - + No Drawing View Žádné zobrazení výkresu - + Open Drawing View before attempting export to SVG. Otevřete zobrazení výkresu před exportem do SVG. - + Can not export selection Nelze exportovat výběr - + Page contains DrawViewArch which will not be exported. Continue? Stránka obsahuje pohled kresby z prostředí Arch, který nebude exportován. Pokračovat? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Vyberte 2 bodové objekty a 1 pohled. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Probíhá úkol - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Chybný výběr @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Pro čáru je nutno vybrat základní pohled. @@ -3203,112 +3203,112 @@ Ve výběru nejsou objekty DrawViewPart - - + + No base View in Selection. Ve výběru není základní pohled. - + You must select Faces or an existing CenterLine. Musíte vybrat plochy nebo existující osu. - + No CenterLine in selection. Žádná osa ve výběru. - - - + + + Selection is not a CenterLine. Výběr není osa. - + Selection not understood. Výběru nelze rozumět. - + You must select 2 Vertexes or an existing CenterLine. Musíte vybrat 2 vrcholy nebo existující osu. - + Need 2 Vertices or 1 CenterLine. Potřebuje 2 vrcholy nebo 1 osu. - + Selection is empty. Výběr je prázdný. - + Not enough points in selection. Nedostatek bodů ve výběru. - + Selection is not a Cosmetic Line. Výběr není pomocná čára. - + You must select 2 Vertexes. Musíte vybrat 2 vrcholy. - - + + Nothing selected Není nic vybráno - + At least 1 object in selection is not a part view Minimálně 1 objekt ve výběru není součástí zobrazení dílu - + Unknown object type in selection Ve výběru je neznámý typ objektu - + No View in Selection. Ve výběru není žádný pohled. - + You must select a View and/or lines. Musíte vybrat pohled a/nebo čáry. - + No Part Views in this selection Žádné pohledy součásti ve výběru - + Select exactly one Leader line or one Weld symbol. Vybrat přesně jednu odkazovou čáru, nebo jeden symbol svaru. - - + + SurfaceFinishSymbols SurfaceFinishSymboly - + No Part View in Selection Ve výběru není zobrazena žádná část - + No %1 in Selection Žádný %1 ve výběru @@ -3323,33 +3323,33 @@ Některé plochy ve výběru jsou již šrafované. Nahradit? - + No TechDraw Page Žádná stránka TechDraw - + Need a TechDraw Page for this command Pro tento příkaz je potřeba TechDraw stránka - + Select a Face first Nejprve vyberte plochu - + No TechDraw object in selection Ve výběru není objekt z TechDraw - + Create a page to insert. Vytvoření stránky pro vložení. - + No Faces to hatch in this selection V tomto výběru nejsou plochy pro šrafování @@ -3370,33 +3370,33 @@ V dokumentu nejsou žádné stránky s výkresy. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Všechny soubory (*.*) - + Export Page As PDF Exportovat stránku do PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportovat stránku do SVG @@ -3445,7 +3445,7 @@ Rozšířený editor textu - + New Cosmetic Vertex Nový kosmetický vrchol @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operace se nezdařila @@ -3538,12 +3538,12 @@ Upravit symbol svařování - + Create Cosmetic Line Vytvořit pomocnou čáru - + Edit Cosmetic Line Upravit pomocnou čáru @@ -3678,15 +3678,15 @@ Nejsou vybrány žádné dílčí položky - + Selection is empty - Selection is empty + Výběr je prázdný - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5555,51 +5555,61 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Jiná orientace - + The printer uses a different orientation than the drawing. Do you want to continue? Tiskárna používá jinou orientaci než výkres. Chcete pokračovat? - + Different paper size Jiný formát papíru - + The printer uses a different paper size than the drawing. Do you want to continue? Tiskárna používá jiný formát papíru než výkres. Chcete pokračovat? - + Opening file failed Otevření souboru selhalo - + Can not open file %1 for writing. Soubor %1 nelze otevřít pro zápis. - + Save DXF file Uložit soubor DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Vybráno: @@ -6084,7 +6094,12 @@ Chcete pokračovat? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6103,7 +6118,7 @@ Chcete pokračovat? - + Point Picker Výběr bodu @@ -6128,28 +6143,28 @@ Chcete pokračovat? Y - - + + Pick Points Vybrat body - + Pick a point for cosmetic vertex Vyberte bod pro kosmetický vrchol - + Escape picking Escape picking - + Left click to set a point Kliknutím levým tlačítkem nastavíte bod - + In progress edit abandoned. Start over. Ukončeno ve fázi úprav. Začněte znovu. @@ -7057,7 +7072,7 @@ You can pick further points to get line segments. - + Pick Points Vybrat body @@ -7138,51 +7153,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Vyberte počáteční bod pro odkazovou čáru - + Save Points Save Points - + Click and drag markers to adjust leader line Kliknutím a přetažením značek upravíte odkazovou čáru - - + + Save changes Uložit změny - + Left click to set a point Kliknutím levým tlačítkem nastavíte bod - + Press OK or Cancel to continue Pro pokračování stiskněte OK nebo Zrušit - + In progress edit abandoned. Start over. Ukončeno ve fázi úprav. Začněte znovu. @@ -7712,6 +7727,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7851,7 +7871,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8140,6 +8160,11 @@ using the given X/Y Spacing other ostatní + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8167,7 +8192,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Přidat osu mezi dvě čáry @@ -8175,7 +8200,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Přidat osu mezi dva body @@ -8183,7 +8208,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8212,7 +8237,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8244,7 +8269,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8771,4 +8796,156 @@ je zde otevřený dialog. Nelze odstranit + + DrawPage + + + Page + Stránka + + + + DrawSVGTemplate + + + Template + Šablona + + + + DrawView + + + View + Pohled + + + + DrawViewPart + + + View + Pohled + + + + DrawViewSection + + + Section + Výběr + + + + DrawComplexSection + + + Section + Výběr + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Vysvětlivka + + + + DrawViewImage + + + Image + Obrázek + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Oblouk + + + + DrawViewDraft + + + Draft + Ponor + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Pozice + + + + DrawViewDimension + + + Dimension + Rozměr + + + + DrawViewDimExtent + + + Extent + Rozsah + + + + DrawHatch + + + Hatch + Šrafovat + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts index 6bb8756ad2..e79839fdbf 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Mittelline zwischen 2 Linien hinzufügen @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Mittelline zwischen 2 Punkten hinzufügen @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Mittelline zwischen 2 Linien hinzufügen @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Mittelline zwischen 2 Punkten hinzufügen @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Hilfslinie durch 2 Punkte hinzufügen @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Aktive (3D-)Ansicht einfügen @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Objekt des Arbeitsbereichs Arch einfügen - + Insert a View of a Section Plane from Arch Workbench Fügt die Ansicht einer Schnittebene aus dem Arbeitsbereich Arch ein @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Hinweisfeld einfügen @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Mittellinie einfügen - + Add Centerline to Faces Mittellinie zu Fläche(n) hinzufügen @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Ausschnittsgruppe einfügen @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Ansicht zu Ausschnittsgruppe hinzufügen @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Ansicht aus Ausschnittsgruppe entfernen @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Komplexe Schnittansicht einfügen - + Insert a Complex Section Eine komplexe Schnittansicht einfügen @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Hilfsobjekt entfernen @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Liniendarstellung ändern - + Change Appearance of selected Lines Liniendarstellung ausgewählter Linien ändern @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Detailansicht einfügen @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Objekt des Arbeitsbereichs Draft einfügen - + Insert a View of a Draft Workbench object Fügt die Ansicht eines Objekts des Arbeitsbereichs Draft ein @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Datei - + Export Page as DXF Seite als DXF-Datei exportieren - + Save DXF file DXF-Datei speichern - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Datei - + Export Page as SVG Seite als SVG-Datei exportieren @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Mittellinie zu Fläche(n) hinzufügen @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Bitmap-Grafik einfügen - - + + Insert Bitmap from a file into a page Grafik aus einer Bitmap-Datei in eine Seite einfügen - + Select an Image File Eine Bilddatei auswählen - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Bilddateien (*.jpg *.jpeg *.png *.bmp);;Alle Dateien (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Neues Zeichnungsblatt aus einer Vorlage erstellen - + Select a Template File Vorlage auswählen - + Template (*.svg) Vorlage (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Alle Seiten drucken @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Form projizieren... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Ansichtengruppe einfügen - + Insert multiple linked views of drawable object(s) Mehrere verbundene Ansichten der ausgewählten Bauteile einfügen @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Seite neu zeichnen @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Eine einfache oder komplexe Schnittansicht einfügen - + Section View Schnittansicht - + Complex Section Komplexe Schnittansicht @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Schnittansicht einfügen @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Ausgeblendete Kanten ein-/ausblenden @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Tabellenansicht einfügen - + Insert View to a spreadsheet Ansicht in eine Tabelle einfügen @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Oberflächensymbol erstellen - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Eine Ansicht auswählen<br> - Auf diese Schaltfläche klicken<br> - Attribute für die Oberflächensymbole im geöffneten Dialogfenster auswählen @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol SVG-Zeichnungselement einfügen - + Insert symbol from an SVG file Zeichnungselement aus einer SVG-Datei einfügen @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Ansichtsrahmen ein- oder ausschalten @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Ansicht einfügen - + Insert a View Fügt eine Ansicht ein @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Hinzufügen von Schweißinformationen zur Hinweislinie @@ -1964,58 +1964,58 @@ Command - + Drawing create page Zeichnungsseite erstellen - + Create view Ansicht erstellen - + Create Projection Group Ansichtengruppe erstellen - + Create Clip Ausschnitt erstellen - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Symbol erstellen - + Create DraftView Draft Ansicht erstellen - + Create ArchView Arch-Ansicht erstellen - + Create spreadsheet view Kalkulationstabellenansicht erstellen - - + + Save page to dxf Seite als dxf speichern @@ -2036,17 +2036,17 @@ - + Create Dimension Maß erstellen - + Create Hatch Schraffur erstellen - + Update Hatch Schraffur aktualisieren @@ -2056,12 +2056,12 @@ Alte Schraffur entfernen - + Create GeomHatch Geometrische Schraffur erstellen - + Create Image Bild erstellen @@ -2071,7 +2071,7 @@ Hinweisfeld ziehen - + Drag Dimension Maß ziehen @@ -2081,7 +2081,7 @@ Hinweisfeld erstellen - + Create ActiveView Aktuelle Ansicht erstellen @@ -2091,12 +2091,12 @@ Mittellinie erstellen - + Create Cosmetic Line Hilfslinie erstellen - + Update CosmeticLine Hilfslinie aktualisieren @@ -2106,32 +2106,32 @@ Detailansicht erstellen - + Update Detail Details aktualisieren - + Create Leader Hinweislinie erstellen - + Edit Leader Hinweislinie bearbeiten - + Create Anno Anmerkung erstellen - + Edit Anno Anmerkung bearbeiten - + Create SectionView Schnittansicht erstellen @@ -2141,23 +2141,23 @@ Komplexe Schnittansicht erstellen - - + + Edit SectionView Schnittansicht bearbeiten - + Create WeldSymbol Schweißsymbol erstellen - + Edit WeldSymbol Schweißsymbol bearbeiten - + Add Cosmetic Vertex Hilfspunkt hinzufügen @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Falsche Auswahl - - + + No Shapes, Groups or Links in this selection Keine Formen, Gruppen oder Link-Objekte in dieser Auswahl - - + + Select at least 1 DrawViewPart object as Base. Mindestens 1 DrawViewPart-Objekt als Basis auswählen. - + I do not know what base view to use. Ich weiß nicht, welche Basisansicht verwendet werden soll. - + No Base View, Shapes, Groups or Links in this selection Diese Auswahl enthält keine Basisansicht, Formen, Gruppen oder Link-Objekte - + No profile object found in selection Kein Profilobjekt in der Auswahl gefunden - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Falsche Auswahl - - + + Select an object first Zuerst ein Objekt auswählen - - + + Too many objects selected Zu viele Objekte ausgewählt - - + + Create a page first. Erstellen Sie zunächst eine Seite. - + @@ -2800,87 +2800,87 @@ Keine Teileansicht in der Auswahl. - + Select one Clip group and one View. Wähle eine Ausschnittsgruppe und eine Ansicht. - + Select exactly one View to add to group. Wähle genau eine Ansicht aus, die zur Gruppe hinzugefügt werden soll. - + Select exactly one Clip group. Wähle genau eine Ausschnittsgruppe aus. - + Clip and View must be from same Page. Ausschnitt und Ansicht müssen von der selben Seite sein. - + Select exactly one View to remove from Group. Wähle genau eine Ansicht aus, die aus der Gruppe entfernt werden soll. - + View does not belong to a Clip Ansicht gehört nicht zu einem Ausschnitt - + Choose an SVG file to open Wählen Sie eine SVG-Datei zum Öffnen aus - + Scalable Vector Graphic Skalierbare Vektorgrafik - + All Files Alle Dateien - + Select at least one object. Mindestens ein Objekt auswählen. - + Please select only 1 Arch Section. Bitte nur einen Schnitt aus dem Arbeitsbereich Arch auswählen. - + No Arch Sections in selection. Es wurde kein Schnitt aus dem Arbeitsbereich Arch ausgewählt. - + Select exactly one Spreadsheet object. Wählen Sie genau ein Tabellen-Objekt. - + No Drawing View Keine Zeichnungsansicht - + Open Drawing View before attempting export to SVG. Öffnen Sie die Zeichnungsansichten vor dem Export nach SVG. - + Can not export selection Kann die Auswahl nicht exportieren - + Page contains DrawViewArch which will not be exported. Continue? Seite enthält DrawViewArch, die nicht exportiert werden wird. Fortfahren? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Wähle 2 Punktobjekte und 1 Ansicht. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Aufgabe in Bearbeitung - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Falsche Auswahl @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Sie müssen eine Basisansicht für die Linie auswählen. @@ -3203,112 +3203,112 @@ Keine DrawViewPart-Objekte in dieser Auswahl - - + + No base View in Selection. Keine Basisansicht ausgewählt. - + You must select Faces or an existing CenterLine. Sie müssen Flächen oder eine vorhandene Mittellinie auswählen. - + No CenterLine in selection. Keine Mittellinie ausgewählt. - - - + + + Selection is not a CenterLine. Auswahl ist keine Mittellinie. - + Selection not understood. Auswahl nicht verstanden. - + You must select 2 Vertexes or an existing CenterLine. Sie müssen 2 Punkte oder eine vorhandene Mittellinie auswählen. - + Need 2 Vertices or 1 CenterLine. Es werden 2 Punkte oder 1 Mittellinie benötigt. - + Selection is empty. Auswahl ist leer. - + Not enough points in selection. Nicht genügend Punkte ausgewählt. - + Selection is not a Cosmetic Line. Auswahl ist keine Hilfslinie. - + You must select 2 Vertexes. Es müssen 2 Knotenpunkte ausgewählt werden. - - + + Nothing selected Nichts ausgewählt - + At least 1 object in selection is not a part view Mindestens 1 Objekt in der Auswahl ist keine Bauteilansicht - + Unknown object type in selection Unbekannter Objekttyp in der Auswahl - + No View in Selection. Keine Ansicht in der Auswahl. - + You must select a View and/or lines. Sie müssen eine Ansicht und / oder Linien auswählen. - + No Part Views in this selection Keine Fläche in dieser Auswahl - + Select exactly one Leader line or one Weld symbol. Auswahl genau einer Hinweislinie oder eines Schweißsymbols. - - + + SurfaceFinishSymbols Oberflächensymbole - + No Part View in Selection Keine Bauteilansicht ausgewählt - + No %1 in Selection Kein %1 in der Auswahl @@ -3323,33 +3323,33 @@ Einige Flächen in der Auswahl sind bereits schraffiert. Ersetzen? - + No TechDraw Page Keine TechDraw-Seite - + Need a TechDraw Page for this command Benötige eine TechDraw-Seite für diesen Befehl - + Select a Face first Wählen Sie zuerst eine Fläche - + No TechDraw object in selection Diese Auswahl enthält kein TechDraw-Objekt - + Create a page to insert. Erzeugen Sie eine Seite zum Einfügen des Objekts. - + No Faces to hatch in this selection Diese Auswahl enthält keine zu schraffierende Flächen @@ -3370,33 +3370,33 @@ Das Dokument enthält keine Zeichnungsblätter. - + PDF (*.pdf) PDF (*.PDF) - - + + All Files (*.*) Alle Dateien (*.*) - + Export Page As PDF Seite als PDF-Datei exportieren - + Document Name: Dokumentname: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Seite als SVG-Datei exportieren @@ -3445,7 +3445,7 @@ Rich-Text Editor - + New Cosmetic Vertex Neuer Hilfspunkt @@ -3522,8 +3522,8 @@ Die Richtung derAnsicht in BaseView-Koordinaten - - + + Operation Failed Vorgang fehlgeschlagen @@ -3538,12 +3538,12 @@ Schweißsymbol bearbeiten - + Create Cosmetic Line Hilfslinie erstellen - + Edit Cosmetic Line Hilfslinie bearbeiten @@ -3678,7 +3678,7 @@ Keine Unterelemente ausgewählt - + @@ -3686,7 +3686,7 @@ Nichts ausgewählt - + No object selected @@ -3723,7 +3723,7 @@ Bitte zwei gerade Linien auswählen - + Select 2 Vertexes or 1 Edge 2 Knotenpunkte oder 1 Kante auswählen @@ -5553,49 +5553,59 @@ Schnell, aber das Ergebnis ist eine Sammlung von kurzen geraden Linien.Alle Seiten drucken - + Different orientation Andere Ausrichtung - + The printer uses a different orientation than the drawing. Do you want to continue? Der Drucker verwendet eine andere Ausrichtung als die Zeichnung. Möchten Sie fortfahren? - + Different paper size Anderes Papierformat - + The printer uses a different paper size than the drawing. Do you want to continue? Der Drucker verwendet eine andere Papiergröße als die Zeichnung. Möchten Sie fortfahren? - + Opening file failed Fehler beim Öffnen der Datei - + Can not open file %1 for writing. Datei %1 kann nicht zum Schreiben geöffnet werden. - + Save DXF file DXF-Datei speichern - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.PDF) + + + Selected: Ausgewählt: @@ -6079,7 +6089,12 @@ Do you want to continue? Keine Richtung festgelegt - + + ComplexSection + Komplexe Schnittansicht + + + Can not continue. Object * %1 or %2 not found. Kann nicht fortfahren. Objekt * %1 oder %2 nicht gefunden. @@ -6098,7 +6113,7 @@ Do you want to continue? - + Point Picker Punkt-Auswahl @@ -6123,28 +6138,28 @@ Do you want to continue? Y - - + + Pick Points Punkte auswählen - + Pick a point for cosmetic vertex Wähle einen Ort für einen Hilfspunkt - + Escape picking Auswahl abbrechen - + Left click to set a point Linksklick, um einen Punkt zu setzen - + In progress edit abandoned. Start over. Bearbeitung abgebrochen. Fang noch mal von vorne an. @@ -7047,7 +7062,7 @@ Du kannst weitere Punkte auswählen, um Liniensegmente zu erhalten. - + Pick Points Punkte auswählen @@ -7128,51 +7143,51 @@ Du kannst weitere Punkte auswählen, um Liniensegmente zu erhalten. - - - + + + Edit points Punkte bearbeiten - + Edit Points Punkte bearbeiten - - + + Pick a starting point for leader line Wähle einen Startpunkt für die Hinweislinie - + Save Points Punkte speichern - + Click and drag markers to adjust leader line Klicke und ziehe Markierungen, um die Hinweislinie anzupassen - - + + Save changes Änderungen speichern - + Left click to set a point Linksklick, um einen Punkt zu setzen - + Press OK or Cancel to continue OK oder Abbrechen drücken, um fortzufahren - + In progress edit abandoned. Start over. Bearbeitung abgebrochen. Fang noch mal von vorne an. @@ -7702,6 +7717,11 @@ mit dem vorgegebenen X/Y-Abstand Input the annotation text directly or start the rich text editor Anmerkungstext hier direkt eingeben oder den Rich-Text Editor starten + + + RichTextAnnotation + RichText-Beschriftung + TechDrawGui::TaskSectionView @@ -7841,7 +7861,7 @@ mit dem vorgegebenen X/Y-Abstand Nichts zu tun. Es wurde keine Schnittausrichtung ausgewählt - + Can not continue. Object * %1 or %2 not found. Kann nicht fortfahren. Objekt * %1 oder %2 nicht gefunden. @@ -8130,6 +8150,11 @@ mit dem vorgegebenen X/Y-Abstand other andere + + + SectionView + Schnittansicht + TechDrawGui::dlgTemplateField @@ -8157,7 +8182,7 @@ mit dem vorgegebenen X/Y-Abstand TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Fügt eine Mittelline zwischen 2 Linien hinzu @@ -8165,7 +8190,7 @@ mit dem vorgegebenen X/Y-Abstand TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Fügt eine Mittelline zwischen 2 Punkten hinzu @@ -8173,7 +8198,7 @@ mit dem vorgegebenen X/Y-Abstand TechDraw_ComplexSection - + Insert complex Section View Komplexe Schnittansicht einfügen @@ -8202,7 +8227,7 @@ mit dem vorgegebenen X/Y-Abstand TechDraw_FaceCenterLine - + Adds a Centerline to Faces Fügt Flächen eine Mittellinie hinzu @@ -8234,7 +8259,7 @@ mit dem vorgegebenen X/Y-Abstand TechDraw_SectionView - + Insert simple Section View Einfachen Schnitt einfügen @@ -8496,7 +8521,7 @@ mit dem vorgegebenen X/Y-Abstand Dimension - Abmessung + Maß @@ -8761,4 +8786,156 @@ noch ein Aufgaben-Dialog geöffnet ist. Kann nicht gelöscht werden + + DrawPage + + + Page + Seite + + + + DrawSVGTemplate + + + Template + Vorlage + + + + DrawView + + + View + Ansicht + + + + DrawViewPart + + + View + Ansicht + + + + DrawViewSection + + + Section + Schnittkurve + + + + DrawComplexSection + + + Section + Schnittkurve + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + Aktive Ansicht + + + + DrawViewAnnotation + + + Annotation + Anmerkung + + + + DrawViewImage + + + Image + Grafik + + + + DrawViewSymbol + + + Symbol + Schweißnahtsymbol + + + + DrawViewArch + + + Arch + Bogen + + + + DrawViewDraft + + + Draft + Tiefgang + + + + DrawLeaderLine + + + LeaderLine + Hinweislinie + + + + DrawViewBalloon + + + Balloon + Hinweisfeld + + + + DrawViewDimension + + + Dimension + Maß + + + + DrawViewDimExtent + + + Extent + Umfang + + + + DrawHatch + + + Hatch + Schraffur + + + + DrawGeomHatch + + + GeomHatch + Geometrische Schraffur + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts index 13af539f4c..4e0de02f8f 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Προσθήκη Κέντρου μεταξύ 2 Γραμμών @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Προσθήκη Κέντρου μεταξύ 2 Σημείων @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw Τεχνική Σχεδίαση - + Add Centerline between 2 Lines Προσθήκη Κέντρου μεταξύ 2 Γραμμών @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw Τεχνική Σχεδίαση - + Add Centerline between 2 Points Προσθήκη Κέντρου μεταξύ 2 Σημείων @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw Τεχνική Σχεδίαση - + Add Cosmetic Line Through 2 Points Add Cosmetic Line Through 2 Points @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw Τεχνική Σχεδίαση - + Insert Active View (3D View) Insert Active View (3D View) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw Τεχνική Σχεδίαση - + Insert Arch Workbench Object Insert Arch Workbench Object - + Insert a View of a Section Plane from Arch Workbench Insert a View of a Section Plane from Arch Workbench @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw Τεχνική Σχεδίαση - + Insert Balloon Annotation Εισαγωγή μπαλόνι σχολιασμού @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw Τεχνική Σχεδίαση - + Insert Center Line Insert Center Line - + Add Centerline to Faces Add Centerline to Faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw Τεχνική Σχεδίαση - + Insert Clip Group Insert Clip Group @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw Τεχνική Σχεδίαση - + Add View to Clip Group Προσθήκη Προβολής στην Ομάδα Αποκοπής @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw Τεχνική Σχεδίαση - + Remove View from Clip Group Remove View from Clip Group @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw Τεχνική Σχεδίαση - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw Τεχνική Σχεδίαση - + Remove Cosmetic Object Remove Cosmetic Object @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw Τεχνική Σχεδίαση - + Change Appearance of Lines Change Appearance of Lines - + Change Appearance of selected Lines Change Appearance of selected Lines @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw Τεχνική Σχεδίαση - + Insert Detail View Insert Detail View @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw Τεχνική Σχεδίαση - + Insert Draft Workbench Object Insert Draft Workbench Object - + Insert a View of a Draft Workbench object Insert a View of a Draft Workbench object @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Αρχείο - + Export Page as DXF Εξαγωγή σελίδας ως DXF - + Save DXF file Αποθήκευση αρχείου DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Αρχείο - + Export Page as SVG Εξαγωγή σελίδας ως SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw Τεχνική Σχεδίαση - + Add Centerline to Faces Add Centerline to Faces @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw Τεχνική Σχεδίαση - + Insert Bitmap Image Insert Bitmap Image - - + + Insert Bitmap from a file into a page Insert Bitmap from a file into a page - + Select an Image File Επιλέξτε ένα Αρχείο Εικόνας - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw Τεχνική Σχεδίαση - + Insert Page using Template Insert Page using Template - + Select a Template File Select a Template File - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw Τεχνική Σχεδίαση - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw Τεχνική Σχεδίαση - + Project shape... Προβάλετε σχήμα... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw Τεχνική Σχεδίαση - + Insert Projection Group Εισαγωγή Ομάδας Προβολών - + Insert multiple linked views of drawable object(s) Εισαγάγετε πολλές συνδεδεμένες προβολές του σχεδιασιμού αντικειμένων @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw Τεχνική Σχεδίαση - + Redraw Page Redraw Page @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw Τεχνική Σχεδίαση - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw Τεχνική Σχεδίαση - + Insert Section View Insert Section View @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw Τεχνική Σχεδίαση - + Show/Hide Invisible Edges Show/Hide Invisible Edges @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw Τεχνική Σχεδίαση - + Insert Spreadsheet View Εισαγωγή Προβολής Υπολογιστικού Φύλλου - + Insert View to a spreadsheet Εισαγωγή Προβολής σε υπολογιστικό φύλλο @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw Τεχνική Σχεδίαση - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw Τεχνική Σχεδίαση - + Insert SVG Symbol Εισαγωγή συμβόλου SVG - + Insert symbol from an SVG file Insert symbol from an SVG file @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw Τεχνική Σχεδίαση - - + + Turn View Frames On/Off Turn View Frames On/Off @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw Τεχνική Σχεδίαση - + Insert View Insert View - + Insert a View Insert a View @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw Τεχνική Σχεδίαση - + Add Welding Information to Leaderline Add Welding Information to Leaderline @@ -1964,58 +1964,58 @@ Command - + Drawing create page Drawing create page - + Create view Create view - + Create Projection Group Create Projection Group - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Create Symbol - + Create DraftView Create DraftView - + Create ArchView Create ArchView - + Create spreadsheet view Create spreadsheet view - - + + Save page to dxf Save page to dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Create Dimension - + Create Hatch Create Hatch - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Create Image @@ -2071,7 +2071,7 @@ Drag Balloon - + Drag Dimension Drag Dimension @@ -2081,7 +2081,7 @@ Create Balloon - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Create CenterLine - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine Εκσυγχρονίζω CosmeticLine @@ -2106,32 +2106,32 @@ Create Detail View - + Update Detail Λεπτομέρειες Ενημέρωσης - + Create Leader Create Leader - + Edit Leader Edit Leader - + Create Anno Δημιουργία έτους - + Edit Anno Επεξεργασία έτους - + Create SectionView Create SectionView @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Create WeldSymbol - + Edit WeldSymbol Edit WeldSymbol - + Add Cosmetic Vertex Add Cosmetic Vertex @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Λάθος επιλογή - - + + No Shapes, Groups or Links in this selection No Shapes, Groups or Links in this selection - - + + Select at least 1 DrawViewPart object as Base. Επιλέξτε τουλάχιστον 1 Εξάρτημα Προβολής Σχεδίασης ως Βάση. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Εσφαλμένη επιλογή - - + + Select an object first Επιλέξτε πρώτα ένα αντικείμενο - - + + Too many objects selected Επιλέχθηκαν πάρα πολλά αντικείμενα - - + + Create a page first. Δημιουργήστε πρώτα μια σελίδα. - + @@ -2800,87 +2800,87 @@ No View of a Part in selection. - + Select one Clip group and one View. Select one Clip group and one View. - + Select exactly one View to add to group. Select exactly one View to add to group. - + Select exactly one Clip group. Select exactly one Clip group. - + Clip and View must be from same Page. Το παράθυρο Αποκοπής και η Προβολή πρέπει να είναι από την ίδια Σελίδα. - + Select exactly one View to remove from Group. Select exactly one View to remove from Group. - + View does not belong to a Clip Η Προβολή δεν ανήκει σε κάποιο παράθυρο Αποκοπής - + Choose an SVG file to open Επιλέξτε ένα αρχείο SVG για άνοιγμα - + Scalable Vector Graphic Αρχείο Κλιμακωτών Διανυσματικών Γραφικών - + All Files Όλα τα Αρχεία - + Select at least one object. Επιλέξτε τουλάχιστον ένα αντικείμενο. - + Please select only 1 Arch Section. Επιλέξτε μόνο 1 τμήμα Arch - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. Επιλέξτε ακριβώς ένα Υπολογιστικό Φύλλο. - + No Drawing View Καμία Προβολή Σχεδίασης - + Open Drawing View before attempting export to SVG. Ανοίξτε την Προβολή Σχεδίασης πριν επιχειρήσετε να κάνετε εξαγωγή σε SVG. - + Can not export selection Δεν είναι δυνατή η επιλογή εξαγωγή - + Page contains DrawViewArch which will not be exported. Continue? Η σελίδα περιέχει Σχέδιο Προβολήσ Arch που δεν θα εξαχθούν. Να συνεχίσει; @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Select 2 point objects and 1 View. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Task In Progress - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Wrong Selection @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. You must select a base View for the line. @@ -3203,112 +3203,112 @@ No DrawViewPart objects in this selection - - + + No base View in Selection. No base View in Selection. - + You must select Faces or an existing CenterLine. You must select Faces or an existing CenterLine. - + No CenterLine in selection. No CenterLine in selection. - - - + + + Selection is not a CenterLine. Selection is not a CenterLine. - + Selection not understood. Selection not understood. - + You must select 2 Vertexes or an existing CenterLine. You must select 2 Vertexes or an existing CenterLine. - + Need 2 Vertices or 1 CenterLine. Need 2 Vertices or 1 CenterLine. - + Selection is empty. Selection is empty. - + Not enough points in selection. Not enough points in selection. - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. You must select 2 Vertexes. - - + + Nothing selected Nothing selected - + At least 1 object in selection is not a part view At least 1 object in selection is not a part view - + Unknown object type in selection Unknown object type in selection - + No View in Selection. No View in Selection. - + You must select a View and/or lines. You must select a View and/or lines. - + No Part Views in this selection No Part Views in this selection - + Select exactly one Leader line or one Weld symbol. Select exactly one Leader line or one Weld symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Some Faces in selection are already hatched. Replace? - + No TechDraw Page Δεν υπάρχει καμία Σελίδα Τεχνικής Σχεδίασης - + Need a TechDraw Page for this command Απαιτείται μια Σελίδα Τεχνικής Σχεδίασης για αυτήν την εντολή - + Select a Face first Επιλέξτε πρώτα μια Όψη - + No TechDraw object in selection Δεν υπάρχει κανένα αντικείμενο Τεχνικής Σχεδίασης στην επιλογή - + Create a page to insert. Δημιουργήστε μια σελίδα για να εισάγετε. - + No Faces to hatch in this selection No Faces to hatch in this selection @@ -3370,33 +3370,33 @@ No Drawing Pages in document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Όλα τα αρχεία (*.*) - + Export Page As PDF Εξαγωγή Σελίδας ως PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Εξαγωγή Σελίδας ως SVG @@ -3445,7 +3445,7 @@ Rich text editor - + New Cosmetic Vertex New Cosmetic Vertex @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3538,12 +3538,12 @@ Edit Welding Symbol - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,51 +5559,61 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Διαφορετικός προσανατολισμός - + The printer uses a different orientation than the drawing. Do you want to continue? Ο εκτυπωτής χρησιμοποιεί διαφορετικό προσανατολισμό από το σχέδιο. Θέλετε να συνεχίσετε; - + Different paper size Διαφορετικό μέγεθος χαρτιού - + The printer uses a different paper size than the drawing. Do you want to continue? Ο εκτυπωτής χρησιμοποιεί διαφορετικό μέγεθος χαρτιού από το σχέδιο. Θέλετε να συνεχίσετε; - + Opening file failed Αποτυχία ανοίγματος αρχείου - + Can not open file %1 for writing. Can not open file %1 for writing. - + Save DXF file Αποθήκευση αρχείου DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Επιλεγμένα: @@ -5819,7 +5829,7 @@ Do you want to continue? Vertical - Vertical + Κατακόρυφα @@ -5829,7 +5839,7 @@ Do you want to continue? Horizontal - Horizontal + Οριζόντια @@ -6088,7 +6098,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6107,7 +6122,7 @@ Do you want to continue? - + Point Picker Point Picker @@ -6132,28 +6147,28 @@ Do you want to continue? Y - - + + Pick Points Pick Points - + Pick a point for cosmetic vertex Pick a point for cosmetic vertex - + Escape picking Escape picking - + Left click to set a point Left click to set a point - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7061,7 +7076,7 @@ You can pick further points to get line segments. - + Pick Points Pick Points @@ -7142,51 +7157,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Pick a starting point for leader line - + Save Points Save Points - + Click and drag markers to adjust leader line Click and drag markers to adjust leader line - - + + Save changes Save changes - + Left click to set a point Left click to set a point - + Press OK or Cancel to continue Πατήστε OK ή Ακύρωση για να συνεχίσετε - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7716,6 +7731,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7855,7 +7875,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8144,6 +8164,11 @@ using the given X/Y Spacing other other + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8171,7 +8196,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adds a Centerline between 2 Lines @@ -8179,7 +8204,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adds a Centerline between 2 Points @@ -8187,7 +8212,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8216,7 +8241,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8248,7 +8273,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8775,4 +8800,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Σελίδα + + + + DrawSVGTemplate + + + Template + Template + + + + DrawView + + + View + Προβολή + + + + DrawViewPart + + + View + Προβολή + + + + DrawViewSection + + + Section + Τομή + + + + DrawComplexSection + + + Section + Τομή + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Σχολιασμός + + + + DrawViewImage + + + Image + Εικόνα + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Arch + + + + DrawViewDraft + + + Draft + Βύθισμα + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balloon + + + + DrawViewDimension + + + Dimension + Διάσταση + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Hatch + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts index baa8d44d69..4435336d8d 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Agregar línea de centro entre 2 líneas @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Agregar línea de centro entre 2 puntos @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw DibujoTécnico - + Add Centerline between 2 Lines Agregar línea de centro entre 2 líneas @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw DibujoTécnico - + Add Centerline between 2 Points Agregar línea de centro entre 2 puntos @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw DibujoTécnico - + Add Cosmetic Line Through 2 Points Agregar línea adicional a través de 2 puntos @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw DibujoTécnico - + Insert Active View (3D View) Insertar vista activa (Vista 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw DibujoTécnico - + Insert Arch Workbench Object Insertar objeto del banco de trabajo Arq - + Insert a View of a Section Plane from Arch Workbench Inserta una vista de un plano de corte desde el entorno de trabajo Arq. @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw DibujoTécnico - + Insert Balloon Annotation Insertar anotación de globo @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw DibujoTécnico - + Insert Center Line Insertar línea de centro - + Add Centerline to Faces Agregar línea de centro a caras @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw DibujoTécnico - + Insert Clip Group Insertar grupo de vistas de recorte @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw DibujoTécnico - + Add View to Clip Group Agregar vista al grupo de vistas de recorte @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw DibujoTécnico - + Remove View from Clip Group Eliminar vista del grupo de vistas de recorte @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw DibujoTécnico - + Insert Complex Section Insertar sección compleja - + Insert a Complex Section Inserta una sección compleja @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw DibujoTécnico - + Remove Cosmetic Object Eliminar objeto adicional @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw DibujoTécnico - + Change Appearance of Lines Cambiar apariencia de líneas - + Change Appearance of selected Lines Cambia la apariencia de las líneas seleccionadas @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw DibujoTécnico - + Insert Detail View Insertar vista de detalle @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw DibujoTécnico - + Insert Draft Workbench Object Insertar objeto del banco de trabajo Draft - + Insert a View of a Draft Workbench object Inserta una vista de un objeto del entorno de trabajo Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Archivo - + Export Page as DXF Exportar página como DXF - + Save DXF file Guardar archivo DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Archivo - + Export Page as SVG Exportar página como SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw DibujoTécnico - + Add Centerline to Faces Agregar línea de centro a caras @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw DibujoTécnico - + Insert Bitmap Image Insertar imagen Bitmap - - + + Insert Bitmap from a file into a page Inserta un archivo Bitmap en una página - + Select an Image File Seleccione un archivo de imagen - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Archivos de imagen (*.jpg *.jpeg *.png *.bmp);;Todos los archivos (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw DibujoTécnico - + Insert Page using Template Insertar página usando Plantilla - + Select a Template File Seleccione un archivo de Plantilla - + Template (*.svg) Plantilla (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw DibujoTécnico - + Print All Pages Imprimir todas las páginas @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw DibujoTécnico - + Project shape... Formas del proyecto... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw DibujoTécnico - + Insert Projection Group Insertar Grupo de proyección - + Insert multiple linked views of drawable object(s) Inserta múltiples vistas vinculadas de objeto(s) dibujable(s) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw DibujoTécnico - + Redraw Page Redibujar página @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw DibujoTécnico - + Insert a simple or complex Section View Inserta una vista de sección simple o compleja - + Section View Vista de Sección - + Complex Section Sección compleja @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw DibujoTécnico - + Insert Section View Insertar Vista de corte @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw DibujoTécnico - + Show/Hide Invisible Edges Mostrar/ocultar aristas invisibles @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw DibujoTécnico - + Insert Spreadsheet View Insertar Vista de Hoja de cálculo - + Insert View to a spreadsheet Inserta una hoja de cálculo a la Vista @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw DibujoTécnico - + Create a Surface Finish Symbol Crear un símbolo de acabado superficial - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Seleccione una vista<br> - haga clic en este botón<br> - seleccione los atributos del símbolo de acabado de superficie en el panel abierto @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw DibujoTécnico - + Insert SVG Symbol Insertar símbolo SVG - + Insert symbol from an SVG file Inserta un símbolo desde un archivo SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw DibujoTécnico - - + + Turn View Frames On/Off Encender/apagar marcos de Vista @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw DibujoTécnico - + Insert View Insertar Vista - + Insert a View Inserta una vista @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw DibujoTécnico - + Add Welding Information to Leaderline Agregar información de soldadura a la Línea de referencia @@ -1964,58 +1964,58 @@ Command - + Drawing create page Página para creación de dibujo - + Create view Crear vista - + Create Projection Group Crear Grupo de proyección - + Create Clip Crear Recorte - + ClipGroupAdd Agregar grupo de clips - + ClipGroupRemove Eliminar grupo de clips - + Create Symbol Crear símbolo - + Create DraftView Crear vista de Draft - + Create ArchView Crear vista de Arq. - + Create spreadsheet view Crear vista de hoja de cálculo - - + + Save page to dxf Guardar página como dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Crear Cota - + Create Hatch Crear rayado - + Update Hatch Actualizar rayado @@ -2056,12 +2056,12 @@ Eliminar rayados antiguos - + Create GeomHatch Crear rayado geométrico - + Create Image Crear imagen @@ -2071,7 +2071,7 @@ Arrastrar globo - + Drag Dimension Arrastrar Cota @@ -2081,7 +2081,7 @@ Crear globo - + Create ActiveView Crear vista activa @@ -2091,12 +2091,12 @@ Crear línea central - + Create Cosmetic Line Crear Línea Adicional - + Update CosmeticLine Actualizar línea adicional @@ -2106,32 +2106,32 @@ Crear vista de detalle - + Update Detail Actualizar detalle - + Create Leader Crear Línea de Referencia - + Edit Leader Editar Línea de Referencia - + Create Anno Crear anotación - + Edit Anno Editar anotación - + Create SectionView Crear vista de corte @@ -2141,23 +2141,23 @@ Crear sección compleja - - + + Edit SectionView Editar vista de corte - + Create WeldSymbol Crear símbolo de soldadura - + Edit WeldSymbol Editar símbolo de soldadura - + Add Cosmetic Vertex Agregar vértice adicional @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Selección Incorrecta - - + + No Shapes, Groups or Links in this selection No hay Formas, Grupos o Enlaces en esta selección - - + + Select at least 1 DrawViewPart object as Base. Seleccione al menos 1 objeto de DibujoVistaPieza como Base. - + I do not know what base view to use. No sé qué vista base utilizar. - + No Base View, Shapes, Groups or Links in this selection No hay vista base, formas, grupos o enlaces en esta selección - + No profile object found in selection No se encontró ningún objeto de perfil en la selección - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Selección incorrecta - - + + Select an object first Seleccione primero un objeto - - + + Too many objects selected Demasiados objetos seleccionados - - + + Create a page first. Cree una página de dibujo primero. - + @@ -2800,87 +2800,87 @@ No hay Vista de una Pieza en la selección. - + Select one Clip group and one View. Seleccione un Grupo de recorte y una Vista. - + Select exactly one View to add to group. Seleccione exactamente una Vista para agregar al grupo. - + Select exactly one Clip group. Seleccione exactamente un grupo de Recorte. - + Clip and View must be from same Page. Recorte y Vista deben ser de la misma página. - + Select exactly one View to remove from Group. Seleccione exactamente una Vista para eliminar del Grupo. - + View does not belong to a Clip La Vista no pertenece a un Recorte - + Choose an SVG file to open Seleccionar un archivo SVG para abrir - + Scalable Vector Graphic Gráfico vectorial escalable - + All Files Todos los Archivos - + Select at least one object. Seleccione al menos un objeto. - + Please select only 1 Arch Section. Por favor, seleccione solamente 1 Corte Arquitectónico. - + No Arch Sections in selection. No existen Cortes Arquitectónicos en esta selección. - + Select exactly one Spreadsheet object. Seleccione exactamente un objeto de hoja de cálculo. - + No Drawing View Sin Vista de Dibujo - + Open Drawing View before attempting export to SVG. Abra la Vista de Dibujo antes de intentar exportar a SVG. - + Can not export selection No se puede exportar la selección - + Page contains DrawViewArch which will not be exported. Continue? La página contiene DibujoVistaArq que no será exportada. ¿Desea continuar? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Seleccione objetos de 2 puntos y 1 Vista. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Tarea en progreso - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Selección Incorrecta @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Debe seleccionar una Vista base para la línea. @@ -3203,112 +3203,112 @@ No hay objetos DibujoVistaPieza en esta selección - - + + No base View in Selection. No hay Vista base en la Selección. - + You must select Faces or an existing CenterLine. Debe seleccionar Caras o una Línea de Centro existente. - + No CenterLine in selection. No hay Línea de Centro en la selección. - - - + + + Selection is not a CenterLine. La selección no es una Línea de Centro. - + Selection not understood. Selección no entendida. - + You must select 2 Vertexes or an existing CenterLine. Debe seleccionar 2 Vértices o una Línea de Centro existente. - + Need 2 Vertices or 1 CenterLine. Necesita 2 vértices o una Línea de Centro. - + Selection is empty. La selección está vacía. - + Not enough points in selection. No hay suficientes puntos en la selección. - + Selection is not a Cosmetic Line. La selección no es una Línea Adicional. - + You must select 2 Vertexes. Debe seleccionar 2 Vértices. - - + + Nothing selected Nada seleccionado - + At least 1 object in selection is not a part view Al menos 1 objeto en la selección no es una vista de pieza - + Unknown object type in selection Tipo de objeto desconocido en la selección - + No View in Selection. No hay Vista en la Selección. - + You must select a View and/or lines. Debe seleccionar una Vista y/o líneas. - + No Part Views in this selection No hay Vistas de Piezas en esta selección - + Select exactly one Leader line or one Weld symbol. Seleccione exactamente una línea de referencia o un símbolo de Soldadura. - - + + SurfaceFinishSymbols SímbolosdeAcabadoSuperficial - + No Part View in Selection Ninguna vista de partes en la selección - + No %1 in Selection No hay %1 en la selección @@ -3323,33 +3323,33 @@ Algunas Caras en la selección ya están rayadas. ¿Desea reemplazarlas? - + No TechDraw Page No hay página de DibujoTécnico - + Need a TechDraw Page for this command Necesita una página DibujoTécnico para este comando - + Select a Face first Seleccione una Cara Primero - + No TechDraw object in selection Ningún objeto DibujoTécnico en la selección - + Create a page to insert. Crear una página para insertar. - + No Faces to hatch in this selection No hay Caras para rayar en esta selección @@ -3370,33 +3370,33 @@ No hay Páginas de Dibujo en el documento. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Todos los archivos (*.*) - + Export Page As PDF Exportar Página Como PDF - + Document Name: Nombre del documento: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportar página como SVG @@ -3445,7 +3445,7 @@ Editor de texto enriquecido - + New Cosmetic Vertex Nuevo Vértice Adicional @@ -3522,8 +3522,8 @@ La dirección de la vista en coordenadas BaseView - - + + Operation Failed Operación Fallida @@ -3538,12 +3538,12 @@ Editar Símbolo de Soldadura - + Create Cosmetic Line Crear Línea Adicional - + Edit Cosmetic Line Editar Línea Adicional @@ -3678,7 +3678,7 @@ No hay sub-elementos seleccionados - + @@ -3686,7 +3686,7 @@ La selección está vacía - + No object selected @@ -3723,7 +3723,7 @@ Por favor, seleccione dos líneas rectas - + Select 2 Vertexes or 1 Edge Seleccione 2 vértices o 1 arista @@ -5557,51 +5557,61 @@ Rápido, pero el resultado es una colección de líneas rectas cortas.Imprimir todas las páginas - + Different orientation Orientación diferente de la hoja - + The printer uses a different orientation than the drawing. Do you want to continue? La impresora utiliza una orientación de papel distinta a la del dibujo. ¿Desea continuar? - + Different paper size Tamaño de papel diferente - + The printer uses a different paper size than the drawing. Do you want to continue? La impresora usa un tamaño de papel distinto al del dibujo. ¿Desea continuar? - + Opening file failed No se pudo abrir el archivo - + Can not open file %1 for writing. No se puede abrir el archivo %1 para escritura. - + Save DXF file Guardar archivo DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Seleccionado: @@ -6086,7 +6096,12 @@ Do you want to continue? Sin ajuste de dirección - + + ComplexSection + Sección Compleja + + + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. @@ -6105,7 +6120,7 @@ Do you want to continue? - + Point Picker Selector de puntos @@ -6130,28 +6145,28 @@ Do you want to continue? Y - - + + Pick Points Elegir puntos - + Pick a point for cosmetic vertex Elegir un punto para vértice adicional - + Escape picking Anular la selección - + Left click to set a point Clic izquierdo para establecer un punto - + In progress edit abandoned. Start over. Edición en progreso abandonada. Empiece de nuevo. @@ -7059,7 +7074,7 @@ Puedes seleccionar más puntos para obtener segmentos de línea. - + Pick Points Elegir puntos @@ -7140,51 +7155,51 @@ Puedes seleccionar más puntos para obtener segmentos de línea. - - - + + + Edit points Editar puntos - + Edit Points Editar puntos - - + + Pick a starting point for leader line Selecciona un punto de partida para la línea de referencia - + Save Points Guardar puntos - + Click and drag markers to adjust leader line Haga clic y arrastre marcadores para ajustar la línea de referencia - - + + Save changes Guardar cambios - + Left click to set a point Clic izquierdo para establecer un punto - + Press OK or Cancel to continue Presiona OK o Cancelar para continuar - + In progress edit abandoned. Start over. Edición en progreso abandonada. Empiece de nuevo. @@ -7714,6 +7729,11 @@ usando el espacio X/Y dado Input the annotation text directly or start the rich text editor Introduce el texto de anotación directamente o inicia el editor de texto enriquecido + + + RichTextAnnotation + Anotación de texto enriquecido + TechDrawGui::TaskSectionView @@ -7853,7 +7873,7 @@ usando el espacio X/Y dado Nada que aplicar. Aún no se seleccionó la dirección del corte - + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. @@ -8142,6 +8162,11 @@ usando el espacio X/Y dado other otro + + + SectionView + Vista de sección + TechDrawGui::dlgTemplateField @@ -8169,7 +8194,7 @@ usando el espacio X/Y dado TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Agrega una línea de centro entre 2 líneas @@ -8177,7 +8202,7 @@ usando el espacio X/Y dado TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Agrega una línea de centro entre 2 puntos @@ -8185,7 +8210,7 @@ usando el espacio X/Y dado TechDraw_ComplexSection - + Insert complex Section View Insertar vista de sección compleja @@ -8214,7 +8239,7 @@ usando el espacio X/Y dado TechDraw_FaceCenterLine - + Adds a Centerline to Faces Agrega una línea de centro a las caras @@ -8246,7 +8271,7 @@ usando el espacio X/Y dado TechDraw_SectionView - + Insert simple Section View Insertar vista de sección simple @@ -8773,4 +8798,156 @@ hay un diálogo de tareas abiertas. No se puede eliminar + + DrawPage + + + Page + Página + + + + DrawSVGTemplate + + + Template + Plantilla + + + + DrawView + + + View + Ver + + + + DrawViewPart + + + View + Ver + + + + DrawViewSection + + + Section + Corte + + + + DrawComplexSection + + + Section + Corte + + + + DrawViewDetail + + + Detail + Detalle + + + + DrawActiveView + + + ActiveView + Vista activa + + + + DrawViewAnnotation + + + Annotation + Anotación + + + + DrawViewImage + + + Image + Imagen + + + + DrawViewSymbol + + + Symbol + Símbolo + + + + DrawViewArch + + + Arch + Arquitectura + + + + DrawViewDraft + + + Draft + Calado + + + + DrawLeaderLine + + + LeaderLine + Línea de Referencia + + + + DrawViewBalloon + + + Balloon + Globo + + + + DrawViewDimension + + + Dimension + Cota + + + + DrawViewDimExtent + + + Extent + Extensión + + + + DrawHatch + + + Hatch + Rayado + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts index 38f4a90cb9..59c1955cdd 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Añadir Línea Central entre 2 Líneas @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Añadir Línea Central entre 2 Puntos @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw Dibujo técnico - + Add Centerline between 2 Lines Añadir Línea Central entre 2 Líneas @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw Dibujo técnico - + Add Centerline between 2 Points Añadir Línea Central entre 2 Puntos @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw Dibujo técnico - + Add Cosmetic Line Through 2 Points Añadir Línea Cosmética a través 2 puntos @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw Dibujo técnico - + Insert Active View (3D View) Insertar Vista Activa (Vista 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw Dibujo técnico - + Insert Arch Workbench Object Insertar objeto Arch Workbench - + Insert a View of a Section Plane from Arch Workbench Insertar una vista de un plano de sección desde el banco de trabajo Arch @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw Dibujo técnico - + Insert Balloon Annotation Insertar anotación de globo @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw Dibujo técnico - + Insert Center Line Insertar Línea Central - + Add Centerline to Faces Añadir línea central a las caras @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw Dibujo técnico - + Insert Clip Group Insertar grupo de vistas de recorte @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw Dibujo técnico - + Add View to Clip Group Añadir vista a grupo de vistas de recorte @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw Dibujo técnico - + Remove View from Clip Group Quitar vista de grupo de vistas de recorte @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw Dibujo técnico - + Insert Complex Section Insertar sección compleja - + Insert a Complex Section Insertar una sección compleja @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw Dibujo técnico - + Remove Cosmetic Object Eliminar Objeto Cosmético @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw Dibujo técnico - + Change Appearance of Lines Cambiar el aspecto de las líneas - + Change Appearance of selected Lines Cambiar apariencia de las líneas seleccionadas @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw Dibujo técnico - + Insert Detail View Insertar Vista de Detalle @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw Dibujo técnico - + Insert Draft Workbench Object Insertar objeto del banco de trabajo Draft - + Insert a View of a Draft Workbench object Insertar una vista de un objeto del Entorno de Trabajo Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Archivo - + Export Page as DXF Exportar página como DXF - + Save DXF file Guardar archivo Dxf - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Archivo - + Export Page as SVG Exportar página como SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw Dibujo técnico - + Add Centerline to Faces Añadir línea central a las caras @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw Dibujo técnico - + Insert Bitmap Image Insertar imagen Bitmap - - + + Insert Bitmap from a file into a page Insertar Bitmap desde un archivo en una página - + Select an Image File Seleccione un archivo de imagen - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Archivos de imagen (*.jpg *.jpeg *.png *.bmp);;Todos los archivos (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw Dibujo técnico - + Insert Page using Template Insertar Página usando Plantilla - + Select a Template File Seleccione un Archivo de Plantilla - + Template (*.svg) Plantilla (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw Dibujo técnico - + Print All Pages Imprimir todas las páginas @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw Dibujo técnico - + Project shape... Formas del proyecto... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw Dibujo técnico - + Insert Projection Group Insertar Grupo de Proyección - + Insert multiple linked views of drawable object(s) Insertar vistas múltiples relacionadas de objeto(s) dibujable(s) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw Dibujo técnico - + Redraw Page Redibujar Página @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw Dibujo técnico - + Insert a simple or complex Section View Insertar una vista de sección simple o compleja - + Section View Vista de Sección - + Complex Section Sección Compleja @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw Dibujo técnico - + Insert Section View Insertar Vista de Sección @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw Dibujo técnico - + Show/Hide Invisible Edges Mostrar/Ocultar Bordes Invisibles @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw Dibujo técnico - + Insert Spreadsheet View Insertar Vista de Hoja de Cálculo - + Insert View to a spreadsheet Insertar Vista a una hoja de cálculo @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw Dibujo técnico - + Create a Surface Finish Symbol Crear un símbolo de acabado superficial - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Seleccione una vista<br> - haga clic en este botón<br> - seleccione los atributos del símbolo de acabado de superficie en el panel abierto @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw Dibujo técnico - + Insert SVG Symbol Insertar símbolo SVG - + Insert symbol from an SVG file Insertar símbolo de un archivo SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw Dibujo técnico - - + + Turn View Frames On/Off Activar o desactivar la vista marcos @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw Dibujo técnico - + Insert View Insertar Vista - + Insert a View Insertar una Vista @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw Dibujo técnico - + Add Welding Information to Leaderline Agregar Información de Soldadura a la Línea de Referencia @@ -1964,58 +1964,58 @@ Command - + Drawing create page Página de creación de dibujo - + Create view Crear vista - + Create Projection Group Crear Grupo de Proyección - + Create Clip Crear salto - + ClipGroupAdd Agregar grupo de clips - + ClipGroupRemove Eliminar grupo de clips - + Create Symbol Crear Símbolo - + Create DraftView Crear Vista Draft - + Create ArchView Crear vista de Arch - + Create spreadsheet view Crear vista de hoja de cálculo - - + + Save page to dxf Guardar página como dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Crear Cota - + Create Hatch Crear Rayado - + Update Hatch Actualizar tramado @@ -2056,12 +2056,12 @@ Eliminar tramado antiguas - + Create GeomHatch Crear GeomHatch - + Create Image Crear imagen @@ -2071,7 +2071,7 @@ Arrastrar Globo - + Drag Dimension Arrastrar Cota @@ -2081,7 +2081,7 @@ Crear Globo - + Create ActiveView Crear Vista Activa @@ -2091,12 +2091,12 @@ Crear Línea Central - + Create Cosmetic Line Crear Línea Cosmética - + Update CosmeticLine Actualizar Línea Cosmética @@ -2106,32 +2106,32 @@ Crear Vista de Detalle - + Update Detail Actualizar Detalle - + Create Leader Crear Flecha - + Edit Leader Editar Flecha - + Create Anno Create Anotación - + Edit Anno Editar Anotación - + Create SectionView Crear Vista de Sección @@ -2141,23 +2141,23 @@ Crear sección compleja - - + + Edit SectionView Editar Vista de Sección - + Create WeldSymbol Crear Símbolo de Soldadura - + Edit WeldSymbol Editar Símbolo de Soldadura - + Add Cosmetic Vertex Añadir vértice cosmético @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Selección incorrecta - - + + No Shapes, Groups or Links in this selection No existen Formas, Grupos o Relaciones en esta selección - - + + Select at least 1 DrawViewPart object as Base. Seleccione al menos 1 objeto de DrawViewPart como Base. - + I do not know what base view to use. No sé qué vista base utilizar. - + No Base View, Shapes, Groups or Links in this selection No hay vista base, formas, grupos o enlaces en esta selección - + No profile object found in selection No se encontró ningún objeto de perfil en la selección - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Selección incorrecta - - + + Select an object first Seleccione un objeto en primer lugar - - + + Too many objects selected Demasiados objetos seleccionados - - + + Create a page first. Cree una página de dibujo primero. - + @@ -2800,87 +2800,87 @@ Sin vista de un objeto Part en la selección. - + Select one Clip group and one View. Seleccione 1 grupo de recorte y 1 Vista. - + Select exactly one View to add to group. Seleccione exactamente una vista para añadir al grupo. - + Select exactly one Clip group. Seleccione exactamente un único grupo de Clip. - + Clip and View must be from same Page. Clip y vista deben ser de la misma página. - + Select exactly one View to remove from Group. Seleccione exactamente una vista para eliminar del grupo. - + View does not belong to a Clip La vista no pertenece a un Clip - + Choose an SVG file to open Seleccionar un archivo SVG para abrir - + Scalable Vector Graphic Gráfico vectorial escalable - + All Files Todos los Archivos - + Select at least one object. Seleccione al menos un objeto. - + Please select only 1 Arch Section. Por favor, seleccione solamente 1 sección Arch. - + No Arch Sections in selection. No existen secciones Arch en esta selección. - + Select exactly one Spreadsheet object. Seleccione exactamente un objeto de hoja de cálculo. - + No Drawing View Sin vistas de dibujo - + Open Drawing View before attempting export to SVG. Vista del dibujo abierta antes de intentar exportar a SVG. - + Can not export selection No se puede exportar selección - + Page contains DrawViewArch which will not be exported. Continue? La página contiene DrawViewArch que no será exportada. ¿Desea continuar? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Seleccione objetos de 2 puntos y 1 Vista. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Tarea en progreso - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Selección Incorrecta @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Debe seleccionar una vista base para la línea. @@ -3203,112 +3203,112 @@ No hay objetos DrawViewPart en esta selección - - + + No base View in Selection. No hay Vista base en la selección. - + You must select Faces or an existing CenterLine. Debe seleccionar una(s) cara(s) o una línea central existente. - + No CenterLine in selection. No hay Línea Central en la selección. - - - + + + Selection is not a CenterLine. La selección no es una línea central. - + Selection not understood. Selección no entendida. - + You must select 2 Vertexes or an existing CenterLine. Debe seleccionar 2 Vértices o una Línea Central existente. - + Need 2 Vertices or 1 CenterLine. Necesita 2 vértices o una línea central. - + Selection is empty. La selección está vacía. - + Not enough points in selection. No hay suficientes puntos en la selección. - + Selection is not a Cosmetic Line. La selección no es una Línea Cosmética. - + You must select 2 Vertexes. Debe seleccionar 2 Vértices. - - + + Nothing selected Nada seleccionado - + At least 1 object in selection is not a part view Al menos 1 objeto en la selección no es una vista de pieza - + Unknown object type in selection Tipo de objeto desconocido en la selección - + No View in Selection. No hay Vista en la Selección. - + You must select a View and/or lines. Debe seleccionar una vista y/o líneas. - + No Part Views in this selection No hay Vistas de Piezas en esta selección - + Select exactly one Leader line or one Weld symbol. Seleccione exactamente una Línea de referencia o un símbolo de Soldadura. - - + + SurfaceFinishSymbols SímbolosdeAcabadoSuperficial - + No Part View in Selection No hay Vista de parte en la selección - + No %1 in Selection No hay %1 en la selección @@ -3323,33 +3323,33 @@ Algunas caras en la selección ya están sombreadas. ¿Desea reemplazarlas? - + No TechDraw Page No hay página de TechDraw - + Need a TechDraw Page for this command Necesita una página TechDraw para este comando - + Select a Face first Seleccione primero una cara - + No TechDraw object in selection Ningún objeto TechDraw en la selección - + Create a page to insert. Crear una página para insertar. - + No Faces to hatch in this selection No hay caras para sombrear en esta selección @@ -3370,33 +3370,33 @@ No hay páginas de dibujo en el documento. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Todos los archivos (*.*) - + Export Page As PDF Exportar página como PDF - + Document Name: Nombre del documento: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportar página como SVG @@ -3445,7 +3445,7 @@ Editor de texto enriquecido - + New Cosmetic Vertex Nuevo vértice cosmético @@ -3522,8 +3522,8 @@ La dirección de la vista en coordenadas BaseView - - + + Operation Failed Operación fallida @@ -3538,12 +3538,12 @@ Editar Símbolo de Soldadura - + Create Cosmetic Line Crear Línea Cosmética - + Edit Cosmetic Line Editar línea Cosmética @@ -3678,7 +3678,7 @@ No hay subelementos seleccionados - + @@ -3686,7 +3686,7 @@ No ha seleccionado nada - + No object selected @@ -3723,7 +3723,7 @@ Por favor, seleccione dos líneas rectas - + Select 2 Vertexes or 1 Edge Seleccione 2 vértices o 1 borde @@ -5557,51 +5557,61 @@ Rápido, pero los resultados son una colección de líneas rectas cortas.Imprimir todas las páginas - + Different orientation Orientación diferente de la hoja - + The printer uses a different orientation than the drawing. Do you want to continue? La impresora utiliza una orientación de papel distinta a la del dibujo. ¿Desea continuar? - + Different paper size Tamaño de papel diferente - + The printer uses a different paper size than the drawing. Do you want to continue? La impresora usa un tamaño de papel distinto al del dibujo. ¿Desea continuar? - + Opening file failed No se pudo abrir el archivo - + Can not open file %1 for writing. No se puede abrir el archivo %1 para la escritura. - + Save DXF file Guardar archivo Dxf - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Seleccionado: @@ -6086,7 +6096,12 @@ Do you want to continue? Sin ajuste de dirección - + + ComplexSection + Sección Compleja + + + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. @@ -6105,7 +6120,7 @@ Do you want to continue? - + Point Picker Selector de puntos @@ -6130,28 +6145,28 @@ Do you want to continue? Y - - + + Pick Points Elegir puntos - + Pick a point for cosmetic vertex Escoge un punto para vértice cosmético - + Escape picking Anular la selección - + Left click to set a point Clic izquierdo para establecer un punto - + In progress edit abandoned. Start over. En proceso de edición abandonado. Comenzar de nuevo. @@ -7059,7 +7074,7 @@ Puedes elegir más puntos para obtener segmentos de línea. - + Pick Points Elegir puntos @@ -7140,51 +7155,51 @@ Puedes elegir más puntos para obtener segmentos de línea. - - - + + + Edit points Editar puntos - + Edit Points Editar puntos - - + + Pick a starting point for leader line Selecciona un punto de partida para la línea de referencia - + Save Points Guardar puntos - + Click and drag markers to adjust leader line Haga clic y arrastre marcadores para ajustar la línea de referencia - - + + Save changes Guardar cambios - + Left click to set a point Clic izquierdo para establecer un punto - + Press OK or Cancel to continue Presiona OK o Cancelar para continuar - + In progress edit abandoned. Start over. En proceso de edición abandonado. Comenzar de nuevo. @@ -7714,6 +7729,11 @@ usando el Espaciado X/Y dado Input the annotation text directly or start the rich text editor Introduce el texto de anotación directamente o inicia el editor de texto enriquecido + + + RichTextAnnotation + Anotación de texto enriquecido + TechDrawGui::TaskSectionView @@ -7853,7 +7873,7 @@ usando el Espaciado X/Y dado Nada que aplicar. No se ha elegido todavía la dirección de la sección - + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. @@ -8142,6 +8162,11 @@ usando el Espaciado X/Y dado other otro + + + SectionView + Vista de sección + TechDrawGui::dlgTemplateField @@ -8169,7 +8194,7 @@ usando el Espaciado X/Y dado TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Añade una Línea Central entre 2 Líneas @@ -8177,7 +8202,7 @@ usando el Espaciado X/Y dado TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Añade una Línea Central entre 2 puntos @@ -8185,7 +8210,7 @@ usando el Espaciado X/Y dado TechDraw_ComplexSection - + Insert complex Section View Insertar vista de sección compleja @@ -8214,7 +8239,7 @@ usando el Espaciado X/Y dado TechDraw_FaceCenterLine - + Adds a Centerline to Faces Añade una Línea Central a las Caras @@ -8246,7 +8271,7 @@ usando el Espaciado X/Y dado TechDraw_SectionView - + Insert simple Section View Insertar vista de sección simple @@ -8772,4 +8797,156 @@ there is an open task dialog. No se puede borrar + + DrawPage + + + Page + Página + + + + DrawSVGTemplate + + + Template + Plantilla + + + + DrawView + + + View + Vista + + + + DrawViewPart + + + View + Vista + + + + DrawViewSection + + + Section + Sección + + + + DrawComplexSection + + + Section + Sección + + + + DrawViewDetail + + + Detail + Detalle + + + + DrawActiveView + + + ActiveView + Vista activa + + + + DrawViewAnnotation + + + Annotation + Anotación + + + + DrawViewImage + + + Image + Imagen + + + + DrawViewSymbol + + + Symbol + Símbolo + + + + DrawViewArch + + + Arch + Arco + + + + DrawViewDraft + + + Draft + Calado + + + + DrawLeaderLine + + + LeaderLine + Línea de Referencia + + + + DrawViewBalloon + + + Balloon + Globo + + + + DrawViewDimension + + + Dimension + Cota + + + + DrawViewDimExtent + + + Extent + Extensión + + + + DrawHatch + + + Hatch + Rayado + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts index b68d165c5d..5f4486f889 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Gehitu 2 lerroren arteko erdiko lerroa @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Gehitu 2 punturen arteko erdiko lerroa @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Gehitu 2 lerroren arteko erdiko lerroa @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Gehitu 2 punturen arteko erdiko lerroa @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Gehitu lerro kosmetikoa 2 puntu zeharkatuta @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Txertatu bista aktiboa (3D bista) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Txertatu Arch lan-mahaiaren objektua - + Insert a View of a Section Plane from Arch Workbench Txertatu Arch lan-mahaiko sekzio-plano baten bista bat @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Txertatu bunbuilo-oharpena @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Txertatu erdiko lerroa - + Add Centerline to Faces Gehitu erdiko lerroa aurpegiei @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Txertatu ebaketa-taldea @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Gehitu bista ebaketa-taldeari @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Kendu bista ebaketa-taldetik @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Txertatu sekzio konplexua - + Insert a Complex Section Txertatu sekzio konplexua @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Kendu objektu kosmetikoa @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Aldatu lerroen itxura - + Change Appearance of selected Lines Aldatu hautatutako lerroen itxura @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Txertatu xehetasun-bista @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Txertatu Draft lan-mahaiaren objektua - + Insert a View of a Draft Workbench object Txertatu zirriborro lan-mahai objektu baten bista bat @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Fitxategia - + Export Page as DXF Esportatu orrialdea DXF gisa - + Save DXF file Gorde DXF fitxategia - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Fitxategia - + Export Page as SVG Esportatu orrialdea SVG gisa @@ -1116,7 +1116,7 @@ Lock or unlock the position of a view:<br>- Select a single view<br>- Click this tool - Blokeatu edo desblokeatu bista baten kokapena:<br>- Hautatu bista bakar bat<br>- Egin klik tresna honetan + Blokeatu edo desblokeatu bista baten posizioa:<br>- Hautatu bista bakar bat<br>- Egin klik tresna honetan @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Gehitu erdiko lerroa aurpegiei @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Txertatu bitmap-irudia - - + + Insert Bitmap from a file into a page Txertatu fitxategi bateko bitmap bat orri batean - + Select an Image File Hautatu irudi-fitxategi bat - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Irudi-fitxategiak (*.jpg *.jpeg *.png *.bmp);;Fitxategi guztiak (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Txertatu orria txantiloi bat erabilita - + Select a Template File Hautatu txantiloi-fitxategi bat - + Template (*.svg) Txantiloia (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Inprimatu orrialde guztiak @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Proiektatu forma... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Txertatu proiekzio-taldea - + Insert multiple linked views of drawable object(s) Txertatu objektu marrazgai(ar)en bista estekatu anitz @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Marraztu orria berriro @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Txertatu sekzio-bista sinplea edo konplexua - + Section View sekzio-bista - + Complex Section Sekzio konplexua @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Txertatu sekzio-bista @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Erakutsi/ezkutatu ertz ikusezinak @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Txertatu kalkulu-orriaren bista - + Insert View to a spreadsheet Txertatu bista kalkulu-orri bati @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Sortu gainazalaren amaierarako ikurra - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Hautatu bista bat<br> - egin klik botoi honetan<br> - irekitako panelean, hautatu gainazalaren amaierarako ikurraren atributuak @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Txertatu SVG ikurra - + Insert symbol from an SVG file Txertatu ikurra SVG fitxategi batetik @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Aktibatu/desaktibatu bista-markoak @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Txertatu bista - + Insert a View Txertatu bista bat @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Gehitu soldadura-informazioa gida-marrari @@ -1964,58 +1964,58 @@ Command - + Drawing create page Sortu marrazki-orria - + Create view Sortu bista - + Create Projection Group Sortu proiekzio-taldea - + Create Clip Sortu ebaketa - + ClipGroupAdd Gehitu ebaketa taldea - + ClipGroupRemove Kendu ebaketa taldea - + Create Symbol Sortu ikurra - + Create DraftView Sortu zirriborro-bista - + Create ArchView Sortu arku-bista - + Create spreadsheet view Sortu kalkulu-orriaren bista - - + + Save page to dxf Gorde orria DXF fitxategi batean @@ -2036,17 +2036,17 @@ - + Create Dimension Sortu kota - + Create Hatch Sortu itzaleztadura - + Update Hatch Eguneratu itzaleztadura @@ -2056,12 +2056,12 @@ Kendu itzaleztadura zaharra - + Create GeomHatch Sortu itzaleztadura geometrikoa - + Create Image Sortu irudia @@ -2071,7 +2071,7 @@ Arrastatu bunbuiloa - + Drag Dimension Arrastatu kota @@ -2081,7 +2081,7 @@ Sortu bunbuiloa - + Create ActiveView Sortu bista aktiboa @@ -2091,12 +2091,12 @@ Sortu erdiko lerroa - + Create Cosmetic Line Sortu lerro kosmetikoa - + Update CosmeticLine Eguneratu lerro kosmetikoa @@ -2106,32 +2106,32 @@ Sortu bista xehea - + Update Detail Eguneratu xehetasuna - + Create Leader Sortu gida-marra - + Edit Leader Editatu gida-marra - + Create Anno Sortu oharpena - + Edit Anno Editatu oharpena - + Create SectionView Sortu sekzio-bista @@ -2141,23 +2141,23 @@ Sortu sekzio konplexua - - + + Edit SectionView Editatu sekzio-bista - + Create WeldSymbol Sortu soldadura-ikurra - + Edit WeldSymbol Editatu soldadura-ikurra - + Add Cosmetic Vertex Gehitu erpin kosmetikoa @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Hautapen okerra - - + + No Shapes, Groups or Links in this selection Ez dago formarik, talderik edo estekarik hautapen honetan - - + + Select at least 1 DrawViewPart object as Base. Hautatu gutxienez marrazki-bistaren pieza bat oinarri gisa. - + I do not know what base view to use. Ez dakit zein oinarri-bista erabili. - + No Base View, Shapes, Groups or Links in this selection Ez dago oinarri-bistarik, formarik, talderik edo estekarik hautapen honetan - + No profile object found in selection Ez da profil-objekturik aurkitu hautapenean - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Hautapen okerra - - + + Select an object first Hautatu objektu bat - - + + Too many objects selected Objektu gehiegi hautatuta - - + + Create a page first. Lehenengo, sortu orrialde bat. - + @@ -2800,87 +2800,87 @@ Ez dago piezaren bistarik hautapenean. - + Select one Clip group and one View. Hautatu ebaketa talde bat eta bista bat. - + Select exactly one View to add to group. Hautatu bista bakar bat taldeari gehitzeko. - + Select exactly one Clip group. Hautatu ebaketa-talde bakar bat. - + Clip and View must be from same Page. Ebaketak eta bistak orrialde berekoak izan behar dute. - + Select exactly one View to remove from Group. Hautatu bista bakar bat taldetik kentzeko. - + View does not belong to a Clip Bista ez da ebaketa batekoa - + Choose an SVG file to open Hautatu SVG fitxategi bat irekitzeko - + Scalable Vector Graphic Grafiko bektorial eskalagarria - + All Files Fitxategi guztiak - + Select at least one object. Hautatu objektu bat gutxienez. - + Please select only 1 Arch Section. Hautatu arkitektura-sekzio bakar bat. - + No Arch Sections in selection. Ez dago arkitektura-sekziorik hautapenean. - + Select exactly one Spreadsheet object. Hautatu kalkulu-orriko objektu bakar bat. - + No Drawing View Ez dago marrazki-bistarik - + Open Drawing View before attempting export to SVG. Ireki marrazki-bista SVG formatura esportatzen saiatu baino lehen. - + Can not export selection Ezin da hautapena esportatu - + Page contains DrawViewArch which will not be exported. Continue? Orrialdeak DrawViewArch dauka, baina ez da esportatuko. Jarraitu? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Hautatu bi puntu-objektu eta bista bat. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Ataza abian - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Hautapen okerra @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Oinarrizko bista bat hautatu behar duzu lerrorako. @@ -3203,112 +3203,112 @@ Ez dago marrazki-piezaren bistarik hautapen honetan - - + + No base View in Selection. Ez dago oinarri-bistarik hautapenean. - + You must select Faces or an existing CenterLine. Aurpegiak edo lehendik dagoen erdiko lerro bat hautatu behar duzu. - + No CenterLine in selection. Ez dago erdiko lerrorik hautapenean. - - - + + + Selection is not a CenterLine. Hautapena ez da erdiko lerroa. - + Selection not understood. Hautapena ez da ulertzen. - + You must select 2 Vertexes or an existing CenterLine. 2 erpin edo lehendik dagoen erdiko lerro bat hautatu behar duzu. - + Need 2 Vertices or 1 CenterLine. 2 erpin edo erdiko lerro 1 behar da. - + Selection is empty. Hautapena hutsik dago. - + Not enough points in selection. Ez dago nahiko punturik hautapenean. - + Selection is not a Cosmetic Line. Hautapena ez da lerro kosmetikoa. - + You must select 2 Vertexes. Bi erpin hautatu behar dituzu. - - + + Nothing selected Ez da ezer hautatu - + At least 1 object in selection is not a part view Hautapeneko objektu bat gutxienez ez da pieza-bista bat - + Unknown object type in selection Objektu-forma ezezaguna hautapenean - + No View in Selection. Ez dago bistarik hautapenean. - + You must select a View and/or lines. Bista bat eta/edo lerroak hautatu behar dituzu. - + No Part Views in this selection Ez dago pieza-bistarik hautapen honetan - + Select exactly one Leader line or one Weld symbol. Hautatu gida-marra bakar bat edo soldadura-ikur bakar bat. - - + + SurfaceFinishSymbols Gainazalen amaierarako ikurrak - + No Part View in Selection Ez dago pieza-bistarik hautapenean - + No %1 in Selection Ez dago %1 hautapenean @@ -3323,33 +3323,33 @@ Hautapeneko zenbait aurpegi dagoeneko itzaleztatuta daude. Ordeztu? - + No TechDraw Page Ez dago TechDraw orrialderik - + Need a TechDraw Page for this command TechDraw orrialdea behar da komando honetarako - + Select a Face first Hautatu aurpegi bat lehenengo - + No TechDraw object in selection Ez dago TechDraw objekturik hautapenean - + Create a page to insert. Sortu orrialde bat bertan bistak txertatzeko. - + No Faces to hatch in this selection Ez dago itzaleztatzeko aurpegirik hautapen honetan @@ -3370,33 +3370,33 @@ Ez dago marrazki-orririk dokumentuan. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Fitxategi guztiak (*.*) - + Export Page As PDF Esportatu orrialdea PDF gisa - + Document Name: Dokumentu-izena: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Esportatu orrialdea SVG gisa @@ -3445,7 +3445,7 @@ Testu aberatsaren editorea - + New Cosmetic Vertex Erpin kosmetiko berria @@ -3522,8 +3522,8 @@ Bistaren norabidea oinarri-bistaren koordenatuetan - - + + Operation Failed Eragiketak huts egin du @@ -3538,12 +3538,12 @@ Editatu soldadura-ikurra - + Create Cosmetic Line Sortu lerro kosmetikoa - + Edit Cosmetic Line Editatu lerro kosmetikoa @@ -3678,7 +3678,7 @@ Ez da azpielementurik hautatu - + @@ -3686,7 +3686,7 @@ Hautapena hutsik dago - + No object selected @@ -3723,7 +3723,7 @@ Hautatu bi lerro zuzen - + Select 2 Vertexes or 1 Edge Hautatu 2 erpin edo ertz 1 @@ -5560,51 +5560,61 @@ Azkarra, baina lerro zuzen laburren bilduma bat ematen du. Inprimatu orrialde guztiak - + Different orientation Orientazio desberdina - + The printer uses a different orientation than the drawing. Do you want to continue? Inprimagailuak eta marrazkiak orientazio desberdina dute. Jarraitu nahi duzu? - + Different paper size Paper-tamaina desberdina - + The printer uses a different paper size than the drawing. Do you want to continue? Inprimagailuak eta marrazkiak paper-tamaina desberdina dute. Jarraitu nahi duzu? - + Opening file failed Fitxategia irekitzeak huts egin du - + Can not open file %1 for writing. Ezin da %1 fitxategia ireki hura idazteko. - + Save DXF file Gorde DXF fitxategia - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Hautatua: @@ -6089,7 +6099,12 @@ Jarraitu nahi duzu? Ez da norabiderik ezarri - + + ComplexSection + Sekzio konplexua + + + Can not continue. Object * %1 or %2 not found. Ezin da jarraitu. Ez da * %1 edo %2 objektua aurkitu. @@ -6108,7 +6123,7 @@ Jarraitu nahi duzu? - + Point Picker Puntuen aukeratzailea @@ -6133,28 +6148,28 @@ Jarraitu nahi duzu? Y - - + + Pick Points Aukeratu puntuak - + Pick a point for cosmetic vertex Aukeratu puntu bat erpin kosmetikorako - + Escape picking Ezeztatu hautapena - + Left click to set a point Ezkerreko klika puntu bat ezartzeko - + In progress edit abandoned. Start over. Abian dagoen edizioa utzi da. Hasi berriro. @@ -7062,7 +7077,7 @@ Puntu gehiago ere aukeratu daitezke lerro segmentuak sortzeko. - + Pick Points Aukeratu puntuak @@ -7143,51 +7158,51 @@ Puntu gehiago ere aukeratu daitezke lerro segmentuak sortzeko. - - - + + + Edit points Editatu puntuak - + Edit Points Editatu puntuak - - + + Pick a starting point for leader line Aukeratu gida-marraren hasierako puntua - + Save Points Gorde puntuak - + Click and drag markers to adjust leader line Klikatu eta arrastatu markatzaileak gida-marra doitzeko - - + + Save changes Gorde aldaketak - + Left click to set a point Ezkerreko klika puntu bat ezartzeko - + Press OK or Cancel to continue Sakatu 'Ados' edo 'Utzi' jarraitzeko - + In progress edit abandoned. Start over. Abian dagoen edizioa utzi da. Hasi berriro. @@ -7717,6 +7732,11 @@ emandako X/Y espazioa erabilita Input the annotation text directly or start the rich text editor Sartu oharpenaren testua zuzenean edo abiarazi testu aberatsaren editorea + + + RichTextAnnotation + Testu aberatseko oharpena + TechDrawGui::TaskSectionView @@ -7856,7 +7876,7 @@ emandako X/Y espazioa erabilita Ez dago aplikatzeko ezer. Oraindik ez da sekzio-norabiderik aukeratu - + Can not continue. Object * %1 or %2 not found. Ezin da jarraitu. Ez da * %1 edo %2 objektua aurkitu. @@ -8145,6 +8165,11 @@ emandako X/Y espazioa erabilita other beste bat + + + SectionView + Sekzio-bista + TechDrawGui::dlgTemplateField @@ -8172,7 +8197,7 @@ emandako X/Y espazioa erabilita TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Erdiko lerro bat gehitzen du 2 lerroren artean @@ -8180,7 +8205,7 @@ emandako X/Y espazioa erabilita TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Erdiko lerro bat gehitzen du 2 punturen artean @@ -8188,7 +8213,7 @@ emandako X/Y espazioa erabilita TechDraw_ComplexSection - + Insert complex Section View Txertatu sekzio konplexuaren bista @@ -8217,7 +8242,7 @@ emandako X/Y espazioa erabilita TechDraw_FaceCenterLine - + Adds a Centerline to Faces Erdiko lerro bat gehitzen die aurpegiei @@ -8249,7 +8274,7 @@ emandako X/Y espazioa erabilita TechDraw_SectionView - + Insert simple Section View Txertatu sekzio sinplearen bista @@ -8776,4 +8801,156 @@ elkarrizketa-koadroa irekita dagoelako. Ezin da ezabatu + + DrawPage + + + Page + Orrialdea + + + + DrawSVGTemplate + + + Template + Txantiloia + + + + DrawView + + + View + Bista + + + + DrawViewPart + + + View + Bista + + + + DrawViewSection + + + Section + Sekzioa + + + + DrawComplexSection + + + Section + Sekzioa + + + + DrawViewDetail + + + Detail + Xehetasuna + + + + DrawActiveView + + + ActiveView + Bista aktiboa + + + + DrawViewAnnotation + + + Annotation + Oharpena + + + + DrawViewImage + + + Image + Irudia + + + + DrawViewSymbol + + + Symbol + Ikurra + + + + DrawViewArch + + + Arch + Arkitektura + + + + DrawViewDraft + + + Draft + Zirriborroa + + + + DrawLeaderLine + + + LeaderLine + Gida-marra + + + + DrawViewBalloon + + + Balloon + Bunbuiloa + + + + DrawViewDimension + + + Dimension + Kota + + + + DrawViewDimExtent + + + Extent + Hedadura + + + + DrawHatch + + + Hatch + Itzaleztadura + + + + DrawGeomHatch + + + GeomHatch + Itzaleztadura geometrikoa + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts index ac90b9aa80..bb565a1b5e 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Lisää keskilinja 2:n viivan väliin @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Lisää keskilinja 2:n pisteen väliin @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Lisää keskilinja 2:n viivan väliin @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Lisää keskilinja 2:n pisteen väliin @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Lisää kosmeettinen viiva 2 pisteen kautta @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Lisää aktiivinen näkymä (3D-näkymä) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Lisää Arch-työpöytäobjekti - + Insert a View of a Section Plane from Arch Workbench Lisää poikkileikkaustason näkymä Arch-työpöydästä @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Lisää tekstikupla-merkintä @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Lisää keskilinja - + Add Centerline to Faces Lisää keskiviiva pintaan @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Lisää leikeryhmä (clip) @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Lisää Näkymä Leikekuvio-ryhmään (Clip group) @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Poista Näkymä Leikekuvio-ryhmästä @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Poista kosmeettinen objekti @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Muokkaa viivojen tyyliä - + Change Appearance of selected Lines Muuta valittujen viivojen tyyliä @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Lisää Detaljinäkymä @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Lisää työpöydän luonnosobjekti - + Insert a View of a Draft Workbench object Lisää näkymä luonnostyöpöydän objektille (Draft Workbench) @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Tiedosto - + Export Page as DXF Vie sivu DXF-tiedostona - + Save DXF file Tallenna DXF-tiedosto - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Tiedosto - + Export Page as SVG Vie sivu SVG-tiedostona @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Lisää keskiviiva pintaan @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Lisää bittikartta-kuva - - + + Insert Bitmap from a file into a page Lisää bittikartta-kuva tiedostosta sivulle - + Select an Image File Valitse kuvatiedosto - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Lisää sivu käyttäen mallipohjaa - + Select a Template File Valitse mallipohjan tiedosto - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Tulosta kaikki sivut @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projektin muoto... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Lisää projektioryhmä - + Insert multiple linked views of drawable object(s) Aseta useita linkitettyjä näkymiä piirrettävistä objekteista @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Tee sivu uudelleen @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Lisää poikkileikkausnäkymä @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Näytä/piilota näkymättömät reunat @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Lisää taulukkonäkymä - + Insert View to a spreadsheet Lisää näkymä laskentataulukkoon @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Valitse näkymä <br> klikkaa tätä painiketta <br> valitse pinnanlaatu symboli valikosta @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Lisää SVG-symboli - + Insert symbol from an SVG file Lisää symboli SVG-tiedostosta @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Näytä kehykset - Käytössä/Pois @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Lisää Näkymä - + Insert a View Lisää Näkymä @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Lisää hitsaustiedot Reittiviivaan @@ -1964,58 +1964,58 @@ Command - + Drawing create page Piirustus luo sivu - + Create view Luo näkymä - + Create Projection Group Lisää projektioryhmä - + Create Clip Luo Leikekuvio (Clip) - + ClipGroupAdd LeikekuvioRyhmäLisäys - + ClipGroupRemove LeikekuvioRyhmäPoisto - + Create Symbol Luo symboli - + Create DraftView Luo vedosäkymä - + Create ArchView Luo ArchView - + Create spreadsheet view Luo laskentataulukkonäkymä - - + + Save page to dxf Tallenna sivu dxf-muotoon @@ -2036,17 +2036,17 @@ - + Create Dimension Luo Mitta - + Create Hatch Luo Kuviointi - + Update Hatch Päivitä kuviointi @@ -2056,12 +2056,12 @@ Poista vanhat kuvioinnit - + Create GeomHatch Luo Geometrinen Kuviointi - + Create Image Luo kuva @@ -2071,7 +2071,7 @@ Raahaa tekstikuplaa - + Drag Dimension Raahaa Mittaa @@ -2081,7 +2081,7 @@ Luo tekstikupla - + Create ActiveView Luo Aktiivinen Näkymä @@ -2091,12 +2091,12 @@ Luo Keskilinja - + Create Cosmetic Line Luo kosmeettinen viiva - + Update CosmeticLine Päivitä kosmeettinen viiva @@ -2106,32 +2106,32 @@ Luo Detaljinäkymä - + Update Detail Päivitä Detaljinäkymä - + Create Leader Luo Reittiviiva - + Edit Leader Muokkaa Reittiviivaa - + Create Anno Create Anno - + Edit Anno Muokkaa Annoa - + Create SectionView Luo Osionäkymä @@ -2141,23 +2141,23 @@ Luo monitasoinen leikkaus - - + + Edit SectionView Muokkaa leikkausnäkymää - + Create WeldSymbol Luo WeldSymboli - + Edit WeldSymbol Muokkaa WeldSymbolia - + Add Cosmetic Vertex Lisää kosmeettinen apupiste @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Virheellinen valinta - - + + No Shapes, Groups or Links in this selection Ei muotoja, ryhmiä tai linkkejä tässä valinnassa - - + + Select at least 1 DrawViewPart object as Base. Valitse vähintään 1 DrawViewPart-objekti pohjaksi. - + I do not know what base view to use. En tiedä mitä perusnäkymää pitäisi käyttää. - + No Base View, Shapes, Groups or Links in this selection Ei perusnäkymää, muotoja, ryhmiä tai linkkejä tässä valinnassa - + No profile object found in selection Valinnassa ei löytynyt profiiliobjektia - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Virheellinen valinta - - + + Select an object first Valitse ensin objekti - - + + Too many objects selected Liian monta objektia valittu - - + + Create a page first. Luo sivu ensin. - + @@ -2800,87 +2800,87 @@ Valinnassa ei ole osan näkymää. - + Select one Clip group and one View. Valitse yksi Leikekuvio-ryhmä ja yksi Näkymä. - + Select exactly one View to add to group. Valitse täsmälleen yksi Näkymä lisättäväksi ryhmään. - + Select exactly one Clip group. Valitse täsmälleen yksi Leikekuvio-ryhmä. - + Clip and View must be from same Page. Leikekuvio ja Näkymä on valittava samalta sivulta. - + Select exactly one View to remove from Group. Valitse täsmälleen yksi Näkymä ryhmästä poistettavaksi. - + View does not belong to a Clip Näkymä ei kuulu Leikekuvioon - + Choose an SVG file to open Valitse avattava SVG-tiedosto - + Scalable Vector Graphic Skaalautuva vektorigrafiikka - + All Files Kaikki tiedostot - + Select at least one object. Valitse vähintään yksi objekti. - + Please select only 1 Arch Section. Ole hyvä ja valitse vain 1 Arch-poikkileikkaus. - + No Arch Sections in selection. Valinnassa ei ole Arch-poikkileikkausta. - + Select exactly one Spreadsheet object. Valitse täsmälleen yksi taulukkokohde. - + No Drawing View Ei piirrosnäkymää - + Open Drawing View before attempting export to SVG. Avaa Piirustuksen Näkymä ennen kuin yrität viedä SVG-tiedostoon. - + Can not export selection Valintaa ei voida viedä tiedostoon - + Page contains DrawViewArch which will not be exported. Continue? Sivu sisältää DrawViewArch-objektin, jota ei voi viedä. Jatketaanko? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Valitse 2 pistemäistä objektia ja 1 Näkymä. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Toiminto käynnissä - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Väärä valinta @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Jokin Perusnäkymä pitää valita viivan kiinnitystä varten. @@ -3203,112 +3203,112 @@ Valinnassa ei ole DrawViewPart-tyyppistä objektia - - + + No base View in Selection. Valintaan ei kuulu pohjanäkymää. - + You must select Faces or an existing CenterLine. On valittava joko alue tai olemassaoleva keskilinja. - + No CenterLine in selection. Valintaan ei kuulu Keskilinjaa. - - - + + + Selection is not a CenterLine. Valinta ei ole Keskilinja. - + Selection not understood. Valintajoukko on käsittämätön. - + You must select 2 Vertexes or an existing CenterLine. On valittava joko 2 pistettä tai olemassaoleva keskilinja. - + Need 2 Vertices or 1 CenterLine. Tarvitaan 2 pistettä tai 1 keskilinja. - + Selection is empty. Mitään ei ole valittu. - + Not enough points in selection. Ei tarpeeksi pisteitä valinnassa. - + Selection is not a Cosmetic Line. Valinta ei ole kosmeettinen viiva. - + You must select 2 Vertexes. Ensin pitää valita 2 pistettä. - - + + Nothing selected Mitään ei ole valittu - + At least 1 object in selection is not a part view Vähintään yksi valituista objekteista ei ole näkymä osista - + Unknown object type in selection Valittuna on tyypiltään tuntematon objekti - + No View in Selection. Valinnassa ei ole näkymää. - + You must select a View and/or lines. Ensin pitää valita Näkymä ja/tai viivoja. - + No Part Views in this selection Valinnassa ei ole Näkymää osista - + Select exactly one Leader line or one Weld symbol. Valitse tämälleen yksi Reittiviiva tai yksi Hitsaussymboli. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Jotkut valitut Alueet on jo Kuvioitu. Korvataanko ne? - + No TechDraw Page TechDraw-sivua ei ole - + Need a TechDraw Page for this command Tätä komentoa varten tarvitaan TechDraw-sivu - + Select a Face first Valitse ensin Alue - + No TechDraw object in selection TechDraw-objektia ei ole valittuna - + Create a page to insert. Luo sivu kuvien lisäämistä varten. - + No Faces to hatch in this selection Valinnassa ei ole Aluetta kuvioitavaksi @@ -3370,33 +3370,33 @@ Asiakirjassa ei ole Piirustus-sivuja. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Kaikki tiedostot (*.*) - + Export Page As PDF Vie sivu PDF-tiedostoon - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Vie sivu SVG-tiedostoon @@ -3445,7 +3445,7 @@ RTF-tekstin editori - + New Cosmetic Vertex Uusi kosmeettinen apupiste @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Toiminto ei onnistunut @@ -3538,12 +3538,12 @@ Muokkaa Hitsaussymbolia - + Create Cosmetic Line Luo kosmeettinen viiva - + Edit Cosmetic Line Muokkaa kosmeettista viivaa @@ -3678,7 +3678,7 @@ Alielementtejä ei ole valittu - + @@ -3686,7 +3686,7 @@ Valinta on tyhjä - + No object selected @@ -3723,7 +3723,7 @@ Valitse kaksi suoraa viivaa - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5551,51 +5551,61 @@ Nopea, mutta tulos on kokoelma lyhyitä suoria viivoja. Tulosta kaikki sivut - + Different orientation Erilainen sivun suunta - + The printer uses a different orientation than the drawing. Do you want to continue? Tulostin käyttää eri paperisuuntaa kuin piirros. Haluatko jatkaa? - + Different paper size Erilainen paperikoko - + The printer uses a different paper size than the drawing. Do you want to continue? Tulostin käyttää eri paperikokoa kuin piirros. Haluatko jatkaa? - + Opening file failed Tiedoston avaaminen epäonnistui - + Can not open file %1 for writing. Tiedostoon ”%1” ei voida tallentaa. - + Save DXF file Tallenna DXF-tiedosto - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Valittu: @@ -6080,7 +6090,12 @@ Haluatko jatkaa? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Ei voi jatkaa. Objektia *%1 tai %2 ei löytynyt. @@ -6099,7 +6114,7 @@ Haluatko jatkaa? - + Point Picker Pisteiden valitsin @@ -6124,28 +6139,28 @@ Haluatko jatkaa? Y - - + + Pick Points Valitse pisteitä - + Pick a point for cosmetic vertex Valitse paikka kosmeettiselle apupisteelle - + Escape picking Escape picking - + Left click to set a point Aseta piste napsauttamalla vasemmalla painikkeella - + In progress edit abandoned. Start over. Käynnissä ollut muokkaus hylättiin. Aloita alusta. @@ -7051,7 +7066,7 @@ Valitsemalla lisäpisteitä syntyy viivasegmenttejä. - + Pick Points Valitse pisteitä @@ -7132,51 +7147,51 @@ Valitsemalla lisäpisteitä syntyy viivasegmenttejä. - - - + + + Edit points Muokkaa pisteitä - + Edit Points Muokkaa pisteitä - - + + Pick a starting point for leader line Valitse Reittiviivan alkupiste - + Save Points Tallenna Pisteet - + Click and drag markers to adjust leader line Klikkaa ja vedä markkereita säätääksesi Reittiviivaa - - + + Save changes Tallenna muutokset - + Left click to set a point Aseta piste napsauttamalla vasemmalla painikkeella - + Press OK or Cancel to continue Paina OK tai Peruuta jatkaaksesi - + In progress edit abandoned. Start over. Käynnissä ollut muokkaus hylättiin. Aloita alusta. @@ -7706,6 +7721,11 @@ käyttäen annettuja X/Y-välimatkoja Input the annotation text directly or start the rich text editor Syötä huomautusteksti suoraan tai käynnistä RTF-editori + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7845,7 +7865,7 @@ käyttäen annettuja X/Y-välimatkoja Ei mitään suoritettavaa. Poikkileikkaussuuntaa ei ole vielä valittu - + Can not continue. Object * %1 or %2 not found. Ei voi jatkaa. Objektia *%1 tai %2 ei löytynyt. @@ -8134,6 +8154,11 @@ käyttäen annettuja X/Y-välimatkoja other muu + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8161,7 +8186,7 @@ käyttäen annettuja X/Y-välimatkoja TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Lisää keskilinjan kahden viivan väliin @@ -8169,7 +8194,7 @@ käyttäen annettuja X/Y-välimatkoja TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Lisää keskilinjan 2:n pisteen väliin @@ -8177,7 +8202,7 @@ käyttäen annettuja X/Y-välimatkoja TechDraw_ComplexSection - + Insert complex Section View Lisää monimutkainen poikkileikkausnäkymä @@ -8206,7 +8231,7 @@ käyttäen annettuja X/Y-välimatkoja TechDraw_FaceCenterLine - + Adds a Centerline to Faces Lisää keskilinjan alueisiin @@ -8238,7 +8263,7 @@ käyttäen annettuja X/Y-välimatkoja TechDraw_SectionView - + Insert simple Section View Lisää yksinkertainen poikkileikkausnäkymä @@ -8764,4 +8789,156 @@ there is an open task dialog. Ei Voi Poistaa + + DrawPage + + + Page + Sivu + + + + DrawSVGTemplate + + + Template + Mallipohja + + + + DrawView + + + View + Näytä + + + + DrawViewPart + + + View + Näytä + + + + DrawViewSection + + + Section + Leikkaus + + + + DrawComplexSection + + + Section + Leikkaus + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Huomautus + + + + DrawViewImage + + + Image + Kuva + + + + DrawViewSymbol + + + Symbol + Symboli + + + + DrawViewArch + + + Arch + Arch + + + + DrawViewDraft + + + Draft + Syväys (vesirajasta pohjaan) + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Tekstikupla + + + + DrawViewDimension + + + Dimension + Mitta + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Kuviointi + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts index 97f1a24a5a..1747fa14d4 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Ligne centrale entre 2 lignes @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Ajouter une ligne de centre entre 2 points @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Ligne centrale entre 2 lignes @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Ajouter une ligne de centre entre 2 points @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Ajouter une ligne cosmétique par 2 points @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Insérer la vue active (dans la vue 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Insérer un objet de l'atelier Arch - + Insert a View of a Section Plane from Arch Workbench Insérer une vue d'un plan de coupe à partir de l'atelier Arch @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Insérer une infobulle @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Insérer une ligne centrale - + Add Centerline to Faces Ajouter une ligne centrale à des faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Insérer une fenêtre de rognage @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Ajouter une vue à la fenêtre de rognage @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Supprimer la vue de la fenêtre de rognage @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insérer une vue en coupe complexe - + Insert a Complex Section Insérer une vue en coupe complexe @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Supprimer l'objet cosmétique @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Changer l'apparence des lignes - + Change Appearance of selected Lines Changer l'apparence des lignes sélectionnées @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Insérer une vue détaillée @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Insérer un objet de l'atelier Draft - + Insert a View of a Draft Workbench object Insére une vue d’un objet de l'atelier Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Fichier - + Export Page as DXF Exporter une page au format DXF - + Save DXF file Enregistrer le fichier Dxf - + DXF (*.dxf) Dxf (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Fichier - + Export Page as SVG Exporter une page au format SVG @@ -1564,12 +1564,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Ajouter une ligne centrale à des faces @@ -1629,28 +1629,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Insérer une image bitmap - - + + Insert Bitmap from a file into a page Insérer un Bitmap depuis un fichier dans une page - + Select an Image File Sélectionner un fichier image - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Fichiers image (*.jpg *.jpeg *.png *.bmp);;Tous les fichiers (*) @@ -1736,22 +1736,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Insérer une page à partir d'un modèle - + Select a Template File Sélectionner un fichier modèle - + Template (*.svg) Modèle (*.svg) @@ -1759,12 +1759,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Imprimer toutes les pages @@ -1772,12 +1772,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projeter la forme... @@ -1785,17 +1785,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Insérer un groupe de projection - + Insert multiple linked views of drawable object(s) Insérer plusieurs vues liées d'objets dessinables @@ -1829,12 +1829,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Redessiner la page @@ -1855,22 +1855,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insérer une vue en coupe simple ou complexe - + Section View Vue en coupe - + Complex Section Coupe complexe @@ -1878,12 +1878,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Insérer une vue en coupe @@ -1891,12 +1891,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Afficher/masquer les arrêtes invisibles @@ -1904,17 +1904,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Insérer une vue de l'atelier Spreadsheet - + Insert View to a spreadsheet Insérer une vue dans une feuille de calcul @@ -2007,17 +2007,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Créer un symbole de finition de surface - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Sélectionnez une vue - Cliquez sur ce bouton @@ -2027,17 +2027,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Insérer symbole SVG - + Insert symbol from an SVG file Insérer un symbole à partir d’un fichier SVG @@ -2045,13 +2045,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Activer ou désactiver les cadres de vues @@ -2085,17 +2085,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Insérer une vue - + Insert a View Insérer une vue @@ -2103,12 +2103,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Ajouter les informations de soudage à la ligne de référence @@ -2117,58 +2117,58 @@ Command - + Drawing create page Créer une page de dessin - + Create view Créer une vue - + Create Projection Group Créer un groupe de projections - + Create Clip Créer une Coupe - + ClipGroupAdd Ajout groupe de rognage - + ClipGroupRemove Supprimer le groupe - + Create Symbol Créer un Symbole - + Create DraftView Créer une vue de l'atelier Draft - + Create ArchView Créer une vue de l'atelier Arch - + Create spreadsheet view Créer une vue de feuille de calcul - - + + Save page to dxf Enregistrer la page en dxf @@ -2189,17 +2189,17 @@ - + Create Dimension Créer une cote - + Create Hatch Créer une zone hachurée - + Update Hatch Mettre à jour les hachures @@ -2209,12 +2209,12 @@ Enlever les anciennes hachures - + Create GeomHatch Créer des hachures géométriques - + Create Image Créer image @@ -2224,7 +2224,7 @@ Faire glisser une infobulle - + Drag Dimension Faire glisser la cote @@ -2234,7 +2234,7 @@ Créer une infobulle - + Create ActiveView Créer une vue active @@ -2244,12 +2244,12 @@ Créer une trait d'axe - + Create Cosmetic Line Créer une ligne cosmétique - + Update CosmeticLine Mettre à jour CosmeticLine @@ -2259,32 +2259,32 @@ Créer une vue détaillée - + Update Detail Mettre à jour le détail - + Create Leader Créer la ligne de référence - + Edit Leader Modifier la ligne de référence - + Create Anno Créer une annotation - + Edit Anno Editer une annotation - + Create SectionView Créer une vue de coupe @@ -2294,23 +2294,23 @@ Créer une vue en coupe complexe - - + + Edit SectionView Éditer la vue en coupe - + Create WeldSymbol Créer le symbole de soudage - + Edit WeldSymbol Modifier le symbole de soudage - + Add Cosmetic Vertex Ajouter un sommet cosmétique @@ -2841,68 +2841,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Sélection invalide - - + + No Shapes, Groups or Links in this selection Aucune forme, groupe ou lien dans cette sélection - - + + Select at least 1 DrawViewPart object as Base. Sélectionnez au moins 1 objet DrawViewPart comme base. - + I do not know what base view to use. Je ne sais pas quelle vue de base utiliser. - + No Base View, Shapes, Groups or Links in this selection Pas de vue de base, de formes, de groupes ou de liens dans cette sélection - + No profile object found in selection Aucun objet de profil trouvé dans la sélection - - - + + + @@ -2911,36 +2911,36 @@ - - - - - - + + + + + + Incorrect selection Sélection non valide - - + + Select an object first Sélectionnez d’abord un objet - - + + Too many objects selected Trop d'éléments sélectionnés - - + + Create a page first. Créer d'abord une page. - + @@ -2953,88 +2953,88 @@ Aucune vue d'une pièce dans la sélection. - + Select one Clip group and one View. Sélectionnez un groupe de rognage et une vue. - + Select exactly one View to add to group. Sélectionnez exactement une vue à ajouter au groupe. - + Select exactly one Clip group. Sélectionner seulement un groupe de rognage . - + Clip and View must be from same Page. La fenêtre de rognage et la vue doivent être sur la même page. - + Select exactly one View to remove from Group. Sélectionnez exactement une vue à supprimer du groupe. - + View does not belong to a Clip La vue n'appartient pas à une fenêtre de rognage - + Choose an SVG file to open Choisir un fichier SVG à ouvrir - + Scalable Vector Graphic Graphique Vectoriel Adaptable (Svg) - + All Files Tous les fichiers - + Select at least one object. Sélectionner au moins un objet. - + Please select only 1 Arch Section. Veuillez ne sélectionner qu'une seule section Architecture. - + No Arch Sections in selection. Pas de section Architecture dans la sélection. - + Select exactly one Spreadsheet object. Sélectionner un seul objet Spreadsheet. - + No Drawing View Aucune vue de dessin - + Open Drawing View before attempting export to SVG. Ouvrir la vue de dessin avant d’essayer d’exporter vers SVG. - + Can not export selection Impossible d'exporter la sélection - + Page contains DrawViewArch which will not be exported. Continue? La page contient DrawViewArch qui ne sera pas exporté. Continuer ? @@ -3080,9 +3080,9 @@ - - + + @@ -3213,24 +3213,24 @@ Sélectionnez des objets à 2 points et 1 vue. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3262,24 +3262,24 @@ Tâche en cours - - - + + + - - - - - - - - - + + + + + + + + + @@ -3313,27 +3313,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Sélection incorrecte @@ -3344,9 +3344,9 @@ - - - + + + You must select a base View for the line. Vous devez sélectionner une vue de base pour la ligne. @@ -3357,112 +3357,112 @@ Aucun objet DrawViewPart dans cette sélection - - + + No base View in Selection. Aucune Vue de base dans la sélection. - + You must select Faces or an existing CenterLine. Vous devez sélectionner des faces ou une ligne centrale existante. - + No CenterLine in selection. Pas de ligne centrale dans la sélection. - - - + + + Selection is not a CenterLine. La sélection n'est pas une ligne centrale. - + Selection not understood. Sélection non comprise. - + You must select 2 Vertexes or an existing CenterLine. Vous devez sélectionner 2 sommets ou une ligne centrale existante. - + Need 2 Vertices or 1 CenterLine. Exige 2 sommets ou 1 ligne centrale. - + Selection is empty. La sélection est vide. - + Not enough points in selection. Pas assez de points dans la sélection. - + Selection is not a Cosmetic Line. La sélection n'est pas une ligne cosmétique. - + You must select 2 Vertexes. Vous devez sélectionner 2 sommets. - - + + Nothing selected Aucune sélection - + At least 1 object in selection is not a part view Au moins 1 objet dans la sélection n'est pas une vue de pièce - + Unknown object type in selection Type d'objet inconnu dans la sélection - + No View in Selection. Aucune vue dans la sélection. - + You must select a View and/or lines. Vous devez sélectionner une vue et/ou des lignes. - + No Part Views in this selection Pas de vue dans la sélection - + Select exactly one Leader line or one Weld symbol. Sélectionnez exactement une ligne de repère ou un symbole de soudure. - - + + SurfaceFinishSymbols Symboles d'état de surface - + No Part View in Selection Pas de vue de la pièce dans la sélection - + No %1 in Selection %1 n'est pas dans la sélection @@ -3477,33 +3477,33 @@ Certaines faces dans la sélection sont déjà hachurées. Remplacer ? - + No TechDraw Page Aucune Page TechDraw - + Need a TechDraw Page for this command Une Page TechDraw est requise pour cette commande - + Select a Face first Sélectionnez d'abord une face - + No TechDraw object in selection Aucun objet TechDraw dans la sélection - + Create a page to insert. Créer une page à insérer. - + No Faces to hatch in this selection Pas de faces à hachurer dans la sélection @@ -3524,33 +3524,33 @@ Aucune page de dessin dans le document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Tous les fichiers (*.*) - + Export Page As PDF Exporter la page au format PDF - + Document Name: Nom du document: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exporter la page au format SVG @@ -3599,7 +3599,7 @@ Éditeur de texte enrichi - + New Cosmetic Vertex Nouveau sommet cosmétique @@ -3676,8 +3676,8 @@ Direction de la vue dans les coordonnées de la vue de base - - + + Operation Failed L'opération a échoué @@ -3692,12 +3692,12 @@ Modifier un symbole de soudure - + Create Cosmetic Line Créer une ligne cosmétique - + Edit Cosmetic Line Modifier la ligne cosmétique @@ -3832,7 +3832,7 @@ Aucun sous-élément sélectionné - + @@ -3840,7 +3840,7 @@ La sélection est vide - + No object selected @@ -3877,7 +3877,7 @@ Veuillez sélectionner deux lignes droites - + Select 2 Vertexes or 1 Edge Sélectionnez 2 sommets ou 1 arête @@ -5707,49 +5707,59 @@ Fast, but result is a collection of short straight lines. Imprimer toutes les pages - + Different orientation Orientation différente - + The printer uses a different orientation than the drawing. Do you want to continue? L'imprimante utilise une autre orientation que le dessin. Voulez-vous continuer ? - + Different paper size Format de papier différent - + The printer uses a different paper size than the drawing. Do you want to continue? L'imprimante utilise un format de papier différent que le dessin. Voulez-vous continuer ? - + Opening file failed L'ouverture du fichier a échoué - + Can not open file %1 for writing. Impossible d’ouvrir le fichier %1 en écriture. - + Save DXF file Enregistrer le fichier Dxf - + DXF (*.dxf) Dxf (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Sélectionné: @@ -6234,7 +6244,12 @@ Do you want to continue? Aucune direction définie - + + ComplexSection + Coupe complexe + + + Can not continue. Object * %1 or %2 not found. Impossible de continuer. Objet * %1 ou %2 non trouvé. @@ -6253,7 +6268,7 @@ Do you want to continue? - + Point Picker Sélectionneur de points @@ -6278,28 +6293,28 @@ Do you want to continue? Y - - + + Pick Points Choisir des points - + Pick a point for cosmetic vertex Choisissez un point pour le sommet cosmétique - + Escape picking Annuler la sélection - + Left click to set a point Clic gauche pour définir un point - + In progress edit abandoned. Start over. Modification en cours abandonnée. Recommencer. @@ -7207,7 +7222,7 @@ Vous pouvez sélectionner d'autres points pour obtenir des segments de ligne. - + Pick Points Choisir des points @@ -7288,51 +7303,51 @@ Vous pouvez sélectionner d'autres points pour obtenir des segments de ligne. - - - + + + Edit points Modifier les points - + Edit Points Modifier les points - - + + Pick a starting point for leader line Choisir un point de départ pour la ligne de rappel - + Save Points Enregistrer les points - + Click and drag markers to adjust leader line Cliquer et glisser les marqueurs pour ajuster la ligne de rappel - - + + Save changes Enregistrer les modifications - + Left click to set a point Clic gauche pour définir un point - + Press OK or Cancel to continue Appuyez sur OK ou sur Annuler pour continuer - + In progress edit abandoned. Start over. Modification en cours abandonnée. Recommencer. @@ -7862,6 +7877,11 @@ en utilisant l'espacement X/Y donné Input the annotation text directly or start the rich text editor Saisissez directement le texte d'annotation ou démarrez l'éditeur de texte enrichi + + + RichTextAnnotation + Annotation de texte enrichi + TechDrawGui::TaskSectionView @@ -8002,7 +8022,7 @@ Peut être lent pour les modèles complexes. Rien à appliquer. Aucune direction de section n'a encore été choisie - + Can not continue. Object * %1 or %2 not found. Impossible de continuer. Objet * %1 ou %2 non trouvé. @@ -8291,6 +8311,11 @@ Peut être lent pour les modèles complexes. other autre + + + SectionView + Vue en coupe + TechDrawGui::dlgTemplateField @@ -8318,7 +8343,7 @@ Peut être lent pour les modèles complexes. TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Ajoute une ligne centrale entre 2 lignes @@ -8326,7 +8351,7 @@ Peut être lent pour les modèles complexes. TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Ajoute une ligne centrale entre 2 points @@ -8334,7 +8359,7 @@ Peut être lent pour les modèles complexes. TechDraw_ComplexSection - + Insert complex Section View Insérer une vue en coupe complexe @@ -8365,7 +8390,7 @@ Peut être lent pour les modèles complexes. TechDraw_FaceCenterLine - + Adds a Centerline to Faces Ajoute une Ligne Centrale aux faces @@ -8397,7 +8422,7 @@ Peut être lent pour les modèles complexes. TechDraw_SectionView - + Insert simple Section View Insérer une vue en coupe simple @@ -8860,7 +8885,7 @@ Peut être lent pour les modèles complexes. Front - Devant + Face @@ -8923,4 +8948,156 @@ il y a une tâche en cours. Impossible de supprimer + + DrawPage + + + Page + Feuille + + + + DrawSVGTemplate + + + Template + Modèle + + + + DrawView + + + View + Vue + + + + DrawViewPart + + + View + Vue + + + + DrawViewSection + + + Section + Section + + + + DrawComplexSection + + + Section + Section + + + + DrawViewDetail + + + Detail + Détail + + + + DrawActiveView + + + ActiveView + Vue active + + + + DrawViewAnnotation + + + Annotation + Annotation + + + + DrawViewImage + + + Image + Image + + + + DrawViewSymbol + + + Symbol + Symbole + + + + DrawViewArch + + + Arch + Arch + + + + DrawViewDraft + + + Draft + Tirant d'eau + + + + DrawLeaderLine + + + LeaderLine + Ligne de référence + + + + DrawViewBalloon + + + Balloon + Infobulle + + + + DrawViewDimension + + + Dimension + Dimension + + + + DrawViewDimExtent + + + Extent + Dépassement + + + + DrawHatch + + + Hatch + Hachure + + + + DrawGeomHatch + + + GeomHatch + Hachure de géométrie + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts index 8d6434c93c..21b8e3a934 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Engade unha liña central entre 2 liñas @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Engade a liña central entre 2 puntos @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Engade unha liña central entre 2 liñas @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Engade a liña central entre 2 puntos @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Add Cosmetic Line Through 2 Points @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Insert Active View (3D View) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Insert Arch Workbench Object - + Insert a View of a Section Plane from Arch Workbench Insert a View of a Section Plane from Arch Workbench @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Insert Balloon Annotation @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Insert Center Line - + Add Centerline to Faces Add Centerline to Faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Insert Clip Group @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Add View to Clip Group @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Remove View from Clip Group @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Remove Cosmetic Object @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Change Appearance of Lines - + Change Appearance of selected Lines Change Appearance of selected Lines @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Inserir vista de detalle @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Insert Draft Workbench Object - + Insert a View of a Draft Workbench object Insire unha vista do obxecto de banco de traballo Borrador @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Ficheiro - + Export Page as DXF Exportar páxinas coma DXF - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Ficheiro - + Export Page as SVG Exporta páxina como SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Add Centerline to Faces @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Insert Bitmap Image - - + + Insert Bitmap from a file into a page Insert Bitmap from a file into a page - + Select an Image File Escolla un Arquivo de imaxe - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Insert Page using Template - + Select a Template File Select a Template File - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Proxectar forma... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Insert Projection Group - + Insert multiple linked views of drawable object(s) Insert multiple linked views of drawable object(s) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Redraw Page @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Vista de selección - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Insert Section View @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Show/Hide Invisible Edges @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Insert Spreadsheet View - + Insert View to a spreadsheet Insert View to a spreadsheet @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Insire Símbolo SVG - + Insert symbol from an SVG file Insert symbol from an SVG file @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Activa ou desactiva a Vista de Estruturas @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Insert View - + Insert a View Insert a View @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Add Welding Information to Leaderline @@ -1964,58 +1964,58 @@ Command - + Drawing create page Drawing create page - + Create view Create view - + Create Projection Group Create Projection Group - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Create Symbol - + Create DraftView Create DraftView - + Create ArchView Create ArchView - + Create spreadsheet view Create spreadsheet view - - + + Save page to dxf Save page to dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Create Dimension - + Create Hatch Create Hatch - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Create Image @@ -2071,7 +2071,7 @@ Drag Balloon - + Drag Dimension Drag Dimension @@ -2081,7 +2081,7 @@ Create Balloon - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Create CenterLine - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine Update CosmeticLine @@ -2106,32 +2106,32 @@ Create Detail View - + Update Detail Update Detail - + Create Leader Create Leader - + Edit Leader Edit Leader - + Create Anno Create Anno - + Edit Anno Edit Anno - + Create SectionView Create SectionView @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Create WeldSymbol - + Edit WeldSymbol Edit WeldSymbol - + Add Cosmetic Vertex Add Cosmetic Vertex @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Escolma errada - - + + No Shapes, Groups or Links in this selection No Shapes, Groups or Links in this selection - - + + Select at least 1 DrawViewPart object as Base. Escolme ao menos 1 obxecto DrawViewPart como base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Selección incorrecta - - + + Select an object first Primeiro escolme un obxecto - - + + Too many objects selected Demasiados obxectos escolmados - - + + Create a page first. Primeiro, cree unha páxina. - + @@ -2800,87 +2800,87 @@ Sen vista da peza en selección. - + Select one Clip group and one View. Escolmar un grupo de Recorte e unha Vista. - + Select exactly one View to add to group. Escolma exactamente unha vista a engadir ao grupo. - + Select exactly one Clip group. Escolma exactamente un obxecto Clip. - + Clip and View must be from same Page. Clip e Vista debe ser dende algunha Páxina. - + Select exactly one View to remove from Group. Escolma exactamente unha vista a remover dende o grupo. - + View does not belong to a Clip Na vista non aparece unha Clip - + Choose an SVG file to open Escolme un ficheiro SVG para abrir - + Scalable Vector Graphic Gráfico vectorial escalábel - + All Files Tódolos ficheiros - + Select at least one object. Escolma canda menos un obxecto. - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. Escolme só un obxecto Folla de cálculo. - + No Drawing View Sen Vista do Debuxo - + Open Drawing View before attempting export to SVG. Abre Vista de Debuxo antes de tentar exportar a SVG. - + Can not export selection Can not export selection - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Select 2 point objects and 1 View. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Tarefa en Progreso - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Wrong Selection @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Debes escolmar unha Vista base para a liña. @@ -3203,112 +3203,112 @@ Sen obxectos DrawViewPart na escolma - - + + No base View in Selection. Sen Vista base na Selección. - + You must select Faces or an existing CenterLine. You must select Faces or an existing CenterLine. - + No CenterLine in selection. No CenterLine in selection. - - - + + + Selection is not a CenterLine. Selection is not a CenterLine. - + Selection not understood. Selection not understood. - + You must select 2 Vertexes or an existing CenterLine. You must select 2 Vertexes or an existing CenterLine. - + Need 2 Vertices or 1 CenterLine. Need 2 Vertices or 1 CenterLine. - + Selection is empty. Selection is empty. - + Not enough points in selection. Not enough points in selection. - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. You must select 2 Vertexes. - - + + Nothing selected Nada escolmado - + At least 1 object in selection is not a part view Ao menos 1 obxecto da escolma non é unha vista parcial - + Unknown object type in selection Tipo de obxecto descoñecido na escolma - + No View in Selection. No View in Selection. - + You must select a View and/or lines. You must select a View and/or lines. - + No Part Views in this selection No Part Views in this selection - + Select exactly one Leader line or one Weld symbol. Select exactly one Leader line or one Weld symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Some Faces in selection are already hatched. Replace? - + No TechDraw Page Ningunha páxina TechDraw - + Need a TechDraw Page for this command Necesita Páxina TechDraw para este comando - + Select a Face first Escolma primeiro unha Cara - + No TechDraw object in selection Sen obxecto TechDraw en selección - + Create a page to insert. Crea unha páxina a insire. - + No Faces to hatch in this selection Sen Faces a raiar na selección @@ -3370,33 +3370,33 @@ No Drawing Pages in document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Tódolos ficheiros (*.*) - + Export Page As PDF Exporta Páxina Como PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exporta páxina como SVG @@ -3445,7 +3445,7 @@ Editor de texto enriquecido - + New Cosmetic Vertex Novo Vértice Cosmético @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3538,12 +3538,12 @@ Edit Welding Symbol - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,51 +5559,61 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Orientación diferente - + The printer uses a different orientation than the drawing. Do you want to continue? A impresora usa unha orientación de papel diferente da do debuxo. Quere seguir? - + Different paper size Tamaño de papel diferente - + The printer uses a different paper size than the drawing. Do you want to continue? A impresora usa un tamaño de papel diferente do do debuxo. Quere seguir? - + Opening file failed Falla ó abrir o ficheiro - + Can not open file %1 for writing. Non se pode abrir o ficheiro %1 para escribir. - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Escolmado: @@ -6088,7 +6098,12 @@ Quere seguir? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6107,7 +6122,7 @@ Quere seguir? - + Point Picker Recolledor de Puntos @@ -6132,28 +6147,28 @@ Quere seguir? Y - - + + Pick Points Recoller Puntos - + Pick a point for cosmetic vertex Recoller un punto para vértice cosmético - + Escape picking Escape picking - + Left click to set a point Preme botón esquerdo para definir un punto - + In progress edit abandoned. Start over. En proceso edición abandonada. Inicia de novo. @@ -7061,7 +7076,7 @@ You can pick further points to get line segments. - + Pick Points Recoller Puntos @@ -7142,51 +7157,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Escolma un punto de inicio para a liña líder - + Save Points Save Points - + Click and drag markers to adjust leader line Pincha e arrastra as marcas de axuste da liña líder - - + + Save changes Gardar cambios - + Left click to set a point Preme botón esquerdo para definir un punto - + Press OK or Cancel to continue Premer OK ou Cancelar para continuar - + In progress edit abandoned. Start over. En proceso edición abandonada. Inicia de novo. @@ -7716,6 +7731,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7855,7 +7875,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8144,6 +8164,11 @@ using the given X/Y Spacing other outros + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8171,7 +8196,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adds a Centerline between 2 Lines @@ -8179,7 +8204,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adds a Centerline between 2 Points @@ -8187,7 +8212,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8216,7 +8241,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8248,7 +8273,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8775,4 +8800,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Páxina + + + + DrawSVGTemplate + + + Template + Modelo + + + + DrawView + + + View + Vista + + + + DrawViewPart + + + View + Vista + + + + DrawViewSection + + + Section + Sección + + + + DrawComplexSection + + + Section + Sección + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Apuntamento + + + + DrawViewImage + + + Image + Imaxe + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Arquitectura + + + + DrawViewDraft + + + Draft + Calado + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balón + + + + DrawViewDimension + + + Dimension + Acoutamento + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Hatch + + + + DrawGeomHatch + + + GeomHatch + TramaXeométrica + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts index 1ab60cfe1b..a6517160ba 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Dodajte središnju liniju između dvije linije @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Dodajte središnju liniju između dvije točke @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw Tehničko Crtanje - + Add Centerline between 2 Lines Dodajte središnju liniju između dvije linije @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw Tehničko Crtanje - + Add Centerline between 2 Points Dodajte središnju liniju između dvije točke @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw Tehničko Crtanje - + Add Cosmetic Line Through 2 Points Dodaj dekoracijsku liniju kroz 2 točke @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw Tehničko Crtanje - + Insert Active View (3D View) Umetnite aktivni (3D) pogled @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw Tehničko Crtanje - + Insert Arch Workbench Object Umetni objekt Radnog stola Luk - + Insert a View of a Section Plane from Arch Workbench Umetni Pogled na Presjek ravni Radnog stola Arhitekt @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw Tehničko Crtanje - + Insert Balloon Annotation Umetni Oblačić napomene @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw Tehničko Crtanje - + Insert Center Line Umetnite središnju liniju - + Add Centerline to Faces Dodaj simetralu na lice(a) @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw Tehničko Crtanje - + Insert Clip Group Umetni grupu Isječak @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw Tehničko Crtanje - + Add View to Clip Group Dodaj pogled u grupi Isječak @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw Tehničko Crtanje - + Remove View from Clip Group Obriši pogled iz grupe Isječak @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw Tehničko Crtanje - + Insert Complex Section Umetni prikaz složenog presjeka - + Insert a Complex Section Umeće prikaz složenog presjeka @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw Tehničko Crtanje - + Remove Cosmetic Object Ukloni pomoćni objekt @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw Tehničko Crtanje - + Change Appearance of Lines Promijenite izgled linija - + Change Appearance of selected Lines Promjena izgleda odabranih linija @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw Tehničko Crtanje - + Insert Detail View Umetanje detaljnog pogleda @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw Tehničko Crtanje - + Insert Draft Workbench Object Umetni objekt Radnog stola Nacrt - + Insert a View of a Draft Workbench object Umetni pogled na objekt Radnog stola Nacrt @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Datoteka - + Export Page as DXF Izvezi stranicu kao DXF - + Save DXF file Spremi DXF Datoteku - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Datoteka - + Export Page as SVG Izvezi stranicu kao SVG @@ -1427,12 +1427,12 @@ CmdTechDrawFaceCenterLine - + TechDraw Tehničko Crtanje - + Add Centerline to Faces Dodaj simetralu na lice(a) @@ -1492,28 +1492,28 @@ CmdTechDrawImage - + TechDraw Tehničko Crtanje - + Insert Bitmap Image Umetni Bitmap sliku - - + + Insert Bitmap from a file into a page Umeće bitmapu iz datoteke u stranicu - + Select an Image File Odaberite slikovnu datoteku - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Slikovne datoteke (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1599,22 +1599,22 @@ CmdTechDrawPageTemplate - + TechDraw Tehničko Crtanje - + Insert Page using Template Umetni novu stranicu pomoću predloška - + Select a Template File Odaberite datoteku predloška - + Template (*.svg) Predložak (*.svg) @@ -1622,12 +1622,12 @@ CmdTechDrawPrintAll - + TechDraw Tehničko Crtanje - + Print All Pages Ispis svih stranica @@ -1635,12 +1635,12 @@ CmdTechDrawProjectShape - + TechDraw Tehničko Crtanje - + Project shape... Projecirani oblik ... @@ -1648,17 +1648,17 @@ CmdTechDrawProjectionGroup - + TechDraw Tehničko Crtanje - + Insert Projection Group Umetanje Projekcijske Grupe - + Insert multiple linked views of drawable object(s) Umetanje više povezanih prikaza od crtajućih objekata @@ -1692,12 +1692,12 @@ CmdTechDrawRedrawPage - + TechDraw Tehničko Crtanje - + Redraw Page Ponovno iscrtavanje stranice @@ -1718,22 +1718,22 @@ CmdTechDrawSectionGroup - + TechDraw Tehničko Crtanje - + Insert a simple or complex Section View Umetni jednostavan ili složen prikaz presjeka - + Section View Pogled Odjeljka - + Complex Section Složeni odjeljak presjeka @@ -1741,12 +1741,12 @@ CmdTechDrawSectionView - + TechDraw Tehničko Crtanje - + Insert Section View Umetni pogled presjeka @@ -1754,12 +1754,12 @@ CmdTechDrawShowAll - + TechDraw Tehničko Crtanje - + Show/Hide Invisible Edges Prikaži / sakrij nevidljive rubove @@ -1767,17 +1767,17 @@ CmdTechDrawSpreadsheetView - + TechDraw Tehničko Crtanje - + Insert Spreadsheet View Umetanje tablice pregleda - + Insert View to a spreadsheet Umetni Pogled u proračunsku tablicu @@ -1870,17 +1870,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw Tehničko Crtanje - + Create a Surface Finish Symbol Napravi simbol površinske završne obrade - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Odaberite prikaz<br> - kliknite ovaj gumb<br> - odaberite atribute simbola površinske završne obrade u otvorenom panelu @@ -1888,17 +1888,17 @@ CmdTechDrawSymbol - + TechDraw Tehničko Crtanje - + Insert SVG Symbol Umetanje SVG simbola - + Insert symbol from an SVG file Umetnite simbol iz SVG datoteke @@ -1908,13 +1908,13 @@ CmdTechDrawToggleFrame - + TechDraw Tehničko Crtanje - - + + Turn View Frames On/Off Prebacuj Okvire Pogled Uključeno/Isključeno @@ -1948,17 +1948,17 @@ CmdTechDrawView - + TechDraw Tehničko Crtanje - + Insert View Umetni pogled - + Insert a View Umeće pogled @@ -1966,12 +1966,12 @@ CmdTechDrawWeldSymbol - + TechDraw Tehničko Crtanje - + Add Welding Information to Leaderline Dodaj informaciju spajanja na liniju oznake @@ -1980,58 +1980,58 @@ Command - + Drawing create page Stranica izrade crteža - + Create view Stvaranje prikaza - + Create Projection Group Stvaranje Projekcijske Grupe - + Create Clip Stvaranje isječka - + ClipGroupAdd IsječakGrupaDodaj - + ClipGroupRemove IsječakGrupaObriši - + Create Symbol Stvori simbol - + Create DraftView Stvori Pogled u Nacrtu - + Create ArchView Stvori Pogled u Arhitektura - + Create spreadsheet view Stvori pogled pregleda - - + + Save page to dxf Spremi stranicu u dxf formatu @@ -2052,17 +2052,17 @@ - + Create Dimension Stvori Dimenziju - + Create Hatch Ispuni uzorkom - + Update Hatch Ažuriraj Ispunu uzorkom @@ -2072,12 +2072,12 @@ Ukloni staru ispunu uzorka - + Create GeomHatch Stvori geometrijsku ispunu uzorka - + Create Image izradi sliku @@ -2087,7 +2087,7 @@ Povuci balončić - + Drag Dimension Povuci Dimenziju @@ -2097,7 +2097,7 @@ Stvori Balončić - + Create ActiveView Stvori aktivni Pogled @@ -2107,12 +2107,12 @@ Stvori središnju Liniju - + Create Cosmetic Line Stvori Dekoracijsku liniju - + Update CosmeticLine Ažuriraj Ukrasnu liniju @@ -2122,32 +2122,32 @@ Stvori detaljni Pogled - + Update Detail Ažuriraj detalj - + Create Leader Stvori opisnu liniju - + Edit Leader Uredi opisnu liniju - + Create Anno Stvori Napomenu - + Edit Anno Uredi Napomenu - + Create SectionView Stvori OdjeljakPogled @@ -2157,23 +2157,23 @@ Stvorite složeni presjek - - + + Edit SectionView Uređivanje pogleda presjeka - + Create WeldSymbol Stvori Simbol za Zavarivanje - + Edit WeldSymbol Uredi Simbol za Zavarivanje - + Add Cosmetic Vertex Dodaj pomoćnu tjemenu točku @@ -2708,68 +2708,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Pogrešan odabir - - + + No Shapes, Groups or Links in this selection U ovom odabiru nema oblika, grupa ili poveznica - - + + Select at least 1 DrawViewPart object as Base. Odaberite najmanje 1 DrawViewPart objekt kao bazu. - + I do not know what base view to use. Ne znam koji osnovni pogled da koristim. - + No Base View, Shapes, Groups or Links in this selection U ovom odabiru nema Osnovnog pogleda, Oblika, Grupa ili Poveznica - + No profile object found in selection U ovom odabiru nema Objekta profila - - - + + + @@ -2778,36 +2778,36 @@ - - - - - - + + + + + + Incorrect selection Netočan odabir - - + + Select an object first Najprije odaberite objekt - - + + Too many objects selected Previše objekata odabrano - - + + Create a page first. Najprije napravite stranicu. - + @@ -2820,87 +2820,87 @@ Ne postoji Pogled na Dio u odabiru. - + Select one Clip group and one View. Odaberite 1 grupu Isječak i 1 Pogled. - + Select exactly one View to add to group. Odaberite točno jedan Pogled za dodavanje u grupu. - + Select exactly one Clip group. Odaberite točno jednu isječak grupu. - + Clip and View must be from same Page. Isječak i prikaz moraju biti s iste stranice. - + Select exactly one View to remove from Group. Odaberite točno jedan Pogled za uklanjanje iz grupe. - + View does not belong to a Clip Prikaz ne pripada isječku - + Choose an SVG file to open Odaberite SVG datoteku za otvaranje - + Scalable Vector Graphic Skalabilna vektorska grafika - + All Files Sve datoteke - + Select at least one object. Odaberite barem jedan objekt. - + Please select only 1 Arch Section. Molimo odaberite samo 1 presjek Luka. - + No Arch Sections in selection. Nema presjeka Luka u odabiru. - + Select exactly one Spreadsheet object. Odaberite točno jedan objekt tablice. - + No Drawing View Nema pogleda crteža - + Open Drawing View before attempting export to SVG. Otvori prikaz prije izvoza u SVG. - + Can not export selection Odabir se ne može izvesti - + Page contains DrawViewArch which will not be exported. Continue? Stranica sadrži DrawViewArch koji se neće izvoziti. Nastaviti? @@ -2947,9 +2947,9 @@ - - + + @@ -3080,24 +3080,24 @@ Odaberite 2 objekta Točke i 1 Pogled.(2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3129,24 +3129,24 @@ Rješavanje u postupku - - - + + + - - - - - - - - - + + + + + + + + + @@ -3180,27 +3180,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Pogrešan odabir @@ -3211,9 +3211,9 @@ - - - + + + You must select a base View for the line. Morate odabrati osnovni prikaz za redak. @@ -3224,113 +3224,113 @@ Nema DrawViewPart objekata u ovom odabiru - - + + No base View in Selection. Nema osnovnog pogleda u odabiru. - + You must select Faces or an existing CenterLine. Morate odabrati Lica ili postojeću Srednju liniju. - + No CenterLine in selection. Nema Srednje linije u odabiru. - - - + + + Selection is not a CenterLine. Odabir nije Srednja linija. - + Selection not understood. Odabir nije razumljiv. - + You must select 2 Vertexes or an existing CenterLine. Morate odabrati 2 tjemene točke ili postojeću Srednju liniju. - + Need 2 Vertices or 1 CenterLine. Potrebna su 2 Vrha ili 1 Srednja linija - + Selection is empty. Odabir je prazan. - + Not enough points in selection. Nema dovoljno točaka u odabiru. - + Selection is not a Cosmetic Line. Odabir nije Dekoracijska linija - + You must select 2 Vertexes. Morate odabrati 2 tjemene točke. - - + + Nothing selected Ništa nije odabrano - + At least 1 object in selection is not a part view Najmanje 1 predmet u odabiru nije Prikaz dijelova - + Unknown object type in selection Nepoznata vrsta objekta u izboru - + No View in Selection. Nema pogleda u odabiru. - + You must select a View and/or lines. Morate odabrati jedan Pogled i / ili linije. - + No Part Views in this selection Nema Pogleda djelova u ovom odabiru - + Select exactly one Leader line or one Weld symbol. Odaberite samo jednu liniju oznake ili simbol spajanja. - - + + SurfaceFinishSymbols Simboli za završnu obradu površine - + No Part View in Selection Nema pogleda na Dio u doabiru - + No %1 in Selection Nema %1 u odabiru @@ -3345,33 +3345,33 @@ Neka su lica u odabiru već ispunjena uzorkom. Zamijeniti? - + No TechDraw Page Nema stranice za tehničko crtanje - + Need a TechDraw Page for this command Potreban je stranicu tehničko crtanje za ovu naredbu - + Select a Face first Odaberite prvo naličje - + No TechDraw object in selection Nema objekta tehničkog crtanja u odabiru - + Create a page to insert. Stvaranje stranica za umetanje. - + No Faces to hatch in this selection Nema lica za ispunu uzorkom u ovom odabiru @@ -3392,33 +3392,33 @@ U dokumentu nema Stranica za crtanje. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Sve datoteke (*.*) - + Export Page As PDF Izvoz Stranice u PDF - + Document Name: Naziv dokumenta: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Izvoz Stranice u SVG @@ -3467,7 +3467,7 @@ Rich-Text uređivač - + New Cosmetic Vertex Nova pomoćna tjemena točka @@ -3544,8 +3544,8 @@ Smjer pogleda u koordinatama baznog pogleda - - + + Operation Failed Operacija nije uspjela @@ -3560,12 +3560,12 @@ Uredite simbol spajanja - + Create Cosmetic Line Stvori Dekoracijsku liniju - + Edit Cosmetic Line Uredi Dekoracijsku liniju @@ -3702,7 +3702,7 @@ Nema izabranih podelemenata - + @@ -3710,7 +3710,7 @@ Odabir je prazan - + No object selected @@ -3747,7 +3747,7 @@ Molimo odaberite dvije ravne linije - + Select 2 Vertexes or 1 Edge Odaberi 2 tjemene točke ili 1 rub @@ -5642,49 +5642,59 @@ Brzo, ali rezultat je zbirka kratkih ravnih linija. Ispis svih stranica - + Different orientation Drugačija orijentacija - + The printer uses a different orientation than the drawing. Do you want to continue? Pisač koristi drugu orijentaciju ispisa nego što je u crtežu. Želite li nastaviti? - + Different paper size Drugačija veličina papira - + The printer uses a different paper size than the drawing. Do you want to continue? Pisač koristi drugu veličinu papra nego što je u crtežu. Želite li nastaviti? - + Opening file failed Otvaranje dokumenta nije uspjelo - + Can not open file %1 for writing. Ne mogu otvoriti dokument %1 za ispis. - + Save DXF file Spremi DXF Datoteku - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Odabrane: @@ -6173,7 +6183,12 @@ Do you want to continue? Nije postavljen smjer - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Ne može se nastaviti. Objekt * %1 ili %2 nije pronađen. @@ -6192,7 +6207,7 @@ Do you want to continue? - + Point Picker Odabir Točke @@ -6219,28 +6234,28 @@ Do you want to continue? Y - - + + Pick Points Odaberi Točku - + Pick a point for cosmetic vertex Odaberite mjesto za pomoćnu tjemenu točku - + Escape picking Prekini odabir - + Left click to set a point Lijevi klik za postavljanje točke - + In progress edit abandoned. Start over. Uređivanje napušteno. Početi ispočetka. @@ -7151,7 +7166,7 @@ Možete odabrati daljnje točke da biste dobili segmente linija. - + Pick Points Odaberi Točku @@ -7232,51 +7247,51 @@ Možete odabrati daljnje točke da biste dobili segmente linija. - - - + + + Edit points Uredi točke - + Edit Points Uredi točke - - + + Pick a starting point for leader line Odaberite početnu točku za liniju oznake - + Save Points Spremi Točke - + Click and drag markers to adjust leader line Kliknite i povucite markere da biste prilagodili liniju oznake - - + + Save changes Spremi promjene - + Left click to set a point Lijevi klik za postavljanje točke - + Press OK or Cancel to continue Klikni na OK ili Prekini za nastavak - + In progress edit abandoned. Start over. Uređivanje napušteno. Početi ispočetka. @@ -7806,6 +7821,11 @@ koristeći zadani X/Y razmak Input the annotation text directly or start the rich text editor Unesite tekst napomene izravno ili pokrenite uređivač raskošnog teksta + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7948,7 +7968,7 @@ koristeći zadani X/Y razmak Ništa se ne primjenjuje. Još nije odabran pravac presjeka - + Can not continue. Object * %1 or %2 not found. Ne može se nastaviti. Objekt * %1 ili %2 nije pronađen. @@ -8237,6 +8257,11 @@ koristeći zadani X/Y razmak other drugo + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8264,7 +8289,7 @@ koristeći zadani X/Y razmak TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Dodajte središnju liniju između dvije linije @@ -8272,7 +8297,7 @@ koristeći zadani X/Y razmak TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Dodajte središnju liniju između dvije točke @@ -8280,7 +8305,7 @@ koristeći zadani X/Y razmak TechDraw_ComplexSection - + Insert complex Section View Umetni složeni prikaz presjeka @@ -8309,7 +8334,7 @@ koristeći zadani X/Y razmak TechDraw_FaceCenterLine - + Adds a Centerline to Faces Dodaj simetralu na lice(a) @@ -8343,7 +8368,7 @@ koristeći zadani X/Y razmak TechDraw_SectionView - + Insert simple Section View Umetni jednostavni prikaz presjeka @@ -8872,4 +8897,156 @@ jer je otvoren dijalog zadataka. Ne može da se izbriše + + DrawPage + + + Page + Stranica + + + + DrawSVGTemplate + + + Template + Predložak + + + + DrawView + + + View + Pregled + + + + DrawViewPart + + + View + Pregled + + + + DrawViewSection + + + Section + Odsječak + + + + DrawComplexSection + + + Section + Odsječak + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Anotacija + + + + DrawViewImage + + + Image + Prikaz + + + + DrawViewSymbol + + + Symbol + Simbol + + + + DrawViewArch + + + Arch + Luk + + + + DrawViewDraft + + + Draft + Skica + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Oblačić sa riječima + + + + DrawViewDimension + + + Dimension + Dimenzija + + + + DrawViewDimExtent + + + Extent + Područje + + + + DrawHatch + + + Hatch + Šrafura + + + + DrawGeomHatch + + + GeomHatch + Geometrijska šrafura + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts index 3eb47c5fe1..acbde01150 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Középvonal hozzáadása 2 egyenes között @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Középvonal hozzáadása 2 pont között @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw MűszakiRajz - + Add Centerline between 2 Lines Középvonal hozzáadása 2 egyenes között @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw MűszakiRajz - + Add Centerline between 2 Points Középvonal hozzáadása 2 pont között @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw MűszakiRajz - + Add Cosmetic Line Through 2 Points Két pont általi segéd vonal beszúrása @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw MűszakiRajz - + Insert Active View (3D View) Aktív nézet beszúrása (3D nézet) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw MűszakiRajz - + Insert Arch Workbench Object Építészeti munkafelületi tárgy beszúrása - + Insert a View of a Section Plane from Arch Workbench Szakaszsík nézetének beszúrása az Építészeti munkafelületből @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw MűszakiRajz - + Insert Balloon Annotation Buborékjegyzet beszúrása @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw MűszakiRajz - + Insert Center Line Középvonal beszúrása - + Add Centerline to Faces Középvonal hozzáadása a felületekhez @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw MűszakiRajz - + Insert Clip Group Kivágás csoport beszúrása @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw MűszakiRajz - + Add View to Clip Group Nézet hozzáadása a kivágás csoporthoz @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw MűszakiRajz - + Remove View from Clip Group Nézet eltávolítása kivágás csoportból @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw MűszakiRajz - + Insert Complex Section Összetett metszetnézet beszúrása - + Insert a Complex Section Egy összetett metszetnézet beszúrása @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw MűszakiRajz - + Remove Cosmetic Object Segéd tárgy eltávolítása @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw MűszakiRajz - + Change Appearance of Lines Egyenesek megjelenésének módosítása - + Change Appearance of selected Lines Kiválasztott egyenesek megjelenésének módosítása @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw MűszakiRajz - + Insert Detail View Részletnézet beszúrása @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw MűszakiRajz - + Insert Draft Workbench Object Tervrajz munkafelületi tárgy beszúrása - + Insert a View of a Draft Workbench object Szúrjon be egy nézetet a tervezet munkafelület tárgyból @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Fájl - + Export Page as DXF Oldal exportálása DXF-ként - + Save DXF file DXF-fájl mentése - + DXF (*.dxf) Dxf (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Fájl - + Export Page as SVG Oldal exportálása SVG-ként @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw MűszakiRajz - + Add Centerline to Faces Középvonal hozzáadása a felületekhez @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw MűszakiRajz - + Insert Bitmap Image Bitkép beillesztése - - + + Insert Bitmap from a file into a page Bitkép beszúrása az oldalra egy fájlból - + Select an Image File Válasszon ki egy kép fájlt - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Kép fájlok (*.jpg *.jpeg *.png *.bmp);;Összes fájl (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw MűszakiRajz - + Insert Page using Template Oldal beszúrása sablonnal - + Select a Template File Sablonfájl kijelölése - + Template (*.svg) Sablon (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw MűszakiRajz - + Print All Pages Összes oldal nyomtatása @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw MűszakiRajz - + Project shape... Terv formák... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw MűszakiRajz - + Insert Projection Group Vetítés csoport beszúrása - + Insert multiple linked views of drawable object(s) Rajzolható objektum(ok) több összekapcsolt nézetének beszúrása @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw MűszakiRajz - + Redraw Page Oldal újrarajzolása @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw MűszakiRajz - + Insert a simple or complex Section View Egyszerű vagy összetett metszetnézet beszúrása - + Section View Szakasz nézet - + Complex Section Összetett metszetnézet @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw MűszakiRajz - + Insert Section View Szakasznézet beszúrása @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw MűszakiRajz - + Show/Hide Invisible Edges Láthatatlan élek megjelenítése/elrejtése @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw MűszakiRajz - + Insert Spreadsheet View Táblázat nézet beszúrása - + Insert View to a spreadsheet Nézet beszúrása táblázatba @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw MűszakiRajz - + Create a Surface Finish Symbol Felületkezelési szimbólum létrehozása - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Válasszon ki egy nézetet<br> - kattintson erre a gombra<br> - válassza ki a felületkezelési szimbólum attribútumait a megnyitott panelen @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw MűszakiRajz - + Insert SVG Symbol SVG szimbólum beszúrása - + Insert symbol from an SVG file Szimbólum beszúrása SVG-fájlból @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw MűszakiRajz - - + + Turn View Frames On/Off Keretek nézetének be-/kikapcsolása @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw MűszakiRajz - + Insert View Nézet beszúrása - + Insert a View Egy nézet beszúrása @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw MűszakiRajz - + Add Welding Information to Leaderline Hegesztési információk hozzáadása a referenciavonalhoz @@ -1964,58 +1964,58 @@ Command - + Drawing create page Rajz létrehozó oldal - + Create view Nézet létrehozása - + Create Projection Group Vetítés csoport létrehozása - + Create Clip Kivágás létrehozása - + ClipGroupAdd Szeletcsoport hozzáadása - + ClipGroupRemove KivágásCsopoortEltávolítás - + Create Symbol Rajzjel létrehozása - + Create DraftView Tervrajz nézet létrehozás - + Create ArchView Építészet nézet létrehozásaa - + Create spreadsheet view Számolótábla nézet létrehozása - - + + Save page to dxf Oldal mentése dxf-be @@ -2036,17 +2036,17 @@ - + Create Dimension Méret létrehozása - + Create Hatch Kitöltés létrehozása - + Update Hatch Kitöltés frissítése @@ -2056,12 +2056,12 @@ Régi kitöltés eltávolítása - + Create GeomHatch Geometriai nyílás létrehozása - + Create Image Kép létrehozás @@ -2071,7 +2071,7 @@ Léggömb ballon húzása - + Drag Dimension Dimenzió húzása @@ -2081,7 +2081,7 @@ Ballon létrehozása - + Create ActiveView Aktív nézet létrehozása @@ -2091,12 +2091,12 @@ Középvonal létrehozása - + Create Cosmetic Line Segédvonal létrehozása - + Update CosmeticLine Segédvonalak aktualizálása @@ -2106,32 +2106,32 @@ Részlet nézet létrehozása - + Update Detail Részletek frissítése - + Create Leader Referenciavonal létrehozása - + Edit Leader Referenciavonal szerkesztése - + Create Anno Jegyzet létrehozása - + Edit Anno Jegyzet szerkesztése - + Create SectionView Szakasznézet létrehozása @@ -2141,23 +2141,23 @@ Összetett szakasz létrehozása - - + + Edit SectionView Szakasznézet szerkesztés - + Create WeldSymbol Hegesztési szimbólum létrehozása - + Edit WeldSymbol Hegesztési szimbólum szerkesztése - + Add Cosmetic Vertex Segéd csúcspont hozzáadása @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Rossz kijelölés - - + + No Shapes, Groups or Links in this selection Nincs alakzat, csoport vagy hivatkozás ebben a kijelölésben - - + + Select at least 1 DrawViewPart object as Base. Jelöljön ki legalább 1 AlkatrészRajzNézet tárgyat a kiinduláshoz. - + I do not know what base view to use. Nem tudom, melyik alapnézetet használjam. - + No Base View, Shapes, Groups or Links in this selection Ebben a kijelölésben nincsenek alapnézetek, alakzatok, csoportok vagy hivatkozások - + No profile object found in selection Nem található profiltárgy a kijelölésben - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Hibás kijelölés - - + + Select an object first Először válasszon ki egy tárgyat - - + + Too many objects selected Túl sok kijelölt objektum - - + + Create a page first. Először hozzon létre egy oldalt. - + @@ -2800,87 +2800,87 @@ Nincs alkatrész nézet ebben a kiválasztásban. - + Select one Clip group and one View. Egy kivágás csoport és egy nézet kiválasztása. - + Select exactly one View to add to group. Válasszon pontosan egy nézetet a csoporthoz adásra. - + Select exactly one Clip group. Jelöljön ki pontosan egy kivágandó tárgyat. - + Clip and View must be from same Page. Nyírás és a nézet azonos oldalon legyen. - + Select exactly one View to remove from Group. Válasszon pontosan egy nézetet a csoportból eltávolításra. - + View does not belong to a Clip Nézet nem tartozik kinyíráshoz - + Choose an SVG file to open SVG fájl kiválasztása megnyitáshoz - + Scalable Vector Graphic Méretezhető vektorgrafika - + All Files Összes fájl - + Select at least one object. Jelöljön ki legalább egy objektumot. - + Please select only 1 Arch Section. Ha be van jelölve, akkor a dimenzióérték mellett az egység jelenik meg. - + No Arch Sections in selection. Nincsenek ívszekciók a kiválasztásban. - + Select exactly one Spreadsheet object. Jelöljön ki pontosan egy számolótábla tárgyat. - + No Drawing View Nincs rajz nézet - + Open Drawing View before attempting export to SVG. Nyissa meg a rajz nézetet az SVG exportálási kísérlet előtt. - + Can not export selection A kijelölés nem exportálható - + Page contains DrawViewArch which will not be exported. Continue? Az oldal rajz nézet ívet tartalmaz, amely nem lesz exportálva. Folytatja? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Jelöljön ki 2 pontos objektumokat és 1 nézetet. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ A feladat folyamatban - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Hibás kijelölés @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Alapértelmezett nézetet kell kiválasztania az egyeneshez. @@ -3203,112 +3203,112 @@ A kijelölt részen nem található DrawViewPart objektum - - + + No base View in Selection. Nincs alapnézet a kijelölésben. - + You must select Faces or an existing CenterLine. Ki kell választania a felületeket vagy egy meglévő Középvonalat. - + No CenterLine in selection. Középvonal nincs a kiválasztásban. - - - + + + Selection is not a CenterLine. A kijelölés nem középvonal. - + Selection not understood. A kiválasztás nem érthető. - + You must select 2 Vertexes or an existing CenterLine. Ki kell jelölnie a 2 csúcspontot vagy egy meglévő Középvonalat. - + Need 2 Vertices or 1 CenterLine. Szüksége van 2 csúcsora vagy 1 Középvonalra. - + Selection is empty. Nincs kiválasztva semmi. - + Not enough points in selection. Nincs elég pont a kiválasztásban. - + Selection is not a Cosmetic Line. A kiválasztás nem segéd vonal. - + You must select 2 Vertexes. Két csúcspontot kell kijelölnie. - - + + Nothing selected Semmi sincs kiválasztva - + At least 1 object in selection is not a part view Legalább 1 objektum a kijelölt részen nem egy résznézet - + Unknown object type in selection Ismeretlen típusú tárgy a kiválasztásban - + No View in Selection. Nincs alapnézet a kijelölésben. - + You must select a View and/or lines. Ki kell jelölnie egy nézetet és/vagy vonalakat. - + No Part Views in this selection Nincs résznézet ebben a kijelölésben - + Select exactly one Leader line or one Weld symbol. Jelöljön ki pontosan egy referenciavonalat vagy egy Hegesztés szimbólumot. - - + + SurfaceFinishSymbols Felületi szimbólumok - + No Part View in Selection Nincs alkatrész nézet a kijelölésben - + No %1 in Selection A %1 nincs a kiválasztásban @@ -3323,33 +3323,33 @@ Néhány felület a kijelölésben már ki van töltve. Lecseréli? - + No TechDraw Page Nincs MűszakiRajz oldal - + Need a TechDraw Page for this command Szükséges egy MűszakiRajz oldal ehhez a parancshoz - + Select a Face first Először jelöljön ki egy felületet - + No TechDraw object in selection Nincs MűszakiRajz tárgy a kiválasztásban - + Create a page to insert. Oldal létrehozása a beillesztéshez. - + No Faces to hatch in this selection Nincs felület a straffozáshoz ebben a kijelölésben @@ -3370,33 +3370,33 @@ A dokumentumban nincsenek rajzok. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Összes fájl (*.*) - + Export Page As PDF Oldal export PDF formában - + Document Name: Dokumentum neve: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Oldal export SVG formában @@ -3445,7 +3445,7 @@ Szöveg szerkesztő - + New Cosmetic Vertex Új segéd csúcspont @@ -3522,8 +3522,8 @@ Az alapnézet koordinátái által meghatározott irány megtekintése - - + + Operation Failed Sikertelen művelet @@ -3538,12 +3538,12 @@ Hegesztési szimbólum szerkesztése - + Create Cosmetic Line Segédvonal létrehozása - + Edit Cosmetic Line Segédvonal szerkesztése @@ -3678,7 +3678,7 @@ Nincsenek részelemek kiválasztva - + @@ -3686,7 +3686,7 @@ A kijelölési terület nem tartalmaz objektumokat - + No object selected @@ -3723,7 +3723,7 @@ Válasszon két egyenest - + Select 2 Vertexes or 1 Edge 2 csúcspont vagy 1 él kiválasztása @@ -5554,50 +5554,60 @@ Gyors, de az eredmény rövid egyenesek gyűjteménye. Összes oldal nyomtatása - + Different orientation Eltérő tájolású - + The printer uses a different orientation than the drawing. Do you want to continue? A nyomtató a rajztól eltérő tájolást használ. Szeretné fojtatni? - + Different paper size Eltérő papírméret - + The printer uses a different paper size than the drawing. Do you want to continue? A nyomtató a rajztól eltérő méretű papír méretet használ. Szeretné folytatni? - + Opening file failed Fájl megnyitása sikertelen - + Can not open file %1 for writing. %1 fájlt nem nyitható meg íráshoz. - + Save DXF file DXF-fájl mentése - + DXF (*.dxf) Dxf (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Kiválasztott: @@ -6082,7 +6092,12 @@ Szeretné folytatni? Irány nincs beállítva - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Nem folytatható. * %1 vagy %2 tárgy nem található. @@ -6101,7 +6116,7 @@ Szeretné folytatni? - + Point Picker Pont kiválasztó @@ -6126,28 +6141,28 @@ Szeretné folytatni? Y - - + + Pick Points Pontok választása - + Pick a point for cosmetic vertex Pontot választása egy segéd csúcshoz - + Escape picking Kiválasztás felfüggesztése - + Left click to set a point Bal klikk pont meghatározásához - + In progress edit abandoned. Start over. Folyamatban lévő szerkesztés megszakítva. Kezdje újra. @@ -7054,7 +7069,7 @@ További pontokat is választhatsz, hogy vonalszakaszokat kapj. - + Pick Points Pontok választása @@ -7135,51 +7150,51 @@ További pontokat is választhatsz, hogy vonalszakaszokat kapj. - - - + + + Edit points Pontok szerkesztése - + Edit Points Pontok szerkesztése - - + + Pick a starting point for leader line Válasszon egy kezdő pontot a referenciavonalnak - + Save Points Pontok mentése - + Click and drag markers to adjust leader line Kattintson és húzzon jelöléseket a referenciavonal beállításához - - + + Save changes Változások elmentése - + Left click to set a point Bal klikk pont meghatározásához - + Press OK or Cancel to continue Nyomj OK-t vagy Mégse a folytatáshoz - + In progress edit abandoned. Start over. Folyamatban lévő szerkesztés megszakítva. Kezdje újra. @@ -7709,6 +7724,11 @@ a megadott X/Y távolság használatával Input the annotation text directly or start the rich text editor A megjegyzés szövegének közvetlen bevitele vagy a széleskörű szövegszerkesztő elindítása + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7848,7 +7868,7 @@ a megadott X/Y távolság használatával Nincs mit alkalmazni. Még nincs a szakaszirány kiválasztva - + Can not continue. Object * %1 or %2 not found. Nem folytatható. * %1 vagy %2 tárgy nem található. @@ -8137,6 +8157,11 @@ a megadott X/Y távolság használatával other egyéb + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8164,7 +8189,7 @@ a megadott X/Y távolság használatával TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Egy középvonal hozzáadása 2 egyenes között @@ -8172,7 +8197,7 @@ a megadott X/Y távolság használatával TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Egy középvonal hozzáadása 2 pont között @@ -8180,7 +8205,7 @@ a megadott X/Y távolság használatával TechDraw_ComplexSection - + Insert complex Section View Összetett szakasz nézet beszúrása @@ -8209,7 +8234,7 @@ a megadott X/Y távolság használatával TechDraw_FaceCenterLine - + Adds a Centerline to Faces Egy középvonal hozzáadása a felületekhez @@ -8241,7 +8266,7 @@ a megadott X/Y távolság használatával TechDraw_SectionView - + Insert simple Section View Egyszerű szakasz nézet beszúrása @@ -8768,4 +8793,156 @@ a feladat párbeszédpanel nyitva van. Nem tudja törölni + + DrawPage + + + Page + Oldal + + + + DrawSVGTemplate + + + Template + Sablon + + + + DrawView + + + View + Nézet + + + + DrawViewPart + + + View + Nézet + + + + DrawViewSection + + + Section + Szakasz + + + + DrawComplexSection + + + Section + Szakasz + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Jegyzet + + + + DrawViewImage + + + Image + Kép + + + + DrawViewSymbol + + + Symbol + Szimbólum + + + + DrawViewArch + + + Arch + Architektúra + + + + DrawViewDraft + + + Draft + Tervrajz + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Ballon + + + + DrawViewDimension + + + Dimension + Dimenzió + + + + DrawViewDimExtent + + + Extent + Hatókör + + + + DrawHatch + + + Hatch + Kitöltés + + + + DrawGeomHatch + + + GeomHatch + GeomKitölt + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts index ee38faa72a..f565ba146e 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Tambah Garis tengah antara 2 Garis @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Tambah Garis tengah antara 2 Titik @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Tambah Garis tengah antara 2 Garis @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Tambah Garis tengah antara 2 Titik @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Tambahkan Garis Kosmetik Melalui 2 Titik @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Masukkan View Aktif (View 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Insert Arch Workbench Object - + Insert a View of a Section Plane from Arch Workbench Insert a View of a Section Plane from Arch Workbench @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Insert Balloon Annotation @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Masukkan Garis Tengah - + Add Centerline to Faces Add Centerline to Faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Masukkan Grup Klip @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Add View to Clip Group @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Hapus View dari Grup Klip @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Hapus Obyek Kosmetik @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Ubah Tampilan Garis - + Change Appearance of selected Lines Change Appearance of selected Lines @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Tambahkan Tampak Detail @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Insert Draft Workbench Object - + Insert a View of a Draft Workbench object Insert a View of a Draft Workbench object @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Mengajukan - + Export Page as DXF Ekspor Halaman sebagai DXF - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Mengajukan - + Export Page as SVG Ekspor Halaman sebagai SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Add Centerline to Faces @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Masukan Gambar Bitmap - - + + Insert Bitmap from a file into a page Masukkan Bitmap dari file ke halaman - + Select an Image File Pilih File Gambar - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Masukkan Halaman menggunakan Templat - + Select a Template File Pilih File Templat - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Bentuk proyek... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Masukkan Grup Proyeksi - + Insert multiple linked views of drawable object(s) Masukkan view-view bertaut banyak dari obyek(-obyek) yang dapat digambar @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Gambar Ulang Halaman @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Masukan Gambar Potongan @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Tampilkan/Sembuyikan Tepi Tak Terlihat @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Insert Spreadsheet View - + Insert View to a spreadsheet Insert View to a spreadsheet @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Masukkan Simbol SVG - + Insert symbol from an SVG file Masukkan simbol dari file SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Hidup/Matikan View Frames @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Insert View - + Insert a View Insert a View @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Add Welding Information to Leaderline @@ -1964,58 +1964,58 @@ Command - + Drawing create page Drawing create page - + Create view Create view - + Create Projection Group Create Projection Group - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Create Symbol - + Create DraftView Create DraftView - + Create ArchView Create ArchView - + Create spreadsheet view Create spreadsheet view - - + + Save page to dxf Save page to dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Create Dimension - + Create Hatch Create Hatch - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Create Image @@ -2071,7 +2071,7 @@ Drag Balloon - + Drag Dimension Drag Dimension @@ -2081,7 +2081,7 @@ Create Balloon - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Create CenterLine - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine Update CosmeticLine @@ -2106,32 +2106,32 @@ Create Detail View - + Update Detail Perbarui perincian - + Create Leader Create Leader - + Edit Leader Edit Leader - + Create Anno Create Anno - + Edit Anno Edit Anno - + Create SectionView Create SectionView @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Create WeldSymbol - + Edit WeldSymbol Edit WeldSymbol - + Add Cosmetic Vertex Tambahkan Vertex Kosmetik @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Pilihan salah - - + + No Shapes, Groups or Links in this selection No Shapes, Groups or Links in this selection - - + + Select at least 1 DrawViewPart object as Base. Select at least 1 DrawViewPart object as Base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Pilihan salah - - + + Select an object first Pilih objek terlebih dahulu - - + + Too many objects selected Terlalu banyak objek yang dipilih - - + + Create a page first. Buat halaman terlebih dahulu. - + @@ -2800,87 +2800,87 @@ No View of a Part in selection. - + Select one Clip group and one View. Select one Clip group and one View. - + Select exactly one View to add to group. Select exactly one View to add to group. - + Select exactly one Clip group. Select exactly one Clip group. - + Clip and View must be from same Page. Klip dan Tampilan harus dari Halaman yang sama. - + Select exactly one View to remove from Group. Select exactly one View to remove from Group. - + View does not belong to a Clip Lihat bukan milik Klip - + Choose an SVG file to open Pilih file SVG untuk membuka - + Scalable Vector Graphic Scalable Vector Graphic - + All Files Semua data - + Select at least one object. Pilih setidaknya satu objek. - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. Pilih salah satu objek Spreadsheet. - + No Drawing View Tidak ada tampilan gambar - + Open Drawing View before attempting export to SVG. Buka Drawing View sebelum mencoba ekspor ke SVG. - + Can not export selection Tidak bisa mengekspor pilihan - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Select 2 point objects and 1 View. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Task In Progress - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Wrong Selection @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. You must select a base View for the line. @@ -3203,112 +3203,112 @@ No DrawViewPart objects in this selection - - + + No base View in Selection. No base View in Selection. - + You must select Faces or an existing CenterLine. You must select Faces or an existing CenterLine. - + No CenterLine in selection. No CenterLine in selection. - - - + + + Selection is not a CenterLine. Selection is not a CenterLine. - + Selection not understood. Selection not understood. - + You must select 2 Vertexes or an existing CenterLine. You must select 2 Vertexes or an existing CenterLine. - + Need 2 Vertices or 1 CenterLine. Need 2 Vertices or 1 CenterLine. - + Selection is empty. Selection is empty. - + Not enough points in selection. Not enough points in selection. - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. You must select 2 Vertexes. - - + + Nothing selected Tak ada yang dipilih - + At least 1 object in selection is not a part view At least 1 object in selection is not a part view - + Unknown object type in selection Unknown object type in selection - + No View in Selection. No View in Selection. - + You must select a View and/or lines. You must select a View and/or lines. - + No Part Views in this selection No Part Views in this selection - + Select exactly one Leader line or one Weld symbol. Select exactly one Leader line or one Weld symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Some Faces in selection are already hatched. Replace? - + No TechDraw Page Tidak ada teknik menggambar - + Need a TechDraw Page for this command Butuh Halaman TechDraw untuk perintah ini - + Select a Face first Pilih Wajah dulu - + No TechDraw object in selection Tidak ada objek TechDraw dalam seleksi - + Create a page to insert. Create a page to insert. - + No Faces to hatch in this selection No Faces to hatch in this selection @@ -3370,33 +3370,33 @@ No Drawing Pages in document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) All Files (*.*) - + Export Page As PDF Halaman Ekspor Sebagai PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Ekspor sebagai SVG @@ -3445,7 +3445,7 @@ Rich text editor - + New Cosmetic Vertex New Cosmetic Vertex @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3538,12 +3538,12 @@ Edit Welding Symbol - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,49 +5559,59 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Orientasi berbeda - + The printer uses a different orientation than the drawing. Do you want to continue? Printer menggunakan orientasi yang berbeda dari pada gambar. Apakah Anda ingin melanjutkan? - + Different paper size Ukuran kertas berbeda - + The printer uses a different paper size than the drawing. Do you want to continue? Printer menggunakan ukuran kertas yang berbeda dari pada gambar. Apakah Anda ingin melanjutkan? - + Opening file failed Membuka file gagal - + Can not open file %1 for writing. Can not open file %1 for writing. - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Terpilih: @@ -6086,7 +6096,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6105,7 +6120,7 @@ Do you want to continue? - + Point Picker Point Picker @@ -6130,28 +6145,28 @@ Do you want to continue? Y - - + + Pick Points Pick Points - + Pick a point for cosmetic vertex Pick a point for cosmetic vertex - + Escape picking Escape picking - + Left click to set a point Left click to set a point - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7059,7 +7074,7 @@ You can pick further points to get line segments. - + Pick Points Pick Points @@ -7140,51 +7155,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Pick a starting point for leader line - + Save Points Save Points - + Click and drag markers to adjust leader line Click and drag markers to adjust leader line - - + + Save changes Save changes - + Left click to set a point Left click to set a point - + Press OK or Cancel to continue Press OK or Cancel to continue - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7714,6 +7729,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7853,7 +7873,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8142,6 +8162,11 @@ using the given X/Y Spacing other other + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8169,7 +8194,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adds a Centerline between 2 Lines @@ -8177,7 +8202,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adds a Centerline between 2 Points @@ -8185,7 +8210,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8214,7 +8239,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8246,7 +8271,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8773,4 +8798,156 @@ there is an open task dialog. Tidak Bisa Menghapus + + DrawPage + + + Page + Halaman + + + + DrawSVGTemplate + + + Template + Template + + + + DrawView + + + View + Tampilan + + + + DrawViewPart + + + View + Tampilan + + + + DrawViewSection + + + Section + Bagian + + + + DrawComplexSection + + + Section + Bagian + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Anotasi + + + + DrawViewImage + + + Image + Gambar + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Lengkungan + + + + DrawViewDraft + + + Draft + Konsep + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balloon + + + + DrawViewDimension + + + Dimension + Dimensi + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Hatch + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts index d00c79c877..6be05e0d45 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Linea centrale a 2 linee @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Linea centrale a 2 punti @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Linea centrale a 2 linee @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Linea centrale a 2 punti @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Linea attraverso 2 punti @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Vista 3D attiva @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Vista di Arch - + Insert a View of a Section Plane from Arch Workbench Inserisce una vista di un piano di sezione dell'ambiente Arch @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Pallinatura @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Inserisci linea centrale - + Add Centerline to Faces Linea a centro faccia @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Gruppo di clip @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Aggiungi una vista al gruppo clip @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Rimuovi la vista dal gruppo clip @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Inserisci una Sezione Complessa - + Insert a Complex Section Inserisci una Sezione Complessa @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Rimuovi oggetto cosmetico @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Aspetto delle linee - + Change Appearance of selected Lines Cambia l'aspetto delle linee selezionate @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Dettaglio @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Vista di Draft - + Insert a View of a Draft Workbench object Inserisce una vista di un oggetto dell'ambiente Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File File - + Export Page as DXF Esporta la pagina in DXF - + Save DXF file Salva file DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File File - + Export Page as SVG Esporta la pagina in SVG @@ -1415,12 +1415,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Linea a centro faccia @@ -1480,28 +1480,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Immagine bitmap - - + + Insert Bitmap from a file into a page Inserisce un'immagine bitmap da un file in una pagina - + Select an Image File Selezionare un file di immagine - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) File immagine (*.jpg *.jpeg *.png *.bmp);;Tutti i file (*) @@ -1587,22 +1587,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Nuovo disegno da modello - + Select a Template File Selezionare un file modello - + Template (*.svg) Modello (*.svg) @@ -1610,12 +1610,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Stampa tutte le pagine @@ -1623,12 +1623,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Proietta le forme... @@ -1636,17 +1636,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Gruppo di proiezioni - + Insert multiple linked views of drawable object(s) Inserisce più viste collegate di oggetti disegnabili @@ -1680,12 +1680,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Ridisegna la pagina @@ -1706,22 +1706,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Inserisci una Vista di Sezione semplice o complessa - + Section View Vista Sezione - + Complex Section Sezione Complessa @@ -1729,12 +1729,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Vista di sezione @@ -1742,12 +1742,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Mostra/nascondi i bordi invisibili @@ -1755,17 +1755,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Vista foglio di calcolo - + Insert View to a spreadsheet Inserisce una vista di un foglio di calcolo @@ -1858,17 +1858,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Crea un simbolo di finitura superficiale - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Seleziona una vista<br> - clicca questo pulsante<br> - seleziona gli attributi del simbolo di finitura superficiale nel pannello aperto @@ -1876,17 +1876,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Simbolo SVG - + Insert symbol from an SVG file Inserisce un simbolo da un file SVG @@ -1894,13 +1894,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Attiva o disattiva la vista cornici @@ -1934,17 +1934,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Vista di un oggetto - + Insert a View Inserisce una vista @@ -1952,12 +1952,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Informazioni di saldatura @@ -1966,58 +1966,58 @@ Command - + Drawing create page Crea pagina disegno - + Create view Creare vista - + Create Projection Group Crea gruppo di proiezione - + Create Clip Crea clip - + ClipGroupAdd Aggiungi clip di gruppo - + ClipGroupRemove Rimuovi clip di gruppo - + Create Symbol Crea simbolo - + Create DraftView Crea vista Draft - + Create ArchView Crea vista Arch - + Create spreadsheet view Crea vista foglio di calcolo - - + + Save page to dxf Salva pagina su dxf @@ -2038,17 +2038,17 @@ - + Create Dimension Crea quota - + Create Hatch Crea tratteggio - + Update Hatch Aggiorna tratteggio @@ -2058,12 +2058,12 @@ Rimuovi il vecchio tratteggio - + Create GeomHatch Crea tratteggio geometrico - + Create Image Crea immagine @@ -2073,7 +2073,7 @@ Trascina pallinatura - + Drag Dimension Trascina quota @@ -2083,7 +2083,7 @@ Crea pallinatura - + Create ActiveView Crea vista attiva @@ -2093,12 +2093,12 @@ Crea linea di mezzeria - + Create Cosmetic Line Crea linea cosmetica - + Update CosmeticLine Aggiorna linea cosmetica @@ -2108,32 +2108,32 @@ Crea vista di dettaglio - + Update Detail Aggiorna dettaglio - + Create Leader Crea freccia - + Edit Leader Modifica freccia - + Create Anno Crea annotazione - + Edit Anno Modifica annotazione - + Create SectionView Crea vista di sezione @@ -2143,23 +2143,23 @@ Crea Sezione Complessa - - + + Edit SectionView Modifica Vista Sezione - + Create WeldSymbol Crea simbolo di saldatura - + Edit WeldSymbol Modifica simbolo di saldatura - + Add Cosmetic Vertex Vertice cosmetico @@ -2690,68 +2690,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Selezione errata - - + + No Shapes, Groups or Links in this selection In questa selezione non c'è nessuna forma, gruppo o link - - + + Select at least 1 DrawViewPart object as Base. Seleziona almeno 1 oggetto DrawViewPart come Base. - + I do not know what base view to use. Non so quale vista di base usare. - + No Base View, Shapes, Groups or Links in this selection Nessuna vista principale, forme, gruppi o collegamenti in questa selezione - + No profile object found in selection Nessun oggetto di profilo trovato nella selezione - - - + + + @@ -2760,36 +2760,36 @@ - - - - - - + + + + + + Incorrect selection Selezione non corretta - - + + Select an object first Prima selezionare un oggetto - - + + Too many objects selected Troppi oggetti selezionati - - + + Create a page first. Prima creare una pagina. - + @@ -2802,87 +2802,87 @@ Nessuna vista di una Parte nella selezione. - + Select one Clip group and one View. Selezionare un gruppo Clip e una Vista. - + Select exactly one View to add to group. Selezionare esattamente una vista da aggiungere al gruppo. - + Select exactly one Clip group. Selezionare esattamente un gruppo di Clip. - + Clip and View must be from same Page. Clip e Vista deve essere dalla stessa pagina. - + Select exactly one View to remove from Group. Selezionare una vista da rimuovere dal gruppo. - + View does not belong to a Clip La Vista non appartiene a una Clip - + Choose an SVG file to open Seleziona un file SVG da aprire - + Scalable Vector Graphic Immagine vettoriale scalabile - + All Files Tutti i file - + Select at least one object. Selezionare almeno un oggetto. - + Please select only 1 Arch Section. Si prega di selezionare solo 1 sezione Arch. - + No Arch Sections in selection. Nessuna sezione Arch nella selezione. - + Select exactly one Spreadsheet object. Selezionare un solo oggetto Foglio di calcolo. - + No Drawing View Nessuna Vista di disegno - + Open Drawing View before attempting export to SVG. Aprire una Vista Disegno prima di tentare l'esportazione in SVG. - + Can not export selection Impossibile esportare la selezione - + Page contains DrawViewArch which will not be exported. Continue? La pagina contiene una DrawViewArch che non verrà esportata. Continuare? @@ -2928,9 +2928,9 @@ - - + + @@ -3061,24 +3061,24 @@ Selezionare 2 oggetti punti e 1 vista. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3110,24 +3110,24 @@ Attività in corso - - - + + + - - - - - - - - - + + + + + + + + + @@ -3161,27 +3161,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Selezione sbagliata @@ -3192,9 +3192,9 @@ - - - + + + You must select a base View for the line. Selezionare una vista base per la linea. @@ -3205,112 +3205,112 @@ Nessun oggetto DrawViewPart in questa selezione - - + + No base View in Selection. Nessuna Vista di base nella selezione. - + You must select Faces or an existing CenterLine. Selezionare le facce o una linea centrale esistente. - + No CenterLine in selection. Nessuna linea centrale nella selezione. - - - + + + Selection is not a CenterLine. La selezione non è una linea centrale. - + Selection not understood. Selezione non compresa. - + You must select 2 Vertexes or an existing CenterLine. Selezionare 2 vertici o una linea centrale esistente. - + Need 2 Vertices or 1 CenterLine. Servono 2 vertici o 1 linea centrale. - + Selection is empty. La selezione è vuota. - + Not enough points in selection. Non ci sono abbastanza punti nella selezione. - + Selection is not a Cosmetic Line. La selezione non è una linea cosmetica. - + You must select 2 Vertexes. È necessario selezionare 2 vertici. - - + + Nothing selected Nessuna selezione - + At least 1 object in selection is not a part view Almeno 1 oggetto nella selezione non è una vista parte - + Unknown object type in selection Tipo di oggetto sconosciuto nella selezione - + No View in Selection. Nessuna vista nella selezione. - + You must select a View and/or lines. Selezionare una vista e/o delle linee. - + No Part Views in this selection Nessuna vista parte in questa selezione - + Select exactly one Leader line or one Weld symbol. Seleziona solo una linea guida o un simbolo di saldatura. - - + + SurfaceFinishSymbols SimboliFinituraSuperficiale - + No Part View in Selection Nessuna vista parziale nella selezione - + No %1 in Selection Nessun %1 nella selezione @@ -3325,33 +3325,33 @@ Alcune facce selezionate sono già tratteggiate. Sostituire? - + No TechDraw Page Nessuna pagina di TechDraw - + Need a TechDraw Page for this command Per questo comando serve una Pagina di TechDraw - + Select a Face first Prima selezionare una faccia - + No TechDraw object in selection Nessun oggetto TechDraw nella selezione - + Create a page to insert. Crea una pagina da inserire. - + No Faces to hatch in this selection In questa selezione non c'è nessuna faccia da trattegggiare @@ -3372,33 +3372,33 @@ Nel documento non c'è nessuna pagina di disegno. - + PDF (*.pdf) PDF (*. pdf) - - + + All Files (*.*) Tutti i File (*.*) - + Export Page As PDF Esporta pagina in PDF - + Document Name: Nome del documento: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Esporta pagina in SVG @@ -3447,7 +3447,7 @@ Editor di testi avanzato - + New Cosmetic Vertex Nuovo vertice cosmetico @@ -3524,8 +3524,8 @@ La direzione della vista nelle coordinate BaseView - - + + Operation Failed Operazione non riuscita @@ -3540,12 +3540,12 @@ Modifica simbolo di saldatura - + Create Cosmetic Line Crea linea cosmetica - + Edit Cosmetic Line Modifica linea cosmetica @@ -3680,7 +3680,7 @@ Nessun sottoelemento selezionato - + @@ -3688,7 +3688,7 @@ La selezione è vuota - + No object selected @@ -3725,7 +3725,7 @@ Per favore seleziona due linee dritte - + Select 2 Vertexes or 1 Edge Seleziona 2 Vertici o 1 Bordo @@ -5560,49 +5560,59 @@ Fast, but result is a collection of short straight lines. Stampa tutte le pagine - + Different orientation Orientamento diverso - + The printer uses a different orientation than the drawing. Do you want to continue? La stampante utilizza un orientamento diverso rispetto al disegno. Si desidera continuare? - + Different paper size Formato carta diverso - + The printer uses a different paper size than the drawing. Do you want to continue? La stampante utilizza un formato di carta diverso rispetto al disegno. Si desidera continuare? - + Opening file failed Apertura del file non riuscita - + Can not open file %1 for writing. Impossibile aprire il file %1 per la scrittura. - + Save DXF file Salva file DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*. pdf) + + + Selected: Selezionato: @@ -6087,7 +6097,12 @@ Do you want to continue? Nessuna direzione impostata - + + ComplexSection + Sezione complessa + + + Can not continue. Object * %1 or %2 not found. Impossibile continuare. Oggetto * %1 o %2 non trovato. @@ -6106,7 +6121,7 @@ Do you want to continue? - + Point Picker Selettore del punto @@ -6131,28 +6146,28 @@ Do you want to continue? Y - - + + Pick Points Scegliere i punti - + Pick a point for cosmetic vertex Scegliere un punto per il vertice cosmetico - + Escape picking Esci dalla scelta - + Left click to set a point Click sinistro per impostare un punto - + In progress edit abandoned. Start over. Modifica in corso abbandonata. Ricominciare. @@ -7059,7 +7074,7 @@ Si possono scegliere ulteriori punti per ottenere dei segmenti di linea. - + Pick Points Scegliere i punti @@ -7140,51 +7155,51 @@ Si possono scegliere ulteriori punti per ottenere dei segmenti di linea. - - - + + + Edit points Modifica i punti - + Edit Points Modifica i punti - - + + Pick a starting point for leader line Scegli un punto di partenza per la linea guida - + Save Points Salva Punti - + Click and drag markers to adjust leader line Clicca e trascina i marcatori per regolare la linea guida - - + + Save changes Salva le modifiche - + Left click to set a point Click sinistro per impostare un punto - + Press OK or Cancel to continue Premere OK o Annulla per continuare - + In progress edit abandoned. Start over. Modifica in corso abbandonata. Ricominciare. @@ -7714,6 +7729,11 @@ usando la spaziatura X/Y specificata Input the annotation text directly or start the rich text editor Inserire direttamente il testo dell'annotazione o avviare l'editor di testo avanzato + + + RichTextAnnotation + AnnotazioneTestoRicco + TechDrawGui::TaskSectionView @@ -7853,7 +7873,7 @@ usando la spaziatura X/Y specificata Nulla da applicare. Nessuna direzione di sezione selezionata - + Can not continue. Object * %1 or %2 not found. Impossibile continuare. Oggetto * %1 o %2 non trovato. @@ -8142,6 +8162,11 @@ usando la spaziatura X/Y specificata other altro + + + SectionView + Vista sezione + TechDrawGui::dlgTemplateField @@ -8169,7 +8194,7 @@ usando la spaziatura X/Y specificata TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Aggiunge una linea centrale tra 2 linee @@ -8177,7 +8202,7 @@ usando la spaziatura X/Y specificata TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Aggiunge una linea centrale tra 2 punti @@ -8185,7 +8210,7 @@ usando la spaziatura X/Y specificata TechDraw_ComplexSection - + Insert complex Section View Inserisci una vista di Sezione complessa @@ -8214,7 +8239,7 @@ usando la spaziatura X/Y specificata TechDraw_FaceCenterLine - + Adds a Centerline to Faces Linea a centro faccia @@ -8246,7 +8271,7 @@ usando la spaziatura X/Y specificata TechDraw_SectionView - + Insert simple Section View Inserisci una vista di Sezione semplice @@ -8773,4 +8798,156 @@ c'è una finestra di dialogo per le attività aperte. Impossibile Eliminare + + DrawPage + + + Page + Pagina + + + + DrawSVGTemplate + + + Template + Modello + + + + DrawView + + + View + Vista + + + + DrawViewPart + + + View + Vista + + + + DrawViewSection + + + Section + Seziona + + + + DrawComplexSection + + + Section + Seziona + + + + DrawViewDetail + + + Detail + Dettaglio + + + + DrawActiveView + + + ActiveView + Vista attiva + + + + DrawViewAnnotation + + + Annotation + Annotazione + + + + DrawViewImage + + + Image + Immagine + + + + DrawViewSymbol + + + Symbol + Simbolo + + + + DrawViewArch + + + Arch + Arch + + + + DrawViewDraft + + + Draft + Pescaggio + + + + DrawLeaderLine + + + LeaderLine + Freccia + + + + DrawViewBalloon + + + Balloon + Bolla + + + + DrawViewDimension + + + Dimension + Dimensione + + + + DrawViewDimExtent + + + Extent + Estensione + + + + DrawHatch + + + Hatch + Tratteggio + + + + DrawGeomHatch + + + GeomHatch + Trama geometrica + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts index f94d5edf5b..194fc2c871 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines 2直線間に中心線を追加 @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points 2点間に中心線を追加 @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines 2直線間に中心線を追加 @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points 2点間に中心線を追加 @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points 2点を通過する表示用の線を追加 @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) アクティブビューを挿入 (3Dビュー) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Arch ワークベンチオブジェクトを挿入 - + Insert a View of a Section Plane from Arch Workbench Arch ワークベンチから断面平面のビューを挿入 @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation バルーン注釈を挿入 @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line 中心線を挿入 - + Add Centerline to Faces 面に中心線を追加 @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group クリップグループを挿入 @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group クリップグループにビューを追加 @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group クリップグループからビューを削除 @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section 複雑な断面を挿入 - + Insert a Complex Section 複雑な断面を挿入 @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object 表示用オブジェクトを削除 @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines 線の表示を変更 - + Change Appearance of selected Lines 選択した線の表示を変更 @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View 詳細ビューを挿入 @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object ドラフトワークベンチ・オブジェクトの挿入 - + Insert a View of a Draft Workbench object ドラフトワークベンチオブジェクトのビューを挿入 @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File ファイル - + Export Page as DXF ページをDXFとしてエクスポート - + Save DXF file DXF ファイルを保存 - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File ファイル - + Export Page as SVG ページをSVGとしてエクスポート @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces 面に中心線を追加 @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image ビットマップ画像を挿入 - - + + Insert Bitmap from a file into a page ページにファイルからビットマップを挿入 - + Select an Image File 画像ファイルを選択 - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) 画像ファイル (*.jpg *.jpeg *.png *.bmp);;すべてのファイル (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template テンプレートを使用してページを挿入 - + Select a Template File テンプレートファイルを選択 - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages すべてのページを印刷 @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... 形状を投影... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group 投影グループの挿入 - + Insert multiple linked views of drawable object(s) 描画オブジェクトの複数のリンクされたビューを挿入 @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page ページを再描画 @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View 単純または複雑な断面図を挿入 - + Section View Section View - + Complex Section 複雑な断面 @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View 断面ビューを挿入 @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges 見えないエッジの表示/非表示 @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View スプレッドシートビューを挿入 - + Insert View to a spreadsheet スプレッドシートにビューを挿入 @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol 表面仕上げ記号を作成 - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel ビューを選択<br> - このボタンをクリック<br> - 開いたパネルで表面仕上げ記号を選択 @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol SVG 記号を挿入 - + Insert symbol from an SVG file SVGファイルから記号を挿入 @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off ビューフレームのオン・オフを切り替え @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View ビューを挿入 - + Insert a View ビューを挿入 @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline 溶接情報を引き出し線に追加 @@ -1964,58 +1964,58 @@ Command - + Drawing create page 図面作成ページ - + Create view ビューを作成 - + Create Projection Group 投影グループを作成 - + Create Clip クリップを作成 - + ClipGroupAdd クリップグループ追加 - + ClipGroupRemove クリップグループ削除 - + Create Symbol 記号を作成 - + Create DraftView ドラフトビューを作成 - + Create ArchView Archビューを作成 - + Create spreadsheet view スプレッドシートビューを作成 - - + + Save page to dxf ページをDXFに保存 @@ -2036,17 +2036,17 @@ - + Create Dimension 寸法を作成 - + Create Hatch ハッチングを作成 - + Update Hatch ハッチングを更新 @@ -2056,12 +2056,12 @@ 古いハッチングを削除 - + Create GeomHatch 幾何ハッチングを作成 - + Create Image 画像を作成 @@ -2071,7 +2071,7 @@ 吹き出しをドラッグ - + Drag Dimension 寸法をドラッグ @@ -2081,7 +2081,7 @@ 吹き出しを作成 - + Create ActiveView アクティブビューを作成 @@ -2091,12 +2091,12 @@ 中心線を作成 - + Create Cosmetic Line 表示用の線を作成 - + Update CosmeticLine 表示用の線を更新 @@ -2106,32 +2106,32 @@ 詳細ビューを作成 - + Update Detail 詳細を更新 - + Create Leader 引き出し線を作成 - + Edit Leader 引き出し線を編集 - + Create Anno 注釈を作成 - + Edit Anno 注釈を編集 - + Create SectionView 断面ビューを作成 @@ -2141,23 +2141,23 @@ 複雑な断面を作成 - - + + Edit SectionView 断面ビューを編集 - + Create WeldSymbol 溶接記号を作成 - + Edit WeldSymbol 溶接記号を編集 - + Add Cosmetic Vertex 表示用の頂点を追加 @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection 誤った選択 - - + + No Shapes, Groups or Links in this selection シェイプ、グループ、リンクが選択されていません。 - - + + Select at least 1 DrawViewPart object as Base. ベースとして少なくとも1つのDrawViewPartオブジェクトを選択してください。 - + I do not know what base view to use. どのベースビューを使用するのかわかりません。 - + No Base View, Shapes, Groups or Links in this selection ベーsyビュー、シェイプ、グループ、リンクが選択されていません。 - + No profile object found in selection プロファイルオブジェクトが選択されていません。 - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection 誤った選択です。 - - + + Select an object first 最初にオブジェクトを選択してください - - + + Too many objects selected 選択されているオブジェクトが多すぎます。 - - + + Create a page first. 最初にページを作成してください - + @@ -2800,87 +2800,87 @@ パートのビューが選択されていません。 - + Select one Clip group and one View. クリップグループ、ビューをそれぞれ1つ選択してください。 - + Select exactly one View to add to group. グループに追加するビューを1つだけ選択してください。 - + Select exactly one Clip group. クリップグループを1つだけ選択してください。 - + Clip and View must be from same Page. クリップとビューは同じページのものである必要があります。 - + Select exactly one View to remove from Group. グループから取り除くビューを1つだけ選択してください。 - + View does not belong to a Clip ビューはクリップに属していません。 - + Choose an SVG file to open 開くSVGファイルを選択 - + Scalable Vector Graphic スケーラブル・ベクター・グラフィック - + All Files すべてのファイル - + Select at least one object. 少なくとも1つのオブジェクトを選択してください。 - + Please select only 1 Arch Section. Archセクションを一つだけ選択して下さい。 - + No Arch Sections in selection. Archセクションが選択されていません。 - + Select exactly one Spreadsheet object. スプレッドシートオブジェクトを1 つだけ選択して下さい。 - + No Drawing View 図面ビューがありません。 - + Open Drawing View before attempting export to SVG. SVGへのエクスポートを試みる前に図面ビューを開きます。 - + Can not export selection 選択範囲がエクスポートできません - + Page contains DrawViewArch which will not be exported. Continue? ページにはエクスポートできない DrawViewArch が含まれています。継続しますか? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ 2つの点オブジェクトと1つのビューを選択 (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ 実行中のタスク - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection 間違った選択 @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. 線のためのベースビューを選択する必要があります。 @@ -3203,112 +3203,112 @@ DrawViewPartオブジェクトが選択されていません。 - - + + No base View in Selection. ベースビューが選択されていません。 - + You must select Faces or an existing CenterLine. 面または既存の中心線を選択する必要があります。 - + No CenterLine in selection. 中心線が選択されていません。 - - - + + + Selection is not a CenterLine. 選択されているのは中心線ではありません。 - + Selection not understood. 選択範囲が理解できません - + You must select 2 Vertexes or an existing CenterLine. 2頂点または既存の中心線を選択する必要があります。 - + Need 2 Vertices or 1 CenterLine. 2頂点または1本の中心線が必要です。 - + Selection is empty. 選択がされていません。 - + Not enough points in selection. 選択点が足りません。 - + Selection is not a Cosmetic Line. 選択されているのは表示用の線ではありません。 - + You must select 2 Vertexes. 2頂点を選択してください。 - - + + Nothing selected 何も選択されていません - + At least 1 object in selection is not a part view 選択されているオブジェクトの少なくとも1つがパートビューではありません - + Unknown object type in selection 選択されているのは不明なオブジェクトタイプです - + No View in Selection. 選択範囲にビューがありません。 - + You must select a View and/or lines. ビューおよび/または行を選択する必要があります。 - + No Part Views in this selection パートビューが選択されていません - + Select exactly one Leader line or one Weld symbol. 引き出し線または溶接シンボルを一つだけ選択して下さい。 - - + + SurfaceFinishSymbols 表面仕上げ記号 - + No Part View in Selection パートビューが選択されていません - + No %1 in Selection %1 が選択されていません。 @@ -3323,33 +3323,33 @@ 選択中の面はすでにハッチングされています。置き換えしますか? - + No TechDraw Page TechDrawページがありません。 - + Need a TechDraw Page for this command このコマンドにはTechDrawページが必要です。 - + Select a Face first 最初に面を選択してください - + No TechDraw object in selection 選択対象にTechDrawオブジェクトが含まれていません。 - + Create a page to insert. 挿入するページを作成 - + No Faces to hatch in this selection このセクションにはハッチングをする面がありません。 @@ -3370,33 +3370,33 @@ ドキュメントに図面ページがありません。 - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) すべてのファイル (*.*) - + Export Page As PDF ページをPDFとしてエクスポート - + Document Name: ドキュメント名: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG ページをSVGとしてエクスポート @@ -3445,7 +3445,7 @@ リッチテキストエディタ - + New Cosmetic Vertex 新しい表示用の頂点 @@ -3522,8 +3522,8 @@ BaseView 座標内のビュー方向 - - + + Operation Failed 操作に失敗しました @@ -3538,12 +3538,12 @@ 溶接記号の編集 - + Create Cosmetic Line 表示用の線を作成 - + Edit Cosmetic Line 表示用の線を編集 @@ -3678,7 +3678,7 @@ サブ要素が選択されていません。 - + @@ -3686,7 +3686,7 @@ 選択されていません - + No object selected @@ -3723,7 +3723,7 @@ 2本の直線を選択してください。 - + Select 2 Vertexes or 1 Edge 2つの頂点または1本のエッジを選択してください。 @@ -5550,50 +5550,60 @@ Fast, but result is a collection of short straight lines. すべてのページを印刷 - + Different orientation 異なる向き - + The printer uses a different orientation than the drawing. Do you want to continue? プリンターでは、図面と異なる印刷方向を使用します。続行しますか? - + Different paper size 別の用紙サイズ - + The printer uses a different paper size than the drawing. Do you want to continue? プリンターでは、図面とは異なる用紙サイズを使用します。 続行しますか? - + Opening file failed ファイルを開けませんでした。 - + Can not open file %1 for writing. 書き込み用ファイル %1 を開くことができません。 - + Save DXF file DXF ファイルを保存 - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: 選択: @@ -6077,7 +6087,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6096,7 +6111,7 @@ Do you want to continue? - + Point Picker 点ピッカー @@ -6121,28 +6136,28 @@ Do you want to continue? Y - - + + Pick Points 点をピック - + Pick a point for cosmetic vertex 表示用頂点のために点をピック - + Escape picking 選択を終了 - + Left click to set a point 左クリックで点を設定 - + In progress edit abandoned. Start over. 処理中の編集を破棄しました。やり直してください。 @@ -7047,7 +7062,7 @@ You can pick further points to get line segments. - + Pick Points 点をピック @@ -7128,51 +7143,51 @@ You can pick further points to get line segments. - - - + + + Edit points 点を編集 - + Edit Points 点を編集 - - + + Pick a starting point for leader line 引き出し線の始点をピック - + Save Points 点を保存 - + Click and drag markers to adjust leader line マーカーをクリック、ドラッグして引き出し線を調整 - - + + Save changes 変更を保存 - + Left click to set a point 左クリックで点を設定 - + Press OK or Cancel to continue OK またはキャンセルを押すと続行します - + In progress edit abandoned. Start over. 処理中の編集を破棄しました。やり直してください。 @@ -7701,6 +7716,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor 注釈テキストを直接入力するか、リッチテキストエディタを起動 + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7840,7 +7860,7 @@ using the given X/Y Spacing 適用対象がありません。断面方向が未選択です。 - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8129,6 +8149,11 @@ using the given X/Y Spacing other その他 + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8156,7 +8181,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines 2直線間に中心線を追加 @@ -8164,7 +8189,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points 2点間に中心線を追加 @@ -8172,7 +8197,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View 複雑な断面図を挿入 @@ -8201,7 +8226,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces 面に中心線を追加 @@ -8233,7 +8258,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8759,4 +8784,156 @@ there is an open task dialog. 削除できません。 + + DrawPage + + + Page + ページ + + + + DrawSVGTemplate + + + Template + テンプレート + + + + DrawView + + + View + ビュー + + + + DrawViewPart + + + View + ビュー + + + + DrawViewSection + + + Section + セクション + + + + DrawComplexSection + + + Section + セクション + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + 注釈 + + + + DrawViewImage + + + Image + 画像 + + + + DrawViewSymbol + + + Symbol + 記号 + + + + DrawViewArch + + + Arch + Arch + + + + DrawViewDraft + + + Draft + 喫水 + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + 吹き出し + + + + DrawViewDimension + + + Dimension + 寸法 + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + ハッチング + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts index da2fa2a780..b5ad9df16f 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines ორ ხაზს შუა ცენტრის ხაზის გავლება @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points ორ წერტილს შორის ცენტრის ხაზის დამატება @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw ტექნიკური ნახაზი - + Add Centerline between 2 Lines ორ ხაზს შუა ცენტრის ხაზის გავლება @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw ტექნიკური ნახაზი - + Add Centerline between 2 Points ორ წერტილს შორის ცენტრის ხაზის დამატება @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw ტექნიკური ნახაზი - + Add Cosmetic Line Through 2 Points კოსმეტიკური ხაზის ორ წერტილს შუა გავლება @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw ტექნიკური ნახაზი - + Insert Active View (3D View) აქტიური ხედის ჩასმა (3D ხედი) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw ტექნიკური ნახაზი - + Insert Arch Workbench Object არქიტექტურული სამუშაო მაგიდის ობიექტის ჩასმა - + Insert a View of a Section Plane from Arch Workbench Arch სამუშაო მაგიდიდან სიბრტყის კვეთის ხედის ჩასმა @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw ტექნიკური ნახაზი - + Insert Balloon Annotation სქოლიოს ანოტაციის ჩასმა @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw ტექნიკური ნახაზი - + Insert Center Line ღერძის ხაზის გავლება - + Add Centerline to Faces ზედაპირებისთვის ღერძული ხაზის დამატება @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw ტექნიკური ნახაზი - + Insert Clip Group კვეთების ჯგუფის ჩასმა @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw ტექნიკური ნახაზი - + Add View to Clip Group კვეთების ჯგუფში ხედის ჩამატება @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw ტექნიკური ნახაზი - + Remove View from Clip Group კვეთების ჯგუფიდან ხედის წაშლა @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw ტექნიკური ნახაზი - + Insert Complex Section კომპლექსური კვეთის ჩასმა - + Insert a Complex Section კომპლექსური კვეთის ჩასმა @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw ტექნიკური ნახაზი - + Remove Cosmetic Object დამხმარე ობიექტის წაშლა @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw ტექნიკური ნახაზი - + Change Appearance of Lines ხაზების გარეგნული სახის შეცვლა - + Change Appearance of selected Lines მონიშნული ხაზების გარეგნული სახის შეცვლა @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw ტექნიკური ნახაზი - + Insert Detail View ნაწილის ხედის ჩასმა @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw ტექნიკური ნახაზი - + Insert Draft Workbench Object ხაზვის სამუშაო მაგიდის ობიექტის ჩასმა - + Insert a View of a Draft Workbench object ხაზვის სამუშაო მაგიდიდან ობიექტის ხედის ჩასმა @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File ფაილი - + Export Page as DXF გვერდის DXF ფაილად გატანა - + Save DXF file DXF ფაილის შენახვა - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File ფაილი - + Export Page as SVG გვერდის SVG ფაილად გატანა @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw ტექნიკური ნახაზი - + Add Centerline to Faces ზედაპირებისთვის ღერძული ხაზის დამატება @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw ტექნიკური ნახაზი - + Insert Bitmap Image რასტრული გამოსახულების ჩასმა - - + + Insert Bitmap from a file into a page გვერდში ფაილიდან რასტრული გამოსახულების ჩასმა - + Select an Image File აირჩიეთ გამოსახულების ფაილი - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) გამოსახულების ფაილები (*.jpg *.jpeg *.png *.bmp);;ყველა ფაილი (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw ტექნიკური ნახაზი - + Insert Page using Template ახალი გვერდის ჩამატება შაბლონის გამოყენებით - + Select a Template File აირჩიეთ შაბლონის ფაილი - + Template (*.svg) შაბლონი (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw ტექნიკური ნახაზი - + Print All Pages ყველა გვერდის დაბეჭდვა @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw ტექნიკური ნახაზი - + Project shape... პროექტის მოხაზულობა... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw ტექნიკური ნახაზი - + Insert Projection Group პროექციების ჯგუფის ჩასმა - + Insert multiple linked views of drawable object(s) ნახაზის ობიექტების მიბმული ხედების ჩასმა @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw ტექნიკური ნახაზი - + Redraw Page გვერდის თავიდან დახატვა @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw ტექნიკური ნახაზი - + Insert a simple or complex Section View მარტივი ან კომპლექსური კვეთის ხედის ჩასმა - + Section View სექციის ხედი - + Complex Section კომპლექსური კვეთა @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw ტექნიკური ნახაზი - + Insert Section View ხედის ჭრილის ჩასმა @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw ტექნიკური ნახაზი - + Show/Hide Invisible Edges უხილავი წიბოების ჩვენების ჩართ/გამორთ @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw ტექნიკური ნახაზი - + Insert Spreadsheet View ელცხრილის ხედის ჩასმა - + Insert View to a spreadsheet ელცხრილზე ხედის ჩამატება @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw ტექნიკური ნახაზი - + Create a Surface Finish Symbol ზედაპირის ფინიშის სიმბოლოს შექმნა - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel აირჩიეტ ხედი<br> -დააწკაპუნეთ ამ ღილაკზე<br> -გახსნილ პანელში ზედაპირის დასრულების სიმბოლოს ატრიბუტები აირჩიეთ @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw ტექნიკური ნახაზი - + Insert SVG Symbol SVG სიმბოლოს ჩასმა - + Insert symbol from an SVG file სიმბოლოს SVG ფაილიდან ჩასმა @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw ტექნიკური ნახაზი - - + + Turn View Frames On/Off ჩარჩოების ელემენტების ჩასწორების ჩართ/გამორთ @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw ტექნიკური ნახაზი - + Insert View ხედის ჩამატება - + Insert a View ხედის ჩასმა @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw ტექნიკური ნახაზი - + Add Welding Information to Leaderline გატანად ხაზისთვის შედუღების ინფორმაციის დამატება @@ -1964,58 +1964,58 @@ Command - + Drawing create page ნახატის გვერდის შექმნა - + Create view ხედის შექმნა - + Create Projection Group პროექციის ჯგუფის შექმნა - + Create Clip კვეთის შექმნა - + ClipGroupAdd ხედის ჯგუფში ჩამატება - + ClipGroupRemove კვეთების ჯგუფის წაშლა - + Create Symbol სიმბოლოს შექმნა - + Create DraftView DraftView-ის შექმნა - + Create ArchView ArchView-ის შექმნა - + Create spreadsheet view ელცხრილის შექმნა - - + + Save page to dxf გვერდის DXF-ში შენახვა @@ -2036,17 +2036,17 @@ - + Create Dimension ზომის მითითება - + Create Hatch დაშტრიხვის შექმნა - + Update Hatch დაშტრიხვის განახლება @@ -2056,12 +2056,12 @@ ძველი დაშტრიხვის წაშლა - + Create GeomHatch გეომ-დაშტრიხვის შექმნა - + Create Image გამოსახულების შექმნა @@ -2071,7 +2071,7 @@ სქოლიოს გადათრევა - + Drag Dimension ზომის გადათრევა @@ -2081,7 +2081,7 @@ სქოლიოს შექმნა - + Create ActiveView აქტიური ხედის შექმნა @@ -2091,12 +2091,12 @@ ცენტრალურ ხაზის შექმნა - + Create Cosmetic Line დამხმარე ხაზის შექმნა - + Update CosmeticLine დამხმარე ხაზის განახლება @@ -2106,32 +2106,32 @@ ნაწილის ხედის შექმნა - + Update Detail დეტალების განახლება - + Create Leader გატანის შექმნა - + Edit Leader გატანის ჩასწორება - + Create Anno ანოტაციის შექმნა - + Edit Anno ანოტაციის ჩასწორება - + Create SectionView კვეთის ხედის შექმნა @@ -2141,23 +2141,23 @@ რთული კვეთის შექმნა - - + + Edit SectionView სექციის ხედის ჩასწორება - + Create WeldSymbol შედუღების ნიშნის შექმნა - + Edit WeldSymbol შედუღების ნიშნის შეცვლა - + Add Cosmetic Vertex დამხმარე წვეროს დამატება @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection არასწორი მონიშნული - - + + No Shapes, Groups or Links in this selection მონიშნულში არც მონახაზებია, არც ჯგუფები და არც ბმულები - - + + Select at least 1 DrawViewPart object as Base. საბაზისოდ ერთი DrawViewPart ობიექტი მაინც მონიშნეთ. - + I do not know what base view to use. მე არ ვიცი, რომელი საბაზისო ხედი გამოვიყენო. - + No Base View, Shapes, Groups or Links in this selection მონიშნულში არც საბაზისო ხედებია, არც მონახაზები, არც ჯგუფები და არც ბმულები - + No profile object found in selection მონიშნულში პროფილის ობექტი ვერ ვიპოვე - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection არასწორი არჩევანი - - + + Select an object first ჯერ აირჩიეთ ობიექტი - - + + Too many objects selected მონიშნულია მეტისმეტად ბევრი ობიექტი - - + + Create a page first. ჯერ შექმენით გვერდი. - + @@ -2800,87 +2800,87 @@ მონიშნულში არ არსებობს ნაწილის ხედი. - + Select one Clip group and one View. აირჩიეთ ერთი კვეთების ჯგუფი და ერთი ხედი. - + Select exactly one View to add to group. ჯგუფში ჩასამატებლად აირჩიეთ ერთი ცალი ხედი. - + Select exactly one Clip group. აირჩიეთ მხოლოდ ერთი კვეთების ჯგუფი. - + Clip and View must be from same Page. კვეთი და ხედი ერთ გვერდზე უნდა იყვნენ. - + Select exactly one View to remove from Group. აირჩიეთ ზუსტად ერთი ხედი ჯგუფიდან წასაშლელად. - + View does not belong to a Clip ხედი არ მიეკუთვნება კვეთს - + Choose an SVG file to open აირჩიეთ გასახსნელი SVG ფაილი - + Scalable Vector Graphic მასშტაბირებადი ვექტორული გრაფიკა - + All Files ყველა ფაილი - + Select at least one object. ერთი ობიექტი მაინც მონიშნეთ. - + Please select only 1 Arch Section. აირჩიეთ მხოლოდ 1 არქიტექტურული კვეთა. - + No Arch Sections in selection. არქიტექტურული კვეთები მონიშნული არაა. - + Select exactly one Spreadsheet object. აირჩიეთ ელცხრილის ზუსტად ერთი ობიექტი. - + No Drawing View ნახაზის ხედები ნაპოვნი არაა - + Open Drawing View before attempting export to SVG. SVG-ში გატანის წინ ხატვის ხედის გახსნა. - + Can not export selection მონიშნულის გატანა შეუძლებელია - + Page contains DrawViewArch which will not be exported. Continue? გვერდი შეიცავს DrawViewArch-ს, რომელიც არ იქნება გატანილი. გავაგრძელო? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ არჩიეთ 2 წერტილოვანი ობიექტი და 1 ხედი. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ მიმდინარეობს ამოცანის შესრულება - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection არასწორი არჩევანი @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. უნდა აირჩიოთ ხაზის საბაზისო ხედი. @@ -3203,112 +3203,112 @@ ამ მონიშნულში DrawViewPart ტიპის ობიექტები არაა - - + + No base View in Selection. მონიშნული საბაზისო ხედი არაა. - + You must select Faces or an existing CenterLine. უნდა მონიშნოთ ზედაპირები ან არსებული ცენტრის ხაზები. - + No CenterLine in selection. მონიშნულში ცენტრის ხაზები არაა. - - - + + + Selection is not a CenterLine. მონიშნული ცენტრის ხაზი არაა. - + Selection not understood. გაუგებარი მონიშვნა. - + You must select 2 Vertexes or an existing CenterLine. უნდა მონიშნოთ 2 წვერო ან არსებული ცენტრის ხაზები. - + Need 2 Vertices or 1 CenterLine. საჭიროა ორი წვერო ან ერთი ცენტრი ხაზი. - + Selection is empty. მონიშნული ცარიელია. - + Not enough points in selection. მონიშნულში არასაკმარისი წერტილებია. - + Selection is not a Cosmetic Line. მონიშნული არ წარმოადგენს კოსმეტიკურ ხაზს. - + You must select 2 Vertexes. უნდა მონიშნოთ ორი წვერო. - - + + Nothing selected არაფერია არჩეული - + At least 1 object in selection is not a part view მონიშნულში მინიმუმ 1 ობიექტი ნაწილის ხედს არ წარმოადგენს - + Unknown object type in selection მონიშნულში ობიექტის უცნობი ტიპია - + No View in Selection. მონიშნულში ხედი არ არსებობს. - + You must select a View and/or lines. უნდა აირჩიოთ ხედი და/ან ხაზები. - + No Part Views in this selection ამ მონიშნულში არ არსებობს ნაწილის ხედები - + Select exactly one Leader line or one Weld symbol. აირჩიეთ ზუსტად ერთი გატანადი ხაზი ან ერთი შედუღების ნიშანი. - - + + SurfaceFinishSymbols ზედაპირისდასრულებისსიმბოლოები - + No Part View in Selection მონიშნულში ნაწილის ხედი არ არსებობს - + No %1 in Selection მონიშნულში %1 არ არსებობს @@ -3323,33 +3323,33 @@ ზოგიერთი ზედაპირი უკვე დაშტრიხულია. ჩავანაცვლო? - + No TechDraw Page ტექნიკური ნახაზი-ის გვერდი ნაპოვნი არაა - + Need a TechDraw Page for this command ბრძანებისთვის საჭიროა ტექნიკური ნახაზი-ის გვერდი - + Select a Face first ჯერ აირჩიეთ ზედაპირი - + No TechDraw object in selection მონიშნულში ტექნიკური ნახაზი-ის ობიექტი არ არსებობს - + Create a page to insert. ჩასასმელი გვერდის შექმნა. - + No Faces to hatch in this selection მონიშნულებში დასაშტრიხი ზედაპირები ნაპოვნი არაა @@ -3370,33 +3370,33 @@ დოკუმენტში ნახაზის გვერდები არაა. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) ყველა ფაილი (*.*) - + Export Page As PDF გვერდის PDF ფაილად გატანა - + Document Name: დოკუმენტის სახელი: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG გვერდის SVG ფაილად გატანა @@ -3445,7 +3445,7 @@ ტექსტის ფორმატირების რედაქტორი - + New Cosmetic Vertex ახალი დამხმარე წვერო @@ -3522,8 +3522,8 @@ ხედის მიმართულება BaseView-ის კოორდინატებში - - + + Operation Failed ოპერაცია წარუმატებლად დასრულდა @@ -3538,12 +3538,12 @@ შედუღებითი კავშირის ხატულის შეცვლა - + Create Cosmetic Line დამხმარე ხაზის შექმნა - + Edit Cosmetic Line დამხმარე ხაზის ჩასწორება @@ -3678,7 +3678,7 @@ ქვეელემენტები არჩეული არაა - + @@ -3686,7 +3686,7 @@ მონიშნული ცარიელია - + No object selected @@ -3723,7 +3723,7 @@ გთხოვთ, არჩიეთ ორი სწორი ხაზი - + Select 2 Vertexes or 1 Edge აირჩიეთ 2 წვერო ან 1 წიბო @@ -5555,51 +5555,61 @@ Fast, but result is a collection of short straight lines. ყველა გვერდის დაბეჭდვა - + Different orientation განსხვავებული ორიენტაცია - + The printer uses a different orientation than the drawing. Do you want to continue? პრინტერი ნახაზისგან განსხვავებულ ორიენტაციას იყენებს. გნებავთ გაგრძელება? - + Different paper size ფურცლის განსხვავებული ზომა - + The printer uses a different paper size than the drawing. Do you want to continue? პრინტერი იყენებს ქაღალდის განსხვავებულ ზომას, ვიდრე ნახაზი. გნებავთ, გააგრძელოთ? - + Opening file failed ფაილის გახსნის შეცდომა - + Can not open file %1 for writing. ჩასაწერად ფაილის „%1“ გახსნა შეუძლებელია. - + Save DXF file DXF ფაილის შენახვა - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: არჩეულია: @@ -6084,7 +6094,12 @@ Do you want to continue? მიმართულება დაყენებული არაა - + + ComplexSection + კომპლექსურიჭრილი + + + Can not continue. Object * %1 or %2 not found. გაგრძელება შეუძლებელია. ობიექტები * %1 ან %2 ვერ ვიპოვე. @@ -6103,7 +6118,7 @@ Do you want to continue? - + Point Picker აირჩიეთ წერტილები @@ -6128,28 +6143,28 @@ Do you want to continue? Y - - + + Pick Points წერტილების არჩევა - + Pick a point for cosmetic vertex აირჩიეთ კოსმეტიკური წვეროს დასასმელი წერტილი - + Escape picking არჩევანის გაუქმება - + Left click to set a point წერტილის დასაყენებლად დააწკაპუნეთ მარცხენა ღილაკზე - + In progress edit abandoned. Start over. ჩასწორება მიტოვებულია. თავიდან დაწყება. @@ -7057,7 +7072,7 @@ You can pick further points to get line segments. - + Pick Points წერტილების არჩევა @@ -7138,51 +7153,51 @@ You can pick further points to get line segments. - - - + + + Edit points წერტილების ჩასწორება - + Edit Points წერტილების ჩასწორება - - + + Pick a starting point for leader line აირჩიეთ გატანადი ხაზის საწყისი წერტილი - + Save Points წერტილების შენახვა - + Click and drag markers to adjust leader line გატანადი ხაზის მოსარგებად დააჭირეთ და გადაათრიეთ მარკერები - - + + Save changes ცვლილებების შენახვა - + Left click to set a point წერტილის დასაყენებლად დააწკაპუნეთ მარცხენა ღილაკზე - + Press OK or Cancel to continue გასაგრძელებლად დააჭირეთ დიახ-ს ან გაუქმებას - + In progress edit abandoned. Start over. ჩასწორება მიტოვებულია. თავიდან დაწყება. @@ -7712,6 +7727,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor შეიყვანეთ ანოტაციის ტექსტი პირდაპირ არ გაუშვით მდიდარი ტექსტის რედაქტორი + + + RichTextAnnotation + მდიდარიტექსტისანოტაცია + TechDrawGui::TaskSectionView @@ -7851,7 +7871,7 @@ using the given X/Y Spacing გადასატარებელი არაფერია. კვეთის მიმართულება არჩეული არაა - + Can not continue. Object * %1 or %2 not found. გაგრძელება შეუძლებელია. ობიექტები * %1 ან %2 ვერ ვიპოვე. @@ -8140,6 +8160,11 @@ using the given X/Y Spacing other სხვა + + + SectionView + ჭრილისხედი + TechDrawGui::dlgTemplateField @@ -8167,7 +8192,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines ორ ხაზს შუა ცენტრის ხაზის გავლება @@ -8175,7 +8200,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points ორ წერტილს შორის ცენტრის ხაზის დამატება @@ -8183,7 +8208,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View კომპლექსური ჭრილის ხედის ჩასმა @@ -8212,7 +8237,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces ზედაპირებზე ცენტრის ხაზების დამატება @@ -8244,7 +8269,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View მარტივი ხედის ჭრილის ჩასმა @@ -8771,4 +8796,156 @@ there is an open task dialog. წაშლა შეუძლებელია + + DrawPage + + + Page + გვერდი + + + + DrawSVGTemplate + + + Template + შაბლონი + + + + DrawView + + + View + ხედი + + + + DrawViewPart + + + View + ხედი + + + + DrawViewSection + + + Section + ჭრილი + + + + DrawComplexSection + + + Section + ჭრილი + + + + DrawViewDetail + + + Detail + დაწვრილებით + + + + DrawActiveView + + + ActiveView + აქტიურიხედი + + + + DrawViewAnnotation + + + Annotation + შენიშვნა + + + + DrawViewImage + + + Image + გამოსახულება + + + + DrawViewSymbol + + + Symbol + სიმბოლო + + + + DrawViewArch + + + Arch + არქ + + + + DrawViewDraft + + + Draft + წყალშიგი + + + + DrawLeaderLine + + + LeaderLine + გატანადი ხაზი + + + + DrawViewBalloon + + + Balloon + პოზიციური გამოტანა + + + + DrawViewDimension + + + Dimension + ზომა + + + + DrawViewDimExtent + + + Extent + მასშტაბი + + + + DrawHatch + + + Hatch + დაშტრიხვა + + + + DrawGeomHatch + + + GeomHatch + გეომეტრიული დაშტრიხვა + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts index aea8ee0115..7a2d3f055f 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines 두 선 사이에 중심선 추가 @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points 두 점 사이에 중심선 추가 @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines 두 선 사이에 중심선 추가 @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points 두 점 사이에 중심선 추가 @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points 두 점을 지나는 꾸밈선 추가 @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) 활성 뷰 삽입 (3D 뷰) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Arch 워크벤치 객체 삽입 - + Insert a View of a Section Plane from Arch Workbench Arch 워크벤치에서 단면 뷰 삽입하기 @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation 풍선 주석 삽입 @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line 중심 선 삽입 - + Add Centerline to Faces 면에 중심선 추가 @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Clip 그룹 삽입 @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Clip 그룹에 뷰 추가 @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Clip 그룹에서 뷰 제거 @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section 복합 단면 삽입 - + Insert a Complex Section 복합 단면 삽입하기 @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object 꾸밈 객체 제거 @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines 선 외형 변경 - + Change Appearance of selected Lines 선택한 선의 외형 변경 @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View 상세 뷰 삽입 @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Draft 워크벤치 객체 삽입 - + Insert a View of a Draft Workbench object Draft 워크벤치 객체의 뷰 삽입 @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File 파일 - + Export Page as DXF 페이지를 DXF로 내보내기 - + Save DXF file DXF 파일 저장 - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File 파일 - + Export Page as SVG 페이지를 SVG로 내보내기 @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces 면에 중심선 추가 @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Insert Bitmap Image - - + + Insert Bitmap from a file into a page Insert Bitmap from a file into a page - + Select an Image File Select an Image File - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Insert Page using Template - + Select a Template File Select a Template File - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... 프로젝트 모양... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Insert Projection Group - + Insert multiple linked views of drawable object(s) Insert multiple linked views of drawable object(s) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Redraw Page @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Insert Section View @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Show/Hide Invisible Edges @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Insert Spreadsheet View - + Insert View to a spreadsheet Insert View to a spreadsheet @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Insert SVG Symbol - + Insert symbol from an SVG file Insert symbol from an SVG file @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Turn View Frames On/Off @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Insert View - + Insert a View Insert a View @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Add Welding Information to Leaderline @@ -1964,58 +1964,58 @@ Command - + Drawing create page Drawing create page - + Create view Create view - + Create Projection Group Create Projection Group - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Create Symbol - + Create DraftView Create DraftView - + Create ArchView Create ArchView - + Create spreadsheet view Create spreadsheet view - - + + Save page to dxf Save page to dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Create Dimension - + Create Hatch Create Hatch - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Create Image @@ -2071,7 +2071,7 @@ Drag Balloon - + Drag Dimension Drag Dimension @@ -2081,7 +2081,7 @@ Create Balloon - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Create CenterLine - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine Update CosmeticLine @@ -2106,32 +2106,32 @@ Create Detail View - + Update Detail Update Detail - + Create Leader Create Leader - + Edit Leader Edit Leader - + Create Anno Create Anno - + Edit Anno Edit Anno - + Create SectionView Create SectionView @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Create WeldSymbol - + Edit WeldSymbol Edit WeldSymbol - + Add Cosmetic Vertex 꾸밈 꼭짓점 추가 @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection 잘못 된 선택 - - + + No Shapes, Groups or Links in this selection No Shapes, Groups or Links in this selection - - + + Select at least 1 DrawViewPart object as Base. Select at least 1 DrawViewPart object as Base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Incorrect selection - - + + Select an object first Select an object first - - + + Too many objects selected Too many objects selected - - + + Create a page first. 먼저 페이지를 작성합니다. - + @@ -2800,87 +2800,87 @@ No View of a Part in selection. - + Select one Clip group and one View. Select one Clip group and one View. - + Select exactly one View to add to group. Select exactly one View to add to group. - + Select exactly one Clip group. Select exactly one Clip group. - + Clip and View must be from same Page. Clip and View must be from same Page. - + Select exactly one View to remove from Group. Select exactly one View to remove from Group. - + View does not belong to a Clip View does not belong to a Clip - + Choose an SVG file to open 불러올 SVG 파일을 선택하세요 - + Scalable Vector Graphic 스케일러블 벡터 그래픽(SVG) - + All Files 모든 파일 - + Select at least one object. Select at least one object. - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. 스프레드시트 오브젝트를 하나만 선택하십시오. - + No Drawing View No Drawing View - + Open Drawing View before attempting export to SVG. Open Drawing View before attempting export to SVG. - + Can not export selection Can not export selection - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Select 2 point objects and 1 View. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Task In Progress - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Wrong Selection @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. You must select a base View for the line. @@ -3203,112 +3203,112 @@ No DrawViewPart objects in this selection - - + + No base View in Selection. No base View in Selection. - + You must select Faces or an existing CenterLine. You must select Faces or an existing CenterLine. - + No CenterLine in selection. No CenterLine in selection. - - - + + + Selection is not a CenterLine. Selection is not a CenterLine. - + Selection not understood. Selection not understood. - + You must select 2 Vertexes or an existing CenterLine. You must select 2 Vertexes or an existing CenterLine. - + Need 2 Vertices or 1 CenterLine. Need 2 Vertices or 1 CenterLine. - + Selection is empty. Selection is empty. - + Not enough points in selection. Not enough points in selection. - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. You must select 2 Vertexes. - - + + Nothing selected Nothing selected - + At least 1 object in selection is not a part view At least 1 object in selection is not a part view - + Unknown object type in selection Unknown object type in selection - + No View in Selection. No View in Selection. - + You must select a View and/or lines. You must select a View and/or lines. - + No Part Views in this selection No Part Views in this selection - + Select exactly one Leader line or one Weld symbol. Select exactly one Leader line or one Weld symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Some Faces in selection are already hatched. Replace? - + No TechDraw Page No TechDraw Page - + Need a TechDraw Page for this command Need a TechDraw Page for this command - + Select a Face first Select a Face first - + No TechDraw object in selection No TechDraw object in selection - + Create a page to insert. Create a page to insert. - + No Faces to hatch in this selection No Faces to hatch in this selection @@ -3370,33 +3370,33 @@ No Drawing Pages in document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) All Files (*.*) - + Export Page As PDF Export Page As PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Export page as SVG @@ -3445,7 +3445,7 @@ Rich text editor - + New Cosmetic Vertex New Cosmetic Vertex @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3538,12 +3538,12 @@ Edit Welding Symbol - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,50 +5559,60 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation 다른 방향 - + The printer uses a different orientation than the drawing. Do you want to continue? The printer uses a different orientation than the drawing. Do you want to continue? - + Different paper size 다른 용지 크기 - + The printer uses a different paper size than the drawing. Do you want to continue? 프린터가 사용중인 종이 크기가 현재 드로잉과는 다릅니다. 계속 진행하시겠습니까? - + Opening file failed 파일 열기 실패 - + Can not open file %1 for writing. Can not open file %1 for writing. - + Save DXF file DXF 파일 저장 - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: 선택: @@ -6087,7 +6097,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6106,7 +6121,7 @@ Do you want to continue? - + Point Picker Point Picker @@ -6131,28 +6146,28 @@ Do you want to continue? Y - - + + Pick Points Pick Points - + Pick a point for cosmetic vertex Pick a point for cosmetic vertex - + Escape picking Escape picking - + Left click to set a point Left click to set a point - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7060,7 +7075,7 @@ You can pick further points to get line segments. - + Pick Points Pick Points @@ -7141,51 +7156,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Pick a starting point for leader line - + Save Points Save Points - + Click and drag markers to adjust leader line Click and drag markers to adjust leader line - - + + Save changes Save changes - + Left click to set a point Left click to set a point - + Press OK or Cancel to continue Press OK or Cancel to continue - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7715,6 +7730,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7854,7 +7874,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8143,6 +8163,11 @@ using the given X/Y Spacing other other + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8170,7 +8195,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adds a Centerline between 2 Lines @@ -8178,7 +8203,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adds a Centerline between 2 Points @@ -8186,7 +8211,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8215,7 +8240,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8247,7 +8272,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8774,4 +8799,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Page + + + + DrawSVGTemplate + + + Template + 템플릿 + + + + DrawView + + + View + 보기 + + + + DrawViewPart + + + View + 보기 + + + + DrawViewSection + + + Section + 단면 + + + + DrawComplexSection + + + Section + 단면 + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Annotation + + + + DrawViewImage + + + Image + 이미지 + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Arch + + + + DrawViewDraft + + + Draft + 흘수 + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balloon + + + + DrawViewDimension + + + Dimension + 치수 + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Hatch + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts index f433aa956d..ac08d47a87 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Voeg een middenlijn tussen 2 lijnen toe @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Voeg een middenlijn tussen 2 punten toe @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Voeg een middenlijn tussen 2 lijnen toe @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Voeg een middenlijn tussen 2 punten toe @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Voeg symbolische Lijn Door 2 Punten @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Voeg de actieve weergave in (3D-weergave) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Voeg een Arch-werkbankobject in - + Insert a View of a Section Plane from Arch Workbench Voeg een aanzicht van een sectievlak in vanuit de Arch-werkbank @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Voeg een ballonannotatie in @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Voeg een middenlijn in - + Add Centerline to Faces Voeg een middenlijn toe aan vlakken @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Voeg een uitsnijdingsgroep in @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Voeg een weergave toe aan uitsnijdingsgroep @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Verwijder een weergave van uitsnijdingsgroep @@ -215,30 +215,30 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section - Insert Complex Section + Complexe doorsnede invoegen - + Insert a Complex Section - Insert a Complex Section + Voeg een complexe doorsnede toe CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Verwijder cosmetisch object @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Verander uiterlijk van de lijnen - + Change Appearance of selected Lines Wijzig uiterlijk van geselecteerde lijnen @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Voeg een detailweergave in @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Voeg een schetswerkbankobject in - + Insert a View of a Draft Workbench object Voeg een aanzicht van een Draft Workbench object toe @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Bestand - + Export Page as DXF Exporteer pagina als DXF - + Save DXF file Bewaar Dxf-bestand - + DXF (*.dxf) Dxf (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Bestand - + Export Page as SVG Exporteer pagina als DXF @@ -413,12 +413,12 @@ Calculate the area of selected faces - Calculate the area of selected faces + Bereken het oppervlak van de geselecteerde vlakken Select several faces<br> - click this tool - Select several faces<br> - click this tool + Selecteer een aantal verschillende vlakken; - klik op dit gereedschap @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Voeg een middenlijn toe aan vlakken @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Voeg een Bitmap-afbeelding in - - + + Insert Bitmap from a file into a page Voeg een Bitmap in vanuit een bestand in een pagina - + Select an Image File Kies een afbeeldingsbestand - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Voeg een pagina in met behulp van een sjabloon - + Select a Template File Selecteer een sjabloonbestand - + Template (*.svg) Sjabloon (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Alle pagina's afdrukken @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projectvorm... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Voeg een projectiegroep in - + Insert multiple linked views of drawable object(s) Voeg meerdere gelinkte weergaven van het/de object(en) in @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Herteken pagina @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View - Sectie weergave + Doorsnede weergave - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Voeg een sectieweergave in @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Onzichtbare randen weergeven/verbergen @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Voeg een rekenbladweergave in - + Insert View to a spreadsheet Weergave toevoegen aan een rekenblad @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Vog een SVG-symbool in - + Insert symbol from an SVG file Symbool invoegen van een SVG-bestand @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Zet View Frames aan of uit @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Weergave toevoegen - + Insert a View Weergave toevoegen @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Voeg lasinformatie toe aan leiderslijn @@ -1964,58 +1964,58 @@ Command - + Drawing create page Toekennen maken pagina - + Create view Weergave maken - + Create Projection Group Projectiegroep maken - + Create Clip Maak Doorsnede - + ClipGroupAdd DoorsnedeGroepToevoeger - + ClipGroupRemove DoorsnedeGroepVerwijder - + Create Symbol Maak Symbool - + Create DraftView Draftweergave maken - + Create ArchView Maak Arch Weergave - + Create spreadsheet view Rekenbladweergave maken - - + + Save page to dxf Pagina in dxf opslaan @@ -2036,17 +2036,17 @@ - + Create Dimension Dimensie maken - + Create Hatch Maar Arcering - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch GeomHatch aanmaken - + Create Image Afbeelding maken @@ -2071,7 +2071,7 @@ Sleep de ballon - + Drag Dimension Dimensie slepen @@ -2081,7 +2081,7 @@ Ballon maken - + Create ActiveView Maak Actiefweergave @@ -2091,12 +2091,12 @@ Maak een middenlijn - + Create Cosmetic Line Cosmetische lijn maken - + Update CosmeticLine Symbolische lijn bijwerken @@ -2106,32 +2106,32 @@ Voeg een detailweergave in - + Update Detail Detail Bijwerken - + Create Leader Maak Leider - + Edit Leader Bewerk leider - + Create Anno Maak Annotatie - + Edit Anno Annotatie bewerken - + Create SectionView Sectie Weergave maken @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Sectieweergave bewerken - + Create WeldSymbol Lassymbool maken - + Edit WeldSymbol Bewerk lassymbool - + Add Cosmetic Vertex Voeg een cosmetisch eindpunt toe @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Verkeerde selectie - - + + No Shapes, Groups or Links in this selection Geen vormen, groepen of links in deze selectie - - + + Select at least 1 DrawViewPart object as Base. Selecteer minstens 1 DrawViewPart-object als basis. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Onjuiste selectie - - + + Select an object first Selecteer eerst een object - - + + Too many objects selected Te veel objecten geselecteerd - - + + Create a page first. Maak eerst een pagina. - + @@ -2800,87 +2800,87 @@ Geen aanzicht van een onderdeel in de selectie. - + Select one Clip group and one View. Selecteer één clipgroep en één weergave. - + Select exactly one View to add to group. Selecteer precies één Aanzicht om aan groep toe te voegen. - + Select exactly one Clip group. Selecteer precies één Clip groep. - + Clip and View must be from same Page. Clip en weergave moeten van dezelfde pagina zijn. - + Select exactly one View to remove from Group. Selecteer precies één Aanzicht om van groep te verwijderen. - + View does not belong to a Clip Weergave behoort niet tot een clip - + Choose an SVG file to open Kies een SVG-bestand om te openen - + Scalable Vector Graphic Schaalbare vectorafbeelding - + All Files Alle bestanden - + Select at least one object. Selecteer minstens één object. - + Please select only 1 Arch Section. Selecteer slechts 1 boogsectie. - + No Arch Sections in selection. Geen boogsecties in selectie. - + Select exactly one Spreadsheet object. Selecteer exact één Spreadsheet-object. - + No Drawing View Geen tekenweergave - + Open Drawing View before attempting export to SVG. Open de tekenweergave voordat u probeert te exporteren naar SVG. - + Can not export selection Selectie kan niet worden geëxporteerd - + Page contains DrawViewArch which will not be exported. Continue? Pagina bevat DrawViewArch die niet zal worden geëxporteerd. Doorgaan? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Selecteer 2 punten en 1 aanzicht. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Taak in uitvoering - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Verkeerde selectie @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. U moet een basisweergave voor deze lijn selecteren. @@ -3203,112 +3203,112 @@ Geen DrawViewPart-objecten in deze selectie - - + + No base View in Selection. Geen basisweergave in de selectie. - + You must select Faces or an existing CenterLine. U moet vlakken of een bestaand middenlijn selecteren. - + No CenterLine in selection. Geen middenlijn in selectie. - - - + + + Selection is not a CenterLine. Selectie is geen middenlijn. - + Selection not understood. Selectie niet begrepen. - + You must select 2 Vertexes or an existing CenterLine. U moet 2 eindpunten of een bestaande middenlijn selecteren. - + Need 2 Vertices or 1 CenterLine. Vereist 2 eindpunten of 1 middenlijn. - + Selection is empty. Selectie is leeg. - + Not enough points in selection. Niet genoeg punten in selectie. - + Selection is not a Cosmetic Line. Selectie is geen cosmetische lijn. - + You must select 2 Vertexes. U moet 2 hoekpunten selecteren. - - + + Nothing selected Niets geselecteerd - + At least 1 object in selection is not a part view Tenminste 1 object in de selectie is geen deelweergave - + Unknown object type in selection Onbekend objecttype in de selectie - + No View in Selection. Geen weergave in de selectie. - + You must select a View and/or lines. U moet een aanzicht en/of lijnen selecteren. - + No Part Views in this selection Geen deelweergaves in deze selectie - + Select exactly one Leader line or one Weld symbol. Selecteer precies een leiderslijn of een lassymbool. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection Geen %1 in selectie @@ -3323,33 +3323,33 @@ Sommige vlakken in de selectie zijn al gearceerd. Vervangen? - + No TechDraw Page Geen TechDraw-pagina - + Need a TechDraw Page for this command Dit commando vereist een TechDraw-pagina - + Select a Face first Kies eerst een vlak - + No TechDraw object in selection Geen TechDraw-object in de selectie - + Create a page to insert. Maak een pagina om in te voegen. - + No Faces to hatch in this selection Geen vlakken om te arceren in deze sectie @@ -3370,33 +3370,33 @@ Geen tekenpagina's in het document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Alle bestanden (*.*) - + Export Page As PDF Exporteren als PDF - + Document Name: Documentnaam: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exporteren als SVG @@ -3445,7 +3445,7 @@ Opgemaakte tekst-editor - + New Cosmetic Vertex Nieuw cosmetisch eindpunt @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Bewerking mislukt @@ -3538,12 +3538,12 @@ Bewerk lassymbool - + Create Cosmetic Line Cosmetische lijn maken - + Edit Cosmetic Line Bewerk Cosmetische lijn @@ -3678,7 +3678,7 @@ Geen subelementen geselecteerd - + @@ -3686,7 +3686,7 @@ Selectie is leeg - + No object selected @@ -3723,7 +3723,7 @@ Selecteer twee rechte lijnen - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,50 +5559,60 @@ Snel, maar resulteert in een verzameling van korte rechte lijnen. Alle pagina's afdrukken - + Different orientation Verschillende oriëntatie - + The printer uses a different orientation than the drawing. Do you want to continue? De printer gebruikt een andere richting dan de tekening. Wil je doorgaan? - + Different paper size Ander papierformaat - + The printer uses a different paper size than the drawing. Do you want to continue? De printer gebruikt een ander papierfromaat dan de tekening. Wilt u toch doorgaan? - + Opening file failed Bestand openen mislukt - + Can not open file %1 for writing. Kan bestand '%1' niet openen om te schrijven. - + Save DXF file Bewaar Dxf-bestand - + DXF (*.dxf) Dxf (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Geselecteerd: @@ -6087,7 +6097,12 @@ Do you want to continue? Geen richting ingesteld - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6106,7 +6121,7 @@ Do you want to continue? - + Point Picker Puntenkiezer @@ -6131,28 +6146,28 @@ Do you want to continue? Y - - + + Pick Points Kies punten - + Pick a point for cosmetic vertex Kies een punt voor het cosmetisch eindpunt - + Escape picking Escape picking - + Left click to set a point Klik met de linkermuisknop om een punt in te stellen - + In progress edit abandoned. Start over. Bewerking in uitvoering stopgezet. Opnieuw beginnen. @@ -7060,7 +7075,7 @@ Je kan meer punten kiezen om lijnsegmenten te krijgen. - + Pick Points Kies punten @@ -7141,51 +7156,51 @@ Je kan meer punten kiezen om lijnsegmenten te krijgen. - - - + + + Edit points Bewerk Punten - + Edit Points Bewerk Punten - - + + Pick a starting point for leader line Kies een startpunt voor de leiderslijn - + Save Points Punten opslaan - + Click and drag markers to adjust leader line Klik en sleep de markeringen om de leiderslijn aan te passen - - + + Save changes Wijzigingen opslaan - + Left click to set a point Klik met de linkermuisknop om een punt in te stellen - + Press OK or Cancel to continue Druk op OK of Annuleren om verder te gaan - + In progress edit abandoned. Start over. Bewerking in uitvoering stopgezet. Opnieuw beginnen. @@ -7715,6 +7730,11 @@ met behulp van de gegeven X/Y afstand Input the annotation text directly or start the rich text editor Voer de annotatietekst direct in of start de opgemaakte tekstverwerker + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7854,7 +7874,7 @@ met behulp van de gegeven X/Y afstand Niets om toe te passen. Nog geen sectierichting gekozen - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8143,6 +8163,11 @@ met behulp van de gegeven X/Y afstand other andere + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8170,7 +8195,7 @@ met behulp van de gegeven X/Y afstand TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Voegt een middenlijn tussen 2 lijnen toe @@ -8178,7 +8203,7 @@ met behulp van de gegeven X/Y afstand TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Voegt een middenlijn tussen 2 punten toe @@ -8186,7 +8211,7 @@ met behulp van de gegeven X/Y afstand TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8215,7 +8240,7 @@ met behulp van de gegeven X/Y afstand TechDraw_FaceCenterLine - + Adds a Centerline to Faces Voegt een middenlijn toe aan vlakken @@ -8247,7 +8272,7 @@ met behulp van de gegeven X/Y afstand TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8774,4 +8799,156 @@ een open taak dialoogvenster is. Kan niet verwijderen + + DrawPage + + + Page + Pagina + + + + DrawSVGTemplate + + + Template + Sjabloon + + + + DrawView + + + View + Aanzicht + + + + DrawViewPart + + + View + Aanzicht + + + + DrawViewSection + + + Section + Doorsnede + + + + DrawComplexSection + + + Section + Doorsnede + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Aantekening + + + + DrawViewImage + + + Image + Afbeelding + + + + DrawViewSymbol + + + Symbol + Symbool + + + + DrawViewArch + + + Arch + Boog + + + + DrawViewDraft + + + Draft + Schets + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Ballon + + + + DrawViewDimension + + + Dimension + Afmeting + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Arcering + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts index a710a886f0..b209c2e8c7 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Dodaj oś pomiędzy dwiema liniami @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Dodaj oś pomiędzy dwoma punktami @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw Rysunek Techniczny - + Add Centerline between 2 Lines Dodaj oś pomiędzy dwiema liniami @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw Rysunek Techniczny - + Add Centerline between 2 Points Dodaj oś pomiędzy dwoma punktami @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw Rysunek Techniczny - + Add Cosmetic Line Through 2 Points Dodaj linię kosmetyczną wytyczoną przez dwa punkty @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw Rysunek Techniczny - + Insert Active View (3D View) Wstaw aktywny widok (widok 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw Rysunek Techniczny - + Insert Arch Workbench Object Wstaw obiekt środowiska pracy Architektura - + Insert a View of a Section Plane from Arch Workbench Wstaw widok płaszczyzny przekroju z środowiska pracy Architektura @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw Rysunek Techniczny - + Insert Balloon Annotation Wstaw adnotację w formie dymka @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw Rysunek Techniczny - + Insert Center Line Dodaj linię środkową - + Add Centerline to Faces Dodaj oś ściany @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw Rysunek Techniczny - + Insert Clip Group Wstaw grupę wycinków @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw Rysunek Techniczny - + Add View to Clip Group Dodaj widok do grupy wycinków @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw Rysunek Techniczny - + Remove View from Clip Group Usuń widok z grupy wycinków @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw Rysunek Techniczny - + Insert Complex Section Wstaw przekrój złożony - + Insert a Complex Section Wstaw przekrój złożony @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw Rysunek Techniczny - + Remove Cosmetic Object Usuń geometrie pomocnicze @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw Rysunek Techniczny - + Change Appearance of Lines Zmień wygląd linii - + Change Appearance of selected Lines Zmień wygląd wybranych linii @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw Rysunek Techniczny - + Insert Detail View Wstaw widok szczegółu @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw Rysunek Techniczny - + Insert Draft Workbench Object Wstaw obiekt środowiska pracy Rysunek Roboczy - + Insert a View of a Draft Workbench object Wstaw widok obiektu środowiska pracy Rysunek Roboczy @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Plik - + Export Page as DXF Wyeksportuj stronę do formatu DXF - + Save DXF file Zapisz plik DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Plik - + Export Page as SVG Wyeksportuj stronę do formatu SVG @@ -1438,12 +1438,12 @@ CmdTechDrawFaceCenterLine - + TechDraw Rysunek Techniczny - + Add Centerline to Faces Dodaj oś ściany @@ -1503,28 +1503,28 @@ CmdTechDrawImage - + TechDraw Rysunek Techniczny - + Insert Bitmap Image Wstaw obraz bitmapy - - + + Insert Bitmap from a file into a page Wstaw na stronę bitmapę z pliku - + Select an Image File Wybierz plik z obrazem - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Pliki obrazów (*.jpg*.jpeg *.png *.bmp);; Wszystkie pliki (*) @@ -1610,22 +1610,22 @@ CmdTechDrawPageTemplate - + TechDraw Rysunek Techniczny - + Insert Page using Template Wstaw nową stronę przy użyciu szablonu - + Select a Template File Wybierz plik szablonu - + Template (*.svg) Szablon (*.svg) @@ -1633,12 +1633,12 @@ CmdTechDrawPrintAll - + TechDraw Rysunek Techniczny - + Print All Pages Drukuj wszystkie strony @@ -1646,12 +1646,12 @@ CmdTechDrawProjectShape - + TechDraw Rysunek Techniczny - + Project shape... Rzutuj kształt... @@ -1659,17 +1659,17 @@ CmdTechDrawProjectionGroup - + TechDraw Rysunek Techniczny - + Insert Projection Group Wstaw grupę rzutów - + Insert multiple linked views of drawable object(s) Wstaw wiele połączonych widoków kreślonego obiektu @@ -1703,12 +1703,12 @@ CmdTechDrawRedrawPage - + TechDraw Rysunek Techniczny - + Redraw Page Przerysuj stronę @@ -1729,22 +1729,22 @@ CmdTechDrawSectionGroup - + TechDraw Rysunek Techniczny - + Insert a simple or complex Section View Wstaw widok przekroju lub przekroju złożonego - + Section View Widok przekroju - + Complex Section Przekrój złożony @@ -1752,12 +1752,12 @@ CmdTechDrawSectionView - + TechDraw Rysunek Techniczny - + Insert Section View Wstaw widok przekroju @@ -1765,12 +1765,12 @@ CmdTechDrawShowAll - + TechDraw Rysunek Techniczny - + Show/Hide Invisible Edges Pokaż / ukryj niewidoczne krawędzie @@ -1778,17 +1778,17 @@ CmdTechDrawSpreadsheetView - + TechDraw Rysunek Techniczny - + Insert Spreadsheet View Wstaw widok arkusza kalkulacyjnego - + Insert View to a spreadsheet Wstaw widok do arkusza kalkulacyjnego @@ -1881,17 +1881,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw Rysunek Techniczny - + Create a Surface Finish Symbol Dodaj symbol wykończenia powierzchni - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Wybierz widok<br> - kliknij ten przycisk<br> - wybierz atrybuty symbolu wykończenia powierzchni w otwartym panelu @@ -1899,17 +1899,17 @@ CmdTechDrawSymbol - + TechDraw Rysunek Techniczny - + Insert SVG Symbol Wstaw symbol SVG - + Insert symbol from an SVG file Wstaw symbol z pliku SVG @@ -1917,13 +1917,13 @@ CmdTechDrawToggleFrame - + TechDraw Rysunek Techniczny - - + + Turn View Frames On/Off Włącz / wyłącz wyświetlanie ramek @@ -1957,17 +1957,17 @@ CmdTechDrawView - + TechDraw Rysunek Techniczny - + Insert View Wstaw widok - + Insert a View Wstaw widok @@ -1975,12 +1975,12 @@ CmdTechDrawWeldSymbol - + TechDraw Rysunek Techniczny - + Add Welding Information to Leaderline Dodaj informacje spawalnicze do linii odniesienia @@ -1989,58 +1989,58 @@ Command - + Drawing create page Tworzenie strony rysunku - + Create view Utwórz widok - + Create Projection Group Utwórz grupę rzutowania - + Create Clip Utwórz wycinek - + ClipGroupAdd Dodaj grupę wycinków - + ClipGroupRemove Usuń grupę wycinków - + Create Symbol Utwórz symbol - + Create DraftView Utwórz widok rysunku roboczego - + Create ArchView Utwórz widok środowiska pracy Architektura - + Create spreadsheet view Utwórz widok arkusza kalkulacyjnego - - + + Save page to dxf Zapisz stronę do pliku dxf @@ -2061,17 +2061,17 @@ - + Create Dimension Utwórz wymiar - + Create Hatch Utwórz kreskowanie - + Update Hatch Aktualizuj kreskowanie @@ -2081,12 +2081,12 @@ Usuń stare kreskowanie - + Create GeomHatch Utwórz kreskowanie geometryczne - + Create Image Utwórz obraz @@ -2096,7 +2096,7 @@ Przeciągnij balonik dymka - + Drag Dimension Przeciągnij wymiar @@ -2106,7 +2106,7 @@ Utwórz balonik dymka - + Create ActiveView Utwórz aktywny widok @@ -2116,12 +2116,12 @@ Utwórz linię środkową - + Create Cosmetic Line Utwórz linię kosmetyczną - + Update CosmeticLine Aktualizuj linię kosmetyczną @@ -2131,32 +2131,32 @@ Utwórz widok szczegółu - + Update Detail Zaktualizuj szczegóły - + Create Leader Utwórz linię odniesienia - + Edit Leader Edytuj linię odniesienia - + Create Anno Utwórz adnotację - + Edit Anno Edytuj adnotację - + Create SectionView Utwórz widok przekroju @@ -2166,23 +2166,23 @@ Utwórz przekrój złożony - - + + Edit SectionView Edytuj widok przekroju - + Create WeldSymbol Utwórz symbol spawalniczy - + Edit WeldSymbol Edytuj symbol spawalniczy - + Add Cosmetic Vertex Dodaj wierzchołek kosmetyczny @@ -2713,68 +2713,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Nieprawidłowy wybór - - + + No Shapes, Groups or Links in this selection Brak kształtów, grup lub odnośników w tym zaznaczeniu - - + + Select at least 1 DrawViewPart object as Base. Wybierz przynajmniej 1 obiekt DrawViewPart jako podstawę. - + I do not know what base view to use. Nie wiem, jaki widok bazowy zastosować. - + No Base View, Shapes, Groups or Links in this selection Brak widoku podstawowego, kształtów, grup i łączy w tym zaznaczeniu - + No profile object found in selection Nie znaleziono obiektu profilu w zaznaczeniu - - - + + + @@ -2783,36 +2783,36 @@ - - - - - - + + + + + + Incorrect selection Nieprawidłowy wybór - - + + Select an object first Najpierw wybierz obiekt - - + + Too many objects selected Wybrano zbyt wiele obiektów - - + + Create a page first. Najpierw stwórz stronę. - + @@ -2825,87 +2825,87 @@ Brak widoku części w wyborze. - + Select one Clip group and one View. Wybierz jedną grupę wycinków i jeden widok. - + Select exactly one View to add to group. Wybierz dokładnie jeden widok do dodania do grupy. - + Select exactly one Clip group. Wybierz dokładnie jedną grupę wycinków. - + Clip and View must be from same Page. Wycinek i widok muszą pochodzić z tej samej strony. - + Select exactly one View to remove from Group. Wybierz dokładnie jeden widok do usunięcia z grupy. - + View does not belong to a Clip Widok nie należy do wycinka - + Choose an SVG file to open Wybierz plik SVG do otwarcia - + Scalable Vector Graphic Skalowalna grafika wektorowa - + All Files Wszystkie pliki - + Select at least one object. Wybierz co najmniej jeden obiekt. - + Please select only 1 Arch Section. Proszę wybrać tylko jeden przekrój środowiska Architektura. - + No Arch Sections in selection. Brak przekrojów środowiska Architektura w zaznaczeniu. - + Select exactly one Spreadsheet object. Wybierz dokładnie jeden obiekt Arkusza. - + No Drawing View Brak widoku rysunku - + Open Drawing View before attempting export to SVG. Otwórz widok rysunku przed próbą eksportu do SVG. - + Can not export selection Nie można wykonać eksportu zaznaczonych obiektów - + Page contains DrawViewArch which will not be exported. Continue? Strona zawiera obiekty DrawViewArch, które nie zostaną wyeksportowane. Kontynuować? @@ -2951,9 +2951,9 @@ - - + + @@ -3084,24 +3084,24 @@ Wybierz dwa obiekty punktów i jeden widok. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3133,24 +3133,24 @@ Zadanie w toku - - - + + + - - - - - - - - - + + + + + + + + + @@ -3184,27 +3184,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Nieprawidłowy wybór @@ -3215,9 +3215,9 @@ - - - + + + You must select a base View for the line. Musisz wybrać widok dla odniesienia linii. @@ -3228,112 +3228,112 @@ Brak obiektów DrawViewPart w tym zaznaczeniu - - + + No base View in Selection. Brak bazowego widoku w zaznaczeniu. - + You must select Faces or an existing CenterLine. Musisz wybrać ściany lub istniejącą linię centralną. - + No CenterLine in selection. Brak linii centralnej w wyborze. - - - + + + Selection is not a CenterLine. Wybrany element nie jest linią środkową. - + Selection not understood. Zaznaczenie niezrozumiałe. - + You must select 2 Vertexes or an existing CenterLine. Musisz wybrać 2 wierzchołki lub istniejącą linię centralną. - + Need 2 Vertices or 1 CenterLine. Wymagane są dwa wierzchołki lub linia środkowa. - + Selection is empty. Obszar zaznaczenia nie zawiera obiektów. - + Not enough points in selection. Wybrano za małą ilość punktów. - + Selection is not a Cosmetic Line. Wybrany element nie jest Linią Kosmetyczną. - + You must select 2 Vertexes. Musisz wybrać 2 wierzchołki. - - + + Nothing selected Nic nie wybrano - + At least 1 object in selection is not a part view Co najmniej 1 obiekt w zaznaczeniu nie jest widokiem części - + Unknown object type in selection Nie znany typ obiektu w zaznaczeniu - + No View in Selection. Brak "widoku" w zaznaczeniu. - + You must select a View and/or lines. Musisz wybrać widok i/lub linie. - + No Part Views in this selection Brak widoków części w tym zaznaczeniu - + Select exactly one Leader line or one Weld symbol. Wybierz dokładnie jedną linię odniesienia lub jeden symbol spawalniczy. - - + + SurfaceFinishSymbols Symbole wykończenia powierzchni - + No Part View in Selection Brak widoku części w wyborze - + No %1 in Selection Brak %1 w zaznaczeniu @@ -3348,33 +3348,33 @@ Niektóre wybrane ściany posiadają już kreskowanie. Zastąpić? - + No TechDraw Page Brak strony TechDraw - + Need a TechDraw Page for this command Potrzebujesz strony Rysunku Technicznego dla tego polecenia - + Select a Face first Najpierw wybierz ścianę - + No TechDraw object in selection Brak obiektu środowiska Rysunek Techniczny w wyborze - + Create a page to insert. Utwórz stronę do wstawienia. - + No Faces to hatch in this selection Brak ściany do zakreskowania w tym zaznaczeniu @@ -3395,33 +3395,33 @@ Brak rysunków w dokumencie. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Wszystkie pliki (*.*) - + Export Page As PDF Wyeksportuj stronę do formatu PDF - + Document Name: Nazwa dokumentu: - + SVG (*.svg) SVG(*.svg) - + Export page as SVG Eksportuj stronę do formatu SVG @@ -3470,7 +3470,7 @@ Edytor tekstu sformatowanego - + New Cosmetic Vertex Nowy wierzchołek kosmetyczny @@ -3547,8 +3547,8 @@ Kierunek widoku określony współrzędnymi Widoku podstawowego - - + + Operation Failed Operacja nie powiodła się @@ -3563,12 +3563,12 @@ Edytuj symbol spawalniczy - + Create Cosmetic Line Utwórz linię kosmetyczną - + Edit Cosmetic Line Edytuj linię kosmetyczną @@ -3703,7 +3703,7 @@ Nie wybrano elementów podrzędnych - + @@ -3711,7 +3711,7 @@ Obszar zaznaczenia nie zawiera obiektów - + No object selected @@ -3748,7 +3748,7 @@ Proszę wybrać dwie linie proste - + Select 2 Vertexes or 1 Edge Wybierz 2 wierzchołki lub 1 krawędź @@ -5586,50 +5586,60 @@ Szybkie, ale wynikiem jest kolekcja krótkich linii prostych. Drukuj wszystkie strony - + Different orientation Odmienna orientacja - + The printer uses a different orientation than the drawing. Do you want to continue? Drukarka używa inną orientacje strony niż rysunek. Czy chcesz kontynuować? - + Different paper size Odmienny rozmiar papieru - + The printer uses a different paper size than the drawing. Do you want to continue? Drukarka używa innego rozmiaru papieru niż rysunek. Czy chcesz kontynuować? - + Opening file failed Otwarcie pliku nie powiodło się - + Can not open file %1 for writing. Nie można otworzyć pliku %1 do zapisu. - + Save DXF file Zapisz plik DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Wybrane: @@ -6114,7 +6124,12 @@ Czy chcesz kontynuować? Nie ustawiono kierunku - + + ComplexSection + Przekrój złożony + + + Can not continue. Object * %1 or %2 not found. Nie można kontynuować. Obiekt * %1 lub %2 nie został znaleziony. @@ -6133,7 +6148,7 @@ Czy chcesz kontynuować? - + Point Picker Wybór punktów @@ -6158,28 +6173,28 @@ Czy chcesz kontynuować? Y - - + + Pick Points Wybierz punkty - + Pick a point for cosmetic vertex Wybierz punkt dla wierzchołka kosmetycznego - + Escape picking Zakończ wskazywanie - + Left click to set a point Kliknij lewy przycisk myszki, aby ustawić punkt - + In progress edit abandoned. Start over. W trakcie edycji - przerwano. Zacznij od początku. @@ -7087,7 +7102,7 @@ Możesz wybrać kolejne punkty, aby uzyskać odcinki linii. - + Pick Points Wybierz punkty @@ -7168,51 +7183,51 @@ Możesz wybrać kolejne punkty, aby uzyskać odcinki linii. - - - + + + Edit points Edytuj punkty - + Edit Points Edytuj punkty - - + + Pick a starting point for leader line Wybierz punkt startowy dla linii odniesienia - + Save Points Zapisz punkty - + Click and drag markers to adjust leader line Kliknij i przeciągnij znaczniki, aby dostosować linię odniesienia - - + + Save changes Zapisz zmiany - + Left click to set a point Kliknij lewy przycisk myszki, aby ustawić punkt - + Press OK or Cancel to continue Naciśnij przycisk OK lub Anuluj, aby kontynuować - + In progress edit abandoned. Start over. W trakcie edycji - przerwano. Zacznij od początku. @@ -7742,6 +7757,11 @@ przy użyciu podanego odstępu X/Y Input the annotation text directly or start the rich text editor Wprowadź tekst adnotacji bezpośrednio lub uruchom edytor tekstu sformatowanego + + + RichTextAnnotation + Opis z tekstem sformatowanym + TechDrawGui::TaskSectionView @@ -7881,7 +7901,7 @@ przy użyciu podanego odstępu X/Y Nie ma nic do zastosowania. Nie wybrano jeszcze kierunku widoku dla przekroju - + Can not continue. Object * %1 or %2 not found. Nie można kontynuować. Obiekt * %1 lub %2 nie został znaleziony. @@ -8170,6 +8190,11 @@ przy użyciu podanego odstępu X/Y other pozostałe + + + SectionView + Widok przekroju + TechDrawGui::dlgTemplateField @@ -8197,7 +8222,7 @@ przy użyciu podanego odstępu X/Y TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Dodaj linię środkową pomiędzy dwoma liniami @@ -8205,7 +8230,7 @@ przy użyciu podanego odstępu X/Y TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Dodaj linię środkową pomiędzy dwoma punktami @@ -8213,7 +8238,7 @@ przy użyciu podanego odstępu X/Y TechDraw_ComplexSection - + Insert complex Section View Wstaw widok przekroju złożonego @@ -8242,7 +8267,7 @@ przy użyciu podanego odstępu X/Y TechDraw_FaceCenterLine - + Adds a Centerline to Faces Dodaje linię środkową do ściany @@ -8274,7 +8299,7 @@ przy użyciu podanego odstępu X/Y TechDraw_SectionView - + Insert simple Section View Wstaw widok przekroju @@ -8801,4 +8826,156 @@ jest otwarte okno dialogowe zadania. Nie można usunąć + + DrawPage + + + Page + Strona + + + + DrawSVGTemplate + + + Template + Szablon + + + + DrawView + + + View + Widok + + + + DrawViewPart + + + View + Widok + + + + DrawViewSection + + + Section + Przecięcie + + + + DrawComplexSection + + + Section + Przecięcie + + + + DrawViewDetail + + + Detail + Szczegół + + + + DrawActiveView + + + ActiveView + Aktywny widok + + + + DrawViewAnnotation + + + Annotation + Adnotacja + + + + DrawViewImage + + + Image + Obraz + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Architektura + + + + DrawViewDraft + + + Draft + Rysunek roboczy + + + + DrawLeaderLine + + + LeaderLine + Linia odniesienia + + + + DrawViewBalloon + + + Balloon + Dymek + + + + DrawViewDimension + + + Dimension + Wymiar + + + + DrawViewDimExtent + + + Extent + Przedłuż + + + + DrawHatch + + + Hatch + Kreskowanie + + + + DrawGeomHatch + + + GeomHatch + Kreskowanie geometryczne + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts index 7c46925f65..a879610ce2 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Adicionar linha central às duas linhas @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Adicionar linha central aos dois pontos @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - Desenhos Técnicos - + Add Centerline between 2 Lines Adicionar linha central às duas linhas @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - Desenhos Técnicos - + Add Centerline between 2 Points Adicionar linha central aos dois pontos @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - Desenhos Técnicos - + Add Cosmetic Line Through 2 Points Adicionar uma linha cosmética passando por 2 pontos @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - Desenhos Técnicos - + Insert Active View (3D View) Inserir Vista Ativa (vista 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - Desenhos Técnicos - + Insert Arch Workbench Object Inserir objeto da bancada Arch - + Insert a View of a Section Plane from Arch Workbench Inserir uma vista de um plano de corte da bancada Arch @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - Desenhos Técnicos - + Insert Balloon Annotation Inserir anotação de balão @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - Desenhos Técnicos - + Insert Center Line Inserir Linha Central - + Add Centerline to Faces Adicionar linha de centro em Faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - Desenhos Técnicos - + Insert Clip Group Inserir grupo de recorte @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - Desenhos Técnicos - + Add View to Clip Group Adicionar uma vista ao grupo de recorte @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - Desenhos Técnicos - + Remove View from Clip Group Remover vista do grupo de recorte @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - Desenhos Técnicos - + Insert Complex Section Inserir Seção Complexa - + Insert a Complex Section Inserir uma Seção Complexa @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - Desenhos Técnicos - + Remove Cosmetic Object Remover objeto cosmético @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - Desenhos Técnicos - + Change Appearance of Lines Alterar Aparência das Linhas - + Change Appearance of selected Lines Alterar a aparência das linhas selecionadas @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - Desenhos Técnicos - + Insert Detail View Inserir vista de detalhe @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - Desenhos Técnicos - + Insert Draft Workbench Object Inserir objeto da bancada Draft - + Insert a View of a Draft Workbench object Inserir uma vista de um objeto da bancada de trabalho Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Arquivo - + Export Page as DXF Exportar página como DXF - + Save DXF file Salvar arquivo DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Arquivo - + Export Page as SVG Exportar Página como SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - Desenhos Técnicos - + Add Centerline to Faces Adicionar linha de centro em Faces @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - Desenhos Técnicos - + Insert Bitmap Image Inserir imagem Bitmap - - + + Insert Bitmap from a file into a page Insere um bitmap de um arquivo em uma Página - + Select an Image File Selecione um arquivo de imagem - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - Desenhos Técnicos - + Insert Page using Template Inserir Página usando Modelo - + Select a Template File Selecione um arquivo de modelo - + Template (*.svg) Modelo (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - Desenhos Técnicos - + Print All Pages Imprimir todas as páginas @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - Desenhos Técnicos - + Project shape... Projetar forma... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - Desenhos Técnicos - + Insert Projection Group Inserir grupo de projeção - + Insert multiple linked views of drawable object(s) Inserir várias vistas ligadas dos objetos desenháveis @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - Desenhos Técnicos - + Redraw Page Redesenhar página @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - Desenhos Técnicos - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Vista de Seção - + Complex Section Seção Complexa @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - Desenhos Técnicos - + Insert Section View Inserir vista de corte @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - Desenhos Técnicos - + Show/Hide Invisible Edges Mostrar/ocultar arestas invisíveis @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - Desenhos Técnicos - + Insert Spreadsheet View Inserir vista da Planilha - + Insert View to a spreadsheet Inserir vista em uma planilha @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - Desenhos Técnicos - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - Desenhos Técnicos - + Insert SVG Symbol Inserir símbolo SVG - + Insert symbol from an SVG file Inserir o símbolo de um arquivo SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - Desenhos Técnicos - - + + Turn View Frames On/Off Ligar/desligar molduras das vistas @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - Desenhos Técnicos - + Insert View Inserir uma vista - + Insert a View Inserir uma vista @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - Desenhos Técnicos - + Add Welding Information to Leaderline Adicionar informações de solda na linha de anotação @@ -1964,58 +1964,58 @@ Command - + Drawing create page Criar página - + Create view Criar vista - + Create Projection Group Criar grupo de projeção - + Create Clip Criar recorte - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Criar símbolo - + Create DraftView Criar vista Draft - + Create ArchView Criar vista Arch - + Create spreadsheet view Criar vista de planilha - - + + Save page to dxf Salvar página para dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Criar dimensão - + Create Hatch Criar hachura - + Update Hatch Atualizar hachura @@ -2056,12 +2056,12 @@ Remover hachura antiga - + Create GeomHatch Criar hachura geométrica - + Create Image Criar imagem @@ -2071,7 +2071,7 @@ Arrastar Balão - + Drag Dimension Arrastar Dimensão @@ -2081,7 +2081,7 @@ Criar Balão - + Create ActiveView Criar vista ativa @@ -2091,12 +2091,12 @@ Criar linha central - + Create Cosmetic Line Criar Linha Cosmética - + Update CosmeticLine Atualizar linha cosmética @@ -2106,32 +2106,32 @@ Criar vista de detalhe - + Update Detail Atualizar detalhe - + Create Leader Criar anotação - + Edit Leader Editar anotação - + Create Anno Criar texto - + Edit Anno Editar texto - + Create SectionView Criar vista de corte @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Criar símbolo de solda - + Edit WeldSymbol Editar símbolo de solda - + Add Cosmetic Vertex Adicionar Vértice Cosmético @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Seleção errada - - + + No Shapes, Groups or Links in this selection Sem formas, grupos ou links nesta seleção - - + + Select at least 1 DrawViewPart object as Base. Selecione pelo menos 1 objeto DrawViewPart como Base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Seleção incorreta - - + + Select an object first Selecione um objeto primeiro - - + + Too many objects selected Demasiados objetos selecionados - - + + Create a page first. Primeiro, crie uma página. - + @@ -2800,87 +2800,87 @@ Nenhuma vista de uma peça na seleção. - + Select one Clip group and one View. Selecione um grupo de Clip e uma Visão. - + Select exactly one View to add to group. Selecione exatamente uma vista para adicionar ao grupo. - + Select exactly one Clip group. Selecione exatamente um grupo de recorte. - + Clip and View must be from same Page. Recorte e Vista devem estar na mesma página. - + Select exactly one View to remove from Group. Selecione exatamente uma vista para remover do grupo. - + View does not belong to a Clip A Vista não pertence a um Clip - + Choose an SVG file to open Escolha um arquivo SVG para abrir - + Scalable Vector Graphic Gráficos vetoriais escaláveis (Svg) - + All Files Todos os Arquivos - + Select at least one object. Selecione pelo menos um objeto. - + Please select only 1 Arch Section. Por favor selecione apenas 1 plano de corte Arch. - + No Arch Sections in selection. Nenhum plano de corte na seleção. - + Select exactly one Spreadsheet object. Selecione exatamente um objeto de planilha. - + No Drawing View Nenhuma Folha de desenho - + Open Drawing View before attempting export to SVG. Abra a folha de desenho antes de tentar a exportação de SVG. - + Can not export selection Não é possível exportar a seleção - + Page contains DrawViewArch which will not be exported. Continue? A página contém vistas de tipo DrawViewArch que não serão exportados. Continuar? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Selecionar 2 pontos e 1 vista. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Tarefa em andamento - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Seleção errada @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Você deve selecionar uma vista de base para a linha. @@ -3203,112 +3203,112 @@ Não há objetos DrawViewPart nesta seleção - - + + No base View in Selection. Nenhuma vista de base na seleção. - + You must select Faces or an existing CenterLine. Você deve selecionar faces ou uma linha de centro. - + No CenterLine in selection. Não há linha central na seleção. - - - + + + Selection is not a CenterLine. A seleção não é uma linha central. - + Selection not understood. Seleção não compreendida. - + You must select 2 Vertexes or an existing CenterLine. Você deve selecionar 2 vértices ou uma linha central existente. - + Need 2 Vertices or 1 CenterLine. Precisa de 2 vértices ou 1 linha central. - + Selection is empty. A seleção está vazia. - + Not enough points in selection. Não há pontos suficientes na seleção. - + Selection is not a Cosmetic Line. A seleção não é uma linha cosmética. - + You must select 2 Vertexes. Você deve selecionar 2 vértices. - - + + Nothing selected Nada foi selecionado - + At least 1 object in selection is not a part view Pelo menos 1 objeto na seleção não é uma vista de peça - + Unknown object type in selection Tipo de objeto desconhecido na seleção - + No View in Selection. Nenhuma vista na seleção. - + You must select a View and/or lines. Você deve selecionar uma vista e/ou linhas. - + No Part Views in this selection Nenhuma vista de peça nesta seleção - + Select exactly one Leader line or one Weld symbol. Selecione exatamente uma linha de anotações ou um símbolo de solda. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Algumas faces na seleção já estão hachuradas. Substituir? - + No TechDraw Page Nenhuma página TechDraw - + Need a TechDraw Page for this command Uma página TechDraw é necessária para este comando - + Select a Face first Selecione uma face primeiro - + No TechDraw object in selection Nenhum objeto TechDraw na seleção - + Create a page to insert. Crie uma página para inserir. - + No Faces to hatch in this selection Sem faces para preencher nesta seleção @@ -3370,33 +3370,33 @@ Não há páginas no documento. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Todos os arquivos (*.*) - + Export Page As PDF Exportar página para PDF - + Document Name: Nome do documento: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportar página para SVG @@ -3445,7 +3445,7 @@ Editor de texto - + New Cosmetic Vertex Novo vértice cosmético @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Falha na operação @@ -3538,12 +3538,12 @@ Editar símbolo de solda - + Create Cosmetic Line Criar Linha Cosmética - + Edit Cosmetic Line Editar Linha Cosmética @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ A seleção está vazia - + No object selected @@ -3723,7 +3723,7 @@ Por favor selecione duas linhas retas - + Select 2 Vertexes or 1 Edge Selecione 2 vértices ou 1 aresta @@ -5559,50 +5559,60 @@ Rápido, mas produz uma coleção de linhas retas simples. Imprimir todas as páginas - + Different orientation Orientação diferente - + The printer uses a different orientation than the drawing. Do you want to continue? A impressora utiliza uma orientação diferente do que o desenho. Deseja continuar? - + Different paper size Tamanho de papel diferente - + The printer uses a different paper size than the drawing. Do you want to continue? A impressora usa um tamanho de papel diferente do que o desenho. Deseja continuar? - + Opening file failed Falha ao abrir arquivo - + Can not open file %1 for writing. Não é possível abrir o arquivo '%1' para a gravação. - + Save DXF file Salvar arquivo DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Selecionado: @@ -6087,7 +6097,12 @@ Do you want to continue? No direction set - + + ComplexSection + Seção complexa + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6106,7 +6121,7 @@ Do you want to continue? - + Point Picker Selecionador de Pontos @@ -6131,28 +6146,28 @@ Do you want to continue? Y - - + + Pick Points Indicar pontos - + Pick a point for cosmetic vertex Indique um ponto para um vértice cosmético - + Escape picking Escape picking - + Left click to set a point Clique com o botão esquerdo para definir um ponto - + In progress edit abandoned. Start over. Edição abandonada. Comece novamente. @@ -7060,7 +7075,7 @@ Você pode indicar mais pontos para obter segmentos de linha. - + Pick Points Indicar pontos @@ -7141,51 +7156,51 @@ Você pode indicar mais pontos para obter segmentos de linha. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Indique um ponto de partida para a linha de anotações - + Save Points Salvar pontos - + Click and drag markers to adjust leader line Clique e arraste marcadores para ajustar a linha de anotações - - + + Save changes Salvar as alterações - + Left click to set a point Clique com o botão esquerdo para definir um ponto - + Press OK or Cancel to continue Pressione OK ou Cancelar para continuar - + In progress edit abandoned. Start over. Edição abandonada. Comece novamente. @@ -7715,6 +7730,11 @@ usando o espaçamento X/Y fornecido Input the annotation text directly or start the rich text editor Insira o texto da anotação diretamente ou inicie o editor de texto + + + RichTextAnnotation + Anotação + TechDrawGui::TaskSectionView @@ -7854,7 +7874,7 @@ usando o espaçamento X/Y fornecido Nada para aplicar. Nenhuma direção de seção selecionada ainda - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8143,6 +8163,11 @@ usando o espaçamento X/Y fornecido other outro + + + SectionView + Seção visualizar + TechDrawGui::dlgTemplateField @@ -8170,7 +8195,7 @@ usando o espaçamento X/Y fornecido TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adicionar linha central entre duas linhas @@ -8178,7 +8203,7 @@ usando o espaçamento X/Y fornecido TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adicionar linha central entre dois pontos @@ -8186,7 +8211,7 @@ usando o espaçamento X/Y fornecido TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8215,7 +8240,7 @@ usando o espaçamento X/Y fornecido TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adicionar linha central em faces @@ -8247,7 +8272,7 @@ usando o espaçamento X/Y fornecido TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8774,4 +8799,156 @@ there is an open task dialog. Não é possível excluir + + DrawPage + + + Page + Página + + + + DrawSVGTemplate + + + Template + Modelo + + + + DrawView + + + View + Vista + + + + DrawViewPart + + + View + Vista + + + + DrawViewSection + + + Section + Seção + + + + DrawComplexSection + + + Section + Seção + + + + DrawViewDetail + + + Detail + Detalhe + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Anotação + + + + DrawViewImage + + + Image + Imagem + + + + DrawViewSymbol + + + Symbol + Símbolo + + + + DrawViewArch + + + Arch + Arquitetura + + + + DrawViewDraft + + + Draft + Projeto + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balões + + + + DrawViewDimension + + + Dimension + Dimensão + + + + DrawViewDimExtent + + + Extent + Extensão + + + + DrawHatch + + + Hatch + Hachura + + + + DrawGeomHatch + + + GeomHatch + HachuraGeom + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts index 7de7add694..d81b439378 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Adicionar linha de eixo entre 2 linhas @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Adicionar linha de eixo entre 2 Pontos @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw (Desenhos Técnicos) - + Add Centerline between 2 Lines Adicionar linha de eixo entre 2 linhas @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw (Desenhos Técnicos) - + Add Centerline between 2 Points Adicionar linha de eixo entre 2 Pontos @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw (Desenhos Técnicos) - + Add Cosmetic Line Through 2 Points Adicionar Linha Cosmética Através de 2 Pontos @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Active View (3D View) Inserir a vista 3D ativa @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Arch Workbench Object Inserir uma vista de um plano de corte da bancada de trabalho Arquitetura - + Insert a View of a Section Plane from Arch Workbench Inserir uma vista de um plano de corte da bancada de trabalho Arquitetura @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Balloon Annotation Inserir um balão de anotação @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Center Line Inserir Linha de Eixo - + Add Centerline to Faces Adicionar linha de eixo ás Faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Clip Group Inserir grupo de recorte @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw (Desenhos Técnicos) - + Add View to Clip Group Adicionar vista ao grupo de recorte @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw (Desenhos Técnicos) - + Remove View from Clip Group Remover vista do grupo de recorte @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Complex Section Inserir secção complexa - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw (Desenhos Técnicos) - + Remove Cosmetic Object Remover objeto cosmético @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw (Desenhos Técnicos) - + Change Appearance of Lines Alterar Aparência das Linhas - + Change Appearance of selected Lines Alterar a aparência das linhas selecionadas @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Detail View Inserir vista de detalhe @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Draft Workbench Object Inserir objeto da bancada de trabalho Traço - + Insert a View of a Draft Workbench object Inserir uma vista de um objeto da bancada de trabalho Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Ficheiro - + Export Page as DXF Exportar página como DXF - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Ficheiro - + Export Page as SVG Exportar página como SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw (Desenhos Técnicos) - + Add Centerline to Faces Adicionar linha de eixo ás Faces @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Bitmap Image Inserir Imagem de Mapa de Bits - - + + Insert Bitmap from a file into a page Inserir ficheiro Mapa de bits numa página - + Select an Image File Selecione um Ficheiro de imagem - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Page using Template Inserir Folha usando Modelo - + Select a Template File Selecione um Ficheiro de modelo - + Template (*.svg) Modelo (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw (Desenhos Técnicos) - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw (Desenhos Técnicos) - + Project shape... Projetar forma... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Projection Group Inserir grupo de projeção - + Insert multiple linked views of drawable object(s) Inserir varias vistas ligadas dos objeto(s) "desenháveis" @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw (Desenhos Técnicos) - + Redraw Page Redesenhar Folha @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw (Desenhos Técnicos) - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Section View Inserir Vista de Seção @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw (Desenhos Técnicos) - + Show/Hide Invisible Edges Mostrar/Ocultar arestas invisíveis @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw (Desenhos Técnicos) - + Insert Spreadsheet View Inserir Vista de Tabela (folha de cálculo) - + Insert View to a spreadsheet Inserir vista numa Tabela (folha de cálculo) @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw (Desenhos Técnicos) - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw (Desenhos Técnicos) - + Insert SVG Symbol Inserir símbolo SVG - + Insert symbol from an SVG file Inserir símbolo de ficheiro SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw (Desenhos Técnicos) - - + + Turn View Frames On/Off Ligar/desligar molduras das vistas @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw (Desenhos Técnicos) - + Insert View Inserir vista - + Insert a View Inserir uma vista @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw (Desenhos Técnicos) - + Add Welding Information to Leaderline Adicionar Linha de chamada com Informações de soldadura @@ -1964,58 +1964,58 @@ Command - + Drawing create page Criar folha de desenho - + Create view Criar vista - + Create Projection Group Criar Grupo de Projeção - + Create Clip Criar recorte - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Criar símbolo - + Create DraftView Create DraftView - + Create ArchView Criar Vista de Arquitetura - + Create spreadsheet view Criar vista de folha de cálculo - - + + Save page to dxf Salvar folha para dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Criar cotagem - + Create Hatch Criar Trama - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Criar TramaGeometrica - + Create Image Criar imagem @@ -2071,7 +2071,7 @@ Arrastar Balão - + Drag Dimension Arrastar Dimensão @@ -2081,7 +2081,7 @@ Criar Balão - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Criar LinhadeEixo - + Create Cosmetic Line Criar Linha Cosmética - + Update CosmeticLine Atualizar LinhaCosmética @@ -2106,32 +2106,32 @@ Criar Vista de Detalhe - + Update Detail Atualizar detalhe - + Create Leader Criar chamada - + Edit Leader Editar chamada - + Create Anno Criar Anotação - + Edit Anno Editar Anotação - + Create SectionView Criar vista de corte @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Criar Símbolo de soldadura - + Edit WeldSymbol Editar Símbolo de soldadura - + Add Cosmetic Vertex Adicionar Vértice Cosmético @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Seleção errada - - + + No Shapes, Groups or Links in this selection Sem formas, grupos ou ligações nesta seleção - - + + Select at least 1 DrawViewPart object as Base. Selecione pelo menos 1 objeto DrawViewPart como Base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Selecção incorrecta - - + + Select an object first Selecione um objeto primeiro - - + + Too many objects selected Demasiados objetos selecionados - - + + Create a page first. Primeiro, crie uma página. - + @@ -2800,87 +2800,87 @@ Nenhuma vista de uma peça na seleção. - + Select one Clip group and one View. Selecione um grupo de recorte e uma vista. - + Select exactly one View to add to group. Selecione exatamente uma vista para adicionar ao grupo. - + Select exactly one Clip group. Selecione exatamente um grupo de recorte. - + Clip and View must be from same Page. Recorte e Vista devem estar na mesma folha. - + Select exactly one View to remove from Group. Selecione exatamente uma vista para remover do grupo. - + View does not belong to a Clip A Vista não pertence a um recorte - + Choose an SVG file to open Escolha um ficheiro SVG para abrir - + Scalable Vector Graphic Gráficos vetoriais escaláveis (Svg) - + All Files Todos os Ficheiros - + Select at least one object. Selecione pelo menos um objeto. - + Please select only 1 Arch Section. Por favor selecione apenas 1 seção de arquitetura. - + No Arch Sections in selection. Nenhuma seção de arquitetura na seleção. - + Select exactly one Spreadsheet object. Selecione apenas um objeto folha de cálculo. - + No Drawing View Nenhuma Folha de desenho - + Open Drawing View before attempting export to SVG. Abra a folha de desenho antes de tentar a exportação de SVG. - + Can not export selection Não é possível exportar a seleção - + Page contains DrawViewArch which will not be exported. Continue? A página contém vistas de arquitetura que não serão exportados. Continuar? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Selecione 2 pontos e 1 vista. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Tarefa em execução - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Seleção errada @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Deve selecionar uma vista base para a linha. @@ -3203,112 +3203,112 @@ Não há objetos de desenho nesta seleção - - + + No base View in Selection. Nenhuma vista base na seleção. - + You must select Faces or an existing CenterLine. Deve selecionar Faces ou uma linha de eixo. - + No CenterLine in selection. Não há linha de eixo na seleção. - - - + + + Selection is not a CenterLine. A seleção não é uma linha de eixo. - + Selection not understood. Seleção não compreendida. - + You must select 2 Vertexes or an existing CenterLine. Deve selecionar 2 vértices ou uma linha de eixo existente. - + Need 2 Vertices or 1 CenterLine. Precisa de 2 vértices ou 1 linha de eixo. - + Selection is empty. A seleção está vazia. - + Not enough points in selection. Não há pontos suficientes na seleção. - + Selection is not a Cosmetic Line. A seleção não é uma linha cosmética. - + You must select 2 Vertexes. Deve selecionar 2 vértices. - - + + Nothing selected Nada selecionado - + At least 1 object in selection is not a part view Pelo menos 1 objeto na seleção não é uma vista de peça - + Unknown object type in selection Tipo de objeto desconhecido na seleção - + No View in Selection. Nenhuma vista na seleção. - + You must select a View and/or lines. Deve selecionar uma vista e/ou linhas. - + No Part Views in this selection Não há vistas de peças nesta seleção - + Select exactly one Leader line or one Weld symbol. Selecione apenas uma linha de chamada ou um símbolo de soldadura. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Algumas faces na seleção já estão sombreadas. Substituir? - + No TechDraw Page Nenhuma folha TechDraw - + Need a TechDraw Page for this command É necessária uma folha TechDraw para este comando - + Select a Face first Seleccione uma face primeiro - + No TechDraw object in selection Nenhum objeto TechDraw na seleção - + Create a page to insert. Criar uma página para inserir. - + No Faces to hatch in this selection Sem faces para preencher nesta seleção @@ -3370,33 +3370,33 @@ Não há folhas de desenho no documento. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Todos os Ficheiros (*. *) - + Export Page As PDF Exportar folha como PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportar folha como SVG @@ -3445,7 +3445,7 @@ Editor de Rich text - + New Cosmetic Vertex Novo vértice cosmético @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Falha na Operação @@ -3538,12 +3538,12 @@ Editar Símbolo de soldadura - + Create Cosmetic Line Criar Linha Cosmética - + Edit Cosmetic Line Editar Linha Cosmética @@ -3678,7 +3678,7 @@ Nenhum sub-elemento selecionado - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,49 +5559,59 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Orientação diferente - + The printer uses a different orientation than the drawing. Do you want to continue? A impressora utiliza uma orientação diferente da folha de desenho. Deseja continuar? - + Different paper size Tamanho de papel diferente - + The printer uses a different paper size than the drawing. Do you want to continue? A impressora usa um tamanho de papel diferente da folha de desenho. Deseja continuar? - + Opening file failed Falha ao abrir ficheiro - + Can not open file %1 for writing. Não é possível abrir o ficheiro %1 para a escrita. - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Selecionado: @@ -6086,7 +6096,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6105,7 +6120,7 @@ Do you want to continue? - + Point Picker Point Picker @@ -6130,28 +6145,28 @@ Do you want to continue? Y - - + + Pick Points Escolher Pontos - + Pick a point for cosmetic vertex Pick a point for cosmetic vertex - + Escape picking Escape picking - + Left click to set a point Clique com o botão esquerdo para definir um ponto - + In progress edit abandoned. Start over. Edição em curso abandonada. Comece novamente. @@ -7059,7 +7074,7 @@ Você pode escolher pontos adicionais para obter segmentos de linha. - + Pick Points Escolher Pontos @@ -7140,51 +7155,51 @@ Você pode escolher pontos adicionais para obter segmentos de linha. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Escolha um ponto de partida para a linha de chamada - + Save Points Save Points - + Click and drag markers to adjust leader line Clique e arraste marcadores para ajustar a linha de chamada - - + + Save changes Guardar alterações - + Left click to set a point Clique com o botão esquerdo para definir um ponto - + Press OK or Cancel to continue Pressione OK ou Cancelar para continuar - + In progress edit abandoned. Start over. Edição em curso abandonada. Comece novamente. @@ -7714,6 +7729,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7853,7 +7873,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8142,6 +8162,11 @@ using the given X/Y Spacing other outro + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8169,7 +8194,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adds a Centerline between 2 Lines @@ -8177,7 +8202,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adds a Centerline between 2 Points @@ -8185,7 +8210,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8214,7 +8239,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8246,7 +8271,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8773,4 +8798,156 @@ há uma caixa de diálogo aberta. Não é possível eliminar + + DrawPage + + + Page + Folha de desenho + + + + DrawSVGTemplate + + + Template + Modelo + + + + DrawView + + + View + Ver + + + + DrawViewPart + + + View + Ver + + + + DrawViewSection + + + Section + Secção + + + + DrawComplexSection + + + Section + Secção + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Anotação + + + + DrawViewImage + + + Image + Imagem + + + + DrawViewSymbol + + + Symbol + Símbolo + + + + DrawViewArch + + + Arch + Arquitetura + + + + DrawViewDraft + + + Draft + Calado do Navio + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balão + + + + DrawViewDimension + + + Dimension + Dimensão + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Hatch + + + + DrawGeomHatch + + + GeomHatch + TramaGeometrica + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts index 70602bc36d..ffa653f4bb 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Add Centerline between 2 Lines @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Add Centerline between 2 Points @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw Desen tehnic - + Add Centerline between 2 Lines Add Centerline between 2 Lines @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw Desen tehnic - + Add Centerline between 2 Points Add Centerline between 2 Points @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw Desen tehnic - + Add Cosmetic Line Through 2 Points Add Cosmetic Line Through 2 Points @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw Desen tehnic - + Insert Active View (3D View) Insert Active View (3D View) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw Desen tehnic - + Insert Arch Workbench Object Insert Arch Workbench Object - + Insert a View of a Section Plane from Arch Workbench Insert a View of a Section Plane from Arch Workbench @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw Desen tehnic - + Insert Balloon Annotation Insert Balloon Annotation @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw Desen tehnic - + Insert Center Line Insert Center Line - + Add Centerline to Faces Add Centerline to Faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw Desen tehnic - + Insert Clip Group Insert Clip Group @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw Desen tehnic - + Add View to Clip Group Add View to Clip Group @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw Desen tehnic - + Remove View from Clip Group Remove View from Clip Group @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw Desen tehnic - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw Desen tehnic - + Remove Cosmetic Object Remove Cosmetic Object @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw Desen tehnic - + Change Appearance of Lines Change Appearance of Lines - + Change Appearance of selected Lines Change Appearance of selected Lines @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw Desen tehnic - + Insert Detail View Insert Detail View @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw Desen tehnic - + Insert Draft Workbench Object Insert Draft Workbench Object - + Insert a View of a Draft Workbench object Insert a View of a Draft Workbench object @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Fişier - + Export Page as DXF Export Page as DXF - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Fişier - + Export Page as SVG Export Page as SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw Desen tehnic - + Add Centerline to Faces Add Centerline to Faces @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw Desen tehnic - + Insert Bitmap Image Insert Bitmap Image - - + + Insert Bitmap from a file into a page Insert Bitmap from a file into a page - + Select an Image File Selectează o imagine - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,35 +1585,35 @@ CmdTechDrawPageTemplate - + TechDraw Desen tehnic - + Insert Page using Template Insert Page using Template - + Select a Template File Select a Template File - + Template (*.svg) - Template (*.svg) + Șablon (*.SVG) CmdTechDrawPrintAll - + TechDraw Desen tehnic - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw Desen tehnic - + Project shape... Proiectează forma... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw Desen tehnic - + Insert Projection Group Insert Projection Group - + Insert multiple linked views of drawable object(s) Insert multiple linked views of drawable object(s) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw Desen tehnic - + Redraw Page Redraw Page @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw Desen tehnic - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Vizualizare secțiune - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw Desen tehnic - + Insert Section View Insert Section View @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw Desen tehnic - + Show/Hide Invisible Edges Show/Hide Invisible Edges @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw Desen tehnic - + Insert Spreadsheet View Insert Spreadsheet View - + Insert View to a spreadsheet Insert View to a spreadsheet @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw Desen tehnic - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw Desen tehnic - + Insert SVG Symbol Introduceți SVG & Simbol - + Insert symbol from an SVG file Insert symbol from an SVG file @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw Desen tehnic - - + + Turn View Frames On/Off Turn View Frames On/Off @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw Desen tehnic - + Insert View Insert View - + Insert a View Insert a View @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw Desen tehnic - + Add Welding Information to Leaderline Add Welding Information to Leaderline @@ -1964,58 +1964,58 @@ Command - + Drawing create page Drawing create page - + Create view Create view - + Create Projection Group Create Projection Group - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Create Symbol - + Create DraftView Create DraftView - + Create ArchView Create ArchView - + Create spreadsheet view Create spreadsheet view - - + + Save page to dxf Save page to dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Create Dimension - + Create Hatch Create Hatch - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Create Image @@ -2071,7 +2071,7 @@ Drag Balloon - + Drag Dimension Drag Dimension @@ -2081,7 +2081,7 @@ Create Balloon - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Create CenterLine - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine Update CosmeticLine @@ -2106,32 +2106,32 @@ Create Detail View - + Update Detail Update Detail - + Create Leader Create Leader - + Edit Leader Edit Leader - + Create Anno Create Anno - + Edit Anno Edit Anno - + Create SectionView Create SectionView @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Create WeldSymbol - + Edit WeldSymbol Edit WeldSymbol - + Add Cosmetic Vertex Add Cosmetic Vertex @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Selecţie greşită - - + + No Shapes, Groups or Links in this selection No Shapes, Groups or Links in this selection - - + + Select at least 1 DrawViewPart object as Base. Selectaţi cel puţin 1 obiect DrawViewPart ca bază. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Selectarea incorectă - - + + Select an object first Selectaţi un obiect mai întâi - - + + Too many objects selected Prea multe obiecte selectate - - + + Create a page first. Creați /selectați o pagină mai întâi. - + @@ -2800,87 +2800,87 @@ No View of a Part in selection. - + Select one Clip group and one View. Select one Clip group and one View. - + Select exactly one View to add to group. Select exactly one View to add to group. - + Select exactly one Clip group. Select exactly one Clip group. - + Clip and View must be from same Page. Clip şi View trebuie să fie din aceeaşi pagină. - + Select exactly one View to remove from Group. Select exactly one View to remove from Group. - + View does not belong to a Clip View nu aparține unui Clip - + Choose an SVG file to open Alegeţi un fişier SVG pentru deschidere - + Scalable Vector Graphic Vector Grafic Scalabil (Svg) - + All Files Toate fișierele - + Select at least one object. Selectaţi cel puţin un obiect. - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. Selectați doar un singur obiect tip foaie de calcul Spreadsheet. - + No Drawing View Nu vezi desen în plan - + Open Drawing View before attempting export to SVG. Deschide vederea în plan înainte de a încerca exportul ca SVG. - + Can not export selection Can not export selection - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Select 2 point objects and 1 View. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Task In Progress - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Wrong Selection @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. You must select a base View for the line. @@ -3203,112 +3203,112 @@ No DrawViewPart objects in this selection - - + + No base View in Selection. No base View in Selection. - + You must select Faces or an existing CenterLine. You must select Faces or an existing CenterLine. - + No CenterLine in selection. No CenterLine in selection. - - - + + + Selection is not a CenterLine. Selection is not a CenterLine. - + Selection not understood. Selection not understood. - + You must select 2 Vertexes or an existing CenterLine. You must select 2 Vertexes or an existing CenterLine. - + Need 2 Vertices or 1 CenterLine. Need 2 Vertices or 1 CenterLine. - + Selection is empty. Selection is empty. - + Not enough points in selection. Not enough points in selection. - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. You must select 2 Vertexes. - - + + Nothing selected Nothing selected - + At least 1 object in selection is not a part view At least 1 object in selection is not a part view - + Unknown object type in selection Unknown object type in selection - + No View in Selection. No View in Selection. - + You must select a View and/or lines. You must select a View and/or lines. - + No Part Views in this selection No Part Views in this selection - + Select exactly one Leader line or one Weld symbol. Select exactly one Leader line or one Weld symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Some Faces in selection are already hatched. Replace? - + No TechDraw Page Nici o pagină de TechDraw - + Need a TechDraw Page for this command Aveți nevoie de o TechDraw Page pentru această comandă - + Select a Face first Selectaţi mai întâi o fațetă - + No TechDraw object in selection Nici un obiect de TechDraw în selecţie - + Create a page to insert. Creează o pagină pentru inserare - + No Faces to hatch in this selection Nici o fațetă în această selecţie @@ -3370,33 +3370,33 @@ No Drawing Pages in document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Toate fișierele (*.*) - + Export Page As PDF Exportă pagina ca PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportă pagina ca SVG @@ -3445,7 +3445,7 @@ Rich text editor - + New Cosmetic Vertex New Cosmetic Vertex @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3538,12 +3538,12 @@ Edit Welding Symbol - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,49 +5559,59 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Orientare diferită - + The printer uses a different orientation than the drawing. Do you want to continue? Imprimanta utilizează o orientare diferită decât desenul. Doriţi să continuaţi? - + Different paper size Hârtie de dimensiune diferită - + The printer uses a different paper size than the drawing. Do you want to continue? Imprimanta utilizează o altă dimensiune de hârtie decât desenul. Doriţi să continuaţi? - + Opening file failed Deschiderea fișierului a eșuat - + Can not open file %1 for writing. Imposibil de deschis fișierul %1 la scriere. - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Selectat: @@ -6086,7 +6096,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6105,7 +6120,7 @@ Do you want to continue? - + Point Picker Point Picker @@ -6130,28 +6145,28 @@ Do you want to continue? Y - - + + Pick Points Alegere Puncte - + Pick a point for cosmetic vertex Pick a point for cosmetic vertex - + Escape picking Escape picking - + Left click to set a point Left click to set a point - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7059,7 +7074,7 @@ You can pick further points to get line segments. - + Pick Points Alegere Puncte @@ -7140,51 +7155,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Pick a starting point for leader line - + Save Points Save Points - + Click and drag markers to adjust leader line Click and drag markers to adjust leader line - - + + Save changes Save changes - + Left click to set a point Left click to set a point - + Press OK or Cancel to continue Press OK or Cancel to continue - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7714,6 +7729,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7853,7 +7873,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8142,6 +8162,11 @@ using the given X/Y Spacing other other + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8169,7 +8194,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adds a Centerline between 2 Lines @@ -8177,7 +8202,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adds a Centerline between 2 Points @@ -8185,7 +8210,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8214,7 +8239,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8246,7 +8271,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8773,4 +8798,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Pagină + + + + DrawSVGTemplate + + + Template + Șablon + + + + DrawView + + + View + Vizualizare + + + + DrawViewPart + + + View + Vizualizare + + + + DrawViewSection + + + Section + Secţiune + + + + DrawComplexSection + + + Section + Secţiune + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Notatie + + + + DrawViewImage + + + Image + Imagine + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Arhi + + + + DrawViewDraft + + + Draft + Pescaj + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balloon + + + + DrawViewDimension + + + Dimension + Dimensiune + + + + DrawViewDimExtent + + + Extent + Măsură + + + + DrawHatch + + + Hatch + Hatch + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts index 7ce87e4b6b..e4334a7680 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Добавить Осевую линию между 2 Линиями @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Добавить Осевую линию между 2 Точками @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw Технический чертёж - + Add Centerline between 2 Lines Добавить Осевую линию между 2 Линиями @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw Технический чертёж - + Add Centerline between 2 Points Добавить Осевую линию между 2 Точками @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw Технический чертёж - + Add Cosmetic Line Through 2 Points Добавить вспомогательную линию между 2-мя точками @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw Технический чертёж - + Insert Active View (3D View) Вставить Активный вид (3D Вид) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw Технический чертёж - + Insert Arch Workbench Object Вставить Объект верстака Arch - + Insert a View of a Section Plane from Arch Workbench Вставить сечение Вида из верстака Arch @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw Технический чертёж - + Insert Balloon Annotation Вставить примечание в выноску @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw Технический чертёж - + Insert Center Line Добавить осевую линию - + Add Centerline to Faces Добавить Осевую линию к Граням @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw Технический чертёж - + Insert Clip Group Создать группу Видов @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw Технический чертёж - + Add View to Clip Group Добавляет Вид в группу @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw Технический чертёж - + Remove View from Clip Group Удалить Вид из группы @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw Технический чертёж - + Insert Complex Section Добавить сложную секцию - + Insert a Complex Section Вставить сложный раздел @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw Технический чертёж - + Remove Cosmetic Object Удалить вспомогательный объект @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw Технический чертёж - + Change Appearance of Lines Изменить внешний вид линий - + Change Appearance of selected Lines Изменить внешний вид выбранных линий @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw Технический чертёж - + Insert Detail View Вставить выносной элемент @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw Технический чертёж - + Insert Draft Workbench Object Вставить Объект верстака Draft - + Insert a View of a Draft Workbench object Вставить вид объекта из верстака Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Файл - + Export Page as DXF Экспорт листа в DXF - + Save DXF file Сохранить файл в DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Файл - + Export Page as SVG Экспорт листа в SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw Технический чертёж - + Add Centerline to Faces Добавить Осевую линию к Граням @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw Технический чертёж - + Insert Bitmap Image Вставить растровое изображение - - + + Insert Bitmap from a file into a page Вставить растровое изображение из файла на страницу - + Select an Image File Выберите файл изображения - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Файлы изображений (*.jpg *.jpeg *.png *.bmp);;Все файлы (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw Технический чертёж - + Insert Page using Template Вставить страницу используя шаблон - + Select a Template File Выбрать файл шаблона - + Template (*.svg) Шаблон (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw Технический чертёж - + Print All Pages Распечатать все страницы @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw Технический чертёж - + Project shape... Проекция фигуры... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw Технический чертёж - + Insert Projection Group Вставить группу проекций - + Insert multiple linked views of drawable object(s) Вставка нескольких связанных видов объектов чертежа @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw Технический чертёж - + Redraw Page Обновить содержимое листа @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw Технический чертёж - + Insert a simple or complex Section View Вставить вид простого или сложного сечения - + Section View Вид Сечения - + Complex Section Ступенчатый разрез @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw Технический чертёж - + Insert Section View Вставить сечение Вида @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw Технический чертёж - + Show/Hide Invisible Edges Показать/скрыть невидимые края @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw Технический чертёж - + Insert Spreadsheet View Вставить вид Электронной Таблицы - + Insert View to a spreadsheet Вставить Вид электронной таблицы @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw Технический чертёж - + Create a Surface Finish Symbol Создать символ финиширования поверхности - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Выберите представление<br> - нажмите эту кнопку<br> - выбрать атрибуты обозначения шероховатости поверхности в открывшейся панели @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw Технический чертёж - + Insert SVG Symbol Вставить SVG знак - + Insert symbol from an SVG file Вставить символ из файла SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw Технический чертёж - - + + Turn View Frames On/Off Скрыть/показать элементы для редактирования чертежа @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw Технический чертёж - + Insert View Вставить Вид - + Insert a View Вставить Вид @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw Технический чертёж - + Add Welding Information to Leaderline Добавить информацию о сварке в указательную линию @@ -1964,58 +1964,58 @@ Command - + Drawing create page Страница создания рисунка - + Create view Создать вид - + Create Projection Group Создать группу проекций - + Create Clip Создать Сечение - + ClipGroupAdd Добавить Вид в группу - + ClipGroupRemove Удалить Вид из группы - + Create Symbol Создать Знак - + Create DraftView Создать Draft Вид - + Create ArchView Создать Arch Вид - + Create spreadsheet view Создать электронную таблицу - - + + Save page to dxf Сохранить лист в DXF формате @@ -2036,17 +2036,17 @@ - + Create Dimension Указать размер - + Create Hatch Создать штриховку - + Update Hatch Обновить штриховку @@ -2056,12 +2056,12 @@ Удалить старые штриховки - + Create GeomHatch Создать геометрическую штриховку - + Create Image Создать изображение @@ -2071,7 +2071,7 @@ Переместить позиционную выноску - + Drag Dimension Перетащите размер @@ -2081,7 +2081,7 @@ Создать позиционную выноску - + Create ActiveView Создать активный вид @@ -2091,12 +2091,12 @@ Создать центральную линию - + Create Cosmetic Line Создать Косметическую Линию - + Update CosmeticLine Обновить вспомогательную линию @@ -2106,32 +2106,32 @@ Создать выносной элемент - + Update Detail Обновить детали - + Create Leader Создать выноску - + Edit Leader Править выноску - + Create Anno Создать аннотацию - + Edit Anno Изменить Аннотацию - + Create SectionView Создать Вид Сечения @@ -2141,23 +2141,23 @@ Создать Сложное сечение - - + + Edit SectionView Изменить вид Сечения - + Create WeldSymbol Создать знак сварного соединения - + Edit WeldSymbol Редактировать знак сварных соединений - + Add Cosmetic Vertex Добавить вспомогательную вершину @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Неправильное выделение - - + + No Shapes, Groups or Links in this selection Нет Фигур, Групп или Ссылок в выделении - - + + Select at least 1 DrawViewPart object as Base. Выберите хотя бы один вид детали как базовый. - + I do not know what base view to use. Я не знаю, какой базовый обзор использовать. - + No Base View, Shapes, Groups or Links in this selection В этом выборе нет базового вида, фигур, групп или ссылок - + No profile object found in selection Не найдено объектов профиля в выборке - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Некорректный выбор - - + + Select an object first Сначала выберите объект - - + + Too many objects selected Выбрано слишком много объектов - - + + Create a page first. Сначала создайте страницу. - + @@ -2800,87 +2800,87 @@ Нет видов детали в выбранном. - + Select one Clip group and one View. Выберите одну группу и один Вид. - + Select exactly one View to add to group. Выберите ровно одно представление для добавления в группу. - + Select exactly one Clip group. Вы можете выбрать только одну группу. - + Clip and View must be from same Page. Сечение и вид должны быть из одного листа. - + Select exactly one View to remove from Group. Выберите ровно одно представление для удаления из группы. - + View does not belong to a Clip Вид не принадлежит сечению - + Choose an SVG file to open Выберите файл SVG для открытия - + Scalable Vector Graphic Масштабируемая векторная графика - + All Files Все файлы - + Select at least one object. Выберите хотя бы один объект. - + Please select only 1 Arch Section. Выберите только одно архитектурное сечение. - + No Arch Sections in selection. Нет арочного сечения в выборе - + Select exactly one Spreadsheet object. Выберите только один объект типа Таблица. - + No Drawing View Нет видов чертежа - + Open Drawing View before attempting export to SVG. Открыть вид чертежа перед экспортом в SVG. - + Can not export selection Невозможно экспортировать выбранное - + Page contains DrawViewArch which will not be exported. Continue? Страница содержит DrawViewArch, который не будет экспортирован. Продолжить? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Выберите 2 точечные объекты и 1 Вид. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Задача в процессе - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Неправильный выбор @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Необходимо выбрать базовый вид для линии. @@ -3203,112 +3203,112 @@ Нет объектов DrawViewPart в выбранном - - + + No base View in Selection. Нет базового вида в выбранном. - + You must select Faces or an existing CenterLine. Вы должны выбрать Грани или существующую Осевую Линию. - + No CenterLine in selection. В выбранном нет ОсевойЛинии. - - - + + + Selection is not a CenterLine. Выделение не является центральной линией. - + Selection not understood. Выделение не понятно. - + You must select 2 Vertexes or an existing CenterLine. Вы должны выбрать 2 вершины или существующую осевую линию. - + Need 2 Vertices or 1 CenterLine. Требуется две вершины или одна центральная линия. - + Selection is empty. Выделение пусто. - + Not enough points in selection. Выбрано недостаточно точек. - + Selection is not a Cosmetic Line. Выделенный объект не является вспомогательной линией. - + You must select 2 Vertexes. Вы должны выбрать 2 Вершины. - - + + Nothing selected Ничего не выбрано - + At least 1 object in selection is not a part view Минимум 1 объект в выбранном не является местным видом - + Unknown object type in selection Неизвестный тип объекта в выбранном - + No View in Selection. Нет Вида в выделенном. - + You must select a View and/or lines. Вы должны выбрать Вид и/или линии. - + No Part Views in this selection Нет видов Детали в этом выборе - + Select exactly one Leader line or one Weld symbol. Выберите только одну линию-выноску или один знак сварки. - - + + SurfaceFinishSymbols Символы шероховатости поверхности - + No Part View in Selection Нет просмотра части(детали) в выделении - + No %1 in Selection Нет %1 в выборе @@ -3323,33 +3323,33 @@ Некоторые Грани в выборке уже заштрихованы. Заменить? - + No TechDraw Page Отсутствует лист чертежа - + Need a TechDraw Page for this command Требуется лист чертежа для этой команды - + Select a Face first Сначала выберите поверхность - + No TechDraw object in selection В вашем выборе нет объекта технического чертежа - + Create a page to insert. Создать страницу для вставки. - + No Faces to hatch in this selection Нет граней для штриховки в этом выделении @@ -3370,33 +3370,33 @@ В документе нет страниц чертежа. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Все файлы (*.*) - + Export Page As PDF Экспорт листа в PDF - + Document Name: Название документа: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Экспорт листа в SVG @@ -3445,7 +3445,7 @@ Редактор форматированного текста - + New Cosmetic Vertex Новая вспомогательная вершина @@ -3522,8 +3522,8 @@ Направление просмотра в координатах BaseView - - + + Operation Failed Операция неудачна @@ -3538,12 +3538,12 @@ Редактировать знак сварного соединения - + Create Cosmetic Line Создать Косметическую Линию - + Edit Cosmetic Line Изменить вспомогательную линию @@ -3678,7 +3678,7 @@ Подэлементы не выбраны - + @@ -3686,7 +3686,7 @@ Пустое выделение - + No object selected @@ -3723,7 +3723,7 @@ Пожалуйста, выберите две прямые линии - + Select 2 Vertexes or 1 Edge Выберите 2 вершины или 1 край @@ -5555,51 +5555,61 @@ Fast, but result is a collection of short straight lines. Распечатать все страницы - + Different orientation Другая ориентация - + The printer uses a different orientation than the drawing. Do you want to continue? Принтер использует отличающуюся от чертежа ориентацию бумаги. Хотите продолжить? - + Different paper size Разный размер бумаги - + The printer uses a different paper size than the drawing. Do you want to continue? Принтер использует отличающийся от чертежа формат листа. Хотите продолжить? - + Opening file failed Ошибка при открытии файла - + Can not open file %1 for writing. Не удалось открыть файл %1 для записи. - + Save DXF file Сохранить файл в DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Выбрано: @@ -6084,7 +6094,12 @@ Do you want to continue? Направление не задано - + + ComplexSection + Комплексный раздел + + + Can not continue. Object * %1 or %2 not found. Невозможно продолжить. Объект * %1 или %2 не найден. @@ -6103,7 +6118,7 @@ Do you want to continue? - + Point Picker Выбор точек @@ -6128,28 +6143,28 @@ Do you want to continue? Y - - + + Pick Points Выбрать точки - + Pick a point for cosmetic vertex Выберите точку для косметической вершины - + Escape picking Отменить выбор - + Left click to set a point Щёлкните левой кнопкой мыши, чтобы установить точку - + In progress edit abandoned. Start over. Редактирование прекращено. Начать сначала. @@ -7056,7 +7071,7 @@ You can pick further points to get line segments. - + Pick Points Выбрать точки @@ -7137,51 +7152,51 @@ You can pick further points to get line segments. - - - + + + Edit points Редактировать точки - + Edit Points Редактировать точки - - + + Pick a starting point for leader line Выберите начальную точку для линии-выноски - + Save Points Сохранить точки - + Click and drag markers to adjust leader line Нажмите и перетащите маркеры для настройки указательной линии - - + + Save changes Сохранить изменения - + Left click to set a point Щёлкните левой кнопкой мыши, чтобы установить точку - + Press OK or Cancel to continue Нажмите OK или Отмена, чтобы продолжить - + In progress edit abandoned. Start over. Редактирование прекращено. Начать сначала. @@ -7711,6 +7726,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Введите текст прямо в аннотацию или запустите расширенный текстовый редактор + + + RichTextAnnotation + Расширенная текстовая аннотация + TechDrawGui::TaskSectionView @@ -7850,7 +7870,7 @@ using the given X/Y Spacing Нечего применять. Направление раздела пока не выбрано - + Can not continue. Object * %1 or %2 not found. Невозможно продолжить. Объект * %1 или %2 не найден. @@ -8139,6 +8159,11 @@ using the given X/Y Spacing other другое + + + SectionView + Вид в разрезе + TechDrawGui::dlgTemplateField @@ -8166,7 +8191,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Добавить осевую линию между 2 линиями @@ -8174,7 +8199,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Добавить осевую линию между 2 точками @@ -8182,7 +8207,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Вставить вид сложного сечения @@ -8211,7 +8236,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Добавить Осевую линию к Граням @@ -8243,7 +8268,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Вставить вид простого сечения @@ -8770,4 +8795,156 @@ there is an open task dialog. Невозможно удалить + + DrawPage + + + Page + Страница + + + + DrawSVGTemplate + + + Template + Шаблон + + + + DrawView + + + View + Вид + + + + DrawViewPart + + + View + Вид + + + + DrawViewSection + + + Section + Разделить + + + + DrawComplexSection + + + Section + Разделить + + + + DrawViewDetail + + + Detail + Подробности + + + + DrawActiveView + + + ActiveView + Активный просмотр + + + + DrawViewAnnotation + + + Annotation + Заметка + + + + DrawViewImage + + + Image + Изображение + + + + DrawViewSymbol + + + Symbol + Знак + + + + DrawViewArch + + + Arch + Архитектурный + + + + DrawViewDraft + + + Draft + Осадка + + + + DrawLeaderLine + + + LeaderLine + Линия-выноска + + + + DrawViewBalloon + + + Balloon + Позиционная выноска + + + + DrawViewDimension + + + Dimension + Размер + + + + DrawViewDimExtent + + + Extent + Масштаб + + + + DrawHatch + + + Hatch + Штриховка + + + + DrawGeomHatch + + + GeomHatch + Геометрическая Штриховка + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts index b302a5261f..8374d7c523 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Dodaj središčnico med dve daljici @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Dodaj središčnico med dve točki @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TehRisanje - + Add Centerline between 2 Lines Dodaj središčnico med dve daljici @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TehRisanje - + Add Centerline between 2 Points Dodaj središčnico med dve točki @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TehRisanje - + Add Cosmetic Line Through 2 Points Dodaj skozi dve točki dopolnilno daljco @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TehRisanje - + Insert Active View (3D View) Vstavi dejavni pogled (3D pogled) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TehRisanje - + Insert Arch Workbench Object Vstavi predmet iz delovnega okolja Arch - + Insert a View of a Section Plane from Arch Workbench Vstavi pogled prerezne ravnine iz delovnega okolja Arhi (Arch) @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TehRisanje - + Insert Balloon Annotation Vstavi opisnico @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TehRisanje - + Insert Center Line Vstavi središčnico - + Add Centerline to Faces Dodaj ploskvam središčnico @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TehRisanje - + Insert Clip Group Vstavi izsečno skupino @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TehRisanje - + Add View to Clip Group Dodaj pogled izsečni skupini @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TehRisanje - + Remove View from Clip Group Podstrani pogled iz izsečne skupine @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TehRisanje - + Insert Complex Section Vstavi sestavljen prerez - + Insert a Complex Section Vstavi sestavljen prerez @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TehRisanje - + Remove Cosmetic Object Odstrani dopolnilni predmet @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TehRisanje - + Change Appearance of Lines Spremeni videz črt - + Change Appearance of selected Lines Spremeni videz črt @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TehRisanje - + Insert Detail View Uredi podrobni pogled @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TehRisanje - + Insert Draft Workbench Object Vstavi predmet iz izrisnega (Draft) delovnega okolja - + Insert a View of a Draft Workbench object Vstavi Pogled predmeta iz izrisnega (Draft) delovnega okolja @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Datoteka - + Export Page as DXF Izvozi stran kot DXF - + Save DXF file Shrani datoteko DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Datoteka - + Export Page as SVG Izvozi stran kot SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TehRisanje - + Add Centerline to Faces Dodaj ploskvam središčnico @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TehRisanje - + Insert Bitmap Image Vstavi točkovno sliko - - + + Insert Bitmap from a file into a page Vstavi v stran točkovno sliko iz datoteke - + Select an Image File Izberite datoteko slike - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Slikovne datoteke (*.jpg *.jpeg *.png *.bmp);;Vse datoteke (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TehRisanje - + Insert Page using Template Vstavi stran iz predloge - + Select a Template File Izberite datoteko predloge - + Template (*.svg) Predloga (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TehRisanje - + Print All Pages Natisni vse strani @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TehRisanje - + Project shape... Preslikaj obliko … @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TehRisanje - + Insert Projection Group Vstavi Skupino preslikav - + Insert multiple linked views of drawable object(s) Vstavite več povezanih pogledov risanega(-ih) predmeta(-ov) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TehRisanje - + Redraw Page Ponovno izriši stran @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TehRisanje - + Insert a simple or complex Section View Vstavi pogled enostavnega ali sestavljenega prereza - + Section View Prerezni pogled - + Complex Section Sestavljeni prerez @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TehRisanje - + Insert Section View Vstavi prerezni pogled @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TehRisanje - + Show/Hide Invisible Edges Prikaži/skrij nevidne robove @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TehRisanje - + Insert Spreadsheet View Vstavi pogled Preglednice - + Insert View to a spreadsheet Vstavi Pogled v preglednico @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TehRisanje - + Create a Surface Finish Symbol Ustvari znak površinske obdelave - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Izberi pogled<br> - kliknite ta gumb<br> - izberite značilke znaka površinske obdelave v odprtem oknu @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TehRisanje - + Insert SVG Symbol Vstavi SVG znak - + Insert symbol from an SVG file Vstavi znak iz datoteke SVG @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TehRisanje - - + + Turn View Frames On/Off Vklopi ali izklopi Okvire Pogledov @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TehRisanje - + Insert View Vstavi pogled - + Insert a View Vstavi pogled @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TehRisanje - + Add Welding Information to Leaderline Dodaj opisnici podatek o varjenju @@ -1964,58 +1964,58 @@ Command - + Drawing create page Stran izdelovanja risbe - + Create view Ustvari pogled - + Create Projection Group Ustvari Skupino preslikav - + Create Clip Ustvari izrezek - + ClipGroupAdd DodajIzrezekSkupine - + ClipGroupRemove OdstraniIzrezekSkupine - + Create Symbol Ustvari znak - + Create DraftView Ustvari izrisni (Draft) pogled - + Create ArchView Ustvari ArhitekturniPogled - + Create spreadsheet view Ustvari preglednični pogled - - + + Save page to dxf Shrani stran kot DXF @@ -2036,17 +2036,17 @@ - + Create Dimension Ustvari koto - + Create Hatch Ustvari črtkanje - + Update Hatch Posodobi črtkanje @@ -2056,12 +2056,12 @@ Odstrani staro črtkanje - + Create GeomHatch Ustvari GeometričnoČrtkanje - + Create Image Ustvari sliko @@ -2071,7 +2071,7 @@ Vleci opisnico - + Drag Dimension Vleci koto @@ -2081,7 +2081,7 @@ Ustvari opisnico - + Create ActiveView Ustvari DejavniPogled @@ -2091,12 +2091,12 @@ Ustvari Središčnico - + Create Cosmetic Line Ustvari dopolnilno črto - + Update CosmeticLine Posodobi dopolnilno daljico @@ -2106,32 +2106,32 @@ Ustvari podrobni pogled - + Update Detail Posodobi detajl - + Create Leader Ustvari opisnico - + Edit Leader Uredi opisnico - + Create Anno Ustvari pripis - + Edit Anno Uredi pripis - + Create SectionView Ustvari prerezni pogled @@ -2141,23 +2141,23 @@ Ustvari sestavljeni prerez - - + + Edit SectionView Uredi prerezni pogled - + Create WeldSymbol Ustvari oznako za zvar - + Edit WeldSymbol Uredi oznako za zvar - + Add Cosmetic Vertex Dodaj dopolnilno oglišče @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Napačna izbira - - + + No Shapes, Groups or Links in this selection V tem izboru ni Oblik, Skupin ali Povezav - - + + Select at least 1 DrawViewPart object as Base. Izberite vsaj 1 DrawViewPart predmet kot osnovo. - + I do not know what base view to use. Ne vem, kateri osnovni pogled uporabiti. - + No Base View, Shapes, Groups or Links in this selection V tem izboru ni Osnovnega pogleda, Oblik, Skupin ali Povezav - + No profile object found in selection V izboru ni nobenega prereznega predmeta - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Nepravilen izbor - - + + Select an object first Izberite najprej predmet - - + + Too many objects selected Izbranih je preveč predmetov - - + + Create a page first. Najprej ustvarite stran. - + @@ -2800,87 +2800,87 @@ V izboru ni pogleda na del. - + Select one Clip group and one View. Izberite eno skupino Izrezkov in en Pogled. - + Select exactly one View to add to group. Izberi natanko en Pogled za dodajanje v skupino. - + Select exactly one Clip group. Izberi natanko eno skupino Izrezkov. - + Clip and View must be from same Page. Izrezek in Pogled morata biti iz iste Strani. - + Select exactly one View to remove from Group. Izberi natanko en Pogled za odstranitev iz skupine. - + View does not belong to a Clip Pogled ne pripada Clip-u - + Choose an SVG file to open Izberite datoteko SVG, ki jo želite odpreti - + Scalable Vector Graphic Vektorska slika spremenljive velikosti - + All Files Vse datoteke - + Select at least one object. Izberite vsaj en predmet. - + Please select only 1 Arch Section. Izberite le en prerez Arhitekture. - + No Arch Sections in selection. Nobenega prereza Arhitekture ni v izboru. - + Select exactly one Spreadsheet object. Izberite natanko eno preglednico. - + No Drawing View Ni Risarskega pogleda - + Open Drawing View before attempting export to SVG. Odpri Drawing Pogled preden poskušaš izvoziti v datoteko SVG. - + Can not export selection Izbora ni mogoče izboziti - + Page contains DrawViewArch which will not be exported. Continue? Stran vsebuje DrawViewArch, ki se ne bo izvozil. Želite nadaljevati? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Izberite dva točkovna predmeta in en pogled. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Opravilo je v teku - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Napačen izbor @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Za črto morate izbrati pogled predloge. @@ -3203,112 +3203,112 @@ Nobenega očrtovalnega pogleda ni v izboru - - + + No base View in Selection. Nobenega osnovnega pogleda ni v izboru. - + You must select Faces or an existing CenterLine. Izbrati morate ploskve ali obstoječo središčnico. - + No CenterLine in selection. V izboru ni nobene središčnice. - - - + + + Selection is not a CenterLine. Izbrano ni središčnica. - + Selection not understood. Izbor ni razumljiv. - + You must select 2 Vertexes or an existing CenterLine. Izbrati morate 2 oglišči ali obstoječo središčnico. - + Need 2 Vertices or 1 CenterLine. Potrebni sta dve oglišči ali ena središčnica. - + Selection is empty. Nič ni izbrano. - + Not enough points in selection. Izbranih je premalo točk. - + Selection is not a Cosmetic Line. Izbrano ni dopolnilna daljica. - + You must select 2 Vertexes. Izbrani morate dve oglišči. - - + + Nothing selected Nič ni izbrano - + At least 1 object in selection is not a part view Vsaj en predmet v izboru ni pogled - + Unknown object type in selection V izboru je nepoznana vrsta predmeta - + No View in Selection. V izboru ni nobenega pogleda. - + You must select a View and/or lines. Izbrati morate pogled in/ali daljice. - + No Part Views in this selection V tem izboru ni pogledov na dele - + Select exactly one Leader line or one Weld symbol. Izberite natanko eno opisnično črto ali eno oznako za zvar. - - + + SurfaceFinishSymbols Znaki površinske obdelave - + No Part View in Selection Nobenega pogleda dela ni v izboru - + No %1 in Selection V izboru ni: %1 @@ -3323,33 +3323,33 @@ Nekatere ploskve v izboru so že počrtkane. Želite nadomesti? - + No TechDraw Page Ni strani TehRisbe - + Need a TechDraw Page for this command Za ta ukaz potrebujete stran TehRisbe - + Select a Face first Izberi ploskev najprej - + No TechDraw object in selection V izboru ni predmeta TehRisbe - + Create a page to insert. Ustvari stran za vstavljanje. - + No Faces to hatch in this selection V tem izboru ni Ploskev za počrtkanje @@ -3370,33 +3370,33 @@ V dokumentu ni strani risb. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Vse datoteke (*.*) - + Export Page As PDF Izvozi stran v PDF - + Document Name: Ime dokumenta: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Izvozi stran kot SVG @@ -3445,7 +3445,7 @@ Urejevalnik obogatenega besedila - + New Cosmetic Vertex Novo dopolnilno oglišče @@ -3522,8 +3522,8 @@ Smer pogleda v sorednicah osnovnega pogleda - - + + Operation Failed Opravilo spodletelo @@ -3538,12 +3538,12 @@ Uredi znak za varjenje - + Create Cosmetic Line Ustvari dopolnilno črto - + Edit Cosmetic Line Uredi dopolnilno črto @@ -3678,7 +3678,7 @@ Nobene izbrane podprvine - + @@ -3686,7 +3686,7 @@ Nič ni izbrano - + No object selected @@ -3723,7 +3723,7 @@ Izberite dve ravni črti - + Select 2 Vertexes or 1 Edge Izberite 2 oglišči ali 1 rob @@ -5558,51 +5558,61 @@ Hitro, vendar dobimo skupek kratkih ravnih črtic. Natisni vse strani - + Different orientation Druga usmerjenost - + The printer uses a different orientation than the drawing. Do you want to continue? Tiskalnik uporablja drugo usmerjenost kot risba. Ali želite nadaljevati? - + Different paper size Druga velikost papirja - + The printer uses a different paper size than the drawing. Do you want to continue? Tiskalnik uporablja drugo velikost papirja kot risba. Ali želite nadaljevati? - + Opening file failed Odpiranje datoteke ni uspelo - + Can not open file %1 for writing. Datoteke %1 ni mogoče odpreti za pisanje. - + Save DXF file Shrani datoteko DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Izbrano: @@ -6087,7 +6097,12 @@ Ali želite nadaljevati? Smer ni določena - + + ComplexSection + Zapleten presek + + + Can not continue. Object * %1 or %2 not found. Ne da se nadaljevati. Predmetov * %1 ali %2 ni mogoče najti. @@ -6106,7 +6121,7 @@ Ali želite nadaljevati? - + Point Picker Izbirnik točk @@ -6131,28 +6146,28 @@ Ali želite nadaljevati? Y - - + + Pick Points Izberi točke - + Pick a point for cosmetic vertex Izberi točko za dopolnilno oglišče - + Escape picking Prekini izbiranje - + Left click to set a point Levi klik za določitev točke - + In progress edit abandoned. Start over. Tekom urejanja je prišlo do prekinitve. Začni znova. @@ -7060,7 +7075,7 @@ Izberete lahko še druge točke, da dobite črtne odseke. - + Pick Points Izberi točke @@ -7141,51 +7156,51 @@ Izberete lahko še druge točke, da dobite črtne odseke. - - - + + + Edit points Uredi točke - + Edit Points Uredi točke - - + + Pick a starting point for leader line Izberite začetno točko opisnice - + Save Points Shrani točke - + Click and drag markers to adjust leader line Za prilagoditev opisnice kliknite in povlecite oznake - - + + Save changes Shrani spremembe - + Left click to set a point Levi klik za določitev točke - + Press OK or Cancel to continue Klikni V redu ali Prekliči za nadaljevanje - + In progress edit abandoned. Start over. Tekom urejanja je prišlo do prekinitve. Začni znova. @@ -7715,6 +7730,11 @@ s pomočjo podanih X/Y odmikov Input the annotation text directly or start the rich text editor Vnesite pripise neposredno ali zaženite urejevalnik obogatenega besedila + + + RichTextAnnotation + Pripis z obogatenim besedilom + TechDrawGui::TaskSectionView @@ -7854,7 +7874,7 @@ s pomočjo podanih X/Y odmikov Ni kaj uveljaviti. Nobena usmeritev prereza še ni izbrana - + Can not continue. Object * %1 or %2 not found. Ne da se nadaljevati. Predmetov * %1 ali %2 ni mogoče najti. @@ -8143,6 +8163,11 @@ s pomočjo podanih X/Y odmikov other drugo + + + SectionView + Prerezni pogled + TechDrawGui::dlgTemplateField @@ -8170,7 +8195,7 @@ s pomočjo podanih X/Y odmikov TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Doda somernico med dve daljici @@ -8178,7 +8203,7 @@ s pomočjo podanih X/Y odmikov TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Doda somernico med dve točki @@ -8186,7 +8211,7 @@ s pomočjo podanih X/Y odmikov TechDraw_ComplexSection - + Insert complex Section View Vstavi sestavljen prerezni pogled @@ -8215,7 +8240,7 @@ s pomočjo podanih X/Y odmikov TechDraw_FaceCenterLine - + Adds a Centerline to Faces Doda ploskvam središčnico @@ -8247,7 +8272,7 @@ s pomočjo podanih X/Y odmikov TechDraw_SectionView - + Insert simple Section View Vstavi enostavni prerezni pogled @@ -8773,4 +8798,156 @@ ker je odprto pogovorno okno. Ni mogoče izbrisati + + DrawPage + + + Page + Stran + + + + DrawSVGTemplate + + + Template + Predloga + + + + DrawView + + + View + Pogled + + + + DrawViewPart + + + View + Pogled + + + + DrawViewSection + + + Section + Presek + + + + DrawComplexSection + + + Section + Presek + + + + DrawViewDetail + + + Detail + Podrobnost + + + + DrawActiveView + + + ActiveView + Dejavni pogled + + + + DrawViewAnnotation + + + Annotation + Opis + + + + DrawViewImage + + + Image + Slika + + + + DrawViewSymbol + + + Symbol + Znak + + + + DrawViewArch + + + Arch + Lok + + + + DrawViewDraft + + + Draft + Ugrez + + + + DrawLeaderLine + + + LeaderLine + Opisnica + + + + DrawViewBalloon + + + Balloon + Opisnica + + + + DrawViewDimension + + + Dimension + Mera + + + + DrawViewDimExtent + + + Extent + Obseg + + + + DrawHatch + + + Hatch + Črtkanje + + + + DrawGeomHatch + + + GeomHatch + Geometrijsko črtkanje + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts index 19361c4232..8836cdcc48 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Dodaj osnu liniju između dve linije @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Dodaj osnu liniju između dve tačke @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Dodaj osnu liniju između dve linije @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Dodaj osnu liniju između dve tačke @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Dodaj pomoćnu liniju kroz dve tačke @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Umetni sliku pogleda @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Umetni objekat Arch radnog okruženja - + Insert a View of a Section Plane from Arch Workbench Umetni pogled na objekat iz Arch radnog okruženja @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Umetni pozicionu oznaku @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Umetni osnu liniju - + Add Centerline to Faces Dodaj osnu liniju stranicama @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Umetni grupu pogleda @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Dodaj pogled u grupu pogleda @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Ukloni pogled iz grupe pogleda @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Umetni složeni presek - + Insert a Complex Section Umetni složeni presek @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Ukloni pomoćni objekat @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Promeni izgled linija - + Change Appearance of selected Lines Promenite izgled izabranih linija @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Umetni detaljni pogled @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Umetni objekat Draft radnog okruženja - + Insert a View of a Draft Workbench object Umetni pogled na objekat iz Draft radnog okruženja @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Datoteka - + Export Page as DXF Izvezi crtež kao DXF - + Save DXF file Sačuvaj DXF datoteku - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Datoteka - + Export Page as SVG Izvezi crtež kao SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Dodaj osnu liniju stranicama @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Umetni rastersku sliku - - + + Insert Bitmap from a file into a page Umetni rastersku sliku iz datoteke u crtež - + Select an Image File Izaberi datoteku slike - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Slikovne datoteke (*.jpg *.jpeg *.png *.bmp);;Sve datoteke (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Izaberi i umetni pripremljeni prazni crtež - + Select a Template File Izaberi datoteku praznog crteža - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Štampaj sve stranice @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projiciraj objekat u 3D pogled... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Umetni grupu osnovnih pogleda - + Insert multiple linked views of drawable object(s) Umetni nekoliko povezanih osnovnih pogleda objekta na crtež @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Osveži crtež @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Umetni pun ili složeni presek - + Section View Pun presek - + Complex Section Složeni presek @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Umetni presek @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Prikaži/sakrij nevidljive ivice @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Umetni tabelu - + Insert View to a spreadsheet Umetni tabelu u crtež @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Napravi oznaku kvaliteta obrađene površine - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Izaberi pogled<br> - Klikni na ovu alatku<br> - U otvorenom panelu napravi oznaku kvaliteta površine @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Umetni SVG simbol - + Insert symbol from an SVG file Umetni simbol iz SVG datoteke @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Prikaži/Sakrij okvire oko pogleda @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Umetni trenutni pogled - + Insert a View Umetni pogled @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Dodaj informacije o varu pokaznoj liniji @@ -1964,58 +1964,58 @@ Command - + Drawing create page Napravi crtež - + Create view Napravi pogled - + Create Projection Group Napravi grupu osnovnih pogleda - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Napravi simbol - + Create DraftView Napravi Draft pogled - + Create ArchView Napravi Arch pogled - + Create spreadsheet view Napravi pogled of tabele - - + + Save page to dxf Sačuvaj crtež kao dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Napravi kotu - + Create Hatch Napravi šrafuru - + Update Hatch Ažuriraj šrafuru @@ -2056,12 +2056,12 @@ Ukloni staru šrafuru - + Create GeomHatch Napravi geometrijsku šrafuru - + Create Image Napravi sliku @@ -2071,7 +2071,7 @@ Prevuci pozicionu oznaku - + Drag Dimension Prevuci kotu @@ -2081,7 +2081,7 @@ Napravi pozicionu oznaku - + Create ActiveView Napravi aktivni pogled @@ -2091,12 +2091,12 @@ Napravi osnu liniju - + Create Cosmetic Line Napravi pomoćnu liniju - + Update CosmeticLine Ažuriraj pomoćnu liniju @@ -2106,32 +2106,32 @@ Napravi detaljni pogled - + Update Detail Ažuriraj detalj - + Create Leader Napravi pokaznu liniju - + Edit Leader Uredi pokaznu liniju - + Create Anno Napravi napomenu - + Edit Anno Uredi napomenu - + Create SectionView Napravi pun presek @@ -2141,23 +2141,23 @@ Napravi složeni presek - - + + Edit SectionView Uredi pun presek - + Create WeldSymbol Napravi Oznaku vara - + Edit WeldSymbol Uredi Oznaku vara - + Add Cosmetic Vertex Dodaj pomoćnu tačku @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Pogrešan izbor - - + + No Shapes, Groups or Links in this selection Nisu izabrani oblici, grupe ili veze - - + + Select at least 1 DrawViewPart object as Base. Izaberi najmanje jedan pogled kao osnovni. - + I do not know what base view to use. Ne znam koji osnovni pogled da koristim. - + No Base View, Shapes, Groups or Links in this selection Nisu izabrani oblici, grupe, veze ili osnovni pogled - + No profile object found in selection Nije izabran objekat sa profilom - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Pogrešan izbor - - + + Select an object first Prvo izaberi objekat - - + + Too many objects selected Previše objekata je izabrano - - + + Create a page first. Prvo napravi stranicu. - + @@ -2800,87 +2800,87 @@ Nije izabran pogled dela. - + Select one Clip group and one View. Izaberi jednu grupu pogleda i jedan pogled. - + Select exactly one View to add to group. Izaberi pogled koji želiš da dodaš u grupu. - + Select exactly one Clip group. Izaberi samo jednu grupu pogleda. - + Clip and View must be from same Page. Clip and View must be from same Page. - + Select exactly one View to remove from Group. Izaberi pogled koji želiš da ukloniš iz grupe. - + View does not belong to a Clip View does not belong to a Clip - + Choose an SVG file to open Izaberi SVG datoteku za otvaranje - + Scalable Vector Graphic Scalable Vector Graphic - + All Files Sve datoteke - + Select at least one object. Izaberi bar jedan objekat. - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. Izaberi samo jedan tabelarni objekat. - + No Drawing View Nema pogleda crteža - + Open Drawing View before attempting export to SVG. Pre pokušaja izvoza crteža u SVG formatu moraš ga prvo napraviti. - + Can not export selection Izabrano se ne može izvesti - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Izaberi 2 tačkasta objekta i 1 pogled. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Zadatak u toku - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Pogrešan izbor @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Morate izabrati osnovni pogled za liniju. @@ -3203,112 +3203,112 @@ Nije izabran nijedan pogled - - + + No base View in Selection. Nije izabran osnovni pogled. - + You must select Faces or an existing CenterLine. Moraš izabrati stranice ili postojeću osnu liniju. - + No CenterLine in selection. Nije izabrana osna linija. - - - + + + Selection is not a CenterLine. Izabrano nije osna linija. - + Selection not understood. Izbor nije shvaćen. - + You must select 2 Vertexes or an existing CenterLine. Moraš izabrati 2 temena ili postojeću osnu liniju. - + Need 2 Vertices or 1 CenterLine. Potrebna su 2 temena ili 1 osna linija. - + Selection is empty. Nisi ništa izabrao. - + Not enough points in selection. Izabrano je nedovoljno tačaka. - + Selection is not a Cosmetic Line. Nije izabrana pomoćna linija. - + You must select 2 Vertexes. Moraš izabrati 2 temena. - - + + Nothing selected Ništa nije izabrano - + At least 1 object in selection is not a part view Izabran je najmanje jedan objekat koji nije pogled dela - + Unknown object type in selection Izabran je nepoznati tip objekta - + No View in Selection. Nije izabran pogled. - + You must select a View and/or lines. Moraš izabrati pogled i/ili linije. - + No Part Views in this selection Nije izabran pogled dela - + Select exactly one Leader line or one Weld symbol. Izaberi tačno jednu pokaznu liniju ili simbol zavarivanja. - - + + SurfaceFinishSymbols Oznaka kvaliteta površine - + No Part View in Selection Nije izabran pogled dela - + No %1 in Selection Nije izabran %1 @@ -3323,33 +3323,33 @@ Neke izabrane stranice su već šrafirane. Zameniti? - + No TechDraw Page Nema TechDraw crteža - + Need a TechDraw Page for this command Potreban je TechDraw crtež za ovu komandu - + Select a Face first Prvo izaberi stranicu - + No TechDraw object in selection Nije izabran TechDraw objekat - + Create a page to insert. Napravi stranicu za umetanje. - + No Faces to hatch in this selection Nije izabrana stranica za šrafiranje @@ -3370,33 +3370,33 @@ Nema crteža u dokumentu. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Sve Datoteke (*.*) - + Export Page As PDF Izvezi crtež kao PDF - + Document Name: Ime dokumenta: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Izvezi crtež kao SVG @@ -3445,7 +3445,7 @@ Urednik za formatiranje teksta - + New Cosmetic Vertex Nova pomoćna tačka @@ -3522,8 +3522,8 @@ Pravac pogleda u koordinatama baznog pogleda - - + + Operation Failed Operacija nije izvršena @@ -3538,12 +3538,12 @@ Uredite Oznaku vara - + Create Cosmetic Line Napravi pomoćnu liniju - + Edit Cosmetic Line Uredi pomoćnu liniju @@ -3678,7 +3678,7 @@ Nema izabranih podelemenata - + @@ -3686,7 +3686,7 @@ Nisi ništa izabrao - + No object selected @@ -3723,7 +3723,7 @@ Izaberi dve prave linije - + Select 2 Vertexes or 1 Edge Izaberi 2 temena ili 1 ivicu @@ -5554,51 +5554,61 @@ Brzo, ali rezultat je skup kratkih pravih linija. Štampaj sve stranice - + Different orientation Drugačija orijentacija - + The printer uses a different orientation than the drawing. Do you want to continue? Štampač koristi drugačiju orijentaciju od crteža. Da li želiš da nastaviš? - + Different paper size Drugačija veličina papira - + The printer uses a different paper size than the drawing. Do you want to continue? Štampač koristi drugačiju veličinu papira od crteža. Da li želiš da nastaviš? - + Opening file failed Otvaranje datoteke neuspešno - + Can not open file %1 for writing. Ne mogu da otvorim datoteku %1 radi upisa. - + Save DXF file Sačuvaj DXF datoteku - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Izabrano: @@ -6083,7 +6093,12 @@ Da li želiš da nastaviš? No direction set - + + ComplexSection + Složeni presek + + + Can not continue. Object * %1 or %2 not found. Ne mogu da nastavim. Objekat * %1 ili %2 nije pronađen. @@ -6102,7 +6117,7 @@ Da li želiš da nastaviš? - + Point Picker Izaberi tačku @@ -6127,28 +6142,28 @@ Da li želiš da nastaviš? Y - - + + Pick Points Izaberi tačke - + Pick a point for cosmetic vertex Odaberi tačku za pomoćnu tačku - + Escape picking Napusti izbor - + Left click to set a point Levi klik da zadate tačku - + In progress edit abandoned. Start over. Tokom procesa izmena je napuštena. Počni ispočetka. @@ -7056,7 +7071,7 @@ Možeš odabrati dodatne tačke da bi dobio segmente linija. - + Pick Points Izaberi tačke @@ -7137,51 +7152,51 @@ Možeš odabrati dodatne tačke da bi dobio segmente linija. - - - + + + Edit points Uredi tačke - + Edit Points Uredi tačke - - + + Pick a starting point for leader line Izaberi početnu tačku pokazne linije - + Save Points Sačuvaj tačke - + Click and drag markers to adjust leader line Kliknite i vuci oznaku da bi podesio pokaznu liniju - - + + Save changes Sačuvaj izmene - + Left click to set a point Levi klik da zadate tačku - + Press OK or Cancel to continue Pritisnite U redu ili Otkaži da nastaviš - + In progress edit abandoned. Start over. Tokom procesa izmena je napuštena. Počni ispočetka. @@ -7710,6 +7725,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Unesi tekst napomene direktno ili pokreni urednika za formatiranje + + + RichTextAnnotation + Formatirana napomena + TechDrawGui::TaskSectionView @@ -7849,7 +7869,7 @@ using the given X/Y Spacing Nema šta da se primeni. Još nije odabran pravac preseka - + Can not continue. Object * %1 or %2 not found. Ne mogu da nastavim. Objekat * %1 ili %2 nije pronađen. @@ -8138,6 +8158,11 @@ using the given X/Y Spacing other ostalo + + + SectionView + Presek + TechDrawGui::dlgTemplateField @@ -8165,7 +8190,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Dodaje osnu liniju između dve linije @@ -8173,7 +8198,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Dodaje osnu liniju između dve tačke @@ -8181,7 +8206,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Umetni polupresek, stepenasti presek ili zaokrenuti presek @@ -8210,7 +8235,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Dodaje osnu liniju stranicama @@ -8242,7 +8267,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Umetni pun presek @@ -8769,4 +8794,156 @@ postoji otvoren panel zadataka. Ne može da se izbriše + + DrawPage + + + Page + Crtež + + + + DrawSVGTemplate + + + Template + Šablon + + + + DrawView + + + View + Pogled + + + + DrawViewPart + + + View + Pogled + + + + DrawViewSection + + + Section + Presek + + + + DrawComplexSection + + + Section + Presek + + + + DrawViewDetail + + + Detail + Detalj + + + + DrawActiveView + + + ActiveView + Aktivni pogled + + + + DrawViewAnnotation + + + Annotation + Napomena + + + + DrawViewImage + + + Image + Slika + + + + DrawViewSymbol + + + Symbol + Oznaka šava + + + + DrawViewArch + + + Arch + Luk + + + + DrawViewDraft + + + Draft + Zakošenje + + + + DrawLeaderLine + + + LeaderLine + Pokazna linija + + + + DrawViewBalloon + + + Balloon + Poziciona oznaka + + + + DrawViewDimension + + + Dimension + Kota + + + + DrawViewDimExtent + + + Extent + Opseg + + + + DrawHatch + + + Hatch + Šrafura + + + + DrawGeomHatch + + + GeomHatch + Geometrijska šrafura + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts index 79c758439a..d6e495fbd6 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Додај осну линију између две линије @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Додај осну линију између две тачке @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Додај осну линију између две линије @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Додај осну линију између две тачке @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Додај помоћну линију кроз две тачке @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Уметни слику погледа @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Уметни објекат Arch радног окружења - + Insert a View of a Section Plane from Arch Workbench Уметни поглед на објекат из Arch радног окружења @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Уметни Позициону ознаку @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Уметни осну линију - + Add Centerline to Faces Додај осну линију страницама @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Уметни групу погледа @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Додај поглед у групу погледа @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Уклони поглед из групе погледа @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Уметни сложени пресек - + Insert a Complex Section Уметни сложени пресек @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Уклони помоћни објекат @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Промени изглед линија - + Change Appearance of selected Lines Промените изглед изабраних линија @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Уметни детаљни поглед @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Уметни објекат Draft радног окружења - + Insert a View of a Draft Workbench object Уметни поглед на објекат из Draft радног окружења @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Датотека - + Export Page as DXF Извези цртеж као DXF - + Save DXF file Сачувај DXF датотеку - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Датотека - + Export Page as SVG Извези цртеж као SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Додај осну линију страницама @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Уметни растерску слику - - + + Insert Bitmap from a file into a page Уметни растерску слику из датотеке у цртеж - + Select an Image File Изабери датотеку слике - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Сликовне датотеке (*.jpg *.jpeg *.png *.bmp);;Све датотеке (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Изабери и уметни припремљени празни цртеж - + Select a Template File Изабери датотеку празног цртежа - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Штампај све странице @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Пројицирај објекат у 3Д поглед... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Уметни групу основних погледа - + Insert multiple linked views of drawable object(s) Уметни неколико повезаних основних погледа објекта на цртеж @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Освежи цртеж @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Уметни пун или сложени пресек - + Section View Пун пресек - + Complex Section Сложени пресек @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Уметни пресек @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Прикажи/сакриј невидљиве ивице @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Уметни табелу - + Insert View to a spreadsheet Уметни табелу у цртеж @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Направи ознаку квалитета обрађене површине - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Изабери поглед<br> - Кликни на ову алатку<br> - У отвореном панелу направи ознаку @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Уметни SVG симбол - + Insert symbol from an SVG file Уметни симбол из SVG датотеке @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Прикажи/Сакриј оквире око погледа @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Уметни поглед - + Insert a View Уметни поглед @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Додај информације о вару показној линији @@ -1964,58 +1964,58 @@ Command - + Drawing create page Направи цртеж - + Create view Направи поглед - + Create Projection Group Направи групу основних погледа - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Направи симбол - + Create DraftView Направи Draft поглед - + Create ArchView Направи Arch поглед - + Create spreadsheet view Направи поглед од табеле - - + + Save page to dxf Сачувај цртеж као dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Направи коту - + Create Hatch Направи шрафуру - + Update Hatch Ажурирај шрафуру @@ -2056,12 +2056,12 @@ Уклони стару шрафуру - + Create GeomHatch Направи геометријску шрафуру - + Create Image Направи слику @@ -2071,7 +2071,7 @@ Превуци позициону ознаку - + Drag Dimension Превуци коту @@ -2081,7 +2081,7 @@ Направи позициону ознаку - + Create ActiveView Направи активни поглед @@ -2091,12 +2091,12 @@ Направи Осну линију - + Create Cosmetic Line Направипомоћну линију - + Update CosmeticLine Ажурирај помоћну линију @@ -2106,32 +2106,32 @@ Направи детаљни поглед - + Update Detail Ажурирај детаљ - + Create Leader Направи показну линију - + Edit Leader Уреди показну линију - + Create Anno Направи напомену - + Edit Anno Уреди напомену - + Create SectionView Направи пун пресек @@ -2141,23 +2141,23 @@ Направи сложени пресек - - + + Edit SectionView Уреди пун пресек - + Create WeldSymbol Направи ознаку вара - + Edit WeldSymbol Уреди ознаку вара - + Add Cosmetic Vertex Додај помоћну тачку @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Погрешан избор - - + + No Shapes, Groups or Links in this selection Нису изабрани облици, групе или везе - - + + Select at least 1 DrawViewPart object as Base. Изабери најмање један поглед као основни. - + I do not know what base view to use. Не знам који основни поглед да користим. - + No Base View, Shapes, Groups or Links in this selection Нису изабрани облици, групе, везе или основни поглед - + No profile object found in selection Није изабран објекат са профилом - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Погрешан избор - - + + Select an object first Прво изабери објекат - - + + Too many objects selected Превише објеката је изабрано - - + + Create a page first. Прво направи страницу. - + @@ -2800,87 +2800,87 @@ Није изабран поглед дела. - + Select one Clip group and one View. Изабери једну групу погледа и један поглед. - + Select exactly one View to add to group. Изабери поглед који желиш да додаш у групу. - + Select exactly one Clip group. Изабери само једну групу погледа. - + Clip and View must be from same Page. Clip and View must be from same Page. - + Select exactly one View to remove from Group. Изабери поглед који желиш да уклониш из групе. - + View does not belong to a Clip View does not belong to a Clip - + Choose an SVG file to open Изабери SVG датотеку за отварање - + Scalable Vector Graphic Scalable Vector Graphic - + All Files Све датотеке - + Select at least one object. Изабери бар један објекат. - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. Изабери само један табеларни објекат. - + No Drawing View Нема погледа цртежа - + Open Drawing View before attempting export to SVG. Пре покушаја извоза цртежа у SVG формату мораш га прво направити. - + Can not export selection Изабрано се не може извести - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Изабери 2 тачкаста објекта и 1 поглед. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Задатак у току - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Погрешан избор @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Морате изабрати основни поглед за линију. @@ -3203,112 +3203,112 @@ Није изабран ниједан поглед - - + + No base View in Selection. Није изабран основни поглед. - + You must select Faces or an existing CenterLine. Мораш изабрати странице или постојећу осну линију. - + No CenterLine in selection. Није изабрана осна линија. - - - + + + Selection is not a CenterLine. Изабрано није осна линија. - + Selection not understood. Избор није схваћен. - + You must select 2 Vertexes or an existing CenterLine. Мораш изабрати 2 темена или постојећу осну линију. - + Need 2 Vertices or 1 CenterLine. Потребна су 2 темена или 1 осна линија. - + Selection is empty. Ниси ништа изабрао. - + Not enough points in selection. Изабрано је недовољно тачака. - + Selection is not a Cosmetic Line. Није изабрана помоћна линија. - + You must select 2 Vertexes. Мораш изабрати 2 темена. - - + + Nothing selected Ништа није изабрано - + At least 1 object in selection is not a part view Изабран је најмање један објекат који није поглед дела - + Unknown object type in selection Изабран је непознати тип објекта - + No View in Selection. Није изабран поглед. - + You must select a View and/or lines. Мораш изабрати поглед и/или линије. - + No Part Views in this selection Није изабран поглед дела - + Select exactly one Leader line or one Weld symbol. Изабери тачно једну показну линију или симбол заваривања. - - + + SurfaceFinishSymbols Ознаку квалитета површине - + No Part View in Selection Није изабран поглед дела - + No %1 in Selection Није изабран %1 @@ -3323,33 +3323,33 @@ Неке изабране странице су већ шрафиране. Заменити? - + No TechDraw Page Нема TechDraw цртежа - + Need a TechDraw Page for this command Потребан је TechDraw цртеж за ову команду - + Select a Face first Прво изабери страницу - + No TechDraw object in selection Није изабран TechDraw објекат - + Create a page to insert. Направи страницу за уметање. - + No Faces to hatch in this selection Није изабрана страница за шрафирање @@ -3370,33 +3370,33 @@ Нема цртежа у документу. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Све Датотеке (*.*) - + Export Page As PDF Извези цртеж као PDF - + Document Name: Име документа: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Извези цртеж као SVG @@ -3445,7 +3445,7 @@ Уредник форматираног текста - + New Cosmetic Vertex Нова помоћна тачка @@ -3522,8 +3522,8 @@ Правац погледа у координатама базног погледа - - + + Operation Failed Операција није извршена @@ -3538,12 +3538,12 @@ Уредите ознаку вара - + Create Cosmetic Line Направипомоћну линију - + Edit Cosmetic Line Уреди помоћну линију @@ -3678,7 +3678,7 @@ Нема изабраних поделемената - + @@ -3686,7 +3686,7 @@ Ниси ништа изабрао - + No object selected @@ -3723,7 +3723,7 @@ Изабери две праве линије - + Select 2 Vertexes or 1 Edge Изабери 2 темена или 1 ивицу @@ -5554,51 +5554,61 @@ Fast, but result is a collection of short straight lines. Штампај све странице - + Different orientation Другачија оријентација - + The printer uses a different orientation than the drawing. Do you want to continue? Штампач користи другачију оријентацију од цртежа. Да ли желиш да наcтавиш? - + Different paper size Другачија величина папира - + The printer uses a different paper size than the drawing. Do you want to continue? Штампач користи другачију величину папира од цртежа. Да ли желиш да наставиш? - + Opening file failed Отварање датотеке неуcпешно - + Can not open file %1 for writing. Не могу да отворим датотеку %1 ради уписа. - + Save DXF file Сачувај DXF датотеку - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Изабрано: @@ -6083,7 +6093,12 @@ Do you want to continue? No direction set - + + ComplexSection + Сложени пресек + + + Can not continue. Object * %1 or %2 not found. Не могу да наставим. Објекат * %1 или %2 није пронађен. @@ -6102,7 +6117,7 @@ Do you want to continue? - + Point Picker Изабери тачку @@ -6127,28 +6142,28 @@ Do you want to continue? Y - - + + Pick Points Изабери тачке - + Pick a point for cosmetic vertex Одабери тачку за помоћну тачку - + Escape picking Напусти избор - + Left click to set a point Леви клик да задате тачку - + In progress edit abandoned. Start over. Током процеса измена је напуштена. Почни испочетка. @@ -7056,7 +7071,7 @@ You can pick further points to get line segments. - + Pick Points Изабери тачке @@ -7137,51 +7152,51 @@ You can pick further points to get line segments. - - - + + + Edit points Уреди тачке - + Edit Points Уреди тачке - - + + Pick a starting point for leader line Изабери почетну тачку показне линије - + Save Points Сачувај тачке - + Click and drag markers to adjust leader line Кликни и вуци ознаку да би подесио показну линију - - + + Save changes Сачувај измене - + Left click to set a point Леви клик да задате тачку - + Press OK or Cancel to continue Притисни У реду или Откажи да наставиш - + In progress edit abandoned. Start over. Током процеса измена је напуштена. Почни испочетка. @@ -7710,6 +7725,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Унеси текст напомене директно или покрени уредника за форматирање + + + RichTextAnnotation + Форматирана напомена + TechDrawGui::TaskSectionView @@ -7849,7 +7869,7 @@ using the given X/Y Spacing Нема шта да се примени. Још није одабран правац пресека - + Can not continue. Object * %1 or %2 not found. Не могу да наставим. Објекат * %1 или %2 није пронађен. @@ -8138,6 +8158,11 @@ using the given X/Y Spacing other остало + + + SectionView + Пресек + TechDrawGui::dlgTemplateField @@ -8165,7 +8190,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Додаје осну линију између две линије @@ -8173,7 +8198,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Додаје осну линију између две тачке @@ -8181,7 +8206,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Уметни полупресек, степенасти пресек или заокренути пресек @@ -8210,7 +8235,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Додаје осну линију страницама @@ -8242,7 +8267,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Уметни пун пресек @@ -8769,4 +8794,156 @@ there is an open task dialog. Не може да се избрише + + DrawPage + + + Page + Страна + + + + DrawSVGTemplate + + + Template + Шаблон + + + + DrawView + + + View + Поглед + + + + DrawViewPart + + + View + Поглед + + + + DrawViewSection + + + Section + Пресек + + + + DrawComplexSection + + + Section + Пресек + + + + DrawViewDetail + + + Detail + Детаљ + + + + DrawActiveView + + + ActiveView + Активни поглед + + + + DrawViewAnnotation + + + Annotation + Напомена + + + + DrawViewImage + + + Image + Слика + + + + DrawViewSymbol + + + Symbol + Ознака шава + + + + DrawViewArch + + + Arch + Лук + + + + DrawViewDraft + + + Draft + Закошење + + + + DrawLeaderLine + + + LeaderLine + Показна линија + + + + DrawViewBalloon + + + Balloon + Позициона ознака + + + + DrawViewDimension + + + Dimension + Кота + + + + DrawViewDimExtent + + + Extent + Опсег + + + + DrawHatch + + + Hatch + Шрафура + + + + DrawGeomHatch + + + GeomHatch + Геометријска шрафура + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts index 6675c5d581..4ae3bbbdb5 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Lägg till mittlinje mellan 2 linjer @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Lägg till mittlinje mellan 2 punkter @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Lägg till mittlinje mellan 2 linjer @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Lägg till mittlinje mellan 2 punkter @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Lägg till kosmetisk linje genom 2 punkter @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Infoga aktiv vy (3D-vy) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Infoga Arch Workbench-objekt - + Insert a View of a Section Plane from Arch Workbench Infoga en vy av ett sektionsplan från Arch Workbench @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Infoga ballonganteckning @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Infoga mittlinje - + Add Centerline to Faces Lägg till mittlinje i ansikten @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Infoga clip-grupp @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Lägg till vy i Clip-grupp @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Ta bort Vy från Clip Group @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Ta bort kosmetiskt objekt @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Ändra utseende på linjer - + Change Appearance of selected Lines Ändra utseende på valda linjer @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Detaljvy för infoga @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Infoga utkast workbench-objekt - + Insert a View of a Draft Workbench object Infoga en vy av ett objekt från arbetsytan Draft @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Fil - + Export Page as DXF Exportera sida som DXF - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Fil - + Export Page as SVG Exportera sida som SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Lägg till mittlinje i ansikten @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Infoga bitmappsbild - - + + Insert Bitmap from a file into a page Infoga Bitmapp från en fil till en sida - + Select an Image File Välj en bildfil - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Infoga sida med hjälp av mall - + Select a Template File Välj en mallfil - + Template (*.svg) Mall (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projekt former... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Infoga projektionsgrupp - + Insert multiple linked views of drawable object(s) Infoga flera länkade vyer av det/de inritbara objekten(erna) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Rita om Sida @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Infoga avsnittsvy @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Visa/dölj osynliga kanter @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Infoga kalkylbladsvy - + Insert View to a spreadsheet Infoga vy till ett kalkylblad @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Infoga SVG-symbol - + Insert symbol from an SVG file Infoga symbol från en SVG-fil @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Växla vyramar av/på @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Infoga vy - + Insert a View Infoga en Vy @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Lägg till svetsinformation till Leaderline @@ -1964,58 +1964,58 @@ Command - + Drawing create page Sidan Skapa ritning - + Create view Skapa vy - + Create Projection Group Skapa projektionsgrupp - + Create Clip Skapa klipp - + ClipGroupAdd ClipGroupLägg till - + ClipGroupRemove ClipGroupTaBort - + Create Symbol Skapa symbol - + Create DraftView Skapa UtkastVy - + Create ArchView Skapa ArchView - + Create spreadsheet view Skapa kalkylbladsvy - - + + Save page to dxf Spara sida på dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Skapa dimension - + Create Hatch Skapa Hatch - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Skapa GeomHatch - + Create Image Skapa bild @@ -2071,7 +2071,7 @@ Dra ballong - + Drag Dimension Dra dimension @@ -2081,7 +2081,7 @@ Skapa ballong - + Create ActiveView Skapa ActiveView @@ -2091,12 +2091,12 @@ Skapa CenterLine - + Create Cosmetic Line Skapa kosmetisk linje - + Update CosmeticLine Uppdatera CosmeticLine @@ -2106,32 +2106,32 @@ Skapa detaljvy - + Update Detail Uppdatera detalj - + Create Leader Skapa ledare - + Edit Leader Redigera ledare - + Create Anno Skapa Anno - + Edit Anno Redigera Anno - + Create SectionView Skapa Avsnittsvy @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Skapa WeldSymbol - + Edit WeldSymbol Redigera Svetssymbol - + Add Cosmetic Vertex Lägg till Kosmetiska Vertex @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Fel val - - + + No Shapes, Groups or Links in this selection Inga former, grupper eller länkar i den här markeringen - - + + Select at least 1 DrawViewPart object as Base. Markera minst ett DrawViewPart-objekt som bas. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Felaktig markering - - + + Select an object first Markera ett objekt först - - + + Too many objects selected För många objekt markerade - - + + Create a page first. Skapa en sida först. - + @@ -2800,87 +2800,87 @@ Ingen delvy i markeringen. - + Select one Clip group and one View. Markera en beskärningsgrupp och en vy. - + Select exactly one View to add to group. Markera exakt en vy att lägga till grupp. - + Select exactly one Clip group. Markera exakt en beskärningsgrupp. - + Clip and View must be from same Page. Beskärning och vy måste vara från samma sida. - + Select exactly one View to remove from Group. Markera exakt en vy att ta bort från grupp. - + View does not belong to a Clip Vy tillhör inte en beskärning - + Choose an SVG file to open Välj en SVG fil att öppna - + Scalable Vector Graphic Skalbar vektorgrafik - + All Files Alla filer - + Select at least one object. Markera minst ett objekt. - + Please select only 1 Arch Section. Vänligen välj endast 1 Arch Avsnitt. - + No Arch Sections in selection. Inga Arch Sektioner i urval. - + Select exactly one Spreadsheet object. Välj exakt ett sprängskissobjekt. - + No Drawing View Ingen ritningsvy - + Open Drawing View before attempting export to SVG. Öppna ritningsvy innan försök att exportera till SVG. - + Can not export selection Kan inte exportera urval - + Page contains DrawViewArch which will not be exported. Continue? Sidan innehåller DrawViewArch som inte kommer att exporteras. Fortsätta? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Markera 2 punktobjekt och 1 Visa. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Uppgift pågår - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Fel val @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Du måste markera en basvy för linjen. @@ -3203,112 +3203,112 @@ Inga DrawViewPart-objekt i aktuell markering - - + + No base View in Selection. Ingen basvy i markering. - + You must select Faces or an existing CenterLine. Du måste välja Ansikten eller en befintlig CenterLine. - + No CenterLine in selection. Ingen CenterLine i markering. - - - + + + Selection is not a CenterLine. Markering är inte en CenterLine. - + Selection not understood. Urval inte förstått. - + You must select 2 Vertexes or an existing CenterLine. Du måste välja 2 Vertexes eller en befintlig CenterLine. - + Need 2 Vertices or 1 CenterLine. Behöver 2 Vertices eller 1 CenterLine. - + Selection is empty. Markeringen är tom. - + Not enough points in selection. Inte tillräckligt med poäng i markering. - + Selection is not a Cosmetic Line. Val är inte en Cosmetic Line. - + You must select 2 Vertexes. Du måste välja 2 Vertexes. - - + + Nothing selected Inget markerat - + At least 1 object in selection is not a part view Ett eller flera objekt i markeringen är inte en delvy - + Unknown object type in selection Okänd objekttyp i markering - + No View in Selection. Ingen vy i markering. - + You must select a View and/or lines. Du måste välja en Visa och/eller rader. - + No Part Views in this selection Inga delvyer i det här valet - + Select exactly one Leader line or one Weld symbol. Välj exakt en Ledare fodrar eller en Svetsa symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Vissa Ansikten i valet är redan kläckta. Ersätta? - + No TechDraw Page Ingen TechDraw-sida - + Need a TechDraw Page for this command En TechDraw-sida behövs för detta kommando - + Select a Face first Markera en yta först - + No TechDraw object in selection Inget TechDraw-objekt i markering - + Create a page to insert. Skapa en sida att infoga. - + No Faces to hatch in this selection Inga ytor att snittfylla i aktuell markering @@ -3370,33 +3370,33 @@ Inga Ritsidor i dokumentet. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Alla filer (*.*) - + Export Page As PDF Exportera sida som PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportera sida som SVG @@ -3445,7 +3445,7 @@ Rich Text-redigerare - + New Cosmetic Vertex Ny kosmetisk hörnpunkt @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operationen misslyckades @@ -3538,12 +3538,12 @@ Redigera svetssymbol - + Create Cosmetic Line Skapa kosmetisk linje - + Edit Cosmetic Line Redigera kosmetisk linje @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,50 +5559,60 @@ Snabbt, men resultatet är en samling korta raka linjer. Print All Pages - + Different orientation Annan orientering - + The printer uses a different orientation than the drawing. Do you want to continue? Skrivaren använder en annan orientering än ritningen. Vill du fortsätta? - + Different paper size Annan pappersstorlek - + The printer uses a different paper size than the drawing. Do you want to continue? Skrivaren använder en annan pappersstorlek än ritningen. Vill du fortsätta? - + Opening file failed Fel vid filöppning - + Can not open file %1 for writing. Kan inte öppna fil %1 i skrivläge. - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Vald: @@ -6087,7 +6097,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6106,7 +6121,7 @@ Do you want to continue? - + Point Picker Punktväljare @@ -6131,28 +6146,28 @@ Do you want to continue? Y - - + + Pick Points Välj punkter - + Pick a point for cosmetic vertex Välj en punkt för kosmetisk hörnpunkt - + Escape picking Escape picking - + Left click to set a point Vänsterklicka för att infoga punkt - + In progress edit abandoned. Start over. Pågående redigering avbruten. Börja om. @@ -7060,7 +7075,7 @@ Du kan plocka ytterligare poäng för att få linjesegment. - + Pick Points Välj punkter @@ -7141,51 +7156,51 @@ Du kan plocka ytterligare poäng för att få linjesegment. - - - + + + Edit points Redigera punkter - + Edit Points Redigera punkter - - + + Pick a starting point for leader line Välj startpunkt för hänvisningslinje - + Save Points Spara punkter - + Click and drag markers to adjust leader line Klicka och dra markörer för att justera hänvisningslinje - - + + Save changes Spara ändringar - + Left click to set a point Vänsterklicka för att infoga punkt - + Press OK or Cancel to continue Tryck Ok eller Avbryt för att fortsätta - + In progress edit abandoned. Start over. Pågående redigering avbruten. Börja om. @@ -7715,6 +7730,11 @@ med hjälp av det givna X/Y-avstånden Input the annotation text directly or start the rich text editor Mata in anteckningstexten direkt eller starta rtf-redigeraren + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7854,7 +7874,7 @@ med hjälp av det givna X/Y-avstånden Inget att tillämpa. Ingen sektionsriktning vald ännu - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7934,7 +7954,7 @@ med hjälp av det givna X/Y-avstånden Grey - Grey + Grå @@ -8143,6 +8163,11 @@ med hjälp av det givna X/Y-avstånden other annat + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8170,7 +8195,7 @@ med hjälp av det givna X/Y-avstånden TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Lägger till en Mittlinje mellan 2 linjer @@ -8178,7 +8203,7 @@ med hjälp av det givna X/Y-avstånden TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Lägger till en mittlinje mellan 2 punkter @@ -8186,7 +8211,7 @@ med hjälp av det givna X/Y-avstånden TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8215,7 +8240,7 @@ med hjälp av det givna X/Y-avstånden TechDraw_FaceCenterLine - + Adds a Centerline to Faces Lägger till en mittlinje i Ansikten @@ -8247,7 +8272,7 @@ med hjälp av det givna X/Y-avstånden TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8693,7 +8718,7 @@ med hjälp av det givna X/Y-avstånden Fork - Fork + Gaffel @@ -8774,4 +8799,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Sida + + + + DrawSVGTemplate + + + Template + Mall + + + + DrawView + + + View + Vy + + + + DrawViewPart + + + View + Vy + + + + DrawViewSection + + + Section + Sektionering + + + + DrawComplexSection + + + Section + Sektionering + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Annotering + + + + DrawViewImage + + + Image + Bild + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Båge + + + + DrawViewDraft + + + Draft + Djupgående + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Ballong + + + + DrawViewDimension + + + Dimension + Dimension + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Kläcka + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts index fe4f2c9c3a..56294913e7 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines 2 çizgi arasına Merkez çizgisi ekler @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points 2 nokta arasına Merkez çizgisi ekler @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TeknikÇizim - + Add Centerline between 2 Lines 2 çizgi arasına Merkez çizgisi ekler @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TeknikÇizim - + Add Centerline between 2 Points 2 nokta arasına Merkez çizgisi ekler @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TeknikÇizim - + Add Cosmetic Line Through 2 Points 2 nokta boyunca yardımcı doğru ekle @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TeknikÇizim - + Insert Active View (3D View) Etkin görünüm ekle (3B görünüm) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TeknikÇizim - + Insert Arch Workbench Object Mimari tezgah(Arch Workbench) objesi ekle - + Insert a View of a Section Plane from Arch Workbench Mimari Çalışma Tezgahından (Arch Workbench) Kesit Düzleminin bir görünümünü ekler @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TeknikÇizim - + Insert Balloon Annotation Balon Açıklama Ekle @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TeknikÇizim - + Insert Center Line Yeni Eksen - + Add Centerline to Faces Yüzey(ler) e bir eksen ekle @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TeknikÇizim - + Insert Clip Group Kesim grubu ekleyin @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TeknikÇizim - + Add View to Clip Group Görüntüyü Kesim Grubu'na ekle @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TeknikÇizim - + Remove View from Clip Group KesimGrubu'ndan görüntü çıkarın @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TeknikÇizim - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TeknikÇizim - + Remove Cosmetic Object Yardımcı nesneyi kaldır @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TeknikÇizim - + Change Appearance of Lines Çizgilerin görünümünü değiştir - + Change Appearance of selected Lines Seçili Çizgilerin Görünümünü Değiştir @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TeknikÇizim - + Insert Detail View Detay Görünümü Ekle @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TeknikÇizim - + Insert Draft Workbench Object Mimari tezgah(Arch Workbench) objesi ekle - + Insert a View of a Draft Workbench object Taslak Çalışma Tezgahının (Draft Workbench) bir görünümünü ekle @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Dosya - + Export Page as DXF Sayfayı DXF olarak dışa aktar - + Save DXF file DXF dosyası olarak kaydet - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Dosya - + Export Page as SVG Sayfayı SVG olarak dışa aktar @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TeknikÇizim - + Add Centerline to Faces Yüzey(ler) e bir eksen ekle @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TeknikÇizim - + Insert Bitmap Image Bitmap resmi ekle - - + + Insert Bitmap from a file into a page Bir dosyadan bir sayfaya bir bitmap ekler - + Select an Image File Bir Resim Dosyası Seç - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TeknikÇizim - + Insert Page using Template Şablondan yeni bir sayfa ekle - + Select a Template File Şablon dosyası seçin - + Template (*.svg) Şablon (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TeknikÇizim - + Print All Pages Tüm Sayfaları Yazdır @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TeknikÇizim - + Project shape... Proje şekilleri... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TeknikÇizim - + Insert Projection Group Projeksiyon grubu ekle - + Insert multiple linked views of drawable object(s) Çizilebilir nesne(ler) in çok bağlantılı görünümlerini ekle @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TeknikÇizim - + Redraw Page Sayfayı yeniden çiz @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TeknikÇizim - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Kesit Görünümü - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TeknikÇizim - + Insert Section View Kesit Görünümü Ekle @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TeknikÇizim - + Show/Hide Invisible Edges Görünmez kenarları Gizle/Göster @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TeknikÇizim - + Insert Spreadsheet View Hesap tablosu görünümü ekle - + Insert View to a spreadsheet Hesap tablosuna görünüm ekle @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TeknikÇizim - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TeknikÇizim - + Insert SVG Symbol SVG Simgesi ekle - + Insert symbol from an SVG file Bir svg dosyasından simge ekle @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TeknikÇizim - - + + Turn View Frames On/Off Görünüm Çerçevelerini Aç / Kapat @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TeknikÇizim - + Insert View Görünüm ekle - + Insert a View Bir görünüm ekle @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TeknikÇizim - + Add Welding Information to Leaderline Başlık Çizgisine Kaynak Bilgileri Ekle @@ -1964,58 +1964,58 @@ Command - + Drawing create page Çizim oluşturma sayfası - + Create view Görünüm oluştur - + Create Projection Group Projeksiyon Grubu Oluştur - + Create Clip Pens oluştur - + ClipGroupAdd PensGrubuEkle - + ClipGroupRemove PensGrubuKaldır - + Create Symbol Sembol Oluştur - + Create DraftView TaslakGörünüm Oluştur - + Create ArchView MimariGörünümü Oluştur - + Create spreadsheet view Elektronik tablo görünümü oluştur - - + + Save page to dxf Sayfayı dxf olarak kaydedin @@ -2036,17 +2036,17 @@ - + Create Dimension Ölçü Oluştur - + Create Hatch Tarama Oluştur - + Update Hatch Taramayı Güncelle @@ -2056,12 +2056,12 @@ Eski Taramayı Sil - + Create GeomHatch GeoTarama oluştur - + Create Image Resim oluştur @@ -2071,7 +2071,7 @@ Balonu Sürükle - + Drag Dimension Ölçüyü Sürükle @@ -2081,7 +2081,7 @@ Balon Oluştur - + Create ActiveView AktifGörüntü Oluşturun @@ -2091,12 +2091,12 @@ MerkezÇizgisi Oluştur - + Create Cosmetic Line Yardımcı çizgi oluştur - + Update CosmeticLine YardımcıÇizgiyi Güncelle @@ -2106,32 +2106,32 @@ Detay Görünümü Oluştur - + Update Detail Detayı Güncelle - + Create Leader Kılavuz Oluştur - + Edit Leader Kılavuzu Düzenle - + Create Anno Açklm Oluştur - + Edit Anno Açklm Düzenle - + Create SectionView KesitGörünüm Oluştur @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Kesit Görünümünü Düzenle - + Create WeldSymbol KaynakSembolü Oluştur - + Edit WeldSymbol KaynakSembolünü Düzenle - + Add Cosmetic Vertex Yardımcı Nokta Ekle @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Yanlış seçim - - + + No Shapes, Groups or Links in this selection Bu seçimde Şekil, Grup veya Bağlantı Yok - - + + Select at least 1 DrawViewPart object as Base. En az 1 DrawViewPart nesnesini Temel olarak seçin. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Yanlış seçim - - + + Select an object first Önce bir nesne seçin - - + + Too many objects selected Çok fazla nesne seçili - - + + Create a page first. Önce bir sayfa oluşturun. - + @@ -2800,87 +2800,87 @@ Seçimde Parça Görünümü Yok. - + Select one Clip group and one View. Bir kesim Grubu ve bir görünüm seçin. - + Select exactly one View to add to group. Gruba eklemek için tam olarak bir Görünüm seçin. - + Select exactly one Clip group. Tam olarak bir Kesim grubu seçin. - + Clip and View must be from same Page. Klip ve görünümü bakarak aynı sayfada olması gerekir. - + Select exactly one View to remove from Group. Gruptan kaldırmak için tam olarak bir Görünüm seçin. - + View does not belong to a Clip Görünüm bir klibe ait değil - + Choose an SVG file to open Açmak için bir SVG dosyası seçin - + Scalable Vector Graphic Ölçeklenebilir Vektör Grafiği - + All Files Tüm Dosyalar - + Select at least one object. En az bir nesne seçin. - + Please select only 1 Arch Section. Lütfen sadece bir Mimari(Arch) bölümü seçin. - + No Arch Sections in selection. Seçimde Mimari(Arch) Bölümü yok. - + Select exactly one Spreadsheet object. Tam olarak bir Hesap Tablosu nesnesi seçin. - + No Drawing View Çizim görünümü yok - + Open Drawing View before attempting export to SVG. Çizim Önizlemeyi açmadan SVG dosyasını dışarı aktarmayın. - + Can not export selection Seçim dışa aktarılamıyor - + Page contains DrawViewArch which will not be exported. Continue? Sayfa dışa aktarılamayan DrawViewArch içeririyor. Devam edilsin mi? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ 2 nokta nesnesi ve 1 görünüm seçin(2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Devam eden görevler - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Yanlış seçim @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Çizgi için bir temel görünüm seçmelisiniz. @@ -3203,112 +3203,112 @@ Bu seçimde GörünümParçasıÇiz nesneleri yok - - + + No base View in Selection. Seçimde temel görünüm yok. - + You must select Faces or an existing CenterLine. Yüzey yada mevcut merkez doğrusu(CenterLine) seçiniz. - + No CenterLine in selection. Seçimde merkez doğrusu(CenterLine) yok. - - - + + + Selection is not a CenterLine. Seçim bir merkez doğrusu(CenterLine) değil. - + Selection not understood. Seçim anlaşılmadı. - + You must select 2 Vertexes or an existing CenterLine. 2 nokta yada mevcut merkez doğrusu(CenterLine) seçiniz. - + Need 2 Vertices or 1 CenterLine. 2 köse yada bir merkez doğrusu(CenterLine) ye ihtiyaç var. - + Selection is empty. Seçim boş. - + Not enough points in selection. Seçimde yeterli nokta yok. - + Selection is not a Cosmetic Line. Seçim bir yardımcı doğru değil. - + You must select 2 Vertexes. 2 Nokta seçmelisiniz. - - + + Nothing selected Seçili hiçbir şey yok - + At least 1 object in selection is not a part view Seçimdeki en az 1 nesne bir parça görünümü değil - + Unknown object type in selection Seçimde bilinmeyen nesne tipi var - + No View in Selection. Seçimde görünüm yok. - + You must select a View and/or lines. Bir görünüm ve/veya çizgi seçmelisin. - + No Part Views in this selection Bu seçimde Parça Görünümü yok - + Select exactly one Leader line or one Weld symbol. Tam olarak bir lider hattı(Leader line) yada bir kaynak(Weld) sembolü seçiniz. - - + + SurfaceFinishSymbols YüzeyPürüzlülüğüSembolleri - + No Part View in Selection Seçimde Parça Görünümü Yok - + No %1 in Selection Seçimde %1 Yok @@ -3323,33 +3323,33 @@ Seçimdeki bazı Yüzler zaten taralı. Değiştirilsin mi? - + No TechDraw Page TechDraw sayfa yok - + Need a TechDraw Page for this command Bu komut için bir TechDraw sayfa gerekiyor - + Select a Face first Önce bir etki alanı seçin - + No TechDraw object in selection TechDraw nesne seçimi yok - + Create a page to insert. İçeri aktarmak için bir sayfa oluşturun. - + No Faces to hatch in this selection Seçim içinde taranacak yüzey bulunmuyor @@ -3370,33 +3370,33 @@ Dökümanda Teknik Resim Sayfası Yok. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Tüm dosyalar (*. *) - + Export Page As PDF Sayfayı PDF olarak dışa aktar - + Document Name: Belge Adı: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Sayfayı SVG olarak dışa aktar @@ -3445,7 +3445,7 @@ Zengin metin düzenleyicisi - + New Cosmetic Vertex Yeni Yardımcı Nokta @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed İşlem başarısız oldu @@ -3538,12 +3538,12 @@ Kaynak Sembolünü Düzenle - + Create Cosmetic Line Yardımcı çizgi oluştur - + Edit Cosmetic Line Yardımcı doğruyu düzenle @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Seçim boş - + No object selected @@ -3723,7 +3723,7 @@ Lütfen iki düz çizgi seçin - + Select 2 Vertexes or 1 Edge 2 Nokta veya 1 Kenar Seçin @@ -5555,50 +5555,60 @@ Hızlıdır ama sonucu, kısa düz çizgilerin derlemesidir. Tüm Sayfaları Yazdır - + Different orientation Ekran yönü - + The printer uses a different orientation than the drawing. Do you want to continue? Yazıcı çizim daha farklı bir yönelim kullanır. Devam etmek istiyor musunuz? - + Different paper size Farklı kağıt boyutu - + The printer uses a different paper size than the drawing. Do you want to continue? Yazıcı, çizimden farklı bir kağıt boyutu kullanıyor. Devam etmek istiyor musun? - + Opening file failed Dosya açılamadı - + Can not open file %1 for writing. %1 dosyasını yazmak için açamazsın. - + Save DXF file DXF dosyası olarak kaydet - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Seçili: @@ -6083,7 +6093,12 @@ Devam etmek istiyor musun? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6102,7 +6117,7 @@ Devam etmek istiyor musun? - + Point Picker Nokta Seçici @@ -6127,28 +6142,28 @@ Devam etmek istiyor musun? Y - - + + Pick Points Noktaları seçin - + Pick a point for cosmetic vertex Yardımcı nokta için bir hedef seçin - + Escape picking Escape picking - + Left click to set a point Bir nokta ayarlamak için sol tıkla - + In progress edit abandoned. Start over. Devam eden düzenleme terk edildi. Yeniden başla. @@ -7056,7 +7071,7 @@ sonra en az ikinci bir noktayı seçin. - + Pick Points Noktaları seçin @@ -7137,51 +7152,51 @@ sonra en az ikinci bir noktayı seçin. - - - + + + Edit points Noktaları Düzenle - + Edit Points Noktaları Düzenle - - + + Pick a starting point for leader line Kılavuz çizgisi için bir başlangıç noktası seçin - + Save Points Noktayı Kaydet - + Click and drag markers to adjust leader line Kılavuz çizgisini ayarlamak için işaretlere tıkla ve sürükle - - + + Save changes Değişiklikleri kaydet - + Left click to set a point Bir nokta ayarlamak için sol tıkla - + Press OK or Cancel to continue Devam etmek için Tamam veya İptal'e basın - + In progress edit abandoned. Start over. Devam eden düzenleme terk edildi. Yeniden başla. @@ -7711,6 +7726,11 @@ gösterimleri otomatik dağıtır Input the annotation text directly or start the rich text editor Açıklama metnini doğrudan girin veya zengin metin düzenleyiciyi başlatın + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7850,7 +7870,7 @@ gösterimleri otomatik dağıtır Hiçbir şey uygulanmadı. Kesit yönü henüz seçilmedi - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8139,6 +8159,11 @@ gösterimleri otomatik dağıtır other diğer + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8166,7 +8191,7 @@ gösterimleri otomatik dağıtır TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines 2 Çizgi arasına Eksen Çizgisi ekler @@ -8174,7 +8199,7 @@ gösterimleri otomatik dağıtır TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points 2 Nokta arasında Eksen Çizgisi ekler @@ -8182,7 +8207,7 @@ gösterimleri otomatik dağıtır TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8211,7 +8236,7 @@ gösterimleri otomatik dağıtır TechDraw_FaceCenterLine - + Adds a Centerline to Faces Yüzlere Eksen Çizgisi ekler @@ -8243,7 +8268,7 @@ gösterimleri otomatik dağıtır TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8770,4 +8795,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Sayfa + + + + DrawSVGTemplate + + + Template + şablon + + + + DrawView + + + View + Görünüm + + + + DrawViewPart + + + View + Görünüm + + + + DrawViewSection + + + Section + Kesişim + + + + DrawComplexSection + + + Section + Kesişim + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Not + + + + DrawViewImage + + + Image + Görüntü + + + + DrawViewSymbol + + + Symbol + Sembol + + + + DrawViewArch + + + Arch + Mimari + + + + DrawViewDraft + + + Draft + Taslak + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balon + + + + DrawViewDimension + + + Dimension + Boyut + + + + DrawViewDimExtent + + + Extent + Kapsam + + + + DrawHatch + + + Hatch + Tarama + + + + DrawGeomHatch + + + GeomHatch + geom kapağı + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts index 340dbf14c9..18b5e81d1c 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Додати центрлінію між 2 лініями @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Додати центрлінію між 2 точками @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw ТехМалюнок - + Add Centerline between 2 Lines Додати центрлінію між 2 лініями @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw ТехМалюнок - + Add Centerline between 2 Points Додати центрлінію між 2 точками @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw ТехМалюнок - + Add Cosmetic Line Through 2 Points Add Cosmetic Line Through 2 Points @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw ТехМалюнок - + Insert Active View (3D View) Вставити активний вид (3D перегляд) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw ТехМалюнок - + Insert Arch Workbench Object Insert Arch Workbench Object - + Insert a View of a Section Plane from Arch Workbench Insert a View of a Section Plane from Arch Workbench @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw ТехМалюнок - + Insert Balloon Annotation Insert Balloon Annotation @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw ТехМалюнок - + Insert Center Line Insert Center Line - + Add Centerline to Faces Add Centerline to Faces @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw ТехМалюнок - + Insert Clip Group Insert Clip Group @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw ТехМалюнок - + Add View to Clip Group Add View to Clip Group @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw ТехМалюнок - + Remove View from Clip Group Remove View from Clip Group @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw ТехМалюнок - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw ТехМалюнок - + Remove Cosmetic Object Remove Cosmetic Object @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw ТехМалюнок - + Change Appearance of Lines Змінити вигляд ліній - + Change Appearance of selected Lines Змінити вигляд вибраних ліній @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw ТехМалюнок - + Insert Detail View Вставити детальний вигляд @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw ТехМалюнок - + Insert Draft Workbench Object Insert Draft Workbench Object - + Insert a View of a Draft Workbench object Insert a View of a Draft Workbench object @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Файл - + Export Page as DXF Експортувати лист у DXF - + Save DXF file Зберегти файл DXF - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Файл - + Export Page as SVG Експортувати лист у SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw ТехМалюнок - + Add Centerline to Faces Add Centerline to Faces @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw ТехМалюнок - + Insert Bitmap Image Вставити растрове зображення - - + + Insert Bitmap from a file into a page Вставити на сторінку растрове зображення з файлу - + Select an Image File Обрати файл зображення - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw ТехМалюнок - + Insert Page using Template Insert Page using Template - + Select a Template File Select a Template File - + Template (*.svg) Шаблон (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw ТехМалюнок - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw ТехМалюнок - + Project shape... Проект форми... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw ТехМалюнок - + Insert Projection Group Insert Projection Group - + Insert multiple linked views of drawable object(s) Insert multiple linked views of drawable object(s) @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw ТехМалюнок - + Redraw Page Redraw Page @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw ТехМалюнок - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw ТехМалюнок - + Insert Section View Вставити розріз @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw ТехМалюнок - + Show/Hide Invisible Edges Show/Hide Invisible Edges @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw ТехМалюнок - + Insert Spreadsheet View Insert Spreadsheet View - + Insert View to a spreadsheet Insert View to a spreadsheet @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw ТехМалюнок - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw ТехМалюнок - + Insert SVG Symbol Вставити SVG-символ - + Insert symbol from an SVG file Insert symbol from an SVG file @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw ТехМалюнок - - + + Turn View Frames On/Off Turn View Frames On/Off @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw ТехМалюнок - + Insert View Insert View - + Insert a View Insert a View @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw ТехМалюнок - + Add Welding Information to Leaderline Add Welding Information to Leaderline @@ -1964,58 +1964,58 @@ Command - + Drawing create page Drawing create page - + Create view Create view - + Create Projection Group Create Projection Group - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Create Symbol - + Create DraftView Create DraftView - + Create ArchView Create ArchView - + Create spreadsheet view Create spreadsheet view - - + + Save page to dxf Зберегти сторінку в dxf файл @@ -2036,17 +2036,17 @@ - + Create Dimension Створити розмір - + Create Hatch Створити штрихування - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Створити зображення @@ -2071,7 +2071,7 @@ Drag Balloon - + Drag Dimension Drag Dimension @@ -2081,7 +2081,7 @@ Create Balloon - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Create CenterLine - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine Update CosmeticLine @@ -2106,32 +2106,32 @@ Create Detail View - + Update Detail Update Detail - + Create Leader Create Leader - + Edit Leader Edit Leader - + Create Anno Create Anno - + Edit Anno Edit Anno - + Create SectionView Create SectionView @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Create WeldSymbol - + Edit WeldSymbol Edit WeldSymbol - + Add Cosmetic Vertex Add Cosmetic Vertex @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Невірний вибір - - + + No Shapes, Groups or Links in this selection No Shapes, Groups or Links in this selection - - + + Select at least 1 DrawViewPart object as Base. Select at least 1 DrawViewPart object as Base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Некоректний вибір - - + + Select an object first Оберіть об'єкт для початку - - + + Too many objects selected Обрано забагато об'єктів - - + + Create a page first. Спочатку створіть сторінку. - + @@ -2800,87 +2800,87 @@ No View of a Part in selection. - + Select one Clip group and one View. Select one Clip group and one View. - + Select exactly one View to add to group. Select exactly one View to add to group. - + Select exactly one Clip group. Select exactly one Clip group. - + Clip and View must be from same Page. Clip and View must be from same Page. - + Select exactly one View to remove from Group. Select exactly one View to remove from Group. - + View does not belong to a Clip View does not belong to a Clip - + Choose an SVG file to open Виберіть файл SVG для відкриття - + Scalable Vector Graphic Масштабована Векторна графіка - + All Files Всі файли - + Select at least one object. Оберіть принаймні один об'єкт. - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. Виберіть саме один об'єкт електронної таблиці. - + No Drawing View No Drawing View - + Open Drawing View before attempting export to SVG. Open Drawing View before attempting export to SVG. - + Can not export selection Can not export selection - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Select 2 point objects and 1 View. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Task In Progress - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Wrong Selection @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. You must select a base View for the line. @@ -3203,112 +3203,112 @@ No DrawViewPart objects in this selection - - + + No base View in Selection. No base View in Selection. - + You must select Faces or an existing CenterLine. You must select Faces or an existing CenterLine. - + No CenterLine in selection. No CenterLine in selection. - - - + + + Selection is not a CenterLine. Selection is not a CenterLine. - + Selection not understood. Selection not understood. - + You must select 2 Vertexes or an existing CenterLine. You must select 2 Vertexes or an existing CenterLine. - + Need 2 Vertices or 1 CenterLine. Need 2 Vertices or 1 CenterLine. - + Selection is empty. Selection is empty. - + Not enough points in selection. Not enough points in selection. - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. You must select 2 Vertexes. - - + + Nothing selected Nothing selected - + At least 1 object in selection is not a part view At least 1 object in selection is not a part view - + Unknown object type in selection Unknown object type in selection - + No View in Selection. No View in Selection. - + You must select a View and/or lines. You must select a View and/or lines. - + No Part Views in this selection No Part Views in this selection - + Select exactly one Leader line or one Weld symbol. Select exactly one Leader line or one Weld symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Some Faces in selection are already hatched. Replace? - + No TechDraw Page No TechDraw Page - + Need a TechDraw Page for this command Need a TechDraw Page for this command - + Select a Face first Оберіть поверхню першою - + No TechDraw object in selection No TechDraw object in selection - + Create a page to insert. Створити сторінку для вставки. - + No Faces to hatch in this selection No Faces to hatch in this selection @@ -3370,33 +3370,33 @@ No Drawing Pages in document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Всі файли (*.*) - + Export Page As PDF Експорт в PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Експорт в SVG @@ -3445,7 +3445,7 @@ Rich text editor - + New Cosmetic Vertex New Cosmetic Vertex @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3538,12 +3538,12 @@ Edit Welding Symbol - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5559,49 +5559,59 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Відмінна орієнтація - + The printer uses a different orientation than the drawing. Do you want to continue? Принтер використовує відмінну від креслення орієнтацію. Бажаєте продовжити? - + Different paper size Відмінний розмір паперу - + The printer uses a different paper size than the drawing. Do you want to continue? Принтер використовує відмінний від креслення розмір паперу. Бажаєте продовжити? - + Opening file failed Відкриття файлу не вдалося - + Can not open file %1 for writing. Can not open file %1 for writing. - + Save DXF file Зберегти файл DXF - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Виділено: @@ -6086,7 +6096,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6105,7 +6120,7 @@ Do you want to continue? - + Point Picker Point Picker @@ -6130,28 +6145,28 @@ Do you want to continue? Y - - + + Pick Points Pick Points - + Pick a point for cosmetic vertex Pick a point for cosmetic vertex - + Escape picking Escape picking - + Left click to set a point Left click to set a point - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7059,7 +7074,7 @@ You can pick further points to get line segments. - + Pick Points Pick Points @@ -7140,51 +7155,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Pick a starting point for leader line - + Save Points Save Points - + Click and drag markers to adjust leader line Click and drag markers to adjust leader line - - + + Save changes Save changes - + Left click to set a point Left click to set a point - + Press OK or Cancel to continue Press OK or Cancel to continue - + In progress edit abandoned. Start over. In progress edit abandoned. Start over. @@ -7714,6 +7729,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7853,7 +7873,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8142,6 +8162,11 @@ using the given X/Y Spacing other other + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8169,7 +8194,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Adds a Centerline between 2 Lines @@ -8177,7 +8202,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Adds a Centerline between 2 Points @@ -8185,7 +8210,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8214,7 +8239,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8246,7 +8271,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8773,4 +8798,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Сторінка + + + + DrawSVGTemplate + + + Template + Шаблон + + + + DrawView + + + View + Вид + + + + DrawViewPart + + + View + Вид + + + + DrawViewSection + + + Section + Розріз + + + + DrawComplexSection + + + Section + Розріз + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Анотація + + + + DrawViewImage + + + Image + Зображення + + + + DrawViewSymbol + + + Symbol + Symbol + + + + DrawViewArch + + + Arch + Арка + + + + DrawViewDraft + + + Draft + Креслення + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Balloon + + + + DrawViewDimension + + + Dimension + Розмірність + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Hatch + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts index f0ac0e7fac..34d59248eb 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines Afig una línia central entre 2 línies @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points Afig una línia central entre 2 punts @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines Afig una línia central entre 2 línies @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points Afig una línia central entre 2 punts @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points Add Cosmetic Line Through 2 Points @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) Insereix una vista activa (vista 3D) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object Insereix un objecte del banc de treball d'arquitectura - + Insert a View of a Section Plane from Arch Workbench Insereix una vista d'un pla de secció des d'un banc de treball d'arquitectura @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation Insereix una anotació en un globus @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line Insereix una línia central - + Add Centerline to Faces Afig una línia central les cares @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group Insereix un grup clip @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group Afig una vista al grup clip @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group Elimina una vista del ClipGroup @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object Elimina un objecte cosmètic @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines Canvia l'aparença de les línies - + Change Appearance of selected Lines Change Appearance of selected Lines @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View Insereix una vista de detall @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object Insereix un objecte del banc de treball d'esborranys - + Insert a View of a Draft Workbench object Insereix una vista d'un objecte d'un banc de treball d'esborrany @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File Fitxer - + Export Page as DXF Exporta la pàgina com a DXF - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File Fitxer - + Export Page as SVG Exportar una pàgina com a SVG @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces Afig una línia central les cares @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image Insereix una imatge de mapa de bits - - + + Insert Bitmap from a file into a page Insereix una imatge de mapa de bits d'un fitxer en una pàgina - + Select an Image File Selecciona un fitxer d'imatge - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template Insereix una pàgina utilitzant una plantilla - + Select a Template File Selecciona un fitxer de plantilla - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... Projecta la forma... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group Insereix un grup de projeccions - + Insert multiple linked views of drawable object(s) Insereix diverses vistes enllaçades d'objectes dibuixables @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page Torna a dibuixar una pàgina @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View Insereix una vista de secció @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges Mostra/amaga les arestes invisibles @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View Inserta una vista de full de càlcul - + Insert View to a spreadsheet Insereix vista a un full de càlcul @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol Inserta un símbol SVG - + Insert symbol from an SVG file Insert symbol from an SVG file @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off Activa o desactiva els marcs de la vista @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View Insereix vista - + Insert a View Insereix una vista @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline Afig la informació de soldadura a la línia guia @@ -1964,58 +1964,58 @@ Command - + Drawing create page Drawing create page - + Create view Create view - + Create Projection Group Create Projection Group - + Create Clip Create Clip - + ClipGroupAdd ClipGroupAdd - + ClipGroupRemove ClipGroupRemove - + Create Symbol Create Symbol - + Create DraftView Create DraftView - + Create ArchView Create ArchView - + Create spreadsheet view Create spreadsheet view - - + + Save page to dxf Save page to dxf @@ -2036,17 +2036,17 @@ - + Create Dimension Create Dimension - + Create Hatch Create Hatch - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch Create GeomHatch - + Create Image Create Image @@ -2071,7 +2071,7 @@ Drag Balloon - + Drag Dimension Drag Dimension @@ -2081,7 +2081,7 @@ Create Balloon - + Create ActiveView Create ActiveView @@ -2091,12 +2091,12 @@ Create CenterLine - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine Update CosmeticLine @@ -2106,32 +2106,32 @@ Create Detail View - + Update Detail Update Detail - + Create Leader Create Leader - + Edit Leader Edit Leader - + Create Anno Create Anno - + Edit Anno Edit Anno - + Create SectionView Create SectionView @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol Create WeldSymbol - + Edit WeldSymbol Edit WeldSymbol - + Add Cosmetic Vertex Afig un vèrtex cosmètic @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection Selecció incorrecta - - + + No Shapes, Groups or Links in this selection No hi ha cap forma, grup ni enllaç en aquesta selecció - - + + Select at least 1 DrawViewPart object as Base. Seleccioneu com a mínim 1 objecte DrawViewPart com a base. - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection Selecció incorrecta - - + + Select an object first Seleccioneu primer un objecte - - + + Too many objects selected Massa objectes seleccionats - - + + Create a page first. Creeu una pàgina primer - + @@ -2800,87 +2800,87 @@ No hi ha cap vista d'una peça en la selecció. - + Select one Clip group and one View. Seleccioneu un grup clip i una vista. - + Select exactly one View to add to group. Seleccioneu exactament una vista per a afegir al grup. - + Select exactly one Clip group. Seleccioneu exactament un grup clip. - + Clip and View must be from same Page. Clip i Vista han de ser de la mateixa pàgina. - + Select exactly one View to remove from Group. Seleccioneu exactament una vista per a eliminar del grup. - + View does not belong to a Clip La Vista no pertany a un Clip - + Choose an SVG file to open Trieu un fitxer SVG per a obrir-lo - + Scalable Vector Graphic Gràfic vectorial escalable - + All Files Tots els fitxers - + Select at least one object. Seleccioneu com a mínim un objecte. - + Please select only 1 Arch Section. Seleccioneu només 1 secció d'arquitectura. - + No Arch Sections in selection. No hi ha cap secció d'arquitectura en la selecció. - + Select exactly one Spreadsheet object. Seleccioneu exactament un sol objecte full de càlcul. - + No Drawing View Sense vistes de dibuix - + Open Drawing View before attempting export to SVG. Obri les vistes de dibuix abans d'intentar l'exportació a SVG. - + Can not export selection No es pot exportar la selecció - + Page contains DrawViewArch which will not be exported. Continue? La pàgina conté DrawViewArch que no s'exportaran. Voleu continuar? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Seleccioneu 2 objectes punt i una vista. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ Tasca en procés - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection Selecció incorrecta @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. Heu de seleccionar una vista de base per a la línia. @@ -3203,112 +3203,112 @@ No hi ha cap objecte DrawViewPart en aquesta selecció - - + + No base View in Selection. No hi ha cap Vista de base en la selecció. - + You must select Faces or an existing CenterLine. Heu de seleccionar cares o una línia central existent. - + No CenterLine in selection. No hi ha cap línia central en la selecció. - - - + + + Selection is not a CenterLine. La selecció no és una línia central. - + Selection not understood. No s'ha entés la selecció. - + You must select 2 Vertexes or an existing CenterLine. Heu de seleccionar 2 vèrtex o una línia central existent. - + Need 2 Vertices or 1 CenterLine. Es necessiten 2 vèrtexs o 1 línia central. - + Selection is empty. Selection is empty. - + Not enough points in selection. Not enough points in selection. - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. You must select 2 Vertexes. - - + + Nothing selected No s'ha seleccionat res - + At least 1 object in selection is not a part view Com a mínim 1 objecte eln la selecció no és una vista de peça - + Unknown object type in selection Tipus d'objecte desconegut en la selecció - + No View in Selection. No hi ha cap vista en la selecció. - + You must select a View and/or lines. Heu de seleccionar una vista i/o línies. - + No Part Views in this selection No hi ha cap vista de peça en la selecció. - + Select exactly one Leader line or one Weld symbol. Seleccioneu exactament una única línia guia o un únic símbol de soldadura. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Algunes cares en la selecció ja tenen trama. Voleu reemplaçar-les? - + No TechDraw Page No hi ha cap pàgina TechDraw - + Need a TechDraw Page for this command Es necessita una pàgina TechDraw per a aquesta ordre - + Select a Face first Seleccioneu primer una cara - + No TechDraw object in selection No hi ha cap objecte TechDraw en la selecció - + Create a page to insert. Creeu una pàgina per a inserir. - + No Faces to hatch in this selection No hi ha cares on aplicar el tramat en aquesta selecció @@ -3370,33 +3370,33 @@ No hi ha cap pàgina de dibuix en el document. - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) Tots els fitxers (*.*) - + Export Page As PDF Exporta una pàgina com a PDF - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG Exportar una pàgina com a SVG @@ -3445,7 +3445,7 @@ Editor de text enriquit - + New Cosmetic Vertex Vèrtex cosmètic nou @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Ha fallat l'operació @@ -3538,12 +3538,12 @@ Edita un símbol de soldadura - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5551,49 +5551,59 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation Orientació diferent - + The printer uses a different orientation than the drawing. Do you want to continue? La impressora utilitza una orientació diferent de la del dibuix. Voleu continuar? - + Different paper size Mida de paper diferent - + The printer uses a different paper size than the drawing. Do you want to continue? La impressora utilitza una mida de paper diferent de la del dibuix. Voleu continuar? - + Opening file failed No s'ha pogut obrir el fitxer. - + Can not open file %1 for writing. No s'ha pogut obrir el fitxer %1 per a escriure-hi. - + Save DXF file Save DXF file - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: Seleccionat: @@ -6077,7 +6087,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6096,7 +6111,7 @@ Do you want to continue? - + Point Picker Seleccionador de punts @@ -6121,28 +6136,28 @@ Do you want to continue? Y - - + + Pick Points Selecciona punts - + Pick a point for cosmetic vertex Selecciona un punt per al vèrtex cosmètic - + Escape picking Escape picking - + Left click to set a point Feu clic al botó esquerre per a definir un punt - + In progress edit abandoned. Start over. S'ha abandonat l'edició en procés. Torna a començar. @@ -7050,7 +7065,7 @@ You can pick further points to get line segments. - + Pick Points Selecciona punts @@ -7131,51 +7146,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line Trieu un punt inicial per a la línia guia - + Save Points Save Points - + Click and drag markers to adjust leader line Feu clic i arrossegueu els marcadors per a ajustar la línia guia - - + + Save changes Guarda els canvis - + Left click to set a point Feu clic al botó esquerre per a definir un punt - + Press OK or Cancel to continue Premeu D'acord o Cancel·la per a continuar - + In progress edit abandoned. Start over. S'ha abandonat l'edició en procés. Torna a començar. @@ -7705,6 +7720,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Introduïu directament el text de l’anotació o inicieu l’editor de text enriquit + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7844,7 +7864,7 @@ using the given X/Y Spacing No hi ha res a aplicar. Encara no s'ha triat la direcció de la secció - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8133,6 +8153,11 @@ using the given X/Y Spacing other altres + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8160,7 +8185,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines Afig una línia central entre 2 línies @@ -8168,7 +8193,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points Afig una línia central entre 2 punts @@ -8176,7 +8201,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8205,7 +8230,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Afig una línia central a una cara @@ -8237,7 +8262,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8764,4 +8789,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + Pàgina + + + + DrawSVGTemplate + + + Template + Template + + + + DrawView + + + View + Visualitza + + + + DrawViewPart + + + View + Visualitza + + + + DrawViewSection + + + Section + Secció + + + + DrawComplexSection + + + Section + Secció + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + Anotació + + + + DrawViewImage + + + Image + Imatge + + + + DrawViewSymbol + + + Symbol + Símbol + + + + DrawViewArch + + + Arch + Arquitectura + + + + DrawViewDraft + + + Draft + Calat + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + Globus + + + + DrawViewDimension + + + Dimension + Dimensió + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + Trama + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts index a9ad5e16cf..90cb11b808 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines 在两条线之间添加中心线 @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points 在 2 点之间添加中心线 @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw 工程图 - + Add Centerline between 2 Lines 在两条线之间添加中心线 @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw 工程图 - + Add Centerline between 2 Points 在 2 点之间添加中心线 @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw 工程图 - + Add Cosmetic Line Through 2 Points 通过 2 点添加修饰线 @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw 工程图 - + Insert Active View (3D View) 插入活动视图 (三维视图) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw 工程图 - + Insert Arch Workbench Object 插入 Arch 工作台对象 - + Insert a View of a Section Plane from Arch Workbench 从 Arch Workbench 插入剖面的视图 @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw 工程图 - + Insert Balloon Annotation 插入气球批注 @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw 工程图 - + Insert Center Line 插入中心线 - + Add Centerline to Faces 从面取中心线 @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw 工程图 - + Insert Clip Group 插入剪辑组 @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw 工程图 - + Add View to Clip Group 添加视图到剪辑组 @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw 工程图 - + Remove View from Clip Group 从剪辑组中删除视图 @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw 工程图 - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw 工程图 - + Remove Cosmetic Object 移除饰性对象 @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw 工程图 - + Change Appearance of Lines 更改线的外观 - + Change Appearance of selected Lines 更改所选线条外观 @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw 工程图 - + Insert Detail View 插入局部视图 @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw 工程图 - + Insert Draft Workbench Object 插入草稿工作台对象 - + Insert a View of a Draft Workbench object 插入底图工作台对象视图 @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File 文件 - + Export Page as DXF 以DXF格式导出页面 - + Save DXF file 保存为 Dxf 文件 - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File 文件 - + Export Page as SVG 以SVG格式导出页面 @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw 工程图 - + Add Centerline to Faces 从面取中心线 @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw 工程图 - + Insert Bitmap Image 插入位图 - - + + Insert Bitmap from a file into a page 从文件插入位图到页面 - + Select an Image File 选择图像文件 - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw 工程图 - + Insert Page using Template 使用模板插入页面 - + Select a Template File 选择模板文件 - + Template (*.svg) 模板 (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw 工程图 - + Print All Pages Print All Pages @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw 工程图 - + Project shape... 投影形体... @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw 工程图 - + Insert Projection Group 插入投影组 - + Insert multiple linked views of drawable object(s) 插入可绘制对象的多个关联视图 @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw 工程图 - + Redraw Page 重绘页面 @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw 工程图 - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View 截面视图 - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw 工程图 - + Insert Section View 插入剖面图 @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw 工程图 - + Show/Hide Invisible Edges 显示/隐藏不可见边缘 @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw 工程图 - + Insert Spreadsheet View 插入数据表视图 - + Insert View to a spreadsheet 将视图插入数据表 @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw 工程图 - + Create a Surface Finish Symbol Create a Surface Finish Symbol - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw 工程图 - + Insert SVG Symbol 插入 SVG 符号 - + Insert symbol from an SVG file 从 SVG 文件插入符号 @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw 工程图 - - + + Turn View Frames On/Off 打开或关闭视图框 @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw 工程图 - + Insert View 插入视图 - + Insert a View 插入视图 @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw 工程图 - + Add Welding Information to Leaderline 向指引线添加焊接信息 @@ -1964,58 +1964,58 @@ Command - + Drawing create page 图纸创建页面 - + Create view 创建视图 - + Create Projection Group 创建投影组 - + Create Clip 创建剪辑 - + ClipGroupAdd 添加剪辑组 - + ClipGroupRemove 移除剪辑组 - + Create Symbol 创建符号 - + Create DraftView 创建草稿视图 - + Create ArchView 创建拱门视图 - + Create spreadsheet view 创建电子表格视图 - - + + Save page to dxf 保存页面到 dxf @@ -2036,17 +2036,17 @@ - + Create Dimension 创建尺寸 - + Create Hatch 创建剖面线 - + Update Hatch Update Hatch @@ -2056,12 +2056,12 @@ Remove old Hatch - + Create GeomHatch 创建 GeomHatch - + Create Image 创建图像 @@ -2071,7 +2071,7 @@ 拖动气球 - + Drag Dimension 拖动尺寸 @@ -2081,7 +2081,7 @@ 创建气球 - + Create ActiveView 创建活动视图 @@ -2091,12 +2091,12 @@ 创建中心线 - + Create Cosmetic Line Create Cosmetic Line - + Update CosmeticLine 更新饰品线 @@ -2106,32 +2106,32 @@ 创建细节视图 - + Update Detail 更新详细信息 - + Create Leader 创建领导者 - + Edit Leader 编辑领导者 - + Create Anno 创建年份 - + Edit Anno 编辑年份 - + Create SectionView 创建剖面视图 @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView - + Create WeldSymbol 创建焊接符号 - + Edit WeldSymbol 编辑焊接符号 - + Add Cosmetic Vertex 添加饰品顶点 @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection 选择错误 - - + + No Shapes, Groups or Links in this selection No Shapes, Groups or Links in this selection - - + + Select at least 1 DrawViewPart object as Base. 选中至少1个绘制视图零件对象作为基准。 - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection 选择错误 - - + + Select an object first 首先选择对象 - - + + Too many objects selected 选择的对象过多 - - + + Create a page first. 首先创建一个页面。 - + @@ -2800,87 +2800,87 @@ 没有选择中零件的视图。 - + Select one Clip group and one View. 选择一个剪辑组和一个视图。 - + Select exactly one View to add to group. 仅选择一个视图添加到组。 - + Select exactly one Clip group. 仅选择一个剪辑组。 - + Clip and View must be from same Page. 剪辑和视图必须来自同一页。 - + Select exactly one View to remove from Group. 仅选择一个视图从组中移除。 - + View does not belong to a Clip 视图不属于剪辑 - + Choose an SVG file to open 选择一个SVG文件打开 - + Scalable Vector Graphic 可缩放矢量图形 - + All Files 所有文件 - + Select at least one object. 请至少选择一个对象。 - + Please select only 1 Arch Section. Please select only 1 Arch Section. - + No Arch Sections in selection. No Arch Sections in selection. - + Select exactly one Spreadsheet object. 选择一个电子表格对象。 - + No Drawing View 无绘图视图 - + Open Drawing View before attempting export to SVG. 在尝试导出到 SVG 之前打开绘图视图。 - + Can not export selection 无法导出所选对象 - + Page contains DrawViewArch which will not be exported. Continue? Page contains DrawViewArch which will not be exported. Continue? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ Select 2 point objects and 1 View. (2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ 任务正在进行 - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection 错误选择。 @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. 您必须为该线选择一个基视图。 @@ -3203,112 +3203,112 @@ No DrawViewPart objects in this selection - - + + No base View in Selection. 在选择中没有基本视图。 - + You must select Faces or an existing CenterLine. You must select Faces or an existing CenterLine. - + No CenterLine in selection. No CenterLine in selection. - - - + + + Selection is not a CenterLine. Selection is not a CenterLine. - + Selection not understood. Selection not understood. - + You must select 2 Vertexes or an existing CenterLine. You must select 2 Vertexes or an existing CenterLine. - + Need 2 Vertices or 1 CenterLine. Need 2 Vertices or 1 CenterLine. - + Selection is empty. 没有选择对象。 - + Not enough points in selection. 没有选择足够的点。 - + Selection is not a Cosmetic Line. Selection is not a Cosmetic Line. - + You must select 2 Vertexes. 你必须选择两个交点。 - - + + Nothing selected 未选择任何内容 - + At least 1 object in selection is not a part view 至少一个所选对象不是零件视图 - + Unknown object type in selection 选择了未知的对象类型 - + No View in Selection. 选择中没有视图。 - + You must select a View and/or lines. 您必须选择一个视图(或多个线条)。 - + No Part Views in this selection 选择中没有部件视图。 - + Select exactly one Leader line or one Weld symbol. Select exactly one Leader line or one Weld symbol. - - + + SurfaceFinishSymbols SurfaceFinishSymbols - + No Part View in Selection No Part View in Selection - + No %1 in Selection No %1 in Selection @@ -3323,33 +3323,33 @@ Some Faces in selection are already hatched. Replace? - + No TechDraw Page 无 TechDraw 页 - + Need a TechDraw Page for this command 此命令需要TechDraw 页 - + Select a Face first 先选择一个面 - + No TechDraw object in selection 选择中没有 TechDraw 对象 - + Create a page to insert. 创建一个插入页面. - + No Faces to hatch in this selection 在此选择中没有面可以填充剖面线 @@ -3370,33 +3370,33 @@ No Drawing Pages in document. - + PDF (*.pdf) PDF (* pdf) - - + + All Files (*.*) 所有文件(*.*) - + Export Page As PDF 以 PDF 格式导出页面 - + Document Name: Document Name: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG 以 SVG格式导出页面 @@ -3445,7 +3445,7 @@ 富文本编辑器 - + New Cosmetic Vertex New Cosmetic Vertex @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3538,12 +3538,12 @@ Edit Welding Symbol - + Create Cosmetic Line Create Cosmetic Line - + Edit Cosmetic Line Edit Cosmetic Line @@ -3678,7 +3678,7 @@ 未选择子元素 - + @@ -3686,7 +3686,7 @@ Selection is empty - + No object selected @@ -3723,7 +3723,7 @@ Please select two straight lines - + Select 2 Vertexes or 1 Edge Select 2 Vertexes or 1 Edge @@ -5558,49 +5558,59 @@ Fast, but result is a collection of short straight lines. Print All Pages - + Different orientation 不同方向 - + The printer uses a different orientation than the drawing. Do you want to continue? 打印机和图纸使用了不同的定位位置。你想要继续吗? - + Different paper size 不同的图纸大小 - + The printer uses a different paper size than the drawing. Do you want to continue? 打印机和当前图纸使用了不同大小的图纸,是否继续? - + Opening file failed 打开文件失败 - + Can not open file %1 for writing. 无法打开文件“%1”进行写入。 - + Save DXF file 保存为 Dxf 文件 - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (* pdf) + + + Selected: 已选择: @@ -6085,7 +6095,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6104,7 +6119,7 @@ Do you want to continue? - + Point Picker 点选取器 @@ -6129,28 +6144,28 @@ Do you want to continue? Y - - + + Pick Points 选取点 - + Pick a point for cosmetic vertex Pick a point for cosmetic vertex - + Escape picking Escape picking - + Left click to set a point 左键单击以设置点 - + In progress edit abandoned. Start over. 放弃当前编辑。重新开始。 @@ -7058,7 +7073,7 @@ You can pick further points to get line segments. - + Pick Points 选取点 @@ -7139,51 +7154,51 @@ You can pick further points to get line segments. - - - + + + Edit points Edit points - + Edit Points Edit Points - - + + Pick a starting point for leader line 为引导线选取起始点 - + Save Points Save Points - + Click and drag markers to adjust leader line 点击并拖动标记来调整引导线 - - + + Save changes 保存更改 - + Left click to set a point 左键单击以设置点 - + Press OK or Cancel to continue 按确定或取消继续 - + In progress edit abandoned. Start over. 放弃当前编辑。重新开始。 @@ -7713,6 +7728,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor Input the annotation text directly or start the rich text editor + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7852,7 +7872,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8141,6 +8161,11 @@ using the given X/Y Spacing other 其它 + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8168,7 +8193,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines 在两线之间添加中心线 @@ -8176,7 +8201,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points 在 2 点之间添加中心线 @@ -8184,7 +8209,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8213,7 +8238,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces Adds a Centerline to Faces @@ -8245,7 +8270,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8772,4 +8797,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + + + + + DrawSVGTemplate + + + Template + 模板 + + + + DrawView + + + View + 视图 + + + + DrawViewPart + + + View + 视图 + + + + DrawViewSection + + + Section + 截面 + + + + DrawComplexSection + + + Section + 截面 + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + 注释 + + + + DrawViewImage + + + Image + 图像 + + + + DrawViewSymbol + + + Symbol + 符号 + + + + DrawViewArch + + + Arch + 建筑 + + + + DrawViewDraft + + + Draft + 拔模 + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + 气球框 + + + + DrawViewDimension + + + Dimension + 尺寸标注 + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + 剖面线 + + + + DrawGeomHatch + + + GeomHatch + 几何图形 + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts index cc0ea3fd3e..a411d682ca 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts @@ -4,7 +4,7 @@ Cmd2LineCenterLine - + Add Centerline between 2 Lines 在兩條線中加入中心線 @@ -12,7 +12,7 @@ Cmd2PointCenterLine - + Add Centerline between 2 Points 加入中心線在兩點間 @@ -36,12 +36,12 @@ CmdTechDraw2LineCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Lines 在兩條線中加入中心線 @@ -49,12 +49,12 @@ CmdTechDraw2PointCenterLine - + TechDraw TechDraw - + Add Centerline between 2 Points 加入中心線在兩點間 @@ -62,12 +62,12 @@ CmdTechDraw2PointCosmeticLine - + TechDraw TechDraw - + Add Cosmetic Line Through 2 Points 通過 2 點添加裝飾線 @@ -88,12 +88,12 @@ CmdTechDrawActiveView - + TechDraw TechDraw - + Insert Active View (3D View) 插入活動視圖(3D 視圖) @@ -127,17 +127,17 @@ CmdTechDrawArchView - + TechDraw TechDraw - + Insert Arch Workbench Object 插入 Arch 工作台物件 - + Insert a View of a Section Plane from Arch Workbench 從 Arch 工作台插入剖面視圖 @@ -145,12 +145,12 @@ CmdTechDrawBalloon - + TechDraw TechDraw - + Insert Balloon Annotation 插入件號圓圈註解 @@ -158,17 +158,17 @@ CmdTechDrawCenterLineGroup - + TechDraw TechDraw - + Insert Center Line 插入中央線 - + Add Centerline to Faces 添加中心線至面 @@ -176,12 +176,12 @@ CmdTechDrawClipGroup - + TechDraw TechDraw - + Insert Clip Group 插入裁剪群組 @@ -189,12 +189,12 @@ CmdTechDrawClipGroupAdd - + TechDraw TechDraw - + Add View to Clip Group 添加視圖至裁剪群組 @@ -202,12 +202,12 @@ CmdTechDrawClipGroupRemove - + TechDraw TechDraw - + Remove View from Clip Group 自裁剪群組中移除視圖 @@ -215,17 +215,17 @@ CmdTechDrawComplexSection - + TechDraw TechDraw - + Insert Complex Section Insert Complex Section - + Insert a Complex Section Insert a Complex Section @@ -233,12 +233,12 @@ CmdTechDrawCosmeticEraser - + TechDraw TechDraw - + Remove Cosmetic Object 移除裝飾物件 @@ -277,17 +277,17 @@ CmdTechDrawDecorateLine - + TechDraw TechDraw - + Change Appearance of Lines 改變線之外觀 - + Change Appearance of selected Lines 更改選取線條的外觀 @@ -295,12 +295,12 @@ CmdTechDrawDetailView - + TechDraw TechDraw - + Insert Detail View 插入詳細視圖 @@ -334,17 +334,17 @@ CmdTechDrawDraftView - + TechDraw TechDraw - + Insert Draft Workbench Object 插入草圖工作台物件 - + Insert a View of a Draft Workbench object 插入由Draft Workbench 物件事角 @@ -352,22 +352,22 @@ CmdTechDrawExportPageDXF - + File 檔案 - + Export Page as DXF 匯出為DXF檔 - + Save DXF file 儲存DXF檔 - + DXF (*.dxf) DXF (*.dxf) @@ -375,12 +375,12 @@ CmdTechDrawExportPageSVG - + File 檔案 - + Export Page as SVG 滙出為SVG檔 @@ -1413,12 +1413,12 @@ CmdTechDrawFaceCenterLine - + TechDraw TechDraw - + Add Centerline to Faces 添加中心線至面 @@ -1478,28 +1478,28 @@ CmdTechDrawImage - + TechDraw TechDraw - + Insert Bitmap Image 插入點陣圖片 - - + + Insert Bitmap from a file into a page 由一個檔案案插入點陣圖到一頁 - + Select an Image File 選擇一個影像檔 - + Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) Image files (*.jpg *.jpeg *.png *.bmp);;All files (*) @@ -1585,22 +1585,22 @@ CmdTechDrawPageTemplate - + TechDraw TechDraw - + Insert Page using Template 插入頁使用樣板 - + Select a Template File 撰擇一個樣板檔 - + Template (*.svg) Template (*.svg) @@ -1608,12 +1608,12 @@ CmdTechDrawPrintAll - + TechDraw TechDraw - + Print All Pages 列印全部頁面 @@ -1621,12 +1621,12 @@ CmdTechDrawProjectShape - + TechDraw TechDraw - + Project shape... 專案形式 @@ -1634,17 +1634,17 @@ CmdTechDrawProjectionGroup - + TechDraw TechDraw - + Insert Projection Group 插入專案群組 - + Insert multiple linked views of drawable object(s) 插入可繪製物件的多個可鏈接視圖 @@ -1678,12 +1678,12 @@ CmdTechDrawRedrawPage - + TechDraw TechDraw - + Redraw Page 重繪制頁 @@ -1704,22 +1704,22 @@ CmdTechDrawSectionGroup - + TechDraw TechDraw - + Insert a simple or complex Section View Insert a simple or complex Section View - + Section View Section View - + Complex Section Complex Section @@ -1727,12 +1727,12 @@ CmdTechDrawSectionView - + TechDraw TechDraw - + Insert Section View 插入剖面圖 @@ -1740,12 +1740,12 @@ CmdTechDrawShowAll - + TechDraw TechDraw - + Show/Hide Invisible Edges 顯示/隱藏不可視的邊 @@ -1753,17 +1753,17 @@ CmdTechDrawSpreadsheetView - + TechDraw TechDraw - + Insert Spreadsheet View 插入試算表視圖 - + Insert View to a spreadsheet 插入視圖至試算表 @@ -1856,17 +1856,17 @@ CmdTechDrawSurfaceFinishSymbols - + TechDraw TechDraw - + Create a Surface Finish Symbol 建立一個表面紋理符號 - + Select a view<br> - click this button<br> - select surface finish symbol attributes in opened panel 選擇一個視圖<br> - 點擊此按鍵<br> -在開啟面板中選擇選擇表面粗糙度符號屬性 @@ -1874,17 +1874,17 @@ CmdTechDrawSymbol - + TechDraw TechDraw - + Insert SVG Symbol 插入 SVG 符號 - + Insert symbol from an SVG file 從一個 SVG 檔中插入符號 @@ -1892,13 +1892,13 @@ CmdTechDrawToggleFrame - + TechDraw TechDraw - - + + Turn View Frames On/Off 開/關 視圖幀 @@ -1932,17 +1932,17 @@ CmdTechDrawView - + TechDraw TechDraw - + Insert View 插入檢視 - + Insert a View 插入一個檢視 @@ -1950,12 +1950,12 @@ CmdTechDrawWeldSymbol - + TechDraw TechDraw - + Add Welding Information to Leaderline 加入銲接資訊到指線 @@ -1964,58 +1964,58 @@ Command - + Drawing create page 繪圖建立頁面 - + Create view 建立視圖 - + Create Projection Group 建立投射群組 - + Create Clip 建立裁剪 - + ClipGroupAdd 添加裁剪群組 - + ClipGroupRemove 移除裁剪群組 - + Create Symbol 建立符號 - + Create DraftView 建立 DraftView - + Create ArchView 建立 ArchView - + Create spreadsheet view 建立試算表視圖 - - + + Save page to dxf 儲存頁面為 DXF 格式 @@ -2036,17 +2036,17 @@ - + Create Dimension 建立標註 - + Create Hatch 建立填充 - + Update Hatch 更新填充 @@ -2056,12 +2056,12 @@ 移除舊填充 - + Create GeomHatch 建立幾何填充(GeomHatch) - + Create Image 建立圖片 @@ -2071,7 +2071,7 @@ 拖曳件號圓圈 - + Drag Dimension 拖曳標註 @@ -2081,7 +2081,7 @@ 建立件號圓圈 - + Create ActiveView 建立活動視圖 @@ -2091,12 +2091,12 @@ 建立中心線 - + Create Cosmetic Line 建立裝飾線 - + Update CosmeticLine 更新裝飾線 @@ -2106,32 +2106,32 @@ 建立詳細視圖 - + Update Detail 更新明細 - + Create Leader 建立指線 - + Edit Leader 編輯指線 - + Create Anno 建立標注 - + Edit Anno 編輯標注 - + Create SectionView 建立剖面視圖 @@ -2141,23 +2141,23 @@ Create ComplexSection - - + + Edit SectionView 編輯剖面視圖 - + Create WeldSymbol 建立銲接符號 - + Edit WeldSymbol 編輯銲接符號 - + Add Cosmetic Vertex 添加裝飾頂點 @@ -2688,68 +2688,68 @@ QObject - - - + + - - - - - - - - - - - + + + + + + + + + + + - + + - - - - - - + + + + + + Wrong selection 錯誤的選取 - - + + No Shapes, Groups or Links in this selection 此選擇中沒有形狀、群組或連結 - - + + Select at least 1 DrawViewPart object as Base. 選擇至少一個 DrawViewPart 物件作為基礎。 - + I do not know what base view to use. I do not know what base view to use. - + No Base View, Shapes, Groups or Links in this selection No Base View, Shapes, Groups or Links in this selection - + No profile object found in selection No profile object found in selection - - - + + + @@ -2758,36 +2758,36 @@ - - - - - - + + + + + + Incorrect selection 不正確的選取 - - + + Select an object first 請先選一個物件 - - + + Too many objects selected 太多物件被選擇 - - + + Create a page first. 請先建立一個頁面 - + @@ -2800,87 +2800,87 @@ 選擇中的零件沒有視圖。 - + Select one Clip group and one View. 選擇一個裁剪群組與一個視圖 - + Select exactly one View to add to group. 請選擇正好一個視圖來加入群組。 - + Select exactly one Clip group. 選擇正好一個裁剪群組 - + Clip and View must be from same Page. 裁剪與視圖必須來自相同頁面。 - + Select exactly one View to remove from Group. 請選擇正好一個視圖來從群組中移除。 - + View does not belong to a Clip 視圖不屬於裁剪 - + Choose an SVG file to open 選擇要開啟的 SVG 檔 - + Scalable Vector Graphic 可縮放向量圖檔 - + All Files 所有檔案 - + Select at least one object. 至少選擇一個物件 - + Please select only 1 Arch Section. 請選擇只有 1 個 Arch 剖面 - + No Arch Sections in selection. 沒有選擇 Arch 剖面圖。 - + Select exactly one Spreadsheet object. 請僅選擇一個試算表物件 - + No Drawing View 沒有繪圖視圖 - + Open Drawing View before attempting export to SVG. 在嘗試導出到 SVG 之前打開繪圖視圖。 - + Can not export selection 無法匯出選擇的 - + Page contains DrawViewArch which will not be exported. Continue? 頁面包含 DrawViewArch 將不會被匯出。繼續? @@ -2926,9 +2926,9 @@ - - + + @@ -3059,24 +3059,24 @@ 選擇 2 點物件以及 1 個視圖。(2) - - - + + + - - - - - - - - - + + + + + + + + + @@ -3108,24 +3108,24 @@ 任務進行中 - - - + + + - - - - - - - - - + + + + + + + + + @@ -3159,27 +3159,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Wrong Selection 錯誤的選擇 @@ -3190,9 +3190,9 @@ - - - + + + You must select a base View for the line. 您必須給那條線選擇一個基礎視圖。 @@ -3203,112 +3203,112 @@ 此選擇中沒有 DrawViewPart 物件 - - + + No base View in Selection. 選擇中沒有基礎視圖。 - + You must select Faces or an existing CenterLine. 您必須選取面或現有的中心線。 - + No CenterLine in selection. 選擇中沒有中心線。 - - - + + + Selection is not a CenterLine. 選擇並非中心線 - + Selection not understood. 不了解選取什麼。 - + You must select 2 Vertexes or an existing CenterLine. 您必須選取 2 個點或現有的中心線。 - + Need 2 Vertices or 1 CenterLine. 需要 2 個點或 1 條中心線。 - + Selection is empty. 選擇為空。 - + Not enough points in selection. 沒有足夠的點被選取。 - + Selection is not a Cosmetic Line. 選擇並非裝飾線 - + You must select 2 Vertexes. 您必須選擇2個點。 - - + + Nothing selected 沒有選取項目 - + At least 1 object in selection is not a part view 至少 1 個選取物件不是零件視圖 - + Unknown object type in selection 未知的物件類型在選擇中 - + No View in Selection. 選擇中沒有視圖 - + You must select a View and/or lines. 您必須選擇一個視圖與/或線 - + No Part Views in this selection 此選擇中沒有零件視圖 - + Select exactly one Leader line or one Weld symbol. 選擇正好一個指線或一個銲接符號。 - - + + SurfaceFinishSymbols 表面紋理符號 - + No Part View in Selection 選擇中沒有零件視圖 - + No %1 in Selection 選擇中沒有 %1 @@ -3323,33 +3323,33 @@ 某些選擇中的面已被填充,是否更換? - + No TechDraw Page 沒有 TechDraw 頁面 - + Need a TechDraw Page for this command 本命令需要一個 TechDraw 頁面 - + Select a Face first 請先選擇一個面 - + No TechDraw object in selection 沒有 TechDraw 物件在選擇中 - + Create a page to insert. 建立要插入的頁面。 - + No Faces to hatch in this selection 此填充中沒有面要填充 @@ -3370,33 +3370,33 @@ 文件中沒有繪圖頁面 - + PDF (*.pdf) PDF (*.pdf) - - + + All Files (*.*) 所有檔 (*.*) - + Export Page As PDF 匯出頁面為 PDF 檔 - + Document Name: 文件名稱: - + SVG (*.svg) SVG (*.svg) - + Export page as SVG 匯出頁面為 SVG 檔 @@ -3445,7 +3445,7 @@ 富文字編輯器 - + New Cosmetic Vertex 新裝飾頂點 @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed 操作失敗 @@ -3538,12 +3538,12 @@ 編輯銲接符號 - + Create Cosmetic Line 建立裝飾線 - + Edit Cosmetic Line 編輯裝飾線 @@ -3678,7 +3678,7 @@ No subelements selected - + @@ -3686,7 +3686,7 @@ 選擇為空。 - + No object selected @@ -3723,7 +3723,7 @@ 請選擇兩條直線 - + Select 2 Vertexes or 1 Edge 選擇二個點或一條邊 @@ -5553,49 +5553,59 @@ Fast, but result is a collection of short straight lines. 列印全部頁面 - + Different orientation 不同方向 - + The printer uses a different orientation than the drawing. Do you want to continue? 印表機與圖面使用之方向不同,您要繼續嗎? - + Different paper size 紙張尺寸不同 - + The printer uses a different paper size than the drawing. Do you want to continue? 印表機與圖面之紙張尺寸不同,您要繼續嗎? - + Opening file failed 開啟檔案失敗 - + Can not open file %1 for writing. 無法開啟要寫入的檔案 %1 。 - + Save DXF file 儲存DXF檔 - + DXF (*.dxf) DXF (*.dxf) - + + Save PDF file + Save PDF file + + + + PDF (*.pdf) + PDF (*.pdf) + + + Selected: 已選取: @@ -6079,7 +6089,12 @@ Do you want to continue? No direction set - + + ComplexSection + ComplexSection + + + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6098,7 +6113,7 @@ Do you want to continue? - + Point Picker 點選擇器 @@ -6123,28 +6138,28 @@ Do you want to continue? Ÿ - - + + Pick Points 選擇點 - + Pick a point for cosmetic vertex 自裝飾頂點中挑選一個點 - + Escape picking 退出挑選 - + Left click to set a point 點擊滑鼠左鍵來設定一個點 - + In progress edit abandoned. Start over. 放棄進行的編輯。重新來過。 @@ -7052,7 +7067,7 @@ You can pick further points to get line segments. - + Pick Points 選擇點 @@ -7133,51 +7148,51 @@ You can pick further points to get line segments. - - - + + + Edit points 編輯點 - + Edit Points 編輯點 - - + + Pick a starting point for leader line 挑選指線的起始點 - + Save Points 儲存點 - + Click and drag markers to adjust leader line 點擊並拖曳標記以調整指線 - - + + Save changes 儲存變更 - + Left click to set a point 點擊滑鼠左鍵來設定一個點 - + Press OK or Cancel to continue 按下 OK 或取消來繼續 - + In progress edit abandoned. Start over. 放棄進行的編輯。重新來過。 @@ -7706,6 +7721,11 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor 直接輸入註解文字或啟動富文字編輯器 + + + RichTextAnnotation + RichTextAnnotation + TechDrawGui::TaskSectionView @@ -7845,7 +7865,7 @@ using the given X/Y Spacing 無法套用。尚未挑選剖面方向 - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8134,6 +8154,11 @@ using the given X/Y Spacing other 其他 + + + SectionView + SectionView + TechDrawGui::dlgTemplateField @@ -8161,7 +8186,7 @@ using the given X/Y Spacing TechDraw_2LineCenterLine - + Adds a Centerline between 2 Lines 在兩條線中加入中心線 @@ -8169,7 +8194,7 @@ using the given X/Y Spacing TechDraw_2PointCenterLine - + Adds a Centerline between 2 Points 在兩點間加入中心線 @@ -8177,7 +8202,7 @@ using the given X/Y Spacing TechDraw_ComplexSection - + Insert complex Section View Insert complex Section View @@ -8206,7 +8231,7 @@ using the given X/Y Spacing TechDraw_FaceCenterLine - + Adds a Centerline to Faces 添加中心線至面 @@ -8238,7 +8263,7 @@ using the given X/Y Spacing TechDraw_SectionView - + Insert simple Section View Insert simple Section View @@ -8765,4 +8790,156 @@ there is an open task dialog. Can Not Delete + + DrawPage + + + Page + + + + + DrawSVGTemplate + + + Template + 模板 + + + + DrawView + + + View + 檢視 + + + + DrawViewPart + + + View + 檢視 + + + + DrawViewSection + + + Section + 剖面 + + + + DrawComplexSection + + + Section + 剖面 + + + + DrawViewDetail + + + Detail + Detail + + + + DrawActiveView + + + ActiveView + ActiveView + + + + DrawViewAnnotation + + + Annotation + 注釋 + + + + DrawViewImage + + + Image + 影像 + + + + DrawViewSymbol + + + Symbol + 符號 + + + + DrawViewArch + + + Arch + Arch + + + + DrawViewDraft + + + Draft + 吃水 + + + + DrawLeaderLine + + + LeaderLine + LeaderLine + + + + DrawViewBalloon + + + Balloon + 件號圓圈 + + + + DrawViewDimension + + + Dimension + 標註 + + + + DrawViewDimExtent + + + Extent + Extent + + + + DrawHatch + + + Hatch + 填充 + + + + DrawGeomHatch + + + GeomHatch + GeomHatch + + diff --git a/src/Mod/TechDraw/Gui/TaskComplexSection.cpp b/src/Mod/TechDraw/Gui/TaskComplexSection.cpp index 0f397a47f7..9b997a18f0 100644 --- a/src/Mod/TechDraw/Gui/TaskComplexSection.cpp +++ b/src/Mod/TechDraw/Gui/TaskComplexSection.cpp @@ -561,19 +561,20 @@ void TaskComplexSection::createComplexSection() Command::doCommand(Command::Doc, "App.ActiveDocument.addObject('TechDraw::DrawComplexSection', '%s')", m_sectionName.c_str()); - std::string uniqueSuffix{m_sectionName.substr(objectName.length(), std::string::npos)}; - std::string uniqueLabel = "Section" + uniqueSuffix; - Command::doCommand(Command::Doc, "App.activeDocument().%s.translateLabel('DrawComplexSection', 'Section', '%s')", - m_sectionName.c_str(), uniqueLabel.c_str()); - - Command::doCommand(Command::Doc, "App.ActiveDocument.%s.addView(App.ActiveDocument.%s)", - m_page->getNameInDocument(), m_sectionName.c_str()); - + // section labels (Section A-A) are not unique, and are not the same as the object name (SectionView) + // we pluck the generated suffix from the object name and append it to "Section" to generate + // unique Labels QString qTemp = ui->leSymbol->text(); std::string temp = Base::Tools::toStdString(qTemp); Command::doCommand(Command::Doc, "App.ActiveDocument.%s.SectionSymbol = '%s'", m_sectionName.c_str(), temp.c_str()); + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Label = '%s'", + m_sectionName.c_str(), + makeSectionLabel(qTemp).c_str()); + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.addView(App.ActiveDocument.%s)", + m_page->getNameInDocument(), m_sectionName.c_str()); + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Scale = %0.6f", m_sectionName.c_str(), ui->sbScale->value()); int scaleType = ui->cmbScaleType->currentIndex(); @@ -646,10 +647,12 @@ void TaskComplexSection::updateComplexSection() std::string temp = Base::Tools::toStdString(qTemp); Command::doCommand(Command::Doc, "App.ActiveDocument.%s.SectionSymbol = '%s'", m_sectionName.c_str(), temp.c_str()); - std::string lblText = std::string(m_section->Label.getValue()) + " " + temp + " - " + temp; - Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Label = '%s'", - m_sectionName.c_str(), lblText.c_str()); + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Label = '%s'", + m_sectionName.c_str(), + makeSectionLabel(qTemp).c_str()); + Command::doCommand(Command::Doc, "App.activeDocument().%s.translateLabel('DrawViewSection', 'Section', '%s')", + m_sectionName.c_str(), makeSectionLabel(qTemp).c_str()); Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Scale = %0.6f", m_sectionName.c_str(), ui->sbScale->value()); @@ -684,6 +687,15 @@ void TaskComplexSection::updateComplexSection() Gui::Command::commitCommand(); } +std::string TaskComplexSection::makeSectionLabel(QString symbol) +{ + const std::string objectName{QT_TR_NOOP("ComplexSection")}; + std::string uniqueSuffix{m_sectionName.substr(objectName.length(), std::string::npos)}; + std::string uniqueLabel = "Section" + uniqueSuffix; + std::string temp = Base::Tools::toStdString(symbol); + return ( uniqueLabel + " " + temp + " - " + temp ); +} + void TaskComplexSection::failNoObject(void) { QString qsectionName = Base::Tools::fromStdString(m_sectionName); diff --git a/src/Mod/TechDraw/Gui/TaskComplexSection.h b/src/Mod/TechDraw/Gui/TaskComplexSection.h index 4adaeb1a1b..9a95780ea7 100644 --- a/src/Mod/TechDraw/Gui/TaskComplexSection.h +++ b/src/Mod/TechDraw/Gui/TaskComplexSection.h @@ -107,6 +107,7 @@ protected Q_SLOTS: private: double requiredRotation(double inputAngle); + std::string makeSectionLabel(QString symbol); void createComplexSection(); void updateComplexSection(); diff --git a/src/Mod/TechDraw/Gui/TaskDimension.cpp b/src/Mod/TechDraw/Gui/TaskDimension.cpp index d65cf24b0a..7dcde0f5fd 100644 --- a/src/Mod/TechDraw/Gui/TaskDimension.cpp +++ b/src/Mod/TechDraw/Gui/TaskDimension.cpp @@ -254,8 +254,17 @@ void TaskDimension::onArbitraryChanged() void TaskDimension::onFormatSpecifierOverToleranceChanged() { +// Base::Console().Message("TD::onFormatSpecifierOverToleranceChanged()\n"); + // if (m_blockToleranceLoop) { return; } m_parent->getDimFeat()->FormatSpecOverTolerance.setValue(ui->leFormatSpecifierOverTolerance->text().toUtf8().constData()); - if (!ui->cbArbitraryTolerances->isChecked()) { + if (ui->cbArbitraryTolerances->isChecked() ) { + // Don't do anything else if tolerance is Arbitrary + recomputeFeature(); + return; + } + + if (ui->cbEqualTolerance->isChecked()) { + // the under tolerance has to match this one ui->leFormatSpecifierUnderTolerance->setText(ui->leFormatSpecifierOverTolerance->text()); m_parent->getDimFeat()->FormatSpecUnderTolerance.setValue(ui->leFormatSpecifierUnderTolerance->text().toUtf8().constData()); } @@ -264,8 +273,16 @@ void TaskDimension::onFormatSpecifierOverToleranceChanged() void TaskDimension::onFormatSpecifierUnderToleranceChanged() { +// Base::Console().Message("TD::onFormatSpecifierUnderToleranceChanged()\n"); m_parent->getDimFeat()->FormatSpecUnderTolerance.setValue(ui->leFormatSpecifierUnderTolerance->text().toUtf8().constData()); - if (!ui->cbArbitraryTolerances->isChecked()) { + if (ui->cbArbitraryTolerances->isChecked() ) { + // Don't do anything else if tolerance is Arbitrary + recomputeFeature(); + return; + } + if (ui->cbEqualTolerance->isChecked()) { + // if EqualTolerance is checked, then underTolerance is disabled, so this shouldn't happen! + // the over tolerance has to match this one ui->leFormatSpecifierOverTolerance->setText(ui->leFormatSpecifierUnderTolerance->text()); m_parent->getDimFeat()->FormatSpecOverTolerance.setValue(ui->leFormatSpecifierOverTolerance->text().toUtf8().constData()); } diff --git a/src/Mod/TechDraw/Gui/TaskSectionView.cpp b/src/Mod/TechDraw/Gui/TaskSectionView.cpp index 6f53c5f270..d26e0a392f 100644 --- a/src/Mod/TechDraw/Gui/TaskSectionView.cpp +++ b/src/Mod/TechDraw/Gui/TaskSectionView.cpp @@ -507,10 +507,17 @@ TechDraw::DrawViewSection* TaskSectionView::createSectionView(void) // section labels (Section A-A) are not unique, and are not the same as the object name (SectionView) // we pluck the generated suffix from the object name and append it to "Section" to generate // unique Labels - std::string uniqueSuffix{m_sectionName.substr(objectName.length(), std::string::npos)}; - std::string uniqueLabel = "Section" + uniqueSuffix; + QString qTemp = ui->leSymbol->text(); + std::string temp = Base::Tools::toStdString(qTemp); + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.SectionSymbol = '%s'", + m_sectionName.c_str(), temp.c_str()); + + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Label = '%s'", + m_sectionName.c_str(), + makeSectionLabel(qTemp).c_str()); Command::doCommand(Command::Doc, "App.activeDocument().%s.translateLabel('DrawViewSection', 'Section', '%s')", - m_sectionName.c_str(), uniqueLabel.c_str()); + m_sectionName.c_str(), makeSectionLabel(qTemp).c_str()); + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.addView(App.ActiveDocument.%s)", m_savePageName.c_str(), m_sectionName.c_str()); @@ -566,6 +573,7 @@ void TaskSectionView::updateSectionView() return; } + const std::string objectName("SectionView"); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Edit SectionView")); if (m_section) { Command::doCommand(Command::Doc, "App.ActiveDocument.%s.SectionDirection = '%s'", @@ -579,9 +587,12 @@ void TaskSectionView::updateSectionView() std::string temp = Base::Tools::toStdString(qTemp); Command::doCommand(Command::Doc, "App.ActiveDocument.%s.SectionSymbol = '%s'", m_sectionName.c_str(), temp.c_str()); - std::string lblText = std::string(m_section->Label.getValue()) + " " + temp + " - " + temp; + Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Label = '%s'", - m_sectionName.c_str(), lblText.c_str()); + m_sectionName.c_str(), + makeSectionLabel(qTemp).c_str()); + Command::doCommand(Command::Doc, "App.activeDocument().%s.translateLabel('DrawViewSection', 'Section', '%s')", + m_sectionName.c_str(), makeSectionLabel(qTemp).c_str()); Command::doCommand(Command::Doc, "App.ActiveDocument.%s.Scale = %0.6f", m_sectionName.c_str(), ui->sbScale->value().getValue()); @@ -610,6 +621,15 @@ void TaskSectionView::updateSectionView() Gui::Command::commitCommand(); } +std::string TaskSectionView::makeSectionLabel(QString symbol) +{ + const std::string objectName("SectionView"); + std::string uniqueSuffix{m_sectionName.substr(objectName.length(), std::string::npos)}; + std::string uniqueLabel = "Section" + uniqueSuffix; + std::string temp = Base::Tools::toStdString(symbol); + return ( uniqueLabel + " " + temp + " - " + temp ); +} + void TaskSectionView::failNoObject(void) { QString qsectionName = Base::Tools::fromStdString(m_sectionName); diff --git a/src/Mod/TechDraw/Gui/TaskSectionView.h b/src/Mod/TechDraw/Gui/TaskSectionView.h index 9fded79896..d428fe3ce3 100644 --- a/src/Mod/TechDraw/Gui/TaskSectionView.h +++ b/src/Mod/TechDraw/Gui/TaskSectionView.h @@ -94,6 +94,7 @@ protected Q_SLOTS: private: double requiredRotation(double inputAngle); + std::string makeSectionLabel(QString symbol); std::unique_ptr ui; TechDraw::DrawViewPart* m_base; diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp index a21bccd4fd..1340e668b4 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include "PreferencesGui.h" #include "QGIView.h" @@ -59,6 +60,7 @@ using namespace TechDrawGui; using namespace TechDraw; +using DU = DrawUtil; PROPERTY_SOURCE(TechDrawGui::ViewProviderViewPart, TechDrawGui::ViewProviderDrawingView) @@ -304,10 +306,20 @@ void ViewProviderViewPart::handleChangedPropertyType(Base::XMLReader &reader, co } } -bool ViewProviderViewPart::onDelete(const std::vector &) +bool ViewProviderViewPart::onDelete(const std::vector & subNames) { - // we cannot delete if the view has a section or detail view +// Base::Console().Message("VPVP::onDelete() - subs: %d\n", subNames.size()); + // if a cosmetic subelement is in the list of selected subNames then we treat this + // as a delete of the subelement and not a delete of the DVP + std::vector removables = getSelectedCosmetics(subNames); + if (!removables.empty()) { + // we have cosmetics, so remove them and tell Std_Delete not to remove the DVP + deleteCosmeticElements(removables); + getViewObject()->recomputeFeature(); + return false; + } + // we cannot delete if the view has a section or detail view QString bodyMessage; QTextStream bodyMessageStream(&bodyMessage); @@ -323,19 +335,58 @@ bool ViewProviderViewPart::onDelete(const std::vector &) QMessageBox::Ok); return false; } - else { - return true; - } + return true; } bool ViewProviderViewPart::canDelete(App::DocumentObject *obj) const { +// Base::Console().Message("VPVP::canDelete()\n"); // deletions of part objects (detail view, View etc.) are valid // that it cannot be deleted if it has a child view is handled in the onDelete() function Q_UNUSED(obj) return true; } +//! extract the names of cosmetic subelements from the list of all selected elements +std::vector ViewProviderViewPart::getSelectedCosmetics(std::vector subNames) +{ +// Base::Console().Message("VPVP::getSelectedCosmetics(%d removables)\n", subNames.size()); + + std::vector result; + // pick out any cosmetic vertices or edges in the selection + for (auto& sub : subNames) { + if (DU::getGeomTypeFromName(sub) == "Vertex") { + if (DU::isCosmeticVertex(getViewObject(), sub)) { + result.emplace_back(sub); + } + } else if (DU::getGeomTypeFromName(sub) == "Edge") { + if (DU::isCosmeticEdge(getViewObject(), sub)) { + result.emplace_back(sub); + } + } + } + return result; +} + +//! delete cosmetic elements for a list of subelement names +void ViewProviderViewPart::deleteCosmeticElements(std::vector removables) +{ +// Base::Console().Message("VPVP::deleteCosmeticElements(%d removables)\n", removables.size()); + for (auto& name : removables) { + if (DU::getGeomTypeFromName(name) == "Vertex") { + CosmeticVertex* vert = getViewObject()->getCosmeticVertexBySelection(name); + getViewObject()->removeCosmeticVertex(vert->getTagAsString()); + continue; + } + if (DU::getGeomTypeFromName(name) == "Edge") { + CosmeticEdge* edge = getViewObject()->getCosmeticEdgeBySelection(name); + // if not edge, something has gone very wrong! + getViewObject()->removeCosmeticEdge(edge->getTagAsString()); + continue; + } + } +} + App::Color ViewProviderViewPart::prefSectionColor() { return PreferencesGui::sectionLineColor(); diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.h b/src/Mod/TechDraw/Gui/ViewProviderViewPart.h index 27dc8fa10b..bf1f5b3519 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.h +++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.h @@ -78,6 +78,9 @@ public: std::vector claimChildren(void) const override; void fixSceneDependencies(); + std::vector getSelectedCosmetics(std::vector subNames); + void deleteCosmeticElements(std::vector removables); + TechDraw::DrawViewPart* getViewObject() const override; TechDraw::DrawViewPart* getViewPart() const; }; diff --git a/src/Mod/Test/BaseTests.py b/src/Mod/Test/BaseTests.py index 41fa4324f5..32e2728e11 100644 --- a/src/Mod/Test/BaseTests.py +++ b/src/Mod/Test/BaseTests.py @@ -1,29 +1,35 @@ -#*************************************************************************** -#* Copyright (c) 2004 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2004 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ -import FreeCAD, os, unittest, tempfile, math +import math +import os +import sys +import tempfile +import unittest +import FreeCAD from FreeCAD import Base + class ConsoleTestCase(unittest.TestCase): def setUp(self): self.count = 0 @@ -40,20 +46,21 @@ class ConsoleTestCase(unittest.TestCase): import _thread as thread, time except Exception: import thread, time + def adder(): lock.acquire() - self.count=self.count+1 + self.count = self.count + 1 # call of Console method is thread-safe - FreeCAD.Console.PrintMessage("Call from Python thread: count="+str(self.count)+"\n") + FreeCAD.Console.PrintMessage("Call from Python thread: count=" + str(self.count) + "\n") lock.release() - lock=thread.allocate_lock() + lock = thread.allocate_lock() for i in range(10): - thread.start_new(adder,()) + thread.start_new(adder, ()) time.sleep(3) self.assertEqual(self.count, 10, "Synchronization of threads failed") - FreeCAD.Console.PrintMessage(str(self.count)+"\n") + FreeCAD.Console.PrintMessage(str(self.count) + "\n") def testAsynchronPrintFromThread(self): # http://python-kurs.eu/threads.php @@ -61,43 +68,46 @@ class ConsoleTestCase(unittest.TestCase): import _thread as thread, time except Exception: import thread, time - def adder(): - self.count=self.count+1 - # call of Console method is thread-safe - FreeCAD.Console.PrintMessage("Call from Python thread (not synchronized): count="+str(self.count)+"\n") - lock=thread.allocate_lock() + def adder(): + self.count = self.count + 1 + # call of Console method is thread-safe + FreeCAD.Console.PrintMessage( + "Call from Python thread (not synchronized): count=" + str(self.count) + "\n" + ) + + lock = thread.allocate_lock() for i in range(10): - thread.start_new(adder,()) + thread.start_new(adder, ()) time.sleep(3) - FreeCAD.Console.PrintMessage(str(self.count)+"\n") + FreeCAD.Console.PrintMessage(str(self.count) + "\n") -# def testStatus(self): -# SLog = FreeCAD.GetStatus("Console","Log") -# SErr = FreeCAD.GetStatus("Console","Err") -# SWrn = FreeCAD.GetStatus("Console","Wrn") -# SMsg = FreeCAD.GetStatus("Console","Msg") -# FreeCAD.SetStatus("Console","Log",1) -# FreeCAD.SetStatus("Console","Err",1) -# FreeCAD.SetStatus("Console","Wrn",1) -# FreeCAD.SetStatus("Console","Msg",1) -# self.assertEqual(FreeCAD.GetStatus("Console","Msg"),1,"Set and read status failed (Console,Msg)") -# self.assertEqual(FreeCAD.GetStatus("Console","Err"),1,"Set and read status failed (Console,Err)") -# self.assertEqual(FreeCAD.GetStatus("Console","Wrn"),1,"Set and read status failed (Console,Wrn)") -# self.assertEqual(FreeCAD.GetStatus("Console","Log"),1,"Set and read status failed (Console,Log)") -# FreeCAD.SetStatus("Console","Log",0) -# FreeCAD.SetStatus("Console","Err",0) -# FreeCAD.SetStatus("Console","Wrn",0) -# FreeCAD.SetStatus("Console","Msg",0) -# self.assertEqual(FreeCAD.GetStatus("Console","Msg"),0,"Set and read status failed (Console,Msg)") -# self.assertEqual(FreeCAD.GetStatus("Console","Err"),0,"Set and read status failed (Console,Err)") -# self.assertEqual(FreeCAD.GetStatus("Console","Wrn"),0,"Set and read status failed (Console,Wrn)") -# self.assertEqual(FreeCAD.GetStatus("Console","Log"),0,"Set and read status failed (Console,Log)") -# FreeCAD.SetStatus("Console","Log",SLog) -# FreeCAD.SetStatus("Console","Err",SErr) -# FreeCAD.SetStatus("Console","Wrn",SWrn) -# FreeCAD.SetStatus("Console","Msg",SMsg) + # def testStatus(self): + # SLog = FreeCAD.GetStatus("Console","Log") + # SErr = FreeCAD.GetStatus("Console","Err") + # SWrn = FreeCAD.GetStatus("Console","Wrn") + # SMsg = FreeCAD.GetStatus("Console","Msg") + # FreeCAD.SetStatus("Console","Log",1) + # FreeCAD.SetStatus("Console","Err",1) + # FreeCAD.SetStatus("Console","Wrn",1) + # FreeCAD.SetStatus("Console","Msg",1) + # self.assertEqual(FreeCAD.GetStatus("Console","Msg"),1,"Set and read status failed (Console,Msg)") + # self.assertEqual(FreeCAD.GetStatus("Console","Err"),1,"Set and read status failed (Console,Err)") + # self.assertEqual(FreeCAD.GetStatus("Console","Wrn"),1,"Set and read status failed (Console,Wrn)") + # self.assertEqual(FreeCAD.GetStatus("Console","Log"),1,"Set and read status failed (Console,Log)") + # FreeCAD.SetStatus("Console","Log",0) + # FreeCAD.SetStatus("Console","Err",0) + # FreeCAD.SetStatus("Console","Wrn",0) + # FreeCAD.SetStatus("Console","Msg",0) + # self.assertEqual(FreeCAD.GetStatus("Console","Msg"),0,"Set and read status failed (Console,Msg)") + # self.assertEqual(FreeCAD.GetStatus("Console","Err"),0,"Set and read status failed (Console,Err)") + # self.assertEqual(FreeCAD.GetStatus("Console","Wrn"),0,"Set and read status failed (Console,Wrn)") + # self.assertEqual(FreeCAD.GetStatus("Console","Log"),0,"Set and read status failed (Console,Log)") + # FreeCAD.SetStatus("Console","Log",SLog) + # FreeCAD.SetStatus("Console","Err",SErr) + # FreeCAD.SetStatus("Console","Wrn",SWrn) + # FreeCAD.SetStatus("Console","Msg",SMsg) def tearDown(self): pass @@ -105,20 +115,22 @@ class ConsoleTestCase(unittest.TestCase): def testILoggerBlocker(self): if FreeCAD.GuiUp: import QtUnitGui + QtUnitGui.testILoggerBlocker() + class ParameterTestCase(unittest.TestCase): def setUp(self): self.TestPar = FreeCAD.ParamGet("System parameter:Test") def testGroup(self): - #FreeCAD.Console.PrintLog("Base::ParameterTestCase::testGroup\n") + # FreeCAD.Console.PrintLog("Base::ParameterTestCase::testGroup\n") # check on Group creation Temp = self.TestPar.GetGroup("44") - self.assertTrue(self.TestPar.HasGroup("44"),"Test on created group failed") + self.assertTrue(self.TestPar.HasGroup("44"), "Test on created group failed") # check on Deletion self.TestPar.RemGroup("44") - self.assertTrue(self.TestPar.HasGroup("44"),"A referenced group must not be deleted") + self.assertTrue(self.TestPar.HasGroup("44"), "A referenced group must not be deleted") Temp = 0 def testGroupNames(self): @@ -132,205 +144,203 @@ class ParameterTestCase(unittest.TestCase): # check on special conditions def testInt(self): - #FreeCAD.Console.PrintLog("Base::ParameterTestCase::testInt\n") - #Temp = FreeCAD.ParamGet("System parameter:Test/44") + # FreeCAD.Console.PrintLog("Base::ParameterTestCase::testInt\n") + # Temp = FreeCAD.ParamGet("System parameter:Test/44") # check on Int - self.TestPar.SetInt("44",4711) - self.assertEqual(self.TestPar.GetInt("44"), 4711,"In and out error at Int") + self.TestPar.SetInt("44", 4711) + self.assertEqual(self.TestPar.GetInt("44"), 4711, "In and out error at Int") # check on Deletion self.TestPar.RemInt("44") - self.assertEqual(self.TestPar.GetInt("44",1), 1,"Deletion error at Int") - + self.assertEqual(self.TestPar.GetInt("44", 1), 1, "Deletion error at Int") def testBool(self): - #FreeCAD.Console.PrintLog("Base::ParameterTestCase::testBool\n") + # FreeCAD.Console.PrintLog("Base::ParameterTestCase::testBool\n") # check on Int - self.TestPar.SetBool("44",1) - self.assertEqual(self.TestPar.GetBool("44"), 1,"In and out error at Bool") + self.TestPar.SetBool("44", 1) + self.assertEqual(self.TestPar.GetBool("44"), 1, "In and out error at Bool") # check on Deletion self.TestPar.RemBool("44") - self.assertEqual(self.TestPar.GetBool("44",0), 0,"Deletion error at Bool") + self.assertEqual(self.TestPar.GetBool("44", 0), 0, "Deletion error at Bool") def testFloat(self): - #FreeCAD.Console.PrintLog("Base::ParameterTestCase::testFloat\n") - #Temp = FreeCAD.ParamGet("System parameter:Test/44") + # FreeCAD.Console.PrintLog("Base::ParameterTestCase::testFloat\n") + # Temp = FreeCAD.ParamGet("System parameter:Test/44") # check on Int - self.TestPar.SetFloat("44",4711.4711) - self.assertEqual(self.TestPar.GetFloat("44"), 4711.4711,"In and out error at Float") + self.TestPar.SetFloat("44", 4711.4711) + self.assertEqual(self.TestPar.GetFloat("44"), 4711.4711, "In and out error at Float") # check on Deletion self.TestPar.RemFloat("44") - self.assertEqual(self.TestPar.GetFloat("44",1.1), 1.1,"Deletion error at Float") + self.assertEqual(self.TestPar.GetFloat("44", 1.1), 1.1, "Deletion error at Float") def testString(self): - #FreeCAD.Console.PrintLog("Base::ParameterTestCase::testFloat\n") - #Temp = FreeCAD.ParamGet("System parameter:Test/44") + # FreeCAD.Console.PrintLog("Base::ParameterTestCase::testFloat\n") + # Temp = FreeCAD.ParamGet("System parameter:Test/44") # check on Int - self.TestPar.SetString("44","abcdefgh") - self.assertEqual(self.TestPar.GetString("44"), "abcdefgh","In and out error at String") + self.TestPar.SetString("44", "abcdefgh") + self.assertEqual(self.TestPar.GetString("44"), "abcdefgh", "In and out error at String") # check on Deletion self.TestPar.RemString("44") - self.assertEqual(self.TestPar.GetString("44","hallo"), "hallo","Deletion error at String") + self.assertEqual(self.TestPar.GetString("44", "hallo"), "hallo", "Deletion error at String") def testNesting(self): # Parameter testing - #FreeCAD.Console.PrintLog("Base::ParameterTestCase::testNesting\n") + # FreeCAD.Console.PrintLog("Base::ParameterTestCase::testNesting\n") for i in range(50): - self.TestPar.SetFloat(str(i),4711.4711) - self.TestPar.SetInt(str(i),4711) - self.TestPar.SetBool(str(i),1) + self.TestPar.SetFloat(str(i), 4711.4711) + self.TestPar.SetInt(str(i), 4711) + self.TestPar.SetBool(str(i), 1) Temp = self.TestPar.GetGroup(str(i)) for l in range(50): - Temp.SetFloat(str(l),4711.4711) - Temp.SetInt(str(l),4711) - Temp.SetBool(str(l),1) + Temp.SetFloat(str(l), 4711.4711) + Temp.SetInt(str(l), 4711) + Temp.SetBool(str(l), 1) Temp = 0 def testExportImport(self): # Parameter testing - #FreeCAD.Console.PrintLog("Base::ParameterTestCase::testNesting\n") - self.TestPar.SetFloat("ExTest",4711.4711) - self.TestPar.SetInt("ExTest",4711) - self.TestPar.SetString("ExTest","4711") - self.TestPar.SetBool("ExTest",1) + # FreeCAD.Console.PrintLog("Base::ParameterTestCase::testNesting\n") + self.TestPar.SetFloat("ExTest", 4711.4711) + self.TestPar.SetInt("ExTest", 4711) + self.TestPar.SetString("ExTest", "4711") + self.TestPar.SetBool("ExTest", 1) Temp = self.TestPar.GetGroup("ExTest") - Temp.SetFloat("ExTest",4711.4711) - Temp.SetInt("ExTest",4711) - Temp.SetString("ExTest","4711") - Temp.SetBool("ExTest",1) + Temp.SetFloat("ExTest", 4711.4711) + Temp.SetInt("ExTest", 4711) + Temp.SetString("ExTest", "4711") + Temp.SetBool("ExTest", 1) TempPath = tempfile.gettempdir() + os.sep + "ExportTest.FCExport" self.TestPar.Export(TempPath) Temp = self.TestPar.GetGroup("ImportTest") Temp.Import(TempPath) - self.assertEqual(Temp.GetFloat("ExTest"), 4711.4711,"ExportImport error") + self.assertEqual(Temp.GetFloat("ExTest"), 4711.4711, "ExportImport error") Temp = 0 def tearDown(self): - #remove all + # remove all TestPar = FreeCAD.ParamGet("System parameter:Test") TestPar.Clear() + class AlgebraTestCase(unittest.TestCase): def setUp(self): pass def testAngle(self): - v1 = FreeCAD.Vector(0,0,0.000001) - v2 = FreeCAD.Vector(0,0.000001,0) - self.assertAlmostEqual(v1.getAngle(v2), math.pi/2) - self.assertAlmostEqual(v2.getAngle(v1), math.pi/2) + v1 = FreeCAD.Vector(0, 0, 0.000001) + v2 = FreeCAD.Vector(0, 0.000001, 0) + self.assertAlmostEqual(v1.getAngle(v2), math.pi / 2) + self.assertAlmostEqual(v2.getAngle(v1), math.pi / 2) def testVector2d(self): v = FreeCAD.Base.Vector2d(1.0, 1.0) - v.rotate(math.pi/2) + v.rotate(math.pi / 2) self.assertAlmostEqual(v.x, -1.0) self.assertAlmostEqual(v.y, 1.0) def testAngleWithNullVector(self): - v1 = FreeCAD.Vector(0,0,0) - v2 = FreeCAD.Vector(0,1,0) + v1 = FreeCAD.Vector(0, 0, 0) + v2 = FreeCAD.Vector(0, 1, 0) self.assertTrue(math.isnan(v1.getAngle(v2))) self.assertTrue(math.isnan(v2.getAngle(v1))) def testMatrix(self): - m=FreeCAD.Matrix(4,2,1,0,1,1,1,0,0,0,1,0,0,0,0,1) - u=m.multiply(m.inverse()) - self.assertEqual(u, FreeCAD.Matrix(),"Invalid inverse of matrix") + m = FreeCAD.Matrix(4, 2, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1) + u = m.multiply(m.inverse()) + self.assertEqual(u, FreeCAD.Matrix(), "Invalid inverse of matrix") def testRotAndMoveMatrix(self): - m1=FreeCAD.Matrix() - m1.move(10,5,-3) - m1.rotateY(.2) - m2=FreeCAD.Matrix() - m2.rotateY(.2) - m2.move(10,5,-3) - m3=FreeCAD.Matrix() - m3.move(10,5,-3) - m4=FreeCAD.Matrix() - m4.rotateY(.2) - self.assertNotEqual(m1, m3*m4, "Wrong multiplication order") - self.assertEqual(m1, m4*m3 , "Wrong multiplication order") - self.assertEqual(m2, m3*m4 , "Wrong multiplication order") - self.assertNotEqual(m2, m4*m3, "Wrong multiplication order") - + m1 = FreeCAD.Matrix() + m1.move(10, 5, -3) + m1.rotateY(0.2) + m2 = FreeCAD.Matrix() + m2.rotateY(0.2) + m2.move(10, 5, -3) + m3 = FreeCAD.Matrix() + m3.move(10, 5, -3) + m4 = FreeCAD.Matrix() + m4.rotateY(0.2) + self.assertNotEqual(m1, m3 * m4, "Wrong multiplication order") + self.assertEqual(m1, m4 * m3, "Wrong multiplication order") + self.assertEqual(m2, m3 * m4, "Wrong multiplication order") + self.assertNotEqual(m2, m4 * m3, "Wrong multiplication order") def testRotationFromMatrix(self): m1 = FreeCAD.Matrix() - m1.rotateZ(.2) + m1.rotateZ(0.2) m1.scale(0.5) - m1.rotateY(.2) + m1.rotateY(0.2) m1.scale(3) - m1.move(10,5,-3) + m1.move(10, 5, -3) r1 = FreeCAD.Rotation(m1) m2 = FreeCAD.Matrix() - m2.rotateZ(.2) - m2.rotateY(.2) - m2.move(10,5,-3) - r2 = FreeCAD.Rotation(m2) - self.assertTrue(r1.isSame(r2, 1e-7), 'Scale on matrix influenced rotation') + m2.rotateZ(0.2) + m2.rotateY(0.2) + m2.move(10, 5, -3) + r2 = FreeCAD.Rotation(m2) + self.assertTrue(r1.isSame(r2, 1e-7), "Scale on matrix influenced rotation") m3 = FreeCAD.Matrix() m3.scale(-1) r3 = FreeCAD.Rotation(m3) r0 = FreeCAD.Rotation() - self.assertTrue(r3.isSame(r0, 1e-7), 'Scale on matrix influenced rotation') + self.assertTrue(r3.isSame(r0, 1e-7), "Scale on matrix influenced rotation") m4 = FreeCAD.Matrix() - m4.scale(1.25,1.0,0.25) - m4.move(4,5,6) - r24 = FreeCAD.Rotation(m2*m4) - r42 = FreeCAD.Rotation(m4*m2) - self.assertTrue(r2.isSame(r24, 1e-7), 'Scale on matrix influenced rotation') - self.assertTrue(r2.isSame(r42, 1e-7), 'Scale on matrix influenced rotation') + m4.scale(1.25, 1.0, 0.25) + m4.move(4, 5, 6) + r24 = FreeCAD.Rotation(m2 * m4) + r42 = FreeCAD.Rotation(m4 * m2) + self.assertTrue(r2.isSame(r24, 1e-7), "Scale on matrix influenced rotation") + self.assertTrue(r2.isSame(r42, 1e-7), "Scale on matrix influenced rotation") - def testRotation(self): - r=FreeCAD.Rotation(1,0,0,0) # 180 deg around (1,0,0) - self.assertEqual(r.Axis, FreeCAD.Vector(1,0,0)) + r = FreeCAD.Rotation(1, 0, 0, 0) # 180 deg around (1,0,0) + self.assertEqual(r.Axis, FreeCAD.Vector(1, 0, 0)) self.assertAlmostEqual(math.fabs(r.Angle), math.fabs(math.pi)) - r=r.multiply(r) # identity - self.assertEqual(r.Axis, FreeCAD.Vector(0,0,1)) + r = r.multiply(r) # identity + self.assertEqual(r.Axis, FreeCAD.Vector(0, 0, 1)) self.assertAlmostEqual(r.Angle, 0) - r=FreeCAD.Rotation(1,0,0,0) - r.Q=(0,0,0,1) # update axis and angle - s=FreeCAD.Rotation(0,0,0,1) + r = FreeCAD.Rotation(1, 0, 0, 0) + r.Q = (0, 0, 0, 1) # update axis and angle + s = FreeCAD.Rotation(0, 0, 0, 1) self.assertEqual(r.Axis, s.Axis) self.assertAlmostEqual(r.Angle, s.Angle) self.assertTrue(r.isSame(s)) - r=FreeCAD.Rotation(1,0,0,0) - r.Matrix=FreeCAD.Matrix() # update axis and angle - s=FreeCAD.Rotation(0,0,0,1) + r = FreeCAD.Rotation(1, 0, 0, 0) + r.Matrix = FreeCAD.Matrix() # update axis and angle + s = FreeCAD.Rotation(0, 0, 0, 1) self.assertEqual(r.Axis, s.Axis) self.assertAlmostEqual(r.Angle, s.Angle) self.assertTrue(r.isSame(s)) - r=FreeCAD.Rotation(1,0,0,0) - r.Axes=(FreeCAD.Vector(0,0,1),FreeCAD.Vector(0,0,1)) # update axis and angle - s=FreeCAD.Rotation(0,0,0,1) + r = FreeCAD.Rotation(1, 0, 0, 0) + r.Axes = (FreeCAD.Vector(0, 0, 1), FreeCAD.Vector(0, 0, 1)) # update axis and angle + s = FreeCAD.Rotation(0, 0, 0, 1) self.assertEqual(r.Axis, s.Axis) self.assertAlmostEqual(r.Angle, s.Angle) self.assertTrue(r.isSame(s)) - #add 360 deg to angle - r=FreeCAD.Rotation(FreeCAD.Vector(1,0,0),270) - s=FreeCAD.Rotation(FreeCAD.Vector(1,0,0),270+360) + # add 360 deg to angle + r = FreeCAD.Rotation(FreeCAD.Vector(1, 0, 0), 270) + s = FreeCAD.Rotation(FreeCAD.Vector(1, 0, 0), 270 + 360) self.assertEqual(r.Axis, s.Axis) - #self.assertAlmostEqual(r.Angle, s.Angle + 2*math.pi) + # self.assertAlmostEqual(r.Angle, s.Angle + 2*math.pi) self.assertTrue(r.isSame(s)) - #subtract 360 deg from angle using Euler angles - r=FreeCAD.Rotation(0,0,180) + # subtract 360 deg from angle using Euler angles + r = FreeCAD.Rotation(0, 0, 180) r.invert() - s=FreeCAD.Rotation(0,0,-180) + s = FreeCAD.Rotation(0, 0, -180) self.assertTrue(r.isSame(s)) - #subtract 360 deg from angle using quaternion - r=FreeCAD.Rotation(1,0,0,0) - s=FreeCAD.Rotation(-1,0,0,0) - #angles have the same sign + # subtract 360 deg from angle using quaternion + r = FreeCAD.Rotation(1, 0, 0, 0) + s = FreeCAD.Rotation(-1, 0, 0, 0) + # angles have the same sign if r.Angle * s.Angle > 0: - self.assertEqual(r.Axis, s.Axis*(-1)) + self.assertEqual(r.Axis, s.Axis * (-1)) else: self.assertAlmostEqual(r.Angle, -s.Angle) self.assertTrue(r.isSame(s)) @@ -338,10 +348,10 @@ class AlgebraTestCase(unittest.TestCase): self.assertTrue(r.isSame(s)) # gimbal lock (north pole) - r=FreeCAD.Rotation() + r = FreeCAD.Rotation() r.setYawPitchRoll(20, 90, 10) - a=r.getYawPitchRoll() - s=FreeCAD.Rotation() + a = r.getYawPitchRoll() + s = FreeCAD.Rotation() s.setYawPitchRoll(*a) self.assertAlmostEqual(a[0], 0.0) self.assertAlmostEqual(a[1], 90.0) @@ -349,10 +359,10 @@ class AlgebraTestCase(unittest.TestCase): self.assertTrue(r.isSame(s, 1e-12)) # gimbal lock (south pole) - r=FreeCAD.Rotation() + r = FreeCAD.Rotation() r.setYawPitchRoll(20, -90, 10) - a=r.getYawPitchRoll() - s=FreeCAD.Rotation() + a = r.getYawPitchRoll() + s = FreeCAD.Rotation() s.setYawPitchRoll(*a) self.assertAlmostEqual(a[0], 0.0) self.assertAlmostEqual(a[1], -90.0) @@ -382,20 +392,20 @@ class AlgebraTestCase(unittest.TestCase): plm = FreeCAD.Placement() rot.Matrix = FreeCAD.Matrix(1, 1, 0, 0, 1, 0, 0, 0, 1) - def testYawPitchRoll(self): def getYPR1(yaw, pitch, roll): r = FreeCAD.Rotation() r.setYawPitchRoll(yaw, pitch, roll) return r + def getYPR2(yaw, pitch, roll): rx = FreeCAD.Rotation() ry = FreeCAD.Rotation() rz = FreeCAD.Rotation() - rx.Axis = FreeCAD.Vector(1,0,0) - ry.Axis = FreeCAD.Vector(0,1,0) - rz.Axis = FreeCAD.Vector(0,0,1) + rx.Axis = FreeCAD.Vector(1, 0, 0) + ry.Axis = FreeCAD.Vector(0, 1, 0) + rz.Axis = FreeCAD.Vector(0, 0, 1) rx.Angle = math.radians(roll) ry.Angle = math.radians(pitch) @@ -404,9 +414,9 @@ class AlgebraTestCase(unittest.TestCase): return rz.multiply(ry).multiply(rx) angles = [] - angles.append((10,10,10)) - angles.append((13,45,-24)) - angles.append((10,-90,20)) + angles.append((10, 10, 10)) + angles.append((13, 45, -24)) + angles.append((10, -90, 20)) for i in angles: r = getYPR1(*i) @@ -414,21 +424,31 @@ class AlgebraTestCase(unittest.TestCase): self.assertTrue(r.isSame(s, 1e-12)) def testBounding(self): - b=FreeCAD.BoundBox() + b = FreeCAD.BoundBox() b.setVoid() - self.assertFalse(b.isValid(),"Bbox is not invalid") - b.add(0,0,0) + self.assertFalse(b.isValid(), "Bbox is not invalid") + b.add(0, 0, 0) self.assertTrue(b.isValid(), "Bbox is invalid") self.assertEqual(b.XLength, 0, "X length > 0") self.assertEqual(b.YLength, 0, "Y length > 0") self.assertEqual(b.ZLength, 0, "Z length > 0") - self.assertEqual(b.Center, FreeCAD.Vector(0,0,0), "Center is not at (0,0,0)") + self.assertEqual(b.Center, FreeCAD.Vector(0, 0, 0), "Center is not at (0,0,0)") self.assertTrue(b.isInside(b.Center), "Center is not inside Bbox") - b.add(2,2,2) - self.assertTrue(b.isInside(b.getIntersectionPoint(b.Center,FreeCAD.Vector(0,1,0))),"Intersection point is not inside Bbox") - self.assertTrue(b.intersect(b),"Bbox doesn't intersect with itself") - self.assertFalse(b.intersected(FreeCAD.BoundBox(4,4,4,6,6,6)).isValid(),"Bbox should not intersect with Bbox outside") - self.assertEqual(b.intersected(FreeCAD.BoundBox(-2,-2,-2,2,2,2)).Center, b.Center,"Bbox is not a full subset") + b.add(2, 2, 2) + self.assertTrue( + b.isInside(b.getIntersectionPoint(b.Center, FreeCAD.Vector(0, 1, 0))), + "Intersection point is not inside Bbox", + ) + self.assertTrue(b.intersect(b), "Bbox doesn't intersect with itself") + self.assertFalse( + b.intersected(FreeCAD.BoundBox(4, 4, 4, 6, 6, 6)).isValid(), + "Bbox should not intersect with Bbox outside", + ) + self.assertEqual( + b.intersected(FreeCAD.BoundBox(-2, -2, -2, 2, 2, 2)).Center, + b.Center, + "Bbox is not a full subset", + ) def testMultLeftOrRight(self): doc = FreeCAD.newDocument() @@ -451,12 +471,13 @@ class AlgebraTestCase(unittest.TestCase): FreeCAD.closeDocument(doc.Name) + class MatrixTestCase(unittest.TestCase): def setUp(self): self.mat = FreeCAD.Matrix() def testOrder(self): - self.mat = FreeCAD.Matrix(1.0,2.0,3.0,4.0) + self.mat = FreeCAD.Matrix(1.0, 2.0, 3.0, 4.0) self.assertEqual(self.mat.A11, 1.0) self.assertEqual(self.mat.A12, 2.0) self.assertEqual(self.mat.A13, 3.0) @@ -507,18 +528,20 @@ class MatrixTestCase(unittest.TestCase): def testMatrixPlacementMatrix(self): # Example taken from https://forum.freecad.org/viewtopic.php?f=3&t=61000 - mat = FreeCAD.Matrix(-0.470847778020266, - 0.8150598976807029, - 0.3376088628746235, - -11.25290913640202, - -0.8822144756796808, - -0.4350066260577338, - -0.180185641360483, - -2876.45492562325, - 1.955470978815492e-9, - -0.3826834326750831, - 0.923879538425552, - 941.3822018176414) + mat = FreeCAD.Matrix( + -0.470847778020266, + 0.8150598976807029, + 0.3376088628746235, + -11.25290913640202, + -0.8822144756796808, + -0.4350066260577338, + -0.180185641360483, + -2876.45492562325, + 1.955470978815492e-9, + -0.3826834326750831, + 0.923879538425552, + 941.3822018176414, + ) plm = FreeCAD.Placement(mat) mat = plm.toMatrix() self.assertEqual(mat.hasScale(), FreeCAD.ScaleType.NoScaling) @@ -528,60 +551,60 @@ class MatrixTestCase(unittest.TestCase): self.mat * "string" def testUnity(self): - mat = FreeCAD.Matrix(2,0,0,0, 0,1,0,0, 0,0,2,0, 0,0,0,-1) + mat = FreeCAD.Matrix(2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, -1) self.assertFalse(mat.isUnity()) mat.unity() self.assertTrue(mat.isUnity()) def testPower(self): - mat = FreeCAD.Matrix(2,0,0,0, 0,1,0,0, 0,0,2,0, 0,0,0,-1) + mat = FreeCAD.Matrix(2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, -1) with self.assertRaises(NotImplementedError): mat ** "string" - mat2 = mat ** 0 + mat2 = mat**0 self.assertTrue(mat2.isUnity()) - self.assertEqual(mat ** -1, mat.inverse()) - self.assertEqual(mat ** 1, mat) - self.assertEqual(mat ** 2, mat * mat) - self.assertEqual(mat ** 3, mat * mat * mat) + self.assertEqual(mat**-1, mat.inverse()) + self.assertEqual(mat**1, mat) + self.assertEqual(mat**2, mat * mat) + self.assertEqual(mat**3, mat * mat * mat) mat.nullify() with self.assertRaises(RuntimeError): - mat ** -1 + mat**-1 def testScale(self): - self.mat.scale(1., 2., 3.) + self.mat.scale(1.0, 2.0, 3.0) self.assertEqual(self.mat.determinant(), 6.0) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.NonUniformLeft) self.mat.unity() self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.NoScaling) - self.mat.scale(2., 2., 2.) + self.mat.scale(2.0, 2.0, 2.0) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.Uniform) self.mat.rotateX(1.0) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.Uniform) - self.mat.scale(1., 2., 3.) + self.mat.scale(1.0, 2.0, 3.0) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.NonUniformLeft) self.mat.unity() - self.mat.scale(1., 2., 3.) + self.mat.scale(1.0, 2.0, 3.0) self.mat.rotateX(1.0) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.NonUniformRight) self.mat.unity() - self.mat.setCol(0, FreeCAD.Vector(1,2,3)) - self.mat.setCol(1, FreeCAD.Vector(1,2,3)) - self.mat.setCol(2, FreeCAD.Vector(1,2,3)) + self.mat.setCol(0, FreeCAD.Vector(1, 2, 3)) + self.mat.setCol(1, FreeCAD.Vector(1, 2, 3)) + self.mat.setCol(2, FreeCAD.Vector(1, 2, 3)) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.Other) self.mat.unity() - self.mat.setRow(0, FreeCAD.Vector(1,2,3)) - self.mat.setRow(1, FreeCAD.Vector(1,2,3)) - self.mat.setRow(2, FreeCAD.Vector(1,2,3)) + self.mat.setRow(0, FreeCAD.Vector(1, 2, 3)) + self.mat.setRow(1, FreeCAD.Vector(1, 2, 3)) + self.mat.setRow(2, FreeCAD.Vector(1, 2, 3)) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.Other) self.mat.unity() - self.mat.scale(-1.) + self.mat.scale(-1.0) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.Uniform) - self.mat.scale(-2.) + self.mat.scale(-2.0) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.Uniform) def testShearing(self): - self.mat.setRow(1, FreeCAD.Vector(0,1,1)) + self.mat.setRow(1, FreeCAD.Vector(0, 1, 1)) self.assertEqual(self.mat.hasScale(), FreeCAD.ScaleType.Other) def testMultLeftOrRight(self): @@ -589,7 +612,7 @@ class MatrixTestCase(unittest.TestCase): mat1.rotateX(1.0) mat2 = FreeCAD.Matrix() - mat2.scale(1., 2., 3.) + mat2.scale(1.0, 2.0, 3.0) self.assertEqual((mat1 * mat2).hasScale(), FreeCAD.ScaleType.NonUniformRight) self.assertEqual((mat2 * mat1).hasScale(), FreeCAD.ScaleType.NonUniformLeft) @@ -612,12 +635,12 @@ class MatrixTestCase(unittest.TestCase): self.mat.row("string") self.assertEqual(type(self.mat.col(0)), FreeCAD.Vector) self.assertEqual(type(self.mat.row(0)), FreeCAD.Vector) - self.mat.setCol(0, FreeCAD.Vector(1,0,0)) - self.mat.setRow(0, FreeCAD.Vector(1,0,0)) + self.mat.setCol(0, FreeCAD.Vector(1, 0, 0)) + self.mat.setRow(0, FreeCAD.Vector(1, 0, 0)) def testTrace(self): - self.mat.scale(2., 2., 2.) - self.assertEqual(self.mat.trace(), FreeCAD.Vector(2., 2., 2.)) + self.mat.scale(2.0, 2.0, 2.0) + self.assertEqual(self.mat.trace(), FreeCAD.Vector(2.0, 2.0, 2.0)) def testNumberProtocol(self): with self.assertRaises(NotImplementedError): @@ -647,3 +670,8 @@ class MatrixTestCase(unittest.TestCase): self.assertEqual(+self.mat, self.mat) self.assertEqual(-self.mat, self.mat * -1) self.assertTrue(bool(self.mat)) + + +class FileSystem(unittest.TestCase): + def testEncoding(self): + self.assertEqual(sys.getfilesystemencoding(), "utf-8") diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 3bfe503281..4fe36310b7 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -1,396 +1,420 @@ -#*************************************************************************** -#* Copyright (c) 2003 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2003 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ import FreeCAD, os, unittest, tempfile import math -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # define the functions to test the FreeCAD Document code -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- class DocumentBasicCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("CreateTest") + def setUp(self): + self.Doc = FreeCAD.newDocument("CreateTest") - def testAccessByNameOrID(self): - obj = self.Doc.addObject("App::DocumentObject", "MyName") + def testAccessByNameOrID(self): + obj = self.Doc.addObject("App::DocumentObject", "MyName") - with self.assertRaises(TypeError): - self.Doc.getObject([1]) + with self.assertRaises(TypeError): + self.Doc.getObject([1]) - self.assertEqual(self.Doc.getObject(obj.Name), obj) - self.assertEqual(self.Doc.getObject("Unknown"), None) - self.assertEqual(self.Doc.getObject(obj.ID), obj) - self.assertEqual(self.Doc.getObject(obj.ID+1), None) + self.assertEqual(self.Doc.getObject(obj.Name), obj) + self.assertEqual(self.Doc.getObject("Unknown"), None) + self.assertEqual(self.Doc.getObject(obj.ID), obj) + self.assertEqual(self.Doc.getObject(obj.ID + 1), None) - def testCreateDestroy(self): - #FIXME: Causes somehow a ref count error but it's _not_ FreeCAD.getDocument()!!! - #If we remove the whole method no error appears. - self.failUnless(FreeCAD.getDocument("CreateTest") is not None,"Creating Document failed") + def testCreateDestroy(self): + # FIXME: Causes somehow a ref count error but it's _not_ FreeCAD.getDocument()!!! + # If we remove the whole method no error appears. + self.failUnless(FreeCAD.getDocument("CreateTest") is not None, "Creating Document failed") - def testAddition(self): - # Cannot write a real test case for that but when debugging the - # C-code there shouldn't be a memory leak (see rev. 1814) - self.Doc.openTransaction("Add") - L1 = self.Doc.addObject("App::FeatureTest","Label") - self.Doc.commitTransaction() - self.Doc.undo() + def testAddition(self): + # Cannot write a real test case for that but when debugging the + # C-code there shouldn't be a memory leak (see rev. 1814) + self.Doc.openTransaction("Add") + L1 = self.Doc.addObject("App::FeatureTest", "Label") + self.Doc.commitTransaction() + self.Doc.undo() - def testAddRemoveUndo(self): - # Bug #0000525 - self.Doc.openTransaction("Add") - obj=self.Doc.addObject("App::FeatureTest","Label") - self.Doc.commitTransaction() - self.Doc.removeObject(obj.Name) - self.Doc.undo() - self.Doc.undo() + def testAddRemoveUndo(self): + # Bug #0000525 + self.Doc.openTransaction("Add") + obj = self.Doc.addObject("App::FeatureTest", "Label") + self.Doc.commitTransaction() + self.Doc.removeObject(obj.Name) + self.Doc.undo() + self.Doc.undo() - def testNoRecompute(self): - L1 = self.Doc.addObject("App::FeatureTest","Label") - self.Doc.recompute() - L1.TypeNoRecompute = 2 - execcount = L1.ExecCount - objectcount = self.Doc.recompute() - self.assertEqual(objectcount, 0) - self.assertEqual(L1.ExecCount, execcount) + def testNoRecompute(self): + L1 = self.Doc.addObject("App::FeatureTest", "Label") + self.Doc.recompute() + L1.TypeNoRecompute = 2 + execcount = L1.ExecCount + objectcount = self.Doc.recompute() + self.assertEqual(objectcount, 0) + self.assertEqual(L1.ExecCount, execcount) - def testNoRecomputeParent(self): - L1 = self.Doc.addObject("App::FeatureTest","Child") - L2 = self.Doc.addObject("App::FeatureTest","Parent") - L2.Source1 = L1 - self.Doc.recompute() - L1.TypeNoRecompute = 2 - countChild = L1.ExecCount - countParent = L2.ExecCount - objectcount = self.Doc.recompute() - self.assertEqual(objectcount, 1) - self.assertEqual(L1.ExecCount, countChild) - self.assertEqual(L2.ExecCount, countParent+1) + def testNoRecomputeParent(self): + L1 = self.Doc.addObject("App::FeatureTest", "Child") + L2 = self.Doc.addObject("App::FeatureTest", "Parent") + L2.Source1 = L1 + self.Doc.recompute() + L1.TypeNoRecompute = 2 + countChild = L1.ExecCount + countParent = L2.ExecCount + objectcount = self.Doc.recompute() + self.assertEqual(objectcount, 1) + self.assertEqual(L1.ExecCount, countChild) + self.assertEqual(L2.ExecCount, countParent + 1) - L1.touch('') - countChild = L1.ExecCount - countParent = L2.ExecCount - objectcount = self.Doc.recompute() - self.assertEqual(objectcount, 1) - self.assertEqual(L1.ExecCount, countChild) - self.assertEqual(L2.ExecCount, countParent+1) + L1.touch("") + countChild = L1.ExecCount + countParent = L2.ExecCount + objectcount = self.Doc.recompute() + self.assertEqual(objectcount, 1) + self.assertEqual(L1.ExecCount, countChild) + self.assertEqual(L2.ExecCount, countParent + 1) - L1.enforceRecompute() - countChild = L1.ExecCount - countParent = L2.ExecCount - objectcount = self.Doc.recompute() - self.assertEqual(objectcount, 2) - self.assertEqual(L1.ExecCount, countChild+1) - self.assertEqual(L2.ExecCount, countParent+1) + L1.enforceRecompute() + countChild = L1.ExecCount + countParent = L2.ExecCount + objectcount = self.Doc.recompute() + self.assertEqual(objectcount, 2) + self.assertEqual(L1.ExecCount, countChild + 1) + self.assertEqual(L2.ExecCount, countParent + 1) - def testAbortTransaction(self): - self.Doc.openTransaction("Add") - obj=self.Doc.addObject("App::FeatureTest","Label") - self.Doc.abortTransaction() - TempPath = tempfile.gettempdir() - SaveName = TempPath + os.sep + "SaveRestoreTests.FCStd" - self.Doc.saveAs(SaveName) + def testAbortTransaction(self): + self.Doc.openTransaction("Add") + obj = self.Doc.addObject("App::FeatureTest", "Label") + self.Doc.abortTransaction() + TempPath = tempfile.gettempdir() + SaveName = TempPath + os.sep + "SaveRestoreTests.FCStd" + self.Doc.saveAs(SaveName) - def testRemoval(self): - # Cannot write a real test case for that but when debugging the - # C-code there shouldn't be a memory leak (see rev. 1814) - self.Doc.openTransaction("Add") - L1 = self.Doc.addObject("App::FeatureTest","Label") - self.Doc.commitTransaction() - self.Doc.openTransaction("Rem") - L1 = self.Doc.removeObject("Label") - self.Doc.commitTransaction() + def testRemoval(self): + # Cannot write a real test case for that but when debugging the + # C-code there shouldn't be a memory leak (see rev. 1814) + self.Doc.openTransaction("Add") + L1 = self.Doc.addObject("App::FeatureTest", "Label") + self.Doc.commitTransaction() + self.Doc.openTransaction("Rem") + L1 = self.Doc.removeObject("Label") + self.Doc.commitTransaction() - def testObjects(self): - L1 = self.Doc.addObject("App::FeatureTest","Label_1") - #call members to check for errors in ref counting - self.Doc.ActiveObject - self.Doc.Objects - self.Doc.UndoMode - self.Doc.UndoRedoMemSize - self.Doc.UndoCount - # test read only mechanismus - try: - self.Doc.UndoCount = 3 - except Exception: - FreeCAD.Console.PrintLog(" exception thrown, OK\n") - else: - self.fail("no exception thrown") - self.Doc.RedoCount - self.Doc.UndoNames - self.Doc.RedoNames - self.Doc.recompute() - self.failUnless(L1.Integer == 4711) - self.failUnless(L1.Float-47.11<0.001) - self.failUnless(L1.Bool == True) - self.failUnless(L1.String == "4711") - #temporarily not checked because of strange behavior of boost::filesystem JR - #self.failUnless(L1.Path == "c:/temp") - self.failUnless(float(L1.Angle)-3.0<0.001) - self.failUnless(float(L1.Distance)-47.11<0.001) + def testObjects(self): + L1 = self.Doc.addObject("App::FeatureTest", "Label_1") + # call members to check for errors in ref counting + self.Doc.ActiveObject + self.Doc.Objects + self.Doc.UndoMode + self.Doc.UndoRedoMemSize + self.Doc.UndoCount + # test read only mechanismus + try: + self.Doc.UndoCount = 3 + except Exception: + FreeCAD.Console.PrintLog(" exception thrown, OK\n") + else: + self.fail("no exception thrown") + self.Doc.RedoCount + self.Doc.UndoNames + self.Doc.RedoNames + self.Doc.recompute() + self.failUnless(L1.Integer == 4711) + self.failUnless(L1.Float - 47.11 < 0.001) + self.failUnless(L1.Bool == True) + self.failUnless(L1.String == "4711") + # temporarily not checked because of strange behavior of boost::filesystem JR + # self.failUnless(L1.Path == "c:/temp") + self.failUnless(float(L1.Angle) - 3.0 < 0.001) + self.failUnless(float(L1.Distance) - 47.11 < 0.001) - # test basic property stuff - self.failUnless(not L1.getDocumentationOfProperty("Source1") == "") - self.failUnless(L1.getGroupOfProperty("Source1") == "Feature Test") - self.failUnless(L1.getTypeOfProperty("Source1") == []) - self.failUnless(L1.getEnumerationsOfProperty("Source1") is None) + # test basic property stuff + self.failUnless(not L1.getDocumentationOfProperty("Source1") == "") + self.failUnless(L1.getGroupOfProperty("Source1") == "Feature Test") + self.failUnless(L1.getTypeOfProperty("Source1") == []) + self.failUnless(L1.getEnumerationsOfProperty("Source1") is None) + # test the constraint types ( both are constraint to percent range) + self.failUnless(L1.ConstraintInt == 5) + self.failUnless(L1.ConstraintFloat - 5.0 < 0.001) + L1.ConstraintInt = 500 + L1.ConstraintFloat = 500.0 + self.failUnless(L1.ConstraintInt == 100) + self.failUnless(L1.ConstraintFloat - 100.0 < 0.001) + L1.ConstraintInt = -500 + L1.ConstraintFloat = -500.0 + self.failUnless(L1.ConstraintInt == 0) + self.failUnless(L1.ConstraintFloat - 0.0 < 0.001) - # test the constraint types ( both are constraint to percent range) - self.failUnless(L1.ConstraintInt == 5) - self.failUnless(L1.ConstraintFloat-5.0<0.001) - L1.ConstraintInt = 500 - L1.ConstraintFloat = 500.0 - self.failUnless(L1.ConstraintInt == 100) - self.failUnless(L1.ConstraintFloat - 100.0 < 0.001) - L1.ConstraintInt = -500 - L1.ConstraintFloat = -500.0 - self.failUnless(L1.ConstraintInt == 0) - self.failUnless(L1.ConstraintFloat - 0.0 < 0.001) + # test enum property + # in App::FeatureTest the current value is set to 4 + self.failUnless(L1.Enum == "Four") + L1.Enum = "Three" + self.failUnless(L1.Enum == "Three", "Different value to 'Three'") + L1.Enum = 2 + self.failUnless(L1.Enum == "Two", "Different value to 'Two'") + try: + L1.Enum = "SurelyNotInThere!" + except Exception: + FreeCAD.Console.PrintLog(" exception thrown, OK\n") + else: + self.fail("no exception thrown") + self.failUnless( + sorted(L1.getEnumerationsOfProperty("Enum")) + == sorted(["Zero", "One", "Two", "Three", "Four"]) + ) - # test enum property - # in App::FeatureTest the current value is set to 4 - self.failUnless(L1.Enum == "Four") - L1.Enum = "Three" - self.failUnless(L1.Enum == "Three", "Different value to 'Three'") - L1.Enum = 2 - self.failUnless(L1.Enum == "Two", "Different value to 'Two'") - try: - L1.Enum = "SurelyNotInThere!" - except Exception: - FreeCAD.Console.PrintLog(" exception thrown, OK\n") - else: - self.fail("no exception thrown") - self.failUnless(sorted(L1.getEnumerationsOfProperty('Enum')) == sorted(['Zero', 'One', 'Two', 'Three', 'Four'])) + # self.failUnless(L1.IntegerList == [4711] ) + # f = L1.FloatList + # self.failUnless(f -47.11<0.001 ) + # self.failUnless(L1.Matrix == [1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0] ) + # self.failUnless(L1.Vector == [1.0,2.0,3.0]) - #self.failUnless(L1.IntegerList == [4711] ) - #f = L1.FloatList - #self.failUnless(f -47.11<0.001 ) - #self.failUnless(L1.Matrix == [1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0] ) - #self.failUnless(L1.Vector == [1.0,2.0,3.0]) + self.failUnless(L1.Label == "Label_1", "Invalid object name") + L1.Label = "Label_2" + self.Doc.recompute() + self.failUnless(L1.Label == "Label_2", "Invalid object name") + self.Doc.removeObject("Label_1") - self.failUnless(L1.Label== "Label_1","Invalid object name") - L1.Label="Label_2" - self.Doc.recompute() - self.failUnless(L1.Label== "Label_2","Invalid object name") - self.Doc.removeObject("Label_1") + def testEnum(self): + enumeration_choices = ["one", "two"] + obj = self.Doc.addObject("App::FeaturePython", "Label_2") + obj.addProperty("App::PropertyEnumeration", "myEnumeration", "Enum", "mytest") + with self.assertRaises(ValueError): + obj.myEnumeration = enumeration_choices[0] - def testEnum(self): - enumeration_choices = ["one", "two"] - obj = self.Doc.addObject("App::FeaturePython","Label_2") - obj.addProperty("App::PropertyEnumeration", "myEnumeration", "Enum", "mytest") - with self.assertRaises(ValueError): - obj.myEnumeration = enumeration_choices[0] + obj.myEnumeration = enumeration_choices + obj.myEnumeration = 0 + self.Doc.openTransaction("Modify enum") + obj.myEnumeration = 1 + self.assertTrue(obj.myEnumeration, enumeration_choices[1]) + self.Doc.commitTransaction() + self.Doc.undo() + self.assertTrue(obj.myEnumeration, enumeration_choices[0]) - obj.myEnumeration = enumeration_choices - obj.myEnumeration = 0 - self.Doc.openTransaction("Modify enum") - obj.myEnumeration = 1 - self.assertTrue(obj.myEnumeration, enumeration_choices[1]) - self.Doc.commitTransaction() - self.Doc.undo() - self.assertTrue(obj.myEnumeration, enumeration_choices[0]) + def testWrongTypes(self): + with self.assertRaises(TypeError): + self.Doc.addObject("App::DocumentObjectExtension") - def testWrongTypes(self): - with self.assertRaises(TypeError): - self.Doc.addObject("App::DocumentObjectExtension") + class Feature: + pass - class Feature: - pass - with self.assertRaises(TypeError): - self.Doc.addObject(type="App::DocumentObjectExtension", objProxy=Feature(), attach=True) + with self.assertRaises(TypeError): + self.Doc.addObject(type="App::DocumentObjectExtension", objProxy=Feature(), attach=True) - ext = FreeCAD.Base.TypeId.fromName("App::DocumentObjectExtension") - self.assertEqual(ext.createInstance(), None) + ext = FreeCAD.Base.TypeId.fromName("App::DocumentObjectExtension") + self.assertEqual(ext.createInstance(), None) - obj = self.Doc.addObject("App::FeaturePython", "Object") - with self.assertRaises(TypeError): - obj.addProperty("App::DocumentObjectExtension", "Property") + obj = self.Doc.addObject("App::FeaturePython", "Object") + with self.assertRaises(TypeError): + obj.addProperty("App::DocumentObjectExtension", "Property") - with self.assertRaises(TypeError): - self.Doc.findObjects(Type="App::DocumentObjectExtension") + with self.assertRaises(TypeError): + self.Doc.findObjects(Type="App::DocumentObjectExtension") - e = FreeCAD.Base.TypeId.fromName("App::LinkExtensionPython") - self.assertIsNone(e.createInstance()) + e = FreeCAD.Base.TypeId.fromName("App::LinkExtensionPython") + self.assertIsNone(e.createInstance()) - if FreeCAD.GuiUp: - obj = self.Doc.addObject("App::DocumentObject", viewType="App::Extension") - self.assertIsNone(obj.ViewObject) + if FreeCAD.GuiUp: + obj = self.Doc.addObject("App::DocumentObject", viewType="App::Extension") + self.assertIsNone(obj.ViewObject) - def testMem(self): - self.Doc.MemSize + def testMem(self): + self.Doc.MemSize - def testDuplicateLinks(self): - obj = self.Doc.addObject("App::FeatureTest","obj") - grp = self.Doc.addObject("App::DocumentObjectGroup","group") - grp.Group = [obj,obj] - self.Doc.removeObject(obj.Name) - self.assertListEqual(grp.Group, []) + def testDuplicateLinks(self): + obj = self.Doc.addObject("App::FeatureTest", "obj") + grp = self.Doc.addObject("App::DocumentObjectGroup", "group") + grp.Group = [obj, obj] + self.Doc.removeObject(obj.Name) + self.assertListEqual(grp.Group, []) - def testPlacementList(self): - obj = self.Doc.addObject("App::FeaturePython","Label") - obj.addProperty("App::PropertyPlacementList", "PlmList") - plm = FreeCAD.Placement() - plm.Base = (1,2,3) - plm.Rotation = (0,0,1,0) - obj.PlmList = [plm] - cpy = self.Doc.copyObject(obj) - self.assertListEqual(obj.PlmList, cpy.PlmList) + def testPlacementList(self): + obj = self.Doc.addObject("App::FeaturePython", "Label") + obj.addProperty("App::PropertyPlacementList", "PlmList") + plm = FreeCAD.Placement() + plm.Base = (1, 2, 3) + plm.Rotation = (0, 0, 1, 0) + obj.PlmList = [plm] + cpy = self.Doc.copyObject(obj) + self.assertListEqual(obj.PlmList, cpy.PlmList) - def testRawAxis(self): - obj = self.Doc.addObject("App::FeaturePython","Label") - obj.addProperty("App::PropertyPlacement", "Plm") - obj.addProperty("App::PropertyRotation", "Rot") - obj.Plm.Rotation.Axis = (1,2,3) - obj.Rot.Axis = (3,2,1) + def testRawAxis(self): + obj = self.Doc.addObject("App::FeaturePython", "Label") + obj.addProperty("App::PropertyPlacement", "Plm") + obj.addProperty("App::PropertyRotation", "Rot") + obj.Plm.Rotation.Axis = (1, 2, 3) + obj.Rot.Axis = (3, 2, 1) - # saving and restoring - SaveName = tempfile.gettempdir() + os.sep + "CreateTest.FCStd" - self.Doc.saveAs(SaveName) - FreeCAD.closeDocument("CreateTest") - self.Doc = FreeCAD.open(SaveName) - obj = self.Doc.ActiveObject + # saving and restoring + SaveName = tempfile.gettempdir() + os.sep + "CreateTest.FCStd" + self.Doc.saveAs(SaveName) + FreeCAD.closeDocument("CreateTest") + self.Doc = FreeCAD.open(SaveName) + obj = self.Doc.ActiveObject - self.assertEqual(obj.Plm.Rotation.RawAxis.x, 1) - self.assertEqual(obj.Plm.Rotation.RawAxis.y, 2) - self.assertEqual(obj.Plm.Rotation.RawAxis.z, 3) + self.assertEqual(obj.Plm.Rotation.RawAxis.x, 1) + self.assertEqual(obj.Plm.Rotation.RawAxis.y, 2) + self.assertEqual(obj.Plm.Rotation.RawAxis.z, 3) - self.assertEqual(obj.Rot.RawAxis.x, 3) - self.assertEqual(obj.Rot.RawAxis.y, 2) - self.assertEqual(obj.Rot.RawAxis.z, 1) + self.assertEqual(obj.Rot.RawAxis.x, 3) + self.assertEqual(obj.Rot.RawAxis.y, 2) + self.assertEqual(obj.Rot.RawAxis.z, 1) - def testAddRemove(self): - L1 = self.Doc.addObject("App::FeatureTest","Label_1") - # must delete object - self.Doc.removeObject(L1.Name) - try: - L1.Name - except Exception: - self.failUnless(True) - else: - self.failUnless(False) - del L1 + def testAddRemove(self): + L1 = self.Doc.addObject("App::FeatureTest", "Label_1") + # must delete object + self.Doc.removeObject(L1.Name) + try: + L1.Name + except Exception: + self.failUnless(True) + else: + self.failUnless(False) + del L1 - # What do we expect here? - self.Doc.openTransaction("AddRemove") - L2 = self.Doc.addObject("App::FeatureTest","Label_2") - self.Doc.removeObject(L2.Name) - self.Doc.commitTransaction() - self.Doc.undo() - try: - L2.Name - except Exception: - self.failUnless(True) - else: - self.failUnless(False) - del L2 + # What do we expect here? + self.Doc.openTransaction("AddRemove") + L2 = self.Doc.addObject("App::FeatureTest", "Label_2") + self.Doc.removeObject(L2.Name) + self.Doc.commitTransaction() + self.Doc.undo() + try: + L2.Name + except Exception: + self.failUnless(True) + else: + self.failUnless(False) + del L2 - def testSubObject(self): - obj = self.Doc.addObject("App::Origin", "Origin") - self.Doc.recompute() + def testSubObject(self): + obj = self.Doc.addObject("App::Origin", "Origin") + self.Doc.recompute() - res = obj.getSubObject("X_Axis", retType=2) - self.assertEqual(res[1].multVec(FreeCAD.Vector(1,0,0)).getAngle(FreeCAD.Vector(1,0,0)), 0.0) + res = obj.getSubObject("X_Axis", retType=2) + self.assertEqual( + res[1].multVec(FreeCAD.Vector(1, 0, 0)).getAngle(FreeCAD.Vector(1, 0, 0)), 0.0 + ) - res = obj.getSubObject("Y_Axis", retType=2) - self.assertEqual(res[1].multVec(FreeCAD.Vector(1,0,0)).getAngle(FreeCAD.Vector(0,1,0)), 0.0) + res = obj.getSubObject("Y_Axis", retType=2) + self.assertEqual( + res[1].multVec(FreeCAD.Vector(1, 0, 0)).getAngle(FreeCAD.Vector(0, 1, 0)), 0.0 + ) - res = obj.getSubObject("Z_Axis", retType=2) - self.assertEqual(res[1].multVec(FreeCAD.Vector(1,0,0)).getAngle(FreeCAD.Vector(0,0,1)), 0.0) + res = obj.getSubObject("Z_Axis", retType=2) + self.assertEqual( + res[1].multVec(FreeCAD.Vector(1, 0, 0)).getAngle(FreeCAD.Vector(0, 0, 1)), 0.0 + ) - res = obj.getSubObject("XY_Plane", retType=2) - self.assertEqual(res[1].multVec(FreeCAD.Vector(0,0,1)).getAngle(FreeCAD.Vector(0,0,1)), 0.0) + res = obj.getSubObject("XY_Plane", retType=2) + self.assertEqual( + res[1].multVec(FreeCAD.Vector(0, 0, 1)).getAngle(FreeCAD.Vector(0, 0, 1)), 0.0 + ) - res = obj.getSubObject("XZ_Plane", retType=2) - self.assertEqual(res[1].multVec(FreeCAD.Vector(0,0,1)).getAngle(FreeCAD.Vector(0,-1,0)), 0.0) + res = obj.getSubObject("XZ_Plane", retType=2) + self.assertEqual( + res[1].multVec(FreeCAD.Vector(0, 0, 1)).getAngle(FreeCAD.Vector(0, -1, 0)), 0.0 + ) - res = obj.getSubObject("YZ_Plane", retType=2) - self.assertEqual(res[1].multVec(FreeCAD.Vector(0,0,1)).getAngle(FreeCAD.Vector(1,0,0)), 0.0) + res = obj.getSubObject("YZ_Plane", retType=2) + self.assertEqual( + res[1].multVec(FreeCAD.Vector(0, 0, 1)).getAngle(FreeCAD.Vector(1, 0, 0)), 0.0 + ) - res = obj.getSubObject("YZ_Plane", retType=3) - self.assertEqual(res.multVec(FreeCAD.Vector(0,0,1)).getAngle(FreeCAD.Vector(1,0,0)), 0.0) + res = obj.getSubObject("YZ_Plane", retType=3) + self.assertEqual( + res.multVec(FreeCAD.Vector(0, 0, 1)).getAngle(FreeCAD.Vector(1, 0, 0)), 0.0 + ) - res = obj.getSubObject("YZ_Plane", retType=4) - self.assertEqual(res.multVec(FreeCAD.Vector(0,0,1)).getAngle(FreeCAD.Vector(1,0,0)), 0.0) + res = obj.getSubObject("YZ_Plane", retType=4) + self.assertEqual( + res.multVec(FreeCAD.Vector(0, 0, 1)).getAngle(FreeCAD.Vector(1, 0, 0)), 0.0 + ) - self.assertEqual(obj.getSubObject(("XY_Plane", "YZ_Plane"), retType=4)[0], obj.getSubObject("XY_Plane", retType=4)) - self.assertEqual(obj.getSubObject(("XY_Plane", "YZ_Plane"), retType=4)[1], obj.getSubObject("YZ_Plane", retType=4)) + self.assertEqual( + obj.getSubObject(("XY_Plane", "YZ_Plane"), retType=4)[0], + obj.getSubObject("XY_Plane", retType=4), + ) + self.assertEqual( + obj.getSubObject(("XY_Plane", "YZ_Plane"), retType=4)[1], + obj.getSubObject("YZ_Plane", retType=4), + ) - # Create a second origin object - obj2 = self.Doc.addObject("App::Origin", "Origin2") - self.Doc.recompute() + # Create a second origin object + obj2 = self.Doc.addObject("App::Origin", "Origin2") + self.Doc.recompute() - # Use the names of the origin's out-list - for i in obj2.OutList: - self.assertEqual(obj2.getSubObject(i.Name, retType=1).Name, i.Name) - # Add a '.' to the names - for i in obj2.OutList: - self.assertEqual(obj2.getSubObject(i.Name + '.', retType=1).Name, i.Name) + # Use the names of the origin's out-list + for i in obj2.OutList: + self.assertEqual(obj2.getSubObject(i.Name, retType=1).Name, i.Name) + # Add a '.' to the names + for i in obj2.OutList: + self.assertEqual(obj2.getSubObject(i.Name + ".", retType=1).Name, i.Name) - def testExtensions(self): - #we try to create a normal python object and add an extension to it - obj = self.Doc.addObject("App::DocumentObject", "Extension_1") - grp = self.Doc.addObject("App::DocumentObject", "Extension_2") - #we should have all methods we need to handle extensions - try: - self.failUnless(not grp.hasExtension("App::GroupExtensionPython")) - grp.addExtension("App::GroupExtensionPython") - self.failUnless(grp.hasExtension("App::GroupExtension")) - self.failUnless(grp.hasExtension("App::GroupExtensionPython")) - grp.addObject(obj) - self.failUnless(len(grp.Group) == 1) - self.failUnless(grp.Group[0] == obj) - except Exception: - self.failUnless(False) + def testExtensions(self): + # we try to create a normal python object and add an extension to it + obj = self.Doc.addObject("App::DocumentObject", "Extension_1") + grp = self.Doc.addObject("App::DocumentObject", "Extension_2") + # we should have all methods we need to handle extensions + try: + self.failUnless(not grp.hasExtension("App::GroupExtensionPython")) + grp.addExtension("App::GroupExtensionPython") + self.failUnless(grp.hasExtension("App::GroupExtension")) + self.failUnless(grp.hasExtension("App::GroupExtensionPython")) + grp.addObject(obj) + self.failUnless(len(grp.Group) == 1) + self.failUnless(grp.Group[0] == obj) + except Exception: + self.failUnless(False) - #test if the method override works - class SpecialGroup(): - def allowObject(self, obj): - return False; + # test if the method override works + class SpecialGroup: + def allowObject(self, obj): + return False - callback = SpecialGroup() - grp2 = self.Doc.addObject("App::FeaturePython", "Extension_3") - grp2.addExtension("App::GroupExtensionPython") - grp2.Proxy = callback + callback = SpecialGroup() + grp2 = self.Doc.addObject("App::FeaturePython", "Extension_3") + grp2.addExtension("App::GroupExtensionPython") + grp2.Proxy = callback - try: - self.failUnless(grp2.hasExtension("App::GroupExtension")) - grp2.addObject(obj) - self.failUnless(len(grp2.Group) == 0) - except Exception: - self.failUnless(True) + try: + self.failUnless(grp2.hasExtension("App::GroupExtension")) + grp2.addObject(obj) + self.failUnless(len(grp2.Group) == 0) + except Exception: + self.failUnless(True) - self.Doc.removeObject(grp.Name) - self.Doc.removeObject(grp2.Name) - self.Doc.removeObject(obj.Name) - del obj - del grp - del grp2 + self.Doc.removeObject(grp.Name) + self.Doc.removeObject(grp2.Name) + self.Doc.removeObject(obj.Name) + del obj + del grp + del grp2 - def testExtensionBug0002785(self): - - class MyExtension(): + def testExtensionBug0002785(self): + class MyExtension: def __init__(self, obj): obj.addExtension("App::GroupExtensionPython") @@ -401,168 +425,185 @@ class DocumentBasicCases(unittest.TestCase): self.Doc.removeObject(obj.Name) del obj - def testExtensionGroup(self): - obj = self.Doc.addObject("App::DocumentObject", "Obj") - grp = self.Doc.addObject("App::FeaturePython", "Extension_2") - grp.addExtension("App::GroupExtensionPython") - grp.Group = [obj] - self.assertTrue(obj in grp.Group) + def testExtensionGroup(self): + obj = self.Doc.addObject("App::DocumentObject", "Obj") + grp = self.Doc.addObject("App::FeaturePython", "Extension_2") + grp.addExtension("App::GroupExtensionPython") + grp.Group = [obj] + self.assertTrue(obj in grp.Group) - def testExtensionBugViewProvider(self): + def testExtensionBugViewProvider(self): + class Layer: + def __init__(self, obj): + obj.addExtension("App::GroupExtensionPython") - class Layer(): - def __init__(self, obj): - obj.addExtension("App::GroupExtensionPython") + class LayerViewProvider: + def __init__(self, obj): + obj.addExtension("Gui::ViewProviderGroupExtensionPython") + obj.Proxy = self - class LayerViewProvider(): - def __init__(self, obj): - obj.addExtension("Gui::ViewProviderGroupExtensionPython") - obj.Proxy = self + obj = self.Doc.addObject("App::FeaturePython", "Layer") + Layer(obj) + self.failUnless(obj.hasExtension("App::GroupExtension")) - obj = self.Doc.addObject("App::FeaturePython","Layer") - Layer(obj) - self.failUnless(obj.hasExtension("App::GroupExtension")) + if FreeCAD.GuiUp: + LayerViewProvider(obj.ViewObject) + self.failUnless(obj.ViewObject.hasExtension("Gui::ViewProviderGroupExtension")) + self.failUnless(obj.ViewObject.hasExtension("Gui::ViewProviderGroupExtensionPython")) - if FreeCAD.GuiUp: - LayerViewProvider(obj.ViewObject) - self.failUnless(obj.ViewObject.hasExtension("Gui::ViewProviderGroupExtension")) - self.failUnless(obj.ViewObject.hasExtension("Gui::ViewProviderGroupExtensionPython")) + self.Doc.removeObject(obj.Name) + del obj - self.Doc.removeObject(obj.Name) - del obj + def testPropertyLink_Issue2902Part1(self): + o1 = self.Doc.addObject("App::FeatureTest", "test1") + o2 = self.Doc.addObject("App::FeatureTest", "test2") + o3 = self.Doc.addObject("App::FeatureTest", "test3") - def testPropertyLink_Issue2902Part1(self): - o1 = self.Doc.addObject("App::FeatureTest","test1") - o2 = self.Doc.addObject("App::FeatureTest","test2") - o3 = self.Doc.addObject("App::FeatureTest","test3") + o1.Link = o2 + self.assertEqual(o1.Link, o2) + o1.Link = o3 + self.assertEqual(o1.Link, o3) + o2.Placement = FreeCAD.Placement() + self.assertEqual(o1.Link, o3) - o1.Link=o2 - self.assertEqual(o1.Link, o2) - o1.Link=o3 - self.assertEqual(o1.Link, o3) - o2.Placement = FreeCAD.Placement() - self.assertEqual(o1.Link, o3) + def testProp_NonePropertyLink(self): + obj1 = self.Doc.addObject("App::FeaturePython", "Obj1") + obj2 = self.Doc.addObject("App::FeaturePython", "Obj2") + obj1.addProperty( + "App::PropertyLink", + "Link", + "Base", + "Link to another feature", + FreeCAD.PropertyType.Prop_None, + False, + False, + ) + obj1.Link = obj2 + self.assertEqual(obj1.MustExecute, True) - def testProp_NonePropertyLink(self): - obj1 = self.Doc.addObject("App::FeaturePython", "Obj1") - obj2 = self.Doc.addObject("App::FeaturePython", "Obj2") - obj1.addProperty("App::PropertyLink", "Link", "Base", "Link to another feature", FreeCAD.PropertyType.Prop_None, False, False) - obj1.Link = obj2 - self.assertEqual(obj1.MustExecute, True) + def testProp_OutputPropertyLink(self): + obj1 = self.Doc.addObject("App::FeaturePython", "Obj1") + obj2 = self.Doc.addObject("App::FeaturePython", "Obj2") + obj1.addProperty( + "App::PropertyLink", + "Link", + "Base", + "Link to another feature", + FreeCAD.PropertyType.Prop_Output, + False, + False, + ) + obj1.Link = obj2 + self.assertEqual(obj1.MustExecute, False) - def testProp_OutputPropertyLink(self): - obj1 = self.Doc.addObject("App::FeaturePython", "Obj1") - obj2 = self.Doc.addObject("App::FeaturePython", "Obj2") - obj1.addProperty("App::PropertyLink", "Link", "Base", "Link to another feature", FreeCAD.PropertyType.Prop_Output, False, False) - obj1.Link = obj2 - self.assertEqual(obj1.MustExecute, False) + def testAttributeOfDynamicProperty(self): + obj = self.Doc.addObject("App::FeaturePython", "Obj") + # Prop_NoPersist is the enum with the highest value + max_value = FreeCAD.PropertyType.Prop_NoPersist + list_of_types = [] + for i in range(0, max_value + 1): + obj.addProperty("App::PropertyString", "String" + str(i), "", "", i) + list_of_types.append(obj.getTypeOfProperty("String" + str(i))) - def testAttributeOfDynamicProperty(self): - obj = self.Doc.addObject("App::FeaturePython", "Obj") - # Prop_NoPersist is the enum with the highest value - max_value = FreeCAD.PropertyType.Prop_NoPersist - list_of_types = [] - for i in range(0, max_value + 1): - obj.addProperty("App::PropertyString", "String" + str(i), "", "", i) - list_of_types.append(obj.getTypeOfProperty("String" + str(i))) + # saving and restoring + SaveName = tempfile.gettempdir() + os.sep + "CreateTest.FCStd" + self.Doc.saveAs(SaveName) + FreeCAD.closeDocument("CreateTest") + self.Doc = FreeCAD.open(SaveName) - # saving and restoring - SaveName = tempfile.gettempdir() + os.sep + "CreateTest.FCStd" - self.Doc.saveAs(SaveName) - FreeCAD.closeDocument("CreateTest") - self.Doc = FreeCAD.open(SaveName) + obj = self.Doc.ActiveObject + for i in range(0, max_value): + types = obj.getTypeOfProperty("String" + str(i)) + self.assertEqual(list_of_types[i], types) - obj = self.Doc.ActiveObject - for i in range(0, max_value): - types = obj.getTypeOfProperty("String" + str(i)) - self.assertEqual(list_of_types[i], types) + # A property with flag Prop_NoPersist won't be saved to the file + with self.assertRaises(AttributeError): + obj.getTypeOfProperty("String" + str(max_value)) - # A property with flag Prop_NoPersist won't be saved to the file - with self.assertRaises(AttributeError): - obj.getTypeOfProperty("String" + str(max_value)) + def testNotification_Issue2902Part2(self): + o = self.Doc.addObject("App::FeatureTest", "test") - def testNotification_Issue2902Part2(self): - o = self.Doc.addObject("App::FeatureTest","test") + plm = o.Placement + o.Placement = FreeCAD.Placement() + plm.Base.x = 5 + self.assertEqual(o.Placement.Base.x, 0) + o.Placement.Base.x = 5 + self.assertEqual(o.Placement.Base.x, 5) - plm = o.Placement - o.Placement = FreeCAD.Placement() - plm.Base.x = 5 - self.assertEqual(o.Placement.Base.x, 0) - o.Placement.Base.x=5 - self.assertEqual(o.Placement.Base.x, 5) + def testNotification_Issue2996(self): + if not FreeCAD.GuiUp: + return + # works only if Gui is shown + class ViewProvider: + def __init__(self, vobj): + vobj.Proxy = self - def testNotification_Issue2996(self): - if not FreeCAD.GuiUp: - return - # works only if Gui is shown - class ViewProvider: - def __init__(self, vobj): - vobj.Proxy=self + def attach(self, vobj): + self.ViewObject = vobj + self.Object = vobj.Object - def attach(self, vobj): - self.ViewObject = vobj - self.Object = vobj.Object + def claimChildren(self): + children = [self.Object.Link] + return children - def claimChildren(self): - children = [self.Object.Link] - return children + obj = self.Doc.addObject("App::FeaturePython", "Sketch") + obj.addProperty("App::PropertyLink", "Link") + ViewProvider(obj.ViewObject) - obj=self.Doc.addObject("App::FeaturePython", "Sketch") - obj.addProperty("App::PropertyLink","Link") - ViewProvider(obj.ViewObject) + ext = self.Doc.addObject("App::FeatureTest", "Extrude") + ext.Link = obj - ext=self.Doc.addObject("App::FeatureTest", "Extrude") - ext.Link=obj + sli = self.Doc.addObject("App::FeaturePython", "Slice") + sli.addProperty("App::PropertyLink", "Link").Link = ext + ViewProvider(sli.ViewObject) - sli=self.Doc.addObject("App::FeaturePython", "Slice") - sli.addProperty("App::PropertyLink","Link").Link=ext - ViewProvider(sli.ViewObject) + com = self.Doc.addObject("App::FeaturePython", "CompoundFilter") + com.addProperty("App::PropertyLink", "Link").Link = sli + ViewProvider(com.ViewObject) - com=self.Doc.addObject("App::FeaturePython", "CompoundFilter") - com.addProperty("App::PropertyLink", "Link").Link=sli - ViewProvider(com.ViewObject) + ext.Label = "test" - ext.Label="test" + self.assertEqual(ext.Link, obj) + self.assertNotEqual(ext.Link, sli) - self.assertEqual(ext.Link, obj) - self.assertNotEqual(ext.Link, sli) + def testIssue4823(self): + # https://forum.freecad.org/viewtopic.php?f=3&t=52775 + # The issue was only visible in GUI mode and it crashed in the tree view + obj = self.Doc.addObject("App::Origin") + self.Doc.removeObject(obj.Name) - def testIssue4823(self): - # https://forum.freecad.org/viewtopic.php?f=3&t=52775 - # The issue was only visible in GUI mode and it crashed in the tree view - obj = self.Doc.addObject("App::Origin") - self.Doc.removeObject(obj.Name) + def testSamePropertyOfLinkAndLinkedObject(self): + # See also https://github.com/FreeCAD/FreeCAD/pull/6787 + test = self.Doc.addObject("App::FeaturePython", "Python") + link = self.Doc.addObject("App::Link", "Link") + test.addProperty("App::PropertyFloat", "Test") + link.addProperty("App::PropertyFloat", "Test") + link.LinkedObject = test + # saving and restoring + SaveName = tempfile.gettempdir() + os.sep + "CreateTest.FCStd" + self.Doc.saveAs(SaveName) + FreeCAD.closeDocument("CreateTest") + self.Doc = FreeCAD.open(SaveName) + self.assertIn("Test", self.Doc.Python.PropertiesList) + self.assertIn("Test", self.Doc.Link.PropertiesList) - def testSamePropertyOfLinkAndLinkedObject(self): - # See also https://github.com/FreeCAD/FreeCAD/pull/6787 - test = self.Doc.addObject("App::FeaturePython", "Python") - link = self.Doc.addObject("App::Link", "Link") - test.addProperty("App::PropertyFloat", "Test") - link.addProperty("App::PropertyFloat", "Test") - link.LinkedObject = test - # saving and restoring - SaveName = tempfile.gettempdir() + os.sep + "CreateTest.FCStd" - self.Doc.saveAs(SaveName) - FreeCAD.closeDocument("CreateTest") - self.Doc = FreeCAD.open(SaveName) - self.assertIn("Test", self.Doc.Python.PropertiesList) - self.assertIn("Test", self.Doc.Link.PropertiesList) + def tearDown(self): + # closing doc + FreeCAD.closeDocument("CreateTest") - def tearDown(self): - #closing doc - FreeCAD.closeDocument("CreateTest") # class must be defined in global scope to allow it to be reloaded on document open -class SaveRestoreSpecialGroup(): +class SaveRestoreSpecialGroup: def __init__(self, obj): obj.addExtension("App::GroupExtensionPython") obj.Proxy = self def allowObject(self, obj): - return False; + return False + # class must be defined in global scope to allow it to be reloaded on document open -class SaveRestoreSpecialGroupViewProvider(): +class SaveRestoreSpecialGroupViewProvider: def __init__(self, obj): obj.addExtension("Gui::ViewProviderGroupExtensionPython") obj.Proxy = self @@ -570,1609 +611,1678 @@ class SaveRestoreSpecialGroupViewProvider(): def testFunction(self): pass + class DocumentSaveRestoreCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("SaveRestoreTests") - L1 = self.Doc.addObject("App::FeatureTest","Label_1") - L2 = self.Doc.addObject("App::FeatureTest","Label_2") - L3 = self.Doc.addObject("App::FeatureTest","Label_3") - self.TempPath = tempfile.gettempdir() - FreeCAD.Console.PrintLog( ' Using temp path: ' + self.TempPath + '\n') + def setUp(self): + self.Doc = FreeCAD.newDocument("SaveRestoreTests") + L1 = self.Doc.addObject("App::FeatureTest", "Label_1") + L2 = self.Doc.addObject("App::FeatureTest", "Label_2") + L3 = self.Doc.addObject("App::FeatureTest", "Label_3") + self.TempPath = tempfile.gettempdir() + FreeCAD.Console.PrintLog(" Using temp path: " + self.TempPath + "\n") - def testSaveAndRestore(self): - # saving and restoring - SaveName = self.TempPath + os.sep + "SaveRestoreTests.FCStd" - self.failUnless(self.Doc.Label_1.TypeTransient == 4711) - self.Doc.Label_1.TypeTransient = 4712 - # setup Linking - self.Doc.Label_1.Link = self.Doc.Label_2 - self.Doc.Label_2.Link = self.Doc.Label_3 - self.Doc.Label_1.LinkSub = (self.Doc.Label_2,["Sub1","Sub2"]) - self.Doc.Label_2.LinkSub = (self.Doc.Label_3,["Sub3","Sub4"]) - # save the document - self.Doc.saveAs(SaveName) - FreeCAD.closeDocument("SaveRestoreTests") - self.Doc = FreeCAD.open(SaveName) - self.failUnless(self.Doc.Label_1.Integer == 4711) - self.failUnless(self.Doc.Label_2.Integer == 4711) - # test Linkage - self.failUnless(self.Doc.Label_1.Link == self.Doc.Label_2) - self.failUnless(self.Doc.Label_2.Link == self.Doc.Label_3) - self.failUnless(self.Doc.Label_1.LinkSub == (self.Doc.Label_2,["Sub1","Sub2"])) - self.failUnless(self.Doc.Label_2.LinkSub == (self.Doc.Label_3,["Sub3","Sub4"])) - # do NOT save transient properties - self.failUnless(self.Doc.Label_1.TypeTransient == 4711) - self.failUnless(self.Doc == FreeCAD.getDocument(self.Doc.Name)) + def testSaveAndRestore(self): + # saving and restoring + SaveName = self.TempPath + os.sep + "SaveRestoreTests.FCStd" + self.failUnless(self.Doc.Label_1.TypeTransient == 4711) + self.Doc.Label_1.TypeTransient = 4712 + # setup Linking + self.Doc.Label_1.Link = self.Doc.Label_2 + self.Doc.Label_2.Link = self.Doc.Label_3 + self.Doc.Label_1.LinkSub = (self.Doc.Label_2, ["Sub1", "Sub2"]) + self.Doc.Label_2.LinkSub = (self.Doc.Label_3, ["Sub3", "Sub4"]) + # save the document + self.Doc.saveAs(SaveName) + FreeCAD.closeDocument("SaveRestoreTests") + self.Doc = FreeCAD.open(SaveName) + self.failUnless(self.Doc.Label_1.Integer == 4711) + self.failUnless(self.Doc.Label_2.Integer == 4711) + # test Linkage + self.failUnless(self.Doc.Label_1.Link == self.Doc.Label_2) + self.failUnless(self.Doc.Label_2.Link == self.Doc.Label_3) + self.failUnless(self.Doc.Label_1.LinkSub == (self.Doc.Label_2, ["Sub1", "Sub2"])) + self.failUnless(self.Doc.Label_2.LinkSub == (self.Doc.Label_3, ["Sub3", "Sub4"])) + # do NOT save transient properties + self.failUnless(self.Doc.Label_1.TypeTransient == 4711) + self.failUnless(self.Doc == FreeCAD.getDocument(self.Doc.Name)) - def testRestore(self): - Doc = FreeCAD.newDocument("RestoreTests") - Doc.addObject("App::FeatureTest","Label_1") - # saving and restoring - FileName = self.TempPath + os.sep + "Test2.FCStd" - Doc.saveAs(FileName) - # restore must first clear the current content - Doc.restore() - self.failUnless(len(Doc.Objects) == 1) - FreeCAD.closeDocument("RestoreTests") + def testRestore(self): + Doc = FreeCAD.newDocument("RestoreTests") + Doc.addObject("App::FeatureTest", "Label_1") + # saving and restoring + FileName = self.TempPath + os.sep + "Test2.FCStd" + Doc.saveAs(FileName) + # restore must first clear the current content + Doc.restore() + self.failUnless(len(Doc.Objects) == 1) + FreeCAD.closeDocument("RestoreTests") - def testActiveDocument(self): - # open 2nd doc - Second = FreeCAD.newDocument("Active") - FreeCAD.closeDocument("Active") - try: - # There might be no active document anymore - # This also checks for dangling pointers - Active = FreeCAD.activeDocument() - # Second is still a valid object - self.failUnless(Second != Active) - except Exception: - # Okay, no document open - self.failUnless(True) + def testActiveDocument(self): + # open 2nd doc + Second = FreeCAD.newDocument("Active") + FreeCAD.closeDocument("Active") + try: + # There might be no active document anymore + # This also checks for dangling pointers + Active = FreeCAD.activeDocument() + # Second is still a valid object + self.failUnless(Second != Active) + except Exception: + # Okay, no document open + self.failUnless(True) - def testExtensionSaveRestore(self): - # saving and restoring - SaveName = self.TempPath + os.sep + "SaveRestoreExtensions.FCStd" - Doc = FreeCAD.newDocument("SaveRestoreExtensions") - #we try to create a normal python object and add an extension to it - obj = Doc.addObject("App::DocumentObject", "Obj") - grp1 = Doc.addObject("App::DocumentObject", "Extension_1") - grp2 = Doc.addObject("App::FeaturePython", "Extension_2") + def testExtensionSaveRestore(self): + # saving and restoring + SaveName = self.TempPath + os.sep + "SaveRestoreExtensions.FCStd" + Doc = FreeCAD.newDocument("SaveRestoreExtensions") + # we try to create a normal python object and add an extension to it + obj = Doc.addObject("App::DocumentObject", "Obj") + grp1 = Doc.addObject("App::DocumentObject", "Extension_1") + grp2 = Doc.addObject("App::FeaturePython", "Extension_2") - grp1.addExtension("App::GroupExtensionPython") - SaveRestoreSpecialGroup(grp2) - if FreeCAD.GuiUp: - SaveRestoreSpecialGroupViewProvider(grp2.ViewObject) - grp2.Group = [obj] + grp1.addExtension("App::GroupExtensionPython") + SaveRestoreSpecialGroup(grp2) + if FreeCAD.GuiUp: + SaveRestoreSpecialGroupViewProvider(grp2.ViewObject) + grp2.Group = [obj] - Doc.saveAs(SaveName) - FreeCAD.closeDocument("SaveRestoreExtensions") - Doc = FreeCAD.open(SaveName) + Doc.saveAs(SaveName) + FreeCAD.closeDocument("SaveRestoreExtensions") + Doc = FreeCAD.open(SaveName) - self.failUnless(Doc.Extension_1.hasExtension("App::GroupExtension")) - self.failUnless(Doc.Extension_2.hasExtension("App::GroupExtension")) - self.failUnless(Doc.Extension_2.Group[0] is Doc.Obj) - self.failUnless(hasattr(Doc.Extension_2.Proxy, 'allowObject')) + self.failUnless(Doc.Extension_1.hasExtension("App::GroupExtension")) + self.failUnless(Doc.Extension_2.hasExtension("App::GroupExtension")) + self.failUnless(Doc.Extension_2.Group[0] is Doc.Obj) + self.failUnless(hasattr(Doc.Extension_2.Proxy, "allowObject")) - if FreeCAD.GuiUp: - self.failUnless(Doc.Extension_2.ViewObject.hasExtension("Gui::ViewProviderGroupExtensionPython")) - self.failUnless(hasattr(Doc.Extension_2.ViewObject.Proxy, 'testFunction')) + if FreeCAD.GuiUp: + self.failUnless( + Doc.Extension_2.ViewObject.hasExtension("Gui::ViewProviderGroupExtensionPython") + ) + self.failUnless(hasattr(Doc.Extension_2.ViewObject.Proxy, "testFunction")) - FreeCAD.closeDocument("SaveRestoreExtensions") + FreeCAD.closeDocument("SaveRestoreExtensions") - def testPersistenceContentDump(self): - #test smallest level... property - self.Doc.Label_1.Vector = (1,2,3) - dump = self.Doc.Label_1.dumpPropertyContent('Vector', Compression = 9) - self.Doc.Label_2.restorePropertyContent('Vector', dump) - self.assertEqual(self.Doc.Label_1.Vector, self.Doc.Label_2.Vector) + def testPersistenceContentDump(self): + # test smallest level... property + self.Doc.Label_1.Vector = (1, 2, 3) + dump = self.Doc.Label_1.dumpPropertyContent("Vector", Compression=9) + self.Doc.Label_2.restorePropertyContent("Vector", dump) + self.assertEqual(self.Doc.Label_1.Vector, self.Doc.Label_2.Vector) - #next higher: object - self.Doc.Label_1.Distance = 12 - self.Doc.Label_1.String = 'test' - dump = self.Doc.Label_1.dumpContent() - self.Doc.Label_3.restoreContent(dump) - self.assertEqual(self.Doc.Label_1.Distance, self.Doc.Label_3.Distance) - self.assertEqual(self.Doc.Label_1.String, self.Doc.Label_3.String) + # next higher: object + self.Doc.Label_1.Distance = 12 + self.Doc.Label_1.String = "test" + dump = self.Doc.Label_1.dumpContent() + self.Doc.Label_3.restoreContent(dump) + self.assertEqual(self.Doc.Label_1.Distance, self.Doc.Label_3.Distance) + self.assertEqual(self.Doc.Label_1.String, self.Doc.Label_3.String) - #highest level: document - dump = self.Doc.dumpContent(9) - Doc = FreeCAD.newDocument("DumpTest") - Doc.restoreContent(dump) - self.assertEqual(len(self.Doc.Objects), len(Doc.Objects)) - self.assertEqual(self.Doc.Label_1.Distance, Doc.Label_1.Distance) - self.assertEqual(self.Doc.Label_1.String, Doc.Label_1.String) - self.assertEqual(self.Doc.Label_1.Vector, Doc.Label_1.Vector) - FreeCAD.closeDocument("DumpTest") + # highest level: document + dump = self.Doc.dumpContent(9) + Doc = FreeCAD.newDocument("DumpTest") + Doc.restoreContent(dump) + self.assertEqual(len(self.Doc.Objects), len(Doc.Objects)) + self.assertEqual(self.Doc.Label_1.Distance, Doc.Label_1.Distance) + self.assertEqual(self.Doc.Label_1.String, Doc.Label_1.String) + self.assertEqual(self.Doc.Label_1.Vector, Doc.Label_1.Vector) + FreeCAD.closeDocument("DumpTest") + + def tearDown(self): + # closing doc + FreeCAD.closeDocument("SaveRestoreTests") - def tearDown(self): - #closing doc - FreeCAD.closeDocument("SaveRestoreTests") class DocumentRecomputeCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("RecomputeTests") - self.L1 = self.Doc.addObject("App::FeatureTest","Label_1") - self.L2 = self.Doc.addObject("App::FeatureTest","Label_2") - self.L3 = self.Doc.addObject("App::FeatureTest","Label_3") + def setUp(self): + self.Doc = FreeCAD.newDocument("RecomputeTests") + self.L1 = self.Doc.addObject("App::FeatureTest", "Label_1") + self.L2 = self.Doc.addObject("App::FeatureTest", "Label_2") + self.L3 = self.Doc.addObject("App::FeatureTest", "Label_3") - def testDescent(self): - # testing the up and downstream stuff - FreeCAD.Console.PrintLog("def testDescent(self):Testcase not implemented\n") - self.L1.Link = self.L2 - self.L2.Link = self.L3 + def testDescent(self): + # testing the up and downstream stuff + FreeCAD.Console.PrintLog("def testDescent(self):Testcase not implemented\n") + self.L1.Link = self.L2 + self.L2.Link = self.L3 - def testRecompute(self): + def testRecompute(self): - # sequence to test recompute behaviour - # L1---\ L7 - # / \ \ | - # L2 L3 \ L8 - # / \ / \ / - # L4 L5 L6 + # sequence to test recompute behaviour + # L1---\ L7 + # / \ \ | + # L2 L3 \ L8 + # / \ / \ / + # L4 L5 L6 - L1 = self.Doc.addObject("App::FeatureTest","Label_1") - L2 = self.Doc.addObject("App::FeatureTest","Label_2") - L3 = self.Doc.addObject("App::FeatureTest","Label_3") - L4 = self.Doc.addObject("App::FeatureTest","Label_4") - L5 = self.Doc.addObject("App::FeatureTest","Label_5") - L6 = self.Doc.addObject("App::FeatureTest","Label_6") - L7 = self.Doc.addObject("App::FeatureTest","Label_7") - L8 = self.Doc.addObject("App::FeatureTest","Label_8") - L1.LinkList = [L2,L3,L6] - L2.Link = L4 - L2.LinkList = [L5] - L3.LinkList = [L5,L6] - L7.Link = L8 #make second root + L1 = self.Doc.addObject("App::FeatureTest", "Label_1") + L2 = self.Doc.addObject("App::FeatureTest", "Label_2") + L3 = self.Doc.addObject("App::FeatureTest", "Label_3") + L4 = self.Doc.addObject("App::FeatureTest", "Label_4") + L5 = self.Doc.addObject("App::FeatureTest", "Label_5") + L6 = self.Doc.addObject("App::FeatureTest", "Label_6") + L7 = self.Doc.addObject("App::FeatureTest", "Label_7") + L8 = self.Doc.addObject("App::FeatureTest", "Label_8") + L1.LinkList = [L2, L3, L6] + L2.Link = L4 + L2.LinkList = [L5] + L3.LinkList = [L5, L6] + L7.Link = L8 # make second root - self.failUnless(L7 in self.Doc.RootObjects) - self.failUnless(L1 in self.Doc.RootObjects) + self.failUnless(L7 in self.Doc.RootObjects) + self.failUnless(L1 in self.Doc.RootObjects) - self.failUnless(len(self.Doc.Objects) == len(self.Doc.TopologicalSortedObjects)) + self.failUnless(len(self.Doc.Objects) == len(self.Doc.TopologicalSortedObjects)) - seqDic = {} - i = 0 - for obj in self.Doc.TopologicalSortedObjects: - seqDic[obj] = i - print(obj) - i += 1 + seqDic = {} + i = 0 + for obj in self.Doc.TopologicalSortedObjects: + seqDic[obj] = i + print(obj) + i += 1 - self.failUnless(seqDic[L2] > seqDic[L1]) - self.failUnless(seqDic[L3] > seqDic[L1]) - self.failUnless(seqDic[L5] > seqDic[L2]) - self.failUnless(seqDic[L5] > seqDic[L3]) - self.failUnless(seqDic[L5] > seqDic[L1]) + self.failUnless(seqDic[L2] > seqDic[L1]) + self.failUnless(seqDic[L3] > seqDic[L1]) + self.failUnless(seqDic[L5] > seqDic[L2]) + self.failUnless(seqDic[L5] > seqDic[L3]) + self.failUnless(seqDic[L5] > seqDic[L1]) + self.failUnless( + (0, 0, 0, 0, 0, 0) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + self.failUnless(self.Doc.recompute() == 4) + self.failUnless( + (1, 1, 1, 0, 0, 0) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + L5.enforceRecompute() + self.failUnless( + (1, 1, 1, 0, 0, 0) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + self.failUnless(self.Doc.recompute() == 4) + self.failUnless( + (2, 2, 2, 0, 1, 0) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + L4.enforceRecompute() + self.failUnless(self.Doc.recompute() == 3) + self.failUnless( + (3, 3, 2, 1, 1, 0) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + L5.enforceRecompute() + self.failUnless(self.Doc.recompute() == 4) + self.failUnless( + (4, 4, 3, 1, 2, 0) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + L6.enforceRecompute() + self.failUnless(self.Doc.recompute() == 3) + self.failUnless( + (5, 4, 4, 1, 2, 1) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + L2.enforceRecompute() + self.failUnless(self.Doc.recompute() == 2) + self.failUnless( + (6, 5, 4, 1, 2, 1) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) + L1.enforceRecompute() + self.failUnless(self.Doc.recompute() == 1) + self.failUnless( + (7, 5, 4, 1, 2, 1) + == (L1.ExecCount, L2.ExecCount, L3.ExecCount, L4.ExecCount, L5.ExecCount, L6.ExecCount) + ) - self.failUnless((0, 0, 0, 0, 0, 0)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - self.failUnless(self.Doc.recompute()==4) - self.failUnless((1, 1, 1, 0, 0, 0)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - L5.enforceRecompute() - self.failUnless((1, 1, 1, 0, 0, 0)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - self.failUnless(self.Doc.recompute()==4) - self.failUnless((2, 2, 2, 0, 1, 0)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - L4.enforceRecompute() - self.failUnless(self.Doc.recompute()==3) - self.failUnless((3, 3, 2, 1, 1, 0)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - L5.enforceRecompute() - self.failUnless(self.Doc.recompute()==4) - self.failUnless((4, 4, 3, 1, 2, 0)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - L6.enforceRecompute() - self.failUnless(self.Doc.recompute()==3) - self.failUnless((5, 4, 4, 1, 2, 1)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - L2.enforceRecompute() - self.failUnless(self.Doc.recompute()==2) - self.failUnless((6, 5, 4, 1, 2, 1)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) - L1.enforceRecompute() - self.failUnless(self.Doc.recompute()==1) - self.failUnless((7, 5, 4, 1, 2, 1)==(L1.ExecCount,L2.ExecCount,L3.ExecCount,L4.ExecCount,L5.ExecCount,L6.ExecCount)) + self.Doc.removeObject(L1.Name) + self.Doc.removeObject(L2.Name) + self.Doc.removeObject(L3.Name) + self.Doc.removeObject(L4.Name) + self.Doc.removeObject(L5.Name) + self.Doc.removeObject(L6.Name) + self.Doc.removeObject(L7.Name) + self.Doc.removeObject(L8.Name) - self.Doc.removeObject(L1.Name) - self.Doc.removeObject(L2.Name) - self.Doc.removeObject(L3.Name) - self.Doc.removeObject(L4.Name) - self.Doc.removeObject(L5.Name) - self.Doc.removeObject(L6.Name) - self.Doc.removeObject(L7.Name) - self.Doc.removeObject(L8.Name) + def tearDown(self): + # closing doc + FreeCAD.closeDocument("RecomputeTests") - def tearDown(self): - #closing doc - FreeCAD.closeDocument("RecomputeTests") class UndoRedoCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("UndoTest") - self.Doc.UndoMode = 0 - self.Doc.addObject("App::FeatureTest","Base") - self.Doc.addObject("App::FeatureTest","Del") - self.Doc.getObject("Del").Integer = 2 + def setUp(self): + self.Doc = FreeCAD.newDocument("UndoTest") + self.Doc.UndoMode = 0 + self.Doc.addObject("App::FeatureTest", "Base") + self.Doc.addObject("App::FeatureTest", "Del") + self.Doc.getObject("Del").Integer = 2 - def testUndoProperties(self): - # switch on the Undo - self.Doc.UndoMode = 1 + def testUndoProperties(self): + # switch on the Undo + self.Doc.UndoMode = 1 - # first transaction - self.Doc.openTransaction("Transaction1") - self.Doc.addObject("App::FeatureTest","test1") - self.Doc.getObject("test1").Integer = 1 - self.Doc.getObject("test1").String = "test1" - self.Doc.getObject("test1").Float = 1.0 - self.Doc.getObject("test1").Bool = 1 + # first transaction + self.Doc.openTransaction("Transaction1") + self.Doc.addObject("App::FeatureTest", "test1") + self.Doc.getObject("test1").Integer = 1 + self.Doc.getObject("test1").String = "test1" + self.Doc.getObject("test1").Float = 1.0 + self.Doc.getObject("test1").Bool = 1 - #self.Doc.getObject("test1").IntegerList = 1 - #self.Doc.getObject("test1").FloatList = 1.0 + # self.Doc.getObject("test1").IntegerList = 1 + # self.Doc.getObject("test1").FloatList = 1.0 - #self.Doc.getObject("test1").Matrix = (1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0) - #self.Doc.getObject("test1").Vector = (1.0,1.0,1.0) + # self.Doc.getObject("test1").Matrix = (1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0) + # self.Doc.getObject("test1").Vector = (1.0,1.0,1.0) - # second transaction - self.Doc.openTransaction("Transaction2") - self.Doc.getObject("test1").Integer = 2 - self.Doc.getObject("test1").String = "test2" - self.Doc.getObject("test1").Float = 2.0 - self.Doc.getObject("test1").Bool = 0 + # second transaction + self.Doc.openTransaction("Transaction2") + self.Doc.getObject("test1").Integer = 2 + self.Doc.getObject("test1").String = "test2" + self.Doc.getObject("test1").Float = 2.0 + self.Doc.getObject("test1").Bool = 0 - # switch on the Undo OFF - self.Doc.UndoMode = 0 + # switch on the Undo OFF + self.Doc.UndoMode = 0 - def testUndoClear(self): - # switch on the Undo - self.Doc.UndoMode = 1 - self.assertEqual(self.Doc.UndoNames,[]) - self.assertEqual(self.Doc.UndoCount,0) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + def testUndoClear(self): + # switch on the Undo + self.Doc.UndoMode = 1 + self.assertEqual(self.Doc.UndoNames, []) + self.assertEqual(self.Doc.UndoCount, 0) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - self.Doc.openTransaction("Transaction1") - # becomes the active object - self.Doc.addObject("App::FeatureTest","test1") - self.Doc.commitTransaction() - # removes the active object - self.Doc.undo() - self.assertEqual(self.Doc.ActiveObject,None) - # deletes the active object - self.Doc.clearUndos() - self.assertEqual(self.Doc.ActiveObject,None) + self.Doc.openTransaction("Transaction1") + # becomes the active object + self.Doc.addObject("App::FeatureTest", "test1") + self.Doc.commitTransaction() + # removes the active object + self.Doc.undo() + self.assertEqual(self.Doc.ActiveObject, None) + # deletes the active object + self.Doc.clearUndos() + self.assertEqual(self.Doc.ActiveObject, None) - def testUndo(self): - # switch on the Undo - self.Doc.UndoMode = 1 - self.assertEqual(self.Doc.UndoNames,[]) - self.assertEqual(self.Doc.UndoCount,0) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + def testUndo(self): + # switch on the Undo + self.Doc.UndoMode = 1 + self.assertEqual(self.Doc.UndoNames, []) + self.assertEqual(self.Doc.UndoCount, 0) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # first transaction - self.Doc.openTransaction("Transaction1") - self.Doc.addObject("App::FeatureTest","test1") - self.Doc.getObject("test1").Integer = 1 - self.Doc.getObject("Del").Integer = 1 - self.Doc.removeObject("Del") - self.assertEqual(self.Doc.UndoNames,['Transaction1']) - self.assertEqual(self.Doc.UndoCount,1) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # first transaction + self.Doc.openTransaction("Transaction1") + self.Doc.addObject("App::FeatureTest", "test1") + self.Doc.getObject("test1").Integer = 1 + self.Doc.getObject("Del").Integer = 1 + self.Doc.removeObject("Del") + self.assertEqual(self.Doc.UndoNames, ["Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 1) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # second transaction - self.Doc.openTransaction("Transaction2") - # new behavior: no change, no transaction - self.assertEqual(self.Doc.UndoNames,['Transaction1']) - self.assertEqual(self.Doc.UndoCount,1) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # second transaction + self.Doc.openTransaction("Transaction2") + # new behavior: no change, no transaction + self.assertEqual(self.Doc.UndoNames, ["Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 1) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - self.Doc.getObject("test1").Integer = 2 - self.assertEqual(self.Doc.UndoNames,['Transaction2','Transaction1']) - self.assertEqual(self.Doc.UndoCount,2) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + self.Doc.getObject("test1").Integer = 2 + self.assertEqual(self.Doc.UndoNames, ["Transaction2", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 2) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # abort second transaction - self.Doc.abortTransaction() - self.assertEqual(self.Doc.UndoNames,['Transaction1']) - self.assertEqual(self.Doc.UndoCount,1) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) - self.assertEqual(self.Doc.getObject("test1").Integer, 1) + # abort second transaction + self.Doc.abortTransaction() + self.assertEqual(self.Doc.UndoNames, ["Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 1) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) + self.assertEqual(self.Doc.getObject("test1").Integer, 1) - # again second transaction - self.Doc.openTransaction("Transaction2") - self.Doc.getObject("test1").Integer = 2 - self.assertEqual(self.Doc.UndoNames,['Transaction2','Transaction1']) - self.assertEqual(self.Doc.UndoCount,2) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # again second transaction + self.Doc.openTransaction("Transaction2") + self.Doc.getObject("test1").Integer = 2 + self.assertEqual(self.Doc.UndoNames, ["Transaction2", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 2) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # third transaction - self.Doc.openTransaction("Transaction3") - self.Doc.getObject("test1").Integer = 3 - self.assertEqual(self.Doc.UndoNames,['Transaction3','Transaction2','Transaction1']) - self.assertEqual(self.Doc.UndoCount,3) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # third transaction + self.Doc.openTransaction("Transaction3") + self.Doc.getObject("test1").Integer = 3 + self.assertEqual(self.Doc.UndoNames, ["Transaction3", "Transaction2", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 3) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # fourth transaction - self.Doc.openTransaction("Transaction4") - self.Doc.getObject("test1").Integer = 4 - self.assertEqual(self.Doc.UndoNames,['Transaction4','Transaction3','Transaction2','Transaction1']) - self.assertEqual(self.Doc.UndoCount,4) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # fourth transaction + self.Doc.openTransaction("Transaction4") + self.Doc.getObject("test1").Integer = 4 + self.assertEqual( + self.Doc.UndoNames, ["Transaction4", "Transaction3", "Transaction2", "Transaction1"] + ) + self.assertEqual(self.Doc.UndoCount, 4) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # undo the fourth transaction - self.Doc.undo() - self.assertEqual(self.Doc.getObject("test1").Integer, 3) - self.assertEqual(self.Doc.UndoNames,['Transaction3','Transaction2','Transaction1']) - self.assertEqual(self.Doc.UndoCount,3) - self.assertEqual(self.Doc.RedoNames,['Transaction4']) - self.assertEqual(self.Doc.RedoCount,1) + # undo the fourth transaction + self.Doc.undo() + self.assertEqual(self.Doc.getObject("test1").Integer, 3) + self.assertEqual(self.Doc.UndoNames, ["Transaction3", "Transaction2", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 3) + self.assertEqual(self.Doc.RedoNames, ["Transaction4"]) + self.assertEqual(self.Doc.RedoCount, 1) - # undo the third transaction - self.Doc.undo() - self.assertEqual(self.Doc.getObject("test1").Integer, 2) - self.assertEqual(self.Doc.UndoNames,['Transaction2','Transaction1']) - self.assertEqual(self.Doc.UndoCount,2) - self.assertEqual(self.Doc.RedoNames,['Transaction3','Transaction4']) - self.assertEqual(self.Doc.RedoCount,2) + # undo the third transaction + self.Doc.undo() + self.assertEqual(self.Doc.getObject("test1").Integer, 2) + self.assertEqual(self.Doc.UndoNames, ["Transaction2", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 2) + self.assertEqual(self.Doc.RedoNames, ["Transaction3", "Transaction4"]) + self.assertEqual(self.Doc.RedoCount, 2) - # undo the second transaction - self.Doc.undo() - self.assertEqual(self.Doc.getObject("test1").Integer, 1) - self.assertEqual(self.Doc.UndoNames,['Transaction1']) - self.assertEqual(self.Doc.UndoCount,1) - self.assertEqual(self.Doc.RedoNames,['Transaction2','Transaction3','Transaction4']) - self.assertEqual(self.Doc.RedoCount,3) + # undo the second transaction + self.Doc.undo() + self.assertEqual(self.Doc.getObject("test1").Integer, 1) + self.assertEqual(self.Doc.UndoNames, ["Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 1) + self.assertEqual(self.Doc.RedoNames, ["Transaction2", "Transaction3", "Transaction4"]) + self.assertEqual(self.Doc.RedoCount, 3) - # undo the first transaction - self.Doc.undo() - self.failUnless(self.Doc.getObject("test1") is None) - self.failUnless(self.Doc.getObject("Del").Integer == 2) - self.assertEqual(self.Doc.UndoNames,[]) - self.assertEqual(self.Doc.UndoCount,0) - self.assertEqual(self.Doc.RedoNames,['Transaction1','Transaction2','Transaction3','Transaction4']) - self.assertEqual(self.Doc.RedoCount,4) + # undo the first transaction + self.Doc.undo() + self.failUnless(self.Doc.getObject("test1") is None) + self.failUnless(self.Doc.getObject("Del").Integer == 2) + self.assertEqual(self.Doc.UndoNames, []) + self.assertEqual(self.Doc.UndoCount, 0) + self.assertEqual( + self.Doc.RedoNames, ["Transaction1", "Transaction2", "Transaction3", "Transaction4"] + ) + self.assertEqual(self.Doc.RedoCount, 4) - # redo the first transaction - self.Doc.redo() - self.assertEqual(self.Doc.getObject("test1").Integer, 1) - self.assertEqual(self.Doc.UndoNames,['Transaction1']) - self.assertEqual(self.Doc.UndoCount,1) - self.assertEqual(self.Doc.RedoNames,['Transaction2','Transaction3','Transaction4']) - self.assertEqual(self.Doc.RedoCount,3) + # redo the first transaction + self.Doc.redo() + self.assertEqual(self.Doc.getObject("test1").Integer, 1) + self.assertEqual(self.Doc.UndoNames, ["Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 1) + self.assertEqual(self.Doc.RedoNames, ["Transaction2", "Transaction3", "Transaction4"]) + self.assertEqual(self.Doc.RedoCount, 3) - # redo the second transaction - self.Doc.redo() - self.assertEqual(self.Doc.getObject("test1").Integer, 2) - self.assertEqual(self.Doc.UndoNames,['Transaction2','Transaction1']) - self.assertEqual(self.Doc.UndoCount,2) - self.assertEqual(self.Doc.RedoNames,['Transaction3','Transaction4']) - self.assertEqual(self.Doc.RedoCount,2) + # redo the second transaction + self.Doc.redo() + self.assertEqual(self.Doc.getObject("test1").Integer, 2) + self.assertEqual(self.Doc.UndoNames, ["Transaction2", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 2) + self.assertEqual(self.Doc.RedoNames, ["Transaction3", "Transaction4"]) + self.assertEqual(self.Doc.RedoCount, 2) - # undo the second transaction - self.Doc.undo() - self.assertEqual(self.Doc.getObject("test1").Integer, 1) - self.assertEqual(self.Doc.UndoNames,['Transaction1']) - self.assertEqual(self.Doc.UndoCount,1) - self.assertEqual(self.Doc.RedoNames,['Transaction2','Transaction3','Transaction4']) - self.assertEqual(self.Doc.RedoCount,3) + # undo the second transaction + self.Doc.undo() + self.assertEqual(self.Doc.getObject("test1").Integer, 1) + self.assertEqual(self.Doc.UndoNames, ["Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 1) + self.assertEqual(self.Doc.RedoNames, ["Transaction2", "Transaction3", "Transaction4"]) + self.assertEqual(self.Doc.RedoCount, 3) - # new transaction eight - self.Doc.openTransaction("Transaction8") - self.Doc.getObject("test1").Integer = 8 - self.assertEqual(self.Doc.UndoNames,['Transaction8','Transaction1']) - self.assertEqual(self.Doc.UndoCount,2) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) - self.Doc.abortTransaction() - self.assertEqual(self.Doc.UndoNames,['Transaction1']) - self.assertEqual(self.Doc.UndoCount,1) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # new transaction eight + self.Doc.openTransaction("Transaction8") + self.Doc.getObject("test1").Integer = 8 + self.assertEqual(self.Doc.UndoNames, ["Transaction8", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 2) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) + self.Doc.abortTransaction() + self.assertEqual(self.Doc.UndoNames, ["Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 1) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # again new transaction eight - self.Doc.openTransaction("Transaction8") - self.Doc.getObject("test1").Integer = 8 - self.assertEqual(self.Doc.UndoNames,['Transaction8','Transaction1']) - self.assertEqual(self.Doc.UndoCount,2) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # again new transaction eight + self.Doc.openTransaction("Transaction8") + self.Doc.getObject("test1").Integer = 8 + self.assertEqual(self.Doc.UndoNames, ["Transaction8", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 2) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - # again new transaction nine - self.Doc.openTransaction("Transaction9") - self.Doc.getObject("test1").Integer = 9 - self.assertEqual(self.Doc.UndoNames,['Transaction9','Transaction8','Transaction1']) - self.assertEqual(self.Doc.UndoCount,3) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) - self.Doc.commitTransaction() - self.assertEqual(self.Doc.UndoNames,['Transaction9','Transaction8','Transaction1']) - self.assertEqual(self.Doc.UndoCount,3) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) - self.assertEqual(self.Doc.getObject("test1").Integer, 9) + # again new transaction nine + self.Doc.openTransaction("Transaction9") + self.Doc.getObject("test1").Integer = 9 + self.assertEqual(self.Doc.UndoNames, ["Transaction9", "Transaction8", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 3) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) + self.Doc.commitTransaction() + self.assertEqual(self.Doc.UndoNames, ["Transaction9", "Transaction8", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 3) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) + self.assertEqual(self.Doc.getObject("test1").Integer, 9) - # undo the ninth transaction - self.Doc.undo() - self.assertEqual(self.Doc.getObject("test1").Integer, 8) - self.assertEqual(self.Doc.UndoNames,['Transaction8','Transaction1']) - self.assertEqual(self.Doc.UndoCount,2) - self.assertEqual(self.Doc.RedoNames,['Transaction9']) - self.assertEqual(self.Doc.RedoCount,1) + # undo the ninth transaction + self.Doc.undo() + self.assertEqual(self.Doc.getObject("test1").Integer, 8) + self.assertEqual(self.Doc.UndoNames, ["Transaction8", "Transaction1"]) + self.assertEqual(self.Doc.UndoCount, 2) + self.assertEqual(self.Doc.RedoNames, ["Transaction9"]) + self.assertEqual(self.Doc.RedoCount, 1) - # switch on the Undo OFF - self.Doc.UndoMode = 0 - self.assertEqual(self.Doc.UndoNames,[]) - self.assertEqual(self.Doc.UndoCount,0) - self.assertEqual(self.Doc.RedoNames,[]) - self.assertEqual(self.Doc.RedoCount,0) + # switch on the Undo OFF + self.Doc.UndoMode = 0 + self.assertEqual(self.Doc.UndoNames, []) + self.assertEqual(self.Doc.UndoCount, 0) + self.assertEqual(self.Doc.RedoNames, []) + self.assertEqual(self.Doc.RedoCount, 0) - def testUndoInList(self): + def testUndoInList(self): - self.Doc.UndoMode = 1 + self.Doc.UndoMode = 1 - self.Doc.openTransaction("Box") - self.Box = self.Doc.addObject('App::FeatureTest') - self.Doc.commitTransaction() + self.Doc.openTransaction("Box") + self.Box = self.Doc.addObject("App::FeatureTest") + self.Doc.commitTransaction() - self.Doc.openTransaction("Cylinder") - self.Cylinder = self.Doc.addObject('App::FeatureTest') - self.Doc.commitTransaction() + self.Doc.openTransaction("Cylinder") + self.Cylinder = self.Doc.addObject("App::FeatureTest") + self.Doc.commitTransaction() - self.Doc.openTransaction("Fuse") - self.Fuse1 = self.Doc.addObject('App::FeatureTest', 'Fuse') - self.Fuse1.LinkList = [self.Box, self.Cylinder] - self.Doc.commitTransaction() + self.Doc.openTransaction("Fuse") + self.Fuse1 = self.Doc.addObject("App::FeatureTest", "Fuse") + self.Fuse1.LinkList = [self.Box, self.Cylinder] + self.Doc.commitTransaction() - self.Doc.undo() - self.failUnless(len(self.Box.InList) == 0) - self.failUnless(len(self.Cylinder.InList) == 0) + self.Doc.undo() + self.failUnless(len(self.Box.InList) == 0) + self.failUnless(len(self.Cylinder.InList) == 0) - self.Doc.redo() - self.failUnless(len(self.Box.InList) == 1) - self.failUnless(self.Box.InList[0] == self.Doc.Fuse) - self.failUnless(len(self.Cylinder.InList) == 1) - self.failUnless(self.Cylinder.InList[0] == self.Doc.Fuse) + self.Doc.redo() + self.failUnless(len(self.Box.InList) == 1) + self.failUnless(self.Box.InList[0] == self.Doc.Fuse) + self.failUnless(len(self.Cylinder.InList) == 1) + self.failUnless(self.Cylinder.InList[0] == self.Doc.Fuse) - def testUndoIssue0003150Part1(self): + def testUndoIssue0003150Part1(self): - self.Doc.UndoMode = 1 + self.Doc.UndoMode = 1 - self.Doc.openTransaction("Box") - self.Box = self.Doc.addObject('App::FeatureTest') - self.Doc.commitTransaction() + self.Doc.openTransaction("Box") + self.Box = self.Doc.addObject("App::FeatureTest") + self.Doc.commitTransaction() - self.Doc.openTransaction("Cylinder") - self.Cylinder = self.Doc.addObject('App::FeatureTest') - self.Doc.commitTransaction() + self.Doc.openTransaction("Cylinder") + self.Cylinder = self.Doc.addObject("App::FeatureTest") + self.Doc.commitTransaction() - self.Doc.openTransaction("Fuse") - self.Fuse1 = self.Doc.addObject('App::FeatureTest') - self.Fuse1.LinkList = [self.Box, self.Cylinder] - self.Doc.commitTransaction() - self.Doc.recompute() + self.Doc.openTransaction("Fuse") + self.Fuse1 = self.Doc.addObject("App::FeatureTest") + self.Fuse1.LinkList = [self.Box, self.Cylinder] + self.Doc.commitTransaction() + self.Doc.recompute() - self.Doc.openTransaction("Sphere") - self.Sphere = self.Doc.addObject('App::FeatureTest') - self.Doc.commitTransaction() + self.Doc.openTransaction("Sphere") + self.Sphere = self.Doc.addObject("App::FeatureTest") + self.Doc.commitTransaction() - self.Doc.openTransaction("Fuse") - self.Fuse2 = self.Doc.addObject('App::FeatureTest') - self.Fuse2.LinkList = [self.Fuse1, self.Sphere] - self.Doc.commitTransaction() - self.Doc.recompute() + self.Doc.openTransaction("Fuse") + self.Fuse2 = self.Doc.addObject("App::FeatureTest") + self.Fuse2.LinkList = [self.Fuse1, self.Sphere] + self.Doc.commitTransaction() + self.Doc.recompute() - self.Doc.openTransaction("Part") - self.Part = self.Doc.addObject('App::Part') - self.Doc.commitTransaction() + self.Doc.openTransaction("Part") + self.Part = self.Doc.addObject("App::Part") + self.Doc.commitTransaction() - self.Doc.openTransaction("Drag") - self.Part.addObject(self.Fuse2) - self.Doc.commitTransaction() + self.Doc.openTransaction("Drag") + self.Part.addObject(self.Fuse2) + self.Doc.commitTransaction() - #3 undos show the problem of failing recompute - self.Doc.undo() - self.Doc.undo() - self.Doc.undo() - self.failUnless(self.Doc.recompute() >= 0) + # 3 undos show the problem of failing recompute + self.Doc.undo() + self.Doc.undo() + self.Doc.undo() + self.failUnless(self.Doc.recompute() >= 0) + + def tearDown(self): + # closing doc + FreeCAD.closeDocument("UndoTest") - def tearDown(self): - # closing doc - FreeCAD.closeDocument("UndoTest") class DocumentGroupCases(unittest.TestCase): + def setUp(self): + self.Doc = FreeCAD.newDocument("GroupTests") - def setUp(self): - self.Doc = FreeCAD.newDocument("GroupTests") + def testGroup(self): + # Add an object to the group + L2 = self.Doc.addObject("App::FeatureTest", "Label_2") + G1 = self.Doc.addObject("App::DocumentObjectGroup", "Group") + G1.addObject(L2) + self.failUnless(G1.hasObject(L2)) - def testGroup(self): - # Add an object to the group - L2 = self.Doc.addObject("App::FeatureTest","Label_2") - G1 = self.Doc.addObject("App::DocumentObjectGroup","Group") - G1.addObject(L2) - self.failUnless(G1.hasObject(L2)) + # Adding the group to itself must fail + try: + G1.addObject(G1) + except Exception: + FreeCAD.Console.PrintLog("Cannot add group to itself, OK\n") + else: + self.fail("Adding the group to itself must not be possible") - # Adding the group to itself must fail - try: - G1.addObject(G1) - except Exception: - FreeCAD.Console.PrintLog("Cannot add group to itself, OK\n") - else: - self.fail("Adding the group to itself must not be possible") + self.Doc.UndoMode = 1 - self.Doc.UndoMode = 1 + # Remove object from group + self.Doc.openTransaction("Remove") + self.Doc.removeObject("Label_2") + self.Doc.commitTransaction() + self.failUnless(G1.getObject("Label_2") is None) + self.Doc.undo() + self.failUnless(G1.getObject("Label_2") is not None) - # Remove object from group - self.Doc.openTransaction("Remove") - self.Doc.removeObject("Label_2") - self.Doc.commitTransaction() - self.failUnless(G1.getObject("Label_2") is None) - self.Doc.undo() - self.failUnless(G1.getObject("Label_2") is not None) + # Remove first group and then the object + self.Doc.openTransaction("Remove") + self.Doc.removeObject("Group") + self.Doc.removeObject("Label_2") + self.Doc.commitTransaction() + self.Doc.undo() + self.failUnless(G1.getObject("Label_2") is not None) - # Remove first group and then the object - self.Doc.openTransaction("Remove") - self.Doc.removeObject("Group") - self.Doc.removeObject("Label_2") - self.Doc.commitTransaction() - self.Doc.undo() - self.failUnless(G1.getObject("Label_2") is not None) + # Remove first object and then the group in two transactions + self.Doc.openTransaction("Remove") + self.Doc.removeObject("Label_2") + self.Doc.commitTransaction() + self.failUnless(G1.getObject("Label_2") is None) + self.Doc.openTransaction("Remove") + self.Doc.removeObject("Group") + self.Doc.commitTransaction() + self.Doc.undo() + self.Doc.undo() + self.failUnless(G1.getObject("Label_2") is not None) - # Remove first object and then the group in two transactions - self.Doc.openTransaction("Remove") - self.Doc.removeObject("Label_2") - self.Doc.commitTransaction() - self.failUnless(G1.getObject("Label_2") is None) - self.Doc.openTransaction("Remove") - self.Doc.removeObject("Group") - self.Doc.commitTransaction() - self.Doc.undo() - self.Doc.undo() - self.failUnless(G1.getObject("Label_2") is not None) + # Remove first object and then the group in one transaction + self.Doc.openTransaction("Remove") + self.Doc.removeObject("Label_2") + self.failUnless(G1.getObject("Label_2") is None) + self.Doc.removeObject("Group") + self.Doc.commitTransaction() + self.Doc.undo() + # FIXME: See bug #1820554 + self.failUnless(G1.getObject("Label_2") is not None) - # Remove first object and then the group in one transaction - self.Doc.openTransaction("Remove") - self.Doc.removeObject("Label_2") - self.failUnless(G1.getObject("Label_2") is None) - self.Doc.removeObject("Group") - self.Doc.commitTransaction() - self.Doc.undo() - # FIXME: See bug #1820554 - self.failUnless(G1.getObject("Label_2") is not None) + # Add a second object to the group + L3 = self.Doc.addObject("App::FeatureTest", "Label_3") + G1.addObject(L3) + self.Doc.openTransaction("Remove") + self.Doc.removeObject("Label_2") + self.failUnless(G1.getObject("Label_2") is None) + self.Doc.removeObject("Label_3") + self.failUnless(G1.getObject("Label_3") is None) + self.Doc.removeObject("Group") + self.Doc.commitTransaction() + self.Doc.undo() + self.failUnless(G1.getObject("Label_3") is not None) + self.failUnless(G1.getObject("Label_2") is not None) - # Add a second object to the group - L3 = self.Doc.addObject("App::FeatureTest","Label_3") - G1.addObject(L3) - self.Doc.openTransaction("Remove") - self.Doc.removeObject("Label_2") - self.failUnless(G1.getObject("Label_2") is None) - self.Doc.removeObject("Label_3") - self.failUnless(G1.getObject("Label_3") is None) - self.Doc.removeObject("Group") - self.Doc.commitTransaction() - self.Doc.undo() - self.failUnless(G1.getObject("Label_3") is not None) - self.failUnless(G1.getObject("Label_2") is not None) + self.Doc.UndoMode = 0 - self.Doc.UndoMode = 0 + # Cleanup + self.Doc.removeObject("Group") + self.Doc.removeObject("Label_2") + self.Doc.removeObject("Label_3") - # Cleanup - self.Doc.removeObject("Group") - self.Doc.removeObject("Label_2") - self.Doc.removeObject("Label_3") + def testGroupAndGeoFeatureGroup(self): - def testGroupAndGeoFeatureGroup(self): + # an object can only be in one group at once, that must be enforced + obj1 = self.Doc.addObject("App::FeatureTest", "obj1") + grp1 = self.Doc.addObject("App::DocumentObjectGroup", "Group1") + grp2 = self.Doc.addObject("App::DocumentObjectGroup", "Group2") + grp1.addObject(obj1) + self.failUnless(obj1.getParentGroup() == grp1) + self.failUnless(obj1.getParentGeoFeatureGroup() is None) + self.failUnless(grp1.hasObject(obj1)) + grp2.addObject(obj1) + self.failUnless(grp1.hasObject(obj1) == False) + self.failUnless(grp2.hasObject(obj1)) - # an object can only be in one group at once, that must be enforced - obj1 = self.Doc.addObject("App::FeatureTest","obj1") - grp1 = self.Doc.addObject("App::DocumentObjectGroup","Group1") - grp2 = self.Doc.addObject("App::DocumentObjectGroup","Group2") - grp1.addObject(obj1) - self.failUnless(obj1.getParentGroup()==grp1) - self.failUnless(obj1.getParentGeoFeatureGroup() is None) - self.failUnless(grp1.hasObject(obj1)) - grp2.addObject(obj1) - self.failUnless(grp1.hasObject(obj1)==False) - self.failUnless(grp2.hasObject(obj1)) + # an object is allowed to be in a group and a geofeaturegroup + prt1 = self.Doc.addObject("App::Part", "Part1") + prt2 = self.Doc.addObject("App::Part", "Part2") - # an object is allowed to be in a group and a geofeaturegroup - prt1 = self.Doc.addObject("App::Part","Part1") - prt2 = self.Doc.addObject("App::Part","Part2") + prt1.addObject(grp2) + self.failUnless(grp2.getParentGeoFeatureGroup() == prt1) + self.failUnless(grp2.getParentGroup() is None) + self.failUnless(grp2.hasObject(obj1)) + self.failUnless(prt1.hasObject(grp2)) + self.failUnless(prt1.hasObject(obj1)) - prt1.addObject(grp2) - self.failUnless(grp2.getParentGeoFeatureGroup() == prt1) - self.failUnless(grp2.getParentGroup() is None) - self.failUnless(grp2.hasObject(obj1)) - self.failUnless(prt1.hasObject(grp2)) - self.failUnless(prt1.hasObject(obj1)) + # it is not allowed to be in 2 geofeaturegroups + prt2.addObject(grp2) + self.failUnless(grp2.hasObject(obj1)) + self.failUnless(prt1.hasObject(grp2) == False) + self.failUnless(prt1.hasObject(obj1) == False) + self.failUnless(prt2.hasObject(grp2)) + self.failUnless(prt2.hasObject(obj1)) + try: + grp = prt1.Group + grp.append(obj1) + prt1.Group = grp + except Exception: + grp.remove(obj1) + self.failUnless(prt1.Group == grp) + else: + self.fail("No exception thrown when object is in multiple Groups") - #it is not allowed to be in 2 geofeaturegroups - prt2.addObject(grp2) - self.failUnless(grp2.hasObject(obj1)) - self.failUnless(prt1.hasObject(grp2)==False) - self.failUnless(prt1.hasObject(obj1)==False) - self.failUnless(prt2.hasObject(grp2)) - self.failUnless(prt2.hasObject(obj1)) - try: - grp = prt1.Group + # it is not allowed to be in 2 Groups + prt2.addObject(grp1) + grp = grp1.Group grp.append(obj1) - prt1.Group = grp - except Exception: - grp.remove(obj1) - self.failUnless(prt1.Group == grp) - else: - self.fail("No exception thrown when object is in multiple Groups") + try: + grp1.Group = grp + except Exception: + pass + else: + self.fail("No exception thrown when object is in multiple Groups") - #it is not allowed to be in 2 Groups - prt2.addObject(grp1) - grp = grp1.Group - grp.append(obj1) - try: - grp1.Group = grp - except Exception: - pass - else: - self.fail("No exception thrown when object is in multiple Groups") + # cross linking between GeoFeatureGroups is not allowed + self.Doc.recompute() + box = self.Doc.addObject("App::FeatureTest", "Box") + cyl = self.Doc.addObject("App::FeatureTest", "Cylinder") + fus = self.Doc.addObject("App::FeatureTest", "Fusion") + fus.LinkList = [cyl, box] + self.Doc.recompute() + self.failUnless(fus.State[0] == "Up-to-date") + fus.LinkList = ( + [] + ) # remove all links as addObject would otherwise transfer all linked objects + prt1.addObject(cyl) + fus.LinkList = [cyl, box] + self.Doc.recompute() + # self.failUnless(fus.State[0] == 'Invalid') + fus.LinkList = [] + prt1.addObject(box) + fus.LinkList = [cyl, box] + self.Doc.recompute() + # self.failUnless(fus.State[0] == 'Invalid') + fus.LinkList = [] + prt1.addObject(fus) + fus.LinkList = [cyl, box] + self.Doc.recompute() + self.failUnless(fus.State[0] == "Up-to-date") + prt2.addObject(box) # this time addObject should move all dependencies to the new part + self.Doc.recompute() + self.failUnless(fus.State[0] == "Up-to-date") - #cross linking between GeoFeatureGroups is not allowed - self.Doc.recompute() - box = self.Doc.addObject("App::FeatureTest","Box") - cyl = self.Doc.addObject("App::FeatureTest","Cylinder") - fus = self.Doc.addObject("App::FeatureTest","Fusion") - fus.LinkList = [cyl, box] - self.Doc.recompute() - self.failUnless(fus.State[0] == 'Up-to-date') - fus.LinkList = [] #remove all links as addObject would otherwise transfer all linked objects - prt1.addObject(cyl) - fus.LinkList = [cyl, box] - self.Doc.recompute() - #self.failUnless(fus.State[0] == 'Invalid') - fus.LinkList = [] - prt1.addObject(box) - fus.LinkList = [cyl, box] - self.Doc.recompute() - #self.failUnless(fus.State[0] == 'Invalid') - fus.LinkList = [] - prt1.addObject(fus) - fus.LinkList = [cyl, box] - self.Doc.recompute() - self.failUnless(fus.State[0] == 'Up-to-date') - prt2.addObject(box) #this time addObject should move all dependencies to the new part - self.Doc.recompute() - self.failUnless(fus.State[0] == 'Up-to-date') + # grouping must be resilient against cyclic links and not crash: #issue 0002567 + prt1.addObject(prt2) + grp = prt2.Group + grp.append(prt1) + prt2.Group = grp + self.Doc.recompute() + prt2.Group = [] + try: + prt2.Group = [prt2] + except Exception: + pass + else: + self.fail("Exception is expected") - #grouping must be resilient against cyclic links and not crash: #issue 0002567 - prt1.addObject(prt2) - grp = prt2.Group - grp.append(prt1) - prt2.Group = grp - self.Doc.recompute() - prt2.Group = [] - try: - prt2.Group = [prt2] - except Exception: - pass - else: - self.fail("Exception is expected") + self.Doc.recompute() - self.Doc.recompute() + def testIssue0003150Part2(self): + self.box = self.Doc.addObject("App::FeatureTest") + self.cyl = self.Doc.addObject("App::FeatureTest") + self.sph = self.Doc.addObject("App::FeatureTest") - def testIssue0003150Part2(self): - self.box = self.Doc.addObject("App::FeatureTest") - self.cyl = self.Doc.addObject("App::FeatureTest") - self.sph = self.Doc.addObject("App::FeatureTest") + self.fus1 = self.Doc.addObject("App::FeatureTest") + self.fus2 = self.Doc.addObject("App::FeatureTest") - self.fus1 = self.Doc.addObject("App::FeatureTest") - self.fus2 = self.Doc.addObject("App::FeatureTest") + self.fus1.LinkList = [self.box, self.cyl] + self.fus2.LinkList = [self.sph, self.cyl] - self.fus1.LinkList = [self.box, self.cyl]; - self.fus2.LinkList = [self.sph, self.cyl]; + self.prt = self.Doc.addObject("App::Part") + self.prt.addObject(self.fus1) + self.failUnless(len(self.prt.Group) == 5) + self.failUnless(self.fus2.getParentGeoFeatureGroup() == self.prt) + self.failUnless(self.prt.hasObject(self.sph)) - self.prt = self.Doc.addObject("App::Part") - self.prt.addObject(self.fus1) - self.failUnless(len(self.prt.Group)==5) - self.failUnless(self.fus2.getParentGeoFeatureGroup() == self.prt) - self.failUnless(self.prt.hasObject(self.sph)) + self.prt.removeObject(self.fus1) + self.failUnless(len(self.prt.Group) == 0) - self.prt.removeObject(self.fus1) - self.failUnless(len(self.prt.Group)==0) + def tearDown(self): + # closing doc + FreeCAD.closeDocument("GroupTests") - def tearDown(self): - # closing doc - FreeCAD.closeDocument("GroupTests") class DocumentPlatformCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("PlatformTests") - self.Doc.addObject("App::FeatureTest", "Test") - self.TempPath = tempfile.gettempdir() - self.DocName = self.TempPath + os.sep + "PlatformTests.FCStd" + def setUp(self): + self.Doc = FreeCAD.newDocument("PlatformTests") + self.Doc.addObject("App::FeatureTest", "Test") + self.TempPath = tempfile.gettempdir() + self.DocName = self.TempPath + os.sep + "PlatformTests.FCStd" - def testFloatList(self): - self.Doc.Test.FloatList = [-0.05, 2.5, 5.2] + def testFloatList(self): + self.Doc.Test.FloatList = [-0.05, 2.5, 5.2] - # saving and restoring - self.Doc.saveAs(self.DocName) - FreeCAD.closeDocument("PlatformTests") - self.Doc = FreeCAD.open(self.DocName) + # saving and restoring + self.Doc.saveAs(self.DocName) + FreeCAD.closeDocument("PlatformTests") + self.Doc = FreeCAD.open(self.DocName) - self.failUnless(abs(self.Doc.Test.FloatList[0] + .05) < 0.01) - self.failUnless(abs(self.Doc.Test.FloatList[1] - 2.5) < 0.01) - self.failUnless(abs(self.Doc.Test.FloatList[2] - 5.2) < 0.01) + self.failUnless(abs(self.Doc.Test.FloatList[0] + 0.05) < 0.01) + self.failUnless(abs(self.Doc.Test.FloatList[1] - 2.5) < 0.01) + self.failUnless(abs(self.Doc.Test.FloatList[2] - 5.2) < 0.01) - def testColorList(self): - self.Doc.Test.ColourList = [(1.0,0.5,0.0),(0.0,0.5,1.0)] + def testColorList(self): + self.Doc.Test.ColourList = [(1.0, 0.5, 0.0), (0.0, 0.5, 1.0)] - # saving and restoring - self.Doc.saveAs(self.DocName) - FreeCAD.closeDocument("PlatformTests") - self.Doc = FreeCAD.open(self.DocName) + # saving and restoring + self.Doc.saveAs(self.DocName) + FreeCAD.closeDocument("PlatformTests") + self.Doc = FreeCAD.open(self.DocName) - self.failUnless(abs(self.Doc.Test.ColourList[0][0] - 1.0) < 0.01) - self.failUnless(abs(self.Doc.Test.ColourList[0][1] - 0.5) < 0.01) - self.failUnless(abs(self.Doc.Test.ColourList[0][2] - 0.0) < 0.01) - self.failUnless(abs(self.Doc.Test.ColourList[0][3] - 0.0) < 0.01) - self.failUnless(abs(self.Doc.Test.ColourList[1][0] - 0.0) < 0.01) - self.failUnless(abs(self.Doc.Test.ColourList[1][1] - 0.5) < 0.01) - self.failUnless(abs(self.Doc.Test.ColourList[1][2] - 1.0) < 0.01) - self.failUnless(abs(self.Doc.Test.ColourList[1][3] - 0.0) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[0][0] - 1.0) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[0][1] - 0.5) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[0][2] - 0.0) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[0][3] - 0.0) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[1][0] - 0.0) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[1][1] - 0.5) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[1][2] - 1.0) < 0.01) + self.failUnless(abs(self.Doc.Test.ColourList[1][3] - 0.0) < 0.01) - def testVectorList(self): - self.Doc.Test.VectorList = [(-0.05, 2.5, 5.2),(-0.05, 2.5, 5.2)] + def testVectorList(self): + self.Doc.Test.VectorList = [(-0.05, 2.5, 5.2), (-0.05, 2.5, 5.2)] - # saving and restoring - self.Doc.saveAs(self.DocName) - FreeCAD.closeDocument("PlatformTests") - self.Doc = FreeCAD.open(self.DocName) + # saving and restoring + self.Doc.saveAs(self.DocName) + FreeCAD.closeDocument("PlatformTests") + self.Doc = FreeCAD.open(self.DocName) - self.failUnless(len(self.Doc.Test.VectorList) == 2) + self.failUnless(len(self.Doc.Test.VectorList) == 2) - def testPoints(self): - try: - self.Doc.addObject("Points::Feature", "Points") + def testPoints(self): + try: + self.Doc.addObject("Points::Feature", "Points") - # saving and restoring - self.Doc.saveAs(self.DocName) - FreeCAD.closeDocument("PlatformTests") - self.Doc = FreeCAD.open(self.DocName) + # saving and restoring + self.Doc.saveAs(self.DocName) + FreeCAD.closeDocument("PlatformTests") + self.Doc = FreeCAD.open(self.DocName) - self.failUnless(self.Doc.Points.Points.count() == 0) - except Exception: - pass + self.failUnless(self.Doc.Points.Points.count() == 0) + except Exception: + pass - def tearDown(self): - #closing doc - FreeCAD.closeDocument("PlatformTests") + def tearDown(self): + # closing doc + FreeCAD.closeDocument("PlatformTests") class DocumentBacklinks(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("BackLinks") + def setUp(self): + self.Doc = FreeCAD.newDocument("BackLinks") - def testIssue0003323(self): - self.Doc.UndoMode=1 - self.Doc.openTransaction("Create object") - obj1=self.Doc.addObject("App::FeatureTest","Test1") - obj2=self.Doc.addObject("App::FeatureTest","Test2") - obj2.Link=obj1 - self.Doc.commitTransaction() - self.Doc.undo() - self.Doc.openTransaction("Create object") + def testIssue0003323(self): + self.Doc.UndoMode = 1 + self.Doc.openTransaction("Create object") + obj1 = self.Doc.addObject("App::FeatureTest", "Test1") + obj2 = self.Doc.addObject("App::FeatureTest", "Test2") + obj2.Link = obj1 + self.Doc.commitTransaction() + self.Doc.undo() + self.Doc.openTransaction("Create object") - def tearDown(self): - # closing doc - FreeCAD.closeDocument("BackLinks") + def tearDown(self): + # closing doc + FreeCAD.closeDocument("BackLinks") class DocumentFileIncludeCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("FileIncludeTests") - # testing with undo - self.Doc.UndoMode = 1 + def setUp(self): + self.Doc = FreeCAD.newDocument("FileIncludeTests") + # testing with undo + self.Doc.UndoMode = 1 + def testApplyFiles(self): + self.Doc.openTransaction("Transaction0") + self.L1 = self.Doc.addObject("App::DocumentObjectFileIncluded", "FileObject1") + self.failUnless(self.L1.File == "") + self.Filename = self.L1.File - def testApplyFiles(self): - self.Doc.openTransaction("Transaction0") - self.L1 = self.Doc.addObject("App::DocumentObjectFileIncluded","FileObject1") - self.failUnless(self.L1.File =="") - self.Filename = self.L1.File + self.Doc.openTransaction("Transaction1") + self.TempPath = tempfile.gettempdir() + # creating a file in the Transient directory of the document + file = open(self.Doc.getTempFileName("test"), "w") + file.write("test No1") + file.close() + # applying the file + self.L1.File = (file.name, "Test.txt") + self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") + # read again + file = open(self.L1.File, "r") + self.failUnless(file.read() == "test No1") + file.close() + file = open(self.TempPath + "/testNest.txt", "w") + file.write("test No2") + file.close() + # applying the file + self.Doc.openTransaction("Transaction2") + self.L1.File = file.name + self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") + # read again + file = open(self.L1.File, "r") + self.failUnless(file.read() == "test No2") + file.close() + self.Doc.undo() + self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") + # read again + file = open(self.L1.File, "r") + self.failUnless(file.read() == "test No1") + file.close() + self.Doc.undo() + # read again + self.failUnless(self.L1.File == "") + self.Doc.redo() + self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") + # read again + file = open(self.L1.File, "r") + self.failUnless(file.read() == "test No1") + file.close() + self.Doc.redo() + self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") + # read again + file = open(self.L1.File, "r") + self.failUnless(file.read() == "test No2") + file.close() + # Save restore test + FileName = self.TempPath + "/FileIncludeTests.fcstd" + self.Doc.saveAs(FileName) + FreeCAD.closeDocument("FileIncludeTests") + self.Doc = FreeCAD.open(self.TempPath + "/FileIncludeTests.fcstd") + # check if the file is still there + self.L1 = self.Doc.getObject("FileObject1") + file = open(self.L1.File, "r") + res = file.read() + FreeCAD.Console.PrintLog(res + "\n") + self.failUnless(res == "test No2") + self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") + file.close() - self.Doc.openTransaction("Transaction1") - self.TempPath = tempfile.gettempdir() - # creating a file in the Transient directory of the document - file = open(self.Doc.getTempFileName("test"),"w") - file.write("test No1") - file.close() - # applying the file - self.L1.File = (file.name,"Test.txt") - self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") - # read again - file = open(self.L1.File,"r") - self.failUnless(file.read()=="test No1") - file.close() - file = open(self.TempPath+"/testNest.txt","w") - file.write("test No2") - file.close() - # applying the file - self.Doc.openTransaction("Transaction2") - self.L1.File = file.name - self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") - # read again - file = open(self.L1.File,"r") - self.failUnless(file.read()=="test No2") - file.close() - self.Doc.undo() - self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") - # read again - file = open(self.L1.File,"r") - self.failUnless(file.read()=="test No1") - file.close() - self.Doc.undo() - # read again - self.failUnless(self.L1.File == "") - self.Doc.redo() - self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") - # read again - file = open(self.L1.File,"r") - self.failUnless(file.read()=="test No1") - file.close() - self.Doc.redo() - self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") - # read again - file = open(self.L1.File,"r") - self.failUnless(file.read()=="test No2") - file.close() - # Save restore test - FileName = self.TempPath+"/FileIncludeTests.fcstd" - self.Doc.saveAs(FileName) - FreeCAD.closeDocument("FileIncludeTests") - self.Doc = FreeCAD.open(self.TempPath+"/FileIncludeTests.fcstd") - # check if the file is still there - self.L1 = self.Doc.getObject("FileObject1") - file = open(self.L1.File,"r") - res = file.read() - FreeCAD.Console.PrintLog( res +"\n") - self.failUnless(res=="test No2") - self.failUnless(self.L1.File.split("/")[-1] == "Test.txt") - file.close() + # test for bug #94 (File overlap in PropertyFileIncluded) + L2 = self.Doc.addObject("App::DocumentObjectFileIncluded", "FileObject2") + L3 = self.Doc.addObject("App::DocumentObjectFileIncluded", "FileObject3") - # test for bug #94 (File overlap in PropertyFileIncluded) - L2 = self.Doc.addObject("App::DocumentObjectFileIncluded","FileObject2") - L3 = self.Doc.addObject("App::DocumentObjectFileIncluded","FileObject3") + # creating two files in the Transient directory of the document + file1 = open(self.Doc.getTempFileName("test"), "w") + file1.write("test No1") + file1.close() + file2 = open(self.Doc.getTempFileName("test"), "w") + file2.write("test No2") + file2.close() - # creating two files in the Transient directory of the document - file1 = open(self.Doc.getTempFileName("test"),"w") - file1.write("test No1") - file1.close() - file2 = open(self.Doc.getTempFileName("test"),"w") - file2.write("test No2") - file2.close() + # applying the file with the same base name + L2.File = (file1.name, "Test.txt") + L3.File = (file2.name, "Test.txt") - # applying the file with the same base name - L2.File = (file1.name,"Test.txt") - L3.File = (file2.name,"Test.txt") + file = open(L2.File, "r") + self.failUnless(file.read() == "test No1") + file.close() + file = open(L3.File, "r") + self.failUnless(file.read() == "test No2") + file.close() - file = open(L2.File,"r") - self.failUnless(file.read()=="test No1") - file.close() - file = open(L3.File,"r") - self.failUnless(file.read()=="test No2") - file.close() + # create a second document, copy a file and close the document + # the test is about to put the file to the correct transient dir + doc2 = FreeCAD.newDocument("Doc2") + L4 = doc2.addObject("App::DocumentObjectFileIncluded", "FileObject") + L5 = doc2.addObject("App::DocumentObjectFileIncluded", "FileObject") + L6 = doc2.addObject("App::DocumentObjectFileIncluded", "FileObject") + L4.File = (L3.File, "Test.txt") + L5.File = L3.File + L6.File = L3.File + FreeCAD.closeDocument("FileIncludeTests") + self.Doc = FreeCAD.open(self.TempPath + "/FileIncludeTests.fcstd") + self.failUnless(os.path.exists(L4.File)) + self.failUnless(os.path.exists(L5.File)) + self.failUnless(os.path.exists(L6.File)) + self.failUnless(L5.File != L6.File) + # copy file from L5 which is in the same directory + L7 = doc2.addObject("App::DocumentObjectFileIncluded", "FileObject3") + L7.File = (L5.File, "Copy.txt") + self.failUnless(os.path.exists(L7.File)) + FreeCAD.closeDocument("Doc2") - # create a second document, copy a file and close the document - # the test is about to put the file to the correct transient dir - doc2 = FreeCAD.newDocument("Doc2") - L4 = doc2.addObject("App::DocumentObjectFileIncluded","FileObject") - L5 = doc2.addObject("App::DocumentObjectFileIncluded","FileObject") - L6 = doc2.addObject("App::DocumentObjectFileIncluded","FileObject") - L4.File = (L3.File,"Test.txt") - L5.File = L3.File - L6.File = L3.File - FreeCAD.closeDocument("FileIncludeTests") - self.Doc = FreeCAD.open(self.TempPath+"/FileIncludeTests.fcstd") - self.failUnless(os.path.exists(L4.File)) - self.failUnless(os.path.exists(L5.File)) - self.failUnless(os.path.exists(L6.File)) - self.failUnless(L5.File != L6.File) - # copy file from L5 which is in the same directory - L7 = doc2.addObject("App::DocumentObjectFileIncluded","FileObject3") - L7.File = (L5.File,"Copy.txt") - self.failUnless(os.path.exists(L7.File)) - FreeCAD.closeDocument("Doc2") - - - def tearDown(self): - #closing doc - FreeCAD.closeDocument("FileIncludeTests") + def tearDown(self): + # closing doc + FreeCAD.closeDocument("FileIncludeTests") class DocumentPropertyCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("PropertyTests") - self.Obj = self.Doc.addObject("App::FeaturePython","Test") + def setUp(self): + self.Doc = FreeCAD.newDocument("PropertyTests") + self.Obj = self.Doc.addObject("App::FeaturePython", "Test") - def testDescent(self): - # testing the up and downstream stuff - props=self.Obj.supportedProperties() - for i in props: - self.Obj.addProperty(i,i.replace(':','_')) - tempPath = tempfile.gettempdir() - tempFile = tempPath + os.sep + "PropertyTests.FCStd" - self.Doc.saveAs(tempFile) - FreeCAD.closeDocument("PropertyTests") - self.Doc = FreeCAD.open(tempFile) + def testDescent(self): + # testing the up and downstream stuff + props = self.Obj.supportedProperties() + for i in props: + self.Obj.addProperty(i, i.replace(":", "_")) + tempPath = tempfile.gettempdir() + tempFile = tempPath + os.sep + "PropertyTests.FCStd" + self.Doc.saveAs(tempFile) + FreeCAD.closeDocument("PropertyTests") + self.Doc = FreeCAD.open(tempFile) - def testRemoveProperty(self): - prop = 'Something' - self.Obj.addProperty('App::PropertyFloat', prop) - self.Obj.Something = 0.01 - self.Doc.recompute() - self.Doc.openTransaction('modify and remove property') - self.Obj.Something = 0.00 - self.Obj.removeProperty(prop) - self.Obj.recompute() - self.Doc.abortTransaction() + def testRemoveProperty(self): + prop = "Something" + self.Obj.addProperty("App::PropertyFloat", prop) + self.Obj.Something = 0.01 + self.Doc.recompute() + self.Doc.openTransaction("modify and remove property") + self.Obj.Something = 0.00 + self.Obj.removeProperty(prop) + self.Obj.recompute() + self.Doc.abortTransaction() - def testRemovePropertyExpression(self): - p1 = self.Doc.addObject("App::FeaturePython", "params1") - p2 = self.Doc.addObject("App::FeaturePython", "params2") - p1.addProperty("App::PropertyFloat", "a") - p1.a = 42 - p2.addProperty("App::PropertyFloat", "b") - p2.setExpression('b', u'params1.a') - self.Doc.recompute() - p2.removeProperty("b") - p1.touch() - self.Doc.recompute() - self.assertTrue(not p2 in p1.InList) + def testRemovePropertyExpression(self): + p1 = self.Doc.addObject("App::FeaturePython", "params1") + p2 = self.Doc.addObject("App::FeaturePython", "params2") + p1.addProperty("App::PropertyFloat", "a") + p1.a = 42 + p2.addProperty("App::PropertyFloat", "b") + p2.setExpression("b", "params1.a") + self.Doc.recompute() + p2.removeProperty("b") + p1.touch() + self.Doc.recompute() + self.assertTrue(not p2 in p1.InList) - def testRemovePropertyOnChange(self): - class Feature: - def __init__(self, fp): - fp.Proxy = self - fp.addProperty("App::PropertyString","Test") - def onBeforeChange(self, fp, prop): - if prop == "Test": - fp.removeProperty("Test") - def onChanged(self, fp, prop): - getattr(fp, prop) + def testRemovePropertyOnChange(self): + class Feature: + def __init__(self, fp): + fp.Proxy = self + fp.addProperty("App::PropertyString", "Test") - obj = self.Doc.addObject("App::FeaturePython") - fea = Feature(obj) - obj.Test = "test" + def onBeforeChange(self, fp, prop): + if prop == "Test": + fp.removeProperty("Test") - def tearDown(self): - #closing doc - FreeCAD.closeDocument("PropertyTests") + def onChanged(self, fp, prop): + getattr(fp, prop) + + obj = self.Doc.addObject("App::FeaturePython") + fea = Feature(obj) + obj.Test = "test" + + def tearDown(self): + # closing doc + FreeCAD.closeDocument("PropertyTests") class DocumentExpressionCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument() + def setUp(self): + self.Doc = FreeCAD.newDocument() - def assertAlmostEqual (self, v1, v2) : - if (math.fabs(v2-v1) > 1E-12) : - self.assertEqual(v1,v2) + def assertAlmostEqual(self, v1, v2): + if math.fabs(v2 - v1) > 1e-12: + self.assertEqual(v1, v2) + def testExpression(self): + self.Obj1 = self.Doc.addObject("App::FeatureTest", "Test") + self.Obj2 = self.Doc.addObject("App::FeatureTest", "Test") + # set the object twice to test that the backlinks are removed when overwriting the expression + self.Obj2.setExpression( + "Placement.Rotation.Angle", "%s.Placement.Rotation.Angle" % self.Obj1.Name + ) + self.Obj2.setExpression( + "Placement.Rotation.Angle", "%s.Placement.Rotation.Angle" % self.Obj1.Name + ) + self.Obj1.Placement = FreeCAD.Placement( + FreeCAD.Vector(0, 0, 0), FreeCAD.Rotation(FreeCAD.Vector(0, 0, 1), 10) + ) + self.Doc.recompute() + self.assertAlmostEqual( + self.Obj1.Placement.Rotation.Angle, self.Obj2.Placement.Rotation.Angle + ) - def testExpression(self): - self.Obj1 = self.Doc.addObject("App::FeatureTest","Test") - self.Obj2 = self.Doc.addObject("App::FeatureTest","Test") - # set the object twice to test that the backlinks are removed when overwriting the expression - self.Obj2.setExpression('Placement.Rotation.Angle', u'%s.Placement.Rotation.Angle' % self.Obj1.Name) - self.Obj2.setExpression('Placement.Rotation.Angle', u'%s.Placement.Rotation.Angle' % self.Obj1.Name) - self.Obj1.Placement = FreeCAD.Placement(FreeCAD.Vector(0,0,0),FreeCAD.Rotation(FreeCAD.Vector(0,0,1),10)) - self.Doc.recompute() - self.assertAlmostEqual(self.Obj1.Placement.Rotation.Angle, self.Obj2.Placement.Rotation.Angle) + # clear the expression + self.Obj2.setExpression("Placement.Rotation.Angle", None) + self.assertAlmostEqual( + self.Obj1.Placement.Rotation.Angle, self.Obj2.Placement.Rotation.Angle + ) + self.Doc.recompute() + self.assertAlmostEqual( + self.Obj1.Placement.Rotation.Angle, self.Obj2.Placement.Rotation.Angle + ) + # touch the objects to perform a recompute + self.Obj1.Placement = self.Obj1.Placement + self.Obj2.Placement = self.Obj2.Placement + # must not raise a topological error + self.assertEqual(self.Doc.recompute(), 2) - # clear the expression - self.Obj2.setExpression('Placement.Rotation.Angle', None) - self.assertAlmostEqual(self.Obj1.Placement.Rotation.Angle, self.Obj2.Placement.Rotation.Angle) - self.Doc.recompute() - self.assertAlmostEqual(self.Obj1.Placement.Rotation.Angle, self.Obj2.Placement.Rotation.Angle) - # touch the objects to perform a recompute - self.Obj1.Placement = self.Obj1.Placement - self.Obj2.Placement = self.Obj2.Placement - # must not raise a topological error - self.assertEqual(self.Doc.recompute(), 2) + # add test for issue #6948 + self.Obj3 = self.Doc.addObject("App::FeatureTest", "Test") + self.Obj3.setExpression("Float", "2*(5%3)") + self.Doc.recompute() + self.assertEqual(self.Obj3.Float, 4) + self.assertEqual(self.Obj3.evalExpression(self.Obj3.ExpressionEngine[0][1]), 4) - # add test for issue #6948 - self.Obj3 = self.Doc.addObject("App::FeatureTest", "Test") - self.Obj3.setExpression('Float', u'2*(5%3)') - self.Doc.recompute() - self.assertEqual(self.Obj3.Float, 4) - self.assertEqual(self.Obj3.evalExpression(self.Obj3.ExpressionEngine[0][1]), 4) + def testIssue4649(self): + class Cls: + def __init__(self, obj): + self.MonitorChanges = False + obj.Proxy = self + obj.addProperty("App::PropertyFloat", "propA", "group") + obj.addProperty("App::PropertyFloat", "propB", "group") + self.MonitorChanges = True + obj.setExpression("propB", "6*9") + def onChanged(self, obj, prop): + print("onChanged", self, obj, prop) + if self.MonitorChanges and prop == "propA": + print("Removing expression...") + obj.setExpression("propB", None) - def testIssue4649(self): - class Cls(): - def __init__(self, obj): - self.MonitorChanges = False - obj.Proxy = self - obj.addProperty('App::PropertyFloat', "propA", "group") - obj.addProperty('App::PropertyFloat', "propB", "group") - self.MonitorChanges = True - obj.setExpression("propB", '6*9') - def onChanged(self, obj, prop): - print("onChanged",self, obj, prop) - if (self.MonitorChanges and prop == "propA"): - print('Removing expression...') - obj.setExpression("propB", None) + obj = self.Doc.addObject("App::DocumentObjectGroupPython", "Obj") + Cls(obj) + self.Doc.UndoMode = 1 + self.Doc.openTransaction("Expression") + obj.setExpression("propA", "42") + self.Doc.recompute() + self.Doc.commitTransaction() + self.assertTrue(("propB", None) in obj.ExpressionEngine) + self.assertTrue(("propA", "42") in obj.ExpressionEngine) - obj = self.Doc.addObject("App::DocumentObjectGroupPython", "Obj") - Cls(obj) - self.Doc.UndoMode = 1 - self.Doc.openTransaction("Expression") - obj.setExpression("propA", '42') - self.Doc.recompute() - self.Doc.commitTransaction() - self.assertTrue(('propB', None) in obj.ExpressionEngine) - self.assertTrue(('propA', "42") in obj.ExpressionEngine) + self.Doc.undo() + self.assertFalse(("propB", None) in obj.ExpressionEngine) + self.assertFalse(("propA", "42") in obj.ExpressionEngine) - self.Doc.undo() - self.assertFalse(('propB', None) in obj.ExpressionEngine) - self.assertFalse(('propA', "42") in obj.ExpressionEngine) + self.Doc.redo() + self.assertTrue(("propB", None) in obj.ExpressionEngine) + self.assertTrue(("propA", "42") in obj.ExpressionEngine) - self.Doc.redo() - self.assertTrue(('propB', None) in obj.ExpressionEngine) - self.assertTrue(('propA', "42") in obj.ExpressionEngine) + self.Doc.recompute() + obj.ExpressionEngine - self.Doc.recompute() - obj.ExpressionEngine + TempPath = tempfile.gettempdir() + SaveName = TempPath + os.sep + "ExpressionTests.FCStd" + self.Doc.saveAs(SaveName) + FreeCAD.closeDocument(self.Doc.Name) + self.Doc = FreeCAD.openDocument(SaveName) - TempPath = tempfile.gettempdir() - SaveName = TempPath + os.sep + "ExpressionTests.FCStd" - self.Doc.saveAs(SaveName) - FreeCAD.closeDocument(self.Doc.Name) - self.Doc = FreeCAD.openDocument(SaveName) + def testCyclicDependencyOnPlacement(self): + obj = self.Doc.addObject("App::FeaturePython", "Python") + obj.addProperty("App::PropertyPlacement", "Placement") + obj.setExpression(".Placement.Base.x", ".Placement.Base.y + 10mm") + with self.assertRaises(RuntimeError): + obj.setExpression(".Placement.Base.y", ".Placement.Base.x + 10mm") - def testCyclicDependencyOnPlacement(self): - obj = self.Doc.addObject("App::FeaturePython","Python") - obj.addProperty("App::PropertyPlacement", "Placement") - obj.setExpression('.Placement.Base.x', '.Placement.Base.y + 10mm') - with self.assertRaises(RuntimeError): - obj.setExpression('.Placement.Base.y', '.Placement.Base.x + 10mm') - - def tearDown(self): - #closing doc - FreeCAD.closeDocument(self.Doc.Name) + def tearDown(self): + # closing doc + FreeCAD.closeDocument(self.Doc.Name) class DocumentObserverCases(unittest.TestCase): + class Observer: + def __init__(self): + self.clear() - class Observer(): + def clear(self): + self.signal = [] + self.parameter = [] + self.parameter2 = [] - def __init__(self): - self.clear() + def slotCreatedDocument(self, doc): + self.signal.append("DocCreated") + self.parameter.append(doc) - def clear(self): - self.signal = [] - self.parameter = [] - self.parameter2 = [] + def slotDeletedDocument(self, doc): + self.signal.append("DocDeleted") + self.parameter.append(doc) - def slotCreatedDocument(self, doc): - self.signal.append('DocCreated'); - self.parameter.append(doc); + def slotRelabelDocument(self, doc): + self.signal.append("DocRelabled") + self.parameter.append(doc) - def slotDeletedDocument(self, doc): - self.signal.append('DocDeleted'); - self.parameter.append(doc); + def slotActivateDocument(self, doc): + self.signal.append("DocActivated") + self.parameter.append(doc) - def slotRelabelDocument(self, doc): - self.signal.append('DocRelabled'); - self.parameter.append(doc); + def slotRecomputedDocument(self, doc): + self.signal.append("DocRecomputed") + self.parameter.append(doc) - def slotActivateDocument(self, doc): - self.signal.append('DocActivated'); - self.parameter.append(doc); + def slotUndoDocument(self, doc): + self.signal.append("DocUndo") + self.parameter.append(doc) - def slotRecomputedDocument(self, doc): - self.signal.append('DocRecomputed'); - self.parameter.append(doc); + def slotRedoDocument(self, doc): + self.signal.append("DocRedo") + self.parameter.append(doc) - def slotUndoDocument(self, doc): - self.signal.append('DocUndo'); - self.parameter.append(doc); + def slotOpenTransaction(self, doc, name): + self.signal.append("DocOpenTransaction") + self.parameter.append(doc) + self.parameter2.append(name) - def slotRedoDocument(self, doc): - self.signal.append('DocRedo'); - self.parameter.append(doc); + def slotCommitTransaction(self, doc): + self.signal.append("DocCommitTransaction") + self.parameter.append(doc) - def slotOpenTransaction(self, doc, name): - self.signal.append('DocOpenTransaction'); - self.parameter.append(doc); - self.parameter2.append(name); + def slotAbortTransaction(self, doc): + self.signal.append("DocAbortTransaction") + self.parameter.append(doc) - def slotCommitTransaction(self, doc): - self.signal.append('DocCommitTransaction'); - self.parameter.append(doc); + def slotBeforeChangeDocument(self, doc, prop): + self.signal.append("DocBeforeChange") + self.parameter.append(doc) + self.parameter2.append(prop) - def slotAbortTransaction(self, doc): - self.signal.append('DocAbortTransaction'); - self.parameter.append(doc); + def slotChangedDocument(self, doc, prop): + self.signal.append("DocChanged") + self.parameter.append(doc) + self.parameter2.append(prop) - def slotBeforeChangeDocument(self, doc, prop): - self.signal.append('DocBeforeChange') - self.parameter.append(doc) - self.parameter2.append(prop) + def slotCreatedObject(self, obj): + self.signal.append("ObjCreated") + self.parameter.append(obj) - def slotChangedDocument(self, doc, prop): - self.signal.append('DocChanged') - self.parameter.append(doc) - self.parameter2.append(prop) + def slotDeletedObject(self, obj): + self.signal.append("ObjDeleted") + self.parameter.append(obj) - def slotCreatedObject(self, obj): - self.signal.append('ObjCreated'); - self.parameter.append(obj); + def slotChangedObject(self, obj, prop): + self.signal.append("ObjChanged") + self.parameter.append(obj) + self.parameter2.append(prop) - def slotDeletedObject(self, obj): - self.signal.append('ObjDeleted'); - self.parameter.append(obj) + def slotBeforeChangeObject(self, obj, prop): + self.signal.append("ObjBeforeChange") + self.parameter.append(obj) + self.parameter2.append(prop) - def slotChangedObject(self, obj, prop): - self.signal.append('ObjChanged'); - self.parameter.append(obj) - self.parameter2.append(prop) + def slotRecomputedObject(self, obj): + self.signal.append("ObjRecomputed") + self.parameter.append(obj) - def slotBeforeChangeObject(self, obj, prop): - self.signal.append('ObjBeforeChange'); - self.parameter.append(obj) - self.parameter2.append(prop) + def slotAppendDynamicProperty(self, obj, prop): + self.signal.append("ObjAddDynProp") + self.parameter.append(obj) + self.parameter2.append(prop) - def slotRecomputedObject(self, obj): - self.signal.append('ObjRecomputed'); - self.parameter.append(obj) + def slotRemoveDynamicProperty(self, obj, prop): + self.signal.append("ObjRemoveDynProp") + self.parameter.append(obj) + self.parameter2.append(prop) - def slotAppendDynamicProperty(self, obj, prop): - self.signal.append('ObjAddDynProp'); - self.parameter.append(obj) - self.parameter2.append(prop) + def slotChangePropertyEditor(self, obj, prop): + self.signal.append("ObjChangePropEdit") + self.parameter.append(obj) + self.parameter2.append(prop) - def slotRemoveDynamicProperty(self, obj, prop): - self.signal.append('ObjRemoveDynProp'); - self.parameter.append(obj) - self.parameter2.append(prop) + def slotStartSaveDocument(self, obj, name): + self.signal.append("DocStartSave") + self.parameter.append(obj) + self.parameter2.append(name) - def slotChangePropertyEditor(self, obj, prop): - self.signal.append('ObjChangePropEdit'); - self.parameter.append(obj) - self.parameter2.append(prop) + def slotFinishSaveDocument(self, obj, name): + self.signal.append("DocFinishSave") + self.parameter.append(obj) + self.parameter2.append(name) - def slotStartSaveDocument(self, obj, name): - self.signal.append('DocStartSave') - self.parameter.append(obj) - self.parameter2.append(name) + def slotBeforeAddingDynamicExtension(self, obj, extension): + self.signal.append("ObjBeforeDynExt") + self.parameter.append(obj) + self.parameter2.append(extension) - def slotFinishSaveDocument(self, obj, name): - self.signal.append('DocFinishSave') - self.parameter.append(obj) - self.parameter2.append(name) + def slotAddedDynamicExtension(self, obj, extension): + self.signal.append("ObjDynExt") + self.parameter.append(obj) + self.parameter2.append(extension) - def slotBeforeAddingDynamicExtension(self, obj, extension): - self.signal.append('ObjBeforeDynExt') - self.parameter.append(obj) - self.parameter2.append(extension) + class GuiObserver: + def __init__(self): + self.clear() - def slotAddedDynamicExtension(self, obj, extension): - self.signal.append('ObjDynExt') - self.parameter.append(obj) - self.parameter2.append(extension) + def clear(self): + self.signal = [] + self.parameter = [] + self.parameter2 = [] - class GuiObserver(): + def slotCreatedDocument(self, doc): + self.signal.append("DocCreated") + self.parameter.append(doc) - def __init__(self): - self.clear() + def slotDeletedDocument(self, doc): + self.signal.append("DocDeleted") + self.parameter.append(doc) - def clear(self): - self.signal = [] - self.parameter = [] - self.parameter2 = [] + def slotRelabelDocument(self, doc): + self.signal.append("DocRelabled") + self.parameter.append(doc) - def slotCreatedDocument(self, doc): - self.signal.append('DocCreated'); - self.parameter.append(doc); + def slotRenameDocument(self, doc): + self.signal.append("DocRenamed") + self.parameter.append(doc) - def slotDeletedDocument(self, doc): - self.signal.append('DocDeleted'); - self.parameter.append(doc); + def slotActivateDocument(self, doc): + self.signal.append("DocActivated") + self.parameter.append(doc) - def slotRelabelDocument(self, doc): - self.signal.append('DocRelabled'); - self.parameter.append(doc); + def slotCreatedObject(self, obj): + self.signal.append("ObjCreated") + self.parameter.append(obj) - def slotRenameDocument(self, doc): - self.signal.append('DocRenamed'); - self.parameter.append(doc); + def slotDeletedObject(self, obj): + self.signal.append("ObjDeleted") + self.parameter.append(obj) - def slotActivateDocument(self, doc): - self.signal.append('DocActivated'); - self.parameter.append(doc); + def slotChangedObject(self, obj, prop): + self.signal.append("ObjChanged") + self.parameter.append(obj) + self.parameter2.append(prop) - def slotCreatedObject(self, obj): - self.signal.append('ObjCreated'); - self.parameter.append(obj); + def slotInEdit(self, obj): + self.signal.append("ObjInEdit") + self.parameter.append(obj) - def slotDeletedObject(self, obj): - self.signal.append('ObjDeleted'); - self.parameter.append(obj) + def slotResetEdit(self, obj): + self.signal.append("ObjResetEdit") + self.parameter.append(obj) - def slotChangedObject(self, obj, prop): - self.signal.append('ObjChanged'); - self.parameter.append(obj) - self.parameter2.append(prop) + def setUp(self): + self.Obs = self.Observer() + FreeCAD.addDocumentObserver(self.Obs) - def slotInEdit(self, obj): - self.signal.append('ObjInEdit'); - self.parameter.append(obj) + def testRemoveObserver(self): + FreeCAD.removeDocumentObserver(self.Obs) + self.Obs.clear() + self.Doc1 = FreeCAD.newDocument("Observer") + FreeCAD.closeDocument(self.Doc1.Name) + self.assertEqual(len(self.Obs.signal), 0) + self.assertEqual(len(self.Obs.parameter2), 0) + self.assertEqual(len(self.Obs.signal), 0) + FreeCAD.addDocumentObserver(self.Obs) - def slotResetEdit(self, obj): - self.signal.append('ObjResetEdit'); - self.parameter.append(obj) + def testSave(self): + TempPath = tempfile.gettempdir() + SaveName = TempPath + os.sep + "SaveRestoreTests.FCStd" + self.Doc1 = FreeCAD.newDocument("Observer1") + self.Doc1.saveAs(SaveName) + self.assertEqual(self.Obs.signal.pop(), "DocFinishSave") + self.assertEqual(self.Obs.parameter2.pop(), self.Doc1.FileName) + self.assertEqual(self.Obs.signal.pop(), "DocStartSave") + self.assertEqual(self.Obs.parameter2.pop(), self.Doc1.FileName) + FreeCAD.closeDocument(self.Doc1.Name) - def setUp(self): - self.Obs = self.Observer(); - FreeCAD.addDocumentObserver(self.Obs); + def testDocument(self): + # in case another document already exists then the tests cannot + # be done reliably + if FreeCAD.GuiUp and FreeCAD.activeDocument(): + return - def testRemoveObserver(self): - FreeCAD.removeDocumentObserver(self.Obs) - self.Obs.clear() - self.Doc1 = FreeCAD.newDocument("Observer") - FreeCAD.closeDocument(self.Doc1.Name) - self.assertEqual(len(self.Obs.signal), 0) - self.assertEqual(len(self.Obs.parameter2), 0) - self.assertEqual(len(self.Obs.signal), 0) - FreeCAD.addDocumentObserver(self.Obs); + # testing document level signals + self.Doc1 = FreeCAD.newDocument("Observer1") + if FreeCAD.GuiUp: + self.assertEqual(self.Obs.signal.pop(0), "DocActivated") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) + self.assertEqual(self.Obs.signal.pop(0), "DocCreated") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) + self.assertEqual(self.Obs.signal.pop(0), "DocBeforeChange") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) + self.assertEqual(self.Obs.parameter2.pop(0), "Label") + self.assertEqual(self.Obs.signal.pop(0), "DocChanged") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) + self.assertEqual(self.Obs.parameter2.pop(0), "Label") + self.assertEqual(self.Obs.signal.pop(0), "DocRelabled") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) + self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - def testSave(self): - TempPath = tempfile.gettempdir() - SaveName = TempPath + os.sep + "SaveRestoreTests.FCStd" - self.Doc1 = FreeCAD.newDocument("Observer1"); - self.Doc1.saveAs(SaveName) - self.assertEqual(self.Obs.signal.pop(), 'DocFinishSave') - self.assertEqual(self.Obs.parameter2.pop(), self.Doc1.FileName) - self.assertEqual(self.Obs.signal.pop(), 'DocStartSave') - self.assertEqual(self.Obs.parameter2.pop(), self.Doc1.FileName) - FreeCAD.closeDocument(self.Doc1.Name) + self.Doc2 = FreeCAD.newDocument("Observer2") + if FreeCAD.GuiUp: + self.assertEqual(self.Obs.signal.pop(0), "DocActivated") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) + self.assertEqual(self.Obs.signal.pop(0), "DocCreated") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) + self.assertEqual(self.Obs.signal.pop(0), "DocBeforeChange") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) + self.assertEqual(self.Obs.parameter2.pop(0), "Label") + self.assertEqual(self.Obs.signal.pop(0), "DocChanged") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) + self.assertEqual(self.Obs.parameter2.pop(0), "Label") + self.assertEqual(self.Obs.signal.pop(0), "DocRelabled") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) + self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - def testDocument(self): - # in case another document already exists then the tests cannot - # be done reliably - if FreeCAD.GuiUp and FreeCAD.activeDocument(): - return - - # testing document level signals - self.Doc1 = FreeCAD.newDocument("Observer1"); - if FreeCAD.GuiUp: - self.assertEqual(self.Obs.signal.pop(0), 'DocActivated') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) - self.assertEqual(self.Obs.signal.pop(0), 'DocCreated') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) - self.assertEqual(self.Obs.signal.pop(0), 'DocBeforeChange') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) - self.assertEqual(self.Obs.parameter2.pop(0), 'Label') - self.assertEqual(self.Obs.signal.pop(0), 'DocChanged') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) - self.assertEqual(self.Obs.parameter2.pop(0), 'Label') - self.assertEqual(self.Obs.signal.pop(0), 'DocRelabled') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) - self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - - self.Doc2 = FreeCAD.newDocument("Observer2"); - if FreeCAD.GuiUp: - self.assertEqual(self.Obs.signal.pop(0), 'DocActivated') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) - self.assertEqual(self.Obs.signal.pop(0), 'DocCreated') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) - self.assertEqual(self.Obs.signal.pop(0), 'DocBeforeChange') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) - self.assertEqual(self.Obs.parameter2.pop(0), 'Label') - self.assertEqual(self.Obs.signal.pop(0), 'DocChanged') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) - self.assertEqual(self.Obs.parameter2.pop(0), 'Label') - self.assertEqual(self.Obs.signal.pop(0), 'DocRelabled') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc2) - self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - - FreeCAD.setActiveDocument('Observer1') - self.assertEqual(self.Obs.signal.pop(), 'DocActivated') - self.assertTrue(self.Obs.parameter.pop() is self.Doc1) - self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - - #undo/redo is not enabled in cmd line mode by default - self.Doc2.UndoMode = 1 - - # Must set Doc2 as active document before start transaction test. If not, - # then a transaction will be auto created inside the active document if a - # new transaction is triggered from a non active document - FreeCAD.setActiveDocument('Observer2') - self.assertEqual(self.Obs.signal.pop(), 'DocActivated') - self.assertTrue(self.Obs.parameter.pop() is self.Doc2) - self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - - self.Doc2.openTransaction('test') - # openTransaction() now only setup pending transaction, which will only be - # created when there is actual change - self.Doc2.addObject('App::FeatureTest','test') - self.assertEqual(self.Obs.signal[0], 'DocOpenTransaction') - self.assertEqual(self.Obs.signal.count('DocOpenTransaction'),1) - self.assertTrue(self.Obs.parameter[0] is self.Doc2) - self.assertEqual(self.Obs.parameter2[0], 'test') - self.Obs.clear() - - self.Doc2.commitTransaction() - self.assertEqual(self.Obs.signal.pop(), 'DocCommitTransaction') - self.assertTrue(self.Obs.parameter.pop() is self.Doc2) - self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - - self.Doc2.openTransaction('test2') - # openTransaction() now only setup pending transaction, which will only be - # created when there is actual change - self.Doc2.addObject('App::FeatureTest','test') - self.assertEqual(self.Obs.signal[0], 'DocOpenTransaction') - self.assertEqual(self.Obs.signal.count('DocOpenTransaction'),1) - self.assertTrue(self.Obs.parameter[0] is self.Doc2) - self.assertEqual(self.Obs.parameter2[0], 'test2') - # there will be other signals because of the addObject() - self.Obs.clear() - - self.Doc2.abortTransaction() - self.assertEqual(self.Obs.signal.pop(), 'DocAbortTransaction') - self.assertTrue(self.Obs.parameter.pop() is self.Doc2) - # there will be other signals because of aborting the above addObject() - self.Obs.clear() - - self.Doc2.undo() - self.assertEqual(self.Obs.signal.pop(), 'DocUndo') - self.assertTrue(self.Obs.parameter.pop() is self.Doc2) - # there will be other signals because undoing the above addObject() - self.Obs.clear() - - self.Doc2.redo() - self.assertEqual(self.Obs.signal.pop(), 'DocRedo') - self.assertTrue(self.Obs.parameter.pop() is self.Doc2) - # there will be other signals because redoing the above addObject() - self.Obs.clear() - - self.Doc1.Comment = 'test comment' - self.assertEqual(self.Obs.signal.pop(0), 'DocBeforeChange') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) - self.assertEqual(self.Obs.parameter2.pop(0), 'Comment') - self.assertEqual(self.Obs.signal.pop(0), 'DocChanged') - self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) - self.assertEqual(self.Obs.parameter2.pop(0), 'Comment') - - FreeCAD.closeDocument(self.Doc2.Name) - self.assertEqual(self.Obs.signal.pop(), 'DocDeleted') - self.assertTrue(self.Obs.parameter.pop() is self.Doc2) - if FreeCAD.GuiUp: - # only has document activated signal when running in GUI mode - self.assertEqual(self.Obs.signal.pop(), 'DocActivated') + FreeCAD.setActiveDocument("Observer1") + self.assertEqual(self.Obs.signal.pop(), "DocActivated") self.assertTrue(self.Obs.parameter.pop() is self.Doc1) - self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - FreeCAD.closeDocument(self.Doc1.Name) - self.assertEqual(self.Obs.signal.pop(), 'DocDeleted') - self.assertEqual(self.Obs.parameter.pop(), self.Doc1) - self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + # undo/redo is not enabled in cmd line mode by default + self.Doc2.UndoMode = 1 - def testObject(self): - #testing signal on object changes + # Must set Doc2 as active document before start transaction test. If not, + # then a transaction will be auto created inside the active document if a + # new transaction is triggered from a non active document + FreeCAD.setActiveDocument("Observer2") + self.assertEqual(self.Obs.signal.pop(), "DocActivated") + self.assertTrue(self.Obs.parameter.pop() is self.Doc2) + self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.Doc1 = FreeCAD.newDocument("Observer1") - self.Obs.clear() + self.Doc2.openTransaction("test") + # openTransaction() now only setup pending transaction, which will only be + # created when there is actual change + self.Doc2.addObject("App::FeatureTest", "test") + self.assertEqual(self.Obs.signal[0], "DocOpenTransaction") + self.assertEqual(self.Obs.signal.count("DocOpenTransaction"), 1) + self.assertTrue(self.Obs.parameter[0] is self.Doc2) + self.assertEqual(self.Obs.parameter2[0], "test") + self.Obs.clear() - obj = self.Doc1.addObject("App::DocumentObject","obj") - self.failUnless(self.Obs.signal.pop() == 'ObjCreated') - self.failUnless(self.Obs.parameter.pop() is obj) - #there are multiple object change signals - self.Obs.clear() + self.Doc2.commitTransaction() + self.assertEqual(self.Obs.signal.pop(), "DocCommitTransaction") + self.assertTrue(self.Obs.parameter.pop() is self.Doc2) + self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - obj.Label = "myobj" - self.failUnless(self.Obs.signal.pop(0) == 'ObjBeforeChange') - self.failUnless(self.Obs.parameter.pop(0) is obj) - self.failUnless(self.Obs.parameter2.pop(0) == "Label") - self.failUnless(self.Obs.signal.pop(0) == 'ObjChanged') - self.failUnless(self.Obs.parameter.pop(0) is obj) - self.failUnless(self.Obs.parameter2.pop(0) == "Label") - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.Doc2.openTransaction("test2") + # openTransaction() now only setup pending transaction, which will only be + # created when there is actual change + self.Doc2.addObject("App::FeatureTest", "test") + self.assertEqual(self.Obs.signal[0], "DocOpenTransaction") + self.assertEqual(self.Obs.signal.count("DocOpenTransaction"), 1) + self.assertTrue(self.Obs.parameter[0] is self.Doc2) + self.assertEqual(self.Obs.parameter2[0], "test2") + # there will be other signals because of the addObject() + self.Obs.clear() - obj.enforceRecompute() - obj.recompute() - self.failUnless(self.Obs.signal.pop(0) == 'ObjRecomputed') - self.failUnless(self.Obs.parameter.pop(0) is obj) - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.Doc2.abortTransaction() + self.assertEqual(self.Obs.signal.pop(), "DocAbortTransaction") + self.assertTrue(self.Obs.parameter.pop() is self.Doc2) + # there will be other signals because of aborting the above addObject() + self.Obs.clear() - obj.enforceRecompute() - self.Doc1.recompute() - self.failUnless(self.Obs.signal.pop(0) == 'ObjRecomputed') - self.failUnless(self.Obs.parameter.pop(0) is obj) - self.failUnless(self.Obs.signal.pop(0) == 'DocRecomputed') - self.failUnless(self.Obs.parameter.pop(0) is self.Doc1) - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.Doc2.undo() + self.assertEqual(self.Obs.signal.pop(), "DocUndo") + self.assertTrue(self.Obs.parameter.pop() is self.Doc2) + # there will be other signals because undoing the above addObject() + self.Obs.clear() - FreeCAD.ActiveDocument.removeObject(obj.Name) - self.failUnless(self.Obs.signal.pop(0) == 'ObjDeleted') - self.failUnless(self.Obs.parameter.pop(0) is obj) - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.Doc2.redo() + self.assertEqual(self.Obs.signal.pop(), "DocRedo") + self.assertTrue(self.Obs.parameter.pop() is self.Doc2) + # there will be other signals because redoing the above addObject() + self.Obs.clear() - pyobj = self.Doc1.addObject("App::FeaturePython","pyobj") - self.Obs.clear() - pyobj.addProperty("App::PropertyLength","Prop","Group","test property") - self.failUnless(self.Obs.signal.pop() == 'ObjAddDynProp') - self.failUnless(self.Obs.parameter.pop() is pyobj) - self.failUnless(self.Obs.parameter2.pop() == 'Prop') - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.Doc1.Comment = "test comment" + self.assertEqual(self.Obs.signal.pop(0), "DocBeforeChange") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) + self.assertEqual(self.Obs.parameter2.pop(0), "Comment") + self.assertEqual(self.Obs.signal.pop(0), "DocChanged") + self.assertTrue(self.Obs.parameter.pop(0) is self.Doc1) + self.assertEqual(self.Obs.parameter2.pop(0), "Comment") - pyobj.setEditorMode('Prop', ['ReadOnly']) - self.failUnless(self.Obs.signal.pop() == 'ObjChangePropEdit') - self.failUnless(self.Obs.parameter.pop() is pyobj) - self.failUnless(self.Obs.parameter2.pop() == 'Prop') - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + FreeCAD.closeDocument(self.Doc2.Name) + self.assertEqual(self.Obs.signal.pop(), "DocDeleted") + self.assertTrue(self.Obs.parameter.pop() is self.Doc2) + if FreeCAD.GuiUp: + # only has document activated signal when running in GUI mode + self.assertEqual(self.Obs.signal.pop(), "DocActivated") + self.assertTrue(self.Obs.parameter.pop() is self.Doc1) + self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - pyobj.removeProperty('Prop') - self.failUnless(self.Obs.signal.pop() == 'ObjRemoveDynProp') - self.failUnless(self.Obs.parameter.pop() is pyobj) - self.failUnless(self.Obs.parameter2.pop() == 'Prop') - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + FreeCAD.closeDocument(self.Doc1.Name) + self.assertEqual(self.Obs.signal.pop(), "DocDeleted") + self.assertEqual(self.Obs.parameter.pop(), self.Doc1) + self.assertTrue(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - pyobj.addExtension("App::GroupExtensionPython") - self.failUnless(self.Obs.signal.pop() == 'ObjDynExt') - self.failUnless(self.Obs.parameter.pop() is pyobj) - self.failUnless(self.Obs.parameter2.pop() == 'App::GroupExtensionPython') - self.failUnless(self.Obs.signal.pop(0) == 'ObjBeforeDynExt') - self.failUnless(self.Obs.parameter.pop(0) is pyobj) - self.failUnless(self.Obs.parameter2.pop(0) == 'App::GroupExtensionPython') - #a proxy property was changed, hence those events are also in the signal list - self.Obs.clear() + def testObject(self): + # testing signal on object changes - FreeCAD.closeDocument(self.Doc1.Name) - self.Obs.clear() + self.Doc1 = FreeCAD.newDocument("Observer1") + self.Obs.clear() - def testUndoDisabledDocument(self): + obj = self.Doc1.addObject("App::DocumentObject", "obj") + self.failUnless(self.Obs.signal.pop() == "ObjCreated") + self.failUnless(self.Obs.parameter.pop() is obj) + # there are multiple object change signals + self.Obs.clear() - # testing document level signals - self.Doc1 = FreeCAD.newDocument("Observer1"); - self.Doc1.UndoMode = 0 - self.Obs.clear() + obj.Label = "myobj" + self.failUnless(self.Obs.signal.pop(0) == "ObjBeforeChange") + self.failUnless(self.Obs.parameter.pop(0) is obj) + self.failUnless(self.Obs.parameter2.pop(0) == "Label") + self.failUnless(self.Obs.signal.pop(0) == "ObjChanged") + self.failUnless(self.Obs.parameter.pop(0) is obj) + self.failUnless(self.Obs.parameter2.pop(0) == "Label") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.Doc1.openTransaction('test') - self.Doc1.commitTransaction() - self.Doc1.undo() - self.Doc1.redo() - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + obj.enforceRecompute() + obj.recompute() + self.failUnless(self.Obs.signal.pop(0) == "ObjRecomputed") + self.failUnless(self.Obs.parameter.pop(0) is obj) + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - FreeCAD.closeDocument(self.Doc1.Name) - self.Obs.clear() + obj.enforceRecompute() + self.Doc1.recompute() + self.failUnless(self.Obs.signal.pop(0) == "ObjRecomputed") + self.failUnless(self.Obs.parameter.pop(0) is obj) + self.failUnless(self.Obs.signal.pop(0) == "DocRecomputed") + self.failUnless(self.Obs.parameter.pop(0) is self.Doc1) + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - def testGuiObserver(self): + FreeCAD.ActiveDocument.removeObject(obj.Name) + self.failUnless(self.Obs.signal.pop(0) == "ObjDeleted") + self.failUnless(self.Obs.parameter.pop(0) is obj) + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - if not FreeCAD.GuiUp: - return + pyobj = self.Doc1.addObject("App::FeaturePython", "pyobj") + self.Obs.clear() + pyobj.addProperty("App::PropertyLength", "Prop", "Group", "test property") + self.failUnless(self.Obs.signal.pop() == "ObjAddDynProp") + self.failUnless(self.Obs.parameter.pop() is pyobj) + self.failUnless(self.Obs.parameter2.pop() == "Prop") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - # in case another document already exists then the tests cannot - # be done reliably - if FreeCAD.activeDocument(): - return + pyobj.setEditorMode("Prop", ["ReadOnly"]) + self.failUnless(self.Obs.signal.pop() == "ObjChangePropEdit") + self.failUnless(self.Obs.parameter.pop() is pyobj) + self.failUnless(self.Obs.parameter2.pop() == "Prop") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.GuiObs = self.GuiObserver() - FreeCAD.Gui.addDocumentObserver(self.GuiObs) - self.Doc1 = FreeCAD.newDocument("Observer1"); - self.GuiDoc1 = FreeCAD.Gui.getDocument(self.Doc1.Name) - self.Obs.clear() - self.failUnless(self.GuiObs.signal.pop(0) == 'DocCreated') - self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) - self.failUnless(self.GuiObs.signal.pop(0) == 'DocActivated') - self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) - self.failUnless(self.GuiObs.signal.pop(0) == 'DocRelabled') - self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + pyobj.removeProperty("Prop") + self.failUnless(self.Obs.signal.pop() == "ObjRemoveDynProp") + self.failUnless(self.Obs.parameter.pop() is pyobj) + self.failUnless(self.Obs.parameter2.pop() == "Prop") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.Doc1.Label = "test" - self.failUnless(self.Obs.signal.pop() == 'DocRelabled') - self.failUnless(self.Obs.parameter.pop() is self.Doc1) - #not interested in the change signals - self.Obs.clear() - self.failUnless(self.GuiObs.signal.pop(0) == 'DocRelabled') - self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + pyobj.addExtension("App::GroupExtensionPython") + self.failUnless(self.Obs.signal.pop() == "ObjDynExt") + self.failUnless(self.Obs.parameter.pop() is pyobj) + self.failUnless(self.Obs.parameter2.pop() == "App::GroupExtensionPython") + self.failUnless(self.Obs.signal.pop(0) == "ObjBeforeDynExt") + self.failUnless(self.Obs.parameter.pop(0) is pyobj) + self.failUnless(self.Obs.parameter2.pop(0) == "App::GroupExtensionPython") + # a proxy property was changed, hence those events are also in the signal list + self.Obs.clear() - FreeCAD.setActiveDocument(self.Doc1.Name) - self.failUnless(self.Obs.signal.pop() == 'DocActivated') - self.failUnless(self.Obs.parameter.pop() is self.Doc1) - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(self.GuiObs.signal.pop() == 'DocActivated') - self.failUnless(self.GuiObs.parameter.pop() is self.GuiDoc1) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + FreeCAD.closeDocument(self.Doc1.Name) + self.Obs.clear() - obj = self.Doc1.addObject("App::FeaturePython","obj") - self.failUnless(self.Obs.signal.pop() == 'ObjCreated') - self.failUnless(self.Obs.parameter.pop() is obj) - #there are multiple object change signals - self.Obs.clear() - self.failUnless(self.GuiObs.signal.pop() == "ObjCreated") - self.failUnless(self.GuiObs.parameter.pop() is obj.ViewObject) + def testUndoDisabledDocument(self): - # There are object change signals, caused by sync of obj.Visibility. Same below. - self.GuiObs.clear() + # testing document level signals + self.Doc1 = FreeCAD.newDocument("Observer1") + self.Doc1.UndoMode = 0 + self.Obs.clear() - obj.ViewObject.Visibility = False - self.failUnless(self.Obs.signal.pop() == "ObjChanged") - self.failUnless(self.Obs.parameter.pop() is obj) - self.failUnless(self.Obs.parameter2.pop() == "Visibility") - self.failUnless(self.Obs.signal.pop() == "ObjBeforeChange") - self.failUnless(self.Obs.parameter.pop() is obj) - self.failUnless(self.Obs.parameter2.pop() == "Visibility") - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(self.GuiObs.signal.pop(0) == 'ObjChanged') - self.failUnless(self.GuiObs.parameter.pop(0) is obj.ViewObject) - self.failUnless(self.GuiObs.parameter2.pop(0) == "Visibility") - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + self.Doc1.openTransaction("test") + self.Doc1.commitTransaction() + self.Doc1.undo() + self.Doc1.redo() + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - obj.ViewObject.addProperty("App::PropertyLength","Prop","Group","test property") - self.failUnless(self.Obs.signal.pop() == 'ObjAddDynProp') - self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) - self.failUnless(self.Obs.parameter2.pop() == 'Prop') - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + FreeCAD.closeDocument(self.Doc1.Name) + self.Obs.clear() - obj.ViewObject.setEditorMode('Prop', ['ReadOnly']) - self.failUnless(self.Obs.signal.pop() == 'ObjChangePropEdit') - self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) - self.failUnless(self.Obs.parameter2.pop() == 'Prop') - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + def testGuiObserver(self): - obj.ViewObject.removeProperty('Prop') - self.failUnless(self.Obs.signal.pop() == 'ObjRemoveDynProp') - self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) - self.failUnless(self.Obs.parameter2.pop() == 'Prop') - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + if not FreeCAD.GuiUp: + return - self.GuiDoc1.setEdit('obj', 0) - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(self.GuiObs.signal.pop(0) == 'ObjInEdit') - self.failUnless(self.GuiObs.parameter.pop(0) is obj.ViewObject) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + # in case another document already exists then the tests cannot + # be done reliably + if FreeCAD.activeDocument(): + return - self.GuiDoc1.resetEdit() - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(self.GuiObs.signal.pop(0) == 'ObjResetEdit') - self.failUnless(self.GuiObs.parameter.pop(0) is obj.ViewObject) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + self.GuiObs = self.GuiObserver() + FreeCAD.Gui.addDocumentObserver(self.GuiObs) + self.Doc1 = FreeCAD.newDocument("Observer1") + self.GuiDoc1 = FreeCAD.Gui.getDocument(self.Doc1.Name) + self.Obs.clear() + self.failUnless(self.GuiObs.signal.pop(0) == "DocCreated") + self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) + self.failUnless(self.GuiObs.signal.pop(0) == "DocActivated") + self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) + self.failUnless(self.GuiObs.signal.pop(0) == "DocRelabled") + self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) - obj.ViewObject.addExtension("Gui::ViewProviderGroupExtensionPython") - self.failUnless(self.Obs.signal.pop() == 'ObjDynExt') - self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) - self.failUnless(self.Obs.parameter2.pop() == 'Gui::ViewProviderGroupExtensionPython') - self.failUnless(self.Obs.signal.pop() == 'ObjBeforeDynExt') - self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) - self.failUnless(self.Obs.parameter2.pop() == 'Gui::ViewProviderGroupExtensionPython') - #a proxy property was changed, hence those events are also in the signal list (but of GUI observer) - self.GuiObs.clear() + self.Doc1.Label = "test" + self.failUnless(self.Obs.signal.pop() == "DocRelabled") + self.failUnless(self.Obs.parameter.pop() is self.Doc1) + # not interested in the change signals + self.Obs.clear() + self.failUnless(self.GuiObs.signal.pop(0) == "DocRelabled") + self.failUnless(self.GuiObs.parameter.pop(0) is self.GuiDoc1) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) - vo = obj.ViewObject - FreeCAD.ActiveDocument.removeObject(obj.Name) - self.failUnless(self.Obs.signal.pop(0) == 'ObjDeleted') - self.failUnless(self.Obs.parameter.pop(0) is obj) - self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) - self.failUnless(self.GuiObs.signal.pop() == 'ObjDeleted') - self.failUnless(self.GuiObs.parameter.pop() is vo) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + FreeCAD.setActiveDocument(self.Doc1.Name) + self.failUnless(self.Obs.signal.pop() == "DocActivated") + self.failUnless(self.Obs.parameter.pop() is self.Doc1) + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless(self.GuiObs.signal.pop() == "DocActivated") + self.failUnless(self.GuiObs.parameter.pop() is self.GuiDoc1) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) - FreeCAD.closeDocument(self.Doc1.Name) - self.Obs.clear() - self.failUnless(self.GuiObs.signal.pop() == 'DocDeleted') - self.failUnless(self.GuiObs.parameter.pop() is self.GuiDoc1) - self.failUnless(not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2) + obj = self.Doc1.addObject("App::FeaturePython", "obj") + self.failUnless(self.Obs.signal.pop() == "ObjCreated") + self.failUnless(self.Obs.parameter.pop() is obj) + # there are multiple object change signals + self.Obs.clear() + self.failUnless(self.GuiObs.signal.pop() == "ObjCreated") + self.failUnless(self.GuiObs.parameter.pop() is obj.ViewObject) - FreeCAD.Gui.removeDocumentObserver(self.GuiObs) - self.GuiObs.clear() + # There are object change signals, caused by sync of obj.Visibility. Same below. + self.GuiObs.clear() + + obj.ViewObject.Visibility = False + self.failUnless(self.Obs.signal.pop() == "ObjChanged") + self.failUnless(self.Obs.parameter.pop() is obj) + self.failUnless(self.Obs.parameter2.pop() == "Visibility") + self.failUnless(self.Obs.signal.pop() == "ObjBeforeChange") + self.failUnless(self.Obs.parameter.pop() is obj) + self.failUnless(self.Obs.parameter2.pop() == "Visibility") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless(self.GuiObs.signal.pop(0) == "ObjChanged") + self.failUnless(self.GuiObs.parameter.pop(0) is obj.ViewObject) + self.failUnless(self.GuiObs.parameter2.pop(0) == "Visibility") + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + obj.ViewObject.addProperty("App::PropertyLength", "Prop", "Group", "test property") + self.failUnless(self.Obs.signal.pop() == "ObjAddDynProp") + self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) + self.failUnless(self.Obs.parameter2.pop() == "Prop") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + obj.ViewObject.setEditorMode("Prop", ["ReadOnly"]) + self.failUnless(self.Obs.signal.pop() == "ObjChangePropEdit") + self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) + self.failUnless(self.Obs.parameter2.pop() == "Prop") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + obj.ViewObject.removeProperty("Prop") + self.failUnless(self.Obs.signal.pop() == "ObjRemoveDynProp") + self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) + self.failUnless(self.Obs.parameter2.pop() == "Prop") + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + self.GuiDoc1.setEdit("obj", 0) + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless(self.GuiObs.signal.pop(0) == "ObjInEdit") + self.failUnless(self.GuiObs.parameter.pop(0) is obj.ViewObject) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + self.GuiDoc1.resetEdit() + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless(self.GuiObs.signal.pop(0) == "ObjResetEdit") + self.failUnless(self.GuiObs.parameter.pop(0) is obj.ViewObject) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + obj.ViewObject.addExtension("Gui::ViewProviderGroupExtensionPython") + self.failUnless(self.Obs.signal.pop() == "ObjDynExt") + self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) + self.failUnless(self.Obs.parameter2.pop() == "Gui::ViewProviderGroupExtensionPython") + self.failUnless(self.Obs.signal.pop() == "ObjBeforeDynExt") + self.failUnless(self.Obs.parameter.pop() is obj.ViewObject) + self.failUnless(self.Obs.parameter2.pop() == "Gui::ViewProviderGroupExtensionPython") + # a proxy property was changed, hence those events are also in the signal list (but of GUI observer) + self.GuiObs.clear() + + vo = obj.ViewObject + FreeCAD.ActiveDocument.removeObject(obj.Name) + self.failUnless(self.Obs.signal.pop(0) == "ObjDeleted") + self.failUnless(self.Obs.parameter.pop(0) is obj) + self.failUnless(not self.Obs.signal and not self.Obs.parameter and not self.Obs.parameter2) + self.failUnless(self.GuiObs.signal.pop() == "ObjDeleted") + self.failUnless(self.GuiObs.parameter.pop() is vo) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + FreeCAD.closeDocument(self.Doc1.Name) + self.Obs.clear() + self.failUnless(self.GuiObs.signal.pop() == "DocDeleted") + self.failUnless(self.GuiObs.parameter.pop() is self.GuiDoc1) + self.failUnless( + not self.GuiObs.signal and not self.GuiObs.parameter and not self.GuiObs.parameter2 + ) + + FreeCAD.Gui.removeDocumentObserver(self.GuiObs) + self.GuiObs.clear() + + def tearDown(self): + # closing doc + FreeCAD.removeDocumentObserver(self.Obs) + self.Obs.clear() + self.Obs = None - def tearDown(self): - #closing doc - FreeCAD.removeDocumentObserver(self.Obs) - self.Obs.clear() - self.Obs = None class FeatureTestColumn(unittest.TestCase): def setUp(self): @@ -2299,7 +2409,6 @@ class FeatureTestColumn(unittest.TestCase): FreeCAD.closeDocument("TestColumn") - class FeatureTestRow(unittest.TestCase): def setUp(self): doc = FreeCAD.newDocument("TestRow") @@ -2351,7 +2460,6 @@ class FeatureTestRow(unittest.TestCase): FreeCAD.closeDocument("TestRow") - class FeatureTestAbsAddress(unittest.TestCase): def setUp(self): doc = FreeCAD.newDocument("TestAbsAddress") diff --git a/src/Mod/Test/Gui/AppTestGui.cpp b/src/Mod/Test/Gui/AppTestGui.cpp index 0efb300140..8f115e0028 100644 --- a/src/Mod/Test/Gui/AppTestGui.cpp +++ b/src/Mod/Test/Gui/AppTestGui.cpp @@ -31,23 +31,37 @@ #include "UnitTestPy.h" -class ILoggerBlockerTest : public Base::ILogger +class ILoggerBlockerTest: public Base::ILogger { public: - ~ILoggerBlockerTest() override {Base::Console().DetachObserver(this);} + ~ILoggerBlockerTest() override + { + Base::Console().DetachObserver(this); + } - const char *Name() override {return "ILoggerBlockerTest";} + const char* Name() override + { + return "ILoggerBlockerTest"; + } - void flush() {buffer.str("");buffer.clear();} + void flush() + { + buffer.str(""); + buffer.clear(); + } - void SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, - Base::IntendedRecipient recipient, Base::ContentType content) override{ - (void) notifiername; - (void) msg; - (void) recipient; - (void) content; + void SendLog(const std::string& notifiername, + const std::string& msg, + Base::LogStyle level, + Base::IntendedRecipient recipient, + Base::ContentType content) override + { + (void)notifiername; + (void)msg; + (void)recipient; + (void)content; - switch(level){ + switch (level) { case Base::LogStyle::Warning: buffer << "WRN"; break; @@ -68,7 +82,8 @@ public: } } - void runSingleTest(const char* comment, std::string expectedResult) { + void runSingleTest(const char* comment, std::string expectedResult) + { Base::Console().Log(comment); flush(); Base::Console().Log("LOG"); @@ -76,8 +91,10 @@ public: Base::Console().Warning("WRN"); Base::Console().Error("ERR"); Base::Console().Critical("CMS"); - if (buffer.str() != expectedResult) - throw Py::RuntimeError("ILoggerTest: " + buffer.str() + " different from " + expectedResult); + if (buffer.str() != expectedResult) { + throw Py::RuntimeError("ILoggerTest: " + buffer.str() + " different from " + + expectedResult); + } } void runTest() @@ -89,12 +106,16 @@ public: } runSingleTest("Print all", "LOGMSGWRNERRCMS"); { - Base::ILoggerBlocker blocker("ILoggerBlockerTest", Base::ConsoleSingleton::MsgType_Err | Base::ConsoleSingleton::MsgType_Wrn); + Base::ILoggerBlocker blocker("ILoggerBlockerTest", + Base::ConsoleSingleton::MsgType_Err + | Base::ConsoleSingleton::MsgType_Wrn); runSingleTest("Error & Warning blocked", "LOGMSGCMS"); } runSingleTest("Print all", "LOGMSGWRNERRCMS"); { - Base::ILoggerBlocker blocker("ILoggerBlockerTest", Base::ConsoleSingleton::MsgType_Log | Base::ConsoleSingleton::MsgType_Txt); + Base::ILoggerBlocker blocker("ILoggerBlockerTest", + Base::ConsoleSingleton::MsgType_Log + | Base::ConsoleSingleton::MsgType_Txt); runSingleTest("Log & Message blocked", "WRNERRCMS"); } runSingleTest("Print all", "LOGMSGWRNERRCMS"); @@ -102,15 +123,21 @@ public: Base::ILoggerBlocker blocker("ILoggerBlockerTest", Base::ConsoleSingleton::MsgType_Err); runSingleTest("Nested : Error blocked", "LOGMSGWRNCMS"); { - Base::ILoggerBlocker blocker2("ILoggerBlockerTest", Base::ConsoleSingleton::MsgType_Err | Base::ConsoleSingleton::MsgType_Wrn); - runSingleTest("Nested : Warning blocked + Error (from nesting) + Error (redundancy)", "LOGMSGCMS"); + Base::ILoggerBlocker blocker2("ILoggerBlockerTest", + Base::ConsoleSingleton::MsgType_Err + | Base::ConsoleSingleton::MsgType_Wrn); + runSingleTest( + "Nested : Warning blocked + Error (from nesting) + Error (redundancy)", + "LOGMSGCMS"); } runSingleTest("Nested : Error still blocked", "LOGMSGWRNCMS"); } runSingleTest("Print all", "LOGMSGWRNERRCMS"); { Base::ILoggerBlocker blocker("ILoggerBlockerTest"); - Base::Console().SetEnabledMsgType("ILoggerBlockerTest", Base::ConsoleSingleton::MsgType_Log, true); + Base::Console().SetEnabledMsgType("ILoggerBlockerTest", + Base::ConsoleSingleton::MsgType_Log, + true); runSingleTest("Log is enabled but a warning is triggered in debug mode", "LOG"); } runSingleTest("Print all", "LOGMSGWRNERRCMS"); @@ -121,68 +148,77 @@ private: }; -namespace TestGui { -class Module : public Py::ExtensionModule +namespace TestGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("QtUnitGui") + Module() + : Py::ExtensionModule("QtUnitGui") { TestGui::UnitTestDialogPy::init_type(); - add_varargs_method("UnitTest",&Module::new_UnitTest,"UnitTest"); - add_varargs_method("setTest",&Module::setTest,"setTest"); - add_varargs_method("addTest",&Module::addTest,"addTest"); - add_varargs_method("runTest",&Module::runTest,"runTest"); - add_varargs_method("testILoggerBlocker",&Module::testILoggerBlocker,"testILoggerBlocker"); - initialize("This module is the QtUnitGui module"); // register with Python + add_varargs_method("UnitTest", &Module::new_UnitTest, "UnitTest"); + add_varargs_method("setTest", &Module::setTest, "setTest"); + add_varargs_method("addTest", &Module::addTest, "addTest"); + add_varargs_method("runTest", &Module::runTest, "runTest"); + add_varargs_method("testILoggerBlocker", &Module::testILoggerBlocker, "testILoggerBlocker"); + initialize("This module is the QtUnitGui module"); // register with Python } private: Py::Object new_UnitTest(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::asObject(new TestGui::UnitTestDialogPy()); } Py::Object setTest(const Py::Tuple& args) { - char *pstr=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "|s", &pstr)) + char* pstr = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "|s", &pstr)) { throw Py::Exception(); + } TestGui::UnitTestDialog* dlg = TestGui::UnitTestDialog::instance(); - if (pstr) + if (pstr) { dlg->setUnitTest(QString::fromLatin1(pstr)); + } dlg->show(); dlg->raise(); return Py::None(); } Py::Object addTest(const Py::Tuple& args) { - char *pstr=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "|s", &pstr)) + char* pstr = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "|s", &pstr)) { throw Py::Exception(); + } TestGui::UnitTestDialog* dlg = TestGui::UnitTestDialog::instance(); - if (pstr) + if (pstr) { dlg->addUnitTest(QString::fromLatin1(pstr)); + } dlg->show(); dlg->raise(); return Py::None(); } Py::Object runTest(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } TestGui::UnitTestDialog* dlg = TestGui::UnitTestDialog::instance(); bool success = dlg->runCurrentTest(); return Py::Boolean(success); } - Py::Object testILoggerBlocker(const Py::Tuple& args) { - (void) args; + Py::Object testILoggerBlocker(const Py::Tuple& args) + { + (void)args; ILoggerBlockerTest iltest; - Base::Console().AttachObserver(static_cast(&iltest)); + Base::Console().AttachObserver(static_cast(&iltest)); Base::Console().SetConnectionMode(Base::ConsoleSingleton::Direct); iltest.runTest(); return Py::None(); @@ -194,7 +230,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} +} // namespace TestGui void loadTestResource() { diff --git a/src/Mod/Test/Gui/PreCompiled.h b/src/Mod/Test/Gui/PreCompiled.h index 8e0550904d..d9eab9d885 100644 --- a/src/Mod/Test/Gui/PreCompiled.h +++ b/src/Mod/Test/Gui/PreCompiled.h @@ -29,9 +29,9 @@ // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning( disable : 4251 ) -# pragma warning( disable : 4503 ) -# pragma warning( disable : 4786 ) // specifier longer then 255 chars +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif // Qt Toolkit @@ -41,4 +41,4 @@ #endif //_PreComp_ -#endif // __PRECOMPILED_GUI__ +#endif // __PRECOMPILED_GUI__ diff --git a/src/Mod/Test/Gui/Resources/translations/Test.ts b/src/Mod/Test/Gui/Resources/translations/Test.ts index d91579fcea..807e6c7911 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test.ts @@ -107,7 +107,7 @@ - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -115,12 +115,12 @@ Double click on an error in the tree view to see more information about it, incl - + About FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_be.ts b/src/Mod/Test/Gui/Resources/translations/Test_be.ts index a1dd8bc5f1..b0a0203c53 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_be.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_be.ts @@ -107,7 +107,7 @@ Даведка - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -115,15 +115,15 @@ Double click on an error in the tree view to see more information about it, incl Увядзіце імя аб'екта, які пры выкліку верне TestCase. Націсніце "Запуск", і тэст пачне сваю працу. -Двойчы пстрыкніце на памылку ў дрэвы прагляду, каб паглядзець дадатковую інфармацыю аб ёй, які ўключае і трасіроўку стэка. +Двойчы пстрыкніце на памылку ў дрэвы прагляду, каб паглядзець дадатковую інфармацыю, які ўключае і трасіроўку стэка. - + About FreeCAD UnitTest Аб FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_ca.ts b/src/Mod/Test/Gui/Resources/translations/Test_ca.ts index 2f66fdffa2..206ff9abd2 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_ca.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_ca.ts @@ -107,23 +107,23 @@ Ajuda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. Double click on an error in the tree view to see more information about it, including the stack trace. Introduïu el nom d'un objecte cridable que quan es cridi retorni un TestCase. -Feu clic a 'Comença' i s'executarà el test anteriorment produït. +Feu clic a 'Comença' i s'executarà el test anteriorment produït. Feu doble clic a un error a la vista d'arbre per veure'n més informació, incloent-hi la traça de pila. - + About FreeCAD UnitTest Sobre FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_cs.ts b/src/Mod/Test/Gui/Resources/translations/Test_cs.ts index fcb9a673b5..709a5a25ca 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_cs.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_cs.ts @@ -107,7 +107,7 @@ Nápověda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Stiskněte "start" a takto vytvořený test se spustí. Dvakrát klikněte na chybu ve stromovém zobrazení pro informace o ní včetně místa chyby. - + About FreeCAD UnitTest O FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_de.ts b/src/Mod/Test/Gui/Resources/translations/Test_de.ts index 78d6585beb..95133290bd 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_de.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_de.ts @@ -107,7 +107,7 @@ Hilfe - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Drücken Sie 'start' und der somit erzeugte Test wird durchlaufen. Doppelklick auf eine Fehlermeldung in der Baumstrukturansicht zeigt mehr Informationen, einschließlich eines Stacktrace. - + About FreeCAD UnitTest Über FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_el.ts b/src/Mod/Test/Gui/Resources/translations/Test_el.ts index 7bfcf5d31e..7423b9a5c7 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_el.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_el.ts @@ -107,7 +107,7 @@ Βοήθεια - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl Κάντε διπλό κλικ σε οποιοδήποτε σφάλμα στο δενδροδιάγραμμα για να δείτε περισσότερες πληροφορίες, συμπεριλαμβανομένου του ίχνους της στοίβας. - + About FreeCAD UnitTest Σχετικά με τον Έλεγχο Μονάδων του Freecad - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_es-AR.ts b/src/Mod/Test/Gui/Resources/translations/Test_es-AR.ts index 1b7158051c..da1e4c1761 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_es-AR.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_es-AR.ts @@ -107,7 +107,7 @@ Ayuda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,16 +118,16 @@ Haga clic en 'Inicio' y se ejecutará la prueba así producida. Haga doble clic en un error en la vista de árbol para ver más información al respecto, incluido el seguimiento de la pila. - + About FreeCAD UnitTest Acerca de Unidad de Prueba FreeCAD - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. - Copyright (c) Werner Mayer + Copyright (c) Werner Mayer Unidad de Prueba FreeCAD es parte de FreeCAD y soporta escribir pruebas unitarias para los propios módulos. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_es-ES.ts b/src/Mod/Test/Gui/Resources/translations/Test_es-ES.ts index 24b0f6cc55..dcbf2fc627 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_es-ES.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_es-ES.ts @@ -107,7 +107,7 @@ Ayuda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,16 +118,16 @@ Haga clic en 'Inicio', y se llevará a cabo la prueba ya. Haga doble clic en un error en la vista de árbol para ver más información sobre él, incluyendo el seguimiento de la pila. - + About FreeCAD UnitTest Acerca de FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. - Copyright (c) Werner Mayer + Copyright (c) Werner Mayer FreeCAD UnitTest es parte de FreeCAD y soporta escribir pruebas unitarias para los propios módulos. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_eu.ts b/src/Mod/Test/Gui/Resources/translations/Test_eu.ts index 5415f05a8b..2d72aff53b 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_eu.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_eu.ts @@ -107,7 +107,7 @@ Laguntza - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -115,12 +115,12 @@ Double click on an error in the tree view to see more information about it, incl Sartu izendagarria den objektuaren izena. Deitutakoan TestCase bat itzuliko du. Klikatu 'Hasi' eta proba abiatuko da. - + About FreeCAD UnitTest FreeCAD UnitTest aplikazioari buruz - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_fi.ts b/src/Mod/Test/Gui/Resources/translations/Test_fi.ts index a88353550b..a56b9f5ffd 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_fi.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_fi.ts @@ -107,7 +107,7 @@ Helppi - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Napsauta 'alkaa', ja näin tuotettu testi suoritetaan. Kaksoisnapsauta puunäkymässä olevaa virhettä nähdäksesi lisää tietoa siitä, mukaan lukien pinottu jälki. - + About FreeCAD UnitTest Tietoja FreeCAD-yksikkötestauksesta - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_fr.ts b/src/Mod/Test/Gui/Resources/translations/Test_fr.ts index dea77d6daa..1f5b24a707 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_fr.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_fr.ts @@ -107,7 +107,7 @@ Aide - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Cliquer sur "Démarrer" et le test démarrera. Double-cliquer sur une erreur dans la vue en arborescence pour voir plus d'informations, y compris l'historique de la pile. - + About FreeCAD UnitTest À propos des tests unitaires FreeCAD - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_gl.ts b/src/Mod/Test/Gui/Resources/translations/Test_gl.ts index 13762418ab..76a3c17ff7 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_gl.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_gl.ts @@ -107,7 +107,7 @@ Axuda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -117,12 +117,12 @@ Double click on an error in the tree view to see more information about it, incl Premer dúas veces sobre un erro na visualización en árbore para ver máis información sobre el, incluíndo o seguimento de morea. - + About FreeCAD UnitTest Sobre o UnitTest do FreeCAD - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_hr.ts b/src/Mod/Test/Gui/Resources/translations/Test_hr.ts index 87596a4b36..aa0ce85eee 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_hr.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_hr.ts @@ -107,7 +107,7 @@ Pomoć - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Pritisnite 'start' i tako pokrenite test. Dvostruk pritisnite na pogrešku u prikazu stabla za više informacija o njoj, uključujući i stablo poziva. - + About FreeCAD UnitTest O FreeCAD UnitTest-u - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_hu.ts b/src/Mod/Test/Gui/Resources/translations/Test_hu.ts index 1af4022b49..a0b3ab85a4 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_hu.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_hu.ts @@ -107,27 +107,27 @@ Súgó - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. Double click on an error in the tree view to see more information about it, including the stack trace. Írja be a nevét a hívható objektumnak, amely hívásakor, visszatér egy Tesztre. -Nyomjon 'Indítás'-t, és az így készült vizsgálat futni fog. +Nyomjon 'Indítás'-t, és az így készült vizsgálat futni fog. Dupla kattintással, a fa nézeten további információkat kap, beleértve a verem-nyomkövetést. - + About FreeCAD UnitTest FreeCAD Egység-Teszt névjegye - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. - Copyright (c) Werner Mayer + Copyright (c) Werner Mayer FreeCAD UnitTest része a FreeCAD programnak és támogatja a saját modulokra a Unit tesztek írását. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_id.ts b/src/Mod/Test/Gui/Resources/translations/Test_id.ts index 821ba641af..1dc8c41aba 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_id.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_id.ts @@ -107,7 +107,7 @@ Bantuan - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Click 'start', and the test thus produced will be run. Double click on an error in the tree view to see more information about it, including the stack trace. - + About FreeCAD UnitTest Tentang FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_it.ts b/src/Mod/Test/Gui/Resources/translations/Test_it.ts index ad1b4b227c..ae5a511ee6 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_it.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_it.ts @@ -107,7 +107,7 @@ Aiuto - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -117,16 +117,16 @@ Double click on an error in the tree view to see more information about it, incl Fare doppio clic su un errore nell'albero per visualizzare maggiori informazioni, inclusa la cronologia. - + About FreeCAD UnitTest Informazioni su FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. - Copyright (c) Werner Mayer + Copyright (c) Werner Mayer FreeCAD UnitTest fa parte di FreeCAD e supporta la scrittura di Unit test per i propri moduli. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_ja.ts b/src/Mod/Test/Gui/Resources/translations/Test_ja.ts index 91271f15d2..f0ec1fd1a1 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_ja.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_ja.ts @@ -107,7 +107,7 @@ ヘルプ - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -117,12 +117,12 @@ Double click on an error in the tree view to see more information about it, incl ツリービューでエラーをダブルクリックすると、スタックトレースなどの詳細情報が表示されます。 - + About FreeCAD UnitTest FreeCAD ユニットテストについて - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_ka.ts b/src/Mod/Test/Gui/Resources/translations/Test_ka.ts index f58c036c5b..cb806dbf17 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_ka.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_ka.ts @@ -107,7 +107,7 @@ დახმარება - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl შეცდომაზე ორჯერ დაწკაპუნებით თქვენ მიიღებთ მეტ ინფორმაციას, stack trace-ის ჩათვლით. - + About FreeCAD UnitTest FreeCAD UnitTest-ის შესახებ - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_ko.ts b/src/Mod/Test/Gui/Resources/translations/Test_ko.ts index a0b091425b..ab8c81b1b8 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_ko.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_ko.ts @@ -107,7 +107,7 @@ 도움말 - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl 트리 뷰의 오류를 더블 클릭하면 스택 추적을 포함하여 더 자세한 정보를 확인할 수 있습니다 - + About FreeCAD UnitTest FreeCAD 유닛테스트에 대하여 - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_nl.ts b/src/Mod/Test/Gui/Resources/translations/Test_nl.ts index 56164e1d70..a3d26b873d 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_nl.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_nl.ts @@ -107,7 +107,7 @@ Help - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Klik op 'start' en de aldus geproduceerde test wordt uitgevoerd. Dubbelklik op een fout in de structuurweergave om meer informatie erover te zien, inclusief de stacktracering. - + About FreeCAD UnitTest Over FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_pl.ts b/src/Mod/Test/Gui/Resources/translations/Test_pl.ts index 1e7ee6efd4..5310c6d716 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_pl.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_pl.ts @@ -107,7 +107,7 @@ Pomoc - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Kliknij 'start', a utworzony w ten sposób test zostanie uruchomiony. Kliknij dwukrotnie na pozycję z błędem w widoku drzewa, aby zobaczyć więcej informacji na jego temat, w tym śledzenie stosu. - + About FreeCAD UnitTest O środowisku pracy FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_pt-BR.ts b/src/Mod/Test/Gui/Resources/translations/Test_pt-BR.ts index acbb245539..0beb642c5f 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_pt-BR.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_pt-BR.ts @@ -107,7 +107,7 @@ Ajuda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Clique em "Iniciar" e o teste produzido será executado. Clique duas vezes em um erro na exibição em árvore para ver mais informações sobre ele, incluindo o rastreamento de pilha. - + About FreeCAD UnitTest Sobre o teste de unidade do FreeCAD - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_pt-PT.ts b/src/Mod/Test/Gui/Resources/translations/Test_pt-PT.ts index 2549921da3..d1b3b44bdb 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_pt-PT.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_pt-PT.ts @@ -107,7 +107,7 @@ Ajuda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -115,12 +115,12 @@ Double click on an error in the tree view to see more information about it, incl Digite o nome de um objeto invocável que quando chamado, irá retornar um TestCase. Clique 'Iniciar' e o teste produzido será executado. Dê um duplo clique sobre um erro na exibição em árvore para ver mais informações sobre ele, incluindo a pilha de rastreamento. - + About FreeCAD UnitTest Sobre a unidade de Teste do FreeCAD - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_ro.ts b/src/Mod/Test/Gui/Resources/translations/Test_ro.ts index a088e4c331..d5ea678631 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_ro.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_ro.ts @@ -107,7 +107,7 @@ Ajutor - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Click 'start', și testul acestuia va rula Double click pe o eroare în arborele vederilor pentru a vedea mai multe informații despre aceasta, inclusiv stack trace. - + About FreeCAD UnitTest Despre FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_ru.ts b/src/Mod/Test/Gui/Resources/translations/Test_ru.ts index 1d74f960b4..07208db555 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_ru.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_ru.ts @@ -107,7 +107,7 @@ Справка - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl Сделайте двойной щелчок на ошибке в древовидном списке для дополнительной информации о ней, включая стек вызовов. - + About FreeCAD UnitTest О FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_sl.ts b/src/Mod/Test/Gui/Resources/translations/Test_sl.ts index 74b681f8d8..c40885a7eb 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_sl.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_sl.ts @@ -107,7 +107,7 @@ Pomoč - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -117,12 +117,12 @@ Double click on an error in the tree view to see more information about it, incl Da bi izvedeli več o napaki, v drevesnem prikazu dvakrat kliknite na napako in boste dobili podatke vključno s sledjo sklada. - + About FreeCAD UnitTest O FreeCAD UnitTestu - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_sr-CS.ts b/src/Mod/Test/Gui/Resources/translations/Test_sr-CS.ts index 56636d0365..8fd35d99c4 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_sr-CS.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_sr-CS.ts @@ -107,7 +107,7 @@ Pomoć - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Click 'start', and the test thus produced will be run. Double click on an error in the tree view to see more information about it, including the stack trace. - + About FreeCAD UnitTest O FreeCAD UnitTest programu - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_sr.ts b/src/Mod/Test/Gui/Resources/translations/Test_sr.ts index e5498f89cf..fff8aeb58c 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_sr.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_sr.ts @@ -107,7 +107,7 @@ Помоћ - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl Два пута кликните на грешку у прегледу стаблом да видите више информација о њему, укључујући праћење спремника. - + About FreeCAD UnitTest О FreeCAD UnitTest програму - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_sv-SE.ts b/src/Mod/Test/Gui/Resources/translations/Test_sv-SE.ts index fc032e6bc3..e1d5b0bb8e 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_sv-SE.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_sv-SE.ts @@ -107,7 +107,7 @@ Hjälp - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Klicka på 'Start', för att köra testet. Dubbelklicka på ett fel i trädvyn för att se mer information om det, inklusive anropsstacken. - + About FreeCAD UnitTest Om FreeCAD EnhetsTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_tr.ts b/src/Mod/Test/Gui/Resources/translations/Test_tr.ts index ab083f91e1..3f2bf37829 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_tr.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_tr.ts @@ -107,7 +107,7 @@ Yardım - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl Yığın iz dahil, hata hakkında daha fazla bilgi almak için unsur ağacında hatanın üzerine çift tıklayın. - + About FreeCAD UnitTest FreeCAD Birim Denemesi hakkında - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_uk.ts b/src/Mod/Test/Gui/Resources/translations/Test_uk.ts index 5983f69481..9b9f624397 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_uk.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_uk.ts @@ -107,7 +107,7 @@ Допомога - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl Зробіть подвійне клацання на помилку в деревовидному списку для додаткової інформації про неї, включаючи стек викликів. - + About FreeCAD UnitTest Про Модульний Тест FreeCAD - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_val-ES.ts b/src/Mod/Test/Gui/Resources/translations/Test_val-ES.ts index b5cd78bfd9..65d470dcd7 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_val-ES.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_val-ES.ts @@ -107,7 +107,7 @@ Ajuda - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -115,12 +115,12 @@ Double click on an error in the tree view to see more information about it, incl Introduïu el nom d'un objecte rescatable, quan es cride retornarà un TestCase. Feu clic a 'Comença' i s'executarà el test d'aquest procediment. Feu doble clic en un error en la vista en arbre per a veure'n més informació, incloent-hi el rastreig de pila. - + About FreeCAD UnitTest Quant al FreeCAD UnitTest - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_vi.ts b/src/Mod/Test/Gui/Resources/translations/Test_vi.ts index 4bc9723699..76581396e6 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_vi.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_vi.ts @@ -113,7 +113,7 @@ Click 'start', and the test thus produced will be run. Double click on an error in the tree view to see more information about it, including the stack trace. Nhập tên của một đối tượng có thể gọi được và khi đối tượng đó được gọi, nó trở lại thành một Trường hợp kiểm tra. -Nhấp chuột 'bắt đầu', sau đó bài kiểm tra được tạo sẽ hoạt động. +Nhấp chuột 'bắt đầu', sau đó bài kiểm tra được tạo sẽ hoạt động. Nhấp đúp vào một lỗi trong chế độ xem hình cây để xem thêm thông tin về nó, bao gồm cả ngăn xếp. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_zh-CN.ts b/src/Mod/Test/Gui/Resources/translations/Test_zh-CN.ts index b882e710ad..5e6c51c67a 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_zh-CN.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_zh-CN.ts @@ -107,7 +107,7 @@ 帮助 - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -115,12 +115,12 @@ Double click on an error in the tree view to see more information about it, incl 输入可调用对象的名称, 当调用时, 将返回测试用例。单击 "开始", 将运行由此生成的测试。双击树视图中的一个错误, 查看有关它的更多信息, 包括堆栈跟踪。 - + About FreeCAD UnitTest 关于FreeCAD单元测试 - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/Resources/translations/Test_zh-TW.ts b/src/Mod/Test/Gui/Resources/translations/Test_zh-TW.ts index 609f0d2280..bf909777b7 100644 --- a/src/Mod/Test/Gui/Resources/translations/Test_zh-TW.ts +++ b/src/Mod/Test/Gui/Resources/translations/Test_zh-TW.ts @@ -107,7 +107,7 @@ 説明 - + Enter the name of a callable object which, when called, will return a TestCase. Click 'start', and the test thus produced will be run. @@ -118,12 +118,12 @@ Double click on an error in the tree view to see more information about it, incl 點兩下樹狀檢視中的錯誤以查看有關它的更多資訊,包括堆棧跟踪。 - + About FreeCAD UnitTest 關於 FreeCAD 單位測試 - + Copyright (c) Werner Mayer FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for ones own modules. diff --git a/src/Mod/Test/Gui/UnitTestImp.cpp b/src/Mod/Test/Gui/UnitTestImp.cpp index 6916dd17cf..6bfed89ffd 100644 --- a/src/Mod/Test/Gui/UnitTestImp.cpp +++ b/src/Mod/Test/Gui/UnitTestImp.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -37,7 +37,7 @@ using namespace TestGui; /* TRANSLATOR TestGui::UnitTestDialog */ -UnitTestDialog* UnitTestDialog::_instance=nullptr; +UnitTestDialog* UnitTestDialog::_instance = nullptr; /** * Creates and returns the one and only instance of this dialog. @@ -45,18 +45,19 @@ UnitTestDialog* UnitTestDialog::_instance=nullptr; UnitTestDialog* UnitTestDialog::instance() { // not initialized? - if (!_instance) + if (!_instance) { _instance = new UnitTestDialog(Gui::getMainWindow()); + } return _instance; } /** * Destructs the instance of this dialog. */ -void UnitTestDialog::destruct () +void UnitTestDialog::destruct() { if (_instance) { - UnitTestDialog *pTmp = _instance; + UnitTestDialog* pTmp = _instance; _instance = nullptr; delete pTmp; } @@ -78,13 +79,13 @@ bool UnitTestDialog::hasInstance() * true to construct a modal dialog. */ UnitTestDialog::UnitTestDialog(QWidget* parent, Qt::WindowFlags f) - : QDialog(parent, f) - , ui(new Ui_UnitTest) + : QDialog(parent, f) + , ui(new Ui_UnitTest) { ui->setupUi(this); setupConnections(); - setProgressColor(QColor(40,210,43)); // a darker green + setProgressColor(QColor(40, 210, 43)); // a darker green ui->progressBar->setAlignment(Qt::AlignCenter); // red items @@ -100,15 +101,13 @@ UnitTestDialog::~UnitTestDialog() = default; void UnitTestDialog::setupConnections() { - connect(ui->treeViewFailure, &QTreeWidget::itemDoubleClicked, - this, &UnitTestDialog::onTreeViewFailureItemDoubleClicked); - connect(ui->helpButton, &QPushButton::clicked, - this, &UnitTestDialog::onHelpButtonClicked); - connect(ui->aboutButton, &QPushButton::clicked, - this, &UnitTestDialog::onAboutButtonClicked); - connect(ui->startButton, &QPushButton::clicked, - this, &UnitTestDialog::onStartButtonClicked); - + connect(ui->treeViewFailure, + &QTreeWidget::itemDoubleClicked, + this, + &UnitTestDialog::onTreeViewFailureItemDoubleClicked); + connect(ui->helpButton, &QPushButton::clicked, this, &UnitTestDialog::onHelpButtonClicked); + connect(ui->aboutButton, &QPushButton::clicked, this, &UnitTestDialog::onAboutButtonClicked); + connect(ui->startButton, &QPushButton::clicked, this, &UnitTestDialog::onStartButtonClicked); } /** @@ -116,23 +115,22 @@ void UnitTestDialog::setupConnections() */ void UnitTestDialog::setProgressColor(const QColor& col) { - QString qss = QString::fromLatin1( - "QProgressBar {\n" - " border: 2px solid grey;\n" - " border-radius: 5px;\n" - "}\n" - "\n" - "QProgressBar::chunk {\n" - " background-color: %1;\n" - "}" - ).arg(col.name()); + QString qss = QString::fromLatin1("QProgressBar {\n" + " border: 2px solid grey;\n" + " border-radius: 5px;\n" + "}\n" + "\n" + "QProgressBar::chunk {\n" + " background-color: %1;\n" + "}") + .arg(col.name()); ui->progressBar->setStyleSheet(qss); } /** * Opens a dialog to display a detailed description about the error. */ -void UnitTestDialog::onTreeViewFailureItemDoubleClicked(QTreeWidgetItem * item, int column) +void UnitTestDialog::onTreeViewFailureItemDoubleClicked(QTreeWidgetItem* item, int column) { Q_UNUSED(column); @@ -146,7 +144,7 @@ void UnitTestDialog::onTreeViewFailureItemDoubleClicked(QTreeWidgetItem * item, // truncate the visible text when it's too long if (text.count(QLatin1Char('\n')) > 20) { QStringList lines = text.split(QLatin1Char('\n')); - lines.erase(lines.begin()+20, lines.end()); + lines.erase(lines.begin() + 20, lines.end()); text = lines.join(QLatin1String("\n")); } if (text.size() > 1000) { @@ -162,11 +160,13 @@ void UnitTestDialog::onTreeViewFailureItemDoubleClicked(QTreeWidgetItem * item, */ void UnitTestDialog::onHelpButtonClicked() { - QMessageBox::information(this, tr("Help"), tr( - "Enter the name of a callable object which, when called, will return a TestCase.\n" - "Click 'start', and the test thus produced will be run.\n\n" - "Double click on an error in the tree view to see more information about it, " - "including the stack trace.")); + QMessageBox::information( + this, + tr("Help"), + tr("Enter the name of a callable object which, when called, will return a TestCase.\n" + "Click 'start', and the test thus produced will be run.\n\n" + "Double click on an error in the tree view to see more information about it, " + "including the stack trace.")); } /** @@ -174,10 +174,12 @@ void UnitTestDialog::onHelpButtonClicked() */ void UnitTestDialog::onAboutButtonClicked() { - QMessageBox::information(this, tr("About FreeCAD UnitTest"), tr( - "Copyright (c) Werner Mayer\n\n" - "FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for " - "ones own modules.")); + QMessageBox::information( + this, + tr("About FreeCAD UnitTest"), + tr("Copyright (c) Werner Mayer\n\n" + "FreeCAD UnitTest is part of FreeCAD and supports writing Unit Tests for " + "ones own modules.")); } /** @@ -186,15 +188,14 @@ void UnitTestDialog::onAboutButtonClicked() void UnitTestDialog::onStartButtonClicked() { reset(); - setProgressColor(QColor(40,210,43)); // a darker green + setProgressColor(QColor(40, 210, 43)); // a darker green ui->startButton->setDisabled(true); try { - Base::Interpreter().runString( - "import qtunittest, gc\n" - "__qt_test__=qtunittest.QtTestRunner(0,\"\")\n" - "__qt_test__.runClicked()\n" - "del __qt_test__\n" - "gc.collect()\n"); + Base::Interpreter().runString("import qtunittest, gc\n" + "__qt_test__=qtunittest.QtTestRunner(0,\"\")\n" + "__qt_test__.runClicked()\n" + "del __qt_test__\n" + "gc.collect()\n"); } catch (const Base::PyException& e) { std::string msg = e.what(); @@ -238,10 +239,10 @@ void UnitTestDialog::reset() { ui->progressBar->reset(); ui->treeViewFailure->clear(); - ui->textLabelRunCt->setText (QString::fromLatin1("0")); + ui->textLabelRunCt->setText(QString::fromLatin1("0")); ui->textLabelFailCt->setText(QString::fromLatin1("0")); - ui->textLabelErrCt->setText (QString::fromLatin1("0")); - ui->textLabelRemCt->setText (QString::fromLatin1("0")); + ui->textLabelErrCt->setText(QString::fromLatin1("0")); + ui->textLabelRemCt->setText(QString::fromLatin1("0")); } /** @@ -250,9 +251,10 @@ void UnitTestDialog::reset() void UnitTestDialog::addUnitTest(const QString& unit) { int ct = ui->comboTests->count(); - for (int i=0; icomboTests->itemText(i) == unit) + for (int i = 0; i < ct; i++) { + if (ui->comboTests->itemText(i) == unit) { return; + } } ui->comboTests->addItem(unit); @@ -264,7 +266,7 @@ void UnitTestDialog::addUnitTest(const QString& unit) void UnitTestDialog::setUnitTest(const QString& unit) { addUnitTest(unit); - for (int i=0; icomboTests->count(); i++) { + for (int i = 0; i < ui->comboTests->count(); i++) { if (ui->comboTests->itemText(i) == unit) { ui->comboTests->setCurrentIndex(i); break; @@ -318,7 +320,7 @@ void UnitTestDialog::setStatusText(const QString& text) */ void UnitTestDialog::setProgressFraction(float fraction, const QString& color) { - if (fraction==0.0f) { + if (fraction == 0.0f) { ui->progressBar->setRange(0, 100); } else { @@ -326,7 +328,7 @@ void UnitTestDialog::setProgressFraction(float fraction, const QString& color) setProgressColor(Qt::red); } - ui->progressBar->setValue((int)(100*fraction)); + ui->progressBar->setValue((int)(100 * fraction)); } } @@ -345,7 +347,7 @@ void UnitTestDialog::clearErrorList() void UnitTestDialog::insertError(const QString& failure, const QString& details) { QTreeWidgetItem* item = new QTreeWidgetItem(ui->treeViewFailure); - item->setText(0,failure); + item->setText(0, failure); item->setForeground(0, Qt::red); item->setData(0, Qt::UserRole, QVariant(details)); } diff --git a/src/Mod/Test/Gui/UnitTestImp.h b/src/Mod/Test/Gui/UnitTestImp.h index e38b907770..6343dcd861 100644 --- a/src/Mod/Test/Gui/UnitTestImp.h +++ b/src/Mod/Test/Gui/UnitTestImp.h @@ -31,10 +31,11 @@ class QTreeWidgetItem; -namespace TestGui { +namespace TestGui +{ class Ui_UnitTest; -class UnitTestDialog : public QDialog +class UnitTestDialog: public QDialog { Q_OBJECT @@ -66,7 +67,7 @@ protected: void setProgressColor(const QColor& col); private: - void onTreeViewFailureItemDoubleClicked (QTreeWidgetItem * item, int column); + void onTreeViewFailureItemDoubleClicked(QTreeWidgetItem* item, int column); void onHelpButtonClicked(); void onAboutButtonClicked(); void onStartButtonClicked(); @@ -77,8 +78,7 @@ private: static UnitTestDialog* _instance; }; -} // namespace TestGui +} // namespace TestGui -#endif // TESTGUI_UNITTESTIMP_H - +#endif // TESTGUI_UNITTESTIMP_H diff --git a/src/Mod/Test/Gui/UnitTestPy.cpp b/src/Mod/Test/Gui/UnitTestPy.cpp index 6736cca7e6..f2ec12814c 100644 --- a/src/Mod/Test/Gui/UnitTestPy.cpp +++ b/src/Mod/Test/Gui/UnitTestPy.cpp @@ -22,14 +22,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include -#include "UnitTestPy.h" #include "UnitTestImp.h" +#include "UnitTestPy.h" using namespace TestGui; @@ -44,20 +44,22 @@ void UnitTestDialogPy::init_type() behaviors().supportGetattr(); behaviors().supportSetattr(); - add_varargs_method("clearErrorList",&UnitTestDialogPy::clearErrorList,"clearErrorList"); - add_varargs_method("insertError",&UnitTestDialogPy::insertError,"insertError"); - add_varargs_method("setUnitTest",&UnitTestDialogPy::setUnitTest,"setUnitTest"); - add_varargs_method("getUnitTest",&UnitTestDialogPy::getUnitTest,"getUnitTest"); - add_varargs_method("setStatusText",&UnitTestDialogPy::setStatusText,"setStatusText"); - add_varargs_method("setProgressFraction",&UnitTestDialogPy::setProgressFrac,"setProgressFraction"); - add_varargs_method("errorDialog",&UnitTestDialogPy::errorDialog,"errorDialog"); - add_varargs_method("setRunCount",&UnitTestDialogPy::setRunCount,"setRunCount"); - add_varargs_method("setFailCount",&UnitTestDialogPy::setFailCount,"setFailCount"); - add_varargs_method("setErrorCount",&UnitTestDialogPy::setErrorCount,"setErrorCount"); - add_varargs_method("setRemainCount",&UnitTestDialogPy::setRemainCount,"setRemainCount"); - add_varargs_method("updateGUI",&UnitTestDialogPy::updateGUI,"updateGUI"); - add_varargs_method("addUnitTest",&UnitTestDialogPy::addUnitTest,"addUnitTest"); - add_varargs_method("clearUnitTests",&UnitTestDialogPy::clearUnitTests,"clearUnitTests"); + add_varargs_method("clearErrorList", &UnitTestDialogPy::clearErrorList, "clearErrorList"); + add_varargs_method("insertError", &UnitTestDialogPy::insertError, "insertError"); + add_varargs_method("setUnitTest", &UnitTestDialogPy::setUnitTest, "setUnitTest"); + add_varargs_method("getUnitTest", &UnitTestDialogPy::getUnitTest, "getUnitTest"); + add_varargs_method("setStatusText", &UnitTestDialogPy::setStatusText, "setStatusText"); + add_varargs_method("setProgressFraction", + &UnitTestDialogPy::setProgressFrac, + "setProgressFraction"); + add_varargs_method("errorDialog", &UnitTestDialogPy::errorDialog, "errorDialog"); + add_varargs_method("setRunCount", &UnitTestDialogPy::setRunCount, "setRunCount"); + add_varargs_method("setFailCount", &UnitTestDialogPy::setFailCount, "setFailCount"); + add_varargs_method("setErrorCount", &UnitTestDialogPy::setErrorCount, "setErrorCount"); + add_varargs_method("setRemainCount", &UnitTestDialogPy::setRemainCount, "setRemainCount"); + add_varargs_method("updateGUI", &UnitTestDialogPy::updateGUI, "updateGUI"); + add_varargs_method("addUnitTest", &UnitTestDialogPy::addUnitTest, "addUnitTest"); + add_varargs_method("clearUnitTests", &UnitTestDialogPy::clearUnitTests, "clearUnitTests"); } UnitTestDialogPy::UnitTestDialogPy() = default; @@ -69,30 +71,32 @@ Py::Object UnitTestDialogPy::repr() return Py::String("UnitTest"); } -Py::Object UnitTestDialogPy::getattr(const char * attr) +Py::Object UnitTestDialogPy::getattr(const char* attr) { return Py::PythonExtension::getattr(attr); } -int UnitTestDialogPy::setattr(const char * attr, const Py::Object & value) +int UnitTestDialogPy::setattr(const char* attr, const Py::Object& value) { return Py::PythonExtension::setattr(attr, value); } Py::Object UnitTestDialogPy::clearErrorList(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } UnitTestDialog::instance()->clearErrorList(); return Py::None(); } Py::Object UnitTestDialogPy::insertError(const Py::Tuple& args) { - char *failure=nullptr; - char *details=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "ss", &failure,&details)) + char* failure = nullptr; + char* details = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "ss", &failure, &details)) { throw Py::Exception(); + } UnitTestDialog::instance()->insertError(QString::fromLatin1(failure), QString::fromLatin1(details)); @@ -101,9 +105,10 @@ Py::Object UnitTestDialogPy::insertError(const Py::Tuple& args) Py::Object UnitTestDialogPy::setUnitTest(const Py::Tuple& args) { - char *pstr=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) + char* pstr = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) { throw Py::Exception(); + } UnitTestDialog::instance()->setUnitTest(QString::fromLatin1(pstr)); return Py::None(); @@ -111,16 +116,18 @@ Py::Object UnitTestDialogPy::setUnitTest(const Py::Tuple& args) Py::Object UnitTestDialogPy::getUnitTest(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::String((const char*)UnitTestDialog::instance()->getUnitTest().toLatin1()); } Py::Object UnitTestDialogPy::setStatusText(const Py::Tuple& args) { - char *pstr=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) + char* pstr = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) { throw Py::Exception(); + } UnitTestDialog::instance()->setStatusText(QString::fromLatin1(pstr)); return Py::None(); @@ -129,32 +136,37 @@ Py::Object UnitTestDialogPy::setStatusText(const Py::Tuple& args) Py::Object UnitTestDialogPy::setProgressFrac(const Py::Tuple& args) { float fraction; - char* pColor=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "f|s",&fraction, &pColor)) + char* pColor = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "f|s", &fraction, &pColor)) { throw Py::Exception(); + } - if (pColor) - UnitTestDialog::instance()->setProgressFraction(fraction,QString::fromLatin1(pColor)); - else - UnitTestDialog::instance()->setProgressFraction(fraction); + if (pColor) { + UnitTestDialog::instance()->setProgressFraction(fraction, QString::fromLatin1(pColor)); + } + else { + UnitTestDialog::instance()->setProgressFraction(fraction); + } return Py::None(); } Py::Object UnitTestDialogPy::errorDialog(const Py::Tuple& args) { - char *title=nullptr; - char *message=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "ss", &title, &message)) + char* title = nullptr; + char* message = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "ss", &title, &message)) { throw Py::Exception(); - UnitTestDialog::instance()->showErrorDialog(title,message); + } + UnitTestDialog::instance()->showErrorDialog(title, message); return Py::None(); } Py::Object UnitTestDialogPy::setRunCount(const Py::Tuple& args) { int count; - if (!PyArg_ParseTuple(args.ptr(), "i", &count)) + if (!PyArg_ParseTuple(args.ptr(), "i", &count)) { throw Py::Exception(); + } UnitTestDialog::instance()->setRunCount(count); return Py::None(); } @@ -162,8 +174,9 @@ Py::Object UnitTestDialogPy::setRunCount(const Py::Tuple& args) Py::Object UnitTestDialogPy::setFailCount(const Py::Tuple& args) { int count; - if (!PyArg_ParseTuple(args.ptr(), "i", &count)) + if (!PyArg_ParseTuple(args.ptr(), "i", &count)) { throw Py::Exception(); + } UnitTestDialog::instance()->setFailCount(count); return Py::None(); } @@ -171,8 +184,9 @@ Py::Object UnitTestDialogPy::setFailCount(const Py::Tuple& args) Py::Object UnitTestDialogPy::setErrorCount(const Py::Tuple& args) { int count; - if (!PyArg_ParseTuple(args.ptr(), "i", &count)) + if (!PyArg_ParseTuple(args.ptr(), "i", &count)) { throw Py::Exception(); + } UnitTestDialog::instance()->setErrorCount(count); return Py::None(); } @@ -180,25 +194,28 @@ Py::Object UnitTestDialogPy::setErrorCount(const Py::Tuple& args) Py::Object UnitTestDialogPy::setRemainCount(const Py::Tuple& args) { int count; - if (!PyArg_ParseTuple(args.ptr(), "i", &count)) + if (!PyArg_ParseTuple(args.ptr(), "i", &count)) { throw Py::Exception(); + } UnitTestDialog::instance()->setRemainCount(count); return Py::None(); } Py::Object UnitTestDialogPy::updateGUI(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } qApp->processEvents(QEventLoop::ExcludeUserInputEvents); return Py::None(); } Py::Object UnitTestDialogPy::addUnitTest(const Py::Tuple& args) { - char *pstr; - if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) + char* pstr; + if (!PyArg_ParseTuple(args.ptr(), "s", &pstr)) { throw Py::Exception(); + } TestGui::UnitTestDialog* dlg = TestGui::UnitTestDialog::instance(); dlg->addUnitTest(QString::fromLatin1(pstr)); @@ -207,8 +224,9 @@ Py::Object UnitTestDialogPy::addUnitTest(const Py::Tuple& args) Py::Object UnitTestDialogPy::clearUnitTests(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } UnitTestDialog::instance()->clearUnitTests(); return Py::None(); } diff --git a/src/Mod/Test/Gui/UnitTestPy.h b/src/Mod/Test/Gui/UnitTestPy.h index 649939f750..3442ff39fe 100644 --- a/src/Mod/Test/Gui/UnitTestPy.h +++ b/src/Mod/Test/Gui/UnitTestPy.h @@ -32,41 +32,40 @@ namespace TestGui { class UnitTestDialog; -class UnitTestDialogPy : public Py::PythonExtension +class UnitTestDialogPy: public Py::PythonExtension { public: - static void init_type(); // announce properties and methods + static void init_type(); // announce properties and methods UnitTestDialogPy(); ~UnitTestDialogPy() override; Py::Object repr() override; - Py::Object getattr(const char *) override; - int setattr(const char *, const Py::Object &) override; + Py::Object getattr(const char*) override; + int setattr(const char*, const Py::Object&) override; - Py::Object clearErrorList (const Py::Tuple&); - Py::Object insertError (const Py::Tuple&); - Py::Object setUnitTest (const Py::Tuple&); - Py::Object getUnitTest (const Py::Tuple&); - Py::Object setStatusText (const Py::Tuple&); - Py::Object setProgressFrac (const Py::Tuple&); - Py::Object errorDialog (const Py::Tuple&); - Py::Object setRunCount (const Py::Tuple&); - Py::Object setFailCount (const Py::Tuple&); - Py::Object setErrorCount (const Py::Tuple&); - Py::Object setRemainCount (const Py::Tuple&); - Py::Object updateGUI (const Py::Tuple&); - Py::Object addUnitTest (const Py::Tuple&); - Py::Object clearUnitTests (const Py::Tuple&); + Py::Object clearErrorList(const Py::Tuple&); + Py::Object insertError(const Py::Tuple&); + Py::Object setUnitTest(const Py::Tuple&); + Py::Object getUnitTest(const Py::Tuple&); + Py::Object setStatusText(const Py::Tuple&); + Py::Object setProgressFrac(const Py::Tuple&); + Py::Object errorDialog(const Py::Tuple&); + Py::Object setRunCount(const Py::Tuple&); + Py::Object setFailCount(const Py::Tuple&); + Py::Object setErrorCount(const Py::Tuple&); + Py::Object setRemainCount(const Py::Tuple&); + Py::Object updateGUI(const Py::Tuple&); + Py::Object addUnitTest(const Py::Tuple&); + Py::Object clearUnitTests(const Py::Tuple&); private: - using method_varargs_handler = PyObject* (*)(PyObject *_self, PyObject *_args); + using method_varargs_handler = PyObject* (*)(PyObject* _self, PyObject* _args); static method_varargs_handler pycxx_handler; - static PyObject *method_varargs_ext_handler(PyObject *_self, PyObject *_args); + static PyObject* method_varargs_ext_handler(PyObject* _self, PyObject* _args); }; -} //namespace TESTGUI_UNITTESTPY_H +} // namespace TestGui #endif - diff --git a/src/Mod/Test/Gui/qtunittest.py b/src/Mod/Test/Gui/qtunittest.py index b831bd858b..ad07e01cce 100755 --- a/src/Mod/Test/Gui/qtunittest.py +++ b/src/Mod/Test/Gui/qtunittest.py @@ -1,24 +1,24 @@ -#*************************************************************************** -#* Copyright (c) 2006 Werner Mayer * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2006 Werner Mayer * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# ***************************************************************************/ # Qt Unit test module @@ -29,7 +29,7 @@ import traceback # Cannot import this file in case Python is not prepared for Tk. # Copy the needed classes instead. -#import unittestgui +# import unittestgui import unittest import sys @@ -45,12 +45,14 @@ import string # For more details see also http://pyunit.sourceforge.net. ############################################################################## + class BaseGUITestRunner: """Subclass this class to create a GUI TestRunner that uses a specific windowing toolkit. The class takes care of running tests in the correct manner, and making callbacks to the derived class to obtain information or signal that events have occurred. """ + def __init__(self, *args, **kwargs): self.currentResult = None self.running = 0 @@ -67,7 +69,8 @@ class BaseGUITestRunner: def runClicked(self): "To be called in response to user choosing to run a test" - if self.running: return + if self.running: + return testName = self.getSelectedTestName() if not testName: self.errorDialog("Test name entry", "You must enter a test name") @@ -79,11 +82,12 @@ class BaseGUITestRunner: test = unittest.defaultTestLoader.loadTestsFromName(testName) except Exception: exc_type, exc_value, exc_tb = sys.exc_info() - #apply(traceback.print_exception,sys.exc_info()) + # apply(traceback.print_exception,sys.exc_info()) traceback.print_exception(*sys.exc_info()) - self.errorDialog("Unable to run test '%s'" % testName, - "Error loading specified test: %s, %s" % \ - (exc_type, exc_value)) + self.errorDialog( + "Unable to run test '%s'" % testName, + "Error loading specified test: %s, %s" % (exc_type, exc_value), + ) return self.currentResult = GUITestResult(self) self.totalTests = test.countTestCases() @@ -98,15 +102,17 @@ class BaseGUITestRunner: expectedFails = unexpectedSuccesses = skipped = 0 try: - results = map(len, (result.expectedFailures, - result.unexpectedSuccesses, - result.skipped)) + results = map( + len, (result.expectedFailures, result.unexpectedSuccesses, result.skipped) + ) except AttributeError: pass else: expectedFails, unexpectedSuccesses, skipped = results - self.stream.write("\n{}\nRan {} tests in {:.3}s\n\n".format("-" * 70, result.testsRun, timeTaken)) + self.stream.write( + "\n{}\nRan {} tests in {:.3}s\n\n".format("-" * 70, result.testsRun, timeTaken) + ) infos = [] if not result.wasSuccessful(): failed, errored = len(result.failures), len(result.errors) @@ -125,7 +131,6 @@ class BaseGUITestRunner: else: self.stream.write("OK\n") - def stopClicked(self): "To be called in response to user stopping the running of a test" if self.currentResult: @@ -155,7 +160,7 @@ class BaseGUITestRunner: def notifyTestFinished(self, test): """Override to indicate that a test has finished (it may already have - failed or errored)""" + failed or errored)""" pass @@ -163,6 +168,7 @@ class GUITestResult(unittest.TestResult): """A TestResult that makes callbacks to its associated GUI TestRunner. Used by BaseGUITestRunner. Need not be created directly. """ + def __init__(self, callback): unittest.TestResult.__init__(self) self.callback = callback @@ -188,6 +194,7 @@ class RollbackImporter: """This tricky little class is used to make sure that modules under test will be reloaded the next time they are imported. """ + def __init__(self): self.previousModules = sys.modules.copy() @@ -195,18 +202,17 @@ class RollbackImporter: for modname in sys.modules.keys(): if modname not in self.previousModules: # Force reload when modname next imported - del(sys.modules[modname]) + del sys.modules[modname] - -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # Subclass of BaseGUITestRunner using Qt dialog -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- class QtTestRunner(BaseGUITestRunner): - """An implementation of BaseGUITestRunner using Qt. - """ + """An implementation of BaseGUITestRunner using Qt.""" + def initGUI(self, root, initialTestName): """Set up the GUI inside the given root window. The test name entry field will be pre-filled with the given initialTestName. @@ -214,7 +220,8 @@ class QtTestRunner(BaseGUITestRunner): self.root = root # Set up values that will be tied to widgets import QtUnitGui - self.gui=QtUnitGui.UnitTest() + + self.gui = QtUnitGui.UnitTest() self.gui.setStatusText("Idle") self.runCountVar = 0 self.failCountVar = 0 @@ -229,13 +236,13 @@ class QtTestRunner(BaseGUITestRunner): return self.gui.errorDialog(title, message) def notifyRunning(self): - self.runCountVar=0 + self.runCountVar = 0 self.gui.setRunCount(0) - self.failCountVar=0 + self.failCountVar = 0 self.gui.setFailCount(0) - self.errorCountVar=0 + self.errorCountVar = 0 self.gui.setErrorCount(0) - self.remainingCountVar=self.totalTests + self.remainingCountVar = self.totalTests self.gui.setRemainCount(self.totalTests) self.errorInfo = [] self.gui.clearErrorList() @@ -250,32 +257,32 @@ class QtTestRunner(BaseGUITestRunner): self.gui.updateGUI() def notifyTestFailed(self, test, err): - self.failCountVar=self.failCountVar+1 + self.failCountVar = self.failCountVar + 1 self.gui.setFailCount(self.failCountVar) - #tracebackLines = apply(traceback.format_exception, err + (10,)) + # tracebackLines = apply(traceback.format_exception, err + (10,)) tracebackLines = traceback.format_exception(*err + (10,)) - #tracebackText = string.join(tracebackLines,'') - tracebackText = ''.join(tracebackLines) - self.gui.insertError("Failure: %s" % test,tracebackText) - self.errorInfo.append((test,err)) + # tracebackText = string.join(tracebackLines,'') + tracebackText = "".join(tracebackLines) + self.gui.insertError("Failure: %s" % test, tracebackText) + self.errorInfo.append((test, err)) self.stream.write("FAILED: {}\n{}\n".format(test, tracebackText)) def notifyTestErrored(self, test, err): - self.errorCountVar=self.errorCountVar+1 + self.errorCountVar = self.errorCountVar + 1 self.gui.setErrorCount(self.errorCountVar) - #tracebackLines = apply(traceback.format_exception, err + (10,)) + # tracebackLines = apply(traceback.format_exception, err + (10,)) tracebackLines = traceback.format_exception(*err + (10,)) - #tracebackText = string.join(tracebackLines,'') - tracebackText = ''.join(tracebackLines) - self.gui.insertError("Error: %s" % test,tracebackText) - self.errorInfo.append((test,err)) + # tracebackText = string.join(tracebackLines,'') + tracebackText = "".join(tracebackLines) + self.gui.insertError("Error: %s" % test, tracebackText) + self.errorInfo.append((test, err)) self.stream.write("{}\nERROR: {}\n{}\n{}\n".format("=" * 70, test, "-" * 70, tracebackText)) def notifyTestFinished(self, test): - self.remainingCountVar=self.remainingCountVar-1 + self.remainingCountVar = self.remainingCountVar - 1 self.gui.setRemainCount(self.remainingCountVar) - self.runCountVar=self.runCountVar+1 + self.runCountVar = self.runCountVar + 1 self.gui.setRunCount(self.runCountVar) - fractionDone = float(self.runCountVar)/float(self.totalTests) + fractionDone = float(self.runCountVar) / float(self.totalTests) fillColor = len(self.errorInfo) and "red" or "green" self.gui.setProgressFraction(fractionDone, fillColor) diff --git a/src/Mod/Test/Init.py b/src/Mod/Test/Init.py index a56f9f72ca..134e6dc946 100644 --- a/src/Mod/Test/Init.py +++ b/src/Mod/Test/Init.py @@ -1,33 +1,35 @@ -#*************************************************************************** -#* Copyright (c) 2001,2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2001,2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # FreeCAD init script of the test module # Base system tests -FreeCAD.__unit_test__ += [ "BaseTests", - "UnitTests", - "Document", - "Metadata", - "StringHasher", - "UnicodeTests", - "TestPythonSyntax" ] +FreeCAD.__unit_test__ += [ + "BaseTests", + "UnitTests", + "Document", + "Metadata", + "StringHasher", + "UnicodeTests", + "TestPythonSyntax", +] diff --git a/src/Mod/Test/InitGui.py b/src/Mod/Test/InitGui.py index b01eb68295..61fec8c7a8 100644 --- a/src/Mod/Test/InitGui.py +++ b/src/Mod/Test/InitGui.py @@ -1,80 +1,95 @@ -#*************************************************************************** -#* Copyright (c) 2002,2003 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002,2003 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Test gui init module -class TestWorkbench ( Workbench ): + +class TestWorkbench(Workbench): "Test workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Test/Resources/icons/TestWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Test/Resources/icons/TestWorkbench.svg" + ) self.__class__.MenuText = "Test Framework" self.__class__.ToolTip = "Test Framework" def Initialize(self): import TestGui - list = ["Test_Test","Test_TestAll","Test_TestDoc","Test_TestBase"] - self.appendToolbar("TestTools",list) + list = ["Test_Test", "Test_TestAll", "Test_TestDoc", "Test_TestBase"] + self.appendToolbar("TestTools", list) - menu = ["Test &Commands","TestToolsGui"] - list = ["Std_TestQM","Std_TestReloadQM","Test_Test","Test_TestAll","Test_TestDoc","Test_TestBase"] - self.appendCommandbar("TestToolsGui",list) - self.appendMenu(menu,list) + menu = ["Test &Commands", "TestToolsGui"] + list = [ + "Std_TestQM", + "Std_TestReloadQM", + "Test_Test", + "Test_TestAll", + "Test_TestDoc", + "Test_TestBase", + ] + self.appendCommandbar("TestToolsGui", list) + self.appendMenu(menu, list) - menu = ["Test &Commands","TestToolsText"] - list = ["Test_TestAllText","Test_TestDocText","Test_TestBaseText"] - self.appendCommandbar("TestToolsText",list) - self.appendMenu(menu,list) + menu = ["Test &Commands", "TestToolsText"] + list = ["Test_TestAllText", "Test_TestDocText", "Test_TestBaseText"] + self.appendCommandbar("TestToolsText", list) + self.appendMenu(menu, list) - menu = ["Test &Commands","TestToolsMenu"] + menu = ["Test &Commands", "TestToolsMenu"] list = ["Test_TestCreateMenu", "Test_TestDeleteMenu", "Test_TestWork"] - self.appendCommandbar("TestToolsMenu",list) - self.appendMenu(menu,list) + self.appendCommandbar("TestToolsMenu", list) + self.appendMenu(menu, list) - menu = ["Test &Commands","TestFeatureMenu"] + menu = ["Test &Commands", "TestFeatureMenu"] list = ["Test_InsertFeature"] - self.appendCommandbar("TestFeature",list) - self.appendMenu(menu,list) + self.appendCommandbar("TestFeature", list) + self.appendMenu(menu, list) - menu = ["Test &Commands","Progress bar"] - list = ["Std_TestProgress1", "Std_TestProgress2", "Std_TestProgress3", "Std_TestProgress4", "Std_TestProgress5"] - self.appendMenu(menu,list) + menu = ["Test &Commands", "Progress bar"] + list = [ + "Std_TestProgress1", + "Std_TestProgress2", + "Std_TestProgress3", + "Std_TestProgress4", + "Std_TestProgress5", + ] + self.appendMenu(menu, list) - menu = ["Test &Commands","Console"] + menu = ["Test &Commands", "Console"] list = ["Std_TestConsoleOutput"] - self.appendMenu(menu,list) + self.appendMenu(menu, list) - menu = ["Test &Commands","MDI"] + menu = ["Test &Commands", "MDI"] list = ["Std_MDITest1", "Std_MDITest2", "Std_MDITest3"] - self.appendMenu(menu,list) + self.appendMenu(menu, list) list = ["Std_ViewExample1", "Std_ViewExample2", "Std_ViewExample3"] - self.appendMenu("Inventor View",list) + self.appendMenu("Inventor View", list) + Gui.addWorkbench(TestWorkbench()) # Base system tests -FreeCAD.__unit_test__ += [ "Workbench", - "Menu", - "Menu.MenuDeleteCases", - "Menu.MenuCreateCases" ] +FreeCAD.__unit_test__ += ["Workbench", "Menu", "Menu.MenuDeleteCases", "Menu.MenuCreateCases"] diff --git a/src/Mod/Test/Menu.py b/src/Mod/Test/Menu.py index 5beb9f939a..12e6666e24 100644 --- a/src/Mod/Test/Menu.py +++ b/src/Mod/Test/Menu.py @@ -1,37 +1,37 @@ -#*************************************************************************** -#* Copyright (c) 2005 Werner Mayer * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#* Werner Mayer 2005 * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2005 Werner Mayer * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# * Werner Mayer 2005 * +# ***************************************************************************/ # Menu test module import FreeCAD, os, unittest, FreeCADGui -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # define the functions to test the FreeCAD base code -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- -#def suite(): +# def suite(): # suite = unittest.TestSuite() # suite.addTest(DocTestCase("DocumentProperties")) # suite.addTest(DocTestCase("DocumentLabels")) @@ -40,52 +40,51 @@ import FreeCAD, os, unittest, FreeCADGui class MenuCreateCases(unittest.TestCase): - def setUp(self): FreeCADGui.activateWorkbench("TestWorkbench") - FreeCAD.Console.PrintLog ('Setup Test menu...\n') - list = ["Test_TestAll","Test_TestDoc","Test_TestBase","Test_TestWork"] - w = FreeCADGui.getWorkbench('TestWorkbench') - w.appendMenu("TestMenu",list) + FreeCAD.Console.PrintLog("Setup Test menu...\n") + list = ["Test_TestAll", "Test_TestDoc", "Test_TestBase", "Test_TestWork"] + w = FreeCADGui.getWorkbench("TestWorkbench") + w.appendMenu("TestMenu", list) def testMenu(self): # check menu for items - FreeCAD.Console.PrintLog ('Checking Test menu...\n') - w = FreeCADGui.getWorkbench('TestWorkbench') + FreeCAD.Console.PrintLog("Checking Test menu...\n") + w = FreeCADGui.getWorkbench("TestWorkbench") list = w.listMenus() self.b = False for i in list: - if i == 'TestMenu': self.b=True - self.failUnless(self.b,"Test menu not found") + if i == "TestMenu": + self.b = True + self.failUnless(self.b, "Test menu not found") def tearDown(self): - if self.b: - FreeCAD.Console.PrintLog ('Test menu successfully added\n') - else: - FreeCAD.Console.PrintLog ('Adding Test menu failed\n') + if self.b: + FreeCAD.Console.PrintLog("Test menu successfully added\n") + else: + FreeCAD.Console.PrintLog("Adding Test menu failed\n") class MenuDeleteCases(unittest.TestCase): - def setUp(self): FreeCADGui.activateWorkbench("TestWorkbench") - FreeCAD.Console.PrintLog ('Remove Test menu...\n') - w = FreeCADGui.getWorkbench('TestWorkbench') + FreeCAD.Console.PrintLog("Remove Test menu...\n") + w = FreeCADGui.getWorkbench("TestWorkbench") w.removeMenu("TestMenu") def testMenu(self): # check menu for items - FreeCAD.Console.PrintLog ('Checking Test menu...\n') - w = FreeCADGui.getWorkbench('TestWorkbench') + FreeCAD.Console.PrintLog("Checking Test menu...\n") + w = FreeCADGui.getWorkbench("TestWorkbench") list = w.listMenus() self.b = True for i in list: - if i == 'TestMenu': self.b=False - self.failUnless(self.b==True,"Test menu still added") + if i == "TestMenu": + self.b = False + self.failUnless(self.b == True, "Test menu still added") def tearDown(self): - if self.b: - FreeCAD.Console.PrintLog ('Test menu successfully removed\n') - else: - FreeCAD.Console.PrintLog ('Removing Test menu failed\n') - + if self.b: + FreeCAD.Console.PrintLog("Test menu successfully removed\n") + else: + FreeCAD.Console.PrintLog("Removing Test menu failed\n") diff --git a/src/Mod/Test/Metadata.py b/src/Mod/Test/Metadata.py index 6e3e7ed5b0..d94d4e078b 100644 --- a/src/Mod/Test/Metadata.py +++ b/src/Mod/Test/Metadata.py @@ -28,8 +28,8 @@ import os import codecs import tempfile -class TestMetadata(unittest.TestCase): +class TestMetadata(unittest.TestCase): def setUp(self): self.test_dir = os.path.join(FreeCAD.getHomePath(), "Mod", "Test", "TestData") @@ -40,15 +40,24 @@ class TestMetadata(unittest.TestCase): except Exception: self.fail("Metadata construction from XML file failed") - with self.assertRaises(FreeCAD.Base.XMLBaseException, msg="Metadata construction from XML file with bad root node did not raise an exception"): + with self.assertRaises( + FreeCAD.Base.XMLBaseException, + msg="Metadata construction from XML file with bad root node did not raise an exception", + ): filename = os.path.join(self.test_dir, "bad_root_node.xml") md = FreeCAD.Metadata(filename) - with self.assertRaises(FreeCAD.Base.XMLBaseException, msg="Metadata construction from invalid XML file did not raise an exception"): + with self.assertRaises( + FreeCAD.Base.XMLBaseException, + msg="Metadata construction from invalid XML file did not raise an exception", + ): filename = os.path.join(self.test_dir, "bad_xml.xml") md = FreeCAD.Metadata(filename) - with self.assertRaises(FreeCAD.Base.XMLBaseException, msg="Metadata construction from XML file with invalid version did not raise an exception"): + with self.assertRaises( + FreeCAD.Base.XMLBaseException, + msg="Metadata construction from XML file with invalid version did not raise an exception", + ): filename = os.path.join(self.test_dir, "bad_version.xml") md = FreeCAD.Metadata(filename) @@ -66,7 +75,7 @@ class TestMetadata(unittest.TestCase): # Tags that are lists of elements: maintainers = md.Maintainer self.assertEqual(len(maintainers), 2) - + authors = md.Author self.assertEqual(len(authors), 3) @@ -112,9 +121,10 @@ class TestMetadata(unittest.TestCase): def test_file_path(self): # Issue 7112 try: - filename = os.path.join(tempfile.gettempdir(), b'H\xc3\xa5vard.xml'.decode("utf-8")) + filename = os.path.join(tempfile.gettempdir(), b"H\xc3\xa5vard.xml".decode("utf-8")) xmlfile = codecs.open(filename, mode="w", encoding="utf-8") - xmlfile.write(r""" + xmlfile.write( + r""" test Text @@ -125,14 +135,15 @@ class TestMetadata(unittest.TestCase): Workbench -""") +""" + ) xmlfile.close() md = FreeCAD.Metadata(filename) self.assertEqual(md.Name, "test") self.assertEqual(md.Description, "Text") self.assertEqual(md.Version, "1.0.0") except UnicodeEncodeError as e: - print ("Ignore UnicodeEncodeError in test_file_path:\n{}".format(str(e))) + print("Ignore UnicodeEncodeError in test_file_path:\n{}".format(str(e))) def test_content_item_tags(self): filename = os.path.join(self.test_dir, "content_items.xml") @@ -162,11 +173,13 @@ class TestMetadata(unittest.TestCase): elif workbench.Classname == "TestWorkbenchD": found[3] = True dependencies = workbench.Depend - expected_dependencies = {"DependencyA":{"type":"automatic","found":False}, - "InternalWorkbench":{"type":"internal","found":False}, - "AddonWorkbench":{"type":"addon","found":False}, - "PythonPackage":{"type":"python","found":False}, - "DependencyB":{"type":"automatic","found":False}} + expected_dependencies = { + "DependencyA": {"type": "automatic", "found": False}, + "InternalWorkbench": {"type": "internal", "found": False}, + "AddonWorkbench": {"type": "addon", "found": False}, + "PythonPackage": {"type": "python", "found": False}, + "DependencyB": {"type": "automatic", "found": False}, + } for dep in dependencies: self.assertTrue(dep["package"] in expected_dependencies) self.assertEqual(dep["type"], expected_dependencies[dep["package"]]["type"]) @@ -174,8 +187,9 @@ class TestMetadata(unittest.TestCase): for name, expected_dep in expected_dependencies.items(): self.assertTrue(expected_dep["found"], f"Failed to load dependency '{name}'") for f in found: - self.assertTrue(f,f"One of the expected workbenches was not found in the metadata file") - + self.assertTrue( + f, f"One of the expected workbenches was not found in the metadata file" + ) def test_last_supported_version(self): pass @@ -190,4 +204,4 @@ class TestMetadata(unittest.TestCase): pass def test_min_python_version(self): - pass \ No newline at end of file + pass diff --git a/src/Mod/Test/StringHasher.py b/src/Mod/Test/StringHasher.py index 98a82f975f..53f96d1848 100644 --- a/src/Mod/Test/StringHasher.py +++ b/src/Mod/Test/StringHasher.py @@ -1,25 +1,25 @@ # SPDX-License-Identifier: LGPL-2.1-or-later -#*************************************************************************** -#* Copyright (c) 2023 Mario Passaglia * -#* * -#* This file is part of FreeCAD. * -#* * -#* FreeCAD is free software: you can redistribute it and/or modify it * -#* under the terms of the GNU Lesser General Public License as * -#* published by the Free Software Foundation, either version 2.1 of the * -#* License, or (at your option) any later version. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, but * -#* WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * -#* Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Lesser General Public * -#* License along with FreeCAD. If not, see * -#* . * -#* * -#**************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2023 Mario Passaglia * +# * * +# * This file is part of FreeCAD. * +# * * +# * FreeCAD is free software: you can redistribute it and/or modify it * +# * under the terms of the GNU Lesser General Public License as * +# * published by the Free Software Foundation, either version 2.1 of the * +# * License, or (at your option) any later version. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, but * +# * WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# * Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Lesser General Public * +# * License along with FreeCAD. If not, see * +# * . * +# * * +# **************************************************************************/ import FreeCAD import unittest diff --git a/src/Mod/Test/TestApp.py b/src/Mod/Test/TestApp.py index 806681d258..c948bab9c9 100644 --- a/src/Mod/Test/TestApp.py +++ b/src/Mod/Test/TestApp.py @@ -1,34 +1,35 @@ -#*************************************************************************** -#* Copyright (c) 2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ import FreeCAD import sys import unittest -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # define the functions to test the FreeCAD base code -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- + def tryLoadingTest(testName): "Loads and returns testName, or a failing TestCase if unsuccessful." @@ -37,6 +38,7 @@ def tryLoadingTest(testName): return unittest.defaultTestLoader.loadTestsFromName(testName) except ImportError: + class LoadFailed(unittest.TestCase): def __init__(self, testName): # setattr() first, because TestCase ctor checks for methodName. @@ -52,6 +54,7 @@ def tryLoadingTest(testName): return LoadFailed(testName) + def All(): # Registered tests tests = FreeCAD.__unit_test__ @@ -63,6 +66,7 @@ def All(): return suite + def PrintAll(): # Registered tests tests = FreeCAD.__unit_test__ diff --git a/src/Mod/Test/TestData/bad_root_node.xml b/src/Mod/Test/TestData/bad_root_node.xml index b882beb291..19e2dccb1f 100644 --- a/src/Mod/Test/TestData/bad_root_node.xml +++ b/src/Mod/Test/TestData/bad_root_node.xml @@ -3,4 +3,4 @@ Bad root node The root node is not called "package". 1.0.0 - \ No newline at end of file + diff --git a/src/Mod/Test/TestData/bad_version.xml b/src/Mod/Test/TestData/bad_version.xml index 268e51ad1d..263b3622f6 100644 --- a/src/Mod/Test/TestData/bad_version.xml +++ b/src/Mod/Test/TestData/bad_version.xml @@ -3,4 +3,4 @@ Bad format There is no such thing as format version 2 (yet). 1.0.0 - \ No newline at end of file + diff --git a/src/Mod/Test/TestData/bad_xml.xml b/src/Mod/Test/TestData/bad_xml.xml index dcd8648962..cec451b7d1 100644 --- a/src/Mod/Test/TestData/bad_xml.xml +++ b/src/Mod/Test/TestData/bad_xml.xml @@ -2,4 +2,4 @@ Bad XML The name tag is not closed properly. - \ No newline at end of file + diff --git a/src/Mod/Test/TestData/basic_metadata.xml b/src/Mod/Test/TestData/basic_metadata.xml index b88779d39b..e81038fedf 100644 --- a/src/Mod/Test/TestData/basic_metadata.xml +++ b/src/Mod/Test/TestData/basic_metadata.xml @@ -18,4 +18,4 @@ Resources/icons/PackageIcon.svg Tag0 Tag1 - \ No newline at end of file + diff --git a/src/Mod/Test/TestData/content_items.xml b/src/Mod/Test/TestData/content_items.xml index 034705e779..6da94c45f6 100644 --- a/src/Mod/Test/TestData/content_items.xml +++ b/src/Mod/Test/TestData/content_items.xml @@ -60,5 +60,5 @@ Doesn't Really Matter - - \ No newline at end of file + + diff --git a/src/Mod/Test/TestGui.py b/src/Mod/Test/TestGui.py index 6284e52b67..a846ed3899 100644 --- a/src/Mod/Test/TestGui.py +++ b/src/Mod/Test/TestGui.py @@ -1,43 +1,47 @@ -#*************************************************************************** -#* Copyright (c) 2001,2002 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# -*- coding: utf-8 -*- +# *************************************************************************** +# * Copyright (c) 2001,2002 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # FreeCAD Part module # # Part design module # import FreeCAD modules -import FreeCAD,FreeCADGui +import FreeCAD, FreeCADGui + # import the App Test module -import TestApp #Test as Module name not possible +import TestApp # Test as Module name not possible import sys -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # define the Commands of the Test Application module -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- class TestCmd: """Opens a Qt dialog with all inserted unit tests""" + def Activated(self): import QtUnitGui + tests = FreeCAD.__unit_test__ QtUnitGui.addTest("TestApp.All") @@ -46,81 +50,115 @@ class TestCmd: QtUnitGui.addTest(test) def GetResources(self): - return {'MenuText': 'Self-test...', 'ToolTip': 'Runs a self-test to check if the application works properly'} + return { + "MenuText": "Self-test...", + "ToolTip": "Runs a self-test to check if the application works properly", + } + class TestAllCmd: "Test all commando object" + def Activated(self): import QtUnitGui + QtUnitGui.addTest("TestApp.All") QtUnitGui.setTest("TestApp.All") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', 'MenuText': 'Test all', 'ToolTip': 'Runs all tests at once (can take very long!)'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Test all", + "ToolTip": "Runs all tests at once (can take very long!)", + } + class TestDocCmd: "Document test commando object" + def Activated(self): import QtUnitGui + QtUnitGui.addTest("Document") QtUnitGui.setTest("Document") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Test Document', - 'ToolTip' : 'Test the document (creation, save, load and destruction)'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Test Document", + "ToolTip": "Test the document (creation, save, load and destruction)", + } + class TestBaseCmd: "Base test commando object" + def Activated(self): import QtUnitGui + QtUnitGui.addTest("BaseTests") QtUnitGui.setTest("BaseTests") def GetResources(self): return { - 'Pixmap' : 'Std_Tool1', - 'MenuText': 'Test base', - 'ToolTip' : 'Test the basic functions of FreeCAD' - } + "Pixmap": "Std_Tool1", + "MenuText": "Test base", + "ToolTip": "Test the basic functions of FreeCAD", + } + class TestAllTextCmd: "Test all commando object" + def Activated(self): import unittest, TestApp - unittest.TextTestRunner(stream=sys.stdout,verbosity=2).run(unittest.defaultTestLoader.loadTestsFromName("TestApp.All")) + + unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run( + unittest.defaultTestLoader.loadTestsFromName("TestApp.All") + ) def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Test all', - 'ToolTip' : 'Runs all tests at once (can take very long!)' - } + return { + "Pixmap": "Std_Tool1", + "MenuText": "Test all", + "ToolTip": "Runs all tests at once (can take very long!)", + } + class TestDocTextCmd: "Document test commando object" + def Activated(self): TestApp.TestText("Document") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Test Document', - 'ToolTip' : 'Test the document (creation, save, load and destruction)'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Test Document", + "ToolTip": "Test the document (creation, save, load and destruction)", + } + class TestBaseTextCmd: "Base test commando object" + def Activated(self): TestApp.TestText("BaseTests") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Test base', - 'ToolTip' : 'Test the basic functions of FreeCAD'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Test base", + "ToolTip": "Test the basic functions of FreeCAD", + } + class TestWorkbenchCmd: "Workbench test" + def Activated(self): - i=0 - while (i<20): + i = 0 + while i < 20: FreeCADGui.activateWorkbench("MeshWorkbench") FreeCADGui.updateGui() FreeCADGui.activateWorkbench("NoneWorkbench") @@ -128,36 +166,48 @@ class TestWorkbenchCmd: FreeCADGui.activateWorkbench("PartWorkbench") FreeCADGui.updateGui() print(i) - i=i+1 + i = i + 1 FreeCADGui.activateWorkbench("TestWorkbench") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Test workbench', - 'ToolTip' : 'Test the switching of workbenches in FreeCAD'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Test workbench", + "ToolTip": "Test the switching of workbenches in FreeCAD", + } + class TestCreateMenuCmd: "Base test commando object" + def Activated(self): TestApp.TestText("Menu.MenuCreateCases") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Add menu', - 'ToolTip' : 'Test the menu stuff of FreeCAD'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Add menu", + "ToolTip": "Test the menu stuff of FreeCAD", + } + class TestDeleteMenuCmd: "Base test commando object" + def Activated(self): TestApp.TestText("Menu.MenuDeleteCases") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Remove menu', - 'ToolTip' : 'Test the menu stuff of FreeCAD'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Remove menu", + "ToolTip": "Test the menu stuff of FreeCAD", + } + class TestInsertFeatureCmd: "Base test commando object" + def Activated(self): if FreeCAD.activeDocument() is not None: FreeCAD.activeDocument().addObject("App::FeatureTest") @@ -165,21 +215,24 @@ class TestInsertFeatureCmd: FreeCAD.PrintMessage("No active document.\n") def GetResources(self): - return {'Pixmap' : 'Std_Tool1', - 'MenuText': 'Insert a TestFeature', - 'ToolTip' : 'Insert a TestFeature in the active Document'} + return { + "Pixmap": "Std_Tool1", + "MenuText": "Insert a TestFeature", + "ToolTip": "Insert a TestFeature in the active Document", + } -#--------------------------------------------------------------------------- + +# --------------------------------------------------------------------------- # Adds the commands to the FreeCAD command manager -#--------------------------------------------------------------------------- -FreeCADGui.addCommand('Test_Test' ,TestCmd()) -FreeCADGui.addCommand('Test_TestAllText' ,TestAllTextCmd()) -FreeCADGui.addCommand('Test_TestDocText' ,TestDocTextCmd()) -FreeCADGui.addCommand('Test_TestBaseText',TestBaseTextCmd()) -FreeCADGui.addCommand('Test_TestAll' ,TestAllCmd()) -FreeCADGui.addCommand('Test_TestDoc' ,TestDocCmd()) -FreeCADGui.addCommand('Test_TestBase' ,TestBaseCmd()) -FreeCADGui.addCommand('Test_TestWork' ,TestWorkbenchCmd()) -FreeCADGui.addCommand('Test_TestCreateMenu' ,TestCreateMenuCmd()) -FreeCADGui.addCommand('Test_TestDeleteMenu' ,TestDeleteMenuCmd()) -FreeCADGui.addCommand('Test_InsertFeature' ,TestInsertFeatureCmd()) +# --------------------------------------------------------------------------- +FreeCADGui.addCommand("Test_Test", TestCmd()) +FreeCADGui.addCommand("Test_TestAllText", TestAllTextCmd()) +FreeCADGui.addCommand("Test_TestDocText", TestDocTextCmd()) +FreeCADGui.addCommand("Test_TestBaseText", TestBaseTextCmd()) +FreeCADGui.addCommand("Test_TestAll", TestAllCmd()) +FreeCADGui.addCommand("Test_TestDoc", TestDocCmd()) +FreeCADGui.addCommand("Test_TestBase", TestBaseCmd()) +FreeCADGui.addCommand("Test_TestWork", TestWorkbenchCmd()) +FreeCADGui.addCommand("Test_TestCreateMenu", TestCreateMenuCmd()) +FreeCADGui.addCommand("Test_TestDeleteMenu", TestDeleteMenuCmd()) +FreeCADGui.addCommand("Test_InsertFeature", TestInsertFeatureCmd()) diff --git a/src/Mod/Test/TestPythonSyntax.py b/src/Mod/Test/TestPythonSyntax.py index 1f9b25dc18..22b53769a0 100644 --- a/src/Mod/Test/TestPythonSyntax.py +++ b/src/Mod/Test/TestPythonSyntax.py @@ -1,25 +1,25 @@ -#*************************************************************************** -#* Copyright (c) 2018 looooo * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2018 looooo * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ import os import ast @@ -34,7 +34,7 @@ def test_python_syntax(rootdir, whitelist=None): for fn in files: kargs = {} kargs["encoding"] = "utf-8" - if (not fn in whitelist) and os.path.splitext(fn)[1] == '.py': + if (not fn in whitelist) and os.path.splitext(fn)[1] == ".py": with open(os.path.join(sub_dir, fn), **kargs) as py_file: try: ast.parse(py_file.read()) @@ -45,17 +45,23 @@ def test_python_syntax(rootdir, whitelist=None): for i, m in enumerate(log): message += str(i + 1) + " " + m + "\n" if log: - raise RuntimeError("there are some files not parse-able with the used python-interpreter" + message) + raise RuntimeError( + "there are some files not parse-able with the used python-interpreter" + message + ) else: return + class PythonSyntaxTestCase(unittest.TestCase): """ Test Case to test python syntax of all python files in FreeCAD """ + def setUp(self): self.whitelist = [] - self.whitelist += ["ap203_configuration_controlled_3d_design_of_mechanical_parts_and_assemblies_mim_lf.py"] + self.whitelist += [ + "ap203_configuration_controlled_3d_design_of_mechanical_parts_and_assemblies_mim_lf.py" + ] self.whitelist += ["automotive_design.py"] self.whitelist += ["ifc2x3.py"] self.whitelist += ["ifc4.py"] diff --git a/src/Mod/Test/UnicodeTests.py b/src/Mod/Test/UnicodeTests.py index 6d505d057c..debde6f552 100644 --- a/src/Mod/Test/UnicodeTests.py +++ b/src/Mod/Test/UnicodeTests.py @@ -1,71 +1,69 @@ # -*- coding: utf-8 -*- -#*************************************************************************** -#* Copyright (c) 2007 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2007 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Open and edit only in UTF-8 !!!!!! import FreeCAD, os, unittest, tempfile -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # define the functions to test the FreeCAD Document code -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- class UnicodeBasicCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("CreateTest") + def setUp(self): + self.Doc = FreeCAD.newDocument("CreateTest") - def testUnicodeLabel(self): - L1 = self.Doc.addObject("App::FeatureTest","Label_1") - L1.Label = u"हिन्दी" - self.failUnless(L1.Label == u"हिन्दी") + def testUnicodeLabel(self): + L1 = self.Doc.addObject("App::FeatureTest", "Label_1") + L1.Label = "हिन्दी" + self.failUnless(L1.Label == "हिन्दी") + + def tearDown(self): + # closing doc + FreeCAD.closeDocument("CreateTest") - def tearDown(self): - #closing doc - FreeCAD.closeDocument("CreateTest") class DocumentSaveRestoreCases(unittest.TestCase): - def setUp(self): - self.Doc = FreeCAD.newDocument("SaveRestoreTests") - L1 = self.Doc.addObject("App::FeatureTest","Label_1") - L1.Label = u"हिन्दी" - self.TempPath = tempfile.gettempdir() - FreeCAD.Console.PrintLog( ' Using temp path: ' + self.TempPath + '\n') - - def testSaveAndRestore(self): - # saving and restoring - SaveName = self.TempPath + os.sep + "UnicodeTest.FCStd" - self.Doc.saveAs(SaveName) - FreeCAD.closeDocument("SaveRestoreTests") - self.Doc = FreeCAD.open(SaveName) - self.failUnless(self.Doc.Label_1.Label == u"हिन्दी") - FreeCAD.closeDocument("UnicodeTest") - FreeCAD.newDocument("SaveRestoreTests") - - - def tearDown(self): - #closing doc - FreeCAD.closeDocument("SaveRestoreTests") + def setUp(self): + self.Doc = FreeCAD.newDocument("SaveRestoreTests") + L1 = self.Doc.addObject("App::FeatureTest", "Label_1") + L1.Label = "हिन्दी" + self.TempPath = tempfile.gettempdir() + FreeCAD.Console.PrintLog(" Using temp path: " + self.TempPath + "\n") + def testSaveAndRestore(self): + # saving and restoring + SaveName = self.TempPath + os.sep + "UnicodeTest.FCStd" + self.Doc.saveAs(SaveName) + FreeCAD.closeDocument("SaveRestoreTests") + self.Doc = FreeCAD.open(SaveName) + self.failUnless(self.Doc.Label_1.Label == "हिन्दी") + FreeCAD.closeDocument("UnicodeTest") + FreeCAD.newDocument("SaveRestoreTests") + def tearDown(self): + # closing doc + FreeCAD.closeDocument("SaveRestoreTests") diff --git a/src/Mod/Test/UnitTests.py b/src/Mod/Test/UnitTests.py index 575f6f5680..4c3a3003c8 100644 --- a/src/Mod/Test/UnitTests.py +++ b/src/Mod/Test/UnitTests.py @@ -1,44 +1,47 @@ # -*- coding: utf-8 -*- -#*************************************************************************** -#* Copyright (c) 2010 Juergen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2010 Juergen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ import FreeCAD import unittest import math + def tu(str): return FreeCAD.Units.Quantity(str).Value + def ts(q): return q.UserString + def ts2(q): return FreeCAD.Units.Quantity(q.UserString).UserString -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # define the functions to test the FreeCAD UnitApi code -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- def compare(x, y): @@ -49,24 +52,24 @@ class UnitBasicCases(unittest.TestCase): def setUp(self): par = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Units") dec = par.GetInt("Decimals") - self.delta = math.pow(10,-dec) + self.delta = math.pow(10, -dec) def testConversions(self): - #tu = FreeCAD.Units.translateUnit - self.assertTrue(compare(tu('10 m'), 10000.0)) - self.assertTrue(compare(tu('3/8 in'), 9.525)) - self.assertTrue(compare(tu('100 km/h'), 27777.77777777)) - self.assertTrue(compare(tu('m^2*kg*s^-3*A^-2'), 1000000.0)) - self.assertTrue(compare(tu('(m^2*kg)/(A^2*s^3)'), 1000000.0)) - self.assertTrue(compare(tu('2*pi rad'), 360.0)) - self.assertTrue(compare(tu('2*pi rad') / tu('gon'), 400.0)) - self.assertTrue(compare(tu('999 kg') / tu('1 m^3'), 0.000009999)) + # tu = FreeCAD.Units.translateUnit + self.assertTrue(compare(tu("10 m"), 10000.0)) + self.assertTrue(compare(tu("3/8 in"), 9.525)) + self.assertTrue(compare(tu("100 km/h"), 27777.77777777)) + self.assertTrue(compare(tu("m^2*kg*s^-3*A^-2"), 1000000.0)) + self.assertTrue(compare(tu("(m^2*kg)/(A^2*s^3)"), 1000000.0)) + self.assertTrue(compare(tu("2*pi rad"), 360.0)) + self.assertTrue(compare(tu("2*pi rad") / tu("gon"), 400.0)) + self.assertTrue(compare(tu("999 kg") / tu("1 m^3"), 0.000009999)) def testImperial(self): - #tu = FreeCAD.Units.translateUnit - self.assertTrue(compare(tu('3/8in'), 9.525)) - #self.assertTrue(compare(tu('1fo(3+7/16)in'),392.112500))thisgivesaparsersyntaxerror!!! - self.assertTrue(compare(tu('1\'(3+7/16)"'), 392.112500)) + # tu = FreeCAD.Units.translateUnit + self.assertTrue(compare(tu("3/8in"), 9.525)) + # self.assertTrue(compare(tu('1fo(3+7/16)in'),392.112500))thisgivesaparsersyntaxerror!!! + self.assertTrue(compare(tu("1'(3+7/16)\""), 392.112500)) psi = FreeCAD.Units.parseQuantity("1psi") mpa = psi.getValueAs("MPa").Value @@ -91,7 +94,7 @@ class UnitBasicCases(unittest.TestCase): def testDivide(self): qu1 = FreeCAD.Units.Quantity("1 m/s") qu2 = FreeCAD.Units.Quantity("m/s") - self.assertTrue(qu1/qu2, 1) + self.assertTrue(qu1 / qu2, 1) def testSchemes(self): schemes = FreeCAD.Units.listSchemas() @@ -101,20 +104,41 @@ class UnitBasicCases(unittest.TestCase): for i in range(num): t = FreeCAD.Units.schemaTranslate(psi, i) v = FreeCAD.Units.parseQuantity(t[0]).getValueAs("psi") - self.assertAlmostEqual(1, v.Value, msg="Failed with \"{0}\" scheme: {1} != 1 (delta: {2})".format(schemes[i], v.Value, self.delta), delta=self.delta) + self.assertAlmostEqual( + 1, + v.Value, + msg='Failed with "{0}" scheme: {1} != 1 (delta: {2})'.format( + schemes[i], v.Value, self.delta + ), + delta=self.delta, + ) ksi = FreeCAD.Units.parseQuantity("1ksi") for i in range(num): t = FreeCAD.Units.schemaTranslate(ksi, i) v = FreeCAD.Units.parseQuantity(t[0]).getValueAs("ksi") - self.assertAlmostEqual(1, v.Value, msg="Failed with \"{0}\" scheme: {1} != 1 (delta: {2})".format(schemes[i], v.Value, self.delta), delta=self.delta) + self.assertAlmostEqual( + 1, + v.Value, + msg='Failed with "{0}" scheme: {1} != 1 (delta: {2})'.format( + schemes[i], v.Value, self.delta + ), + delta=self.delta, + ) vacuum_permittivity = FreeCAD.Units.parseQuantity("1F/m") - vacuum_permittivity.Format = {"NumberFormat" : FreeCAD.Units.NumberFormat.Scientific} + vacuum_permittivity.Format = {"NumberFormat": FreeCAD.Units.NumberFormat.Scientific} for i in range(num): t = FreeCAD.Units.schemaTranslate(vacuum_permittivity, i) v = FreeCAD.Units.parseQuantity(t[0]).getValueAs("F/m") - self.assertAlmostEqual(1, v.Value, msg="Failed with \"{0}\" scheme: {1} != 1 (delta: {2})".format(schemes[i], v.Value, self.delta), delta=self.delta) + self.assertAlmostEqual( + 1, + v.Value, + msg='Failed with "{0}" scheme: {1} != 1 (delta: {2})'.format( + schemes[i], v.Value, self.delta + ), + delta=self.delta, + ) def testSchemeTranslation(self): quantities = [] @@ -126,33 +150,37 @@ class UnitBasicCases(unittest.TestCase): for i in quantities: q1 = getattr(FreeCAD.Units, i) q1 = FreeCAD.Units.Quantity(q1) - q1.Format = {'Precision': 16} + q1.Format = {"Precision": 16} for idx, val in enumerate(schemes): [t, amountPerUnit, unit] = FreeCAD.Units.schemaTranslate(q1, idx) try: q2 = FreeCAD.Units.Quantity(t) if math.fabs(q1.Value - q2.Value) > 0.01: - print (" {} : {} : {} : {} : {}".format(q1, q2, t, i, val).encode("utf-8").strip()) + print( + " {} : {} : {} : {} : {}".format(q1, q2, t, i, val) + .encode("utf-8") + .strip() + ) except Exception as e: - print ("{} : {} : {} : {}".format(q1, i, val, e).encode("utf-8").strip()) + print("{} : {} : {} : {}".format(q1, i, val, e).encode("utf-8").strip()) def testVoltage(self): q1 = FreeCAD.Units.Quantity("1e20 V") - t = FreeCAD.Units.schemaTranslate(q1, 0) # Standard + t = FreeCAD.Units.schemaTranslate(q1, 0) # Standard q2 = FreeCAD.Units.Quantity(t[0]) self.assertAlmostEqual(q1.Value, q2.Value, delta=self.delta) def testEnergy(self): q1 = FreeCAD.Units.Quantity("1e20 J") - t = FreeCAD.Units.schemaTranslate(q1, 0) # Standard + t = FreeCAD.Units.schemaTranslate(q1, 0) # Standard q2 = FreeCAD.Units.Quantity(t[0]) self.assertAlmostEqual(q1.Value, q2.Value, delta=self.delta) def testTrigonometric(self): - #tu=FreeCAD.Units.translateUnit - self.assertTrue(compare(tu('sin(pi)'), math.sin(math.pi))) - self.assertTrue(compare(tu('cos(pi)'), math.cos(math.pi))) - self.assertTrue(compare(tu('tan(pi)'), math.tan(math.pi))) + # tu=FreeCAD.Units.translateUnit + self.assertTrue(compare(tu("sin(pi)"), math.sin(math.pi))) + self.assertTrue(compare(tu("cos(pi)"), math.cos(math.pi))) + self.assertTrue(compare(tu("tan(pi)"), math.tan(math.pi))) def testQuantity(self): length = FreeCAD.Units.Quantity(1, "m") @@ -160,34 +188,34 @@ class UnitBasicCases(unittest.TestCase): self.assertEqual(length.Unit, FreeCAD.Units.Length) def testToString(self): - value = FreeCAD.Units.toNumber(1023, 'g', 2) + value = FreeCAD.Units.toNumber(1023, "g", 2) self.assertEqual(float(value), 1000) - value = FreeCAD.Units.toNumber(1023, 'g', 3) + value = FreeCAD.Units.toNumber(1023, "g", 3) self.assertEqual(float(value), 1020) - value = FreeCAD.Units.toNumber(1023, 'f', 2) + value = FreeCAD.Units.toNumber(1023, "f", 2) self.assertEqual(float(value), 1023) - value = FreeCAD.Units.toNumber(1023, 'e', 1) + value = FreeCAD.Units.toNumber(1023, "e", 1) self.assertEqual(float(value), 1000) - value = FreeCAD.Units.toNumber(1023, 'e', 2) + value = FreeCAD.Units.toNumber(1023, "e", 2) self.assertEqual(float(value), 1020) - value = FreeCAD.Units.toNumber(1023, 'e', 3) + value = FreeCAD.Units.toNumber(1023, "e", 3) self.assertEqual(float(value), 1023) q = FreeCAD.Units.Quantity("1023") - value = FreeCAD.Units.toNumber(q, 'f', 2) + value = FreeCAD.Units.toNumber(q, "f", 2) self.assertEqual(float(value), 1023) with self.assertRaises(TypeError): - FreeCAD.Units.toNumber("1023", 'g', 2) + FreeCAD.Units.toNumber("1023", "g", 2) with self.assertRaises(ValueError): - FreeCAD.Units.toNumber(1023, 'gg', 2) + FreeCAD.Units.toNumber(1023, "gg", 2) with self.assertRaises(ValueError): - FreeCAD.Units.toNumber(1023, 's', 2) + FreeCAD.Units.toNumber(1023, "s", 2) def testIssue6735(self): FreeCAD.Units.Quantity("1400.0 N/mm^2") diff --git a/src/Mod/Test/Workbench.py b/src/Mod/Test/Workbench.py index d6807ce50d..6890b5bf4c 100755 --- a/src/Mod/Test/Workbench.py +++ b/src/Mod/Test/Workbench.py @@ -1,25 +1,26 @@ -#*************************************************************************** -#* Copyright (c) 2006 Werner Mayer * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# -*- coding: utf-8 -*- +# *************************************************************************** +# * Copyright (c) 2006 Werner Mayer * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Workbench test module @@ -29,58 +30,69 @@ import tempfile from PySide import QtWidgets, QtCore from PySide.QtWidgets import QApplication + class CallableCheckWarning: def __call__(self): diag = QApplication.activeModalWidget() - if (diag): - QtCore.QTimer.singleShot(0, diag, QtCore.SLOT('accept()')) + if diag: + QtCore.QTimer.singleShot(0, diag, QtCore.SLOT("accept()")) + class WorkbenchTestCase(unittest.TestCase): def setUp(self): self.Active = FreeCADGui.activeWorkbench() FreeCAD.Console.PrintLog(FreeCADGui.activeWorkbench().name()) - + def testActivate(self): - wbs=FreeCADGui.listWorkbenches() + wbs = FreeCADGui.listWorkbenches() # this gives workbenches a possibility to detect that we're under test environment FreeCAD.TestEnvironment = True for i in wbs: try: - print ("Activate workbench '{}'".format(i)) + print("Activate workbench '{}'".format(i)) cobj = CallableCheckWarning() QtCore.QTimer.singleShot(500, cobj) success = FreeCADGui.activateWorkbench(i) - FreeCAD.Console.PrintLog("Active: "+FreeCADGui.activeWorkbench().name()+ " Expected: "+i+"\n") + FreeCAD.Console.PrintLog( + "Active: " + FreeCADGui.activeWorkbench().name() + " Expected: " + i + "\n" + ) self.assertTrue(success, "Test on activating workbench {0} failed".format(i)) except Exception as e: self.fail("Loading of workbench '{0}' failed: {1}".format(i, e)) del FreeCAD.TestEnvironment - + def testHandler(self): import __main__ + class UnitWorkbench(__main__.Workbench): MenuText = "Unittest" ToolTip = "Unittest" + def Initialize(self): cmds = ["Test_Test"] - self.appendToolbar("My Unittest",cmds) + self.appendToolbar("My Unittest", cmds) + def GetClassName(self): return "Gui::PythonWorkbench" FreeCADGui.addWorkbench(UnitWorkbench()) - wbs=FreeCADGui.listWorkbenches() + wbs = FreeCADGui.listWorkbenches() self.failUnless("UnitWorkbench" in wbs, "Test on adding workbench handler failed") FreeCADGui.activateWorkbench("UnitWorkbench") FreeCADGui.updateGui() - self.failUnless(FreeCADGui.activeWorkbench().name()=="UnitWorkbench", "Test on loading workbench 'Unittest' failed") + self.failUnless( + FreeCADGui.activeWorkbench().name() == "UnitWorkbench", + "Test on loading workbench 'Unittest' failed", + ) FreeCADGui.removeWorkbench("UnitWorkbench") - wbs=FreeCADGui.listWorkbenches() + wbs = FreeCADGui.listWorkbenches() self.failUnless(not "UnitWorkbench" in wbs, "Test on removing workbench handler failed") def testInvalidType(self): class MyExtWorkbench(FreeCADGui.Workbench): def Initialize(self): pass + def GetClassName(self): return "App::Extension" @@ -93,6 +105,7 @@ class WorkbenchTestCase(unittest.TestCase): FreeCADGui.activateWorkbench(self.Active.name()) FreeCAD.Console.PrintLog(self.Active.name()) + class CommandTestCase(unittest.TestCase): def testPR6889(self): # Fixes a crash @@ -106,13 +119,16 @@ class CommandTestCase(unittest.TestCase): cmd = FreeCADGui.Command.get(name) cmd.run() + class TestNavigationStyle(unittest.TestCase): def setUp(self): self.Doc = FreeCAD.newDocument("CreateTest") def testInvalidStyle(self): FreeCADGui.getDocument(self.Doc).ActiveView.setNavigationType("App::Extension") - self.assertNotEqual(FreeCADGui.getDocument(self.Doc).ActiveView.getNavigationType(), "App::Extension") + self.assertNotEqual( + FreeCADGui.getDocument(self.Doc).ActiveView.getNavigationType(), "App::Extension" + ) def tearDown(self): FreeCAD.closeDocument("CreateTest") diff --git a/src/Mod/Test/__init__.py b/src/Mod/Test/__init__.py index 60247201e2..b929969e9f 100644 --- a/src/Mod/Test/__init__.py +++ b/src/Mod/Test/__init__.py @@ -1,9 +1,11 @@ import unittest + def runTestsFromClass(test_case_class, verbosity=2): suite = unittest.TestLoader().loadTestsFromTestCase(test_case_class) unittest.TextTestRunner(verbosity=verbosity).run(suite) + def runTestsFromModule(test_module, verbosity=2): suite = unittest.TestLoader().loadTestsFromModule(test_module) unittest.TextTestRunner(verbosity=verbosity).run(suite) diff --git a/src/Mod/Test/test.dox b/src/Mod/Test/test.dox index cdc546a174..0a141ea57d 100644 --- a/src/Mod/Test/test.dox +++ b/src/Mod/Test/test.dox @@ -5,4 +5,3 @@ See \ref src/Mod/Draft/draft.dox for example on how to populate a .dox file. */ - diff --git a/src/Mod/Test/testPathArray.py b/src/Mod/Test/testPathArray.py index 327748e45c..d99377d3c8 100644 --- a/src/Mod/Test/testPathArray.py +++ b/src/Mod/Test/testPathArray.py @@ -1,27 +1,27 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#*************************************************************************** -#* Copyright (c) 2013 WandererFan * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2013 WandererFan * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Tester for Draft makePathArray - shapes on a path - without subelements (see testPathArraySel.py) # Usage: in FC gui, select a "shape" document object (sphere, box, etc) (!!select in @@ -34,11 +34,11 @@ import Part import Draft print("testPathArray started") -items = 4 # count -centretrans = FreeCAD.Vector(0,0,0) # no translation -#centretrans = FreeCAD.Vector(-5,-5,0) # translation -orient = True # align to curve -#orient = False # don't align to curve +items = 4 # count +centretrans = FreeCAD.Vector(0, 0, 0) # no translation +# centretrans = FreeCAD.Vector(-5,-5,0) # translation +orient = True # align to curve +# orient = False # don't align to curve s = FreeCADGui.Selection.getSelection() print("testPathArray: Objects in selection: ", len(s)) @@ -48,7 +48,7 @@ base = s[0] path = s[1] pathsubs = [] -#o = Draft.makePathArray(base,path,items) # test with defaults -o = Draft.makePathArray(base,path,items,centretrans,orient,pathsubs) # test with non-defaults +# o = Draft.makePathArray(base,path,items) # test with defaults +o = Draft.makePathArray(base, path, items, centretrans, orient, pathsubs) # test with non-defaults print("testPathArray ended") diff --git a/src/Mod/Test/testPathArraySel.py b/src/Mod/Test/testPathArraySel.py index 9cfbd572be..91a07b8ae0 100644 --- a/src/Mod/Test/testPathArraySel.py +++ b/src/Mod/Test/testPathArraySel.py @@ -1,27 +1,27 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -#*************************************************************************** -#* Copyright (c) 2013 WandererFan * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Library General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2013 WandererFan * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Library General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # Tester for Draft makePathArray - shapes on a path - with selected subobjects # Usage: in FC gui, select a "shape" document object (sphere, box, etc) (!select in @@ -33,20 +33,20 @@ import Part import Draft print("testPathArray started") -items = 4 # count -centretrans = FreeCAD.Vector(0,0,0) # translation -#centretrans = FreeCAD.Vector(10,10,10) # translation -orient = True # align to curve -#orient = False # don't align to curve +items = 4 # count +centretrans = FreeCAD.Vector(0, 0, 0) # translation +# centretrans = FreeCAD.Vector(10,10,10) # translation +orient = True # align to curve +# orient = False # don't align to curve # use this to test w/ path subelements s = FreeCADGui.Selection.getSelectionEx() for o in s: - print("Selection: ", o.ObjectName) - for name in o.SubElementNames: - print(" name: ", name) - for obj in o.SubObjects: - print(" object: ",obj) + print("Selection: ", o.ObjectName) + for name in o.SubElementNames: + print(" name: ", name) + for obj in o.SubObjects: + print(" object: ", obj) print("testPathArray: Objects in selection: ", len(s)) base = s[0].Object @@ -54,7 +54,9 @@ path = s[1].Object pathsubs = list(s[1].SubElementNames) print("testPathArray: pathsubs: ", pathsubs) -#o = Draft.makePathArray(base,path,items) # test with defaults -o = Draft.makePathArray(base,path,items,centretrans,orient,pathsubs) # test w/o orienting shapes +# o = Draft.makePathArray(base,path,items) # test with defaults +o = Draft.makePathArray( + base, path, items, centretrans, orient, pathsubs +) # test w/o orienting shapes print("testPathArray ended") diff --git a/src/Mod/Test/testmakeWireString.py b/src/Mod/Test/testmakeWireString.py index a378f1b6ab..a1f5ab016b 100644 --- a/src/Mod/Test/testmakeWireString.py +++ b/src/Mod/Test/testmakeWireString.py @@ -35,35 +35,35 @@ print("testWire started") # test strings # if string contains funky characters, it has to be declared as Unicode or it # turns into the default encoding (usually utf8). FT2 doesn't do utf8. -#String = 'Wide WMA_' # wide glyphs for tracking -#String = 'Big' -#String = u'ecAnO' # UCS-2 w/ only ASCII -#String = u'ucs2uéçÄñØ' # UCS-2 -#String = 'utf8!uéçÄñØ' # UTF-8 -#String = 'abcdefghijklmnopqrstuvwxyz0123456789' -#String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' -#String = 'Big Daddy' # white space -#String = 'AVWAIXA.V' # kerning -String = 'FreeCAD' # ASCII +# String = 'Wide WMA_' # wide glyphs for tracking +# String = 'Big' +# String = u'ecAnO' # UCS-2 w/ only ASCII +# String = u'ucs2uéçÄñØ' # UCS-2 +# String = 'utf8!uéçÄñØ' # UTF-8 +# String = 'abcdefghijklmnopqrstuvwxyz0123456789' +# String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' +# String = 'Big Daddy' # white space +# String = 'AVWAIXA.V' # kerning +String = "FreeCAD" # ASCII -#FontPath = '/usr/share/fonts/truetype/msttcorefonts/' -#FontName = 'Times_New_Roman_Italic.ttf' -FontPath = '/usr/share/fonts/truetype/msttcorefonts/' -FontName = 'Arial.ttf' -#FontName = 'NOTArial.ttf' # font file not found error -#FontPath = '/usr/share/fonts/truetype/msttcorefonts/' -#FontName = 'ariali.ttf' # symlink to ttf -#FontPath = '/usr/share/fonts/truetype/' -#FontName = 'Peterbuilt.ttf' # overlapping script font -#FontPath = '/usr/share/fonts/truetype/' -#FontName = 'dyspepsia.ttf' # overlapping script font # :) +# FontPath = '/usr/share/fonts/truetype/msttcorefonts/' +# FontName = 'Times_New_Roman_Italic.ttf' +FontPath = "/usr/share/fonts/truetype/msttcorefonts/" +FontName = "Arial.ttf" +# FontName = 'NOTArial.ttf' # font file not found error +# FontPath = '/usr/share/fonts/truetype/msttcorefonts/' +# FontName = 'ariali.ttf' # symlink to ttf +# FontPath = '/usr/share/fonts/truetype/' +# FontName = 'Peterbuilt.ttf' # overlapping script font +# FontPath = '/usr/share/fonts/truetype/' +# FontName = 'dyspepsia.ttf' # overlapping script font # :) -Height = 2000 # out string height FCunits -Track = 0 # intercharacter spacing +Height = 2000 # out string height FCunits +Track = 0 # intercharacter spacing print("testWire.py input String contains ", len(String), " characters.") -s = Part.makeWireString(String,FontPath,FontName,Height,Track) +s = Part.makeWireString(String, FontPath, FontName, Height, Track) print("returned from makeWireString") print("testWire.py output contains ", len(s), " WireChars.") diff --git a/src/Mod/Test/unittestgui.py b/src/Mod/Test/unittestgui.py index 0a18f84254..945b1f7a7b 100755 --- a/src/Mod/Test/unittestgui.py +++ b/src/Mod/Test/unittestgui.py @@ -40,12 +40,14 @@ import string # GUI framework classes ############################################################################## + class BaseGUITestRunner: """Subclass this class to create a GUI TestRunner that uses a specific windowing toolkit. The class takes care of running tests in the correct manner, and making callbacks to the derived class to obtain information or signal that events have occurred. """ + def __init__(self, *args, **kwargs): self.currentResult = None self.running = 0 @@ -62,7 +64,8 @@ class BaseGUITestRunner: def runClicked(self): "To be called in response to user choosing to run a test" - if self.running: return + if self.running: + return testName = self.getSelectedTestName() if not testName: self.errorDialog("Test name entry", "You must enter a test name") @@ -75,9 +78,10 @@ class BaseGUITestRunner: except Exception: exc_type, exc_value, exc_tb = sys.exc_info() traceback.print_exception(*sys.exc_info()) - self.errorDialog("Unable to run test '%s'" % testName, - "Error loading specified test: %s, %s" % \ - (exc_type, exc_value)) + self.errorDialog( + "Unable to run test '%s'" % testName, + "Error loading specified test: %s, %s" % (exc_type, exc_value), + ) return self.currentResult = GUITestResult(self) self.totalTests = test.countTestCases() @@ -116,7 +120,7 @@ class BaseGUITestRunner: def notifyTestFinished(self, test): """Override to indicate that a test has finished (it may already have - failed or errored)""" + failed or errored)""" pass @@ -124,6 +128,7 @@ class GUITestResult(unittest.TestResult): """A TestResult that makes callbacks to its associated GUI TestRunner. Used by BaseGUITestRunner. Need not be created directly. """ + def __init__(self, callback): unittest.TestResult.__init__(self) self.callback = callback @@ -149,21 +154,22 @@ class RollbackImporter: """This tricky little class is used to make sure that modules under test will be reloaded the next time they are imported. """ + def __init__(self): self.previousModules = sys.modules.copy() - + def rollbackImports(self): for modname in sys.modules.keys(): if modname not in self.previousModules: # Force reload when modname next imported - del(sys.modules[modname]) + del sys.modules[modname] ############################################################################## # Tkinter GUI ############################################################################## -_ABOUT_TEXT="""\ +_ABOUT_TEXT = """\ PyUnit unit testing framework. For more information, visit @@ -172,7 +178,7 @@ http://pyunit.sourceforge.net/ Copyright (c) 2000 Steve Purcell """ -_HELP_TEXT="""\ +_HELP_TEXT = """\ Enter the name of a callable object which, when called, will return a \ TestCase or TestSuite. Click 'start', and the test thus produced will be run. @@ -184,9 +190,10 @@ http://pyunit.sourceforge.net/ or see the bundled documentation """ + class TkTestRunner(BaseGUITestRunner): - """An implementation of BaseGUITestRunner using Tkinter. - """ + """An implementation of BaseGUITestRunner using Tkinter.""" + def initGUI(self, root, initialTestName): """Set up the GUI inside the given root window. The test name entry field will be pre-filled with the given initialTestName. @@ -207,7 +214,7 @@ class TkTestRunner(BaseGUITestRunner): def createWidgets(self): """Creates and packs the various widgets. - + Why is it that GUI code always ends up looking a mess, despite all the best intentions to keep it tidy? Answers on a postcard, please. """ @@ -225,61 +232,58 @@ class TkTestRunner(BaseGUITestRunner): e = tk.Entry(suiteNameFrame, textvariable=self.suiteNameVar, width=25) e.pack(side=tk.LEFT, fill=tk.X, expand=1) e.focus_set() - e.bind('', lambda e, self=self: self.runClicked()) + e.bind("", lambda e, self=self: self.runClicked()) # Progress bar progressFrame = tk.Frame(leftFrame, relief=tk.GROOVE, borderwidth=2) progressFrame.pack(fill=tk.X, expand=0, anchor=tk.NW) tk.Label(progressFrame, text="Progress:").pack(anchor=tk.W) - self.progressBar = ProgressBar(progressFrame, relief=tk.SUNKEN, - borderwidth=2) + self.progressBar = ProgressBar(progressFrame, relief=tk.SUNKEN, borderwidth=2) self.progressBar.pack(fill=tk.X, expand=1) # Area with buttons to start/stop tests and quit buttonFrame = tk.Frame(self.top, borderwidth=3) buttonFrame.pack(side=tk.LEFT, anchor=tk.NW, fill=tk.Y) - self.stopGoButton = tk.Button(buttonFrame, text="Start", - command=self.runClicked) + self.stopGoButton = tk.Button(buttonFrame, text="Start", command=self.runClicked) self.stopGoButton.pack(fill=tk.X) - tk.Button(buttonFrame, text="Close", - command=self.top.quit).pack(side=tk.BOTTOM, fill=tk.X) - tk.Button(buttonFrame, text="About", - command=self.showAboutDialog).pack(side=tk.BOTTOM, fill=tk.X) - tk.Button(buttonFrame, text="Help", - command=self.showHelpDialog).pack(side=tk.BOTTOM, fill=tk.X) + tk.Button(buttonFrame, text="Close", command=self.top.quit).pack(side=tk.BOTTOM, fill=tk.X) + tk.Button(buttonFrame, text="About", command=self.showAboutDialog).pack( + side=tk.BOTTOM, fill=tk.X + ) + tk.Button(buttonFrame, text="Help", command=self.showHelpDialog).pack( + side=tk.BOTTOM, fill=tk.X + ) # Area with labels reporting results - for label, var in (('Run:', self.runCountVar), - ('Failures:', self.failCountVar), - ('Errors:', self.errorCountVar), - ('Remaining:', self.remainingCountVar)): + for label, var in ( + ("Run:", self.runCountVar), + ("Failures:", self.failCountVar), + ("Errors:", self.errorCountVar), + ("Remaining:", self.remainingCountVar), + ): tk.Label(progressFrame, text=label).pack(side=tk.LEFT) - tk.Label(progressFrame, textvariable=var, - foreground="blue").pack(side=tk.LEFT, fill=tk.X, - expand=1, anchor=tk.W) + tk.Label(progressFrame, textvariable=var, foreground="blue").pack( + side=tk.LEFT, fill=tk.X, expand=1, anchor=tk.W + ) # List box showing errors and failures tk.Label(leftFrame, text="Failures and errors:").pack(anchor=tk.W) listFrame = tk.Frame(leftFrame, relief=tk.SUNKEN, borderwidth=2) listFrame.pack(fill=tk.BOTH, anchor=tk.NW, expand=1) - self.errorListbox = tk.Listbox(listFrame, foreground='red', - selectmode=tk.SINGLE, - selectborderwidth=0) - self.errorListbox.pack(side=tk.LEFT, fill=tk.BOTH, expand=1, - anchor=tk.NW) + self.errorListbox = tk.Listbox( + listFrame, foreground="red", selectmode=tk.SINGLE, selectborderwidth=0 + ) + self.errorListbox.pack(side=tk.LEFT, fill=tk.BOTH, expand=1, anchor=tk.NW) listScroll = tk.Scrollbar(listFrame, command=self.errorListbox.yview) listScroll.pack(side=tk.LEFT, fill=tk.Y, anchor=tk.N) - self.errorListbox.bind("", - lambda e, self=self: self.showSelectedError()) + self.errorListbox.bind("", lambda e, self=self: self.showSelectedError()) self.errorListbox.configure(yscrollcommand=listScroll.set) - def getSelectedTestName(self): return self.suiteNameVar.get() def errorDialog(self, title, message): - tkMessageBox.showerror(parent=self.root, title=title, - message=message) + tkMessageBox.showerror(parent=self.root, title=title, message=message) def notifyRunning(self): self.runCountVar.set(0) @@ -289,15 +293,15 @@ class TkTestRunner(BaseGUITestRunner): self.errorInfo = [] while self.errorListbox.size(): self.errorListbox.delete(0) - #Stopping seems not to work, so simply disable the start button - #self.stopGoButton.config(command=self.stopClicked, text="Stop") + # Stopping seems not to work, so simply disable the start button + # self.stopGoButton.config(command=self.stopClicked, text="Stop") self.stopGoButton.config(state=tk.DISABLED) self.progressBar.setProgressFraction(0.0) self.top.update_idletasks() def notifyStopped(self): self.stopGoButton.config(state=tk.ACTIVE) - #self.stopGoButton.config(command=self.runClicked, text="Start") + # self.stopGoButton.config(command=self.runClicked, text="Start") self.statusVar.set("Idle") def notifyTestStarted(self, test): @@ -307,45 +311,42 @@ class TkTestRunner(BaseGUITestRunner): def notifyTestFailed(self, test, err): self.failCountVar.set(1 + self.failCountVar.get()) self.errorListbox.insert(tk.END, "Failure: %s" % test) - self.errorInfo.append((test,err)) + self.errorInfo.append((test, err)) def notifyTestErrored(self, test, err): self.errorCountVar.set(1 + self.errorCountVar.get()) self.errorListbox.insert(tk.END, "Error: %s" % test) - self.errorInfo.append((test,err)) + self.errorInfo.append((test, err)) def notifyTestFinished(self, test): self.remainingCountVar.set(self.remainingCountVar.get() - 1) self.runCountVar.set(1 + self.runCountVar.get()) - fractionDone = float(self.runCountVar.get())/float(self.totalTests) + fractionDone = float(self.runCountVar.get()) / float(self.totalTests) fillColor = len(self.errorInfo) and "red" or "green" self.progressBar.setProgressFraction(fractionDone, fillColor) def showAboutDialog(self): - tkMessageBox.showinfo(parent=self.root, title="About PyUnit", - message=_ABOUT_TEXT) + tkMessageBox.showinfo(parent=self.root, title="About PyUnit", message=_ABOUT_TEXT) def showHelpDialog(self): - tkMessageBox.showinfo(parent=self.root, title="PyUnit help", - message=_HELP_TEXT) + tkMessageBox.showinfo(parent=self.root, title="PyUnit help", message=_HELP_TEXT) def showSelectedError(self): selection = self.errorListbox.curselection() - if not selection: return + if not selection: + return selected = int(selection[0]) txt = self.errorListbox.get(selected) window = tk.Toplevel(self.root) window.title(txt) - window.protocol('WM_DELETE_WINDOW', window.quit) + window.protocol("WM_DELETE_WINDOW", window.quit) test, error = self.errorInfo[selected] - tk.Label(window, text=str(test), - foreground="red", justify=tk.LEFT).pack(anchor=tk.W) + tk.Label(window, text=str(test), foreground="red", justify=tk.LEFT).pack(anchor=tk.W) tracebackLines = traceback.format_exception(*error + (10,)) - tracebackText = string.join(tracebackLines,'') + tracebackText = string.join(tracebackLines, "") tk.Label(window, text=tracebackText, justify=tk.LEFT).pack() - tk.Button(window, text="Close", - command=window.quit).pack(side=tk.BOTTOM) - window.bind('', lambda e, w=window: w.quit()) + tk.Button(window, text="Close", command=window.quit).pack(side=tk.BOTTOM) + window.bind("", lambda e, w=window: w.quit()) window.mainloop() window.destroy() @@ -356,42 +357,44 @@ class ProgressBar(tk.Frame): def __init__(self, *args, **kwargs): tk.Frame.__init__(*(self,) + args, **kwargs) - self.canvas = tk.Canvas(self, height='20', width='60', - background='white', borderwidth=3) + self.canvas = tk.Canvas(self, height="20", width="60", background="white", borderwidth=3) self.canvas.pack(fill=tk.X, expand=1) self.rect = self.text = None - self.canvas.bind('', self.paint) + self.canvas.bind("", self.paint) self.setProgressFraction(0.0) - def setProgressFraction(self, fraction, color='blue'): + def setProgressFraction(self, fraction, color="blue"): self.fraction = fraction self.color = color self.paint() self.canvas.update_idletasks() - + def paint(self, *args): totalWidth = self.canvas.winfo_width() width = int(self.fraction * float(totalWidth)) height = self.canvas.winfo_height() - if self.rect is not None: self.canvas.delete(self.rect) - if self.text is not None: self.canvas.delete(self.text) - self.rect = self.canvas.create_rectangle(0, 0, width, height, - fill=self.color) + if self.rect is not None: + self.canvas.delete(self.rect) + if self.text is not None: + self.canvas.delete(self.text) + self.rect = self.canvas.create_rectangle(0, 0, width, height, fill=self.color) percentString = "%3.0f%%" % (100.0 * self.fraction) - self.text = self.canvas.create_text(totalWidth/2, height/2, - anchor=tk.CENTER, - text=percentString) + self.text = self.canvas.create_text( + totalWidth / 2, height / 2, anchor=tk.CENTER, text=percentString + ) + def main(initialTestName=""): root = tk.Tk() root.title("PyUnit") runner = TkTestRunner(root, initialTestName) - root.protocol('WM_DELETE_WINDOW', root.quit) + root.protocol("WM_DELETE_WINDOW", root.quit) root.mainloop() -if __name__ == '__main__': +if __name__ == "__main__": import sys + if len(sys.argv) == 2: main(sys.argv[1]) else: diff --git a/src/Mod/Tux/CMakeLists.txt b/src/Mod/Tux/CMakeLists.txt index 656e883fc2..78995ffec2 100644 --- a/src/Mod/Tux/CMakeLists.txt +++ b/src/Mod/Tux/CMakeLists.txt @@ -30,4 +30,3 @@ INSTALL( DESTINATION Mod/Tux ) - diff --git a/src/Mod/Tux/InitGui.py b/src/Mod/Tux/InitGui.py index 86e1c49dcf..e02e7da59a 100644 --- a/src/Mod/Tux/InitGui.py +++ b/src/Mod/Tux/InitGui.py @@ -33,4 +33,3 @@ if p.GetGroup("PersistentToolbars").GetBool("Enabled", 1): import PersistentToolbarsGui else: pass - diff --git a/src/Mod/Tux/NavigationIndicatorGui.py b/src/Mod/Tux/NavigationIndicatorGui.py index 243a6a8d89..e20c0be897 100644 --- a/src/Mod/Tux/NavigationIndicatorGui.py +++ b/src/Mod/Tux/NavigationIndicatorGui.py @@ -36,7 +36,9 @@ try: def translate(context, text): "convenience function for Qt 4 translator" return QtGui.QApplication.translate(context, text, None, _encoding) + except AttributeError: + def translate(context, text): "convenience function for Qt 5 translator" return QtGui.QApplication.translate(context, text, None) @@ -44,6 +46,7 @@ except AttributeError: class IndicatorButton(QtGui.QPushButton): """Detect language change events.""" + def __init__(self, parent=None): super(IndicatorButton, self).__init__() @@ -56,7 +59,7 @@ class IndicatorButton(QtGui.QPushButton): return super(IndicatorButton, self).changeEvent(event) def onChange(self, paramGrp, param): - if(param == "NavigationStyle"): + if param == "NavigationStyle": setCurrent() @@ -78,14 +81,27 @@ def retranslateUi(): t0 = translate("NavigationIndicator", "Navigation style not recognized.") global t1 - t1 = "

    Blender " + text06 + """

    + t1 = ( + "

    Blender " + + text06 + + """

    - - - - - + + + + + @@ -95,17 +111,35 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """""" + + text04 + + """
    - """ + text08 + ": " + text10 + "

    " + """ + + text08 + + ": " + + text10 + + "

    " + ) global t2 - t2 = "

    CAD " + text06 + """

    + t2 = ( + "

    CAD " + + text06 + + """

    - - - - - + + + + + @@ -115,18 +149,38 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text03 + + """""" + + text04 + + """
    - """ + text08 + ": " + text10 + "

    " + """ + + text08 + + ": " + + text10 + + "

    " + ) global t3 - t3 = "

    Gesture " + text06 + """

    + t3 = ( + "

    Gesture " + + text06 + + """

    - - - - - - + + + + + + @@ -137,12 +191,24 @@ def retranslateUi(): - - - - - - + + + + + + @@ -153,19 +219,43 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """""" + text05 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text03 + + """""" + + text04 + + """""" + + text05 + + """
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """""" + text05 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """""" + + text04 + + """""" + + text05 + + """
    -

    """ + text02 + ": " + text07 + """
    - """ + text08 + ": " + text09 + "

    " +

    """ + + text02 + + ": " + + text07 + + """
    + """ + + text08 + + ": " + + text09 + + "

    " + ) global t4 - t4 = "

    MayaGesture " + text06 + """

    + t4 = ( + "

    MayaGesture " + + text06 + + """

    - - - - - - + + + + + + @@ -176,12 +266,24 @@ def retranslateUi(): - - - - - - + + + + + + @@ -192,19 +294,43 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text05 + """""" + + text01 + + """""" + + text02 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """""" + + text05 + + """
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """""" + text05 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """""" + + text04 + + """""" + + text05 + + """
    -

    """ + text02 + ": " + text07 + """
    - """ + text08 + ": " + text09 + "

    " +

    """ + + text02 + + ": " + + text07 + + """
    + """ + + text08 + + ": " + + text09 + + "

    " + ) global t5 - t5 = "

    OpenCascade " + text06 + """

    + t5 = ( + "

    OpenCascade " + + text06 + + """

    - - - - - - + + + + + + @@ -215,16 +341,30 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """""" + + text04 + + """
    """ + ) global t6 - t6 = "

    OpenInventor " + text06 + """

    + t6 = ( + "

    OpenInventor " + + text06 + + """

    - - - - - + + + + + @@ -234,17 +374,35 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """
    - """ + text08 + ": " + text10 + "

    " + """ + + text08 + + ": " + + text10 + + "

    " + ) global t7 - t7 = "

    OpenSCAD " + text06 + """

    + t7 = ( + "

    OpenSCAD " + + text06 + + """

    - - - - - + + + + + @@ -254,16 +412,30 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """
    """ + ) global t8 - t8 = "

    Revit " + text06 + """

    + t8 = ( + "

    Revit " + + text06 + + """

    - - - - - + + + + + @@ -273,16 +445,32 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """""" + + text04 + + """
    - """ + text08 + ": " + text10 + "

    " + """ + + text08 + + ": " + + text10 + + "

    " + ) global t9 - t9 = "

    TinkerCAD " + text06 + """

    + t9 = ( + "

    TinkerCAD " + + text06 + + """

    - - - - + + + + @@ -291,17 +479,33 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text04 + + """
    """ + ) global t10 - t10 = "

    Touchpad " + text06 + """

    + t10 = ( + "

    Touchpad " + + text06 + + """

    - - - - - - + + + + + + @@ -312,11 +516,21 @@ def retranslateUi(): - - - - - + + + + + @@ -326,7 +540,12 @@ def retranslateUi():
    """ + text01 + """""" + text02 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text02 + + """""" + + text03 + + """""" + + text03 + + """""" + + text04 + + """
    """ + text01 + """""" + text02 + """""" + text03 + """""" + text03 + """""" + text04 + """""" + + text01 + + """""" + + text02 + + """""" + + text03 + + """""" + + text03 + + """""" + + text04 + + """
    -

    """ + text02 + ": " + text07 + "

    " +

    """ + + text02 + + ": " + + text07 + + "

    " + ) menuSettings.setTitle(translate("NavigationIndicator", "Settings")) menuOrbit.setTitle(translate("NavigationIndicator", "Orbit style")) @@ -389,7 +608,7 @@ a1.setData("Gui::BlenderNavigationStyle") a1.setObjectName("Indicator_NavigationBlender") a2 = QtGui.QAction(gStyle) -a2.setIcon(QtGui.QIcon(':/icons/NavigationCAD_dark.svg')) +a2.setIcon(QtGui.QIcon(":/icons/NavigationCAD_dark.svg")) a2.setText("CAD ") a2.setData("Gui::CADNavigationStyle") a2.setObjectName("Indicator_NavigationCAD") diff --git a/src/Mod/Tux/PersistentToolbarsGui.py b/src/Mod/Tux/PersistentToolbarsGui.py index 5f3b4c0ed1..781766d3ba 100644 --- a/src/Mod/Tux/PersistentToolbarsGui.py +++ b/src/Mod/Tux/PersistentToolbarsGui.py @@ -28,6 +28,7 @@ conectedToolbars = [] timer = QtCore.QTimer() mw = Gui.getMainWindow() + def pythonToolbars(): """Manage Python based toolbar in BIM workbench.""" @@ -85,10 +86,12 @@ def onRestore(active): # Reduce flickering. for i in toolbars: - if (i not in topRestore and - i not in leftRestore and - i not in rightRestore and - i not in bottomRestore): + if ( + i not in topRestore + and i not in leftRestore + and i not in rightRestore + and i not in bottomRestore + ): area = mw.toolBarArea(toolbars[i]) diff --git a/src/Mod/Tux/Resources/translations/Tux_el.qm b/src/Mod/Tux/Resources/translations/Tux_el.qm index 10822b2a0b..e0b6f1e9e7 100644 Binary files a/src/Mod/Tux/Resources/translations/Tux_el.qm and b/src/Mod/Tux/Resources/translations/Tux_el.qm differ diff --git a/src/Mod/Tux/Resources/translations/Tux_el.ts b/src/Mod/Tux/Resources/translations/Tux_el.ts index b7ab519980..cb3539a554 100644 --- a/src/Mod/Tux/Resources/translations/Tux_el.ts +++ b/src/Mod/Tux/Resources/translations/Tux_el.ts @@ -86,7 +86,7 @@ Free Turntable - Free Turntable + Ελεύθερη Περιστροφική πλάκα diff --git a/src/Mod/Web/App/AppWeb.cpp b/src/Mod/Web/App/AppWeb.cpp index 0a3c0e1cee..d89e3ef568 100644 --- a/src/Mod/Web/App/AppWeb.cpp +++ b/src/Mod/Web/App/AppWeb.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -58,34 +58,37 @@ client(ip, port, b"import FreeCAD\nFreeCAD.newDocument()") */ -namespace Web { -class Module : public Py::ExtensionModule +namespace Web +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Web") + Module() + : Py::ExtensionModule("Web") { - add_varargs_method("startServer",&Module::startServer, - "startServer(address=127.0.0.1,port=0) -- Start a server." - ); - add_varargs_method("waitForConnection", &Module::waitForConnection, - "waitForConnection(address=127.0.0.1,port=0,timeout=0)\n" - "Start a server, wait for connection and close server.\n" - "Its use is disadvised in a the GUI version, since it will\n" - "stop responding until the function returns." - ); - add_varargs_method("registerServerFirewall", &Module::registerServerFirewall, - "registerServerFirewall(callable(string)) -- Register a firewall." - ); - initialize("This module is the Web module."); // register with Python + add_varargs_method("startServer", + &Module::startServer, + "startServer(address=127.0.0.1,port=0) -- Start a server."); + add_varargs_method("waitForConnection", + &Module::waitForConnection, + "waitForConnection(address=127.0.0.1,port=0,timeout=0)\n" + "Start a server, wait for connection and close server.\n" + "Its use is disadvised in a the GUI version, since it will\n" + "stop responding until the function returns."); + add_varargs_method("registerServerFirewall", + &Module::registerServerFirewall, + "registerServerFirewall(callable(string)) -- Register a firewall."); + initialize("This module is the Web module."); // register with Python } private: Py::Object startServer(const Py::Tuple& args) { const char* addr = "127.0.0.1"; - int port=0; - if (!PyArg_ParseTuple(args.ptr(), "|si", &addr, &port)) + int port = 0; + if (!PyArg_ParseTuple(args.ptr(), "|si", &addr, &port)) { throw Py::Exception(); + } if (port > USHRT_MAX) { throw Py::OverflowError("port number is greater than maximum"); } @@ -115,8 +118,9 @@ private: const char* addr = "127.0.0.1"; int port = 0; int timeout = 0; - if (!PyArg_ParseTuple(args.ptr(), "|sii",&addr,&port, &timeout)) + if (!PyArg_ParseTuple(args.ptr(), "|sii", &addr, &port, &timeout)) { throw Py::Exception(); + } if (port > USHRT_MAX) { throw Py::OverflowError("port number is greater than maximum"); } @@ -150,14 +154,17 @@ private: Py::Object registerServerFirewall(const Py::Tuple& args) { PyObject* obj; - if (!PyArg_ParseTuple(args.ptr(), "O",&obj)) + if (!PyArg_ParseTuple(args.ptr(), "O", &obj)) { throw Py::Exception(); + } Py::Object pyobj(obj); - if (pyobj.isNone()) + if (pyobj.isNone()) { Web::Firewall::setInstance(nullptr); - else + } + else { Web::Firewall::setInstance(new Web::FirewallPython(pyobj)); + } return Py::None(); } @@ -168,11 +175,12 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Web +} // namespace Web /* Python entry */ -PyMOD_INIT_FUNC(Web) { +PyMOD_INIT_FUNC(Web) +{ // ADD YOUR CODE HERE // diff --git a/src/Mod/Web/App/PreCompiled.h b/src/Mod/Web/App/PreCompiled.h index c8571351fa..02f5cf78c2 100644 --- a/src/Mod/Web/App/PreCompiled.h +++ b/src/Mod/Web/App/PreCompiled.h @@ -38,7 +38,6 @@ #include #include -#endif //_PreComp_ +#endif //_PreComp_ #endif - diff --git a/src/Mod/Web/App/Server.cpp b/src/Mod/Web/App/Server.cpp index 3d77315f46..853cb54774 100644 --- a/src/Mod/Web/App/Server.cpp +++ b/src/Mod/Web/App/Server.cpp @@ -22,10 +22,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -61,9 +61,8 @@ bool Firewall::filter(const QByteArray&) const } FirewallPython::FirewallPython(const Py::Object& o) - : obj(o) -{ -} + : obj(o) +{} FirewallPython::~FirewallPython() = default; @@ -86,9 +85,10 @@ bool FirewallPython::filter(const QByteArray& msg) const // ---------------------------------------------------------------------------- ServerEvent::ServerEvent(QTcpSocket* sock, const QByteArray& msg) - : QEvent(QEvent::User), sock(sock), text(msg) -{ -} + : QEvent(QEvent::User) + , sock(sock) + , text(msg) +{} ServerEvent::~ServerEvent() = default; @@ -104,9 +104,9 @@ const QByteArray& ServerEvent::request() const // ---------------------------------------------------------------------------- -AppServer::AppServer( bool direct, QObject* parent) - : QTcpServer(parent) - , direct(direct) +AppServer::AppServer(bool direct, QObject* parent) + : QTcpServer(parent) + , direct(direct) { PyObject* mod = PyImport_ImportModule("__main__"); if (mod) { @@ -139,10 +139,10 @@ void AppServer::readClient() QCoreApplication::postEvent(this, event.release()); } } -// if (socket->state() == QTcpSocket::UnconnectedState) { -// //mark the socket for deletion but do not destroy immediately -// socket->deleteLater(); -// } + // if (socket->state() == QTcpSocket::UnconnectedState) { + // //mark the socket for deletion but do not destroy immediately + // socket->deleteLater(); + // } } void AppServer::discardClient() @@ -159,8 +159,9 @@ void AppServer::customEvent(QEvent* e) std::string str = handleRequest(msg); socket->write(str.c_str()); - if (direct) + if (direct) { socket->waitForBytesWritten(); + } socket->close(); } @@ -188,7 +189,7 @@ std::string AppServer::getRequest(const std::string& str) const Py::Object attr = module.getAttr(std::string("GET")); return attr.as_string(); } - catch (Py::Exception &e) { + catch (Py::Exception& e) { e.clear(); return str; } @@ -200,23 +201,25 @@ std::string AppServer::runPython(const QByteArray& msg) try { Firewall* fw = Firewall::getInstance(); - if (!fw || fw->filter(msg)) + if (!fw || fw->filter(msg)) { str = Base::Interpreter().runString(msg); - else + } + else { str = "Command blocked"; + } } - catch (Base::PyException &e) { + catch (Base::PyException& e) { str = e.what(); str += "\n\n"; str += e.getStackTrace(); } - catch (Base::SystemExitException &) { + catch (Base::SystemExitException&) { throw; } - catch (Base::Exception &e) { + catch (Base::Exception& e) { str = e.what(); } - catch (std::exception &e) { + catch (std::exception& e) { str = e.what(); } catch (...) { diff --git a/src/Mod/Web/App/Server.h b/src/Mod/Web/App/Server.h index b1e9a2ac99..66a33b3266 100644 --- a/src/Mod/Web/App/Server.h +++ b/src/Mod/Web/App/Server.h @@ -26,11 +26,12 @@ #include #include #include -#include #include +#include -namespace Web { +namespace Web +{ class Firewall { @@ -47,7 +48,7 @@ private: static Firewall* instance; }; -class FirewallPython : public Firewall +class FirewallPython: public Firewall { public: explicit FirewallPython(const Py::Object&); @@ -58,7 +59,7 @@ private: Py::Object obj; }; -class ServerEvent : public QEvent +class ServerEvent: public QEvent { public: ServerEvent(QTcpSocket* socket, const QByteArray&); @@ -75,7 +76,7 @@ private: /** * The Server class implements a simple TCP server. */ -class AppServer : public QTcpServer +class AppServer: public QTcpServer { Q_OBJECT @@ -100,6 +101,6 @@ private: Py::Object module; }; -} +} // namespace Web -#endif //Web_SERVER_H +#endif // Web_SERVER_H diff --git a/src/Mod/Web/Gui/AppWebGui.cpp b/src/Mod/Web/Gui/AppWebGui.cpp index 74dea776ef..84b166d9b2 100644 --- a/src/Mod/Web/Gui/AppWebGui.cpp +++ b/src/Mod/Web/Gui/AppWebGui.cpp @@ -22,11 +22,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #ifdef Q_OS_WIN32 @@ -37,8 +37,8 @@ #include #include #include -#include #include +#include #include "BrowserView.h" #include "Workbench.h" @@ -55,35 +55,35 @@ void loadWebResource() Gui::Translator::instance()->refresh(); } -namespace WebGui { -class Module : public Py::ExtensionModule +namespace WebGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("WebGui") + Module() + : Py::ExtensionModule("WebGui") { - add_varargs_method("openBrowser",&Module::openBrowser - ); - add_varargs_method("openBrowserHTML",&Module::openBrowserHTML - ); - add_varargs_method("openBrowserWindow",&Module::openBrowserWindow - ); - add_varargs_method("open",&Module::openBrowser, - "open(htmlcode,baseurl,[title,iconpath])\n" - "Load a local (X)HTML file." - ); - add_varargs_method("insert",&Module::openBrowser, - "insert(string)\n" - "Load a local (X)HTML file." - ); - initialize("This module is the WebGui module."); // register with Python + add_varargs_method("openBrowser", &Module::openBrowser); + add_varargs_method("openBrowserHTML", &Module::openBrowserHTML); + add_varargs_method("openBrowserWindow", &Module::openBrowserWindow); + add_varargs_method("open", + &Module::openBrowser, + "open(htmlcode,baseurl,[title,iconpath])\n" + "Load a local (X)HTML file."); + add_varargs_method("insert", + &Module::openBrowser, + "insert(string)\n" + "Load a local (X)HTML file."); + initialize("This module is the WebGui module."); // register with Python } private: Py::Object openBrowser(const Py::Tuple& args) { const char* url; - if (!PyArg_ParseTuple(args.ptr(), "s",&url)) + if (!PyArg_ParseTuple(args.ptr(), "s", &url)) { throw Py::Exception(); + } WebGui::BrowserView* pcBrowserView; @@ -92,8 +92,9 @@ private: pcBrowserView->resize(400, 300); pcBrowserView->load(url); Gui::getMainWindow()->addWindow(pcBrowserView); - if (!Gui::getMainWindow()->activeWindow()) + if (!Gui::getMainWindow()->activeWindow()) { Gui::getMainWindow()->setActiveWindow(pcBrowserView); + } return Py::None(); } @@ -104,8 +105,15 @@ private: const char* BaseUrl; const char* IconPath; char* TabName = nullptr; - if (! PyArg_ParseTuple(args.ptr(), "ss|ets", &HtmlCode, &BaseUrl, "utf-8", &TabName, &IconPath)) + if (!PyArg_ParseTuple(args.ptr(), + "ss|ets", + &HtmlCode, + &BaseUrl, + "utf-8", + &TabName, + &IconPath)) { throw Py::Exception(); + } std::string EncodedName = "Browser"; if (TabName) { @@ -116,13 +124,15 @@ private: WebGui::BrowserView* pcBrowserView = nullptr; pcBrowserView = new WebGui::BrowserView(Gui::getMainWindow()); pcBrowserView->resize(400, 300); - pcBrowserView->setHtml(QString::fromUtf8(HtmlCode),QUrl(QString::fromLatin1(BaseUrl))); + pcBrowserView->setHtml(QString::fromUtf8(HtmlCode), QUrl(QString::fromLatin1(BaseUrl))); pcBrowserView->setWindowTitle(QString::fromUtf8(EncodedName.c_str())); - if (IconPath) + if (IconPath) { pcBrowserView->setWindowIcon(QIcon(QString::fromUtf8(IconPath))); + } Gui::getMainWindow()->addWindow(pcBrowserView); - if (!Gui::getMainWindow()->activeWindow()) + if (!Gui::getMainWindow()->activeWindow()) { Gui::getMainWindow()->setActiveWindow(pcBrowserView); + } return Py::None(); } @@ -130,8 +140,9 @@ private: Py::Object openBrowserWindow(const Py::Tuple& args) { char* TabName = nullptr; - if (!PyArg_ParseTuple(args.ptr(), "|et", "utf-8", &TabName)) + if (!PyArg_ParseTuple(args.ptr(), "|et", "utf-8", &TabName)) { throw Py::Exception(); + } std::string EncodedName = "Browser"; if (TabName) { @@ -144,8 +155,9 @@ private: pcBrowserView->resize(400, 300); pcBrowserView->setWindowTitle(QString::fromUtf8(EncodedName.c_str())); Gui::getMainWindow()->addWindow(pcBrowserView); - if (!Gui::getMainWindow()->activeWindow()) + if (!Gui::getMainWindow()->activeWindow()) { Gui::getMainWindow()->setActiveWindow(pcBrowserView); + } return Py::asObject(pcBrowserView->getPyObject()); } @@ -156,7 +168,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -class NativeEventFilter : public QAbstractNativeEventFilter +class NativeEventFilter: public QAbstractNativeEventFilter { public: #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) @@ -182,7 +194,7 @@ public: } }; -} // namespace WebGui +} // namespace WebGui /* Python entry */ @@ -205,7 +217,7 @@ PyMOD_INIT_FUNC(WebGui) qApp->installNativeEventFilter(new WebGui::NativeEventFilter); #endif - // add resources and reloads the translators + // add resources and reloads the translators loadWebResource(); PyMOD_Return(mod); diff --git a/src/Mod/Web/Gui/BrowserView.cpp b/src/Mod/Web/Gui/BrowserView.cpp index 54b135a6b2..9a88c6f98a 100644 --- a/src/Mod/Web/Gui/BrowserView.cpp +++ b/src/Mod/Web/Gui/BrowserView.cpp @@ -22,53 +22,53 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #if defined(QTWEBENGINE) -# if QT_VERSION < QT_VERSION_CHECK(6,0,0) -# include -# else -# include -# endif -# include -# include -# include -# include -# include -# include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +#include +#else +#include +#endif +#include +#include +#include +#include +#include +#include #elif defined(QTWEBKIT) -# include -# include -# include -# include +#include +#include +#include +#include using QWebEngineView = QWebView; using QWebEnginePage = QWebPage; #endif #include -#include #include +#include #include #include #include #include -#include #include +#include #include #include @@ -79,35 +79,38 @@ using QWebEnginePage = QWebPage; using namespace WebGui; using namespace Gui; -namespace WebGui { -enum WebAction { +namespace WebGui +{ +enum WebAction +{ OpenLink = 0, OpenLinkInNewWindow = 1, - ViewSource = 2 // QWebView doesn't have a ViewSource option + ViewSource = 2 // QWebView doesn't have a ViewSource option }; #ifdef QTWEBENGINE -class WebEngineUrlRequestInterceptor : public QWebEngineUrlRequestInterceptor +class WebEngineUrlRequestInterceptor: public QWebEngineUrlRequestInterceptor { public: - explicit WebEngineUrlRequestInterceptor(BrowserView *parent) : - QWebEngineUrlRequestInterceptor(parent), - m_parent(parent) - { - } + explicit WebEngineUrlRequestInterceptor(BrowserView* parent) + : QWebEngineUrlRequestInterceptor(parent) + , m_parent(parent) + {} - void interceptRequest(QWebEngineUrlRequestInfo &info) override + void interceptRequest(QWebEngineUrlRequestInfo& info) override { // do something with this resource, click or get img for example if (info.navigationType() == QWebEngineUrlRequestInfo::NavigationTypeLink) { // wash out windows file:///C:/something ->file://C:/something QUrl url = info.requestUrl(); - QRegularExpression re(QLatin1String("^/([a-zA-Z]\\:.*)")); // match & catch drive letter forward + // match & catch drive letter forward + QRegularExpression re(QLatin1String("^/([a-zA-Z]\\:.*)")); QRegularExpressionMatch match = re.match(url.path()); - if (url.host().isEmpty() && url.isLocalFile() && match.hasMatch()) + if (url.host().isEmpty() && url.isLocalFile() && match.hasMatch()) { // clip / in file urs ie /C:/something -> C:/something url.setPath(match.captured(1)); + } // invoke thread safe. QMetaObject::invokeMethod(m_parent, "urlFilter", Q_ARG(QUrl, url)); @@ -115,13 +118,14 @@ public: } private: - BrowserView *m_parent; + BrowserView* m_parent; }; #endif // --------------------------------------------------------------------------------------------- -UrlWidget::UrlWidget(BrowserView *view) : - QLineEdit(view), m_view(view) +UrlWidget::UrlWidget(BrowserView* view) + : QLineEdit(view) + , m_view(view) { setText(QLatin1String("https://")); hide(); @@ -129,19 +133,19 @@ UrlWidget::UrlWidget(BrowserView *view) : UrlWidget::~UrlWidget() = default; -void UrlWidget::keyPressEvent(QKeyEvent *keyEvt) +void UrlWidget::keyPressEvent(QKeyEvent* keyEvt) { switch (keyEvt->key()) { - case Qt::Key_Escape: - hide(); - break; - case Qt::Key_Return: - case Qt::Key_Enter: - m_view->load(text().toLatin1()); - hide(); - break; - default: - QLineEdit::keyPressEvent(keyEvt); + case Qt::Key_Escape: + hide(); + break; + case Qt::Key_Return: + case Qt::Key_Enter: + m_view->load(text().toLatin1()); + hide(); + break; + default: + QLineEdit::keyPressEvent(keyEvt); } } @@ -155,17 +159,17 @@ void UrlWidget::display() // --------------------------------------------------------------------------------------------- -class BrowserViewPy : public Py::PythonExtension +class BrowserViewPy: public Py::PythonExtension { public: using BaseType = Py::PythonExtension; - static void init_type(); // announce properties and methods + static void init_type(); // announce properties and methods explicit BrowserViewPy(BrowserView* view); ~BrowserViewPy() override; Py::Object repr() override; - Py::Object getattr(const char *) override; + Py::Object getattr(const char*) override; Py::Object cast_to_base(const Py::Tuple&); Py::Object setHtml(const Py::Tuple&); @@ -189,16 +193,18 @@ void BrowserViewPy::init_type() behaviors().supportSetattr(); behaviors().readyType(); - add_varargs_method("setHtml",&BrowserViewPy::setHtml,"setHtml(str)"); - add_varargs_method("load",&BrowserViewPy::load,"load(url)"); - add_varargs_method("stop",&BrowserViewPy::stop,"stop()"); - add_varargs_method("url",&BrowserViewPy::url,"url()"); - add_varargs_method("cast_to_base", &BrowserViewPy::cast_to_base, "cast_to_base() cast to MDIView class"); + add_varargs_method("setHtml", &BrowserViewPy::setHtml, "setHtml(str)"); + add_varargs_method("load", &BrowserViewPy::load, "load(url)"); + add_varargs_method("stop", &BrowserViewPy::stop, "stop()"); + add_varargs_method("url", &BrowserViewPy::url, "url()"); + add_varargs_method("cast_to_base", + &BrowserViewPy::cast_to_base, + "cast_to_base() cast to MDIView class"); } -BrowserViewPy::BrowserViewPy(BrowserView* view) : base(view) -{ -} +BrowserViewPy::BrowserViewPy(BrowserView* view) + : base(view) +{} BrowserViewPy::~BrowserViewPy() = default; @@ -223,14 +229,14 @@ Py::Object BrowserViewPy::repr() // a trick is to use MDIViewPy as class member and override getattr() to // join the attributes of both classes. This way all methods of MDIViewPy // appear for SheetViewPy, too. -Py::Object BrowserViewPy::getattr(const char * attr) +Py::Object BrowserViewPy::getattr(const char* attr) { if (!getBrowserViewPtr()) { std::ostringstream s_out; s_out << "Cannot access attribute '" << attr << "' of deleted object"; throw Py::RuntimeError(s_out.str()); } - std::string name( attr ); + std::string name(attr); if (name == "__dict__" || name == "__class__") { Py::Dict dict_self(BaseType::getattr("__dict__")); Py::Dict dict_base(base.getattr("__dict__")); @@ -253,21 +259,24 @@ Py::Object BrowserViewPy::setHtml(const Py::Tuple& args) { char* HtmlCode; char* BaseUrl; - if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&HtmlCode,&BaseUrl)) + if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &HtmlCode, &BaseUrl)) { throw Py::Exception(); + } std::string EncodedHtml = std::string(HtmlCode); PyMem_Free(HtmlCode); - getBrowserViewPtr()->setHtml(QString::fromUtf8(EncodedHtml.c_str()), QUrl(QString::fromUtf8(BaseUrl))); + getBrowserViewPtr()->setHtml(QString::fromUtf8(EncodedHtml.c_str()), + QUrl(QString::fromUtf8(BaseUrl))); return Py::None(); } Py::Object BrowserViewPy::load(const Py::Tuple& args) { char* BaseUrl; - if (!PyArg_ParseTuple(args.ptr(), "s", &BaseUrl)) + if (!PyArg_ParseTuple(args.ptr(), "s", &BaseUrl)) { throw Py::Exception(); + } getBrowserViewPtr()->load(BaseUrl); return Py::None(); @@ -275,8 +284,9 @@ Py::Object BrowserViewPy::load(const Py::Tuple& args) Py::Object BrowserViewPy::stop(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } getBrowserViewPtr()->stop(); return Py::None(); @@ -284,33 +294,34 @@ Py::Object BrowserViewPy::stop(const Py::Tuple& args) Py::Object BrowserViewPy::url(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } QUrl url = getBrowserViewPtr()->url(); return Py::String(url.toString().toStdString()); } -} +} // namespace WebGui /** * Constructs a WebView widget which can be zoomed with Ctrl+Mousewheel * */ -WebView::WebView(QWidget *parent) +WebView::WebView(QWidget* parent) : QWebEngineView(parent) { #ifdef QTWEBKIT // Increase html font size for high DPI displays QRect mainScreenSize = QApplication::primaryScreen()->geometry(); - if (mainScreenSize.width() > 1920){ - setTextSizeMultiplier (mainScreenSize.width()/1920.0); + if (mainScreenSize.width() > 1920) { + setTextSizeMultiplier(mainScreenSize.width() / 1920.0); } #endif } -void WebView::mousePressEvent(QMouseEvent *event) +void WebView::mousePressEvent(QMouseEvent* event) { #ifdef QTWEBKIT if (event->button() == Qt::MiddleButton) { @@ -324,7 +335,7 @@ void WebView::mousePressEvent(QMouseEvent *event) QWebEngineView::mousePressEvent(event); } -void WebView::wheelEvent(QWheelEvent *event) +void WebView::wheelEvent(QWheelEvent* event) { if (QApplication::keyboardModifiers() & Qt::ControlModifier) { qreal factor = zoomFactor() + (-event->angleDelta().y() / 800.0); @@ -335,16 +346,16 @@ void WebView::wheelEvent(QWheelEvent *event) QWebEngineView::wheelEvent(event); } -void WebView::contextMenuEvent(QContextMenuEvent *event) +void WebView::contextMenuEvent(QContextMenuEvent* event) { #ifdef QTWEBENGINE -# if QT_VERSION < QT_VERSION_CHECK(6,0,0) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) const QWebEngineContextMenuData r = page()->contextMenuData(); QUrl linkUrl = r.linkUrl(); -# else +#else const QWebEngineContextMenuRequest* r = this->lastContextMenuRequest(); QUrl linkUrl = r->linkUrl(); -# endif +#endif #else QWebHitTestResult r = page()->mainFrame()->hitTestContent(event->pos()); QUrl linkUrl = r.linkUrl(); @@ -353,7 +364,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) QMenu menu(this); // building a custom signal for external browser action - QSignalMapper* signalMapper = new QSignalMapper (&menu); + QSignalMapper* signalMapper = new QSignalMapper(&menu); signalMapper->setProperty("url", QVariant(linkUrl)); QAction* extAction = menu.addAction(tr("Open in External Browser")); @@ -362,8 +373,11 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) QAction* newAction = menu.addAction(tr("Open in new window")); signalMapper->setMapping(newAction, WebAction::OpenLinkInNewWindow); -#if QT_VERSION < QT_VERSION_CHECK(5,15,0) - connect(signalMapper, qOverload(&QSignalMapper::mapped), this, &WebView::triggerContextMenuAction); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + connect(signalMapper, + qOverload(&QSignalMapper::mapped), + this, + &WebView::triggerContextMenuAction); #else connect(signalMapper, &QSignalMapper::mappedInt, this, &WebView::triggerContextMenuAction); #endif @@ -376,43 +390,51 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) return; } #if defined(QTWEBENGINE) - else { // for view source + else { // for view source // QWebEngine caches standardContextMenu, guard so we only add signalmapper once static bool firstRun = true; if (firstRun) { firstRun = false; -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - QMenu *menu = page()->createStandardContextMenu(); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + QMenu* menu = page()->createStandardContextMenu(); #else - QMenu *menu = this->createStandardContextMenu(); + QMenu* menu = this->createStandardContextMenu(); #endif - QList actions = menu->actions(); - for(QAction *ac : actions) { + QList actions = menu->actions(); + for (QAction* ac : actions) { if (ac->data().toInt() == WebAction::ViewSource) { - QSignalMapper* signalMapper = new QSignalMapper (this); + QSignalMapper* signalMapper = new QSignalMapper(this); signalMapper->setProperty("url", QVariant(linkUrl)); signalMapper->setMapping(ac, WebAction::ViewSource); -#if QT_VERSION < QT_VERSION_CHECK(5,15,0) - connect(signalMapper, qOverload(&QSignalMapper::mapped), this, &WebView::triggerContextMenuAction); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + connect(signalMapper, + qOverload(&QSignalMapper::mapped), + this, + &WebView::triggerContextMenuAction); #else - connect(signalMapper, &QSignalMapper::mappedInt, this, &WebView::triggerContextMenuAction); + connect(signalMapper, + &QSignalMapper::mappedInt, + this, + &WebView::triggerContextMenuAction); #endif - connect(ac, &QAction::triggered, signalMapper, qOverload<>(&QSignalMapper::map)); + connect(ac, + &QAction::triggered, + signalMapper, + qOverload<>(&QSignalMapper::map)); } } } } #else else { - QMenu *menu = page()->createStandardContextMenu(); - QAction *ac = menu->addAction(tr("View source")); + QMenu* menu = page()->createStandardContextMenu(); + QAction* ac = menu->addAction(tr("View source")); ac->setData(WebAction::ViewSource); - QSignalMapper* signalMapper = new QSignalMapper (this); + QSignalMapper* signalMapper = new QSignalMapper(this); signalMapper->setProperty("url", QVariant(linkUrl)); signalMapper->setMapping(ac, WebAction::ViewSource); - connect(signalMapper, SIGNAL(mapped(int)), - this, SLOT(triggerContextMenuAction(int))); - connect (ac, SIGNAL(triggered()), signalMapper, SLOT(map())); + connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(triggerContextMenuAction(int))); + connect(ac, SIGNAL(triggered()), signalMapper, SLOT(map())); menu->exec(event->globalPos()); } #endif @@ -425,17 +447,17 @@ void WebView::triggerContextMenuAction(int id) QUrl url = s->property("url").toUrl(); switch (id) { - case WebAction::OpenLink: - Q_EMIT openLinkInExternalBrowser(url); - break; - case WebAction::OpenLinkInNewWindow: - Q_EMIT openLinkInNewWindow(url); - break; - case WebAction::ViewSource: - Q_EMIT viewSource(url); - break; - default: - break; + case WebAction::OpenLink: + Q_EMIT openLinkInExternalBrowser(url); + break; + case WebAction::OpenLinkInNewWindow: + Q_EMIT openLinkInNewWindow(url); + break; + case WebAction::ViewSource: + Q_EMIT viewSource(url); + break; + default: + break; } } @@ -450,13 +472,13 @@ TYPESYSTEM_SOURCE_ABSTRACT(WebGui::BrowserView, Gui::MDIView) * name 'name'. */ BrowserView::BrowserView(QWidget* parent) - : MDIView(nullptr,parent,Qt::WindowFlags()), - WindowParameter( "Browser" ), - isLoading(false) + : MDIView(nullptr, parent, Qt::WindowFlags()) + , WindowParameter("Browser") + , isLoading(false) { #if defined(QTWEBENGINE) // Otherwise cause crash on exit, probably due to double deletion - setAttribute(Qt::WA_DeleteOnClose,false); + setAttribute(Qt::WA_DeleteOnClose, false); #endif view = new WebView(this); @@ -478,27 +500,34 @@ BrowserView::BrowserView(QWidget* parent) // enable local storage so we can store stuff across sessions (startpage) QWebSettings* settings = view->settings(); settings->setAttribute(QWebSettings::LocalStorageEnabled, true); - settings->setLocalStoragePath(QString::fromUtf8((App::Application::getUserAppDataDir()+"webdata").c_str())); + settings->setLocalStoragePath( + QString::fromUtf8((App::Application::getUserAppDataDir() + "webdata").c_str())); // setting background to white QPalette palette = view->palette(); palette.setBrush(QPalette::Base, Qt::white); view->page()->setPalette(palette); - connect(view->page(), SIGNAL(linkHovered(const QString &, const QString &, const QString &)), - this, SLOT(onLinkHovered(const QString &, const QString &, const QString &))); - connect(view, SIGNAL(linkClicked(const QUrl &)), - this, SLOT(urlFilter(const QUrl &))); - connect(view->page(), SIGNAL(downloadRequested(const QNetworkRequest &)), - this, SLOT(onDownloadRequested(const QNetworkRequest &))); - connect(view->page(), SIGNAL(unsupportedContent(QNetworkReply*)), - this, SLOT(onUnsupportedContent(QNetworkReply*))); + connect(view->page(), + SIGNAL(linkHovered(const QString&, const QString&, const QString&)), + this, + SLOT(onLinkHovered(const QString&, const QString&, const QString&))); + connect(view, SIGNAL(linkClicked(const QUrl&)), this, SLOT(urlFilter(const QUrl&))); + connect(view->page(), + SIGNAL(downloadRequested(const QNetworkRequest&)), + this, + SLOT(onDownloadRequested(const QNetworkRequest&))); + connect(view->page(), + SIGNAL(unsupportedContent(QNetworkReply*)), + this, + SLOT(onUnsupportedContent(QNetworkReply*))); -#else // QTWEBENGINE +#else // QTWEBENGINE // QWebEngine doesn't support direct access to network // nor rendering access - QWebEngineProfile *profile = view->page()->profile(); - QString basePath = QString::fromStdString(App::Application::getUserAppDataDir()) + QLatin1String("webdata/"); + QWebEngineProfile* profile = view->page()->profile(); + QString basePath = + QString::fromStdString(App::Application::getUserAppDataDir()) + QLatin1String("webdata/"); profile->setPersistentStoragePath(basePath + QLatin1String("persistent")); profile->setCachePath(basePath + QLatin1String("cache")); @@ -511,47 +540,42 @@ BrowserView::BrowserView(QWidget* parent) #endif view->settings()->setAttribute(QWebEngineSettings::AutoLoadIconsForPage, true); - view->settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled,false); + view->settings()->setAttribute(QWebEngineSettings::FocusOnNavigationEnabled, false); - connect(view->page()->profile(), &QWebEngineProfile::downloadRequested, - this, &BrowserView::onDownloadRequested); - connect(view->page(), &QWebEnginePage::iconChanged, - this, &BrowserView::setWindowIcon); - connect(view->page(), &QWebEnginePage::linkHovered, - this, &BrowserView::onLinkHovered); + connect(view->page()->profile(), + &QWebEngineProfile::downloadRequested, + this, + &BrowserView::onDownloadRequested); + connect(view->page(), &QWebEnginePage::iconChanged, this, &BrowserView::setWindowIcon); + connect(view->page(), &QWebEnginePage::linkHovered, this, &BrowserView::onLinkHovered); #endif - connect(view, &WebView::viewSource, - this, &BrowserView::onViewSource); - connect(view, &WebView::loadStarted, - this, &BrowserView::onLoadStarted); - connect(view, &WebView::loadProgress, - this, &BrowserView::onLoadProgress); - connect(view, &WebView::loadFinished, - this, &BrowserView::onLoadFinished); - connect(view, &WebView::openLinkInExternalBrowser, - this, &BrowserView::onOpenLinkInExternalBrowser); - connect(view, &WebView::openLinkInNewWindow, - this, &BrowserView::onOpenLinkInNewWindow); - connect(view, &WebView::loadStarted, - this, &BrowserView::onUpdateBrowserActions); - connect(view, &WebView::loadFinished, - this, &BrowserView::onUpdateBrowserActions); + connect(view, &WebView::viewSource, this, &BrowserView::onViewSource); + connect(view, &WebView::loadStarted, this, &BrowserView::onLoadStarted); + connect(view, &WebView::loadProgress, this, &BrowserView::onLoadProgress); + connect(view, &WebView::loadFinished, this, &BrowserView::onLoadFinished); + connect(view, + &WebView::openLinkInExternalBrowser, + this, + &BrowserView::onOpenLinkInExternalBrowser); + connect(view, &WebView::openLinkInNewWindow, this, &BrowserView::onOpenLinkInNewWindow); + connect(view, &WebView::loadStarted, this, &BrowserView::onUpdateBrowserActions); + connect(view, &WebView::loadFinished, this, &BrowserView::onUpdateBrowserActions); } /** Destroys the object and frees any allocated resources */ BrowserView::~BrowserView() { #ifdef QTWEBENGINE - delete interceptLinks; // cleanup not handled implicitly + delete interceptLinks; // cleanup not handled implicitly #endif delete view; } -void BrowserView::urlFilter(const QUrl & url) +void BrowserView::urlFilter(const QUrl& url) { - QString scheme = url.scheme(); - QString host = url.host(); - //QString username = url.userName(); + QString scheme = url.scheme(); + QString host = url.host(); + // QString username = url.userName(); // path handling QString path = url.path(); @@ -559,66 +583,90 @@ void BrowserView::urlFilter(const QUrl & url) // query QString q; - if (url.hasQuery()) + if (url.hasQuery()) { q = url.query(); + } - //QString fragment = url. fragment(); + // QString fragment = url. fragment(); #ifdef QTWEBKIT - if (scheme==QString::fromLatin1("http") || scheme==QString::fromLatin1("https")) { + if (scheme == QString::fromLatin1("http") || scheme == QString::fromLatin1("https")) { load(url); } #endif // Small trick to force opening a link in an external browser: use exthttp or exthttps // Write your URL as exthttp://www.example.com - else if (scheme==QString::fromLatin1("exthttp")) { + else if (scheme == QString::fromLatin1("exthttp")) { exturl.setScheme(QString::fromLatin1("http")); QDesktopServices::openUrl(exturl); - stop();// stop qwebengine, should do nothing in qwebkit at this point + stop(); // stop qwebengine, should do nothing in qwebkit at this point } - else if (scheme==QString::fromLatin1("exthttps")) { + else if (scheme == QString::fromLatin1("exthttps")) { exturl.setScheme(QString::fromLatin1("https")); QDesktopServices::openUrl(exturl); - stop();// stop qwebengine, should do nothing in qwebkit at this point + stop(); // stop qwebengine, should do nothing in qwebkit at this point } // run scripts if not from somewhere else! - if ((scheme.size() < 2 || scheme==QString::fromLatin1("file"))&& host.isEmpty()) { + if ((scheme.size() < 2 || scheme == QString::fromLatin1("file")) && host.isEmpty()) { QFileInfo fi(path); if (fi.exists()) { QString ext = fi.completeSuffix(); if (ext == QString::fromLatin1("py")) { - stop(); // stop qwebengine, should do nothing in qwebkit at this point + stop(); // stop qwebengine, should do nothing in qwebkit at this point try { if (!q.isEmpty()) { // encapsulate the value in quotes - q = q.replace(QString::fromLatin1("="),QString::fromLatin1("=\""))+QString::fromLatin1("\""); - q = q.replace(QString::fromLatin1("%"),QString::fromLatin1("%%")); - // url queries in the form of somescript.py?key=value, the first key=value will be printed in the py console as key="value" - Gui::Command::doCommand(Gui::Command::Gui,q.toStdString().c_str()); + q = q.replace(QString::fromLatin1("="), QString::fromLatin1("=\"")) + + QString::fromLatin1("\""); + q = q.replace(QString::fromLatin1("%"), QString::fromLatin1("%%")); + // url queries in the form of somescript.py?key=value, the first key=value + // will be printed in the py console as key="value" + Gui::Command::doCommand(Gui::Command::Gui, q.toStdString().c_str()); } - // Gui::Command::doCommand(Gui::Command::Gui,"execfile('%s')",(const char*) fi.absoluteFilePath(). toLocal8Bit()); + // Gui::Command::doCommand(Gui::Command::Gui,"execfile('%s')",(const char*) + // fi.absoluteFilePath(). toLocal8Bit()); QString filename = Base::Tools::escapeEncodeFilename(fi.absoluteFilePath()); - // Set flag indicating that this load/restore has been initiated by the user (not by a macro) - Gui::Application::Instance->setStatus(Gui::Application::UserInitiatedOpenDocument, true); - Gui::Command::doCommand(Gui::Command::Gui,"with open('%s') as file:\n\texec(file.read())",(const char*) filename.toUtf8()); - Gui::Application::Instance->setStatus(Gui::Application::UserInitiatedOpenDocument, false); + // Set flag indicating that this load/restore has been initiated by the user + // (not by a macro) + Gui::Application::Instance->setStatus( + Gui::Application::UserInitiatedOpenDocument, + true); + Gui::Command::doCommand(Gui::Command::Gui, + "with open('%s') as file:\n\texec(file.read())", + (const char*)filename.toUtf8()); + Gui::Application::Instance->setStatus( + Gui::Application::UserInitiatedOpenDocument, + false); } catch (const Base::Exception& e) { QMessageBox::critical(this, tr("Error"), QString::fromUtf8(e.what())); } - App::Document *doc = BaseView::getAppDocument(); - if(doc && doc->testStatus(App::Document::PartialRestore)) - QMessageBox::critical(this, tr("Error"), tr("There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved.")); + App::Document* doc = BaseView::getAppDocument(); + if (doc && doc->testStatus(App::Document::PartialRestore)) { + QMessageBox::critical( + this, + tr("Error"), + tr("There were errors while loading the file. Some data might have been " + "modified or not recovered at all. Look in the report view for more " + "specific information about the objects involved.")); + } - if(doc && doc->testStatus(App::Document::RestoreError)) - QMessageBox::critical(this, tr("Error"), tr("There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data.")); + if (doc && doc->testStatus(App::Document::RestoreError)) { + QMessageBox::critical( + this, + tr("Error"), + tr("There were serious errors while loading the file. Some data might have " + "been modified or not recovered at all. Saving the project will most " + "likely result in loss of data.")); + } } } else { - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("File does not exist!"), - fi.absoluteFilePath ()); + QMessageBox::warning(Gui::getMainWindow(), + QObject::tr("File does not exist!"), + fi.absoluteFilePath()); } } } @@ -630,10 +678,10 @@ bool BrowserView::chckHostAllowed(const QString& host) } #ifdef QTWEBENGINE -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) -void BrowserView::onDownloadRequested(QWebEngineDownloadItem *request) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +void BrowserView::onDownloadRequested(QWebEngineDownloadItem* request) #else -void BrowserView::onDownloadRequested(QWebEngineDownloadRequest *request) +void BrowserView::onDownloadRequested(QWebEngineDownloadRequest* request) #endif { QUrl url = request->url(); @@ -643,11 +691,12 @@ void BrowserView::onDownloadRequested(QWebEngineDownloadRequest *request) } else { request->cancel(); - Gui::getMainWindow()->loadUrls(App::GetApplication().getActiveDocument(), QList() << url); + Gui::getMainWindow()->loadUrls(App::GetApplication().getActiveDocument(), + QList() << url); } } -void BrowserView::setWindowIcon(const QIcon &icon) +void BrowserView::setWindowIcon(const QIcon& icon) { Gui::MDIView::setWindowIcon(icon); } @@ -657,29 +706,29 @@ void BrowserView::onLinkHovered(const QString& url) Gui::getMainWindow()->statusBar()->showMessage(url); } -void BrowserView::onViewSource(const QUrl &url) +void BrowserView::onViewSource(const QUrl& url) { Q_UNUSED(url); - view->page()->toHtml([=](const QString &pageSource){ - QPlainTextEdit *editorWidget = new QPlainTextEdit {}; - App::TextDocument *txtDoc = new App::TextDocument; - TextDocumentEditorView *textDocView = new TextDocumentEditorView { - txtDoc, - editorWidget, getMainWindow()}; + view->page()->toHtml([=](const QString& pageSource) { + QPlainTextEdit* editorWidget = new QPlainTextEdit {}; + App::TextDocument* txtDoc = new App::TextDocument; + TextDocumentEditorView* textDocView = + new TextDocumentEditorView {txtDoc, editorWidget, getMainWindow()}; editorWidget->setReadOnly(true); editorWidget->setPlainText(pageSource); getMainWindow()->addWindow(textDocView); }); } #else -void BrowserView::onDownloadRequested(const QNetworkRequest & request) +void BrowserView::onDownloadRequested(const QNetworkRequest& request) { QUrl url = request.url(); if (!url.isLocalFile()) { Gui::Dialog::DownloadManager::getInstance()->download(request); } else { - Gui::getMainWindow()->loadUrls(App::GetApplication().getActiveDocument(), QList() << url); + Gui::getMainWindow()->loadUrls(App::GetApplication().getActiveDocument(), + QList() << url); } } @@ -694,7 +743,9 @@ void BrowserView::onUnsupportedContent(QNetworkReply* reply) view->reload(); } -void BrowserView::onLinkHovered(const QString& link, const QString& title, const QString& textContent) +void BrowserView::onLinkHovered(const QString& link, + const QString& title, + const QString& textContent) { Q_UNUSED(title) Q_UNUSED(textContent) @@ -703,17 +754,17 @@ void BrowserView::onLinkHovered(const QString& link, const QString& title, const Gui::getMainWindow()->statusBar()->showMessage(str); } -void BrowserView::onViewSource(const QUrl &url) +void BrowserView::onViewSource(const QUrl& url) { Q_UNUSED(url); - if (!view->page() || !view->page()->currentFrame()) + if (!view->page() || !view->page()->currentFrame()) { return; + } QString pageSource = view->page()->currentFrame()->toHtml(); - QPlainTextEdit *editorWidget = new QPlainTextEdit {}; - App::TextDocument *txtDoc = new App::TextDocument; - TextDocumentEditorView *textDocView = new TextDocumentEditorView { - txtDoc, editorWidget, getMainWindow() - }; + QPlainTextEdit* editorWidget = new QPlainTextEdit {}; + App::TextDocument* txtDoc = new App::TextDocument; + TextDocumentEditorView* textDocView = + new TextDocumentEditorView {txtDoc, editorWidget, getMainWindow()}; editorWidget->setReadOnly(true); editorWidget->setPlainText(pageSource); getMainWindow()->addWindow(textDocView); @@ -726,17 +777,18 @@ void BrowserView::load(const char* URL) load(url); } -void BrowserView::load(const QUrl & url) +void BrowserView::load(const QUrl& url) { - if (isLoading) + if (isLoading) { stop(); + } urlWgt->setText(url.toString()); view->load(url); view->setUrl(url); if (url.scheme().size() < 2) { - QString path = url.path(); + QString path = url.path(); QFileInfo fi(path); QString name = fi.baseName(); @@ -751,10 +803,11 @@ void BrowserView::load(const QUrl & url) #endif } -void BrowserView::setHtml(const QString& HtmlCode,const QUrl & BaseUrl) +void BrowserView::setHtml(const QString& HtmlCode, const QUrl& BaseUrl) { - if (isLoading) + if (isLoading) { stop(); + } view->setHtml(HtmlCode, BaseUrl); #ifdef QTWEBKIT @@ -819,16 +872,22 @@ void BrowserView::onOpenLinkInNewWindow(const QUrl& url) void BrowserView::onUpdateBrowserActions() { CommandManager& mgr = Application::Instance->commandManager(); - std::vector cmds = {"Web_BrowserBack", "Web_BrowserNext", "Web_BrowserRefresh", "Web_BrowserStop", - "Web_BrowserZoomIn", "Web_BrowserZoomOut", "Web_BrowserSetURL"}; + std::vector cmds = {"Web_BrowserBack", + "Web_BrowserNext", + "Web_BrowserRefresh", + "Web_BrowserStop", + "Web_BrowserZoomIn", + "Web_BrowserZoomOut", + "Web_BrowserSetURL"}; for (const auto& it : cmds) { Gui::Command* cmd = mgr.getCommandByName(it); - if (cmd) + if (cmd) { cmd->testActive(); + } } } -void BrowserView::OnChange(Base::Subject &rCaller,const char* rcReason) +void BrowserView::OnChange(Base::Subject& rCaller, const char* rcReason) { Q_UNUSED(rCaller); Q_UNUSED(rcReason); @@ -837,33 +896,41 @@ void BrowserView::OnChange(Base::Subject &rCaller,const char* rcRea /** * Runs the action specified by \a pMsg. */ -bool BrowserView::onMsg(const char* pMsg,const char** ) +bool BrowserView::onMsg(const char* pMsg, const char**) { - if (strcmp(pMsg,"Back")==0){ + if (strcmp(pMsg, "Back") == 0) { view->back(); return true; - } else if (strcmp(pMsg,"Next")==0){ + } + else if (strcmp(pMsg, "Next") == 0) { view->forward(); return true; - } else if (strcmp(pMsg,"Refresh")==0){ + } + else if (strcmp(pMsg, "Refresh") == 0) { view->reload(); return true; - } else if (strcmp(pMsg,"Stop")==0){ + } + else if (strcmp(pMsg, "Stop") == 0) { stop(); return true; - } else if (strcmp(pMsg,"ZoomIn")==0){ + } + else if (strcmp(pMsg, "ZoomIn") == 0) { qreal factor = view->zoomFactor(); view->setZoomFactor(factor + 0.2); return true; - } else if (strcmp(pMsg,"ZoomOut")==0){ + } + else if (strcmp(pMsg, "ZoomOut") == 0) { qreal factor = view->zoomFactor(); view->setZoomFactor(factor - 0.2); return true; - } else if (strcmp(pMsg,"SetURL")==0){ - if (urlWgt->isVisible()) + } + else if (strcmp(pMsg, "SetURL") == 0) { + if (urlWgt->isVisible()) { urlWgt->hide(); - else + } + else { urlWgt->display(); + } return true; } @@ -876,20 +943,27 @@ bool BrowserView::onMsg(const char* pMsg,const char** ) */ bool BrowserView::onHasMsg(const char* pMsg) const { - if (strcmp(pMsg,"Back")==0) + if (strcmp(pMsg, "Back") == 0) { return view->page()->action(QWebEnginePage::Back)->isEnabled(); - if (strcmp(pMsg,"Next")==0) + } + if (strcmp(pMsg, "Next") == 0) { return view->page()->action(QWebEnginePage::Forward)->isEnabled(); - if (strcmp(pMsg,"Refresh")==0) + } + if (strcmp(pMsg, "Refresh") == 0) { return !isLoading; - if (strcmp(pMsg,"Stop")==0) + } + if (strcmp(pMsg, "Stop") == 0) { return isLoading; - if (strcmp(pMsg,"ZoomIn")==0) + } + if (strcmp(pMsg, "ZoomIn") == 0) { return true; - if (strcmp(pMsg,"ZoomOut")==0) + } + if (strcmp(pMsg, "ZoomOut") == 0) { return true; - if (strcmp(pMsg,"SetURL")==0) + } + if (strcmp(pMsg, "SetURL") == 0) { return true; + } return false; } @@ -911,4 +985,3 @@ PyObject* BrowserView::getPyObject() return new BrowserViewPy(this); } #include "moc_BrowserView.cpp" - diff --git a/src/Mod/Web/Gui/BrowserView.h b/src/Mod/Web/Gui/BrowserView.h index d5e6990f36..4386f57170 100644 --- a/src/Mod/Web/Gui/BrowserView.h +++ b/src/Mod/Web/Gui/BrowserView.h @@ -26,12 +26,13 @@ #include #include #if defined(QTWEBENGINE) -# include -namespace WebGui { - class WebEngineUrlRequestInterceptor; +#include +namespace WebGui +{ +class WebEngineUrlRequestInterceptor; } #elif defined(QTWEBKIT) -# include +#include #endif #include @@ -42,24 +43,25 @@ class QNetworkReply; class QNetworkRequest; class QUrl; -namespace WebGui { +namespace WebGui +{ class UrlWidget; #ifdef QTWEBENGINE -class WebGuiExport WebView : public QWebEngineView +class WebGuiExport WebView: public QWebEngineView #else -class WebGuiExport WebView : public QWebView +class WebGuiExport WebView: public QWebView #endif { Q_OBJECT public: - explicit WebView(QWidget *parent = nullptr); + explicit WebView(QWidget* parent = nullptr); protected: - void mousePressEvent(QMouseEvent *event) override; - void wheelEvent(QWheelEvent *event) override; - void contextMenuEvent(QContextMenuEvent *event) override; + void mousePressEvent(QMouseEvent* event) override; + void wheelEvent(QWheelEvent* event) override; + void contextMenuEvent(QContextMenuEvent* event) override; private Q_SLOTS: void triggerContextMenuAction(int); @@ -74,8 +76,7 @@ Q_SIGNALS: * A special view class which sends the messages from the application to * the editor and embeds it in a window. */ -class WebGuiExport BrowserView : public Gui::MDIView, - public Gui::WindowParameter +class WebGuiExport BrowserView: public Gui::MDIView, public Gui::WindowParameter { Q_OBJECT @@ -86,24 +87,27 @@ public: ~BrowserView() override; void load(const char* URL); - void load(const QUrl & url); - void setHtml(const QString& HtmlCode,const QUrl & BaseUrl); + void load(const QUrl& url); + void setHtml(const QString& HtmlCode, const QUrl& BaseUrl); void stop(); QUrl url() const; - void OnChange(Base::Subject &rCaller,const char* rcReason) override; + void OnChange(Base::Subject& rCaller, const char* rcReason) override; - const char *getName() const override {return "BrowserView";} - PyObject *getPyObject() override; + const char* getName() const override + { + return "BrowserView"; + } + PyObject* getPyObject() override; - bool onMsg(const char* pMsg,const char** ppReturn) override; + bool onMsg(const char* pMsg, const char** ppReturn) override; bool onHasMsg(const char* pMsg) const override; - bool canClose () override; + bool canClose() override; #ifdef QTWEBENGINE public Q_SLOTS: - void setWindowIcon(const QIcon &icon); + void setWindowIcon(const QIcon& icon); #endif protected Q_SLOTS: @@ -111,12 +115,12 @@ protected Q_SLOTS: void onLoadProgress(int); void onLoadFinished(bool); bool chckHostAllowed(const QString& host); - void urlFilter(const QUrl &url); + void urlFilter(const QUrl& url); #ifdef QTWEBENGINE -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - void onDownloadRequested(QWebEngineDownloadItem *request); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + void onDownloadRequested(QWebEngineDownloadItem* request); #else - void onDownloadRequested(QWebEngineDownloadRequest *request); + void onDownloadRequested(QWebEngineDownloadRequest* request); #endif void onLinkHovered(const QString& url); #else @@ -124,7 +128,7 @@ protected Q_SLOTS: void onUnsupportedContent(QNetworkReply* reply); void onLinkHovered(const QString& link, const QString& title, const QString& textContent); #endif - void onViewSource(const QUrl &url); + void onViewSource(const QUrl& url); void onOpenLinkInExternalBrowser(const QUrl& url); void onOpenLinkInNewWindow(const QUrl&); void onUpdateBrowserActions(); @@ -132,27 +136,29 @@ protected Q_SLOTS: private: QPointer view; bool isLoading; - UrlWidget *urlWgt; + UrlWidget* urlWgt; #ifdef QTWEBENGINE - WebEngineUrlRequestInterceptor *interceptLinks; + WebEngineUrlRequestInterceptor* interceptLinks; #else float textSizeMultiplier; #endif }; // the URL ardressbar lineedit -class UrlWidget : public QLineEdit +class UrlWidget: public QLineEdit { Q_OBJECT - BrowserView *m_view; + BrowserView* m_view; + public: - explicit UrlWidget(BrowserView *view); + explicit UrlWidget(BrowserView* view); ~UrlWidget() override; void display(); + protected: - void keyPressEvent(QKeyEvent *keyEvt) override; + void keyPressEvent(QKeyEvent* keyEvt) override; }; -} // namespace WebGui +} // namespace WebGui -#endif // WEBGUI_BROWSERVIEW_H +#endif // WEBGUI_BROWSERVIEW_H diff --git a/src/Mod/Web/Gui/Command.cpp b/src/Mod/Web/Gui/Command.cpp index 63e9b9c37c..d611f5fb74 100644 --- a/src/Mod/Web/Gui/Command.cpp +++ b/src/Mod/Web/Gui/Command.cpp @@ -40,23 +40,23 @@ using namespace WebGui; DEF_STD_CMD(CmdWebOpenWebsite) CmdWebOpenWebsite::CmdWebOpenWebsite() - : Command("Web_OpenWebsite") + : Command("Web_OpenWebsite") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Open website..."); - sToolTipText = QT_TR_NOOP("Opens a website in FreeCAD"); - sWhatsThis = "Web_OpenWebsite"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-browser"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Open website..."); + sToolTipText = QT_TR_NOOP("Opens a website in FreeCAD"); + sWhatsThis = "Web_OpenWebsite"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-browser"; } void CmdWebOpenWebsite::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Doc,"import WebGui"); - doCommand(Command::Gui,"WebGui.openBrowser('http://www.freecad.org/')"); + doCommand(Doc, "import WebGui"); + doCommand(Command::Gui, "WebGui.openBrowser('http://www.freecad.org/')"); } //=========================================================================== @@ -66,21 +66,21 @@ void CmdWebOpenWebsite::activated(int iMsg) DEF_STD_CMD_A(CmdWebBrowserBack) CmdWebBrowserBack::CmdWebBrowserBack() - : Command("Web_BrowserBack") + : Command("Web_BrowserBack") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Previous page"); - sToolTipText = QT_TR_NOOP("Go back to the previous page"); - sWhatsThis = "Web_BrowserBack"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-previous"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Previous page"); + sToolTipText = QT_TR_NOOP("Go back to the previous page"); + sWhatsThis = "Web_BrowserBack"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-previous"; } void CmdWebBrowserBack::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Command::Gui,"Gui.SendMsgToActiveView('Back')"); + doCommand(Command::Gui, "Gui.SendMsgToActiveView('Back')"); } bool CmdWebBrowserBack::isActive() @@ -95,21 +95,21 @@ bool CmdWebBrowserBack::isActive() DEF_STD_CMD_A(CmdWebBrowserNext) CmdWebBrowserNext::CmdWebBrowserNext() - : Command("Web_BrowserNext") + : Command("Web_BrowserNext") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Next page"); - sToolTipText = QT_TR_NOOP("Go to the next page"); - sWhatsThis = "Web_BrowserNext"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-next"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Next page"); + sToolTipText = QT_TR_NOOP("Go to the next page"); + sWhatsThis = "Web_BrowserNext"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-next"; } void CmdWebBrowserNext::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Command::Gui,"Gui.SendMsgToActiveView('Next')"); + doCommand(Command::Gui, "Gui.SendMsgToActiveView('Next')"); } bool CmdWebBrowserNext::isActive() @@ -124,21 +124,21 @@ bool CmdWebBrowserNext::isActive() DEF_STD_CMD_A(CmdWebBrowserRefresh) CmdWebBrowserRefresh::CmdWebBrowserRefresh() - : Command("Web_BrowserRefresh") + : Command("Web_BrowserRefresh") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Refresh web page"); - sToolTipText = QT_TR_NOOP("Refresh web page"); - sWhatsThis = "Web_BrowserRefresh"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-refresh"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Refresh web page"); + sToolTipText = QT_TR_NOOP("Refresh web page"); + sWhatsThis = "Web_BrowserRefresh"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-refresh"; } void CmdWebBrowserRefresh::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Command::Gui,"Gui.SendMsgToActiveView('Refresh')"); + doCommand(Command::Gui, "Gui.SendMsgToActiveView('Refresh')"); } bool CmdWebBrowserRefresh::isActive() @@ -152,22 +152,22 @@ bool CmdWebBrowserRefresh::isActive() DEF_STD_CMD_A(CmdWebBrowserStop) CmdWebBrowserStop::CmdWebBrowserStop() - :Command("Web_BrowserStop") + : Command("Web_BrowserStop") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Stop loading"); - sToolTipText = QT_TR_NOOP("Stop loading"); - sWhatsThis = "Web_BrowserStop"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-stop"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Stop loading"); + sToolTipText = QT_TR_NOOP("Stop loading"); + sWhatsThis = "Web_BrowserStop"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-stop"; } void CmdWebBrowserStop::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Command::Gui,"Gui.SendMsgToActiveView('Stop')"); + doCommand(Command::Gui, "Gui.SendMsgToActiveView('Stop')"); } bool CmdWebBrowserStop::isActive() @@ -182,21 +182,21 @@ bool CmdWebBrowserStop::isActive() DEF_STD_CMD_A(CmdWebBrowserZoomIn) CmdWebBrowserZoomIn::CmdWebBrowserZoomIn() - : Command("Web_BrowserZoomIn") + : Command("Web_BrowserZoomIn") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Zoom in"); - sToolTipText = QT_TR_NOOP("Zoom in"); - sWhatsThis = "Web_BrowserZoomIn"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-zoom-in"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Zoom in"); + sToolTipText = QT_TR_NOOP("Zoom in"); + sWhatsThis = "Web_BrowserZoomIn"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-zoom-in"; } void CmdWebBrowserZoomIn::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Command::Gui,"Gui.SendMsgToActiveView('ZoomIn')"); + doCommand(Command::Gui, "Gui.SendMsgToActiveView('ZoomIn')"); } bool CmdWebBrowserZoomIn::isActive() @@ -211,21 +211,21 @@ bool CmdWebBrowserZoomIn::isActive() DEF_STD_CMD_A(CmdWebBrowserZoomOut) CmdWebBrowserZoomOut::CmdWebBrowserZoomOut() - : Command("Web_BrowserZoomOut") + : Command("Web_BrowserZoomOut") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Zoom out"); - sToolTipText = QT_TR_NOOP("Zoom out"); - sWhatsThis = "Web_BrowserZoomOut"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-zoom-out"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Zoom out"); + sToolTipText = QT_TR_NOOP("Zoom out"); + sWhatsThis = "Web_BrowserZoomOut"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-zoom-out"; } void CmdWebBrowserZoomOut::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Command::Gui,"Gui.SendMsgToActiveView('ZoomOut')"); + doCommand(Command::Gui, "Gui.SendMsgToActiveView('ZoomOut')"); } bool CmdWebBrowserZoomOut::isActive() @@ -240,21 +240,21 @@ bool CmdWebBrowserZoomOut::isActive() DEF_STD_CMD_A(CmdWebBrowserSetURL) CmdWebBrowserSetURL::CmdWebBrowserSetURL() - : Command("Web_BrowserSetURL") + : Command("Web_BrowserSetURL") { - sAppModule = "Web"; - sGroup = QT_TR_NOOP("Web"); - sMenuText = QT_TR_NOOP("Set URL"); - sToolTipText = QT_TR_NOOP("Set URL"); - sWhatsThis = "Web_BrowserSetURL"; - sStatusTip = sToolTipText; - sPixmap = "actions/web-set-url"; + sAppModule = "Web"; + sGroup = QT_TR_NOOP("Web"); + sMenuText = QT_TR_NOOP("Set URL"); + sToolTipText = QT_TR_NOOP("Set URL"); + sWhatsThis = "Web_BrowserSetURL"; + sStatusTip = sToolTipText; + sPixmap = "actions/web-set-url"; } void CmdWebBrowserSetURL::activated(int iMsg) { Q_UNUSED(iMsg); - doCommand(Command::Gui,"Gui.SendMsgToActiveView('SetURL')"); + doCommand(Command::Gui, "Gui.SendMsgToActiveView('SetURL')"); } bool CmdWebBrowserSetURL::isActive() @@ -263,10 +263,9 @@ bool CmdWebBrowserSetURL::isActive() } - void CreateWebCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdWebOpenWebsite()); rcCmdMgr.addCommand(new CmdWebBrowserBack()); @@ -276,4 +275,4 @@ void CreateWebCommands() rcCmdMgr.addCommand(new CmdWebBrowserZoomIn()); rcCmdMgr.addCommand(new CmdWebBrowserZoomOut()); rcCmdMgr.addCommand(new CmdWebBrowserSetURL()); - } +} diff --git a/src/Mod/Web/Gui/CookieJar.cpp b/src/Mod/Web/Gui/CookieJar.cpp index c1bbf333bc..4dd968992b 100644 --- a/src/Mod/Web/Gui/CookieJar.cpp +++ b/src/Mod/Web/Gui/CookieJar.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -51,8 +51,9 @@ FcCookieJar::FcCookieJar(QObject* parent) connect(&m_timer, &QTimer::timeout, this, &FcCookieJar::saveToDisk); Base::FileInfo cookiefile(App::Application::getUserAppDataDir() + "cookies"); m_file.setFileName(QString::fromUtf8(cookiefile.filePath().c_str())); - if (allCookies().isEmpty()) + if (allCookies().isEmpty()) { loadFromDisk(); + } } FcCookieJar::~FcCookieJar() @@ -64,8 +65,9 @@ FcCookieJar::~FcCookieJar() bool FcCookieJar::setCookiesFromUrl(const QList& cookieList, const QUrl& url) { bool status = QNetworkCookieJar::setCookiesFromUrl(cookieList, url); - if (status) + if (status) { scheduleSaveToDisk(); + } return status; } @@ -83,8 +85,9 @@ void FcCookieJar::extractRawCookies() m_rawCookies.clear(); for (const auto& it : cookies) { - if (!it.isSessionCookie()) + if (!it.isSessionCookie()) { m_rawCookies.append(it.toRawForm()); + } } } @@ -98,24 +101,30 @@ void FcCookieJar::saveToDisk() out << it + "\n"; } m_file.close(); - } else + } + else { qWarning("IO error handling cookiejar file"); + } } void FcCookieJar::loadFromDisk() { - if (!m_file.exists()) + if (!m_file.exists()) { return; + } QList cookies; if (m_file.open(QIODevice::ReadOnly | QIODevice::Text)) { QTextStream in(&m_file); - while (!in.atEnd()) + while (!in.atEnd()) { cookies.append(QNetworkCookie::parseCookies(in.readLine().toUtf8())); + } m_file.close(); - } else + } + else { qWarning("IO error handling cookiejar file"); + } setAllCookies(cookies); } diff --git a/src/Mod/Web/Gui/CookieJar.h b/src/Mod/Web/Gui/CookieJar.h index 4ac7a83838..650270ac1e 100644 --- a/src/Mod/Web/Gui/CookieJar.h +++ b/src/Mod/Web/Gui/CookieJar.h @@ -24,39 +24,41 @@ #ifndef WEBGUI_COOKIEJAR_H #define WEBGUI_COOKIEJAR_H +#include #include #include #include -#include class QNetworkCookieJar; -namespace WebGui { +namespace WebGui +{ - class WebGuiExport FcCookieJar : public QNetworkCookieJar { +class WebGuiExport FcCookieJar: public QNetworkCookieJar +{ - Q_OBJECT + Q_OBJECT - public: - explicit FcCookieJar(QObject* parent = nullptr); - ~FcCookieJar() override; - bool setCookiesFromUrl(const QList&, const QUrl&) override; +public: + explicit FcCookieJar(QObject* parent = nullptr); + ~FcCookieJar() override; + bool setCookiesFromUrl(const QList&, const QUrl&) override; - public Q_SLOTS: - void scheduleSaveToDisk(); - void loadFromDisk(); - void reset(); +public Q_SLOTS: + void scheduleSaveToDisk(); + void loadFromDisk(); + void reset(); - private Q_SLOTS: - void saveToDisk(); +private Q_SLOTS: + void saveToDisk(); - private: - void extractRawCookies(); - QList m_rawCookies; - QFile m_file; - QTimer m_timer; - }; +private: + void extractRawCookies(); + QList m_rawCookies; + QFile m_file; + QTimer m_timer; +}; -} +} // namespace WebGui -#endif // WEBGUI_COOKIEJAR_H +#endif // WEBGUI_COOKIEJAR_H diff --git a/src/Mod/Web/Gui/PreCompiled.h b/src/Mod/Web/Gui/PreCompiled.h index b98e5b1924..03840d49d0 100644 --- a/src/Mod/Web/Gui/PreCompiled.h +++ b/src/Mod/Web/Gui/PreCompiled.h @@ -51,6 +51,6 @@ #include #include -#endif //_PreComp_ +#endif //_PreComp_ -#endif // WEBGUI_PRECOMPILED_H +#endif // WEBGUI_PRECOMPILED_H diff --git a/src/Mod/Web/Gui/Resources/icons/actions/web-home.svg b/src/Mod/Web/Gui/Resources/icons/actions/web-home.svg index 4d8df54fe5..df3a6bf157 100644 --- a/src/Mod/Web/Gui/Resources/icons/actions/web-home.svg +++ b/src/Mod/Web/Gui/Resources/icons/actions/web-home.svg @@ -377,7 +377,7 @@ visible="true" enabled="true" snapvisiblegridlinesonly="true" /> - + \ No newline at end of file + style="opacity:0.39772728;color:#000000;fill:url(#radialGradient3115);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999958;marker:none;visibility:visible;display:inline;overflow:visible" /> diff --git a/src/Mod/Web/Gui/Resources/translations/Web.ts b/src/Mod/Web/Gui/Resources/translations/Web.ts index 12486e3b27..5db28c6d77 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web.ts @@ -129,12 +129,12 @@ QObject - + Browser - + File does not exist! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. - + Loading %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser - + Open in new window - + View source diff --git a/src/Mod/Web/Gui/Resources/translations/Web_be.ts b/src/Mod/Web/Gui/Resources/translations/Web_be.ts index 7521e53c3a..3924b77d62 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_be.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_be.ts @@ -129,12 +129,12 @@ QObject - + Browser Інтэрнэт-аглядальнік - + File does not exist! Файл не існуе! @@ -142,26 +142,26 @@ WebGui::BrowserView - - - + + + Error Памылка - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Пры загрузцы файла ўзніклі памылкі. Некаторыя дадзеныя маглі быць змененыя альбо наогул не адноўленыя. Паглядзіце ў акне справаздачы для атрымання больш падрабязнай інфармацыі аб закранутых аб'ектах. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Пры загрузцы файла былі дапушчаныя сур'ёзныя памылкі. Некаторыя дадзеныя маглі быць змененыя ці наогул не адноўленыя. Захаванне праекта, хутчэй за ўсё, прывядзе да страты дадзеных. - + Loading %1... Загрузка %1... @@ -169,17 +169,17 @@ WebGui::WebView - + Open in External Browser Адчыніць у вонкавым Інтэрнэт-аглядальніку - + Open in new window Адчыніць у новым акне - + View source Глядзець зыходны код diff --git a/src/Mod/Web/Gui/Resources/translations/Web_ca.ts b/src/Mod/Web/Gui/Resources/translations/Web_ca.ts index 23d1d1320d..e1c3d109d6 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_ca.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_ca.ts @@ -129,12 +129,12 @@ QObject - + Browser Navegador - + File does not exist! El fitxer no existeix! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Error - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. S'han produït errors en carregar el fitxer. Algunes dades es poden haver modificat o no s'han recuperat. Consulteu la vista d'informe per a obtenir informació més específica sobre els objectes implicats. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Hi ha hagut errors greus en carregar el fitxer. Pot ser que s'hagin modificat dades o no s'hagin recuperat. Desar el projecte probablement provocarà la pèrdua de dades. - + Loading %1... S'està carregant %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Obre en un navegador extern - + Open in new window Obre en una finestra nova - + View source Visualitza la font diff --git a/src/Mod/Web/Gui/Resources/translations/Web_cs.ts b/src/Mod/Web/Gui/Resources/translations/Web_cs.ts index 649d428006..daa7e61647 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_cs.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_cs.ts @@ -129,12 +129,12 @@ QObject - + Browser Prohlížeč - + File does not exist! Soubor neexistuje! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Chyba - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Při načítání souboru se objevily chyby. Některé data mohla být modifikována nebo nebyla vůbec obnovena. Podívejte se do Zobrazení reportu pro konkrétnější informaci o zúčastněných objektech. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Při načítání souboru došlo k vážným chybám. Některá data mohla být změněna nebo vůbec neobnovena. Uložení projektu s největší pravděpodobností povede ke ztrátě dat. - + Loading %1... Načítání %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Otevřít v externím prohlížeči - + Open in new window Otevřít v novém okně - + View source Zobrazit zdroj diff --git a/src/Mod/Web/Gui/Resources/translations/Web_de.ts b/src/Mod/Web/Gui/Resources/translations/Web_de.ts index 1cd1a0ed6f..aee06d6c6d 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_de.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_de.ts @@ -129,12 +129,12 @@ QObject - + Browser Browser - + File does not exist! Datei nicht vorhanden! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Fehler - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Beim Laden der Datei sind Fehler aufgetreten. Einige Daten wurden möglicherweise geändert oder gar nicht wiederhergestellt. Im Ausgabefenster finden sich genauere Informationen zu den betroffenen Objekten. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Es gab schwerwiegende Fehler beim Laden der Datei. Einige Daten wurden möglicherweise geändert oder konnten nicht wiederhergestellt werden. Das Speichern des Projekts wird höchstwahrscheinlich zu Datenverlust führen. - + Loading %1... %1 wird geladen... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser In externem Browser öffnen - + Open in new window In neuem Fenster öffnen - + View source Quelle anzeigen diff --git a/src/Mod/Web/Gui/Resources/translations/Web_el.ts b/src/Mod/Web/Gui/Resources/translations/Web_el.ts index 318896f069..9f4a94968b 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_el.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_el.ts @@ -129,12 +129,12 @@ QObject - + Browser Περιηγητής - + File does not exist! Το αρχείο δεν υπάρχει! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Σφάλμα - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Υπήρξαν σφάλματα κατά τη φόρτωση του αρχείου. Ορισμένα δεδομένα ενδέχεται να έχουν τροποποιηθεί ή να μην έχουν ανακτηθεί καθόλου. Κοιτάξτε στην έκθεση για πιο συγκεκριμένες πληροφορίες σχετικά με τα σχετικά αντικείμενα. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. - There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. + Υπήρξαν σοβαρά σφάλματα κατά τη φόρτωση του αρχείου. Ορισμένα δεδομένα ενδέχεται να έχουν τροποποιηθεί ή να μην έχουν ανακτηθεί καθόλου. Η αποθήκευση του έργου πιθανότατα θα οδηγήσει σε απώλεια δεδομένων. - + Loading %1... Πραγματοποιείται φόρτωση του %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Άνοιγμα σε Εξωτερικό Περιηγητή - + Open in new window Άνοιγμα σε νέο παράθυρο - + View source Προβολή πηγαίου κώδικα diff --git a/src/Mod/Web/Gui/Resources/translations/Web_es-AR.ts b/src/Mod/Web/Gui/Resources/translations/Web_es-AR.ts index b8415b9884..1c3433fab5 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_es-AR.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_es-AR.ts @@ -129,12 +129,12 @@ QObject - + Browser Navegador - + File does not exist! ¡El archivo no existe! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Error - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Hubo errores al cargar el archivo. Algunos datos pueden haber sido modificados o no recuperados. Busque en la vista del informe información más específica sobre los objetos involucrados. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Hubo errores graves al cargar el archivo. Algunos datos pueden haber sido modificados o no recuperados. Guardar el proyecto muy probablemente resultará en la pérdida de datos. - + Loading %1... Cargando %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Abrir en Navegador Externo - + Open in new window Abrir en una nueva ventana - + View source Ver Código Fuente diff --git a/src/Mod/Web/Gui/Resources/translations/Web_es-ES.ts b/src/Mod/Web/Gui/Resources/translations/Web_es-ES.ts index 2281876b3f..d4cc495b79 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_es-ES.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_es-ES.ts @@ -129,12 +129,12 @@ QObject - + Browser Navegador - + File does not exist! ¡El archivo no existe! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Error - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Hubo errores al cargar el archivo. Algunos datos pueden haber sido modificados o no recuperados en absoluto. Busque en la vista de informe para obtener información más específica sobre los objetos involucrados. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Hubo errores graves al cargar el archivo. Algunos datos pueden haber sido modificados o no recuperados. Guardar el proyecto muy probablemente resultará en la pérdida de datos. - + Loading %1... Cargando %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Abrir en navegador externo - + Open in new window Abrir en una nueva ventana - + View source Ver fuente diff --git a/src/Mod/Web/Gui/Resources/translations/Web_eu.ts b/src/Mod/Web/Gui/Resources/translations/Web_eu.ts index 2bae1db35c..48a1833ddf 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_eu.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_eu.ts @@ -129,12 +129,12 @@ QObject - + Browser Nabigatzailea - + File does not exist! Fitxategia ez da existitzen! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Errorea - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Erroreak izan dira fitxategia kargatzean. Beharbada zenbait datu aldatu egin dira edo ez dira erabat berreskuratu. Begiratu txostenean arazoak izan dituzten objektuei buruzko informazio gehiago jasotzeko. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Errore larriak gertatu dira fitxategia kargatzean. Zenbait datu aldatuta agertu daitezke edo ez dira berreskuratu. Proiektua gordetzen bada, ziur aski datuak galduko dira. - + Loading %1... %1 kargatzen... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Ireki kanpoko nabigatzailean - + Open in new window Ireki leiho berrian - + View source Bistarau iturburua diff --git a/src/Mod/Web/Gui/Resources/translations/Web_fi.ts b/src/Mod/Web/Gui/Resources/translations/Web_fi.ts index 0b6a80bf5b..8b42ec2adf 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_fi.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_fi.ts @@ -129,12 +129,12 @@ QObject - + Browser Selain - + File does not exist! Tiedostoa ei ole! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Virhe - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Tiedoston latauksessa tapahtui virheitä. Joitakin tietoja on ehkä muutettu tai niitä ei ole palautettu lainkaan. Katso raporttinäkymää, josta saa tarkempaa tietoa asiaan liittyvistä kohteista. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Tiedostoa ladattaessa tapahtui vakavia virheitä. Joitakin tietoja on ehkä muutettu tai niitä ei ole palautettu lainkaan. Projektin tallentaminen johtaa mitä todennäköisimmin tietojen menettämiseen. - + Loading %1... Ladataan %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Avaa ulkoisella selaimella - + Open in new window Avaa uudessa ikkunassa - + View source Näytä lähdekoodi diff --git a/src/Mod/Web/Gui/Resources/translations/Web_fr.ts b/src/Mod/Web/Gui/Resources/translations/Web_fr.ts index ef461f8d9f..b35816e2f9 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_fr.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_fr.ts @@ -129,12 +129,12 @@ QObject - + Browser Navigateur - + File does not exist! Le fichier n'existe pas ! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Erreur - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Des erreurs sont survenues lors du chargement du fichier. Certaines données pourraient avoir été modifiées, ou pas récupérées du tout. Consultez la vue rapport pour plus d’informations sur les objets concernés. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. De graves erreurs se sont produites lors du chargement du fichier. Certaines données ont pu être modifiées ou n'ont pas été récupérées du tout. L'enregistrement du projet entraînera très probablement une perte de données. - + Loading %1... Chargement %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Ouvrir dans un navigateur externe - + Open in new window Ouvrir dans une nouvelle fenêtre - + View source Afficher la source diff --git a/src/Mod/Web/Gui/Resources/translations/Web_gl.ts b/src/Mod/Web/Gui/Resources/translations/Web_gl.ts index 25fd9e2ee8..ceb637f3fe 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_gl.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_gl.ts @@ -129,12 +129,12 @@ QObject - + Browser Navegador - + File does not exist! O ficheiro non existe! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Erro - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Houbo erros ao cargar o ficheiro. Alúns dados poden ter sido modificados ou non recuperados de todo. Vexa a vista do informe para obter información máis específica sobre os obxectos ligados. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. - + Loading %1... Cargando %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Abrir noutro navegador - + Open in new window Abrir nunha nova xanela - + View source Vista fonte diff --git a/src/Mod/Web/Gui/Resources/translations/Web_hr.ts b/src/Mod/Web/Gui/Resources/translations/Web_hr.ts index 58e78be965..7bcba60604 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_hr.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_hr.ts @@ -129,12 +129,12 @@ QObject - + Browser Preglednik - + File does not exist! Datoteka ne postoji! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Pogreška - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Pojavile su se pogreške tijekom učitavanja datoteke. Neki podaci su možda promijenjeni ili nisu oporavljeni potuno. Pogledajte prikaz izvješća za više podataka o objektima koji su uključeni. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Došlo je do ozbiljnih pogrešaka prilikom učitavanja datoteke. Neki su podaci možda izmijenjeni ili uopće nisu vraćeni. Spremanje projekta najvjerojatnije će rezultirati gubitkom podataka. - + Loading %1... Učitavanje %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Otvori u vanjskom pregledniku - + Open in new window Otvori u novom prozoru - + View source Pogledaj izvor diff --git a/src/Mod/Web/Gui/Resources/translations/Web_hu.ts b/src/Mod/Web/Gui/Resources/translations/Web_hu.ts index 1241cd23fe..d2c3be118c 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_hu.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_hu.ts @@ -129,12 +129,12 @@ QObject - + Browser Böngésző - + File does not exist! A fájl nem létezik! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Hiba - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Hiba történt a fájl betöltésekor. Néhány adat lehet, hogy módosított vagy nem egyáltalán nem viszaállított. Nézze meg a jelentés nézetet részletesebb információért az érintett objektumokhoz. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. A fájl betöltése közben súlyos hibák történtek. Előfordulhat, hogy néhány adat módosult, vagy egyáltalán nem állt helyre. A terv mentése valószínűleg adatvesztést eredményez. - + Loading %1... %1 betöltve... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Megnyitás külső böngészőben - + Open in new window Megnyitás új ablakban - + View source Forrás nézet diff --git a/src/Mod/Web/Gui/Resources/translations/Web_id.ts b/src/Mod/Web/Gui/Resources/translations/Web_id.ts index d08d023a5d..64f2b5d860 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_id.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_id.ts @@ -129,12 +129,12 @@ QObject - + Browser Browser - + File does not exist! File tidak ada! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Kesalahan - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Ada kesalahan saat memuat file. Beberapa data mungkin telah dimodifikasi atau tidak dipulihkan sama sekali. Lihat di tampilan laporan untuk informasi yang lebih spesifik tentang objek yang terlibat. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. - + Loading %1... Memuat %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Buka di Browser eksternal - + Open in new window Buka di jendela baru - + View source Lihat sumber diff --git a/src/Mod/Web/Gui/Resources/translations/Web_it.ts b/src/Mod/Web/Gui/Resources/translations/Web_it.ts index 4190e59c53..016831e757 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_it.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_it.ts @@ -129,12 +129,12 @@ QObject - + Browser Browser - + File does not exist! Il file non esiste! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Errore - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Si sono verificati degli errori durante il caricamento del file. Alcuni dati potrebbero essere stati modificati o non acquisiti. Guardare nella vista report per avere informazioni più specifiche sugli oggetti coinvolti. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Ci sono stati errori gravi durante il caricamento del file. Alcuni dati potrebbero essere stati modificati o non recuperati affatto. Il salvataggio del progetto molto probabilmente si tradurrà in perdita di dati. - + Loading %1... Caricamento %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Apri nel Browser esterno - + Open in new window Apri in una nuova finestra - + View source Visualizza l'origine diff --git a/src/Mod/Web/Gui/Resources/translations/Web_ja.ts b/src/Mod/Web/Gui/Resources/translations/Web_ja.ts index bf88ac8e04..10f51214d0 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_ja.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_ja.ts @@ -129,12 +129,12 @@ QObject - + Browser ブラウザー - + File does not exist! ファイルが存在しません! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error エラー - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. ファイルの読み込み中にエラーが発生しました。一部のデータが変更、または完全に復元されていない可能性があります。関連するオブジェクトのより詳細な情報についてはレポートビューを確認してください。 - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. ファイルの読み込み中に重大なエラーが発生しました。一部のデータが変更されたか、完全に復元されていない可能性があります。 プロジェクトを保存すると、データが失われる恐れがあります。 - + Loading %1... %1 を読み込み中・・・ @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser 外部ブラウザーで開く - + Open in new window 新しいウィンドウで開く - + View source ソース表示 diff --git a/src/Mod/Web/Gui/Resources/translations/Web_ka.ts b/src/Mod/Web/Gui/Resources/translations/Web_ka.ts index 5a11975c96..a5df995454 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_ka.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_ka.ts @@ -129,12 +129,12 @@ QObject - + Browser ბრაუზერი - + File does not exist! ფაილი არ არსებობს! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error შეცდომა - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. შეცდომა ფაილის ჩატვირთვისას. მონაცემები შეიძლება შეცვლილი იყოს ან საერთოდ არ იქნება წაკითხული. მეტი ინფორმაციის სანახავად ჩაიხედეთ რეპორტში. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. სერიოზული შეცდომები ფაილის ჩატვირთვისას. ზოგიერთი მონაცემი შეიძლება შეცვლილი იყოს ან საერთოდ ვერ აღდგეს. პროექტის შენახვა სავარაუდოდ გამოიწვევს მონაცემთა დაკარგვას. - + Loading %1... %1-ის ჩატვირთვა... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser გარე ბრაუზერში გახსნა - + Open in new window ახალ ფანჯარაში გახსნა - + View source წყაროს ნახვა diff --git a/src/Mod/Web/Gui/Resources/translations/Web_ko.ts b/src/Mod/Web/Gui/Resources/translations/Web_ko.ts index fc975a7638..2f094bc378 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_ko.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_ko.ts @@ -129,12 +129,12 @@ QObject - + Browser 브라우저 - + File does not exist! 파일이 존재하지 않습니다! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error 에러 - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. 파일을 불러오는 동안 오류가 발생했습니다. 일부 데이터가 수정되었거나 전혀 복구되지 않았을 수 있습니다. 관련된 객체에 대한 보다 구체적인 정보는 보고서 보기에서 확인하십시오. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. 파일을 불러오는 동안 심각한 오류가 발생했습니다. 일부 데이터가 수정되었거나 전혀 복구되지 않았을 수 있습니다. 프로젝트를 저장하면 데이터가 손실될 가능성이 높습니다. - + Loading %1... %1 불러오는 중... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser 외부 브라우저에서 열기 - + Open in new window 새 창에서 열기 - + View source 소스 보기 diff --git a/src/Mod/Web/Gui/Resources/translations/Web_nl.ts b/src/Mod/Web/Gui/Resources/translations/Web_nl.ts index 3b7c3c7377..8941b96383 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_nl.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_nl.ts @@ -129,12 +129,12 @@ QObject - + Browser Browser - + File does not exist! Bestand bestaat niet! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Fout - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Er zijn fouten opgetreden tijdens het laden van het bestand. Sommige gegevens zijn misschien gewijzigd of helemaal hersteld. Kijk in de rapportweergave voor meer specifieke informatie over de objecten die hierbij zijn betrokken. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Er zijn ernstige fouten opgetreden tijdens het laden van het bestand. Sommige gegevens zijn mogelijk gewijzigd of helemaal niet hersteld. Het opslaan van het project zal waarschijnlijk leiden tot data-verlies. - + Loading %1... Laden %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Open in externe Browser - + Open in new window In nieuw venster openen - + View source Bron weergeven diff --git a/src/Mod/Web/Gui/Resources/translations/Web_pl.ts b/src/Mod/Web/Gui/Resources/translations/Web_pl.ts index 85b5ab0600..436291e431 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_pl.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_pl.ts @@ -129,12 +129,12 @@ QObject - + Browser Przeglądarka - + File does not exist! Plik nie istnieje! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Błąd - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Podczas wczytywania pliku wystąpiły błędy. Niektóre dane mogły zostać zmodyfikowane lub w ogóle nie zostały odtworzone. Zajrzyj do widoku raportu w celu uzyskania bardziej szczegółowych informacji na temat obiektów, których to dotyczy. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Podczas ładowania pliku wystąpiły poważne błędy. Niektóre dane mogły zostać zmodyfikowane lub w ogóle nie zostały odzyskane. Zapisanie projektu najprawdopodobniej spowoduje utratę danych. - + Loading %1... Ładowanie %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Otwórz w zewnętrznej przeglądarce - + Open in new window Otwórz w nowym oknie - + View source Pokaż źródło diff --git a/src/Mod/Web/Gui/Resources/translations/Web_pt-BR.ts b/src/Mod/Web/Gui/Resources/translations/Web_pt-BR.ts index 52f0fcaba6..86b4f4ec0e 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_pt-BR.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_pt-BR.ts @@ -129,12 +129,12 @@ QObject - + Browser Navegador - + File does not exist! Esse arquivo não existe! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Erro - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Houve erros ao carregar o arquivo. Alguns dados podem ter sido modificados ou não recuperados. Veja a vista de relatório para obter informações mais específicas sobre os objetos envolvidos. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Ocorreram erros graves ao carregar o arquivo. Alguns dados podem ter sido modificados ou não recuperados. Salvar o projeto provavelmente resultará em perda de dados. - + Loading %1... Carregando %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Abrir em um navegador externo - + Open in new window Abrir em nova janela - + View source Ver fonte diff --git a/src/Mod/Web/Gui/Resources/translations/Web_pt-PT.ts b/src/Mod/Web/Gui/Resources/translations/Web_pt-PT.ts index fe56713b5b..a445cf27e2 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_pt-PT.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_pt-PT.ts @@ -129,12 +129,12 @@ QObject - + Browser Navegador - + File does not exist! O ficheiro não existe! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Erro - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Houve erros ao carregar o ficheiro. Alguns dados podem ter sido modificados ou não recuperados de todo. Veja a vista de relatório para obter informações mais específicas sobre os objetos envolvidos. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. - + Loading %1... Carregando %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Abrir em Navegador Externo - + Open in new window Abrir numa nova janela - + View source Ver código-fonte diff --git a/src/Mod/Web/Gui/Resources/translations/Web_ro.ts b/src/Mod/Web/Gui/Resources/translations/Web_ro.ts index 9d3c5e6784..dd42f7b8f2 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_ro.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_ro.ts @@ -129,12 +129,12 @@ QObject - + Browser Navigator - + File does not exist! Fișierul nu există! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Eroare - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Au existat erori în timpul încărcării fişierului. Unele date s-ar putea să fi fost modificate sau să se nu recupereze deloc. Uitați-vă în raportul vizualizării pentru mai multe informaţii specifice despre obiectele implicate. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Au existat erori grave în timpul încărcării fișierului. Unele date ar fi putut fi modificate sau nu au fost recuperate deloc. Salvarea proiectului va duce cel mai probabil la pierderea datelor. - + Loading %1... Se încarcă %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Deschide în navigator extern - + Open in new window Deschide intr-o fereastra noua - + View source Vezi sursa diff --git a/src/Mod/Web/Gui/Resources/translations/Web_ru.ts b/src/Mod/Web/Gui/Resources/translations/Web_ru.ts index efbbe1fb8b..9c3dffbd0f 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_ru.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_ru.ts @@ -129,12 +129,12 @@ QObject - + Browser Браузер - + File does not exist! Файл не существует! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Ошибка - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Произошли ошибки при загрузке файла. Возможно, некоторые данные были изменены или не восстановлены. Посмотрите в окно отчета для более конкретной информации о затронутых объектах. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. При загрузке файла произошли серьезные ошибки. Некоторые данные могли быть изменены или вообще не восстановлены. Сохранение проекта, скорее всего, приведет к потере данных. - + Loading %1... Загрузка %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Открыть во внешнем браузере - + Open in new window Открыть в новом окне - + View source Просмотр кода страницы diff --git a/src/Mod/Web/Gui/Resources/translations/Web_sl.ts b/src/Mod/Web/Gui/Resources/translations/Web_sl.ts index 42cea46b2e..c8f5d8bccc 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_sl.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_sl.ts @@ -129,12 +129,12 @@ QObject - + Browser Brskalnik - + File does not exist! Datoteka ne obstaja! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Napaka - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Med nalaganjem datoteke je prišlo do napake. Nekateri podatki so se lahko spremenili ali pa se sploh niso obnovili. Poglej v okno poročil za podrobnejše informacije o vpletenih objektih. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Pri nalaganju datoteke je prišlo do resnih napak. Določeni podatki so bili lahko spremenjeni ali pa sploh niso bili obnovljeni. Če projekt shranite, bo najverjetneje prišlo do izgube podatkov. - + Loading %1... Nalaganje %1 … @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Odpri v zunanjem brskalniku - + Open in new window Odpri v novem oknu - + View source Prikaz vira diff --git a/src/Mod/Web/Gui/Resources/translations/Web_sr-CS.ts b/src/Mod/Web/Gui/Resources/translations/Web_sr-CS.ts index e0f13be5d8..8fe97e203b 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_sr-CS.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_sr-CS.ts @@ -129,12 +129,12 @@ QObject - + Browser Pregledač - + File does not exist! Datoteka ne postoji! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Greška - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Došlo je do grešaka prilikom učitavanja datoteke. Neki podaci su možda izmenjeni ili uopšte nisu oporavljeni. U prikazu izveštaja potraži određenije informacije na ovu temu. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Došlo je do ozbiljnih grešaka pri učitavanju datoteke. Neki podaci su možda izmenjeni ili uopšte nisu vraćeni. Snimanje projekta će najverovatnije dovesti do gubitka podataka. - + Loading %1... Učitavam „%1“... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Otvori u spoljnom pregledaču - + Open in new window Otvori u novom prozoru - + View source Prikaži izvor diff --git a/src/Mod/Web/Gui/Resources/translations/Web_sr.ts b/src/Mod/Web/Gui/Resources/translations/Web_sr.ts index da200eb5f5..1885148b84 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_sr.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_sr.ts @@ -129,12 +129,12 @@ QObject - + Browser Прегледач - + File does not exist! Датотека не постоји! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Грешка - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Дошло је до грешака приликом учитавања датотеке. Неки подаци су можда измењени или уопште нису опорављени. У приказу извештаја потражи одређеније информације на ову тему. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Дошло је до озбиљних грешака при учитавању датотеке. Неки подаци су можда измењени или уопште нису враћени. Снимање пројекта ће највероватније довести до губитка података. - + Loading %1... Учитавам „%1“... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Отвори у спољном прегледачу - + Open in new window Отвори у новом прозору - + View source Прикажи извор diff --git a/src/Mod/Web/Gui/Resources/translations/Web_sv-SE.ts b/src/Mod/Web/Gui/Resources/translations/Web_sv-SE.ts index 71a77b2525..2b8fe0faef 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_sv-SE.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_sv-SE.ts @@ -129,12 +129,12 @@ QObject - + Browser Webbläsare - + File does not exist! Filen existerar inte! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Fel - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Det uppstod ett fel under inläsning av filen. Viss data kan ha ändrats eller inte återställts alls. Titta i rapportvyn för mer specifik information om de inblandade objekten. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Det uppstod allvarliga fel vid inläsning av filen. Vissa data kan ha ändrats eller inte återställts alls. Att spara projektet kommer sannolikt att resultera i förlust av data. - + Loading %1... Laddar %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Öppna i extern webbläsare - + Open in new window Öppna i nytt fönster - + View source Visa källa diff --git a/src/Mod/Web/Gui/Resources/translations/Web_tr.ts b/src/Mod/Web/Gui/Resources/translations/Web_tr.ts index 16edfcfac3..0af13a276a 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_tr.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_tr.ts @@ -129,12 +129,12 @@ QObject - + Browser Tarayıcı - + File does not exist! Dosya mevcut değil! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Hata - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Dosya yüklemesi esnasında hatalar vardı. Bazı veriler değiştirilmiş veya hiç kurtarılmamış olabilir. İlgili nesneler hakkında daha spesifik bilgi için rapor görünümüne bakın. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. Dosyayı yüklerken ciddi hatalar oluştu. Bazı veriler değiştirilmiş veya hiç kurtarılmamış olabilir. Projenin kaydedilmesi büyük olasılıkla veri kaybına neden olacaktır. - + Loading %1... Yükleniyor %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Dış tarayıcıda aç - + Open in new window Yeni pencerede aç - + View source Kaynağı görüntüle diff --git a/src/Mod/Web/Gui/Resources/translations/Web_uk.ts b/src/Mod/Web/Gui/Resources/translations/Web_uk.ts index 16cef4dbba..59bafb03c8 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_uk.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_uk.ts @@ -129,12 +129,12 @@ QObject - + Browser Браузер - + File does not exist! Файл не існує! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Помилка - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Під час завантаження файлу виникли помилки. Деякі дані, можливо, були змінені або взагалі не відновлені. Ознайомтесь зі звітом для більш отримання конкретної інформації щодо таких обʼєктів. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. При завантаженні файлу сталася серйозна помилка. Можливо, деякі дані були змінені або взагалі не відновлені. Збереження проєкту швидше за все, призведе до втрати даних. - + Loading %1... Завантаження %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Відкрити у зовнішньому браузері - + Open in new window Відкрити у новому вікні - + View source Переглянути вихідний код diff --git a/src/Mod/Web/Gui/Resources/translations/Web_val-ES.ts b/src/Mod/Web/Gui/Resources/translations/Web_val-ES.ts index 5c734b8c12..f70c453ce9 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_val-ES.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_val-ES.ts @@ -129,12 +129,12 @@ QObject - + Browser Navegador - + File does not exist! El fitxer no existeix. @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error Error - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. Hi hagué errors quan es carregava el fitxer. Algunes dades s'han pogut modificar o no s'han recuperat. Busqueu en la vista d'informes per a obtindre informació més específica sobre els objectes implicats. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. - + Loading %1... S'està carregant 1%... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser Obri en un navegador extern - + Open in new window Obri en una finestra nova - + View source Visualitza la vista diff --git a/src/Mod/Web/Gui/Resources/translations/Web_zh-CN.ts b/src/Mod/Web/Gui/Resources/translations/Web_zh-CN.ts index 602cdb222a..bdbc7ab1d5 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_zh-CN.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_zh-CN.ts @@ -129,12 +129,12 @@ QObject - + Browser 浏览器 - + File does not exist! 文件不存在! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error 错误 - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. 加载文件时出错。有些数据可能已经修改或未全部恢复。在报告视图中查看有关对象的更多信息。 - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. 加载文件时出现严重错误。有些数据可能已被修改或根本没有恢复。 保存项目很可能导致数据丢失。 - + Loading %1... 正在加载 %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser 在外部浏览器中打开 - + Open in new window 在新窗口中打开 - + View source 查看来源 diff --git a/src/Mod/Web/Gui/Resources/translations/Web_zh-TW.ts b/src/Mod/Web/Gui/Resources/translations/Web_zh-TW.ts index 02fcdf4542..b5e244ba11 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_zh-TW.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_zh-TW.ts @@ -129,12 +129,12 @@ QObject - + Browser 瀏覽器 - + File does not exist! 檔案不存在! @@ -142,24 +142,24 @@ WebGui::BrowserView - - - + + + Error 錯誤 - + There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. 載入檔案時出錯. 某些數據可能已被修改或根本未恢復. 查看報告來了解所涉及物件的更多具體資訊. - + There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. There were serious errors while loading the file. Some data might have been modified or not recovered at all. Saving the project will most likely result in loss of data. - + Loading %1... 載入 %1... @@ -167,17 +167,17 @@ WebGui::WebView - + Open in External Browser 於外部瀏覽器開啟 - + Open in new window 於新視窗中開啟 - + View source 檢視原始碼 diff --git a/src/Mod/Web/Gui/Workbench.cpp b/src/Mod/Web/Gui/Workbench.cpp index b3a55086c2..08f60fcad5 100644 --- a/src/Mod/Web/Gui/Workbench.cpp +++ b/src/Mod/Web/Gui/Workbench.cpp @@ -32,7 +32,7 @@ using namespace WebGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Navigation"); #endif @@ -43,26 +43,28 @@ Workbench::Workbench() = default; Workbench::~Workbench() = default; -void Workbench::setupContextMenu(const char* recipient,Gui::MenuItem* item) const +void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) const { Q_UNUSED(recipient); Q_UNUSED(item); - //if (strcmp(recipient,"View") == 0) + // if (strcmp(recipient,"View") == 0) //{ - // Gui::MenuItem* StdViews = new Gui::MenuItem(); - // StdViews->setCommand( "Standard views" ); + // Gui::MenuItem* StdViews = new Gui::MenuItem(); + // StdViews->setCommand( "Standard views" ); - // *StdViews << "Std_ViewAxo" << "Separator" << "Std_ViewFront" << "Std_ViewTop" << "Std_ViewRight" + // *StdViews << "Std_ViewAxo" << "Separator" << "Std_ViewFront" << "Std_ViewTop" << + // "Std_ViewRight" // << "Std_ViewRear" << "Std_ViewBottom" << "Std_ViewLeft"; // *item << "Std_ViewFitAll" << "Std_ViewFitSelection" << StdViews // << "Separator" << "Std_ViewDockUndockFullscreen"; // if ( Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 ) - // *item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_TreeSelection" + // *item << "Separator" << "Std_SetAppearance" << "Std_ToggleVisibility" << + // "Std_TreeSelection" // << "Std_RandomColor" << "Separator" << "Std_Delete"; //} - //else if (strcmp(recipient,"Tree") == 0) + // else if (strcmp(recipient,"Tree") == 0) //{ // if ( Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 ) // *item << "Std_SetAppearance" << "Std_ToggleVisibility" @@ -73,224 +75,231 @@ void Workbench::setupContextMenu(const char* recipient,Gui::MenuItem* item) cons Gui::MenuItem* Workbench::setupMenuBar() const { return Gui::StdWorkbench::setupMenuBar(); - //Gui::CommandManager &mgr = Gui::Application::Instance->commandManager(); + // Gui::CommandManager &mgr = Gui::Application::Instance->commandManager(); //// Setup the default menu bar - //Gui::MenuItem* menuBar = new Gui::MenuItem; + // Gui::MenuItem* menuBar = new Gui::MenuItem; -// // File -// Gui::MenuItem* file = new Gui::MenuItem( menuBar ); -// file->setCommand("&File"); -// *file << "Std_New" << "Std_Open" << "Separator" << "Std_CloseActiveWindow" -// << "Std_CloseAllWindows" << "Separator" << "Std_Save" << "Std_SaveAs" -// << "Separator" << "Std_Import" << "Std_Export" << "Std_ProjectInfo" -// //<< "Separator" << "Std_Print" << "Std_PrintPdf" -// << "Separator" << "Std_RecentFiles" << "Separator" << "Std_Quit"; -// -// // Edit -// Gui::MenuItem* edit = new Gui::MenuItem( menuBar ); -// edit->setCommand("&Edit"); -// *edit << "Std_Undo" << "Std_Redo" << "Separator" << "Std_Cut" << "Std_Copy" -// << "Std_Paste" << "Std_DuplicateSelection" << "Separator" -// << "Std_Refresh" << "Std_SelectAll" << "Std_Delete" << "Std_Placement" -// << "Separator" << "Std_DlgPreferences"; -// -// // Standard views -// Gui::MenuItem* stdviews = new Gui::MenuItem; -// stdviews->setCommand("Standard views"); -// *stdviews << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewAxo" -// << "Separator" << "Std_ViewFront" << "Std_ViewRight" -// << "Std_ViewTop" << "Separator" << "Std_ViewRear" -// << "Std_ViewLeft" << "Std_ViewBottom"; -// -// // stereo -// Gui::MenuItem* view3d = new Gui::MenuItem; -// view3d->setCommand("&Stereo"); -// *view3d << "Std_ViewIvStereoRedGreen" << "Std_ViewIvStereoQuadBuff" -// << "Std_ViewIvStereoInterleavedRows" << "Std_ViewIvStereoInterleavedColumns" -// << "Std_ViewIvStereoOff" << "Separator" << "Std_ViewIvIssueCamPos"; -// -// // zoom -// Gui::MenuItem* zoom = new Gui::MenuItem; -// zoom->setCommand("&Zoom"); -// *zoom << "Std_ViewZoomIn" << "Std_ViewZoomOut" << "Separator" << "Std_ViewBoxZoom"; -// -// // Visibility -// Gui::MenuItem* visu = new Gui::MenuItem; -// visu->setCommand("Visibility"); -// *visu << "Std_ToggleVisibility" << "Std_ShowSelection" << "Std_HideSelection" -// << "Separator" << "Std_ToggleObjects" << "Std_ShowObjects" << "Std_HideObjects"; -// -// // View -// Gui::MenuItem* view = new Gui::MenuItem( menuBar ); -// view->setCommand("&View"); -// *view << "Std_ViewCreate" << "Std_OrthographicCamera" << "Std_PerspectiveCamera" << "Separator" -// << stdviews << "Std_FreezeViews" << "Separator" << view3d << zoom -// << "Std_ViewDockUndockFullscreen" << "Std_ToggleClipPlane" << "Separator" << visu -// << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_RandomColor" << "Separator" -// //<< "Std_MeasureDistance" << "Separator" -// << "Std_Workbench" << "Std_ToolBarMenu" << "Std_DockViewMenu" << "Separator" -// << "Std_ViewStatusBar" << "Std_UserInterface"; -// -// // Tools -// Gui::MenuItem* tool = new Gui::MenuItem( menuBar ); -// tool->setCommand("&Tools"); -// *tool << "Std_CommandLine" << "Std_DlgParameter" << "Separator" << "Std_DlgMacroRecord" -// << "Std_MacroStopRecord" << "Std_DlgMacroExecute" << "Std_DlgMacroExecuteDirect" -// << "Separator" << "Std_ViewScreenShot" << "Separator" << "Std_DlgCustomize"; -// -// // Mesh **************************************************************************************************** -// Gui::MenuItem* mesh = new Gui::MenuItem( menuBar ); -// -// // submenu analyze -// Gui::MenuItem* analyze = new Gui::MenuItem(); -// analyze->setCommand("Analyze"); -// *analyze << "Mesh_Evaluation" -// << "Mesh_EvaluateFacet" -// << "Mesh_CurvatureInfo" -// << "Separator" -// << "Mesh_EvaluateSolid" -// << "Mesh_BoundingBox"; -// -// // submenu boolean -// Gui::MenuItem* boolean = new Gui::MenuItem(); -// boolean->setCommand("Boolean"); -// *boolean << "Mesh_Union" -// << "Mesh_Intersection" -// << "Mesh_Difference"; -// -// mesh->setCommand("&Meshes"); -// *mesh << "Mesh_Import" -// << "Mesh_Export" -// << "Mesh_FromGeometry" -// << "Separator" -// << analyze -// << "Mesh_HarmonizeNormals" -// << "Mesh_FlipNormals" -// << "Separator" -// << "Mesh_FillupHoles" -// << "Mesh_FillInteractiveHole" -// << "Mesh_RemoveComponents" -// << "Mesh_RemoveCompByHand" -// << "Separator" -// << "Mesh_BuildRegularSolid" -// << boolean << "Separator" -// << "Mesh_PolyCut" -// << "Mesh_PolySplit" -// << "Mesh_PolySegm" -// << "Mesh_ToolMesh" -// << "Mesh_VertexCurvature"; -// -// // Part **************************************************************************************************** -// -// Gui::MenuItem* part = new Gui::MenuItem(menuBar); -// part->setCommand("&Part"); -// -// // submenu boolean -// Gui::MenuItem* para = new Gui::MenuItem(); -// para->setCommand("Parametric"); -// *para << "Part_Box" -// << "Part_Cylinder" -// << "Part_Sphere" -// << "Part_Cone" -// << "Part_Torus" -// << "Part_Primitives"; -// *part << para -// << "Part_Boolean" -// << "Part_Extrude" -// << "Part_Revolve" -// << "Part_Fillet"; -// -//# ifdef WEB_SHOW_SKETCHER -// if (mgr.getCommandByName("Sketcher_NewSketch")) { -// Gui::MenuItem* sketch = new Gui::MenuItem(menuBar); -// sketch->setCommand("Ske&tch"); -// *sketch -// << "Sketcher_NewSketch" -// << "Separator" -// << "PartDesign_Pad" -// << "PartDesign_Fillet" -// ; -// } -//# endif -// -// // Drawing **************************************************************************************************** -// -// Gui::MenuItem* drawing = new Gui::MenuItem(menuBar); -// -// drawing->setCommand("&Drawing"); -// *drawing -// << "Drawing_Open" -// << "Separator" -// << "Drawing_NewA3Landscape" -// << "Drawing_NewView" -// << "Drawing_ExportPage" -// ; -// -// // Drafting **************************************************************************************************** -//# ifdef WEB_USE_DRAFTING -// if (mgr.getCommandByName("Draft_Line")) { -// Gui::MenuItem* Drafting = new Gui::MenuItem(menuBar); -// -// Drafting->setCommand("&Drafting"); -// *Drafting -// << "Draft_SelectPlane" -// << "Draft_Line" -// << "Draft_Polyline" -// << "Draft_Circle" -// << "Draft_Arc" -// << "Draft_Rectangle" -// << "Draft_Text" -// << "Draft_Dimension" -// << "Separator" -// << "Draft_Move" -// << "Draft_Rotate" -// << "Draft_Offset" -// << "Draft_Trimex" -// << "Draft_Upgrade" -// << "Draft_Downgrade" -// << "Draft_Scale" -// << "Separator" -// << "Draft_ApplyStyle" -// ; -// } -//# endif -// -// // xxx **************************************************************************************************** -// -// -// // Windows -// Gui::MenuItem* wnd = new Gui::MenuItem( menuBar ); -// wnd->setCommand("&Windows"); -// *wnd << "Std_ActivateNextWindow" << "Std_ActivatePrevWindow" << "Separator" -// << "Std_TileWindows" << "Std_CascadeWindows" << "Separator" -// << "Std_WindowsMenu" << "Std_Windows"; -// -// // help **************************************************************************************************** -// // Separator -// Gui::MenuItem* sep = new Gui::MenuItem( menuBar ); -// sep->setCommand( "Separator" ); -// -// // Help -// Gui::MenuItem* helpWebsites = new Gui::MenuItem; -// helpWebsites->setCommand("&Online-help"); -// *helpWebsites << "Std_OnlineHelpWebsite" -// << "Std_FreeCADWebsite" -// << "Std_PythonWebsite"; -// -// Gui::MenuItem* help = new Gui::MenuItem( menuBar ); -// help->setCommand("&Help"); -// *help << "Std_OnlineHelp" -// << "Std_PythonHelp" -// << helpWebsites -// << "Separator" -// << "Test_Test" -// << "Separator" -// << "Std_About" -// << "Std_AboutQt" -// << "Separator" -// << "Std_WhatsThis" ; -// -// return menuBar; + // // File + // Gui::MenuItem* file = new Gui::MenuItem( menuBar ); + // file->setCommand("&File"); + // *file << "Std_New" << "Std_Open" << "Separator" << "Std_CloseActiveWindow" + // << "Std_CloseAllWindows" << "Separator" << "Std_Save" << "Std_SaveAs" + // << "Separator" << "Std_Import" << "Std_Export" << "Std_ProjectInfo" + // //<< "Separator" << "Std_Print" << "Std_PrintPdf" + // << "Separator" << "Std_RecentFiles" << "Separator" << "Std_Quit"; + // + // // Edit + // Gui::MenuItem* edit = new Gui::MenuItem( menuBar ); + // edit->setCommand("&Edit"); + // *edit << "Std_Undo" << "Std_Redo" << "Separator" << "Std_Cut" << "Std_Copy" + // << "Std_Paste" << "Std_DuplicateSelection" << "Separator" + // << "Std_Refresh" << "Std_SelectAll" << "Std_Delete" << "Std_Placement" + // << "Separator" << "Std_DlgPreferences"; + // + // // Standard views + // Gui::MenuItem* stdviews = new Gui::MenuItem; + // stdviews->setCommand("Standard views"); + // *stdviews << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewAxo" + // << "Separator" << "Std_ViewFront" << "Std_ViewRight" + // << "Std_ViewTop" << "Separator" << "Std_ViewRear" + // << "Std_ViewLeft" << "Std_ViewBottom"; + // + // // stereo + // Gui::MenuItem* view3d = new Gui::MenuItem; + // view3d->setCommand("&Stereo"); + // *view3d << "Std_ViewIvStereoRedGreen" << "Std_ViewIvStereoQuadBuff" + // << "Std_ViewIvStereoInterleavedRows" << "Std_ViewIvStereoInterleavedColumns" + // << "Std_ViewIvStereoOff" << "Separator" << "Std_ViewIvIssueCamPos"; + // + // // zoom + // Gui::MenuItem* zoom = new Gui::MenuItem; + // zoom->setCommand("&Zoom"); + // *zoom << "Std_ViewZoomIn" << "Std_ViewZoomOut" << "Separator" << "Std_ViewBoxZoom"; + // + // // Visibility + // Gui::MenuItem* visu = new Gui::MenuItem; + // visu->setCommand("Visibility"); + // *visu << "Std_ToggleVisibility" << "Std_ShowSelection" << "Std_HideSelection" + // << "Separator" << "Std_ToggleObjects" << "Std_ShowObjects" << "Std_HideObjects"; + // + // // View + // Gui::MenuItem* view = new Gui::MenuItem( menuBar ); + // view->setCommand("&View"); + // *view << "Std_ViewCreate" << "Std_OrthographicCamera" << "Std_PerspectiveCamera" << + // "Separator" + // << stdviews << "Std_FreezeViews" << "Separator" << view3d << zoom + // << "Std_ViewDockUndockFullscreen" << "Std_ToggleClipPlane" << "Separator" << visu + // << "Std_SetAppearance" << "Std_ToggleVisibility" << "Std_RandomColor" << "Separator" + // //<< "Std_MeasureDistance" << "Separator" + // << "Std_Workbench" << "Std_ToolBarMenu" << "Std_DockViewMenu" << "Separator" + // << "Std_ViewStatusBar" << "Std_UserInterface"; + // + // // Tools + // Gui::MenuItem* tool = new Gui::MenuItem( menuBar ); + // tool->setCommand("&Tools"); + // *tool << "Std_CommandLine" << "Std_DlgParameter" << "Separator" << "Std_DlgMacroRecord" + // << "Std_MacroStopRecord" << "Std_DlgMacroExecute" << "Std_DlgMacroExecuteDirect" + // << "Separator" << "Std_ViewScreenShot" << "Separator" << "Std_DlgCustomize"; + // + // // Mesh + // **************************************************************************************************** + // Gui::MenuItem* mesh = new Gui::MenuItem( menuBar ); + // + // // submenu analyze + // Gui::MenuItem* analyze = new Gui::MenuItem(); + // analyze->setCommand("Analyze"); + // *analyze << "Mesh_Evaluation" + // << "Mesh_EvaluateFacet" + // << "Mesh_CurvatureInfo" + // << "Separator" + // << "Mesh_EvaluateSolid" + // << "Mesh_BoundingBox"; + // + // // submenu boolean + // Gui::MenuItem* boolean = new Gui::MenuItem(); + // boolean->setCommand("Boolean"); + // *boolean << "Mesh_Union" + // << "Mesh_Intersection" + // << "Mesh_Difference"; + // + // mesh->setCommand("&Meshes"); + // *mesh << "Mesh_Import" + // << "Mesh_Export" + // << "Mesh_FromGeometry" + // << "Separator" + // << analyze + // << "Mesh_HarmonizeNormals" + // << "Mesh_FlipNormals" + // << "Separator" + // << "Mesh_FillupHoles" + // << "Mesh_FillInteractiveHole" + // << "Mesh_RemoveComponents" + // << "Mesh_RemoveCompByHand" + // << "Separator" + // << "Mesh_BuildRegularSolid" + // << boolean << "Separator" + // << "Mesh_PolyCut" + // << "Mesh_PolySplit" + // << "Mesh_PolySegm" + // << "Mesh_ToolMesh" + // << "Mesh_VertexCurvature"; + // + // // Part + // **************************************************************************************************** + // + // Gui::MenuItem* part = new Gui::MenuItem(menuBar); + // part->setCommand("&Part"); + // + // // submenu boolean + // Gui::MenuItem* para = new Gui::MenuItem(); + // para->setCommand("Parametric"); + // *para << "Part_Box" + // << "Part_Cylinder" + // << "Part_Sphere" + // << "Part_Cone" + // << "Part_Torus" + // << "Part_Primitives"; + // *part << para + // << "Part_Boolean" + // << "Part_Extrude" + // << "Part_Revolve" + // << "Part_Fillet"; + // + // # ifdef WEB_SHOW_SKETCHER + // if (mgr.getCommandByName("Sketcher_NewSketch")) { + // Gui::MenuItem* sketch = new Gui::MenuItem(menuBar); + // sketch->setCommand("Ske&tch"); + // *sketch + // << "Sketcher_NewSketch" + // << "Separator" + // << "PartDesign_Pad" + // << "PartDesign_Fillet" + // ; + // } + // # endif + // + // // Drawing + // **************************************************************************************************** + // + // Gui::MenuItem* drawing = new Gui::MenuItem(menuBar); + // + // drawing->setCommand("&Drawing"); + // *drawing + // << "Drawing_Open" + // << "Separator" + // << "Drawing_NewA3Landscape" + // << "Drawing_NewView" + // << "Drawing_ExportPage" + // ; + // + // // Drafting + // **************************************************************************************************** + // # ifdef WEB_USE_DRAFTING + // if (mgr.getCommandByName("Draft_Line")) { + // Gui::MenuItem* Drafting = new Gui::MenuItem(menuBar); + // + // Drafting->setCommand("&Drafting"); + // *Drafting + // << "Draft_SelectPlane" + // << "Draft_Line" + // << "Draft_Polyline" + // << "Draft_Circle" + // << "Draft_Arc" + // << "Draft_Rectangle" + // << "Draft_Text" + // << "Draft_Dimension" + // << "Separator" + // << "Draft_Move" + // << "Draft_Rotate" + // << "Draft_Offset" + // << "Draft_Trimex" + // << "Draft_Upgrade" + // << "Draft_Downgrade" + // << "Draft_Scale" + // << "Separator" + // << "Draft_ApplyStyle" + // ; + // } + // # endif + // + // // xxx + // **************************************************************************************************** + // + // + // // Windows + // Gui::MenuItem* wnd = new Gui::MenuItem( menuBar ); + // wnd->setCommand("&Windows"); + // *wnd << "Std_ActivateNextWindow" << "Std_ActivatePrevWindow" << "Separator" + // << "Std_TileWindows" << "Std_CascadeWindows" << "Separator" + // << "Std_WindowsMenu" << "Std_Windows"; + // + // // help + // **************************************************************************************************** + // // Separator + // Gui::MenuItem* sep = new Gui::MenuItem( menuBar ); + // sep->setCommand( "Separator" ); + // + // // Help + // Gui::MenuItem* helpWebsites = new Gui::MenuItem; + // helpWebsites->setCommand("&Online-help"); + // *helpWebsites << "Std_OnlineHelpWebsite" + // << "Std_FreeCADWebsite" + // << "Std_PythonWebsite"; + // + // Gui::MenuItem* help = new Gui::MenuItem( menuBar ); + // help->setCommand("&Help"); + // *help << "Std_OnlineHelp" + // << "Std_PythonHelp" + // << helpWebsites + // << "Separator" + // << "Test_Test" + // << "Separator" + // << "Std_About" + // << "Std_AboutQt" + // << "Separator" + // << "Std_WhatsThis" ; + // + // return menuBar; } Gui::ToolBarItem* Workbench::setupToolBars() const @@ -313,7 +322,6 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "Web_BrowserZoomOut"; return root; - } Gui::ToolBarItem* Workbench::setupCommandBars() const @@ -325,7 +333,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const Gui::DockWindowItems* Workbench::setupDockWindows() const { Gui::DockWindowItems* root = Gui::StdWorkbench::setupDockWindows(); - //root->setVisibility(false); // hide all dock windows by default - //root->setVisibility("Std_ComboView",true); // except of the combo view + // root->setVisibility(false); // hide all dock windows by default + // root->setVisibility("Std_ComboView",true); // except of the combo view return root; } diff --git a/src/Mod/Web/Gui/Workbench.h b/src/Mod/Web/Gui/Workbench.h index fd8be1669e..580ae0d6e5 100644 --- a/src/Mod/Web/Gui/Workbench.h +++ b/src/Mod/Web/Gui/Workbench.h @@ -26,21 +26,22 @@ #include -namespace WebGui { +namespace WebGui +{ /** * @author Werner Mayer */ -class Workbench : public Gui::StdWorkbench +class Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - Workbench(); - ~Workbench() override; + Workbench(); + ~Workbench() override; /** Defines the standard context menu. */ - void setupContextMenu(const char* recipient,Gui::MenuItem*) const override; + void setupContextMenu(const char* recipient, Gui::MenuItem*) const override; protected: /** Defines the standard menus. */ @@ -53,7 +54,7 @@ protected: Gui::DockWindowItems* setupDockWindows() const override; -}; // namespace WebGui +}; // namespace WebGui -} -#endif // WEB_WORKBENCH_H +} // namespace WebGui +#endif // WEB_WORKBENCH_H diff --git a/src/Mod/Web/Init.py b/src/Mod/Web/Init.py index 45cc57a7fd..2a380dc8fe 100644 --- a/src/Mod/Web/Init.py +++ b/src/Mod/Web/Init.py @@ -1,24 +1,24 @@ -#*************************************************************************** -#* Copyright (c) 2001,2002 Jürgen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2001,2002 Jürgen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ # FreeCAD init script of the Web module diff --git a/src/Mod/Web/InitGui.py b/src/Mod/Web/InitGui.py index 5c708f32af..8120cbbf05 100644 --- a/src/Mod/Web/InitGui.py +++ b/src/Mod/Web/InitGui.py @@ -1,24 +1,24 @@ -#*************************************************************************** -#* Copyright (c) 2002,2003 Jürgen Riegel * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2002,2003 Jürgen Riegel * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# ***************************************************************************/ # Web gui init module # @@ -27,8 +27,9 @@ # runs when the gui is up -class WebWorkbench ( Workbench ): +class WebWorkbench(Workbench): "Web workbench object" + def __init__(self): self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Web/Resources/icons/WebWorkbench.svg" self.__class__.MenuText = "Web" @@ -41,9 +42,10 @@ class WebWorkbench ( Workbench ): def GetClassName(self): return "WebGui::Workbench" + Gui.addWorkbench(WebWorkbench()) # Append the open handler FreeCAD.addImportType("Web Page (*.html *.xhtml)", "WebGui") -FreeCAD.__unit_test__ += [ "TestWebGui" ] +FreeCAD.__unit_test__ += ["TestWebGui"] diff --git a/src/Mod/Web/TestWebGui.py b/src/Mod/Web/TestWebGui.py index 616bfe55fd..d946a710c6 100644 --- a/src/Mod/Web/TestWebGui.py +++ b/src/Mod/Web/TestWebGui.py @@ -1,4 +1,4 @@ -#************************************************************************** +# ************************************************************************** # Copyright (c) 2018 Werner Mayer * # * # This file is part of the FreeCAD CAx development system. * @@ -18,12 +18,13 @@ # License along with FreeCAD; if not, write to the Free Software * # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * # USA * -#************************************************************************** +# ************************************************************************** import FreeCAD, os, sys, unittest, WebGui + class WebGuiTestCases(unittest.TestCase): def testHtmlCase(self): - bytestr=b'Fran\xc3\xa7ais' - browser=WebGui.openBrowserWindow('Browser') + bytestr = b"Fran\xc3\xa7ais" + browser = WebGui.openBrowserWindow("Browser") browser.setHtml(bytestr.decode("utf8"), FreeCAD.getResourceDir()) diff --git a/src/Mod/Web/WebGlobal.h b/src/Mod/Web/WebGlobal.h index ef95e0577e..6d216cbff7 100644 --- a/src/Mod/Web/WebGlobal.h +++ b/src/Mod/Web/WebGlobal.h @@ -29,19 +29,19 @@ // Web #ifndef WebExport #ifdef Web_EXPORTS -# define WebExport FREECAD_DECL_EXPORT +#define WebExport FREECAD_DECL_EXPORT #else -# define WebExport FREECAD_DECL_IMPORT +#define WebExport FREECAD_DECL_IMPORT #endif #endif // WebGui #ifndef WebGuiExport #ifdef WebGui_EXPORTS -# define WebGuiExport FREECAD_DECL_EXPORT +#define WebGuiExport FREECAD_DECL_EXPORT #else -# define WebGuiExport FREECAD_DECL_IMPORT +#define WebGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //WEB_GLOBAL_H +#endif // WEB_GLOBAL_H diff --git a/src/Mod/Web/web.dox b/src/Mod/Web/web.dox index e4001bf27a..ea2fd864e6 100644 --- a/src/Mod/Web/web.dox +++ b/src/Mod/Web/web.dox @@ -5,4 +5,3 @@ See \ref src/Mod/Draft/draft.dox as an example of how to populate this page */ - diff --git a/src/Tools/DownloadStatistics.py b/src/Tools/DownloadStatistics.py deleted file mode 100644 index d335cb52de..0000000000 --- a/src/Tools/DownloadStatistics.py +++ /dev/null @@ -1,8 +0,0 @@ -import requests - -r = requests.get("https://api.github.com/repos/FreeCAD/FreeCAD/releases") -myobj = r.json() -for p in myobj: - if "assets" in p: - for asset in p["assets"]: - print(asset["name"] + ": " + str(asset["download_count"]) + " downloads") diff --git a/src/Tools/RegExp/regexpdialog.cpp b/src/Tools/RegExp/regexpdialog.cpp index 50619d856d..23a24db5fd 100644 --- a/src/Tools/RegExp/regexpdialog.cpp +++ b/src/Tools/RegExp/regexpdialog.cpp @@ -31,8 +31,8 @@ #include RegExpDialog::RegExpDialog(QWidget* parent) - : QDialog(parent), - ui(new Ui_RegExpDialog()) + : QDialog(parent) + , ui(new Ui_RegExpDialog()) { ui->setupUi(this); rxhilighter = new RegExpSyntaxHighlighter(ui->textEdit1); @@ -43,14 +43,20 @@ RegExpDialog::RegExpDialog(QWidget* parent) connect(ui->lineEditRegExp, &QLineEdit::textChanged, this, &RegExpDialog::performRegExp); connect(ui->caseInsensitiveOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp); connect(ui->invertedGreedinessOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp); - connect( - ui->dotMatchesEverythingOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp); + connect(ui->dotMatchesEverythingOption, + &QCheckBox::toggled, + this, + &RegExpDialog::performRegExp); connect(ui->multilineOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp); - connect( - ui->extendedPatternSyntaxOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp); + connect(ui->extendedPatternSyntaxOption, + &QCheckBox::toggled, + this, + &RegExpDialog::performRegExp); connect(ui->dontCaptureOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp); - connect( - ui->useUnicodePropertiesOption, &QCheckBox::toggled, this, &RegExpDialog::performRegExp); + connect(ui->useUnicodePropertiesOption, + &QCheckBox::toggled, + this, + &RegExpDialog::performRegExp); } RegExpDialog::~RegExpDialog() @@ -101,7 +107,7 @@ void RegExpDialog::performRegExp() ui->textLabel4->setText(rx.errorString()); if (!rx.isValid()) { rxhilighter->resethighlight(); - return;// invalid expression + return; // invalid expression } rxhilighter->highlightMatchedText(rx); @@ -130,8 +136,9 @@ void RegExpSyntaxHighlighter::highlightBlock(const QString& text) regFormat.setFontWeight(QFont::Normal); setFormat(0, text.length(), regFormat); - if (regexp.pattern().isEmpty()) - return;// empty regular expression + if (regexp.pattern().isEmpty()) { + return; // empty regular expression + } int pos = 0; int last = -1; @@ -140,8 +147,9 @@ void RegExpSyntaxHighlighter::highlightBlock(const QString& text) QRegularExpressionMatch match; while ((pos = text.indexOf(regexp, pos, &match)) != -1) { - if (last == pos) + if (last == pos) { break; + } QString sub = text.mid(pos, match.capturedLength()); if (!sub.isEmpty()) { setFormat(pos, sub.length(), regFormat); diff --git a/src/Tools/RegExp/regexpdialog.h b/src/Tools/RegExp/regexpdialog.h index b3fdbd3385..b705b92297 100644 --- a/src/Tools/RegExp/regexpdialog.h +++ b/src/Tools/RegExp/regexpdialog.h @@ -66,4 +66,4 @@ private: QRegularExpression regexp; }; -#endif// REG_EXP_DIALOG_H +#endif // REG_EXP_DIALOG_H diff --git a/src/Tools/ThumbnailProvider/ClassFactory.cpp b/src/Tools/ThumbnailProvider/ClassFactory.cpp index 4f04bb9ba1..05532450b1 100644 --- a/src/Tools/ThumbnailProvider/ClassFactory.cpp +++ b/src/Tools/ThumbnailProvider/ClassFactory.cpp @@ -61,16 +61,18 @@ STDMETHODIMP_(ULONG) CClassFactory::AddRef() STDMETHODIMP_(ULONG) CClassFactory::Release() { LONG cRef = InterlockedDecrement(&m_cRef); - if (0 == cRef) + if (0 == cRef) { delete this; + } return (ULONG)cRef; } STDMETHODIMP CClassFactory::CreateInstance(IUnknown* punkOuter, REFIID riid, void** ppvObject) { - if (NULL != punkOuter) + if (NULL != punkOuter) { return CLASS_E_NOAGGREGATION; + } return CThumbnailProvider_CreateInstance(riid, ppvObject); } @@ -84,18 +86,21 @@ STDMETHODIMP CClassFactory::LockServer(BOOL fLock) STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv) { - if (NULL == ppv) + if (NULL == ppv) { return E_INVALIDARG; + } - if (!IsEqualCLSID(CLSID_SampleThumbnailProvider, rclsid)) + if (!IsEqualCLSID(CLSID_SampleThumbnailProvider, rclsid)) { return CLASS_E_CLASSNOTAVAILABLE; + } CClassFactory* pcf; HRESULT hr; pcf = new CClassFactory(); - if (NULL == pcf) + if (NULL == pcf) { return E_OUTOFMEMORY; + } hr = pcf->QueryInterface(riid, ppv); pcf->Release(); diff --git a/src/Tools/ThumbnailProvider/Common.h b/src/Tools/ThumbnailProvider/Common.h index ddcb70db8d..b766f9daff 100644 --- a/src/Tools/ThumbnailProvider/Common.h +++ b/src/Tools/ThumbnailProvider/Common.h @@ -36,5 +36,15 @@ STDAPI_(HINSTANCE) DllInstance(); // {4BBBEAB5-BE00-41f4-A209-FE838660B9B1} #define szCLSID_SampleThumbnailProvider L"{4BBBEAB5-BE00-41f4-A209-FE838660B9B1}" -DEFINE_GUID(CLSID_SampleThumbnailProvider, 0x4bbbeab5, 0xbe00, 0x41f4, 0xa2, 0x9, 0xfe, 0x83, 0x86, - 0x60, 0xb9, 0xb1); +DEFINE_GUID(CLSID_SampleThumbnailProvider, + 0x4bbbeab5, + 0xbe00, + 0x41f4, + 0xa2, + 0x9, + 0xfe, + 0x83, + 0x86, + 0x60, + 0xb9, + 0xb1); diff --git a/src/Tools/ThumbnailProvider/FCConfig.h b/src/Tools/ThumbnailProvider/FCConfig.h index f144b7e027..91723c4bcf 100644 --- a/src/Tools/ThumbnailProvider/FCConfig.h +++ b/src/Tools/ThumbnailProvider/FCConfig.h @@ -49,7 +49,7 @@ #if defined(__MINGW32__) #if HAVE_CONFIG_H #include -#endif// HAVE_CONFIG_H +#endif // HAVE_CONFIG_H #endif #elif defined(__MWERKS__) && defined(__INTEL__) #ifndef FC_OS_WIN32 @@ -162,7 +162,7 @@ typedef unsigned __int64 uint64_t; // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER #pragma warning(disable : 4251) -#pragma warning(disable : 4996)// suppress deprecated warning for e.g. open() +#pragma warning(disable : 4996) // suppress deprecated warning for e.g. open() #if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) #pragma warning(disable : 4244) #pragma warning(disable : 4267) @@ -170,4 +170,4 @@ typedef unsigned __int64 uint64_t; #endif -#endif// FC_CONFIG_H +#endif // FC_CONFIG_H diff --git a/src/Tools/ThumbnailProvider/Main.cpp b/src/Tools/ThumbnailProvider/Main.cpp index 48dcc8480e..dd5c695fe1 100644 --- a/src/Tools/ThumbnailProvider/Main.cpp +++ b/src/Tools/ThumbnailProvider/Main.cpp @@ -78,8 +78,9 @@ STDAPI_(ULONG) DllAddRef() STDAPI_(ULONG) DllRelease() { LONG cRef = InterlockedDecrement(&g_cRef); - if (0 > cRef) + if (0 > cRef) { cRef = 0; + } return cRef; } @@ -170,8 +171,12 @@ STDAPI CreateRegistryKey(REGKEY_SUBKEY_AND_VALUE* pKey) } if (SUCCEEDED(hr)) { - LSTATUS status = SHSetValue( - pKey->hKey, pKey->lpszSubKey, pKey->lpszValue, pKey->dwType, pvData, (DWORD)cbData); + LSTATUS status = SHSetValue(pKey->hKey, + pKey->lpszSubKey, + pKey->lpszValue, + pKey->dwType, + pvData, + (DWORD)cbData); if (NOERROR != status) { hr = HRESULT_FROM_WIN32(status); } diff --git a/src/Tools/ThumbnailProvider/ThumbnailProvider.cpp b/src/Tools/ThumbnailProvider/ThumbnailProvider.cpp index 56c67706ce..7a48e06a5f 100644 --- a/src/Tools/ThumbnailProvider/ThumbnailProvider.cpp +++ b/src/Tools/ThumbnailProvider/ThumbnailProvider.cpp @@ -48,13 +48,15 @@ IStream* CreateStreamOnResource(void* buffer, size_t length) // allocate memory to hold the resource data HGLOBAL hgblResourceData = GlobalAlloc(GMEM_MOVEABLE, length); - if (hgblResourceData == NULL) + if (hgblResourceData == NULL) { goto Return; + } // get a pointer to the allocated memory LPVOID pvResourceData = GlobalLock(hgblResourceData); - if (pvResourceData == NULL) + if (pvResourceData == NULL) { goto FreeData; + } // copy the data from the resource to the new memory block CopyMemory(pvResourceData, buffer, length); @@ -62,8 +64,9 @@ IStream* CreateStreamOnResource(void* buffer, size_t length) // create a stream on the HGLOBAL containing the data - if (SUCCEEDED(CreateStreamOnHGlobal(hgblResourceData, TRUE, &ipStream))) + if (SUCCEEDED(CreateStreamOnHGlobal(hgblResourceData, TRUE, &ipStream))) { goto Return; + } FreeData: // couldn't create stream; free the memory @@ -86,22 +89,26 @@ IWICBitmapSource* LoadBitmapFromStream(IStream* ipImageStream) NULL, CLSCTX_INPROC_SERVER, __uuidof(ipDecoder), - reinterpret_cast(&ipDecoder)))) + reinterpret_cast(&ipDecoder)))) { goto Return; + } // load the PNG - if (FAILED(ipDecoder->Initialize(ipImageStream, WICDecodeMetadataCacheOnLoad))) + if (FAILED(ipDecoder->Initialize(ipImageStream, WICDecodeMetadataCacheOnLoad))) { goto ReleaseDecoder; + } // check for the presence of the first frame in the bitmap UINT nFrameCount = 0; - if (FAILED(ipDecoder->GetFrameCount(&nFrameCount)) || nFrameCount != 1) + if (FAILED(ipDecoder->GetFrameCount(&nFrameCount)) || nFrameCount != 1) { goto ReleaseDecoder; + } // load the first frame (i.e., the image) IWICBitmapFrameDecode* ipFrame = NULL; - if (FAILED(ipDecoder->GetFrame(0, &ipFrame))) + if (FAILED(ipDecoder->GetFrame(0, &ipFrame))) { goto ReleaseDecoder; + } // convert the image to 32bpp BGRA format with pre-multiplied alpha // (it may not be stored in that format natively in the PNG resource, @@ -123,8 +130,9 @@ HBITMAP CreateHBITMAP(IWICBitmapSource* ipBitmap) // get image attributes and check for valid image UINT width = 0; UINT height = 0; - if (FAILED(ipBitmap->GetSize(&width, &height)) || width == 0 || height == 0) + if (FAILED(ipBitmap->GetSize(&width, &height)) || width == 0 || height == 0) { goto Return; + } // prepare structure giving bitmap information (negative height indicates a top-down DIB) BITMAPINFO bminfo; @@ -141,8 +149,9 @@ HBITMAP CreateHBITMAP(IWICBitmapSource* ipBitmap) HDC hdcScreen = GetDC(NULL); hbmp = CreateDIBSection(hdcScreen, &bminfo, DIB_RGB_COLORS, &pvImageBits, NULL, 0); ReleaseDC(NULL, hdcScreen); - if (hbmp == NULL) + if (hbmp == NULL) { goto Return; + } // extract the image into the HBITMAP @@ -200,8 +209,9 @@ STDMETHODIMP_(ULONG) CThumbnailProvider::AddRef() STDMETHODIMP_(ULONG) CThumbnailProvider::Release() { LONG cRef = InterlockedDecrement(&m_cRef); - if (0 == cRef) + if (0 == cRef) { delete this; + } return (ULONG)cRef; } @@ -224,10 +234,12 @@ bool CThumbnailProvider::CheckZip() const unsigned char pk[4] = {0x50, 0x4b, 0x03, 0x04}; for (int i = 0; i < 4; i++) { unsigned char c; - if (!zip.get((char&)c)) + if (!zip.get((char&)c)) { return false; - if (c != pk[i]) + } + if (c != pk[i]) { return false; + } } return true; @@ -237,15 +249,17 @@ STDMETHODIMP CThumbnailProvider::GetThumbnail(UINT cx, HBITMAP* phbmp, WTS_ALPHA { try { // first make sure we have a zip file but that might still be invalid - if (!CheckZip()) + if (!CheckZip()) { return NOERROR; + } std::ifstream file(m_szFile, std::ios::in | std::ios::binary); zipios::ZipInputStream zipstream(file); zipios::ConstEntryPointer entry; entry = zipstream.getNextEntry(); - while (entry->isValid() && entry->getName() != "thumbnails/Thumbnail.png") + while (entry->isValid() && entry->getName() != "thumbnails/Thumbnail.png") { entry = zipstream.getNextEntry(); + } if (entry && entry->isValid()) { // ok, we have found the file. Now, read it in byte for byte std::istream* str = &zipstream; diff --git a/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp b/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp index 37a3fb31ed..e4f4e0e6f6 100644 --- a/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp +++ b/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp @@ -42,7 +42,7 @@ public: Module() : Py::ExtensionModule("_TEMPLATE_") { - initialize("This module is the _TEMPLATE_ module.");// register with Python + initialize("This module is the _TEMPLATE_ module."); // register with Python } virtual ~Module() @@ -57,7 +57,7 @@ PyObject* initModule() } -}// namespace _TEMPLATE_ +} // namespace _TEMPLATE_ /* Python entry */ diff --git a/src/Tools/_TEMPLATE_/App/PreCompiled.h b/src/Tools/_TEMPLATE_/App/PreCompiled.h index ba4f3063e3..597dc8f8b5 100644 --- a/src/Tools/_TEMPLATE_/App/PreCompiled.h +++ b/src/Tools/_TEMPLATE_/App/PreCompiled.h @@ -29,7 +29,7 @@ // Exporting of App classes #ifdef FC_OS_WIN32 #define _TEMPLATE_AppExport __declspec(dllexport) -#else// for Linux +#else // for Linux #define _TEMPLATE_AppExport #endif @@ -55,6 +55,6 @@ // Xerces #include -#endif//_PreComp_ +#endif //_PreComp_ #endif diff --git a/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp b/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp index 6206d76462..da3fc6cd6f 100644 --- a/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp +++ b/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp @@ -48,7 +48,7 @@ public: Module() : Py::ExtensionModule("_TEMPLATE_Gui") { - initialize("This module is the _TEMPLATE_Gui module.");// register with Python + initialize("This module is the _TEMPLATE_Gui module."); // register with Python } virtual ~Module() @@ -62,7 +62,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -}// namespace _TEMPLATE_Gui +} // namespace _TEMPLATE_Gui /* Python entry */ diff --git a/src/Tools/_TEMPLATE_/Gui/PreCompiled.h b/src/Tools/_TEMPLATE_/Gui/PreCompiled.h index 25852981af..d1550781f4 100644 --- a/src/Tools/_TEMPLATE_/Gui/PreCompiled.h +++ b/src/Tools/_TEMPLATE_/Gui/PreCompiled.h @@ -34,7 +34,7 @@ #ifdef FC_OS_WIN32 #define _TEMPLATE_AppExport __declspec(dllimport) #define _TEMPLATE_GuiExport __declspec(dllexport) -#else// for Linux +#else // for Linux #define _TEMPLATE_AppExport #define _TEMPLATE_GuiExport #endif @@ -66,6 +66,6 @@ #include #endif -#endif//_PreComp_ +#endif //_PreComp_ -#endif// GUI_PRECOMPILED_H +#endif // GUI_PRECOMPILED_H diff --git a/src/Tools/_TEMPLATE_/Gui/Workbench.h b/src/Tools/_TEMPLATE_/Gui/Workbench.h index faa0603f2e..962f792939 100644 --- a/src/Tools/_TEMPLATE_/Gui/Workbench.h +++ b/src/Tools/_TEMPLATE_/Gui/Workbench.h @@ -42,7 +42,7 @@ protected: Gui::ToolBarItem* setupToolBars() const; }; -}// namespace _TEMPLATE_Gui +} // namespace _TEMPLATE_Gui -#endif// _TEMPLATE__WORKBENCH_H +#endif // _TEMPLATE__WORKBENCH_H diff --git a/src/Tools/_TEMPLATE_/_TEMPLATE_Global.h b/src/Tools/_TEMPLATE_/_TEMPLATE_Global.h index 9984aa6984..bab8d7defa 100644 --- a/src/Tools/_TEMPLATE_/_TEMPLATE_Global.h +++ b/src/Tools/_TEMPLATE_/_TEMPLATE_Global.h @@ -44,4 +44,4 @@ #endif #endif -#endif//_TEMPLATE__GLOBAL_H +#endif //_TEMPLATE__GLOBAL_H diff --git a/src/Tools/astylerc b/src/Tools/astylerc deleted file mode 100644 index 35a82136e9..0000000000 --- a/src/Tools/astylerc +++ /dev/null @@ -1,30 +0,0 @@ -# Use these options with: astyle --options= SourceFile.cpp -# - -# Do not create a copy of the original, same as -n -suffix=none - -# set 4 spaces per indent, same as -s4 -indent=spaces=4 - -# break brackets from class and function declarations, same as -ly -brackets=linux -brackets=break-closing - -# don't break complex statements and multiple statements residing on a single line, same as -o -one-line=keep-statements - -# don't break one-line blocks, same as -O -one-line=keep-blocks - -# convert tabs into single spaces, same as -V -#convert-tabs - -# indent switch blocks, same as -K -#indent-cases - -# indent multi-line preprocessor definitions ending with a backslash, same as -w -#indent-preprocessor - -# remove space padding around parenthesis on the inside and outside, same as -U -#unpad=paren diff --git a/src/Tools/embedded/Qt/cxx/PreCompiled.h b/src/Tools/embedded/Qt/cxx/PreCompiled.h index d6fb8dfafa..592d559624 100644 --- a/src/Tools/embedded/Qt/cxx/PreCompiled.h +++ b/src/Tools/embedded/Qt/cxx/PreCompiled.h @@ -13,7 +13,7 @@ #define FC_PLUGIN_EXPORT __declspec(dllimport) #endif #define MeshExport __declspec(dllimport) -#else// for Linux +#else // for Linux #define FC_PLUGIN_EXPORT #define MeshExport #endif diff --git a/src/Tools/embedded/Qt/cxx/main.cpp b/src/Tools/embedded/Qt/cxx/main.cpp index 6d128cf9a5..ca2da30e1f 100644 --- a/src/Tools/embedded/Qt/cxx/main.cpp +++ b/src/Tools/embedded/Qt/cxx/main.cpp @@ -28,8 +28,9 @@ void loadFreeCAD() TestFunction test = (TestFunction)freecadPlugin->resolve("FreeCAD_test"); if (test) { QString file = QFileDialog::getOpenFileName(); - if (!file.isEmpty()) + if (!file.isEmpty()) { test(file.toUtf8()); + } } } } diff --git a/src/Tools/embedded/Qt/cxx/plugin.cpp b/src/Tools/embedded/Qt/cxx/plugin.cpp index 7173d77066..5477bd72da 100644 --- a/src/Tools/embedded/Qt/cxx/plugin.cpp +++ b/src/Tools/embedded/Qt/cxx/plugin.cpp @@ -40,7 +40,7 @@ PyMODINIT_FUNC FreeCAD_init() /* A test function for the plugin to load a mesh and call "getVal()" */ PyMODINIT_FUNC FreeCAD_test(const char* path) { - try {// Use FreeCADGui here, not Gui + try { // Use FreeCADGui here, not Gui Base::Interpreter().runString("FreeCADGui.activateWorkbench(\"MeshWorkbench\")"); Base::Interpreter().runString("import Mesh"); Base::Interpreter().runStringArg("Mesh.insert(u\"%s\", \"%s\")", path, "Document"); diff --git a/src/Tools/embedded/Win32/FreeCAD_widget/FreeCAD_widget.cpp b/src/Tools/embedded/Win32/FreeCAD_widget/FreeCAD_widget.cpp index ef91dfe0d3..3eaac9997f 100644 --- a/src/Tools/embedded/Win32/FreeCAD_widget/FreeCAD_widget.cpp +++ b/src/Tools/embedded/Win32/FreeCAD_widget/FreeCAD_widget.cpp @@ -11,9 +11,9 @@ #define MAX_LOADSTRING 100 // Global Variables: -HINSTANCE hInst; // current instance -TCHAR szTitle[MAX_LOADSTRING]; // The title bar text -TCHAR szWindowClass[MAX_LOADSTRING];// the main window class name +HINSTANCE hInst; // current instance +TCHAR szTitle[MAX_LOADSTRING]; // The title bar text +TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name // Forward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); @@ -106,7 +106,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; - hInst = hInstance;// Store instance handle in our global variable + hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, @@ -244,8 +244,9 @@ void OnLoadFreeCAD(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) std::string path = OnFileOpen(hWnd, message, wParam, lParam); if (!path.empty()) { for (std::string::iterator it = path.begin(); it != path.end(); ++it) { - if (*it == '\\') + if (*it == '\\') { *it = '/'; + } } PyObject* main = PyImport_AddModule("__main__"); PyObject* dict = PyModule_GetDict(main); diff --git a/src/Tools/embedded/Win32/FreeCAD_widget/stdafx.h b/src/Tools/embedded/Win32/FreeCAD_widget/stdafx.h index ec5fdfca34..fdee2a522e 100644 --- a/src/Tools/embedded/Win32/FreeCAD_widget/stdafx.h +++ b/src/Tools/embedded/Win32/FreeCAD_widget/stdafx.h @@ -7,7 +7,7 @@ #include "targetver.h" -#define WIN32_LEAN_AND_MEAN// Exclude rarely-used stuff from Windows headers +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers // Windows Header Files: #include diff --git a/src/Tools/embedded/Win32/FreeCAD_widget/targetver.h b/src/Tools/embedded/Win32/FreeCAD_widget/targetver.h index b7b02af3a2..f477c8681c 100644 --- a/src/Tools/embedded/Win32/FreeCAD_widget/targetver.h +++ b/src/Tools/embedded/Win32/FreeCAD_widget/targetver.h @@ -7,19 +7,20 @@ // Modify the following defines if you have to target a platform prior to the ones specified below. // Refer to MSDN for the latest info on corresponding values for different platforms. -#ifndef WINVER // Specifies that the minimum required platform is Windows Vista. -#define WINVER 0x0600// Change this to the appropriate value to target other versions of Windows. +#ifndef WINVER // Specifies that the minimum required platform is Windows Vista. +#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif -#ifndef _WIN32_WINNT// Specifies that the minimum required platform is Windows Vista. +#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. #define _WIN32_WINNT \ - 0x0600// Change this to the appropriate value to target other versions of Windows. + 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif -#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. -#define _WIN32_WINDOWS 0x0410// Change this to the appropriate value to target Windows Me or later. +#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. +#define _WIN32_WINDOWS \ + 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif -#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. -#define _WIN32_IE 0x0700// Change this to the appropriate value to target other versions of IE. +#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. +#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. #endif diff --git a/src/Tools/embedded/glib/main.c b/src/Tools/embedded/glib/main.c index 0bfd1bff75..9d4a5fbfaa 100644 --- a/src/Tools/embedded/glib/main.c +++ b/src/Tools/embedded/glib/main.c @@ -26,8 +26,12 @@ static void helloWorld(GtkWidget* wid, GtkWidget* win) const char* error = PyUnicode_AsUTF8(pystring); GtkWidget* dialog = NULL; - dialog = gtk_message_dialog_new( - GTK_WINDOW(win), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s", error); + dialog = gtk_message_dialog_new(GTK_WINDOW(win), + GTK_DIALOG_MODAL, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, + "%s", + error); gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); diff --git a/src/Tools/plugins/imageformats/svg/main.cpp b/src/Tools/plugins/imageformats/svg/main.cpp index 27952bac9b..89f5ce111a 100644 --- a/src/Tools/plugins/imageformats/svg/main.cpp +++ b/src/Tools/plugins/imageformats/svg/main.cpp @@ -68,14 +68,17 @@ QStringList QSvgPlugin::keys() const QImageIOPlugin::Capabilities QSvgPlugin::capabilities(QIODevice* device, const QByteArray& format) const { - if (format == "svg" || format == "svgz") + if (format == "svg" || format == "svgz") { return Capabilities(CanRead); - if (!format.isEmpty()) + } + if (!format.isEmpty()) { return 0; + } Capabilities cap; - if (device->isReadable() && QSvgIOHandler::canRead(device)) + if (device->isReadable() && QSvgIOHandler::canRead(device)) { cap |= CanRead; + } return cap; } @@ -92,4 +95,4 @@ Q_EXPORT_PLUGIN2(qsvg, QSvgPlugin) QT_END_NAMESPACE -#endif// !QT_NO_IMAGEFORMATPLUGIN +#endif // !QT_NO_IMAGEFORMATPLUGIN diff --git a/src/Tools/plugins/imageformats/svg/qsvgiohandler.cpp b/src/Tools/plugins/imageformats/svg/qsvgiohandler.cpp index fc9d3788a8..cbbb1d071c 100644 --- a/src/Tools/plugins/imageformats/svg/qsvgiohandler.cpp +++ b/src/Tools/plugins/imageformats/svg/qsvgiohandler.cpp @@ -61,10 +61,10 @@ class QSvgIOHandlerPrivate { public: QSvgIOHandlerPrivate(QSvgIOHandler* qq) - : q(qq), - loaded(false), - readDone(false), - backColor(Qt::transparent) + : q(qq) + , loaded(false) + , readDone(false) + , backColor(Qt::transparent) { QPalette pal = webView.palette(); pal.setColor(QPalette::Background, backColor); @@ -88,10 +88,12 @@ public: bool QSvgIOHandlerPrivate::load(QIODevice* device) { - if (loaded) + if (loaded) { return true; - if (q->format().isEmpty()) + } + if (q->format().isEmpty()) { q->canRead(); + } // # The SVG renderer doesn't handle trailing, unrelated data, so we must // assume that all available data in the device is to be read. @@ -147,10 +149,12 @@ QSvgIOHandler::~QSvgIOHandler() bool QSvgIOHandler::canRead() const { - if (!device()) + if (!device()) { return false; - if (d->loaded && !d->readDone) - return true;// Will happen if we have been asked for the size + } + if (d->loaded && !d->readDone) { + return true; // Will happen if we have been asked for the size + } QByteArray buf = device()->peek(8); if (buf.startsWith("\x1f\x8b")) { @@ -216,7 +220,7 @@ bool QSvgIOHandler::read(QImage* image) p.setRenderHint(QPainter::Antialiasing); p.setRenderHint(QPainter::TextAntialiasing); p.setRenderHint(QPainter::SmoothPixmapTransform); - p.setOpacity(0);// important to keep transparent background + p.setOpacity(0); // important to keep transparent background d->webView.page()->mainFrame()->render(&p); #endif p.end(); @@ -304,4 +308,4 @@ bool QSvgIOHandler::canRead(QIODevice* device) QT_END_NAMESPACE -#endif// QT_NO_SVGRENDERER +#endif // QT_NO_SVGRENDERER diff --git a/src/Tools/plugins/imageformats/svg/qsvgiohandler.h b/src/Tools/plugins/imageformats/svg/qsvgiohandler.h index 14d7cb688d..f00b1991f9 100644 --- a/src/Tools/plugins/imageformats/svg/qsvgiohandler.h +++ b/src/Tools/plugins/imageformats/svg/qsvgiohandler.h @@ -73,5 +73,5 @@ private: QT_END_NAMESPACE -#endif// QT_NO_SVGRENDERER -#endif// QSVGIOHANDLER_H +#endif // QT_NO_SVGRENDERER +#endif // QSVGIOHANDLER_H diff --git a/src/Tools/plugins/widget/FreeCAD_widgets.vcxproj.filters b/src/Tools/plugins/widget/FreeCAD_widgets.vcxproj.filters deleted file mode 100644 index 5316410ce8..0000000000 --- a/src/Tools/plugins/widget/FreeCAD_widgets.vcxproj.filters +++ /dev/null @@ -1,65 +0,0 @@ - - - - - {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} - cpp;c;cxx;moc;h;def;odl;idl;res; - - - {71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11} - cpp;c;cxx;moc;h;def;odl;idl;res; - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - - - Generated Files - - - Generated Files - - - Generated Files - - - Generated Files - - - Generated Files - - - Generated Files - - - \ No newline at end of file diff --git a/src/Tools/plugins/widget/FreeCAD_widgets.vcxproj.user b/src/Tools/plugins/widget/FreeCAD_widgets.vcxproj.user deleted file mode 100644 index be25078707..0000000000 --- a/src/Tools/plugins/widget/FreeCAD_widgets.vcxproj.user +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/Tools/plugins/widget/customwidgets.cpp b/src/Tools/plugins/widget/customwidgets.cpp index 3ca351857a..99a0af7a7f 100644 --- a/src/Tools/plugins/widget/customwidgets.cpp +++ b/src/Tools/plugins/widget/customwidgets.cpp @@ -53,8 +53,9 @@ UrlLabel::~UrlLabel() void UrlLabel::mouseReleaseEvent(QMouseEvent*) { - QMessageBox::information( - this, "Browser", QString("This starts your browser with url %1").arg(_url)); + QMessageBox::information(this, + "Browser", + QString("This starts your browser with url %1").arg(_url)); } QString UrlLabel::url() const @@ -131,9 +132,9 @@ void LocationWidget::retranslateUi() } FileChooser::FileChooser(QWidget* parent) - : QWidget(parent), - md(File), - _filter(QString()) + : QWidget(parent) + , md(File) + , _filter(QString()) { QHBoxLayout* layout = new QHBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); @@ -175,13 +176,19 @@ void FileChooser::chooseFile() QFileDialog::Options dlgOpt = QFileDialog::DontUseNativeDialog; QString fn; if (mode() == File) { - fn = QFileDialog::getOpenFileName( - this, tr("Select a file"), lineEdit->text(), _filter, 0, dlgOpt); + fn = QFileDialog::getOpenFileName(this, + tr("Select a file"), + lineEdit->text(), + _filter, + 0, + dlgOpt); } else { QFileDialog::Options option = QFileDialog::ShowDirsOnly | dlgOpt; - fn = QFileDialog::getExistingDirectory( - this, tr("Select a directory"), lineEdit->text(), option); + fn = QFileDialog::getExistingDirectory(this, + tr("Select a directory"), + lineEdit->text(), + option); } if (!fn.isEmpty()) { @@ -273,14 +280,18 @@ void AccelLineEdit::keyPressEvent(QKeyEvent* e) int key = e->key(); Qt::KeyboardModifiers state = e->modifiers(); - if (key == Qt::Key_Control) + if (key == Qt::Key_Control) { return; - else if (key == Qt::Key_Shift) + } + else if (key == Qt::Key_Shift) { return; - else if (key == Qt::Key_Alt) + } + else if (key == Qt::Key_Alt) { return; - else if (state == Qt::NoModifier && key == Qt::Key_Backspace) - return;// clears the edit field + } + else if (state == Qt::NoModifier && key == Qt::Key_Backspace) { + return; // clears the edit field + } switch (state) { case Qt::ControlModifier: { @@ -416,12 +427,12 @@ ActionSelector::~ActionSelector() // -------------------------------------------------------------------- InputField::InputField(QWidget* parent) - : QLineEdit(parent), - Value(0), - Maximum(INT_MAX), - Minimum(-INT_MAX), - StepSize(1.0), - HistorySize(5) + : QLineEdit(parent) + , Value(0) + , Maximum(INT_MAX) + , Minimum(-INT_MAX) + , StepSize(1.0) + , HistorySize(5) {} InputField::~InputField() @@ -543,24 +554,24 @@ const QString& Unit::getString() const return unit; } -int QuantityFormat::defaultDenominator = 8;// for 1/8" +int QuantityFormat::defaultDenominator = 8; // for 1/8" QuantityFormat::QuantityFormat() - : option(OmitGroupSeparator | RejectGroupSeparator), - format(Fixed), - precision(4), - denominator(defaultDenominator) + : option(OmitGroupSeparator | RejectGroupSeparator) + , format(Fixed) + , precision(4) + , denominator(defaultDenominator) {} Quantity::Quantity() - : value(0), - unit() + : value(0) + , unit() {} Quantity::Quantity(double v, const Unit& u) - : value(v), - unit(u) + : value(v) + , unit(u) {} Quantity Quantity::parse(const QString& str) @@ -628,7 +639,7 @@ QString Quantity::getUserString(double& factor, QString& unitString) const return QString::fromUtf8("%1 %2").arg(Ln, unit.getString()); } -}// namespace Base +} // namespace Base namespace Gui { @@ -637,12 +648,12 @@ class QuantitySpinBoxPrivate { public: QuantitySpinBoxPrivate() - : validInput(true), - pendingEmit(false), - unitValue(0), - maximum(INT_MAX), - minimum(-INT_MAX), - singleStep(1.0) + : validInput(true) + , pendingEmit(false) + , unitValue(0) + , maximum(INT_MAX) + , minimum(-INT_MAX) + , singleStep(1.0) {} ~QuantitySpinBoxPrivate() {} @@ -652,8 +663,9 @@ public: QString text = t; const int s = text.size(); text = text.trimmed(); - if (pos) + if (pos) { (*pos) -= (s - text.size()); + } return text; } @@ -716,10 +728,12 @@ public: goto end; } else if (copy.at(0) == QLatin1Char('-')) { - if (minus) + if (minus) { state = QValidator::Intermediate; - else + } + else { state = QValidator::Invalid; + } goto end; } break; @@ -768,10 +782,12 @@ public: bool ok = false; double value = min; - if (locale.negativeSign() != QLatin1Char('-')) + if (locale.negativeSign() != QLatin1Char('-')) { copy.replace(locale.negativeSign(), QLatin1Char('-')); - if (locale.positiveSign() != QLatin1Char('+')) + } + if (locale.positiveSign() != QLatin1Char('+')) { copy.replace(locale.positiveSign(), QLatin1Char('+')); + } try { QString copy2 = copy; @@ -804,8 +820,8 @@ public: state = QValidator::Acceptable; } } - else if (max == min) {// when max and min is the same the only non-Invalid input is max - // (or min) + else if (max == min) { // when max and min is the same the only non-Invalid input is + // max (or min) state = QValidator::Invalid; } else { @@ -839,11 +855,11 @@ public: double minimum; double singleStep; }; -}// namespace Gui +} // namespace Gui QuantitySpinBox::QuantitySpinBox(QWidget* parent) - : QAbstractSpinBox(parent), - d_ptr(new QuantitySpinBoxPrivate()) + : QAbstractSpinBox(parent) + , d_ptr(new QuantitySpinBoxPrivate()) { d_ptr->locale = locale(); this->setContextMenuPolicy(Qt::DefaultContextMenu); @@ -893,10 +909,12 @@ void QuantitySpinBox::setValue(const Base::Quantity& value) Q_D(QuantitySpinBox); d->quantity = value; // check limits - if (d->quantity.getValue() > d->maximum) + if (d->quantity.getValue() > d->maximum) { d->quantity.setValue(d->maximum); - if (d->quantity.getValue() < d->minimum) + } + if (d->quantity.getValue() < d->minimum) { d->quantity.setValue(d->minimum); + } d->unit = value.getUnit(); @@ -1065,8 +1083,8 @@ void QuantitySpinBox::clearSchema() updateText(d->quantity); } -QString QuantitySpinBox::getUserString(const Base::Quantity& val, double& factor, - QString& unitString) const +QString +QuantitySpinBox::getUserString(const Base::Quantity& val, double& factor, QString& unitString) const { return val.getUserString(factor, unitString); } @@ -1079,10 +1097,12 @@ QString QuantitySpinBox::getUserString(const Base::Quantity& val) const QAbstractSpinBox::StepEnabled QuantitySpinBox::stepEnabled() const { Q_D(const QuantitySpinBox); - if (isReadOnly() /* || !d->validInput*/) + if (isReadOnly() /* || !d->validInput*/) { return StepNone; - if (wrapping()) + } + if (wrapping()) { return StepEnabled(StepUpEnabled | StepDownEnabled); + } StepEnabled ret = StepNone; if (d->quantity.getValue() < d->maximum) { ret |= StepUpEnabled; @@ -1100,10 +1120,12 @@ void QuantitySpinBox::stepBy(int steps) double step = d->singleStep * steps; double val = d->unitValue + step; - if (val > d->maximum) + if (val > d->maximum) { val = d->maximum; - else if (val < d->minimum) + } + else if (val < d->minimum) { val = d->minimum; + } lineEdit()->setText(QString::fromUtf8("%L1 %2").arg(val).arg(d->unitStr)); updateFromCache(true); @@ -1131,7 +1153,7 @@ QSize QuantitySpinBox::sizeHint() const w = fm.width(s); #endif - w += 2;// cursor blinking space + w += 2; // cursor blinking space w += iconHeight; QStyleOptionSpinBox opt; @@ -1161,7 +1183,7 @@ QSize QuantitySpinBox::minimumSizeHint() const w = fm.width(s); #endif - w += 2;// cursor blinking space + w += 2; // cursor blinking space w += iconHeight; QStyleOptionSpinBox opt; @@ -1179,8 +1201,9 @@ void QuantitySpinBox::showEvent(QShowEvent* event) bool selected = lineEdit()->hasSelectedText(); updateText(d->quantity); - if (selected) + if (selected) { selectNumber(); + } } void QuantitySpinBox::hideEvent(QHideEvent* event) @@ -1229,8 +1252,9 @@ void QuantitySpinBox::focusInEvent(QFocusEvent* event) if (event->reason() == Qt::TabFocusReason || event->reason() == Qt::BacktabFocusReason || event->reason() == Qt::ShortcutFocusReason) { - if (!hasSel) + if (!hasSel) { selectNumber(); + } } } @@ -1390,8 +1414,9 @@ void CommandIconView::startDrag(Qt::DropActions /*supportedActions*/) QPixmap pixmap; dataStream << items.count(); for (QList::ConstIterator it = items.begin(); it != items.end(); ++it) { - if (it == items.begin()) + if (it == items.begin()) { pixmap = ((*it)->data(Qt::UserRole)).value(); + } dataStream << (*it)->text(); } @@ -1407,8 +1432,9 @@ void CommandIconView::startDrag(Qt::DropActions /*supportedActions*/) void CommandIconView::onSelectionChanged(QListWidgetItem* item, QListWidgetItem*) { - if (item) + if (item) { emitSelectionChanged(item->toolTip()); + } } // ------------------------------------------------------------------------------ @@ -1461,21 +1487,26 @@ UnsignedValidator::~UnsignedValidator() QValidator::State UnsignedValidator::validate(QString& input, int&) const { - QString stripped;// = input.stripWhiteSpace(); - if (stripped.isEmpty()) + QString stripped; // = input.stripWhiteSpace(); + if (stripped.isEmpty()) { return Intermediate; + } bool ok; uint entered = input.toUInt(&ok); - if (!ok) + if (!ok) { return Invalid; - else if (entered < b) + } + else if (entered < b) { return Intermediate; - else if (entered > t) + } + else if (entered > t) { return Invalid; + } // else if ( entered < b || entered > t ) // return Invalid; - else + else { return Acceptable; + } } void UnsignedValidator::setRange(uint minimum, uint maximum) @@ -1542,7 +1573,7 @@ public: } }; -}// namespace Gui +} // namespace Gui // ------------------------------------------------------------- @@ -1600,8 +1631,9 @@ uint UIntSpinBox::minimum() const void UIntSpinBox::setMinimum(uint minVal) { uint maxVal = maximum(); - if (maxVal < minVal) + if (maxVal < minVal) { maxVal = minVal; + } setRange(minVal, maxVal); } @@ -1613,8 +1645,9 @@ uint UIntSpinBox::maximum() const void UIntSpinBox::setMaximum(uint maxVal) { uint minVal = minimum(); - if (minVal > maxVal) + if (minVal > maxVal) { minVal = maxVal; + } setRange(minVal, maxVal); } @@ -1723,10 +1756,10 @@ void PrefDoubleSpinBox::setParamGrpPath(const QByteArray& name) // ------------------------------------------------------------- ColorButton::ColorButton(QWidget* parent) - : QPushButton(parent), - _allowChange(true), - _allowTransparency(false), - _drawFrame(true) + : QPushButton(parent) + , _allowChange(true) + , _allowTransparency(false) + , _drawFrame(true) { _col = palette().color(QPalette::Active, QPalette::Midlight); connect(this, &ColorButton::clicked, this, &ColorButton::onChooseColor); @@ -1811,8 +1844,9 @@ void ColorButton::paintEvent(QPaintEvent* e) void ColorButton::onChooseColor() { - if (!_allowChange) + if (!_allowChange) { return; + } QColor c = QColorDialog::getColor(_col, this); if (c.isValid()) { setColor(c); diff --git a/src/Tools/plugins/widget/customwidgets.h b/src/Tools/plugins/widget/customwidgets.h index 11ea06ce2f..8bf371904e 100644 --- a/src/Tools/plugins/widget/customwidgets.h +++ b/src/Tools/plugins/widget/customwidgets.h @@ -82,7 +82,7 @@ struct QuantityFormat // Default denominator of minimum fractional inch. Only used in certain // schemas. - static int defaultDenominator;// i.e 8 for 1/8" + static int defaultDenominator; // i.e 8 for 1/8" static inline int getDefaultDenominator() { @@ -117,8 +117,9 @@ struct QuantityFormat } static inline NumberFormat toFormat(char c, bool* ok = 0) { - if (ok) + if (ok) { *ok = true; + } switch (c) { case 'f': return Fixed; @@ -127,8 +128,9 @@ struct QuantityFormat case 'g': return Default; default: - if (ok) + if (ok) { *ok = false; + } return Default; } } @@ -160,7 +162,7 @@ private: Unit unit; QuantityFormat format; }; -}// namespace Base +} // namespace Base Q_DECLARE_METATYPE(Base::Quantity) @@ -886,6 +888,6 @@ private: QByteArray m_sPrefName; QByteArray m_sPrefGrp; }; -}// namespace Gui +} // namespace Gui -#endif// GUI_CUSTOMWIDGETS_H +#endif // GUI_CUSTOMWIDGETS_H diff --git a/src/Tools/plugins/widget/wizard.cpp b/src/Tools/plugins/widget/wizard.cpp index e9cc2f3297..3a51e4b6ba 100644 --- a/src/Tools/plugins/widget/wizard.cpp +++ b/src/Tools/plugins/widget/wizard.cpp @@ -110,8 +110,9 @@ void Wizard::insertPage(int index, QWidget* page) page->setWindowTitle(title); } - if (currentIndex() == index) + if (currentIndex() == index) { textLabel->setText(title); + } int current = currentIndex(); _backButton->setEnabled(current > 0); @@ -121,15 +122,17 @@ void Wizard::insertPage(int index, QWidget* page) void Wizard::backButtonClicked() { int index = currentIndex(); - if (index > 0) + if (index > 0) { setCurrentIndex(index - 1); + } } void Wizard::nextButtonClicked() { int index = currentIndex(); - if (index < count() - 1) + if (index < count() - 1) { setCurrentIndex(index + 1); + } } QPushButton* Wizard::backButton() const @@ -215,8 +218,8 @@ WizardExtensionFactory::WizardExtensionFactory(QExtensionManager* parent) : QExtensionFactory(parent) {} -QObject* WizardExtensionFactory::createExtension(QObject* object, const QString& iid, - QObject* parent) const +QObject* +WizardExtensionFactory::createExtension(QObject* object, const QString& iid, QObject* parent) const { Wizard* widget = qobject_cast(object); diff --git a/src/Tools/updatets.py b/src/Tools/updatets.py index 9adcf991f5..0aa18108d1 100755 --- a/src/Tools/updatets.py +++ b/src/Tools/updatets.py @@ -148,7 +148,7 @@ directories = [ "tsdir": "Gui/Resources/translations", }, { - "tsname": "Start", + "tsname": "StartPage", "workingdir": "./src/Mod/Start/", "tsdir": "Gui/Resources/translations", }, diff --git a/src/WindowsInstaller/lang/english.nsh b/src/WindowsInstaller/lang/english.nsh index fcf401586c..e53141017e 100644 --- a/src/WindowsInstaller/lang/english.nsh +++ b/src/WindowsInstaller/lang/english.nsh @@ -53,7 +53,7 @@ ${LangFileString} FinishPageRun "Launch FreeCAD" ${LangFileString} UnNotInRegistryLabel "Unable to find FreeCAD in the registry.$\r$\n\ Shortcuts on the desktop and in the Start Menu will not be removed." -${LangFileString} UnInstallRunning "You must close FreeCAD at first!" +${LangFileString} UnInstallRunning "You must close FreeCAD first!" ${LangFileString} UnNotAdminLabel "You must have administrator privileges to uninstall FreeCAD!" ${LangFileString} UnReallyRemoveLabel "Are you sure you want to completely remove FreeCAD and all of its components?" ${LangFileString} UnFreeCADPreferencesTitle 'FreeCAD$\'s user preferences' diff --git a/src/XDGData/CMakeLists.txt b/src/XDGData/CMakeLists.txt index 6c54fb3231..8a130ce272 100644 --- a/src/XDGData/CMakeLists.txt +++ b/src/XDGData/CMakeLists.txt @@ -16,11 +16,11 @@ if(NOT DEFINED APPDATA_RELEASE_DATE) endif() configure_file( - org.freecad.FreeCAD.appdata.xml.in - ${CMAKE_BINARY_DIR}/org.freecad.FreeCAD.appdata.xml + org.freecad.FreeCAD.metainfo.xml.in + ${CMAKE_BINARY_DIR}/org.freecad.FreeCAD.metainfo.xml ) install( - FILES ${CMAKE_BINARY_DIR}/org.freecad.FreeCAD.appdata.xml + FILES ${CMAKE_BINARY_DIR}/org.freecad.FreeCAD.metainfo.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo ) diff --git a/src/XDGData/org.freecad.FreeCAD.desktop b/src/XDGData/org.freecad.FreeCAD.desktop index 49216056fa..e7fb3ca0e0 100644 --- a/src/XDGData/org.freecad.FreeCAD.desktop +++ b/src/XDGData/org.freecad.FreeCAD.desktop @@ -18,7 +18,7 @@ Exec=FreeCAD - --single-instance %F Terminal=false Type=Application Icon=org.freecad.FreeCAD -Categories=Graphics;Science;Education;Engineering; +Categories=Graphics;Science;Education;Engineering;X-CNC; StartupNotify=true StartupWMClass=FreeCAD MimeType=application/x-extension-fcstd;model/obj;image/vnd.dwg;image/vnd.dxf;model/vnd.collada+xml;application/iges;model/iges;model/step;model/step+zip;model/stl;application/vnd.shp;model/vrml; diff --git a/src/XDGData/org.freecad.FreeCAD.appdata.xml.in b/src/XDGData/org.freecad.FreeCAD.metainfo.xml.in similarity index 67% rename from src/XDGData/org.freecad.FreeCAD.appdata.xml.in rename to src/XDGData/org.freecad.FreeCAD.metainfo.xml.in index a8ad2476a3..ffb5282d65 100644 --- a/src/XDGData/org.freecad.FreeCAD.appdata.xml.in +++ b/src/XDGData/org.freecad.FreeCAD.metainfo.xml.in @@ -40,22 +40,43 @@ + Part Design https://wiki.freecad.org/images/7/72/Freecad016_screenshot1.jpg + An assembly https://wiki.freecad.org/images/f/f7/FreeCAD_highlight_3_0.19.jpg + Arch Workbench https://wiki.freecad.org/images/c/c3/Arch_tutorial_43.jpg + Part Design https://wiki.freecad.org/images/f/f4/Freecad-document-01.jpg - https://www.freecad.org - https://www.freecad.org/tracker - https://forum.freecad.org - https://www.freecad.org/wiki/Donate + + + engineering + opencascade + architecture + cad + bim + fem + 3d + 3d-printing + coin + parametric-modeler + + https://www.freecad.org/ + https://github.com/FreeCAD/FreeCAD/issues + https://wiki.freecad.org/Frequently_asked_questions + https://wiki.freecad.org/User_hub + https://www.freecad.org/sponsor.php + https://crowdin.com/project/freecad + https://github.com/FreeCAD/FreeCAD + https://github.com/FreeCAD/FreeCAD/blob/master/CONTRIBUTING.md yorik_AT_uncreated.net diff --git a/tests/src/App/Application.cpp b/tests/src/App/Application.cpp index d89fd08e8a..41a05b3878 100644 --- a/tests/src/App/Application.cpp +++ b/tests/src/App/Application.cpp @@ -6,33 +6,39 @@ using namespace App::Util; using Spr = std::pair; -TEST(ApplicationTest, fCustomSyntaxLookup){ +TEST(ApplicationTest, fCustomSyntaxLookup) +{ Spr res {customSyntax("-display")}; Spr exp {"display", "null"}; - EXPECT_EQ(res,exp); + EXPECT_EQ(res, exp); }; -TEST(ApplicationTest, fCustomSyntaxMac){ +TEST(ApplicationTest, fCustomSyntaxMac) +{ Spr res {customSyntax("-psn_stuff")}; Spr exp {"psn", "stuff"}; - EXPECT_EQ(res,exp); + EXPECT_EQ(res, exp); }; -TEST(ApplicationTest, fCustomSyntaxWidgetCount){ +TEST(ApplicationTest, fCustomSyntaxWidgetCount) +{ Spr res {customSyntax("-widgetcount")}; Spr exp {"widgetcount", ""}; - EXPECT_EQ(res,exp); + EXPECT_EQ(res, exp); } -TEST(ApplicationTest, fCustomSyntaxNotFound){ +TEST(ApplicationTest, fCustomSyntaxNotFound) +{ Spr res {customSyntax("-displayx")}; Spr exp {"", ""}; - EXPECT_EQ(res,exp); + EXPECT_EQ(res, exp); }; -TEST(ApplicationTest, fCustomSyntaxAmpersand){ +TEST(ApplicationTest, fCustomSyntaxAmpersand) +{ Spr res {customSyntax("@freddie")}; Spr exp {"response-file", "freddie"}; - EXPECT_EQ(res,exp); + EXPECT_EQ(res, exp); }; -TEST(ApplicationTest, fCustomSyntaxEmptyIn){ +TEST(ApplicationTest, fCustomSyntaxEmptyIn) +{ Spr res {customSyntax("")}; Spr exp {"", ""}; - EXPECT_EQ(res,exp); + EXPECT_EQ(res, exp); }; diff --git a/tests/src/App/ComplexGeoData.cpp b/tests/src/App/ComplexGeoData.cpp index 2447c6209c..23c6cddf4a 100644 --- a/tests/src/App/ComplexGeoData.cpp +++ b/tests/src/App/ComplexGeoData.cpp @@ -113,7 +113,7 @@ private: // NOLINTBEGIN(readability-magic-numbers) -TEST_F(ComplexGeoDataTest, getIndexedNameNoName)// NOLINT +TEST_F(ComplexGeoDataTest, getIndexedNameNoName) // NOLINT { // Arrange & Act auto result = cgd().getIndexedName(Data::MappedName()); @@ -122,7 +122,7 @@ TEST_F(ComplexGeoDataTest, getIndexedNameNoName)// NOLINT EXPECT_FALSE(result); } -TEST_F(ComplexGeoDataTest, getIndexedNameNoElementMap)// NOLINT +TEST_F(ComplexGeoDataTest, getIndexedNameNoElementMap) // NOLINT { // Arrange & Act auto result = cgd().getIndexedName(Data::MappedName("TestName")); @@ -131,7 +131,7 @@ TEST_F(ComplexGeoDataTest, getIndexedNameNoElementMap)// NOLINT EXPECT_TRUE(result); } -TEST_F(ComplexGeoDataTest, getMappedNameNoElement)// NOLINT +TEST_F(ComplexGeoDataTest, getMappedNameNoElement) // NOLINT { // Arrange & Act auto result = cgd().getMappedName(Data::IndexedName {}); @@ -140,7 +140,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameNoElement)// NOLINT EXPECT_FALSE(result); } -TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedNoMap)// NOLINT +TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedNoMap) // NOLINT { // Arrange & Act auto result = cgd().getMappedName(Data::IndexedName {"TestName"}, false); @@ -149,7 +149,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedNoMap)// NOLINT EXPECT_FALSE(result); } -TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedWithMap)// NOLINT +TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedWithMap) // NOLINT { // Arrange auto elementMap = std::make_shared(); @@ -166,11 +166,11 @@ TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedWithMap)// NOLINT EXPECT_EQ(mappedName, result); } -TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedMissingFromMap)// NOLINT +TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedMissingFromMap) // NOLINT { // Arrange auto mappedName = Data::MappedName("NotTheTestName"); - cgd().getIndexedName(mappedName);// Put it in the map + cgd().getIndexedName(mappedName); // Put it in the map // Act auto result = cgd().getMappedName(Data::IndexedName {"TestName"}, false); @@ -179,7 +179,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameDisallowUnmappedMissingFromMap)// NOLINT EXPECT_FALSE(result); } -TEST_F(ComplexGeoDataTest, getMappedNameAllowUnmapped)// NOLINT +TEST_F(ComplexGeoDataTest, getMappedNameAllowUnmapped) // NOLINT { // Arrange & Act auto result = cgd().getMappedName(Data::IndexedName {"TestName"}, true); @@ -188,7 +188,7 @@ TEST_F(ComplexGeoDataTest, getMappedNameAllowUnmapped)// NOLINT EXPECT_TRUE(result); } -TEST_F(ComplexGeoDataTest, getElementNameGivenIndexedName)// NOLINT +TEST_F(ComplexGeoDataTest, getElementNameGivenIndexedName) // NOLINT { // Arrange const char* name {"EDGE123"}; @@ -201,7 +201,7 @@ TEST_F(ComplexGeoDataTest, getElementNameGivenIndexedName)// NOLINT EXPECT_EQ(result.index, indexedName); } -TEST_F(ComplexGeoDataTest, getElementNameGivenMappedName)// NOLINT +TEST_F(ComplexGeoDataTest, getElementNameGivenMappedName) // NOLINT { // Arrange const char* name {"EDGE123"}; @@ -214,7 +214,7 @@ TEST_F(ComplexGeoDataTest, getElementNameGivenMappedName)// NOLINT EXPECT_EQ(result.name, mappedName); } -TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapNoUnmapped)// NOLINT +TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapNoUnmapped) // NOLINT { // Arrange // Do not create an element map @@ -227,7 +227,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapNoUnmapped)// NOLINT EXPECT_TRUE(result.empty()); } -TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapNoUnmapped)// NOLINT +TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapNoUnmapped) // NOLINT { // Arrange auto elementMap = std::make_shared(); @@ -244,7 +244,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapNoUnmapped)// NOLINT EXPECT_EQ(result[0].first, mappedName); } -TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapWithUnmapped)// NOLINT +TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapWithUnmapped) // NOLINT { // Do not create an element map auto indexedName = Data::IndexedName("EDGE1"); @@ -257,7 +257,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesNoMapWithUnmapped)// NOLINT } -TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapWithUnmapped)// NOLINT +TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapWithUnmapped) // NOLINT { // Arrange Data::MappedName mappedName; @@ -273,7 +273,7 @@ TEST_F(ComplexGeoDataTest, getElementMappedNamesWithMapWithUnmapped)// NOLINT EXPECT_NE(result[0].first, mappedName); } -TEST_F(ComplexGeoDataTest, elementTypeValidIndexName)// NOLINT +TEST_F(ComplexGeoDataTest, elementTypeValidIndexName) // NOLINT { // Arrange auto indexedName = Data::IndexedName("EDGE", 1); @@ -285,10 +285,10 @@ TEST_F(ComplexGeoDataTest, elementTypeValidIndexName)// NOLINT EXPECT_EQ(elementType, 'E'); } -TEST_F(ComplexGeoDataTest, elementTypeInvalidIndexedName)// NOLINT +TEST_F(ComplexGeoDataTest, elementTypeInvalidIndexedName) // NOLINT { // Arrange - auto indexedName = Data::IndexedName("INVALID", 1);// Not in the element type list + auto indexedName = Data::IndexedName("INVALID", 1); // Not in the element type list // Act char elementType = cgd().elementType(indexedName); @@ -297,7 +297,7 @@ TEST_F(ComplexGeoDataTest, elementTypeInvalidIndexedName)// NOLINT EXPECT_EQ(elementType, 0); } -TEST_F(ComplexGeoDataTest, elementTypeCharEmptyName)// NOLINT +TEST_F(ComplexGeoDataTest, elementTypeCharEmptyName) // NOLINT { // Arrange & Act char elementType = cgd().elementType(nullptr); @@ -306,7 +306,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharEmptyName)// NOLINT EXPECT_EQ(elementType, 0); } -TEST_F(ComplexGeoDataTest, elementTypeCharIndexedName)// NOLINT +TEST_F(ComplexGeoDataTest, elementTypeCharIndexedName) // NOLINT { // Arrange & Act char elementType = cgd().elementType("EDGE1"); @@ -315,7 +315,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharIndexedName)// NOLINT EXPECT_EQ(elementType, 'E'); } -TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameNoPrefix)// NOLINT +TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameNoPrefix) // NOLINT { // Arrange int size {0}; @@ -330,7 +330,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameNoPrefix)// NOLINT EXPECT_EQ(elementType, 'E'); } -TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameWithPrefix)// NOLINT +TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameWithPrefix) // NOLINT { // Arrange int size {0}; @@ -346,7 +346,7 @@ TEST_F(ComplexGeoDataTest, elementTypeCharMappedNameWithPrefix)// NOLINT EXPECT_EQ(elementType, 'E'); } -TEST_F(ComplexGeoDataTest, resetElementMapNoArgument)// NOLINT +TEST_F(ComplexGeoDataTest, resetElementMapNoArgument) // NOLINT { // Arrange & Act cgd().resetElementMap(); @@ -355,7 +355,7 @@ TEST_F(ComplexGeoDataTest, resetElementMapNoArgument)// NOLINT EXPECT_EQ(cgd().getElementMapSize(), 0); } -TEST_F(ComplexGeoDataTest, resetElementMapWithArgument)// NOLINT +TEST_F(ComplexGeoDataTest, resetElementMapWithArgument) // NOLINT { // Arrange auto elementMap = std::make_shared(); @@ -370,7 +370,7 @@ TEST_F(ComplexGeoDataTest, resetElementMapWithArgument)// NOLINT EXPECT_EQ(cgd().getElementMapSize(), 1); } -TEST_F(ComplexGeoDataTest, setAndGetElementMap)// NOLINT +TEST_F(ComplexGeoDataTest, setAndGetElementMap) // NOLINT { // Arrange auto elementMap = std::make_shared(); @@ -393,7 +393,7 @@ TEST_F(ComplexGeoDataTest, setAndGetElementMap)// NOLINT EXPECT_EQ(resultingElementMap.size(), vecMappedElements.size()); } -TEST_F(ComplexGeoDataTest, getElementMapSize)// NOLINT +TEST_F(ComplexGeoDataTest, getElementMapSize) // NOLINT { // Arrange auto elementMap = std::make_shared(); @@ -409,7 +409,7 @@ TEST_F(ComplexGeoDataTest, getElementMapSize)// NOLINT EXPECT_EQ(result, 1); } -TEST_F(ComplexGeoDataTest, flushElementMap)// NOLINT +TEST_F(ComplexGeoDataTest, flushElementMap) // NOLINT { // Does nothing in the base class } diff --git a/tests/src/App/ElementMap.cpp b/tests/src/App/ElementMap.cpp index 3e103be85a..05fba5cbea 100644 --- a/tests/src/App/ElementMap.cpp +++ b/tests/src/App/ElementMap.cpp @@ -149,12 +149,12 @@ TEST_F(ElementMapTest, setElementNameWithHashing) Data::ElementMap elementMap; std::ostringstream ss; Data::IndexedName element("Edge", 1); - Data::MappedName elementNameHolder(element);// Will get modified by the encoder + Data::MappedName elementNameHolder(element); // Will get modified by the encoder const Data::MappedName expectedName(element); // Act - elementMap.encodeElementName( - element.getType()[0], elementNameHolder, ss, nullptr, 0, nullptr, 0); + elementMap + .encodeElementName(element.getType()[0], elementNameHolder, ss, nullptr, 0, nullptr, 0); auto resultName = elementMap.setElementName(element, elementNameHolder, 0, _sids); auto mappedToElement = elementMap.find(element); @@ -376,21 +376,31 @@ TEST_F(ElementMapTest, mimicSimpleUnion) // we are only going to simulate one face for testing purpose Data::IndexedName uface3("Face", 3); - auto PartOp = "FUS";// Part::OpCodes::Fuse; + auto PartOp = "FUS"; // Part::OpCodes::Fuse; // Act // act: simulate a union/fuse operation auto parent = cube.elementMapPtr->getAll()[5]; Data::MappedName postfixHolder(std::string(Data::POSTFIX_MOD) + "2"); - unionPart.elementMapPtr->encodeElementName( - postfixHolder[0], postfixHolder, ss, nullptr, unionPart.Tag, nullptr, unionPart.Tag); + unionPart.elementMapPtr->encodeElementName(postfixHolder[0], + postfixHolder, + ss, + nullptr, + unionPart.Tag, + nullptr, + unionPart.Tag); auto postfixStr = postfixHolder.toString() + Data::ELEMENT_MAP_PREFIX + PartOp; // act: with the fuse op, name against the cube's Face6 Data::MappedName uface3Holder(parent.index); // we will invoke the encoder for face 3 - unionPart.elementMapPtr->encodeElementName( - uface3Holder[0], uface3Holder, ss, nullptr, unionPart.Tag, postfixStr.c_str(), cube.Tag); + unionPart.elementMapPtr->encodeElementName(uface3Holder[0], + uface3Holder, + ss, + nullptr, + unionPart.Tag, + postfixStr.c_str(), + cube.Tag); unionPart.elementMapPtr->setElementName(uface3, uface3Holder, unionPart.Tag, nullptr, true); // act: generate a full toponame string for testing purposes @@ -437,8 +447,13 @@ TEST_F(ElementMapTest, mimicOperationAgainstSelf) // Act // act: with the mystery op, name against its own Face6 for some reason Data::MappedName postfixHolder(workbenchId); - finalPart.elementMapPtr->encodeElementName( - postfixHolder[0], postfixHolder, ss, nullptr, finalPart.Tag, nullptr, finalPart.Tag); + finalPart.elementMapPtr->encodeElementName(postfixHolder[0], + postfixHolder, + ss, + nullptr, + finalPart.Tag, + nullptr, + finalPart.Tag); auto postfixStr = postfixHolder.toString() + Data::ELEMENT_MAP_PREFIX + PartOp; // we will invoke the encoder for face 3 finalPart.elementMapPtr->encodeElementName(uface3Holder[0], @@ -453,7 +468,7 @@ TEST_F(ElementMapTest, mimicOperationAgainstSelf) // Assert EXPECT_EQ(postfixStr, ":M9999;MYS"); - EXPECT_EQ(finalPart.elementMapPtr->find(uface3).toString(), "Face3");// override not forced + EXPECT_EQ(finalPart.elementMapPtr->find(uface3).toString(), "Face3"); // override not forced EXPECT_EQ(uface3Holder.toString(), "Face6;:M9999;MYS;:H63:b,F"); // explaining ";Face6;:M2;MYS;:H2:3,F" name: // @@ -468,8 +483,8 @@ TEST_F(ElementMapTest, mimicOperationAgainstSelf) TEST_F(ElementMapTest, hasChildElementMapTest) { // Arrange - Data::ElementMap::MappedChildElements child = { - Data::IndexedName("face", 1), 2, 7, 4L, Data::ElementMapPtr(), QByteArray(""), _sid}; + Data::ElementMap::MappedChildElements child = + {Data::IndexedName("face", 1), 2, 7, 4L, Data::ElementMapPtr(), QByteArray(""), _sid}; std::vector children = {child}; LessComplexPart cubeFull(3L, "FullBox", _hasher); cubeFull.elementMapPtr->addChildElements(cubeFull.Tag, children); @@ -496,7 +511,7 @@ TEST_F(ElementMapTest, hashChildMapsTest) 7, 3L, Data::ElementMapPtr(), - QByteArray("abcdefghij"),// postfix must be 10 or more bytes to invoke hasher + QByteArray("abcdefghij"), // postfix must be 10 or more bytes to invoke hasher _sid}; std::vector children = {childOne}; cube.elementMapPtr->addChildElements(cube.Tag, children); @@ -521,10 +536,10 @@ TEST_F(ElementMapTest, addAndGetChildElementsTest) 7, 3L, Data::ElementMapPtr(), - QByteArray("abcdefghij"),// postfix must be 10 or more bytes to invoke hasher + QByteArray("abcdefghij"), // postfix must be 10 or more bytes to invoke hasher _sid}; - Data::ElementMap::MappedChildElements childTwo = { - Data::IndexedName("Pong", 2), 2, 7, 4L, Data::ElementMapPtr(), QByteArray("abc"), _sid}; + Data::ElementMap::MappedChildElements childTwo = + {Data::IndexedName("Pong", 2), 2, 7, 4L, Data::ElementMapPtr(), QByteArray("abc"), _sid}; std::vector children = {childOne, childTwo}; // Act diff --git a/tests/src/App/IndexedName.cpp b/tests/src/App/IndexedName.cpp index 5ebadacb9c..f94d3c529f 100644 --- a/tests/src/App/IndexedName.cpp +++ b/tests/src/App/IndexedName.cpp @@ -374,7 +374,7 @@ TEST_F(IndexedNameTest, booleanConversionFalse) } // Usage example: - auto indexedName = Data::IndexedName(".EDGE", 1);// Invalid name + auto indexedName = Data::IndexedName(".EDGE", 1); // Invalid name if (indexedName) { FAIL() << "indexedName as a boolean should have been false for an invalid name"; } @@ -474,7 +474,7 @@ TEST_F(IndexedNameTest, assignmentOperator) const int testIndex2 {24}; auto indexedName1 = Data::IndexedName::fromConst("TestName", testIndex1); auto indexedName2 = Data::IndexedName::fromConst("TestName2", testIndex2); - EXPECT_NE(indexedName1, indexedName2);// Ensure the test is set up correctly + EXPECT_NE(indexedName1, indexedName2); // Ensure the test is set up correctly // Act indexedName1 = indexedName2; diff --git a/tests/src/App/MappedElement.cpp b/tests/src/App/MappedElement.cpp index 9fc87b31f1..0ea03de6af 100644 --- a/tests/src/App/MappedElement.cpp +++ b/tests/src/App/MappedElement.cpp @@ -55,7 +55,7 @@ TEST_F(MappedElementTest, assignmentOperator) // Arrange auto mappedElementA = givenMappedElement("EDGE1", "OTHER_NAME"); auto mappedElementB = givenMappedElement("EDGE2", "ANOTHER_NAME"); - EXPECT_NE(mappedElementA, mappedElementB);// Verify test setup + EXPECT_NE(mappedElementA, mappedElementB); // Verify test setup // Act mappedElementA = mappedElementB; @@ -69,7 +69,7 @@ TEST_F(MappedElementTest, moveAssignmentOperator) // Arrange auto mappedElementA = givenMappedElement("EDGE1", "OTHER_NAME"); auto mappedElementB = givenMappedElement("EDGE2", "ANOTHER_NAME"); - EXPECT_NE(mappedElementA, mappedElementB);// Verify test setup + EXPECT_NE(mappedElementA, mappedElementB); // Verify test setup // Act mappedElementA = std::move(mappedElementB); diff --git a/tests/src/App/MappedName.cpp b/tests/src/App/MappedName.cpp index 35bf068ad7..bffb347776 100644 --- a/tests/src/App/MappedName.cpp +++ b/tests/src/App/MappedName.cpp @@ -102,7 +102,7 @@ TEST(MappedName, constructFromIndexedNameNoIndex) Data::MappedName mappedName {indexedName}; // Assert - EXPECT_EQ(mappedName.dataBytes().constData(), indexedName.getType());// shared memory + EXPECT_EQ(mappedName.dataBytes().constData(), indexedName.getType()); // shared memory EXPECT_EQ(mappedName.isRaw(), true); } @@ -115,7 +115,7 @@ TEST(MappedName, constructFromIndexedNameWithIndex) Data::MappedName mappedName {indexedName}; // Assert - EXPECT_NE(mappedName.dataBytes().constData(), indexedName.getType());// NOT shared memory + EXPECT_NE(mappedName.dataBytes().constData(), indexedName.getType()); // NOT shared memory EXPECT_EQ(mappedName.isRaw(), false); EXPECT_EQ(mappedName.toString(), indexedName.toString()); } @@ -245,7 +245,7 @@ TEST(MappedName, fromRawDataCopy) QByteArray testByteArray("TESTTEST", 10); Data::MappedName temp = Data::MappedName::fromRawData(testByteArray); temp.append("TESTPOSTFIX"); - temp.compact();// Always call compact before accessing data! + temp.compact(); // Always call compact before accessing data! // Act Data::MappedName mappedName = Data::MappedName::fromRawData(temp, 0); @@ -263,8 +263,8 @@ TEST(MappedName, fromRawDataCopyStartposAndSize) // Arrange QByteArray testByteArray("TESTTEST", 8); Data::MappedName temp = Data::MappedName::fromRawData(testByteArray); - temp.append("ABCDEFGHIJKLM");// postfix - temp.compact(); // Always call compact before accessing data! + temp.append("ABCDEFGHIJKLM"); // postfix + temp.compact(); // Always call compact before accessing data! // Act Data::MappedName mappedName = Data::MappedName::fromRawData(temp, 2, 13); @@ -576,8 +576,8 @@ TEST(MappedName, appendToBufferWithPrefix) EXPECT_EQ(buffer, std::string("STUFF") + elemMapPrefix + std::string("TESTPOSTFIXTEST")); // Arrange - Data::MappedName mappedName2("TEST");// If mappedName does not have a postfix and is a valid - // indexedName: prefix is not added + Data::MappedName mappedName2("TEST"); // If mappedName does not have a postfix and is a valid + // indexedName: prefix is not added // Act mappedName2.appendToBufferWithPrefix(buffer); @@ -602,8 +602,8 @@ TEST(MappedName, toPrefixedString) EXPECT_EQ(buffer, std::string("STUFF") + elemMapPrefix + std::string("TESTPOSTFIXTEST")); // Arrange - Data::MappedName mappedName2("TEST");// If mappedName does not have a postfix and is a valid - // indexedName: prefix is not added + Data::MappedName mappedName2("TEST"); // If mappedName does not have a postfix and is a valid + // indexedName: prefix is not added // Act buffer += mappedName2.toPrefixedString(); @@ -732,7 +732,7 @@ TEST(MappedName, find) EXPECT_EQ(mappedName.find(""), 0); EXPECT_EQ(mappedName.find(std::string("")), 0); EXPECT_EQ(mappedName.find("TEST"), 0); - EXPECT_EQ(mappedName.find("STPO"), -1);// sentence must be fully contained in data or postfix + EXPECT_EQ(mappedName.find("STPO"), -1); // sentence must be fully contained in data or postfix EXPECT_EQ(mappedName.find("POST"), 4); EXPECT_EQ(mappedName.find("POST", 4), 4); EXPECT_EQ(mappedName.find("POST", 5), -1); @@ -766,7 +766,7 @@ TEST(MappedName, rfind) EXPECT_EQ(mappedName.rfind(""), mappedName.size()); EXPECT_EQ(mappedName.rfind(std::string("")), mappedName.size()); EXPECT_EQ(mappedName.rfind("TEST"), 11); - EXPECT_EQ(mappedName.rfind("STPO"), -1);// sentence must be fully contained in data or postfix + EXPECT_EQ(mappedName.rfind("STPO"), -1); // sentence must be fully contained in data or postfix EXPECT_EQ(mappedName.rfind("POST"), 4); EXPECT_EQ(mappedName.rfind("POST", 4), 4); EXPECT_EQ(mappedName.rfind("POST", 3), -1); @@ -853,11 +853,11 @@ TEST(MappedName, findTagInElementNameHexPositiveIndexNonrecursive) mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, false); // Assert - EXPECT_EQ(result, 36); // The location of the tag - EXPECT_EQ(tagOutput, 0x1b);// The tag - EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter + EXPECT_EQ(result, 36); // The location of the tag + EXPECT_EQ(tagOutput, 0x1b); // The tag + EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter EXPECT_EQ(postfix, ";:H1b:10,F"); - EXPECT_EQ(type, 'F');// F=Face + EXPECT_EQ(type, 'F'); // F=Face } TEST(MappedName, findTagInElementNameDecPositiveIndexNonrecursive) @@ -876,11 +876,11 @@ TEST(MappedName, findTagInElementNameDecPositiveIndexNonrecursive) mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, false); // Assert - EXPECT_EQ(result, 36); // The location of the tag - EXPECT_EQ(tagOutput, 27);// The tag - EXPECT_EQ(lenOutput, 16);// The specified length + EXPECT_EQ(result, 36); // The location of the tag + EXPECT_EQ(tagOutput, 27); // The tag + EXPECT_EQ(lenOutput, 16); // The specified length EXPECT_EQ(postfix, ";:T27:16,F"); - EXPECT_EQ(type, 'F');// F=Face + EXPECT_EQ(type, 'F'); // F=Face } TEST(MappedName, findTagInElementNameHexNegativeIndexNonrecursive) @@ -899,11 +899,11 @@ TEST(MappedName, findTagInElementNameHexNegativeIndexNonrecursive) mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, false); // Assert - EXPECT_EQ(result, 36); // The location of the tag - EXPECT_EQ(tagOutput, 0x1b);// The tag is returned positive, even though it was input negative - EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter + EXPECT_EQ(result, 36); // The location of the tag + EXPECT_EQ(tagOutput, 0x1b); // The tag is returned positive, even though it was input negative + EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter EXPECT_EQ(postfix, ";:H-1b:10,F"); - EXPECT_EQ(type, 'F');// F=Face + EXPECT_EQ(type, 'F'); // F=Face } TEST(MappedName, findTagInElementNameHexExpectedNegativeIndexNonrecursive) @@ -922,11 +922,11 @@ TEST(MappedName, findTagInElementNameHexExpectedNegativeIndexNonrecursive) mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, true, false); // Assert - EXPECT_EQ(result, 36); // The location of the tag - EXPECT_EQ(tagOutput, -0x1b);// The tag is returned negative - EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter + EXPECT_EQ(result, 36); // The location of the tag + EXPECT_EQ(tagOutput, -0x1b); // The tag is returned negative + EXPECT_EQ(lenOutput, 20); // The calculated length based on the tag's length parameter EXPECT_EQ(postfix, ";:H-1b:10,F"); - EXPECT_EQ(type, 'F');// F=Face + EXPECT_EQ(type, 'F'); // F=Face } TEST(MappedName, findTagInElementNameRecursive) @@ -945,11 +945,11 @@ TEST(MappedName, findTagInElementNameRecursive) mappedName.findTagInElementName(&tagOutput, &lenOutput, &postfix, &type, false, true); // Assert - EXPECT_EQ(result, 36); // The location of the tag - EXPECT_EQ(tagOutput, 0x1b);// The tag - EXPECT_EQ(lenOutput, 27); // Now includes the next tag, from the recursive search + EXPECT_EQ(result, 36); // The location of the tag + EXPECT_EQ(tagOutput, 0x1b); // The tag + EXPECT_EQ(lenOutput, 27); // Now includes the next tag, from the recursive search EXPECT_EQ(postfix, ";:H1b:10,F"); - EXPECT_EQ(type, 'F');// F=Face + EXPECT_EQ(type, 'F'); // F=Face } TEST(MappedName, hash) diff --git a/tests/src/App/StringHasher.cpp b/tests/src/App/StringHasher.cpp index 4b099ba5a7..a8edf85116 100644 --- a/tests/src/App/StringHasher.cpp +++ b/tests/src/App/StringHasher.cpp @@ -24,7 +24,7 @@ protected: } }; -TEST_F(StringIDTest, stringIDManualConstructionNoFlags)// NOLINT +TEST_F(StringIDTest, stringIDManualConstructionNoFlags) // NOLINT { // Arrange const long expectedValue {42}; @@ -39,7 +39,7 @@ TEST_F(StringIDTest, stringIDManualConstructionNoFlags)// NOLINT EXPECT_FALSE(id.isBinary()); } -TEST_F(StringIDTest, stringIDManualConstructionWithFlag)// NOLINT +TEST_F(StringIDTest, stringIDManualConstructionWithFlag) // NOLINT { // Arrange const long expectedValue {42}; @@ -55,7 +55,7 @@ TEST_F(StringIDTest, stringIDManualConstructionWithFlag)// NOLINT EXPECT_TRUE(id.isBinary()); } -TEST_F(StringIDTest, stringIDDefaultConstruction)// NOLINT +TEST_F(StringIDTest, stringIDDefaultConstruction) // NOLINT { // Arrange & Act auto id = App::StringID(); @@ -64,7 +64,7 @@ TEST_F(StringIDTest, stringIDDefaultConstruction)// NOLINT EXPECT_EQ(0, id.value()); } -TEST_F(StringIDTest, value)// NOLINT +TEST_F(StringIDTest, value) // NOLINT { // Arrange const long expectedValueA {0}; @@ -85,12 +85,12 @@ TEST_F(StringIDTest, value)// NOLINT EXPECT_EQ(expectedValueC, valueC); } -TEST_F(StringIDTest, relatedIDs)// NOLINT +TEST_F(StringIDTest, relatedIDs) // NOLINT { // Nothing to test -- relatedIDs are storage-only in this class } -TEST_F(StringIDTest, isBinary)// NOLINT +TEST_F(StringIDTest, isBinary) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Binary); @@ -101,7 +101,7 @@ TEST_F(StringIDTest, isBinary)// NOLINT EXPECT_FALSE(controlID.isBinary()); } -TEST_F(StringIDTest, isHashed)// NOLINT +TEST_F(StringIDTest, isHashed) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Hashed); @@ -112,7 +112,7 @@ TEST_F(StringIDTest, isHashed)// NOLINT EXPECT_FALSE(controlID.isHashed()); } -TEST_F(StringIDTest, isPostfixed)// NOLINT +TEST_F(StringIDTest, isPostfixed) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Postfixed); @@ -123,7 +123,7 @@ TEST_F(StringIDTest, isPostfixed)// NOLINT EXPECT_FALSE(controlID.isPostfixed()); } -TEST_F(StringIDTest, isPostfixEncoded)// NOLINT +TEST_F(StringIDTest, isPostfixEncoded) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::PostfixEncoded); @@ -134,7 +134,7 @@ TEST_F(StringIDTest, isPostfixEncoded)// NOLINT EXPECT_FALSE(controlID.isPostfixEncoded()); } -TEST_F(StringIDTest, isIndexed)// NOLINT +TEST_F(StringIDTest, isIndexed) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Indexed); @@ -145,7 +145,7 @@ TEST_F(StringIDTest, isIndexed)// NOLINT EXPECT_FALSE(controlID.isIndexed()); } -TEST_F(StringIDTest, isPrefixID)// NOLINT +TEST_F(StringIDTest, isPrefixID) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::PrefixID); @@ -156,7 +156,7 @@ TEST_F(StringIDTest, isPrefixID)// NOLINT EXPECT_FALSE(controlID.isPrefixID()); } -TEST_F(StringIDTest, isPrefixIDIndex)// NOLINT +TEST_F(StringIDTest, isPrefixIDIndex) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::PrefixIDIndex); @@ -167,7 +167,7 @@ TEST_F(StringIDTest, isPrefixIDIndex)// NOLINT EXPECT_FALSE(controlID.isPrefixIDIndex()); } -TEST_F(StringIDTest, isMarked)// NOLINT +TEST_F(StringIDTest, isMarked) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Marked); @@ -178,7 +178,7 @@ TEST_F(StringIDTest, isMarked)// NOLINT EXPECT_FALSE(controlID.isMarked()); } -TEST_F(StringIDTest, isPersistent)// NOLINT +TEST_F(StringIDTest, isPersistent) // NOLINT { // Arrange auto flaggedID = givenFlaggedStringID(App::StringID::Flag::Persistent); @@ -189,17 +189,17 @@ TEST_F(StringIDTest, isPersistent)// NOLINT EXPECT_FALSE(controlID.isPersistent()); } -TEST_F(StringIDTest, isFromSameHasher)// NOLINT +TEST_F(StringIDTest, isFromSameHasher) // NOLINT { // Nothing to test except when used by StringHasher } -TEST_F(StringIDTest, getHasher)// NOLINT +TEST_F(StringIDTest, getHasher) // NOLINT { // Nothing to test except when used by StringHasher } -TEST_F(StringIDTest, data)// NOLINT +TEST_F(StringIDTest, data) // NOLINT { // Arrange QByteArray expectedData {"data", 4}; @@ -212,12 +212,12 @@ TEST_F(StringIDTest, data)// NOLINT EXPECT_EQ(expectedData, data); } -TEST_F(StringIDTest, postfix)// NOLINT +TEST_F(StringIDTest, postfix) // NOLINT { // Nothing to test except when used by StringHasher } -TEST_F(StringIDTest, getPyObject)// NOLINT +TEST_F(StringIDTest, getPyObject) // NOLINT { // Arrange Py_Initialize(); @@ -232,7 +232,7 @@ TEST_F(StringIDTest, getPyObject)// NOLINT EXPECT_TRUE(PyObject_TypeCheck(py.ptr(), &App::StringIDPy::Type)); } -TEST_F(StringIDTest, getPyObjectWithIndex)// NOLINT +TEST_F(StringIDTest, getPyObjectWithIndex) // NOLINT { // Arrange Py_Initialize(); @@ -247,7 +247,7 @@ TEST_F(StringIDTest, getPyObjectWithIndex)// NOLINT ASSERT_TRUE(PyObject_TypeCheck(py.ptr(), &App::StringIDPy::Type)); } -TEST_F(StringIDTest, toStringWithoutIndex)// NOLINT +TEST_F(StringIDTest, toStringWithoutIndex) // NOLINT { // Arrange const long bigHex = 0xfcad10; @@ -260,10 +260,10 @@ TEST_F(StringIDTest, toStringWithoutIndex)// NOLINT // Assert EXPECT_EQ(std::string("#1"), resultA); - EXPECT_EQ(std::string("#fcad10"), resultB);// Make sure result is in hex + EXPECT_EQ(std::string("#fcad10"), resultB); // Make sure result is in hex } -TEST_F(StringIDTest, toStringWithIndex)// NOLINT +TEST_F(StringIDTest, toStringWithIndex) // NOLINT { // Arrange const long bigHex = 0xfcad10; @@ -278,7 +278,7 @@ TEST_F(StringIDTest, toStringWithIndex)// NOLINT EXPECT_EQ(std::string("#1"), resultB); } -TEST_F(StringIDTest, fromStringWithEOFAndLengthGood)// NOLINT +TEST_F(StringIDTest, fromStringWithEOFAndLengthGood) // NOLINT { // Arrange const std::string testString {"#1:fcad"}; @@ -292,7 +292,7 @@ TEST_F(StringIDTest, fromStringWithEOFAndLengthGood)// NOLINT EXPECT_EQ(result.index, 0xfcad); } -TEST_F(StringIDTest, fromStringExtraData)// NOLINT +TEST_F(StringIDTest, fromStringExtraData) // NOLINT { // Arrange const std::string testString {"#1:fcad#2:bad"}; @@ -308,7 +308,7 @@ TEST_F(StringIDTest, fromStringExtraData)// NOLINT EXPECT_EQ(falseResult.id, 1); } -TEST_F(StringIDTest, fromStringLengthUnspecified)// NOLINT +TEST_F(StringIDTest, fromStringLengthUnspecified) // NOLINT { // Arrange const std::string testString {"#1:fcad#2:bad"}; @@ -322,7 +322,7 @@ TEST_F(StringIDTest, fromStringLengthUnspecified)// NOLINT EXPECT_EQ(falseResult.id, 1); } -TEST_F(StringIDTest, fromStringShorterLength)// NOLINT +TEST_F(StringIDTest, fromStringShorterLength) // NOLINT { // Arrange const int dataLength {7}; @@ -337,7 +337,7 @@ TEST_F(StringIDTest, fromStringShorterLength)// NOLINT EXPECT_EQ(falseResult.id, 1); } -TEST_F(StringIDTest, fromStringNoHashtag)// NOLINT +TEST_F(StringIDTest, fromStringNoHashtag) // NOLINT { // Arrange const std::string testString {"1:fcad"}; @@ -349,7 +349,7 @@ TEST_F(StringIDTest, fromStringNoHashtag)// NOLINT EXPECT_EQ(result.id, -1); } -TEST_F(StringIDTest, fromStringNotHex)// NOLINT +TEST_F(StringIDTest, fromStringNotHex) // NOLINT { // Arrange const std::string testStringA {"1:freecad"}; @@ -364,7 +364,7 @@ TEST_F(StringIDTest, fromStringNotHex)// NOLINT EXPECT_EQ(resultB.id, -1); } -TEST_F(StringIDTest, fromStringQByteArray)// NOLINT +TEST_F(StringIDTest, fromStringQByteArray) // NOLINT { // Arrange const QByteArray testString {"#1:fcad", 7}; @@ -377,10 +377,10 @@ TEST_F(StringIDTest, fromStringQByteArray)// NOLINT EXPECT_EQ(result.index, 0xfcad); } -TEST_F(StringIDTest, dataToTextHashed)// NOLINT +TEST_F(StringIDTest, dataToTextHashed) // NOLINT { // Arrange - QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40};// NOLINT + QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40}; // NOLINT auto id = App::StringID(1, buffer, App::StringID::Flag::Hashed); // Act @@ -390,10 +390,10 @@ TEST_F(StringIDTest, dataToTextHashed)// NOLINT EXPECT_EQ(result, buffer.toBase64().constData()); } -TEST_F(StringIDTest, dataToTextBinary)// NOLINT +TEST_F(StringIDTest, dataToTextBinary) // NOLINT { // Arrange - QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40};// NOLINT + QByteArray buffer {"120ca87015d849dbea060eaf2295fcc4ee981427", 40}; // NOLINT auto id = App::StringID(1, buffer, App::StringID::Flag::Binary); // Act @@ -403,7 +403,7 @@ TEST_F(StringIDTest, dataToTextBinary)// NOLINT EXPECT_EQ(result, buffer.toBase64().constData()); } -TEST_F(StringIDTest, dataToTextNoIndex)// NOLINT +TEST_F(StringIDTest, dataToTextNoIndex) // NOLINT { // Arrange QByteArray data {"data", 4}; @@ -416,7 +416,7 @@ TEST_F(StringIDTest, dataToTextNoIndex)// NOLINT EXPECT_EQ(result, "data"); } -TEST_F(StringIDTest, dataToTextWithIndex)// NOLINT +TEST_F(StringIDTest, dataToTextWithIndex) // NOLINT { // Arrange QByteArray data {"data", 4}; @@ -424,18 +424,18 @@ TEST_F(StringIDTest, dataToTextWithIndex)// NOLINT // Act auto resultA = id.dataToText(1); - auto resultB = id.dataToText(1024);// NOLINT + auto resultB = id.dataToText(1024); // NOLINT // Assert EXPECT_EQ(resultA, "data1"); - EXPECT_EQ(resultB, "data1024");// Not hex! + EXPECT_EQ(resultB, "data1024"); // Not hex! } -TEST_F(StringIDTest, dataToTextWithPostfix)// NOLINT +TEST_F(StringIDTest, dataToTextWithPostfix) // NOLINT { // Arrange QByteArray data {"data", 4}; - QByteArray postfix {"postfix", 7};// NOLINT + QByteArray postfix {"postfix", 7}; // NOLINT auto id = App::StringID(1, data); id.setPostfix(postfix); @@ -446,7 +446,7 @@ TEST_F(StringIDTest, dataToTextWithPostfix)// NOLINT EXPECT_EQ(result, "data1postfix"); } -TEST_F(StringIDTest, dataToBytesNoIndex)// NOLINT +TEST_F(StringIDTest, dataToBytesNoIndex) // NOLINT { // Arrange QByteArray data {"data", 4}; @@ -459,7 +459,7 @@ TEST_F(StringIDTest, dataToBytesNoIndex)// NOLINT EXPECT_EQ(data, result); } -TEST_F(StringIDTest, dataToBytesWithIndex)// NOLINT +TEST_F(StringIDTest, dataToBytesWithIndex) // NOLINT { // Arrange QByteArray data {"data", 4}; @@ -473,11 +473,11 @@ TEST_F(StringIDTest, dataToBytesWithIndex)// NOLINT EXPECT_EQ(data + QByteArray::number(index), result); } -TEST_F(StringIDTest, dataToBytesWithPostfix)// NOLINT +TEST_F(StringIDTest, dataToBytesWithPostfix) // NOLINT { // Arrange QByteArray data {"data", 4}; - QByteArray postfix {"postfix", 7};// NOLINT + QByteArray postfix {"postfix", 7}; // NOLINT auto id = App::StringID(1, data); id.setPostfix(postfix); @@ -488,11 +488,11 @@ TEST_F(StringIDTest, dataToBytesWithPostfix)// NOLINT EXPECT_EQ(data + postfix, result); } -TEST_F(StringIDTest, dataToBytesWithIndexAndPostfix)// NOLINT +TEST_F(StringIDTest, dataToBytesWithIndexAndPostfix) // NOLINT { // Arrange QByteArray data {"data", 4}; - QByteArray postfix {"postfix", 7};// NOLINT + QByteArray postfix {"postfix", 7}; // NOLINT const int index {1234}; auto id = App::StringID(1, data); id.setPostfix(postfix); @@ -504,7 +504,7 @@ TEST_F(StringIDTest, dataToBytesWithIndexAndPostfix)// NOLINT EXPECT_EQ(data + QByteArray::number(index) + postfix, result); } -TEST_F(StringIDTest, mark)// NOLINT +TEST_F(StringIDTest, mark) // NOLINT { // Arrange QByteArray data {"data", 4}; @@ -518,7 +518,7 @@ TEST_F(StringIDTest, mark)// NOLINT EXPECT_TRUE(id.isMarked()); } -TEST_F(StringIDTest, setPersistent)// NOLINT +TEST_F(StringIDTest, setPersistent) // NOLINT { // Arrange QByteArray data {"data", 4}; @@ -532,17 +532,17 @@ TEST_F(StringIDTest, setPersistent)// NOLINT EXPECT_TRUE(id.isPersistent()); } -TEST_F(StringIDTest, operatorLessThan)// NOLINT +TEST_F(StringIDTest, operatorLessThan) // NOLINT { // Can't test without a _hasher } -TEST_F(StringIDTest, compare)// NOLINT +TEST_F(StringIDTest, compare) // NOLINT { // Can't test without a _hasher } -TEST_F(StringIDTest, IndexIDBooleanConversion)// NOLINT +TEST_F(StringIDTest, IndexIDBooleanConversion) // NOLINT { // Arrange const long id {42}; @@ -555,7 +555,7 @@ TEST_F(StringIDTest, IndexIDBooleanConversion)// NOLINT EXPECT_FALSE(indexIdFalse); } -TEST_F(StringIDTest, IndexIDStreamInsertionOperator)// NOLINT +TEST_F(StringIDTest, IndexIDStreamInsertionOperator) // NOLINT { // Arrange const long id {42}; @@ -589,7 +589,7 @@ private: }; -TEST_F(StringIDRefTest, defaultConstructor)// NOLINT +TEST_F(StringIDRefTest, defaultConstructor) // NOLINT { // Arrange & Act auto idRef = App::StringIDRef(); @@ -598,7 +598,7 @@ TEST_F(StringIDRefTest, defaultConstructor)// NOLINT EXPECT_FALSE(idRef); } -TEST_F(StringIDRefTest, constructFromNewStringID)// NOLINT +TEST_F(StringIDRefTest, constructFromNewStringID) // NOLINT { // Arrange & Act auto idRef = App::StringIDRef(createStringID()); @@ -611,7 +611,7 @@ TEST_F(StringIDRefTest, constructFromNewStringID)// NOLINT // when its destructor is called (upon exit from this test function). } -TEST_F(StringIDRefTest, constructFromStringIDAndIndex)// NOLINT +TEST_F(StringIDRefTest, constructFromStringIDAndIndex) // NOLINT { // Arrange const int index {42}; @@ -628,7 +628,7 @@ TEST_F(StringIDRefTest, constructFromStringIDAndIndex)// NOLINT // when its destructor is called (upon exit from this test function). } -TEST_F(StringIDRefTest, copyConstructor)// NOLINT +TEST_F(StringIDRefTest, copyConstructor) // NOLINT { // Arrange const int index {42}; @@ -644,7 +644,7 @@ TEST_F(StringIDRefTest, copyConstructor)// NOLINT EXPECT_EQ(index, newIdRef.getIndex()); } -TEST_F(StringIDRefTest, copyConstructorWithIndex)// NOLINT +TEST_F(StringIDRefTest, copyConstructorWithIndex) // NOLINT { // Arrange const int index {42}; @@ -661,7 +661,7 @@ TEST_F(StringIDRefTest, copyConstructorWithIndex)// NOLINT EXPECT_EQ(otherIndex, newIdRef.getIndex()); } -TEST_F(StringIDRefTest, moveConstructor)// NOLINT +TEST_F(StringIDRefTest, moveConstructor) // NOLINT { // Arrange auto idRef = App::StringIDRef(createStringID()); @@ -673,14 +673,14 @@ TEST_F(StringIDRefTest, moveConstructor)// NOLINT EXPECT_EQ(1, newIdRef.getRefCount()); } -TEST_F(StringIDRefTest, destructor)// NOLINT +TEST_F(StringIDRefTest, destructor) // NOLINT { // Arrange auto idRef = App::StringIDRef(createStringID()); { auto newIdRef = App::StringIDRef(idRef); - ASSERT_EQ(2, idRef.getRefCount());// Verify the test setup + ASSERT_EQ(2, idRef.getRefCount()); // Verify the test setup // Act // The scope ends, causing newIdRef destructor execution @@ -690,7 +690,7 @@ TEST_F(StringIDRefTest, destructor)// NOLINT EXPECT_EQ(1, idRef.getRefCount()); } -TEST_F(StringIDRefTest, reset)// NOLINT +TEST_F(StringIDRefTest, reset) // NOLINT { // Arrange auto idRef = App::StringIDRef(createStringID()); @@ -702,7 +702,7 @@ TEST_F(StringIDRefTest, reset)// NOLINT EXPECT_FALSE(idRef); } -TEST_F(StringIDRefTest, resetWithStringID)// NOLINT +TEST_F(StringIDRefTest, resetWithStringID) // NOLINT { // Arrange const int index {42}; @@ -716,7 +716,7 @@ TEST_F(StringIDRefTest, resetWithStringID)// NOLINT EXPECT_NE(index, idRef.getIndex()); } -TEST_F(StringIDRefTest, resetWithStringIDAndIndex)// NOLINT +TEST_F(StringIDRefTest, resetWithStringIDAndIndex) // NOLINT { // Arrange const int indexA {42}; @@ -731,7 +731,7 @@ TEST_F(StringIDRefTest, resetWithStringIDAndIndex)// NOLINT EXPECT_EQ(indexB, idRef.getIndex()); } -TEST_F(StringIDRefTest, swap)// NOLINT +TEST_F(StringIDRefTest, swap) // NOLINT { // Arrange const int indexA {42}; @@ -747,7 +747,7 @@ TEST_F(StringIDRefTest, swap)// NOLINT EXPECT_EQ(indexA, idRefB.getIndex()); } -TEST_F(StringIDRefTest, assignmentFromSelf)// NOLINT +TEST_F(StringIDRefTest, assignmentFromSelf) // NOLINT { // Arrange auto idRef = App::StringIDRef(createStringID()); @@ -759,12 +759,12 @@ TEST_F(StringIDRefTest, assignmentFromSelf)// NOLINT EXPECT_EQ(1, idRef.getRefCount()); } -TEST_F(StringIDRefTest, assignmentToEmptyFromStringID)// NOLINT +TEST_F(StringIDRefTest, assignmentToEmptyFromStringID) // NOLINT { // Arrange Py_Initialize(); auto idRef = App::StringIDRef(); - ASSERT_FALSE(idRef);// Verify setup + ASSERT_FALSE(idRef); // Verify setup // Act idRef = createStringID(); @@ -773,7 +773,7 @@ TEST_F(StringIDRefTest, assignmentToEmptyFromStringID)// NOLINT EXPECT_TRUE(idRef); } -TEST_F(StringIDRefTest, assignmentFromStringIDRef)// NOLINT +TEST_F(StringIDRefTest, assignmentFromStringIDRef) // NOLINT { // Arrange auto firstIdRef = App::StringIDRef(createStringID()); @@ -789,11 +789,11 @@ TEST_F(StringIDRefTest, assignmentFromStringIDRef)// NOLINT EXPECT_EQ(1, firstIdRefExtra.getRefCount()); } -TEST_F(StringIDRefTest, moveAssignmentFromStringIDRef)// NOLINT +TEST_F(StringIDRefTest, moveAssignmentFromStringIDRef) // NOLINT { auto emptyIdRef = App::StringIDRef(); auto goodIdRef = App::StringIDRef(createStringID()); - ASSERT_FALSE(emptyIdRef);// Verify setup + ASSERT_FALSE(emptyIdRef); // Verify setup // Act emptyIdRef = std::move(goodIdRef); @@ -803,7 +803,7 @@ TEST_F(StringIDRefTest, moveAssignmentFromStringIDRef)// NOLINT EXPECT_EQ(1, emptyIdRef.getRefCount()); } -TEST_F(StringIDRefTest, operatorLess)// NOLINT +TEST_F(StringIDRefTest, operatorLess) // NOLINT { // Arrange auto emptySIDA = App::StringIDRef(); @@ -822,7 +822,7 @@ TEST_F(StringIDRefTest, operatorLess)// NOLINT // NOTE: Cannot test the impact of hasher without a StringHasher } -TEST_F(StringIDRefTest, operatorEquality)// NOLINT +TEST_F(StringIDRefTest, operatorEquality) // NOLINT { // Arrange auto emptySIDA = App::StringIDRef(); @@ -838,7 +838,7 @@ TEST_F(StringIDRefTest, operatorEquality)// NOLINT EXPECT_FALSE(nonEmptyA == nonEmptyOther); } -TEST_F(StringIDRefTest, operatorInequality)// NOLINT +TEST_F(StringIDRefTest, operatorInequality) // NOLINT { // Arrange auto emptySIDA = App::StringIDRef(); @@ -854,7 +854,7 @@ TEST_F(StringIDRefTest, operatorInequality)// NOLINT EXPECT_TRUE(nonEmptyA != nonEmptyOther); } -TEST_F(StringIDRefTest, booleanConversion)// NOLINT +TEST_F(StringIDRefTest, booleanConversion) // NOLINT { // Arrange auto emptySID = App::StringIDRef(); @@ -865,7 +865,7 @@ TEST_F(StringIDRefTest, booleanConversion)// NOLINT EXPECT_TRUE(nonEmpty); } -TEST_F(StringIDRefTest, getRefCount)// NOLINT +TEST_F(StringIDRefTest, getRefCount) // NOLINT { // Arrange auto stringID = createStringID(); @@ -881,7 +881,7 @@ TEST_F(StringIDRefTest, getRefCount)// NOLINT EXPECT_EQ(2, secondCount); } -TEST_F(StringIDRefTest, toString)// NOLINT +TEST_F(StringIDRefTest, toString) // NOLINT { // Arrange auto emptySID = App::StringIDRef(); @@ -897,7 +897,7 @@ TEST_F(StringIDRefTest, toString)// NOLINT EXPECT_FALSE(nonempty.empty()); } -TEST_F(StringIDRefTest, dataToText)// NOLINT +TEST_F(StringIDRefTest, dataToText) // NOLINT { // Arrange auto emptySID = App::StringIDRef(); @@ -913,7 +913,7 @@ TEST_F(StringIDRefTest, dataToText)// NOLINT EXPECT_FALSE(nonempty.empty()); } -TEST_F(StringIDRefTest, constData)// NOLINT +TEST_F(StringIDRefTest, constData) // NOLINT { // Arrange auto sid = App::StringIDRef(createStringID()); @@ -926,7 +926,7 @@ TEST_F(StringIDRefTest, constData)// NOLINT EXPECT_STREQ(constData, "data"); } -TEST_F(StringIDRefTest, deref)// NOLINT +TEST_F(StringIDRefTest, deref) // NOLINT { // Arrange auto sid = createStringID(); @@ -936,7 +936,7 @@ TEST_F(StringIDRefTest, deref)// NOLINT EXPECT_EQ(sid, &(ref.deref())); } -TEST_F(StringIDRefTest, value)// NOLINT +TEST_F(StringIDRefTest, value) // NOLINT { // Arrange auto empty = App::StringIDRef(); @@ -951,12 +951,12 @@ TEST_F(StringIDRefTest, value)// NOLINT EXPECT_NE(0, nonEmptyValue); } -TEST_F(StringIDRefTest, relatedIDs)// NOLINT +TEST_F(StringIDRefTest, relatedIDs) // NOLINT { // Nothing to test without a StringHasher } -TEST_F(StringIDRefTest, isBinary)// NOLINT +TEST_F(StringIDRefTest, isBinary) // NOLINT { // Arrange auto nothing = App::StringIDRef(); @@ -969,7 +969,7 @@ TEST_F(StringIDRefTest, isBinary)// NOLINT EXPECT_FALSE(nonBinary.isBinary()); } -TEST_F(StringIDRefTest, isHashed)// NOLINT +TEST_F(StringIDRefTest, isHashed) // NOLINT { // Arrange auto nothing = App::StringIDRef(); @@ -982,7 +982,7 @@ TEST_F(StringIDRefTest, isHashed)// NOLINT EXPECT_FALSE(nonHashed.isHashed()); } -TEST_F(StringIDRefTest, toBytes)// NOLINT +TEST_F(StringIDRefTest, toBytes) // NOLINT { // Arrange QByteArray byteStorage; @@ -995,7 +995,7 @@ TEST_F(StringIDRefTest, toBytes)// NOLINT EXPECT_FALSE(byteStorage.isNull()); } -TEST_F(StringIDRefTest, getPyObject)// NOLINT +TEST_F(StringIDRefTest, getPyObject) // NOLINT { // Arrange auto ref = App::StringIDRef(createStringID()); @@ -1010,7 +1010,7 @@ TEST_F(StringIDRefTest, getPyObject)// NOLINT EXPECT_EQ(none.ptr(), Py_None); } -TEST_F(StringIDRefTest, mark)// NOLINT +TEST_F(StringIDRefTest, mark) // NOLINT { // Arrange auto ref = App::StringIDRef(createStringID()); @@ -1023,7 +1023,7 @@ TEST_F(StringIDRefTest, mark)// NOLINT EXPECT_TRUE(ref.isMarked()); } -TEST_F(StringIDRefTest, isMarked)// NOLINT +TEST_F(StringIDRefTest, isMarked) // NOLINT { // Arrange auto marked = App::StringIDRef(new App::StringID(1, nullptr, App::StringID::Flag::Marked)); @@ -1034,17 +1034,17 @@ TEST_F(StringIDRefTest, isMarked)// NOLINT EXPECT_FALSE(notMarked.isMarked()); } -TEST_F(StringIDRefTest, isFromSameHasher)// NOLINT +TEST_F(StringIDRefTest, isFromSameHasher) // NOLINT { // Nothing to test, requires a StringHasher } -TEST_F(StringIDRefTest, getHasher)// NOLINT +TEST_F(StringIDRefTest, getHasher) // NOLINT { // Nothing to test, requires a StringHasher } -TEST_F(StringIDRefTest, setPersistent)// NOLINT +TEST_F(StringIDRefTest, setPersistent) // NOLINT { // Arrange auto persistent = App::StringIDRef(createStringID()); @@ -1104,7 +1104,7 @@ private: Base::Reference _hasher; }; -TEST_F(StringHasherTest, defaultConstructor)// NOLINT +TEST_F(StringHasherTest, defaultConstructor) // NOLINT { // Arrange // Done in Setup() @@ -1116,7 +1116,7 @@ TEST_F(StringHasherTest, defaultConstructor)// NOLINT EXPECT_EQ(0, Hasher()->size()); } -TEST_F(StringHasherTest, getMemSize)// NOLINT +TEST_F(StringHasherTest, getMemSize) // NOLINT { // Arrange givenSomeHashedValues(); @@ -1130,49 +1130,49 @@ TEST_F(StringHasherTest, getMemSize)// NOLINT EXPECT_LT(Hasher()->size(), result); } -TEST_F(StringHasherTest, Save)// NOLINT +TEST_F(StringHasherTest, Save) // NOLINT { // Arrange // Act // Assert } -TEST_F(StringHasherTest, Restore)// NOLINT +TEST_F(StringHasherTest, Restore) // NOLINT { // Arrange // Act // Assert } -TEST_F(StringHasherTest, SaveDocFile)// NOLINT +TEST_F(StringHasherTest, SaveDocFile) // NOLINT { // Arrange // Act // Assert } -TEST_F(StringHasherTest, RestoreDocFile)// NOLINT +TEST_F(StringHasherTest, RestoreDocFile) // NOLINT { // Arrange // Act // Assert } -TEST_F(StringHasherTest, setPersistenceFileName)// NOLINT +TEST_F(StringHasherTest, setPersistenceFileName) // NOLINT { // Arrange // Act // Assert } -TEST_F(StringHasherTest, getPersistenceFileName)// NOLINT +TEST_F(StringHasherTest, getPersistenceFileName) // NOLINT { // Arrange // Act // Assert } -TEST_F(StringHasherTest, getIDFromQByteArrayShort)// NOLINT +TEST_F(StringHasherTest, getIDFromQByteArrayShort) // NOLINT { // Arrange const std::array string {"data"}; @@ -1185,11 +1185,11 @@ TEST_F(StringHasherTest, getIDFromQByteArrayShort)// NOLINT // Assert EXPECT_STREQ(string.data(), id.constData()); EXPECT_FALSE(id.isHashed()); - EXPECT_NE(qba.constData(), id.constData());// A copy was made, the pointers differ + EXPECT_NE(qba.constData(), id.constData()); // A copy was made, the pointers differ EXPECT_EQ(2, id.getRefCount()); } -TEST_F(StringHasherTest, getIDFromQByteArrayLongHashable)// NOLINT +TEST_F(StringHasherTest, getIDFromQByteArrayLongHashable) // NOLINT { // Arrange const std::array string {"data that is longer than our hasher threshold"}; @@ -1202,10 +1202,10 @@ TEST_F(StringHasherTest, getIDFromQByteArrayLongHashable)// NOLINT // Assert EXPECT_STRNE(string.data(), id.constData()); EXPECT_TRUE(id.isHashed()); - EXPECT_NE(qba.constData(), id.constData());// A copy was made, the pointers differ + EXPECT_NE(qba.constData(), id.constData()); // A copy was made, the pointers differ } -TEST_F(StringHasherTest, getIDFromQByteArrayLongUnhashable)// NOLINT +TEST_F(StringHasherTest, getIDFromQByteArrayLongUnhashable) // NOLINT { // Arrange const std::array string {"data that is longer than our hasher threshold"}; @@ -1218,10 +1218,10 @@ TEST_F(StringHasherTest, getIDFromQByteArrayLongUnhashable)// NOLINT // Assert EXPECT_STREQ(string.data(), id.constData()); EXPECT_FALSE(id.isHashed()); - EXPECT_NE(qba.constData(), id.constData());// A copy was made, the pointers differ + EXPECT_NE(qba.constData(), id.constData()); // A copy was made, the pointers differ } -TEST_F(StringHasherTest, getIDFromQByteArrayNoCopy)// NOLINT +TEST_F(StringHasherTest, getIDFromQByteArrayNoCopy) // NOLINT { // Arrange const std::array string {"data"}; @@ -1233,10 +1233,10 @@ TEST_F(StringHasherTest, getIDFromQByteArrayNoCopy)// NOLINT // Assert EXPECT_STREQ(string.data(), id.constData()); - EXPECT_EQ(qba.constData(), id.constData());// No copy was made, the pointers are the same + EXPECT_EQ(qba.constData(), id.constData()); // No copy was made, the pointers are the same } -TEST_F(StringHasherTest, getIDFromQByteArrayTwoDifferentStrings)// NOLINT +TEST_F(StringHasherTest, getIDFromQByteArrayTwoDifferentStrings) // NOLINT { // Arrange const std::array stringA {"dataA"}; @@ -1252,7 +1252,7 @@ TEST_F(StringHasherTest, getIDFromQByteArrayTwoDifferentStrings)// NOLINT EXPECT_NE(idA.dataToText(), idB.dataToText()); } -TEST_F(StringHasherTest, getIDFromQByteArrayTwoIdenticalStrings)// NOLINT +TEST_F(StringHasherTest, getIDFromQByteArrayTwoIdenticalStrings) // NOLINT { // Arrange const std::array stringA {"data"}; @@ -1268,7 +1268,7 @@ TEST_F(StringHasherTest, getIDFromQByteArrayTwoIdenticalStrings)// NOLINT EXPECT_EQ(idA.dataToText(), idB.dataToText()); } -TEST_F(StringHasherTest, getIDFromQByteArrayBinaryFlag)// NOLINT +TEST_F(StringHasherTest, getIDFromQByteArrayBinaryFlag) // NOLINT { // Arrange const std::array string {"data"}; @@ -1281,7 +1281,7 @@ TEST_F(StringHasherTest, getIDFromQByteArrayBinaryFlag)// NOLINT EXPECT_TRUE(id.isBinary()); } -TEST_F(StringHasherTest, getIDFromCString)// NOLINT +TEST_F(StringHasherTest, getIDFromCString) // NOLINT { // Arrange // Act @@ -1300,7 +1300,7 @@ TEST_F(StringHasherTest, getIDFromCString)// NOLINT * 8. If sids.size() > 10, duplicates get removed */ -TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithoutIndex)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithoutIndex) // NOLINT { // Arrange const char* name {"Face"}; @@ -1315,7 +1315,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithoutIndex)// NOLINT EXPECT_EQ(id.dataToText(), mappedName1.toString()); } -TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithIndex)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithIndex) // NOLINT { // Arrange const char* expectedName {"Face"}; @@ -1332,7 +1332,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithoutPostfixWithIndex)// NOLINT EXPECT_EQ(id.dataToText(), mappedName1.toString()); } -TEST_F(StringHasherTest, getIDFromMappedNameWithoutIndexWithPostfix)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameWithoutIndexWithPostfix) // NOLINT { // Arrange const char* name {"Face"}; @@ -1351,7 +1351,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithoutIndexWithPostfix)// NOLINT EXPECT_EQ(expectedPostfix, id.deref().postfix()); } -TEST_F(StringHasherTest, getIDFromMappedNameWithIndexWithPostfix)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameWithIndexWithPostfix) // NOLINT { // Arrange const char* name {"Face3"}; @@ -1369,7 +1369,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameWithIndexWithPostfix)// NOLINT EXPECT_EQ(id.dataToText(), mappedName2.toString()); } -TEST_F(StringHasherTest, getIDFromMappedNameExistingNameNoIndex)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameExistingNameNoIndex) // NOLINT { // Arrange Data::MappedName mappedName1 = givenMappedName("SomeTestName"); @@ -1384,7 +1384,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameExistingNameNoIndex)// NOLINT EXPECT_EQ(secondIDInserted.dataToText(), mappedName1.toString()); } -TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndex)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndex) // NOLINT { // Arrange auto mappedNameA = givenMappedName("Test1"); @@ -1400,7 +1400,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndex)// NOLINT EXPECT_EQ(secondIDInserted.dataToText(), mappedNameB.toString()); } -TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndexAndPostfix)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndexAndPostfix) // NOLINT { // Arrange auto mappedNameA = givenMappedName("Test1", ";:M;FUS;:Hb:7,F"); @@ -1416,7 +1416,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameExistingNameWithIndexAndPostfix)// N EXPECT_EQ(secondIDInserted.dataToText(), mappedNameB.toString()); } -TEST_F(StringHasherTest, getIDFromMappedNameDuplicateWithEncodedPostfix)// NOLINT +TEST_F(StringHasherTest, getIDFromMappedNameDuplicateWithEncodedPostfix) // NOLINT { // Arrange auto mappedNameA = givenMappedName("Test1", ";:M;FUS;:Hb:7,F"); @@ -1432,7 +1432,7 @@ TEST_F(StringHasherTest, getIDFromMappedNameDuplicateWithEncodedPostfix)// NOLIN EXPECT_EQ(secondIDInserted.dataToText(), mappedNameB.toString()); } -TEST_F(StringHasherTest, getIDFromIntegerIDNoSuchID)// NOLINT +TEST_F(StringHasherTest, getIDFromIntegerIDNoSuchID) // NOLINT { // Arrange // Do nothing, so the hash table is empty @@ -1444,7 +1444,7 @@ TEST_F(StringHasherTest, getIDFromIntegerIDNoSuchID)// NOLINT EXPECT_FALSE(result); } -TEST_F(StringHasherTest, getIDFromIntegerIDBadID)// NOLINT +TEST_F(StringHasherTest, getIDFromIntegerIDBadID) // NOLINT { // Arrange const std::string prefix {"Test1"}; @@ -1461,7 +1461,7 @@ TEST_F(StringHasherTest, getIDFromIntegerIDBadID)// NOLINT } -TEST_F(StringHasherTest, getIDMap)// NOLINT +TEST_F(StringHasherTest, getIDMap) // NOLINT { // Arrange givenSomeHashedValues(); @@ -1473,7 +1473,7 @@ TEST_F(StringHasherTest, getIDMap)// NOLINT EXPECT_GT(map.size(), 0); } -TEST_F(StringHasherTest, clear)// NOLINT +TEST_F(StringHasherTest, clear) // NOLINT { // Arrange givenSomeHashedValues(); @@ -1485,7 +1485,7 @@ TEST_F(StringHasherTest, clear)// NOLINT EXPECT_EQ(0, Hasher()->size()); } -TEST_F(StringHasherTest, size)// NOLINT +TEST_F(StringHasherTest, size) // NOLINT { // Arrange givenSomeHashedValues(); @@ -1497,7 +1497,7 @@ TEST_F(StringHasherTest, size)// NOLINT EXPECT_GT(result, 0); } -TEST_F(StringHasherTest, count)// NOLINT +TEST_F(StringHasherTest, count) // NOLINT { // Arrange givenSomeHashedValues(); @@ -1509,7 +1509,7 @@ TEST_F(StringHasherTest, count)// NOLINT EXPECT_GT(result, 0); } -TEST_F(StringHasherTest, getPyObject)// NOLINT +TEST_F(StringHasherTest, getPyObject) // NOLINT { // Arrange - done in setUp() @@ -1520,7 +1520,7 @@ TEST_F(StringHasherTest, getPyObject)// NOLINT EXPECT_TRUE(PyObject_TypeCheck(py.ptr(), &App::StringHasherPy::Type)); } -TEST_F(StringHasherTest, setGetSaveAll)// NOLINT +TEST_F(StringHasherTest, setGetSaveAll) // NOLINT { // Arrange - done by setUp() @@ -1535,7 +1535,7 @@ TEST_F(StringHasherTest, setGetSaveAll)// NOLINT EXPECT_FALSE(expectedFalse); } -TEST_F(StringHasherTest, setGetThreshold)// NOLINT +TEST_F(StringHasherTest, setGetThreshold) // NOLINT { // Arrange const int expectedThreshold {42}; @@ -1548,7 +1548,7 @@ TEST_F(StringHasherTest, setGetThreshold)// NOLINT EXPECT_EQ(expectedThreshold, foundThreshold); } -TEST_F(StringHasherTest, clearMarks)// NOLINT +TEST_F(StringHasherTest, clearMarks) // NOLINT { // Arrange auto ref = givenSomeHashedValues(); @@ -1562,7 +1562,7 @@ TEST_F(StringHasherTest, clearMarks)// NOLINT ASSERT_FALSE(ref.isMarked()); } -TEST_F(StringHasherTest, compact)// NOLINT +TEST_F(StringHasherTest, compact) // NOLINT { // Arrange givenSomeHashedValues(); diff --git a/tests/src/Base/Axis.cpp b/tests/src/Base/Axis.cpp index 4665260aed..bc01cd7cb8 100644 --- a/tests/src/Base/Axis.cpp +++ b/tests/src/Base/Axis.cpp @@ -30,7 +30,7 @@ TEST(Axis, TestAssign) Base::Axis move; axis.setBase(Base::Vector3d(0, 0, 1)); axis.setDirection(Base::Vector3d(1, 1, 1)); - move = std::move(axis);// NOLINT + move = std::move(axis); // NOLINT EXPECT_EQ(move.getBase(), Base::Vector3d(0, 0, 1)); EXPECT_EQ(move.getDirection(), Base::Vector3d(1, 1, 1)); } diff --git a/tests/src/Base/Bitmask.cpp b/tests/src/Base/Bitmask.cpp index 1c64180efb..97909d3809 100644 --- a/tests/src/Base/Bitmask.cpp +++ b/tests/src/Base/Bitmask.cpp @@ -4,7 +4,8 @@ #include -enum class TestFlagEnum { +enum class TestFlagEnum +{ Flag1, Flag2, Flag3 diff --git a/tests/src/Base/BoundBox.cpp b/tests/src/Base/BoundBox.cpp index f29f2faced..21e8be6f63 100644 --- a/tests/src/Base/BoundBox.cpp +++ b/tests/src/Base/BoundBox.cpp @@ -1,4 +1,11 @@ #include "gtest/gtest.h" +#ifdef WIN32 +#define WIN32_LEAN_AND_MEAN +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include +#endif #include #include diff --git a/tests/src/Base/Builder3D.cpp b/tests/src/Base/Builder3D.cpp index 6acea40a74..1337ec76ab 100644 --- a/tests/src/Base/Builder3D.cpp +++ b/tests/src/Base/Builder3D.cpp @@ -1,9 +1,10 @@ #include "gtest/gtest.h" -#include "Base/Builder3D.h" -#include +#include -TEST(Builder, one) +TEST(Builder3D, openInventor) { - QString ss {}; + Base::Builder3D builder; + builder.beginSeparator(); + builder.endSeparator(); } diff --git a/tests/src/Base/CMakeLists.txt b/tests/src/Base/CMakeLists.txt index 7f2d163409..fcdb9ee032 100644 --- a/tests/src/Base/CMakeLists.txt +++ b/tests/src/Base/CMakeLists.txt @@ -4,6 +4,7 @@ target_sources( ${CMAKE_CURRENT_SOURCE_DIR}/Axis.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Bitmask.cpp ${CMAKE_CURRENT_SOURCE_DIR}/BoundBox.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Builder3D.cpp ${CMAKE_CURRENT_SOURCE_DIR}/CoordinateSystem.cpp ${CMAKE_CURRENT_SOURCE_DIR}/DualNumber.cpp ${CMAKE_CURRENT_SOURCE_DIR}/DualQuaternion.cpp diff --git a/tests/src/Base/Reader.cpp b/tests/src/Base/Reader.cpp index 0b17e6db03..737b7fb2d6 100644 --- a/tests/src/Base/Reader.cpp +++ b/tests/src/Base/Reader.cpp @@ -2,6 +2,10 @@ #include "gtest/gtest.h" +#ifdef _MSC_VER +#pragma warning(disable : 4996) +#endif + #include "Base/Exception.h" #include "Base/Reader.h" #include @@ -72,7 +76,7 @@ TEST_F(ReaderTest, beginCharStreamOpenClose) Reader()->readElement("data"); // Act - auto& result = Reader()->beginCharStream();// Not an error, even though there is no data + auto& result = Reader()->beginCharStream(); // Not an error, even though there is no data // Assert EXPECT_TRUE(result.good()); @@ -86,7 +90,7 @@ TEST_F(ReaderTest, beginCharStreamAlreadyBegun) Reader()->beginCharStream(); // Act & Assert - EXPECT_THROW(Reader()->beginCharStream(), Base::XMLParseException);// NOLINT + EXPECT_THROW(Reader()->beginCharStream(), Base::XMLParseException); // NOLINT } TEST_F(ReaderTest, charStreamGood) @@ -110,7 +114,7 @@ TEST_F(ReaderTest, charStreamBad) Reader()->readElement("data"); // Act & Assert - EXPECT_THROW(Reader()->charStream(), Base::XMLParseException);// NOLINT + EXPECT_THROW(Reader()->charStream(), Base::XMLParseException); // NOLINT } TEST_F(ReaderTest, endCharStreamGood) @@ -121,7 +125,7 @@ TEST_F(ReaderTest, endCharStreamGood) Reader()->beginCharStream(); // Act & Assert - Reader()->endCharStream();// Does not throw + Reader()->endCharStream(); // Does not throw } TEST_F(ReaderTest, endCharStreamBad) @@ -132,7 +136,7 @@ TEST_F(ReaderTest, endCharStreamBad) // Do not open the stream... // Act & Assert - Reader()->endCharStream();// Does not throw, even with no open stream + Reader()->endCharStream(); // Does not throw, even with no open stream } TEST_F(ReaderTest, readDataSmallerThanBuffer) @@ -182,10 +186,10 @@ TEST_F(ReaderTest, readDataLargerThanBufferSecondRead) Reader()->readElement("data"); Reader()->beginCharStream(); std::array buffer {}; - Reader()->read(buffer.data(), bufferSize);// Read the first five bytes + Reader()->read(buffer.data(), bufferSize); // Read the first five bytes // Act - auto bytesRead = Reader()->read(buffer.data(), bufferSize);// Second five bytes + auto bytesRead = Reader()->read(buffer.data(), bufferSize); // Second five bytes // Assert for (size_t i = 0; i < bufferSize; ++i) { @@ -208,5 +212,5 @@ TEST_F(ReaderTest, readDataNotStarted) auto bytesRead = Reader()->read(buffer.data(), bufferSize); // Assert - EXPECT_EQ(-1, bytesRead);// Because we didn't call beginCharStream + EXPECT_EQ(-1, bytesRead); // Because we didn't call beginCharStream } diff --git a/tests/src/Base/Unit.cpp b/tests/src/Base/Unit.cpp index 526faf9e7a..0f85c72e79 100644 --- a/tests/src/Base/Unit.cpp +++ b/tests/src/Base/Unit.cpp @@ -29,7 +29,7 @@ TEST(Unit, TestTypeString) EXPECT_EQ(toString(Base::Unit::Acceleration), "Acceleration"); EXPECT_EQ(toString(Base::Unit::AmountOfSubstance), "AmountOfSubstance"); EXPECT_EQ(toString(Base::Unit::Angle), "Angle"); - EXPECT_EQ(toString(Base::Unit::AngleOfFriction), "Angle");// same unit as Angle + EXPECT_EQ(toString(Base::Unit::AngleOfFriction), "Angle"); // same unit as Angle EXPECT_EQ(toString(Base::Unit::Area), "Area"); EXPECT_EQ(toString(Base::Unit::CurrentDensity), "CurrentDensity"); EXPECT_EQ(toString(Base::Unit::Density), "Density"); @@ -56,21 +56,21 @@ TEST(Unit, TestTypeString) EXPECT_EQ(toString(Base::Unit::MagneticFlux), "MagneticFlux"); EXPECT_EQ(toString(Base::Unit::MagneticFluxDensity), "MagneticFluxDensity"); EXPECT_EQ(toString(Base::Unit::Magnetization), - "MagneticFieldStrength");// same as MagneticFieldStrength + "MagneticFieldStrength"); // same as MagneticFieldStrength EXPECT_EQ(toString(Base::Unit::Mass), "Mass"); EXPECT_EQ(toString(Base::Unit::Pressure), "Pressure"); EXPECT_EQ(toString(Base::Unit::Power), "Power"); - EXPECT_EQ(toString(Base::Unit::ShearModulus), "Pressure");// same as Pressure + EXPECT_EQ(toString(Base::Unit::ShearModulus), "Pressure"); // same as Pressure EXPECT_EQ(toString(Base::Unit::SpecificEnergy), "SpecificEnergy"); EXPECT_EQ(toString(Base::Unit::SpecificHeat), "SpecificHeat"); EXPECT_EQ(toString(Base::Unit::Stiffness), "Stiffness"); - EXPECT_EQ(toString(Base::Unit::Stress), "Pressure");// same as Pressure + EXPECT_EQ(toString(Base::Unit::Stress), "Pressure"); // same as Pressure EXPECT_EQ(toString(Base::Unit::Temperature), "Temperature"); EXPECT_EQ(toString(Base::Unit::ThermalConductivity), "ThermalConductivity"); EXPECT_EQ(toString(Base::Unit::ThermalExpansionCoefficient), "ThermalExpansionCoefficient"); EXPECT_EQ(toString(Base::Unit::ThermalTransferCoefficient), "ThermalTransferCoefficient"); EXPECT_EQ(toString(Base::Unit::TimeSpan), "TimeSpan"); - EXPECT_EQ(toString(Base::Unit::UltimateTensileStrength), "Pressure");// same as Pressure + EXPECT_EQ(toString(Base::Unit::UltimateTensileStrength), "Pressure"); // same as Pressure EXPECT_EQ(toString(Base::Unit::VacuumPermittivity), "VacuumPermittivity"); EXPECT_EQ(toString(Base::Unit::Velocity), "Velocity"); EXPECT_EQ(toString(Base::Unit::Volume), "Volume"); @@ -78,8 +78,8 @@ TEST(Unit, TestTypeString) EXPECT_EQ(toString(Base::Unit::VolumetricThermalExpansionCoefficient), "ThermalExpansionCoefficient"); EXPECT_EQ(toString(Base::Unit::Work), "Work"); - EXPECT_EQ(toString(Base::Unit::YieldStrength), "Pressure");// same as Pressure - EXPECT_EQ(toString(Base::Unit::YoungsModulus), "Pressure");// same unit as Pressure + EXPECT_EQ(toString(Base::Unit::YieldStrength), "Pressure"); // same as Pressure + EXPECT_EQ(toString(Base::Unit::YoungsModulus), "Pressure"); // same unit as Pressure } TEST(Unit, strings) { diff --git a/tests/src/Base/Writer.cpp b/tests/src/Base/Writer.cpp index e4fcd3deed..e5cf71f955 100644 --- a/tests/src/Base/Writer.cpp +++ b/tests/src/Base/Writer.cpp @@ -8,9 +8,10 @@ // Writer is designed to be a base class, so for testing we actually instantiate a StringWriter, // which is derived from it -class WriterTest : public ::testing::Test { +class WriterTest: public ::testing::Test +{ protected: - //void SetUp() override {} + // void SetUp() override {} // void TearDown() override {} protected: @@ -62,7 +63,7 @@ TEST_F(WriterTest, insertNonAsciiData) TEST_F(WriterTest, beginCharStream) { // Arrange & Act - auto & checkStream {_writer.beginCharStream()}; + auto& checkStream {_writer.beginCharStream()}; // Assert EXPECT_TRUE(checkStream.good()); @@ -74,10 +75,7 @@ TEST_F(WriterTest, beginCharStreamTwice) _writer.beginCharStream(); // Act & Assert - EXPECT_THROW( - _writer.beginCharStream(), - Base::RuntimeError - ); + EXPECT_THROW(_writer.beginCharStream(), Base::RuntimeError); } TEST_F(WriterTest, endCharStream) @@ -99,7 +97,7 @@ TEST_F(WriterTest, endCharStreamTwice) _writer.endCharStream(); // Act - _writer.endCharStream(); // Doesn't throw, or do anything at all + _writer.endCharStream(); // Doesn't throw, or do anything at all // Assert EXPECT_EQ("", _writer.getString()); diff --git a/tests/src/Gui/QuantitySpinBox.cpp b/tests/src/Gui/QuantitySpinBox.cpp index a332e8ecd8..05f571dac4 100644 --- a/tests/src/Gui/QuantitySpinBox.cpp +++ b/tests/src/Gui/QuantitySpinBox.cpp @@ -33,19 +33,19 @@ private Q_SLOTS: void cleanup() {} - void test_SimpleBaseUnit()// NOLINT + void test_SimpleBaseUnit() // NOLINT { auto result = qsb->valueFromText("1mm"); QCOMPARE(result, Base::Quantity(1, QLatin1String("mm"))); } - void test_UnitInNumerator()// NOLINT + void test_UnitInNumerator() // NOLINT { auto result = qsb->valueFromText("1mm/10"); QCOMPARE(result, Base::Quantity(0.1, QLatin1String("mm"))); } - void test_UnitInDenominator()// NOLINT + void test_UnitInDenominator() // NOLINT { auto result = qsb->valueFromText("1/10mm"); QCOMPARE(result, Base::Quantity(0.1, QLatin1String("mm"))); diff --git a/tests/src/Mod/Sketcher/App/SketchObject.cpp b/tests/src/Mod/Sketcher/App/SketchObject.cpp index 56e6144382..bcb4dbc164 100644 --- a/tests/src/Mod/Sketcher/App/SketchObject.cpp +++ b/tests/src/Mod/Sketcher/App/SketchObject.cpp @@ -27,7 +27,8 @@ protected: _docName = App::GetApplication().getUniqueDocumentName("test"); auto _doc = App::GetApplication().newDocument(_docName.c_str(), "testUser"); // TODO: Do we add a body first, or is just adding sketch sufficient for this test? - _sketchobj = static_cast(_doc->addObject("Sketcher::SketchObject")); + _sketchobj = + static_cast(_doc->addObject("Sketcher::SketchObject")); } void TearDown() override @@ -44,10 +45,15 @@ private: // TODO: use shared_ptr or something else here? Sketcher::SketchObject* _sketchobj; std::string _docName; - std::vector allowedTypes {"Vertex", "Edge", "ExternalEdge", "H_Axis", "V_Axis", "RootPoint"}; + std::vector allowedTypes {"Vertex", + "Edge", + "ExternalEdge", + "H_Axis", + "V_Axis", + "RootPoint"}; }; -TEST_F(SketchObjectTest, createSketchObject) // NOLINT +TEST_F(SketchObjectTest, createSketchObject) // NOLINT { // Arrange diff --git a/tests/src/Mod/Sketcher/App/planegcs/GCS.cpp b/tests/src/Mod/Sketcher/App/planegcs/GCS.cpp index fcbc16280c..51fcdef592 100644 --- a/tests/src/Mod/Sketcher/App/planegcs/GCS.cpp +++ b/tests/src/Mod/Sketcher/App/planegcs/GCS.cpp @@ -4,9 +4,11 @@ #include "Mod/Sketcher/App/planegcs/GCS.h" -class SystemTest : public GCS::System{ +class SystemTest: public GCS::System +{ public: - size_t getNumberOfConstraints(int tagID = -1) { + size_t getNumberOfConstraints(int tagID = -1) + { return _getNumberOfConstraints(tagID); } }; @@ -33,7 +35,7 @@ private: std::unique_ptr _system; }; -TEST_F(GCSTest, clearConstraints) // NOLINT +TEST_F(GCSTest, clearConstraints) // NOLINT { // Arrange const size_t numConstraints {100}; diff --git a/tests/src/zipios++/collectioncollection.cpp b/tests/src/zipios++/collectioncollection.cpp index 19abd6f2b3..2bf0602800 100644 --- a/tests/src/zipios++/collectioncollection.cpp +++ b/tests/src/zipios++/collectioncollection.cpp @@ -12,7 +12,7 @@ TEST(Collection, TestValidity) EXPECT_EQ(cc.getEntry("inexistant", zipios::FileCollection::MatchPath::IGNORE), nullptr); EXPECT_EQ(cc.getInputStream("inexistant", zipios::FileCollection::MatchPath::MATCH), nullptr); EXPECT_EQ(cc.getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE), nullptr); - EXPECT_EQ(cc.getName(), "-");// default name is "-" + EXPECT_EQ(cc.getName(), "-"); // default name is "-" EXPECT_EQ(cc.size(), 0); cc.close(); EXPECT_EQ(cc.isValid(), false); @@ -29,7 +29,7 @@ TEST(Collection, TestCopy) EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::MATCH), nullptr); EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE), nullptr); - EXPECT_EQ(copy.getName(), "-");// default name is "-" + EXPECT_EQ(copy.getName(), "-"); // default name is "-" EXPECT_EQ(copy.size(), 0); } @@ -45,7 +45,7 @@ TEST(Collection, TestCopyAssign) EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::MATCH), nullptr); EXPECT_EQ(copy.getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE), nullptr); - EXPECT_EQ(copy.getName(), "-");// default name is "-" + EXPECT_EQ(copy.getName(), "-"); // default name is "-" EXPECT_EQ(copy.size(), 0); } @@ -61,7 +61,7 @@ TEST(Collection, TestClone) nullptr); EXPECT_EQ(pointer->getInputStream("inexistant", zipios::FileCollection::MatchPath::IGNORE), nullptr); - EXPECT_EQ(pointer->getName(), "-");// default name is "-" + EXPECT_EQ(pointer->getName(), "-"); // default name is "-" EXPECT_EQ(pointer->size(), 0); }